Skip to content

Commit

Permalink
update build directory for cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
holmes1412 committed Aug 16, 2021
1 parent 293a341 commit a2a59f6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 312 deletions.
295 changes: 0 additions & 295 deletions BUILD

This file was deleted.

10 changes: 1 addition & 9 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
ALL_TARGETS := all base check install preinstall package rpm clean tutorial example
MAKE_FILE := Makefile

DEFAULT_BUILD_DIR := build
DEFAULT_BUILD_DIR := build.cmake
BUILD_DIR := $(shell if [ -f $(MAKE_FILE) ]; then echo "."; else echo $(DEFAULT_BUILD_DIR); fi)
CMAKE3 := $(shell if which cmake3>/dev/null ; then echo cmake3; else echo cmake; fi;)

Expand All @@ -25,9 +25,6 @@ endif
tutorial: all
make -C tutorial

example: all
make -C example

check: all
make -C test check

Expand All @@ -42,13 +39,8 @@ ifneq ($(BUILD_DIR),.)
endif

clean:
ifeq (build, $(wildcard build))
-make -C build clean
endif
-make -C workflow clean
-make -C test clean
-make -C benchmark clean
-make -C example clean
-make -C tutorial clean
rm -rf $(DEFAULT_BUILD_DIR)
rm -rf _include
Expand Down
6 changes: 2 additions & 4 deletions test/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
ALL_TARGETS := all check clean
MAKE_FILE := Makefile

DEFAULT_BUILD_DIR := build
DEFAULT_BUILD_DIR := build.cmake
BUILD_DIR := $(shell if [ -f $(MAKE_FILE) ]; then echo "."; else echo $(DEFAULT_BUILD_DIR); fi)
CMAKE3 := $(shell if which cmake3 ; then echo cmake3; else echo cmake; fi;)

Expand All @@ -27,8 +27,6 @@ check:
clean:
ifeq ($(MAKE_FILE), $(wildcard $(MAKE_FILE)))
-make -f Makefile clean
else ifeq (build, $(wildcard build))
-make -C build clean
endif
rm -rf build
rm -rf $(DEFAULT_BUILD_DIR)

8 changes: 4 additions & 4 deletions tutorial/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
ALL_TARGETS := all clean
MAKE_FILE := Makefile

DEFAULT_BUILD_DIR := build
DEFAULT_BUILD_DIR := build.cmake
BUILD_DIR := $(shell if [ -f $(MAKE_FILE) ]; then echo "."; else echo $(DEFAULT_BUILD_DIR); fi)
CMAKE3 := $(shell if which cmake3>/dev/null ; then echo cmake3; else echo cmake; fi;)

Expand All @@ -22,8 +22,8 @@ endif
clean:
ifeq ($(MAKE_FILE), $(wildcard $(MAKE_FILE)))
-make -f Makefile clean
else ifeq (build, $(wildcard build))
-make -C build clean
else ifeq ($(DEFAULT_BUILD_DIR), $(wildcard $(DEFAULT_BUILD_DIR)))
-make -C $(DEFAULT_BUILD_DIR) clean
endif
rm -rf build
rm -rf $(DEFAULT_BUILD_DIR)

0 comments on commit a2a59f6

Please sign in to comment.