diff options
author | tt4g <mainlinett@gmail.com> | 2023-01-30 08:16:31 +0900 |
---|---|---|
committer | poletti-marco <poletti.marco@gmail.com> | 2023-01-29 16:43:24 -0800 |
commit | 570eb41e8ba7cb64837af57e5d50a94e45f02446 (patch) | |
tree | 999c9b49caf48e6653147f761e438ece405cb515 | |
parent | 9beae9f86f908d384d6a9dafc08f8ee756f9c08d (diff) | |
download | google-fruit-upstream-master.tar.gz |
Fixed how to get `GENERATOR_IS_MULTI_CONFIG`upstream-master
`GENERATOR_IS_MULTI_CONFIG` is a global property, not a variable.
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7660f0b..cfde37b 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.") |