From a9940988b024e28c729f68e2452aa4662ee6a74f Mon Sep 17 00:00:00 2001 From: XieHan Date: Tue, 13 Jul 2021 17:13:45 +0800 Subject: [PATCH] change cmake build directory --- GNUmakefile | 5 +---- test/GNUmakefile | 2 +- tutorial/GNUmakefile | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 7c036e16..08bbf727 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -2,7 +2,7 @@ ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) ALL_TARGETS := all base check install preinstall clean tutorial 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;) @@ -34,9 +34,6 @@ install preinstall: base make -C $(BUILD_DIR) -f Makefile $@ clean: -ifeq (build, $(wildcard build)) - -make -C build clean -endif -make -C test clean -make -C tutorial clean rm -rf $(DEFAULT_BUILD_DIR) diff --git a/test/GNUmakefile b/test/GNUmakefile index 7f1f82db..9d855c13 100644 --- a/test/GNUmakefile +++ b/test/GNUmakefile @@ -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;) diff --git a/tutorial/GNUmakefile b/tutorial/GNUmakefile index 78af2403..2d16458e 100644 --- a/tutorial/GNUmakefile +++ b/tutorial/GNUmakefile @@ -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;)