summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
index 3aa791d..faed8f7 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -1,5 +1,11 @@
include(RunCMake)
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012456]")
+ run_cmake(VsNormal)
+ include("${RunCMake_BINARY_DIR}/VsNormal-build/defaults.cmake" OPTIONAL)
+ message(STATUS "VsNormal: platform='${VsNormal_Platform}' toolset='${VsNormal_Toolset}'")
+endif()
+
set(RunCMake_GENERATOR_TOOLSET "")
run_cmake(NoToolset)
@@ -18,6 +24,25 @@ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012456]")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/CudaStandaloneToolset/CUDAVisualStudioIntegration")
run_cmake(TestToolsetCudaPathOnlyOldLayout)
file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/CudaStandaloneToolset")
+ if (VsNormal_Platform MATCHES "^(x64|Win32)$" AND
+ EXISTS "${CMAKE_ROOT}/Templates/MSBuild/FlagTables/${VsNormal_Toolset}_CL.json")
+ set(flagTableDir "${RunCMake_BINARY_DIR}/FlagTables")
+ file(READ "${CMAKE_ROOT}/Templates/MSBuild/FlagTables/${VsNormal_Toolset}_CL.json" flagTableContent)
+ string(REPLACE [["WX-"]] [["TESTWX-"]] flagTableContent "${flagTableContent}")
+ file(REMOVE_RECURSE "${flagTableDir}")
+ file(WRITE "${flagTableDir}/${VsNormal_Platform}_${VsNormal_Toolset}_CL.json" "${flagTableContent}")
+ set(RunCMake_GENERATOR_TOOLSET "${VsNormal_Toolset},customFlagTableDir=${flagTableDir}")
+ set(RunCMake_TEST_VARIANT_DESCRIPTION ":${VsNormal_Platform}_${VsNormal_Toolset}_CL.json")
+ run_cmake(TestToolsetCustomFlagTableDir)
+ file(REMOVE_RECURSE "${flagTableDir}")
+ file(WRITE "${flagTableDir}/${VsNormal_Platform}_CL.json" "${flagTableContent}")
+ set(RunCMake_GENERATOR_TOOLSET "${VsNormal_Toolset},customFlagTableDir=${flagTableDir}")
+ set(RunCMake_TEST_VARIANT_DESCRIPTION ":${VsNormal_Platform}_CL.json")
+ run_cmake(TestToolsetCustomFlagTableDir)
+ unset(RunCMake_TEST_VARIANT_DESCRIPTION)
+ set(RunCMake_GENERATOR_TOOLSET "${VsNormal_Toolset},customFlagTableDir=does_not_exist")
+ run_cmake(BadToolsetCustomFlagTableDir)
+ endif()
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[2456]")
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
run_cmake(TestToolsetHostArchBoth)