Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-06-27 02:50:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-27 02:50:35 +0300
commitb796ce0f26c1bf206194eb8c004d214806c2828b (patch)
tree9f034d54827a30a3a3792b87e608a4208dc4ce66 /CMakeLists.txt
parent5a1bdf2c3a7df5a6bde94e0dbc0e3d4d5618139d (diff)
CMake: Only set CMAKE_BUILD_TYPE_INIT when not set
Convenience makefile now uses CMAKE_BUILD_TYPE_INIT, this means you can change the build type of an existing build and it won't be overwritten when running `make`. Useful if you want to add debug info to a release build for profiling.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7917278434..04237812d87 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/platform")
# avoid having empty buildtype
-set(CMAKE_BUILD_TYPE_INIT "Release")
+if(NOT DEFINED CMAKE_BUILD_TYPE_INIT)
+ set(CMAKE_BUILD_TYPE_INIT "Release")
+endif()
# quiet output for Makefiles, 'make -s' helps too
# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)