From 01826231f8916057ad06555a3677c1806a2fb3be Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 3 Apr 2017 16:14:09 -0400 Subject: Tests: Add case for GENERATOR_IS_MULTI_CONFIG --- Tests/RunCMake/get_property/IsMultiConfig-stdout.txt | 1 + Tests/RunCMake/get_property/IsMultiConfig.cmake | 2 ++ Tests/RunCMake/get_property/NotMultiConfig-stdout.txt | 1 + Tests/RunCMake/get_property/NotMultiConfig.cmake | 1 + Tests/RunCMake/get_property/RunCMakeTest.cmake | 6 ++++++ 5 files changed, 11 insertions(+) create mode 100644 Tests/RunCMake/get_property/IsMultiConfig-stdout.txt create mode 100644 Tests/RunCMake/get_property/IsMultiConfig.cmake create mode 100644 Tests/RunCMake/get_property/NotMultiConfig-stdout.txt create mode 100644 Tests/RunCMake/get_property/NotMultiConfig.cmake 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() -- cgit v0.12