diff --git a/CMakeLists.txt b/CMakeLists.txt index 7660f0b6..cfde37bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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.")