Skip to content

Commit

Permalink
Fixed how to get GENERATOR_IS_MULTI_CONFIG
Browse files Browse the repository at this point in the history
`GENERATOR_IS_MULTI_CONFIG` is a global property, not a variable.
  • Loading branch information
tt4g authored and poletti-marco committed Jan 30, 2023
1 parent 9beae9f commit 570eb41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ if(NOT "${CMAKE_BUILD_TYPE}" MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)
message(FATAL_ERROR "Please re-run CMake, specifying -DCMAKE_BUILD_TYPE=Debug , -DCMAKE_BUILD_TYPE=Release , -DCMAKE_BUILD_TYPE=RelWithDebInfo or -DCMAKE_BUILD_TYPE=MinSizeRel .")
endif()

get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
option(FRUIT_ALLOW_MULTI_CONFIG "Allow multi-configuration generator. If this option is OFF, enforces that a single configuration is used." OFF)
if(FRUIT_ALLOW_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)
if(isMultiConfig)
message(STATUS "${CMAKE_PROJECT_NAME} supports the CMake multi-configuration generator,"
" but is optimized for the `CMAKE_BUILD_TYPE` specified in the CMake configuration step,"
" and tests will only work in this configuration.")
Expand Down

0 comments on commit 570eb41

Please sign in to comment.