summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/TargetObjects/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/TargetObjects/RunCMakeTest.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake b/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake
index d2b3032..9756255 100644
--- a/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake
+++ b/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake
@@ -6,3 +6,11 @@ run_cmake(NotObjlibTarget)
if(RunCMake_GENERATOR STREQUAL "Xcode" AND "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
run_cmake(XcodeVariableNoGenexExpansion)
endif()
+
+function(run_cmake_and_build case)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
+ run_cmake(${case})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(${case}-build ${CMAKE_COMMAND} --build .)
+endfunction()
+run_cmake_and_build(Unity)