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.
This commit is contained in:
parent
5a1bdf2c3a
commit
b796ce0f26
Notes:
blender-bot
2023-02-14 06:49:55 +01:00
Referenced by issue #51965, Custom Bone Shape Wireframe setting affects wireframe thickness Referenced by issue #51955, Changing Auto-IK length crashes Blender (with new-depsgraph)
|
@ -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)
|
||||
|
|
|
@ -104,7 +104,7 @@ endif
|
|||
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
|
||||
-H"$(BLENDER_DIR)" \
|
||||
-B"$(BUILD_DIR)" \
|
||||
-DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
|
||||
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue