diff options
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake | 12 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorPlatform/x64Platform-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorPlatform/x64Platform.cmake | 7 |
3 files changed, 18 insertions, 3 deletions
diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake index 60217bc..442eb9f 100644 --- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake @@ -2,6 +2,12 @@ include(RunCMake) run_cmake(NoPlatform) -set(RunCMake_TEST_OPTIONS "-DCMAKE_GENERATOR_PLATFORM=Bad Platform") -run_cmake(BadPlatform) -unset(RunCMake_TEST_OPTIONS) +if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124])( 20[0-9][0-9])?$") + set(RunCMake_TEST_OPTIONS "-DCMAKE_GENERATOR_PLATFORM=x64") + run_cmake(x64Platform) + unset(RunCMake_TEST_OPTIONS) +else() + set(RunCMake_TEST_OPTIONS "-DCMAKE_GENERATOR_PLATFORM=Bad Platform") + run_cmake(BadPlatform) + unset(RunCMake_TEST_OPTIONS) +endif() diff --git a/Tests/RunCMake/GeneratorPlatform/x64Platform-stdout.txt b/Tests/RunCMake/GeneratorPlatform/x64Platform-stdout.txt new file mode 100644 index 0000000..05a83ff --- /dev/null +++ b/Tests/RunCMake/GeneratorPlatform/x64Platform-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_GENERATOR_PLATFORM is 'x64' as expected. +-- CMAKE_VS_PLATFORM_NAME is 'x64' as expected. diff --git a/Tests/RunCMake/GeneratorPlatform/x64Platform.cmake b/Tests/RunCMake/GeneratorPlatform/x64Platform.cmake new file mode 100644 index 0000000..a23bdc7 --- /dev/null +++ b/Tests/RunCMake/GeneratorPlatform/x64Platform.cmake @@ -0,0 +1,7 @@ +foreach(v CMAKE_GENERATOR_PLATFORM CMAKE_VS_PLATFORM_NAME) + if("x${${v}}" STREQUAL "xx64") + message(STATUS "${v} is 'x64' as expected.") + else() + message(FATAL_ERROR "${v} is '${${v}}' but should be 'x64'!") + endif() +endforeach() |