Skip to content

Commit

Permalink
Fix examining value of GENERATOR_IS_MULTI_CONFIG
Browse files Browse the repository at this point in the history
CMake does not define a variable GENERATOR_IS_MULTI_CONFIG by default.
Instead it sets a global property of that name.
In order to examine its value it first has to be retrieved and stored
into a (local) variable, which is what this commit does.

fixes: #1574

Signed-off-by: Deniz Bahadir <deniz@code.bahadir.email>
  • Loading branch information
DenizThatMenace authored and Dead2 committed Sep 16, 2023
1 parent 16fe1f8 commit 401aeb8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ endif()

# Make sure we use an appropriate BUILD_TYPE by default, "Release" to be exact
# this should select the maximum generic optimisation on the current platform (i.e. -O3 for gcc/clang)
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT GENERATOR_IS_MULTI_CONFIG)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
Expand Down

0 comments on commit 401aeb8

Please sign in to comment.