]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix examining value of GENERATOR_IS_MULTI_CONFIG
authorDeniz Bahadir <deniz@code.bahadir.email>
Fri, 15 Sep 2023 13:46:56 +0000 (15:46 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 16 Sep 2023 09:11:41 +0000 (11:11 +0200)
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>
CMakeLists.txt

index 6cccb4659a0f2de6158bd63077b4e8f0db7e741d..bf0423b95657fef9f003579ef5ff5782b12e30a6 100644 (file)
@@ -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