summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2022-02-04 21:04:35 (GMT)
committerGitHub <noreply@github.com>2022-02-04 21:04:35 (GMT)
commitdffcc7f626b97eaa7ecb7e3101fafc5e5459fc7a (patch)
tree922a5b92d0b2c1e1b8baab571c92bf29e49dbd40 /Makefile
parente9c29be413887f6266abb0ab2bebadd59e1e8f6d (diff)
parent42233d68f84d9d39890453c41f1198c49c18f6bb (diff)
downloadlz4-dffcc7f626b97eaa7ecb7e3101fafc5e5459fc7a.zip
lz4-dffcc7f626b97eaa7ecb7e3101fafc5e5459fc7a.tar.gz
lz4-dffcc7f626b97eaa7ecb7e3101fafc5e5459fc7a.tar.bz2
Merge pull request #1063 from lz4/cmaketest
updated cmake test
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 7a5c1ef..fd62945 100644
--- a/Makefile
+++ b/Makefile
@@ -84,11 +84,12 @@ clean:
$(MAKE) -C $(FUZZDIR) $@ > $(VOID)
$(MAKE) -C contrib/gen_manual $@ > $(VOID)
$(RM) lz4$(EXT)
+ $(RM) -r $(CMAKE_BUILD_DIR)
@echo Cleaning completed
#-----------------------------------------------------------------------------
-# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets
+# make install is validated only for Posix environments
#-----------------------------------------------------------------------------
ifeq ($(POSIX_ENV),Yes)
HOST_OS = POSIX
@@ -102,21 +103,24 @@ install uninstall:
travis-install:
$(MAKE) -j1 install DESTDIR=~/install_test_dir
-.PHONY: cmake
-cmake:
- cd build/cmake; cmake $(CMAKE_PARAMS) CMakeLists.txt; $(MAKE)
-
endif # POSIX_ENV
+CMAKE ?= cmake
+CMAKE_BUILD_DIR ?= build/cmake/build
ifneq (,$(filter MSYS%,$(shell $(UNAME))))
HOST_OS = MSYS
CMAKE_PARAMS = -G"MSYS Makefiles"
endif
+.PHONY: cmake
+cmake:
+ mkdir -p $(CMAKE_BUILD_DIR)
+ cd $(CMAKE_BUILD_DIR); $(CMAKE) $(CMAKE_PARAMS) ..; $(CMAKE) --build .
+
#------------------------------------------------------------------------
-#make tests validated only for MSYS, Linux, OSX, kFreeBSD and Hurd targets
+# make tests validated only for MSYS and Posix environments
#------------------------------------------------------------------------
ifneq (,$(filter $(HOST_OS),MSYS POSIX))