summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/BuildDepends/CustomCommandDependencies-compiler-deps-legacy.cmake9
-rw-r--r--Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake8
-rw-r--r--Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.cmake19
-rw-r--r--Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.step1.cmake3
-rw-r--r--Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.step2.cmake3
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake32
-rw-r--r--Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt9
-rw-r--r--Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar-build-stdout.txt1
-rw-r--r--Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar.cmake2
-rw-r--r--Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/RunCMakeTest.cmake8
-rwxr-xr-xTests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/echo_message.bat1
-rw-r--r--Tests/RunCMake/CMP0041/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt1
-rw-r--r--Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt18
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-NEW-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0121/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_file-Common.cmake51
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_file-NEW-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_file-NEW.cmake4
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_file-OLD-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_file-OLD.cmake4
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_library-Common.cmake52
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_library-NEW-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_library-NEW.cmake6
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_library-OLD-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_library-OLD.cmake6
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake51
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_path-NEW-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_path-NEW.cmake4
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_path-OLD-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_path-OLD.cmake4
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_program-Common.cmake52
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_program-NEW-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_program-NEW.cmake4
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_program-OLD-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0125/CMP0125-find_program-OLD.cmake4
-rw-r--r--Tests/RunCMake/CMP0125/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0125/RunCMakeTest.cmake36
-rw-r--r--Tests/RunCMake/CMP0126/CMP0126-NEW.cmake28
-rw-r--r--Tests/RunCMake/CMP0126/CMP0126-NEW_CL.cmake9
-rw-r--r--Tests/RunCMake/CMP0126/CMP0126-OLD.cmake25
-rw-r--r--Tests/RunCMake/CMP0126/CMP0126-OLD_CL.cmake9
-rw-r--r--Tests/RunCMake/CMP0126/CMP0126-WARN-default.cmake3
-rw-r--r--Tests/RunCMake/CMP0126/CMP0126-WARN-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0126/CMP0126-WARN.cmake5
-rw-r--r--Tests/RunCMake/CMP0126/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0126/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-NEW-stdout.txt1
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-NEW.cmake9
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN-stderr.txt9
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN-stdout.txt2
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN.cmake9
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW-stdout.txt1
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW.cmake7
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stdout.txt1
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD.cmake7
-rw-r--r--Tests/RunCMake/CMakeDependentOption/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Simple-CMP0127-OLD-stdout.txt1
-rw-r--r--Tests/RunCMake/CMakeDependentOption/Simple-CMP0127-OLD.cmake6
-rw-r--r--Tests/RunCMake/CMakeLists.txt91
-rw-r--r--Tests/RunCMake/CMakePresets/ConditionFuture-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/ConditionFuture.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/Conditions.json.in406
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetInstallDirField.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetToolchainField-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetToolchainField.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInstall.json.in30
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInstallCommandLine.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInstallDefault.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInstallInherit.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInstallOverride.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodToolchain.json.in30
-rw-r--r--Tests/RunCMake/CMakePresets/GoodToolchainCommandLine.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodToolchainDefault.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodToolchainInherit.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodToolchainOverride.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/HostSystemName.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/HostSystemName.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/HostSystemNameFuture-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/HostSystemNameFuture.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRegex-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRegex.json.in15
-rw-r--r--Tests/RunCMake/CMakePresets/ListConditions-stdout.txt26
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresets-stdout.txt7
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresets.json.in5
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt7
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt7
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt7
-rw-r--r--Tests/RunCMake/CMakePresets/OptionalBinaryDirField.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/OptionalBinaryDirField.json.in9
-rw-r--r--Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.json.in9
-rw-r--r--Tests/RunCMake/CMakePresets/OptionalGeneratorField.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/OptionalGeneratorField.json.in9
-rw-r--r--Tests/RunCMake/CMakePresets/RunCMakeTest.cmake73
-rw-r--r--Tests/RunCMake/CMakePresets/SimpleFalse-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/SimpleFalse-stderr.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/SimpleTrue.cmake (renamed from Tests/RunCMake/TransformDepfile/noexist.tlog.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/SubConditionNull-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/SubConditionNull.json.in14
-rw-r--r--Tests/RunCMake/CMakePresets/V2InheritV3Optional.cmake (renamed from Tests/RunCMake/TransformDepfile/empty.tlog.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/V2InheritV3Optional.json.in8
-rw-r--r--Tests/RunCMake/CMakePresets/V2InheritV3OptionalUser.json.in11
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/Condition-build-disabled-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/Condition-build-disabled-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/Condition.cmake0
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/Condition.json.in22
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ConditionFuture.json.in17
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ListPresets-build-x-stdout.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ListPresets.json.in12
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CMakePresetsTest/Condition.json.in22
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionFuture.json.in17
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionListPresets-test-x-stdout.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionRunTests-test-disabled-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionRunTests-test-disabled-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionRunTests.cmake2
-rw-r--r--Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/CPack/RPM/Prerequirements.cmake7
-rw-r--r--Tests/RunCMake/CPack/RPM/default_expected_stderr.txt3
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CPack/VerifyResult.cmake38
-rw-r--r--Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/ExpectedFiles.cmake7
-rw-r--r--Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake7
-rw-r--r--Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake66
-rw-r--r--Tests/RunCMake/CPack/tests/DEBUGINFO/RPM-COMPONENT-stderr.txt17
-rw-r--r--Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake7
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-COMPONENT-no_scripts_single_debug_info-stderr.txt1
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-COMPONENT-single_debug_info-stderr.txt1
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-Prerequirements.cmake11
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake39
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake112
-rw-r--r--Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake3
-rw-r--r--Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/test.cmake3
-rw-r--r--Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake37
-rw-r--r--Tests/RunCMake/CPack/tests/SUGGESTS/VerifyResult.cmake20
-rw-r--r--Tests/RunCMake/CPack/tests/SUGGESTS/test_suggests.spec22
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake2
-rw-r--r--Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CPackSymlinks/SrcSymlinksCheck.cmake21
-rw-r--r--Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt7
-rw-r--r--Tests/RunCMake/CPackSymlinks/testcpacksym.tarbin10240 -> 20480 bytes
-rw-r--r--Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-stderr.txt3
-rw-r--r--Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake25
-rw-r--r--Tests/RunCMake/CTestCommandLine/output-junit-check.cmake36
-rw-r--r--Tests/RunCMake/CTestCommandLine/output-junit-result.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/output-junit-stderr.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/test-load-invalid-stdout.txt17
-rw-r--r--Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt17
-rw-r--r--Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt17
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckHIPCompilerFlag.cmake13
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckHIPLinkerFlag.cmake3
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckHIPSourceCompiles.cmake27
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckHIPSourceRuns.cmake21
-rw-r--r--Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build--parallel-bad-number-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build--parallel-no-space-bad-number-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-jobs-bad-number-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-space-bad-number-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS10-WARN-OFF.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake2
-rw-r--r--Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake2
-rw-r--r--Tests/RunCMake/CommandLine/E_create_symlink-broken-replace-check.cmake2
-rw-r--r--Tests/RunCMake/CommandLine/EnvBuildType-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/EnvBuildType.cmake2
-rw-r--r--Tests/RunCMake/CommandLine/EnvBuildTypeIgnore-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/EnvBuildTypeIgnore.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/EnvConfigTypes-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/EnvConfigTypes.cmake2
-rw-r--r--Tests/RunCMake/CommandLine/EnvConfigTypesIgnore-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/EnvConfigTypesIgnore.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchain-toolchain.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchain.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainAbsolute-stdout.txt5
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainAbsolute.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainIgnore-stdout.txt4
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainIgnore.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainNone-stdout.txt3
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainNone.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainNoneExisting-stdout.txt4
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainRelative-stdout.txt4
-rw-r--r--Tests/RunCMake/CommandLine/EnvToolchainRelative.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake89
-rw-r--r--Tests/RunCMake/CommandLine/Toolchain/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CommandLine/Toolchain/toolchain.cmake2
-rw-r--r--Tests/RunCMake/CommandLine/build-invalid-target-syntax-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/build-no-dir-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/build-unknown-command-long-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/build-unknown-command-partial-match-stderr.txt4
-rw-r--r--Tests/RunCMake/CommandLine/build-unknown-command-short-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/install-prefix-no-arg-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/install-prefix-no-arg-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/toolchain-no-arg-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/toolchain-no-arg-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/toolchain-valid-abs-path-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/toolchain-valid-abs-path-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-result.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-stderr.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt (renamed from Tests/RunCMake/CompilerLauncher/ISPC-env-launch-Build-stdout.txt)0
-rw-r--r--Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt (renamed from Tests/RunCMake/CompilerLauncher/Fortran-env-launch-Build-stdout.txt)0
-rw-r--r--Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt (renamed from Tests/RunCMake/CompilerLauncher/CXX-env-launch-Build-stdout.txt)0
-rw-r--r--Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt (renamed from Tests/RunCMake/CompilerLauncher/CUDA-env-launch-Build-stdout.txt)0
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-common.cmake5
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt (renamed from Tests/RunCMake/CompilerLauncher/C-env-launch-Build-stdout.txt)0
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-env.cmake1
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-launch-env.cmake3
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-launch.cmake3
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP.cmake2
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CompilerLauncher/main.hip4
-rw-r--r--Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/MultiCommand.cmake2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-ClientStateful-check.cmake1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-ClientStateless-check.cmake1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-SharedStateless-check.cmake1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py140
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json162
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json68
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json64
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json68
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json600
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json101
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json17
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json101
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2.cmake18
-rw-r--r--Tests/RunCMake/FileAPI/cxx/CMakeLists.txt17
-rw-r--r--Tests/RunCMake/FileAPI/imported/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/FileAPIExternalSource/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/File_Generate/CustomFilePermissions.cmake1
-rw-r--r--Tests/RunCMake/File_Generate/CustomFilePermissionsVerify.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/NoSourcePermissionsVerify.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/OutputNameMatchesObjects-stderr.txt4
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMP0126_NEW.cmake64
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_ARGN.cmake17
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH-stdout.txt3
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH.cmake29
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_empty_target.cmake17
-rw-r--r--Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake7
-rwxr-xr-xTests/RunCMake/FindPkgConfig/dummy-pkg-config.bat17
-rwxr-xr-xTests/RunCMake/FindPkgConfig/dummy-pkg-config.sh19
-rw-r--r--Tests/RunCMake/FindPkgConfig/pc-empty/lib/pkgconfig/empty.pc5
-rw-r--r--Tests/RunCMake/Framework/ImportedFrameworkTest-build-stdout.txt1
-rw-r--r--Tests/RunCMake/Framework/ImportedFrameworkTest.cmake10
-rw-r--r--Tests/RunCMake/Framework/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake18
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/TARGET_PROPERTY.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-stderr.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/unknown-lang.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-unknown-lang.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake18
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/TARGET_PROPERTY.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test-result.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-stderr.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources-stderr.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/unknown-lang.cmake (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-unknown-lang.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake28
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_executable-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_executable-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_executable.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_library-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_library-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_library.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_test-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_test-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/add_test.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/install-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/install-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install-stderr.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/install.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/link_depends-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/link_depends-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends-stderr.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/link_depends.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories-result.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_sources-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_sources-stderr.txt (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/target_sources.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake (renamed from Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-try_compile.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake28
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_custom_command-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_custom_command-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_custom_command.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_custom_target-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_custom_target-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_custom_target.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_executable-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_executable-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_executable.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_library-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_library-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_library.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_test-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_test-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/add_test.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/install-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/install-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install-stderr.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/install.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/link_depends-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/link_depends-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends-stderr.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/link_depends.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_compile_options-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_compile_options-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_compile_options.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_include_directories-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_include_directories-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_include_directories.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_link_directories-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_link_directories-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_link_directories.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries-result.txt (renamed from Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-result.txt)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_sources-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_sources-stderr.txt (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/target_sources.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-HOST_LINK/try_compile.cmake (renamed from Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-try_compile.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/RunCMakeTest.cmake26
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/install-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/install-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install-stderr.txt)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/install.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/unknown-lang.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-unknown-lang.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/RunCMakeTest.cmake24
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install-stderr.txt)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/unknown-lang.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-unknown-lang.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3-stderr.txt (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1-stderr.txt)2
-rw-r--r--Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3.cmake (renamed from Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3.cmake)0
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake8
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake8
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/check.cmake15
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib1.c12
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib2.c6
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib3.c6
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/main.c4
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake37
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static.c3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static.cmake9
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1-stderr.txt5
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1.cmake4
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2-stderr.txt5
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2.cmake6
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries.cmake5
-rw-r--r--Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp24
-rw-r--r--Tests/RunCMake/GeneratorExpression/CMP0085-OLD-stderr.txt8
-rw-r--r--Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir-stderr.txt11
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake41
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt4
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout-stderr.txt12
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake24
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir.cmake3
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake2
-rw-r--r--Tests/RunCMake/GeneratorToolset/VsNormal-stdout.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/VsNormal.cmake6
-rw-r--r--Tests/RunCMake/GeneratorToolset/main.c4
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt6
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-property-timeout1-stdout.txt6
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-property-timeout2-stdout.txt6
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-test3-stdout.txt16
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-test4-stdout.txt9
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest.cmake18
-rw-r--r--Tests/RunCMake/GoogleTest/RunCMakeTest.cmake14
-rw-r--r--Tests/RunCMake/GoogleTest/fake_gtest.cpp55
-rw-r--r--Tests/RunCMake/GoogleTest/xml_output.cpp2
-rw-r--r--Tests/RunCMake/IfacePaths/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IncludeDirectories.cmake7
-rw-r--r--Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/C.cmake1
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/CXX.cmake1
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/foo.c4
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/foo.cxx4
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-common.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-env.cmake1
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-launch-env.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-launch.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/C.cmake2
-rw-r--r--Tests/RunCMake/LinkerLauncher/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-common.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-env.cmake1
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-launch-env.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-launch.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX.cmake2
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-common.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-env.cmake1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-launch-env.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-launch.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC.cmake2
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-common.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-env.cmake1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-launch.cmake3
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX.cmake2
-rw-r--r--Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake37
-rw-r--r--Tests/RunCMake/LinkerLauncher/main.c4
-rw-r--r--Tests/RunCMake/LinkerLauncher/main.cxx4
-rw-r--r--Tests/RunCMake/LinkerLauncher/main.m4
-rw-r--r--Tests/RunCMake/LinkerLauncher/main.mm4
-rw-r--r--Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake7
-rw-r--r--Tests/RunCMake/Ninja/CustomCommandDepfile.cmake13
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake9
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake7
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake13
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-all-subdir-build-check.cmake12
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-all-top-ninja-check.cmake12
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-target-ninja-check.cmake37
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-top-build-check.cmake12
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-debug-subdir-build-check.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-all-ninja-check.cmake9
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-minsizerel-ninja-check.cmake6
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-ninja-check.cmake9
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-minsizerel-top-ninja-check.cmake12
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-release-in-minsizerel-graph-subdir-ninja-check.cmake6
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple.cmake2
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-all-in-release-graph-build-check.cmake6
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-relwithdebinfo-in-release-graph-build-check.cmake6
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAlias-all-ninja-check.cmake12
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake6
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-relwithdebinfo-ninja-check.cmake9
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-clean-configs-ninja-check.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/SimpleSubdir/CMakeLists.txt8
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/empty_dbg.c0
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/empty_rel.c0
-rw-r--r--Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt4
-rw-r--r--Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt16
-rw-r--r--Tests/RunCMake/ParseImplicitData/linux-C-GNU-10.2.1-static-libgcc.input74
-rw-r--r--Tests/RunCMake/ParseImplicitData/linux-CXX-GNU-10.2.1-static-libstdc++.input79
-rw-r--r--Tests/RunCMake/ParseImplicitData/linux-Fortran-GNU-10.2.1-static-libgfortran.input79
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake3
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-GNU-10.2.1-static-libgcc.output1
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-GNU-10.2.1-static-libstdc++.output1
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-GNU-10.2.1-static-libgfortran.output1
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake17
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XLClang-16.1.0.1.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-8.7.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-9.0-hlist-ad.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Intel-18.0.2.20180210.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-8.7.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-9.0-hlist-ad.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-GNU-7.3.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Intel-18.0.2.20180210.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-8.7.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-CXX-Clang-3.3.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-GNU-10.2.1-static-libgcc.output3
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-10.2.1-static-libstdc++.output3
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-7.3.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-PGI-18.10.1.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-GNU-10.2.1-static-libgfortran.output3
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-CXX-GNU-4.9.3.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-CXX-GNU-4.8.5.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output2
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchIncludedAllLanguages.cmake16
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe.cmake24
-rw-r--r--Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/PrecompileHeaders/pch-included.c8
-rw-r--r--Tests/RunCMake/PrecompileHeaders/pch-included.cpp8
-rw-r--r--Tests/RunCMake/PrecompileHeaders/pch.h2
-rw-r--r--Tests/RunCMake/RunCMake.cmake102
-rw-r--r--Tests/RunCMake/RunCTest.cmake5
-rw-r--r--Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt4
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-NEW-stderr.txt1
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-NEW-toolchain.cmake1
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-NEW.cmake2
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-OLD-toolchain.cmake1
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-OLD.cmake2
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-WARN-stderr.txt1
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-WARN-toolchain.cmake1
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-WARN.cmake2
-rw-r--r--Tests/RunCMake/ToolchainFile/CMP0126-toolchain.cmake7
-rw-r--r--Tests/RunCMake/ToolchainFile/LangVars-toolchain.cmake2
-rw-r--r--Tests/RunCMake/ToolchainFile/LangVars.cmake7
-rw-r--r--Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/TransformDepfile/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/TransformDepfile/deps-unix.tlog.txt6
-rw-r--r--Tests/RunCMake/TransformDepfile/deps-windows.tlog.txt6
-rw-r--r--Tests/RunCMake/TransformDepfile/invalid-tlog-result.txt1
-rw-r--r--Tests/RunCMake/TransformDepfile/vstlog.cmake16
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0086-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0122-NEW-check.cmake10
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0122-NEW.cmake2
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0122-OLD-check.cmake10
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0122-OLD.cmake2
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0122-WARN-stderr.txt10
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0122-WARN.cmake1
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0122-common.cmake12
-rw-r--r--Tests/RunCMake/UseSWIG/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/VS10Project/CSharpSourceGroup/cmake/AssemblyInfo.cs.in18
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake1
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake8
-rw-r--r--Tests/RunCMake/VS10Project/VsDpiAwareBadParam-stderr.txt2
-rw-r--r--Tests/RunCMake/VS10Project/VsSettings-check.cmake15
-rw-r--r--Tests/RunCMake/VS10Project/VsSettings.cmake2
-rw-r--r--Tests/RunCMake/WriteBasicConfigVersionFile/LeadingZeroes.cmake898
-rw-r--r--Tests/RunCMake/WriteBasicConfigVersionFile/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-iOS-check.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-iOS.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-macOS-check.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-macOS.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions.cmake21
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff-check.cmake16
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-build-check.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-check.cmake16
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-build-check.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-check.cmake16
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/Empty.txt0
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/ExternalDependencies.cmake (renamed from Tests/RunCMake/XcodeProject-Embed/ExternalFramework.cmake)2
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/Info.plist.in31
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/RunCMakeTest.cmake57
-rw-r--r--Tests/RunCMake/XcodeProject-Embed/findAttribute.cmake19
-rw-r--r--Tests/RunCMake/XcodeProject/InheritedParameters-check.cmake49
-rw-r--r--Tests/RunCMake/XcodeProject/InheritedParameters.cmake8
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake32
-rw-r--r--Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake22
-rw-r--r--Tests/RunCMake/XcodeProject/dummy_main.swift18
-rw-r--r--Tests/RunCMake/add_custom_command/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/add_custom_command/TargetGenexEvent.cmake10
-rw-r--r--Tests/RunCMake/add_executable/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/add_library/RunCMakeTest.cmake14
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-OLD-stderr.txt8
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt3
-rw-r--r--Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt3
-rw-r--r--Tests/RunCMake/build_command/ParallelLevel.cmake5
-rw-r--r--Tests/RunCMake/build_command/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/cmake_host_system_information/000-FirstFallbackScript.cmake1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/999-LastFallbackScript.cmake21
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg1-result.txt1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg1-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg1.cmake1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg2-result.txt1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg2-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg2.cmake1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg3-result.txt1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg3-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_host_system_information/BadArg3.cmake1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/cmake_host_system_information/CentOS6-stdout.txt7
-rw-r--r--Tests/RunCMake/cmake_host_system_information/CentOS6.cmake5
-rw-r--r--Tests/RunCMake/cmake_host_system_information/CentOS6/etc/centos-release1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Debian6-stdout.txt5
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Debian6.cmake5
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Debian6/etc/debian_version1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Exherbo-stdout.txt9
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Exherbo.cmake11
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Exherbo/etc/os-release7
-rw-r--r--Tests/RunCMake/cmake_host_system_information/QueryKeys-stdout.txt27
-rw-r--r--Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake32
-rw-r--r--Tests/RunCMake/cmake_host_system_information/QueryList-stdout.txt1
-rw-r--r--Tests/RunCMake/cmake_host_system_information/QueryList.cmake5
-rw-r--r--Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Ubuntu-stdout.txt14
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Ubuntu.cmake11
-rw-r--r--Tests/RunCMake/cmake_host_system_information/Ubuntu/etc/os-release12
-rw-r--r--Tests/RunCMake/cmake_host_system_information/UnitTest-stdout.txt7
-rw-r--r--Tests/RunCMake/cmake_host_system_information/UnitTest.cmake5
-rw-r--r--Tests/RunCMake/cmake_host_system_information/UnitTest/etc/os-release9
-rw-r--r--Tests/RunCMake/cmake_host_system_information/UserFallbackScript-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_host_system_information/UserFallbackScript-stdout.txt7
-rw-r--r--Tests/RunCMake/cmake_host_system_information/UserFallbackScript.cmake12
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt2
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_ids.cmake2
-rw-r--r--Tests/RunCMake/configure_file/NoSourcePermissions.cmake2
-rw-r--r--Tests/RunCMake/configure_file/SourcePermissions.cmake2
-rw-r--r--Tests/RunCMake/ctest_build/ParallelLevel-check.cmake11
-rw-r--r--Tests/RunCMake/ctest_build/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/ctest_environment/CMakeLists.txt.in3
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op-result.txt1
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op.cmake6
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon-result.txt1
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon.cmake6
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals-result.txt1
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals.cmake6
-rw-r--r--Tests/RunCMake/ctest_environment/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/ctest_environment/test.cmake.in16
-rw-r--r--Tests/RunCMake/ctest_memcheck/ExpectedOutputs-check.cmake10
-rw-r--r--Tests/RunCMake/ctest_memcheck/ExpectedOutputs-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/ExpectedOutputs-stdout.txt2
-rw-r--r--Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/ctest_test/CTestTestLoadInvalid-stdout.txt9
-rw-r--r--Tests/RunCMake/ctest_test/CTestTestLoadPass-stdout.txt9
-rw-r--r--Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt9
-rw-r--r--Tests/RunCMake/ctest_test/OutputJUnit-check.cmake24
-rw-r--r--Tests/RunCMake/ctest_test/RunCMakeTest.cmake75
-rw-r--r--Tests/RunCMake/ctest_test/TestCompletionStatus-check.cmake16
-rw-r--r--Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake25
-rw-r--r--Tests/RunCMake/ctest_test/TestLoadInvalid-stdout.txt9
-rw-r--r--Tests/RunCMake/ctest_test/TestLoadOrder-stdout.txt9
-rw-r--r--Tests/RunCMake/ctest_test/TestLoadPass-stdout.txt9
-rw-r--r--Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt9
-rw-r--r--Tests/RunCMake/ctest_test/TestMeasurements-check.cmake40
-rw-r--r--Tests/RunCMake/ctest_test/test.cmake.in7
-rw-r--r--Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake25
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/badargs2.cmake2
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-all-check.cmake28
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter.cmake104
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake18
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-notfile-all-stderr.txt5
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake18
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-rpath.cmake35
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake18
-rw-r--r--Tests/RunCMake/file-RPATH/Common.cmake37
-rw-r--r--Tests/RunCMake/file-RPATH/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/file/COPY_FILE-arg-missing-result.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-arg-missing-stderr.txt3
-rw-r--r--Tests/RunCMake/file/COPY_FILE-arg-missing.cmake1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-arg-unknown-result.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-arg-unknown-stderr.txt5
-rw-r--r--Tests/RunCMake/file/COPY_FILE-arg-unknown.cmake1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dir-to-file-capture-stdout.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dir-to-file-capture.cmake8
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-result.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-stderr.txt6
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dir-to-file-fail.cmake4
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dirlink-to-file-capture-stdout.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dirlink-to-file-capture.cmake8
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-result.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-stderr.txt6
-rw-r--r--Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail.cmake4
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-capture.cmake9
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-result.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-stderr.txt6
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail.cmake5
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-no-overwrite.cmake12
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-replace.cmake9
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-to-dir-capture-stdout.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-to-dir-capture.cmake9
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-result.txt1
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-stderr.txt6
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-to-dir-fail.cmake5
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-to-file.cmake10
-rw-r--r--Tests/RunCMake/file/COPY_FILE-link-to-file.cmake10
-rw-r--r--Tests/RunCMake/file/REAL_PATH.cmake40
-rw-r--r--Tests/RunCMake/file/RENAME-arg-missing-result.txt1
-rw-r--r--Tests/RunCMake/file/RENAME-arg-missing-stderr.txt3
-rw-r--r--Tests/RunCMake/file/RENAME-arg-missing.cmake1
-rw-r--r--Tests/RunCMake/file/RENAME-arg-unknown-result.txt1
-rw-r--r--Tests/RunCMake/file/RENAME-arg-unknown-stderr.txt5
-rw-r--r--Tests/RunCMake/file/RENAME-arg-unknown.cmake1
-rw-r--r--Tests/RunCMake/file/RENAME-file-NO_REPLACE-capture-stdout.txt1
-rw-r--r--Tests/RunCMake/file/RENAME-file-NO_REPLACE-capture.cmake9
-rw-r--r--Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-result.txt1
-rw-r--r--Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-stderr.txt13
-rw-r--r--Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail.cmake5
-rw-r--r--Tests/RunCMake/file/RENAME-file-replace.cmake9
-rw-r--r--Tests/RunCMake/file/RENAME-file-to-dir-capture-stdout.txt1
-rw-r--r--Tests/RunCMake/file/RENAME-file-to-dir-capture.cmake9
-rw-r--r--Tests/RunCMake/file/RENAME-file-to-dir-fail-result.txt1
-rw-r--r--Tests/RunCMake/file/RENAME-file-to-dir-fail-stderr.txt13
-rw-r--r--Tests/RunCMake/file/RENAME-file-to-dir-fail.cmake5
-rw-r--r--Tests/RunCMake/file/RENAME-file-to-file.cmake10
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake39
-rw-r--r--Tests/RunCMake/find_file/FromPATHEnv-stdout-msys.txt9
-rw-r--r--Tests/RunCMake/find_file/NO_CACHE-stdout.txt18
-rw-r--r--Tests/RunCMake/find_file/NO_CACHE.cmake129
-rw-r--r--Tests/RunCMake/find_file/PrefixInPATH-stdout-msys.txt4
-rw-r--r--Tests/RunCMake/find_file/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/find_library/FromPATHEnv-stdout-msys.txt6
-rw-r--r--Tests/RunCMake/find_library/FromScriptMode-stderr-darwin.txt4
-rw-r--r--Tests/RunCMake/find_library/FromScriptMode-stderr-windows.txt4
-rw-r--r--Tests/RunCMake/find_library/FromScriptMode-stderr.txt4
-rw-r--r--Tests/RunCMake/find_library/FromScriptMode.cmake15
-rw-r--r--Tests/RunCMake/find_library/NO_CACHE-stdout.txt18
-rw-r--r--Tests/RunCMake/find_library/NO_CACHE.cmake133
-rw-r--r--Tests/RunCMake/find_library/PrefixInPATH-stdout-msys.txt4
-rw-r--r--Tests/RunCMake/find_library/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0084-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/find_package/MissingNormalForceRequired-result.txt1
-rw-r--r--Tests/RunCMake/find_package/MissingNormalForceRequired-stderr.txt20
-rw-r--r--Tests/RunCMake/find_package/MissingNormalForceRequired.cmake3
-rw-r--r--Tests/RunCMake/find_package/RequiredOptionValuesClash-result.txt1
-rw-r--r--Tests/RunCMake/find_package/RequiredOptionValuesClash-stderr.txt11
-rw-r--r--Tests/RunCMake/find_package/RequiredOptionValuesClash.cmake5
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake6
-rw-r--r--Tests/RunCMake/find_package/VersionRangeConfig02.cmake23
-rw-r--r--Tests/RunCMake/find_path/FromPATHEnv-stdout-msys.txt9
-rw-r--r--Tests/RunCMake/find_path/NO_CACHE-stdout.txt18
-rw-r--r--Tests/RunCMake/find_path/NO_CACHE.cmake131
-rw-r--r--Tests/RunCMake/find_path/PrefixInPATH-stdout-msys.txt4
-rw-r--r--Tests/RunCMake/find_path/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/find_program/NO_CACHE-stdout.txt18
-rw-r--r--Tests/RunCMake/find_program/NO_CACHE.cmake130
-rw-r--r--Tests/RunCMake/find_program/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/foreach/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/foreach/foreach-var-scope-CMP0124-NEW.cmake51
-rw-r--r--Tests/RunCMake/foreach/foreach-var-scope-CMP0124-OLD.cmake53
-rw-r--r--Tests/RunCMake/get_property/directory_properties-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/directory_properties.cmake5
-rw-r--r--Tests/RunCMake/get_property/directory_properties/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/if/IncompleteMatches-stdout.txt6
-rw-r--r--Tests/RunCMake/if/IncompleteMatches.cmake36
-rw-r--r--Tests/RunCMake/if/IncompleteMatchesFail-result.txt1
-rw-r--r--Tests/RunCMake/if/IncompleteMatchesFail-stderr.txt6
-rw-r--r--Tests/RunCMake/if/IncompleteMatchesFail.cmake2
-rw-r--r--Tests/RunCMake/if/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/if/unbalanced-parenthesis-result.txt1
-rw-r--r--Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt8
-rw-r--r--Tests/RunCMake/if/unbalanced-parenthesis.cmake8
-rw-r--r--Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/include_external_msproject/VSCSharpReference-check.cmake36
-rw-r--r--Tests/RunCMake/include_external_msproject/VSCSharpReference.cmake10
-rw-r--r--Tests/RunCMake/install/CMP0087-OLD-stderr.txt8
-rw-r--r--Tests/RunCMake/install/FILES-directory-result.txt1
-rw-r--r--Tests/RunCMake/install/FILES-directory-stderr.txt1
-rw-r--r--Tests/RunCMake/install/FILES-directory.cmake7
-rw-r--r--Tests/RunCMake/install/FILES-symlink-to-directory.cmake9
-rw-r--r--Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported-result.txt1
-rw-r--r--Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt6
-rw-r--r--Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported.cmake2
-rw-r--r--Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported-result.txt1
-rw-r--r--Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt5
-rw-r--r--Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported.cmake1
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake31
-rw-r--r--Tests/RunCMake/install/RuntimeDependencies-COMPONENTS.cmake39
-rw-r--r--Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-all-check.cmake1
-rw-r--r--Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-dev-check.cmake1
-rw-r--r--Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-uns-check.cmake1
-rw-r--r--Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS.cmake5
-rw-r--r--Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake15
-rw-r--r--Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake17
-rw-r--r--Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-all-check.cmake10
-rw-r--r--Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-lib-check.cmake8
-rw-r--r--Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-uns-check.cmake6
-rw-r--r--Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake2
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross-result.txt1
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross-stderr.txt4
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross.cmake4
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty-all-check.cmake1
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty.cmake9
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework-result.txt1
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework-stderr.txt4
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework.cmake4
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle-result.txt1
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle-stderr.txt4
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle.cmake10
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-nodep-all-check.cmake1
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-nodep.cmake9
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported-result.txt1
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported-stderr.txt5
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported.cmake4
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict-result.txt1
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict-stderr.txt5
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict.cmake7
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported-result.txt1
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt5
-rw-r--r--Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported.cmake4
-rw-r--r--Tests/RunCMake/message/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/message/newline-script.cmake2
-rw-r--r--Tests/RunCMake/message/newline-stdout.txt2
-rw-r--r--Tests/RunCMake/message/newline.cmake9
-rw-r--r--Tests/RunCMake/option/CMP0077-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/project/ProjectIsTopLevel-stdout.txt2
-rw-r--r--Tests/RunCMake/project/ProjectIsTopLevel.cmake9
-rw-r--r--Tests/RunCMake/project/ProjectIsTopLevelMultiple-stdout.txt3
-rw-r--r--Tests/RunCMake/project/ProjectIsTopLevelMultiple.cmake14
-rw-r--r--Tests/RunCMake/project/ProjectIsTopLevelSubdirectory-stdout.txt6
-rw-r--r--Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake8
-rw-r--r--Tests/RunCMake/project/ProjectIsTopLevelSubdirectory/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/project/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/string/Timestamp-stderr.txt2
-rw-r--r--Tests/RunCMake/string/Timestamp.cmake2
-rw-r--r--Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt6
-rw-r--r--Tests/RunCMake/target_compile_options/Order-build-stdout.txt3
-rw-r--r--Tests/RunCMake/target_compile_options/Order.cmake19
-rw-r--r--Tests/RunCMake/target_compile_options/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/target_compile_options/order.c7
-rw-r--r--Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt13
-rw-r--r--Tests/RunCMake/while/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/while/unbalanced-parenthesis-result.txt1
-rw-r--r--Tests/RunCMake/while/unbalanced-parenthesis-stderr.txt8
-rw-r--r--Tests/RunCMake/while/unbalanced-parenthesis.cmake8
1052 files changed, 9346 insertions, 821 deletions
diff --git a/Tests/RunCMake/BuildDepends/CustomCommandDependencies-compiler-deps-legacy.cmake b/Tests/RunCMake/BuildDepends/CustomCommandDependencies-compiler-deps-legacy.cmake
new file mode 100644
index 0000000..e13efb3
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/CustomCommandDependencies-compiler-deps-legacy.cmake
@@ -0,0 +1,9 @@
+enable_language(C)
+
+add_custom_command(OUTPUT main.c
+ DEPFILE main.c.d
+ COMMAND "${CMAKE_COMMAND}" -DINFILE=${CMAKE_CURRENT_SOURCE_DIR}/main.c -DOUTFILE=main.c -DDEPFILE=main.c.d
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/GenerateDepFile.cmake"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_executable(main ${CMAKE_CURRENT_BINARY_DIR}/main.c)
diff --git a/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake b/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake
index 01eac91..e4fdb4a 100644
--- a/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake
+++ b/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake
@@ -3,15 +3,15 @@ enable_language(C)
add_custom_command(
OUTPUT topcc.c
- DEPFILE topcc.c.d
- COMMAND ${CMAKE_COMMAND} -DOUTFILE=${CMAKE_CURRENT_BINARY_DIR}/topcc.c -DINFILE=topccdep.txt -DDEPFILE=topcc.c.d -P "${CMAKE_CURRENT_LIST_DIR}/WriteDepfile.cmake"
+ DEPFILE topcc_$<CONFIG>.c.d
+ COMMAND ${CMAKE_COMMAND} -DOUTFILE=${CMAKE_CURRENT_BINARY_DIR}/topcc.c -DINFILE=topccdep.txt -DDEPFILE=topcc_$<CONFIG>.c.d -P "${CMAKE_CURRENT_LIST_DIR}/WriteDepfile.cmake"
)
add_custom_target(topcc ALL DEPENDS topcc.c)
add_custom_command(
OUTPUT topexe.c
- DEPFILE ${CMAKE_CURRENT_BINARY_DIR}/topexe.c.d
- COMMAND ${CMAKE_COMMAND} -DOUTFILE=topexe.c "-DINFILE=${CMAKE_CURRENT_BINARY_DIR}/topexedep.txt" -DDEPFILE=topexe.c.d -P "${CMAKE_CURRENT_LIST_DIR}/WriteDepfile.cmake"
+ DEPFILE ${CMAKE_CURRENT_BINARY_DIR}/topexe_$<CONFIG>.c.d
+ COMMAND ${CMAKE_COMMAND} -DOUTFILE=topexe.c "-DINFILE=${CMAKE_CURRENT_BINARY_DIR}/topexedep.txt" -DDEPFILE=topexe_$<CONFIG>.c.d -P "${CMAKE_CURRENT_LIST_DIR}/WriteDepfile.cmake"
)
add_executable(topexe "${CMAKE_CURRENT_BINARY_DIR}/topexe.c")
diff --git a/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.cmake b/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.cmake
new file mode 100644
index 0000000..22e7f27
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.cmake
@@ -0,0 +1,19 @@
+enable_language(C)
+
+add_custom_command(
+ OUTPUT main.c
+ COMMAND ${CMAKE_COMMAND} -E copy main.c.in main.c
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/main.c.in
+ )
+add_executable(main main.c)
+set_property(TARGET main PROPERTY UNITY_BUILD ON)
+
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+set(check_pairs
+ \"$<TARGET_FILE:main>|${CMAKE_CURRENT_BINARY_DIR}/main.c.in\"
+ \"$<TARGET_FILE:main>|${CMAKE_CURRENT_BINARY_DIR}/main.c\"
+ )
+set(check_exes
+ \"$<TARGET_FILE:main>\"
+ )
+")
diff --git a/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.step1.cmake b/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.step1.cmake
new file mode 100644
index 0000000..87576eb
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.step1.cmake
@@ -0,0 +1,3 @@
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/main.c.in" [[
+int main(void) { return 1; }
+]])
diff --git a/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.step2.cmake b/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.step2.cmake
new file mode 100644
index 0000000..69b21b8
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/CustomCommandUnityBuild.step2.cmake
@@ -0,0 +1,3 @@
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/main.c.in" [[
+int main(void) { return 2; }
+]])
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 6232634..27bbff6 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -1,5 +1,22 @@
include(RunCMake)
+if(RunCMake_GENERATOR MATCHES "Ninja")
+ # Detect ninja version so we know what tests can be supported.
+ execute_process(
+ COMMAND "${RunCMake_MAKE_PROGRAM}" --version
+ OUTPUT_VARIABLE ninja_out
+ ERROR_VARIABLE ninja_out
+ RESULT_VARIABLE ninja_res
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(ninja_res EQUAL 0 AND "x${ninja_out}" MATCHES "^x[0-9]+\\.[0-9]+")
+ set(ninja_version "${ninja_out}")
+ message(STATUS "ninja version: ${ninja_version}")
+ else()
+ message(FATAL_ERROR "'ninja --version' reported:\n${ninja_out}")
+ endif()
+endif()
+
if(RunCMake_GENERATOR STREQUAL "Borland Makefiles" OR
RunCMake_GENERATOR STREQUAL "Watcom WMake")
set(fs_delay 3)
@@ -153,9 +170,14 @@ endif()
if (RunCMake_GENERATOR MATCHES "Makefiles")
run_cmake(CustomCommandDependencies-BadArgs)
+ run_cmake_with_options(CustomCommandDependencies-compiler-deps-legacy -DCMAKE_DEPENDS_USE_COMPILER=FALSE)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(CustomCommandDependencies-compiler-deps-legacy ${CMAKE_COMMAND} --build . --config Debug)
+ unset(RunCMake_TEST_NO_CLEAN)
endif()
-if(RunCMake_GENERATOR MATCHES "Make|Ninja")
+if(RunCMake_GENERATOR MATCHES "Make|Ninja|Visual Studio|Xcode" AND
+ NOT RunCMake_GENERATOR MATCHES "Visual Studio (9|10)( |$)")
unset(run_BuildDepends_skip_step_3)
run_BuildDepends(CustomCommandDepfile)
set(run_BuildDepends_skip_step_3 1)
@@ -164,3 +186,11 @@ endif()
if(RunCMake_GENERATOR MATCHES "Make")
run_BuildDepends(MakeDependencies)
endif()
+
+if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 " OR
+ (RunCMake_GENERATOR MATCHES "Ninja" AND ninja_version VERSION_LESS 1.7))
+ # This build tool misses the dependency.
+ set(run_BuildDepends_skip_step_2 1)
+endif()
+run_BuildDepends(CustomCommandUnityBuild)
+unset(run_BuildDepends_skip_step_2)
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt
new file mode 100644
index 0000000..31a0207
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Deprecation Warning at [^
+]*/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0080 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.$
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt
new file mode 100644
index 0000000..2ff5d60
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0080-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0080 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CMakeLists.txt b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CMakeLists.txt
new file mode 100644
index 0000000..bbc08e6
--- /dev/null
+++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.21)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar-build-stdout.txt b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar-build-stdout.txt
new file mode 100644
index 0000000..f0f2efc
--- /dev/null
+++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar-build-stdout.txt
@@ -0,0 +1 @@
+This message is printed by echo_message.bat
diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar.cmake b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar.cmake
new file mode 100644
index 0000000..63d6068
--- /dev/null
+++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_MSVCIDE_RUN_PATH "${CMAKE_SOURCE_DIR}")
+add_custom_target(main COMMAND echo_message)
diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/RunCMakeTest.cmake b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/RunCMakeTest.cmake
new file mode 100644
index 0000000..a424ff2
--- /dev/null
+++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/RunCMakeTest.cmake
@@ -0,0 +1,8 @@
+include(RunCMake)
+
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CheckEnvironmentVar-build)
+run_cmake(CheckEnvironmentVar)
+set(RunCMake_TEST_NO_CLEAN 1)
+run_cmake_command(CheckEnvironmentVar-build ${CMAKE_COMMAND} --build . --config Debug --target main)
+unset(RunCMake_TEST_BINARY_DIR)
+unset(RunCMake_TEST_NO_CLEAN)
diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/echo_message.bat b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/echo_message.bat
new file mode 100755
index 0000000..9037d02
--- /dev/null
+++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/echo_message.bat
@@ -0,0 +1 @@
+echo This message is printed by echo_message.bat
diff --git a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
index e7f27a1..f47bb2e 100644
--- a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
@@ -6,6 +6,10 @@ set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefa
run_cmake(CMP0041-OLD)
run_cmake(CMP0041-NEW)
run_cmake(CMP0041-WARN)
+
+# Protect tests from running inside the default install prefix.
+set(RunCMake_TEST_OPTIONS "--install-prefix ${RunCMake_BINARY_DIR}/NotDefaultPrefix")
+
run_cmake(CMP0041-tid-OLD)
run_cmake(CMP0041-tid-NEW)
run_cmake(CMP0041-tid-WARN)
diff --git a/Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt b/Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt b/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt
new file mode 100644
index 0000000..ff339fa
--- /dev/null
+++ b/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0081-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0081 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake
new file mode 100644
index 0000000..5594be8
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake
@@ -0,0 +1,8 @@
+set(listvar a b c d e)
+
+list(GET listvar
+ 18446744073709551616 # 2^64
+ 2147483648 # 2^31
+ 4294967296 # 2^32; errors out-of-range as -2147483643 due to underflow
+ out)
+message("ERANGE: -->${out}<--")
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3-result.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3-result.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-stderr.txt
new file mode 100644
index 0000000..0166e14
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-ERANGE-Common.cmake:3 \(list\):
+ list index: 18446744073709551616 is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-ERANGE-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+ERANGE: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW.cmake
new file mode 100644
index 0000000..68e564d
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-ERANGE-Common.cmake)
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2-result.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2-result.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-result.txt
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt
new file mode 100644
index 0000000..5a03559
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-ERANGE-Common.cmake:3 \(list\):
+ list index: (-2147483643|2147483647) out of range \(-5, 4\)
+Call Stack \(most recent call first\):
+ CMP0121-ERANGE-OLD.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+ERANGE: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD.cmake
new file mode 100644
index 0000000..32f0b56
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-ERANGE-Common.cmake)
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1-result.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1-result.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-result.txt
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt
new file mode 100644
index 0000000..1e7b127
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt
@@ -0,0 +1,18 @@
+CMake Warning \(dev\) at CMP0121-ERANGE-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "18446744073709551616".
+Call Stack \(most recent call first\):
+ CMP0121-ERANGE-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0121-ERANGE-Common.cmake:3 \(list\):
+ list index: (-2147483643|2147483647) out of range \(-5, 4\)
+Call Stack \(most recent call first\):
+ CMP0121-ERANGE-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+ERANGE: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN.cmake
new file mode 100644
index 0000000..9655290
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-ERANGE-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-GET-Common.cmake
new file mode 100644
index 0000000..e4986f0
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(GET listvar 0 2junk out)
+message("GET: -->${out}<--")
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources-result.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources-result.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-stderr.txt
new file mode 100644
index 0000000..d502b86
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-GET-Common.cmake:3 \(list\):
+ list index: 2junk is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-GET-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+GET: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW.cmake
new file mode 100644
index 0000000..1ab054d
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-GET-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-OLD-stderr.txt
new file mode 100644
index 0000000..96375e9
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-OLD-stderr.txt
@@ -0,0 +1 @@
+GET: -->a;c<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-GET-OLD.cmake
new file mode 100644
index 0000000..ef4526f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-GET-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt
new file mode 100644
index 0000000..ecfad2c
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-GET-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "2junk".
+Call Stack \(most recent call first\):
+ CMP0121-GET-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+GET: -->a;c<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN.cmake
new file mode 100644
index 0000000..b08620b
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-GET-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-INSERT-Common.cmake
new file mode 100644
index 0000000..4950881
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(INSERT listvar junk2 new)
+message("INSERT: -->${listvar}<--")
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install-result.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install-result.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-stderr.txt
new file mode 100644
index 0000000..2241962
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-INSERT-Common.cmake:3 \(list\):
+ list index: junk2 is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-INSERT-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+INSERT: -->a;b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW.cmake
new file mode 100644
index 0000000..db627d1
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-INSERT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD-stderr.txt
new file mode 100644
index 0000000..52f34ad
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD-stderr.txt
@@ -0,0 +1 @@
+INSERT: -->new;a;b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD.cmake
new file mode 100644
index 0000000..60364d7
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-INSERT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt
new file mode 100644
index 0000000..5fa7d17
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-INSERT-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "junk2".
+Call Stack \(most recent call first\):
+ CMP0121-INSERT-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+INSERT: -->new;a;b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN.cmake
new file mode 100644
index 0000000..55f13e2
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-INSERT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-Common.cmake
new file mode 100644
index 0000000..ec92387
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(REMOVE_AT listvar 0 invalid)
+message("REMOVE_AT: -->${listvar}<--")
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate-result.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate-result.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-stderr.txt
new file mode 100644
index 0000000..f17bafd
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-REMOVE_AT-Common.cmake:3 \(list\):
+ list index: invalid is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-REMOVE_AT-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+REMOVE_AT: -->a;b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW.cmake
new file mode 100644
index 0000000..d1f09e3
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-REMOVE_AT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD-stderr.txt
new file mode 100644
index 0000000..09af1ae
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD-stderr.txt
@@ -0,0 +1 @@
+REMOVE_AT: -->b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD.cmake
new file mode 100644
index 0000000..ac83226
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-REMOVE_AT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt
new file mode 100644
index 0000000..e2d47af
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-REMOVE_AT-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "invalid".
+Call Stack \(most recent call first\):
+ CMP0121-REMOVE_AT-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+REMOVE_AT: -->b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN.cmake
new file mode 100644
index 0000000..2b4a824
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-REMOVE_AT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-Common.cmake
new file mode 100644
index 0000000..93f46c5
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(SUBLIST listvar 0 invalid out)
+message("SUBLIST-length: -->${out}<--")
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test-result.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test-result.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-stderr.txt
new file mode 100644
index 0000000..28bd362
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-SUBLIST-length-Common.cmake:3 \(list\):
+ list index: invalid is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-SUBLIST-length-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+SUBLIST-length: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW.cmake
new file mode 100644
index 0000000..c7875cb
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-SUBLIST-length-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD-stderr.txt
new file mode 100644
index 0000000..00fcf07
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD-stderr.txt
@@ -0,0 +1 @@
+SUBLIST-length: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD.cmake
new file mode 100644
index 0000000..e9b78ee
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-SUBLIST-length-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt
new file mode 100644
index 0000000..bd06c2f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-SUBLIST-length-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "invalid".
+Call Stack \(most recent call first\):
+ CMP0121-SUBLIST-length-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+SUBLIST-length: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN.cmake
new file mode 100644
index 0000000..27318bf
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-SUBLIST-length-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-Common.cmake
new file mode 100644
index 0000000..33f57a3
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(SUBLIST listvar invalid 2 out)
+message("SUBLIST-start: -->${out}<--")
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library-result.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library-result.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-stderr.txt
new file mode 100644
index 0000000..9819f95
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-SUBLIST-start-Common.cmake:3 \(list\):
+ list index: invalid is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-SUBLIST-start-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+SUBLIST-start: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW.cmake
new file mode 100644
index 0000000..3d676a3
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-SUBLIST-start-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD-stderr.txt
new file mode 100644
index 0000000..8da2881
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD-stderr.txt
@@ -0,0 +1 @@
+SUBLIST-start: -->a;b<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD.cmake
new file mode 100644
index 0000000..268f317
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-SUBLIST-start-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt
new file mode 100644
index 0000000..39d0e0e
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-SUBLIST-start-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "invalid".
+Call Stack \(most recent call first\):
+ CMP0121-SUBLIST-start-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+SUBLIST-start: -->a;b<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN.cmake
new file mode 100644
index 0000000..a407879
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-SUBLIST-start-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMakeLists.txt b/Tests/RunCMake/CMP0121/CMakeLists.txt
new file mode 100644
index 0000000..7cabeb6
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.20)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0121/RunCMakeTest.cmake b/Tests/RunCMake/CMP0121/RunCMakeTest.cmake
new file mode 100644
index 0000000..1ed5b1a
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/RunCMakeTest.cmake
@@ -0,0 +1,7 @@
+include(RunCMake)
+
+foreach (subcommand IN ITEMS ERANGE GET INSERT REMOVE_AT SUBLIST-length SUBLIST-start)
+ run_cmake(CMP0121-${subcommand}-WARN)
+ run_cmake(CMP0121-${subcommand}-OLD)
+ run_cmake(CMP0121-${subcommand}-NEW)
+endforeach ()
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_file-Common.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_file-Common.cmake
new file mode 100644
index 0000000..a85978b
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_file-Common.cmake
@@ -0,0 +1,51 @@
+
+find_file(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_file(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_file(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_file(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_file(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_file(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+file(WRITE "${CMAKE_BINARY_DIR}/${FILE_NAME}" "")
+find_file(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_file(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+message("RELATIVE_PATH=${RELATIVE_PATH}")
+message("RELATIVE_PATH_WITH_TYPE=${RELATIVE_PATH_WITH_TYPE}")
+
+message("ABSOLUTE_PATH=${ABSOLUTE_PATH}")
+message("ABSOLUTE_PATH_WITH_TYPE=${ABSOLUTE_PATH_WITH_TYPE}")
+
+message("NOTFOUND_PATH=${NOTFOUND_PATH}")
+message("NOTFOUND_PATH_WITH_TYPE=${NOTFOUND_PATH_WITH_TYPE}")
+
+message("FILE_NAME=${FILE_NAME}")
+message("FILE_NAME_WITH_TYPE=${FILE_NAME_WITH_TYPE}")
+
+
+set(RELATIVE_PATH_AND_LOCAL relative_local)
+set(RELATIVE_PATH_WITH_TYPE_AND_LOCAL relative_local)
+set(ABSOLUTE_PATH_AND_LOCAL /absolute_local)
+set(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL /absolute_local)
+set(NOTFOUND_AND_LOCAL "${FILE_NAME}")
+set(NOTFOUND_WITH_TYPE_AND_LOCAL "${FILE_NAME}")
+
+find_file(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_file(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_file(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_file(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_file(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_file(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+message("RELATIVE_PATH_AND_LOCAL=${RELATIVE_PATH_AND_LOCAL}")
+message("RELATIVE_PATH_WITH_TYPE_AND_LOCAL=${RELATIVE_PATH_WITH_TYPE_AND_LOCAL}")
+
+message("ABSOLUTE_PATH_AND_LOCAL=${ABSOLUTE_PATH_AND_LOCAL}")
+message("ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=${ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL}")
+
+message("NOTFOUND_PATH_AND_LOCAL=${NOTFOUND_PATH_AND_LOCAL}")
+message("NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=${NOTFOUND_PATH_WITH_TYPE_AND_LOCAL}")
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_file-NEW-stderr.txt b/Tests/RunCMake/CMP0125/CMP0125-find_file-NEW-stderr.txt
new file mode 100644
index 0000000..10f95bc
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_file-NEW-stderr.txt
@@ -0,0 +1,14 @@
+RELATIVE_PATH=relative
+RELATIVE_PATH_WITH_TYPE=relative
+ABSOLUTE_PATH=/absolute
+ABSOLUTE_PATH_WITH_TYPE=/absolute
+NOTFOUND_PATH=/.+/CMP0125/file\.txt
+NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125/file\.txt
+FILE_NAME=/.+/CMP0125/CMP0125-find_file-NEW-build/file2\.txt
+FILE_NAME_WITH_TYPE=/.+/CMP0125/CMP0125-find_file-NEW-build/file2\.txt
+RELATIVE_PATH_AND_LOCAL=relative_local
+RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
+ABSOLUTE_PATH_AND_LOCAL=/absolute_local
+ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
+NOTFOUND_PATH_AND_LOCAL=/.+/CMP0125/file.txt
+NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125/file.txt
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_file-NEW.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_file-NEW.cmake
new file mode 100644
index 0000000..4f04834
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_file-NEW.cmake
@@ -0,0 +1,4 @@
+
+cmake_policy(SET CMP0125 NEW)
+
+include(CMP0125-find_file-Common.cmake)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_file-OLD-stderr.txt b/Tests/RunCMake/CMP0125/CMP0125-find_file-OLD-stderr.txt
new file mode 100644
index 0000000..5b25f92
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_file-OLD-stderr.txt
@@ -0,0 +1,14 @@
+RELATIVE_PATH=/.+/CMP0125/CMP0125-find_file-OLD-build/relative
+RELATIVE_PATH_WITH_TYPE=relative
+ABSOLUTE_PATH=/absolute
+ABSOLUTE_PATH_WITH_TYPE=/absolute
+NOTFOUND_PATH=NOTFOUND
+NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125/file\.txt
+FILE_NAME=/.+/CMP0125/CMP0125-find_file-OLD-build/file2\.txt
+FILE_NAME_WITH_TYPE=file2\.txt
+RELATIVE_PATH_AND_LOCAL=/.+/CMP0125/CMP0125-find_file-OLD-build/relative
+RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
+ABSOLUTE_PATH_AND_LOCAL=/absolute
+ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
+NOTFOUND_PATH_AND_LOCAL=NOTFOUND
+NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125/file\.txt
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_file-OLD.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_file-OLD.cmake
new file mode 100644
index 0000000..21884b5
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_file-OLD.cmake
@@ -0,0 +1,4 @@
+
+cmake_policy(SET CMP0125 OLD)
+
+include(CMP0125-find_file-Common.cmake)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_library-Common.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_library-Common.cmake
new file mode 100644
index 0000000..d2bc006
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_library-Common.cmake
@@ -0,0 +1,52 @@
+
+find_library(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_library(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_library(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_library(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_library(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_library(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+file(WRITE "${CMAKE_BINARY_DIR}/${FILE_NAME}" "")
+file(CHMOD "${CMAKE_BINARY_DIR}/${FILE_NAME}" PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
+find_library(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_library(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+message("RELATIVE_PATH=${RELATIVE_PATH}")
+message("RELATIVE_PATH_WITH_TYPE=${RELATIVE_PATH_WITH_TYPE}")
+
+message("ABSOLUTE_PATH=${ABSOLUTE_PATH}")
+message("ABSOLUTE_PATH_WITH_TYPE=${ABSOLUTE_PATH_WITH_TYPE}")
+
+message("NOTFOUND_PATH=${NOTFOUND_PATH}")
+message("NOTFOUND_PATH_WITH_TYPE=${NOTFOUND_PATH_WITH_TYPE}")
+
+message("FILE_NAME=${FILE_NAME}")
+message("FILE_NAME_WITH_TYPE=${FILE_NAME_WITH_TYPE}")
+
+
+set(RELATIVE_PATH_AND_LOCAL relative_local)
+set(RELATIVE_PATH_WITH_TYPE_AND_LOCAL relative_local)
+set(ABSOLUTE_PATH_AND_LOCAL /absolute_local)
+set(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL /absolute_local)
+set(NOTFOUND_AND_LOCAL "${FILE_NAME}")
+set(NOTFOUND_WITH_TYPE_AND_LOCAL "${FILE_NAME}")
+
+find_library(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_library(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_library(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_library(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_library(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_library(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+message("RELATIVE_PATH_AND_LOCAL=${RELATIVE_PATH_AND_LOCAL}")
+message("RELATIVE_PATH_WITH_TYPE_AND_LOCAL=${RELATIVE_PATH_WITH_TYPE_AND_LOCAL}")
+
+message("ABSOLUTE_PATH_AND_LOCAL=${ABSOLUTE_PATH_AND_LOCAL}")
+message("ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=${ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL}")
+
+message("NOTFOUND_PATH_AND_LOCAL=${NOTFOUND_PATH_AND_LOCAL}")
+message("NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=${NOTFOUND_PATH_WITH_TYPE_AND_LOCAL}")
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_library-NEW-stderr.txt b/Tests/RunCMake/CMP0125/CMP0125-find_library-NEW-stderr.txt
new file mode 100644
index 0000000..d180833
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_library-NEW-stderr.txt
@@ -0,0 +1,14 @@
+RELATIVE_PATH=relative
+RELATIVE_PATH_WITH_TYPE=relative
+ABSOLUTE_PATH=/absolute
+ABSOLUTE_PATH_WITH_TYPE=/absolute
+NOTFOUND_PATH=/.+/CMP0125/libfile\.(so|dylib)
+NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125/libfile\.(so|dylib)
+FILE_NAME=/.+/CMP0125/CMP0125-find_library-NEW-build/libfile2\.(so|dylib)
+FILE_NAME_WITH_TYPE=/.+/CMP0125/CMP0125-find_library-NEW-build/libfile2\.(so|dylib)
+RELATIVE_PATH_AND_LOCAL=relative_local
+RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
+ABSOLUTE_PATH_AND_LOCAL=/absolute_local
+ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
+NOTFOUND_PATH_AND_LOCAL=/.+/CMP0125/libfile.(so|dylib)
+NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125/libfile.(so|dylib)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_library-NEW.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_library-NEW.cmake
new file mode 100644
index 0000000..31f5441
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_library-NEW.cmake
@@ -0,0 +1,6 @@
+
+cmake_policy(SET CMP0125 NEW)
+
+enable_language(C)
+
+include(CMP0125-find_library-Common.cmake)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD-stderr.txt b/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD-stderr.txt
new file mode 100644
index 0000000..cd3af56
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD-stderr.txt
@@ -0,0 +1,14 @@
+RELATIVE_PATH=/.+/CMP0125/CMP0125-find_library-OLD-build/relative
+RELATIVE_PATH_WITH_TYPE=relative
+ABSOLUTE_PATH=/absolute
+ABSOLUTE_PATH_WITH_TYPE=/absolute
+NOTFOUND_PATH=NOTFOUND
+NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125/libfile\.(so|dylib)
+FILE_NAME=/.+/CMP0125/CMP0125-find_library-OLD-build/libfile2\.(so|dylib)
+FILE_NAME_WITH_TYPE=libfile2\.(so|dylib)
+RELATIVE_PATH_AND_LOCAL=relative_local
+RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
+ABSOLUTE_PATH_AND_LOCAL=/absolute_local
+ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
+NOTFOUND_PATH_AND_LOCAL=/.+/CMP0125/libfile\.(so|dylib)
+NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125/libfile\.(so|dylib)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD.cmake
new file mode 100644
index 0000000..1dc4a95
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD.cmake
@@ -0,0 +1,6 @@
+
+cmake_policy(SET CMP0125 OLD)
+
+enable_language(C)
+
+include(CMP0125-find_library-Common.cmake)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake
new file mode 100644
index 0000000..37680c2
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_path-Common.cmake
@@ -0,0 +1,51 @@
+
+find_path(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_path(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_path(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_path(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_path(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_path(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+file(WRITE "${CMAKE_BINARY_DIR}/${FILE_NAME}" "")
+find_path(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_path(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+message("RELATIVE_PATH=${RELATIVE_PATH}")
+message("RELATIVE_PATH_WITH_TYPE=${RELATIVE_PATH_WITH_TYPE}")
+
+message("ABSOLUTE_PATH=${ABSOLUTE_PATH}")
+message("ABSOLUTE_PATH_WITH_TYPE=${ABSOLUTE_PATH_WITH_TYPE}")
+
+message("NOTFOUND_PATH=${NOTFOUND_PATH}")
+message("NOTFOUND_PATH_WITH_TYPE=${NOTFOUND_PATH_WITH_TYPE}")
+
+message("FILE_NAME=${FILE_NAME}")
+message("FILE_NAME_WITH_TYPE=${FILE_NAME_WITH_TYPE}")
+
+
+set(RELATIVE_PATH_AND_LOCAL relative_local)
+set(RELATIVE_PATH_WITH_TYPE_AND_LOCAL relative_local)
+set(ABSOLUTE_PATH_AND_LOCAL /absolute_local)
+set(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL /absolute_local)
+set(NOTFOUND_AND_LOCAL "${FILE_NAME}")
+set(NOTFOUND_WITH_TYPE_AND_LOCAL "${FILE_NAME}")
+
+find_path(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_path(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_path(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_path(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_path(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_path(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+message("RELATIVE_PATH_AND_LOCAL=${RELATIVE_PATH_AND_LOCAL}")
+message("RELATIVE_PATH_WITH_TYPE_AND_LOCAL=${RELATIVE_PATH_WITH_TYPE_AND_LOCAL}")
+
+message("ABSOLUTE_PATH_AND_LOCAL=${ABSOLUTE_PATH_AND_LOCAL}")
+message("ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=${ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL}")
+
+message("NOTFOUND_PATH_AND_LOCAL=${NOTFOUND_PATH_AND_LOCAL}")
+message("NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=${NOTFOUND_PATH_WITH_TYPE_AND_LOCAL}")
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_path-NEW-stderr.txt b/Tests/RunCMake/CMP0125/CMP0125-find_path-NEW-stderr.txt
new file mode 100644
index 0000000..c3f0208
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_path-NEW-stderr.txt
@@ -0,0 +1,14 @@
+RELATIVE_PATH=relative
+RELATIVE_PATH_WITH_TYPE=relative
+ABSOLUTE_PATH=/absolute
+ABSOLUTE_PATH_WITH_TYPE=/absolute
+NOTFOUND_PATH=/.+/CMP0125
+NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125
+FILE_NAME=/.+/CMP0125/CMP0125-find_path-NEW-build/file2\.txt
+FILE_NAME_WITH_TYPE=/.+/CMP0125/CMP0125-find_path-NEW-build/file2\.txt
+RELATIVE_PATH_AND_LOCAL=relative_local
+RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
+ABSOLUTE_PATH_AND_LOCAL=/absolute_local
+ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
+NOTFOUND_PATH_AND_LOCAL=/.+/CMP0125
+NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_path-NEW.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_path-NEW.cmake
new file mode 100644
index 0000000..d6a8544
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_path-NEW.cmake
@@ -0,0 +1,4 @@
+
+cmake_policy(SET CMP0125 NEW)
+
+include(CMP0125-find_path-Common.cmake)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_path-OLD-stderr.txt b/Tests/RunCMake/CMP0125/CMP0125-find_path-OLD-stderr.txt
new file mode 100644
index 0000000..b84c869
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_path-OLD-stderr.txt
@@ -0,0 +1,14 @@
+RELATIVE_PATH=/.+/CMP0125/CMP0125-find_path-OLD-build/relative
+RELATIVE_PATH_WITH_TYPE=relative
+ABSOLUTE_PATH=/absolute
+ABSOLUTE_PATH_WITH_TYPE=/absolute
+NOTFOUND_PATH=NOTFOUND
+NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125
+FILE_NAME=/.+/CMP0125/CMP0125-find_path-OLD-build/file2\.txt
+FILE_NAME_WITH_TYPE=file2\.txt
+RELATIVE_PATH_AND_LOCAL=/.+/CMP0125/CMP0125-find_path-OLD-build/relative
+RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
+ABSOLUTE_PATH_AND_LOCAL=/absolute
+ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
+NOTFOUND_PATH_AND_LOCAL=NOTFOUND
+NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_path-OLD.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_path-OLD.cmake
new file mode 100644
index 0000000..2e98ded
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_path-OLD.cmake
@@ -0,0 +1,4 @@
+
+cmake_policy(SET CMP0125 OLD)
+
+include(CMP0125-find_path-Common.cmake)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_program-Common.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_program-Common.cmake
new file mode 100644
index 0000000..fee4c34
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_program-Common.cmake
@@ -0,0 +1,52 @@
+
+find_program(RELATIVE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_program(RELATIVE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_program(ABSOLUTE_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_program(ABSOLUTE_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_program(NOTFOUND_PATH NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_program(NOTFOUND_PATH_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+file(WRITE "${CMAKE_BINARY_DIR}/${FILE_NAME}" "")
+file(CHMOD "${CMAKE_BINARY_DIR}/${FILE_NAME}" PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
+find_program(FILE_NAME NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_program(FILE_NAME_WITH_TYPE NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+message("RELATIVE_PATH=${RELATIVE_PATH}")
+message("RELATIVE_PATH_WITH_TYPE=${RELATIVE_PATH_WITH_TYPE}")
+
+message("ABSOLUTE_PATH=${ABSOLUTE_PATH}")
+message("ABSOLUTE_PATH_WITH_TYPE=${ABSOLUTE_PATH_WITH_TYPE}")
+
+message("NOTFOUND_PATH=${NOTFOUND_PATH}")
+message("NOTFOUND_PATH_WITH_TYPE=${NOTFOUND_PATH_WITH_TYPE}")
+
+message("FILE_NAME=${FILE_NAME}")
+message("FILE_NAME_WITH_TYPE=${FILE_NAME_WITH_TYPE}")
+
+
+set(RELATIVE_PATH_AND_LOCAL relative_local)
+set(RELATIVE_PATH_WITH_TYPE_AND_LOCAL relative_local)
+set(ABSOLUTE_PATH_AND_LOCAL /absolute_local)
+set(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL /absolute_local)
+set(NOTFOUND_AND_LOCAL "${FILE_NAME}")
+set(NOTFOUND_WITH_TYPE_AND_LOCAL "${FILE_NAME}")
+
+find_program(RELATIVE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_program(RELATIVE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_program(ABSOLUTE_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_program(ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+find_program(NOTFOUND_PATH_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+find_program(NOTFOUND_PATH_WITH_TYPE_AND_LOCAL NAMES ${SEARCH_NAME} PATHS ${SEARCH_PATH})
+
+message("RELATIVE_PATH_AND_LOCAL=${RELATIVE_PATH_AND_LOCAL}")
+message("RELATIVE_PATH_WITH_TYPE_AND_LOCAL=${RELATIVE_PATH_WITH_TYPE_AND_LOCAL}")
+
+message("ABSOLUTE_PATH_AND_LOCAL=${ABSOLUTE_PATH_AND_LOCAL}")
+message("ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=${ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL}")
+
+message("NOTFOUND_PATH_AND_LOCAL=${NOTFOUND_PATH_AND_LOCAL}")
+message("NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=${NOTFOUND_PATH_WITH_TYPE_AND_LOCAL}")
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_program-NEW-stderr.txt b/Tests/RunCMake/CMP0125/CMP0125-find_program-NEW-stderr.txt
new file mode 100644
index 0000000..62da5bf
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_program-NEW-stderr.txt
@@ -0,0 +1,14 @@
+RELATIVE_PATH=relative
+RELATIVE_PATH_WITH_TYPE=relative
+ABSOLUTE_PATH=/absolute
+ABSOLUTE_PATH_WITH_TYPE=/absolute
+NOTFOUND_PATH=/.+/CMP0125/file\.txt
+NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125/file\.txt
+FILE_NAME=/.+/CMP0125/CMP0125-find_program-NEW-build/file2\.txt
+FILE_NAME_WITH_TYPE=/.+/CMP0125/CMP0125-find_program-NEW-build/file2\.txt
+RELATIVE_PATH_AND_LOCAL=relative_local
+RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
+ABSOLUTE_PATH_AND_LOCAL=/absolute_local
+ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
+NOTFOUND_PATH_AND_LOCAL=/.+/CMP0125/file.txt
+NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125/file.txt
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_program-NEW.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_program-NEW.cmake
new file mode 100644
index 0000000..c02f23b
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_program-NEW.cmake
@@ -0,0 +1,4 @@
+
+cmake_policy(SET CMP0125 NEW)
+
+include(CMP0125-find_program-Common.cmake)
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_program-OLD-stderr.txt b/Tests/RunCMake/CMP0125/CMP0125-find_program-OLD-stderr.txt
new file mode 100644
index 0000000..a97fc07
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_program-OLD-stderr.txt
@@ -0,0 +1,14 @@
+RELATIVE_PATH=/.+/CMP0125/CMP0125-find_program-OLD-build/relative
+RELATIVE_PATH_WITH_TYPE=relative
+ABSOLUTE_PATH=/absolute
+ABSOLUTE_PATH_WITH_TYPE=/absolute
+NOTFOUND_PATH=NOTFOUND
+NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125/file\.txt
+FILE_NAME=/.+/CMP0125/CMP0125-find_program-OLD-build/file2\.txt
+FILE_NAME_WITH_TYPE=file2\.txt
+RELATIVE_PATH_AND_LOCAL=/.+/CMP0125/CMP0125-find_program-OLD-build/relative
+RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
+ABSOLUTE_PATH_AND_LOCAL=/absolute
+ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
+NOTFOUND_PATH_AND_LOCAL=NOTFOUND
+NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125/file.txt
diff --git a/Tests/RunCMake/CMP0125/CMP0125-find_program-OLD.cmake b/Tests/RunCMake/CMP0125/CMP0125-find_program-OLD.cmake
new file mode 100644
index 0000000..6be8534
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMP0125-find_program-OLD.cmake
@@ -0,0 +1,4 @@
+
+cmake_policy(SET CMP0125 OLD)
+
+include(CMP0125-find_program-Common.cmake)
diff --git a/Tests/RunCMake/CMP0125/CMakeLists.txt b/Tests/RunCMake/CMP0125/CMakeLists.txt
new file mode 100644
index 0000000..7cabeb6
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.20)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0125/RunCMakeTest.cmake b/Tests/RunCMake/CMP0125/RunCMakeTest.cmake
new file mode 100644
index 0000000..56d4c86
--- /dev/null
+++ b/Tests/RunCMake/CMP0125/RunCMakeTest.cmake
@@ -0,0 +1,36 @@
+include(RunCMake)
+
+file(WRITE "${RunCMake_BINARY_DIR}/file.txt" "")
+file(CHMOD "${RunCMake_BINARY_DIR}/file.txt" PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
+
+set(options -DRELATIVE_PATH=relative -DABSOLUTE_PATH=/absolute
+ -DRELATIVE_PATH_WITH_TYPE:PATH=relative -DABSOLUTE_PATH_WITH_TYPE:PATH=/absolute
+ -DNOTFOUND_PATH=NOTFOUND -DNOTFOUND_PATH_WITH_TYPE:PATH=NOTFOUND
+ -DFILE_NAME=file2.txt -DFILE_NAME_WITH_TYPE:PATH=file2.txt
+ -DSEARCH_NAME=file.txt "-DSEARCH_PATH=${RunCMake_BINARY_DIR}"
+ -DRELATIVE_PATH_AND_LOCAL=relative -DABSOLUTE_PATH_AND_LOCAL=/absolute
+ -DRELATIVE_PATH_WITH_TYPE_AND_LOCAL:PATH=relative -DABSOLUTE_PATH_WITH_TYPE_AND_LOCAL:PATH=/absolute
+ -DNOTFOUND_PATH_AND_LOCAL=NOTFOUND -DNOTFOUND_PATH_WITH_TYPE_AND_LOCAL:PATH=NOTFOUND
+ -DFILE_NAME=file2.txt -DFILE_NAME_WITH_TYPE:PATH=file2.txt
+ -DSEARCH_NAME=file.txt "-DSEARCH_PATH=${RunCMake_BINARY_DIR}")
+
+run_cmake_with_options(CMP0125-find_file-OLD ${options})
+run_cmake_with_options(CMP0125-find_file-NEW ${options})
+run_cmake_with_options(CMP0125-find_path-OLD ${options})
+run_cmake_with_options(CMP0125-find_path-NEW ${options})
+run_cmake_with_options(CMP0125-find_program-OLD ${options})
+run_cmake_with_options(CMP0125-find_program-NEW ${options})
+
+
+file(WRITE "${RunCMake_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}file${CMAKE_SHARED_LIBRARY_SUFFIX}" "")
+file(CHMOD "${RunCMake_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}file${CMAKE_SHARED_LIBRARY_SUFFIX}" PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
+
+set(options -DRELATIVE_PATH=relative -DABSOLUTE_PATH=/absolute
+ -DRELATIVE_PATH_WITH_TYPE:PATH=relative -DABSOLUTE_PATH_WITH_TYPE:PATH=/absolute
+ -DNOTFOUND_PATH=NOTFOUND -DNOTFOUND_PATH_WITH_TYPE:PATH=NOTFOUND
+ -DFILE_NAME=${CMAKE_SHARED_LIBRARY_PREFIX}file2${CMAKE_SHARED_LIBRARY_SUFFIX}
+ -DFILE_NAME_WITH_TYPE:PATH=${CMAKE_SHARED_LIBRARY_PREFIX}file2${CMAKE_SHARED_LIBRARY_SUFFIX}
+ -DSEARCH_NAME=file "-DSEARCH_PATH=${RunCMake_BINARY_DIR}")
+
+run_cmake_with_options(CMP0125-find_library-OLD ${options})
+run_cmake_with_options(CMP0125-find_library-NEW ${options})
diff --git a/Tests/RunCMake/CMP0126/CMP0126-NEW.cmake b/Tests/RunCMake/CMP0126/CMP0126-NEW.cmake
new file mode 100644
index 0000000..2f8562b
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/CMP0126-NEW.cmake
@@ -0,0 +1,28 @@
+
+# enforce policy CMP0125 to ensure predictable result of find_* commands
+cmake_policy(SET CMP0125 NEW)
+
+cmake_policy(SET CMP0126 NEW)
+
+set(VAR 1)
+set(VAR 2 CACHE STRING "")
+
+if (NOT VAR EQUAL 1)
+ message(FATAL_ERROR "normal variable does not exist anymore.")
+endif()
+
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/file.txt" "")
+set(VAR file.txt)
+set(VAR "" CACHE STRING "" FORCE)
+set_property(CACHE VAR PROPERTY TYPE UNINITIALIZED)
+
+find_file(VAR NAMES file.txt PATHS "${CMAKE_CURRENT_BINARY_DIR}")
+
+unset(VAR CACHE)
+if (NOT DEFINED VAR)
+ message(FATAL_ERROR "find_file: normal variable does not exist anymore.")
+endif()
+if (NOT VAR STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/file.txt")
+ message(FATAL_ERROR "find_file: failed to set normal variable.")
+endif()
diff --git a/Tests/RunCMake/CMP0126/CMP0126-NEW_CL.cmake b/Tests/RunCMake/CMP0126/CMP0126-NEW_CL.cmake
new file mode 100644
index 0000000..cfaa1e3
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/CMP0126-NEW_CL.cmake
@@ -0,0 +1,9 @@
+
+cmake_policy(SET CMP0126 NEW)
+
+set(VAR 1)
+set(VAR 2 CACHE STRING "")
+
+if (NOT VAR EQUAL 1)
+ message(FATAL_ERROR "normal variable does not exist anymore.")
+endif()
diff --git a/Tests/RunCMake/CMP0126/CMP0126-OLD.cmake b/Tests/RunCMake/CMP0126/CMP0126-OLD.cmake
new file mode 100644
index 0000000..22a5037
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/CMP0126-OLD.cmake
@@ -0,0 +1,25 @@
+
+# enforce policy CMP0125 to ensure predictable result of find_* commands
+cmake_policy(SET CMP0125 NEW)
+
+cmake_policy(SET CMP0126 OLD)
+
+set(VAR 1)
+set(VAR 2 CACHE STRING "")
+
+if (VAR EQUAL 1)
+ message(FATAL_ERROR "normal variable still exist.")
+endif()
+
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/file.txt" "")
+set(VAR file.txt)
+set(VAR "" CACHE STRING "" FORCE)
+set_property(CACHE VAR PROPERTY TYPE UNINITIALIZED)
+
+find_file(VAR NAMES file.txt PATHS "${CMAKE_CURRENT_BINARY_DIR}")
+
+unset(VAR CACHE)
+if (DEFINED VAR)
+ message(FATAL_ERROR "find_file: normal variable still exist.")
+endif()
diff --git a/Tests/RunCMake/CMP0126/CMP0126-OLD_CL.cmake b/Tests/RunCMake/CMP0126/CMP0126-OLD_CL.cmake
new file mode 100644
index 0000000..5d72a87
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/CMP0126-OLD_CL.cmake
@@ -0,0 +1,9 @@
+
+cmake_policy(SET CMP0126 OLD)
+
+set(VAR 1)
+set(VAR 2 CACHE STRING "")
+
+if (NOT VAR EQUAL 3)
+ message(FATAL_ERROR "normal variable still exist.")
+endif()
diff --git a/Tests/RunCMake/CMP0126/CMP0126-WARN-default.cmake b/Tests/RunCMake/CMP0126/CMP0126-WARN-default.cmake
new file mode 100644
index 0000000..3147fc4
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/CMP0126-WARN-default.cmake
@@ -0,0 +1,3 @@
+
+set(MY_VAR 1)
+set(MY_VAR 2 CACHE STRING "")
diff --git a/Tests/RunCMake/CMP0126/CMP0126-WARN-stderr.txt b/Tests/RunCMake/CMP0126/CMP0126-WARN-stderr.txt
new file mode 100644
index 0000000..2301511
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/CMP0126-WARN-stderr.txt
@@ -0,0 +1,10 @@
+CMake Warning \(dev\) at CMP0126-WARN.cmake:[0-9]+ \(set\):
+ Policy CMP0126 is not set: set\(CACHE\) does not remove a normal variable of
+ the same name\. Run "cmake --help-policy CMP0126" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+ For compatibility with older versions of CMake, normal variable "MY_VAR"
+ will be removed from the current scope\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/CMP0126/CMP0126-WARN.cmake b/Tests/RunCMake/CMP0126/CMP0126-WARN.cmake
new file mode 100644
index 0000000..111c824
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/CMP0126-WARN.cmake
@@ -0,0 +1,5 @@
+
+set(CMAKE_POLICY_WARNING_CMP0126 1)
+
+set(MY_VAR 1)
+set(MY_VAR 2 CACHE STRING "")
diff --git a/Tests/RunCMake/CMP0126/CMakeLists.txt b/Tests/RunCMake/CMP0126/CMakeLists.txt
new file mode 100644
index 0000000..7cabeb6
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.20)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0126/RunCMakeTest.cmake b/Tests/RunCMake/CMP0126/RunCMakeTest.cmake
new file mode 100644
index 0000000..77c3878
--- /dev/null
+++ b/Tests/RunCMake/CMP0126/RunCMakeTest.cmake
@@ -0,0 +1,8 @@
+include(RunCMake)
+
+run_cmake(CMP0126-OLD)
+run_cmake_with_options(CMP0126-OLD_CL -DVAR=3)
+run_cmake(CMP0126-NEW)
+run_cmake_with_options(CMP0126-NEW_CL -DVAR=3)
+run_cmake(CMP0126-WARN)
+run_cmake(CMP0126-WARN-default)
diff --git a/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-NEW-stdout.txt b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-NEW-stdout.txt
new file mode 100644
index 0000000..15b56a1
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-NEW-stdout.txt
@@ -0,0 +1 @@
+-- USE_FOO='ON'
diff --git a/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-NEW.cmake b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-NEW.cmake
new file mode 100644
index 0000000..5a2b018
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-NEW.cmake
@@ -0,0 +1,9 @@
+include(CMakeDependentOption)
+
+cmake_policy(SET CMP0127 NEW)
+
+set(A 1)
+set(B 1)
+set(C 0)
+cmake_dependent_option(USE_FOO "Use Foo" ON "A AND (B OR C)" OFF)
+message(STATUS "USE_FOO='${USE_FOO}'")
diff --git a/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN-stderr.txt b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN-stderr.txt
new file mode 100644
index 0000000..b16e84b
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Warning \(dev\) at [^
+]*/Modules/CMakeDependentOption.cmake:[0-9]+ \(message\):
+ Policy CMP0127 is not set: cmake_dependent_option\(\) supports full Condition
+ Syntax. Run "cmake --help-policy CMP0127" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN.cmake:[0-9]+ \(cmake_dependent_option\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN-stdout.txt b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN-stdout.txt
new file mode 100644
index 0000000..d89dbd3
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN-stdout.txt
@@ -0,0 +1,2 @@
+-- USE_FOO='OFF'
+-- USE_BAR='ON'
diff --git a/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN.cmake b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN.cmake
new file mode 100644
index 0000000..00d440d
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Parentheses-CMP0127-WARN.cmake
@@ -0,0 +1,9 @@
+include(CMakeDependentOption)
+
+set(A 1)
+set(B 1)
+set(C 0)
+cmake_dependent_option(USE_FOO "Use Foo" ON "A AND (B OR C)" OFF)
+message(STATUS "USE_FOO='${USE_FOO}'")
+cmake_dependent_option(USE_BAR "Use Bar" ON "A;B" OFF)
+message(STATUS "USE_BAR='${USE_BAR}'")
diff --git a/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW-stdout.txt b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW-stdout.txt
new file mode 100644
index 0000000..15b56a1
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW-stdout.txt
@@ -0,0 +1 @@
+-- USE_FOO='ON'
diff --git a/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW.cmake b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW.cmake
new file mode 100644
index 0000000..e92c1e6
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW.cmake
@@ -0,0 +1,7 @@
+include(CMakeDependentOption)
+
+cmake_policy(SET CMP0127 NEW)
+
+set(FOO "lower")
+cmake_dependent_option(USE_FOO "Use Foo" ON "FOO MATCHES \"(UPPER|lower)\"" OFF)
+message(STATUS "USE_FOO='${USE_FOO}'")
diff --git a/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stdout.txt b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stdout.txt
new file mode 100644
index 0000000..15b56a1
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stdout.txt
@@ -0,0 +1 @@
+-- USE_FOO='ON'
diff --git a/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD.cmake b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD.cmake
new file mode 100644
index 0000000..81df003
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD.cmake
@@ -0,0 +1,7 @@
+include(CMakeDependentOption)
+
+cmake_policy(SET CMP0127 OLD)
+
+set(FOO "lower")
+cmake_dependent_option(USE_FOO "Use Foo" ON "FOO MATCHES (UPPER|lower)" OFF)
+message(STATUS "USE_FOO='${USE_FOO}'")
diff --git a/Tests/RunCMake/CMakeDependentOption/RunCMakeTest.cmake b/Tests/RunCMake/CMakeDependentOption/RunCMakeTest.cmake
new file mode 100644
index 0000000..61e046f
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/RunCMakeTest.cmake
@@ -0,0 +1,6 @@
+include(RunCMake)
+
+run_cmake_script(Regex-CMP0127-NEW)
+run_cmake_script(Regex-CMP0127-OLD)
+run_cmake_script(Parentheses-CMP0127-NEW)
+run_cmake_script(Parentheses-CMP0127-WARN)
diff --git a/Tests/RunCMake/CMakeDependentOption/Simple-CMP0127-OLD-stdout.txt b/Tests/RunCMake/CMakeDependentOption/Simple-CMP0127-OLD-stdout.txt
new file mode 100644
index 0000000..15b56a1
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Simple-CMP0127-OLD-stdout.txt
@@ -0,0 +1 @@
+-- USE_FOO='ON'
diff --git a/Tests/RunCMake/CMakeDependentOption/Simple-CMP0127-OLD.cmake b/Tests/RunCMake/CMakeDependentOption/Simple-CMP0127-OLD.cmake
new file mode 100644
index 0000000..6db2128
--- /dev/null
+++ b/Tests/RunCMake/CMakeDependentOption/Simple-CMP0127-OLD.cmake
@@ -0,0 +1,6 @@
+include(CMakeDependentOption)
+
+set(A1 1)
+set(bb 1)
+cmake_dependent_option(USE_FOO "Use Foo" ON "A1;bb" OFF)
+message(STATUS "USE_FOO='${USE_FOO}'")
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 95f28f6..eb2c2d9 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -29,6 +29,10 @@ macro(add_RunCMake_test test)
${TEST_ARGS}
-P "${CMAKE_CURRENT_SOURCE_DIR}/${Test_Dir}/RunCMakeTest.cmake"
)
+ set_tests_properties("RunCMake.${test}" PROPERTIES LABELS "CMake;run")
+ if(${test} MATCHES ^CMP)
+ set_property(TEST "RunCMake.${test}" APPEND PROPERTY LABELS "policy")
+ endif()
endmacro()
function(add_RunCMake_test_group test types)
@@ -131,6 +135,12 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
endif()
add_RunCMake_test(CMP0118)
add_RunCMake_test(CMP0119 -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
+add_RunCMake_test(CMP0121)
+if (CMAKE_SYSTEM_NAME MATCHES "(Linux|Darwin)")
+ add_RunCMake_test(CMP0125 -DCMAKE_SHARED_LIBRARY_PREFIX=${CMAKE_SHARED_LIBRARY_PREFIX}
+ -DCMAKE_SHARED_LIBRARY_SUFFIX=${CMAKE_SHARED_LIBRARY_SUFFIX})
+endif()
+add_RunCMake_test(CMP0126)
# The test for Policy 65 requires the use of the
# CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode
@@ -160,7 +170,7 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
endif()
add_RunCMake_test(Ninja)
set(NinjaMultiConfig_ARGS
- -DCYGWIN=${CYGWIN}
+ -DCYGWIN=${CYGWIN} -DMSYS=${MSYS}
)
if(CMake_TEST_Qt5 AND Qt5Core_FOUND)
list(APPEND NinjaMultiConfig_ARGS -DCMake_TEST_Qt5=1 -DQt5Core_DIR=${Qt5Core_DIR} -DCMAKE_TEST_Qt5Core_Version=${Qt5Core_VERSION})
@@ -223,6 +233,7 @@ add_RunCMake_test(BuildDepends
if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
add_RunCMake_test(Byproducts)
endif()
+add_RunCMake_test(CMakeDependentOption)
add_RunCMake_test(CMakeRoleGlobalProperty)
add_RunCMake_test(CMakeRelease -DCMake_TEST_JQ=${CMake_TEST_JQ})
if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
@@ -262,6 +273,7 @@ add_RunCMake_test(GenEx-HOST_LINK)
add_RunCMake_test(GenEx-DEVICE_LINK)
add_RunCMake_test(GenEx-TARGET_FILE -DLINKER_SUPPORTS_PDB=${LINKER_SUPPORTS_PDB})
add_RunCMake_test(GenEx-GENEX_EVAL)
+add_RunCMake_test(GenEx-TARGET_RUNTIME_DLLS)
add_RunCMake_test(GeneratorExpression)
add_RunCMake_test(GeneratorInstance)
add_RunCMake_test(GeneratorPlatform)
@@ -276,7 +288,7 @@ add_RunCMake_test(Graphviz)
add_RunCMake_test(TargetPropertyGeneratorExpressions)
add_RunCMake_test(Languages)
add_RunCMake_test(LinkStatic)
-if(CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang)$")
+if(CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|Fujitsu|FujitsuClang)$")
add_RunCMake_test(MetaCompileFeatures)
endif()
if(MSVC)
@@ -337,10 +349,11 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
endif()
add_RunCMake_test(execute_process)
add_RunCMake_test(export)
+add_RunCMake_test(cmake_host_system_information)
add_RunCMake_test(cmake_language)
add_RunCMake_test(cmake_minimum_required)
add_RunCMake_test(cmake_parse_arguments)
-add_RunCMake_test(cmake_path)
+add_RunCMake_test(cmake_path -DMSYS=${MSYS})
add_RunCMake_test(continue)
add_executable(color_warning color_warning.c)
add_executable(fake_build_command fake_build_command.c)
@@ -355,20 +368,21 @@ if(COVERAGE_COMMAND)
endif()
add_RunCMake_test(ctest_start)
add_RunCMake_test(ctest_submit)
-add_RunCMake_test(ctest_test)
+add_RunCMake_test(ctest_test
+ -DIMAGE_DIR=${CMAKE_SOURCE_DIR}/Utilities/Sphinx/static
+)
add_RunCMake_test(ctest_disabled_test)
add_RunCMake_test(ctest_skipped_test)
add_RunCMake_test(ctest_update)
add_RunCMake_test(ctest_upload)
+add_RunCMake_test(ctest_environment)
add_RunCMake_test(ctest_fixtures)
-add_RunCMake_test(file)
-add_RunCMake_test(file-CHMOD)
-if(HAVE_ELF_H OR CMAKE_SYSTEM_NAME STREQUAL "AIX")
- add_RunCMake_test(file-RPATH -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DHAVE_ELF_H=${HAVE_ELF_H})
-endif()
+add_RunCMake_test(file -DMSYS=${MSYS})
+add_RunCMake_test(file-CHMOD -DMSYS=${MSYS})
+add_RunCMake_test(file-RPATH -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
add_RunCMake_test(find_file)
-add_RunCMake_test(find_library -DCYGWIN=${CYGWIN})
-add_RunCMake_test(find_package)
+add_RunCMake_test(find_library -DCYGWIN=${CYGWIN} -DMSYS=${MSYS})
+add_RunCMake_test(find_package -DMSYS=${MSYS})
add_RunCMake_test(find_path)
add_RunCMake_test(find_program -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
add_RunCMake_test(foreach)
@@ -420,14 +434,21 @@ function(add_RunCMake_test_try_compile)
set(CMAKE_C_STANDARD_DEFAULT "")
endif()
endif()
+ if(CMAKE_VERSION VERSION_LESS 3.20.20210225 AND "x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang")
+ # Older CMake versions do not know about Clang MSVC compatibility mode
+ # standards. Approximate the logic from Clang-C.cmake.
+ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
+ set(CMAKE_C_STANDARD_DEFAULT 17)
+ elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5.2)
+ set(CMAKE_C_STANDARD_DEFAULT 11)
+ endif()
+ endif()
if(CMAKE_VERSION VERSION_LESS 3.20.6 AND "x${CMAKE_C_COMPILER_ID}" STREQUAL "xIntelLLVM" AND "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
# Older CMake versions accidentally set the default standards to empty when
# IntelLLVM targets the MSVC ABI, thus not activating standard selection.
# Approximate the logic from IntelLLVM-{C,CXX}.cmake.
if(DEFINED CMAKE_C_STANDARD_DEFAULT AND "${CMAKE_C_STANDARD_DEFAULT}" STREQUAL "")
- # FIXME: The compiler actually defaults to C17, but
- # CMake does not yet model or detect that standard.
- set(CMAKE_C_STANDARD_DEFAULT 11)
+ set(CMAKE_C_STANDARD_DEFAULT 17)
endif()
if(DEFINED CMAKE_CXX_STANDARD_DEFAULT AND "${CMAKE_CXX_STANDARD_DEFAULT}" STREQUAL "")
set(CMAKE_CXX_STANDARD_DEFAULT 14)
@@ -443,6 +464,7 @@ function(add_RunCMake_test_try_compile)
CMAKE_CXX_STANDARD_DEFAULT
CMake_TEST_CUDA
CMake_TEST_ISPC
+ CMake_TEST_HIP
CMake_TEST_FILESYSTEM_1S
CMAKE_OBJC_STANDARD_DEFAULT
CMAKE_OBJCXX_STANDARD_DEFAULT
@@ -510,7 +532,9 @@ else()
message(STATUS "Could not find ctresalloc")
endif()
-if(NOT WIN32)
+if(NOT WIN32
+ AND NOT MSYS # FIXME: This works on CYGWIN but not on MSYS
+ )
add_RunCMake_test(SymlinkTrees)
endif ()
@@ -533,6 +557,7 @@ if(CMake_TEST_FindGTK2)
endif()
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+ add_RunCMake_test(CMAKE_MSVCIDE_RUN_PATH)
add_RunCMake_test(include_external_msproject -DVS_PLATFORM_NAME=${CMAKE_VS_PLATFORM_NAME})
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio (9|10)" AND NOT CMAKE_VS_DEVENV_COMMAND)
set(NO_USE_FOLDERS 1)
@@ -552,7 +577,7 @@ endif()
if(XCODE_VERSION)
add_RunCMake_test(XcodeProject -DXCODE_VERSION=${XCODE_VERSION})
- add_RunCMake_test(XcodeProject-Embed)
+ add_RunCMake_test(XcodeProject-Embed -DXCODE_VERSION=${XCODE_VERSION})
# This test can take a very long time due to lots of combinations.
# Use a long default timeout and provide an option to customize it.
@@ -584,17 +609,23 @@ set_property(TEST RunCMake.target_link_options APPEND
add_RunCMake_test(target_compile_definitions)
add_RunCMake_test(target_compile_features)
-add_RunCMake_test(target_compile_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
+add_RunCMake_test(target_compile_options
+ -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
+ -DCMAKE_C_SIMULATE_ID=${CMAKE_C_SIMULATE_ID}
+ )
add_RunCMake_test(target_include_directories)
add_RunCMake_test(target_sources)
add_RunCMake_test(CheckCompilerFlag -DCMake_TEST_CUDA=${CMake_TEST_CUDA}
-DCMake_TEST_ISPC=${CMake_TEST_ISPC}
- -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID})
+ -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}
+ -DCMake_TEST_HIP=${CMake_TEST_HIP})
add_RunCMake_test(CheckSourceCompiles -DCMake_TEST_CUDA=${CMake_TEST_CUDA}
-DCMake_TEST_ISPC=${CMake_TEST_ISPC}
- -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID})
+ -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}
+ -DCMake_TEST_HIP=${CMake_TEST_HIP})
add_RunCMake_test(CheckSourceRuns -DCMake_TEST_CUDA=${CMake_TEST_CUDA}
- -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID})
+ -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}
+ -DCMake_TEST_HIP=${CMake_TEST_HIP})
set_property(TEST RunCMake.CheckCompilerFlag
RunCMake.CheckSourceCompiles
RunCMake.CheckSourceRuns
@@ -602,19 +633,26 @@ set_property(TEST RunCMake.CheckCompilerFlag
set_property(TEST RunCMake.CheckSourceCompiles
RunCMake.CheckCompilerFlag
APPEND PROPERTY LABELS "ISPC")
+set_property(TEST RunCMake.CheckCompilerFlag
+ RunCMake.CheckSourceCompiles
+ RunCMake.CheckSourceRuns
+ APPEND PROPERTY LABELS "HIP")
add_RunCMake_test(CheckModules)
add_RunCMake_test(CheckIPOSupported)
if (CMAKE_SYSTEM_NAME MATCHES "(Linux|Darwin)"
AND (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU" OR CMAKE_Fortran_COMPILER_ID MATCHES "GNU"))
add_RunCMake_test(CheckLinkerFlag -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
-DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}
- -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
+ -DCMake_TEST_CUDA=${CMake_TEST_CUDA}
+ -DCMake_TEST_HIP=${CMake_TEST_HIP})
set_property(TEST RunCMake.CheckLinkerFlag APPEND PROPERTY LABELS "CUDA")
+ set_property(TEST RunCMake.CheckLinkerFlag APPEND PROPERTY LABELS "HIP")
endif()
add_executable(pseudo_llvm-rc pseudo_llvm-rc.c)
-add_RunCMake_test(CommandLine -DLLVM_RC=$<TARGET_FILE:pseudo_llvm-rc> -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DCYGWIN=${CYGWIN} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE})
+add_RunCMake_test(CommandLine -DLLVM_RC=$<TARGET_FILE:pseudo_llvm-rc> -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
+ -DCYGWIN=${CYGWIN} -DMSYS=${MSYS} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE})
add_RunCMake_test(CommandLineTar)
if(CMAKE_PLATFORM_NO_VERSIONED_SONAME OR (NOT CMAKE_SHARED_LIBRARY_SONAME_FLAG AND NOT CMAKE_SHARED_LIBRARY_SONAME_C_FLAG))
@@ -623,7 +661,7 @@ else()
set(NO_NAMELINK 0)
endif()
-add_RunCMake_test(install -DNO_NAMELINK=${NO_NAMELINK} -DCYGWIN=${CYGWIN}
+add_RunCMake_test(install -DNO_NAMELINK=${NO_NAMELINK} -DCYGWIN=${CYGWIN} -DMSYS=${MSYS}
-DCMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN=${CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN}
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-DCMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG=${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}
@@ -712,6 +750,9 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
if(DEFINED CMake_TEST_CUDA)
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
endif()
+ if(DEFINED CMake_TEST_HIP)
+ list(APPEND CompilerLauncher_ARGS -DCMake_TEST_HIP=${CMake_TEST_HIP})
+ endif()
if(DEFINED CMake_TEST_ISPC)
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_ISPC=${CMake_TEST_ISPC})
endif()
@@ -720,12 +761,14 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
endif()
if (APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_OBJC=1)
+ list(APPEND LinkerLauncher_ARGS -DCMake_TEST_OBJC=1)
endif()
add_RunCMake_test(CompilerLauncher)
set_property(TEST RunCMake.CompilerLauncher APPEND
- PROPERTY LABELS "CUDA;ISPC")
+ PROPERTY LABELS "CUDA;HIP;ISPC")
add_RunCMake_test(ctest_labels_for_subprojects)
add_RunCMake_test(CompilerArgs)
+ add_RunCMake_test(LinkerLauncher)
endif()
set(cpack_tests
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable-result.txt b/Tests/RunCMake/CMakePresets/ConditionFuture-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable-result.txt
+++ b/Tests/RunCMake/CMakePresets/ConditionFuture-result.txt
diff --git a/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt b/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt
new file mode 100644
index 0000000..ea5f47f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/ConditionFuture: File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresets/ConditionFuture.json.in b/Tests/RunCMake/CMakePresets/ConditionFuture.json.in
new file mode 100644
index 0000000..9d4798b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ConditionFuture.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 2,
+ "configurePresets": [
+ {
+ "name": "ConditionFuture",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "condition": true
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/Conditions.json.in b/Tests/RunCMake/CMakePresets/Conditions.json.in
new file mode 100644
index 0000000..9c0c6bd
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Conditions.json.in
@@ -0,0 +1,406 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "Base",
+ "hidden": true,
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "SimpleTrue",
+ "inherits": "Base",
+ "condition": true
+ },
+ {
+ "name": "SimpleFalse",
+ "inherits": "Base",
+ "condition": false
+ },
+ {
+ "name": "Null",
+ "inherits": "Base",
+ "condition": null
+ },
+ {
+ "name": "ConstTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "const",
+ "value": true
+ }
+ },
+ {
+ "name": "ConstFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "const",
+ "value": false
+ }
+ },
+ {
+ "name": "EqualsTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "equals",
+ "lhs": "abc",
+ "rhs": "abc"
+ }
+ },
+ {
+ "name": "EqualsFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "equals",
+ "lhs": "abc",
+ "rhs": "abcd"
+ }
+ },
+ {
+ "name": "EqualsMacroLeft",
+ "inherits": "Base",
+ "condition": {
+ "type": "equals",
+ "lhs": "${presetName}",
+ "rhs": "EqualsMacroLeft"
+ }
+ },
+ {
+ "name": "EqualsMacroRight",
+ "inherits": "Base",
+ "condition": {
+ "type": "equals",
+ "lhs": "EqualsMacroRight",
+ "rhs": "${presetName}"
+ }
+ },
+ {
+ "name": "NotEqualsTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "notEquals",
+ "lhs": "abc",
+ "rhs": "abcd"
+ }
+ },
+ {
+ "name": "NotEqualsFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "notEquals",
+ "lhs": "abc",
+ "rhs": "abc"
+ }
+ },
+ {
+ "name": "InListTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "inList",
+ "string": "b",
+ "list": [
+ "a",
+ "b",
+ "c"
+ ]
+ }
+ },
+ {
+ "name": "InListFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "inList",
+ "string": "d",
+ "list": [
+ "a",
+ "b",
+ "c"
+ ]
+ }
+ },
+ {
+ "name": "InListMacroString",
+ "inherits": "Base",
+ "condition": {
+ "type": "inList",
+ "string": "${presetName}",
+ "list": [
+ "InListMacroString",
+ "AnotherString"
+ ]
+ }
+ },
+ {
+ "name": "InListMacroList",
+ "inherits": "Base",
+ "condition": {
+ "type": "inList",
+ "string": "InListMacroList",
+ "list": [
+ "${presetName}",
+ "AnotherString"
+ ]
+ }
+ },
+ {
+ "name": "InListShortCircuit",
+ "inherits": "Base",
+ "condition": {
+ "type": "inList",
+ "string": "a",
+ "list": [
+ "a",
+ "${invalidMacro}"
+ ]
+ }
+ },
+ {
+ "name": "NotInListTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "notInList",
+ "string": "d",
+ "list": [
+ "a",
+ "b",
+ "c"
+ ]
+ }
+ },
+ {
+ "name": "NotInListFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "notInList",
+ "string": "a",
+ "list": [
+ "a",
+ "b",
+ "c"
+ ]
+ }
+ },
+ {
+ "name": "MatchesTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "matches",
+ "string": "aaa",
+ "regex": "^a*$"
+ }
+ },
+ {
+ "name": "MatchesFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "matches",
+ "string": "aab",
+ "regex": "^a*$"
+ }
+ },
+ {
+ "name": "MatchesMacroString",
+ "inherits": "Base",
+ "condition": {
+ "type": "matches",
+ "string": "${presetName}",
+ "regex": "^Matches"
+ }
+ },
+ {
+ "name": "MatchesMacroRegex",
+ "inherits": "Base",
+ "condition": {
+ "type": "matches",
+ "string": "stuff",
+ "regex": "$env{CONDITION_REGEX}"
+ },
+ "environment": {
+ "CONDITION_REGEX": "^stuf*$"
+ }
+ },
+ {
+ "name": "NotMatchesTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "notMatches",
+ "string": "aab",
+ "regex": "^a*$"
+ }
+ },
+ {
+ "name": "NotMatchesFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "notMatches",
+ "string": "aaa",
+ "regex": "^a*$"
+ }
+ },
+ {
+ "name": "AnyOfTrue1",
+ "inherits": "Base",
+ "condition": {
+ "type": "anyOf",
+ "conditions": [
+ true,
+ false
+ ]
+ }
+ },
+ {
+ "name": "AnyOfTrue2",
+ "inherits": "Base",
+ "condition": {
+ "type": "anyOf",
+ "conditions": [
+ false,
+ true
+ ]
+ }
+ },
+ {
+ "name": "AnyOfFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "anyOf",
+ "conditions": [
+ false,
+ {
+ "type": "equals",
+ "lhs": "abc",
+ "rhs": "abcd"
+ }
+ ]
+ }
+ },
+ {
+ "name": "AnyOfShortCircuit",
+ "inherits": "Base",
+ "condition": {
+ "type": "anyOf",
+ "conditions": [
+ true,
+ {
+ "type": "equals",
+ "lhs": "${invalidMacro}",
+ "rhs": ""
+ }
+ ]
+ }
+ },
+ {
+ "name": "AnyOfEmpty",
+ "inherits": "Base",
+ "condition": {
+ "type": "anyOf",
+ "conditions": []
+ }
+ },
+ {
+ "name": "AllOfTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "allOf",
+ "conditions": [
+ true,
+ {
+ "type": "equals",
+ "lhs": "abc",
+ "rhs": "abc"
+ }
+ ]
+ }
+ },
+ {
+ "name": "AllOfFalse1",
+ "inherits": "Base",
+ "condition": {
+ "type": "allOf",
+ "conditions": [
+ false,
+ true
+ ]
+ }
+ },
+ {
+ "name": "AllOfFalse2",
+ "inherits": "Base",
+ "condition": {
+ "type": "allOf",
+ "conditions": [
+ true,
+ false
+ ]
+ }
+ },
+ {
+ "name": "AllOfShortCircuit",
+ "inherits": "Base",
+ "condition": {
+ "type": "allOf",
+ "conditions": [
+ false,
+ {
+ "type": "equals",
+ "lhs": "${invalidMacro}",
+ "rhs": ""
+ }
+ ]
+ }
+ },
+ {
+ "name": "AllOfEmpty",
+ "inherits": "Base",
+ "condition": {
+ "type": "allOf",
+ "conditions": []
+ }
+ },
+ {
+ "name": "NotTrue",
+ "inherits": "Base",
+ "condition": {
+ "type": "not",
+ "condition": true
+ }
+ },
+ {
+ "name": "NotFalse",
+ "inherits": "Base",
+ "condition": {
+ "type": "not",
+ "condition": false
+ }
+ },
+ {
+ "name": "InheritanceBase",
+ "inherits": "Base",
+ "hidden": true,
+ "condition": {
+ "type": "equals",
+ "lhs": "${presetName}",
+ "rhs": "InheritanceChildTrue"
+ }
+ },
+ {
+ "name": "InheritanceChildTrue",
+ "inherits": "InheritanceBase"
+ },
+ {
+ "name": "InheritanceChildFalse",
+ "inherits": "InheritanceBase"
+ },
+ {
+ "name": "InheritanceNull",
+ "inherits": "Null"
+ },
+ {
+ "name": "InheritanceNullFalse",
+ "inherits": [
+ "Null",
+ "SimpleFalse"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target-result.txt b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target-result.txt
+++ b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-result.txt
diff --git a/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt
new file mode 100644
index 0000000..36123bd
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField: File version must be 3 or higher for installDir preset support.$
diff --git a/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField.json.in b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField.json.in
new file mode 100644
index 0000000..2e5f7d5
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "FuturePresetInstallDirField",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "installDir": "${sourceDir}/install"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command-result.txt b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command-result.txt
+++ b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-result.txt
diff --git a/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt
new file mode 100644
index 0000000..9382423
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/FuturePresetToolchainField: File version must be 3 or higher for toolchainFile preset support.$
diff --git a/Tests/RunCMake/CMakePresets/FuturePresetToolchainField.json.in b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField.json.in
new file mode 100644
index 0000000..646ee0f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "FuturePresetToolchainField",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "toolchainFile": "${sourceDir}/toolchain.cmake"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodInstall.json.in b/Tests/RunCMake/CMakePresets/GoodInstall.json.in
new file mode 100644
index 0000000..6287c65
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInstall.json.in
@@ -0,0 +1,30 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "GoodInstallDefault",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build/${presetName}",
+ "installDir": "${sourceDir}/build/install_dir1"
+ },
+ {
+ "name": "GoodInstallInherit",
+ "inherits": "GoodInstallDefault",
+ "cacheVariables": {
+ "CMAKE_INSTALL_PREFIX": {
+ "type": "PATH",
+ "value": "${sourceDir}/build/bad_path"
+ }
+ }
+ },
+ {
+ "name": "GoodInstallOverride",
+ "inherits": "GoodInstallInherit",
+ "installDir": "${sourceDir}/build/install_dir2"
+ },
+ {
+ "name": "GoodInstallCommandLine",
+ "inherits": "GoodInstallOverride"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodInstallCommandLine.cmake b/Tests/RunCMake/CMakePresets/GoodInstallCommandLine.cmake
new file mode 100644
index 0000000..a4f6178
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInstallCommandLine.cmake
@@ -0,0 +1,3 @@
+include("${RunCMake_SOURCE_DIR}/TestVariable.cmake")
+
+test_variable("CMAKE_INSTALL_PREFIX" "PATH" "${RunCMake_SOURCE_DIR}/path/passed/on/command_line")
diff --git a/Tests/RunCMake/CMakePresets/GoodInstallDefault.cmake b/Tests/RunCMake/CMakePresets/GoodInstallDefault.cmake
new file mode 100644
index 0000000..656fda0
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInstallDefault.cmake
@@ -0,0 +1,3 @@
+include("${RunCMake_SOURCE_DIR}/TestVariable.cmake")
+
+test_variable("CMAKE_INSTALL_PREFIX" "PATH" "${CMAKE_SOURCE_DIR}/build/install_dir1")
diff --git a/Tests/RunCMake/CMakePresets/GoodInstallInherit.cmake b/Tests/RunCMake/CMakePresets/GoodInstallInherit.cmake
new file mode 100644
index 0000000..656fda0
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInstallInherit.cmake
@@ -0,0 +1,3 @@
+include("${RunCMake_SOURCE_DIR}/TestVariable.cmake")
+
+test_variable("CMAKE_INSTALL_PREFIX" "PATH" "${CMAKE_SOURCE_DIR}/build/install_dir1")
diff --git a/Tests/RunCMake/CMakePresets/GoodInstallOverride.cmake b/Tests/RunCMake/CMakePresets/GoodInstallOverride.cmake
new file mode 100644
index 0000000..3d12b07
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInstallOverride.cmake
@@ -0,0 +1,3 @@
+include("${RunCMake_SOURCE_DIR}/TestVariable.cmake")
+
+test_variable("CMAKE_INSTALL_PREFIX" "PATH" "${CMAKE_SOURCE_DIR}/build/install_dir2")
diff --git a/Tests/RunCMake/CMakePresets/GoodToolchain.json.in b/Tests/RunCMake/CMakePresets/GoodToolchain.json.in
new file mode 100644
index 0000000..69dafcf
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodToolchain.json.in
@@ -0,0 +1,30 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "GoodToolchainDefault",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build/${presetName}",
+ "toolchainFile": "${sourceDir}/toolchain.cmake"
+ },
+ {
+ "name": "GoodToolchainInherit",
+ "inherits": "GoodToolchainDefault",
+ "cacheVariables": {
+ "CMAKE_TOOLCHAIN_FILE": {
+ "type": "FILEPATH",
+ "value": "${sourceDir}/toolchain_bad.cmake"
+ }
+ }
+ },
+ {
+ "name": "GoodToolchainOverride",
+ "inherits": "GoodToolchainInherit",
+ "toolchainFile": "override_toolchain.cmake"
+ },
+ {
+ "name": "GoodToolchainCommandLine",
+ "inherits": "GoodToolchainOverride"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodToolchainCommandLine.cmake b/Tests/RunCMake/CMakePresets/GoodToolchainCommandLine.cmake
new file mode 100644
index 0000000..c37421c
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodToolchainCommandLine.cmake
@@ -0,0 +1,3 @@
+include("${RunCMake_SOURCE_DIR}/TestVariable.cmake")
+
+test_variable("CMAKE_TOOLCHAIN_FILE" "FILEPATH" "${CMAKE_SOURCE_DIR}/cmd_line_toolchain.cmake")
diff --git a/Tests/RunCMake/CMakePresets/GoodToolchainDefault.cmake b/Tests/RunCMake/CMakePresets/GoodToolchainDefault.cmake
new file mode 100644
index 0000000..53c938b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodToolchainDefault.cmake
@@ -0,0 +1,3 @@
+include("${RunCMake_SOURCE_DIR}/TestVariable.cmake")
+
+test_variable("CMAKE_TOOLCHAIN_FILE" "FILEPATH" "${CMAKE_SOURCE_DIR}/toolchain.cmake")
diff --git a/Tests/RunCMake/CMakePresets/GoodToolchainInherit.cmake b/Tests/RunCMake/CMakePresets/GoodToolchainInherit.cmake
new file mode 100644
index 0000000..53c938b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodToolchainInherit.cmake
@@ -0,0 +1,3 @@
+include("${RunCMake_SOURCE_DIR}/TestVariable.cmake")
+
+test_variable("CMAKE_TOOLCHAIN_FILE" "FILEPATH" "${CMAKE_SOURCE_DIR}/toolchain.cmake")
diff --git a/Tests/RunCMake/CMakePresets/GoodToolchainOverride.cmake b/Tests/RunCMake/CMakePresets/GoodToolchainOverride.cmake
new file mode 100644
index 0000000..558134c
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodToolchainOverride.cmake
@@ -0,0 +1,3 @@
+include("${RunCMake_SOURCE_DIR}/TestVariable.cmake")
+
+test_variable("CMAKE_TOOLCHAIN_FILE" "FILEPATH" "${CMAKE_SOURCE_DIR}/override_toolchain.cmake")
diff --git a/Tests/RunCMake/CMakePresets/HostSystemName.cmake b/Tests/RunCMake/CMakePresets/HostSystemName.cmake
new file mode 100644
index 0000000..dc0998a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/HostSystemName.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(TEST_HOST_SYSTEM_NAME "" "${CMAKE_HOST_SYSTEM_NAME}")
diff --git a/Tests/RunCMake/CMakePresets/HostSystemName.json.in b/Tests/RunCMake/CMakePresets/HostSystemName.json.in
new file mode 100644
index 0000000..7fcd8c8
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/HostSystemName.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "HostSystemName",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "TEST_HOST_SYSTEM_NAME": "${hostSystemName}"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4-result.txt b/Tests/RunCMake/CMakePresets/HostSystemNameFuture-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4-result.txt
+++ b/Tests/RunCMake/CMakePresets/HostSystemNameFuture-result.txt
diff --git a/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt b/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt
new file mode 100644
index 0000000..7f4bb9a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/HostSystemNameFuture: Invalid macro expansion$
diff --git a/Tests/RunCMake/CMakePresets/HostSystemNameFuture.json.in b/Tests/RunCMake/CMakePresets/HostSystemNameFuture.json.in
new file mode 100644
index 0000000..7a2f0aa
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/HostSystemNameFuture.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 2,
+ "configurePresets": [
+ {
+ "name": "HostSystemNameFuture",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "TEST_HOST_SYSTEM_NAME": "${hostSystemName}"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3-result.txt b/Tests/RunCMake/CMakePresets/InvalidRegex-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3-result.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidRegex-result.txt
diff --git a/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt
new file mode 100644
index 0000000..5b500e4
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidRegex: Invalid macro expansion$
diff --git a/Tests/RunCMake/CMakePresets/InvalidRegex.json.in b/Tests/RunCMake/CMakePresets/InvalidRegex.json.in
new file mode 100644
index 0000000..69114d2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidRegex.json.in
@@ -0,0 +1,15 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "InvalidRegex",
+ "binaryDir": "${sourceDir}/build",
+ "generator": "@RunCMake_GENERATOR@",
+ "condition": {
+ "type": "matches",
+ "string": "a",
+ "regex": "+"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/ListConditions-stdout.txt b/Tests/RunCMake/CMakePresets/ListConditions-stdout.txt
new file mode 100644
index 0000000..91e0017
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListConditions-stdout.txt
@@ -0,0 +1,26 @@
+Available configure presets:
+
+ "SimpleTrue"
+ "Null"
+ "ConstTrue"
+ "EqualsTrue"
+ "EqualsMacroLeft"
+ "EqualsMacroRight"
+ "NotEqualsTrue"
+ "InListTrue"
+ "InListMacroString"
+ "InListMacroList"
+ "InListShortCircuit"
+ "NotInListTrue"
+ "MatchesTrue"
+ "MatchesMacroString"
+ "MatchesMacroRegex"
+ "NotMatchesTrue"
+ "AnyOfTrue1"
+ "AnyOfTrue2"
+ "AnyOfShortCircuit"
+ "AllOfTrue"
+ "AllOfEmpty"
+ "NotFalse"
+ "InheritanceChildTrue"
+ "InheritanceNull"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresets-stdout.txt b/Tests/RunCMake/CMakePresets/ListPresets-stdout.txt
index 60d6adb..97eedae 100644
--- a/Tests/RunCMake/CMakePresets/ListPresets-stdout.txt
+++ b/Tests/RunCMake/CMakePresets/ListPresets-stdout.txt
@@ -1,6 +1,7 @@
^Not searching for unused variables given on the command line\.
Available configure presets:
- "zzzzzz" - Sleepy
- "aaaaaaaa" - Screaming
- "mmmmmm"$
+ "zzzzzz" - Sleepy
+ "aaaaaaaa" - Screaming
+ "mmmmmm"
+ "no-generator"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresets.json.in b/Tests/RunCMake/CMakePresets/ListPresets.json.in
index 2ef3797..160098c 100644
--- a/Tests/RunCMake/CMakePresets/ListPresets.json.in
+++ b/Tests/RunCMake/CMakePresets/ListPresets.json.in
@@ -1,5 +1,5 @@
{
- "version": 1,
+ "version": 3,
"configurePresets": [
{
"name": "zzzzzz",
@@ -19,6 +19,9 @@
"binaryDir": "${sourceDir}/build/mmmmmm"
},
{
+ "name": "no-generator"
+ },
+ {
"name": "invalid-generator",
"generator": "Invalid Generator",
"binaryDir": "${sourceDir}/build/invalid"
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt b/Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt
index 60d6adb..97eedae 100644
--- a/Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt
+++ b/Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt
@@ -1,6 +1,7 @@
^Not searching for unused variables given on the command line\.
Available configure presets:
- "zzzzzz" - Sleepy
- "aaaaaaaa" - Screaming
- "mmmmmm"$
+ "zzzzzz" - Sleepy
+ "aaaaaaaa" - Screaming
+ "mmmmmm"
+ "no-generator"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt b/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt
index 60d6adb..97eedae 100644
--- a/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt
+++ b/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt
@@ -1,6 +1,7 @@
^Not searching for unused variables given on the command line\.
Available configure presets:
- "zzzzzz" - Sleepy
- "aaaaaaaa" - Screaming
- "mmmmmm"$
+ "zzzzzz" - Sleepy
+ "aaaaaaaa" - Screaming
+ "mmmmmm"
+ "no-generator"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt b/Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt
index 60d6adb..97eedae 100644
--- a/Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt
+++ b/Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt
@@ -1,6 +1,7 @@
^Not searching for unused variables given on the command line\.
Available configure presets:
- "zzzzzz" - Sleepy
- "aaaaaaaa" - Screaming
- "mmmmmm"$
+ "zzzzzz" - Sleepy
+ "aaaaaaaa" - Screaming
+ "mmmmmm"
+ "no-generator"$
diff --git a/Tests/RunCMake/CMakePresets/OptionalBinaryDirField.cmake b/Tests/RunCMake/CMakePresets/OptionalBinaryDirField.cmake
new file mode 100644
index 0000000..49e7a25
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/OptionalBinaryDirField.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_BINARY_DIR "" "${CMAKE_SOURCE_DIR}/build")
diff --git a/Tests/RunCMake/CMakePresets/OptionalBinaryDirField.json.in b/Tests/RunCMake/CMakePresets/OptionalBinaryDirField.json.in
new file mode 100644
index 0000000..ee17a22
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/OptionalBinaryDirField.json.in
@@ -0,0 +1,9 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "OptionalBinaryDirField",
+ "generator": "@RunCMake_GENERATOR@"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.cmake b/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.cmake
new file mode 100644
index 0000000..ae8a0de
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent_dir "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${_parent_dir}/OptionalBinaryDirFieldNoS-build")
diff --git a/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.json.in b/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.json.in
new file mode 100644
index 0000000..0e3addd
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.json.in
@@ -0,0 +1,9 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "OptionalBinaryDirFieldNoS",
+ "generator": "@RunCMake_GENERATOR@"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/OptionalGeneratorField.cmake b/Tests/RunCMake/CMakePresets/OptionalGeneratorField.cmake
new file mode 100644
index 0000000..4319e72
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/OptionalGeneratorField.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_GENERATOR "" "${RunCMake_GENERATOR}")
diff --git a/Tests/RunCMake/CMakePresets/OptionalGeneratorField.json.in b/Tests/RunCMake/CMakePresets/OptionalGeneratorField.json.in
new file mode 100644
index 0000000..920d056
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/OptionalGeneratorField.json.in
@@ -0,0 +1,9 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "OptionalGeneratorField",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
index dfc56ee..c31a645 100644
--- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
@@ -11,14 +11,23 @@ set(RunCMake-check-file check.cmake)
include("${RunCMake_SOURCE_DIR}/validate_schema.cmake")
+function(reset_cmake_presets_directory name)
+ set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/${name}")
+ file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_SOURCE_DIR}")
+endfunction()
+
function(run_cmake_presets name)
set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/${name}")
set(_source_arg "${RunCMake_TEST_SOURCE_DIR}")
if(CMakePresets_SOURCE_ARG)
set(_source_arg "${CMakePresets_SOURCE_ARG}")
endif()
- file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_SOURCE_DIR}")
+
+ if(NOT RunCMake_TEST_SOURCE_DIR_NO_CLEAN)
+ file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_SOURCE_DIR}")
+ endif()
configure_file("${RunCMake_SOURCE_DIR}/CMakeLists.txt.in" "${RunCMake_TEST_SOURCE_DIR}/CMakeLists.txt" @ONLY)
if(NOT CMakePresets_FILE)
@@ -94,6 +103,8 @@ run_cmake_presets(InvalidVariableValue)
run_cmake_presets(ExtraRootField)
run_cmake_presets(ExtraPresetField)
run_cmake_presets(ExtraVariableField)
+run_cmake_presets(FuturePresetInstallDirField)
+run_cmake_presets(FuturePresetToolchainField)
run_cmake_presets(InvalidPresetVendor)
set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
run_cmake_presets(DuplicatePresets)
@@ -116,7 +127,10 @@ run_cmake_presets(NoSuchMacro)
run_cmake_presets(EnvCycle)
run_cmake_presets(EmptyEnv)
run_cmake_presets(EmptyPenv)
+run_cmake_presets(InvalidRegex)
set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+run_cmake_presets(ConditionFuture)
+run_cmake_presets(SubConditionNull)
# Test cmakeMinimumRequired field
run_cmake_presets(MinimumRequiredInvalid)
@@ -181,6 +195,35 @@ run_cmake_presets(GoodInheritanceMulti)
run_cmake_presets(GoodInheritanceMultiSecond)
run_cmake_presets(GoodInheritanceMacro)
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/GoodInstall.json.in")
+run_cmake_presets(GoodInstallDefault)
+run_cmake_presets(GoodInstallInherit)
+run_cmake_presets(GoodInstallOverride)
+run_cmake_presets(GoodInstallCommandLine "--install-prefix=${RunCMake_SOURCE_DIR}/path/passed/on/command_line")
+
+set(RunCMake_TEST_SOURCE_DIR_NO_CLEAN 1)
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/GoodToolchain.json.in")
+
+reset_cmake_presets_directory(GoodToolchainInherit)
+file(WRITE "${RunCMake_BINARY_DIR}/GoodToolchainDefault/toolchain.cmake" "")
+run_cmake_presets(GoodToolchainDefault)
+
+reset_cmake_presets_directory(GoodToolchainInherit)
+file(WRITE "${RunCMake_BINARY_DIR}/GoodToolchainInherit/toolchain.cmake" "")
+run_cmake_presets(GoodToolchainInherit)
+
+reset_cmake_presets_directory(GoodToolchainOverride)
+file(WRITE "${RunCMake_BINARY_DIR}/GoodToolchainOverride/override_toolchain.cmake" "")
+run_cmake_presets(GoodToolchainOverride)
+
+reset_cmake_presets_directory(GoodToolchainCommandLine)
+file(WRITE "${RunCMake_BINARY_DIR}/GoodToolchainCommandLine/cmd_line_toolchain.cmake" "")
+run_cmake_presets(GoodToolchainCommandLine "--toolchain=${RunCMake_BINARY_DIR}/GoodToolchainCommandLine/cmd_line_toolchain.cmake")
+
+unset(RunCMake_TEST_SOURCE_DIR_NO_CLEAN)
+
+
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/CMakePresets.json.in")
# Test bad preset arguments
run_cmake_presets(VendorMacro)
run_cmake_presets(InvalidGenerator)
@@ -217,6 +260,7 @@ unset(CMakePresets_FILE)
run_cmake_presets(GoodUserOnly)
run_cmake_presets(GoodUserFromMain)
run_cmake_presets(GoodUserFromUser)
+run_cmake_presets(V2InheritV3Optional)
# Test CMakeUserPresets.json errors
run_cmake_presets(UserDuplicateInUser)
@@ -253,9 +297,34 @@ set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/Debug.json.in")
run_cmake_presets(NoDebug)
run_cmake_presets(Debug)
+# Test ${hostSystemName} macro
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/HostSystemName.json.in")
+run_cmake_presets(HostSystemName)
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/HostSystemNameFuture.json.in")
+run_cmake_presets(HostSystemNameFuture)
+
+# Test conditions
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/Conditions.json.in")
+run_cmake_presets(ListConditions --list-presets)
+run_cmake_presets(SimpleTrue)
+run_cmake_presets(SimpleFalse)
+unset(CMakePresets_FILE)
+
+# Test optional generator and buildDir fields
+run_cmake_presets(OptionalBinaryDirField -B "${RunCMake_BINARY_DIR}/OptionalBinaryDirField/build")
+run_cmake_presets(OptionalGeneratorField -G "${RunCMake_GENERATOR}")
+set(CMakePresets_NO_S_ARG TRUE)
+set(CMakePresets_SOURCE_ARG "../OptionalBinaryDirFieldNoS")
+run_cmake_presets(OptionalBinaryDirFieldNoS)
+unset(CMakePresets_SOURCE_ARG)
+unset(CMakePresets_NO_S_ARG)
+
# Test the example from the documentation
file(READ "${RunCMake_SOURCE_DIR}/../../../Help/manual/presets/example.json" _example)
string(REPLACE "\"generator\": \"Ninja\"" "\"generator\": \"@RunCMake_GENERATOR@\"" _example "${_example}")
+if(CMAKE_HOST_WIN32)
+ string(REPLACE [["PATH": "$env{HOME}/ninja/bin:$penv{PATH}"]] [["PATH": "$env{HOME}/ninja/bin;$penv{PATH}"]] _example "${_example}")
+endif()
file(WRITE "${RunCMake_BINARY_DIR}/example.json.in" "${_example}")
set(CMakePresets_FILE "${RunCMake_BINARY_DIR}/example.json.in")
run_cmake_presets(DocumentationExample --preset=default)
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2-result.txt b/Tests/RunCMake/CMakePresets/SimpleFalse-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2-result.txt
+++ b/Tests/RunCMake/CMakePresets/SimpleFalse-result.txt
diff --git a/Tests/RunCMake/CMakePresets/SimpleFalse-stderr.txt b/Tests/RunCMake/CMakePresets/SimpleFalse-stderr.txt
new file mode 100644
index 0000000..6a9a7de
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/SimpleFalse-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: Could not use disabled preset "SimpleFalse"$
diff --git a/Tests/RunCMake/TransformDepfile/noexist.tlog.txt b/Tests/RunCMake/CMakePresets/SimpleTrue.cmake
index e69de29..e69de29 100644
--- a/Tests/RunCMake/TransformDepfile/noexist.tlog.txt
+++ b/Tests/RunCMake/CMakePresets/SimpleTrue.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1-result.txt b/Tests/RunCMake/CMakePresets/SubConditionNull-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1-result.txt
+++ b/Tests/RunCMake/CMakePresets/SubConditionNull-result.txt
diff --git a/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt b/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt
new file mode 100644
index 0000000..42b74d6
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/SubConditionNull: Invalid preset condition$
diff --git a/Tests/RunCMake/CMakePresets/SubConditionNull.json.in b/Tests/RunCMake/CMakePresets/SubConditionNull.json.in
new file mode 100644
index 0000000..eed3da6
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/SubConditionNull.json.in
@@ -0,0 +1,14 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "SubConditionNull",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "condition": {
+ "type": "not",
+ "condition": null
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/TransformDepfile/empty.tlog.txt b/Tests/RunCMake/CMakePresets/V2InheritV3Optional.cmake
index e69de29..e69de29 100644
--- a/Tests/RunCMake/TransformDepfile/empty.tlog.txt
+++ b/Tests/RunCMake/CMakePresets/V2InheritV3Optional.cmake
diff --git a/Tests/RunCMake/CMakePresets/V2InheritV3Optional.json.in b/Tests/RunCMake/CMakePresets/V2InheritV3Optional.json.in
new file mode 100644
index 0000000..957b157
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/V2InheritV3Optional.json.in
@@ -0,0 +1,8 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "default"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/V2InheritV3OptionalUser.json.in b/Tests/RunCMake/CMakePresets/V2InheritV3OptionalUser.json.in
new file mode 100644
index 0000000..f18c1b9
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/V2InheritV3OptionalUser.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 2,
+ "configurePresets": [
+ {
+ "name": "V2InheritV3Optional",
+ "inherits": "default",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources-result.txt b/Tests/RunCMake/CMakePresetsBuild/Condition-build-disabled-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources-result.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/Condition-build-disabled-result.txt
diff --git a/Tests/RunCMake/CMakePresetsBuild/Condition-build-disabled-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/Condition-build-disabled-stderr.txt
new file mode 100644
index 0000000..c35f5d7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsBuild/Condition-build-disabled-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Cannot use disabled build preset in [^
+]*/Tests/RunCMake/CMakePresetsBuild/Condition: "disabled"$
diff --git a/Tests/RunCMake/CMakePresetsBuild/Condition.cmake b/Tests/RunCMake/CMakePresetsBuild/Condition.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsBuild/Condition.cmake
diff --git a/Tests/RunCMake/CMakePresetsBuild/Condition.json.in b/Tests/RunCMake/CMakePresetsBuild/Condition.json.in
new file mode 100644
index 0000000..aaee96a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsBuild/Condition.json.in
@@ -0,0 +1,22 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "default",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ],
+ "buildPresets": [
+ {
+ "name": "enabled",
+ "configurePreset": "default",
+ "condition": true
+ },
+ {
+ "name": "disabled",
+ "configurePreset": "default",
+ "condition": false
+ }
+ ]
+}
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install-result.txt b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install-result.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-result.txt
diff --git a/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt
new file mode 100644
index 0000000..f08f4c1
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresetsBuild/ConditionFuture: File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresetsBuild/ConditionFuture.json.in b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture.json.in
new file mode 100644
index 0000000..2f3f7d8
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture.json.in
@@ -0,0 +1,17 @@
+{
+ "version": 2,
+ "configurePresets": [
+ {
+ "name": "default",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ],
+ "buildPresets": [
+ {
+ "name": "conditionFuture",
+ "configurePreset": "default",
+ "condition": true
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresetsBuild/ListPresets-build-x-stdout.txt b/Tests/RunCMake/CMakePresetsBuild/ListPresets-build-x-stdout.txt
index 4d30707..2d362d4 100644
--- a/Tests/RunCMake/CMakePresetsBuild/ListPresets-build-x-stdout.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/ListPresets-build-x-stdout.txt
@@ -1,5 +1,6 @@
-Available build presets:
+^Available build presets:
"build-default" - build-default displayName
"empty"
"display" - display displayName
+ "true"$
diff --git a/Tests/RunCMake/CMakePresetsBuild/ListPresets.json.in b/Tests/RunCMake/CMakePresetsBuild/ListPresets.json.in
index 3f5e02c..26504d3 100644
--- a/Tests/RunCMake/CMakePresetsBuild/ListPresets.json.in
+++ b/Tests/RunCMake/CMakePresetsBuild/ListPresets.json.in
@@ -1,5 +1,5 @@
{
- "version": 2,
+ "version": 3,
"configurePresets": [
{
"name": "default",
@@ -26,6 +26,16 @@
{
"name": "hidden",
"hidden": true
+ },
+ {
+ "name": "true",
+ "inherits": "build-default",
+ "condition": true
+ },
+ {
+ "name": "false",
+ "inherits": "build-default",
+ "condition": false
}
]
}
diff --git a/Tests/RunCMake/CMakePresetsBuild/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresetsBuild/RunCMakeTest.cmake
index a05ad9f..b37c770 100644
--- a/Tests/RunCMake/CMakePresetsBuild/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresetsBuild/RunCMakeTest.cmake
@@ -72,6 +72,7 @@ endif()
run_cmake_build_presets(Good "default;other" "build-other;withEnvironment;noEnvironment;macros;vendorObject;singleTarget")
run_cmake_build_presets(InvalidConfigurePreset "default" "badConfigurePreset")
+run_cmake_build_presets(Condition "default" "enabled;disabled")
set(CMakePresetsBuild_BUILD_ONLY 1)
run_cmake_build_presets(ListPresets "x" "x" "--list-presets")
@@ -80,5 +81,6 @@ run_cmake_build_presets(Invalid "x" "hidden;vendorMacro")
set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
run_cmake_build_presets(PresetsUnsupported "x" "x")
+run_cmake_build_presets(ConditionFuture "x" "conditionFuture")
set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
set(CMakePresetsBuild_BUILD_ONLY 0)
diff --git a/Tests/RunCMake/CMakePresetsTest/Condition.json.in b/Tests/RunCMake/CMakePresetsTest/Condition.json.in
new file mode 100644
index 0000000..0baf176
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/Condition.json.in
@@ -0,0 +1,22 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "default",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ],
+ "testPresets": [
+ {
+ "name": "enabled",
+ "configurePreset": "default",
+ "condition": true
+ },
+ {
+ "name": "disabled",
+ "configurePreset": "default",
+ "condition": false
+ }
+ ]
+}
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate-result.txt b/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate-result.txt
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-result.txt
diff --git a/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt
new file mode 100644
index 0000000..b814bbb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresetsTest/ConditionFuture: File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresetsTest/ConditionFuture.json.in b/Tests/RunCMake/CMakePresetsTest/ConditionFuture.json.in
new file mode 100644
index 0000000..4b9f33f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionFuture.json.in
@@ -0,0 +1,17 @@
+{
+ "version": 2,
+ "configurePresets": [
+ {
+ "name": "default",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ],
+ "testPresets": [
+ {
+ "name": "conditionFuture",
+ "configurePreset": "default",
+ "condition": true
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresetsTest/ConditionListPresets-test-x-stdout.txt b/Tests/RunCMake/CMakePresetsTest/ConditionListPresets-test-x-stdout.txt
new file mode 100644
index 0000000..11918e5
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionListPresets-test-x-stdout.txt
@@ -0,0 +1,3 @@
+^Available test presets:
+
+ "enabled"$
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test-result.txt b/Tests/RunCMake/CMakePresetsTest/ConditionRunTests-test-disabled-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test-result.txt
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionRunTests-test-disabled-result.txt
diff --git a/Tests/RunCMake/CMakePresetsTest/ConditionRunTests-test-disabled-stderr.txt b/Tests/RunCMake/CMakePresetsTest/ConditionRunTests-test-disabled-stderr.txt
new file mode 100644
index 0000000..5db3b77
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionRunTests-test-disabled-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Cannot use disabled test preset in [^
+]*/Tests/RunCMake/CMakePresetsTest/ConditionRunTests: "disabled"$
diff --git a/Tests/RunCMake/CMakePresetsTest/ConditionRunTests.cmake b/Tests/RunCMake/CMakePresetsTest/ConditionRunTests.cmake
new file mode 100644
index 0000000..b29161e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionRunTests.cmake
@@ -0,0 +1,2 @@
+enable_testing()
+add_test(true ${CMAKE_COMMAND} -E true)
diff --git a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
index c93dff3..70d25d4 100644
--- a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
@@ -90,6 +90,12 @@ run_cmake_test_presets(InvalidConfigurePreset "default" "" "badConfigurePreset")
set(CMakePresetsTest_NO_CONFIGURE 1)
set(CMakePresetsTest_FILE "${RunCMake_SOURCE_DIR}/Good.json.in")
run_cmake_test_presets(ListPresets "" "" "x" "--list-presets")
+
+set(CMakePresetsTest_FILE "${RunCMake_SOURCE_DIR}/Condition.json.in")
+run_cmake_test_presets(ConditionListPresets "" "" "x" "--list-presets")
+unset(CMakePresetsTest_NO_CONFIGURE)
+run_cmake_test_presets(ConditionRunTests "default" "" "enabled;disabled")
+set(CMakePresetsTest_NO_CONFIGURE 1)
unset(CMakePresetsTest_FILE)
run_cmake_test_presets(NoConfigurePreset "" "" "noConfigurePreset")
@@ -98,6 +104,7 @@ run_cmake_test_presets(Invalid "" "" "hidden;vendorMacro")
set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
run_cmake_test_presets(PresetsUnsupported "" "" "x")
+run_cmake_test_presets(ConditionFuture "" "" "x")
set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
set(CMakePresetsTest_NO_CONFIGURE 0)
diff --git a/Tests/RunCMake/CPack/RPM/Prerequirements.cmake b/Tests/RunCMake/CPack/RPM/Prerequirements.cmake
index 3416205..e95cd15 100644
--- a/Tests/RunCMake/CPack/RPM/Prerequirements.cmake
+++ b/Tests/RunCMake/CPack/RPM/Prerequirements.cmake
@@ -13,4 +13,11 @@ function(get_test_prerequirements found_var config_file)
"\nset(RPMBUILD_EXECUTABLE \"${RPMBUILD_EXECUTABLE}\")")
set(${found_var} true PARENT_SCOPE)
endif()
+
+ # optional tool for some tests
+ find_program(OBJDUMP_EXECUTABLE objdump)
+ if(OBJDUMP_EXECUTABLE)
+ file(APPEND "${config_file}"
+ "\nset(OBJDUMP_EXECUTABLE \"${OBJDUMP_EXECUTABLE}\")")
+ endif()
endfunction()
diff --git a/Tests/RunCMake/CPack/RPM/default_expected_stderr.txt b/Tests/RunCMake/CPack/RPM/default_expected_stderr.txt
index 6c87ca0..404076b 100644
--- a/Tests/RunCMake/CPack/RPM/default_expected_stderr.txt
+++ b/Tests/RunCMake/CPack/RPM/default_expected_stderr.txt
@@ -1 +1,2 @@
-^(CPackRPM: Will use GENERATED spec file: (/[^/]*)*/Tests/RunCMake/RPM\.[^/]*/CPack/[^-]*(-package-target)?-build((-[^-]*-subtest/)|/)_CPack_Packages/.*/RPM/SPECS/[^\.]*\.spec(\n|$))*$
+^(CPackRPM: Will use GENERATED spec file: (/[^/]*)*/Tests/RunCMake/RPM\.[^/]*/CPack/[^-]*(-package-target)?-build((-[^-]*-subtest/)|/)_CPack_Packages/.*/RPM/SPECS/[^\.]*\.spec(
+|$))*$
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 15bfb60..7997c78 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -7,6 +7,7 @@ include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM.CUSTOM_BINARY_SPEC_FILE" false "MONOLITHIC;COMPONENT")
run_cpack_test(CUSTOM_NAMES "RPM.CUSTOM_NAMES;DEB.CUSTOM_NAMES;TGZ;DragNDrop" true "COMPONENT")
run_cpack_test(DEBUGINFO "RPM.DEBUGINFO;DEB.DEBUGINFO" true "COMPONENT")
+run_cpack_test(DEBUGINFO "DEB.DEBUGINFO" true "MONOLITHIC")
run_cpack_test_subtests(DEFAULT_PERMISSIONS "CMAKE_var_set;CPACK_var_set;both_set;invalid_CMAKE_var;invalid_CPACK_var" "RPM.DEFAULT_PERMISSIONS;DEB.DEFAULT_PERMISSIONS" false "MONOLITHIC;COMPONENT")
run_cpack_test(DEPENDENCIES "RPM.DEPENDENCIES;DEB.DEPENDENCIES" true "COMPONENT")
run_cpack_test(DIST "RPM.DIST" false "MONOLITHIC")
@@ -16,7 +17,7 @@ run_cpack_test(VERSION "RPM.VERSION;DEB.VERSION" false "MONOLITHIC;COMPONENT")
run_cpack_test(EXTRA "DEB.EXTRA" false "COMPONENT")
run_cpack_test_subtests(GENERATE_SHLIBS "soversion_not_zero;soversion_zero" "DEB.GENERATE_SHLIBS" true "COMPONENT")
run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB.GENERATE_SHLIBS_LDCONFIG" true "COMPONENT")
-run_cpack_test(INSTALL_SCRIPTS "RPM.INSTALL_SCRIPTS" false "COMPONENT")
+run_cpack_test_subtests(INSTALL_SCRIPTS "default;single_debug_info;no_scripts;no_scripts_single_debug_info" "RPM.INSTALL_SCRIPTS" false "COMPONENT")
run_cpack_test(LONG_FILENAMES "DEB.LONG_FILENAMES" false "MONOLITHIC")
run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM.MAIN_COMPONENT" false "COMPONENT")
run_cpack_test(MINIMAL "RPM.MINIMAL;DEB.MINIMAL;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ;External" false "MONOLITHIC;COMPONENT")
@@ -37,6 +38,7 @@ unset(ENVIRONMENT)
run_cpack_test(USER_FILELIST "RPM.USER_FILELIST" false "MONOLITHIC")
run_cpack_test(MD5SUMS "DEB.MD5SUMS" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(CPACK_INSTALL_SCRIPTS "singular;plural;both" "ZIP" false "MONOLITHIC")
+run_cpack_test(CPACK_CUSTOM_INSTALL_VARIABLES "ZIP" false "MONOLITHIC")
run_cpack_test(DEB_PACKAGE_VERSION_BACK_COMPATIBILITY "DEB.DEB_PACKAGE_VERSION_BACK_COMPATIBILITY" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(EXTERNAL "none;good;good_multi;bad_major;bad_minor;invalid_good;invalid_bad;stage_and_package" "External" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(
diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake
index 0ab545a..76c1bea 100644
--- a/Tests/RunCMake/CPack/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/VerifyResult.cmake
@@ -29,8 +29,16 @@ file(READ "${bin_dir}/test_output.txt" output)
file(READ "${bin_dir}/test_error.txt" error)
file(READ "${config_file}" config_file_content)
-set(output_error_message
- "\nCPack output: '${output}'\nCPack error: '${error}';\nCPack result: '${PACKAGING_RESULT}';\nconfig file: '${config_file_content}'")
+string(REPLACE "\n" "\n cpack-out> " cpack_out "\n${output}")
+string(REPLACE "\n" "\n cpack-err> " cpack_err "\n${error}")
+string(REPLACE "\n" "\n cpack-res> " cpack_res "\n${PACKAGING_RESULT}")
+string(REPLACE "\n" "\n cpack-cfg> " cpack_cfg "\n${config_file_content}")
+string(CONCAT output_error_message
+ "CPack output:${cpack_out}\n"
+ "CPack error:${cpack_err}\n"
+ "CPack result:${cpack_res}\n"
+ "CPack config file:${cpack_cfg}"
+ )
# generate default expected files data
include("${src_dir}/tests/${RunCMake_TEST_FILE_PREFIX}/ExpectedFiles.cmake")
@@ -74,22 +82,22 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0)
string(REPLACE "\n" "\n actual> " msg_actual "\n${PACKAGE_CONTENT}")
string(REPLACE "\n" "\n expect> " msg_expected "\n${EXPECTED_FILE_CONTENT_${file_no_}}")
message(FATAL_ERROR
- "Unexpected file content for file No. '${file_no_}'!\n"
+ "Unexpected file content for file ${file_no_}!\n"
"The content was:${msg_actual}\n"
"which does not match:${msg_expected}\n"
"${output_error_message}")
endif()
- elseif(foundFilescount_ EQUAL 0)
+ elseif(foundFilesCount_ EQUAL 0)
message(FATAL_ERROR
- "Found no files for file No. '${file_no_}'!"
- " Globbing expression: '${EXPECTED_FILE_${file_no_}}'"
+ "Found no files for file ${file_no_}!\n"
+ "Globbing expression:\n '${EXPECTED_FILE_${file_no_}}'\n"
"${output_error_message}")
else()
message(FATAL_ERROR
- "Found more than one file for file No. '${file_no_}'!"
- " Found files count '${foundFilesCount_}'."
- " Files: '${FOUND_FILE_${file_no_}}'"
- " Globbing expression: '${EXPECTED_FILE_${file_no_}}'"
+ "Found more than one file for file ${file_no_}!\n"
+ "Found files count '${foundFilesCount_}'.\n"
+ "Files:\n '${FOUND_FILE_${file_no_}}'\n"
+ "Globbing expression:\n '${EXPECTED_FILE_${file_no_}}'\n"
"${output_error_message}")
endif()
endforeach()
@@ -105,7 +113,8 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0)
if(NOT foundFilesCount_ EQUAL allFoundFilesCount_)
message(FATAL_ERROR
- "Found more files than expected! Found files: '${allFoundFiles_}'"
+ "Found more files than expected!\n"
+ "Found files:\n '${allFoundFiles_}'\n"
"${output_error_message}")
endif()
@@ -116,8 +125,9 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0)
if(found_ EQUAL -1)
message(FATAL_ERROR
- "Expected files don't match found files! Found files:"
- " '${allFoundFiles_}'"
+ "Expected files don't match found files!\n"
+ "Found files:\n"
+ " '${allFoundFiles_}'\n"
"${output_error_message}")
endif()
endforeach()
@@ -127,7 +137,7 @@ else()
file(GLOB checkMissingFiles_ RELATIVE "${bin_dir}" "${missing_file_glob_}")
if(checkMissingFiles_)
- message(FATAL_ERROR "Unexpected files found: '${checkMissingFiles_}'"
+ message(FATAL_ERROR "Unexpected files found:\n '${checkMissingFiles_}'\n"
"${output_error_message}")
endif()
endforeach()
diff --git a/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/ExpectedFiles.cmake
new file mode 100644
index 0000000..a05513b
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/ExpectedFiles.cmake
@@ -0,0 +1,7 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST
+ "/foo"
+ "/foo/bar.txt"
+ "/foo/baz.txt"
+ "/foo/foo.txt"
+)
diff --git a/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake b/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake
new file mode 100644
index 0000000..4a12f19
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake
@@ -0,0 +1,7 @@
+set(CPACK_CUSTOM_INSTALL_VARIABLES "FOO=foo.txt" "BAR=bar.txt")
+
+install(CODE [[
+ file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/${FOO})
+ file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/${BAR})
+ file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/baz.txt)
+]])
diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake
index cf4aa51..b3e6485 100644
--- a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake
+++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake
@@ -1,8 +1,5 @@
set(whitespaces_ "[\t\n\r ]*")
-set(EXPECTED_FILES_COUNT "6")
-set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE)
-
if(GENERATOR_TYPE STREQUAL "RPM")
set(NAME "Debuginfo")
set(DEBUG_SUFFIX "debuginfo")
@@ -15,30 +12,49 @@ elseif(GENERATOR_TYPE STREQUAL "DEB")
set(DEBUG_PKG "ddeb")
endif()
-set(EXPECTED_FILE_1_NAME "${NAME}")
-set(EXPECTED_FILE_1_COMPONENT "applications")
-set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog")
+set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE)
-set(EXPECTED_FILE_2 "TestDinfo-pkg*-headers.${PKG}")
-set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt")
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+ set(EXPECTED_FILES_COUNT "6")
-set(EXPECTED_FILE_3 "TestDinfo-pkg*-libs.${PKG}")
-set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so")
+ set(EXPECTED_FILE_1_NAME "${NAME}")
+ set(EXPECTED_FILE_1_COMPONENT "applications")
+ set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog")
-set(EXPECTED_FILE_4 "${NAME}-applications-${DEBUG_SUFFIX}*.${DEBUG_PKG}")
-if(GENERATOR_TYPE STREQUAL "RPM")
- set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*\.debug.*")
-elseif(GENERATOR_TYPE STREQUAL "DEB")
- set(EXPECTED_FILE_CONTENT_4 ".*/usr/lib/debug/.build-id/.*\.debug.*")
-endif()
+ set(EXPECTED_FILE_2 "TestDinfo-pkg*-headers.${PKG}")
+ set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt")
-if(GENERATOR_TYPE STREQUAL "RPM")
- set(EXPECTED_FILE_5 "libs-DebugInfoPackage.rpm")
- set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*\.debug.*")
-elseif(GENERATOR_TYPE STREQUAL "DEB")
- set(EXPECTED_FILE_5 "TestDinfo-pkg-libs-dbgsym.ddeb")
- set(EXPECTED_FILE_CONTENT_5 ".*/usr/lib/debug/.build-id/.*\.debug.*")
-endif()
+ set(EXPECTED_FILE_3 "TestDinfo-pkg*-libs.${PKG}")
+ set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so")
+
+ set(EXPECTED_FILE_4 "${NAME}-applications-${DEBUG_SUFFIX}*.${DEBUG_PKG}")
+ if(GENERATOR_TYPE STREQUAL "RPM")
+ set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*\.debug.*")
+ elseif(GENERATOR_TYPE STREQUAL "DEB")
+ set(EXPECTED_FILE_CONTENT_4 ".*/usr/lib/debug/.build-id/.*\.debug.*")
+ endif()
+
+ if(GENERATOR_TYPE STREQUAL "RPM")
+ set(EXPECTED_FILE_5 "libs-DebugInfoPackage.rpm")
+ set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*\.debug.*")
+ elseif(GENERATOR_TYPE STREQUAL "DEB")
+ set(EXPECTED_FILE_5 "TestDinfo-pkg-libs-dbgsym.ddeb")
+ set(EXPECTED_FILE_CONTENT_5 ".*/usr/lib/debug/.build-id/.*\.debug.*")
+ endif()
+
+ set(EXPECTED_FILE_6 "TestDinfo-pkg*-appheaders.${PKG}")
+ set(EXPECTED_FILE_CONTENT_6_LIST "/include;/include/test_lib.hpp")
-set(EXPECTED_FILE_6 "TestDinfo-pkg*-appheaders.${PKG}")
-set(EXPECTED_FILE_CONTENT_6_LIST "/include;/include/test_lib.hpp")
+elseif(PACKAGING_TYPE STREQUAL "MONOLITHIC" AND GENERATOR_TYPE STREQUAL "DEB")
+ set(EXPECTED_FILES_COUNT "2")
+
+ set(EXPECTED_FILE_1 "TestDinfo-pkg.deb")
+ set(
+ EXPECTED_FILE_CONTENT_1_LIST
+ "/bar;/bar/CMakeLists.txt;/bas;/bas/libtest_lib.so;/foo;/foo/test_prog;/include;/include/test_lib.hpp"
+ )
+
+ set(EXPECTED_FILE_2 "TestDinfo-pkg-dbgsym.ddeb")
+ set(EXPECTED_FILE_CONTENT_2 ".*/usr/lib/debug/.build-id/.*\.debug.*")
+
+endif()
diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/RPM-COMPONENT-stderr.txt b/Tests/RunCMake/CPack/tests/DEBUGINFO/RPM-COMPONENT-stderr.txt
new file mode 100644
index 0000000..8f798bb
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/RPM-COMPONENT-stderr.txt
@@ -0,0 +1,17 @@
+^CMake Warning \(dev\) at [^
+]*/Modules/Internal/CPack/CPackRPM.cmake:[0-9]+ \(message\):
+ CPackRPM:Warning: debuginfo package was requested but will not be generated
+ as no source files were found! Component: 'appheaders'.
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/Internal/CPack/CPackRPM.cmake:[0-9]+ \(cpack_rpm_generate_package\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CPackRPM: Will use GENERATED spec file: [^
+]*/Tests/RunCMake/RPM.DEBUGINFO/CPack/DEBUGINFO-build/_CPack_Packages/Linux/RPM/SPECS/Debuginfo-appheaders.spec
+CPackRPM: Will use GENERATED spec file: [^
+]*/Tests/RunCMake/RPM.DEBUGINFO/CPack/DEBUGINFO-build/_CPack_Packages/Linux/RPM/SPECS/Debuginfo-applications.spec
+CPackRPM: Will use GENERATED spec file: [^
+]*/Tests/RunCMake/RPM.DEBUGINFO/CPack/DEBUGINFO-build/_CPack_Packages/Linux/RPM/SPECS/Debuginfo-headers.spec
+CPackRPM: Will use GENERATED spec file: [^
+]*/Tests/RunCMake/RPM.DEBUGINFO/CPack/DEBUGINFO-build/_CPack_Packages/Linux/RPM/SPECS/Debuginfo-libs.spec$
diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
index 9ff1f8a..e9cebbf 100644
--- a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
+++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
@@ -28,6 +28,8 @@ install(TARGETS test_prog DESTINATION foo COMPONENT applications)
install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers)
install(TARGETS test_lib DESTINATION bas COMPONENT libs)
+set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
+
set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT")
set(CPACK_RPM_APPLICATIONS_DEBUGINFO_PACKAGE ON)
set(CPACK_DEBIAN_APPLICATIONS_FILE_NAME "DEB-DEFAULT")
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake
index de38df9..5a87c44 100644
--- a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake
@@ -1,5 +1,10 @@
+if(RunCMake_SUBTEST_SUFFIX MATCHES ".*single_debug_info")
+ set(EXPECTED_FILE_1 "install_scripts-0.1.1-1.*.rpm")
+else()
+ set(EXPECTED_FILE_1_COMPONENT "foo")
+endif()
+
set(EXPECTED_FILES_COUNT "2")
-set(EXPECTED_FILE_1_COMPONENT "foo")
set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt")
set(EXPECTED_FILE_2_COMPONENT "bar")
set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt")
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-COMPONENT-no_scripts_single_debug_info-stderr.txt b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-COMPONENT-no_scripts_single_debug_info-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-COMPONENT-no_scripts_single_debug_info-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-COMPONENT-single_debug_info-stderr.txt b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-COMPONENT-single_debug_info-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-COMPONENT-single_debug_info-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-Prerequirements.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-Prerequirements.cmake
new file mode 100644
index 0000000..90cfe44
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-Prerequirements.cmake
@@ -0,0 +1,11 @@
+function(get_test_prerequirements found_var config_file)
+ if(SUBTEST_SUFFIX MATCHES ".*single_debug_info")
+ include(${config_file})
+
+ if(OBJDUMP_EXECUTABLE)
+ set(${found_var} true PARENT_SCOPE)
+ endif()
+ else()
+ set(${found_var} true PARENT_SCOPE)
+ endif()
+endfunction()
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake
index 1a1e983..0c42d90 100644
--- a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake
@@ -7,23 +7,34 @@ function(checkScripts_ FILE COMPARE_LIST)
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(REPLACE "\n" ";" FILE_SCRIPTS_LIST_ "${FILE_SCRIPTS_}")
+ if(COMPARE_LIST STREQUAL "")
+ if(NOT FILE_SCRIPTS_ STREQUAL "")
+ message(FATAL_ERROR "No scripts were expected in '${FILE}'; file info: '${FILE_SCRIPTS_}'")
+ endif()
+ else()
+ string(REPLACE "\n" ";" FILE_SCRIPTS_LIST_ "${FILE_SCRIPTS_}")
+
+ foreach(COMPARE_REGEX_ IN LISTS COMPARE_LIST)
+ unset(FOUND_)
- foreach(COMPARE_REGEX_ IN LISTS COMPARE_LIST)
- unset(FOUND_)
+ foreach(COMPARE_ IN LISTS FILE_SCRIPTS_LIST_)
+ if(COMPARE_ MATCHES "${COMPARE_REGEX_}")
+ set(FOUND_ true)
+ break()
+ endif()
+ endforeach()
- foreach(COMPARE_ IN LISTS FILE_SCRIPTS_LIST_)
- if(COMPARE_ MATCHES "${COMPARE_REGEX_}")
- set(FOUND_ true)
- break()
+ if(NOT FOUND_)
+ message(FATAL_ERROR "Missing scripts in '${FILE}'; file info: '${FILE_SCRIPTS_}'; missing: '${COMPARE_REGEX_}'")
endif()
endforeach()
-
- if(NOT FOUND_)
- message(FATAL_ERROR "Missing scripts in '${FILE}'; file info: '${FILE_SCRIPTS_}'; missing: '${COMPARE_REGEX_}'")
- endif()
- endforeach()
+ endif()
endfunction()
-checkScripts_("${FOUND_FILE_1}" "echo \"pre install foo\";echo \"post install foo\";echo \"pre uninstall foo\";echo \"post uninstall foo\";echo \"pre trans foo\";echo \"post trans foo\"")
-checkScripts_("${FOUND_FILE_2}" "echo \"pre install\";echo \"post install\";echo \"pre uninstall\";echo \"post uninstall\";echo \"pre trans\";echo \"post trans\"")
+if(RunCMake_SUBTEST_SUFFIX MATCHES "no_scripts.*")
+ checkScripts_("${FOUND_FILE_1}" "")
+ checkScripts_("${FOUND_FILE_2}" "")
+else()
+ checkScripts_("${FOUND_FILE_1}" "echo \"pre install foo\";echo \"post install foo\";echo \"pre uninstall foo\";echo \"post uninstall foo\";echo \"pre trans foo\";echo \"post trans foo\"")
+ checkScripts_("${FOUND_FILE_2}" "echo \"pre install\";echo \"post install\";echo \"pre uninstall\";echo \"post uninstall\";echo \"pre trans\";echo \"post trans\"")
+endif()
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
index c200fa5..ce5db0c 100644
--- a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
@@ -1,60 +1,70 @@
if(GENERATOR_TYPE STREQUAL "RPM")
- set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh")
- set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_install.sh")
- set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall.sh")
- set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall.sh")
- set(CPACK_RPM_PRE_TRANS_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_trans.sh")
- set(CPACK_RPM_POST_TRANS_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_trans.sh")
-
- set(CPACK_RPM_foo_PRE_INSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_install_foo.sh")
- set(CPACK_RPM_foo_POST_INSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_install_foo.sh")
- set(CPACK_RPM_foo_PRE_UNINSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall_foo.sh")
- set(CPACK_RPM_foo_POST_UNINSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall_foo.sh")
- set(CPACK_RPM_foo_PRE_TRANS_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_trans_foo.sh")
- set(CPACK_RPM_foo_POST_TRANS_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_trans_foo.sh")
+ if(RunCMake_SUBTEST_SUFFIX MATCHES ".*single_debug_info")
+ set(CPACK_RPM_MAIN_COMPONENT "foo")
+ set(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE ON)
+ set(CPACK_RPM_FOO_FILE_NAME "RPM-DEFAULT")
+ endif()
endif()
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
-# default
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh"
- "echo \"pre install\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_install.sh"
- "echo \"post install\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall.sh"
- "echo \"pre uninstall\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall.sh"
- "echo \"post uninstall\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_trans.sh"
- "echo \"pre trans\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_trans.sh"
- "echo \"post trans\"\n")
+if(NOT RunCMake_SUBTEST_SUFFIX MATCHES "no_scripts.*")
+ if(GENERATOR_TYPE STREQUAL "RPM")
+ set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh")
+ set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_install.sh")
+ set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall.sh")
+ set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall.sh")
+ set(CPACK_RPM_PRE_TRANS_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_trans.sh")
+ set(CPACK_RPM_POST_TRANS_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_trans.sh")
+
+ set(CPACK_RPM_foo_PRE_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_install_foo.sh")
+ set(CPACK_RPM_foo_POST_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_install_foo.sh")
+ set(CPACK_RPM_foo_PRE_UNINSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall_foo.sh")
+ set(CPACK_RPM_foo_POST_UNINSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall_foo.sh")
+ set(CPACK_RPM_foo_PRE_TRANS_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_trans_foo.sh")
+ set(CPACK_RPM_foo_POST_TRANS_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_trans_foo.sh")
+ endif()
-# specific
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_install_foo.sh"
- "echo \"pre install foo\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_install_foo.sh"
- "echo \"post install foo\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall_foo.sh"
- "echo \"pre uninstall foo\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall_foo.sh"
- "echo \"post uninstall foo\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_trans_foo.sh"
- "echo \"pre trans foo\"\n")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_trans_foo.sh"
- "echo \"post trans foo\"\n")
+ # default
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh"
+ "echo \"pre install\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_install.sh"
+ "echo \"post install\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall.sh"
+ "echo \"pre uninstall\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall.sh"
+ "echo \"post uninstall\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_trans.sh"
+ "echo \"pre trans\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_trans.sh"
+ "echo \"post trans\"\n")
+
+ # specific
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_install_foo.sh"
+ "echo \"pre install foo\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_install_foo.sh"
+ "echo \"post install foo\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall_foo.sh"
+ "echo \"pre uninstall foo\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall_foo.sh"
+ "echo \"post uninstall foo\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_trans_foo.sh"
+ "echo \"pre trans foo\"\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_trans_foo.sh"
+ "echo \"post trans foo\"\n")
+endif()
install(FILES CMakeLists.txt DESTINATION foo COMPONENT foo)
install(FILES CMakeLists.txt DESTINATION bar COMPONENT bar)
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
index d1a3a5f..f859215 100644
--- a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
@@ -1,2 +1,2 @@
set(EXPECTED_FILES_COUNT "1")
-set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt")
+set(EXPECTED_FILE_CONTENT_1_LIST "/bar;/bar/CMakeLists.txt;/baz;/baz/CMakeLists.txt;/foo;/foo/CMakeLists.txt")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
index fbdda9c..13af097 100644
--- a/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
@@ -1,3 +1,4 @@
set(whitespaces_ "[\t\n\r ]*")
-set(md5sums_md5sums "^.* usr/foo/CMakeLists\.txt${whitespaces_}$")
+set(hashsyms_ "[a-f0-9]+")
+set(md5sums_md5sums "^${hashsyms_} usr/bar/CMakeLists\.txt${whitespaces_}${hashsyms_} usr/baz/CMakeLists\.txt${whitespaces_}${hashsyms_} usr/foo/CMakeLists\.txt${whitespaces_}$")
verifyDebControl("${FOUND_FILE_1}" "md5sums" "md5sums")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
index 15c5892..3c922d2 100644
--- a/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
@@ -1,4 +1,6 @@
install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
+install(FILES CMakeLists.txt DESTINATION bar COMPONENT test)
+install(FILES CMakeLists.txt DESTINATION baz COMPONENT test)
if(PACKAGING_TYPE STREQUAL "COMPONENT")
set(CPACK_COMPONENTS_ALL test)
diff --git a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake
index 936e4ed..1dc7084 100644
--- a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake
+++ b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake
@@ -9,7 +9,7 @@ if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" OR RunCMake_SUBTEST_SUFFIX STREQUAL
set(EXPECTED_FILE_2 "single_debuginfo*-headers.rpm")
set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt")
set(EXPECTED_FILE_3 "single_debuginfo*-libs.rpm")
- set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so")
+ set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so;/empty_dir")
set(EXPECTED_FILE_4_COMPONENT "debuginfo")
set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp${whitespaces_}/src/src_1/test_lib.cpp.*\.debug.*")
diff --git a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/test.cmake
index 60e9038..064539e 100644
--- a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/test.cmake
+++ b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/test.cmake
@@ -30,6 +30,9 @@ if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid"
OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo")
install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers)
install(TARGETS test_lib DESTINATION bas COMPONENT libs)
+
+ # test that we correctly handle empty dir in non main component
+ install(DIRECTORY DESTINATION empty_dir COMPONENT libs)
elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component"
OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo")
set(CPACK_COMPONENTS_ALL applications)
diff --git a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake
index 73d7481..42e8384 100644
--- a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake
@@ -18,14 +18,20 @@ execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --define "_topdir ${CMAKE_CURRENT
OUTPUT_QUIET
)
-set(output_error_message_
- "\n${RPMBUILD_EXECUTABLE} error: '${error_}';\nresult: '${result_}';\n${output_error_message}")
+string(REPLACE "\n" "\n rpmbuild-err> " rpmbuild_err "\n${error_}")
+string(REPLACE "\n" "\n rpmbuild-res> " rpmbuild_res "\n${result_}")
+string(CONCAT output_error_message_
+ "${RPMBUILD_EXECUTABLE} error:${rpmbuild_err}\n"
+ "${RPMBUILD_EXECUTABLE} result:${rpmbuild_res}\n"
+ "${output_error_message}"
+ )
# expected file content are test_prog and optional build-id links that are
# generated by rpmbuild (introduced in rpm 4.13.0.1)
set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog(${whitespaces_}.*\.build-id.*)*$")
+set(EXPECTED_FILE_ "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS/*.rpm")
-file(GLOB_RECURSE FOUND_FILE_ RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS" "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS/*.rpm")
+file(GLOB_RECURSE FOUND_FILE_ RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS" "${EXPECTED_FILE_}")
list(APPEND foundFiles_ "${FOUND_FILE_}")
list(LENGTH FOUND_FILE_ foundFilesCount_)
@@ -37,17 +43,27 @@ if(foundFilesCount_ EQUAL 1)
expected_content_list "${PACKAGE_CONTENT}")
if(NOT expected_content_list)
+ string(REPLACE "\n" "\n actual> " msg_actual "\n${PACKAGE_CONTENT}")
+ string(REPLACE "\n" "\n expect> " msg_expected "\n${EXPECTED_FILE_CONTENT_}")
+ string(REPLACE "\r" "\\r" msg_expected "${msg_expected}")
+ string(REPLACE "\t" "\\t" msg_expected "${msg_expected}")
message(FATAL_ERROR
"Unexpected file content!\n"
- " Content: '${PACKAGE_CONTENT}'\n\n"
- " Expected: '${EXPECTED_FILE_CONTENT_}'"
+ "The content was:${msg_actual}\n"
+ "which does not match:${msg_expected}\n"
"${output_error_message_}")
endif()
+elseif(foundFilesCount_ EQUAL 0)
+ message(FATAL_ERROR
+ "Found no files!\n"
+ "Globbing expression:\n '${EXPECTED_FILE_}'\n"
+ "${output_error_message_}")
else()
message(FATAL_ERROR
- "Found more than one file!"
- " Found files count '${foundFilesCount_}'."
- " Files: '${FOUND_FILE_}'"
+ "Found more than one file!\n"
+ "Found files count '${foundFilesCount_}'.\n"
+ "Files:\n '${FOUND_FILE_}'\n"
+ "Globbing expression:\n '${EXPECTED_FILE_}'\n"
"${output_error_message_}")
endif()
@@ -62,6 +78,7 @@ list(LENGTH allFoundFiles_ allFoundFilesCount_)
if(NOT foundFilesCount_ EQUAL allFoundFilesCount_)
message(FATAL_ERROR
- "Found more files than expected! Found files: '${allFoundFiles_}'"
- "${output_error_message_}")
+ "Found more files than expected!\n"
+ "Found files:\n '${allFoundFiles_}'\n"
+ "${output_error_message_}")
endif()
diff --git a/Tests/RunCMake/CPack/tests/SUGGESTS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/SUGGESTS/VerifyResult.cmake
index 61ce752..d1d615b 100644
--- a/Tests/RunCMake/CPack/tests/SUGGESTS/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/SUGGESTS/VerifyResult.cmake
@@ -1,15 +1,13 @@
-execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --querytags
- OUTPUT_VARIABLE RPMBUILD_CAPS
- RESULT_VARIABLE RPMBUILD_CAPS_RESULT)
+# CPack uses `rpm --suggests` to check if rpmbuild supports the "Suggests:" tag.
+# This test intentionally uses a different method (build a test .spec) so any
+# problems will be caught early if functionality should change in the future.
+execute_process(
+ COMMAND ${RPMBUILD_EXECUTABLE} --nobuild test_suggests.spec
+ ERROR_QUIET
+ RESULT_VARIABLE RPMBUILD_SUGGESTS_RESULT)
-if(NOT RPMBUILD_CAPS_RESULT)
- string(REPLACE "\n" ";" RPMBUILD_CAPS "${RPMBUILD_CAPS}")
- cmake_policy(PUSH)
- cmake_policy(SET CMP0057 NEW)
- if(SUGGESTS IN_LIST RPMBUILD_CAPS)
- set(should_contain_suggests_tag_ true)
- endif()
- cmake_policy(POP)
+if(RPMBUILD_SUGGESTS_RESULT EQUAL 0)
+ set(should_contain_suggests_tag_ true)
endif()
# Only verify that suggests tag is present only if that tag is supported.
diff --git a/Tests/RunCMake/CPack/tests/SUGGESTS/test_suggests.spec b/Tests/RunCMake/CPack/tests/SUGGESTS/test_suggests.spec
new file mode 100644
index 0000000..e766fa9
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/SUGGESTS/test_suggests.spec
@@ -0,0 +1,22 @@
+# This spec file is used to check if the provided version of rpmbuild supports the "Suggests:" tag
+
+Name: test
+Version: 0
+Release: 1
+Summary: test
+License: test
+
+Suggests: suggested_package
+
+%description
+
+
+%prep
+
+%build
+%configure
+%install
+%clean
+%files
+%doc
+%changelog
diff --git a/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake b/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
index 6f37201..af39e5f 100644
--- a/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
+++ b/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
@@ -1,6 +1,6 @@
install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
-set(CPACK_THREADS 0)
+set(CPACK_THREADS "-4")
if(PACKAGING_TYPE STREQUAL "COMPONENT")
set(CPACK_COMPONENTS_ALL test)
diff --git a/Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake b/Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake
index 439d95e..5a8b7a0 100644
--- a/Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake
@@ -15,6 +15,7 @@ function(run_cpack_symlink_test)
run_cmake_command(SrcSymlinksCPack
${CMAKE_CPACK_COMMAND} --config CPackSourceConfig.cmake
)
+ run_cmake_script(SrcSymlinksCheck)
endfunction()
run_cpack_symlink_test()
diff --git a/Tests/RunCMake/CPackSymlinks/SrcSymlinksCheck.cmake b/Tests/RunCMake/CPackSymlinks/SrcSymlinksCheck.cmake
new file mode 100644
index 0000000..0041c92
--- /dev/null
+++ b/Tests/RunCMake/CPackSymlinks/SrcSymlinksCheck.cmake
@@ -0,0 +1,21 @@
+set(dir ${CMAKE_CURRENT_SOURCE_DIR})
+
+set(tarball ${dir}/SrcSymlinks-0.1-Source.tar.gz)
+set(extrdir ${dir}/SrcSymlinks-0.1-Source)
+
+message(STATUS "Extracting ${tarball} in ${dir}...")
+execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ${tarball}
+ RESULT_VARIABLE result
+ OUTPUT_VARIABLE output
+ ERROR_VARIABLE output
+ WORKING_DIRECTORY ${dir})
+message(STATUS "result='${result}'")
+message(STATUS "output='${output}'")
+
+if(NOT ${result} EQUAL 0)
+ message(FATAL_ERROR "Cannot unpack source tarball")
+endif()
+
+if(NOT EXISTS ${extrdir}/dirlink/src.h)
+ message(FATAL_ERROR "${extrdir}/dirlink/src.h not found")
+endif()
diff --git a/Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt b/Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt
index 24ad124..8b1ae57 100644
--- a/Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt
+++ b/Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt
@@ -1,7 +1,6 @@
-^x CMakeLists.txt
-x cygwin/
-x cygwin/build.sh
-x cygwin/setup.patch
+^x build.sh
+x CMakeLists.txt
+x dirlink
x include/
x include/src.h
x link.h
diff --git a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar
index a44c656..c24af48 100644
--- a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar
+++ b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar
Binary files differ
diff --git a/Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-stderr.txt
new file mode 100644
index 0000000..e6f9325
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-stderr.txt
@@ -0,0 +1,3 @@
+Cannot find file: [^
+]*/Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-build/DartConfiguration.tcl
+Binary directory is not set. No coverage checking will be performed.$
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index 6cf1476..4b654f8 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -202,7 +202,7 @@ function(run_TestLoad name load)
add_test(TestLoad1 \"${CMAKE_COMMAND}\" -E echo \"test of --test-load\")
add_test(TestLoad2 \"${CMAKE_COMMAND}\" -E echo \"test of --test-load\")
")
- run_cmake_command(${name} ${CMAKE_CTEST_COMMAND} -j2 --test-load ${load})
+ run_cmake_command(${name} ${CMAKE_CTEST_COMMAND} -VV -j2 --test-load ${load})
endfunction()
# Tests for the --test-load feature of ctest
@@ -360,6 +360,10 @@ run_NoTests()
# Check the configuration type variable is passed
run_ctest(check-configuration-type)
+run_cmake_command(EmptyDirCoverage-ctest
+ ${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T Coverage
+ )
+
function(run_MemCheckSan case opts)
# Use a single build tree for a few tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/MemCheckSan${case}-build)
@@ -397,3 +401,22 @@ function(run_testDir)
run_cmake_command(testDir ${CMAKE_CTEST_COMMAND} --test-dir "${RunCMake_TEST_BINARY_DIR}/sub")
endfunction()
run_testDir()
+
+# Test --output-junit
+function(run_output_junit)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/output-junit)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
+add_test(test1 \"${CMAKE_COMMAND}\" -E false)
+add_test(test2 \"${CMAKE_COMMAND}\" -E echo \"hello world\")
+add_test(test3 \"${CMAKE_COMMAND}\" -E true)
+set_tests_properties(test3 PROPERTIES DISABLED \"ON\")
+add_test(test4 \"${CMAKE_COMMAND}/doesnt_exist\")
+add_test(test5 \"${CMAKE_COMMAND}\" -E echo \"please skip\")
+set_tests_properties(test5 PROPERTIES SKIP_REGULAR_EXPRESSION \"please skip\")
+")
+ run_cmake_command(output-junit ${CMAKE_CTEST_COMMAND} --output-junit "${RunCMake_TEST_BINARY_DIR}/junit.xml")
+endfunction()
+run_output_junit()
diff --git a/Tests/RunCMake/CTestCommandLine/output-junit-check.cmake b/Tests/RunCMake/CTestCommandLine/output-junit-check.cmake
new file mode 100644
index 0000000..b270fdf
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/output-junit-check.cmake
@@ -0,0 +1,36 @@
+file(GLOB junit_xml_file "${RunCMake_TEST_BINARY_DIR}/junit.xml")
+if(junit_xml_file)
+ file(READ "${junit_xml_file}" junit_xml LIMIT 4096)
+ if(NOT "${junit_xml}" MATCHES "tests=\"5\"")
+ set(RunCMake_TEST_FAILED "tests=\"5\" not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "failures=\"1\"")
+ set(RunCMake_TEST_FAILED "failures=\"1\" not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "disabled=\"1\"")
+ set(RunCMake_TEST_FAILED "disabled=\"1\" not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "skipped=\"2\"")
+ set(RunCMake_TEST_FAILED "skipped=\"2\" not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "<system-out>hello world")
+ set(RunCMake_TEST_FAILED "<system-out>hello world not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "<system-out>Disabled")
+ set(RunCMake_TEST_FAILED "<system-out>Disabled not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "<skipped message=\"Unable to find executable\"/>")
+ set(RunCMake_TEST_FAILED "<skipped message=\"Unable to find executable\"/> not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "<system-out>Unable to find executable:")
+ set(RunCMake_TEST_FAILED "<system-out>Unable to find executable: not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "<skipped message=\"SKIP_REGULAR_EXPRESSION_MATCHED\"/>")
+ set(RunCMake_TEST_FAILED "<skipped message=\"SKIP_REGULAR_EXPRESSION_MATCHED\"/> not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "<system-out>please skip")
+ set(RunCMake_TEST_FAILED "<system-out>please skip not found when expected")
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "junit.xml not found")
+endif()
diff --git a/Tests/RunCMake/CTestCommandLine/output-junit-result.txt b/Tests/RunCMake/CTestCommandLine/output-junit-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/output-junit-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/CTestCommandLine/output-junit-stderr.txt b/Tests/RunCMake/CTestCommandLine/output-junit-stderr.txt
new file mode 100644
index 0000000..ce30dc8
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/output-junit-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: .*doesnt_exist
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-invalid-stdout.txt b/Tests/RunCMake/CTestCommandLine/test-load-invalid-stdout.txt
index 7ee3dae..5101985 100644
--- a/Tests/RunCMake/CTestCommandLine/test-load-invalid-stdout.txt
+++ b/Tests/RunCMake/CTestCommandLine/test-load-invalid-stdout.txt
@@ -1,7 +1,20 @@
-^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
+Test project [^
+]*/Tests/RunCMake/CTestCommandLine/TestLoad(
+[^*][^
+]*)*
+test 1
Start 1: TestLoad1
++(
+[^*][^
+]*)*
+test 2
Start 2: TestLoad2
-1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
++(
+[^*][^
+]*)*
+1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec(
+[^*][^
+]*)*
2/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 2
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt b/Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt
index 7ee3dae..5101985 100644
--- a/Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt
+++ b/Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt
@@ -1,7 +1,20 @@
-^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
+Test project [^
+]*/Tests/RunCMake/CTestCommandLine/TestLoad(
+[^*][^
+]*)*
+test 1
Start 1: TestLoad1
++(
+[^*][^
+]*)*
+test 2
Start 2: TestLoad2
-1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
++(
+[^*][^
+]*)*
+1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec(
+[^*][^
+]*)*
2/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 2
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt b/Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt
index 11a768a..db7d7f3 100644
--- a/Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt
+++ b/Tests/RunCMake/CTestCommandLine/test-load-wait-stdout.txt
@@ -1,8 +1,21 @@
-^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
+Test project [^
+]*/Tests/RunCMake/CTestCommandLine/TestLoad(
+[^*][^
+]*)*
\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 3, Smallest test TestLoad[1-2] requires 1\*\*\*\*\*
+test 1
Start 1: TestLoad1
++(
+[^*][^
+]*)*
+test 2
Start 2: TestLoad2
-1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
++(
+[^*][^
+]*)*
+1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec(
+[^*][^
+]*)*
2/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 2
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckHIPCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckHIPCompilerFlag.cmake
new file mode 100644
index 0000000..339ce18
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckHIPCompilerFlag.cmake
@@ -0,0 +1,13 @@
+
+enable_language (HIP)
+include(CheckCompilerFlag)
+
+check_compiler_flag(HIP "-_this_is_not_a_flag_" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid HIP compile flag didn't fail.")
+endif()
+
+check_compiler_flag(HIP "-DFOO" SHOULD_WORK)
+if(NOT SHOULD_WORK)
+ message(SEND_ERROR "${CMAKE_HIP_COMPILER_ID} compiler flag '-DFOO' check failed")
+endif()
diff --git a/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake
index 7a4e2ce..7ef1860 100644
--- a/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake
@@ -22,3 +22,7 @@ endif()
if(CMake_TEST_ISPC)
run_cmake(CheckISPCCompilerFlag)
endif()
+
+if(CMake_TEST_HIP)
+ run_cmake(CheckHIPCompilerFlag)
+endif()
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckHIPLinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckHIPLinkerFlag.cmake
new file mode 100644
index 0000000..3bf3b30
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CheckHIPLinkerFlag.cmake
@@ -0,0 +1,3 @@
+
+set (CHECK_LANGUAGE HIP)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckLinkerFlag.cmake")
diff --git a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
index 6ec9148..5e5bff6 100644
--- a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
@@ -16,3 +16,7 @@ endif()
if (CMake_TEST_CUDA)
run_cmake(CheckCUDALinkerFlag)
endif()
+
+if (CMake_TEST_HIP)
+ run_cmake(CheckHIPLinkerFlag)
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckHIPSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckHIPSourceCompiles.cmake
new file mode 100644
index 0000000..911a0d7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckHIPSourceCompiles.cmake
@@ -0,0 +1,27 @@
+
+enable_language (HIP)
+include(CheckSourceCompiles)
+
+check_source_compiles(HIP "I don't build" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid HIP source didn't fail.")
+endif()
+
+check_source_compiles(HIP [=[
+ #include <vector>
+ __device__ int d_func() { }
+ int main() {
+ return 0;
+ }
+]=]
+ SHOULD_BUILD)
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid HIP source.")
+endif()
+
+check_source_compiles(HIP "void l(char const (&x)[2]){}; int main() { l(\"\\n\"); return 0;}"
+ SHOULD_BUILD_COMPLEX)
+
+if(NOT SHOULD_BUILD_COMPLEX)
+ message(SEND_ERROR "Test fail for valid HIP complex source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake
index 6e9088f..530f133 100644
--- a/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake
@@ -23,3 +23,7 @@ endif()
if(CMake_TEST_ISPC)
run_cmake(CheckISPCSourceCompiles)
endif()
+
+if(CMake_TEST_HIP)
+ run_cmake(CheckHIPSourceCompiles)
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckHIPSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckHIPSourceRuns.cmake
new file mode 100644
index 0000000..d9fb8c2
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CheckHIPSourceRuns.cmake
@@ -0,0 +1,21 @@
+
+enable_language (HIP)
+include(CheckSourceRuns)
+
+check_source_runs(HIP "int main() {return 2;}" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "HIP check_source_runs succeeded, but should have failed.")
+endif()
+
+check_source_runs(HIP
+[=[
+ #include <vector>
+ __device__ __host__ void fake_function();
+ __host__ int main() {
+ return 0;
+ }
+]=]
+ SHOULD_RUN)
+if(NOT SHOULD_RUN)
+ message(SEND_ERROR "HIP check_source_runs failed for valid HIP executable.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
index c99ac8b..4784103 100644
--- a/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
@@ -19,3 +19,7 @@ endif()
if (CMake_TEST_CUDA)
run_cmake(CheckCUDASourceRuns)
endif()
+
+if (CMake_TEST_HIP)
+ run_cmake(CheckHIPSourceRuns)
+endif()
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-bad-number-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-bad-number-stderr.txt
index 16f8be8..96de4d1 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-bad-number-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-bad-number-stderr.txt
@@ -1,3 +1,3 @@
^'--parallel' invalid number '12ab' given\.
+
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt
index e7b9aaa..0bb806f 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt
@@ -1,3 +1,3 @@
^The <jobs> value is too large\.
+
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-no-space-bad-number-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-no-space-bad-number-stderr.txt
index 16f8be8..96de4d1 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-no-space-bad-number-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-no-space-bad-number-stderr.txt
@@ -1,3 +1,3 @@
^'--parallel' invalid number '12ab' given\.
+
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt
index d1241f4..b965d4a 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt
@@ -1,3 +1,3 @@
^The <jobs> value requires a positive integer argument\.
+
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-bad-number-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-bad-number-stderr.txt
index d52b165..97e90ec 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-bad-number-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-bad-number-stderr.txt
@@ -1,3 +1,3 @@
^'-j' invalid number '12ab' given\.
+
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt
index e7b9aaa..0bb806f 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt
@@ -1,3 +1,3 @@
^The <jobs> value is too large\.
+
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-space-bad-number-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-space-bad-number-stderr.txt
index d52b165..97e90ec 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-space-bad-number-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-space-bad-number-stderr.txt
@@ -1,3 +1,3 @@
^'-j' invalid number '12ab' given\.
+
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt
index d1241f4..b965d4a 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt
@@ -1,3 +1,3 @@
^The <jobs> value requires a positive integer argument\.
+
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt
index 2dd9bc4..c15fdba 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt
@@ -1,2 +1,2 @@
^Error: Building 'clean' and other targets together is not supported\.
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt
index 2dd9bc4..c15fdba 100644
--- a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt
@@ -1,2 +1,2 @@
^Error: Building 'clean' and other targets together is not supported\.
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-OFF.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-OFF.cmake
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON-stderr.txt
new file mode 100644
index 0000000..202ef80
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning:
+ The "Visual Studio 10 2010" generator is deprecated and will be removed in
+ a future version of CMake.
+
+ Add CMAKE_WARN_VS10=OFF to the cache to disable this warning.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS10-WARN-ON.cmake
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
index c76c92d..3df3e52 100644
--- a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
+++ b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
@@ -1 +1 @@
-^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":2}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"version":{.*}}$
+^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":3}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"version":{.*}}$
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt
index 21e60ee..63a10d8 100644
--- a/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt
@@ -1 +1 @@
-^CMake Error: failed to create link .* no such file or directory
+^CMake Error: failed to create link '[^']+': [A-Za-z]
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake
index 5b97aec..d92554a 100644
--- a/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake
@@ -1,3 +1,3 @@
-if(${actual_stderr_var} MATCHES "operation not permitted")
+if(${actual_stderr_var} MATCHES "A required privilege is not held by the client")
unset(msg)
endif()
diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake b/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake
index 5df5f2f..43573bf 100644
--- a/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake
+++ b/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake
@@ -1,4 +1,4 @@
-if(${actual_stderr_var} MATCHES "operation not permitted")
+if(${actual_stderr_var} MATCHES "A required privilege is not held by the client")
unset(msg)
else()
if(NOT IS_SYMLINK ${RunCMake_TEST_BINARY_DIR}/L)
diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-broken-replace-check.cmake b/Tests/RunCMake/CommandLine/E_create_symlink-broken-replace-check.cmake
index d37df01..639c223 100644
--- a/Tests/RunCMake/CommandLine/E_create_symlink-broken-replace-check.cmake
+++ b/Tests/RunCMake/CommandLine/E_create_symlink-broken-replace-check.cmake
@@ -1,4 +1,4 @@
-if(${actual_stderr_var} MATCHES "operation not permitted")
+if(${actual_stderr_var} MATCHES "A required privilege is not held by the client")
unset(msg)
else()
if(NOT IS_DIRECTORY ${RunCMake_TEST_BINARY_DIR}/L)
diff --git a/Tests/RunCMake/CommandLine/EnvBuildType-stdout.txt b/Tests/RunCMake/CommandLine/EnvBuildType-stdout.txt
new file mode 100644
index 0000000..03b92a7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvBuildType-stdout.txt
@@ -0,0 +1,2 @@
+-- ENV{CMAKE_BUILD_TYPE}='BuildTypeEnv'
+-- CMAKE_BUILD_TYPE='BuildTypeEnv'
diff --git a/Tests/RunCMake/CommandLine/EnvBuildType.cmake b/Tests/RunCMake/CommandLine/EnvBuildType.cmake
new file mode 100644
index 0000000..e5e6d04
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvBuildType.cmake
@@ -0,0 +1,2 @@
+message(STATUS "ENV{CMAKE_BUILD_TYPE}='$ENV{CMAKE_BUILD_TYPE}'")
+message(STATUS "CMAKE_BUILD_TYPE='${CMAKE_BUILD_TYPE}'")
diff --git a/Tests/RunCMake/CommandLine/EnvBuildTypeIgnore-stdout.txt b/Tests/RunCMake/CommandLine/EnvBuildTypeIgnore-stdout.txt
new file mode 100644
index 0000000..4a26732
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvBuildTypeIgnore-stdout.txt
@@ -0,0 +1,2 @@
+-- ENV{CMAKE_BUILD_TYPE}='BuildTypeEnv'
+-- CMAKE_BUILD_TYPE='BuildTypeOpt'
diff --git a/Tests/RunCMake/CommandLine/EnvBuildTypeIgnore.cmake b/Tests/RunCMake/CommandLine/EnvBuildTypeIgnore.cmake
new file mode 100644
index 0000000..f21666f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvBuildTypeIgnore.cmake
@@ -0,0 +1 @@
+include(EnvBuildType.cmake)
diff --git a/Tests/RunCMake/CommandLine/EnvConfigTypes-stdout.txt b/Tests/RunCMake/CommandLine/EnvConfigTypes-stdout.txt
new file mode 100644
index 0000000..bfec18f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvConfigTypes-stdout.txt
@@ -0,0 +1,2 @@
+-- ENV{CMAKE_CONFIGURATION_TYPES}='ConfigTypesEnv'
+-- CMAKE_CONFIGURATION_TYPES='ConfigTypesEnv'
diff --git a/Tests/RunCMake/CommandLine/EnvConfigTypes.cmake b/Tests/RunCMake/CommandLine/EnvConfigTypes.cmake
new file mode 100644
index 0000000..8c9b63a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvConfigTypes.cmake
@@ -0,0 +1,2 @@
+message(STATUS "ENV{CMAKE_CONFIGURATION_TYPES}='$ENV{CMAKE_CONFIGURATION_TYPES}'")
+message(STATUS "CMAKE_CONFIGURATION_TYPES='${CMAKE_CONFIGURATION_TYPES}'")
diff --git a/Tests/RunCMake/CommandLine/EnvConfigTypesIgnore-stdout.txt b/Tests/RunCMake/CommandLine/EnvConfigTypesIgnore-stdout.txt
new file mode 100644
index 0000000..7800a4f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvConfigTypesIgnore-stdout.txt
@@ -0,0 +1,2 @@
+-- ENV{CMAKE_CONFIGURATION_TYPES}='ConfigTypesEnv'
+-- CMAKE_CONFIGURATION_TYPES='ConfigTypesOpt'
diff --git a/Tests/RunCMake/CommandLine/EnvConfigTypesIgnore.cmake b/Tests/RunCMake/CommandLine/EnvConfigTypesIgnore.cmake
new file mode 100644
index 0000000..fcbbaea
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvConfigTypesIgnore.cmake
@@ -0,0 +1 @@
+include(EnvConfigTypes.cmake)
diff --git a/Tests/RunCMake/CommandLine/EnvToolchain-toolchain.cmake b/Tests/RunCMake/CommandLine/EnvToolchain-toolchain.cmake
new file mode 100644
index 0000000..d9fbd58
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchain-toolchain.cmake
@@ -0,0 +1 @@
+set(ENV_TOOLCHAIN 1)
diff --git a/Tests/RunCMake/CommandLine/EnvToolchain.cmake b/Tests/RunCMake/CommandLine/EnvToolchain.cmake
new file mode 100644
index 0000000..230051d
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchain.cmake
@@ -0,0 +1,3 @@
+message(STATUS "ENV{CMAKE_TOOLCHAIN_FILE}='$ENV{CMAKE_TOOLCHAIN_FILE}'")
+message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'")
+message(STATUS "ENV_TOOLCHAIN='${ENV_TOOLCHAIN}'")
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainAbsolute-stdout.txt b/Tests/RunCMake/CommandLine/EnvToolchainAbsolute-stdout.txt
new file mode 100644
index 0000000..ab4bbde
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainAbsolute-stdout.txt
@@ -0,0 +1,5 @@
+-- ENV{CMAKE_TOOLCHAIN_FILE}='[^
+]*/Tests/RunCMake/CommandLine/EnvToolchain-toolchain.cmake'
+-- CMAKE_TOOLCHAIN_FILE='[^
+]*/Tests/RunCMake/CommandLine/EnvToolchain-toolchain.cmake'
+-- ENV_TOOLCHAIN='1'
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainAbsolute.cmake b/Tests/RunCMake/CommandLine/EnvToolchainAbsolute.cmake
new file mode 100644
index 0000000..0f91b5e
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainAbsolute.cmake
@@ -0,0 +1 @@
+include(EnvToolchain.cmake)
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainIgnore-stdout.txt b/Tests/RunCMake/CommandLine/EnvToolchainIgnore-stdout.txt
new file mode 100644
index 0000000..4de9505
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainIgnore-stdout.txt
@@ -0,0 +1,4 @@
+-- ENV{CMAKE_TOOLCHAIN_FILE}='[^
+]*/Tests/RunCMake/CommandLine/EnvToolchain-toolchain.cmake'
+-- CMAKE_TOOLCHAIN_FILE=''
+-- ENV_TOOLCHAIN=''
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainIgnore.cmake b/Tests/RunCMake/CommandLine/EnvToolchainIgnore.cmake
new file mode 100644
index 0000000..0f91b5e
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainIgnore.cmake
@@ -0,0 +1 @@
+include(EnvToolchain.cmake)
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainNone-stdout.txt b/Tests/RunCMake/CommandLine/EnvToolchainNone-stdout.txt
new file mode 100644
index 0000000..cfe655d
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainNone-stdout.txt
@@ -0,0 +1,3 @@
+-- ENV{CMAKE_TOOLCHAIN_FILE}=''
+-- CMAKE_TOOLCHAIN_FILE=''
+-- ENV_TOOLCHAIN=''
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainNone.cmake b/Tests/RunCMake/CommandLine/EnvToolchainNone.cmake
new file mode 100644
index 0000000..0f91b5e
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainNone.cmake
@@ -0,0 +1 @@
+include(EnvToolchain.cmake)
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainNoneExisting-stdout.txt b/Tests/RunCMake/CommandLine/EnvToolchainNoneExisting-stdout.txt
new file mode 100644
index 0000000..4de9505
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainNoneExisting-stdout.txt
@@ -0,0 +1,4 @@
+-- ENV{CMAKE_TOOLCHAIN_FILE}='[^
+]*/Tests/RunCMake/CommandLine/EnvToolchain-toolchain.cmake'
+-- CMAKE_TOOLCHAIN_FILE=''
+-- ENV_TOOLCHAIN=''
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainRelative-stdout.txt b/Tests/RunCMake/CommandLine/EnvToolchainRelative-stdout.txt
new file mode 100644
index 0000000..4bafbba
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainRelative-stdout.txt
@@ -0,0 +1,4 @@
+-- ENV{CMAKE_TOOLCHAIN_FILE}='EnvToolchain-toolchain.cmake'
+-- CMAKE_TOOLCHAIN_FILE='[^
+]*/Tests/RunCMake/CommandLine/EnvToolchainRelative-build/EnvToolchain-toolchain.cmake'
+-- ENV_TOOLCHAIN='1'
diff --git a/Tests/RunCMake/CommandLine/EnvToolchainRelative.cmake b/Tests/RunCMake/CommandLine/EnvToolchainRelative.cmake
new file mode 100644
index 0000000..0f91b5e
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/EnvToolchainRelative.cmake
@@ -0,0 +1 @@
+include(EnvToolchain.cmake)
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index caf3c88..cea5b1b 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -69,6 +69,8 @@ run_cmake_command(build-bad-dir
run_cmake_command(build-bad-generator
${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-generator)
+run_cmake_command(install-prefix-no-arg ${CMAKE_COMMAND} -B DummyBuildDir --install-prefix)
+
run_cmake_command(install-no-dir
${CMAKE_COMMAND} --install)
run_cmake_command(install-bad-dir
@@ -162,6 +164,29 @@ project(ExplicitDirsMissing LANGUAGES NONE)
endfunction()
run_ExplicitDirs()
+function(run_Toolchain)
+ set(RunCMake_TEST_NO_SOURCE_DIR 1)
+ set(source_dir ${RunCMake_SOURCE_DIR}/Toolchain)
+
+ run_cmake_with_options(toolchain-no-arg -S ${source_dir} --toolchain=)
+ run_cmake_with_options(toolchain-valid-abs-path -S ${source_dir} --toolchain "${source_dir}/toolchain.cmake")
+ run_cmake_with_options(toolchain-valid-rel-src-path -S ${source_dir} --toolchain=toolchain.cmake)
+
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(binary_dir ${RunCMake_BINARY_DIR}/Toolchain-build)
+ set(RunCMake_TEST_BINARY_DIR "${binary_dir}")
+ file(REMOVE_RECURSE "${binary_dir}")
+
+ # Test that we both search the binary dir for toolchain files, and it takes
+ # precedence over source dir
+ file(WRITE ${binary_dir}/toolchain.cmake [=[
+set(CMAKE_SYSTEM_NAME Linux)
+set(toolchain_file binary_dir)
+]=])
+ run_cmake_with_options(toolchain-valid-rel-build-path ${CMAKE_COMMAND} -S ${source_dir} -B ${binary_dir} --toolchain toolchain.cmake)
+endfunction()
+run_Toolchain()
+
function(run_BuildDir)
# Use a single build tree for a few tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/BuildDir-build)
@@ -288,7 +313,7 @@ function(run_EnvironmentGenerator)
unset(ENV{CMAKE_GENERATOR_PLATFORM})
endif()
# Instance is available since VS 2017.
- if(RunCMake_GENERATOR MATCHES "Visual Studio (15|16).*")
+ if(RunCMake_GENERATOR MATCHES "Visual Studio 1[567].*")
set(ENV{CMAKE_GENERATOR_INSTANCE} "invalid")
# Envvar shouldn't affect existing build tree
run_cmake_command(Envgen-instance-existing ${CMAKE_COMMAND} -E chdir ..
@@ -319,6 +344,53 @@ if(RunCMake_GENERATOR MATCHES "Unix Makefiles" OR RunCMake_GENERATOR MATCHES "Ni
run_EnvironmentExportCompileCommands()
endif()
+function(run_EnvironmentBuildType)
+ set(ENV{CMAKE_BUILD_TYPE} "BuildTypeEnv")
+ run_cmake(EnvBuildType)
+ run_cmake_with_options(EnvBuildTypeIgnore -DCMAKE_BUILD_TYPE=BuildTypeOpt)
+ unset(ENV{CMAKE_BUILD_TYPE})
+endfunction()
+
+function(run_EnvironmentConfigTypes)
+ set(ENV{CMAKE_CONFIGURATION_TYPES} "ConfigTypesEnv")
+ run_cmake(EnvConfigTypes)
+ run_cmake_with_options(EnvConfigTypesIgnore -DCMAKE_CONFIGURATION_TYPES=ConfigTypesOpt)
+ unset(ENV{CMAKE_CONFIGURATION_TYPES})
+endfunction()
+
+if(RunCMake_GENERATOR MATCHES "Make|^Ninja$")
+ run_EnvironmentBuildType()
+elseif(RunCMake_GENERATOR MATCHES "Ninja Multi-Config|Visual Studio|Xcode")
+ run_EnvironmentConfigTypes()
+endif()
+
+function(run_EnvironmentToolchain)
+ set(ENV{CMAKE_TOOLCHAIN_FILE} "${RunCMake_SOURCE_DIR}/EnvToolchain-toolchain.cmake")
+ run_cmake(EnvToolchainAbsolute)
+ run_cmake_with_options(EnvToolchainIgnore -DCMAKE_TOOLCHAIN_FILE=)
+ unset(ENV{CMAKE_TOOLCHAIN_FILE})
+
+ set(ENV{CMAKE_TOOLCHAIN_FILE} "EnvToolchain-toolchain.cmake")
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/EnvToolchainRelative-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ configure_file("${RunCMake_SOURCE_DIR}/EnvToolchain-toolchain.cmake" "${RunCMake_TEST_BINARY_DIR}/EnvToolchain-toolchain.cmake" COPYONLY)
+ run_cmake(EnvToolchainRelative)
+ unset(ENV{CMAKE_TOOLCHAIN_FILE})
+ unset(RunCMake_TEST_NO_CLEAN)
+
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/EnvToolchainNone-build)
+ run_cmake(EnvToolchainNone)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/CMakeFiles")
+ set(ENV{CMAKE_TOOLCHAIN_FILE} "${RunCMake_SOURCE_DIR}/EnvToolchain-toolchain.cmake")
+ run_cmake_command(EnvToolchainNoneExisting ${CMAKE_COMMAND} .)
+ unset(ENV{CMAKE_TOOLCHAIN_FILE})
+ unset(RunCMake_TEST_NO_CLEAN)
+endfunction()
+run_EnvironmentToolchain()
+
if(RunCMake_GENERATOR STREQUAL "Ninja")
# Use a single build tree for a few tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Build-build)
@@ -346,7 +418,7 @@ run_cmake_command(E_create_symlink-missing-dir
# These tests are special on Windows since it will only fail if the user
# running the test does not have the priveldge to create symlinks. If this
# happens we clear the msg in the -check.cmake and say that the test passes
-set(RunCMake_DEFAULT_stderr "(operation not permitted)?")
+set(RunCMake_DEFAULT_stderr "(A required privilege is not held by the client)?")
set(RunCMake_TEST_BINARY_DIR
${RunCMake_BINARY_DIR}/E_create_symlink-broken-build)
set(RunCMake_TEST_NO_CLEAN 1)
@@ -390,7 +462,7 @@ run_cmake_command(E_create_hardlink-no-directory
#On Windows, if the user does not have sufficient privileges
#don't fail this test
-set(RunCMake_DEFAULT_stderr "(operation not permitted)?")
+set(RunCMake_DEFAULT_stderr "(A required privilege is not held by the client)?")
run_cmake_command(E_create_hardlink-unresolved-symlink-prereq
${CMAKE_COMMAND} -E create_symlink ${dir}/1 ${dir}/1-symlink
)
@@ -549,7 +621,7 @@ file(MAKE_DIRECTORY ${out})
run_cmake_command(E_cat_non_existing_file
${CMAKE_COMMAND} -E cat ${out}/non-existing-file.txt)
-if(UNIX)
+if(UNIX AND NOT MSYS)
# test non readable file only if not root
execute_process(
COMMAND id -u $ENV{USER}
@@ -788,7 +860,7 @@ function(reject_fifo)
run_cmake_command(reject_fifo ${BASH_EXECUTABLE} -c ${BASH_COMMAND_ARGUMENT})
endif()
endfunction()
-if(CMAKE_HOST_UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "CYGWIN")
+if(CMAKE_HOST_UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "CYGWIN" AND NOT CMAKE_SYSTEM_NAME STREQUAL "MSYS")
reject_fifo()
run_cmake_command(closed_stdin sh -c "\"${CMAKE_COMMAND}\" --version <&-")
run_cmake_command(closed_stdout sh -c "\"${CMAKE_COMMAND}\" --version >&-")
@@ -846,3 +918,10 @@ set(ProfilingTestOutput ${RunCMake_TEST_BINARY_DIR}/output.json)
set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${ProfilingTestOutput})
run_cmake(ProfilingTest)
unset(RunCMake_TEST_OPTIONS)
+
+if(RunCMake_GENERATOR MATCHES "^Visual Studio 10 2010")
+ run_cmake_with_options(DeprecateVS10-WARN-ON -DCMAKE_WARN_VS10=ON)
+ unset(ENV{CMAKE_WARN_VS10})
+ run_cmake(DeprecateVS10-WARN-ON)
+ run_cmake_with_options(DeprecateVS10-WARN-OFF -DCMAKE_WARN_VS10=OFF)
+endif()
diff --git a/Tests/RunCMake/CommandLine/Toolchain/CMakeLists.txt b/Tests/RunCMake/CommandLine/Toolchain/CMakeLists.txt
new file mode 100644
index 0000000..80d42b8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Toolchain/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.20)
+project(Toolchain LANGUAGES NONE)
+message(FATAL_ERROR "${toolchain_file}")
diff --git a/Tests/RunCMake/CommandLine/Toolchain/toolchain.cmake b/Tests/RunCMake/CommandLine/Toolchain/toolchain.cmake
new file mode 100644
index 0000000..719556c
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Toolchain/toolchain.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(toolchain_file source_dir)
diff --git a/Tests/RunCMake/CommandLine/build-invalid-target-syntax-stderr.txt b/Tests/RunCMake/CommandLine/build-invalid-target-syntax-stderr.txt
index 5fe2539..fa3adc8 100644
--- a/Tests/RunCMake/CommandLine/build-invalid-target-syntax-stderr.txt
+++ b/Tests/RunCMake/CommandLine/build-invalid-target-syntax-stderr.txt
@@ -1,2 +1 @@
-^CMake Error: '--target=invalid' is invalid syntax for --target
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+^Error: could not load cache
diff --git a/Tests/RunCMake/CommandLine/build-no-dir-stderr.txt b/Tests/RunCMake/CommandLine/build-no-dir-stderr.txt
index 9b4d26b..4811bea 100644
--- a/Tests/RunCMake/CommandLine/build-no-dir-stderr.txt
+++ b/Tests/RunCMake/CommandLine/build-no-dir-stderr.txt
@@ -1 +1 @@
-^Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+^Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/build-unknown-command-long-stderr.txt b/Tests/RunCMake/CommandLine/build-unknown-command-long-stderr.txt
index c8f1a03..559e4b6 100644
--- a/Tests/RunCMake/CommandLine/build-unknown-command-long-stderr.txt
+++ b/Tests/RunCMake/CommandLine/build-unknown-command-long-stderr.txt
@@ -1,2 +1,2 @@
^Unknown argument --invalid-command
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/build-unknown-command-partial-match-stderr.txt b/Tests/RunCMake/CommandLine/build-unknown-command-partial-match-stderr.txt
index d69338a..1f44c4e 100644
--- a/Tests/RunCMake/CommandLine/build-unknown-command-partial-match-stderr.txt
+++ b/Tests/RunCMake/CommandLine/build-unknown-command-partial-match-stderr.txt
@@ -1,2 +1,2 @@
-^CMake Error: '--targetinvalid' is invalid syntax for --target
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+^Unknown argument --targetinvalid
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/CommandLine/build-unknown-command-short-stderr.txt b/Tests/RunCMake/CommandLine/build-unknown-command-short-stderr.txt
index a6cfece..4f5ba55 100644
--- a/Tests/RunCMake/CommandLine/build-unknown-command-short-stderr.txt
+++ b/Tests/RunCMake/CommandLine/build-unknown-command-short-stderr.txt
@@ -1,2 +1,2 @@
^Unknown argument -invalid-command
-Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
+Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library-result.txt b/Tests/RunCMake/CommandLine/install-prefix-no-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library-result.txt
+++ b/Tests/RunCMake/CommandLine/install-prefix-no-arg-result.txt
diff --git a/Tests/RunCMake/CommandLine/install-prefix-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/install-prefix-no-arg-stderr.txt
new file mode 100644
index 0000000..a464c70
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-prefix-no-arg-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: No install directory specified for --install-prefix
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable-result.txt b/Tests/RunCMake/CommandLine/toolchain-no-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable-result.txt
+++ b/Tests/RunCMake/CommandLine/toolchain-no-arg-result.txt
diff --git a/Tests/RunCMake/CommandLine/toolchain-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/toolchain-no-arg-stderr.txt
new file mode 100644
index 0000000..2fec517
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/toolchain-no-arg-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: No file specified for --toolchain
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target-result.txt b/Tests/RunCMake/CommandLine/toolchain-valid-abs-path-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target-result.txt
+++ b/Tests/RunCMake/CommandLine/toolchain-valid-abs-path-result.txt
diff --git a/Tests/RunCMake/CommandLine/toolchain-valid-abs-path-stderr.txt b/Tests/RunCMake/CommandLine/toolchain-valid-abs-path-stderr.txt
new file mode 100644
index 0000000..21d5db6
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/toolchain-valid-abs-path-stderr.txt
@@ -0,0 +1 @@
+^CMake Error.*source_dir
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command-result.txt b/Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command-result.txt
+++ b/Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-result.txt
diff --git a/Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-stderr.txt b/Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-stderr.txt
new file mode 100644
index 0000000..1980051
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-stderr.txt
@@ -0,0 +1 @@
+^CMake Error.*binary_dir
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources-result.txt b/Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources-result.txt
+++ b/Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-result.txt
diff --git a/Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-stderr.txt b/Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-stderr.txt
new file mode 100644
index 0000000..21d5db6
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-stderr.txt
@@ -0,0 +1 @@
+^CMake Error.*source_dir
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt
index 3313e31..3313e31 100644
--- a/Tests/RunCMake/CompilerLauncher/ISPC-env-launch-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt
diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt
index 3313e31..3313e31 100644
--- a/Tests/RunCMake/CompilerLauncher/Fortran-env-launch-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt
diff --git a/Tests/RunCMake/CompilerLauncher/CXX-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt
index 3313e31..3313e31 100644
--- a/Tests/RunCMake/CompilerLauncher/CXX-env-launch-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt
diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt
index 3313e31..3313e31 100644
--- a/Tests/RunCMake/CompilerLauncher/CUDA-env-launch-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-common.cmake b/Tests/RunCMake/CompilerLauncher/HIP-common.cmake
new file mode 100644
index 0000000..53ece78
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/HIP-common.cmake
@@ -0,0 +1,5 @@
+enable_language(HIP)
+enable_language(CXX)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+
+add_executable(main main.hip)
diff --git a/Tests/RunCMake/CompilerLauncher/C-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt
index 3313e31..3313e31 100644
--- a/Tests/RunCMake/CompilerLauncher/C-env-launch-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-env.cmake b/Tests/RunCMake/CompilerLauncher/HIP-env.cmake
new file mode 100644
index 0000000..1bf56ce
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/HIP-env.cmake
@@ -0,0 +1 @@
+include(HIP-common.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-launch-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/HIP-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-launch-env.cmake b/Tests/RunCMake/CompilerLauncher/HIP-launch-env.cmake
new file mode 100644
index 0000000..37985a5
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/HIP-launch-env.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(HIP-env.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-launch.cmake b/Tests/RunCMake/CompilerLauncher/HIP-launch.cmake
new file mode 100644
index 0000000..78fd16b
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/HIP-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(HIP.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/HIP.cmake b/Tests/RunCMake/CompilerLauncher/HIP.cmake
new file mode 100644
index 0000000..9d2577a
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/HIP.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_HIP_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+include(HIP-common.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
index 293d711..84d0479 100644
--- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
@@ -1,7 +1,7 @@
include(RunCMake)
function(run_compiler_launcher lang)
- # Use a single build tree for tests without cleaning.
+ # Preserve build tree so we can reuse it for the ${lang}-Build subtest below
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${lang}-build)
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
@@ -29,6 +29,9 @@ endif()
if(CMake_TEST_Fortran)
list(APPEND langs Fortran)
endif()
+if(CMake_TEST_HIP)
+ list(APPEND langs HIP)
+endif()
if(CMake_TEST_ISPC)
list(APPEND langs ISPC)
endif()
diff --git a/Tests/RunCMake/CompilerLauncher/main.hip b/Tests/RunCMake/CompilerLauncher/main.hip
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/main.hip
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
index 2b4fc89..3876ceb 100644
--- a/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
@@ -13,7 +13,7 @@ function(run_single_config_test label config exclude_from_all_value expectation)
run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config ${config})
endfunction()
-run_single_config_test("explictly not excluded" Debug 0 "should_exist")
+run_single_config_test("explicitly not excluded" Debug 0 "should_exist")
run_single_config_test("excluded" Debug 1 "should_not_exist")
if(RunCMake_GENERATOR MATCHES "^(Xcode|Visual Studio)")
diff --git a/Tests/RunCMake/ExternalProject/MultiCommand.cmake b/Tests/RunCMake/ExternalProject/MultiCommand.cmake
index dbf67eb..0849658 100644
--- a/Tests/RunCMake/ExternalProject/MultiCommand.cmake
+++ b/Tests/RunCMake/ExternalProject/MultiCommand.cmake
@@ -1,6 +1,6 @@
include(ExternalProject)
-# Verify COMMAND keyword is recognised after various *_COMMAND options
+# Verify COMMAND keyword is recognized after various *_COMMAND options
ExternalProject_Add(multiCommand
DOWNLOAD_COMMAND "${CMAKE_COMMAND}" -E echo "download 1"
COMMAND "${CMAKE_COMMAND}" -E echo "download 2"
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-ClientStateful-check.cmake b/Tests/RunCMake/FileAPI/codemodel-v2-ClientStateful-check.cmake
index fb78e87..91cdf7c 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-ClientStateful-check.cmake
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-ClientStateful-check.cmake
@@ -4,6 +4,7 @@ set(expect
query/client-foo/query.json
reply
reply/codemodel-v2-[0-9a-f]+\\.json
+ .*
reply/index-[0-9.T-]+\\.json
.*
)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-ClientStateless-check.cmake b/Tests/RunCMake/FileAPI/codemodel-v2-ClientStateless-check.cmake
index 7c6a35a..9aa9e4a 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-ClientStateless-check.cmake
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-ClientStateless-check.cmake
@@ -4,6 +4,7 @@ set(expect
query/client-foo/codemodel-v2
reply
reply/codemodel-v2-[0-9a-f]+\\.json
+ .*
reply/index-[0-9.T-]+\\.json
.*
)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-SharedStateless-check.cmake b/Tests/RunCMake/FileAPI/codemodel-v2-SharedStateless-check.cmake
index cc2f31b..43d1a0b 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-SharedStateless-check.cmake
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-SharedStateless-check.cmake
@@ -3,6 +3,7 @@ set(expect
query/codemodel-v2
reply
reply/codemodel-v2-[0-9a-f]+\\.json
+ .*
reply/index-[0-9.T-]+\\.json
.*
)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index df2410a..6cf57a3 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -12,7 +12,7 @@ def read_codemodel_json_data(filename):
def check_objects(o, g):
assert is_list(o)
assert len(o) == 1
- check_index_object(o[0], "codemodel", 2, 2, check_object_codemodel(g))
+ check_index_object(o[0], "codemodel", 2, 3, check_object_codemodel(g))
def check_backtrace(t, b, backtrace):
btg = t["backtraceGraph"]
@@ -55,7 +55,7 @@ def check_backtraces(t, actual, expected):
def check_directory(c):
def _check(actual, expected):
assert is_dict(actual)
- expected_keys = ["build", "source", "projectIndex"]
+ expected_keys = ["build", "jsonFile", "source", "projectIndex"]
assert matches(actual["build"], expected["build"])
assert is_int(actual["projectIndex"])
@@ -92,10 +92,111 @@ def check_directory(c):
assert sorted(actual.keys()) == sorted(expected_keys)
+ assert is_string(actual["jsonFile"])
+ filepath = os.path.join(reply_dir, actual["jsonFile"])
+ with open(filepath) as f:
+ d = json.load(f)
+
+ assert is_dict(d)
+ assert sorted(d.keys()) == ["backtraceGraph", "installers", "paths"]
+
+ assert is_string(d["paths"]["source"], actual["source"])
+ assert is_string(d["paths"]["build"], actual["build"])
+
+ check_backtrace_graph(d["backtraceGraph"])
+
+ assert is_list(d["installers"])
+ assert len(d["installers"]) == len(expected["installers"])
+ for a, e in zip(d["installers"], expected["installers"]):
+ assert is_dict(a)
+ expected_keys = ["component", "type"]
+
+ assert is_string(a["component"], e["component"])
+ assert is_string(a["type"], e["type"])
+
+ if e["destination"] is not None:
+ expected_keys.append("destination")
+ assert is_string(a["destination"], e["destination"])
+
+ if e["paths"] is not None:
+ expected_keys.append("paths")
+ assert is_list(a["paths"])
+ assert len(a["paths"]) == len(e["paths"])
+
+ for ap, ep in zip(a["paths"], e["paths"]):
+ if is_string(ep):
+ assert matches(ap, ep)
+ else:
+ assert is_dict(ap)
+ assert sorted(ap.keys()) == ["from", "to"]
+ assert matches(ap["from"], ep["from"])
+ assert matches(ap["to"], ep["to"])
+
+ if e["isExcludeFromAll"] is not None:
+ expected_keys.append("isExcludeFromAll")
+ assert is_bool(a["isExcludeFromAll"], e["isExcludeFromAll"])
+
+ if e["isForAllComponents"] is not None:
+ expected_keys.append("isForAllComponents")
+ assert is_bool(a["isForAllComponents"], e["isForAllComponents"])
+
+ if e["isOptional"] is not None:
+ expected_keys.append("isOptional")
+ assert is_bool(a["isOptional"], e["isOptional"])
+
+ if e["targetId"] is not None:
+ expected_keys.append("targetId")
+ assert matches(a["targetId"], e["targetId"])
+
+ if e["targetIndex"] is not None:
+ expected_keys.append("targetIndex")
+ assert is_int(a["targetIndex"])
+ assert c["targets"][a["targetIndex"]]["name"] == e["targetIndex"]
+
+ if e["targetIsImportLibrary"] is not None:
+ expected_keys.append("targetIsImportLibrary")
+ assert is_bool(a["targetIsImportLibrary"], e["targetIsImportLibrary"])
+
+ if e["targetInstallNamelink"] is not None:
+ expected_keys.append("targetInstallNamelink")
+ assert is_string(a["targetInstallNamelink"], e["targetInstallNamelink"])
+
+ if e["exportName"] is not None:
+ expected_keys.append("exportName")
+ assert is_string(a["exportName"], e["exportName"])
+
+ if e["exportTargets"] is not None:
+ expected_keys.append("exportTargets")
+ assert is_list(a["exportTargets"])
+ assert len(a["exportTargets"]) == len(e["exportTargets"])
+ for at, et in zip(a["exportTargets"], e["exportTargets"]):
+ assert is_dict(at)
+ assert sorted(at.keys()) == ["id", "index"]
+ assert matches(at["id"], et["id"])
+ assert is_int(at["index"])
+ assert c["targets"][at["index"]]["name"] == et["index"]
+
+ if e["scriptFile"] is not None:
+ expected_keys.append("scriptFile")
+ assert is_string(a["scriptFile"], e["scriptFile"])
+
+ if e.get("runtimeDependencySetName", None) is not None:
+ expected_keys.append("runtimeDependencySetName")
+ assert is_string(a["runtimeDependencySetName"], e["runtimeDependencySetName"])
+
+ if e.get("runtimeDependencySetType", None) is not None:
+ expected_keys.append("runtimeDependencySetType")
+ assert is_string(a["runtimeDependencySetType"], e["runtimeDependencySetType"])
+
+ if e["backtrace"] is not None:
+ expected_keys.append("backtrace")
+ check_backtrace(d, a["backtrace"], e["backtrace"])
+
+ assert sorted(a.keys()) == sorted(expected_keys)
+
return _check
-def check_target_backtrace_graph(t):
- btg = t["backtraceGraph"]
+def check_backtrace_graph(btg):
assert is_dict(btg)
assert sorted(btg.keys()) == ["commands", "files", "nodes"]
assert is_list(btg["commands"])
@@ -148,7 +249,7 @@ def check_target(c):
assert is_string(obj["name"], expected["name"])
assert matches(obj["id"], expected["id"])
assert is_string(obj["type"], expected["type"])
- check_target_backtrace_graph(obj)
+ check_backtrace_graph(obj["backtraceGraph"])
assert is_dict(obj["paths"])
assert sorted(obj["paths"].keys()) == ["build", "source"]
@@ -543,6 +644,28 @@ def gen_check_directories(c, g):
for e in expected:
e["targetIds"] = filter_list(lambda t: not matches(t, "^\\^(ALL_BUILD|ZERO_CHECK)"), e["targetIds"])
+ if sys.platform in ("win32", "cygwin", "msys") or "aix" in sys.platform:
+ for e in expected:
+ e["installers"] = list(filter(lambda i: i["targetInstallNamelink"] is None or i["targetInstallNamelink"] == "skip", e["installers"]))
+ for i in e["installers"]:
+ i["targetInstallNamelink"] = None
+
+ if sys.platform not in ("win32", "cygwin", "msys"):
+ for e in expected:
+ e["installers"] = list(filter(lambda i: not i.get("_dllExtra", False), e["installers"]))
+ if "aix" not in sys.platform:
+ for i in e["installers"]:
+ if "pathsNamelink" in i:
+ i["paths"] = i["pathsNamelink"]
+
+ if sys.platform not in ("win32", "darwin") and "linux" not in sys.platform:
+ for e in expected:
+ e["installers"] = list(filter(lambda i: i["type"] != "runtimeDependencySet", e["installers"]))
+
+ if sys.platform != "darwin":
+ for e in expected:
+ e["installers"] = list(filter(lambda i: i.get("runtimeDependencySetType", None) != "framework", e["installers"]))
+
return expected
def check_directories(c, g):
@@ -705,6 +828,13 @@ def gen_check_targets(c, g, inSource):
if sys.platform not in ("win32", "cygwin", "msys"):
for e in expected:
e["artifacts"] = filter_list(lambda a: not a["_dllExtra"], e["artifacts"])
+ if e["install"] is not None:
+ e["install"]["destinations"] = filter_list(lambda d: "_dllExtra" not in d or not d["_dllExtra"], e["install"]["destinations"])
+
+ else:
+ for e in expected:
+ if e["install"] is not None:
+ e["install"]["destinations"] = filter_list(lambda d: "_namelink" not in d or not d["_namelink"], e["install"]["destinations"])
if "aix" not in sys.platform:
for e in expected:
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json
index 9f0c48a..6514910 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json
@@ -11,5 +11,6 @@
],
"projectName": "Alias",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": null
+ "hasInstallRule": null,
+ "installers": []
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json
index afd41f3..c89e4f9 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json
@@ -11,5 +11,6 @@
],
"projectName": "Custom",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": null
+ "hasInstallRule": null,
+ "installers": []
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
index a51b6eb..8052c1a 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
@@ -17,5 +17,165 @@
],
"projectName": "Cxx",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": null
+ "hasInstallRule": true,
+ "installers": [
+ {
+ "component": "Unspecified",
+ "type": "target",
+ "destination": "lib",
+ "paths": [
+ "^cxx/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?cxx_exe(\\.exe)?$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^cxx_exe::@a56b12a3f5c0529fb296$",
+ "targetIndex": "cxx_exe",
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 38,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "runtimeDependencySet",
+ "destination": "lib",
+ "paths": null,
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "runtimeDependencySetType": "library",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 38,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "runtimeDependencySet",
+ "destination": "fw",
+ "paths": null,
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "runtimeDependencySetType": "framework",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 38,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "runtimeDependencySet",
+ "destination": "lib",
+ "paths": null,
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "runtimeDependencySetType": "library",
+ "runtimeDependencySetName": "deps",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 43,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "runtimeDependencySet",
+ "destination": "fw",
+ "paths": null,
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "runtimeDependencySetType": "framework",
+ "runtimeDependencySetName": "deps",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 43,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json
index afbd43a..8509f08 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json
@@ -8,5 +8,6 @@
"targetIds": null,
"projectName": "codemodel-v2",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": null
+ "hasInstallRule": null,
+ "installers": []
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json
index 3737ad5..27184cd 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json
@@ -6,5 +6,6 @@
"targetIds": null,
"projectName": "codemodel-v2",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": null
+ "hasInstallRule": null,
+ "installers": []
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json
index 521e3c7..6d2952d 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json
@@ -10,5 +10,71 @@
],
"projectName": "External",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": null
+ "hasInstallRule": true,
+ "installers": [
+ {
+ "component": "Unspecified",
+ "type": "directory",
+ "destination": "dir3",
+ "paths": [
+ "^.*/Tests/RunCMake/FileAPIExternalSource/\\.$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 15,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "directory",
+ "destination": "dir4",
+ "paths": [
+ "^.*/Tests/RunCMake/FileAPIExternalSource$"
+ ],
+ "isExcludeFromAll": true,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 16,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json
index a41b79b..92b9526 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json
@@ -14,5 +14,67 @@
],
"projectName": "Imported",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": null
+ "hasInstallRule": true,
+ "installers": [
+ {
+ "component": "Unspecified",
+ "type": "importedRuntimeArtifacts",
+ "destination": "lib",
+ "paths": null,
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 32,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "importedRuntimeArtifacts",
+ "destination": "lib2",
+ "paths": null,
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": true,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 35,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json
index b10d496..90664dc 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json
@@ -10,5 +10,6 @@
],
"projectName": "Interface",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": null
+ "hasInstallRule": null,
+ "installers": []
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json
index 1e647ad..44bc725 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json
@@ -13,5 +13,71 @@
],
"projectName": "Object",
"minimumCMakeVersion": "3.13",
- "hasInstallRule": true
+ "hasInstallRule": true,
+ "installers": [
+ {
+ "component": "Unspecified",
+ "type": "target",
+ "destination": "bin",
+ "paths": [
+ "^object/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?c_object_exe(\\.exe)?$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^c_object_exe::@5ed5358f70faf8d8af7a$",
+ "targetIndex": "c_object_exe",
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "target",
+ "destination": "bin",
+ "paths": [
+ "^object/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?cxx_object_exe(\\.exe)?$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
+ "targetIndex": "cxx_object_exe",
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
index 736d1f5..99287fb 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
@@ -25,5 +25,603 @@
],
"projectName": "codemodel-v2",
"minimumCMakeVersion": "3.12",
- "hasInstallRule": true
+ "hasInstallRule": true,
+ "installers": [
+ {
+ "component": "Tools",
+ "type": "target",
+ "destination": "bin",
+ "paths": [
+ "^cxx/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?cxx_exe(\\.exe)?$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^cxx_exe::@a56b12a3f5c0529fb296$",
+ "targetIndex": "cxx_exe",
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 38,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "target",
+ "destination": "lib",
+ "paths": [
+ "^((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_shared_lib\\.(lib|dll\\.a)$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^c_shared_lib::@6890427a1f51a3e7e1df$",
+ "targetIndex": "c_shared_lib",
+ "targetIsImportLibrary": true,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "_dllExtra": true,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 41,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "target",
+ "destination": "lib",
+ "paths": [
+ "^lib/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib|cyg|msys-)?c_shared_lib(-1)?\\.(dll|so)$"
+ ],
+ "pathsNamelink": [
+ "^lib/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_shared_lib\\.(so\\.1\\.2\\.3|1\\.2\\.3\\.dylib)$",
+ "^lib/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_shared_lib\\.(so\\.1|1\\.dylib)$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^c_shared_lib::@6890427a1f51a3e7e1df$",
+ "targetIndex": "c_shared_lib",
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": "skip",
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 41,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "target",
+ "destination": "lib",
+ "paths": [
+ "^cxx/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?cxx_shared_lib\\.(lib|dll\\.a)$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
+ "targetIndex": "cxx_shared_lib",
+ "targetIsImportLibrary": true,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "_dllExtra": true,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 41,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "target",
+ "destination": "lib",
+ "paths": [
+ "^cxx/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib|cyg|msys-)?cxx_shared_lib\\.(dll|so|dylib)$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
+ "targetIndex": "cxx_shared_lib",
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 41,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "target",
+ "destination": "lib",
+ "paths": [
+ "^lib/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_shared_lib\\.(dll|so|dylib)$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": "^c_shared_lib::@6890427a1f51a3e7e1df$",
+ "targetIndex": "c_shared_lib",
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": "only",
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 46,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "file",
+ "destination": "include",
+ "paths": [
+ {
+ "from": "^empty\\.h$",
+ "to": "^empty-renamed\\.h$"
+ }
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": true,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 48,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "file",
+ "destination": "include",
+ "paths": [
+ "^codemodel-v2\\.cmake$",
+ "^empty\\.h$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 49,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "directory",
+ "destination": "dir1",
+ "paths": [
+ "^\\.$",
+ "^dir$",
+ {
+ "from": "^cxx$",
+ "to": "^\\.$"
+ }
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": true,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 50,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "directory",
+ "destination": "dir2",
+ "paths": [
+ {
+ "from": "^\\.$",
+ "to": "^FileAPI$"
+ },
+ "^dir$",
+ {
+ "from": "^cxx$",
+ "to": "^\\.$"
+ }
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 51,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "export",
+ "destination": "lib/cmake/foo",
+ "paths": [
+ "^CMakeFiles/Export/lib/cmake/foo/FooTargets\\.cmake$"
+ ],
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": "FooTargets",
+ "exportTargets": [
+ {
+ "id": "^cxx_exe::@a56b12a3f5c0529fb296$",
+ "index": "cxx_exe"
+ }
+ ],
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 52,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "script",
+ "destination": null,
+ "paths": null,
+ "isExcludeFromAll": null,
+ "isForAllComponents": null,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": "InstallScript.cmake",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 53,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "component": "Unspecified",
+ "type": "code",
+ "destination": null,
+ "paths": null,
+ "isExcludeFromAll": null,
+ "isForAllComponents": true,
+ "isOptional": null,
+ "targetId": null,
+ "targetIndex": null,
+ "targetIsImportLibrary": null,
+ "targetInstallNamelink": null,
+ "exportName": null,
+ "exportTargets": null,
+ "scriptFile": null,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 54,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
index 176a857..e3a8d0b 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
@@ -90,10 +90,10 @@
}
],
"folder": null,
- "nameOnDisk": "^(lib|cyg)?c_shared_lib\\.(so|dylib|dll)$",
+ "nameOnDisk": "^(lib|cyg|msys-)?c_shared_lib(-1)?\\.(so|dylib|dll)$",
"artifacts": [
{
- "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?c_shared_lib\\.(so|dylib|dll)$",
+ "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg|msys-)?c_shared_lib(-1)?\\.(so|dylib|dll)$",
"_dllExtra": false
},
{
@@ -101,13 +101,106 @@
"_dllExtra": true
},
{
- "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?c_shared_lib\\.pdb$",
+ "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg|msys-)?c_shared_lib(-1)?\\.pdb$",
"_dllExtra": true
}
],
"build": "^\\.$",
"source": "^\\.$",
- "install": null,
+ "install": {
+ "prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
+ "destinations": [
+ {
+ "path": "lib",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 41,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "lib",
+ "_dllExtra": true,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 41,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "lib",
+ "_namelink": true,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 46,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
"link": {
"language": "C",
"lto": true,
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
index c9e652b..385fa62 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
@@ -115,6 +115,23 @@
"prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
"destinations": [
{
+ "path": "lib",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 38,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
"path": "bin",
"backtrace": [
{
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
index 171a4f5..73e8e12 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
@@ -66,10 +66,10 @@
}
],
"folder": null,
- "nameOnDisk": "^(lib|cyg)?cxx_shared_lib\\.(so|dylib|dll)$",
+ "nameOnDisk": "^(lib|cyg|msys-)?cxx_shared_lib\\.(so|dylib|dll)$",
"artifacts": [
{
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?cxx_shared_lib\\.(so|dylib|dll)$",
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg|msys-)?cxx_shared_lib\\.(so|dylib|dll)$",
"_dllExtra": false
},
{
@@ -77,13 +77,106 @@
"_dllExtra": true
},
{
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?cxx_shared_lib\\.pdb$",
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg|msys-)?cxx_shared_lib\\.pdb$",
"_dllExtra": true
}
],
"build": "^cxx$",
"source": "^cxx$",
- "install": null,
+ "install": {
+ "prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
+ "destinations": [
+ {
+ "path": "lib",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 41,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "lib",
+ "_dllExtra": true,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 41,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "lib",
+ "_namelink": true,
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 46,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
"link": {
"language": "CXX",
"lto": null,
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2.cmake b/Tests/RunCMake/FileAPI/codemodel-v2.cmake
index 2405954..da928eb 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2.cmake
+++ b/Tests/RunCMake/FileAPI/codemodel-v2.cmake
@@ -35,4 +35,20 @@ if(_ipo)
file(WRITE "${CMAKE_BINARY_DIR}/ipo_enabled.txt" "")
endif()
-install(TARGETS cxx_exe)
+install(TARGETS cxx_exe COMPONENT Tools EXPORT FooTargets)
+
+set_target_properties(c_shared_lib PROPERTIES VERSION 1.2.3 SOVERSION 1)
+install(TARGETS c_shared_lib cxx_shared_lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION lib
+ LIBRARY DESTINATION lib NAMELINK_SKIP
+ )
+install(TARGETS c_shared_lib cxx_shared_lib LIBRARY NAMELINK_ONLY)
+
+install(FILES empty.h TYPE INCLUDE RENAME empty-renamed.h OPTIONAL)
+install(FILES codemodel-v2.cmake empty.h DESTINATION include)
+install(DIRECTORY . dir cxx/ OPTIONAL DESTINATION dir1)
+install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/dir" "${CMAKE_CURRENT_SOURCE_DIR}/cxx/" DESTINATION dir2)
+install(EXPORT FooTargets DESTINATION lib/cmake/foo)
+install(SCRIPT InstallScript.cmake)
+install(CODE "message(foo)" ALL_COMPONENTS)
diff --git a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
index 76235f5..3ae3b60 100644
--- a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
@@ -16,7 +16,7 @@ target_link_libraries(cxx_static_exe PRIVATE cxx_static_lib)
target_compile_options(cxx_exe PUBLIC TargetCompileOptions)
target_link_options(cxx_exe PUBLIC TargetLinkOptions)
-target_link_directories(cxx_exe PUBLIC "${CMAKE_BINARY_DIR}/TargetLinkDir")
+target_link_directories(cxx_exe PUBLIC "$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/TargetLinkDir>")
target_precompile_headers(cxx_exe PUBLIC ../empty.h)
@@ -30,3 +30,18 @@ if(CMAKE_CXX_STANDARD_DEFAULT AND DEFINED CMAKE_CXX11_STANDARD_COMPILE_OPTION)
target_compile_features(cxx_standard_compile_feature_exe PRIVATE cxx_decltype)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cxx_std_11.txt" "")
endif()
+
+set(_rdeps)
+if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Windows|Darwin)$")
+ set(_rdeps RUNTIME_DEPENDENCIES)
+endif()
+install(TARGETS cxx_exe ${_rdeps}
+ DESTINATION lib
+ FRAMEWORK DESTINATION fw
+ )
+if(_rdeps)
+ install(RUNTIME_DEPENDENCY_SET deps
+ DESTINATION lib
+ FRAMEWORK DESTINATION fw
+ )
+endif()
diff --git a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
index f79d87c..770838b 100644
--- a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
@@ -28,3 +28,10 @@ endif()
add_library(imported_interface_lib INTERFACE IMPORTED)
add_executable(link_imported_interface_exe ../empty.c)
target_link_libraries(link_imported_interface_exe PRIVATE imported_interface_lib)
+
+install(IMPORTED_RUNTIME_ARTIFACTS imported_shared_lib
+ DESTINATION lib
+)
+install(IMPORTED_RUNTIME_ARTIFACTS imported_shared_lib
+ DESTINATION lib2 OPTIONAL
+)
diff --git a/Tests/RunCMake/FileAPIExternalSource/CMakeLists.txt b/Tests/RunCMake/FileAPIExternalSource/CMakeLists.txt
index b3ca660..2865864 100644
--- a/Tests/RunCMake/FileAPIExternalSource/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPIExternalSource/CMakeLists.txt
@@ -11,3 +11,6 @@ set_property(SOURCE empty.c PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY
target_include_directories(generated_exe SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
target_compile_definitions(generated_exe PRIVATE GENERATED_EXE=1 -DTGT_DUMMY)
set_source_files_properties(empty.c PROPERTIES COMPILE_OPTIONS SRC_COMPILE_OPTIONS_DUMMY)
+
+install(DIRECTORY . DESTINATION dir3)
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} EXCLUDE_FROM_ALL DESTINATION dir4)
diff --git a/Tests/RunCMake/File_Generate/CustomFilePermissions.cmake b/Tests/RunCMake/File_Generate/CustomFilePermissions.cmake
index 0000ef9..a5e66dc 100644
--- a/Tests/RunCMake/File_Generate/CustomFilePermissions.cmake
+++ b/Tests/RunCMake/File_Generate/CustomFilePermissions.cmake
@@ -11,5 +11,6 @@ file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/$<LOWER_CASE:$<CONFIG>>/custom
add_custom_target(checkCustomFilePermissions ALL
COMMAND ${CMAKE_COMMAND}
-DgeneratedFile=${CMAKE_CURRENT_BINARY_DIR}/$<LOWER_CASE:$<CONFIG>>/customfilepermissions.txt
+ -DMSYS=${MSYS}
-P "${CMAKE_CURRENT_SOURCE_DIR}/CustomFilePermissionsVerify.cmake"
)
diff --git a/Tests/RunCMake/File_Generate/CustomFilePermissionsVerify.cmake b/Tests/RunCMake/File_Generate/CustomFilePermissionsVerify.cmake
index a87e916..2ef3281 100644
--- a/Tests/RunCMake/File_Generate/CustomFilePermissionsVerify.cmake
+++ b/Tests/RunCMake/File_Generate/CustomFilePermissionsVerify.cmake
@@ -2,7 +2,7 @@ if(NOT EXISTS "${generatedFile}")
message(SEND_ERROR "Missing file:\n ${generatedFile}")
endif()
-if (UNIX)
+if (UNIX AND NOT MSYS)
find_program(STAT_EXECUTABLE NAMES stat)
if(NOT STAT_EXECUTABLE)
return()
diff --git a/Tests/RunCMake/File_Generate/NoSourcePermissionsVerify.cmake b/Tests/RunCMake/File_Generate/NoSourcePermissionsVerify.cmake
index 7981ccc..5e5b16a 100644
--- a/Tests/RunCMake/File_Generate/NoSourcePermissionsVerify.cmake
+++ b/Tests/RunCMake/File_Generate/NoSourcePermissionsVerify.cmake
@@ -2,7 +2,7 @@ if(NOT EXISTS "${generatedFile}")
message(SEND_ERROR "Missing generated file:\n ${generatedFile}")
endif()
-if (UNIX)
+if (UNIX AND NOT MSYS)
find_program(STAT_EXECUTABLE NAMES stat)
if(NOT STAT_EXECUTABLE)
return()
diff --git a/Tests/RunCMake/File_Generate/OutputNameMatchesObjects-stderr.txt b/Tests/RunCMake/File_Generate/OutputNameMatchesObjects-stderr.txt
index 4c2e35f..4d7370c 100644
--- a/Tests/RunCMake/File_Generate/OutputNameMatchesObjects-stderr.txt
+++ b/Tests/RunCMake/File_Generate/OutputNameMatchesObjects-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at OutputNameMatchesObjects.cmake:[0-9]+ \(file\):
\$<TARGET_OBJECTS:foo>
- Objects of target "foo" referenced but is not an allowed library types
- \(EXECUTABLE, STATIC, SHARED, MODULE, OBJECT\).
+ Objects of target "foo" referenced but is not one of the allowed target
+ types \(EXECUTABLE, STATIC, SHARED, MODULE, OBJECT\).
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMP0126_NEW.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMP0126_NEW.cmake
new file mode 100644
index 0000000..a419ab3
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMP0126_NEW.cmake
@@ -0,0 +1,64 @@
+
+cmake_policy(SET CMP0126 NEW)
+
+# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE, FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS
+enable_language(C)
+
+# Prepare environment and variables
+set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
+set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-foo")
+if(WIN32)
+ set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat")
+ set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar;X:\\this\\directory\\should\\not\\exist\\in\\the\\filesystem")
+ set(ENV{PKG_CONFIG_PATH} "C:\\baz")
+else()
+ set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh")
+ set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem")
+ set(ENV{PKG_CONFIG_PATH} "/baz")
+endif()
+
+
+find_package(PkgConfig)
+
+
+if(NOT DEFINED CMAKE_SYSTEM_NAME
+ OR (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
+ AND NOT CMAKE_CROSSCOMPILING))
+ if(EXISTS "/etc/debian_version") # is this a debian system ?
+ if(CMAKE_LIBRARY_ARCHITECTURE MATCHES "^(i386-linux-gnu|x86_64-linux-gnu)$")
+ # Cannot create directories for all the existing architectures...
+ set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
+ else()
+ set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
+ endif()
+ else()
+ # not debian, check the FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS properties
+ get_property(uselibx32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS)
+ get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
+ get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
+ if(uselibx32 AND CMAKE_INTERNAL_PLATFORM_ABI STREQUAL "ELF X32")
+ set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/libx32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/libx32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
+ elseif(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
+ elseif(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
+ else()
+ set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
+ endif()
+ endif()
+else()
+ if(WIN32)
+ set(expected_path "C:\\baz;${CMAKE_CURRENT_SOURCE_DIR}\\pc-foo\\lib\\pkgconfig;${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar\\lib\\pkgconfig")
+ else()
+ set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
+ endif()
+endif()
+
+
+set(FOO_FOUND FALSE)
+
+pkg_check_modules(FOO "${expected_path}")
+
+if(NOT FOO_FOUND)
+ message(FATAL_ERROR "Expected FOO_FOUND == 1.")
+endif()
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_ARGN.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_ARGN.cmake
new file mode 100644
index 0000000..e49ff22
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_ARGN.cmake
@@ -0,0 +1,17 @@
+if(WIN32)
+ set(ENV{PKG_CONFIG} "\"${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat\" --static --print-errors")
+else()
+ set(ENV{PKG_CONFIG} "\"${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh\" --static --print-errors")
+endif()
+
+find_package(PkgConfig REQUIRED)
+
+if(NOT PKG_CONFIG_ARGN STREQUAL "--static;--print-errors")
+ message(SEND_ERROR "PKG_CONFIG_ARGN has wrong value '${PKG_CONFIG_ARGN}'")
+endif()
+
+_pkgconfig_invoke("none" "prefix" "output" "")
+
+if(NOT prefix_output STREQUAL "Received;--static;Received;--print-errors")
+ message(SEND_ERROR "prefix_output has wrong value '${prefix_output}'")
+endif()
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH-stdout.txt b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH-stdout.txt
new file mode 100644
index 0000000..6615d80
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH-stdout.txt
@@ -0,0 +1,3 @@
+-- ZOT_LIBRARIES='zot'
+-- ZOT_LINK_LIBRARIES='[^']*/Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH-build/zot/lib/prefix-zot-suffix'
+-- ZOT_LDFLAGS='-L[^']*/Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH-build/zot/lib;-lzot'
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH.cmake
new file mode 100644
index 0000000..9f654b5
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_LIBRARY_PATH.cmake
@@ -0,0 +1,29 @@
+find_package(PkgConfig REQUIRED)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/zot/lib/pkgconfig/zot.pc" "
+prefix=${CMAKE_CURRENT_BINARY_DIR}/zot
+libdir=\${prefix}/lib
+
+Name: Zot
+Description: Dummy packaget to test LIBRARY_DIR support
+Version: 1.0
+Libs: -L\${libdir} -lzot
+")
+
+# Create a "library" file to find in libdir.
+set(CMAKE_FIND_LIBRARY_PREFIXES "prefix-")
+set(CMAKE_FIND_LIBRARY_SUFFIXES "-suffix")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/zot/lib/prefix-zot-suffix")
+
+# 'pkg-config --libs' drops -L flags in PKG_CONFIG_SYSTEM_LIBRARY_PATH by default.
+set(ENV{PKG_CONFIG_SYSTEM_LIBRARY_PATH} "${CMAKE_CURRENT_BINARY_DIR}/zot/lib")
+
+# 'pkgconf --libs' also drops -L flags in LIBRARY_PATH by default.
+set(ENV{LIBRARY_PATH} "${CMAKE_CURRENT_BINARY_DIR}/zot/lib")
+
+set(ENV{PKG_CONFIG_PATH} "${CMAKE_CURRENT_BINARY_DIR}/zot/lib/pkgconfig")
+pkg_check_modules(ZOT REQUIRED zot)
+
+message(STATUS "ZOT_LIBRARIES='${ZOT_LIBRARIES}'")
+message(STATUS "ZOT_LINK_LIBRARIES='${ZOT_LINK_LIBRARIES}'")
+message(STATUS "ZOT_LDFLAGS='${ZOT_LDFLAGS}'")
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_empty_target.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_empty_target.cmake
new file mode 100644
index 0000000..cb3dd69
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_empty_target.cmake
@@ -0,0 +1,17 @@
+# Prepare environment to reuse empty.pc
+file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-empty/lib/pkgconfig" PC_PATH)
+if(UNIX)
+ string(REPLACE "\\ " " " PC_PATH "${PC_PATH}")
+endif()
+set(ENV{PKG_CONFIG_PATH} "${PC_PATH}")
+
+find_package(PkgConfig REQUIRED)
+pkg_search_module(Empty REQUIRED empty IMPORTED_TARGET)
+
+if(NOT Empty_MODULE_NAME STREQUAL "empty")
+ message(FATAL_ERROR "Wrong value for Empty_MODULE_NAME. Expected: empty, got: ${Empty_MODULE_NAME}")
+endif()
+
+if(NOT TARGET PkgConfig::Empty)
+ message(FATAL_ERROR "PkgConfig::Empty target not created")
+endif()
diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
index 4e6eef6..f36d1eb 100644
--- a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
@@ -7,11 +7,13 @@ set(ENV{CMAKE_FRAMEWORK_PATH} "")
run_cmake(PkgConfigDoesNotExist)
+run_cmake(FindPkgConfig_CMP0126_NEW)
run_cmake(FindPkgConfig_NO_PKGCONFIG_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH)
run_cmake(FindPkgConfig_extract_frameworks)
+run_cmake(FindPkgConfig_GET_MATCHING_ARGN)
if(APPLE)
run_cmake(FindPkgConfig_extract_frameworks_target)
@@ -29,4 +31,9 @@ if (PKG_CONFIG_FOUND)
run_cmake(FindPkgConfig_IMPORTED_TARGET)
run_cmake(FindPkgConfig_VERSION_OPERATORS)
run_cmake(FindPkgConfig_GET_MATCHING_MODULE_NAME)
+ run_cmake(FindPkgConfig_empty_target)
+
+ if(NOT RunCMake_BINARY_DIR MATCHES " ")
+ run_cmake(FindPkgConfig_LIBRARY_PATH)
+ endif()
endif ()
diff --git a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat
index b038370..c91713b 100755
--- a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat
+++ b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat
@@ -1,5 +1,10 @@
@ECHO OFF
+rem variables to get around `--static --version` printing the received
+rem message and then version
+set static=false
+set print_errors=false
+
:LOOP
IF "%1"=="" (
@@ -21,7 +26,19 @@ IF "%1"=="--exists" (
EXIT /B 0
)
)
+IF "%1"=="--static" (
+ set static=true
+)
+IF "%1"=="--print-errors" (
+ set print_errors=true
+)
SHIFT
IF NOT "%~1"=="" GOTO LOOP
+IF "%static%"=="true" ECHO Received --static
+IF "%print_errors%"=="true" ECHO Received --print-errors
+
+IF "%static%"=="true" GOTO :EOF
+IF "%print_errors%"=="true" GOTO :EOF
+
EXIT /B 255
diff --git a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh
index 56bba30..4021bf7 100755
--- a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh
+++ b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh
@@ -4,6 +4,11 @@
# to the --exists argument with the PKG_CONFIG_PATH environment variable
# and returns 1 if they are different.
+# variables to get around `--static --version` printing the received
+# message and then version
+static=false
+print_errors=false
+
while [ $# -gt 0 ]; do
case $1 in
--version)
@@ -17,7 +22,21 @@ while [ $# -gt 0 ]; do
echo "Found: ${PKG_CONFIG_PATH}"
[ "${last}" = "${PKG_CONFIG_PATH}" ] && exit 0 || exit 1
;;
+ --static)
+ static=true
+ ;;
+ --print-errors)
+ print_errors=true
+ ;;
esac
shift
done
+
+$static && echo "Received --static"
+$print_errors && echo "Received --print-errors"
+
+if $static || $print_errors; then
+ exit 0
+fi
+
exit 255
diff --git a/Tests/RunCMake/FindPkgConfig/pc-empty/lib/pkgconfig/empty.pc b/Tests/RunCMake/FindPkgConfig/pc-empty/lib/pkgconfig/empty.pc
new file mode 100644
index 0000000..954c5f8
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/pc-empty/lib/pkgconfig/empty.pc
@@ -0,0 +1,5 @@
+Name: Empty
+Description: Dummy package to test empty target
+Version: 1.0
+Libs:
+Cflags:
diff --git a/Tests/RunCMake/Framework/ImportedFrameworkTest-build-stdout.txt b/Tests/RunCMake/Framework/ImportedFrameworkTest-build-stdout.txt
new file mode 100644
index 0000000..bd75ccd
--- /dev/null
+++ b/Tests/RunCMake/Framework/ImportedFrameworkTest-build-stdout.txt
@@ -0,0 +1 @@
+xxx/no/exist/fw\.framework/Versions/A/fwxxx
diff --git a/Tests/RunCMake/Framework/ImportedFrameworkTest.cmake b/Tests/RunCMake/Framework/ImportedFrameworkTest.cmake
new file mode 100644
index 0000000..42edaea
--- /dev/null
+++ b/Tests/RunCMake/Framework/ImportedFrameworkTest.cmake
@@ -0,0 +1,10 @@
+add_library(fw SHARED IMPORTED)
+set_target_properties(fw PROPERTIES
+ FRAMEWORK TRUE
+ IMPORTED_LOCATION "/no/exist/fw.framework/Versions/A/fw"
+ IMPORTED_SONAME "@rpath/fw.framework/Versions/A/fw"
+ )
+
+add_custom_target(print_fw ALL COMMAND
+ ${CMAKE_COMMAND} -E echo "xxx$<TARGET_SONAME_FILE:fw>xxx"
+ )
diff --git a/Tests/RunCMake/Framework/RunCMakeTest.cmake b/Tests/RunCMake/Framework/RunCMakeTest.cmake
index 6ee61a3..36eaf5c 100644
--- a/Tests/RunCMake/Framework/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Framework/RunCMakeTest.cmake
@@ -81,3 +81,15 @@ function(framework_multi_config_postfix_test)
endfunction()
framework_multi_config_postfix_test()
+
+function(imported_framework_test)
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/ImportedFrameworkTest-build")
+ set(RunCMake_TEST_NO_CLEAN 1)
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ run_cmake(ImportedFrameworkTest)
+ run_cmake_command(ImportedFrameworkTest-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+imported_framework_test()
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-stderr.txt
deleted file mode 100644
index c8f773a..0000000
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-stderr.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-CMake Error at COMPILE_LANGUAGE-add_custom_command.cmake:2 \(add_custom_command\):
- Error evaluating generator expression:
-
- \$<COMPILE_LANGUAGE>
-
- \$<COMPILE_LANGUAGE:...> may only be used to specify include directories,
- compile definitions, compile options, and to evaluate components of the
- file\(GENERATE\) command.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-stderr.txt
deleted file mode 100644
index 7025838..0000000
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-stderr.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-CMake Error at COMPILE_LANGUAGE-add_custom_target.cmake:1 \(add_custom_target\):
- Error evaluating generator expression:
-
- \$<COMPILE_LANGUAGE>
-
- \$<COMPILE_LANGUAGE:...> may only be used to specify include directories,
- compile definitions, compile options, and to evaluate components of the
- file\(GENERATE\) command.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
index 15a5e79..3e6e080 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
@@ -1,11 +1,11 @@
include(RunCMake)
-run_cmake(COMPILE_LANGUAGE-add_custom_target)
-run_cmake(COMPILE_LANGUAGE-add_custom_command)
-run_cmake(COMPILE_LANGUAGE-install)
-run_cmake(COMPILE_LANGUAGE-target_sources)
-run_cmake(COMPILE_LANGUAGE-add_executable)
-run_cmake(COMPILE_LANGUAGE-add_library)
-run_cmake(COMPILE_LANGUAGE-add_test)
-run_cmake(COMPILE_LANGUAGE-unknown-lang)
-run_cmake(COMPILE_LANGUAGE-TARGET_PROPERTY)
+run_cmake(add_custom_target)
+run_cmake(add_custom_command)
+run_cmake(install)
+run_cmake(target_sources)
+run_cmake(add_executable)
+run_cmake(add_library)
+run_cmake(add_test)
+run_cmake(unknown-lang)
+run_cmake(TARGET_PROPERTY)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/TARGET_PROPERTY.cmake
index 293ddda..293ddda 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/TARGET_PROPERTY.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command-stderr.txt
index 2ac9b76..72f0fc8 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANGUAGE-add_library.cmake:1 \(add_library\):
+CMake Error at add_custom_command.cmake:2 \(add_custom_command\):
Error evaluating generator expression:
\$<COMPILE_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command.cmake
index c3f051a..c3f051a 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_command.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target-stderr.txt
index 8e7f881..a8ef8d7 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANGUAGE-target_sources.cmake:2 \(target_sources\):
+CMake Error at add_custom_target.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
\$<COMPILE_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target.cmake
index b826772..b826772 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_custom_target.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable-stderr.txt
index fd8a731..2e7cc3e 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANGUAGE-add_test.cmake:5 \(add_test\):
+CMake Error at add_executable.cmake:1 \(add_executable\):
Error evaluating generator expression:
\$<COMPILE_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable.cmake
index ff965a9..ff965a9 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_executable.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library-stderr.txt
index 8d05e59..ffbac65 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANGUAGE-add_executable.cmake:1 \(add_executable\):
+CMake Error at add_library.cmake:1 \(add_library\):
Error evaluating generator expression:
\$<COMPILE_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library.cmake
index dd1b5a2..dd1b5a2 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_library.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test-stderr.txt
new file mode 100644
index 0000000..2f13655
--- /dev/null
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at add_test.cmake:5 \(add_test\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories,
+ compile definitions, compile options, and to evaluate components of the
+ file\(GENERATE\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test.cmake
index deedf65..deedf65 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/add_test.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install-stderr.txt
index bef7f63..bef7f63 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install-stderr.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install.cmake
index 92c20e3..92c20e3 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/install.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources-stderr.txt
new file mode 100644
index 0000000..f552e95
--- /dev/null
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at target_sources.cmake:2 \(target_sources\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE>
+
+ \$<COMPILE_LANGUAGE:...> may only be used to specify include directories,
+ compile definitions, compile options, and to evaluate components of the
+ file\(GENERATE\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources.cmake
index a4a5abb..a4a5abb 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/target_sources.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-unknown-lang.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/unknown-lang.cmake
index 00dd290..00dd290 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-unknown-lang.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/unknown-lang.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
index 68bd05d..3e6e080 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
@@ -1,11 +1,11 @@
include(RunCMake)
-run_cmake(COMPILE_LANG_AND_ID-add_custom_target)
-run_cmake(COMPILE_LANG_AND_ID-add_custom_command)
-run_cmake(COMPILE_LANG_AND_ID-install)
-run_cmake(COMPILE_LANG_AND_ID-target_sources)
-run_cmake(COMPILE_LANG_AND_ID-add_executable)
-run_cmake(COMPILE_LANG_AND_ID-add_library)
-run_cmake(COMPILE_LANG_AND_ID-add_test)
-run_cmake(COMPILE_LANG_AND_ID-unknown-lang)
-run_cmake(COMPILE_LANG_AND_ID-TARGET_PROPERTY)
+run_cmake(add_custom_target)
+run_cmake(add_custom_command)
+run_cmake(install)
+run_cmake(target_sources)
+run_cmake(add_executable)
+run_cmake(add_library)
+run_cmake(add_test)
+run_cmake(unknown-lang)
+run_cmake(TARGET_PROPERTY)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/TARGET_PROPERTY.cmake
index 6a718d6..6a718d6 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/TARGET_PROPERTY.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command-stderr.txt
index 3ecbdc3..0c3c3f9 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANG_AND_ID-target_sources.cmake:2 \(target_sources\):
+CMake Error at add_custom_command.cmake:2 \(add_custom_command\):
Error evaluating generator expression:
\$<COMPILE_LANG_AND_ID>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command.cmake
index 9bd5e8e..9bd5e8e 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_command.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target-stderr.txt
index 589e64b..ae85ca6 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANG_AND_ID-add_custom_target.cmake:2 \(add_custom_target\):
+CMake Error at add_custom_target.cmake:2 \(add_custom_target\):
Error evaluating generator expression:
\$<COMPILE_LANG_AND_ID:LANG,ID>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target.cmake
index 398db19..398db19 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_custom_target.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable-stderr.txt
index 4cbf000..ed03f20 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANG_AND_ID-add_library.cmake:2 \(add_library\):
+CMake Error at add_executable.cmake:1 \(add_executable\):
Error evaluating generator expression:
\$<COMPILE_LANG_AND_ID:C,MSVC>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable.cmake
index 2245f50..2245f50 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_executable.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library-stderr.txt
index 3b3f38d..0014c16 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANG_AND_ID-add_executable.cmake:1 \(add_executable\):
+CMake Error at add_library.cmake:2 \(add_library\):
Error evaluating generator expression:
\$<COMPILE_LANG_AND_ID:C,MSVC>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library.cmake
index 044962a..044962a 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_library.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test-stderr.txt
index 26a5940..73b1a7d 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANG_AND_ID-add_test.cmake:5 \(add_test\):
+CMake Error at add_test.cmake:5 \(add_test\):
Error evaluating generator expression:
\$<COMPILE_LANG_AND_ID:CXX,GNU>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test.cmake
index b5b6c2b..b5b6c2b 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/add_test.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install-stderr.txt
index 0c4ecd0..0c4ecd0 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install-stderr.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install.cmake
index c13eda6..c13eda6 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/install.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries-result.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources-result.txt
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources-stderr.txt
index 2ee96ed..ea6fbbf 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at COMPILE_LANG_AND_ID-add_custom_command.cmake:2 \(add_custom_command\):
+CMake Error at target_sources.cmake:2 \(target_sources\):
Error evaluating generator expression:
\$<COMPILE_LANG_AND_ID>
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources.cmake
index a2c9b03..a2c9b03 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/target_sources.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-unknown-lang.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/unknown-lang.cmake
index b9e840b..b9e840b 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-unknown-lang.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/unknown-lang.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake
index 80633e2..1ce98f0 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake
@@ -1,18 +1,18 @@
include(RunCMake)
-run_cmake(DEVICE_LINK-add_custom_target)
-run_cmake(DEVICE_LINK-add_custom_command)
-run_cmake(DEVICE_LINK-install)
-run_cmake(DEVICE_LINK-add_executable)
-run_cmake(DEVICE_LINK-add_library)
-run_cmake(DEVICE_LINK-add_test)
-run_cmake(DEVICE_LINK-target_sources)
-run_cmake(DEVICE_LINK-target_compile_definitions)
-run_cmake(DEVICE_LINK-target_compile_options)
-run_cmake(DEVICE_LINK-target_include_directories)
-run_cmake(DEVICE_LINK-target_link_libraries)
-run_cmake(DEVICE_LINK-target_link_directories)
-run_cmake(DEVICE_LINK-try_compile)
+run_cmake(add_custom_target)
+run_cmake(add_custom_command)
+run_cmake(install)
+run_cmake(add_executable)
+run_cmake(add_library)
+run_cmake(add_test)
+run_cmake(target_sources)
+run_cmake(target_compile_definitions)
+run_cmake(target_compile_options)
+run_cmake(target_include_directories)
+run_cmake(target_link_libraries)
+run_cmake(target_link_directories)
+run_cmake(try_compile)
if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)")
- run_cmake(DEVICE_LINK-link_depends)
+ run_cmake(link_depends)
endif()
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command-stderr.txt
index cdd3043..273c3b2 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-add_custom_target.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at add_custom_command.cmake:[0-9]+ \(add_custom_command\):
Error evaluating generator expression:
\$<DEVICE_LINK>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command.cmake
index 01b3784..01b3784 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_command.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target-stderr.txt
index eb15834..0c015fa 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-add_custom_command.cmake:[0-9]+ \(add_custom_command\):
+CMake Error at add_custom_target.cmake:[0-9]+ \(add_custom_target\):
Error evaluating generator expression:
\$<DEVICE_LINK>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target.cmake
index 35728e9..35728e9 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_custom_target.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_executable-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_executable-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_executable-stderr.txt
index 4477e00..3d5bfb3 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_executable-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-add_library.cmake:[0-9]+ \(add_library\):
+CMake Error at add_executable.cmake:[0-9]+ \(add_executable\):
Error evaluating generator expression:
\$<DEVICE_LINK:empty.c>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/add_executable.cmake
index 899f8f6..899f8f6 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_executable.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_library-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_library-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_library-stderr.txt
index c9b602d..5b8448b 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_library-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-target_sources.cmake:[0-9]+ \(target_sources\):
+CMake Error at add_library.cmake:[0-9]+ \(add_library\):
Error evaluating generator expression:
\$<DEVICE_LINK:empty.c>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/add_library.cmake
index fc8547b..fc8547b 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_library.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_test-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_test-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/add_test-stderr.txt
index 99561fe..56f8ce7 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_test-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-add_test.cmake:[0-9]+ \(add_test\):
+CMake Error at add_test.cmake:[0-9]+ \(add_test\):
Error evaluating generator expression:
\$<DEVICE_LINK>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/add_test.cmake
index 87d6ba1..87d6ba1 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/add_test.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/install-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/install-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/install-stderr.txt
index afb3090..afb3090 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/install-stderr.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/install.cmake
index 4b6dbef..4b6dbef 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-install.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/install.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/link_depends-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_test-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/link_depends-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/link_depends-stderr.txt
index 4fa0522..4fa0522 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/link_depends-stderr.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/link_depends.cmake
index 8129514..8129514 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-link_depends.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/link_depends.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_library-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions-stderr.txt
index c0185e3..e6bd546 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-target_compile_definitions.cmake:[0-9]+ \(target_compile_definitions\):
+CMake Error at target_compile_definitions.cmake:[0-9]+ \(target_compile_definitions\):
Error evaluating generator expression:
\$<DEVICE_LINK:DEF>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions.cmake
index aaa8efc..aaa8efc 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_definitions.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_definitions.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options-stderr.txt
index 34ca4f2..31e0eca 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-target_compile_options.cmake:[0-9]+ \(target_compile_options\):
+CMake Error at target_compile_options.cmake:[0-9]+ \(target_compile_options\):
Error evaluating generator expression:
\$<DEVICE_LINK:-OPT>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options.cmake
index a9cb7fd..a9cb7fd 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_compile_options.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_compile_options.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_target-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories-stderr.txt
index d924916..b104e1b 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-target_link_directories.cmake:[0-9]+ \(target_link_directories\):
+CMake Error at target_include_directories.cmake:[0-9]+ \(target_include_directories\):
Error evaluating generator expression:
\$<DEVICE_LINK:/DIR>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories.cmake
index 03cc413..03cc413 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_include_directories.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_custom_command-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories-stderr.txt
index 4d1642d..a2f9c52 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_include_directories-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-target_include_directories.cmake:[0-9]+ \(target_include_directories\):
+CMake Error at target_link_directories.cmake:[0-9]+ \(target_link_directories\):
Error evaluating generator expression:
\$<DEVICE_LINK:/DIR>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories.cmake
index e50d27d..e50d27d 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_directories.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_directories.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries-stderr.txt
index 1436fa8..ce2aeee 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-target_link_libraries.cmake:[0-9]+ \(target_link_libraries\):
+CMake Error at target_link_libraries.cmake:[0-9]+ \(target_link_libraries\):
Error evaluating generator expression:
\$<DEVICE_LINK:lib>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries.cmake
index 971f562..971f562 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_link_libraries.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_link_libraries.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-result.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_sources-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-result.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_sources-result.txt
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable-stderr.txt b/Tests/RunCMake/GenEx-DEVICE_LINK/target_sources-stderr.txt
index 56b595c..341b0f8 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-add_executable-stderr.txt
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_sources-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at DEVICE_LINK-add_executable.cmake:[0-9]+ \(add_executable\):
+CMake Error at target_sources.cmake:[0-9]+ \(target_sources\):
Error evaluating generator expression:
\$<DEVICE_LINK:empty.c>
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/target_sources.cmake
index 94bac9e..94bac9e 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-target_sources.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/target_sources.cmake
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-try_compile.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake
index 281f8aa..281f8aa 100644
--- a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-try_compile.cmake
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake
index 9e3eeec..1ce98f0 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake
@@ -1,18 +1,18 @@
include(RunCMake)
-run_cmake(HOST_LINK-add_custom_target)
-run_cmake(HOST_LINK-add_custom_command)
-run_cmake(HOST_LINK-install)
-run_cmake(HOST_LINK-add_executable)
-run_cmake(HOST_LINK-add_library)
-run_cmake(HOST_LINK-add_test)
-run_cmake(HOST_LINK-target_sources)
-run_cmake(HOST_LINK-target_compile_definitions)
-run_cmake(HOST_LINK-target_compile_options)
-run_cmake(HOST_LINK-target_include_directories)
-run_cmake(HOST_LINK-target_link_libraries)
-run_cmake(HOST_LINK-target_link_directories)
-run_cmake(HOST_LINK-try_compile)
+run_cmake(add_custom_target)
+run_cmake(add_custom_command)
+run_cmake(install)
+run_cmake(add_executable)
+run_cmake(add_library)
+run_cmake(add_test)
+run_cmake(target_sources)
+run_cmake(target_compile_definitions)
+run_cmake(target_compile_options)
+run_cmake(target_include_directories)
+run_cmake(target_link_libraries)
+run_cmake(target_link_directories)
+run_cmake(try_compile)
if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)")
- run_cmake(HOST_LINK-link_depends)
+ run_cmake(link_depends)
endif()
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_command-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_command-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_command-stderr.txt
index c44202a..0eb5e33 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_command-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-add_custom_target.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at add_custom_command.cmake:[0-9]+ \(add_custom_command\):
Error evaluating generator expression:
\$<HOST_LINK>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command.cmake b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_command.cmake
index 4d6e305..4d6e305 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_command.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_target-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_target-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_target-stderr.txt
index 5ad41b9..ffb0c3d 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_command-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_target-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-add_custom_command.cmake:[0-9]+ \(add_custom_command\):
+CMake Error at add_custom_target.cmake:[0-9]+ \(add_custom_target\):
Error evaluating generator expression:
\$<HOST_LINK>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target.cmake b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_target.cmake
index eec072a..eec072a 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_custom_target.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_custom_target.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_executable-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_executable-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_executable-stderr.txt
index 4bd27be..59732d8 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_executable-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-add_library.cmake:[0-9]+ \(add_library\):
+CMake Error at add_executable.cmake:[0-9]+ \(add_executable\):
Error evaluating generator expression:
\$<HOST_LINK:empty.c>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable.cmake b/Tests/RunCMake/GenEx-HOST_LINK/add_executable.cmake
index c9f74a5..c9f74a5 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_executable.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_library-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_library-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_library-stderr.txt
index 0e25568..4e9fea1 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_library-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-target_sources.cmake:[0-9]+ \(target_sources\):
+CMake Error at add_library.cmake:[0-9]+ \(add_library\):
Error evaluating generator expression:
\$<HOST_LINK:empty.c>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library.cmake b/Tests/RunCMake/GenEx-HOST_LINK/add_library.cmake
index 44135af..44135af 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_library.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_library.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_test-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_test-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/add_test-stderr.txt
index 012ad21..11912dd 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_test-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-add_test.cmake:[0-9]+ \(add_test\):
+CMake Error at add_test.cmake:[0-9]+ \(add_test\):
Error evaluating generator expression:
\$<HOST_LINK>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test.cmake b/Tests/RunCMake/GenEx-HOST_LINK/add_test.cmake
index 4b472af..4b472af 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_test.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/add_test.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/install-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/install-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/install-stderr.txt
index c265ec4..c265ec4 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/install-stderr.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install.cmake b/Tests/RunCMake/GenEx-HOST_LINK/install.cmake
index b4dff68..b4dff68 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-install.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/install.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/link_depends-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/link_depends-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/link_depends-stderr.txt
index 24b8b82..24b8b82 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/link_depends-stderr.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends.cmake b/Tests/RunCMake/GenEx-HOST_LINK/link_depends.cmake
index 0402f43..0402f43 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-link_depends.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/link_depends.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions-stderr.txt
index 6ab3c14..09982e1 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-target_compile_definitions.cmake:[0-9]+ \(target_compile_definitions\):
+CMake Error at target_compile_definitions.cmake:[0-9]+ \(target_compile_definitions\):
Error evaluating generator expression:
\$<HOST_LINK:DEF>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions.cmake b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions.cmake
index f6c130d..f6c130d 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_definitions.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_definitions.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_options-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_options-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_options-stderr.txt
index 0f5bbc3..42ff663 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_options-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-target_compile_options.cmake:[0-9]+ \(target_compile_options\):
+CMake Error at target_compile_options.cmake:[0-9]+ \(target_compile_options\):
Error evaluating generator expression:
\$<HOST_LINK:-OPT>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options.cmake b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_options.cmake
index 53afea1..53afea1 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_compile_options.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_compile_options.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_include_directories-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_include_directories-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_include_directories-stderr.txt
index 5225a52..1c83da3 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_include_directories-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-target_link_directories.cmake:[0-9]+ \(target_link_directories\):
+CMake Error at target_include_directories.cmake:[0-9]+ \(target_include_directories\):
Error evaluating generator expression:
\$<HOST_LINK:/DIR>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories.cmake b/Tests/RunCMake/GenEx-HOST_LINK/target_include_directories.cmake
index aff1009..aff1009 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_include_directories.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_link_directories-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_link_directories-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_link_directories-stderr.txt
index 9a2634a..0b54018 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_include_directories-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_link_directories-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-target_include_directories.cmake:[0-9]+ \(target_include_directories\):
+CMake Error at target_link_directories.cmake:[0-9]+ \(target_link_directories\):
Error evaluating generator expression:
\$<HOST_LINK:/DIR>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories.cmake b/Tests/RunCMake/GenEx-HOST_LINK/target_link_directories.cmake
index 97488ee..97488ee 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_directories.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_link_directories.cmake
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-result.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries-result.txt
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries-stderr.txt
index 6c4441f..bf46e3a 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-target_link_libraries.cmake:[0-9]+ \(target_link_libraries\):
+CMake Error at target_link_libraries.cmake:[0-9]+ \(target_link_libraries\):
Error evaluating generator expression:
\$<HOST_LINK:lib>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries.cmake b/Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries.cmake
index d74c92d..d74c92d 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_link_libraries.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_link_libraries.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/target_sources-result.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_sources-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_sources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable-stderr.txt b/Tests/RunCMake/GenEx-HOST_LINK/target_sources-stderr.txt
index b395515..547c2e5 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-add_executable-stderr.txt
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_sources-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at HOST_LINK-add_executable.cmake:[0-9]+ \(add_executable\):
+CMake Error at target_sources.cmake:[0-9]+ \(target_sources\):
Error evaluating generator expression:
\$<HOST_LINK:empty.c>
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources.cmake b/Tests/RunCMake/GenEx-HOST_LINK/target_sources.cmake
index ea7bf55..ea7bf55 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-target_sources.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/target_sources.cmake
diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-try_compile.cmake b/Tests/RunCMake/GenEx-HOST_LINK/try_compile.cmake
index f221ff1..f221ff1 100644
--- a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-try_compile.cmake
+++ b/Tests/RunCMake/GenEx-HOST_LINK/try_compile.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command-stderr.txt
deleted file mode 100644
index 0b0d458..0000000
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command-stderr.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-CMake Error at LINK_LANGUAGE-add_custom_command.cmake:2 \(add_custom_command\):
- Error evaluating generator expression:
-
- \$<LINK_LANGUAGE>
-
- \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
- libraries, link directories, link options and link depends.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target-stderr.txt
deleted file mode 100644
index 92da634..0000000
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target-stderr.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-CMake Error at LINK_LANGUAGE-add_custom_target.cmake:1 \(add_custom_target\):
- Error evaluating generator expression:
-
- \$<LINK_LANGUAGE>
-
- \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
- libraries, link directories, link options and link depends.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources-stderr.txt
deleted file mode 100644
index d8121cc..0000000
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources-stderr.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-CMake Error at LINK_LANGUAGE-target_sources.cmake:2 \(target_sources\):
- Error evaluating generator expression:
-
- \$<LINK_LANGUAGE>
-
- \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
- libraries, link directories, link options and link depends.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/RunCMakeTest.cmake
index 4cf0c04..53320ac 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/RunCMakeTest.cmake
@@ -1,15 +1,15 @@
include(RunCMake)
-run_cmake(LINK_LANGUAGE-add_custom_target)
-run_cmake(LINK_LANGUAGE-add_custom_command)
-run_cmake(LINK_LANGUAGE-install)
-run_cmake(LINK_LANGUAGE-target_sources)
-run_cmake(LINK_LANGUAGE-add_executable)
-run_cmake(LINK_LANGUAGE-add_library)
-run_cmake(LINK_LANGUAGE-add_test)
-run_cmake(LINK_LANGUAGE-unknown-lang)
-run_cmake(LINK_LANGUAGE-wrong-usage1)
-run_cmake(LINK_LANGUAGE-wrong-usage2)
-run_cmake(LINK_LANGUAGE-wrong-usage3)
-run_cmake(LINK_LANGUAGE-wrong-usage4)
-run_cmake(LINK_LANGUAGE-file_generate)
+run_cmake(add_custom_target)
+run_cmake(add_custom_command)
+run_cmake(install)
+run_cmake(target_sources)
+run_cmake(add_executable)
+run_cmake(add_library)
+run_cmake(add_test)
+run_cmake(unknown-lang)
+run_cmake(wrong-usage1)
+run_cmake(wrong-usage2)
+run_cmake(wrong-usage3)
+run_cmake(wrong-usage4)
+run_cmake(file_generate)
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command-stderr.txt
index 1bacdeb..2ac7add 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-add_library.cmake:1 \(add_library\):
+CMake Error at add_custom_command.cmake:2 \(add_custom_command\):
Error evaluating generator expression:
\$<LINK_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command.cmake
index a378c1c..a378c1c 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_command.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_command.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target-stderr.txt
index 3bdc8e4..5e54bae 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-add_executable.cmake:1 \(add_executable\):
+CMake Error at add_custom_target.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
\$<LINK_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target.cmake
index 60b6c75..60b6c75 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_custom_target.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_custom_target.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable-stderr.txt
index f22efde..06c00fc 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-add_test.cmake:5 \(add_test\):
+CMake Error at add_executable.cmake:1 \(add_executable\):
Error evaluating generator expression:
\$<LINK_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable.cmake
index 2176b39..2176b39 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_executable.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_executable.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library-stderr.txt
index 21d26de..6e312a1 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-file_generate.cmake:3 \(file\):
+CMake Error at add_library.cmake:1 \(add_library\):
Error evaluating generator expression:
\$<LINK_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library.cmake
index 253f82a..253f82a 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_library.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_library.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test-stderr.txt
new file mode 100644
index 0000000..3deb923
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at add_test.cmake:5 \(add_test\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test.cmake
index 4fd547d..4fd547d 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-add_test.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/add_test.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate-stderr.txt
new file mode 100644
index 0000000..0e3d681
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at file_generate.cmake:3 \(file\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate.cmake
index 519b883..519b883 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-file_generate.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/file_generate.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/install-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/install-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/install-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/install-stderr.txt
index 73afc33..73afc33 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/install-stderr.txt
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/install.cmake
index 533c0b4..533c0b4 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-install.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/install.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources-stderr.txt
new file mode 100644
index 0000000..4c63a6e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at target_sources.cmake:2 \(target_sources\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources.cmake
index c134c01..c134c01 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-target_sources.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/target_sources.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-unknown-lang.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/unknown-lang.cmake
index 0ba472d..0ba472d 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-unknown-lang.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/unknown-lang.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1-stderr.txt
index 7fe4310..58562b3 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-wrong-usage2.cmake:4 \(target_compile_options\):
+CMake Error at wrong-usage1.cmake:4 \(target_compile_definitions\):
Error evaluating generator expression:
\$<LINK_LANGUAGE:C>
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1.cmake
index 90b7ce0..90b7ce0 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage1.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2-stderr.txt
index cb20e99..46fbc67 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-wrong-usage3.cmake:4 \(target_include_directories\):
+CMake Error at wrong-usage2.cmake:4 \(target_compile_options\):
Error evaluating generator expression:
\$<LINK_LANGUAGE:C>
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2.cmake
index e761897..e761897 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage2.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage2.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3-stderr.txt
index 1e3a83b..2cabc90 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage1-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-wrong-usage1.cmake:4 \(target_compile_definitions\):
+CMake Error at wrong-usage3.cmake:4 \(target_include_directories\):
Error evaluating generator expression:
\$<LINK_LANGUAGE:C>
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3.cmake
index 96a72a1..96a72a1 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage3.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage3.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4-result.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4-stderr.txt
index ee36912..3679760 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-wrong-usage4.cmake:7 \(target_link_libraries\):
+CMake Error at wrong-usage4.cmake:7 \(target_link_libraries\):
Error evaluating generator expression:
\$<LINK_LANGUAGE>
diff --git a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4.cmake b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4.cmake
index 3ecaabb..3ecaabb 100644
--- a/Tests/RunCMake/GenEx-LINK_LANGUAGE/LINK_LANGUAGE-wrong-usage4.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANGUAGE/wrong-usage4.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/RunCMakeTest.cmake
index 5bb6590..74a179c 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/RunCMakeTest.cmake
@@ -1,14 +1,14 @@
include(RunCMake)
-run_cmake(LINK_LANG_AND_ID-add_custom_target)
-run_cmake(LINK_LANG_AND_ID-add_custom_command)
-run_cmake(LINK_LANG_AND_ID-install)
-run_cmake(LINK_LANG_AND_ID-target_sources)
-run_cmake(LINK_LANG_AND_ID-add_executable)
-run_cmake(LINK_LANG_AND_ID-add_library)
-run_cmake(LINK_LANG_AND_ID-add_test)
-run_cmake(LINK_LANG_AND_ID-unknown-lang)
-run_cmake(LINK_LANG_AND_ID-wrong-usage1)
-run_cmake(LINK_LANG_AND_ID-wrong-usage2)
-run_cmake(LINK_LANG_AND_ID-wrong-usage3)
-run_cmake(LINK_LANG_AND_ID-file_generate)
+run_cmake(add_custom_target)
+run_cmake(add_custom_command)
+run_cmake(install)
+run_cmake(target_sources)
+run_cmake(add_executable)
+run_cmake(add_library)
+run_cmake(add_test)
+run_cmake(unknown-lang)
+run_cmake(wrong-usage1)
+run_cmake(wrong-usage2)
+run_cmake(wrong-usage3)
+run_cmake(file_generate)
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command-stderr.txt
index 0749c44..412e3ad 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-add_custom_target.cmake:2 \(add_custom_target\):
+CMake Error at add_custom_command.cmake:2 \(add_custom_command\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:LANG,ID>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command.cmake
index 9df9232..9df9232 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_command.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target-stderr.txt
index 2ff62bc..a927b20 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_command-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-add_custom_command.cmake:2 \(add_custom_command\):
+CMake Error at add_custom_target.cmake:2 \(add_custom_target\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:LANG,ID>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target.cmake
index e5f76bc..e5f76bc 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_custom_target.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_custom_target.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable-stderr.txt
index be46e28..c58cbdf 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-add_library.cmake:2 \(add_library\):
+CMake Error at add_executable.cmake:1 \(add_executable\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:C,MSVC>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable.cmake
index 4d6c674..4d6c674 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_executable.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library-stderr.txt
index 595312a..46a32d0 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_executable-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-add_executable.cmake:1 \(add_executable\):
+CMake Error at add_library.cmake:2 \(add_library\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:C,MSVC>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library.cmake
index a8199cf..a8199cf 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_library.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_library.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test-stderr.txt
index 2a29492..9893298 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-add_test.cmake:5 \(add_test\):
+CMake Error at add_test.cmake:5 \(add_test\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:CXX,GNU>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test.cmake
index fd700d7..fd700d7 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-add_test.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/add_test.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate-stderr.txt
index e57b55c..fa05f8d 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-file_generate.cmake:3 \(file\):
+CMake Error at file_generate.cmake:3 \(file\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:C,GNU>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate.cmake
index 67c1bda..67c1bda 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-file_generate.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/file_generate.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install-stderr.txt
index 965f974..965f974 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install-stderr.txt
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install.cmake
index b8f9323..b8f9323 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-install.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/install.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources-stderr.txt
index e86602a..aecf124 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-target_sources.cmake:2 \(target_sources\):
+CMake Error at target_sources.cmake:2 \(target_sources\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources.cmake
index da5faf4..da5faf4 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-target_sources.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/target_sources.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-unknown-lang.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/unknown-lang.cmake
index 99dd337..99dd337 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-unknown-lang.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/unknown-lang.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1-stderr.txt
index 53bdcb2..729cc2f 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-wrong-usage2.cmake:4 \(target_compile_options\):
+CMake Error at wrong-usage1.cmake:4 \(target_compile_definitions\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:C,GNU>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1.cmake
index e58e3b44..e58e3b44 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage1.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2-stderr.txt
index a34a2ea..786c16d 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-wrong-usage3.cmake:4 \(target_include_directories\):
+CMake Error at wrong-usage2.cmake:4 \(target_compile_options\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:C,GNU>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2.cmake
index 998daa9..998daa9 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage2.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage2.cmake
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3-result.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1-stderr.txt b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3-stderr.txt
index 95611c3..31679a1 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage1-stderr.txt
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANG_AND_ID-wrong-usage1.cmake:4 \(target_compile_definitions\):
+CMake Error at wrong-usage3.cmake:4 \(target_include_directories\):
Error evaluating generator expression:
\$<LINK_LANG_AND_ID:C,GNU>
diff --git a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3.cmake b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3.cmake
index 0543056..0543056 100644
--- a/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/LINK_LANG_AND_ID-wrong-usage3.cmake
+++ b/Tests/RunCMake/GenEx-LINK_LANG_AND_ID/wrong-usage3.cmake
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake
index 40f7c66..7eec527 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake
@@ -58,8 +58,8 @@ set_property (TARGET static3 PROPERTY ARCHIVE_OUTPUT_NAME static3_archive)
string (APPEND GENERATE_CONTENT [[
check_value ("TARGET_FILE_BASE_NAME executable all properties" "$<TARGET_FILE_BASE_NAME:exec3>" "exec3_runtime")
-check_value ("TARGET_FILE_BASE_NAME shared all properties" "$<TARGET_FILE_BASE_NAME:shared3>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN>,shared3_runtime,shared3_library>")
-check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties" "$<TARGET_LINKER_FILE_BASE_NAME:shared3>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN>,shared3_archive,shared3_library>")
+check_value ("TARGET_FILE_BASE_NAME shared all properties" "$<TARGET_FILE_BASE_NAME:shared3>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN$<SEMICOLON>MSYS>,shared3_runtime,shared3_library>")
+check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties" "$<TARGET_LINKER_FILE_BASE_NAME:shared3>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN$<SEMICOLON>MSYS>,shared3_archive,shared3_library>")
check_value ("TARGET_FILE_BASE_NAME static all properties" "$<TARGET_FILE_BASE_NAME:static3>" "static3_archive")
check_value ("TARGET_LINKER_FILE_BASE_NAME static linker all properties" "$<TARGET_LINKER_FILE_BASE_NAME:static3>" "static3_archive")
]])
@@ -95,8 +95,8 @@ set_property (TARGET static4 PROPERTY ${FIRST_CONFIG}_POSTFIX _postfix)
string (APPEND GENERATE_CONTENT [[
check_value ("TARGET_FILE_BASE_NAME executable all properties + postfix" "$<TARGET_FILE_BASE_NAME:exec4>" "exec4_runtime_postfix")
-check_value ("TARGET_FILE_BASE_NAME shared all properties + postfix" "$<TARGET_FILE_BASE_NAME:shared4>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN>,shared4_runtime,shared4_library>_postfix")
-check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties + postfix" "$<TARGET_LINKER_FILE_BASE_NAME:shared4>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN>,shared4_archive,shared4_library>_postfix")
+check_value ("TARGET_FILE_BASE_NAME shared all properties + postfix" "$<TARGET_FILE_BASE_NAME:shared4>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN$<SEMICOLON>MSYS>,shared4_runtime,shared4_library>_postfix")
+check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties + postfix" "$<TARGET_LINKER_FILE_BASE_NAME:shared4>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN$<SEMICOLON>MSYS>,shared4_archive,shared4_library>_postfix")
check_value ("TARGET_FILE_BASE_NAME static all properties + postfix" "$<TARGET_FILE_BASE_NAME:static4>" "static4_archive_postfix")
check_value ("TARGET_LINKER_FILE_BASE_NAME static linker all properties + postfix" "$<TARGET_LINKER_FILE_BASE_NAME:static4>" "static4_archive_postfix")
]])
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake
index f88d710..1963244 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake
@@ -72,8 +72,8 @@ set_property (TARGET static3 PROPERTY PDB_NAME static3_pdb)
string (APPEND GENERATE_CONTENT [[
check_value ("TARGET_FILE_BASE_NAME executable all properties" "$<TARGET_FILE_BASE_NAME:exec3>" "exec3_runtime")
-check_value ("TARGET_FILE_BASE_NAME shared all properties" "$<TARGET_FILE_BASE_NAME:shared3>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN>,shared3_runtime,shared3_library>")
-check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties" "$<TARGET_LINKER_FILE_BASE_NAME:shared3>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN>,shared3_archive,shared3_library>")
+check_value ("TARGET_FILE_BASE_NAME shared all properties" "$<TARGET_FILE_BASE_NAME:shared3>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN$<SEMICOLON>MSYS>,shared3_runtime,shared3_library>")
+check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties" "$<TARGET_LINKER_FILE_BASE_NAME:shared3>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN$<SEMICOLON>MSYS>,shared3_archive,shared3_library>")
check_value ("TARGET_FILE_BASE_NAME static all properties" "$<TARGET_FILE_BASE_NAME:static3>" "static3_archive")
check_value ("TARGET_LINKER_FILE_BASE_NAME static linker all properties" "$<TARGET_LINKER_FILE_BASE_NAME:static3>" "static3_archive")
]])
@@ -118,8 +118,8 @@ set_property (TARGET static4 PROPERTY ${FIRST_CONFIG}_POSTFIX _postfix)
string (APPEND GENERATE_CONTENT [[
check_value ("TARGET_FILE_BASE_NAME executable all properties + postfix" "$<TARGET_FILE_BASE_NAME:exec4>" "exec4_runtime_postfix")
-check_value ("TARGET_FILE_BASE_NAME shared all properties + postfix" "$<TARGET_FILE_BASE_NAME:shared4>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN>,shared4_runtime,shared4_library>_postfix")
-check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties + postfix" "$<TARGET_LINKER_FILE_BASE_NAME:shared4>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN>,shared4_archive,shared4_library>_postfix")
+check_value ("TARGET_FILE_BASE_NAME shared all properties + postfix" "$<TARGET_FILE_BASE_NAME:shared4>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN$<SEMICOLON>MSYS>,shared4_runtime,shared4_library>_postfix")
+check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties + postfix" "$<TARGET_LINKER_FILE_BASE_NAME:shared4>" "$<IF:$<IN_LIST:$<PLATFORM_ID>,Windows$<SEMICOLON>CYGWIN$<SEMICOLON>MSYS>,shared4_archive,shared4_library>_postfix")
check_value ("TARGET_FILE_BASE_NAME static all properties + postfix" "$<TARGET_FILE_BASE_NAME:static4>" "static4_archive_postfix")
check_value ("TARGET_LINKER_FILE_BASE_NAME static linker all properties + postfix" "$<TARGET_LINKER_FILE_BASE_NAME:static4>" "static4_archive_postfix")
]])
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake
index f52776e..cc9cd5a 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.14)
enable_language (C)
-set (win_platforms Windows CYGWIN)
+set (win_platforms Windows CYGWIN MSYS)
set (GENERATE_CONTENT [[
macro (CHECK_VALUE test_msg value expected)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake
index bef7bbf..edfb40c 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.14)
enable_language (C)
-set (win_platforms Windows CYGWIN)
+set (win_platforms Windows CYGWIN MSYS)
set (GENERATE_CONTENT [[
macro (CHECK_VALUE test_msg value expected)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake
index cefeb86..3ee42a5 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.14)
enable_language (C)
-set (win_platforms Windows CYGWIN)
+set (win_platforms Windows CYGWIN MSYS)
set (GENERATE_CONTENT [[
macro (CHECK_VALUE test_msg value expected)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake
index 39e39fd..1fe75d9 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.14)
enable_language (C)
-set (win_platforms Windows CYGWIN)
+set (win_platforms Windows CYGWIN MSYS)
set (GENERATE_CONTENT [[
macro (CHECK_VALUE test_msg value expected)
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/CMakeLists.txt
new file mode 100644
index 0000000..ab1a20c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.19)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/RunCMakeTest.cmake
new file mode 100644
index 0000000..a48b525
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/RunCMakeTest.cmake
@@ -0,0 +1,7 @@
+include(RunCMake)
+
+run_cmake(shared)
+run_cmake(static)
+run_cmake(target_link_libraries)
+run_cmake(target_link_libraries-cycle1)
+run_cmake(target_link_libraries-cycle2)
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/check.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/check.cmake
new file mode 100644
index 0000000..e19598e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/check.cmake
@@ -0,0 +1,15 @@
+function(check_genex expected actual)
+ if(NOT expected STREQUAL actual)
+ string(APPEND RunCMake_TEST_FAILED "Expected DLLs:\n")
+ foreach(dll IN LISTS expected)
+ string(APPEND RunCMake_TEST_FAILED " ${dll}\n")
+ endforeach()
+ string(APPEND RunCMake_TEST_FAILED "Actual DLLs:\n")
+ foreach(dll IN LISTS actual)
+ string(APPEND RunCMake_TEST_FAILED " ${dll}\n")
+ endforeach()
+ endif()
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+endfunction()
+
+include("${RunCMake_TEST_BINARY_DIR}/dlls.cmake")
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib1.c b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib1.c
new file mode 100644
index 0000000..524b5b2
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib1.c
@@ -0,0 +1,12 @@
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+ extern void lib2(void);
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void lib1(void)
+{
+ lib2();
+}
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib2.c b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib2.c
new file mode 100644
index 0000000..e145117
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib2.c
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void lib2(void)
+{
+}
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib3.c b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib3.c
new file mode 100644
index 0000000..5392f7a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib3.c
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void lib3(void)
+{
+}
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/main.c b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/main.c
new file mode 100644
index 0000000..8488f4e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/main.c
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake
new file mode 100644
index 0000000..806f0b6
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake
@@ -0,0 +1,37 @@
+enable_language(C)
+
+add_executable(exe main.c)
+add_library(lib1 SHARED lib1.c)
+add_library(lib2 SHARED lib2.c)
+add_library(lib3 SHARED lib3.c)
+add_library(static STATIC static.c)
+add_library(imported SHARED IMPORTED)
+set_property(TARGET imported PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/imported.dll")
+set_property(TARGET imported PROPERTY IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/imported.lib")
+add_library(imported2 SHARED IMPORTED)
+if(NOT WIN32 AND NOT CYGWIN)
+ set_property(TARGET imported2 PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/imported2.dll")
+endif()
+set_property(TARGET imported2 PROPERTY IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/imported2.lib")
+
+target_link_libraries(exe PRIVATE lib1 static imported imported2)
+target_link_libraries(lib1 PRIVATE lib2)
+target_link_libraries(lib1 INTERFACE lib3)
+
+set(expected_dlls "")
+if(WIN32 OR CYGWIN)
+ set(expected_dlls
+ "$<TARGET_FILE:lib1>"
+ "$<TARGET_FILE:imported>"
+ "$<TARGET_FILE:lib3>"
+ "$<TARGET_FILE:lib2>"
+ )
+endif()
+
+set(content "check_genex(\"${expected_dlls}\" \"$<TARGET_RUNTIME_DLLS:exe>\")\n")
+set(condition)
+get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if(multi_config)
+ set(condition CONDITION "$<CONFIG:Debug>")
+endif()
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/dlls.cmake" CONTENT "${content}" ${condition})
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static-result.txt b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static-stderr.txt b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static-stderr.txt
new file mode 100644
index 0000000..af68c96
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at static\.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<TARGET_RUNTIME_DLLS:static>
+
+ Objects of target "static" referenced but is not one of the allowed target
+ types \(EXECUTABLE, SHARED, MODULE\)\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static.c b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static.c
new file mode 100644
index 0000000..7f5dab5
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static.c
@@ -0,0 +1,3 @@
+void static_func(void)
+{
+}
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static.cmake
new file mode 100644
index 0000000..dc900dd
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/static.cmake
@@ -0,0 +1,9 @@
+enable_language(C)
+
+add_library(static STATIC static.c)
+set(condition)
+get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if(multi_config)
+ set(condition CONDITION "$<CONFIG:Debug>")
+endif()
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/dlls.txt" CONTENT "$<TARGET_RUNTIME_DLLS:static>" ${condition})
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1-result.txt b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1-stderr.txt b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1-stderr.txt
new file mode 100644
index 0000000..b6ae099
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at target_link_libraries-cycle1\.cmake:[0-9]+ \(add_library\):
+ The SOURCES of "lib1" use a generator expression that depends on the
+ SOURCES themselves\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1.cmake
new file mode 100644
index 0000000..f19e9e6
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle1.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+
+add_library(lib1 SHARED lib1.c)
+target_link_libraries(lib1 PRIVATE $<TARGET_RUNTIME_DLLS:lib1>)
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2-result.txt b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2-stderr.txt b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2-stderr.txt
new file mode 100644
index 0000000..9a845f9
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at target_link_libraries-cycle2\.cmake:[0-9]+ \(add_library\):
+ The SOURCES of "(lib1|lib2)" use a generator expression that depends on the
+ SOURCES themselves\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2.cmake
new file mode 100644
index 0000000..7d035bd
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries-cycle2.cmake
@@ -0,0 +1,6 @@
+enable_language(C)
+
+add_library(lib1 SHARED lib1.c)
+add_library(lib2 SHARED lib2.c)
+target_link_libraries(lib1 PRIVATE $<TARGET_RUNTIME_DLLS:lib2>)
+target_link_libraries(lib2 PRIVATE $<TARGET_RUNTIME_DLLS:lib1>)
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries.cmake
new file mode 100644
index 0000000..f44dbf4
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/target_link_libraries.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+
+add_library(lib1 SHARED lib1.c)
+add_library(lib2 SHARED lib2.c)
+target_link_libraries(lib1 PRIVATE $<TARGET_RUNTIME_DLLS:lib2>)
diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
index dcaa4f2..2cfcd8d 100644
--- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
+++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
@@ -8,6 +8,14 @@
#include "libshared.h"
#include "libstatic.h"
+static void rtrim(std::string& str, char byte)
+{
+ size_t const size = str.size();
+ if (size && str[size - 1] == byte) {
+ str.resize(size - 1);
+ }
+}
+
void compare(const char* refName, const char* testName)
{
std::ifstream ref;
@@ -31,16 +39,14 @@ void compare(const char* refName, const char* testName)
// Some very old Borland runtimes (C++ Builder 5 WITHOUT Update 1) add a
// trailing null to the string that we need to strip before testing for a
// trailing space.
- if (refLine.size() && refLine[refLine.size() - 1] == 0) {
- refLine.resize(refLine.size() - 1);
- }
- if (testLine.size() && testLine[testLine.size() - 1] == 0) {
- testLine.resize(testLine.size() - 1);
- }
+ rtrim(refLine, 0);
+ rtrim(testLine, 0);
// The reference files never have trailing spaces:
- if (testLine.size() && testLine[testLine.size() - 1] == ' ') {
- testLine.resize(testLine.size() - 1);
- }
+ rtrim(testLine, ' ');
+ // Strip trailing CR. LF is not returned by getline, but CR is returned
+ // on some platforms.
+ rtrim(refLine, '\r');
+ rtrim(testLine, '\r');
if (refLine != testLine) {
std::cout << "Ref and test are not the same:\n Ref: \"" << refLine
<< "\"\n Test: \"" << testLine << "\"\n";
diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-stderr.txt b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-stderr.txt
new file mode 100644
index 0000000..cae3679
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_minimum_required\):
+ The OLD behavior for policy CMP0085 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.$
diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
index 27ede06..a7519c3 100644
--- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
@@ -3,7 +3,7 @@ include(RunCMake)
set(RunCMake_GENERATOR_PLATFORM "")
run_cmake(NoPlatform)
-if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[012456])( 20[0-9][0-9])?$")
+if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124567])( 20[0-9][0-9])?$")
set(RunCMake_GENERATOR_PLATFORM "x64")
run_cmake(x64Platform)
else()
@@ -11,13 +11,13 @@ else()
run_cmake(BadPlatform)
endif()
-set(RunCMake_GENERATOR_TOOLSET "")
+set(RunCMake_GENERATOR_PLATFORM "")
-set(RunCMake_TEST_OPTIONS -A "Extra Platform")
+set(RunCMake_TEST_OPTIONS -A "Test Platform" -A "Extra Platform")
run_cmake(TwoPlatforms)
unset(RunCMake_TEST_OPTIONS)
-if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[012456])( 20[0-9][0-9])?$")
+if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124567])( 20[0-9][0-9])?$")
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestPlatform-toolchain.cmake)
run_cmake(TestPlatformToolchain)
unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir-stderr.txt
new file mode 100644
index 0000000..d8b6c5e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir-stderr.txt
@@ -0,0 +1,11 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Visual Studio [^
+]*
+
+ given toolset
+
+ customFlagTableDir=does_not_exist
+
+ that is not an absolute path to an existing directory.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir.cmake
new file mode 100644
index 0000000..2fc38e5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetCustomFlagTableDir.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt
index 5e88e3b..ba7a8f3 100644
--- a/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt
@@ -7,4 +7,4 @@ CMake Error at CMakeLists.txt:[0-9]+ \(project\):
buildsystem=bad
- value is unkonwn. It must be '1' or '12'\.$
+ value is unknown. It must be '1' or '12'\.$
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
index 5f12d79..a742391 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -1,9 +1,15 @@
include(RunCMake)
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124567]")
+ 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)
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012456]")
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124567]")
set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
run_cmake(TestToolset)
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,cuda=0.0")
@@ -12,9 +18,32 @@ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012456]")
run_cmake(TestToolsetCudaVersionOnly)
set(RunCMake_GENERATOR_TOOLSET "cuda=0.0")
run_cmake(TestToolsetCudaVersionOnly)
- set(RunCMake_GENERATOR_TOOLSET "cuda=C:\\dummy\\cuda")
+ set(RunCMake_GENERATOR_TOOLSET "cuda=${CMAKE_CURRENT_BINARY_DIR}/CudaStandaloneToolset")
run_cmake(TestToolsetCudaPathOnly)
- if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[2456]")
+ set(RunCMake_GENERATOR_TOOLSET "cuda=${CMAKE_CURRENT_BINARY_DIR}/CudaStandaloneToolset")
+ 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[24567]")
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
run_cmake(TestToolsetHostArchBoth)
set(RunCMake_GENERATOR_TOOLSET ",host=x64")
@@ -29,7 +58,7 @@ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012456]")
run_cmake(BadToolsetHostArch)
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64,host=x86")
run_cmake(BadToolsetHostArchTwice)
- if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[56]")
+ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[567]")
set(RunCMake_GENERATOR_TOOLSET "VCTargetsPath=Test Path")
run_cmake(TestToolsetVCTargetsPathOnly)
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,version=Test Toolset Version")
@@ -76,11 +105,11 @@ endif()
set(RunCMake_GENERATOR_TOOLSET "")
-set(RunCMake_TEST_OPTIONS -T "Extra Toolset")
+set(RunCMake_TEST_OPTIONS -T "Test Toolset" -T "Extra Toolset")
run_cmake(TwoToolsets)
unset(RunCMake_TEST_OPTIONS)
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012456]|Xcode")
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124567]|Xcode")
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestToolset-toolchain.cmake)
run_cmake(TestToolsetToolchain)
unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt
index b17745f..5236787 100644
--- a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt
@@ -5,8 +5,8 @@ CMake Error at CMakeLists.txt:[0-9]+ \(project\):
given toolset
- cuda=C:\\dummy\\cuda\\
+ cuda=.*/Tests/RunCMake/CudaStandaloneToolset\\
cannot detect Visual Studio integration files in path
- C:/dummy/cuda/CUDAVisualStudioIntegration/extras/visual_studio_integration/MSBuildExtensions
+ .*/Tests/RunCMake/CudaStandaloneToolset/extras/visual_studio_integration/MSBuildExtensions
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout-result.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout-stderr.txt
new file mode 100644
index 0000000..3ce79f8
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Visual Studio .*
+
+ given toolset
+
+ cuda=.*/Tests/RunCMake/CudaStandaloneToolset\\
+
+ cannot detect Visual Studio integration files in path
+
+ .*/Tests/RunCMake/CudaStandaloneToolset/CUDAVisualStudioIntegration/extras/visual_studio_integration/MSBuildExtensions
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout.cmake
new file mode 100644
index 0000000..2fc38e5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnlyOldLayout.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake
new file mode 100644
index 0000000..79752b1
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake
@@ -0,0 +1,24 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/main.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file\n ${vcProjectFile}\ndoes not exist.")
+ return()
+endif()
+
+set(TreatWarningAsError_FOUND FALSE)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<TreatWarningAsError>([^<>]*)</TreatWarningAsError>$")
+ set(TreatWarningAsError_FOUND TRUE)
+ set(expectedValue "false")
+ set(actualValue "${CMAKE_MATCH_1}")
+ if(NOT (${actualValue} STREQUAL ${expectedValue}))
+ set(RunCMake_TEST_FAILED "TreatWarningAsError \"${actualValue}\" differs from expected value \"${expectedValue}\".")
+ return()
+ endif()
+ endif()
+endforeach()
+
+if(NOT TreatWarningAsError_FOUND)
+ set(RunCMake_TEST_FAILED "Property TreatWarningAsError not found in project file:\n ${vcProjectFile}.")
+ return()
+endif()
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir.cmake
new file mode 100644
index 0000000..91c6b44
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+string(APPEND CMAKE_C_FLAGS " -TESTWX-")
+add_executable(main main.c)
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
index 085bb6b..854f3dc 100644
--- a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
@@ -1,7 +1,7 @@
message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'")
message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'")
-if(CMAKE_GENERATOR MATCHES "Visual Studio 1[6]")
+if(CMAKE_GENERATOR MATCHES "Visual Studio 1[67]")
cmake_host_system_information(RESULT is_64_bit QUERY IS_64BIT)
if(is_64_bit)
if(NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "x64")
diff --git a/Tests/RunCMake/GeneratorToolset/VsNormal-stdout.txt b/Tests/RunCMake/GeneratorToolset/VsNormal-stdout.txt
new file mode 100644
index 0000000..25fa3bf
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/VsNormal-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_VS_PLATFORM_NAME='[^']+'
+-- CMAKE_VS_PLATFORM_TOOLSET='v[0-9]+'
diff --git a/Tests/RunCMake/GeneratorToolset/VsNormal.cmake b/Tests/RunCMake/GeneratorToolset/VsNormal.cmake
new file mode 100644
index 0000000..e891708
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/VsNormal.cmake
@@ -0,0 +1,6 @@
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/defaults.cmake" "# VS Defaults
+set(VsNormal_Platform [[${CMAKE_VS_PLATFORM_NAME}]])
+set(VsNormal_Toolset [[${CMAKE_VS_PLATFORM_TOOLSET}]])
+")
+message(STATUS "CMAKE_VS_PLATFORM_NAME='${CMAKE_VS_PLATFORM_NAME}'")
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'")
diff --git a/Tests/RunCMake/GeneratorToolset/main.c b/Tests/RunCMake/GeneratorToolset/main.c
new file mode 100644
index 0000000..8488f4e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/main.c
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt
index d9de3f8..904ed11 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt
@@ -8,11 +8,13 @@ Debug/discovery_timeout_test_NOT_BUILT
Debug/discovery_timeout_test_NOT_BUILT(\.exe)?
Debug/discovery_timeout_test_NOT_BUILT
Debug/discovery_timeout_test_NOT_BUILT(\.exe)?
-[^\n]+discovery_timeout_test_NOT_BUILT +\.+\*\*\*Not Run +[0-9.]+ sec
+[^
+]+discovery_timeout_test_NOT_BUILT +\.+\*\*\*Not Run +[0-9.]+ sec
+
0% tests passed, 1 tests failed out of 1
+
Total Test time \(real\) = +[0-9.]+ sec
+
The following tests FAILED:
-[^\n]+discovery_timeout_test_NOT_BUILT \(Not Run\)
+[^
+]+discovery_timeout_test_NOT_BUILT \(Not Run\)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-property-timeout1-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-property-timeout1-stdout.txt
index 0dda49d..5febfbf 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest-property-timeout1-stdout.txt
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-property-timeout1-stdout.txt
@@ -1,10 +1,12 @@
Test project .*GoogleTest-build
[ \t]*Start [0-9]+: property_timeout.case_no_discovery
-[^\n]+property_timeout.case_no_discovery +\.+\*\*\*Timeout +[0-9.]+ sec
+[^
+]+property_timeout.case_no_discovery +\.+\*\*\*Timeout +[0-9.]+ sec
+
0% tests passed, 1 tests failed out of 1
+
Total Test time \(real\) = +[0-9.]+ sec
+
The following tests FAILED:
-[^\n]*property_timeout.case_no_discovery \(Timeout\)
+[^
+]*property_timeout.case_no_discovery \(Timeout\)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-property-timeout2-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-property-timeout2-stdout.txt
index 72cea55..c9c7198 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest-property-timeout2-stdout.txt
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-property-timeout2-stdout.txt
@@ -1,10 +1,12 @@
Test project .*GoogleTest-build
[ \t]*Start [0-9]+: property_timeout.case_with_discovery
-[^\n]+property_timeout.case_with_discovery +\.+\*\*\*Timeout +[0-9.]+ sec
+[^
+]+property_timeout.case_with_discovery +\.+\*\*\*Timeout +[0-9.]+ sec
+
0% tests passed, 1 tests failed out of 1
+
Total Test time \(real\) = +[0-9.]+ sec
+
The following tests FAILED:
-[^\n]*property_timeout.case_with_discovery \(Timeout\)
+[^
+]*property_timeout.case_with_discovery \(Timeout\)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test3-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test3-stdout.txt
new file mode 100644
index 0000000..cf08267
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-test3-stdout.txt
@@ -0,0 +1,16 @@
+Test project .*
+ Start 27: TEST:basic\.case_foo!3
+1/4 Test #27: TEST:basic\.case_foo!3 \.+ +Passed +[0-9.]+ sec
+ Start 28: TEST:basic\.case_bar!3
+2/4 Test #28: TEST:basic\.case_bar!3 \.+ +Passed +[0-9.]+ sec
+ Start 29: TEST:basic\.disabled_case!3
+3/4 Test #29: TEST:basic\.disabled_case!3 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
+ Start 30: TEST:basic\.DISABLEDnot_really_case!3
+4/4 Test #30: TEST:basic\.DISABLEDnot_really_case!3 \.+ +Passed +[0-9.]+ sec
+
+100% tests passed, 0 tests failed out of 3
+
+Total Test time \(real\) = +[0-9.]+ sec
+
+The following tests did not run:
+.*29 - TEST:basic.disabled_case!3 \(Disabled\)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test4-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test4-stdout.txt
new file mode 100644
index 0000000..4a9d75b
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-test4-stdout.txt
@@ -0,0 +1,9 @@
+Test project .*
+ Start 31: TEST:typed/short\.case!4
+1/2 Test #31: TEST:typed/short\.case!4 \.+ +Passed +[0-9.]+ sec
+ Start 32: TEST:typed/float\.case!4
+2/2 Test #32: TEST:typed/float\.case!4 \.+ +Passed +[0-9.]+ sec
+
+100% tests passed, 0 tests failed out of 2
+
+Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest.cmake b/Tests/RunCMake/GoogleTest/GoogleTest.cmake
index 8efd117..221d6ad 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest.cmake
+++ b/Tests/RunCMake/GoogleTest/GoogleTest.cmake
@@ -24,6 +24,24 @@ gtest_discover_tests(
PROPERTIES LABELS TEST2
)
+gtest_discover_tests(
+ fake_gtest
+ TEST_PREFIX TEST:
+ TEST_SUFFIX !3
+ TEST_FILTER basic*
+ EXTRA_ARGS how now "\"brown\" cow"
+ PROPERTIES LABELS TEST3
+)
+
+gtest_discover_tests(
+ fake_gtest
+ TEST_PREFIX TEST:
+ TEST_SUFFIX !4
+ TEST_FILTER typed*
+ EXTRA_ARGS how now "\"brown\" cow"
+ PROPERTIES LABELS TEST4
+)
+
add_executable(no_tests_defined no_tests_defined.cpp)
xcode_sign_adhoc(no_tests_defined)
diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
index 530c8ab..c5c5925 100644
--- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
@@ -40,6 +40,20 @@ function(run_GoogleTest DISCOVERY_MODE)
--no-label-summary
)
+ run_cmake_command(GoogleTest-test3
+ ${CMAKE_CTEST_COMMAND}
+ -C Debug
+ -L TEST3
+ --no-label-summary
+ )
+
+ run_cmake_command(GoogleTest-test4
+ ${CMAKE_CTEST_COMMAND}
+ -C Debug
+ -L TEST4
+ --no-label-summary
+ )
+
run_cmake_command(GoogleTest-test-missing
${CMAKE_CTEST_COMMAND}
-C Debug
diff --git a/Tests/RunCMake/GoogleTest/fake_gtest.cpp b/Tests/RunCMake/GoogleTest/fake_gtest.cpp
index 1956c37..b2a5cb4 100644
--- a/Tests/RunCMake/GoogleTest/fake_gtest.cpp
+++ b/Tests/RunCMake/GoogleTest/fake_gtest.cpp
@@ -7,27 +7,42 @@ int main(int argc, char** argv)
// it only requires that we produces output in the expected format when
// invoked with --gtest_list_tests. Thus, we fake that here. This allows us
// to test the module without actually needing Google Test.
+ bool is_filtered =
+ argc > 2 && std::string(argv[2]).find("--gtest_filter=") == 0;
+ bool is_basic_only =
+ is_filtered && std::string(argv[2]).find("basic*") != std::string::npos;
+ bool is_typed_only =
+ is_filtered && std::string(argv[2]).find("typed*") != std::string::npos;
+
if (argc > 1 && std::string(argv[1]) == "--gtest_list_tests") {
- std::cout << "basic." << std::endl;
- std::cout << " case_foo" << std::endl;
- std::cout << " case_bar" << std::endl;
- std::cout << " DISABLED_disabled_case" << std::endl;
- std::cout << " DISABLEDnot_really_case" << std::endl;
- std::cout << "DISABLED_disabled." << std::endl;
- std::cout << " case" << std::endl;
- std::cout << "DISABLEDnotreally." << std::endl;
- std::cout << " case" << std::endl;
- std::cout << "typed/0. # TypeParam = short" << std::endl;
- std::cout << " case" << std::endl;
- std::cout << "typed/1. # TypeParam = float" << std::endl;
- std::cout << " case" << std::endl;
- std::cout << "value/test." << std::endl;
- std::cout << " case/0 # GetParam() = 1" << std::endl;
- std::cout << " case/1 # GetParam() = \"foo\"" << std::endl;
- std::cout << "param/special." << std::endl;
- std::cout << " case/0 # GetParam() = \"semicolon;\"" << std::endl;
- std::cout << " case/1 # GetParam() = \"backslash\\\"" << std::endl;
- std::cout << " case/2 # GetParam() = \"${var}\"" << std::endl;
+ if (!is_typed_only) {
+ std::cout << "basic." << std::endl;
+ std::cout << " case_foo" << std::endl;
+ std::cout << " case_bar" << std::endl;
+ std::cout << " DISABLED_disabled_case" << std::endl;
+ std::cout << " DISABLEDnot_really_case" << std::endl;
+ }
+ if (!is_basic_only && !is_typed_only) {
+ std::cout << "DISABLED_disabled." << std::endl;
+ std::cout << " case" << std::endl;
+ std::cout << "DISABLEDnotreally." << std::endl;
+ std::cout << " case" << std::endl;
+ }
+ if (!is_basic_only) {
+ std::cout << "typed/0. # TypeParam = short" << std::endl;
+ std::cout << " case" << std::endl;
+ std::cout << "typed/1. # TypeParam = float" << std::endl;
+ std::cout << " case" << std::endl;
+ }
+ if (!is_basic_only && !is_typed_only) {
+ std::cout << "value/test." << std::endl;
+ std::cout << " case/0 # GetParam() = 1" << std::endl;
+ std::cout << " case/1 # GetParam() = \"foo\"" << std::endl;
+ std::cout << "param/special." << std::endl;
+ std::cout << " case/0 # GetParam() = \"semicolon;\"" << std::endl;
+ std::cout << " case/1 # GetParam() = \"backslash\\\"" << std::endl;
+ std::cout << " case/2 # GetParam() = \"${var}\"" << std::endl;
+ }
return 0;
}
diff --git a/Tests/RunCMake/GoogleTest/xml_output.cpp b/Tests/RunCMake/GoogleTest/xml_output.cpp
index 82f0d02..743a472 100644
--- a/Tests/RunCMake/GoogleTest/xml_output.cpp
+++ b/Tests/RunCMake/GoogleTest/xml_output.cpp
@@ -5,7 +5,7 @@
int main(int argc, char** argv)
{
// Note: GoogleTestXML.cmake doesn't actually depend on Google Test as such;
- // it only mimicks the output file creation using the path passed to this
+ // it only mimics the output file creation using the path passed to this
// test without any content
for (int i = 0; i < argc; i++) {
std::string param(argv[i]);
diff --git a/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake b/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake
index 066c83e..c84e95e 100644
--- a/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake
+++ b/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake
@@ -18,6 +18,9 @@ run_cmake(BinaryDirectoryInInterface)
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/DirInInstallPrefix/prefix")
run_cmake(DirInInstallPrefix)
+set(RunCMake_TEST_OPTIONS "--install-prefix=${RunCMake_BINARY_DIR}/DirInInstallPrefix/prefix")
+run_cmake(DirInInstallPrefix)
+
configure_file(
"${RunCMake_SOURCE_DIR}/CMakeLists.txt"
"${RunCMake_BINARY_DIR}/copy/CMakeLists.txt"
@@ -34,14 +37,13 @@ configure_file(
COPYONLY
)
set(RunCMake_TEST_OPTIONS
- "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface/prefix"
+ "--install-prefix=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface/prefix"
"-DTEST_FILE=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface.cmake"
)
set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/copy")
run_cmake(InstallInSrcDir)
unset(RunCMake_TEST_SOURCE_DIR)
-set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix")
set(RunCMake_TEST_OPTIONS
"-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix"
"-DTEST_FILE=${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface.cmake"
@@ -77,7 +79,7 @@ foreach(policyStatus NEW OLD "")
set(policySuffix -CMP0052-${policyStatus})
endif()
set(RunCMake_TEST_OPTIONS
- "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption}
+ "--install-prefix ${RunCMake_BINARY_DIR}/prefix" ${policyOption}
"-DTEST_FILE=${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface.cmake"
)
# Set the RunCMake_TEST_SOURCE_DIR here to the copy too. This is needed to run
diff --git a/Tests/RunCMake/InterfaceLibrary/IncludeDirectories.cmake b/Tests/RunCMake/InterfaceLibrary/IncludeDirectories.cmake
new file mode 100644
index 0000000..b94eac0
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/IncludeDirectories.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0076 NEW)
+include_directories(Inc1 Inc2)
+add_library(iface INTERFACE)
+target_sources(iface PRIVATE iface.c)
+# Ensure the INCLUDE_DIRECTORIES property is populated.
+# Since interface libraries do not actually compile anything, this should be ignored.
+set_property(TARGET iface APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Inc3 ${CMAKE_CURRENT_SOURCE_DIR}/Inc4)
diff --git a/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake b/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
index 834b3c8..10a2d51 100644
--- a/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
@@ -34,3 +34,4 @@ run_WithSources(ConfigSources "build1:iface")
run_WithSources(EmptySources "build1:iface" "build2:iface2,merge")
run_WithSources(ExcludeFromAll "build1" "build2:iface" "build3:iface2,merge")
run_WithSources(PublicSources "build1" "build2:iface" "build3:iface2,merge")
+run_WithSources(IncludeDirectories "build1:iface")
diff --git a/Tests/RunCMake/LinkWhatYouUse/C.cmake b/Tests/RunCMake/LinkWhatYouUse/C.cmake
index 4c3f428..f00db30 100644
--- a/Tests/RunCMake/LinkWhatYouUse/C.cmake
+++ b/Tests/RunCMake/LinkWhatYouUse/C.cmake
@@ -2,3 +2,4 @@ enable_language(C)
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
add_executable(main main.c)
target_link_libraries(main m)
+add_library(foo STATIC foo.c)
diff --git a/Tests/RunCMake/LinkWhatYouUse/CXX.cmake b/Tests/RunCMake/LinkWhatYouUse/CXX.cmake
index 9555832..5762e94 100644
--- a/Tests/RunCMake/LinkWhatYouUse/CXX.cmake
+++ b/Tests/RunCMake/LinkWhatYouUse/CXX.cmake
@@ -2,3 +2,4 @@ enable_language(CXX)
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
add_executable(main main.cxx)
target_link_libraries(main m)
+add_library(foo STATIC foo.cxx)
diff --git a/Tests/RunCMake/LinkWhatYouUse/foo.c b/Tests/RunCMake/LinkWhatYouUse/foo.c
new file mode 100644
index 0000000..c83d856
--- /dev/null
+++ b/Tests/RunCMake/LinkWhatYouUse/foo.c
@@ -0,0 +1,4 @@
+int foo(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/LinkWhatYouUse/foo.cxx b/Tests/RunCMake/LinkWhatYouUse/foo.cxx
new file mode 100644
index 0000000..e05eb7e
--- /dev/null
+++ b/Tests/RunCMake/LinkWhatYouUse/foo.cxx
@@ -0,0 +1,4 @@
+int foo()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/LinkerLauncher/C-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/C-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/C-common.cmake b/Tests/RunCMake/LinkerLauncher/C-common.cmake
new file mode 100644
index 0000000..96b004b
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C-common.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.c)
diff --git a/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/C-env.cmake b/Tests/RunCMake/LinkerLauncher/C-env.cmake
new file mode 100644
index 0000000..09b5167
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C-env.cmake
@@ -0,0 +1 @@
+include(C-common.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/C-launch-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/C-launch-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/C-launch-env.cmake b/Tests/RunCMake/LinkerLauncher/C-launch-env.cmake
new file mode 100644
index 0000000..68abcb5
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C-launch-env.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(C-env.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/C-launch.cmake b/Tests/RunCMake/LinkerLauncher/C-launch.cmake
new file mode 100644
index 0000000..e66ca20
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(C.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/C.cmake b/Tests/RunCMake/LinkerLauncher/C.cmake
new file mode 100644
index 0000000..b55ca8e
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/C.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_C_LINKER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+include(C-common.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/CMakeLists.txt b/Tests/RunCMake/LinkerLauncher/CMakeLists.txt
new file mode 100644
index 0000000..7cabeb6
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.20)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/CXX-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-common.cmake b/Tests/RunCMake/LinkerLauncher/CXX-common.cmake
new file mode 100644
index 0000000..3d2ee00
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX-common.cmake
@@ -0,0 +1,3 @@
+enable_language(CXX)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.cxx)
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-env.cmake b/Tests/RunCMake/LinkerLauncher/CXX-env.cmake
new file mode 100644
index 0000000..db36956
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX-env.cmake
@@ -0,0 +1 @@
+include(CXX-common.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-launch-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/CXX-launch-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-launch-env.cmake b/Tests/RunCMake/LinkerLauncher/CXX-launch-env.cmake
new file mode 100644
index 0000000..a65cc89
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX-launch-env.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(CXX-env.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-launch.cmake b/Tests/RunCMake/LinkerLauncher/CXX-launch.cmake
new file mode 100644
index 0000000..3002c9d
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(CXX.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/CXX.cmake b/Tests/RunCMake/LinkerLauncher/CXX.cmake
new file mode 100644
index 0000000..4326614
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/CXX.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_CXX_LINKER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+include(CXX-common.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJC-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-common.cmake b/Tests/RunCMake/LinkerLauncher/OBJC-common.cmake
new file mode 100644
index 0000000..7b565f4
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-common.cmake
@@ -0,0 +1,3 @@
+enable_language(OBJC)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.m)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-env.cmake b/Tests/RunCMake/LinkerLauncher/OBJC-env.cmake
new file mode 100644
index 0000000..949e88d
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-env.cmake
@@ -0,0 +1 @@
+include(OBJC-common.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-launch-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJC-launch-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-launch-env.cmake b/Tests/RunCMake/LinkerLauncher/OBJC-launch-env.cmake
new file mode 100644
index 0000000..1cf13d3
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-launch-env.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(OBJC-env.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-launch.cmake b/Tests/RunCMake/LinkerLauncher/OBJC-launch.cmake
new file mode 100644
index 0000000..43e8521
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(OBJC.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC.cmake b/Tests/RunCMake/LinkerLauncher/OBJC.cmake
new file mode 100644
index 0000000..e0360b3
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJC.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_OBJC_LINKER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+include(OBJC-common.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJCXX-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-common.cmake b/Tests/RunCMake/LinkerLauncher/OBJCXX-common.cmake
new file mode 100644
index 0000000..e2ee4eb
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-common.cmake
@@ -0,0 +1,3 @@
+enable_language(OBJCXX)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.mm)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-env.cmake b/Tests/RunCMake/LinkerLauncher/OBJCXX-env.cmake
new file mode 100644
index 0000000..3ed966d
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-env.cmake
@@ -0,0 +1 @@
+include(OBJCXX-common.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt
new file mode 100644
index 0000000..3313e31
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env.cmake b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env.cmake
new file mode 100644
index 0000000..04c916a
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(OBJCXX-env.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-launch.cmake b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch.cmake
new file mode 100644
index 0000000..5a54bff
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(OBJCXX.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX.cmake b/Tests/RunCMake/LinkerLauncher/OBJCXX.cmake
new file mode 100644
index 0000000..3667745
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_OBJCXX_LINKER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+include(OBJCXX-common.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake
new file mode 100644
index 0000000..8f2bf63
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake
@@ -0,0 +1,37 @@
+include(RunCMake)
+
+function(run_linker_launcher lang)
+ # Preserve build tree so we can reuse it for the ${lang}-Build subtest below
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${lang}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ run_cmake(${lang})
+
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
+ if("${RunCMake_GENERATOR}" MATCHES "Ninja")
+ set(verbose_args -- -v)
+ endif()
+ run_cmake_command(${lang}-Build ${CMAKE_COMMAND} --build . ${verbose_args})
+endfunction()
+
+function(run_linker_launcher_env lang)
+ string(REGEX REPLACE "-.*" "" core_lang "${lang}")
+ set(ENV{CMAKE_${core_lang}_LINKER_LAUNCHER} "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+ run_linker_launcher(${lang})
+ unset(ENV{CMAKE_${core_lang}_LINKER_LAUNCHER})
+endfunction()
+
+set(langs C CXX)
+if(CMake_TEST_OBJC)
+ list(APPEND langs OBJC OBJCXX)
+endif()
+
+foreach(lang ${langs})
+ run_linker_launcher(${lang})
+ run_linker_launcher_env(${lang}-env)
+ if(NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
+ run_linker_launcher(${lang}-launch)
+ run_linker_launcher_env(${lang}-launch-env)
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/LinkerLauncher/main.c b/Tests/RunCMake/LinkerLauncher/main.c
new file mode 100644
index 0000000..8488f4e
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/main.c
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/LinkerLauncher/main.cxx b/Tests/RunCMake/LinkerLauncher/main.cxx
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/main.cxx
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/LinkerLauncher/main.m b/Tests/RunCMake/LinkerLauncher/main.m
new file mode 100644
index 0000000..8488f4e
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/main.m
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/LinkerLauncher/main.mm b/Tests/RunCMake/LinkerLauncher/main.mm
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/RunCMake/LinkerLauncher/main.mm
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake b/Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake
index 189de64..51f4f52 100644
--- a/Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake
+++ b/Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake
@@ -1,5 +1,10 @@
set(log "${RunCMake_BINARY_DIR}/CustomCommandDepfile-build/build.ninja")
file(READ "${log}" build_file)
+
+set(RunCMake_TEST_FAILED)
if(NOT "${build_file}" MATCHES "depfile = test\\.d")
- set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: depfile = test.d")
+ list(APPEND RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: depfile = test.d")
+endif()
+if(NOT "${build_file}" MATCHES "depfile = test_Debug\\.d")
+ list(APPEND RunCMake_TEST_FAILED "\nLog file:\n ${log}\ndoes not have expected line: depfile = test_Debug.d")
endif()
diff --git a/Tests/RunCMake/Ninja/CustomCommandDepfile.cmake b/Tests/RunCMake/Ninja/CustomCommandDepfile.cmake
index dbef2a5..0838d14 100644
--- a/Tests/RunCMake/Ninja/CustomCommandDepfile.cmake
+++ b/Tests/RunCMake/Ninja/CustomCommandDepfile.cmake
@@ -6,6 +6,17 @@ add_custom_command(
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
DEPFILE "test.d"
)
-add_custom_target(copy ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/hello.copy.c")
+
+add_custom_command(
+ OUTPUT hello.copy2.c
+ COMMAND "${CMAKE_COMMAND}" -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/hello.c"
+ hello.copy2.c
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ DEPFILE "test_$<CONFIG>.d"
+ )
+
+add_custom_target(copy ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/hello.copy.c"
+ "${CMAKE_CURRENT_BINARY_DIR}/hello.copy2.c")
include(CheckNoPrefixSubDir.cmake)
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 0c0619d..3f239b9 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -18,6 +18,9 @@ else()
message(FATAL_ERROR "'ninja --version' reported:\n${ninja_out}")
endif()
+# Sanitize NINJA_STATUS since we expect default behavior.
+unset(ENV{NINJA_STATUS})
+
if(CMAKE_HOST_WIN32)
run_cmake(SelectCompilerWindows)
else()
@@ -67,7 +70,7 @@ run_CMP0058(WARN-by)
run_CMP0058(NEW-no)
run_CMP0058(NEW-by)
-run_cmake(CustomCommandDepfile)
+run_cmake_with_options(CustomCommandDepfile -DCMAKE_BUILD_TYPE=Debug)
run_cmake(CustomCommandJobPool)
run_cmake(JobPoolUsesTerminal)
@@ -163,12 +166,12 @@ run_LooseObjectDepends()
function (run_AssumedSources)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AssumedSources-build)
run_cmake(AssumedSources)
- run_ninja("${RunCMake_TEST_BINARY_DIR}" "target.c")
+ run_ninja("${RunCMake_TEST_BINARY_DIR}" "${RunCMake_TEST_BINARY_DIR}/target.c")
if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/target.c")
message(FATAL_ERROR
"Dependencies for an assumed source did not hook up properly for 'target.c'.")
endif ()
- run_ninja("${RunCMake_TEST_BINARY_DIR}" "target-no-depends.c")
+ run_ninja("${RunCMake_TEST_BINARY_DIR}" "${RunCMake_TEST_BINARY_DIR}/target-no-depends.c")
if (EXISTS "${RunCMake_TEST_BINARY_DIR}/target-no-depends.c")
message(FATAL_ERROR
"Dependencies for an assumed source were magically hooked up for 'target-no-depends.c'.")
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake
index c595b10..a7837ca 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake
@@ -1,5 +1,10 @@
set(log "${RunCMake_BINARY_DIR}/CustomCommandDepfile-build/CMakeFiles/impl-Debug.ninja")
file(READ "${log}" build_file)
+
+set(RunCMake_TEST_FAILED)
if(NOT "${build_file}" MATCHES "depfile = test\\.d")
- set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: depfile = test.d")
+ list(APPEND RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: depfile = test.d")
+endif()
+if(NOT "${build_file}" MATCHES "depfile = test_Debug\\.d")
+ list(APPEND RunCMake_TEST_FAILED "\nLog file:\n ${log}\ndoes not have expected line: depfile = test_Debug.d")
endif()
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake
index 1a42670..4f8c114 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake
@@ -6,4 +6,15 @@ add_custom_command(
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
DEPFILE "test.d"
)
-add_custom_target(copy ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/main.copy.c")
+
+add_custom_command(
+ OUTPUT main.copy2.c
+ COMMAND "${CMAKE_COMMAND}" -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/main.c"
+ main.copy2.c
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ DEPFILE "test_$<CONFIG>.d"
+ )
+
+add_custom_target(copy ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/main.copy.c"
+ "${CMAKE_CURRENT_BINARY_DIR}/main.copy2.c")
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index e7acbc2..7c100eb 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -5,6 +5,9 @@ include(RunCMake)
set(RunCMake_GENERATOR "Ninja Multi-Config")
set(RunCMake_GENERATOR_IS_MULTI_CONFIG 1)
+# Sanitize NINJA_STATUS since we expect default behavior.
+unset(ENV{NINJA_STATUS})
+
function(check_files dir)
cmake_parse_arguments(_check_files "" "" "INCLUDE;EXCLUDE" ${ARGN})
@@ -98,6 +101,7 @@ run_cmake_build(Simple all-configs Release simplestatic:all)
run_ninja(Simple default-build-file build.ninja simpleexe)
run_cmake_build(Simple all-clean Release clean:all)
run_cmake_build(Simple debug-subdir Debug SimpleSubdir/all)
+run_ninja(Simple debug-in-release-graph-target build-Release.ninja simpleexe2:Debug)
run_ninja(Simple release-in-minsizerel-graph-subdir build-MinSizeRel.ninja SimpleSubdir/all:Release)
run_cmake_build(Simple all-subdir Release SimpleSubdir/all:all)
run_ninja(Simple minsizerel-top build-MinSizeRel.ninja all)
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-all-subdir-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-all-subdir-build-check.cmake
index de4505c..0cb6ad2 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-all-subdir-build-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-all-subdir-build-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -14,6 +17,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -23,6 +29,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_MinSizeRel}
${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
+ ${TARGET_FILE_simpleexe2_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
${TARGET_FILE_simpleshared_MinSizeRel}
${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -32,6 +41,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
${TARGET_FILE_simpleshared_RelWithDebInfo}
${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-all-top-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-all-top-ninja-check.cmake
index c171e3d..d27c1ca 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-all-top-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-all-top-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -31,6 +37,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_MinSizeRel}
${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
+ ${TARGET_FILE_simpleexe2_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
${TARGET_FILE_simpleshared_MinSizeRel}
${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -44,6 +53,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
${TARGET_FILE_simpleshared_RelWithDebInfo}
${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-target-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-target-ninja-check.cmake
new file mode 100644
index 0000000..8de8fde
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-target-ninja-check.cmake
@@ -0,0 +1,37 @@
+check_files("${RunCMake_TEST_BINARY_DIR}"
+ INCLUDE
+ ${GENERATED_FILES}
+
+ ${TARGET_FILE_simpleexe_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe_Debug}
+
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
+ ${TARGET_FILE_simpleshared_Debug}
+ ${TARGET_LINKER_FILE_simpleshared_Debug}
+ ${TARGET_OBJECT_FILES_simpleshared_Debug}
+
+ ${TARGET_OBJECT_FILES_simpleobj_Debug}
+
+ EXCLUDE
+ ${TARGET_OBJECT_FILES_simplestatic_Debug}
+
+ ${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleshared_Release}
+ ${TARGET_OBJECT_FILES_simplestatic_Release}
+ ${TARGET_OBJECT_FILES_simpleobj_Release}
+
+ ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simplestatic_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleobj_MinSizeRel}
+
+ ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simplestatic_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleobj_RelWithDebInfo}
+ )
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-top-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-top-build-check.cmake
index fe980fe..d2cb846 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-top-build-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-top-build-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -27,6 +33,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_MinSizeRel}
${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
+ ${TARGET_FILE_simpleexe2_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
${TARGET_FILE_simpleshared_MinSizeRel}
${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -40,6 +49,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
${TARGET_FILE_simpleshared_RelWithDebInfo}
${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-debug-subdir-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-debug-subdir-build-check.cmake
index 6bb7773..6a0190f 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-debug-subdir-build-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-debug-subdir-build-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-all-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-all-ninja-check.cmake
index 4e6e654..aec10ee 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-all-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-all-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -31,6 +37,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
${TARGET_FILE_simpleshared_RelWithDebInfo}
${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-minsizerel-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-minsizerel-ninja-check.cmake
index c09ae65..b46a708 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-minsizerel-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-minsizerel-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-ninja-check.cmake
index 43213dd..9d124cd 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -31,6 +37,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_MinSizeRel}
${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
+ ${TARGET_FILE_simpleexe2_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
${TARGET_FILE_simpleshared_MinSizeRel}
${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-minsizerel-top-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-minsizerel-top-ninja-check.cmake
index bf4be49..496d722 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-minsizerel-top-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-minsizerel-top-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -14,6 +17,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -23,6 +29,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_MinSizeRel}
${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
+ ${TARGET_FILE_simpleexe2_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
${TARGET_FILE_simpleshared_MinSizeRel}
${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -36,6 +45,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
${TARGET_FILE_simpleshared_RelWithDebInfo}
${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-release-in-minsizerel-graph-subdir-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-release-in-minsizerel-graph-subdir-ninja-check.cmake
index b6c77ab..29c0187 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-release-in-minsizerel-graph-subdir-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-release-in-minsizerel-graph-subdir-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -14,6 +17,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple.cmake
index 3f4ecbe..e2d393b 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple.cmake
@@ -10,6 +10,6 @@ add_subdirectory(SimpleSubdir)
add_library(simplestatic STATIC simplelib.c)
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
-generate_output_files(simpleexe simpleshared simplestatic simpleobj)
+generate_output_files(simpleexe simpleexe2 simpleshared simplestatic simpleobj)
file(APPEND "${CMAKE_BINARY_DIR}/target_files.cmake" "set(GENERATED_FILES [==[${CMAKE_BINARY_DIR}/empty.cmake]==])\n")
diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-all-in-release-graph-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-all-in-release-graph-build-check.cmake
index fee5951..67326d9 100644
--- a/Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-all-in-release-graph-build-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-all-in-release-graph-build-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -17,6 +20,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-relwithdebinfo-in-release-graph-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-relwithdebinfo-in-release-graph-build-check.cmake
index fee5951..67326d9 100644
--- a/Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-relwithdebinfo-in-release-graph-build-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-relwithdebinfo-in-release-graph-build-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -17,6 +20,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAlias-all-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAlias-all-ninja-check.cmake
index c171e3d..d27c1ca 100644
--- a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAlias-all-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAlias-all-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -31,6 +37,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_MinSizeRel}
${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
+ ${TARGET_FILE_simpleexe2_MinSizeRel}
+ ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
${TARGET_FILE_simpleshared_MinSizeRel}
${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -44,6 +53,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
${TARGET_FILE_simpleshared_RelWithDebInfo}
${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake
index 8ffdd20..4e4ec82 100644
--- a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -17,6 +20,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-relwithdebinfo-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-relwithdebinfo-ninja-check.cmake
index 9e5baf9..b1789b0 100644
--- a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-relwithdebinfo-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-relwithdebinfo-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Debug}
${TARGET_OBJECT_FILES_simpleexe_Debug}
+ ${TARGET_FILE_simpleexe2_Debug}
+ ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
${TARGET_FILE_simpleshared_Debug}
${TARGET_LINKER_FILE_simpleshared_Debug}
${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -17,6 +20,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_Release}
${TARGET_OBJECT_FILES_simpleexe_Release}
+ ${TARGET_FILE_simpleexe2_Release}
+ ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
${TARGET_FILE_simpleshared_Release}
${TARGET_LINKER_FILE_simpleshared_Release}
${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -29,6 +35,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
${TARGET_FILE_simpleshared_RelWithDebInfo}
${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-clean-configs-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-clean-configs-ninja-check.cmake
index 3829d3e..9016cf4 100644
--- a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-clean-configs-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-clean-configs-ninja-check.cmake
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_FILE_simpleexe_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+ ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+ ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
${TARGET_FILE_simpleshared_RelWithDebInfo}
${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleSubdir/CMakeLists.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleSubdir/CMakeLists.txt
index 7e754a3..d81f5ab 100644
--- a/Tests/RunCMake/NinjaMultiConfig/SimpleSubdir/CMakeLists.txt
+++ b/Tests/RunCMake/NinjaMultiConfig/SimpleSubdir/CMakeLists.txt
@@ -1,4 +1,8 @@
-add_library(simpleobj OBJECT ../empty.c)
-add_executable(simpleexe ../main.c $<TARGET_OBJECTS:simpleobj>)
+add_library(simpleobj OBJECT ../empty.c "$<$<CONFIG:Debug>:../empty_dbg.c>" "$<$<CONFIG:Release>:../empty_rel.c>")
add_library(simpleshared SHARED ../simplelib.c)
+
+add_executable(simpleexe ../main.c $<TARGET_OBJECTS:simpleobj>)
target_link_libraries(simpleexe PRIVATE simpleshared)
+
+add_executable(simpleexe2 ../main.c)
+target_link_libraries(simpleexe2 PRIVATE simpleshared $<TARGET_OBJECTS:simpleobj>)
diff --git a/Tests/RunCMake/NinjaMultiConfig/empty_dbg.c b/Tests/RunCMake/NinjaMultiConfig/empty_dbg.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/empty_dbg.c
diff --git a/Tests/RunCMake/NinjaMultiConfig/empty_rel.c b/Tests/RunCMake/NinjaMultiConfig/empty_rel.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/empty_rel.c
diff --git a/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt
index 4dbd861..6a7c171 100644
--- a/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at BadSourceExpression3.cmake:2 \(add_library\):
\$<TARGET_OBJECTS:NotObjLib>
- Objects of target "NotObjLib" referenced but is not an allowed library
- types \(EXECUTABLE, STATIC, SHARED, MODULE, OBJECT\).
+ Objects of target "NotObjLib" referenced but is not one of the allowed
+ target types \(EXECUTABLE, STATIC, SHARED, MODULE, OBJECT\).
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt b/Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt
index 69230b6..5c27b8a 100644
--- a/Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt
@@ -1,19 +1,7 @@
-^CMake Error at OwnSources.cmake:[0-9]+ \(add_library\):
+^(CMake Error at OwnSources.cmake:[0-9]+ \(add_library\):
The SOURCES of "A" use a generator expression that depends on the SOURCES
themselves.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
-+
-CMake Error at OwnSources.cmake:[0-9]+ \(add_library\):
- The SOURCES of "A" use a generator expression that depends on the SOURCES
- themselves.
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)
-+
-CMake Error at OwnSources.cmake:[0-9]+ \(add_library\):
- The SOURCES of "A" use a generator expression that depends on the SOURCES
- themselves.
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)
-+
++)+
CMake Generate step failed\. Build files cannot be regenerated correctly\.$
diff --git a/Tests/RunCMake/ParseImplicitData/linux-C-GNU-10.2.1-static-libgcc.input b/Tests/RunCMake/ParseImplicitData/linux-C-GNU-10.2.1-static-libgcc.input
new file mode 100644
index 0000000..0aaf05e
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitData/linux-C-GNU-10.2.1-static-libgcc.input
@@ -0,0 +1,74 @@
+CMAKE_LANG=C
+CMAKE_LINKER=/usr/bin/ld
+CMAKE_C_COMPILER_ABI=ELF
+CMAKE_C_COMPILER_AR=/usr/bin/gcc-ar-10
+CMAKE_C_COMPILER_ARCHITECTURE_ID=
+CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN=
+CMAKE_C_COMPILER_ID=GNU
+CMAKE_C_COMPILER_LAUNCHER=
+CMAKE_C_COMPILER_LOADED=1
+CMAKE_C_COMPILER_RANLIB=/usr/bin/gcc-ranlib-10
+CMAKE_C_COMPILER_TARGET=
+CMAKE_C_COMPILER_VERSION=10.2.1
+CMAKE_C_COMPILER_VERSION_INTERAL=
+Change Dir: /tmp/ii/CMakeFiles/CMakeTmp
+
+Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_2fff5/fast && /usr/bin/gmake -f CMakeFiles/cmTC_2fff5.dir/build.make CMakeFiles/cmTC_2fff5.dir/build
+gmake[1]: Entering directory '/tmp/ii/CMakeFiles/CMakeTmp'
+Building C object CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o
+/usr/bin/gcc -static-libgcc -v -o CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o -c "/tmp/CMake/Modules/CMakeCCompilerABI.c"
+Using built-in specs.
+COLLECT_GCC=/usr/bin/gcc
+OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
+OFFLOAD_TARGET_DEFAULT=1
+Target: x86_64-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
+Thread model: posix
+Supported LTO compression algorithms: zlib zstd
+gcc version 10.2.1 20210110 (Debian 10.2.1-6)
+COLLECT_GCC_OPTIONS='-static-libgcc' '-v' '-o' 'CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/10/cc1 -quiet -v -imultiarch x86_64-linux-gnu /tmp/CMake/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -o /tmp/cc1V18pC.s
+GNU C17 (Debian 10.2.1-6) version 10.2.1 20210110 (x86_64-linux-gnu)
+ compiled by GNU C version 10.2.1 20210110, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP
+
+GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
+ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/10/include-fixed"
+ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include"
+#include "..." search starts here:
+#include <...> search starts here:
+ /usr/lib/gcc/x86_64-linux-gnu/10/include
+ /usr/local/include
+ /usr/include/x86_64-linux-gnu
+ /usr/include
+End of search list.
+GNU C17 (Debian 10.2.1-6) version 10.2.1 20210110 (x86_64-linux-gnu)
+ compiled by GNU C version 10.2.1 20210110, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP
+
+GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+Compiler executable checksum: 1f803793fa2e3418c492b25e7d3eac2f
+COLLECT_GCC_OPTIONS='-static-libgcc' '-v' '-o' 'CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
+ as -v --64 -o CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o /tmp/cc1V18pC.s
+GNU assembler version 2.35.2 (x86_64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.35.2
+COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/
+LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../:/lib/:/usr/lib/
+COLLECT_GCC_OPTIONS='-static-libgcc' '-v' '-o' 'CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
+Linking C executable cmTC_2fff5
+"/tmp/CMake/bin/cmake" -E cmake_link_script CMakeFiles/cmTC_2fff5.dir/link.txt --verbose=1
+/usr/bin/gcc -static-libgcc -v -rdynamic CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o -o cmTC_2fff5
+Using built-in specs.
+COLLECT_GCC=/usr/bin/gcc
+COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
+OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
+OFFLOAD_TARGET_DEFAULT=1
+Target: x86_64-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
+Thread model: posix
+Supported LTO compression algorithms: zlib zstd
+gcc version 10.2.1 20210110 (Debian 10.2.1-6)
+COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/
+LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../:/lib/:/usr/lib/
+COLLECT_GCC_OPTIONS='-static-libgcc' '-v' '-rdynamic' '-o' 'cmTC_2fff5' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/10/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper -plugin-opt=-fresolution=/tmp/cc0iqkvc.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_2fff5 /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/10 -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/10/../../.. CMakeFiles/cmTC_2fff5.dir/CMakeCCompilerABI.c.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc/x86_64-linux-gnu/10/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crtn.o
+COLLECT_GCC_OPTIONS='-static-libgcc' '-v' '-rdynamic' '-o' 'cmTC_2fff5' '-mtune=generic' '-march=x86-64'
+gmake[1]: Leaving directory '/tmp/ii/CMakeFiles/CMakeTmp'
diff --git a/Tests/RunCMake/ParseImplicitData/linux-CXX-GNU-10.2.1-static-libstdc++.input b/Tests/RunCMake/ParseImplicitData/linux-CXX-GNU-10.2.1-static-libstdc++.input
new file mode 100644
index 0000000..387f149
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitData/linux-CXX-GNU-10.2.1-static-libstdc++.input
@@ -0,0 +1,79 @@
+CMAKE_LANG=CXX
+CMAKE_LINKER=/usr/bin/ld
+CMAKE_CXX_COMPILER_ABI=ELF
+CMAKE_CXX_COMPILER_AR=/usr/bin/gcc-ar-10
+CMAKE_CXX_COMPILER_ARCHITECTURE_ID=
+CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN=
+CMAKE_CXX_COMPILER_ID=GNU
+CMAKE_CXX_COMPILER_LAUNCHER=
+CMAKE_CXX_COMPILER_LOADED=1
+CMAKE_CXX_COMPILER_RANLIB=/usr/bin/gcc-ranlib-10
+CMAKE_CXX_COMPILER_TARGET=
+CMAKE_CXX_COMPILER_VERSION=10.2.1
+CMAKE_CXX_COMPILER_VERSION_INTERAL=
+CMAKE_CXX_IMPLICIT_LINK_LIBRARY_stdc++=/usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.a
+Change Dir: /tmp/ii/CMakeFiles/CMakeTmp
+
+Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_339dd/fast && /usr/bin/gmake -f CMakeFiles/cmTC_339dd.dir/build.make CMakeFiles/cmTC_339dd.dir/build
+gmake[1]: Entering directory '/tmp/ii/CMakeFiles/CMakeTmp'
+Building CXX object CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o
+/usr/bin/g++ -static-libstdc++ -v -o CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o -c "/tmp/CMake/Modules/CMakeCXXCompilerABI.cpp"
+Using built-in specs.
+COLLECT_GCC=/usr/bin/g++
+OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
+OFFLOAD_TARGET_DEFAULT=1
+Target: x86_64-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
+Thread model: posix
+Supported LTO compression algorithms: zlib zstd
+gcc version 10.2.1 20210110 (Debian 10.2.1-6)
+COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/10/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /tmp/CMake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o -version -fasynchronous-unwind-tables -o /tmp/ccjKk4SK.s
+GNU C++14 (Debian 10.2.1-6) version 10.2.1 20210110 (x86_64-linux-gnu)
+ compiled by GNU C version 10.2.1 20210110, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP
+
+GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/10"
+ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
+ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/10/include-fixed"
+ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include"
+#include "..." search starts here:
+#include <...> search starts here:
+ /usr/include/c++/10
+ /usr/include/x86_64-linux-gnu/c++/10
+ /usr/include/c++/10/backward
+ /usr/lib/gcc/x86_64-linux-gnu/10/include
+ /usr/local/include
+ /usr/include/x86_64-linux-gnu
+ /usr/include
+End of search list.
+GNU C++14 (Debian 10.2.1-6) version 10.2.1 20210110 (x86_64-linux-gnu)
+ compiled by GNU C version 10.2.1 20210110, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP
+
+GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+Compiler executable checksum: 048fcaee3460a99eb0d68522358720e1
+COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ as -v --64 -o CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccjKk4SK.s
+GNU assembler version 2.35.2 (x86_64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.35.2
+COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/
+LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../:/lib/:/usr/lib/
+COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+Linking CXX executable cmTC_339dd
+"/tmp/CMake/bin/cmake" -E cmake_link_script CMakeFiles/cmTC_339dd.dir/link.txt --verbose=1
+/usr/bin/g++ -static-libstdc++ -v -rdynamic CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_339dd
+Using built-in specs.
+COLLECT_GCC=/usr/bin/g++
+COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
+OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
+OFFLOAD_TARGET_DEFAULT=1
+Target: x86_64-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
+Thread model: posix
+Supported LTO compression algorithms: zlib zstd
+gcc version 10.2.1 20210110 (Debian 10.2.1-6)
+COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/
+LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../:/lib/:/usr/lib/
+COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_339dd' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/10/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper -plugin-opt=-fresolution=/tmp/cc0slq0h.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_339dd /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/10 -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/10/../../.. CMakeFiles/cmTC_339dd.dir/CMakeCXXCompilerABI.cpp.o -Bstatic -lstdc++ -Bdynamic -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/10/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crtn.o
+COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_339dd' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+gmake[1]: Leaving directory '/tmp/ii/CMakeFiles/CMakeTmp'
diff --git a/Tests/RunCMake/ParseImplicitData/linux-Fortran-GNU-10.2.1-static-libgfortran.input b/Tests/RunCMake/ParseImplicitData/linux-Fortran-GNU-10.2.1-static-libgfortran.input
new file mode 100644
index 0000000..16b38d2
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitData/linux-Fortran-GNU-10.2.1-static-libgfortran.input
@@ -0,0 +1,79 @@
+CMAKE_LANG=Fortran
+CMAKE_LINKER=/usr/bin/ld
+CMAKE_Fortran_COMPILER_ABI=
+CMAKE_Fortran_COMPILER_AR=/usr/bin/gcc-ar-10
+CMAKE_Fortran_COMPILER_ARCHITECTURE_ID=
+CMAKE_Fortran_COMPILER_EXTERNAL_TOOLCHAIN=
+CMAKE_Fortran_COMPILER_ID=GNU
+CMAKE_Fortran_COMPILER_LAUNCHER=
+CMAKE_Fortran_COMPILER_LOADED=1
+CMAKE_Fortran_COMPILER_RANLIB=/usr/bin/gcc-ranlib-10
+CMAKE_Fortran_COMPILER_TARGET=
+CMAKE_Fortran_COMPILER_VERSION=10.2.1
+CMAKE_Fortran_COMPILER_VERSION_INTERAL=
+CMAKE_Fortran_IMPLICIT_LINK_LIBRARY_gfortran=/usr/lib/gcc/x86_64-linux-gnu/10/libgfortran.a
+Change Dir: /tmp/ii/CMakeFiles/CMakeTmp
+
+Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_07a63/fast && /usr/bin/gmake -f CMakeFiles/cmTC_07a63.dir/build.make CMakeFiles/cmTC_07a63.dir/build
+gmake[1]: Entering directory '/tmp/ii/CMakeFiles/CMakeTmp'
+Building Fortran object CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o
+/usr/bin/gfortran -static-libgfortran -v -c "/tmp/CMake/Modules/CMakeFortranCompilerABI.F" -o CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o
+Using built-in specs.
+COLLECT_GCC=/usr/bin/gfortran
+OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
+OFFLOAD_TARGET_DEFAULT=1
+Target: x86_64-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
+Thread model: posix
+Supported LTO compression algorithms: zlib zstd
+gcc version 10.2.1 20210110 (Debian 10.2.1-6)
+COLLECT_GCC_OPTIONS='-static-libgfortran' '-v' '-c' '-o' 'CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/10/f951 /tmp/CMake/Modules/CMakeFortranCompilerABI.F -ffixed-form -cpp=/tmp/ccA5jWwS.f90 -quiet -v -imultiarch x86_64-linux-gnu /tmp/CMake/Modules/CMakeFortranCompilerABI.F -quiet -dumpbase CMakeFortranCompilerABI.F -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/10/finclude -fpre-include=/usr/include/finclude/x86_64-linux-gnu/math-vector-fortran.h -o /tmp/cclOgAvW.s
+GNU Fortran (Debian 10.2.1-6) version 10.2.1 20210110 (x86_64-linux-gnu)
+ compiled by GNU C version 10.2.1 20210110, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP
+
+GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
+ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/10/include-fixed"
+ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include"
+#include "..." search starts here:
+#include <...> search starts here:
+ /usr/lib/gcc/x86_64-linux-gnu/10/finclude
+ /usr/lib/gcc/x86_64-linux-gnu/10/include
+ /usr/local/include
+ /usr/include/x86_64-linux-gnu
+ /usr/include
+End of search list.
+GNU Fortran2008 (Debian 10.2.1-6) version 10.2.1 20210110 (x86_64-linux-gnu)
+ compiled by GNU C version 10.2.1 20210110, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP
+
+GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+COLLECT_GCC_OPTIONS='-static-libgfortran' '-v' '-c' '-o' 'CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64'
+ as -v --64 -o CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o /tmp/cclOgAvW.s
+GNU assembler version 2.35.2 (x86_64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.35.2
+COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/
+LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../:/lib/:/usr/lib/
+COLLECT_GCC_OPTIONS='-static-libgfortran' '-v' '-c' '-o' 'CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64'
+Linking Fortran executable cmTC_07a63
+"/tmp/CMake/bin/cmake" -E cmake_link_script CMakeFiles/cmTC_07a63.dir/link.txt --verbose=1
+/usr/bin/gfortran -v -static-libgfortran CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o -o cmTC_07a63
+Driving: /usr/bin/gfortran -v -static-libgfortran CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o -o cmTC_07a63 -Wl,-Bstatic -l gfortran -Wl,-Bdynamic -l m -shared-libgcc
+Using built-in specs.
+COLLECT_GCC=/usr/bin/gfortran
+COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
+OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
+OFFLOAD_TARGET_DEFAULT=1
+Target: x86_64-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
+Thread model: posix
+Supported LTO compression algorithms: zlib zstd
+gcc version 10.2.1 20210110 (Debian 10.2.1-6)
+Reading specs from /usr/lib/gcc/x86_64-linux-gnu/10/libgfortran.spec
+rename spec lib to liborig
+COLLECT_GCC_OPTIONS='-v' '-static-libgfortran' '-o' 'cmTC_07a63' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/
+LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/10/../../../:/lib/:/usr/lib/
+COLLECT_GCC_OPTIONS='-v' '-static-libgfortran' '-o' 'cmTC_07a63' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+ /usr/lib/gcc/x86_64-linux-gnu/10/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper -plugin-opt=-fresolution=/tmp/ccbtSp3p.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_07a63 /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/10 -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/10/../../.. CMakeFiles/cmTC_07a63.dir/CMakeFortranCompilerABI.F.o -Bstatic -lgfortran -Bdynamic -lm -lgcc_s -lgcc --as-needed -lquadmath --no-as-needed -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/10/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crtn.o
+COLLECT_GCC_OPTIONS='-v' '-static-libgfortran' '-o' 'cmTC_07a63' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
+gmake[1]: Leaving directory '/tmp/ii/CMakeFiles/CMakeTmp'
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
index 2d3abcc..e501f12 100644
--- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
@@ -23,6 +23,9 @@ set(targets
hand-C-empty hand-CXX-empty
hand-C-relative hand-CXX-relative
linux-C-GNU-7.3.0 linux-CXX-GNU-7.3.0 linux-Fortran-GNU-7.3.0
+ linux-C-GNU-10.2.1-static-libgcc
+ linux-CXX-GNU-10.2.1-static-libstdc++
+ linux-Fortran-GNU-10.2.1-static-libgfortran
linux-C-Intel-18.0.0.20170811 linux-CXX-Intel-18.0.0.20170811
linux-C-PGI-18.10.1 linux-CXX-PGI-18.10.1
linux-Fortran-PGI-18.10.1 linux_pgf77-Fortran-PGI-18.10.1
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-GNU-10.2.1-static-libgcc.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-GNU-10.2.1-static-libgcc.output
new file mode 100644
index 0000000..2f89e15
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-GNU-10.2.1-static-libgcc.output
@@ -0,0 +1 @@
+/usr/lib/gcc/x86_64-linux-gnu/10/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-GNU-10.2.1-static-libstdc++.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-GNU-10.2.1-static-libstdc++.output
new file mode 100644
index 0000000..b97cdc8
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-GNU-10.2.1-static-libstdc++.output
@@ -0,0 +1 @@
+/usr/include/c\+\+/10;/usr/include/x86_64-linux-gnu/c\+\+/10;/usr/include/c\+\+/10/backward;/usr/lib/gcc/x86_64-linux-gnu/10/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-GNU-10.2.1-static-libgfortran.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-GNU-10.2.1-static-libgfortran.output
new file mode 100644
index 0000000..34c33a7
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-GNU-10.2.1-static-libgfortran.output
@@ -0,0 +1 @@
+/usr/lib/gcc/x86_64-linux-gnu/10/finclude;/usr/lib/gcc/x86_64-linux-gnu/10/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
index 1f3468b..dcdc7f1 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
@@ -23,6 +23,9 @@ set(targets
hand-C-empty hand-CXX-empty
hand-C-relative hand-CXX-relative
linux-C-GNU-7.3.0 linux-CXX-GNU-7.3.0 linux-Fortran-GNU-7.3.0
+ linux-C-GNU-10.2.1-static-libgcc
+ linux-CXX-GNU-10.2.1-static-libstdc++
+ linux-Fortran-GNU-10.2.1-static-libgfortran
linux-C-Intel-18.0.0.20170811 linux-CXX-Intel-18.0.0.20170811
linux-C-PGI-18.10.1 linux-CXX-PGI-18.10.1
linux-Fortran-PGI-18.10.1 linux_pgf77-Fortran-PGI-18.10.1
@@ -67,7 +70,7 @@ function(load_compiler_info infile lang_var outcmvars_var outstr_var)
string(REGEX REPLACE "\r?\n" ";" in_lines "${in}")
foreach(line IN LISTS in_lines)
# check for special CMAKE variable lines and parse them if found
- if("${line}" MATCHES "^CMAKE_([_A-Za-z0-9]+)=(.*)$")
+ if("${line}" MATCHES "^CMAKE_([_A-Za-z0-9+]+)=(.*)$")
if("${CMAKE_MATCH_1}" STREQUAL "LANG") # handle CMAKE_LANG here
set(lang "${CMAKE_MATCH_2}")
else()
@@ -162,12 +165,12 @@ foreach(t ${targets})
if("${state}" STREQUAL "done")
message("empty parse failed: ${idirs}, log=${log}")
endif()
- elseif(NOT "${idirs}" STREQUAL "${idirs_output}")
- message("${t} parse failed: state=${state}, '${idirs}' does not match '${idirs_output}'")
- elseif(NOT "${implicit_libs}" STREQUAL "${implicit_lib_output}")
- message("${t} parse failed: state=${state}, '${implicit_libs}' does not match '${implicit_lib_output}'")
- elseif((library_arch OR library_arch_output) AND NOT "${library_arch}" STREQUAL "${library_arch_output}")
- message("${t} parse failed: state=${state}, '${library_arch}' does not match '${library_arch_output}'")
+ elseif(NOT "${idirs}" MATCHES "^${idirs_output}$")
+ message("${t} parse failed: state=${state}, '${idirs}' does not match '^${idirs_output}$'")
+ elseif(NOT "${implicit_libs}" MATCHES "^${implicit_lib_output}$")
+ message("${t} parse failed: state=${state}, '${implicit_libs}' does not match '^${implicit_lib_output}$'")
+ elseif((library_arch OR library_arch_output) AND NOT "${library_arch}" MATCHES "^${library_arch_output}$")
+ message("${t} parse failed: state=${state}, '${library_arch}' does not match '^${library_arch_output}$'")
endif()
unload_compiler_info("${cmvars}")
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XLClang-16.1.0.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XLClang-16.1.0.1.output
index 2dc5832..3a57464 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XLClang-16.1.0.1.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XLClang-16.1.0.1.output
@@ -1,2 +1,2 @@
-libs=xlopt;xlipa;xl;c++;Ccore;pthreads;m;c
+libs=xlopt;xlipa;xl;c\+\+;Ccore;pthreads;m;c
dirs=/opt/IBM/xlmass/9.1.0/lib/aix61;/opt/IBM/xlc/16.1.0/lib;/opt/IBM/xlC/16.1.0/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-8.7.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-8.7.output
index 674975c..0373d89 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-8.7.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-8.7.output
@@ -1,2 +1,2 @@
-libs=AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c++-rts;stdc++;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c++-rts;stdc++;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c++-rts;stdc++;m;csup;rt;atomic;stdc++;pthread;c;csup;m;gcc
+libs=AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c\+\+-rts;stdc\+\+;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c\+\+-rts;stdc\+\+;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c\+\+-rts;stdc\+\+;m;csup;rt;atomic;stdc\+\+;pthread;c;csup;m;gcc
dirs=/opt/gcc/6.1.0/snos/lib64;/opt/cray/pe/libsci/18.07.1/CRAY/8.6/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-cray/8.6/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/lib64;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/lib64;/opt/cray/dmapp/7.1.1-6.0.5.0_49.8__g1125556.ari/lib64;/opt/cray/pe/pmi/5.0.14/lib64;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/lib64;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/8.7.4/cce/x86_64/lib;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/lib64;/usr/lib64;/lib64;/opt/gcc/6.1.0/snos/lib/gcc/x86_64-suse-linux/6.1.0;/opt/cray/pe/cce/8.7.4/binutils/x86_64/x86_64-unknown-linux-gnu/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-9.0-hlist-ad.output
index 1bf2f6d..0f52e8b 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-9.0-hlist-ad.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-9.0-hlist-ad.output
@@ -1,2 +1,2 @@
-libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;atomic;tcmalloc_minimal;cray-c++-rts;stdc++;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc
+libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;atomic;tcmalloc_minimal;cray-c\+\+-rts;stdc\+\+;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc
dirs=/opt/gcc/8.1.0/snos/lib64;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.8/gni/mpich-cray/9.0/lib;/opt/cray/pe/libsci/19.06.1/CRAY/9.0/x86_64/lib;/opt/cray/rca/2.2.18-6.0.7.0_33.3__g2aa4f39.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/9.0.0/cce/x86_64/lib;/usr/lib64;/lib64;/opt/cray/pe/cce/9.0.0/cce-clang/x86_64/lib/clang/9.0.0/lib/linux;/opt/gcc/8.1.0/snos/lib/gcc/x86_64-suse-linux/8.1.0;/opt/cray/pe/cce/9.0.0/binutils/x86_64/x86_64-unknown-linux-gnu/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Intel-18.0.2.20180210.output
index e9e6739..5b8ae8d 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Intel-18.0.2.20180210.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Intel-18.0.2.20180210.output
@@ -1,2 +1,2 @@
-libs=imf;svml;irng;m;ipgo;decimal;cilkrts;stdc++;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
+libs=imf;svml;irng;m;ipgo;decimal;cilkrts;stdc\+\+;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
dirs=/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/lib/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64_lin;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0;/opt/gcc/6.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/6.3.0/snos/lib;/lib;/usr/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-8.7.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-8.7.output
index 7daa29d..00281d5 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-8.7.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-8.7.output
@@ -1,2 +1,2 @@
-libs=AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpichcxx_cray;rt;pthread;ugni;pmi;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c++-rts;stdc++;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c++-rts;stdc++;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c++-rts;stdc++;m;csup;rt;atomic;cray-c++-rts;stdc++;supc++;stdc++;pthread;c;csup;m;gcc
+libs=AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpichcxx_cray;rt;pthread;ugni;pmi;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c\+\+-rts;stdc\+\+;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c\+\+-rts;stdc\+\+;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c\+\+-rts;stdc\+\+;m;csup;rt;atomic;cray-c\+\+-rts;stdc\+\+;supc\+\+;stdc\+\+;pthread;c;csup;m;gcc
dirs=/opt/gcc/6.1.0/snos/lib64;/opt/cray/pe/libsci/18.07.1/CRAY/8.6/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-cray/8.6/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/lib64;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/lib64;/opt/cray/dmapp/7.1.1-6.0.5.0_49.8__g1125556.ari/lib64;/opt/cray/pe/pmi/5.0.14/lib64;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/lib64;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/8.7.4/cce/x86_64/lib;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/lib64;/usr/lib64;/lib64;/opt/gcc/6.1.0/snos/lib/gcc/x86_64-suse-linux/6.1.0;/opt/cray/pe/cce/8.7.4/binutils/x86_64/x86_64-unknown-linux-gnu/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-9.0-hlist-ad.output
index 958a6b1..a7287d3 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-9.0-hlist-ad.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-9.0-hlist-ad.output
@@ -1,2 +1,2 @@
-libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;mpichcxx_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;atomic;cray-c++-rts;cray-c++-rts;stdc++;supc++;tcmalloc_minimal;cray-c++-rts;stdc++;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc
+libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;mpichcxx_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;atomic;cray-c\+\+-rts;cray-c\+\+-rts;stdc\+\+;supc\+\+;tcmalloc_minimal;cray-c\+\+-rts;stdc\+\+;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc
dirs=/opt/gcc/8.1.0/snos/lib64;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.8/gni/mpich-cray/9.0/lib;/opt/cray/pe/libsci/19.06.1/CRAY/9.0/x86_64/lib;/opt/cray/rca/2.2.18-6.0.7.0_33.3__g2aa4f39.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/9.0.0/cce/x86_64/lib;/usr/lib64;/lib64;/opt/cray/pe/cce/9.0.0/cce-clang/x86_64/lib/clang/9.0.0/lib/linux;/opt/gcc/8.1.0/snos/lib/gcc/x86_64-suse-linux/8.1.0;/opt/cray/pe/cce/9.0.0/binutils/x86_64/x86_64-unknown-linux-gnu/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-GNU-7.3.0.output
index 40d0047..ead4804 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-GNU-7.3.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-GNU-7.3.0.output
@@ -1,2 +1,2 @@
-libs=AtpSigHandler;AtpSigHCommData;pthread;sci_gnu_71_mpi;sci_gnu_71;pthread;hugetlbfs;mpichcxx_gnu_71;rt;ugni;pthread;pmi;mpich_gnu_71;rt;ugni;pthread;pmi;pthread;alpslli;pthread;wlm_detect;alpsutil;pthread;rca;ugni;pthread;xpmem;udreg;gfortran;quadmath;mvec;m;pthread;stdc++;m;gcc;c
+libs=AtpSigHandler;AtpSigHCommData;pthread;sci_gnu_71_mpi;sci_gnu_71;pthread;hugetlbfs;mpichcxx_gnu_71;rt;ugni;pthread;pmi;mpich_gnu_71;rt;ugni;pthread;pmi;pthread;alpslli;pthread;wlm_detect;alpsutil;pthread;rca;ugni;pthread;xpmem;udreg;gfortran;quadmath;mvec;m;pthread;stdc\+\+;m;gcc;c
dirs=/opt/cray/pe/libsci/18.07.1/GNU/7.1/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-gnu/7.1/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/lib64;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/lib64;/opt/cray/pe/pmi/5.0.14/lib64;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/lib64;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/lib64;/opt/gcc/7.3.0/snos/lib/gcc/x86_64-suse-linux/7.3.0;/opt/gcc/7.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/7.3.0/snos/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Intel-18.0.2.20180210.output
index 6212844..1a3b736 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Intel-18.0.2.20180210.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Intel-18.0.2.20180210.output
@@ -1,2 +1,2 @@
-libs=imf;svml;irng;stdc++;m;ipgo;decimal;cilkrts;stdc++;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
+libs=imf;svml;irng;stdc\+\+;m;ipgo;decimal;cilkrts;stdc\+\+;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
dirs=/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/lib/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64_lin;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0;/opt/gcc/6.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/6.3.0/snos/lib;/lib;/usr/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-8.7.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-8.7.output
index 9828bf3..3b26f40 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-8.7.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-8.7.output
@@ -1,2 +1,2 @@
-libs=AtpSigHandler;AtpSigHCommData;rca;sci_cray_mpi_mp;sci_cray_mp;mpich_cray;mpichf90_cray;pgas-dmapp;quadmath;omp;craymp;modules;fi;craymath;f;u;csup;atomic;gfortran;tcmalloc_minimal;stdc++;pthread;c;csup;m;gcc
+libs=AtpSigHandler;AtpSigHCommData;rca;sci_cray_mpi_mp;sci_cray_mp;mpich_cray;mpichf90_cray;pgas-dmapp;quadmath;omp;craymp;modules;fi;craymath;f;u;csup;atomic;gfortran;tcmalloc_minimal;stdc\+\+;pthread;c;csup;m;gcc
dirs=/opt/gcc/6.1.0/snos/lib64;/opt/cray/pe/libsci/18.07.1/CRAY/8.6/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-cray/8.6/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/8.7.4/cce/x86_64/lib;/usr/lib64;/lib64;/opt/gcc/6.1.0/snos/lib/gcc/x86_64-suse-linux/6.1.0;/opt/cray/pe/cce/8.7.4/binutils/x86_64/x86_64-unknown-linux-gnu/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output
index 4675408..d15e5a7 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output
@@ -1,2 +1,2 @@
-libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;mpichf90_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;gfortran;tcmalloc_minimal;cray-c++-rts;stdc++;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc
+libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;mpichf90_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;gfortran;tcmalloc_minimal;cray-c\+\+-rts;stdc\+\+;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc
dirs=/opt/gcc/8.1.0/snos/lib64;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.8/gni/mpich-cray/9.0/lib;/opt/cray/pe/libsci/19.06.1/CRAY/9.0/x86_64/lib;/opt/cray/rca/2.2.18-6.0.7.0_33.3__g2aa4f39.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/9.0.0/cce/x86_64/lib;/usr/lib64;/lib64;/opt/cray/pe/cce/9.0.0/cce-clang/x86_64/lib/clang/9.0.0/lib/linux;/opt/gcc/8.1.0/snos/lib/gcc/x86_64-suse-linux/8.1.0;/opt/cray/pe/cce/9.0.0/binutils/x86_64/x86_64-unknown-linux-gnu/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output
index f75637c..47a362a 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output
@@ -1,2 +1,2 @@
-libs=c++
+libs=c\+\+
dirs=/usr/lib;/usr/local/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output
index f75637c..47a362a 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output
@@ -1,2 +1,2 @@
-libs=c++
+libs=c\+\+
dirs=/usr/lib;/usr/local/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-CXX-Clang-3.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-CXX-Clang-3.3.0.output
index b0b8e25..18d7cd1 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-CXX-Clang-3.3.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-CXX-Clang-3.3.0.output
@@ -1,2 +1,2 @@
-libs=c++;m;gcc;gcc_s;c;gcc;gcc_s
+libs=c\+\+;m;gcc;gcc_s;c;gcc;gcc_s
dirs=/usr/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-GNU-10.2.1-static-libgcc.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-GNU-10.2.1-static-libgcc.output
new file mode 100644
index 0000000..8bcd8b2
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-GNU-10.2.1-static-libgcc.output
@@ -0,0 +1,3 @@
+libs=gcc;c;gcc
+dirs=/usr/lib/gcc/x86_64-linux-gnu/10;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib
+library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output
index e613290..d78c9f4 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output
@@ -1,3 +1,3 @@
-libs=imf;svml;irng;m;ipgo;decimal;cilkrts;stdc++;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
+libs=imf;svml;irng;m;ipgo;decimal;cilkrts;stdc\+\+;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
dirs=/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/lib/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/lib/intel64/gcc4.7;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib;/lib
library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output
index 813457a..be6b906 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output
@@ -1,3 +1,3 @@
-libs=cudadevrt;cudart_static;rt;pthread;dl;stdc++;m;gcc_s;gcc;c;gcc_s;gcc
+libs=cudadevrt;cudart_static;rt;pthread;dl;stdc\+\+;m;gcc_s;gcc;c;gcc_s;gcc
dirs=/usr/local/cuda/targets/x86_64-linux/lib/stubs;/usr/local/cuda/targets/x86_64-linux/lib;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/lib/x86_64-linux-gnu;/lib/x86_64-linux-gnu;/lib64;/usr/lib;/usr/lib/llvm-8/lib;/lib
library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output
index 261785c..d3f3627 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output
@@ -1,3 +1,3 @@
-libs=cudadevrt;cudart_static;rt;pthread;dl;xlopt;xl;ibmc++;stdc++;m;dl;gcc_s;gcc;pthread;m;c;gcc_s;gcc
+libs=cudadevrt;cudart_static;rt;pthread;dl;xlopt;xl;ibmc\+\+;stdc\+\+;m;dl;gcc_s;gcc;pthread;m;c;gcc_s;gcc
dirs=/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib/stubs;/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib;/autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/xl-16.1.1-3/spectrum-mpi-10.3.0.1-20190611-aqjt3jo53mogrrhcrd2iufr435azcaha/lib;/autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-4.8.5/darshan-runtime-3.1.7-csygoqyym3m3ysoaperhxlhoiluvpa2u/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlsmp/5.1.1/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlmass/9.1.1/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlC/16.1.1/lib;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5;/usr/lib64;/lib64;/autofs/nccs-svm1_sw/peak/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-4.8.5/darshan-runtime-3.1.7-ytwv7xbkub6mqnpvygdthwqa7mhjqbc5/lib;/usr/lib
library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output
index 275fe40..958f41d 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output
@@ -1,3 +1,3 @@
-libs=cudadevrt;cudart_static;rt;pthread;dl;stdc++;m;gcc_s;gcc;c;gcc_s;gcc
+libs=cudadevrt;cudart_static;rt;pthread;dl;stdc\+\+;m;gcc_s;gcc;c;gcc_s;gcc
dirs=/usr/lib/x86_64-linux-gnu/stubs;/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib
library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-10.2.1-static-libstdc++.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-10.2.1-static-libstdc++.output
new file mode 100644
index 0000000..d38dfee
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-10.2.1-static-libstdc++.output
@@ -0,0 +1,3 @@
+libs=/usr/lib/gcc/x86_64-linux-gnu/10/libstdc\+\+.a;m;gcc_s;gcc;c;gcc_s;gcc
+dirs=/usr/lib/gcc/x86_64-linux-gnu/10;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib
+library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-7.3.0.output
index 4957f5c..f87ecff 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-7.3.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-7.3.0.output
@@ -1,3 +1,3 @@
-libs=stdc++;m;gcc_s;gcc;c;gcc_s;gcc
+libs=stdc\+\+;m;gcc_s;gcc;c;gcc_s;gcc
dirs=/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib
library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output
index 678a196..832f218 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output
@@ -1,3 +1,3 @@
-libs=imf;svml;irng;stdc++;m;ipgo;decimal;cilkrts;stdc++;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
+libs=imf;svml;irng;stdc\+\+;m;ipgo;decimal;cilkrts;stdc\+\+;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
dirs=/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/lib/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/lib/intel64/gcc4.7;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib;/lib
library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output
index e7f7d05..5e93f6d 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output
@@ -1,3 +1,3 @@
-libs=atomic;nvhpcatm;stdc++;nvomp;dl;nvhpcatm;atomic;pthread;nvcpumath;nsnvc;nvc;m;gcc;c;gcc;gcc_s
+libs=atomic;nvhpcatm;stdc\+\+;nvomp;dl;nvhpcatm;atomic;pthread;nvcpumath;nsnvc;nvc;m;gcc;c;gcc;gcc_s
dirs=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/9
library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-PGI-18.10.1.output
index cd15054..0e95961 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-PGI-18.10.1.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-PGI-18.10.1.output
@@ -1,3 +1,3 @@
-libs=atomic;pgatm;stdc++;pgmp;numa;pthread;pgmath;nspgc;pgc;m;gcc;c;gcc;gcc_s
+libs=atomic;pgatm;stdc\+\+;pgmp;numa;pthread;pgmath;nspgc;pgc;m;gcc;c;gcc;gcc_s
dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7
library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output
index 45c5565..34cab2e 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output
@@ -1,3 +1,3 @@
-libs=xlopt;xl;ibmc++;xlopt;xl;stdc++;m;dl;gcc_s;gcc;m;c;gcc_s;gcc;dl;gcc_s;gcc;m;c;gcc_s;gcc
+libs=xlopt;xl;ibmc\+\+;xlopt;xl;stdc\+\+;m;dl;gcc_s;gcc;m;c;gcc_s;gcc;dl;gcc_s;gcc;m;c;gcc_s;gcc
dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib
library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output
index 9d649ec..c754bda 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output
@@ -1,3 +1,3 @@
-libs=xlopt;xl;ibmc++;stdc++;m;dl;gcc_s;gcc;pthread;m;c;gcc_s;gcc
+libs=xlopt;xl;ibmc\+\+;stdc\+\+;m;dl;gcc_s;gcc;pthread;m;c;gcc_s;gcc
dirs=/opt/ibm/xlsmp/5.1.0/lib;/opt/ibm/xlmass/9.1.0/lib;/opt/ibm/xlC/16.1.0/lib;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib
library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-GNU-10.2.1-static-libgfortran.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-GNU-10.2.1-static-libgfortran.output
new file mode 100644
index 0000000..edeb20c
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-GNU-10.2.1-static-libgfortran.output
@@ -0,0 +1,3 @@
+libs=/usr/lib/gcc/x86_64-linux-gnu/10/libgfortran.a;m;gcc_s;gcc;quadmath;m;gcc_s;gcc;c;gcc_s;gcc
+dirs=/usr/lib/gcc/x86_64-linux-gnu/10;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib
+library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output
index a7c14d2..848e8c0 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output
@@ -1,3 +1,3 @@
-libs=atomic;pgatm;stdc++;pgmp;numa;pthread;pgmath;nspgc;pgc;m;gcc;c;gcc;gcc_s
+libs=atomic;pgatm;stdc\+\+;pgmp;numa;pthread;pgmath;nspgc;pgc;m;gcc;c;gcc;gcc_s
dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7
library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output
index 45c5565..34cab2e 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output
@@ -1,3 +1,3 @@
-libs=xlopt;xl;ibmc++;xlopt;xl;stdc++;m;dl;gcc_s;gcc;m;c;gcc_s;gcc;dl;gcc_s;gcc;m;c;gcc_s;gcc
+libs=xlopt;xl;ibmc\+\+;xlopt;xl;stdc\+\+;m;dl;gcc_s;gcc;m;c;gcc_s;gcc;dl;gcc_s;gcc;m;c;gcc_s;gcc
dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib
library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-CXX-GNU-4.9.3.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-CXX-GNU-4.9.3.output
index 5e79cc1..7852bfd 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-CXX-GNU-4.9.3.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-CXX-GNU-4.9.3.output
@@ -1,2 +1,2 @@
-libs=stdc++;mingw32;gcc_s;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;mingw32;gcc_s;gcc;moldname;mingwex
+libs=stdc\+\+;mingw32;gcc_s;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;mingw32;gcc_s;gcc;moldname;mingwex
dirs=C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3;C:/DoesNotExist/mingw/lib/gcc;C:/DoesNotExist/mingw/mingw32/lib;C:/DoesNotExist/mingw/lib
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-CXX-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-CXX-GNU-4.8.5.output
index d747e5b..c6a098e 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-CXX-GNU-4.8.5.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-CXX-GNU-4.8.5.output
@@ -1,2 +1,2 @@
-libs=stdc++;m;gcc_s;gcc;c;gcc_s;gcc
+libs=stdc\+\+;m;gcc_s;gcc;c;gcc_s;gcc
dirs=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output
index d747e5b..c6a098e 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output
@@ -1,2 +1,2 @@
-libs=stdc++;m;gcc_s;gcc;c;gcc_s;gcc
+libs=stdc\+\+;m;gcc_s;gcc;c;gcc_s;gcc
dirs=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output
index 4158973..711225c 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output
@@ -1,2 +1,2 @@
-libs=c++;c++abi;pthread;m;compiler_rt;c;compiler_rt
+libs=c\+\+;c\+\+abi;pthread;m;compiler_rt;c;compiler_rt
dirs=/usr/lib
diff --git a/Tests/RunCMake/PrecompileHeaders/PchIncludedAllLanguages.cmake b/Tests/RunCMake/PrecompileHeaders/PchIncludedAllLanguages.cmake
new file mode 100644
index 0000000..a455410
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchIncludedAllLanguages.cmake
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.15)
+project(PchIncludedAllLanguages C CXX)
+
+if(CMAKE_CXX_COMPILE_OPTIONS_USE_PCH)
+ add_definitions(-DHAVE_PCH_SUPPORT)
+endif()
+
+add_executable(main
+ main.cpp
+ pch-included.c
+ pch-included.cpp
+)
+target_precompile_headers(main PRIVATE pch.h)
+
+enable_testing()
+add_test(NAME main COMMAND main)
diff --git a/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe.cmake b/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe.cmake
new file mode 100644
index 0000000..b4fdb71
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe.cmake
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.16)
+project(PchLibObjLibExe CXX)
+
+foreach(i 1 2 3)
+ file(WRITE ${CMAKE_BINARY_DIR}/empty${i}.cpp "void nothing${i}() {}\n")
+endforeach()
+
+add_library(base_lib_static STATIC ${CMAKE_BINARY_DIR}/empty1.cpp)
+target_precompile_headers(base_lib_static PRIVATE <vector>)
+
+add_library(object_lib OBJECT ${CMAKE_BINARY_DIR}/empty2.cpp)
+target_precompile_headers(object_lib REUSE_FROM base_lib_static)
+
+add_library(mid_lib_static STATIC ${CMAKE_BINARY_DIR}/empty3.cpp)
+target_link_libraries(mid_lib_static PRIVATE object_lib)
+
+add_executable(exec main.cpp)
+target_link_libraries(exec PRIVATE mid_lib_static)
+set_target_properties(exec PROPERTIES MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>)
+
+target_precompile_headers(exec PRIVATE <string>)
+
+enable_testing()
+add_test(NAME exec COMMAND exec)
diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
index 8cc59d2..ca5b52e 100644
--- a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
@@ -28,3 +28,5 @@ if(RunCMake_GENERATOR MATCHES "Make|Ninja")
endif()
endif()
run_test(PchReuseFromObjLib)
+run_test(PchIncludedAllLanguages)
+run_test(PchLibObjLibExe)
diff --git a/Tests/RunCMake/PrecompileHeaders/pch-included.c b/Tests/RunCMake/PrecompileHeaders/pch-included.c
new file mode 100644
index 0000000..96fce69
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/pch-included.c
@@ -0,0 +1,8 @@
+#ifndef HAVE_PCH_SUPPORT
+# include "pch.h"
+#endif
+
+int testC(void)
+{
+ return PCH_INCLUDED;
+}
diff --git a/Tests/RunCMake/PrecompileHeaders/pch-included.cpp b/Tests/RunCMake/PrecompileHeaders/pch-included.cpp
new file mode 100644
index 0000000..bf4d95d
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/pch-included.cpp
@@ -0,0 +1,8 @@
+#ifndef HAVE_PCH_SUPPORT
+# include "pch.h"
+#endif
+
+int testCpp()
+{
+ return PCH_INCLUDED;
+}
diff --git a/Tests/RunCMake/PrecompileHeaders/pch.h b/Tests/RunCMake/PrecompileHeaders/pch.h
index 81b6d9e..20672d1 100644
--- a/Tests/RunCMake/PrecompileHeaders/pch.h
+++ b/Tests/RunCMake/PrecompileHeaders/pch.h
@@ -1,3 +1,5 @@
#pragma once
#define PCH_INCLUDED 1
+
+int testC(void);
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index ea94a5b..3363a57 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -23,10 +23,13 @@ function(run_cmake test)
endif()
string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} platform_name)
+ #remove all additional bits from cygwin/msys name
if(platform_name MATCHES cygwin)
- #remove all additional bits from cygwin name
set(platform_name cygwin)
endif()
+ if(platform_name MATCHES msys)
+ set(platform_name msys)
+ endif()
foreach(o out err)
if(RunCMake-std${o}-file AND EXISTS ${top_src}/${RunCMake-std${o}-file})
@@ -64,15 +67,6 @@ function(run_cmake test)
else()
include(${top_src}/${test}-prep.cmake OPTIONAL)
endif()
- if(NOT DEFINED RunCMake_TEST_OPTIONS)
- set(RunCMake_TEST_OPTIONS "")
- endif()
- if(APPLE)
- list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
- endif()
- if(RunCMake_MAKE_PROGRAM)
- list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}")
- endif()
if(RunCMake_TEST_OUTPUT_MERGE)
set(actual_stderr_var actual_stdout)
set(actual_stderr "")
@@ -91,50 +85,51 @@ function(run_cmake test)
else()
set(maybe_input_file "")
endif()
- if(RunCMake_TEST_COMMAND)
- if(NOT RunCMake_TEST_COMMAND_WORKING_DIRECTORY)
- set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ if(NOT RunCMake_TEST_COMMAND)
+ if(NOT DEFINED RunCMake_TEST_OPTIONS)
+ set(RunCMake_TEST_OPTIONS "")
endif()
- execute_process(
- COMMAND ${RunCMake_TEST_COMMAND}
- WORKING_DIRECTORY "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}"
- OUTPUT_VARIABLE actual_stdout
- ERROR_VARIABLE ${actual_stderr_var}
- RESULT_VARIABLE actual_result
- ENCODING UTF8
- ${maybe_timeout}
- ${maybe_input_file}
- )
- else()
- if(RunCMake_GENERATOR_INSTANCE)
- set(_D_CMAKE_GENERATOR_INSTANCE "-DCMAKE_GENERATOR_INSTANCE=${RunCMake_GENERATOR_INSTANCE}")
- else()
- set(_D_CMAKE_GENERATOR_INSTANCE "")
+ if(APPLE)
+ list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
+ endif()
+ if(RunCMake_MAKE_PROGRAM)
+ list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}")
endif()
+ set(RunCMake_TEST_COMMAND ${CMAKE_COMMAND})
if(NOT RunCMake_TEST_NO_SOURCE_DIR)
- set(maybe_source_dir "${RunCMake_TEST_SOURCE_DIR}")
- else()
- set(maybe_source_dir "")
+ list(APPEND RunCMake_TEST_COMMAND "${RunCMake_TEST_SOURCE_DIR}")
+ endif()
+ list(APPEND RunCMake_TEST_COMMAND -G "${RunCMake_GENERATOR}")
+ if(RunCMake_GENERATOR_PLATFORM)
+ list(APPEND RunCMake_TEST_COMMAND -A "${RunCMake_GENERATOR_PLATFORM}")
+ endif()
+ if(RunCMake_GENERATOR_TOOLSET)
+ list(APPEND RunCMake_TEST_COMMAND -T "${RunCMake_GENERATOR_TOOLSET}")
+ endif()
+ if(RunCMake_GENERATOR_INSTANCE)
+ list(APPEND RunCMake_TEST_COMMAND "-DCMAKE_GENERATOR_INSTANCE=${RunCMake_GENERATOR_INSTANCE}")
endif()
- execute_process(
- COMMAND ${CMAKE_COMMAND}
- ${maybe_source_dir}
- -G "${RunCMake_GENERATOR}"
- -A "${RunCMake_GENERATOR_PLATFORM}"
- -T "${RunCMake_GENERATOR_TOOLSET}"
- ${_D_CMAKE_GENERATOR_INSTANCE}
- -DRunCMake_TEST=${test}
- --no-warn-unused-cli
- ${RunCMake_TEST_OPTIONS}
- WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
- OUTPUT_VARIABLE actual_stdout
- ERROR_VARIABLE ${actual_stderr_var}
- RESULT_VARIABLE actual_result
- ENCODING UTF8
- ${maybe_timeout}
- ${maybe_input_file}
+ list(APPEND RunCMake_TEST_COMMAND
+ -DRunCMake_TEST=${test}
+ --no-warn-unused-cli
)
+ else()
+ set(RunCMake_TEST_OPTIONS "")
endif()
+ if(NOT RunCMake_TEST_COMMAND_WORKING_DIRECTORY)
+ set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ endif()
+ execute_process(
+ COMMAND ${RunCMake_TEST_COMMAND}
+ ${RunCMake_TEST_OPTIONS}
+ WORKING_DIRECTORY "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}"
+ OUTPUT_VARIABLE actual_stdout
+ ERROR_VARIABLE ${actual_stderr_var}
+ RESULT_VARIABLE actual_result
+ ENCODING UTF8
+ ${maybe_timeout}
+ ${maybe_input_file}
+ )
set(msg "")
if(NOT "${actual_result}" MATCHES "${expect_result}")
string(APPEND msg "Result is [${actual_result}], not [${expect_result}].\n")
@@ -160,6 +155,7 @@ function(run_cmake test)
"|contact PGI Sales at"
"|[^\n]*install_name_tool: warning: changes being made to the file will invalidate the code signature in:"
+ "|[^\n]*xcodebuild[^\n]*DVTPlugInManager"
"|[^\n]*xcodebuild[^\n]*warning: file type[^\n]*is based on missing file type"
"|[^\n]*objc[^\n]*: Class AMSupportURL[^\n]* One of the two will be used. Which one is undefined."
"|[^\n]*is a member of multiple groups"
@@ -191,14 +187,18 @@ function(run_cmake test)
if(RunCMake_TEST_FAILED)
set(msg "${RunCMake_TEST_FAILED}\n${msg}")
endif()
- if(msg AND RunCMake_TEST_COMMAND)
+ if(msg)
string(REPLACE ";" "\" \"" command "\"${RunCMake_TEST_COMMAND}\"")
+ if(RunCMake_TEST_OPTIONS)
+ string(REPLACE ";" "\" \"" options "\"${RunCMake_TEST_OPTIONS}\"")
+ string(APPEND command " ${options}")
+ endif()
string(APPEND msg "Command was:\n command> ${command}\n")
endif()
if(msg)
string(REGEX REPLACE "\n" "\n actual-out> " actual_out " actual-out> ${actual_stdout}")
string(REGEX REPLACE "\n" "\n actual-err> " actual_err " actual-err> ${actual_stderr}")
- message(SEND_ERROR "${test} - FAILED:\n"
+ message(SEND_ERROR "${test}${RunCMake_TEST_VARIANT_DESCRIPTION} - FAILED:\n"
"${msg}"
"${expect_out}"
"Actual stdout:\n${actual_out}\n"
@@ -206,7 +206,7 @@ function(run_cmake test)
"Actual stderr:\n${actual_err}\n"
)
else()
- message(STATUS "${test} - PASSED")
+ message(STATUS "${test}${RunCMake_TEST_VARIANT_DESCRIPTION} - PASSED")
endif()
endfunction()
diff --git a/Tests/RunCMake/RunCTest.cmake b/Tests/RunCMake/RunCTest.cmake
index 98fdf20..59db395 100644
--- a/Tests/RunCMake/RunCTest.cmake
+++ b/Tests/RunCMake/RunCTest.cmake
@@ -11,10 +11,13 @@ function(run_ctest CASE_NAME)
endif()
configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in
${RunCMake_BINARY_DIR}/${CASE_NAME}/CMakeLists.txt @ONLY)
+ if(NOT DEFINED RunCTest_VERBOSE_FLAG)
+ set(RunCTest_VERBOSE_FLAG "-V")
+ endif()
run_cmake_command(${CASE_NAME} ${CMAKE_CTEST_COMMAND}
-C Debug
-S ${RunCMake_BINARY_DIR}/${CASE_NAME}/test.cmake
- -V
+ ${RunCTest_VERBOSE_FLAG}
--output-log ${RunCMake_BINARY_DIR}/${CASE_NAME}-build/testOutput.log
--no-compress-output
${ARGN}
diff --git a/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt b/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
index 77c4afd..9145a56 100644
--- a/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
+++ b/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at NotObjlibTarget.cmake:[0-9]+ \(file\):
\$<TARGET_OBJECTS:IFaceLib>
- Objects of target "IFaceLib" referenced but is not an allowed library types
- \(EXECUTABLE, STATIC, SHARED, MODULE, OBJECT\).
+ Objects of target "IFaceLib" referenced but is not one of the allowed
+ target types \(EXECUTABLE, STATIC, SHARED, MODULE, OBJECT\).
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-NEW-stderr.txt b/Tests/RunCMake/ToolchainFile/CMP0126-NEW-stderr.txt
new file mode 100644
index 0000000..7b91b43
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-NEW-stderr.txt
@@ -0,0 +1 @@
+^try_compile CMP0126='NEW' VAR='1'
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-NEW-toolchain.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-NEW-toolchain.cmake
new file mode 100644
index 0000000..2f1ec86
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-NEW-toolchain.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-NEW.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-NEW.cmake
new file mode 100644
index 0000000..62d4df1
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0126 NEW)
+enable_language(C)
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-OLD-stderr.txt b/Tests/RunCMake/ToolchainFile/CMP0126-OLD-stderr.txt
new file mode 100644
index 0000000..f3c068a
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-OLD-stderr.txt
@@ -0,0 +1 @@
+^try_compile CMP0126='OLD' VAR='2'
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-OLD-toolchain.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-OLD-toolchain.cmake
new file mode 100644
index 0000000..2f1ec86
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-OLD-toolchain.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-OLD.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-OLD.cmake
new file mode 100644
index 0000000..ef821fe
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0126 OLD)
+enable_language(C)
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-WARN-stderr.txt b/Tests/RunCMake/ToolchainFile/CMP0126-WARN-stderr.txt
new file mode 100644
index 0000000..f3c068a
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-WARN-stderr.txt
@@ -0,0 +1 @@
+^try_compile CMP0126='OLD' VAR='2'
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-WARN-toolchain.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-WARN-toolchain.cmake
new file mode 100644
index 0000000..2f1ec86
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-WARN-toolchain.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-WARN.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-WARN.cmake
new file mode 100644
index 0000000..426e2b1
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-WARN.cmake
@@ -0,0 +1,2 @@
+# leave CMP0126 unset
+enable_language(C)
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-toolchain.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-toolchain.cmake
new file mode 100644
index 0000000..d5af14f
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CMP0126-toolchain.cmake
@@ -0,0 +1,7 @@
+get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
+if(_IN_TC)
+ cmake_policy(GET CMP0126 cmp0126)
+ set(VAR 1)
+ set(VAR 2 CACHE STRING "")
+ message("try_compile CMP0126='${cmp0126}' VAR='${VAR}'")
+endif()
diff --git a/Tests/RunCMake/ToolchainFile/LangVars-toolchain.cmake b/Tests/RunCMake/ToolchainFile/LangVars-toolchain.cmake
new file mode 100644
index 0000000..be07dc3
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/LangVars-toolchain.cmake
@@ -0,0 +1,2 @@
+set(C 1)
+set(CXX 1)
diff --git a/Tests/RunCMake/ToolchainFile/LangVars.cmake b/Tests/RunCMake/ToolchainFile/LangVars.cmake
new file mode 100644
index 0000000..169e639
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/LangVars.cmake
@@ -0,0 +1,7 @@
+foreach(test_language C CXX)
+ enable_language(${test_language})
+ if(DEFINED CMAKE_${test_language}_STANDARD_DEFAULT
+ AND NOT CMAKE_${test_language}_COMPILE_FEATURES)
+ message(FATAL_ERROR "Compile features not found for ${test_language}")
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
index 659523c..7744ee8 100644
--- a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
@@ -9,7 +9,11 @@ run_cmake_toolchain(CallEnableLanguage)
run_cmake_toolchain(CallProject)
run_cmake_toolchain(CheckLanguage)
run_cmake_toolchain(FlagsInit)
+run_cmake_toolchain(LangVars)
run_cmake_toolchain(LinkFlagsInit)
+run_cmake_toolchain(CMP0126-NEW)
+run_cmake_toolchain(CMP0126-OLD)
+run_cmake_toolchain(CMP0126-WARN)
function(run_IncludeDirectories)
run_cmake_toolchain(IncludeDirectories)
diff --git a/Tests/RunCMake/TransformDepfile/RunCMakeTest.cmake b/Tests/RunCMake/TransformDepfile/RunCMakeTest.cmake
index 9a38b95..1ce723b 100644
--- a/Tests/RunCMake/TransformDepfile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/TransformDepfile/RunCMakeTest.cmake
@@ -5,10 +5,6 @@ function(run_transform_depfile name)
run_cmake_command(${name}-gcc
${CMAKE_COMMAND} -E cmake_transform_depfile "${RunCMake_GENERATOR}" gccdepfile "${RunCMake_SOURCE_DIR}" "${RunCMake_SOURCE_DIR}/subdir" "${RunCMake_BINARY_DIR}" "${RunCMake_BINARY_DIR}/subdir" "${CMAKE_CURRENT_LIST_DIR}/${name}.d" out.d
)
- set(RunCMake-check-file vstlog.cmake)
- run_cmake_command(${name}-tlog
- ${CMAKE_COMMAND} -E cmake_transform_depfile "${RunCMake_GENERATOR}" vstlog "${RunCMake_SOURCE_DIR}" "${RunCMake_SOURCE_DIR}/subdir" "${RunCMake_BINARY_DIR}" "${RunCMake_BINARY_DIR}/subdir" "${CMAKE_CURRENT_LIST_DIR}/${name}.d" out.tlog
- )
endfunction()
if(WIN32)
diff --git a/Tests/RunCMake/TransformDepfile/deps-unix.tlog.txt b/Tests/RunCMake/TransformDepfile/deps-unix.tlog.txt
deleted file mode 100644
index 70bac5d..0000000
--- a/Tests/RunCMake/TransformDepfile/deps-unix.tlog.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^subdir/out1|/home/build/out2
-subdir/in1
-/home/build/in2
-^subdir/out3|/home/build/out4
-subdir/in3
-/home/build/in4
diff --git a/Tests/RunCMake/TransformDepfile/deps-windows.tlog.txt b/Tests/RunCMake/TransformDepfile/deps-windows.tlog.txt
deleted file mode 100644
index 09f9e97..0000000
--- a/Tests/RunCMake/TransformDepfile/deps-windows.tlog.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^subdir\out1|C:\build\out2
-subdir\in1
-C:\build\in2
-^subdir\out3|C:\build\out4
-subdir\in3
-C:\build\in4
diff --git a/Tests/RunCMake/TransformDepfile/invalid-tlog-result.txt b/Tests/RunCMake/TransformDepfile/invalid-tlog-result.txt
deleted file mode 100644
index 0cfbf08..0000000
--- a/Tests/RunCMake/TransformDepfile/invalid-tlog-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/Tests/RunCMake/TransformDepfile/vstlog.cmake b/Tests/RunCMake/TransformDepfile/vstlog.cmake
deleted file mode 100644
index afa78d0..0000000
--- a/Tests/RunCMake/TransformDepfile/vstlog.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-if(EXISTS "${RunCMake_SOURCE_DIR}/${name}.tlog.txt")
- file(READ "${RunCMake_SOURCE_DIR}/${name}.tlog.txt" expected_contents)
-
- if(EXISTS "${RunCMake_TEST_BINARY_DIR}/out.tlog")
- file(READ "${RunCMake_TEST_BINARY_DIR}/out.tlog" actual_contents)
- if(NOT actual_contents STREQUAL expected_contents)
- string(REPLACE "\n" "\n " p_expected_contents "${expected_contents}")
- string(REPLACE "\n" "\n " p_actual_contents "${actual_contents}")
- string(APPEND RunCMake_TEST_FAILED "Expected contents of ${RunCMake_TEST_BINARY_DIR}/out.tlog:\n ${p_expected_contents}\nActual contents:\n ${p_actual_contents}")
- endif()
- else()
- string(APPEND RunCMake_TEST_FAILED "${RunCMake_TEST_BINARY_DIR}/out.tlog should exist\n")
- endif()
-elseif(EXISTS "${RunCMake_TEST_BINARY_DIR}/out.tlog")
- string(APPEND RunCMake_TEST_FAILED "${RunCMake_TEST_BINARY_DIR}/out.tlog should not exist\n")
-endif()
diff --git a/Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt b/Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt
new file mode 100644
index 0000000..2afdc4f
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0078-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0078 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/UseSWIG/CMP0086-OLD-stderr.txt b/Tests/RunCMake/UseSWIG/CMP0086-OLD-stderr.txt
new file mode 100644
index 0000000..fca7a73
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0086-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0086-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0086 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/UseSWIG/CMP0122-NEW-check.cmake b/Tests/RunCMake/UseSWIG/CMP0122-NEW-check.cmake
new file mode 100644
index 0000000..a26c278
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0122-NEW-check.cmake
@@ -0,0 +1,10 @@
+
+cmake_policy(VERSION 3.1)
+
+file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CMP0122-library-name.txt" prefixes)
+
+list(GET prefixes 0 std_prefix)
+list(GET prefixes 1 lib_prefix)
+if (NOT std_prefix STREQUAL lib_prefix)
+ string (APPEND RunCMake_TEST_FAILED "\nFound prefix: '${lib_prefix}', expected: '${std_prefix}'.")
+endif()
diff --git a/Tests/RunCMake/UseSWIG/CMP0122-NEW.cmake b/Tests/RunCMake/UseSWIG/CMP0122-NEW.cmake
new file mode 100644
index 0000000..fecb7db
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0122-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0122 NEW)
+include(CMP0122-common.cmake)
diff --git a/Tests/RunCMake/UseSWIG/CMP0122-OLD-check.cmake b/Tests/RunCMake/UseSWIG/CMP0122-OLD-check.cmake
new file mode 100644
index 0000000..01657d0
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0122-OLD-check.cmake
@@ -0,0 +1,10 @@
+
+cmake_policy(VERSION 3.1)
+
+file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CMP0122-library-name.txt" prefixes)
+
+list(GET prefixes 1 lib_prefix)
+if (lib_prefix)
+ # prefix must be empty
+ string (APPEND RunCMake_TEST_FAILED "\nFound unexpected prefix: '${lib_prefix}'.")
+endif()
diff --git a/Tests/RunCMake/UseSWIG/CMP0122-OLD.cmake b/Tests/RunCMake/UseSWIG/CMP0122-OLD.cmake
new file mode 100644
index 0000000..a787b68
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0122-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0122 OLD)
+include(CMP0122-common.cmake)
diff --git a/Tests/RunCMake/UseSWIG/CMP0122-WARN-stderr.txt b/Tests/RunCMake/UseSWIG/CMP0122-WARN-stderr.txt
new file mode 100644
index 0000000..37c4fbd
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0122-WARN-stderr.txt
@@ -0,0 +1,10 @@
+CMake Warning \(dev\) at .*/Modules/UseSWIG.cmake:[0-9]+ \(message\):
+ Policy CMP0122 is not set: UseSWIG use standard library name conventions
+ for csharp language\. Run "cmake --help-policy CMP0122" for policy details\.
+ Use the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMP0122-common.cmake:9 \(swig_add_library\)
+ CMP0122-WARN.cmake:1 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/UseSWIG/CMP0122-WARN.cmake b/Tests/RunCMake/UseSWIG/CMP0122-WARN.cmake
new file mode 100644
index 0000000..5d571aa
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0122-WARN.cmake
@@ -0,0 +1 @@
+include(CMP0122-common.cmake)
diff --git a/Tests/RunCMake/UseSWIG/CMP0122-common.cmake b/Tests/RunCMake/UseSWIG/CMP0122-common.cmake
new file mode 100644
index 0000000..be880ec
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0122-common.cmake
@@ -0,0 +1,12 @@
+
+cmake_policy(SET CMP0078 NEW)
+cmake_policy(SET CMP0086 NEW)
+
+set(SWIG_EXECUTABLE "swig")
+set(SWIG_DIR "/swig")
+include(UseSWIG)
+
+swig_add_library(example LANGUAGE csharp TYPE SHARED SOURCES example.i)
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/CMP0122-library-name.txt"
+ CONTENT "${CMAKE_SHARED_LIBRARY_PREFIX}\n$<TARGET_FILE_PREFIX:example>\n")
diff --git a/Tests/RunCMake/UseSWIG/RunCMakeTest.cmake b/Tests/RunCMake/UseSWIG/RunCMakeTest.cmake
index 6acf719..c7a118f 100644
--- a/Tests/RunCMake/UseSWIG/RunCMakeTest.cmake
+++ b/Tests/RunCMake/UseSWIG/RunCMakeTest.cmake
@@ -23,3 +23,7 @@ if (CMake_TEST_FindPython)
run_cmake_target(CMP0086-NEW build example)
endif()
+
+run_cmake(CMP0122-WARN)
+run_cmake(CMP0122-OLD)
+run_cmake(CMP0122-NEW)
diff --git a/Tests/RunCMake/VS10Project/CSharpSourceGroup/cmake/AssemblyInfo.cs.in b/Tests/RunCMake/VS10Project/CSharpSourceGroup/cmake/AssemblyInfo.cs.in
new file mode 100644
index 0000000..63e5a5c
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CSharpSourceGroup/cmake/AssemblyInfo.cs.in
@@ -0,0 +1,18 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+//General Information about an assembly is controlled through the following
+//set of attributes. Change these attribute values to modify the information
+//associated with an assembly.
+
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
index 80d76e4..9c9409c 100644
--- a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
@@ -13,6 +13,7 @@ set(SOURCE_GROUPS_TO_FIND
"CSharpSourceGroup\\\\nested\\\\baz\\.cs"
"CSharpSourceGroup\\\\images\\\\empty\\.bmp"
"VsCsharpSourceGroup\\.png"
+ "AssemblyInfo\\.cs"
)
foreach(GROUP_NAME IN LISTS SOURCE_GROUPS_TO_FIND)
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake
index 510d712..b67868f 100644
--- a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake
@@ -20,3 +20,11 @@ add_library(VsCsharpSourceGroup SHARED ${SRC_FILES} ${IMAGE_FILES} ${RESOURCE_FI
source_group("CSharpSourceGroup" FILES ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/foo.cs)
source_group("CSharpSourceGroup/nested" FILES ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/nested/baz.cs)
source_group("Images" FILES ${IMAGE_FILES})
+
+# Test covering CMake Issue 22104.
+# Basically there should not be any link tags for files in the binary directory.
+include(CSharpUtilities)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/cmake/AssemblyInfo.cs.in" "Properties/AssemblyInfo.cs")
+
+target_sources(VsCsharpSourceGroup PRIVATE "Properties/AssemblyInfo.cs")
+csharp_set_designer_cs_properties("Properties/AssemblyInfo.cs")
diff --git a/Tests/RunCMake/VS10Project/VsDpiAwareBadParam-stderr.txt b/Tests/RunCMake/VS10Project/VsDpiAwareBadParam-stderr.txt
index 95fc5ca..39415af 100644
--- a/Tests/RunCMake/VS10Project/VsDpiAwareBadParam-stderr.txt
+++ b/Tests/RunCMake/VS10Project/VsDpiAwareBadParam-stderr.txt
@@ -1,3 +1,3 @@
-CMake Error: Bad parameter for VS_DPI_AWARE: Bar
CMake Error: Bad parameter for VS_DPI_AWARE: Foo
+CMake Error: Bad parameter for VS_DPI_AWARE: Bar
CMake Generate step failed. Build files cannot be regenerated correctly.
diff --git a/Tests/RunCMake/VS10Project/VsSettings-check.cmake b/Tests/RunCMake/VS10Project/VsSettings-check.cmake
index 0f8b26c..13cc8e2 100644
--- a/Tests/RunCMake/VS10Project/VsSettings-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsSettings-check.cmake
@@ -4,20 +4,29 @@ macro(ensure_props_set projectFile)
return()
endif()
- set(SettingFound FALSE)
+ set(Setting1Found FALSE)
+ set(Setting2Found FALSE)
file(STRINGS "${projectFile}" lines)
foreach(line IN LISTS lines)
if(line MATCHES "<SourceProperty1.*Debug.*>SourceProperty1Value</SourceProperty1>")
message("SourceProperty1 setting found")
- set(SettingFound TRUE)
+ set(Setting1Found TRUE)
+ endif()
+ if(line MATCHES "<SourceProperty2.*Debug.*>SourceProperty2Value</SourceProperty2>")
+ message("SourceProperty2 setting found")
+ set(Setting2Found TRUE)
endif()
endforeach()
- if (NOT SettingFound)
+ if (NOT Setting1Found)
set(RunCMake_TEST_FAILED "SourceProperty1 setting was not found")
return()
endif()
+ if (NOT Setting2Found)
+ set(RunCMake_TEST_FAILED "SourceProperty2 setting was not found")
+ return()
+ endif()
endmacro()
ensure_props_set("${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
diff --git a/Tests/RunCMake/VS10Project/VsSettings.cmake b/Tests/RunCMake/VS10Project/VsSettings.cmake
index a4b321b..3a046f1 100644
--- a/Tests/RunCMake/VS10Project/VsSettings.cmake
+++ b/Tests/RunCMake/VS10Project/VsSettings.cmake
@@ -3,3 +3,5 @@ enable_language(CXX)
add_library(foo foo.cpp shader.hlsl)
set_property(SOURCE shader.hlsl PROPERTY VS_SETTINGS
"$<$<CONFIG:DEBUG>:SourceProperty1=SourceProperty1Value>")
+set_property(SOURCE foo.cpp PROPERTY VS_SETTINGS
+ "$<$<CONFIG:DEBUG>:SourceProperty2=SourceProperty2Value>")
diff --git a/Tests/RunCMake/WriteBasicConfigVersionFile/LeadingZeroes.cmake b/Tests/RunCMake/WriteBasicConfigVersionFile/LeadingZeroes.cmake
new file mode 100644
index 0000000..9f4674c
--- /dev/null
+++ b/Tests/RunCMake/WriteBasicConfigVersionFile/LeadingZeroes.cmake
@@ -0,0 +1,898 @@
+# Hard-code architecture for test without a real compiler.
+set(CMAKE_SIZEOF_VOID_P 4)
+
+include(WriteBasicConfigVersionFile)
+
+set(COMPATIBILITIES AnyNewerVersion
+ SameMajorVersion
+ SameMinorVersion
+ ExactVersion
+ )
+
+function(TEST_WRITE_BASIC_CONFIG_VERSION_FILE_PREPARE _version_installed)
+ set(_same_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
+ set(_no_CMAKE_SIZEOF_VOID_P "")
+ math(EXPR _diff_CMAKE_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P} + 1")
+ foreach(_compat ${COMPATIBILITIES})
+ set(_pkg ${_compat}${_version_installed})
+ string(REPLACE "." "" _pkg ${_pkg})
+ set(_filename "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}ConfigVersion.cmake")
+ set(_filename_novoid "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}NoVoidConfigVersion.cmake")
+ set(_filename_diffvoid "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}DiffVoidConfigVersion.cmake")
+
+ set(CMAKE_SIZEOF_VOID_P ${_same_CMAKE_SIZEOF_VOID_P})
+ write_basic_config_version_file("${_filename}"
+ VERSION ${_version_installed}
+ COMPATIBILITY ${_compat})
+
+ # Test that an empty CMAKE_SIZEOF_VOID_P is accepted:
+ set(CMAKE_SIZEOF_VOID_P ${_no_CMAKE_SIZEOF_VOID_P})
+ write_basic_config_version_file("${_filename_novoid}"
+ VERSION ${_version_installed}
+ COMPATIBILITY ${_compat})
+
+ # Test that a different CMAKE_SIZEOF_VOID_P results in
+ # PACKAGE_VERSION_UNSUITABLE
+ set(CMAKE_SIZEOF_VOID_P ${_diff_CMAKE_SIZEOF_VOID_P})
+ write_basic_config_version_file("${_filename_diffvoid}"
+ VERSION ${_version_installed}
+ COMPATIBILITY ${_compat})
+ endforeach()
+endfunction()
+
+macro(TEST_WRITE_BASIC_CONFIG_VERSION_FILE_CHECK _filename)
+ include("${_filename}")
+
+ message(STATUS "_expected_compatible: ${_expected_compatible}")
+ message(STATUS "_expected_unsuitable: ${_expected_unsuitable}")
+ if(_expected_compatible AND NOT PACKAGE_VERSION_COMPATIBLE)
+ message(SEND_ERROR "Did not find package with version ${_version_installed} (${_version_requested} was requested)!")
+ elseif(NOT _expected_compatible AND PACKAGE_VERSION_COMPATIBLE)
+ message(SEND_ERROR "Found package with version ${_version_installed}, but ${_version_requested} was requested!")
+ endif()
+
+ if(${_expected_unsuitable} AND NOT PACKAGE_VERSION_UNSUITABLE)
+ message(SEND_ERROR "PACKAGE_VERSION_UNSUITABLE set, although it should not be!")
+ elseif(NOT ${_expected_unsuitable} AND PACKAGE_VERSION_UNSUITABLE)
+ message(SEND_ERROR "PACKAGE_VERSION_UNSUITABLE not set, although it should be!")
+ endif()
+
+ unset(PACKAGE_VERSION_COMPATIBLE)
+ unset(PACKAGE_VERSION_EXACT)
+ unset(PACKAGE_VERSION_UNSUITABLE)
+endmacro()
+
+function(TEST_WRITE_BASIC_CONFIG_VERSION_FILE _version_installed
+ _version_requested
+ _expected_compatible_AnyNewerVersion
+ _expected_compatible_SameMajorVersion
+ _expected_compatible_SameMinorVersion
+ _expected_compatible_ExactVersion)
+ if("${_version_requested}" MATCHES [[^([0-9]+(\.[0-9]+)*)\.\.\.(<)?([0-9]+(\.[0-9]+)*)$]])
+ set (_compatibilities ${COMPATIBILITIES})
+ # ExactVersion must not be tested
+ list(POP_BACK _compatibilities)
+ set(PACKAGE_FIND_VERSION_RANGE TRUE)
+ set(PACKAGE_FIND_VERSION_RANGE_MIN INCLUDE)
+ if ("${CMAKE_MATCH_3}" STREQUAL "<")
+ set(PACKAGE_FIND_VERSION_RANGE_MAX EXCLUDE)
+ else()
+ set(PACKAGE_FIND_VERSION_RANGE_MAX INCLUDE)
+ endif()
+ set(PACKAGE_FIND_VERSION_MIN "${CMAKE_MATCH_1}")
+ set(PACKAGE_FIND_VERSION_MAX "${CMAKE_MATCH_4}")
+ if("${PACKAGE_FIND_VERSION_MIN}" MATCHES [[(^([0-9]+)(\.([0-9]+)(\.([0-9]+)(\.([0-9]+))?)?)?)?$]])
+ set(PACKAGE_FIND_VERSION_MIN_MAJOR "${CMAKE_MATCH_2}")
+ set(PACKAGE_FIND_VERSION_MIN_MINOR "${CMAKE_MATCH_4}")
+ set(PACKAGE_FIND_VERSION_MIN_PATCH "${CMAKE_MATCH_6}")
+ set(PACKAGE_FIND_VERSION_MIN_TWEAK "${CMAKE_MATCH_8}")
+ else()
+ message(FATAL_ERROR "_version_requested (${_version_requested}) should be a version range")
+ endif()
+ set(PACKAGE_FIND_VERSION "${PACKAGE_FIND_VERSION_MIN}")
+ set(PACKAGE_FIND_VERSION_MAJOR "${PACKAGE_FIND_VERSION_MIN_MAJOR}")
+ set(PACKAGE_FIND_VERSION_MINOR "${PACKAGE_FIND_VERSION_MIN_MINOR}")
+ set(PACKAGE_FIND_VERSION_PATCH "${PACKAGE_FIND_VERSION_MIN_PATCH}")
+ set(PACKAGE_FIND_VERSION_TWEAK "${PACKAGE_FIND_VERSION_MIN_TWEAK}")
+ if("${PACKAGE_FIND_VERSION_MAX}" MATCHES [[(^([0-9]+)(\.([0-9]+)(\.([0-9]+)(\.([0-9]+))?)?)?)?$]])
+ set(PACKAGE_FIND_VERSION_MAX_MAJOR "${CMAKE_MATCH_2}")
+ set(PACKAGE_FIND_VERSION_MAX_MINOR "${CMAKE_MATCH_4}")
+ set(PACKAGE_FIND_VERSION_MAX_PATCH "${CMAKE_MATCH_6}")
+ set(PACKAGE_FIND_VERSION_MAX_TWEAK "${CMAKE_MATCH_8}")
+ else()
+ message(FATAL_ERROR "_version_requested (${_version_requested}) should be a version range")
+ endif()
+ else()
+ set (_compatibilities ${COMPATIBILITIES})
+ set(PACKAGE_FIND_VERSION ${_version_requested})
+ if("${PACKAGE_FIND_VERSION}" MATCHES [[(^([0-9]+)(\.([0-9]+)(\.([0-9]+)(\.([0-9]+))?)?)?)?$]])
+ set(PACKAGE_FIND_VERSION_MAJOR "${CMAKE_MATCH_2}")
+ set(PACKAGE_FIND_VERSION_MINOR "${CMAKE_MATCH_4}")
+ set(PACKAGE_FIND_VERSION_PATCH "${CMAKE_MATCH_6}")
+ set(PACKAGE_FIND_VERSION_TWEAK "${CMAKE_MATCH_8}")
+ else()
+ message(FATAL_ERROR "_version_requested (${_version_requested}) should be a version number")
+ endif()
+
+ endif()
+
+ unset(PACKAGE_VERSION_COMPATIBLE)
+ unset(PACKAGE_VERSION_EXACT)
+ unset(PACKAGE_VERSION_UNSUITABLE)
+
+ foreach(_compat ${_compatibilities})
+ set(_pkg ${_compat}${_version_installed})
+ string(REPLACE "." "" _pkg ${_pkg})
+ set(_filename "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}ConfigVersion.cmake")
+ set(_filename_novoid "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}NoVoidConfigVersion.cmake")
+ set(_filename_diffvoid "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}DiffVoidConfigVersion.cmake")
+
+ set(_expected_compatible ${_expected_compatible_${_compat}})
+
+ # Test "normal" version
+ set(_expected_unsuitable 0)
+ message(STATUS "TEST write_basic_config_version_file(VERSION ${_version_installed} \
+COMPATIBILITY ${_compat}) vs. ${_version_requested} \
+(expected compatible = ${_expected_compatible}, unsuitable = ${_expected_unsuitable})")
+ test_write_basic_config_version_file_check("${_filename}")
+
+ # test empty CMAKE_SIZEOF_VOID_P version:
+ set(_expected_unsuitable 0)
+ message(STATUS "TEST write_basic_config_version_file(VERSION ${_version_installed} \
+COMPATIBILITY ${_compat}) vs. ${_version_requested} (no CMAKE_SIZEOF_VOID_P) \
+(expected compatible = ${_expected_compatible}, unsuitable = ${_expected_unsuitable})")
+ test_write_basic_config_version_file_check("${_filename_novoid}")
+
+ # test different CMAKE_SIZEOF_VOID_P version:
+ set(_expected_unsuitable 1)
+ message(STATUS "TEST write_basic_config_version_file(VERSION ${_version_installed} \
+COMPATIBILITY ${_compat}) vs. ${_version_requested} (different CMAKE_SIZEOF_VOID_P) \
+(expected compatible = ${_expected_compatible}, unsuitable = ${_expected_unsuitable})")
+ test_write_basic_config_version_file_check("${_filename_diffvoid}")
+
+ endforeach()
+endfunction()
+
+
+test_write_basic_config_version_file_prepare(4)
+test_write_basic_config_version_file_prepare(4.05)
+test_write_basic_config_version_file_prepare(4.5.06)
+test_write_basic_config_version_file_prepare(4.05.06.007)
+
+# AnyNewerVersion
+# | SameMajorVersion
+# | | SameMinorVersion
+# | | | ExactVersion
+# | | | |
+test_write_basic_config_version_file(4.05 0 1 0 0 0) # Request 0
+test_write_basic_config_version_file(4.05 2 1 0 0 0) # Request [older major]
+test_write_basic_config_version_file(4.05 4 1 1 0 0) # Request [same major]
+test_write_basic_config_version_file(4.05 9 0 0 0 0) # Request [newer major]
+
+test_write_basic_config_version_file(4.05 0.0 1 0 0 0) # Request 0.0
+test_write_basic_config_version_file(4.05 0.2 1 0 0 0) # Request 0.[older minor]
+test_write_basic_config_version_file(4.05 0.5 1 0 0 0) # Request 0.[same minor]
+test_write_basic_config_version_file(4.05 0.9 1 0 0 0) # Request 0.[newer minor]
+test_write_basic_config_version_file(4.05 2.0 1 0 0 0) # Request [older major].0
+test_write_basic_config_version_file(4.05 2.2 1 0 0 0) # Request [older major].[older minor]
+test_write_basic_config_version_file(4.05 2.5 1 0 0 0) # Request [older major].[same minor]
+test_write_basic_config_version_file(4.05 2.9 1 0 0 0) # Request [older major].[newer minor]
+test_write_basic_config_version_file(4.05 4.0 1 1 0 0) # Request [same major].0
+test_write_basic_config_version_file(4.05 4.2 1 1 0 0) # Request [same major].[older minor]
+test_write_basic_config_version_file(4.05 4.05 1 1 1 1) # Request [same major].[same minor]
+test_write_basic_config_version_file(4.05 4.9 0 0 0 0) # Request [same major].[newer minor]
+test_write_basic_config_version_file(4.05 9.0 0 0 0 0) # Request [newer major].0
+test_write_basic_config_version_file(4.05 9.1 0 0 0 0) # Request [newer major].[older minor]
+test_write_basic_config_version_file(4.05 9.5 0 0 0 0) # Request [newer major].[same minor]
+test_write_basic_config_version_file(4.05 9.9 0 0 0 0) # Request [newer major].[newer minor]
+
+test_write_basic_config_version_file(4.05 0.0.0 1 0 0 0) # Request 0.0.0
+test_write_basic_config_version_file(4.05 0.0.9 1 0 0 0) # Request 0.0.[newer patch]
+test_write_basic_config_version_file(4.05 0.2.0 1 0 0 0) # Request 0.[older minor].0
+test_write_basic_config_version_file(4.05 0.2.9 1 0 0 0) # Request 0.[older minor].[newer patch]
+test_write_basic_config_version_file(4.05 0.5.0 1 0 0 0) # Request 0.[same minor].0
+test_write_basic_config_version_file(4.05 0.5.9 1 0 0 0) # Request 0.[same minor].[newer patch]
+test_write_basic_config_version_file(4.05 0.9.0 1 0 0 0) # Request 0.[newer minor].0
+test_write_basic_config_version_file(4.05 0.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch]
+test_write_basic_config_version_file(4.05 2.0.0 1 0 0 0) # Request [older major].0.0
+test_write_basic_config_version_file(4.05 2.0.9 1 0 0 0) # Request [older major].0.[newer patch]
+test_write_basic_config_version_file(4.05 2.2.0 1 0 0 0) # Request [older major].[older minor].0
+test_write_basic_config_version_file(4.05 2.2.9 1 0 0 0) # Request [older major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.05 2.5.0 1 0 0 0) # Request [older major].[same minor].0
+test_write_basic_config_version_file(4.05 2.5.9 1 0 0 0) # Request [older major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.05 2.9.0 1 0 0 0) # Request [older major].[newer minor].0
+test_write_basic_config_version_file(4.05 2.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch]
+test_write_basic_config_version_file(4.05 4.0.0 1 1 0 0) # Request [same major].0.0
+test_write_basic_config_version_file(4.05 4.0.9 1 1 0 0) # Request [same major].0.[newer patch]
+test_write_basic_config_version_file(4.05 4.2.0 1 1 0 0) # Request [same major].[older minor].0
+test_write_basic_config_version_file(4.05 4.2.9 1 1 0 0) # Request [same major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.05 4.05.0 1 1 1 0) # Request [same major].[same minor].0
+test_write_basic_config_version_file(4.05 4.5.9 0 0 0 0) # Request [same major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.05 4.9.0 0 0 0 0) # Request [same major].[newer minor].0
+test_write_basic_config_version_file(4.05 4.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch]
+test_write_basic_config_version_file(4.05 9.0.0 0 0 0 0) # Request [newer major].0.0
+test_write_basic_config_version_file(4.05 9.0.9 0 0 0 0) # Request [newer major].0.[newer patch]
+test_write_basic_config_version_file(4.05 9.2.0 0 0 0 0) # Request [newer major].[older minor].0
+test_write_basic_config_version_file(4.05 9.2.9 0 0 0 0) # Request [newer major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.05 9.5.0 0 0 0 0) # Request [newer major].[same minor].0
+test_write_basic_config_version_file(4.05 9.5.9 0 0 0 0) # Request [newer major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.05 9.9.0 0 0 0 0) # Request [newer major].[newer minor].0
+test_write_basic_config_version_file(4.05 9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch]
+
+test_write_basic_config_version_file(4.05 0.0.0.0 1 0 0 0) # Request 0.0.0.0
+test_write_basic_config_version_file(4.05 0.0.0.9 1 0 0 0) # Request 0.0.0.[newer tweak]
+test_write_basic_config_version_file(4.05 0.0.9.0 1 0 0 0) # Request 0.0.[newer patch].0
+test_write_basic_config_version_file(4.05 0.0.9.9 1 0 0 0) # Request 0.0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 0.2.0.0 1 0 0 0) # Request 0.[older minor].0.0
+test_write_basic_config_version_file(4.05 0.2.0.9 1 0 0 0) # Request 0.[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 0.2.9.0 1 0 0 0) # Request 0.[older minor].[newer patch].0
+test_write_basic_config_version_file(4.05 0.2.9.9 1 0 0 0) # Request 0.[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 0.5.0.0 1 0 0 0) # Request 0.[same minor].0.0
+test_write_basic_config_version_file(4.05 0.5.0.9 1 0 0 0) # Request 0.[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 0.5.9.0 1 0 0 0) # Request 0.[same minor].[newer patch].0
+test_write_basic_config_version_file(4.05 0.5.9.9 1 0 0 0) # Request 0.[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 0.9.0.0 1 0 0 0) # Request 0.[newer minor].0.0
+test_write_basic_config_version_file(4.05 0.9.0.9 1 0 0 0) # Request 0.[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 0.9.9.0 1 0 0 0) # Request 0.[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.05 0.9.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 2.0.0.0 1 0 0 0) # Request [older major].0.0.0
+test_write_basic_config_version_file(4.05 2.0.0.9 1 0 0 0) # Request [older major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.05 2.0.9.0 1 0 0 0) # Request [older major].0.[newer patch].0
+test_write_basic_config_version_file(4.05 2.0.9.9 1 0 0 0) # Request [older major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 2.2.0.0 1 0 0 0) # Request [older major].[older minor].0.0
+test_write_basic_config_version_file(4.05 2.2.0.9 1 0 0 0) # Request [older major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 2.2.9.0 1 0 0 0) # Request [older major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.05 2.2.9.9 1 0 0 0) # Request [older major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 2.5.0.0 1 0 0 0) # Request [older major].[same minor].0.0
+test_write_basic_config_version_file(4.05 2.5.0.9 1 0 0 0) # Request [older major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 2.5.9.0 1 0 0 0) # Request [older major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.05 2.5.9.9 1 0 0 0) # Request [older major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 2.9.0.0 1 0 0 0) # Request [older major].[newer minor].0.0
+test_write_basic_config_version_file(4.05 2.9.0.9 1 0 0 0) # Request [older major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 2.9.9.0 1 0 0 0) # Request [older major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.05 2.9.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 4.0.0.0 1 1 0 0) # Request [same major].0.0.0
+test_write_basic_config_version_file(4.05 4.0.0.9 1 1 0 0) # Request [same major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.05 4.0.9.0 1 1 0 0) # Request [same major].0.[newer patch].0
+test_write_basic_config_version_file(4.05 4.0.9.9 1 1 0 0) # Request [same major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 4.2.0.0 1 1 0 0) # Request [same major].[older minor].0.0
+test_write_basic_config_version_file(4.05 4.2.0.9 1 1 0 0) # Request [same major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 4.2.9.0 1 1 0 0) # Request [same major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.05 4.2.9.9 1 1 0 0) # Request [same major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 4.5.0.0 1 1 1 0) # Request [same major].[same minor].0.0
+test_write_basic_config_version_file(4.05 4.5.0.9 0 0 0 0) # Request [same major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 4.5.9.0 0 0 0 0) # Request [same major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.05 4.5.9.9 0 0 0 0) # Request [same major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 4.9.0.0 0 0 0 0) # Request [same major].[newer minor].0.0
+test_write_basic_config_version_file(4.05 4.9.0.9 0 0 0 0) # Request [same major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 4.9.9.0 0 0 0 0) # Request [same major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.05 4.9.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 9.0.0.0 0 0 0 0) # Request [newer major].0.0.0
+test_write_basic_config_version_file(4.05 9.0.0.9 0 0 0 0) # Request [newer major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.05 9.0.9.0 0 0 0 0) # Request [newer major].0.[newer patch].0
+test_write_basic_config_version_file(4.05 9.0.9.9 0 0 0 0) # Request [newer major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 9.2.0.0 0 0 0 0) # Request [newer major].[older minor].0.0
+test_write_basic_config_version_file(4.05 9.2.0.9 0 0 0 0) # Request [newer major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 9.2.9.0 0 0 0 0) # Request [newer major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.05 9.2.9.9 0 0 0 0) # Request [newer major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 9.5.0.0 0 0 0 0) # Request [newer major].[same minor].0.0
+test_write_basic_config_version_file(4.05 9.5.0.9 0 0 0 0) # Request [newer major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 9.5.9.0 0 0 0 0) # Request [newer major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.05 9.5.9.9 0 0 0 0) # Request [newer major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05 9.9.0.0 0 0 0 0) # Request [newer major].[newer minor].0.0
+test_write_basic_config_version_file(4.05 9.9.0.9 0 0 0 0) # Request [newer major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05 9.9.9.0 0 0 0 0) # Request [newer major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.05 9.9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[newer tweak]
+
+
+test_write_basic_config_version_file(4.5.06 0 1 0 0 0) # Request 0
+test_write_basic_config_version_file(4.5.06 2 1 0 0 0) # Request [older major]
+test_write_basic_config_version_file(4.5.06 4 1 1 0 0) # Request [same major]
+test_write_basic_config_version_file(4.5.06 9 0 0 0 0) # Request [newer major]
+
+test_write_basic_config_version_file(4.5.06 0.0 1 0 0 0) # Request 0.0
+test_write_basic_config_version_file(4.5.06 0.2 1 0 0 0) # Request 0.[older minor]
+test_write_basic_config_version_file(4.5.06 0.5 1 0 0 0) # Request 0.[same minor]
+test_write_basic_config_version_file(4.5.06 0.9 1 0 0 0) # Request 0.[newer minor]
+test_write_basic_config_version_file(4.5.06 2.0 1 0 0 0) # Request [older major].0
+test_write_basic_config_version_file(4.5.06 2.2 1 0 0 0) # Request [older major].[older minor]
+test_write_basic_config_version_file(4.5.06 2.5 1 0 0 0) # Request [older major].[same minor]
+test_write_basic_config_version_file(4.5.06 2.9 1 0 0 0) # Request [older major].[newer minor]
+test_write_basic_config_version_file(4.5.06 4.0 1 1 0 0) # Request [same major].0
+test_write_basic_config_version_file(4.5.06 4.2 1 1 0 0) # Request [same major].[older minor]
+test_write_basic_config_version_file(4.5.06 4.5 1 1 1 0) # Request [same major].[same minor]
+test_write_basic_config_version_file(4.5.06 4.9 0 0 0 0) # Request [same major].[newer minor]
+test_write_basic_config_version_file(4.5.06 9.0 0 0 0 0) # Request [newer major].0
+test_write_basic_config_version_file(4.5.06 9.1 0 0 0 0) # Request [newer major].[older minor]
+test_write_basic_config_version_file(4.5.06 9.5 0 0 0 0) # Request [newer major].[same minor]
+test_write_basic_config_version_file(4.5.06 9.9 0 0 0 0) # Request [newer major].[newer minor]
+
+test_write_basic_config_version_file(4.5.06 0.0.0 1 0 0 0) # Request 0.0.0
+test_write_basic_config_version_file(4.5.06 0.0.2 1 0 0 0) # Request 0.0.[older patch]
+test_write_basic_config_version_file(4.5.06 0.0.6 1 0 0 0) # Request 0.0.[same patch]
+test_write_basic_config_version_file(4.5.06 0.0.9 1 0 0 0) # Request 0.0.[newer patch]
+test_write_basic_config_version_file(4.5.06 0.2.0 1 0 0 0) # Request 0.[older minor].0
+test_write_basic_config_version_file(4.5.06 0.2.2 1 0 0 0) # Request 0.[older minor].[older patch]
+test_write_basic_config_version_file(4.5.06 0.2.6 1 0 0 0) # Request 0.[older minor].[same patch]
+test_write_basic_config_version_file(4.5.06 0.2.9 1 0 0 0) # Request 0.[older minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 0.5.0 1 0 0 0) # Request 0.[same minor].0
+test_write_basic_config_version_file(4.5.06 0.5.2 1 0 0 0) # Request 0.[same minor].[older patch]
+test_write_basic_config_version_file(4.5.06 0.5.6 1 0 0 0) # Request 0.[same minor].[same patch]
+test_write_basic_config_version_file(4.5.06 0.5.9 1 0 0 0) # Request 0.[same minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 0.9.0 1 0 0 0) # Request 0.[newer minor].0
+test_write_basic_config_version_file(4.5.06 0.9.2 1 0 0 0) # Request 0.[newer minor].[older patch]
+test_write_basic_config_version_file(4.5.06 0.9.6 1 0 0 0) # Request 0.[newer minor].[same patch]
+test_write_basic_config_version_file(4.5.06 0.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 2.0.0 1 0 0 0) # Request [older major].0.0
+test_write_basic_config_version_file(4.5.06 2.0.2 1 0 0 0) # Request [older major].0.[older patch]
+test_write_basic_config_version_file(4.5.06 2.0.6 1 0 0 0) # Request [older major].0.[same patch]
+test_write_basic_config_version_file(4.5.06 2.0.9 1 0 0 0) # Request [older major].0.[newer patch]
+test_write_basic_config_version_file(4.5.06 2.2.0 1 0 0 0) # Request [older major].[older minor].0
+test_write_basic_config_version_file(4.5.06 2.2.2 1 0 0 0) # Request [older major].[older minor].[older patch]
+test_write_basic_config_version_file(4.5.06 2.2.6 1 0 0 0) # Request [older major].[older minor].[same patch]
+test_write_basic_config_version_file(4.5.06 2.2.9 1 0 0 0) # Request [older major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 2.5.0 1 0 0 0) # Request [older major].[same minor].0
+test_write_basic_config_version_file(4.5.06 2.5.2 1 0 0 0) # Request [older major].[same minor].[older patch]
+test_write_basic_config_version_file(4.5.06 2.5.6 1 0 0 0) # Request [older major].[same minor].[same patch]
+test_write_basic_config_version_file(4.5.06 2.5.9 1 0 0 0) # Request [older major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 2.9.0 1 0 0 0) # Request [older major].[newer minor].0
+test_write_basic_config_version_file(4.5.06 2.9.2 1 0 0 0) # Request [older major].[newer minor].[older patch]
+test_write_basic_config_version_file(4.5.06 2.9.6 1 0 0 0) # Request [older major].[newer minor].[same patch]
+test_write_basic_config_version_file(4.5.06 2.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 4.0.0 1 1 0 0) # Request [same major].0.0
+test_write_basic_config_version_file(4.5.06 4.0.2 1 1 0 0) # Request [same major].0.[older patch]
+test_write_basic_config_version_file(4.5.06 4.0.6 1 1 0 0) # Request [same major].0.[same patch]
+test_write_basic_config_version_file(4.5.06 4.0.9 1 1 0 0) # Request [same major].0.[newer patch]
+test_write_basic_config_version_file(4.5.06 4.2.0 1 1 0 0) # Request [same major].[older minor].0
+test_write_basic_config_version_file(4.5.06 4.2.2 1 1 0 0) # Request [same major].[older minor].[older patch]
+test_write_basic_config_version_file(4.5.06 4.2.6 1 1 0 0) # Request [same major].[older minor].[same patch]
+test_write_basic_config_version_file(4.5.06 4.2.9 1 1 0 0) # Request [same major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 4.5.0 1 1 1 0) # Request [same major].[same minor].0
+test_write_basic_config_version_file(4.5.06 4.5.2 1 1 1 0) # Request [same major].[same minor].[older patch]
+test_write_basic_config_version_file(4.5.06 4.5.06 1 1 1 1) # Request [same major].[same minor].[same patch]
+test_write_basic_config_version_file(4.5.06 4.5.9 0 0 0 0) # Request [same major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 4.9.0 0 0 0 0) # Request [same major].[newer minor].0
+test_write_basic_config_version_file(4.5.06 4.9.2 0 0 0 0) # Request [same major].[newer minor].[older patch]
+test_write_basic_config_version_file(4.5.06 4.9.6 0 0 0 0) # Request [same major].[newer minor].[same patch]
+test_write_basic_config_version_file(4.5.06 4.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 9.0.0 0 0 0 0) # Request [newer major].0.0
+test_write_basic_config_version_file(4.5.06 9.0.2 0 0 0 0) # Request [newer major].0.[older patch]
+test_write_basic_config_version_file(4.5.06 9.0.6 0 0 0 0) # Request [newer major].0.[same patch]
+test_write_basic_config_version_file(4.5.06 9.0.9 0 0 0 0) # Request [newer major].0.[newer patch]
+test_write_basic_config_version_file(4.5.06 9.2.0 0 0 0 0) # Request [newer major].[older minor].0
+test_write_basic_config_version_file(4.5.06 9.2.2 0 0 0 0) # Request [newer major].[older minor].[older patch]
+test_write_basic_config_version_file(4.5.06 9.2.6 0 0 0 0) # Request [newer major].[older minor].[same patch]
+test_write_basic_config_version_file(4.5.06 9.2.9 0 0 0 0) # Request [newer major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 9.5.0 0 0 0 0) # Request [newer major].[same minor].0
+test_write_basic_config_version_file(4.5.06 9.5.2 0 0 0 0) # Request [newer major].[same minor].[older patch]
+test_write_basic_config_version_file(4.5.06 9.5.6 0 0 0 0) # Request [newer major].[same minor].[same patch]
+test_write_basic_config_version_file(4.5.06 9.5.9 0 0 0 0) # Request [newer major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.5.06 9.9.0 0 0 0 0) # Request [newer major].[newer minor].0
+test_write_basic_config_version_file(4.5.06 9.9.2 0 0 0 0) # Request [newer major].[newer minor].[older patch]
+test_write_basic_config_version_file(4.5.06 9.9.6 0 0 0 0) # Request [newer major].[newer minor].[same patch]
+test_write_basic_config_version_file(4.5.06 9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch]
+
+test_write_basic_config_version_file(4.5.06 0.0.0.0 1 0 0 0) # Request 0.0.0.0
+test_write_basic_config_version_file(4.5.06 0.0.0.9 1 0 0 0) # Request 0.0.0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.0.2.0 1 0 0 0) # Request 0.0.[older patch].0
+test_write_basic_config_version_file(4.5.06 0.0.2.9 1 0 0 0) # Request 0.0.[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.0.6.0 1 0 0 0) # Request 0.0.[same patch].0
+test_write_basic_config_version_file(4.5.06 0.0.6.9 1 0 0 0) # Request 0.0.[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.0.9.0 1 0 0 0) # Request 0.0.[newer patch].0
+test_write_basic_config_version_file(4.5.06 0.0.9.9 1 0 0 0) # Request 0.0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.2.0.0 1 0 0 0) # Request 0.[older minor].0.0
+test_write_basic_config_version_file(4.5.06 0.2.0.9 1 0 0 0) # Request 0.[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.2.2.0 1 0 0 0) # Request 0.[older minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 0.2.2.9 1 0 0 0) # Request 0.[older minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.2.6.0 1 0 0 0) # Request 0.[older minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 0.2.6.9 1 0 0 0) # Request 0.[older minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.2.9.0 1 0 0 0) # Request 0.[older minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 0.2.9.9 1 0 0 0) # Request 0.[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.5.0.0 1 0 0 0) # Request 0.[same minor].0.0
+test_write_basic_config_version_file(4.5.06 0.5.0.9 1 0 0 0) # Request 0.[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.5.2.0 1 0 0 0) # Request 0.[same minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 0.5.2.9 1 0 0 0) # Request 0.[same minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.5.6.0 1 0 0 0) # Request 0.[same minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 0.5.6.9 1 0 0 0) # Request 0.[same minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.5.9.0 1 0 0 0) # Request 0.[same minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 0.5.9.9 1 0 0 0) # Request 0.[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.9.0.0 1 0 0 0) # Request 0.[newer minor].0.0
+test_write_basic_config_version_file(4.5.06 0.9.0.9 1 0 0 0) # Request 0.[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.9.2.0 1 0 0 0) # Request 0.[newer minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 0.9.2.9 1 0 0 0) # Request 0.[newer minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.9.6.0 1 0 0 0) # Request 0.[newer minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 0.9.6.9 1 0 0 0) # Request 0.[newer minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 0.9.9.0 1 0 0 0) # Request 0.[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 0.9.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.0.0.0 1 0 0 0) # Request [older major].0.0.0
+test_write_basic_config_version_file(4.5.06 2.0.0.9 1 0 0 0) # Request [older major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.0.2.0 1 0 0 0) # Request [older major].0.[older patch].0
+test_write_basic_config_version_file(4.5.06 2.0.2.9 1 0 0 0) # Request [older major].0.[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.0.6.0 1 0 0 0) # Request [older major].0.[same patch].0
+test_write_basic_config_version_file(4.5.06 2.0.6.9 1 0 0 0) # Request [older major].0.[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.0.9.0 1 0 0 0) # Request [older major].0.[newer patch].0
+test_write_basic_config_version_file(4.5.06 2.0.9.9 1 0 0 0) # Request [older major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.2.0.0 1 0 0 0) # Request [older major].[older minor].0.0
+test_write_basic_config_version_file(4.5.06 2.2.0.9 1 0 0 0) # Request [older major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.2.2.0 1 0 0 0) # Request [older major].[older minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 2.2.2.9 1 0 0 0) # Request [older major].[older minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.2.6.0 1 0 0 0) # Request [older major].[older minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 2.2.6.9 1 0 0 0) # Request [older major].[older minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.2.9.0 1 0 0 0) # Request [older major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 2.2.9.9 1 0 0 0) # Request [older major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.5.0.0 1 0 0 0) # Request [older major].[same minor].0.0
+test_write_basic_config_version_file(4.5.06 2.5.0.9 1 0 0 0) # Request [older major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.5.2.0 1 0 0 0) # Request [older major].[same minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 2.5.2.9 1 0 0 0) # Request [older major].[same minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.5.6.0 1 0 0 0) # Request [older major].[same minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 2.5.6.9 1 0 0 0) # Request [older major].[same minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.5.9.0 1 0 0 0) # Request [older major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 2.5.9.9 1 0 0 0) # Request [older major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.9.0.0 1 0 0 0) # Request [older major].[newer minor].0.0
+test_write_basic_config_version_file(4.5.06 2.9.0.9 1 0 0 0) # Request [older major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.9.2.0 1 0 0 0) # Request [older major].[newer minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 2.9.2.9 1 0 0 0) # Request [older major].[newer minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.9.6.0 1 0 0 0) # Request [older major].[newer minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 2.9.6.9 1 0 0 0) # Request [older major].[newer minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 2.9.9.0 1 0 0 0) # Request [older major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 2.9.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.0.0.0 1 1 0 0) # Request [same major].0.0.0
+test_write_basic_config_version_file(4.5.06 4.0.0.9 1 1 0 0) # Request [same major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.0.2.0 1 1 0 0) # Request [same major].0.[older patch].0
+test_write_basic_config_version_file(4.5.06 4.0.2.9 1 1 0 0) # Request [same major].0.[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.0.6.0 1 1 0 0) # Request [same major].0.[same patch].0
+test_write_basic_config_version_file(4.5.06 4.0.6.9 1 1 0 0) # Request [same major].0.[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.0.9.0 1 1 0 0) # Request [same major].0.[newer patch].0
+test_write_basic_config_version_file(4.5.06 4.0.9.9 1 1 0 0) # Request [same major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.2.0.0 1 1 0 0) # Request [same major].[older minor].0.0
+test_write_basic_config_version_file(4.5.06 4.2.0.9 1 1 0 0) # Request [same major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.2.2.0 1 1 0 0) # Request [same major].[older minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 4.2.2.9 1 1 0 0) # Request [same major].[older minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.2.6.0 1 1 0 0) # Request [same major].[older minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 4.2.6.9 1 1 0 0) # Request [same major].[older minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.2.9.0 1 1 0 0) # Request [same major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 4.2.9.9 1 1 0 0) # Request [same major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.5.0.0 1 1 1 0) # Request [same major].[same minor].0.0
+test_write_basic_config_version_file(4.5.06 4.5.0.9 1 1 1 0) # Request [same major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.5.2.0 1 1 1 0) # Request [same major].[same minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 4.5.2.9 1 1 1 0) # Request [same major].[same minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.5.06.0 1 1 1 1) # Request [same major].[same minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 4.5.06.9 0 0 0 1) # Request [same major].[same minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.5.9.0 0 0 0 0) # Request [same major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 4.5.9.9 0 0 0 0) # Request [same major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.9.0.0 0 0 0 0) # Request [same major].[newer minor].0.0
+test_write_basic_config_version_file(4.5.06 4.9.0.9 0 0 0 0) # Request [same major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.9.2.0 0 0 0 0) # Request [same major].[newer minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 4.9.2.9 0 0 0 0) # Request [same major].[newer minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.9.6.0 0 0 0 0) # Request [same major].[newer minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 4.9.6.9 0 0 0 0) # Request [same major].[newer minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 4.9.9.0 0 0 0 0) # Request [same major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 4.9.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.0.0.0 0 0 0 0) # Request [newer major].0.0.0
+test_write_basic_config_version_file(4.5.06 9.0.0.9 0 0 0 0) # Request [newer major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.0.2.0 0 0 0 0) # Request [newer major].0.[older patch].0
+test_write_basic_config_version_file(4.5.06 9.0.2.9 0 0 0 0) # Request [newer major].0.[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.0.6.0 0 0 0 0) # Request [newer major].0.[same patch].0
+test_write_basic_config_version_file(4.5.06 9.0.6.9 0 0 0 0) # Request [newer major].0.[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.0.9.0 0 0 0 0) # Request [newer major].0.[newer patch].0
+test_write_basic_config_version_file(4.5.06 9.0.9.9 0 0 0 0) # Request [newer major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.2.0.0 0 0 0 0) # Request [newer major].[older minor].0.0
+test_write_basic_config_version_file(4.5.06 9.2.0.9 0 0 0 0) # Request [newer major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.2.2.0 0 0 0 0) # Request [newer major].[older minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 9.2.2.9 0 0 0 0) # Request [newer major].[older minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.2.6.0 0 0 0 0) # Request [newer major].[older minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 9.2.6.9 0 0 0 0) # Request [newer major].[older minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.2.9.0 0 0 0 0) # Request [newer major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 9.2.9.9 0 0 0 0) # Request [newer major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.5.0.0 0 0 0 0) # Request [newer major].[same minor].0.0
+test_write_basic_config_version_file(4.5.06 9.5.0.9 0 0 0 0) # Request [newer major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.5.2.0 0 0 0 0) # Request [newer major].[same minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 9.5.2.9 0 0 0 0) # Request [newer major].[same minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.5.6.0 0 0 0 0) # Request [newer major].[same minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 9.5.6.9 0 0 0 0) # Request [newer major].[same minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.5.9.0 0 0 0 0) # Request [newer major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 9.5.9.9 0 0 0 0) # Request [newer major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.9.0.0 0 0 0 0) # Request [newer major].[newer minor].0.0
+test_write_basic_config_version_file(4.5.06 9.9.0.9 0 0 0 0) # Request [newer major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.9.2.0 0 0 0 0) # Request [newer major].[newer minor].[older patch].0
+test_write_basic_config_version_file(4.5.06 9.9.2.9 0 0 0 0) # Request [newer major].[newer minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.9.6.0 0 0 0 0) # Request [newer major].[newer minor].[same patch].0
+test_write_basic_config_version_file(4.5.06 9.9.6.9 0 0 0 0) # Request [newer major].[newer minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.5.06 9.9.9.0 0 0 0 0) # Request [newer major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.5.06 9.9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[newer tweak]
+
+
+test_write_basic_config_version_file(4.05.06.007 0 1 0 0 0) # Request 0
+test_write_basic_config_version_file(4.05.06.007 2 1 0 0 0) # Request [older major]
+test_write_basic_config_version_file(4.05.06.007 4 1 1 0 0) # Request [same major]
+test_write_basic_config_version_file(4.05.06.007 9 0 0 0 0) # Request [newer major]
+
+test_write_basic_config_version_file(4.05.06.007 0.0 1 0 0 0) # Request 0.0
+test_write_basic_config_version_file(4.05.06.007 0.2 1 0 0 0) # Request 0.[older minor]
+test_write_basic_config_version_file(4.05.06.007 0.5 1 0 0 0) # Request 0.[same minor]
+test_write_basic_config_version_file(4.05.06.007 0.9 1 0 0 0) # Request 0.[newer minor]
+test_write_basic_config_version_file(4.05.06.007 2.0 1 0 0 0) # Request [older major].0
+test_write_basic_config_version_file(4.05.06.007 2.2 1 0 0 0) # Request [older major].[older minor]
+test_write_basic_config_version_file(4.05.06.007 2.5 1 0 0 0) # Request [older major].[same minor]
+test_write_basic_config_version_file(4.05.06.007 2.9 1 0 0 0) # Request [older major].[newer minor]
+test_write_basic_config_version_file(4.05.06.007 4.0 1 1 0 0) # Request [same major].0
+test_write_basic_config_version_file(4.05.06.007 4.2 1 1 0 0) # Request [same major].[older minor]
+test_write_basic_config_version_file(4.05.06.007 4.5 1 1 1 0) # Request [same major].[same minor]
+test_write_basic_config_version_file(4.05.06.007 4.9 0 0 0 0) # Request [same major].[newer minor]
+test_write_basic_config_version_file(4.05.06.007 9.0 0 0 0 0) # Request [newer major].0
+test_write_basic_config_version_file(4.05.06.007 9.1 0 0 0 0) # Request [newer major].[older minor]
+test_write_basic_config_version_file(4.05.06.007 9.5 0 0 0 0) # Request [newer major].[same minor]
+test_write_basic_config_version_file(4.05.06.007 9.9 0 0 0 0) # Request [newer major].[newer minor]
+
+test_write_basic_config_version_file(4.05.06.007 0.0.0 1 0 0 0) # Request 0.0.0
+test_write_basic_config_version_file(4.05.06.007 0.0.2 1 0 0 0) # Request 0.0.[older patch]
+test_write_basic_config_version_file(4.05.06.007 0.0.6 1 0 0 0) # Request 0.0.[same patch]
+test_write_basic_config_version_file(4.05.06.007 0.0.9 1 0 0 0) # Request 0.0.[newer patch]
+test_write_basic_config_version_file(4.05.06.007 0.2.0 1 0 0 0) # Request 0.[older minor].0
+test_write_basic_config_version_file(4.05.06.007 0.2.2 1 0 0 0) # Request 0.[older minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 0.2.6 1 0 0 0) # Request 0.[older minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 0.2.9 1 0 0 0) # Request 0.[older minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 0.5.0 1 0 0 0) # Request 0.[same minor].0
+test_write_basic_config_version_file(4.05.06.007 0.5.2 1 0 0 0) # Request 0.[same minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 0.5.6 1 0 0 0) # Request 0.[same minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 0.5.9 1 0 0 0) # Request 0.[same minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 0.9.0 1 0 0 0) # Request 0.[newer minor].0
+test_write_basic_config_version_file(4.05.06.007 0.9.2 1 0 0 0) # Request 0.[newer minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 0.9.6 1 0 0 0) # Request 0.[newer minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 0.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 2.0.0 1 0 0 0) # Request [older major].0.0
+test_write_basic_config_version_file(4.05.06.007 2.0.2 1 0 0 0) # Request [older major].0.[older patch]
+test_write_basic_config_version_file(4.05.06.007 2.0.6 1 0 0 0) # Request [older major].0.[same patch]
+test_write_basic_config_version_file(4.05.06.007 2.0.9 1 0 0 0) # Request [older major].0.[newer patch]
+test_write_basic_config_version_file(4.05.06.007 2.2.0 1 0 0 0) # Request [older major].[older minor].0
+test_write_basic_config_version_file(4.05.06.007 2.2.2 1 0 0 0) # Request [older major].[older minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 2.2.6 1 0 0 0) # Request [older major].[older minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 2.2.9 1 0 0 0) # Request [older major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 2.5.0 1 0 0 0) # Request [older major].[same minor].0
+test_write_basic_config_version_file(4.05.06.007 2.5.2 1 0 0 0) # Request [older major].[same minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 2.5.6 1 0 0 0) # Request [older major].[same minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 2.5.9 1 0 0 0) # Request [older major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 2.9.0 1 0 0 0) # Request [older major].[newer minor].0
+test_write_basic_config_version_file(4.05.06.007 2.9.2 1 0 0 0) # Request [older major].[newer minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 2.9.6 1 0 0 0) # Request [older major].[newer minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 2.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 4.0.0 1 1 0 0) # Request [same major].0.0
+test_write_basic_config_version_file(4.05.06.007 4.0.2 1 1 0 0) # Request [same major].0.[older patch]
+test_write_basic_config_version_file(4.05.06.007 4.0.6 1 1 0 0) # Request [same major].0.[same patch]
+test_write_basic_config_version_file(4.05.06.007 4.0.9 1 1 0 0) # Request [same major].0.[newer patch]
+test_write_basic_config_version_file(4.05.06.007 4.2.0 1 1 0 0) # Request [same major].[older minor].0
+test_write_basic_config_version_file(4.05.06.007 4.2.2 1 1 0 0) # Request [same major].[older minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 4.2.6 1 1 0 0) # Request [same major].[older minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 4.2.9 1 1 0 0) # Request [same major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 4.5.0 1 1 1 0) # Request [same major].[same minor].0
+test_write_basic_config_version_file(4.05.06.007 4.5.2 1 1 1 0) # Request [same major].[same minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 4.05.06 1 1 1 1) # Request [same major].[same minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 4.5.9 0 0 0 0) # Request [same major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 4.9.0 0 0 0 0) # Request [same major].[newer minor].0
+test_write_basic_config_version_file(4.05.06.007 4.9.2 0 0 0 0) # Request [same major].[newer minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 4.9.6 0 0 0 0) # Request [same major].[newer minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 4.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 9.0.0 0 0 0 0) # Request [newer major].0.0
+test_write_basic_config_version_file(4.05.06.007 9.0.2 0 0 0 0) # Request [newer major].0.[older patch]
+test_write_basic_config_version_file(4.05.06.007 9.0.6 0 0 0 0) # Request [newer major].0.[same patch]
+test_write_basic_config_version_file(4.05.06.007 9.0.9 0 0 0 0) # Request [newer major].0.[newer patch]
+test_write_basic_config_version_file(4.05.06.007 9.2.0 0 0 0 0) # Request [newer major].[older minor].0
+test_write_basic_config_version_file(4.05.06.007 9.2.2 0 0 0 0) # Request [newer major].[older minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 9.2.6 0 0 0 0) # Request [newer major].[older minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 9.2.9 0 0 0 0) # Request [newer major].[older minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 9.5.0 0 0 0 0) # Request [newer major].[same minor].0
+test_write_basic_config_version_file(4.05.06.007 9.5.2 0 0 0 0) # Request [newer major].[same minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 9.5.6 0 0 0 0) # Request [newer major].[same minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 9.5.9 0 0 0 0) # Request [newer major].[same minor].[newer patch]
+test_write_basic_config_version_file(4.05.06.007 9.9.0 0 0 0 0) # Request [newer major].[newer minor].0
+test_write_basic_config_version_file(4.05.06.007 9.9.2 0 0 0 0) # Request [newer major].[newer minor].[older patch]
+test_write_basic_config_version_file(4.05.06.007 9.9.6 0 0 0 0) # Request [newer major].[newer minor].[same patch]
+test_write_basic_config_version_file(4.05.06.007 9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch]
+
+test_write_basic_config_version_file(4.05.06.007 0.0.0.0 1 0 0 0) # Request 0.0.0.0
+test_write_basic_config_version_file(4.05.06.007 0.0.0.2 1 0 0 0) # Request 0.0.0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.0.7 1 0 0 0) # Request 0.0.0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.0.9 1 0 0 0) # Request 0.0.0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.2.0 1 0 0 0) # Request 0.0.[older patch].0
+test_write_basic_config_version_file(4.05.06.007 0.0.2.2 1 0 0 0) # Request 0.0.[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.2.7 1 0 0 0) # Request 0.0.[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.2.9 1 0 0 0) # Request 0.0.[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.6.0 1 0 0 0) # Request 0.0.[same patch].0
+test_write_basic_config_version_file(4.05.06.007 0.0.6.2 1 0 0 0) # Request 0.0.[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.6.7 1 0 0 0) # Request 0.0.[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.6.9 1 0 0 0) # Request 0.0.[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.9.0 1 0 0 0) # Request 0.0.[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 0.0.9.2 1 0 0 0) # Request 0.0.[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.9.7 1 0 0 0) # Request 0.0.[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.0.9.9 1 0 0 0) # Request 0.0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.0.0 1 0 0 0) # Request 0.[older minor].0.0
+test_write_basic_config_version_file(4.05.06.007 0.2.0.2 1 0 0 0) # Request 0.[older minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.0.7 1 0 0 0) # Request 0.[older minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.0.9 1 0 0 0) # Request 0.[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.2.0 1 0 0 0) # Request 0.[older minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 0.2.2.2 1 0 0 0) # Request 0.[older minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.2.7 1 0 0 0) # Request 0.[older minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.2.9 1 0 0 0) # Request 0.[older minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.6.0 1 0 0 0) # Request 0.[older minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 0.2.6.2 1 0 0 0) # Request 0.[older minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.6.7 1 0 0 0) # Request 0.[older minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.6.9 1 0 0 0) # Request 0.[older minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.9.0 1 0 0 0) # Request 0.[older minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 0.2.9.2 1 0 0 0) # Request 0.[older minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.9.7 1 0 0 0) # Request 0.[older minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.2.9.9 1 0 0 0) # Request 0.[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.0.0 1 0 0 0) # Request 0.[same minor].0.0
+test_write_basic_config_version_file(4.05.06.007 0.5.0.2 1 0 0 0) # Request 0.[same minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.0.7 1 0 0 0) # Request 0.[same minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.0.9 1 0 0 0) # Request 0.[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.2.0 1 0 0 0) # Request 0.[same minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 0.5.2.2 1 0 0 0) # Request 0.[same minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.2.7 1 0 0 0) # Request 0.[same minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.2.9 1 0 0 0) # Request 0.[same minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.6.0 1 0 0 0) # Request 0.[same minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 0.5.6.2 1 0 0 0) # Request 0.[same minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.6.7 1 0 0 0) # Request 0.[same minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.6.9 1 0 0 0) # Request 0.[same minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.9.0 1 0 0 0) # Request 0.[same minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 0.5.9.2 1 0 0 0) # Request 0.[same minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.9.7 1 0 0 0) # Request 0.[same minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.5.9.9 1 0 0 0) # Request 0.[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.0.0 1 0 0 0) # Request 0.[newer minor].0.0
+test_write_basic_config_version_file(4.05.06.007 0.9.0.2 1 0 0 0) # Request 0.[newer minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.0.7 1 0 0 0) # Request 0.[newer minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.0.9 1 0 0 0) # Request 0.[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.2.0 1 0 0 0) # Request 0.[newer minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 0.9.2.2 1 0 0 0) # Request 0.[newer minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.2.7 1 0 0 0) # Request 0.[newer minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.2.9 1 0 0 0) # Request 0.[newer minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.6.0 1 0 0 0) # Request 0.[newer minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 0.9.6.2 1 0 0 0) # Request 0.[newer minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.6.7 1 0 0 0) # Request 0.[newer minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.6.9 1 0 0 0) # Request 0.[newer minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.9.0 1 0 0 0) # Request 0.[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 0.9.9.2 1 0 0 0) # Request 0.[newer minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.9.7 1 0 0 0) # Request 0.[newer minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 0.9.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.0.0 1 0 0 0) # Request [older major].0.0.0
+test_write_basic_config_version_file(4.05.06.007 2.0.0.2 1 0 0 0) # Request [older major].0.0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.0.7 1 0 0 0) # Request [older major].0.0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.0.9 1 0 0 0) # Request [older major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.2.0 1 0 0 0) # Request [older major].0.[older patch].0
+test_write_basic_config_version_file(4.05.06.007 2.0.2.2 1 0 0 0) # Request [older major].0.[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.2.7 1 0 0 0) # Request [older major].0.[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.2.9 1 0 0 0) # Request [older major].0.[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.6.0 1 0 0 0) # Request [older major].0.[same patch].0
+test_write_basic_config_version_file(4.05.06.007 2.0.6.2 1 0 0 0) # Request [older major].0.[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.6.7 1 0 0 0) # Request [older major].0.[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.6.9 1 0 0 0) # Request [older major].0.[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.9.0 1 0 0 0) # Request [older major].0.[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 2.0.9.2 1 0 0 0) # Request [older major].0.[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.9.7 1 0 0 0) # Request [older major].0.[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.0.9.9 1 0 0 0) # Request [older major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.0.0 1 0 0 0) # Request [older major].[older minor].0.0
+test_write_basic_config_version_file(4.05.06.007 2.2.0.2 1 0 0 0) # Request [older major].[older minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.0.7 1 0 0 0) # Request [older major].[older minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.0.9 1 0 0 0) # Request [older major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.2.0 1 0 0 0) # Request [older major].[older minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 2.2.2.2 1 0 0 0) # Request [older major].[older minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.2.7 1 0 0 0) # Request [older major].[older minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.2.9 1 0 0 0) # Request [older major].[older minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.6.0 1 0 0 0) # Request [older major].[older minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 2.2.6.2 1 0 0 0) # Request [older major].[older minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.6.7 1 0 0 0) # Request [older major].[older minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.6.9 1 0 0 0) # Request [older major].[older minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.9.0 1 0 0 0) # Request [older major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 2.2.9.2 1 0 0 0) # Request [older major].[older minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.9.7 1 0 0 0) # Request [older major].[older minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.2.9.9 1 0 0 0) # Request [older major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.0.0 1 0 0 0) # Request [older major].[same minor].0.0
+test_write_basic_config_version_file(4.05.06.007 2.5.0.2 1 0 0 0) # Request [older major].[same minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.0.7 1 0 0 0) # Request [older major].[same minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.0.9 1 0 0 0) # Request [older major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.2.0 1 0 0 0) # Request [older major].[same minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 2.5.2.2 1 0 0 0) # Request [older major].[same minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.2.7 1 0 0 0) # Request [older major].[same minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.2.9 1 0 0 0) # Request [older major].[same minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.6.0 1 0 0 0) # Request [older major].[same minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 2.5.6.2 1 0 0 0) # Request [older major].[same minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.6.7 1 0 0 0) # Request [older major].[same minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.6.9 1 0 0 0) # Request [older major].[same minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.9.0 1 0 0 0) # Request [older major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 2.5.9.2 1 0 0 0) # Request [older major].[same minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.9.7 1 0 0 0) # Request [older major].[same minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.5.9.9 1 0 0 0) # Request [older major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.0.0 1 0 0 0) # Request [older major].[newer minor].0.0
+test_write_basic_config_version_file(4.05.06.007 2.9.0.2 1 0 0 0) # Request [older major].[newer minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.0.7 1 0 0 0) # Request [older major].[newer minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.0.9 1 0 0 0) # Request [older major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.2.0 1 0 0 0) # Request [older major].[newer minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 2.9.2.2 1 0 0 0) # Request [older major].[newer minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.2.7 1 0 0 0) # Request [older major].[newer minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.2.9 1 0 0 0) # Request [older major].[newer minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.6.0 1 0 0 0) # Request [older major].[newer minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 2.9.6.2 1 0 0 0) # Request [older major].[newer minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.6.7 1 0 0 0) # Request [older major].[newer minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.6.9 1 0 0 0) # Request [older major].[newer minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.9.0 1 0 0 0) # Request [older major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 2.9.9.2 1 0 0 0) # Request [older major].[newer minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.9.7 1 0 0 0) # Request [older major].[newer minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 2.9.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.0.0 1 1 0 0) # Request [same major].0.0.0
+test_write_basic_config_version_file(4.05.06.007 4.0.0.2 1 1 0 0) # Request [same major].0.0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.0.7 1 1 0 0) # Request [same major].0.0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.0.9 1 1 0 0) # Request [same major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.2.0 1 1 0 0) # Request [same major].0.[older patch].0
+test_write_basic_config_version_file(4.05.06.007 4.0.2.2 1 1 0 0) # Request [same major].0.[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.2.7 1 1 0 0) # Request [same major].0.[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.2.9 1 1 0 0) # Request [same major].0.[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.6.0 1 1 0 0) # Request [same major].0.[same patch].0
+test_write_basic_config_version_file(4.05.06.007 4.0.6.2 1 1 0 0) # Request [same major].0.[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.6.7 1 1 0 0) # Request [same major].0.[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.6.9 1 1 0 0) # Request [same major].0.[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.9.0 1 1 0 0) # Request [same major].0.[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 4.0.9.2 1 1 0 0) # Request [same major].0.[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.9.7 1 1 0 0) # Request [same major].0.[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.0.9.9 1 1 0 0) # Request [same major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.0.0 1 1 0 0) # Request [same major].[older minor].0.0
+test_write_basic_config_version_file(4.05.06.007 4.2.0.2 1 1 0 0) # Request [same major].[older minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.0.7 1 1 0 0) # Request [same major].[older minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.0.9 1 1 0 0) # Request [same major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.2.0 1 1 0 0) # Request [same major].[older minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 4.2.2.2 1 1 0 0) # Request [same major].[older minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.2.7 1 1 0 0) # Request [same major].[older minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.2.9 1 1 0 0) # Request [same major].[older minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.6.0 1 1 0 0) # Request [same major].[older minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 4.2.6.2 1 1 0 0) # Request [same major].[older minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.6.7 1 1 0 0) # Request [same major].[older minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.6.9 1 1 0 0) # Request [same major].[older minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.9.0 1 1 0 0) # Request [same major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 4.2.9.2 1 1 0 0) # Request [same major].[older minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.9.7 1 1 0 0) # Request [same major].[older minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.2.9.9 1 1 0 0) # Request [same major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.0.0 1 1 1 0) # Request [same major].[same minor].0.0
+test_write_basic_config_version_file(4.05.06.007 4.5.0.2 1 1 1 0) # Request [same major].[same minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.0.7 1 1 1 0) # Request [same major].[same minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.0.9 1 1 1 0) # Request [same major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.2.0 1 1 1 0) # Request [same major].[same minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 4.5.2.2 1 1 1 0) # Request [same major].[same minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.2.7 1 1 1 0) # Request [same major].[same minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.2.9 1 1 1 0) # Request [same major].[same minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.05.06.007 1 1 1 1) # Request [same major].[same minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 4.05.06.2 1 1 1 1) # Request [same major].[same minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.05.06.7 1 1 1 1) # Request [same major].[same minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.05.06.9 0 0 0 1) # Request [same major].[same minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.9.0 0 0 0 0) # Request [same major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 4.5.9.2 0 0 0 0) # Request [same major].[same minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.9.7 0 0 0 0) # Request [same major].[same minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.5.9.9 0 0 0 0) # Request [same major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.0.0 0 0 0 0) # Request [same major].[newer minor].0.0
+test_write_basic_config_version_file(4.05.06.007 4.9.0.2 0 0 0 0) # Request [same major].[newer minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.0.7 0 0 0 0) # Request [same major].[newer minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.0.9 0 0 0 0) # Request [same major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.2.0 0 0 0 0) # Request [same major].[newer minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 4.9.2.2 0 0 0 0) # Request [same major].[newer minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.2.7 0 0 0 0) # Request [same major].[newer minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.2.9 0 0 0 0) # Request [same major].[newer minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.6.0 0 0 0 0) # Request [same major].[newer minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 4.9.6.2 0 0 0 0) # Request [same major].[newer minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.6.7 0 0 0 0) # Request [same major].[newer minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.6.9 0 0 0 0) # Request [same major].[newer minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.9.0 0 0 0 0) # Request [same major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 4.9.9.2 0 0 0 0) # Request [same major].[newer minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.9.7 0 0 0 0) # Request [same major].[newer minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 4.9.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.0.0 0 0 0 0) # Request [newer major].0.0.0
+test_write_basic_config_version_file(4.05.06.007 9.0.0.2 0 0 0 0) # Request [newer major].0.0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.0.7 0 0 0 0) # Request [newer major].0.0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.0.9 0 0 0 0) # Request [newer major].0.0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.2.0 0 0 0 0) # Request [newer major].0.[older patch].0
+test_write_basic_config_version_file(4.05.06.007 9.0.2.2 0 0 0 0) # Request [newer major].0.[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.2.7 0 0 0 0) # Request [newer major].0.[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.2.9 0 0 0 0) # Request [newer major].0.[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.6.0 0 0 0 0) # Request [newer major].0.[same patch].0
+test_write_basic_config_version_file(4.05.06.007 9.0.6.2 0 0 0 0) # Request [newer major].0.[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.6.7 0 0 0 0) # Request [newer major].0.[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.6.9 0 0 0 0) # Request [newer major].0.[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.9.0 0 0 0 0) # Request [newer major].0.[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 9.0.9.2 0 0 0 0) # Request [newer major].0.[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.9.7 0 0 0 0) # Request [newer major].0.[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.0.9.9 0 0 0 0) # Request [newer major].0.[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.0.0 0 0 0 0) # Request [newer major].[older minor].0.0
+test_write_basic_config_version_file(4.05.06.007 9.2.0.2 0 0 0 0) # Request [newer major].[older minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.0.7 0 0 0 0) # Request [newer major].[older minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.0.9 0 0 0 0) # Request [newer major].[older minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.2.0 0 0 0 0) # Request [newer major].[older minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 9.2.2.2 0 0 0 0) # Request [newer major].[older minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.2.7 0 0 0 0) # Request [newer major].[older minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.2.9 0 0 0 0) # Request [newer major].[older minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.6.0 0 0 0 0) # Request [newer major].[older minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 9.2.6.2 0 0 0 0) # Request [newer major].[older minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.6.7 0 0 0 0) # Request [newer major].[older minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.6.9 0 0 0 0) # Request [newer major].[older minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.9.0 0 0 0 0) # Request [newer major].[older minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 9.2.9.2 0 0 0 0) # Request [newer major].[older minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.9.7 0 0 0 0) # Request [newer major].[older minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.2.9.9 0 0 0 0) # Request [newer major].[older minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.0.0 0 0 0 0) # Request [newer major].[same minor].0.0
+test_write_basic_config_version_file(4.05.06.007 9.5.0.2 0 0 0 0) # Request [newer major].[same minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.0.7 0 0 0 0) # Request [newer major].[same minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.0.9 0 0 0 0) # Request [newer major].[same minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.2.0 0 0 0 0) # Request [newer major].[same minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 9.5.2.2 0 0 0 0) # Request [newer major].[same minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.2.7 0 0 0 0) # Request [newer major].[same minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.2.9 0 0 0 0) # Request [newer major].[same minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.6.0 0 0 0 0) # Request [newer major].[same minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 9.5.6.2 0 0 0 0) # Request [newer major].[same minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.6.7 0 0 0 0) # Request [newer major].[same minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.6.9 0 0 0 0) # Request [newer major].[same minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.9.0 0 0 0 0) # Request [newer major].[same minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 9.5.9.2 0 0 0 0) # Request [newer major].[same minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.9.7 0 0 0 0) # Request [newer major].[same minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.5.9.9 0 0 0 0) # Request [newer major].[same minor].[newer patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.0.0 0 0 0 0) # Request [newer major].[newer minor].0.0
+test_write_basic_config_version_file(4.05.06.007 9.9.0.2 0 0 0 0) # Request [newer major].[newer minor].0.[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.0.7 0 0 0 0) # Request [newer major].[newer minor].0.[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.0.9 0 0 0 0) # Request [newer major].[newer minor].0.[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.2.0 0 0 0 0) # Request [newer major].[newer minor].[older patch].0
+test_write_basic_config_version_file(4.05.06.007 9.9.2.2 0 0 0 0) # Request [newer major].[newer minor].[older patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.2.7 0 0 0 0) # Request [newer major].[newer minor].[older patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.2.9 0 0 0 0) # Request [newer major].[newer minor].[older patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.6.0 0 0 0 0) # Request [newer major].[newer minor].[same patch].0
+test_write_basic_config_version_file(4.05.06.007 9.9.6.2 0 0 0 0) # Request [newer major].[newer minor].[same patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.6.7 0 0 0 0) # Request [newer major].[newer minor].[same patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.6.9 0 0 0 0) # Request [newer major].[newer minor].[same patch].[newer tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.9.0 0 0 0 0) # Request [newer major].[newer minor].[newer patch].0
+test_write_basic_config_version_file(4.05.06.007 9.9.9.2 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[older tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.9.7 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[same tweak]
+test_write_basic_config_version_file(4.05.06.007 9.9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[newer tweak]
+
+test_write_basic_config_version_file(4 0...5 1 0 0 0)
+test_write_basic_config_version_file(4 2...5 1 0 0 0)
+test_write_basic_config_version_file(4 2...4 1 0 0 0)
+test_write_basic_config_version_file(4 4...<5 1 1 0 0)
+test_write_basic_config_version_file(4 9...10 0 0 0 0)
+
+test_write_basic_config_version_file(4 0.1...5 1 0 0 0)
+test_write_basic_config_version_file(4 2.1...5 1 0 0 0)
+test_write_basic_config_version_file(4 2.8...5 1 0 0 0)
+test_write_basic_config_version_file(4 2.1...4 1 0 0 0)
+test_write_basic_config_version_file(4 2.8...4 1 0 0 0)
+test_write_basic_config_version_file(4 4.0...<5 1 1 0 0)
+test_write_basic_config_version_file(4 4.8...<5 0 0 0 0)
+test_write_basic_config_version_file(4 4.1...5 0 0 0 0)
+test_write_basic_config_version_file(4 4.8...5 0 0 0 0)
+test_write_basic_config_version_file(4 9.1...10 0 0 0 0)
+test_write_basic_config_version_file(4 9.8...10 0 0 0 0)
+
+
+test_write_basic_config_version_file(4.05 0.1...5 1 0 0 0)
+test_write_basic_config_version_file(4.05 2.1...5 1 0 0 0)
+test_write_basic_config_version_file(4.05 2.8...5 1 0 0 0)
+test_write_basic_config_version_file(4.05 2.1...4 0 0 0 0)
+test_write_basic_config_version_file(4.05 2.8...4 0 0 0 0)
+test_write_basic_config_version_file(4.05 2.8...4.8 1 0 0 0)
+test_write_basic_config_version_file(4.05 4.1...<5 1 1 0 0)
+test_write_basic_config_version_file(4.05 4.8...<5 0 0 0 0)
+test_write_basic_config_version_file(4.05 4.5...4.5.8 1 1 1 0)
+test_write_basic_config_version_file(4.05 4.5...<4.6 1 1 1 0)
+test_write_basic_config_version_file(4.05 4.1...5 1 0 0 0)
+test_write_basic_config_version_file(4.05 4.8...5 0 0 0 0)
+test_write_basic_config_version_file(4.05 9.1...10 0 0 0 0)
+test_write_basic_config_version_file(4.05 9.8...10 0 0 0 0)
+
+
+test_write_basic_config_version_file(4.5.06 0.1...5 1 0 0 0)
+test_write_basic_config_version_file(4.5.06 2.1...5 1 0 0 0)
+test_write_basic_config_version_file(4.5.06 2.8...5 1 0 0 0)
+test_write_basic_config_version_file(4.5.06 2.1...4 0 0 0 0)
+test_write_basic_config_version_file(4.5.06 2.8...4 0 0 0 0)
+test_write_basic_config_version_file(4.5.06 2.8...4.8 1 0 0 0)
+test_write_basic_config_version_file(4.5.06 4.1...<5 1 1 0 0)
+test_write_basic_config_version_file(4.5.06 4.8...<5 0 0 0 0)
+test_write_basic_config_version_file(4.5.06 4.5...4.5.4 0 0 0 0)
+test_write_basic_config_version_file(4.5.06 4.5...4.5.8 1 1 1 0)
+test_write_basic_config_version_file(4.5.06 4.5...<4.6 1 1 1 0)
+test_write_basic_config_version_file(4.5.06 4.1...5 1 0 0 0)
+test_write_basic_config_version_file(4.5.06 4.8...5 0 0 0 0)
+test_write_basic_config_version_file(4.5.06 9.1...10 0 0 0 0)
+test_write_basic_config_version_file(4.5.06 9.8...10 0 0 0 0)
diff --git a/Tests/RunCMake/WriteBasicConfigVersionFile/RunCMakeTest.cmake b/Tests/RunCMake/WriteBasicConfigVersionFile/RunCMakeTest.cmake
index 5db33f7..8a9db15 100644
--- a/Tests/RunCMake/WriteBasicConfigVersionFile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/WriteBasicConfigVersionFile/RunCMakeTest.cmake
@@ -2,3 +2,4 @@ include(RunCMake)
run_cmake(All)
run_cmake(ArchIndependent)
+run_cmake(LeadingZeroes)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-iOS-check.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-iOS-check.cmake
new file mode 100644
index 0000000..576be11
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-iOS-check.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/findAttribute.cmake)
+
+findAttribute(${test} "RemoveHeadersOnCopy" TRUE)
+findAttribute(${test} "CodeSignOnCopy" FALSE)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-iOS.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-iOS.cmake
new file mode 100644
index 0000000..839f842
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-iOS.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/EmbedAppExtensions.cmake)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-macOS-check.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-macOS-check.cmake
new file mode 100644
index 0000000..576be11
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-macOS-check.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/findAttribute.cmake)
+
+findAttribute(${test} "RemoveHeadersOnCopy" TRUE)
+findAttribute(${test} "CodeSignOnCopy" FALSE)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-macOS.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-macOS.cmake
new file mode 100644
index 0000000..839f842
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions-macOS.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/EmbedAppExtensions.cmake)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions.cmake
new file mode 100644
index 0000000..d7494ea
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedAppExtensions.cmake
@@ -0,0 +1,21 @@
+add_library(app_extension MODULE Empty.txt)
+set_target_properties(app_extension PROPERTIES
+ LINKER_LANGUAGE CXX
+ BUNDLE YES
+ XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO"
+ XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
+ XCODE_ATTRIBUTE_ENABLE_BITCODE "NO"
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
+ MACOSX_BUNDLE_GUI_IDENTIFIER "com.example.app.app_extension"
+ XCODE_PRODUCT_TYPE "com.apple.product-type.app-extension"
+ XCODE_EXPLICIT_FILE_TYPE "wrapper.app-extension"
+)
+
+add_executable(app MACOSX_BUNDLE main.m)
+add_dependencies(app app_extension)
+set_target_properties(app PROPERTIES
+ XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO"
+ XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
+ XCODE_EMBED_APP_EXTENSIONS app_extension
+ MACOSX_BUNDLE_GUI_IDENTIFIER "com.example.app"
+)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff-check.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff-check.cmake
index 9cc03b9..dbd3e87 100644
--- a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff-check.cmake
@@ -1,14 +1,4 @@
-function(findAttribute project attr)
- execute_process(
- COMMAND grep ${attr} ${RunCMake_TEST_BINARY_DIR}/${project}.xcodeproj/project.pbxproj
- OUTPUT_VARIABLE output_var
- RESULT_VARIABLE result_var
- )
+include(${CMAKE_CURRENT_LIST_DIR}/findAttribute.cmake)
- if(NOT result_var)
- set(RunCMake_TEST_FAILED "${attr} attribute is set" PARENT_SCOPE)
- endif()
-endfunction()
-
-findAttribute(${test} "RemoveHeadersOnCopy")
-findAttribute(${test} "CodeSignOnCopy")
+findAttribute(${test} "RemoveHeadersOnCopy" FALSE)
+findAttribute(${test} "CodeSignOnCopy" FALSE)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff.cmake
index f4fe07f..54375d5 100644
--- a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOff.cmake
@@ -1,7 +1,7 @@
add_executable(app MACOSX_BUNDLE main.m)
set_target_properties(app PROPERTIES
- XCODE_EMBED_FRAMEWORKS "${EXTERNAL_FWK}"
+ XCODE_EMBED_FRAMEWORKS "${EXTERNAL_DEPENDENCY}"
XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY OFF
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY OFF
)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-build-check.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-build-check.cmake
index e4ea55d..23fd49d 100644
--- a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-build-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-build-check.cmake
@@ -1,3 +1,3 @@
-if(NOT EXISTS ${RunCMake_TEST_BINARY_DIR}/Debug/app.app/Contents/Frameworks/sharedFrameworkExt.framework)
- set(RunCMake_TEST_FAILED "Framework was not embedded at the expected location")
+if(NOT EXISTS ${RunCMake_TEST_BINARY_DIR}/Debug/app.app/Contents/Frameworks/${EXTERNAL_DEPENDENCY_NAME})
+ set(RunCMake_TEST_FAILED "${EXTERNAL_DEPENDENCY_NAME} was not embedded at the expected location")
endif()
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-check.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-check.cmake
index 3f62640..0f57820 100644
--- a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir-check.cmake
@@ -1,14 +1,4 @@
-function(findAttribute project attr)
- execute_process(
- COMMAND grep ${attr} ${RunCMake_TEST_BINARY_DIR}/${project}.xcodeproj/project.pbxproj
- OUTPUT_VARIABLE output_var
- RESULT_VARIABLE result_var
- )
+include(${CMAKE_CURRENT_LIST_DIR}/findAttribute.cmake)
- if(result_var)
- set(RunCMake_TEST_FAILED "${attr} attribute not set" PARENT_SCOPE)
- endif()
-endfunction()
-
-findAttribute(${test} "RemoveHeadersOnCopy")
-findAttribute(${test} "CodeSignOnCopy")
+findAttribute(${test} "RemoveHeadersOnCopy" TRUE)
+findAttribute(${test} "CodeSignOnCopy" TRUE)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir.cmake
index 79d8d77..c76226f 100644
--- a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnNoSubdir.cmake
@@ -1,7 +1,7 @@
add_executable(app MACOSX_BUNDLE main.m)
set_target_properties(app PROPERTIES
- XCODE_EMBED_FRAMEWORKS "${EXTERNAL_FWK}"
+ XCODE_EMBED_FRAMEWORKS "${EXTERNAL_DEPENDENCY}"
XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY ON
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY ON
)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-build-check.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-build-check.cmake
index 57c79ea..732f04c 100644
--- a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-build-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-build-check.cmake
@@ -1,3 +1,3 @@
-if(NOT EXISTS ${RunCMake_TEST_BINARY_DIR}/Debug/app.app/Contents/Frameworks/subdir/sharedFrameworkExt.framework)
- set(RunCMake_TEST_FAILED "Framework was not embedded at the expected location")
+if(NOT EXISTS ${RunCMake_TEST_BINARY_DIR}/Debug/app.app/Contents/Frameworks/subdir/${EXTERNAL_DEPENDENCY_NAME})
+ set(RunCMake_TEST_FAILED "${EXTERNAL_DEPENDENCY_NAME} was not embedded at the expected location")
endif()
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-check.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-check.cmake
index 3f62640..0f57820 100644
--- a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir-check.cmake
@@ -1,14 +1,4 @@
-function(findAttribute project attr)
- execute_process(
- COMMAND grep ${attr} ${RunCMake_TEST_BINARY_DIR}/${project}.xcodeproj/project.pbxproj
- OUTPUT_VARIABLE output_var
- RESULT_VARIABLE result_var
- )
+include(${CMAKE_CURRENT_LIST_DIR}/findAttribute.cmake)
- if(result_var)
- set(RunCMake_TEST_FAILED "${attr} attribute not set" PARENT_SCOPE)
- endif()
-endfunction()
-
-findAttribute(${test} "RemoveHeadersOnCopy")
-findAttribute(${test} "CodeSignOnCopy")
+findAttribute(${test} "RemoveHeadersOnCopy" TRUE)
+findAttribute(${test} "CodeSignOnCopy" TRUE)
diff --git a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir.cmake b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir.cmake
index 4c78199..f83b1bf 100644
--- a/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksFlagsOnWithSubdir.cmake
@@ -1,7 +1,7 @@
add_executable(app MACOSX_BUNDLE main.m)
set_target_properties(app PROPERTIES
- XCODE_EMBED_FRAMEWORKS "${EXTERNAL_FWK}"
+ XCODE_EMBED_FRAMEWORKS "${EXTERNAL_DEPENDENCY}"
XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY ON
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY ON
XCODE_EMBED_FRAMEWORKS_PATH "subdir"
diff --git a/Tests/RunCMake/XcodeProject-Embed/Empty.txt b/Tests/RunCMake/XcodeProject-Embed/Empty.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Embed/Empty.txt
diff --git a/Tests/RunCMake/XcodeProject-Embed/ExternalFramework.cmake b/Tests/RunCMake/XcodeProject-Embed/ExternalDependencies.cmake
index 64e2f95..8c7b06a 100644
--- a/Tests/RunCMake/XcodeProject-Embed/ExternalFramework.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/ExternalDependencies.cmake
@@ -1,2 +1,4 @@
add_library(sharedFrameworkExt SHARED func.m)
set_target_properties(sharedFrameworkExt PROPERTIES FRAMEWORK TRUE)
+
+add_library(sharedDylibExt SHARED func.m)
diff --git a/Tests/RunCMake/XcodeProject-Embed/Info.plist.in b/Tests/RunCMake/XcodeProject-Embed/Info.plist.in
new file mode 100644
index 0000000..a26f316
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Embed/Info.plist.in
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <key>CFBundleDisplayName</key>
+ <string>SomeExtension</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.example.app.app_extension</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>app</string>
+ <key>CFBundlePackageType</key>
+ <string>XPC!</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0.0</string>
+ <key>CFBundleVersion</key>
+ <string>1.0.0</string>
+ <key>NSExtension</key>
+ <dict>
+ <key>NSExtensionPointIdentifier</key>
+ <string>com.apple.widgetkit-extension</string>
+ <key>NSExtensionPrincipalClass</key>
+ <string>SomeExtensionBrowserViewController</string>
+ </dict>
+</dict>
+</plist>
diff --git a/Tests/RunCMake/XcodeProject-Embed/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject-Embed/RunCMakeTest.cmake
index 0dc1cf3..f3a6918 100644
--- a/Tests/RunCMake/XcodeProject-Embed/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject-Embed/RunCMakeTest.cmake
@@ -1,30 +1,55 @@
include(RunCMake)
-# Build a framework that the other tests will use and treat as external.
+# Build dependencies that the other tests will use and treat as external.
# Always build in the Debug configuration so that the path to the framework
# is predictable.
-function(ExternalFramework)
+function(ExternalDependencies)
set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExternalFramework-build)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExternalDependencies-build)
set(externalFramework ${RunCMake_TEST_BINARY_DIR}/Debug/sharedFrameworkExt.framework PARENT_SCOPE)
+ set(externalDylib ${RunCMake_TEST_BINARY_DIR}/Debug/libsharedDylibExt.dylib PARENT_SCOPE)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
- run_cmake(ExternalFramework)
- run_cmake_command(ExternalFramework-build
+ run_cmake(ExternalDependencies)
+ run_cmake_command(ExternalDependencies-build
${CMAKE_COMMAND} --build ${RunCMake_TEST_BINARY_DIR}
--config Debug
- --target sharedFrameworkExt
+ --target sharedFrameworkExt sharedDylibExt
)
endfunction()
-ExternalFramework()
+ExternalDependencies()
-set(RunCMake_TEST_OPTIONS -DEXTERNAL_FWK=${externalFramework})
+function(TestFlagsOn testName dependencyName)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${testName}-${dependencyName}-build)
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(${testName})
+ run_cmake_command(${testName}-${dependencyName}-build
+ ${CMAKE_COMMAND} --build ${RunCMake_TEST_BINARY_DIR}
+ --config Debug
+ --target app
+ )
+endfunction()
-run_cmake(EmbedFrameworksFlagsOff)
+foreach(dependency ${externalFramework} ${externalDylib})
+ cmake_path(GET dependency FILENAME dependencyName)
+ set(RunCMake_TEST_OPTIONS -DEXTERNAL_DEPENDENCY=${dependency} -DEXTERNAL_DEPENDENCY_NAME=${dependencyName})
+ run_cmake(EmbedFrameworksFlagsOff)
+ TestFlagsOn(EmbedFrameworksFlagsOnNoSubdir ${dependencyName})
+ TestFlagsOn(EmbedFrameworksFlagsOnWithSubdir ${dependencyName})
+endforeach()
+unset(RunCMake_TEST_OPTIONS)
-function(TestFlagsOn testName)
+function(TestAppExtension platform)
+ set(testName EmbedAppExtensions-${platform})
+ if(NOT platform STREQUAL "macOS")
+ set(RunCMake_TEST_OPTIONS -DCMAKE_SYSTEM_NAME=${platform})
+ endif()
set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${testName}-build)
@@ -39,5 +64,13 @@ function(TestFlagsOn testName)
)
endfunction()
-TestFlagsOn(EmbedFrameworksFlagsOnNoSubdir)
-TestFlagsOn(EmbedFrameworksFlagsOnWithSubdir)
+# Isolate device tests from host architecture selection.
+unset(ENV{CMAKE_OSX_ARCHITECTURES})
+
+if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
+ # The various flag on/off combinations are tested by the EmbedFrameworks...
+ # tests, so we don't duplicate all the combinations here. We only verify the
+ # defaults, which is to remove headers on copy, but not code sign.
+ TestAppExtension(macOS)
+ TestAppExtension(iOS)
+endif()
diff --git a/Tests/RunCMake/XcodeProject-Embed/findAttribute.cmake b/Tests/RunCMake/XcodeProject-Embed/findAttribute.cmake
new file mode 100644
index 0000000..b1963e2
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Embed/findAttribute.cmake
@@ -0,0 +1,19 @@
+cmake_policy(VERSION 3.1...3.20)
+
+function(findAttribute project attr expectPresent)
+ execute_process(
+ COMMAND grep ${attr} ${RunCMake_TEST_BINARY_DIR}/${project}.xcodeproj/project.pbxproj
+ OUTPUT_VARIABLE output_var
+ RESULT_VARIABLE result_var
+ )
+
+ if(${expectPresent})
+ if(result_var)
+ set(RunCMake_TEST_FAILED "${attr} attribute is not set" PARENT_SCOPE)
+ endif()
+ else()
+ if(NOT result_var)
+ set(RunCMake_TEST_FAILED "${attr} attribute is set" PARENT_SCOPE)
+ endif()
+ endif()
+endfunction()
diff --git a/Tests/RunCMake/XcodeProject/InheritedParameters-check.cmake b/Tests/RunCMake/XcodeProject/InheritedParameters-check.cmake
new file mode 100644
index 0000000..4fe42ac
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/InheritedParameters-check.cmake
@@ -0,0 +1,49 @@
+set(xcProjectFile "${RunCMake_TEST_BINARY_DIR}/InheritedParameters.xcodeproj/project.pbxproj")
+if(NOT EXISTS "${xcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${xcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_inherited_GCC_PREPROCESSOR_DEFINITIONS 1)
+set(found_inherited_OTHER_CFLAGS 1)
+set(found_inherited_OTHER_LDFLAGS 1)
+
+file(STRINGS "${xcProjectFile}" lines)
+foreach(line IN LISTS lines)
+
+ if(line MATCHES [[GCC_PREPROCESSOR_DEFINITIONS]])
+ if(NOT line MATCHES [["\$\(inherited\)"]])
+ string(APPEND relevant_lines " ${line}\n")
+ set(found_inherited_GCC_PREPROCESSOR_DEFINITIONS 0)
+ endif()
+ endif()
+
+ if(line MATCHES [[OTHER_CFLAGS]])
+ if(NOT line MATCHES [["\$\(inherited\)"]])
+ string(APPEND relevant_lines " ${line}\n")
+ set(found_inherited_OTHER_CFLAGS 0)
+ endif()
+ endif()
+
+ if(line MATCHES [[OTHER_LDFLAGS]])
+ if(NOT line MATCHES [["\$\(inherited\)"]])
+ string(APPEND relevant_lines " ${line}\n")
+ set(found_inherited_OTHER_LDFLAGS 0)
+ endif()
+ endif()
+
+endforeach()
+
+if(NOT found_inherited_GCC_PREPROCESSOR_DEFINITIONS)
+ string(APPEND RunCMake_TEST_FAILED "Found missing inherited value for GCC_PREPROCESSOR_DEFINITIONS in\n ${xcProjectFile}\n")
+endif()
+if(NOT found_inherited_OTHER_CFLAGS)
+ string(APPEND RunCMake_TEST_FAILED "Found missing inherited value for OTHER_CFLAGS in\n ${xcProjectFile}\n")
+endif()
+if(NOT found_inherited_OTHER_LDFLAGS)
+ string(APPEND RunCMake_TEST_FAILED "Found missing inherited value for OTHER_LDFLAGS in\n ${xcProjectFile}\n")
+endif()
+
+if(RunCMake_TEST_FAILED)
+ string(APPEND RunCMake_TEST_FAILED "Relevant lines include\n${relevant_lines}")
+endif()
diff --git a/Tests/RunCMake/XcodeProject/InheritedParameters.cmake b/Tests/RunCMake/XcodeProject/InheritedParameters.cmake
new file mode 100644
index 0000000..5b8ec71
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/InheritedParameters.cmake
@@ -0,0 +1,8 @@
+enable_language(C)
+
+add_compile_definitions(TEST_INHERITTEST)
+string(APPEND CMAKE_C_FLAGS " -DTESTFLAG=\\\"TEST_INHERITTEST\\\"")
+
+add_executable(inherit_test main.c)
+
+target_link_libraries(inherit_test PRIVATE "TEST_INHERITTEST")
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 8b03216..ed8e725 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -4,6 +4,7 @@ run_cmake(ExplicitCMakeLists)
run_cmake(ImplicitCMakeLists)
run_cmake(InterfaceLibSources)
run_cmake_with_options(SearchPaths -DCMAKE_CONFIGURATION_TYPES=Debug)
+run_cmake(InheritedParameters)
run_cmake(XcodeFileType)
run_cmake(XcodeAttributeLocation)
@@ -387,4 +388,35 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
XcodeRemoveExcessiveISystemSDK(iphoneos)
XcodeRemoveExcessiveISystemSDK(iphonesimulator)
endif()
+
+if (XCODE_VERSION VERSION_GREATER_EQUAL 7.3)
+ function(xctest_add_bundle_test SystemName SDK BuildSystemVersion ExpectedOutputDir)
+ set(RunCMake_TEST_BINARY_DIR
+ ${RunCMake_BINARY_DIR}/DeploymentTarget-${SystemName}-${SDK}-${BuildSystemVersion}-build)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=${SystemName}"
+ "-DCMAKE_OSX_SYSROOT=${SDK}"
+ "-DTEST_EXPECTED_OUTPUT_DIR=${ExpectedOutputDir}")
+ unset(RunCMake_GENERATOR_TOOLSET)
+ if(BuildSystemVersion)
+ set(RunCMake_GENERATOR_TOOLSET "buildsystem=${BuildSystemVersion}")
+ endif()
+ run_cmake(XCTestAddBundle)
+ endfunction()
+
+ if(XCODE_VERSION VERSION_GREATER_EQUAL 12)
+ xctest_add_bundle_test(Darwin macosx "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ xctest_add_bundle_test(Darwin macosx "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ xctest_add_bundle_test(iOS iphonesimulator "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ if (XCODE_VERSION VERSION_LESS 12.5)
+ xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>")
+ else()
+ xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ endif()
+ else()
+ xctest_add_bundle_test(Darwin macosx "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ xctest_add_bundle_test(iOS iphonesimulator "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ endif()
+endif()
+
# Please add macOS-only tests above before the device-specific tests.
diff --git a/Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake b/Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake
new file mode 100644
index 0000000..9114fee
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake
@@ -0,0 +1,22 @@
+enable_language(Swift)
+
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
+find_package(XCTest REQUIRED)
+
+add_executable(TestedApp MACOSX_BUNDLE dummy_main.swift)
+
+xctest_add_bundle(TestingAppBundle TestedApp dummy_main.swift)
+
+get_target_property(_lib_output_dir TestingAppBundle LIBRARY_OUTPUT_DIRECTORY)
+
+if (NOT DEFINED TEST_EXPECTED_OUTPUT_DIR)
+ message(FATAL_ERROR "Testing variable TEST_EXPECTED_OUTPUT_DIR is not set")
+endif()
+
+if (NOT _lib_output_dir STREQUAL TEST_EXPECTED_OUTPUT_DIR)
+ message(SEND_ERROR "Property LIBRARY_OUTPUT_DIRECTORY is expected to be ${TEST_EXPECTED_OUTPUT_DIR} "
+ "but was ${_lib_output_dir}")
+endif()
diff --git a/Tests/RunCMake/XcodeProject/dummy_main.swift b/Tests/RunCMake/XcodeProject/dummy_main.swift
new file mode 100644
index 0000000..1aaee42
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/dummy_main.swift
@@ -0,0 +1,18 @@
+#if os(iOS)
+import UIKit
+
+@UIApplicationMain
+class MyApp: UIResponder, UIApplicationDelegate {
+}
+
+#elseif os(macOS)
+import SwiftUI
+
+@main
+struct MyApp: App {
+ var body: some Scene {
+ WindowGroup {
+ }
+ }
+}
+#endif
diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
index 9c59b4b..ad6b258 100644
--- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
@@ -43,3 +43,20 @@ if(NOT RunCMake_GENERATOR STREQUAL "Ninja Multi-Config")
unset(RunCMake_TEST_BINARY_DIR)
unset(RunCMake_TEST_NO_CLEAN)
endif()
+
+function(test_genex name)
+ run_cmake(${name})
+
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${name}-build")
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(${name}-build ${CMAKE_COMMAND} --build .)
+
+ if(NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/wdir/touched")
+ message(SEND_ERROR "File not created by target-dependent add_custom_command()!")
+ endif()
+
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_BINARY_DIR)
+endfunction()
+
+test_genex(TargetGenexEvent)
diff --git a/Tests/RunCMake/add_custom_command/TargetGenexEvent.cmake b/Tests/RunCMake/add_custom_command/TargetGenexEvent.cmake
new file mode 100644
index 0000000..8591b74
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/TargetGenexEvent.cmake
@@ -0,0 +1,10 @@
+add_custom_target(target ALL)
+set_target_properties(target PROPERTIES COMPILE_DEFINITIONS "touched" COMPILE_OPTIONS "${CMAKE_BINARY_DIR}/wdir")
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/wdir")
+
+add_custom_command(
+ TARGET target
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E touch $<TARGET_PROPERTY:COMPILE_DEFINITIONS>
+ WORKING_DIRECTORY $<TARGET_PROPERTY:COMPILE_OPTIONS>
+)
diff --git a/Tests/RunCMake/add_executable/RunCMakeTest.cmake b/Tests/RunCMake/add_executable/RunCMakeTest.cmake
index 88916b7..70a68f2 100644
--- a/Tests/RunCMake/add_executable/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_executable/RunCMakeTest.cmake
@@ -2,6 +2,4 @@ include(RunCMake)
run_cmake(NoSources)
run_cmake(OnlyObjectSources)
-if(NOT RunCMake_GENERATOR STREQUAL "Xcode" OR NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
- run_cmake(NoSourcesButLinkObjects)
-endif()
+run_cmake(NoSourcesButLinkObjects)
diff --git a/Tests/RunCMake/add_library/RunCMakeTest.cmake b/Tests/RunCMake/add_library/RunCMakeTest.cmake
index dfadb8f..3283625 100644
--- a/Tests/RunCMake/add_library/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_library/RunCMakeTest.cmake
@@ -16,11 +16,9 @@ run_cmake(SHAREDwithOnlyObjectSources)
run_cmake(MODULEwithOnlyObjectSources)
run_cmake(UNKNOWNwithOnlyObjectSources)
-if(NOT RunCMake_GENERATOR STREQUAL "Xcode" OR NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
- run_cmake(INTERFACEwithNoSourcesButLinkObjects)
- run_cmake(OBJECTwithNoSourcesButLinkObjects)
- run_cmake(STATICwithNoSourcesButLinkObjects)
- run_cmake(SHAREDwithNoSourcesButLinkObjects)
- run_cmake(MODULEwithNoSourcesButLinkObjects)
- run_cmake(UNKNOWNwithNoSourcesButLinkObjects)
-endif()
+run_cmake(INTERFACEwithNoSourcesButLinkObjects)
+run_cmake(OBJECTwithNoSourcesButLinkObjects)
+run_cmake(STATICwithNoSourcesButLinkObjects)
+run_cmake(SHAREDwithNoSourcesButLinkObjects)
+run_cmake(MODULEwithNoSourcesButLinkObjects)
+run_cmake(UNKNOWNwithNoSourcesButLinkObjects)
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt
index 7d76ed9..169f0cc 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt
@@ -1,4 +1,5 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- Install component: "Unspecified"
-- sub
-- top$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt
index 35b0bb5..426114b 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt
@@ -1,3 +1,4 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- sub
-- top$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt
index 4b39789..b26500e 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt
@@ -1,4 +1,5 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- Install component: "Unspecified"
-- top
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt
index 8f3a5f7..fcd556c 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt
@@ -1,3 +1,4 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- top
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-stderr.txt
new file mode 100644
index 0000000..50838c3
--- /dev/null
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0082 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt
index 4b39789..b26500e 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt
@@ -1,4 +1,5 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- Install component: "Unspecified"
-- top
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt
index 8f3a5f7..fcd556c 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt
@@ -1,3 +1,4 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- top
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt
index 4b39789..b26500e 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt
@@ -1,4 +1,5 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- Install component: "Unspecified"
-- top
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt
index 8f3a5f7..fcd556c 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt
@@ -1,3 +1,4 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- top
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt
index f7a331d..c6020bd 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt
@@ -1,3 +1,4 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- Install component: "Unspecified"
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt
index 6f22ae2..658386b 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt
@@ -1,2 +1,3 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt
index 157ab37..ad070d5 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt
@@ -1,3 +1,4 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- Install component: "Unspecified"
-- top$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt
index 9e15872..5a44e46 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt
@@ -1,2 +1,3 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- top$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt
index 4b39789..b26500e 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt
@@ -1,4 +1,5 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- Install component: "Unspecified"
-- top
-- sub$
diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt
index 8f3a5f7..fcd556c 100644
--- a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt
+++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt
@@ -1,3 +1,4 @@
-^-- Install configuration: "[^\n]*"
+^-- Install configuration: "[^
+]*"
-- top
-- sub$
diff --git a/Tests/RunCMake/build_command/ParallelLevel.cmake b/Tests/RunCMake/build_command/ParallelLevel.cmake
new file mode 100644
index 0000000..1d1e525
--- /dev/null
+++ b/Tests/RunCMake/build_command/ParallelLevel.cmake
@@ -0,0 +1,5 @@
+cmake_policy(SET CMP0061 NEW)
+build_command(cmd PARALLEL_LEVEL 1)
+if(NOT cmd MATCHES [[ --parallel "1"]])
+ message(FATAL_ERROR "Cannot find the --parallel flag")
+endif()
diff --git a/Tests/RunCMake/build_command/RunCMakeTest.cmake b/Tests/RunCMake/build_command/RunCMakeTest.cmake
index c3bef4c..030db0b 100644
--- a/Tests/RunCMake/build_command/RunCMakeTest.cmake
+++ b/Tests/RunCMake/build_command/RunCMakeTest.cmake
@@ -14,3 +14,5 @@ if(RunCMake_GENERATOR MATCHES "Make")
else()
run_cmake(CMP0061-OLD-other)
endif()
+
+run_cmake(ParallelLevel)
diff --git a/Tests/RunCMake/cmake_host_system_information/000-FirstFallbackScript.cmake b/Tests/RunCMake/cmake_host_system_information/000-FirstFallbackScript.cmake
new file mode 100644
index 0000000..ad873eb
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/000-FirstFallbackScript.cmake
@@ -0,0 +1 @@
+message(WARNING "The warning text to match just to make sure the script get executed")
diff --git a/Tests/RunCMake/cmake_host_system_information/999-LastFallbackScript.cmake b/Tests/RunCMake/cmake_host_system_information/999-LastFallbackScript.cmake
new file mode 100644
index 0000000..08d8da8
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/999-LastFallbackScript.cmake
@@ -0,0 +1,21 @@
+if(DEFINED CMAKE_GET_OS_RELEASE_FALLBACK_RESULT)
+ message(FATAL_ERROR "The `CMAKE_GET_OS_RELEASE_FALLBACK_RESULT` expected to be unset at this moment")
+endif()
+
+set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_NAME UnitTest)
+set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_PRETTY_NAME "Just a Unit Test")
+set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID unittest)
+set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID_LIKE nothing)
+set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION 0.0.1)
+set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION_ID 0.0.1)
+
+list(
+ APPEND CMAKE_GET_OS_RELEASE_FALLBACK_RESULT
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_NAME
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_PRETTY_NAME
+ IGNORED_VARIABLE_NAME_WHICH_IS_NOT_STARTED_WITH_EXPECTED_PREFIX
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID_LIKE
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION_ID
+ )
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg1-result.txt b/Tests/RunCMake/cmake_host_system_information/BadArg1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg1-stderr.txt b/Tests/RunCMake/cmake_host_system_information/BadArg1-stderr.txt
new file mode 100644
index 0000000..ed995e6
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg1-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at BadArg1\.cmake:1 \(cmake_host_system_information\):
+ cmake_host_system_information missing RESULT specification.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:7 \(include\)
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg1.cmake b/Tests/RunCMake/cmake_host_system_information/BadArg1.cmake
new file mode 100644
index 0000000..1655eb4
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg1.cmake
@@ -0,0 +1 @@
+cmake_host_system_information(HOSTNAME)
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg2-result.txt b/Tests/RunCMake/cmake_host_system_information/BadArg2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg2-stderr.txt b/Tests/RunCMake/cmake_host_system_information/BadArg2-stderr.txt
new file mode 100644
index 0000000..b78c927
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg2-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at BadArg2\.cmake:1 \(cmake_host_system_information\):
+ cmake_host_system_information missing QUERY specification
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:7 \(include\)
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg2.cmake b/Tests/RunCMake/cmake_host_system_information/BadArg2.cmake
new file mode 100644
index 0000000..1f056d5
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg2.cmake
@@ -0,0 +1 @@
+cmake_host_system_information(RESULT FQDN HOSTNAME)
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg3-result.txt b/Tests/RunCMake/cmake_host_system_information/BadArg3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg3-stderr.txt b/Tests/RunCMake/cmake_host_system_information/BadArg3-stderr.txt
new file mode 100644
index 0000000..c3f1314
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg3-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at BadArg3\.cmake:1 \(cmake_host_system_information\):
+ cmake_host_system_information does not recognize <key> FOOBAR
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:7 \(include\)
diff --git a/Tests/RunCMake/cmake_host_system_information/BadArg3.cmake b/Tests/RunCMake/cmake_host_system_information/BadArg3.cmake
new file mode 100644
index 0000000..9c5a558
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/BadArg3.cmake
@@ -0,0 +1 @@
+cmake_host_system_information(RESULT RESULT QUERY FOOBAR)
diff --git a/Tests/RunCMake/cmake_host_system_information/CMakeLists.txt b/Tests/RunCMake/cmake_host_system_information/CMakeLists.txt
new file mode 100644
index 0000000..0198f9b
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/CMakeLists.txt
@@ -0,0 +1,7 @@
+cmake_minimum_required(VERSION 3.21)
+
+project(${RunCMake_TEST} NONE)
+
+set(CMAKE_SYSROOT ${PROJECT_SOURCE_DIR}/${RunCMake_TEST})
+
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/cmake_host_system_information/CentOS6-stdout.txt b/Tests/RunCMake/cmake_host_system_information/CentOS6-stdout.txt
new file mode 100644
index 0000000..50dbb08
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/CentOS6-stdout.txt
@@ -0,0 +1,7 @@
+-- CENTOS6_ID=`centos`
+-- CENTOS6_ID_LIKE=`rhel`
+-- CENTOS6_NAME=`CentOS`
+-- CENTOS6_PRETTY_NAME=`CentOS release 6\.10 \(Final\)`
+-- CENTOS6_USED_FALLBACK_SCRIPT=`.*/Modules/Internal/OSRelease/010-TryOldCentOS.cmake`
+-- CENTOS6_VERSION=`6\.10`
+-- CENTOS6_VERSION_ID=`6\.10`
diff --git a/Tests/RunCMake/cmake_host_system_information/CentOS6.cmake b/Tests/RunCMake/cmake_host_system_information/CentOS6.cmake
new file mode 100644
index 0000000..3bc632b
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/CentOS6.cmake
@@ -0,0 +1,5 @@
+cmake_host_system_information(RESULT CENTOS6 QUERY DISTRIB_INFO)
+
+foreach(VAR IN LISTS CENTOS6)
+ message(STATUS "${VAR}=`${${VAR}}`")
+endforeach()
diff --git a/Tests/RunCMake/cmake_host_system_information/CentOS6/etc/centos-release b/Tests/RunCMake/cmake_host_system_information/CentOS6/etc/centos-release
new file mode 100644
index 0000000..294ccc9
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/CentOS6/etc/centos-release
@@ -0,0 +1 @@
+CentOS release 6.10 (Final)
diff --git a/Tests/RunCMake/cmake_host_system_information/Debian6-stdout.txt b/Tests/RunCMake/cmake_host_system_information/Debian6-stdout.txt
new file mode 100644
index 0000000..4193d6f
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Debian6-stdout.txt
@@ -0,0 +1,5 @@
+-- DEBIAN6_ID=`debian`
+-- DEBIAN6_NAME=`Debian`
+-- DEBIAN6_USED_FALLBACK_SCRIPT=`.*/Modules/Internal/OSRelease/020-TryDebianVersion.cmake`
+-- DEBIAN6_VERSION=`6\.0\.10`
+-- DEBIAN6_VERSION_ID=`6\.0\.10`
diff --git a/Tests/RunCMake/cmake_host_system_information/Debian6.cmake b/Tests/RunCMake/cmake_host_system_information/Debian6.cmake
new file mode 100644
index 0000000..cbf83a9
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Debian6.cmake
@@ -0,0 +1,5 @@
+cmake_host_system_information(RESULT DEBIAN6 QUERY DISTRIB_INFO)
+
+foreach(VAR IN LISTS DEBIAN6)
+ message(STATUS "${VAR}=`${${VAR}}`")
+endforeach()
diff --git a/Tests/RunCMake/cmake_host_system_information/Debian6/etc/debian_version b/Tests/RunCMake/cmake_host_system_information/Debian6/etc/debian_version
new file mode 100644
index 0000000..c7d48f0
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Debian6/etc/debian_version
@@ -0,0 +1 @@
+6.0.10
diff --git a/Tests/RunCMake/cmake_host_system_information/Exherbo-stdout.txt b/Tests/RunCMake/cmake_host_system_information/Exherbo-stdout.txt
new file mode 100644
index 0000000..11ae71f
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Exherbo-stdout.txt
@@ -0,0 +1,9 @@
+-- TEST1_ANSI_COLOR=`0;32`
+-- TEST1_BUG_REPORT_URL=`https://bugs.exherbo.org/`
+-- TEST1_HOME_URL=`https://www.exherbo.org/`
+-- TEST1_ID=`exherbo`
+-- TEST1_NAME=`Exherbo`
+-- TEST1_PRETTY_NAME=`Exherbo Linux`
+-- TEST1_SUPPORT_URL=`irc://irc.freenode.net/#exherbo`
+-- TEST2_ID=`exherbo`
+-- TEST2_VERSION=``
diff --git a/Tests/RunCMake/cmake_host_system_information/Exherbo.cmake b/Tests/RunCMake/cmake_host_system_information/Exherbo.cmake
new file mode 100644
index 0000000..7fc26d8
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Exherbo.cmake
@@ -0,0 +1,11 @@
+cmake_host_system_information(RESULT TEST1 QUERY DISTRIB_INFO)
+
+foreach(VAR IN LISTS TEST1)
+ message(STATUS "${VAR}=`${${VAR}}`")
+endforeach()
+
+# Query individual variables
+cmake_host_system_information(RESULT TEST2 QUERY DISTRIB_ID DISTRIB_VERSION)
+list(POP_FRONT TEST2 TEST2_ID TEST2_VERSION)
+message(STATUS "TEST2_ID=`${TEST2_ID}`")
+message(STATUS "TEST2_VERSION=`${TEST2_VERSION}`")
diff --git a/Tests/RunCMake/cmake_host_system_information/Exherbo/etc/os-release b/Tests/RunCMake/cmake_host_system_information/Exherbo/etc/os-release
new file mode 100644
index 0000000..944c9b4
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Exherbo/etc/os-release
@@ -0,0 +1,7 @@
+NAME="Exherbo"
+PRETTY_NAME="Exherbo Linux"
+ID="exherbo"
+ANSI_COLOR="0;32"
+HOME_URL="https://www.exherbo.org/"
+SUPPORT_URL="irc://irc.freenode.net/#exherbo"
+BUG_REPORT_URL="https://bugs.exherbo.org/"
diff --git a/Tests/RunCMake/cmake_host_system_information/QueryKeys-stdout.txt b/Tests/RunCMake/cmake_host_system_information/QueryKeys-stdout.txt
new file mode 100644
index 0000000..f583deb
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/QueryKeys-stdout.txt
@@ -0,0 +1,27 @@
+-- NUMBER_OF_LOGICAL_CORES=`[0-9]+`
+-- NUMBER_OF_PHYSICAL_CORES=`[0-9]+`
+-- HOSTNAME=`.*`
+-- FQDN=`.*`
+-- TOTAL_VIRTUAL_MEMORY=`[0-9]+`
+-- AVAILABLE_VIRTUAL_MEMORY=`[0-9]+`
+-- TOTAL_PHYSICAL_MEMORY=`[0-9]+`
+-- AVAILABLE_PHYSICAL_MEMORY=`[0-9]+`
+-- IS_64BIT=`[01]`
+-- HAS_FPU=`[01]`
+-- HAS_MMX=`[01]`
+-- HAS_MMX_PLUS=`[01]`
+-- HAS_SSE=`[01]`
+-- HAS_SSE2=`[01]`
+-- HAS_SSE_FP=`[01]`
+-- HAS_SSE_MMX=`[01]`
+-- HAS_AMD_3DNOW=`[01]`
+-- HAS_AMD_3DNOW_PLUS=`[01]`
+-- HAS_IA64=`[01]`
+-- HAS_SERIAL_NUMBER=`[01]`
+-- PROCESSOR_SERIAL_NUMBER=`.*`
+-- PROCESSOR_NAME=`.*`
+-- PROCESSOR_DESCRIPTION=`.*`
+-- OS_NAME=`.*`
+-- OS_RELEASE=`.*`
+-- OS_VERSION=`.*`
+-- OS_PLATFORM=`.*`
diff --git a/Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake b/Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake
new file mode 100644
index 0000000..f22a0ae
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake
@@ -0,0 +1,32 @@
+function(try_and_print key)
+ cmake_host_system_information(RESULT RESULT QUERY ${key})
+ message(STATUS "${key}=`${RESULT}`")
+endfunction()
+
+try_and_print(NUMBER_OF_LOGICAL_CORES)
+try_and_print(NUMBER_OF_PHYSICAL_CORES)
+try_and_print(HOSTNAME)
+try_and_print(FQDN)
+try_and_print(TOTAL_VIRTUAL_MEMORY)
+try_and_print(AVAILABLE_VIRTUAL_MEMORY)
+try_and_print(TOTAL_PHYSICAL_MEMORY)
+try_and_print(AVAILABLE_PHYSICAL_MEMORY)
+try_and_print(IS_64BIT)
+try_and_print(HAS_FPU)
+try_and_print(HAS_MMX)
+try_and_print(HAS_MMX_PLUS)
+try_and_print(HAS_SSE)
+try_and_print(HAS_SSE2)
+try_and_print(HAS_SSE_FP)
+try_and_print(HAS_SSE_MMX)
+try_and_print(HAS_AMD_3DNOW)
+try_and_print(HAS_AMD_3DNOW_PLUS)
+try_and_print(HAS_IA64)
+try_and_print(HAS_SERIAL_NUMBER)
+try_and_print(PROCESSOR_SERIAL_NUMBER)
+try_and_print(PROCESSOR_NAME)
+try_and_print(PROCESSOR_DESCRIPTION)
+try_and_print(OS_NAME)
+try_and_print(OS_RELEASE)
+try_and_print(OS_VERSION)
+try_and_print(OS_PLATFORM)
diff --git a/Tests/RunCMake/cmake_host_system_information/QueryList-stdout.txt b/Tests/RunCMake/cmake_host_system_information/QueryList-stdout.txt
new file mode 100644
index 0000000..eebe0d4
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/QueryList-stdout.txt
@@ -0,0 +1 @@
+-- \[[0-9]+;[0-9]+\]
diff --git a/Tests/RunCMake/cmake_host_system_information/QueryList.cmake b/Tests/RunCMake/cmake_host_system_information/QueryList.cmake
new file mode 100644
index 0000000..f24aa2b
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/QueryList.cmake
@@ -0,0 +1,5 @@
+cmake_host_system_information(RESULT RESULT
+ QUERY NUMBER_OF_LOGICAL_CORES NUMBER_OF_PHYSICAL_CORES
+)
+
+message(STATUS "[${RESULT}]")
diff --git a/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake b/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake
new file mode 100644
index 0000000..189013f
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake
@@ -0,0 +1,17 @@
+include(RunCMake)
+
+run_cmake(BadArg1)
+run_cmake(BadArg2)
+run_cmake(BadArg3)
+
+run_cmake(QueryList)
+run_cmake(QueryKeys)
+
+run_cmake(UnitTest)
+run_cmake(Exherbo)
+run_cmake(Ubuntu)
+
+run_cmake(CentOS6)
+run_cmake(Debian6)
+
+run_cmake(UserFallbackScript)
diff --git a/Tests/RunCMake/cmake_host_system_information/Ubuntu-stdout.txt b/Tests/RunCMake/cmake_host_system_information/Ubuntu-stdout.txt
new file mode 100644
index 0000000..d1a18da
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Ubuntu-stdout.txt
@@ -0,0 +1,14 @@
+-- TEST1_BUG_REPORT_URL=`https://bugs\.launchpad\.net/ubuntu/`
+-- TEST1_HOME_URL=`https://www\.ubuntu\.com/`
+-- TEST1_ID=`ubuntu`
+-- TEST1_ID_LIKE=`debian`
+-- TEST1_NAME=`Ubuntu`
+-- TEST1_PRETTY_NAME=`Ubuntu 20\.04\.2 LTS`
+-- TEST1_PRIVACY_POLICY_URL=`https://www\.ubuntu\.com/legal/terms-and-policies/privacy-policy`
+-- TEST1_SUPPORT_URL=`https://help\.ubuntu\.com/`
+-- TEST1_UBUNTU_CODENAME=`focal`
+-- TEST1_VERSION=`20\.04\.2 LTS \(Focal Fossa\)`
+-- TEST1_VERSION_CODENAME=`focal`
+-- TEST1_VERSION_ID=`20\.04`
+-- TEST2_ID=`ubuntu`
+-- TEST2_VERSION=`20\.04\.2 LTS \(Focal Fossa\)`
diff --git a/Tests/RunCMake/cmake_host_system_information/Ubuntu.cmake b/Tests/RunCMake/cmake_host_system_information/Ubuntu.cmake
new file mode 100644
index 0000000..7fc26d8
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Ubuntu.cmake
@@ -0,0 +1,11 @@
+cmake_host_system_information(RESULT TEST1 QUERY DISTRIB_INFO)
+
+foreach(VAR IN LISTS TEST1)
+ message(STATUS "${VAR}=`${${VAR}}`")
+endforeach()
+
+# Query individual variables
+cmake_host_system_information(RESULT TEST2 QUERY DISTRIB_ID DISTRIB_VERSION)
+list(POP_FRONT TEST2 TEST2_ID TEST2_VERSION)
+message(STATUS "TEST2_ID=`${TEST2_ID}`")
+message(STATUS "TEST2_VERSION=`${TEST2_VERSION}`")
diff --git a/Tests/RunCMake/cmake_host_system_information/Ubuntu/etc/os-release b/Tests/RunCMake/cmake_host_system_information/Ubuntu/etc/os-release
new file mode 100644
index 0000000..f228f22
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/Ubuntu/etc/os-release
@@ -0,0 +1,12 @@
+NAME="Ubuntu"
+VERSION="20.04.2 LTS (Focal Fossa)"
+ID=ubuntu
+ID_LIKE=debian
+PRETTY_NAME="Ubuntu 20.04.2 LTS"
+VERSION_ID="20.04"
+HOME_URL="https://www.ubuntu.com/"
+SUPPORT_URL="https://help.ubuntu.com/"
+BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
+PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
+VERSION_CODENAME=focal
+UBUNTU_CODENAME=focal
diff --git a/Tests/RunCMake/cmake_host_system_information/UnitTest-stdout.txt b/Tests/RunCMake/cmake_host_system_information/UnitTest-stdout.txt
new file mode 100644
index 0000000..db6f487
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/UnitTest-stdout.txt
@@ -0,0 +1,7 @@
+-- UNIT_TEST_A_LIST_LIKE_VARIABLE=`satu;dua;tiga`
+-- UNIT_TEST_DBL_QUOTED_VALUE=`"The" value in double "quotes"`
+-- UNIT_TEST_DBL_QUOTED_VALUE_STIPPED_COMMENT=`Blah blah blah`
+-- UNIT_TEST_NON_SPACE_VALUE=`Blah-blah-blah`
+-- UNIT_TEST_QUOTED_VALUE=`'The' value in single 'quotes'`
+-- UNIT_TEST_QUOTED_VALUE_STIPPED_COMMENT=`The value in single quotes`
+-- UNIT_TEST_THE_URL_WITH_ANCHOR_TEST=`https://blah.blah/resource#anchor`
diff --git a/Tests/RunCMake/cmake_host_system_information/UnitTest.cmake b/Tests/RunCMake/cmake_host_system_information/UnitTest.cmake
new file mode 100644
index 0000000..d9a0aca
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/UnitTest.cmake
@@ -0,0 +1,5 @@
+cmake_host_system_information(RESULT UNIT_TEST QUERY DISTRIB_INFO)
+
+foreach(VAR IN LISTS UNIT_TEST)
+ message(STATUS "${VAR}=`${${VAR}}`")
+endforeach()
diff --git a/Tests/RunCMake/cmake_host_system_information/UnitTest/etc/os-release b/Tests/RunCMake/cmake_host_system_information/UnitTest/etc/os-release
new file mode 100644
index 0000000..66c33b5
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/UnitTest/etc/os-release
@@ -0,0 +1,9 @@
+# Comment string gonna be ignored
+NON_SPACE_VALUE=Blah-blah-blah
+QUOTED_VALUE='\'The\' value in single \'quotes\''
+QUOTED_VALUE_STIPPED_COMMENT='The value in single quotes'# The comment right after `'`
+DBL_QUOTED_VALUE="\"The\" value in double \"quotes\""
+DBL_QUOTED_VALUE_STIPPED_COMMENT="Blah blah blah"# The comment right after `'`
+THE_URL_WITH_ANCHOR_TEST="https://blah.blah/resource#anchor" # And a comment after
+A_LIST_LIKE_VARIABLE='satu;dua;tiga'
+INCORRECT_ESCAPE_IGNORED=\'This line gonna be ignored'
diff --git a/Tests/RunCMake/cmake_host_system_information/UserFallbackScript-stderr.txt b/Tests/RunCMake/cmake_host_system_information/UserFallbackScript-stderr.txt
new file mode 100644
index 0000000..78acea2
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/UserFallbackScript-stderr.txt
@@ -0,0 +1,5 @@
+CMake Warning at 000-FirstFallbackScript\.cmake:[0-9]+ \(message\):
+ The warning text to match just to make sure the script get executed
+Call Stack \(most recent call first\):
+ UserFallbackScript\.cmake:[0-9]+ \(cmake_host_system_information\)
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/cmake_host_system_information/UserFallbackScript-stdout.txt b/Tests/RunCMake/cmake_host_system_information/UserFallbackScript-stdout.txt
new file mode 100644
index 0000000..acaf47e
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/UserFallbackScript-stdout.txt
@@ -0,0 +1,7 @@
+-- UFS_ID=`unittest`
+-- UFS_ID_LIKE=`nothing`
+-- UFS_NAME=`UnitTest`
+-- UFS_PRETTY_NAME=`Just a Unit Test`
+-- UFS_USED_FALLBACK_SCRIPT=`.*/999-LastFallbackScript\.cmake`
+-- UFS_VERSION=`0\.0\.1`
+-- UFS_VERSION_ID=`0\.0\.1`
diff --git a/Tests/RunCMake/cmake_host_system_information/UserFallbackScript.cmake b/Tests/RunCMake/cmake_host_system_information/UserFallbackScript.cmake
new file mode 100644
index 0000000..660aa1c
--- /dev/null
+++ b/Tests/RunCMake/cmake_host_system_information/UserFallbackScript.cmake
@@ -0,0 +1,12 @@
+list(
+ APPEND CMAKE_GET_OS_RELEASE_FALLBACK_SCRIPTS
+ ${CMAKE_CURRENT_SOURCE_DIR}/000-FirstFallbackScript.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/Ignored-Script.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/999-LastFallbackScript.cmake
+ )
+
+cmake_host_system_information(RESULT UFS QUERY DISTRIB_INFO)
+
+foreach(VAR IN LISTS UFS)
+ message(STATUS "${VAR}=`${${VAR}}`")
+endforeach()
diff --git a/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt b/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt
index 2fd194d..674ff1d 100644
--- a/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt
+++ b/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt
@@ -5,7 +5,7 @@
-- Immediate Message: cancelCall='cmake_language;DEFER;CANCEL_CALL;toBeCancelled'
-- Immediate Message: getCallIds2='cmake_language;DEFER;GET_CALL_IDS;ids'
-- Immediate Message: messageIds2='cmake_language;EVAL;CODE;message\(STATUS "Deferred Message: ids='\${ids}'"\)'
--- Immediate Message: toBeCancelled='message;STATUS;Cancelled Message'
+-- Immediate Message: toBeCancelled='message;STATUS;Canceled Message'
-- Immediate Message: message3='message;STATUS;Final Deferred Message'
-- First Deferred Message
-- Deferred Message: ids='messageIds1;cancelCall;getCallIds2;messageIds2;toBeCancelled;message3'
diff --git a/Tests/RunCMake/cmake_language/defer_call_ids.cmake b/Tests/RunCMake/cmake_language/defer_call_ids.cmake
index 2874894..fd5bc17 100644
--- a/Tests/RunCMake/cmake_language/defer_call_ids.cmake
+++ b/Tests/RunCMake/cmake_language/defer_call_ids.cmake
@@ -4,7 +4,7 @@ cmake_language(DEFER ID messageIds1 CALL cmake_language EVAL CODE [[message(STAT
cmake_language(DEFER ID cancelCall CALL cmake_language DEFER CANCEL_CALL toBeCancelled)
cmake_language(DEFER ID getCallIds2 CALL cmake_language DEFER GET_CALL_IDS ids)
cmake_language(DEFER ID messageIds2 CALL cmake_language EVAL CODE [[message(STATUS "Deferred Message: ids='${ids}'")]])
-cmake_language(DEFER ID toBeCancelled CALL message STATUS "Cancelled Message")
+cmake_language(DEFER ID toBeCancelled CALL message STATUS "Canceled Message")
cmake_language(DEFER ID message3 CALL message STATUS "Final Deferred Message")
cmake_language(DEFER GET_CALL_IDS ids)
message(STATUS "Immediate Message: ids='${ids}'")
diff --git a/Tests/RunCMake/configure_file/NoSourcePermissions.cmake b/Tests/RunCMake/configure_file/NoSourcePermissions.cmake
index c6ad131..85533c4 100644
--- a/Tests/RunCMake/configure_file/NoSourcePermissions.cmake
+++ b/Tests/RunCMake/configure_file/NoSourcePermissions.cmake
@@ -1,7 +1,7 @@
configure_file(NoSourcePermissions.sh NoSourcePermissions.sh.out
NO_SOURCE_PERMISSIONS)
-if (UNIX)
+if (UNIX AND NOT MSYS)
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/NoSourcePermissions.sh.out
RESULT_VARIABLE result)
if (result EQUAL "0")
diff --git a/Tests/RunCMake/configure_file/SourcePermissions.cmake b/Tests/RunCMake/configure_file/SourcePermissions.cmake
index c4d3d61..f8c506a 100644
--- a/Tests/RunCMake/configure_file/SourcePermissions.cmake
+++ b/Tests/RunCMake/configure_file/SourcePermissions.cmake
@@ -6,7 +6,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sourcefile.txt
WORLD_READ
)
-if (CMAKE_HOST_UNIX)
+if (CMAKE_HOST_UNIX AND NOT MSYS)
find_program(STAT_EXECUTABLE NAMES stat)
if(NOT STAT_EXECUTABLE)
return()
diff --git a/Tests/RunCMake/ctest_build/ParallelLevel-check.cmake b/Tests/RunCMake/ctest_build/ParallelLevel-check.cmake
new file mode 100644
index 0000000..f45d2a2
--- /dev/null
+++ b/Tests/RunCMake/ctest_build/ParallelLevel-check.cmake
@@ -0,0 +1,11 @@
+file(GLOB build_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Build.xml")
+if(build_xml_file)
+ file(STRINGS "${build_xml_file}" build_cmd LIMIT_COUNT 1 REGEX "<BuildCommand>")
+ if(NOT build_cmd MATCHES [[ --parallel "1"]])
+ set(RunCMake_TEST_FAILED
+ "Build.xml does not have expected build command with --parallel flag"
+ )
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "Build.xml not found")
+endif()
diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
index 072fbac..511cd71 100644
--- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
@@ -10,6 +10,7 @@ function(run_ctest_build CASE_NAME)
endfunction()
run_ctest_build(BuildQuiet QUIET)
+run_ctest_build(ParallelLevel PARALLEL_LEVEL 1)
function(run_BuildFailure)
set(CASE_CMAKELISTS_SUFFIX_CODE [[
diff --git a/Tests/RunCMake/ctest_environment/CMakeLists.txt.in b/Tests/RunCMake/ctest_environment/CMakeLists.txt.in
new file mode 100644
index 0000000..c9c4a64
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/CMakeLists.txt.in
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.21.0)
+project("@CASE_NAME@" NONE)
+include("@CASE_SOURCE_DIR@/@CASE_NAME@.cmake")
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op-result.txt b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op-stderr.txt b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op-stderr.txt
new file mode 100644
index 0000000..5b56d6f
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op-stderr.txt
@@ -0,0 +1 @@
+Error: Unrecognized environment manipulation argument: unknown
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op.cmake b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op.cmake
new file mode 100644
index 0000000..d6ca4b2
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-invalid-op.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+add_test(NAME cmake_version COMMAND "${CMAKE_COMMAND}" --version)
+
+set_property(TEST cmake_version
+ PROPERTY ENVIRONMENT_MODIFICATION
+ INVALID_OP=unknown:)
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon-result.txt b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon-stderr.txt b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon-stderr.txt
new file mode 100644
index 0000000..3ba6ba7
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon-stderr.txt
@@ -0,0 +1 @@
+Error: Missing `:` after the operation in: MISSING_COLON=unset
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon.cmake b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon.cmake
new file mode 100644
index 0000000..601dd8b
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-colon.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+
+add_test(NAME cmake_version COMMAND "${CMAKE_COMMAND}" --version)
+set_property(TEST cmake_version
+ PROPERTY ENVIRONMENT_MODIFICATION
+ MISSING_COLON=unset)
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals-result.txt b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals-stderr.txt b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals-stderr.txt
new file mode 100644
index 0000000..20bc9a5
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals-stderr.txt
@@ -0,0 +1 @@
+Error: Missing `=` after the variable name in: MISSING_EQUAL
diff --git a/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals.cmake b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals.cmake
new file mode 100644
index 0000000..18448cf
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/ENVIRONMENT_MODIFICATION-no-equals.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+
+add_test(NAME cmake_version COMMAND "${CMAKE_COMMAND}" --version)
+set_property(TEST cmake_version
+ PROPERTY ENVIRONMENT_MODIFICATION
+ MISSING_EQUAL)
diff --git a/Tests/RunCMake/ctest_environment/RunCMakeTest.cmake b/Tests/RunCMake/ctest_environment/RunCMakeTest.cmake
new file mode 100644
index 0000000..3447779
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/RunCMakeTest.cmake
@@ -0,0 +1,12 @@
+include(RunCTest)
+
+# Isolate our ctest runs from external environment.
+unset(ENV{CTEST_PARALLEL_LEVEL})
+unset(ENV{CTEST_OUTPUT_ON_FAILURE})
+
+set(CASE_SOURCE_DIR "${RunCMake_SOURCE_DIR}")
+set(RunCTest_VERBOSE_FLAG "-VV")
+
+run_ctest(ENVIRONMENT_MODIFICATION-invalid-op)
+run_ctest(ENVIRONMENT_MODIFICATION-no-colon)
+run_ctest(ENVIRONMENT_MODIFICATION-no-equals)
diff --git a/Tests/RunCMake/ctest_environment/test.cmake.in b/Tests/RunCMake/ctest_environment/test.cmake.in
new file mode 100644
index 0000000..ca23c83
--- /dev/null
+++ b/Tests/RunCMake/ctest_environment/test.cmake.in
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.7)
+
+set(CTEST_SITE "test-site")
+set(CTEST_BUILD_NAME "test-build-name")
+set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@")
+set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@-build")
+set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@")
+set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
+set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
+set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
+
+set(ctest_test_args "@CASE_CTEST_TEST_ARGS@")
+ctest_start(Experimental)
+ctest_configure()
+ctest_build()
+ctest_test(${ctest_test_args})
diff --git a/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-check.cmake b/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-check.cmake
new file mode 100644
index 0000000..9d2a059
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-check.cmake
@@ -0,0 +1,10 @@
+function (find_xml_file name)
+ file(GLOB test_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/${name}.xml")
+ if (NOT test_xml_file)
+ message(FATAL_ERROR
+ "${name}.xml not created.")
+ endif ()
+endfunction ()
+
+find_xml_file(DynamicAnalysis)
+find_xml_file(DynamicAnalysis-Test)
diff --git a/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-stderr.txt b/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-stderr.txt
new file mode 100644
index 0000000..e1fc77a
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-stderr.txt
@@ -0,0 +1 @@
+Cannot find memory tester output file: .*/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-build/Testing/Temporary/MemoryChecker.1.log\.\*
diff --git a/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-stdout.txt b/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-stdout.txt
new file mode 100644
index 0000000..b3473bf
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/ExpectedOutputs-stdout.txt
@@ -0,0 +1,2 @@
+Memory checking results:
+left shift of negative value -256 - 1
diff --git a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
index 6e0a91c..cb8f696 100644
--- a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
@@ -95,6 +95,19 @@ unset(CMAKELISTS_EXTRA_CODE)
unset(CTEST_EXTRA_CODE)
#-----------------------------------------------------------------------------
+# add output test
+set(CTEST_EXTRA_CODE
+"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1\")
+")
+set(CMAKELISTS_EXTRA_CODE
+"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\"
+-P \"${RunCMake_SOURCE_DIR}/testUndefinedBehaviorSanitizer.cmake\")
+")
+run_mc_test(ExpectedOutputs "" -DMEMCHECK_TYPE=UndefinedBehaviorSanitizer)
+unset(CMAKELISTS_EXTRA_CODE)
+unset(CTEST_EXTRA_CODE)
+
+#-----------------------------------------------------------------------------
set(CTEST_EXTRA_CODE "string(REPLACE \" \" \"\\\\ \" PRE_POST_COMMAND \"\${CTEST_MEMORYCHECK_COMMAND}\")
set(CTEST_CUSTOM_PRE_MEMCHECK \"\${PRE_POST_COMMAND} pre command\")
diff --git a/Tests/RunCMake/ctest_test/CTestTestLoadInvalid-stdout.txt b/Tests/RunCMake/ctest_test/CTestTestLoadInvalid-stdout.txt
index b54220c..acda9e2 100644
--- a/Tests/RunCMake/ctest_test/CTestTestLoadInvalid-stdout.txt
+++ b/Tests/RunCMake/ctest_test/CTestTestLoadInvalid-stdout.txt
@@ -1,5 +1,12 @@
-Test project .*/Tests/RunCMake/ctest_test/CTestTestLoadInvalid-build
+Test project [^
+]*/Tests/RunCMake/ctest_test/CTestTestLoadInvalid-build(
+[^*][^
+]*)*
+test 1
Start 1: RunCMakeVersion
++(
+[^*][^
+]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
diff --git a/Tests/RunCMake/ctest_test/CTestTestLoadPass-stdout.txt b/Tests/RunCMake/ctest_test/CTestTestLoadPass-stdout.txt
index c221eed..4081f98 100644
--- a/Tests/RunCMake/ctest_test/CTestTestLoadPass-stdout.txt
+++ b/Tests/RunCMake/ctest_test/CTestTestLoadPass-stdout.txt
@@ -1,5 +1,12 @@
-Test project .*/Tests/RunCMake/ctest_test/CTestTestLoadPass-build
+Test project [^
+]*/Tests/RunCMake/ctest_test/CTestTestLoadPass-build(
+[^*][^
+]*)*
+test 1
Start 1: RunCMakeVersion
++(
+[^*][^
+]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
diff --git a/Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt b/Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt
index 2af3838..2f4468f 100644
--- a/Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt
+++ b/Tests/RunCMake/ctest_test/CTestTestLoadWait-stdout.txt
@@ -1,6 +1,13 @@
-Test project .*/Tests/RunCMake/ctest_test/CTestTestLoadWait-build
+Test project [^
+]*/Tests/RunCMake/ctest_test/CTestTestLoadWait-build(
+[^*][^
+]*)*
\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 4, Smallest test RunCMakeVersion requires 1\*\*\*\*\*
+test 1
Start 1: RunCMakeVersion
++(
+[^*][^
+]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
diff --git a/Tests/RunCMake/ctest_test/OutputJUnit-check.cmake b/Tests/RunCMake/ctest_test/OutputJUnit-check.cmake
new file mode 100644
index 0000000..00310a4
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/OutputJUnit-check.cmake
@@ -0,0 +1,24 @@
+file(GLOB junit_xml_file "${RunCMake_TEST_BINARY_DIR}/junit.xml")
+if(junit_xml_file)
+ file(READ "${junit_xml_file}" junit_xml LIMIT 4096)
+ if(NOT "${junit_xml}" MATCHES "tests=\"1\"")
+ set(RunCMake_TEST_FAILED "tests=\"1\" not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "failures=\"0\"")
+ set(RunCMake_TEST_FAILED "failures=\"0\" not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "disabled=\"0\"")
+ set(RunCMake_TEST_FAILED "disabled=\"0\" not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "skipped=\"0\"")
+ set(RunCMake_TEST_FAILED "skipped=\"0\" not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "<testcase name=\"RunCMakeVersion\" classname=\"RunCMakeVersion\"")
+ set(RunCMake_TEST_FAILED "RunCMakeVersion not found when expected")
+ endif()
+ if(NOT "${junit_xml}" MATCHES "<system-out>cmake version")
+ set(RunCMake_TEST_FAILED "<system-out>cmake version not found when expected")
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "junit.xml not found")
+endif()
diff --git a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
index b82335f..de81049 100644
--- a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
@@ -18,6 +18,7 @@ run_ctest_test(TestQuiet QUIET)
#
# Spoof a load average value to make these tests more reliable.
set(ENV{__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING} 5)
+set(RunCTest_VERBOSE_FLAG -VV)
# Verify that new tests are started when the load average falls below
# our threshold.
@@ -53,6 +54,7 @@ run_ctest_test(TestLoadOrder TEST_LOAD "ERR4")
unset(ENV{__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING})
unset(CASE_CTEST_TEST_LOAD)
+unset(RunCTest_VERBOSE_FLAG)
function(run_TestChangeId)
set(CASE_TEST_PREFIX_CODE [[
@@ -144,3 +146,76 @@ set_property(TEST RunCMakeVersion PROPERTY ENVIRONMENT "ENV1=env1;ENV2=env2")
run_ctest(TestEnvironment)
endfunction()
run_environment()
+
+# test for OUTPUT_JUNIT
+run_ctest_test(OutputJUnit OUTPUT_JUNIT junit.xml REPEAT UNTIL_FAIL:2)
+
+# Verify that extra measurements get reported.
+function(run_measurements)
+ set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(
+ NAME double_measurement
+ COMMAND ${CMAKE_COMMAND} -E
+ echo <DartMeasurement type="numeric/double" name="my_custom_value">1.4847</DartMeasurement>)
+add_test(
+ NAME double_measurement2
+ COMMAND ${CMAKE_COMMAND} -E
+ echo <CTestMeasurement type="numeric/double" name="another_custom_value">1.8474</CTestMeasurement>)
+add_test(
+ NAME img_measurement
+ COMMAND ${CMAKE_COMMAND} -E
+ echo <DartMeasurementFile name="TestImage" type="image/png">]] ${IMAGE_DIR}/cmake-logo-16.png [[</DartMeasurementFile>)
+add_test(
+ NAME img_measurement2
+ COMMAND ${CMAKE_COMMAND} -E
+ echo <CTestMeasurementFile name="TestImage2" type="image/png">]] ${IMAGE_DIR}/cmake-logo-16.png [[</CTestMeasurementFile>)
+add_test(
+ NAME file_measurement
+ COMMAND ${CMAKE_COMMAND} -E
+ echo <DartMeasurementFile name="my_test_input_data" type="file">]] ${IMAGE_DIR}/cmake-logo-16.png [[</DartMeasurementFile>)
+add_test(
+ NAME file_measurement2
+ COMMAND ${CMAKE_COMMAND} -E
+ echo <CTestMeasurementFile name="another_test_input_data" type="file">]] ${IMAGE_DIR}/cmake-logo-16.png [[</CTestMeasurementFile>)
+ ]])
+ run_ctest(TestMeasurements)
+endfunction()
+run_measurements()
+
+# Verify that test output can override the Completion Status.
+function(run_completion_status)
+ set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(
+ NAME custom_details
+ COMMAND ${CMAKE_COMMAND} -E
+ echo test output\n<CTestDetails>CustomDetails</CTestDetails>\nmore output)
+ ]])
+ run_ctest(TestCompletionStatus)
+endfunction()
+run_completion_status()
+
+# Verify that running ctest_test() multiple times with different label arguments
+# doesn't break.
+function(run_changing_labels)
+ set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(NAME a COMMAND ${CMAKE_COMMAND} -E true)
+set_property(TEST a PROPERTY LABELS a)
+add_test(NAME b COMMAND ${CMAKE_COMMAND} -E true)
+set_property(TEST b PROPERTY LABELS b)
+ ]])
+ run_ctest(TestChangingLabels)
+endfunction()
+run_changing_labels()
+
+# Verify that test output can add additional labels
+function(run_extra_labels)
+ set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(
+ NAME custom_labels
+ COMMAND ${CMAKE_COMMAND} -E
+ echo before\n<CTestLabel>label2</CTestLabel>\n<CTestLabel>label1</CTestLabel>\n<CTestLabel>label3</CTestLabel>\n<CTestLabel>label2</CTestLabel>\nafter)
+set_tests_properties(custom_labels PROPERTIES LABELS "label1")
+ ]])
+ run_ctest(TestExtraLabels)
+endfunction()
+run_extra_labels()
diff --git a/Tests/RunCMake/ctest_test/TestCompletionStatus-check.cmake b/Tests/RunCMake/ctest_test/TestCompletionStatus-check.cmake
new file mode 100644
index 0000000..10de2ed
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestCompletionStatus-check.cmake
@@ -0,0 +1,16 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/TAG" _tag)
+string(REGEX REPLACE "^([^\n]*)\n.*$" "\\1" _date "${_tag}")
+file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/${_date}/Test.xml" _test_contents)
+
+# Check custom completion status.
+if(NOT _test_contents MATCHES [[<Value>CustomDetails</Value>]])
+ string(APPEND RunCMake_TEST_FAILED
+ "Could not find expected <Value>CustomDetails</Value> in Test.xml")
+endif()
+# Check test output.
+if(NOT _test_contents MATCHES "test output")
+ string(APPEND RunCMake_TEST_FAILED "Could not find expected string 'test output' in Test.xml")
+endif()
+if(NOT _test_contents MATCHES "more output")
+ string(APPEND RunCMake_TEST_FAILED "Could not find expected string 'more output' in Test.xml")
+endif()
diff --git a/Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake b/Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake
new file mode 100644
index 0000000..eaa50d1
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake
@@ -0,0 +1,25 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/TAG" _tag)
+string(REGEX REPLACE "^([^\n]*)\n.*$" "\\1" _date "${_tag}")
+file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/${_date}/Test.xml" _test_contents)
+
+# Check labels.
+STRING(REGEX MATCHALL [[<Label>label1</Label>]] matches "${_test_contents}")
+list(LENGTH matches n_matches)
+if(NOT n_matches EQUAL 1)
+ string(APPEND RunCMake_TEST_FAILED "expected 1 match for label1, found ${n_matches}")
+endif()
+STRING(REGEX MATCHALL [[<Label>label2</Label>]] matches "${_test_contents}")
+list(LENGTH matches n_matches)
+if(NOT n_matches EQUAL 1)
+ string(APPEND RunCMake_TEST_FAILED "expected 1 match for label2, found ${n_matches}")
+endif()
+STRING(REGEX MATCHALL [[<Label>label3</Label>]] matches "${_test_contents}")
+list(LENGTH matches n_matches)
+if(NOT n_matches EQUAL 1)
+ string(APPEND RunCMake_TEST_FAILED "expected 1 match for label3, found ${n_matches}")
+endif()
+
+# Check test output.
+if(NOT _test_contents MATCHES "<Value>before\nafter\n</Value>")
+ string(APPEND RunCMake_TEST_FAILED "Could not find expected output in Test.xml")
+endif()
diff --git a/Tests/RunCMake/ctest_test/TestLoadInvalid-stdout.txt b/Tests/RunCMake/ctest_test/TestLoadInvalid-stdout.txt
index c4fd35b..8d21f91 100644
--- a/Tests/RunCMake/ctest_test/TestLoadInvalid-stdout.txt
+++ b/Tests/RunCMake/ctest_test/TestLoadInvalid-stdout.txt
@@ -1,5 +1,12 @@
-Test project .*/Tests/RunCMake/ctest_test/TestLoadInvalid-build
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestLoadInvalid-build(
+[^*][^
+]*)*
+test 1
Start 1: RunCMakeVersion
++(
+[^*][^
+]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
diff --git a/Tests/RunCMake/ctest_test/TestLoadOrder-stdout.txt b/Tests/RunCMake/ctest_test/TestLoadOrder-stdout.txt
index 22da092..1ef5f5a 100644
--- a/Tests/RunCMake/ctest_test/TestLoadOrder-stdout.txt
+++ b/Tests/RunCMake/ctest_test/TestLoadOrder-stdout.txt
@@ -1,5 +1,12 @@
-Test project .*/Tests/RunCMake/ctest_test/TestLoadOrder-build
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestLoadOrder-build(
+[^*][^
+]*)*
+test 1
Start 1: RunCMakeVersion
++(
+[^*][^
+]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
diff --git a/Tests/RunCMake/ctest_test/TestLoadPass-stdout.txt b/Tests/RunCMake/ctest_test/TestLoadPass-stdout.txt
index e5048f4..f3e7cd1 100644
--- a/Tests/RunCMake/ctest_test/TestLoadPass-stdout.txt
+++ b/Tests/RunCMake/ctest_test/TestLoadPass-stdout.txt
@@ -1,5 +1,12 @@
-Test project .*/Tests/RunCMake/ctest_test/TestLoadPass-build
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestLoadPass-build(
+[^*][^
+]*)*
+test 1
Start 1: RunCMakeVersion
++(
+[^*][^
+]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
diff --git a/Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt b/Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt
index 07f4ed3..fc32958 100644
--- a/Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt
+++ b/Tests/RunCMake/ctest_test/TestLoadWait-stdout.txt
@@ -1,6 +1,13 @@
-Test project .*/Tests/RunCMake/ctest_test/TestLoadWait-build
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestLoadWait-build(
+[^*][^
+]*)*
\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 2, Smallest test RunCMakeVersion requires 1\*\*\*\*\*
+test 1
Start 1: RunCMakeVersion
++(
+[^*][^
+]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
diff --git a/Tests/RunCMake/ctest_test/TestMeasurements-check.cmake b/Tests/RunCMake/ctest_test/TestMeasurements-check.cmake
new file mode 100644
index 0000000..7e0928d
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestMeasurements-check.cmake
@@ -0,0 +1,40 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/TAG" _tag)
+string(REGEX REPLACE "^([^\n]*)\n.*$" "\\1" _date "${_tag}")
+file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/${_date}/Test.xml" _test_contents)
+
+# Check double measurement.
+if(NOT _test_contents MATCHES [[NamedMeasurement type="numeric/double" name="my_custom_value"]])
+ string(APPEND RunCMake_TEST_FAILED
+ "Could not find expected <NamedMeasurement> tag for type='numeric/double' in Test.xml")
+endif()
+if(NOT _test_contents MATCHES "<Value>1.4847</Value>")
+ string(APPEND RunCMake_TEST_FAILED "Could not find expected measurement value in Test.xml")
+endif()
+# Check the other double measurement.
+if(NOT _test_contents MATCHES [[NamedMeasurement type="numeric/double" name="another_custom_value"]])
+ string(APPEND RunCMake_TEST_FAILED
+ "Could not find expected <NamedMeasurement> tag(2) for type='numeric/double' in Test.xml")
+endif()
+if(NOT _test_contents MATCHES "<Value>1.8474</Value>")
+ string(APPEND RunCMake_TEST_FAILED "Could not find expected measurement value(2) in Test.xml")
+endif()
+# Check img measurement.
+if(NOT _test_contents MATCHES [[NamedMeasurement name="TestImage" type="image/png" encoding="base64"]])
+ string(APPEND RunCMake_TEST_FAILED
+ "Could not find expected <NamedMeasurement> tag for type='image/png' in Test.xml")
+endif()
+# Check img measurement 2.
+if(NOT _test_contents MATCHES [[NamedMeasurement name="TestImage2" type="image/png" encoding="base64"]])
+ string(APPEND RunCMake_TEST_FAILED
+ "Could not find expected <NamedMeasurement> tag(2) for type='image/png' in Test.xml")
+endif()
+# Check file measurement.
+if(NOT _test_contents MATCHES [[NamedMeasurement name="my_test_input_data" encoding="base64" compression="tar/gzip" filename="cmake-logo-16.png" type="file"]])
+ string(APPEND RunCMake_TEST_FAILED
+ "Could not find expected <NamedMeasurement> tag for type='file' in Test.xml")
+endif()
+# Check file measurement 2.
+if(NOT _test_contents MATCHES [[NamedMeasurement name="another_test_input_data" encoding="base64" compression="tar/gzip" filename="cmake-logo-16.png" type="file"]])
+ string(APPEND RunCMake_TEST_FAILED
+ "Could not find expected <NamedMeasurement> tag(2) for type='file' in Test.xml")
+endif()
diff --git a/Tests/RunCMake/ctest_test/test.cmake.in b/Tests/RunCMake/ctest_test/test.cmake.in
index 50b936d..36b1dbd 100644
--- a/Tests/RunCMake/ctest_test/test.cmake.in
+++ b/Tests/RunCMake/ctest_test/test.cmake.in
@@ -15,4 +15,9 @@ set(ctest_test_args "@CASE_CTEST_TEST_ARGS@")
ctest_start(Experimental)
ctest_configure()
ctest_build()
-ctest_test(${ctest_test_args})
+if("@CASE_NAME@" STREQUAL "TestChangingLabels")
+ ctest_test(${ctest_test_args} INCLUDE_LABEL "^a$")
+ ctest_test(${ctest_test_args} INCLUDE_LABEL "^b$")
+else()
+ ctest_test(${ctest_test_args})
+endif()
diff --git a/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
index c7bff15..18deb89 100644
--- a/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
@@ -14,6 +14,6 @@ if(UNIX)
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
-if(NOT WIN32 AND NOT "${uid}" STREQUAL "0")
+if(NOT WIN32 AND NOT MSYS AND NOT "${uid}" STREQUAL "0")
run_cmake(CHMOD-write-only)
endif()
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake
index 763d57c..07679b7 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake
@@ -11,15 +11,36 @@ function(run_install_test case)
run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config Debug)
# Check "all" components.
set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-all)
- run_cmake_command(${case}-all ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -P cmake_install.cmake)
+ run_cmake_command(${case}-all ${CMAKE_COMMAND} --install . --prefix ${CMAKE_INSTALL_PREFIX} --config Debug)
+endfunction()
+
+# Function to check the contents of the output files.
+function(check_contents filename contents_regex)
+ if(EXISTS "${CMAKE_INSTALL_PREFIX}/${filename}")
+ file(READ "${CMAKE_INSTALL_PREFIX}/${filename}" contents)
+ if(NOT contents MATCHES "${contents_regex}")
+ string(APPEND RunCMake_TEST_FAILED "File contents:
+ ${contents}
+do not match what we expected:
+ ${contents_regex}
+in file:
+ ${CMAKE_INSTALL_PREFIX}/${filename}\n")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+ endif()
+ else()
+ string(APPEND RunCMake_TEST_FAILED "File ${CMAKE_INSTALL_PREFIX}/${filename} does not exist")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+ endif()
endfunction()
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
if(NOT CMake_INSTALL_NAME_TOOL_BUG)
run_install_test(macos)
+ run_install_test(macos-rpath)
run_install_test(macos-unresolved)
run_install_test(macos-conflict)
run_install_test(macos-notfile)
+ run_install_test(file-filter)
endif()
run_cmake(project)
run_cmake(badargs1)
@@ -29,6 +50,7 @@ elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
run_install_test(windows-unresolved)
run_install_test(windows-conflict)
run_install_test(windows-notfile)
+ run_install_test(file-filter)
run_cmake(project)
run_cmake(badargs1)
run_cmake(badargs2)
@@ -41,6 +63,7 @@ elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
if(NOT CMAKE_C_COMPILER_ID MATCHES "^XL")
run_install_test(linux)
+ run_install_test(file-filter)
endif()
run_install_test(linux-unresolved)
run_install_test(linux-conflict)
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/badargs2.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/badargs2.cmake
index ac6af85..f80829d 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/badargs2.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/badargs2.cmake
@@ -11,5 +11,7 @@ file(GET_RUNTIME_DEPENDENCIES
PRE_EXCLUDE_REGEXES
POST_INCLUDE_REGEXES
POST_EXCLUDE_REGEXES
+ POST_INCLUDE_FILES
+ POST_EXCLUDE_FILES
)
message(FATAL_ERROR "This message should not be displayed")
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-all-check.cmake
new file mode 100644
index 0000000..9622f87
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-all-check.cmake
@@ -0,0 +1,28 @@
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+ set(_check
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/\.\./lib/libdep1\.so]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/\.\./lib/libdep2\.so]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/\.\./lib/libdep3\.so]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/\.\./lib/libdep4\.so]]
+ )
+ check_contents(deps/deps.txt "^${_check}$")
+elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
+ set(_check
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/\.\./lib/libdep1\.dylib]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/\.\./lib/libdep2\.dylib]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/\.\./lib/libdep3\.dylib]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/\.\./lib/libdep4\.dylib]]
+ )
+ check_contents(deps/deps.txt "^${_check}$")
+elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+ set(_check
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/(lib)?dep1\.dll]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/(lib)?dep2\.dll]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/(lib)?dep3\.dll]]
+ [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter-build/root-all/bin/(lib)?dep4\.dll]]
+ )
+ check_contents(deps/deps.txt "^${_check}$")
+endif()
+
+check_contents(deps/udeps.txt "^$")
+check_contents(deps/cdeps.txt "^$")
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter.cmake
new file mode 100644
index 0000000..fef084b
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-filter.cmake
@@ -0,0 +1,104 @@
+enable_language(C)
+
+set(dep_list)
+set(import_list)
+set(call_list)
+foreach(i 1 2 3 4 5 6 7 8 9)
+ file(WRITE "${CMAKE_BINARY_DIR}/dep${i}.c"
+"#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void dep${i}(void)
+{
+}
+")
+ add_library(dep${i} SHARED "${CMAKE_BINARY_DIR}/dep${i}.c")
+ list(APPEND dep_list dep${i})
+ string(APPEND import_list "EXE_IMPORT extern void dep${i}(void);\n")
+ string(APPEND call_list " dep${i}();\n")
+endforeach()
+set_target_properties(dep5 PROPERTIES
+ VERSION 1.2.3
+ SOVERSION 1
+ )
+
+file(WRITE "${CMAKE_BINARY_DIR}/main.c"
+"#ifdef _WIN32
+# define EXE_IMPORT __declspec(dllimport)
+#else
+# define EXE_IMPORT
+#endif
+
+${import_list}
+int main(void)
+{
+${call_list}
+ return 0;
+}
+")
+
+add_executable(exe "${CMAKE_BINARY_DIR}/main.c")
+target_link_libraries(exe PRIVATE ${dep_list})
+
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set_property(TARGET exe PROPERTY INSTALL_RPATH "\${ORIGIN}/../lib")
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set_property(TARGET exe PROPERTY INSTALL_RPATH "@loader_path/../lib")
+endif()
+
+install(TARGETS exe ${dep_list})
+
+install(CODE
+ [[
+ function(exec_get_runtime_dependencies depsfile udepsfile cdepsfile)
+ file(GET_RUNTIME_DEPENDENCIES
+ RESOLVED_DEPENDENCIES_VAR deps
+ UNRESOLVED_DEPENDENCIES_VAR udeps
+ CONFLICTING_DEPENDENCIES_PREFIX cdeps
+ PRE_INCLUDE_REGEXES "dep[123456789]"
+ PRE_EXCLUDE_REGEXES ".*"
+ POST_INCLUDE_REGEXES "dep9"
+ POST_INCLUDE_FILES
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:dep1>"
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:dep1>"
+ "${CMAKE_INSTALL_PREFIX}/bin/../bin/$<TARGET_FILE_NAME:dep2>"
+ "${CMAKE_INSTALL_PREFIX}/bin/../lib/$<TARGET_FILE_NAME:dep2>"
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:dep3>"
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:dep3>"
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:dep8>"
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:dep8>"
+ POST_EXCLUDE_FILES
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:dep3>"
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:dep3>"
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:dep5>"
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:dep5>"
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:dep6>"
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:dep6>"
+ "${CMAKE_INSTALL_PREFIX}/bin/../bin/$<TARGET_FILE_NAME:dep7>"
+ "${CMAKE_INSTALL_PREFIX}/bin/../lib/$<TARGET_FILE_NAME:dep7>"
+ POST_EXCLUDE_FILES_STRICT
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:dep8>"
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:dep8>"
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:dep9>"
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:dep9>"
+ ${ARGN}
+ )
+ list(SORT deps)
+ list(SORT udeps)
+ list(SORT cdeps_FILENAMES)
+ file(WRITE "${CMAKE_INSTALL_PREFIX}/deps/${depsfile}" "${deps}")
+ file(WRITE "${CMAKE_INSTALL_PREFIX}/deps/${udepsfile}" "${udeps}")
+ file(WRITE "${CMAKE_INSTALL_PREFIX}/deps/${cdepsfile}" "")
+ foreach(cdep IN LISTS cdeps_FILENAMES)
+ set(cdep_values ${cdeps_${cdep}})
+ list(SORT cdep_values)
+ file(APPEND "${CMAKE_INSTALL_PREFIX}/deps/${cdepsfile}" "${cdep}:${cdep_values}\n")
+ endforeach()
+ endfunction()
+
+ exec_get_runtime_dependencies(
+ deps.txt udeps.txt cdeps.txt
+ EXECUTABLES
+ "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:exe>"
+ )
+ ]])
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake
index 381b602..d3d1cd6 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake
@@ -1,21 +1,3 @@
-function(check_contents filename contents_regex)
- if(EXISTS "${CMAKE_INSTALL_PREFIX}/${filename}")
- file(READ "${CMAKE_INSTALL_PREFIX}/${filename}" contents)
- if(NOT contents MATCHES "${contents_regex}")
- string(APPEND RunCMake_TEST_FAILED "File contents:
- ${contents}
-do not match what we expected:
- ${contents_regex}
-in file:
- ${CMAKE_INSTALL_PREFIX}/${filename}\n")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
- endif()
- else()
- string(APPEND RunCMake_TEST_FAILED "File ${CMAKE_INSTALL_PREFIX}/${filename} does not exist")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
- endif()
-endfunction()
-
set(_check
[[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-build/root-all/lib/libtest_rpath\.so]]
[[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-build/root-all/lib/libtest_runpath\.so]]
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-notfile-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-notfile-all-stderr.txt
index d9758c5..5b86322 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-notfile-all-stderr.txt
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-notfile-all-stderr.txt
@@ -1,5 +1,2 @@
^CMake Error at cmake_install\.cmake:[0-9]+ \(file\):
- file Failed to run objdump on:
-
- [^
-]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-notfile-build/root-all/bin/\.\./lib/libtest\.so$
+ file Could not resolve file libtest\.so$
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake
index e7cdbf6..e9ff9f6 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake
@@ -1,21 +1,3 @@
-function(check_contents filename contents_regex)
- if(EXISTS "${CMAKE_INSTALL_PREFIX}/${filename}")
- file(READ "${CMAKE_INSTALL_PREFIX}/${filename}" contents)
- if(NOT contents MATCHES "${contents_regex}")
- string(APPEND RunCMake_TEST_FAILED "File contents:
- ${contents}
-do not match what we expected:
- ${contents_regex}
-in file:
- ${CMAKE_INSTALL_PREFIX}/${filename}\n")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
- endif()
- else()
- string(APPEND RunCMake_TEST_FAILED "File ${CMAKE_INSTALL_PREFIX}/${filename} does not exist")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
- endif()
-endfunction()
-
function(set_with_libsystem var)
set(_tmp "${ARGN}")
if(EXISTS "/usr/lib/libSystem.B.dylib")
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-rpath.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-rpath.cmake
new file mode 100644
index 0000000..798045f
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-rpath.cmake
@@ -0,0 +1,35 @@
+enable_language(C)
+
+file(WRITE "${CMAKE_BINARY_DIR}/toplib.c" "extern void sublib1(void);\nextern void sublib2(void);\nvoid toplib(void)\n{\n sublib1();\n sublib2();\n}\n")
+add_library(toplib SHARED "${CMAKE_BINARY_DIR}/toplib.c")
+file(WRITE "${CMAKE_BINARY_DIR}/sublib1.c" "extern void sublib2(void);\nvoid sublib1(void)\n{\n sublib2();\n}\n")
+add_library(sublib1 SHARED "${CMAKE_BINARY_DIR}/sublib1.c")
+file(WRITE "${CMAKE_BINARY_DIR}/sublib2.c" "void sublib2(void)\n{\n}\n")
+add_library(sublib2 SHARED "${CMAKE_BINARY_DIR}/sublib2.c")
+target_link_libraries(toplib PRIVATE sublib1 sublib2)
+target_link_libraries(sublib1 PRIVATE sublib2)
+set_property(TARGET toplib PROPERTY INSTALL_RPATH "@loader_path/d1;@loader_path/d2")
+set_property(TARGET sublib1 PROPERTY INSTALL_RPATH "@loader_path/;@loader_path/../d2")
+install(TARGETS toplib DESTINATION lib)
+install(TARGETS sublib1 DESTINATION lib/d1)
+install(TARGETS sublib2 DESTINATION lib/d2)
+
+install(CODE [[
+ file(GET_RUNTIME_DEPENDENCIES
+ LIBRARIES
+ "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:toplib>"
+ RPATH_PREFIX _rpaths
+ )
+
+ set(_expected_rpath "(^|;)@loader_path/;@loader_path/\\.\\./d2$")
+ set(_actual_rpath "${_rpaths_${CMAKE_INSTALL_PREFIX}/lib/d1/$<TARGET_FILE_NAME:sublib1>}")
+ if(NOT _actual_rpath MATCHES "${_expected_rpath}")
+ message(FATAL_ERROR "Expected rpath:\n ${_expected_rpath}\nActual rpath:\n ${_actual_rpath}")
+ endif()
+
+ # Since RPATH_PREFIX is an undocumented option for install(), we don't really need the rpath
+ # for the top files anyway.
+ if(DEFINED "_rpaths_${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:toplib>")
+ message(FATAL_ERROR "rpath for top library should not be defined")
+ endif()
+ ]])
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake
index f1d70a1..cb0e534 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake
@@ -1,21 +1,3 @@
-function(check_contents filename contents_regex)
- if(EXISTS "${CMAKE_INSTALL_PREFIX}/${filename}")
- file(READ "${CMAKE_INSTALL_PREFIX}/${filename}" contents)
- if(NOT contents MATCHES "${contents_regex}")
- string(APPEND RunCMake_TEST_FAILED "File contents:
- ${contents}
-do not match what we expected:
- ${contents_regex}
-in file:
- ${CMAKE_INSTALL_PREFIX}/${filename}\n")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
- endif()
- else()
- string(APPEND RunCMake_TEST_FAILED "File ${CMAKE_INSTALL_PREFIX}/${filename} does not exist")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
- endif()
-endfunction()
-
set(_check
[=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/\.conflict/\.\./(lib)?libdir\.dll]=]
[=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/\.search/(lib)?search\.dll]=]
diff --git a/Tests/RunCMake/file-RPATH/Common.cmake b/Tests/RunCMake/file-RPATH/Common.cmake
index cc1efb5..7034aad 100644
--- a/Tests/RunCMake/file-RPATH/Common.cmake
+++ b/Tests/RunCMake/file-RPATH/Common.cmake
@@ -62,3 +62,40 @@ foreach(f ${files})
message(FATAL_ERROR "RPATH_CHECK did not remove ${f}")
endif()
endforeach()
+
+# TODO Implement RPATH_SET in XCOFF.
+if(format STREQUAL "ELF")
+ foreach(f ${names})
+ file(COPY ${in}/${f} DESTINATION ${out} NO_SOURCE_PERMISSIONS)
+ endforeach()
+
+ foreach(f ${files})
+ # Set the RPATH.
+ file(RPATH_SET FILE "${f}"
+ NEW_RPATH "/new/rpath")
+ set(rpath)
+ file(STRINGS "${f}" rpath REGEX "/new/rpath" LIMIT_COUNT 1)
+ if(NOT rpath)
+ message(FATAL_ERROR "RPATH not set in ${f}")
+ endif()
+ file(STRINGS "${f}" rpath REGEX "/rpath/sample" LIMIT_COUNT 1)
+ if(rpath)
+ message(FATAL_EROR "RPATH not removed in ${f}")
+ endif()
+
+ # Remove the RPATH.
+ file(RPATH_SET FILE "${f}"
+ NEW_RPATH "")
+ set(rpath)
+ file(STRINGS "${f}" rpath REGEX "/new/rpath" LIMIT_COUNT 1)
+ if(rpath)
+ message(FATAL_ERROR "RPATH not removed from ${f}")
+ endif()
+
+ # Check again...this should remove the file.
+ file(RPATH_CHECK FILE "${f}" RPATH "/new/rpath")
+ if(EXISTS "${f}")
+ message(FATAL_ERROR "RPATH_CHECK did not remove ${f}")
+ endif()
+ endforeach()
+endif()
diff --git a/Tests/RunCMake/file-RPATH/RunCMakeTest.cmake b/Tests/RunCMake/file-RPATH/RunCMakeTest.cmake
index eb7b497..1ca2e75 100644
--- a/Tests/RunCMake/file-RPATH/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file-RPATH/RunCMakeTest.cmake
@@ -1,8 +1,6 @@
include(RunCMake)
-if(HAVE_ELF_H)
- run_cmake_command(ELF ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/ELF.cmake)
-endif()
+run_cmake_command(ELF ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/ELF.cmake)
if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
run_cmake_command(XCOFF ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/XCOFF.cmake)
diff --git a/Tests/RunCMake/file/COPY_FILE-arg-missing-result.txt b/Tests/RunCMake/file/COPY_FILE-arg-missing-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-arg-missing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/COPY_FILE-arg-missing-stderr.txt b/Tests/RunCMake/file/COPY_FILE-arg-missing-stderr.txt
new file mode 100644
index 0000000..2ba38b6
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-arg-missing-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/COPY_FILE-arg-missing.cmake:1 \(file\):
+ file COPY_FILE must be called with at least two additional arguments
diff --git a/Tests/RunCMake/file/COPY_FILE-arg-missing.cmake b/Tests/RunCMake/file/COPY_FILE-arg-missing.cmake
new file mode 100644
index 0000000..0e56c38
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-arg-missing.cmake
@@ -0,0 +1 @@
+file(COPY_FILE "old")
diff --git a/Tests/RunCMake/file/COPY_FILE-arg-unknown-result.txt b/Tests/RunCMake/file/COPY_FILE-arg-unknown-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-arg-unknown-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/COPY_FILE-arg-unknown-stderr.txt b/Tests/RunCMake/file/COPY_FILE-arg-unknown-stderr.txt
new file mode 100644
index 0000000..e5ccd33
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-arg-unknown-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/COPY_FILE-arg-unknown.cmake:1 \(file\):
+ file COPY_FILE unknown argument:
+
+ unknown$
diff --git a/Tests/RunCMake/file/COPY_FILE-arg-unknown.cmake b/Tests/RunCMake/file/COPY_FILE-arg-unknown.cmake
new file mode 100644
index 0000000..835f39e
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-arg-unknown.cmake
@@ -0,0 +1 @@
+file(COPY_FILE "old" "new" unknown)
diff --git a/Tests/RunCMake/file/COPY_FILE-dir-to-file-capture-stdout.txt b/Tests/RunCMake/file/COPY_FILE-dir-to-file-capture-stdout.txt
new file mode 100644
index 0000000..45b3d27
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dir-to-file-capture-stdout.txt
@@ -0,0 +1 @@
+^-- file\(COPY_FILE\) failed with result: cannot copy a directory
diff --git a/Tests/RunCMake/file/COPY_FILE-dir-to-file-capture.cmake b/Tests/RunCMake/file/COPY_FILE-dir-to-file-capture.cmake
new file mode 100644
index 0000000..acec05a
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dir-to-file-capture.cmake
@@ -0,0 +1,8 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(MAKE_DIRECTORY "${oldname}")
+file(COPY_FILE "${oldname}" "${newname}" RESULT result)
+message(STATUS "file(COPY_FILE) failed with result: ${result}")
+if(EXISTS "${newname}")
+ message(FATAL_ERROR "The new name exists:\n ${newname}")
+endif()
diff --git a/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-result.txt b/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-stderr.txt b/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-stderr.txt
new file mode 100644
index 0000000..2fe8bec
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail.cmake:[0-9] \(file\):
+ file COPY_FILE cannot copy a directory
+
+ [^
+]*/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail-build/input
diff --git a/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail.cmake b/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail.cmake
new file mode 100644
index 0000000..a86ba8d
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dir-to-file-fail.cmake
@@ -0,0 +1,4 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(MAKE_DIRECTORY "${oldname}")
+file(COPY_FILE "${oldname}" "${newname}")
diff --git a/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-capture-stdout.txt b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-capture-stdout.txt
new file mode 100644
index 0000000..45b3d27
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-capture-stdout.txt
@@ -0,0 +1 @@
+^-- file\(COPY_FILE\) failed with result: cannot copy a directory
diff --git a/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-capture.cmake b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-capture.cmake
new file mode 100644
index 0000000..acec05a
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-capture.cmake
@@ -0,0 +1,8 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(MAKE_DIRECTORY "${oldname}")
+file(COPY_FILE "${oldname}" "${newname}" RESULT result)
+message(STATUS "file(COPY_FILE) failed with result: ${result}")
+if(EXISTS "${newname}")
+ message(FATAL_ERROR "The new name exists:\n ${newname}")
+endif()
diff --git a/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-result.txt b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-stderr.txt b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-stderr.txt
new file mode 100644
index 0000000..c58dc2c
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail.cmake:[0-9] \(file\):
+ file COPY_FILE cannot copy a directory
+
+ [^
+]*/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail-build/input
diff --git a/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail.cmake b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail.cmake
new file mode 100644
index 0000000..a86ba8d
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-dirlink-to-file-fail.cmake
@@ -0,0 +1,4 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(MAKE_DIRECTORY "${oldname}")
+file(COPY_FILE "${oldname}" "${newname}")
diff --git a/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-capture.cmake b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-capture.cmake
new file mode 100644
index 0000000..028220e
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-capture.cmake
@@ -0,0 +1,9 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+file(MAKE_DIRECTORY "${newname}")
+file(COPY_FILE "${oldname}" "${newname}" RESULT result ONLY_IF_DIFFERENT)
+message(STATUS "file(COPY_FILE) failed with result: ${result}")
+if(NOT EXISTS "${oldname}")
+ message(FATAL_ERROR "The old name still does not exist:\n ${oldname}")
+endif()
diff --git a/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-result.txt b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-stderr.txt b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-stderr.txt
new file mode 100644
index 0000000..fd5ceee
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail.cmake:[0-9] \(file\):
+ file COPY_FILE cannot copy to a directory
+
+ [^
+]*/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail-build/output
diff --git a/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail.cmake b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail.cmake
new file mode 100644
index 0000000..a56b4e7
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-fail.cmake
@@ -0,0 +1,5 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+file(MAKE_DIRECTORY "${newname}")
+file(COPY_FILE "${oldname}" "${newname}" ONLY_IF_DIFFERENT)
diff --git a/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-no-overwrite.cmake b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-no-overwrite.cmake
new file mode 100644
index 0000000..059a308
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-ONLY_IF_DIFFERENT-no-overwrite.cmake
@@ -0,0 +1,12 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+execute_process(COMMAND "${CMAKE_COMMAND} -E sleep 1")
+file(WRITE "${newname}" "")
+file(TIMESTAMP "${newname}" before_copy UTC)
+file(COPY_FILE "${oldname}" "${newname}" RESULT result ONLY_IF_DIFFERENT)
+file(TIMESTAMP "${newname}" after_copy UTC)
+if (NOT before_copy STREQUAL after_copy)
+ message(FATAL_ERROR
+ "${newname} was modified even though ONLY_IF_DIFFERENT was specified")
+endif ()
diff --git a/Tests/RunCMake/file/COPY_FILE-file-replace.cmake b/Tests/RunCMake/file/COPY_FILE-file-replace.cmake
new file mode 100644
index 0000000..40e4290
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-replace.cmake
@@ -0,0 +1,9 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "a")
+file(WRITE "${newname}" "b")
+file(COPY_FILE "${oldname}" "${newname}")
+file(READ "${newname}" new)
+if(NOT "${new}" STREQUAL "a")
+ message(FATAL_ERROR "New name:\n ${newname}\ndoes not contain expected content 'a'.")
+endif()
diff --git a/Tests/RunCMake/file/COPY_FILE-file-to-dir-capture-stdout.txt b/Tests/RunCMake/file/COPY_FILE-file-to-dir-capture-stdout.txt
new file mode 100644
index 0000000..24f969f
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-to-dir-capture-stdout.txt
@@ -0,0 +1 @@
+^-- file\(COPY_FILE\) failed with result: cannot copy to a directory
diff --git a/Tests/RunCMake/file/COPY_FILE-file-to-dir-capture.cmake b/Tests/RunCMake/file/COPY_FILE-file-to-dir-capture.cmake
new file mode 100644
index 0000000..98621c6
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-to-dir-capture.cmake
@@ -0,0 +1,9 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+file(MAKE_DIRECTORY "${newname}")
+file(COPY_FILE "${oldname}" "${newname}" RESULT result)
+message(STATUS "file(COPY_FILE) failed with result: ${result}")
+if(NOT EXISTS "${oldname}")
+ message(FATAL_ERROR "The old name does not exist:\n ${oldname}")
+endif()
diff --git a/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-result.txt b/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-stderr.txt b/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-stderr.txt
new file mode 100644
index 0000000..ba2a027
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail.cmake:[0-9] \(file\):
+ file COPY_FILE cannot copy to a directory
+
+ [^
+]*/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail-build/output
diff --git a/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail.cmake b/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail.cmake
new file mode 100644
index 0000000..c2628dd
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-to-dir-fail.cmake
@@ -0,0 +1,5 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+file(MAKE_DIRECTORY "${newname}")
+file(COPY_FILE "${oldname}" "${newname}")
diff --git a/Tests/RunCMake/file/COPY_FILE-file-to-file.cmake b/Tests/RunCMake/file/COPY_FILE-file-to-file.cmake
new file mode 100644
index 0000000..26b702a
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-to-file.cmake
@@ -0,0 +1,10 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+file(COPY_FILE "${oldname}" "${newname}")
+if(NOT EXISTS "${oldname}")
+ message(FATAL_ERROR "The old name does not exist:\n ${oldname}")
+endif()
+if(NOT EXISTS "${newname}")
+ message(FATAL_ERROR "The new name does not exist:\n ${newname}")
+endif()
diff --git a/Tests/RunCMake/file/COPY_FILE-link-to-file.cmake b/Tests/RunCMake/file/COPY_FILE-link-to-file.cmake
new file mode 100644
index 0000000..93a0204
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-link-to-file.cmake
@@ -0,0 +1,10 @@
+set(lnkname "${CMAKE_CURRENT_BINARY_DIR}/link")
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${lnkname}" "a")
+file(CREATE_LINK "${lnkname}" "${oldname}")
+file(COPY_FILE "${oldname}" "${newname}")
+file(READ "${newname}" new)
+if(NOT "${new}" STREQUAL "a")
+ message(FATAL_ERROR "New name:\n ${newname}\ndoes not contain expected content 'a'.")
+endif()
diff --git a/Tests/RunCMake/file/REAL_PATH.cmake b/Tests/RunCMake/file/REAL_PATH.cmake
index be25706..0b5d3c0 100644
--- a/Tests/RunCMake/file/REAL_PATH.cmake
+++ b/Tests/RunCMake/file/REAL_PATH.cmake
@@ -1,14 +1,36 @@
-file(TOUCH "${CMAKE_CURRENT_BINARY_DIR}/test.txt")
-file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/test.sym")
-file(CREATE_LINK "test.txt" "${CMAKE_CURRENT_BINARY_DIR}/test.sym" SYMBOLIC)
+if (NOT WIN32 OR CYGWIN)
+ file(TOUCH "${CMAKE_CURRENT_BINARY_DIR}/test.txt")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/test.sym")
+ file(CREATE_LINK "test.txt" "${CMAKE_CURRENT_BINARY_DIR}/test.sym" SYMBOLIC)
-file(REAL_PATH "${CMAKE_CURRENT_BINARY_DIR}/test.sym" real_path)
-if (NOT real_path STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/test.txt")
- message(SEND_ERROR "real path is \"${real_path}\", should be \"${CMAKE_CURRENT_BINARY_DIR}/test.txt\"")
+ file(REAL_PATH "${CMAKE_CURRENT_BINARY_DIR}/test.sym" real_path)
+ if (NOT real_path STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/test.txt")
+ message(SEND_ERROR "real path is \"${real_path}\", should be \"${CMAKE_CURRENT_BINARY_DIR}/test.txt\"")
+ endif()
+
+ file(REAL_PATH "test.sym" real_path BASE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+ if (NOT real_path STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/test.txt")
+ message(SEND_ERROR "real path is \"${real_path}\", should be \"${CMAKE_CURRENT_BINARY_DIR}/test.txt\"")
+ endif()
+endif()
+
+
+If (WIN32)
+ cmake_path(SET HOME_DIR "$ENV{USERPROFILE}")
+ if (NOT HOME_DIR)
+ cmake_path(SET HOME_DIR "$ENV{HOME}")
+ endif()
+else()
+ set(HOME_DIR "$ENV{HOME}")
+endif()
+
+file(REAL_PATH "~" real_path EXPAND_TILDE)
+if (NOT real_path STREQUAL "${HOME_DIR}")
+ message(SEND_ERROR "real path is \"${real_path}\", should be \"${HOME_DIR}\"")
endif()
-file(REAL_PATH "test.sym" real_path BASE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
-if (NOT real_path STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/test.txt")
- message(SEND_ERROR "real path is \"${real_path}\", should be \"${CMAKE_CURRENT_BINARY_DIR}/test.txt\"")
+file(REAL_PATH "~/test.txt" real_path EXPAND_TILDE)
+if (NOT real_path STREQUAL "${HOME_DIR}/test.txt")
+ message(SEND_ERROR "real path is \"${real_path}\", should be \"${HOME_DIR}/test.txt\"")
endif()
diff --git a/Tests/RunCMake/file/RENAME-arg-missing-result.txt b/Tests/RunCMake/file/RENAME-arg-missing-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-arg-missing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/RENAME-arg-missing-stderr.txt b/Tests/RunCMake/file/RENAME-arg-missing-stderr.txt
new file mode 100644
index 0000000..98d2961
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-arg-missing-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/RENAME-arg-missing.cmake:1 \(file\):
+ file RENAME must be called with at least two additional arguments$
diff --git a/Tests/RunCMake/file/RENAME-arg-missing.cmake b/Tests/RunCMake/file/RENAME-arg-missing.cmake
new file mode 100644
index 0000000..2358ce9
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-arg-missing.cmake
@@ -0,0 +1 @@
+file(RENAME "old")
diff --git a/Tests/RunCMake/file/RENAME-arg-unknown-result.txt b/Tests/RunCMake/file/RENAME-arg-unknown-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-arg-unknown-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/RENAME-arg-unknown-stderr.txt b/Tests/RunCMake/file/RENAME-arg-unknown-stderr.txt
new file mode 100644
index 0000000..16edb25
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-arg-unknown-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/RENAME-arg-unknown.cmake:1 \(file\):
+ file RENAME unknown argument:
+
+ unknown$
diff --git a/Tests/RunCMake/file/RENAME-arg-unknown.cmake b/Tests/RunCMake/file/RENAME-arg-unknown.cmake
new file mode 100644
index 0000000..3110f70
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-arg-unknown.cmake
@@ -0,0 +1 @@
+file(RENAME "old" "new" unknown)
diff --git a/Tests/RunCMake/file/RENAME-file-NO_REPLACE-capture-stdout.txt b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-capture-stdout.txt
new file mode 100644
index 0000000..a116330
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-capture-stdout.txt
@@ -0,0 +1 @@
+^-- file\(RENAME\) failed with result: NO_REPLACE$
diff --git a/Tests/RunCMake/file/RENAME-file-NO_REPLACE-capture.cmake b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-capture.cmake
new file mode 100644
index 0000000..1ff4178
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-capture.cmake
@@ -0,0 +1,9 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "a")
+file(WRITE "${newname}" "b")
+file(RENAME "${oldname}" "${newname}" NO_REPLACE RESULT result)
+message(STATUS "file(RENAME) failed with result: ${result}")
+if(NOT EXISTS "${oldname}")
+ message(FATAL_ERROR "The old name does not still exist:\n ${oldname}")
+endif()
diff --git a/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-result.txt b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-stderr.txt b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-stderr.txt
new file mode 100644
index 0000000..dd7294c
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-stderr.txt
@@ -0,0 +1,13 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail.cmake:[0-9] \(file\):
+ file RENAME failed to rename
+
+ [^
+]*/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-build/input
+
+ to
+
+ [^
+]*/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail-build/output
+
+ because: path not replaced$
diff --git a/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail.cmake b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail.cmake
new file mode 100644
index 0000000..c05dd63
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-NO_REPLACE-fail.cmake
@@ -0,0 +1,5 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "a")
+file(WRITE "${newname}" "b")
+file(RENAME "${oldname}" "${newname}" NO_REPLACE)
diff --git a/Tests/RunCMake/file/RENAME-file-replace.cmake b/Tests/RunCMake/file/RENAME-file-replace.cmake
new file mode 100644
index 0000000..efbfaed
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-replace.cmake
@@ -0,0 +1,9 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "a")
+file(WRITE "${newname}" "b")
+file(RENAME "${oldname}" "${newname}")
+file(READ "${newname}" new)
+if(NOT "${new}" STREQUAL "a")
+ message(FATAL_ERROR "New name:\n ${newname}\ndoes not contain expected content 'a'.")
+endif()
diff --git a/Tests/RunCMake/file/RENAME-file-to-dir-capture-stdout.txt b/Tests/RunCMake/file/RENAME-file-to-dir-capture-stdout.txt
new file mode 100644
index 0000000..0276a5f
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-to-dir-capture-stdout.txt
@@ -0,0 +1 @@
+^-- file\(RENAME\) failed with result: [A-Za-z]
diff --git a/Tests/RunCMake/file/RENAME-file-to-dir-capture.cmake b/Tests/RunCMake/file/RENAME-file-to-dir-capture.cmake
new file mode 100644
index 0000000..4f817e8
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-to-dir-capture.cmake
@@ -0,0 +1,9 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+file(MAKE_DIRECTORY "${newname}")
+file(RENAME "${oldname}" "${newname}" RESULT result)
+message(STATUS "file(RENAME) failed with result: ${result}")
+if(NOT EXISTS "${oldname}")
+ message(FATAL_ERROR "The old name does not still exist:\n ${oldname}")
+endif()
diff --git a/Tests/RunCMake/file/RENAME-file-to-dir-fail-result.txt b/Tests/RunCMake/file/RENAME-file-to-dir-fail-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-to-dir-fail-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/RENAME-file-to-dir-fail-stderr.txt b/Tests/RunCMake/file/RENAME-file-to-dir-fail-stderr.txt
new file mode 100644
index 0000000..e4dbc38
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-to-dir-fail-stderr.txt
@@ -0,0 +1,13 @@
+^CMake Error at [^
+]*/Tests/RunCMake/file/RENAME-file-to-dir-fail.cmake:[0-9] \(file\):
+ file RENAME failed to rename
+
+ [^
+]*/Tests/RunCMake/file/RENAME-file-to-dir-fail-build/input
+
+ to
+
+ [^
+]*/Tests/RunCMake/file/RENAME-file-to-dir-fail-build/output
+
+ because: [A-Za-z]
diff --git a/Tests/RunCMake/file/RENAME-file-to-dir-fail.cmake b/Tests/RunCMake/file/RENAME-file-to-dir-fail.cmake
new file mode 100644
index 0000000..61fa644
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-to-dir-fail.cmake
@@ -0,0 +1,5 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+file(MAKE_DIRECTORY "${newname}")
+file(RENAME "${oldname}" "${newname}")
diff --git a/Tests/RunCMake/file/RENAME-file-to-file.cmake b/Tests/RunCMake/file/RENAME-file-to-file.cmake
new file mode 100644
index 0000000..dbc411be
--- /dev/null
+++ b/Tests/RunCMake/file/RENAME-file-to-file.cmake
@@ -0,0 +1,10 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "")
+file(RENAME "${oldname}" "${newname}")
+if(EXISTS "${oldname}")
+ message(FATAL_ERROR "The old name still exists:\n ${oldname}")
+endif()
+if(NOT EXISTS "${newname}")
+ message(FATAL_ERROR "The new name does not exist:\n ${newname}")
+endif()
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 22813eb..9efd3f4 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -50,6 +50,30 @@ run_cmake(SIZE-error-does-not-exist)
run_cmake(REMOVE-empty)
+run_cmake_script(COPY_FILE-file-replace)
+run_cmake_script(COPY_FILE-dir-to-file-capture)
+run_cmake_script(COPY_FILE-dir-to-file-fail)
+run_cmake_script(COPY_FILE-dirlink-to-file-capture)
+run_cmake_script(COPY_FILE-dirlink-to-file-fail)
+run_cmake_script(COPY_FILE-file-to-file)
+run_cmake_script(COPY_FILE-file-to-dir-capture)
+run_cmake_script(COPY_FILE-file-to-dir-fail)
+run_cmake_script(COPY_FILE-file-ONLY_IF_DIFFERENT-capture)
+run_cmake_script(COPY_FILE-file-ONLY_IF_DIFFERENT-fail)
+run_cmake_script(COPY_FILE-file-ONLY_IF_DIFFERENT-no-overwrite)
+run_cmake_script(COPY_FILE-link-to-file)
+run_cmake_script(COPY_FILE-arg-missing)
+run_cmake_script(COPY_FILE-arg-unknown)
+
+run_cmake_script(RENAME-file-replace)
+run_cmake_script(RENAME-file-to-file)
+run_cmake_script(RENAME-file-to-dir-capture)
+run_cmake_script(RENAME-file-to-dir-fail)
+run_cmake_script(RENAME-file-NO_REPLACE-capture)
+run_cmake_script(RENAME-file-NO_REPLACE-fail)
+run_cmake_script(RENAME-arg-missing)
+run_cmake_script(RENAME-arg-unknown)
+
# tests are valid both for GLOB and GLOB_RECURSE
run_cmake(GLOB-sort-dedup)
run_cmake(GLOB-error-LIST_DIRECTORIES-not-boolean)
@@ -63,7 +87,9 @@ run_cmake(GLOB-noexp-RELATIVE)
run_cmake_command(GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE ${CMAKE_COMMAND} -P
${RunCMake_SOURCE_DIR}/GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE.cmake)
-if(NOT WIN32 OR CYGWIN)
+if(NOT WIN32
+ AND NOT MSYS # FIXME: This works on CYGWIN but not on MSYS
+ )
run_cmake(CREATE_LINK-SYMBOLIC)
run_cmake(CREATE_LINK-SYMBOLIC-noexist)
run_cmake(GLOB_RECURSE-cyclic-recursion)
@@ -72,11 +98,12 @@ if(NOT WIN32 OR CYGWIN)
run_cmake(READ_SYMLINK-noexist)
run_cmake(READ_SYMLINK-notsymlink)
run_cmake(INSTALL-FOLLOW_SYMLINK_CHAIN)
- run_cmake(REAL_PATH-unexpected-arg)
- run_cmake(REAL_PATH-no-base-dir)
- run_cmake(REAL_PATH)
endif()
+run_cmake(REAL_PATH-unexpected-arg)
+run_cmake(REAL_PATH-no-base-dir)
+run_cmake(REAL_PATH)
+
if(RunCMake_GENERATOR MATCHES "Ninja")
# Detect ninja version so we know what tests can be supported.
execute_process(
@@ -137,7 +164,9 @@ else()
run_cmake_command(GLOB-CONFIGURE_DEPENDS-RerunCMake-rebuild_second ${CMAKE_COMMAND} --build .)
run_cmake_command(GLOB-CONFIGURE_DEPENDS-RerunCMake-nowork ${CMAKE_COMMAND} --build .)
- if(NOT WIN32 OR CYGWIN)
+ if(NOT WIN32
+ AND NOT MSYS # FIXME: This works on CYGWIN but not on MSYS
+ )
message(STATUS "GLOB-CONFIGURE_DEPENDS-CMP0009-RerunCMake: link the first test directory into a new directory...")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}/test2")
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${RunCMake_TEST_BINARY_DIR}/test" "${RunCMake_TEST_BINARY_DIR}/test2/test_folder_symlink")
diff --git a/Tests/RunCMake/find_file/FromPATHEnv-stdout-msys.txt b/Tests/RunCMake/find_file/FromPATHEnv-stdout-msys.txt
new file mode 100644
index 0000000..6912bdf
--- /dev/null
+++ b/Tests/RunCMake/find_file/FromPATHEnv-stdout-msys.txt
@@ -0,0 +1,9 @@
+-- PrefixInPATH_File='PrefixInPATH_File-NOTFOUND'
+-- PrefixInPATH_File='.*/Tests/RunCMake/find_file/include/PrefixInPATH.h'
+-- PrefixInPATH_File='.*/Tests/RunCMake/find_file/include/PrefixInPATH.h'
+-- PrefixInPATH_File='PrefixInPATH_File-NOTFOUND'
+-- PrefixInPATH_File='PrefixInPATH_File-NOTFOUND'
+-- PrefixInPATH_File='PrefixInPATH_File-NOTFOUND'
+-- PrefixInPATH_File='PrefixInPATH_File-NOTFOUND'
+-- PrefixInPATH_File='PrefixInPATH_File-NOTFOUND'
+-- PrefixInPATH_File='PrefixInPATH_File-NOTFOUND'
diff --git a/Tests/RunCMake/find_file/NO_CACHE-stdout.txt b/Tests/RunCMake/find_file/NO_CACHE-stdout.txt
new file mode 100644
index 0000000..e786321
--- /dev/null
+++ b/Tests/RunCMake/find_file/NO_CACHE-stdout.txt
@@ -0,0 +1,18 @@
+-- FILE_exists='.+/Tests/RunCMake/find_file/include/PrefixInPATH.h'
+-- FILE_doNotExists='FILE_doNotExists-NOTFOUND'
+--[ ]+
+-- Policy CMP0125 = OLD
+-- CACHED FILE_cache='unknown'
+-- FILE_cache='unknown'
+-- CACHED FILE_cache='PrefixInPATH.h'
+-- FILE_cache='PrefixInPATH.h'
+-- CACHED FILE_cache='PrefixInPATH.h'
+-- FILE_cache='PrefixInPATH.h'
+--[ ]+
+-- Policy CMP0125 = NEW
+-- CACHED FILE_cache='unknown'
+-- FILE_cache='unknown'
+-- CACHED FILE_cache='PrefixInPATH.h'
+-- FILE_cache='PrefixInPATH.h'
+-- CACHED FILE_cache='PrefixInPATH.h'
+-- FILE_cache='.+/Tests/RunCMake/find_file/NO_CACHE-build/PrefixInPATH.h'
diff --git a/Tests/RunCMake/find_file/NO_CACHE.cmake b/Tests/RunCMake/find_file/NO_CACHE.cmake
new file mode 100644
index 0000000..65156b9
--- /dev/null
+++ b/Tests/RunCMake/find_file/NO_CACHE.cmake
@@ -0,0 +1,129 @@
+find_file(FILE_exists
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (DEFINED CACHE{FILE_exists})
+ message(SEND_ERROR "Cache variable defined: FILE_exists")
+endif()
+message(STATUS "FILE_exists='${FILE_exists}'")
+
+
+find_file(FILE_doNotExists
+ NAMES doNotExists.h
+ NO_CACHE
+ )
+if (DEFINED CACHE{FILE_doNotExists})
+ message(SEND_ERROR "Cache variable defined: FILE_doNotExists")
+endif()
+message(STATUS "FILE_doNotExists='${FILE_doNotExists}'")
+
+
+cmake_policy(SET CMP0125 OLD)
+message(STATUS "")
+message(STATUS "Policy CMP0125 = OLD")
+file(REMOVE "${CMAKE_BINARY_DIR}/PrefixInPATH.h")
+
+set(FILE_cache "unknown" CACHE FILEPATH "")
+find_file(FILE_cache
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{FILE_cache})
+ message(SEND_ERROR "Cache variable not defined: FILE_cache")
+endif()
+message(STATUS "CACHED FILE_cache='$CACHE{FILE_cache}'")
+unset(FILE_cache CACHE)
+message(STATUS "FILE_cache='${FILE_cache}'")
+
+
+set(FILE_cache "PrefixInPATH.h" CACHE FILEPATH "")
+unset(FILE_cache)
+find_file(FILE_cache
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{FILE_cache})
+ message(SEND_ERROR "Cache variable not defined: FILE_cache")
+endif()
+message(STATUS "CACHED FILE_cache='$CACHE{FILE_cache}'")
+unset(FILE_cache CACHE)
+message(STATUS "FILE_cache='${FILE_cache}'")
+
+
+set(FILE_cache "PrefixInPATH.h" CACHE FILEPATH "")
+unset(FILE_cache)
+# simulate cache variable defined in command line
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/include/PrefixInPATH.h" DESTINATION "${CMAKE_BINARY_DIR}")
+set_property(CACHE FILE_cache PROPERTY TYPE UNINITIALIZED)
+find_file(FILE_cache
+ NAMES PrefixInPATH.h
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{FILE_cache})
+ message(SEND_ERROR "Cache variable not defined: FILE_cache")
+endif()
+message(STATUS "CACHED FILE_cache='$CACHE{FILE_cache}'")
+unset(FILE_cache CACHE)
+message(STATUS "FILE_cache='${FILE_cache}'")
+
+
+cmake_policy(SET CMP0125 NEW)
+message(STATUS "")
+message(STATUS "Policy CMP0125 = NEW")
+file(REMOVE "${CMAKE_BINARY_DIR}/PrefixInPATH.h")
+
+set(FILE_cache "unknown" CACHE FILEPATH "")
+unset(FILE_cache)
+find_file(FILE_cache
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{FILE_cache})
+ message(SEND_ERROR "Cache variable not defined: FILE_cache")
+endif()
+message(STATUS "CACHED FILE_cache='$CACHE{FILE_cache}'")
+unset(FILE_cache CACHE)
+message(STATUS "FILE_cache='${FILE_cache}'")
+
+
+set(FILE_cache "PrefixInPATH.h" CACHE FILEPATH "")
+unset(FILE_cache)
+find_file(FILE_cache
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{FILE_cache})
+ message(SEND_ERROR "Cache variable not defined: FILE_cache")
+endif()
+message(STATUS "CACHED FILE_cache='$CACHE{FILE_cache}'")
+unset(FILE_cache CACHE)
+message(STATUS "FILE_cache='${FILE_cache}'")
+
+
+set(FILE_cache "PrefixInPATH.h" CACHE FILEPATH "")
+unset(FILE_cache)
+# simulate cache variable defined in command line
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/include/PrefixInPATH.h" DESTINATION "${CMAKE_BINARY_DIR}")
+set_property(CACHE FILE_cache PROPERTY TYPE UNINITIALIZED)
+find_file(FILE_cache
+ NAMES PrefixInPATH.h
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{FILE_cache})
+ message(SEND_ERROR "Cache variable not defined: FILE_cache")
+endif()
+message(STATUS "CACHED FILE_cache='$CACHE{FILE_cache}'")
+unset(FILE_cache CACHE)
+message(STATUS "FILE_cache='${FILE_cache}'")
diff --git a/Tests/RunCMake/find_file/PrefixInPATH-stdout-msys.txt b/Tests/RunCMake/find_file/PrefixInPATH-stdout-msys.txt
new file mode 100644
index 0000000..d73bc1d
--- /dev/null
+++ b/Tests/RunCMake/find_file/PrefixInPATH-stdout-msys.txt
@@ -0,0 +1,4 @@
+-- PrefixInPATH_INCLUDE_DIR='PrefixInPATH_INCLUDE_DIR-NOTFOUND'
+-- PrefixInPATH_INCLUDE_DIR='.*/Tests/RunCMake/find_file/include/PrefixInPATH.h'
+-- PrefixInPATH_INCLUDE_DIR='.*/Tests/RunCMake/find_file/include/PrefixInPATH.h'
+-- PrefixInPATH_INCLUDE_DIR='.*/Tests/RunCMake/find_file/include/PrefixInPATH.h'
diff --git a/Tests/RunCMake/find_file/RunCMakeTest.cmake b/Tests/RunCMake/find_file/RunCMakeTest.cmake
index 93dfb78..95f55a5 100644
--- a/Tests/RunCMake/find_file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_file/RunCMakeTest.cmake
@@ -4,3 +4,4 @@ run_cmake(FromPATHEnv)
run_cmake(FromPrefixPath)
run_cmake(PrefixInPATH)
run_cmake(Required)
+run_cmake(NO_CACHE)
diff --git a/Tests/RunCMake/find_library/FromPATHEnv-stdout-msys.txt b/Tests/RunCMake/find_library/FromPATHEnv-stdout-msys.txt
new file mode 100644
index 0000000..01e2720
--- /dev/null
+++ b/Tests/RunCMake/find_library/FromPATHEnv-stdout-msys.txt
@@ -0,0 +1,6 @@
+-- CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND'
+-- CREATED_LIBRARY='[^']*/Tests/RunCMake/find_library/FromPATHEnv-build/lib/libcreated.a'
+-- CREATED_LIBRARY='[^']*/Tests/RunCMake/find_library/FromPATHEnv-build/lib/libcreated.a'
+-- CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND'
+-- CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND'
+-- CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND'
diff --git a/Tests/RunCMake/find_library/FromScriptMode-stderr-darwin.txt b/Tests/RunCMake/find_library/FromScriptMode-stderr-darwin.txt
new file mode 100644
index 0000000..185720b
--- /dev/null
+++ b/Tests/RunCMake/find_library/FromScriptMode-stderr-darwin.txt
@@ -0,0 +1,4 @@
+.*find_library considered the following locations.*
+.*\(lib\)library_no_exist\(\\.tbd\|\\.dylib\|\\.so\|\\.a\).*
+.*The item was found at.*
+.*lib/libcreated.a.*
diff --git a/Tests/RunCMake/find_library/FromScriptMode-stderr-windows.txt b/Tests/RunCMake/find_library/FromScriptMode-stderr-windows.txt
new file mode 100644
index 0000000..501ec0f
--- /dev/null
+++ b/Tests/RunCMake/find_library/FromScriptMode-stderr-windows.txt
@@ -0,0 +1,4 @@
+.*find_library considered the following locations.*
+.*\(\|lib\)library_no_exist\(\\.lib\|\\.dll\\.a\|\\.a\).*
+.*The item was found at.*
+.*lib/libcreated.a.*
diff --git a/Tests/RunCMake/find_library/FromScriptMode-stderr.txt b/Tests/RunCMake/find_library/FromScriptMode-stderr.txt
new file mode 100644
index 0000000..046f680
--- /dev/null
+++ b/Tests/RunCMake/find_library/FromScriptMode-stderr.txt
@@ -0,0 +1,4 @@
+.*find_library considered the following locations.*
+.*\(lib\)library_no_exist\(\\.so\|\\.a\).*
+.*The item was found at.*
+.*lib/libcreated.a.*
diff --git a/Tests/RunCMake/find_library/FromScriptMode.cmake b/Tests/RunCMake/find_library/FromScriptMode.cmake
new file mode 100644
index 0000000..4d3c699
--- /dev/null
+++ b/Tests/RunCMake/find_library/FromScriptMode.cmake
@@ -0,0 +1,15 @@
+
+if(TEMP_DIR)
+ file(REMOVE_RECURSE "${TEMP_DIR}")
+ file(MAKE_DIRECTORY "${TEMP_DIR}")
+ file(MAKE_DIRECTORY "${TEMP_DIR}/lib")
+ file(WRITE "${TEMP_DIR}/lib/libcreated.a" "created")
+endif()
+
+set(CMAKE_FIND_DEBUG_MODE 1)
+find_library(CREATED_LIBRARY NAMES library_no_exist)
+
+set(CMAKE_PREFIX_PATH "${TEMP_DIR}")
+find_library(CREATED_LIBRARY NAMES created)
+message(STATUS "CREATED_LIBRARY='${CREATED_LIBRARY}'")
+set(CMAKE_FIND_DEBUG_MODE 0)
diff --git a/Tests/RunCMake/find_library/NO_CACHE-stdout.txt b/Tests/RunCMake/find_library/NO_CACHE-stdout.txt
new file mode 100644
index 0000000..1b4c2a9
--- /dev/null
+++ b/Tests/RunCMake/find_library/NO_CACHE-stdout.txt
@@ -0,0 +1,18 @@
+-- LIB_exists='.+/Tests/RunCMake/find_library/lib/libPrefixInPATH.a'
+-- LIB_doNotExists='LIB_doNotExists-NOTFOUND'
+--[ ]+
+-- Policy CMP0125 = OLD
+-- CACHED LIB_cache='unknown'
+-- LIB_cache='unknown'
+-- CACHED LIB_cache='libPrefixInPATH.a'
+-- LIB_cache='libPrefixInPATH.a'
+-- CACHED LIB_cache='libPrefixInPATH.a'
+-- LIB_cache='libPrefixInPATH.a'
+--[ ]+
+-- Policy CMP0125 = NEW
+-- CACHED LIB_cache='unknown'
+-- LIB_cache='unknown'
+-- CACHED LIB_cache='libPrefixInPATH.a'
+-- LIB_cache='libPrefixInPATH.a'
+-- CACHED LIB_cache='libPrefixInPATH.a'
+-- LIB_cache='.+/Tests/RunCMake/find_library/NO_CACHE-build/libPrefixInPATH.a'
diff --git a/Tests/RunCMake/find_library/NO_CACHE.cmake b/Tests/RunCMake/find_library/NO_CACHE.cmake
new file mode 100644
index 0000000..a94b828
--- /dev/null
+++ b/Tests/RunCMake/find_library/NO_CACHE.cmake
@@ -0,0 +1,133 @@
+list(APPEND CMAKE_FIND_LIBRARY_PREFIXES lib)
+list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .a)
+
+find_library(LIB_exists
+ NAMES PrefixInPATH
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (DEFINED CACHE{LIB_exists})
+ message(SEND_ERROR "Cache variable defined: LIB_exists")
+endif()
+message(STATUS "LIB_exists='${LIB_exists}'")
+
+
+find_library(LIB_doNotExists
+ NAMES doNotExists
+ NO_CACHE
+ )
+if (DEFINED CACHE{LIB_doNotExists})
+ message(SEND_ERROR "Cache variable defined: LIB_doNotExists")
+endif()
+message(STATUS "LIB_doNotExists='${LIB_doNotExists}'")
+
+
+cmake_policy(SET CMP0125 OLD)
+message(STATUS "")
+message(STATUS "Policy CMP0125 = OLD")
+file(REMOVE "${CMAKE_BINARY_DIR}/libPrefixInPATH.a")
+
+set(LIB_cache "unknown" CACHE FILEPATH "")
+find_library(LIB_cache
+ NAMES PrefixInPATH
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{LIB_cache})
+ message(SEND_ERROR "Cache variable not defined: LIB_cache")
+endif()
+message(STATUS "CACHED LIB_cache='$CACHE{LIB_cache}'")
+unset(LIB_cache CACHE)
+message(STATUS "LIB_cache='${LIB_cache}'")
+
+
+set(LIB_cache "libPrefixInPATH.a" CACHE FILEPATH "")
+unset(LIB_cache)
+find_library(LIB_cache
+ NAMES PrefixInPATH
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{LIB_cache})
+ message(SEND_ERROR "Cache variable not defined: LIB_cache")
+endif()
+message(STATUS "CACHED LIB_cache='$CACHE{LIB_cache}'")
+unset(LIB_cache CACHE)
+message(STATUS "LIB_cache='${LIB_cache}'")
+
+
+set(LIB_cache "libPrefixInPATH.a" CACHE FILEPATH "")
+unset(LIB_cache)
+# simulate cache variable defined in command line
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libPrefixInPATH.a" DESTINATION "${CMAKE_BINARY_DIR}")
+set_property(CACHE LIB_cache PROPERTY TYPE UNINITIALIZED)
+find_library(LIB_cache
+ NAMES PrefixInPATH
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{LIB_cache})
+ message(SEND_ERROR "Cache variable not defined: LIB_cache")
+endif()
+message(STATUS "CACHED LIB_cache='$CACHE{LIB_cache}'")
+unset(LIB_cache CACHE)
+message(STATUS "LIB_cache='${LIB_cache}'")
+
+
+cmake_policy(SET CMP0125 NEW)
+message(STATUS "")
+message(STATUS "Policy CMP0125 = NEW")
+file(REMOVE "${CMAKE_BINARY_DIR}/libPrefixInPATH.a")
+
+set(LIB_cache "unknown" CACHE FILEPATH "")
+find_library(LIB_cache
+ NAMES PrefixInPATH
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{LIB_cache})
+ message(SEND_ERROR "Cache variable not defined: LIB_cache")
+endif()
+message(STATUS "CACHED LIB_cache='$CACHE{LIB_cache}'")
+unset(LIB_cache CACHE)
+message(STATUS "LIB_cache='${LIB_cache}'")
+
+
+set(LIB_cache "libPrefixInPATH.a" CACHE FILEPATH "")
+unset(LIB_cache)
+find_library(LIB_cache
+ NAMES PrefixInPATH
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{LIB_cache})
+ message(SEND_ERROR "Cache variable not defined: LIB_cache")
+endif()
+message(STATUS "CACHED LIB_cache='$CACHE{LIB_cache}'")
+unset(LIB_cache CACHE)
+message(STATUS "LIB_cache='${LIB_cache}'")
+
+
+set(LIB_cache "libPrefixInPATH.a" CACHE FILEPATH "")
+unset(LIB_cache)
+# simulate cache variable defined in command line
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libPrefixInPATH.a" DESTINATION "${CMAKE_BINARY_DIR}")
+set_property(CACHE LIB_cache PROPERTY TYPE UNINITIALIZED)
+find_library(LIB_cache
+ NAMES PrefixInPATH
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{LIB_cache})
+ message(SEND_ERROR "Cache variable not defined: LIB_cache")
+endif()
+message(STATUS "CACHED LIB_cache='$CACHE{LIB_cache}'")
+unset(LIB_cache CACHE)
+message(STATUS "LIB_cache='${LIB_cache}'")
diff --git a/Tests/RunCMake/find_library/PrefixInPATH-stdout-msys.txt b/Tests/RunCMake/find_library/PrefixInPATH-stdout-msys.txt
new file mode 100644
index 0000000..1ab884c
--- /dev/null
+++ b/Tests/RunCMake/find_library/PrefixInPATH-stdout-msys.txt
@@ -0,0 +1,4 @@
+-- PrefixInPATH_LIBRARY='PrefixInPATH_LIBRARY-NOTFOUND'
+-- PrefixInPATH_LIBRARY='.*/Tests/RunCMake/find_library/lib/libPrefixInPATH.a'
+-- PrefixInPATH_LIBRARY='.*/Tests/RunCMake/find_library/lib/libPrefixInPATH.a'
+-- PrefixInPATH_LIBRARY='.*/Tests/RunCMake/find_library/lib/libPrefixInPATH.a'
diff --git a/Tests/RunCMake/find_library/RunCMakeTest.cmake b/Tests/RunCMake/find_library/RunCMakeTest.cmake
index c7d69e4..ad02c82 100644
--- a/Tests/RunCMake/find_library/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_library/RunCMakeTest.cmake
@@ -9,3 +9,6 @@ if(UNIX AND NOT CYGWIN)
endif()
run_cmake(PrefixInPATH)
run_cmake(Required)
+run_cmake(NO_CACHE)
+
+run_cmake_script(FromScriptMode "-DTEMP_DIR=${RunCMake_BINARY_DIR}/FromScriptMode-temp")
diff --git a/Tests/RunCMake/find_package/CMP0084-OLD-stderr.txt b/Tests/RunCMake/find_package/CMP0084-OLD-stderr.txt
new file mode 100644
index 0000000..0db83aa
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0084-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0084-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0084 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/find_package/MissingNormalForceRequired-result.txt b/Tests/RunCMake/find_package/MissingNormalForceRequired-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_package/MissingNormalForceRequired-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_package/MissingNormalForceRequired-stderr.txt b/Tests/RunCMake/find_package/MissingNormalForceRequired-stderr.txt
new file mode 100644
index 0000000..f6c0b44
--- /dev/null
+++ b/Tests/RunCMake/find_package/MissingNormalForceRequired-stderr.txt
@@ -0,0 +1,20 @@
+CMake Error at MissingNormalForceRequired.cmake:2 \(find_package\):
+ No "FindNotHere.cmake" found in CMAKE_MODULE_PATH\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Warning \(dev\) at MissingNormalForceRequired.cmake:2 \(find_package\):
+ FindNotHere.cmake must either be part of this project itself, in this case
+ adjust CMAKE_MODULE_PATH so that it points to the correct location inside
+ its source tree\.
+
+ Or it must be installed by a package which has already been found via
+ find_package\(\)\. In this case make sure that package has indeed been found
+ and adjust CMAKE_MODULE_PATH to contain the location where that package has
+ installed FindNotHere\.cmake\. This must be a location provided by that
+ package. This error in general means that the buildsystem of this project
+ is relying on a Find-module without ensuring that it is actually available\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/find_package/MissingNormalForceRequired.cmake b/Tests/RunCMake/find_package/MissingNormalForceRequired.cmake
new file mode 100644
index 0000000..5935316
--- /dev/null
+++ b/Tests/RunCMake/find_package/MissingNormalForceRequired.cmake
@@ -0,0 +1,3 @@
+set(CMAKE_REQUIRE_FIND_PACKAGE_NotHere ON)
+find_package(NotHere MODULE)
+message(FATAL_ERROR "This error must not be reachable.")
diff --git a/Tests/RunCMake/find_package/RequiredOptionValuesClash-result.txt b/Tests/RunCMake/find_package/RequiredOptionValuesClash-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_package/RequiredOptionValuesClash-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_package/RequiredOptionValuesClash-stderr.txt b/Tests/RunCMake/find_package/RequiredOptionValuesClash-stderr.txt
new file mode 100644
index 0000000..b4fdd98
--- /dev/null
+++ b/Tests/RunCMake/find_package/RequiredOptionValuesClash-stderr.txt
@@ -0,0 +1,11 @@
+CMake Error at RequiredOptionValuesClash.cmake:4 \(find_package\):
+ find_package for module Foo was made REQUIRED with
+ CMAKE_REQUIRE_FIND_PACKAGE_Foo but CMAKE_DISABLE_FIND_PACKAGE_Foo is
+ enabled. A REQUIRED package cannot be disabled.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at RequiredOptionValuesClash.cmake:5 \(message\):
+ This error must not be reachable\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/find_package/RequiredOptionValuesClash.cmake b/Tests/RunCMake/find_package/RequiredOptionValuesClash.cmake
new file mode 100644
index 0000000..04fece7
--- /dev/null
+++ b/Tests/RunCMake/find_package/RequiredOptionValuesClash.cmake
@@ -0,0 +1,5 @@
+set(CMAKE_DISABLE_FIND_PACKAGE_Foo ON)
+set(CMAKE_REQUIRE_FIND_PACKAGE_Foo ON)
+
+find_package(Foo)
+message(FATAL_ERROR "This error must not be reachable.")
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index a899f46..b20a889 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -6,6 +6,7 @@ run_cmake(ComponentRequiredAndOptional)
run_cmake(FromPATHEnv)
run_cmake(FromPrefixPath)
run_cmake(MissingNormal)
+run_cmake(MissingNormalForceRequired)
run_cmake(MissingNormalRequired)
run_cmake(MissingNormalVersion)
run_cmake(MissingNormalWarnNoModuleOld)
@@ -23,6 +24,7 @@ run_cmake(PackageRootNestedConfig)
run_cmake(PackageRootNestedModule)
run_cmake(PolicyPush)
run_cmake(PolicyPop)
+run_cmake(RequiredOptionValuesClash)
run_cmake(SetFoundFALSE)
run_cmake(WrongVersion)
run_cmake(WrongVersionConfig)
@@ -38,8 +40,11 @@ run_cmake(VersionRange3)
run_cmake(VersionRange4)
run_cmake(VersionRangeConfig)
run_cmake(VersionRangeConfig2)
+run_cmake(VersionRangeConfig02)
run_cmake(VersionRangeConfigStd)
run_cmake(VersionRangeConfigStd2)
-if(UNIX)
+if(UNIX
+ AND NOT MSYS # FIXME: This works on CYGWIN but not on MSYS
+ )
run_cmake(SetFoundResolved)
endif()
diff --git a/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake b/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake
index e9f6076..1d0adfe 100644
--- a/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake
+++ b/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake
@@ -1,6 +1,7 @@
if (NOT PACKAGE_FIND_VERSION_COMPLETE STREQUAL "1.2.3.4...5.6.7.8"
- AND NOT PACKAGE_FIND_VERSION_COMPLETE STREQUAL "1.2.3.4...<5.6.7.8")
+ AND NOT PACKAGE_FIND_VERSION_COMPLETE STREQUAL "1.2.3.4...<5.6.7.8"
+ AND NOT PACKAGE_FIND_VERSION_COMPLETE STREQUAL "1.02.03.04...<5.06.07.08")
message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_COMPLETE: ${PACKAGE_FIND_VERSION_COMPLETE}")
endif()
@@ -21,7 +22,8 @@ if (NOT PACKAGE_FIND_VERSION_TWEAK VERSION_EQUAL "4")
endif()
if (NOT PACKAGE_FIND_VERSION_RANGE STREQUAL "1.2.3.4...5.6.7.8"
- AND NOT PACKAGE_FIND_VERSION_RANGE STREQUAL "1.2.3.4...<5.6.7.8")
+ AND NOT PACKAGE_FIND_VERSION_RANGE STREQUAL "1.2.3.4...<5.6.7.8"
+ AND NOT PACKAGE_FIND_VERSION_RANGE STREQUAL "1.02.03.04...<5.06.07.08")
message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_RANGE: ${PACKAGE_FIND_VERSION_RANGE}")
endif()
diff --git a/Tests/RunCMake/find_package/VersionRangeConfig02.cmake b/Tests/RunCMake/find_package/VersionRangeConfig02.cmake
new file mode 100644
index 0000000..6522f6d
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeConfig02.cmake
@@ -0,0 +1,23 @@
+set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+
+find_package(VersionRange 1.02.03.04...<5.06.07.08 CONFIG NAMES VersionRangeCfg)
+
+if (NOT VersionRange_FOUND)
+ message (FATAL_ERROR "Package VersionRange not found in CONFIG mode.")
+endif()
+
+if (NOT VersionRange_VERSION VERSION_EQUAL "2.3.4.5")
+ message (SEND_ERROR "Wrong version : ${VersionRange_VERSION}")
+endif()
+if (NOT VersionRange_VERSION_MAJOR VERSION_EQUAL "2")
+ message (SEND_ERROR "Wrong major version : ${VersionRange_VERSION_MAJOR}")
+endif()
+if (NOT VersionRange_VERSION_MINOR VERSION_EQUAL "3")
+ message (SEND_ERROR "Wrong minor version : ${VersionRange_VERSION_MINOR}")
+endif()
+if (NOT VersionRange_VERSION_PATCH VERSION_EQUAL "4")
+ message (SEND_ERROR "Wrong patch version : ${VersionRange_VERSION_PATCH}")
+endif()
+if (NOT VersionRange_VERSION_TWEAK VERSION_EQUAL "5")
+ message (SEND_ERROR "Wrong tweak version : ${VersionRange_VERSION_TWEAK}")
+endif()
diff --git a/Tests/RunCMake/find_path/FromPATHEnv-stdout-msys.txt b/Tests/RunCMake/find_path/FromPATHEnv-stdout-msys.txt
new file mode 100644
index 0000000..8f3e7ca
--- /dev/null
+++ b/Tests/RunCMake/find_path/FromPATHEnv-stdout-msys.txt
@@ -0,0 +1,9 @@
+-- PATH_IN_ENV_PATH='PATH_IN_ENV_PATH-NOTFOUND'
+-- PATH_IN_ENV_PATH='.*/Tests/RunCMake/find_path/include'
+-- PATH_IN_ENV_PATH='.*/Tests/RunCMake/find_path/include'
+-- PATH_IN_ENV_PATH='PATH_IN_ENV_PATH-NOTFOUND'
+-- PATH_IN_ENV_PATH='PATH_IN_ENV_PATH-NOTFOUND'
+-- PATH_IN_ENV_PATH='PATH_IN_ENV_PATH-NOTFOUND'
+-- PATH_IN_ENV_PATH='PATH_IN_ENV_PATH-NOTFOUND'
+-- PATH_IN_ENV_PATH='PATH_IN_ENV_PATH-NOTFOUND'
+-- PATH_IN_ENV_PATH='PATH_IN_ENV_PATH-NOTFOUND'
diff --git a/Tests/RunCMake/find_path/NO_CACHE-stdout.txt b/Tests/RunCMake/find_path/NO_CACHE-stdout.txt
new file mode 100644
index 0000000..a41454e
--- /dev/null
+++ b/Tests/RunCMake/find_path/NO_CACHE-stdout.txt
@@ -0,0 +1,18 @@
+-- PATH_exists='.+/Tests/RunCMake/find_path/include/'
+-- PATH_exists='PATH_doNotExists-NOTFOUND'
+--[ ]+
+-- Policy CMP0125 = OLD
+-- CACHED PATH_cache='unknown'
+-- PATH_cache='unknown'
+-- CACHED PATH_cache='include'
+-- PATH_cache='include'
+-- CACHED PATH_cache='include'
+-- PATH_cache='include'
+--[ ]+
+-- Policy CMP0125 = NEW
+-- CACHED PATH_cache='unknown'
+-- PATH_cache='unknown'
+-- CACHED PATH_cache='include'
+-- PATH_cache='include'
+-- CACHED PATH_cache='include'
+-- PATH_cache='.+/Tests/RunCMake/find_path/NO_CACHE-build/include'
diff --git a/Tests/RunCMake/find_path/NO_CACHE.cmake b/Tests/RunCMake/find_path/NO_CACHE.cmake
new file mode 100644
index 0000000..4779ac8
--- /dev/null
+++ b/Tests/RunCMake/find_path/NO_CACHE.cmake
@@ -0,0 +1,131 @@
+find_path(PATH_exists
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (DEFINED CACHE{PATH_exists})
+ message(SEND_ERROR "Cache variable defined: PATH_exists")
+endif()
+message(STATUS "PATH_exists='${PATH_exists}'")
+
+
+find_path(PATH_doNotExists
+ NAMES doNotExists.h
+ NO_CACHE
+ )
+if (DEFINED CACHE{PATH_doNotExists})
+ message(SEND_ERROR "Cache variable defined: PATH_doNotExists")
+endif()
+message(STATUS "PATH_exists='${PATH_doNotExists}'")
+
+
+cmake_policy(SET CMP0125 OLD)
+message(STATUS "")
+message(STATUS "Policy CMP0125 = OLD")
+file(REMOVE "${CMAKE_BINARY_DIR}/PrefixInPATH.h")
+
+set(PATH_cache "unknown" CACHE PATH "")
+find_path(PATH_cache
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PATH_cache})
+ message(SEND_ERROR "Cache variable defined: PATH_cache")
+endif()
+message(STATUS "CACHED PATH_cache='$CACHE{PATH_cache}'")
+unset(PATH_cache CACHE)
+message(STATUS "PATH_cache='${PATH_cache}'")
+
+
+set(PATH_cache "include" CACHE PATH "")
+unset(PATH_cache)
+find_path(PATH_cache
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PATH_cache})
+ message(SEND_ERROR "Cache variable defined: PATH_cache")
+endif()
+message(STATUS "CACHED PATH_cache='$CACHE{PATH_cache}'")
+unset(PATH_cache CACHE)
+message(STATUS "PATH_cache='${PATH_cache}'")
+
+
+set(PATH_cache "include" CACHE PATH "")
+unset(PATH_cache)
+# simulate cache variable defined in command line
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include")
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/include/PrefixInPATH.h" DESTINATION "${CMAKE_BINARY_DIR}/include")
+set_property(CACHE PATH_cache PROPERTY TYPE UNINITIALIZED)
+find_path(PATH_cache
+ NAMES PrefixInPATH.h
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PATH_cache})
+ message(SEND_ERROR "Cache variable not defined: PATH_cache")
+endif()
+message(STATUS "CACHED PATH_cache='$CACHE{PATH_cache}'")
+unset(PATH_cache CACHE)
+message(STATUS "PATH_cache='${PATH_cache}'")
+
+
+cmake_policy(SET CMP0125 NEW)
+message(STATUS "")
+message(STATUS "Policy CMP0125 = NEW")
+file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/include")
+
+set(PATH_cache "unknown" CACHE PATH "")
+unset(PATH_cache)
+find_path(PATH_cache
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PATH_cache})
+ message(SEND_ERROR "Cache variable defined: PATH_cache")
+endif()
+message(STATUS "CACHED PATH_cache='$CACHE{PATH_cache}'")
+unset(PATH_cache CACHE)
+message(STATUS "PATH_cache='${PATH_cache}'")
+
+
+set(PATH_cache "include" CACHE PATH "")
+unset(PATH_cache)
+find_path(PATH_cache
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PATH_cache})
+ message(SEND_ERROR "Cache variable defined: PATH_cache")
+endif()
+message(STATUS "CACHED PATH_cache='$CACHE{PATH_cache}'")
+unset(PATH_cache CACHE)
+message(STATUS "PATH_cache='${PATH_cache}'")
+
+
+set(PATH_cache "include" CACHE PATH "")
+unset(PATH_cache)
+# simulate cache variable defined in command line
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include")
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/include/PrefixInPATH.h" DESTINATION "${CMAKE_BINARY_DIR}/include")
+set_property(CACHE PATH_cache PROPERTY TYPE UNINITIALIZED)
+find_path(PATH_cache
+ NAMES PrefixInPATH.h
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PATH_cache})
+ message(SEND_ERROR "Cache variable not defined: PATH_cache")
+endif()
+message(STATUS "CACHED PATH_cache='$CACHE{PATH_cache}'")
+unset(PATH_cache CACHE)
+message(STATUS "PATH_cache='${PATH_cache}'")
diff --git a/Tests/RunCMake/find_path/PrefixInPATH-stdout-msys.txt b/Tests/RunCMake/find_path/PrefixInPATH-stdout-msys.txt
new file mode 100644
index 0000000..bb2ceb7
--- /dev/null
+++ b/Tests/RunCMake/find_path/PrefixInPATH-stdout-msys.txt
@@ -0,0 +1,4 @@
+-- PrefixInPATH_INCLUDE_DIR='PrefixInPATH_INCLUDE_DIR-NOTFOUND'
+-- PrefixInPATH_INCLUDE_DIR='.*/Tests/RunCMake/find_path/include'
+-- PrefixInPATH_INCLUDE_DIR='.*/Tests/RunCMake/find_path/include'
+-- PrefixInPATH_INCLUDE_DIR='.*/Tests/RunCMake/find_path/include'
diff --git a/Tests/RunCMake/find_path/RunCMakeTest.cmake b/Tests/RunCMake/find_path/RunCMakeTest.cmake
index 5c919bb..90ee768 100644
--- a/Tests/RunCMake/find_path/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_path/RunCMakeTest.cmake
@@ -4,6 +4,7 @@ run_cmake(EmptyOldStyle)
run_cmake(FromPATHEnv)
run_cmake(PrefixInPATH)
run_cmake(Required)
+run_cmake(NO_CACHE)
if(APPLE)
run_cmake(FrameworksWithSubdirs)
diff --git a/Tests/RunCMake/find_program/NO_CACHE-stdout.txt b/Tests/RunCMake/find_program/NO_CACHE-stdout.txt
new file mode 100644
index 0000000..c235d81
--- /dev/null
+++ b/Tests/RunCMake/find_program/NO_CACHE-stdout.txt
@@ -0,0 +1,18 @@
+-- PROG_A='.+/Tests/RunCMake/find_program/A/testA'
+-- PROG_AandB='PROG_AandB-NOTFOUND'
+--[ ]+
+-- Policy CMP0125 = OLD
+-- CACHED PROG_cache='unknown'
+-- PROG_cache='unknown'
+-- CACHED PROG_cache='testA'
+-- PROG_cache='testA'
+-- CACHED PROG_cache='testA'
+-- PROG_cache='testA'
+--[ ]+
+-- Policy CMP0125 = NEW
+-- CACHED PROG_cache='unknown'
+-- PROG_cache='unknown'
+-- CACHED PROG_cache='testA'
+-- PROG_cache='testA'
+-- CACHED PROG_cache='testA'
+-- PROG_cache='.+/Tests/RunCMake/find_program/NO_CACHE-build/testA'
diff --git a/Tests/RunCMake/find_program/NO_CACHE.cmake b/Tests/RunCMake/find_program/NO_CACHE.cmake
new file mode 100644
index 0000000..77a0582
--- /dev/null
+++ b/Tests/RunCMake/find_program/NO_CACHE.cmake
@@ -0,0 +1,130 @@
+find_program(PROG_A
+ NAMES testA
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (DEFINED CACHE{PROG_A})
+ message(SEND_ERROR "Cache variable defined: PROG_A")
+endif()
+message(STATUS "PROG_A='${PROG_A}'")
+
+
+find_program(PROG_AandB
+ NAMES testAandB
+ NO_CACHE
+ )
+if (DEFINED CACHE{PROG_AandB})
+ message(SEND_ERROR "Cache variable defined: PROG_AandN")
+endif()
+message(STATUS "PROG_AandB='${PROG_AandB}'")
+
+
+cmake_policy(SET CMP0125 OLD)
+message(STATUS "")
+message(STATUS "Policy CMP0125 = OLD")
+file(REMOVE "${CMAKE_BINARY_DIR}/testA")
+
+set(PROG_cache "unknown" CACHE FILEPATH "")
+find_program(PROG_cache
+ NAMES testA
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PROG_cache})
+ message(SEND_ERROR "Cache variable not defined: PROG_cache")
+endif()
+message(STATUS "CACHED PROG_cache='$CACHE{PROG_cache}'")
+unset(PROG_cache CACHE)
+message(STATUS "PROG_cache='${PROG_cache}'")
+
+
+set(PROG_cache "testA" CACHE FILEPATH "")
+unset(PROG_cache)
+find_program(PROG_cache
+ NAMES testA
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PROG_cache})
+ message(SEND_ERROR "Cache variable not defined: PROG_cache")
+endif()
+message(STATUS "CACHED PROG_cache='$CACHE{PROG_cache}'")
+unset(PROG_cache CACHE)
+message(STATUS "PROG_cache='${PROG_cache}'")
+
+
+set(PROG_cache "testA" CACHE FILEPATH "")
+unset(PROG_cache)
+# simulate cache variable defined in command line
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/A/testA" DESTINATION "${CMAKE_BINARY_DIR}")
+set_property(CACHE PROG_cache PROPERTY TYPE UNINITIALIZED)
+find_program(PROG_cache
+ NAMES testA
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PROG_cache})
+ message(SEND_ERROR "Cache variable not defined: PROG_cache")
+endif()
+message(STATUS "CACHED PROG_cache='$CACHE{PROG_cache}'")
+unset(PROG_cache CACHE)
+message(STATUS "PROG_cache='${PROG_cache}'")
+
+
+cmake_policy(SET CMP0125 NEW)
+message(STATUS "")
+message(STATUS "Policy CMP0125 = NEW")
+file(REMOVE "${CMAKE_BINARY_DIR}/testA")
+
+set(PROG_cache "unknown" CACHE FILEPATH "")
+find_program(PROG_cache
+ NAMES testA
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PROG_cache})
+ message(SEND_ERROR "Cache variable not defined: PROG_cache")
+endif()
+message(STATUS "CACHED PROG_cache='$CACHE{PROG_cache}'")
+unset(PROG_cache CACHE)
+message(STATUS "PROG_cache='${PROG_cache}'")
+
+
+set(PROG_cache "testA" CACHE FILEPATH "")
+unset(PROG_cache)
+find_program(PROG_cache
+ NAMES testA
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PROG_cache})
+ message(SEND_ERROR "Cache variable not defined: PROG_cache")
+endif()
+message(STATUS "CACHED PROG_cache='$CACHE{PROG_cache}'")
+unset(PROG_cache CACHE)
+message(STATUS "PROG_cache='${PROG_cache}'")
+
+
+set(PROG_cache "testA" CACHE FILEPATH "")
+unset(PROG_cache)
+# simulate cache variable defined in command line
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/A/testA" DESTINATION "${CMAKE_BINARY_DIR}")
+set_property(CACHE PROG_cache PROPERTY TYPE UNINITIALIZED)
+find_program(PROG_cache
+ NAMES testA
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
+ NO_CACHE
+ NO_DEFAULT_PATH
+ )
+if (NOT DEFINED CACHE{PROG_cache})
+ message(SEND_ERROR "Cache variable not defined: PROG_cache")
+endif()
+message(STATUS "CACHED PROG_cache='$CACHE{PROG_cache}'")
+unset(PROG_cache CACHE)
+message(STATUS "PROG_cache='${PROG_cache}'")
diff --git a/Tests/RunCMake/find_program/RunCMakeTest.cmake b/Tests/RunCMake/find_program/RunCMakeTest.cmake
index 3e23920..34edc19 100644
--- a/Tests/RunCMake/find_program/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_program/RunCMakeTest.cmake
@@ -5,8 +5,9 @@ run_cmake(DirsPerName)
run_cmake(NamesPerDir)
run_cmake(RelAndAbsPath)
run_cmake(Required)
+run_cmake(NO_CACHE)
-if(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN)$")
+if(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$")
run_cmake(WindowsCom)
run_cmake(WindowsExe)
else()
diff --git a/Tests/RunCMake/foreach/RunCMakeTest.cmake b/Tests/RunCMake/foreach/RunCMakeTest.cmake
index d3f7c23..15ca477 100644
--- a/Tests/RunCMake/foreach/RunCMakeTest.cmake
+++ b/Tests/RunCMake/foreach/RunCMakeTest.cmake
@@ -20,3 +20,5 @@ run_cmake(foreach-RANGE-non-int-test-3-2)
run_cmake(foreach-RANGE-non-int-test-3-3)
run_cmake(foreach-RANGE-invalid-test)
run_cmake(foreach-RANGE-out-of-range-test)
+run_cmake(foreach-var-scope-CMP0124-OLD)
+run_cmake(foreach-var-scope-CMP0124-NEW)
diff --git a/Tests/RunCMake/foreach/foreach-var-scope-CMP0124-NEW.cmake b/Tests/RunCMake/foreach/foreach-var-scope-CMP0124-NEW.cmake
new file mode 100644
index 0000000..7e2eee0
--- /dev/null
+++ b/Tests/RunCMake/foreach/foreach-var-scope-CMP0124-NEW.cmake
@@ -0,0 +1,51 @@
+
+cmake_policy(SET CMP0124 NEW)
+
+foreach(VAR a b c)
+endforeach()
+if (DEFINED VAR)
+ message(SEND_ERROR "Variable 'VAR' unexpectedly defined.")
+endif()
+
+set(LIST1 a b c)
+set(LIST2 x y z)
+foreach(VAR1_1 VAR1_2 IN ZIP_LISTS LIST1 LIST2)
+endforeach()
+if (DEFINED VAR1_1 OR DEFINED VAR1_2)
+ message(SEND_ERROR "Variables 'VAR1_1' or 'VAR1_2' unexpectedly defined.")
+endif()
+
+
+set (VAR2 OLD)
+foreach(VAR2 a b c)
+endforeach()
+if (NOT DEFINED VAR2 OR NOT VAR2 STREQUAL "OLD")
+ message(SEND_ERROR "Variable 'VAR2' not defined or wrong value.")
+endif()
+
+set (VAR2_2 OLD)
+foreach(VAR2_1 VAR2_2 IN ZIP_LISTS LIST1 LIST2)
+endforeach()
+if (DEFINED VAR2_1 OR NOT DEFINED VAR2_2)
+ message(SEND_ERROR "Variable 'VAR2_1' unexpectedly defined or variable 'VAR2_2' not defined.")
+endif()
+
+
+set (VAR3 OLD CACHE STRING "")
+foreach(VAR3 a b c)
+endforeach()
+# check that only cache variable is defined
+set(OLD_VALUE "${VAR3}")
+unset(VAR3 CACHE)
+if (DEFINED VAR3 OR NOT OLD_VALUE STREQUAL "OLD")
+ message(SEND_ERROR "Variable 'VAR3' wrongly defined or wrong value.")
+endif()
+
+set (VAR3_2 OLD CACHE STRING "")
+foreach(VAR3_1 VAR3_2 IN ZIP_LISTS LIST1 LIST2)
+endforeach()
+set(OLD_VALUE "${VAR3_2}")
+unset(VAR3_2 CACHE)
+if (DEFINED VAR3_1 OR DEFINED VAR3_2 OR NOT OLD_VALUE STREQUAL "OLD")
+ message(SEND_ERROR "Variable 'VAR3_1' unexpectedly defined or variable 'VAR2_2' wrongly defined or wrong value.")
+endif()
diff --git a/Tests/RunCMake/foreach/foreach-var-scope-CMP0124-OLD.cmake b/Tests/RunCMake/foreach/foreach-var-scope-CMP0124-OLD.cmake
new file mode 100644
index 0000000..f955982
--- /dev/null
+++ b/Tests/RunCMake/foreach/foreach-var-scope-CMP0124-OLD.cmake
@@ -0,0 +1,53 @@
+
+cmake_policy(SET CMP0124 OLD)
+
+foreach(VAR a b c)
+endforeach()
+if (NOT DEFINED VAR OR NOT VAR STREQUAL "")
+ message(SEND_ERROR "Variable 'VAR' not defined or wrong value.")
+endif()
+
+set(LIST1 a b c)
+set(LIST2 x y z)
+foreach(VAR1_1 VAR1_2 IN ZIP_LISTS LIST1 LIST2)
+endforeach()
+if (NOT DEFINED VAR1_1 OR NOT VAR1_1 STREQUAL ""
+ OR NOT DEFINED VAR1_2 OR NOT VAR1_2 STREQUAL "")
+ message(SEND_ERROR "Variables 'VAR1_1' or 'VAR1_2' not defined or wrong value.")
+endif()
+
+
+set (VAR2 OLD)
+foreach(VAR2 a b c)
+endforeach()
+if (NOT DEFINED VAR2 OR NOT VAR2 STREQUAL "OLD")
+ message(SEND_ERROR "Variable 'VAR2' not defined or wrong value.")
+endif()
+
+set (VAR2_2 OLD)
+foreach(VAR2_1 VAR2_2 IN ZIP_LISTS LIST1 LIST2)
+endforeach()
+if (NOT DEFINED VAR2_1 OR NOT VAR2_1 STREQUAL ""
+ OR NOT DEFINED VAR2_2 OR NOT VAR2_2 STREQUAL "OLD")
+ message(SEND_ERROR "Variables 'VAR2_1' or 'VAR2_2' not defined or wrong value.")
+endif()
+
+
+set (VAR3 OLD CACHE STRING "")
+foreach(VAR3 a b c)
+endforeach()
+# a normal variable is defined, holding cache variable value
+unset(VAR3 CACHE)
+if (NOT DEFINED VAR3 OR NOT VAR3 STREQUAL "OLD")
+ message(SEND_ERROR "Variable 'VAR3' not defined or wrong value.")
+endif()
+
+set (VAR3_2 OLD CACHE STRING "")
+foreach(VAR3_1 VAR3_2 IN ZIP_LISTS LIST1 LIST2)
+endforeach()
+# a normal variable is defined, holding cache variable value
+unset(VAR3_2 CACHE)
+if (NOT DEFINED VAR3_1 OR NOT VAR3_1 STREQUAL ""
+ OR NOT DEFINED VAR3_2 OR NOT VAR3_2 STREQUAL "OLD")
+ message(SEND_ERROR "Variables 'VAR3_1' or 'VAR3_2' not defined or wrong value.")
+endif()
diff --git a/Tests/RunCMake/get_property/directory_properties-stderr.txt b/Tests/RunCMake/get_property/directory_properties-stderr.txt
index 89f5618..be06f0e 100644
--- a/Tests/RunCMake/get_property/directory_properties-stderr.txt
+++ b/Tests/RunCMake/get_property/directory_properties-stderr.txt
@@ -12,6 +12,10 @@ get_directory_property: -->CustomTop;InterfaceTop<--
get_property: -->CustomTop;InterfaceTop<--
get_directory_property: -->CustomSub;InterfaceSub<--
get_property: -->CustomSub;InterfaceSub<--
+get_directory_property: -->Imported1Top;Imported2Top<--
+get_property: -->Imported1Top;Imported2Top<--
+get_directory_property: -->Imported1Sub;Imported2Sub<--
+get_property: -->Imported1Sub;Imported2Sub<--
get_directory_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties-build<--
get_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties-build<--
get_directory_property: -->[^<;]*/RunCMake/get_property<--
diff --git a/Tests/RunCMake/get_property/directory_properties.cmake b/Tests/RunCMake/get_property/directory_properties.cmake
index 9b978fd..4dce524 100644
--- a/Tests/RunCMake/get_property/directory_properties.cmake
+++ b/Tests/RunCMake/get_property/directory_properties.cmake
@@ -18,11 +18,16 @@ add_custom_target(CustomTop)
add_library(InterfaceTop INTERFACE)
add_library(my::InterfaceTop ALIAS InterfaceTop)
+add_library(Imported1Top INTERFACE IMPORTED)
+add_library(Imported2Top INTERFACE IMPORTED)
+
add_subdirectory(directory_properties)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" SUBDIRECTORIES)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" SUBDIRECTORIES)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" BUILDSYSTEM_TARGETS)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" BUILDSYSTEM_TARGETS)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" IMPORTED_TARGETS)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" IMPORTED_TARGETS)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" BINARY_DIR)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" SOURCE_DIR)
diff --git a/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
index 95106ad..9fab799 100644
--- a/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
+++ b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
@@ -5,5 +5,8 @@ add_custom_target(CustomSub)
add_library(InterfaceSub INTERFACE)
add_library(my::InterfaceSub ALIAS InterfaceSub)
+add_library(Imported1Sub INTERFACE IMPORTED)
+add_library(Imported2Sub INTERFACE IMPORTED)
+
add_test(Sub/test1 COMMAND "${CMAKE_COMMAND}" -E echo "Sub/test1")
add_test(Sub/test2 COMMAND "${CMAKE_COMMAND}" -E echo "Sub/test2")
diff --git a/Tests/RunCMake/if/IncompleteMatches-stdout.txt b/Tests/RunCMake/if/IncompleteMatches-stdout.txt
new file mode 100644
index 0000000..634d988
--- /dev/null
+++ b/Tests/RunCMake/if/IncompleteMatches-stdout.txt
@@ -0,0 +1,6 @@
+-- Test #1 passed
+-- Test #2 passed
+-- Test #3 passed
+-- Test #4 passed
+-- Test #5 passed
+-- Test #6 passed
diff --git a/Tests/RunCMake/if/IncompleteMatches.cmake b/Tests/RunCMake/if/IncompleteMatches.cmake
new file mode 100644
index 0000000..7142cfc
--- /dev/null
+++ b/Tests/RunCMake/if/IncompleteMatches.cmake
@@ -0,0 +1,36 @@
+if(MATCHES)
+ message(SEND_ERROR "Test #1 failed")
+else()
+ message(STATUS "Test #1 passed")
+endif()
+
+if("" MATCHES "")
+ message(STATUS "Test #2 passed")
+else()
+ message(SEND_ERROR "Test #2 failed")
+endif()
+
+if(MATCHES RHS)
+ message(SEND_ERROR "Test #3 failed")
+else()
+ message(STATUS "Test #3 passed")
+endif()
+
+set(RHS "")
+if(MATCHES RHS)
+ message(SEND_ERROR "Test #4 failed")
+else()
+ message(STATUS "Test #4 passed")
+endif()
+
+if(MATCHES "^$")
+ message(SEND_ERROR "Test #5 failed")
+else()
+ message(STATUS "Test #5 passed")
+endif()
+
+if("" MATCHES "^$")
+ message(STATUS "Test #6 passed")
+else()
+ message(SEND_ERROR "Test #6 failed")
+endif()
diff --git a/Tests/RunCMake/if/IncompleteMatchesFail-result.txt b/Tests/RunCMake/if/IncompleteMatchesFail-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/if/IncompleteMatchesFail-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/if/IncompleteMatchesFail-stderr.txt b/Tests/RunCMake/if/IncompleteMatchesFail-stderr.txt
new file mode 100644
index 0000000..6e8ac80
--- /dev/null
+++ b/Tests/RunCMake/if/IncompleteMatchesFail-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at IncompleteMatchesFail\.cmake:1 \(if\):
+ if given arguments:
+
+ "LHS" "MATCHES"
+
+ Unknown arguments specified
diff --git a/Tests/RunCMake/if/IncompleteMatchesFail.cmake b/Tests/RunCMake/if/IncompleteMatchesFail.cmake
new file mode 100644
index 0000000..a3ef2b8
--- /dev/null
+++ b/Tests/RunCMake/if/IncompleteMatchesFail.cmake
@@ -0,0 +1,2 @@
+if(LHS MATCHES)
+endif()
diff --git a/Tests/RunCMake/if/RunCMakeTest.cmake b/Tests/RunCMake/if/RunCMakeTest.cmake
index f54edf7..6baa840 100644
--- a/Tests/RunCMake/if/RunCMakeTest.cmake
+++ b/Tests/RunCMake/if/RunCMakeTest.cmake
@@ -9,7 +9,11 @@ run_cmake(duplicate-else-after-elseif)
run_cmake(elseif-message)
run_cmake(misplaced-elseif)
+run_cmake(unbalanced-parenthesis)
+
run_cmake(MatchesSelf)
+run_cmake(IncompleteMatches)
+run_cmake(IncompleteMatchesFail)
run_cmake(TestNameThatExists)
run_cmake(TestNameThatDoesNotExist)
diff --git a/Tests/RunCMake/if/unbalanced-parenthesis-result.txt b/Tests/RunCMake/if/unbalanced-parenthesis-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/if/unbalanced-parenthesis-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt b/Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt
new file mode 100644
index 0000000..770ccb8
--- /dev/null
+++ b/Tests/RunCMake/if/unbalanced-parenthesis-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at unbalanced-parenthesis\.cmake:[0-9]+ \(if\):
+ if given arguments:
+
+ "NOT" "\(" "IN_LIST" "some_list"
+
+ mismatched parenthesis in condition
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/if/unbalanced-parenthesis.cmake b/Tests/RunCMake/if/unbalanced-parenthesis.cmake
new file mode 100644
index 0000000..c51c755
--- /dev/null
+++ b/Tests/RunCMake/if/unbalanced-parenthesis.cmake
@@ -0,0 +1,8 @@
+set(var_with_paren "(")
+set(some_list "")
+
+if(NOT ${var_with_paren} IN_LIST some_list)
+ message(STATUS "Never prints")
+else()
+ message(STATUS "Never prints")
+endif()
diff --git a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake
index 7ed0773..cb0eb18 100644
--- a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake
@@ -8,4 +8,5 @@ run_cmake(CustomConfig)
if(RunCMake_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])")
run_cmake(SkipGetTargetFrameworkProperties)
+ run_cmake(VSCSharpReference)
endif()
diff --git a/Tests/RunCMake/include_external_msproject/VSCSharpReference-check.cmake b/Tests/RunCMake/include_external_msproject/VSCSharpReference-check.cmake
new file mode 100644
index 0000000..71b8c1f
--- /dev/null
+++ b/Tests/RunCMake/include_external_msproject/VSCSharpReference-check.cmake
@@ -0,0 +1,36 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/internal.vcxproj" all_build)
+
+string(REGEX MATCH
+ "<ProjectReference.Include=.external.csproj.>.*</ProjectReference>"
+ ProjectReference
+ ${all_build}
+)
+
+if(ProjectReference STREQUAL "")
+ set(RunCMake_TEST_FAILED "${test} is being set unexpectedly.")
+else()
+ string(REGEX MATCH
+ "<ReferenceOutputAssembly>.*</ReferenceOutputAssembly>"
+ ReferenceOutputAssembly
+ ${ProjectReference}
+ )
+
+ if(NOT ReferenceOutputAssembly STREQUAL "")
+ string(REPLACE
+ "<ReferenceOutputAssembly>"
+ ""
+ ReferenceOutputAssemblyValue
+ ${ReferenceOutputAssembly}
+ )
+ string(REPLACE
+ "</ReferenceOutputAssembly>"
+ ""
+ ReferenceOutputAssemblyValue
+ ${ReferenceOutputAssemblyValue}
+ )
+
+ if(ReferenceOutputAssemblyValue MATCHES "[Fa][Ll][Ss][Ee]")
+ set(RunCMake_TEST_FAILED "Referenced C# project with ReferenceOutputAssembly set to false.")
+ endif()
+ endif()
+endif()
diff --git a/Tests/RunCMake/include_external_msproject/VSCSharpReference.cmake b/Tests/RunCMake/include_external_msproject/VSCSharpReference.cmake
new file mode 100644
index 0000000..6229e61
--- /dev/null
+++ b/Tests/RunCMake/include_external_msproject/VSCSharpReference.cmake
@@ -0,0 +1,10 @@
+project(VSCSharpReference)
+
+include_external_msproject(external external.csproj)
+
+add_executable(internal
+ main.cpp
+)
+add_dependencies(internal
+ external
+)
diff --git a/Tests/RunCMake/install/CMP0087-OLD-stderr.txt b/Tests/RunCMake/install/CMP0087-OLD-stderr.txt
new file mode 100644
index 0000000..5233ebc
--- /dev/null
+++ b/Tests/RunCMake/install/CMP0087-OLD-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Deprecation Warning at CMP0087-OLD/CMakeLists.txt:5 \(cmake_policy\):
+ The OLD behavior for policy CMP0087 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.$
diff --git a/Tests/RunCMake/install/FILES-directory-result.txt b/Tests/RunCMake/install/FILES-directory-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/FILES-directory-stderr.txt b/Tests/RunCMake/install/FILES-directory-stderr.txt
new file mode 100644
index 0000000..4699037
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-directory-stderr.txt
@@ -0,0 +1 @@
+install FILES given directory
diff --git a/Tests/RunCMake/install/FILES-directory.cmake b/Tests/RunCMake/install/FILES-directory.cmake
new file mode 100644
index 0000000..1199cf7
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-directory.cmake
@@ -0,0 +1,7 @@
+set(dst "${CMAKE_CURRENT_BINARY_DIR}/dst")
+set(src "${CMAKE_CURRENT_BINARY_DIR}/src")
+
+file(MAKE_DIRECTORY "${dst}")
+file(MAKE_DIRECTORY "${src}")
+
+install(FILES "${src}" DESTINATION "${dst}")
diff --git a/Tests/RunCMake/install/FILES-symlink-to-directory.cmake b/Tests/RunCMake/install/FILES-symlink-to-directory.cmake
new file mode 100644
index 0000000..ed76470
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-symlink-to-directory.cmake
@@ -0,0 +1,9 @@
+set(dst "${CMAKE_CURRENT_BINARY_DIR}/dst")
+set(src "${CMAKE_CURRENT_BINARY_DIR}/src")
+set(lnk "${CMAKE_CURRENT_BINARY_DIR}/lnk")
+
+file(MAKE_DIRECTORY "${dst}")
+file(MAKE_DIRECTORY "${src}")
+file(CREATE_LINK "${src}" "${lnk}" SYMBOLIC)
+
+install(FILES "${lnk}" DESTINATION "${dst}")
diff --git a/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported-result.txt b/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt b/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt
new file mode 100644
index 0000000..7ae6606
--- /dev/null
+++ b/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported\.cmake:[0-9]+ \(install\):
+ install IMPORTED_RUNTIME_ARTIFACTS RUNTIME_DEPENDENCY_SET is not supported
+ on system "[^
+]*"
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported.cmake b/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported.cmake
new file mode 100644
index 0000000..04f1995
--- /dev/null
+++ b/Tests/RunCMake/install/IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported.cmake
@@ -0,0 +1,2 @@
+add_executable(exe IMPORTED)
+install(IMPORTED_RUNTIME_ARTIFACTS exe RUNTIME_DEPENDENCY_SET deps)
diff --git a/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported-result.txt b/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt b/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt
new file mode 100644
index 0000000..cab309b
--- /dev/null
+++ b/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at RUNTIME_DEPENDENCY_SET-unsupported\.cmake:[0-9]+ \(install\):
+ install RUNTIME_DEPENDENCY_SET is not supported on system "[^
+]*"
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported.cmake b/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported.cmake
new file mode 100644
index 0000000..60772a0
--- /dev/null
+++ b/Tests/RunCMake/install/RUNTIME_DEPENDENCY_SET-unsupported.cmake
@@ -0,0 +1 @@
+install(RUNTIME_DEPENDENCY_SET deps)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index efd03df..f79a3ea 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -44,7 +44,7 @@ function(check_installed expect)
do not match what we expected:
${expect}
in directory:
- ${CMAKE_INSTALL_PREFIX}" PARENT_SCOPE)
+ ${CMAKE_INSTALL_PREFIX}\n" PARENT_SCOPE)
endif()
endfunction()
@@ -55,9 +55,9 @@ function(run_cmake_EDIT_RPATH_only case)
else()
# Sanity check against a platform known to be ELF-based
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- message(FATAL_ERROR "Expected platform Linux to advertize itself as ELF-based, but it did not.")
+ message(FATAL_ERROR "Expected platform Linux to advertise itself as ELF-based, but it did not.")
elseif(CMAKE_SYSTEM_NAME STREQUAL "AIX")
- message(FATAL_ERROR "Expected platform AIX to advertize itself as XCOFF-based, but it did not.")
+ message(FATAL_ERROR "Expected platform AIX to advertise itself as XCOFF-based, but it did not.")
else()
message(STATUS "${case} - SKIPPED (No ELF-based platform found)")
endif()
@@ -93,6 +93,10 @@ run_cmake(TARGETS-NAMELINK_COMPONENT-bad-all)
run_cmake(TARGETS-NAMELINK_COMPONENT-bad-exc)
run_cmake(FILES-DESTINATION-TYPE)
run_cmake(DIRECTORY-DESTINATION-TYPE)
+run_cmake(FILES-directory)
+if(NOT WIN32)
+ run_cmake(FILES-symlink-to-directory)
+endif()
set(RunCMake_TEST_OPTIONS "-DCMAKE_BUILD_TYPE:STRING=Debug")
run_install_test(FILES-RENAME)
@@ -170,8 +174,29 @@ run_install_test(FILES-PERMISSIONS)
run_install_test(TARGETS-RPATH)
run_install_test(InstallRequiredSystemLibraries)
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ run_cmake(TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle)
+ run_cmake(TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework)
+endif()
+
+if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$")
+ run_install_test(TARGETS-RUNTIME_DEPENDENCIES-nodep)
+ run_install_test(TARGETS-RUNTIME_DEPENDENCIES-empty)
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME:STRING=${CMAKE_SYSTEM_NAME}")
+ run_cmake(TARGETS-RUNTIME_DEPENDENCIES-cross)
+ unset(RunCMake_TEST_OPTIONS)
+ run_cmake(TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict)
+ run_cmake(RuntimeDependencies-COMPONENTS)
+else()
+ run_cmake(TARGETS-RUNTIME_DEPENDENCIES-unsupported)
+ run_cmake(TARGETS-RUNTIME_DEPENDENCY_SET-unsupported)
+ run_cmake(IMPORTED_RUNTIME_ARTIFACTS-RUNTIME_DEPENDENCY_SET-unsupported)
+ run_cmake(RUNTIME_DEPENDENCY_SET-unsupported)
+endif()
+
set(run_install_test_components 1)
run_install_test(FILES-EXCLUDE_FROM_ALL)
run_install_test(TARGETS-EXCLUDE_FROM_ALL)
run_install_test(TARGETS-NAMELINK_COMPONENT)
run_install_test(SCRIPT-COMPONENT)
+run_install_test(SCRIPT-ALL_COMPONENTS)
diff --git a/Tests/RunCMake/install/RuntimeDependencies-COMPONENTS.cmake b/Tests/RunCMake/install/RuntimeDependencies-COMPONENTS.cmake
new file mode 100644
index 0000000..4727de3
--- /dev/null
+++ b/Tests/RunCMake/install/RuntimeDependencies-COMPONENTS.cmake
@@ -0,0 +1,39 @@
+enable_language(C)
+
+function(check_components value)
+ get_cmake_property(comp COMPONENTS)
+ if(NOT comp STREQUAL value)
+ message(FATAL_ERROR "Expected value of COMPONENTS:\n ${value}\nActual value of COMPONENTS:\n ${comp}")
+ endif()
+endfunction()
+
+if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ add_library(tgt MODULE obj1.c)
+else()
+ add_executable(tgt main.c)
+endif()
+
+install(TARGETS tgt
+ RUNTIME_DEPENDENCIES
+ RUNTIME DESTINATION bin COMPONENT bin1
+ LIBRARY DESTINATION lib COMPONENT lib1
+ FRAMEWORK DESTINATION fw COMPONENT fw1
+ )
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ check_components("bin1;fw1;lib1")
+else()
+ check_components("bin1;lib1")
+endif()
+
+install(RUNTIME_DEPENDENCY_SET deps
+ RUNTIME DESTINATION bin COMPONENT bin2
+ LIBRARY DESTINATION lib COMPONENT lib2
+ FRAMEWORK DESTINATION fw COMPONENT fw2
+ )
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ check_components("bin1;fw1;fw2;lib1;lib2")
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ check_components("bin1;bin2;lib1")
+elseif()
+ check_components("bin1;lib1;lib2")
+endif()
diff --git a/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-all-check.cmake b/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-all-check.cmake
new file mode 100644
index 0000000..48d8e1a
--- /dev/null
+++ b/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-all-check.cmake
@@ -0,0 +1 @@
+check_installed([[^empty1.txt;empty2.txt$]])
diff --git a/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-dev-check.cmake b/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-dev-check.cmake
new file mode 100644
index 0000000..48d8e1a
--- /dev/null
+++ b/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-dev-check.cmake
@@ -0,0 +1 @@
+check_installed([[^empty1.txt;empty2.txt$]])
diff --git a/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-uns-check.cmake b/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-uns-check.cmake
new file mode 100644
index 0000000..48d8e1a
--- /dev/null
+++ b/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS-uns-check.cmake
@@ -0,0 +1 @@
+check_installed([[^empty1.txt;empty2.txt$]])
diff --git a/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS.cmake b/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS.cmake
new file mode 100644
index 0000000..aa3f9d1
--- /dev/null
+++ b/Tests/RunCMake/install/SCRIPT-ALL_COMPONENTS.cmake
@@ -0,0 +1,5 @@
+install(
+ SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/install_script.cmake"
+ CODE "write_empty_file(empty2.txt)"
+ ALL_COMPONENTS
+ )
diff --git a/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake b/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake
index 4a55cd6..d099469 100644
--- a/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake
+++ b/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake
@@ -13,6 +13,21 @@ if(WIN32)
[[mylib/(lib)?lib1\.(dll\.a|lib)]]
[[mylib/(lib)?lib2\.(a|lib)]]
)
+elseif(MSYS)
+ set(_check_files
+ [[lib3]]
+ [[lib3/liblib3\.dll\.a]]
+ [[lib4]]
+ [[lib4/msys-lib4\.dll]]
+ [[mybin]]
+ [[mybin/exe\.exe]]
+ [[mybin/msys-lib1\.dll]]
+ [[myinclude]]
+ [[myinclude/obj3\.h]]
+ [[mylib]]
+ [[mylib/liblib1\.dll\.a]]
+ [[mylib/liblib2\.a]]
+ )
elseif(CYGWIN)
set(_check_files
[[lib3]]
diff --git a/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake b/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake
index 30f2266..6e13b84 100644
--- a/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake
+++ b/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake
@@ -15,6 +15,23 @@ if(WIN32)
[[lib4]]
[[lib4/(lib)?lib4\.dll]]
)
+elseif(MSYS)
+ set(_check_files
+ [[bin]]
+ [[bin/exe\.exe]]
+ [[bin/msys-lib1\.dll]]
+ [[include]]
+ [[include/obj1\.h]]
+ [[include/obj2\.h]]
+ [[include/obj3\.h]]
+ [[lib]]
+ [[lib/liblib1\.dll\.a]]
+ [[lib/liblib2\.a]]
+ [[lib3]]
+ [[lib3/liblib3\.dll\.a]]
+ [[lib4]]
+ [[lib4/msys-lib4\.dll]]
+ )
elseif(CYGWIN)
set(_check_files
[[bin]]
diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-all-check.cmake b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-all-check.cmake
index bc9ebd1..e602af9 100644
--- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-all-check.cmake
+++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-all-check.cmake
@@ -8,6 +8,16 @@ if(WIN32)
[[lib/(lib)?namelink-uns-dev\.dll]]
[[lib/(lib)?namelink-uns\.dll]]
)
+elseif(MSYS)
+ set(_check_files
+ [[lib]]
+ [[lib/msys-namelink-none\.dll]]
+ [[lib/msys-namelink-same-1\.dll]]
+ [[lib/msys-namelink-sep-1\.dll]]
+ [[lib/msys-namelink-skip-1\.dll]]
+ [[lib/msys-namelink-uns-1\.dll]]
+ [[lib/msys-namelink-uns-dev-1\.dll]]
+ )
elseif(CYGWIN)
set(_check_files
[[lib]]
diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-lib-check.cmake b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-lib-check.cmake
index 3f6be68..cd579eb 100644
--- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-lib-check.cmake
+++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-lib-check.cmake
@@ -6,6 +6,14 @@ if(WIN32)
[[lib/(lib)?namelink-sep\.dll]]
[[lib/(lib)?namelink-skip\.dll]]
)
+elseif(MSYS)
+ set(_check_files
+ [[lib]]
+ [[lib/msys-namelink-none\.dll]]
+ [[lib/msys-namelink-same-1\.dll]]
+ [[lib/msys-namelink-sep-1\.dll]]
+ [[lib/msys-namelink-skip-1\.dll]]
+ )
elseif(CYGWIN)
set(_check_files
[[lib]]
diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-uns-check.cmake b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-uns-check.cmake
index 0033c88..ea68f4a 100644
--- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-uns-check.cmake
+++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-uns-check.cmake
@@ -4,6 +4,12 @@ if(WIN32)
[[lib/(lib)?namelink-uns-dev\.dll]]
[[lib/(lib)?namelink-uns\.dll]]
)
+elseif(MSYS)
+ set(_check_files
+ [[lib]]
+ [[lib/msys-namelink-uns-1\.dll]]
+ [[lib/msys-namelink-uns-dev-1\.dll]]
+ )
elseif(CYGWIN)
set(_check_files
[[lib]]
diff --git a/Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake b/Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake
index 5daecc8..91d5ef0 100644
--- a/Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake
+++ b/Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake
@@ -4,6 +4,8 @@ if(WIN32)
set(test45 [[bin/test4\.dll;bin/test4\.lib;bin/test5ar\.lib]])
check_installed("^bin;(${libtest45};${test123})|(${test123};${test45})\$")
+elseif(MSYS)
+ check_installed([[^bin;bin/libtest4\.dll\.a;bin/libtest5ar\.a;bin/msys-test4\.dll;bin/test1out\.exe;bin/test2deb\.exe;bin/test3exc\.exe$]])
elseif(CYGWIN)
check_installed([[^bin;bin/cygtest4\.dll;bin/libtest4\.dll\.a;bin/libtest5ar\.a;bin/test1out\.exe;bin/test2deb\.exe;bin/test3exc\.exe$]])
elseif(APPLE)
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross-result.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross-stderr.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross-stderr.txt
new file mode 100644
index 0000000..b7bbb55
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at TARGETS-RUNTIME_DEPENDENCIES-cross\.cmake:[0-9]+ \(install\):
+ install TARGETS RUNTIME_DEPENDENCIES is not supported when cross-compiling\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross.cmake
new file mode 100644
index 0000000..36b2eb7
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-cross.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+
+add_executable(exe main.c)
+install(TARGETS exe RUNTIME_DEPENDENCIES)
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty-all-check.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty-all-check.cmake
new file mode 100644
index 0000000..dafc2a4
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty-all-check.cmake
@@ -0,0 +1 @@
+check_installed([[^static;static/(liblib\.a|lib\.lib)$]])
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty.cmake
new file mode 100644
index 0000000..e46e1d9
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty.cmake
@@ -0,0 +1,9 @@
+enable_language(C)
+
+add_library(lib STATIC obj1.c)
+
+install(TARGETS lib RUNTIME_DEPENDENCIES
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION static
+ FRAMEWORK DESTINATION fw
+ )
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework-result.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework-stderr.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework-stderr.txt
new file mode 100644
index 0000000..6ab14f6
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework\.cmake:[0-9]+ \(install\):
+ install TARGETS RUNTIME_DEPENDENCIES given no FRAMEWORK DESTINATION
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework.cmake
new file mode 100644
index 0000000..36b2eb7
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-no-framework.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+
+add_executable(exe main.c)
+install(TARGETS exe RUNTIME_DEPENDENCIES)
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle-result.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle-stderr.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle-stderr.txt
new file mode 100644
index 0000000..c7b49c7
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle\.cmake:[0-9]+ \(install\):
+ install A runtime dependency set may only have one bundle executable\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle.cmake
new file mode 100644
index 0000000..a848a24
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-macos-two-bundle.cmake
@@ -0,0 +1,10 @@
+enable_language(C)
+
+add_executable(exe1 MACOSX_BUNDLE main.c)
+add_executable(exe2 MACOSX_BUNDLE main.c)
+
+install(TARGETS exe1 exe2
+ RUNTIME_DEPENDENCIES
+ BUNDLE DESTINATION bundles
+ FRAMEWORK DESTINATION fw
+ )
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-nodep-all-check.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-nodep-all-check.cmake
new file mode 100644
index 0000000..9f455b1
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-nodep-all-check.cmake
@@ -0,0 +1 @@
+check_installed([[^bin;bin/exe(\.exe)?$]])
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-nodep.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-nodep.cmake
new file mode 100644
index 0000000..02466561
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-nodep.cmake
@@ -0,0 +1,9 @@
+enable_language(C)
+
+add_executable(exe main.c)
+
+install(TARGETS exe
+ RUNTIME_DEPENDENCIES
+ PRE_EXCLUDE_REGEXES ".*"
+ FRAMEWORK DESTINATION fw
+ )
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported-result.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported-stderr.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported-stderr.txt
new file mode 100644
index 0000000..c098a4c
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at TARGETS-RUNTIME_DEPENDENCIES-unsupported\.cmake:[0-9]+ \(install\):
+ install TARGETS RUNTIME_DEPENDENCIES is not supported on system "[^
+]*"
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported.cmake
new file mode 100644
index 0000000..36b2eb7
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-unsupported.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+
+add_executable(exe main.c)
+install(TARGETS exe RUNTIME_DEPENDENCIES)
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict-result.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict-stderr.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict-stderr.txt
new file mode 100644
index 0000000..e2484ec
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict\.cmake:[0-9]+ \(install\):
+ install TARGETS cannot have both RUNTIME_DEPENDENCIES and
+ RUNTIME_DEPENDENCY_SET\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict.cmake
new file mode 100644
index 0000000..f373b3b
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-RUNTIME_DEPENDENCIES-conflict.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+
+add_executable(exe main.c)
+install(TARGETS exe
+ RUNTIME_DEPENDENCY_SET deps
+ RUNTIME_DEPENDENCIES
+ )
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported-result.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt
new file mode 100644
index 0000000..f660346
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at TARGETS-RUNTIME_DEPENDENCY_SET-unsupported\.cmake:[0-9]+ \(install\):
+ install TARGETS RUNTIME_DEPENDENCY_SET is not supported on system "[^
+]*"
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported.cmake
new file mode 100644
index 0000000..be0f507
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCY_SET-unsupported.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+
+add_executable(exe main.c)
+install(TARGETS exe RUNTIME_DEPENDENCY_SET deps)
diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake
index 0313ed1..1233838 100644
--- a/Tests/RunCMake/message/RunCMakeTest.cmake
+++ b/Tests/RunCMake/message/RunCMakeTest.cmake
@@ -1,5 +1,7 @@
include(RunCMake)
+run_cmake_script(newline)
+
run_cmake(defaultmessage)
run_cmake(nomessage)
run_cmake(message-internal-warning)
diff --git a/Tests/RunCMake/message/newline-script.cmake b/Tests/RunCMake/message/newline-script.cmake
new file mode 100644
index 0000000..e9e3d5d
--- /dev/null
+++ b/Tests/RunCMake/message/newline-script.cmake
@@ -0,0 +1,2 @@
+message(STATUS "one\ntwo")
+message("one\ntwo")
diff --git a/Tests/RunCMake/message/newline-stdout.txt b/Tests/RunCMake/message/newline-stdout.txt
new file mode 100644
index 0000000..beca44e
--- /dev/null
+++ b/Tests/RunCMake/message/newline-stdout.txt
@@ -0,0 +1,2 @@
+-- out='2d2d206f6e650a74776f0a'
+-- err='6f6e650a74776f0a'
diff --git a/Tests/RunCMake/message/newline.cmake b/Tests/RunCMake/message/newline.cmake
new file mode 100644
index 0000000..97afba4
--- /dev/null
+++ b/Tests/RunCMake/message/newline.cmake
@@ -0,0 +1,9 @@
+execute_process(
+ COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/newline-script.cmake"
+ OUTPUT_FILE newline-script-stdout.txt
+ ERROR_FILE newline-script-stderr.txt
+ )
+foreach(f out err)
+ file(READ newline-script-std${f}.txt hex HEX)
+ message(STATUS "${f}='${hex}'")
+endforeach()
diff --git a/Tests/RunCMake/option/CMP0077-OLD-stderr.txt b/Tests/RunCMake/option/CMP0077-OLD-stderr.txt
new file mode 100644
index 0000000..9d963cb
--- /dev/null
+++ b/Tests/RunCMake/option/CMP0077-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0077-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0077 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/project/ProjectIsTopLevel-stdout.txt b/Tests/RunCMake/project/ProjectIsTopLevel-stdout.txt
new file mode 100644
index 0000000..af8abfd
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectIsTopLevel-stdout.txt
@@ -0,0 +1,2 @@
+-- PROJECT_IS_TOP_LEVEL=ON
+-- ProjectIsTopLevel_IS_TOP_LEVEL=ON
diff --git a/Tests/RunCMake/project/ProjectIsTopLevel.cmake b/Tests/RunCMake/project/ProjectIsTopLevel.cmake
new file mode 100644
index 0000000..5a0af0a
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectIsTopLevel.cmake
@@ -0,0 +1,9 @@
+# no project() call, includer already calls project(${RunCMake_TEST} NONE)
+if(NOT DEFINED PROJECT_IS_TOP_LEVEL)
+ message(FATAL_ERROR "PROJECT_IS_TOP_LEVEL is not defined")
+endif()
+if(NOT DEFINED "CACHE{${RunCMake_TEST}_IS_TOP_LEVEL}")
+ message(FATAL_ERROR "IsTopLevel_IS_TOP_LEVEL is not defined")
+endif()
+message(STATUS "PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
+message(STATUS "${RunCMake_TEST}_IS_TOP_LEVEL=${${RunCMake_TEST}_IS_TOP_LEVEL}")
diff --git a/Tests/RunCMake/project/ProjectIsTopLevelMultiple-stdout.txt b/Tests/RunCMake/project/ProjectIsTopLevelMultiple-stdout.txt
new file mode 100644
index 0000000..75d787f
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectIsTopLevelMultiple-stdout.txt
@@ -0,0 +1,3 @@
+-- PROJECT_IS_TOP_LEVEL=ON
+-- ProjectIsTopLevelMultiple_IS_TOP_LEVEL=ON
+-- IsTopLevel_IS_TOP_LEVEL=ON
diff --git a/Tests/RunCMake/project/ProjectIsTopLevelMultiple.cmake b/Tests/RunCMake/project/ProjectIsTopLevelMultiple.cmake
new file mode 100644
index 0000000..98ba55b
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectIsTopLevelMultiple.cmake
@@ -0,0 +1,14 @@
+# only one project() call, includer already calls project(${RunCMake_TEST} NONE)
+project(IsTopLevel NONE)
+if(NOT DEFINED PROJECT_IS_TOP_LEVEL)
+ message(FATAL_ERROR "PROJECT_IS_TOP_LEVEL is not defined")
+endif()
+if(NOT DEFINED "CACHE{${RunCMake_TEST}_IS_TOP_LEVEL}")
+ message(FATAL_ERROR "${RunCMake_TEST}_IS_TOP_LEVEL is not defined")
+endif()
+if(NOT DEFINED CACHE{IsTopLevel_IS_TOP_LEVEL})
+ message(FATAL_ERROR "IsTopLevel_IS_TOP_LEVEL is not defined")
+endif()
+message(STATUS "PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
+message(STATUS "${RunCMake_TEST}_IS_TOP_LEVEL=${${RunCMake_TEST}_IS_TOP_LEVEL}")
+message(STATUS "IsTopLevel_IS_TOP_LEVEL=${IsTopLevel_IS_TOP_LEVEL}")
diff --git a/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory-stdout.txt b/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory-stdout.txt
new file mode 100644
index 0000000..d9e15ff
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory-stdout.txt
@@ -0,0 +1,6 @@
+-- PROJECT_IS_TOP_LEVEL=ON
+-- PROJECT_IS_TOP_LEVEL=ON
+-- PROJECT_IS_TOP_LEVEL=OFF
+-- PROJECT_IS_TOP_LEVEL=ON
+-- ProjectIsTopLevelSubdirectory_IS_TOP_LEVEL=ON
+-- NotTopLevel_IS_TOP_LEVEL=OFF
diff --git a/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake b/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake
new file mode 100644
index 0000000..b5df84b
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake
@@ -0,0 +1,8 @@
+# no project() call, includer already calls project(${RunCMake_TEST} NONE)
+message(STATUS "PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
+
+add_subdirectory(ProjectIsTopLevelSubdirectory)
+
+message(STATUS "PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
+message(STATUS "${RunCMake_TEST}_IS_TOP_LEVEL=${${RunCMake_TEST}_IS_TOP_LEVEL}")
+message(STATUS "NotTopLevel_IS_TOP_LEVEL=${NotTopLevel_IS_TOP_LEVEL}")
diff --git a/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory/CMakeLists.txt b/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory/CMakeLists.txt
new file mode 100644
index 0000000..d2f16ea
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory/CMakeLists.txt
@@ -0,0 +1,5 @@
+message(STATUS "PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
+
+project(NotTopLevel NONE)
+
+message(STATUS "PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake
index 6914699..349e8ac 100644
--- a/Tests/RunCMake/project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/project/RunCMakeTest.cmake
@@ -15,6 +15,9 @@ run_cmake(ProjectDescriptionNoArg2)
run_cmake(ProjectHomepage)
run_cmake(ProjectHomepage2)
run_cmake(ProjectHomepageNoArg)
+run_cmake(ProjectIsTopLevel)
+run_cmake(ProjectIsTopLevelMultiple)
+run_cmake(ProjectIsTopLevelSubdirectory)
run_cmake(ProjectTwice)
run_cmake(VersionAndLanguagesEmpty)
run_cmake(VersionEmpty)
diff --git a/Tests/RunCMake/string/Timestamp-stderr.txt b/Tests/RunCMake/string/Timestamp-stderr.txt
index cd4dcb3..d54777b 100644
--- a/Tests/RunCMake/string/Timestamp-stderr.txt
+++ b/Tests/RunCMake/string/Timestamp-stderr.txt
@@ -1 +1 @@
-RESULT=2005-08-07 23:19:49 Sunday=Sun August=Aug 05 day=219 wd=0 week=32 %I=11 epoch=1123456789
+RESULT=2005-08-07 23:19:49 Sunday=Sun August=Aug 05 day=219 wd=0 week=32 w_iso=31 %I=11 epoch=1123456789
diff --git a/Tests/RunCMake/string/Timestamp.cmake b/Tests/RunCMake/string/Timestamp.cmake
index cba258d..7fd6d72 100644
--- a/Tests/RunCMake/string/Timestamp.cmake
+++ b/Tests/RunCMake/string/Timestamp.cmake
@@ -1,3 +1,3 @@
set(ENV{SOURCE_DATE_EPOCH} "1123456789")
-string(TIMESTAMP RESULT "%Y-%m-%d %H:%M:%S %A=%a %B=%b %y day=%j wd=%w week=%U %%I=%I epoch=%s" UTC)
+string(TIMESTAMP RESULT "%Y-%m-%d %H:%M:%S %A=%a %B=%b %y day=%j wd=%w week=%U w_iso=%V %%I=%I epoch=%s" UTC)
message("RESULT=${RESULT}")
diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt
index 5b4761c..cf4c540 100644
--- a/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt
+++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt
@@ -1,4 +1,2 @@
-^CMake Error at cxx_not_enabled.cmake:[0-9]+ \(target_compile_features\):
- target_compile_features cannot use features from non-enabled language CXX
-Call Stack \(most recent call first\):
- CMakeLists\.txt:[0-9]+ \(include\)$
+^CMake Error:.*CMake can not determine linker language for target: main.*
+CMake Generate step failed. Build files cannot be regenerated correctly.$
diff --git a/Tests/RunCMake/target_compile_options/Order-build-stdout.txt b/Tests/RunCMake/target_compile_options/Order-build-stdout.txt
new file mode 100644
index 0000000..c210ff2
--- /dev/null
+++ b/Tests/RunCMake/target_compile_options/Order-build-stdout.txt
@@ -0,0 +1,3 @@
+-w +-O +-O0 [^
+]*-O1 +-O2 +-O3 [^
+]*CMakeFiles[\/]order\.dir[\/](Custom[\/])?order\.c\.o
diff --git a/Tests/RunCMake/target_compile_options/Order.cmake b/Tests/RunCMake/target_compile_options/Order.cmake
new file mode 100644
index 0000000..3d59b16
--- /dev/null
+++ b/Tests/RunCMake/target_compile_options/Order.cmake
@@ -0,0 +1,19 @@
+get_property (isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if(isMultiConfig)
+ set(CMAKE_CONFIGURATION_TYPES "Custom" CACHE STRING "" FORCE)
+else()
+ set(CMAKE_BUILD_TYPE "Custom" CACHE STRING "" FORCE)
+endif()
+enable_language(C)
+
+string(APPEND CMAKE_C_FLAGS " -w -O")
+set(CMAKE_C_FLAGS_CUSTOM "-O0")
+
+add_executable(order order.c)
+set_property(TARGET order APPEND PROPERTY COMPILE_OPTIONS -O1)
+
+add_library(iface INTERFACE)
+set_property(TARGET iface APPEND PROPERTY INTERFACE_COMPILE_OPTIONS -O2)
+target_link_libraries(order PRIVATE iface)
+
+set_property(SOURCE order.c PROPERTY COMPILE_OPTIONS -O3)
diff --git a/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
index 9f51a9a..806ae79 100644
--- a/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
@@ -19,3 +19,16 @@ if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
run_cmake_target(CMP0101-BEFORE_keyword OLD CMP0101_OLD)
run_cmake_target(CMP0101-BEFORE_keyword NEW CMP0101_NEW)
endif()
+
+function(run_Order)
+ run_cmake_with_options(Order)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Order-build)
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
+ run_cmake_command(Order-build ${CMAKE_COMMAND} --build . --verbose --config Custom)
+endfunction()
+if(RunCMake_GENERATOR MATCHES "Ninja|Make" AND
+ CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$" AND
+ NOT CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
+ run_Order()
+endif()
diff --git a/Tests/RunCMake/target_compile_options/order.c b/Tests/RunCMake/target_compile_options/order.c
new file mode 100644
index 0000000..1bd81ea
--- /dev/null
+++ b/Tests/RunCMake/target_compile_options/order.c
@@ -0,0 +1,7 @@
+#ifndef __OPTIMIZE__
+# error "Optimizations not enabled!"
+#endif
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt
new file mode 100644
index 0000000..c664505
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0079-iface-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0079 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt
index 0b4c4c6..14f4789 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt
+++ b/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt
@@ -1,4 +1,15 @@
-^CMake Error at CMP0079-link/CMakeLists.txt:[0-9]+ \(target_link_libraries\):
+^CMake Deprecation Warning at CMP0079-link-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0079 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
++
+CMake Error at CMP0079-link/CMakeLists.txt:[0-9]+ \(target_link_libraries\):
Attempt to add link library "foo" to target "top" which is not built in
this directory.
diff --git a/Tests/RunCMake/while/RunCMakeTest.cmake b/Tests/RunCMake/while/RunCMakeTest.cmake
index 7da80ac..bb9b991 100644
--- a/Tests/RunCMake/while/RunCMakeTest.cmake
+++ b/Tests/RunCMake/while/RunCMakeTest.cmake
@@ -5,3 +5,5 @@ run_cmake(EndMissing)
run_cmake(EndMismatch)
run_cmake(EndAlone)
run_cmake(EndAloneArgs)
+
+run_cmake(unbalanced-parenthesis)
diff --git a/Tests/RunCMake/while/unbalanced-parenthesis-result.txt b/Tests/RunCMake/while/unbalanced-parenthesis-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/while/unbalanced-parenthesis-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/while/unbalanced-parenthesis-stderr.txt b/Tests/RunCMake/while/unbalanced-parenthesis-stderr.txt
new file mode 100644
index 0000000..9d4132c
--- /dev/null
+++ b/Tests/RunCMake/while/unbalanced-parenthesis-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at unbalanced-parenthesis.cmake:[0-9]+ \(while\):
+ had incorrect arguments:
+
+ "NOT" "\(" "IN_LIST" "some_list"
+
+ mismatched parenthesis in condition
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/while/unbalanced-parenthesis.cmake b/Tests/RunCMake/while/unbalanced-parenthesis.cmake
new file mode 100644
index 0000000..7a12701
--- /dev/null
+++ b/Tests/RunCMake/while/unbalanced-parenthesis.cmake
@@ -0,0 +1,8 @@
+set(var_with_paren "(")
+set(some_list "")
+
+while(NOT ${var_with_paren} IN_LIST some_list)
+ message(STATUS "Never prints")
+endwhile()
+
+message(STATUS "Never prints")