diff options
Diffstat (limited to 'Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake b/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake new file mode 100644 index 0000000..06d48bf --- /dev/null +++ b/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake @@ -0,0 +1,42 @@ +include(RunCMake) + +function(run_cmake_build name target) + if(NOT BUILD_CONFIG) + set(BUILD_CONFIG Debug) + endif() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(${name}-${target}-${BUILD_CONFIG}-build ${CMAKE_COMMAND} --build . --config ${BUILD_CONFIG} --target ${target}) +endfunction() + +set(RunCMake_TEST_OPTIONS -DCMAKE_VERIFY_HEADER_SETS=ON) +if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) + list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) +endif() +run_cmake(VerifyHeaderSets) +unset(RunCMake_TEST_OPTIONS) + +run_cmake_build(VerifyHeaderSets static_verify_header_sets) +run_cmake_build(VerifyHeaderSets shared_verify_header_sets) +run_cmake_build(VerifyHeaderSets object_verify_header_sets) +run_cmake_build(VerifyHeaderSets interface_verify_header_sets) +run_cmake_build(VerifyHeaderSets exe_verify_header_sets) +run_cmake_build(VerifyHeaderSets export_exe_verify_header_sets) +run_cmake_build(VerifyHeaderSets none_verify_header_sets) +run_cmake_build(VerifyHeaderSets property_off_verify_header_sets) +run_cmake_build(VerifyHeaderSets private_verify_header_sets) +run_cmake_build(VerifyHeaderSets a_h_verify_header_sets) +run_cmake_build(VerifyHeaderSets dir_c_h_verify_header_sets) +run_cmake_build(VerifyHeaderSets dir_cxx_h_verify_header_sets) + +if(NOT RunCMake_GENERATOR STREQUAL "Xcode") + run_cmake_build(VerifyHeaderSets config_verify_header_sets) + if(RunCMake_GENERATOR_IS_MULTI_CONFIG) + set(BUILD_CONFIG Release) + run_cmake_build(VerifyHeaderSets config_verify_header_sets) + unset(BUILD_CONFIG) + endif() +endif() + +run_cmake_build(VerifyHeaderSets lang_test_c_verify_header_sets) +run_cmake_build(VerifyHeaderSets lang_test_cxx_verify_header_sets) |