]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Cmake now builds with CMAKE_BUILD_TYPE=Release by default, both while 1278/head
authorEden Zik <ezik@fb.com>
Tue, 14 Aug 2018 00:28:52 +0000 (20:28 -0400)
committerEden Zik <ezik@fb.com>
Tue, 14 Aug 2018 00:28:52 +0000 (20:28 -0400)
being invoked from the main Makefile (via cmakebuild) or directly from
the build/cmake directory. Suggested by @pdknsk (#1081).

Makefile
README.md
build/.gitignore
build/cmake/CMakeLists.txt

index f67791275b215ca9516db4233ffa549d3b89fba1..6c4ab9c9b339ea994fb989329e87b85f1266ffc1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -114,7 +114,7 @@ clean:
 ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD MSYS_NT))
 
 HOST_OS = POSIX
-CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON
+CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON -DCMAKE_BUILD_TYPE=Release 
 
 .PHONY: list
 list:
index 17edecb71f145f4f920ba72727babfd752ae87d2..dc99dc0fd30a3887e34ec9170eda57d982c284bd 100644 (file)
--- a/README.md
+++ b/README.md
@@ -121,6 +121,8 @@ A `cmake` project generator is provided within `build/cmake`.
 It can generate Makefiles or other build scripts
 to create `zstd` binary, and `libzstd` dynamic and static libraries.
 
+By default, `CMAKE_BUILD_TYPE` is set to `Release`.
+
 #### Meson
 
 A Meson project is provided within `contrib/meson`.
index b00e709ba5b8d7f515b64604c0f364927b7ddea4..1ceb70ebcc8557f5a886c08d2972d26cdad7b467 100644 (file)
@@ -18,3 +18,14 @@ Studio*
 
 # CMake
 cmake/build/
+CMakeCache.txt
+CMakeFiles
+CMakeScripts
+Testing
+Makefile
+cmake_install.cmake
+install_manifest.txt
+compile_commands.json
+CTestTestfile.cmake
+build
+lib
index fd9bc2b1e7d8528cfede7e27609f0cbfb06994a9..1e2921de87a483faf99006a59256714b910f6e48 100644 (file)
 PROJECT(zstd)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 SET(ZSTD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..")
+
+# Ensure Release build even if not invoked via Makefile
+SET(CMAKE_BUILD_TYPE "Release")
+
 LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
 INCLUDE(GNUInstallDirs)