summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/try_compile/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-24 19:33:34 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-25 13:36:19 (GMT)
commitd256ba078a10001883487ed6af746af5b9cd9608 (patch)
tree094283876832165e43db22f3e5bff7205b01d761 /Tests/RunCMake/try_compile/RunCMakeTest.cmake
parentfb4791b37ccea1f38b8625b31df952408ab942f3 (diff)
downloadCMake-d256ba078a10001883487ed6af746af5b9cd9608.zip
CMake-d256ba078a10001883487ed6af746af5b9cd9608.tar.gz
CMake-d256ba078a10001883487ed6af746af5b9cd9608.tar.bz2
try_compile: Optionally forward custom platform variables to test project
Add a `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable to specify a list of custom variables to be forwarded to a `try_compile` test project. This will be useful for platform information modules or toolchain files to forward some platform-specific set of variables from the host project (perhaps set in its cache) to the test project so that it can build the same way.
Diffstat (limited to 'Tests/RunCMake/try_compile/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/try_compile/RunCMakeTest.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index 4b1d92a..ec099fe 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -16,6 +16,10 @@ run_cmake(BadSources2)
run_cmake(NonSourceCopyFile)
run_cmake(NonSourceCompileDefinitions)
+set(RunCMake_TEST_OPTIONS --debug-trycompile)
+run_cmake(PlatformVariables)
+unset(RunCMake_TEST_OPTIONS)
+
run_cmake(TargetTypeExe)
run_cmake(TargetTypeInvalid)
run_cmake(TargetTypeStatic)