diff options
author | Brad King <brad.king@kitware.com> | 2017-04-03 20:14:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-04 13:49:01 (GMT) |
commit | 01826231f8916057ad06555a3677c1806a2fb3be (patch) | |
tree | 4c3f4ca339ab42bb37200e0883f954a74bf58700 /Tests/RunCMake/get_property | |
parent | 38fd5866c04d734ea78a4327de7a9ce08b6b8341 (diff) | |
download | CMake-01826231f8916057ad06555a3677c1806a2fb3be.zip CMake-01826231f8916057ad06555a3677c1806a2fb3be.tar.gz CMake-01826231f8916057ad06555a3677c1806a2fb3be.tar.bz2 |
Tests: Add case for GENERATOR_IS_MULTI_CONFIG
Diffstat (limited to 'Tests/RunCMake/get_property')
5 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/get_property/IsMultiConfig-stdout.txt b/Tests/RunCMake/get_property/IsMultiConfig-stdout.txt new file mode 100644 index 0000000..9808674 --- /dev/null +++ b/Tests/RunCMake/get_property/IsMultiConfig-stdout.txt @@ -0,0 +1 @@ +-- GENERATOR_IS_MULTI_CONFIG=1 diff --git a/Tests/RunCMake/get_property/IsMultiConfig.cmake b/Tests/RunCMake/get_property/IsMultiConfig.cmake new file mode 100644 index 0000000..64d5ff6 --- /dev/null +++ b/Tests/RunCMake/get_property/IsMultiConfig.cmake @@ -0,0 +1,2 @@ +get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +message(STATUS "GENERATOR_IS_MULTI_CONFIG=${is_multi_config}") diff --git a/Tests/RunCMake/get_property/NotMultiConfig-stdout.txt b/Tests/RunCMake/get_property/NotMultiConfig-stdout.txt new file mode 100644 index 0000000..8e0f895 --- /dev/null +++ b/Tests/RunCMake/get_property/NotMultiConfig-stdout.txt @@ -0,0 +1 @@ +-- GENERATOR_IS_MULTI_CONFIG=0 diff --git a/Tests/RunCMake/get_property/NotMultiConfig.cmake b/Tests/RunCMake/get_property/NotMultiConfig.cmake new file mode 100644 index 0000000..59172d5 --- /dev/null +++ b/Tests/RunCMake/get_property/NotMultiConfig.cmake @@ -0,0 +1 @@ +include(IsMultiConfig.cmake) diff --git a/Tests/RunCMake/get_property/RunCMakeTest.cmake b/Tests/RunCMake/get_property/RunCMakeTest.cmake index 00eef34..017990f 100644 --- a/Tests/RunCMake/get_property/RunCMakeTest.cmake +++ b/Tests/RunCMake/get_property/RunCMakeTest.cmake @@ -22,3 +22,9 @@ run_cmake(NoTarget) run_cmake(NoSource) run_cmake(NoProperty) run_cmake(NoCache) + +if(RunCMake_GENERATOR MATCHES "Visual Studio|Xcode") + run_cmake(IsMultiConfig) +else() + run_cmake(NotMultiConfig) +endif() |