summaryrefslogtreecommitdiff
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/Android/RunCMakeTest.cmake86
-rw-r--r--Tests/RunCMake/Android/common.cmake2
-rw-r--r--Tests/RunCMake/Android/ndk-arm64-v8a-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-armeabi-arm-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-armeabi-thumb-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-armeabi-v7a-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-x86-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-x86_64-stderr.txt7
-rw-r--r--Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake18
-rw-r--r--Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake1
-rwxr-xr-xTests/RunCMake/BundleUtilities/test.app/script3
-rwxr-xr-xTests/RunCMake/BundleUtilities/test.app/script.bat3
-rwxr-xr-xTests/RunCMake/BundleUtilities/test.app/script.sh3
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt7
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt7
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake1
-rw-r--r--Tests/RunCMake/CMP0026/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0027/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0028/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0037/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0041/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0042/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0043/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0045/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-Common.cmake9
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt (renamed from Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt7
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt29
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-WARN.cmake1
-rw-r--r--Tests/RunCMake/CMP0111/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0111/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMP0111/main.cpp3
-rw-r--r--Tests/RunCMake/CMakeLists.txt63
-rw-r--r--Tests/RunCMake/CMakePresets/ArchToolsetStrategyDefault-result.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/ArchToolsetStrategyDefault-stderr.txt11
-rw-r--r--Tests/RunCMake/CMakePresets/ArchToolsetStrategyIgnore.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/ArchToolsetStrategyNone-result.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/ArchToolsetStrategyNone-stderr.txt11
-rw-r--r--Tests/RunCMake/CMakePresets/CMakeLists.txt.in4
-rw-r--r--Tests/RunCMake/CMakePresets/CMakePresets.json.in504
-rw-r--r--Tests/RunCMake/CMakePresets/CacheOverride.cmake2
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance0-result.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance0.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance1-result.txt (renamed from Tests/RunCMake/interface_library/add_custom_command-TARGET-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance1.json.in21
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance2-result.txt (renamed from Tests/RunCMake/interface_library/global-interface-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance2.json.in29
-rw-r--r--Tests/RunCMake/CMakePresets/Debug-stderr.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/Debug-stdout.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/Debug.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/Debug.json.in19
-rw-r--r--Tests/RunCMake/CMakePresets/DebugBase.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/DisableWarningFlags.cmake1
-rw-r--r--Tests/RunCMake/CMakePresets/DocumentationExample.cmake5
-rw-r--r--Tests/RunCMake/CMakePresets/DuplicatePresets-result.txt (renamed from Tests/RunCMake/interface_library/invalid_name-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/DuplicatePresets.json.in15
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyCacheKey-result.txt (renamed from Tests/RunCMake/interface_library/invalid_signature-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyCacheKey.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnv-result.txt (renamed from Tests/RunCMake/interface_library/target_commands-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnv.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnvKey-result.txt (renamed from Tests/RunCMake/interface_library/whitelist-result.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnvKey.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPenv-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPenv.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPresetName-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPresetName.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/EnvCycle-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/EnvCycle.json.in14
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorDeprecated-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorDeprecated-stderr.txt7
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorDeprecated.cmake1
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorDev-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorDev-stderr.txt8
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorDev.cmake1
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated.json.in16
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDev-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDev.json.in16
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraPresetField-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraPresetField.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraRootField-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraRootField.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraVariableField-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraVariableField.json.in16
-rw-r--r--Tests/RunCMake/CMakePresets/Good-stdout.txt53
-rw-r--r--Tests/RunCMake/CMakePresets/Good.cmake52
-rw-r--r--Tests/RunCMake/CMakePresets/GoodBOM.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/GoodBOM.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/GoodBinaryCmdLine.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/GoodBinaryRelative.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodBinaryUp.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/GoodGeneratorCmdLine.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInheritanceChild.cmake6
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInheritanceMacro.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInheritanceMulti.cmake10
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInheritanceMultiSecond.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInheritanceOverride.cmake18
-rw-r--r--Tests/RunCMake/CMakePresets/GoodInheritanceParent.cmake6
-rw-r--r--Tests/RunCMake/CMakePresets/GoodNoArgs.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/GoodNoS.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodNoSCache.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/GoodNoSCachePrep.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/GoodNoSourceArg.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/GoodSpaces.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/GoodUserFromMain.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/GoodUserFromMain.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/GoodUserFromMainUser.json.in4
-rw-r--r--Tests/RunCMake/CMakePresets/GoodUserFromUser.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/GoodUserFromUser.json.in4
-rw-r--r--Tests/RunCMake/CMakePresets/GoodUserFromUserUser.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/GoodUserOnly.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/GoodUserOnlyUser.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/GoodWindowsBackslash.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/HighVersion-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/HighVersion-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/HighVersion.json.in4
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidGenerator-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidGenerator-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidGeneratorCmdLine-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidGeneratorCmdLine-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidInheritance-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidInheritance.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetGenerator-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetGenerator.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetName-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetName.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetVendor-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetVendor.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresets-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresets.json.in4
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRoot-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRoot.json.in1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidToolsetStrategy.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariableValue-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariableValue.json.in15
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariables-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariables.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVendor-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVendor.json.in5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVersion-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVersion.json.in4
-rw-r--r--Tests/RunCMake/CMakePresets/JSONParseError-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/JSONParseError.json.in0
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresets-stdout.txt6
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresets.json.in36
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsHidden-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsHidden-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt6
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt6
-rw-r--r--Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt6
-rw-r--r--Tests/RunCMake/CMakePresets/LowVersion-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/LowVersion-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/LowVersion.json.in4
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredEmpty.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredEmpty.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredInvalid.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMajor-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMajor.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMinor-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMinor.json.in14
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredPatch-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredPatch.json.in15
-rw-r--r--Tests/RunCMake/CMakePresets/NoCMakePresets-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoDebug-stdout.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoDebug.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetArgument-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetArgument-stderr.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetBinaryDir-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetBinaryDir.json.in9
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetGenerator-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetGenerator.json.in9
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetName-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetName.json.in9
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresets-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresets-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresets-stdout.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresets.json.in3
-rw-r--r--Tests/RunCMake/CMakePresets/NoSuchMacro-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoSuchMacro.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/NoSuchPreset-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoSuchPreset-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoVariableValue-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoVariableValue.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/NoVersion-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/NoVersion-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/NoVersion.json.in3
-rw-r--r--Tests/RunCMake/CMakePresets/NoWarningFlags-stderr.txt23
-rw-r--r--Tests/RunCMake/CMakePresets/NoWarningFlags.cmake1
-rw-r--r--Tests/RunCMake/CMakePresets/PresetNotObject-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/PresetNotObject.json.in6
-rw-r--r--Tests/RunCMake/CMakePresets/RunCMakeTest.cmake272
-rw-r--r--Tests/RunCMake/CMakePresets/TestVariable.cmake25
-rw-r--r--Tests/RunCMake/CMakePresets/UnclosedMacro-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/UnclosedMacro.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownToolsetStrategy.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/UseHiddenPreset-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/UseHiddenPreset-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateCross-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateCross.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateCrossUser.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateInUser-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateInUserUser.json.in15
-rw-r--r--Tests/RunCMake/CMakePresets/UserInheritance-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/UserInheritance.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/UserInheritanceUser.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/VariableNotObject-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/VariableNotObject.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/VendorMacro-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/VendorMacro-stderr.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioGeneratorArch-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioGeneratorArch-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioInheritanceChild.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioInheritanceMulti.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioInheritanceMultiSecond.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioInheritanceOverride.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioInheritanceParent.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioToolset.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioToolsetOverride.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioWin32.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioWin32Override.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/VisualStudioWin64.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/WarningFlags-stderr.txt34
-rw-r--r--Tests/RunCMake/CMakePresets/WarningFlags.cmake1
-rw-r--r--Tests/RunCMake/CMakePresets/Warnings.json.in50
-rw-r--r--Tests/RunCMake/CMakePresets/WarningsBase.cmake3
-rw-r--r--Tests/RunCMake/CMakePresets/check.cmake15
-rw-r--r--Tests/RunCMake/CMakePresets/main.c4
-rw-r--r--Tests/RunCMake/CMakePresets/validate_schema.py17
-rw-r--r--Tests/RunCMake/CPack/DragNDrop/Accept.txt1
-rw-r--r--Tests/RunCMake/CPack/DragNDrop/Helpers.cmake1
-rw-r--r--Tests/RunCMake/CPack/DragNDrop/packaging_MONOLITHIC_default.cmake2
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf7
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/English.menu.txt9
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/ExpectedFiles.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt3
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt9
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/VerifyResult.cmake33
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/test.cmake3
-rw-r--r--Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake8
-rw-r--r--Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt10
-rw-r--r--Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake1
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ExpectedFiles.cmake19
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_COMPONENT-stdout.txt4
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_MONOLITHIC-stdout.txt4
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre.cmake1
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/test.cmake9
-rw-r--r--Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake2
-rw-r--r--Tests/RunCMake/CTest/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CTest/RunCMakeTest.cmake20
-rw-r--r--Tests/RunCMake/CTest/SingleConfig-test-stdout.txt8
-rw-r--r--Tests/RunCMake/CTest/SingleConfig.cmake6
-rw-r--r--Tests/RunCMake/CTest/TestfileErrors-Script.cmake4
-rw-r--r--Tests/RunCMake/CTest/TestfileErrors-test-result.txt1
-rw-r--r--Tests/RunCMake/CTest/TestfileErrors-test-stderr.txt11
-rw-r--r--Tests/RunCMake/CTest/TestfileErrors.cmake3
-rw-r--r--Tests/RunCMake/CTestCommandLine/BadCTestTestfile-result.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestOutputSize-stderr.txt1
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake22
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake13
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake15
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake14
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckISPCCompilerFlag.cmake13
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake12
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake12
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage-result.txt1
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage-stderr.txt2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage.cmake3
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage-result.txt1
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage-stderr.txt2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage.cmake3
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake24
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckCUDALinkerFlag.cmake3
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CheckModules/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake13
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake27
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake26
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake14
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckISPCSourceCompiles.cmake20
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake14
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake17
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage-result.txt1
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage-stderr.txt2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage.cmake3
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage-result.txt1
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage-stderr.txt2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage.cmake3
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake25
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt1
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt11
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake5
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake13
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake21
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake20
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake14
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake14
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake17
-rw-r--r--Tests/RunCMake/CheckSourceRuns/NonExistentLanguage-result.txt1
-rw-r--r--Tests/RunCMake/CheckSourceRuns/NonExistentLanguage-stderr.txt2
-rw-r--r--Tests/RunCMake/CheckSourceRuns/NonExistentLanguage.cmake3
-rw-r--r--Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage-result.txt1
-rw-r--r--Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage-stderr.txt2
-rw-r--r--Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage.cmake3
-rw-r--r--Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake21
-rw-r--r--Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt1
-rw-r--r--Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt24
-rw-r--r--Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake7
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt22
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt21
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake73
-rw-r--r--Tests/RunCMake/CommandLine/dir-permissions-install-options-to-vars/cmake_install.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-result.txt (renamed from Tests/RunCMake/interface_library/genex_link-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-all-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-all-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-none-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-none-stderr.txt1
-rwxr-xr-xTests/RunCMake/CommandLine/trace-json-v1-check.py2
-rw-r--r--Tests/RunCMake/CompatibleInterface/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompatibleInterface/DebugProperties.cmake2
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake2
-rw-r--r--Tests/RunCMake/CompilerArgs/C.cmake3
-rw-r--r--Tests/RunCMake/CompilerArgs/CMakeLists.txt (renamed from Tests/RunCMake/interface_library/CMakeLists.txt)2
-rw-r--r--Tests/RunCMake/CompilerArgs/CXX.cmake3
-rw-r--r--Tests/RunCMake/CompilerArgs/FindCCompiler.cmake2
-rw-r--r--Tests/RunCMake/CompilerArgs/FindCXXCompiler.cmake2
-rw-r--r--Tests/RunCMake/CompilerArgs/RunCMakeTest.cmake58
-rw-r--r--Tests/RunCMake/CompilerArgs/main.c10
-rw-r--r--Tests/RunCMake/CompilerArgs/main.cxx10
-rw-r--r--Tests/RunCMake/CompilerArgs/toolchain.cmake.in1
-rw-r--r--Tests/RunCMake/CompilerChange/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-common.cmake8
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-env-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-env.cmake1
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-launch-env.cmake3
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-launch.cmake3
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC.cmake2
-rw-r--r--Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/CompilerLauncher/test.ispc4
-rw-r--r--Tests/RunCMake/CompilerNotFound/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Configure/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/DependencyGraph/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeCommon.cmake40
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-check.cmake5
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-stderr.txt1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-both.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-check.cmake6
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-stderr.txt1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-middle.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-check.cmake6
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-stderr.txt1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-none.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-check.cmake5
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-stderr.txt1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-top.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortranCommon.cmake25
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-both-build-check.cmake11
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-both.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-middle-build-check.cmake11
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-middle.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-none-build-check.cmake11
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-none.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-top-build-check.cmake11
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-top.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-both-build-check.cmake8
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-both.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-middle-build-check.cmake10
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-middle.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-none-build-check.cmake10
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-none.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-top-build-check.cmake8
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-top.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/Property.cmake24
-rw-r--r--Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake60
-rw-r--r--Tests/RunCMake/DependencyGraph/WriteTargets.cmake16
-rw-r--r--Tests/RunCMake/DependencyGraph/mylib.c6
-rw-r--r--Tests/RunCMake/DependencyGraph/mylib.f903
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExcludeFromAll/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake26
-rw-r--r--Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-result.txt1
-rw-r--r--Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt3
-rw-r--r--Tests/RunCMake/ExcludeFromAll/error-on-mixed-config.cmake6
-rw-r--r--Tests/RunCMake/ExcludeFromAll/main.c4
-rw-r--r--Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake17
-rw-r--r--Tests/RunCMake/ExcludeFromAll/single-config.cmake7
-rw-r--r--Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExternalData/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/BadIndependentStep1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/BadIndependentStep1-stderr.txt7
-rw-r--r--Tests/RunCMake/ExternalProject/BadIndependentStep1.cmake14
-rw-r--r--Tests/RunCMake/ExternalProject/BadIndependentStep2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/BadIndependentStep2-stderr.txt7
-rw-r--r--Tests/RunCMake/ExternalProject/BadIndependentStep2.cmake13
-rw-r--r--Tests/RunCMake/ExternalProject/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadInactivityResume.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadInactivityTimeout.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadServer.py53
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadTimeout.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/MultiCommand.cmake6
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-Common.cmake (renamed from Tests/RunCMake/ExternalProject/NO_DEPENDS.cmake)1
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct-stderr.txt7
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct.cmake4
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt16
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt61
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt119
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt36
-rw-r--r--Tests/RunCMake/ExternalProject/RunCMakeTest.cmake97
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-Common.cmake34
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-download-check.cmake3
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-install-check.cmake3
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-test-check.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-update-check.cmake3
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-download-check.cmake3
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-install-check.cmake3
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-test-check.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-update-check.cmake3
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/Xcode-CMP0114-stderr.txt11
-rw-r--r--Tests/RunCMake/ExternalProject/Xcode-CMP0114.cmake2
-rw-r--r--Tests/RunCMake/FPHSA/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FPHSA/FindPseudoRange.cmake7
-rw-r--r--Tests/RunCMake/FPHSA/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/FPHSA/range_1-2-exclude-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/range_1-2-exclude-stderr.txt2
-rw-r--r--Tests/RunCMake/FPHSA/range_1-2-exclude.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/range_1-2-include.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/range_1-3.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/range_3-4-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/range_3-4-stderr.txt2
-rw-r--r--Tests/RunCMake/FPHSA/range_3-4.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/range_ignored-stderr.txt4
-rw-r--r--Tests/RunCMake/FPHSA/range_ignored.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/range_no-range.cmake1
-rw-r--r--Tests/RunCMake/FeatureSummary/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FetchContent/DirOverrides.cmake25
-rw-r--r--Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake18
-rw-r--r--Tests/RunCMake/FetchContent/ManualSourceDirectory.cmake8
-rw-r--r--Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-result.txt1
-rw-r--r--Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-stderr.txt2
-rw-r--r--Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing.cmake8
-rw-r--r--Tests/RunCMake/FetchContent/RunCMakeTest.cmake22
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py39
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json14
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json13
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json8
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json79
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json12
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json110
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe_languagestandard.json36
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json110
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json67
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json70
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2.cmake1
-rw-r--r--Tests/RunCMake/FileAPI/cxx/CMakeLists.txt11
-rw-r--r--Tests/RunCMake/FileAPI/imported/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/FileAPI/interface/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/File_Archive/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/File_Archive/argument-validation-compression-level-1-result.txt1
-rw-r--r--Tests/RunCMake/File_Archive/argument-validation-compression-level-1-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Archive/argument-validation-compression-level-1.cmake8
-rw-r--r--Tests/RunCMake/File_Archive/argument-validation-compression-level-2-result.txt1
-rw-r--r--Tests/RunCMake/File_Archive/argument-validation-compression-level-2-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Archive/argument-validation-compression-level-2.cmake8
-rw-r--r--Tests/RunCMake/File_Archive/compression-level.cmake85
-rw-r--r--Tests/RunCMake/File_Archive/gnutar-gz-compression-level.cmake10
-rw-r--r--Tests/RunCMake/File_Archive/pax-xz-compression-level.cmake10
-rw-r--r--Tests/RunCMake/File_Archive/pax-zstd-compression-level.cmake10
-rw-r--r--Tests/RunCMake/File_Archive/paxr-bz2-compression-level.cmake10
-rw-r--r--Tests/RunCMake/File_Archive/roundtrip.cmake17
-rw-r--r--Tests/RunCMake/File_Archive/unsupported-compression-level-result.txt1
-rw-r--r--Tests/RunCMake/File_Archive/unsupported-compression-level-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Archive/unsupported-compression-level.cmake7
-rw-r--r--Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt1
-rw-r--r--Tests/RunCMake/File_Configure/AngleBracketsContent.cmake6
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake4
-rw-r--r--Tests/RunCMake/File_Configure/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/AdjacentInOut.cmake6
-rw-r--r--Tests/RunCMake/File_Generate/AdjacentInOut.in1
-rw-r--r--Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt16
-rw-r--r--Tests/RunCMake/File_Generate/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/File_Generate/GenerateSource.cmake3
-rw-r--r--Tests/RunCMake/File_Generate/GenerateSource/CMakeLists.txt8
-rw-r--r--Tests/RunCMake/File_Generate/RunCMakeTest.cmake19
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-result.txt1
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt11
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake8
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-result.txt1
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt23
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake8
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-stderr.txt10
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty.cmake14
-rw-r--r--Tests/RunCMake/File_Generate/Target.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/sub1/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/File_Generate/sub2/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/FindOpenGL/CMP0072-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/FindPkgConfig/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake2
-rw-r--r--Tests/RunCMake/FindSWIG/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/FindSWIG/version-exact.cmake17
-rw-r--r--Tests/RunCMake/FindSWIG/version-range.cmake30
-rw-r--r--Tests/RunCMake/FindSWIG/version.cmake6
-rw-r--r--Tests/RunCMake/GNUInstallDirs/Opt-Debian-stderr.txt30
-rw-r--r--Tests/RunCMake/GNUInstallDirs/Root-Debian-stderr.txt30
-rw-r--r--Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/GNUInstallDirs/Usr-Debian-stderr.txt30
-rw-r--r--Tests/RunCMake/GNUInstallDirs/UsrLocal-Debian-stderr.txt30
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake17
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake17
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency-stderr.txt6
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency.cmake12
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-no-dependency.cmake12
-rw-r--r--Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries-check.cmake6
-rw-r--r--Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries.cmake9
-rw-r--r--Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries-check.cmake6
-rw-r--r--Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries.cmake8
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake14
-rw-r--r--Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES-check.cmake17
-rw-r--r--Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake7
-rw-r--r--Tests/RunCMake/GeneratorPlatform/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt6
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake15
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-stderr.txt4
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-stdout.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1.cmake8
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-stderr.txt4
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-stdout.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12.cmake8
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-stderr.txt4
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-stdout.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake8
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-stderr.txt4
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-stdout.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12.cmake8
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-result.txt1
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML-special-result-check.cmake28
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML.cmake11
-rw-r--r--Tests/RunCMake/GoogleTest/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/GoogleTest/xml_output.cpp11
-rw-r--r--Tests/RunCMake/Graphviz/GraphvizTestProject.cmake11
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot44
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot31
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot32
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot10
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot34
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot28
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot36
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot28
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot1
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot36
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication24
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers36
-rw-r--r--Tests/RunCMake/Graphviz/sub_directory_target/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/Graphviz/sub_directory_target/test.c4
-rw-r--r--Tests/RunCMake/Graphviz/test_project/system_library.c3
-rw-r--r--Tests/RunCMake/IncompatibleQt/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ConfigSources.cmake2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/EmptySources-build2-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/EmptySources-build2-stdout.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/EmptySources.cmake8
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build1-check.cmake4
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build2-check.cmake4
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-stdout.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll.cmake7
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-stderr.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value.cmake (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-stderr.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface.cmake (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-stderr.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported.cmake (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/PublicSources-build3-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/PublicSources-build3-stdout.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/PublicSources.cmake20
-rw-r--r--Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake36
-rw-r--r--Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-stderr.txt (renamed from Tests/RunCMake/interface_library/add_custom_command-TARGET-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET.cmake (renamed from Tests/RunCMake/interface_library/add_custom_command-TARGET.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/genex_link-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/genex_link.cmake (renamed from Tests/RunCMake/interface_library/genex_link.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/global-interface-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt (renamed from Tests/RunCMake/interface_library/global-interface-stderr.txt)4
-rw-r--r--Tests/RunCMake/InterfaceLibrary/global-interface.cmake (renamed from Tests/RunCMake/interface_library/global-interface.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/iface.c4
-rw-r--r--Tests/RunCMake/InterfaceLibrary/iface_broken.c1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_name-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_name-stderr.txt (renamed from Tests/RunCMake/interface_library/invalid_name-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_name.cmake (renamed from Tests/RunCMake/interface_library/invalid_name.cmake)2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_signature-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_signature-stderr.txt (renamed from Tests/RunCMake/interface_library/invalid_signature-stderr.txt)15
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_signature.cmake (renamed from Tests/RunCMake/interface_library/invalid_signature.cmake)6
-rw-r--r--Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake (renamed from Tests/RunCMake/interface_library/no_shared_libs.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/target_commands-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/target_commands-stderr.txt (renamed from Tests/RunCMake/interface_library/target_commands-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/target_commands.cmake (renamed from Tests/RunCMake/interface_library/target_commands.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/use_iface.c6
-rw-r--r--Tests/RunCMake/Languages/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/Make/CMP0113-Common.cmake17
-rw-r--r--Tests/RunCMake/Make/CMP0113-NEW-build-gnu-stderr.txt5
-rw-r--r--Tests/RunCMake/Make/CMP0113-NEW-build-result.txt1
-rw-r--r--Tests/RunCMake/Make/CMP0113-NEW-build-stderr.txt1
-rw-r--r--Tests/RunCMake/Make/CMP0113-NEW-build-stdout.txt1
-rw-r--r--Tests/RunCMake/Make/CMP0113-NEW.cmake2
-rw-r--r--Tests/RunCMake/Make/CMP0113-OLD-build-stdout.txt1
-rw-r--r--Tests/RunCMake/Make/CMP0113-OLD.cmake2
-rw-r--r--Tests/RunCMake/Make/CMP0113-WARN-build-stdout.txt1
-rw-r--r--Tests/RunCMake/Make/CMP0113-WARN.cmake2
-rw-r--r--Tests/RunCMake/Make/RunCMakeTest.cmake25
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake9
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake12
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt4
-rw-r--r--Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/PositionIndependentCode/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchInstantiateTemplates-check.cmake17
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchInstantiateTemplates.cmake16
-rw-r--r--Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/RunCMake.cmake2
-rw-r--r--Tests/RunCMake/SourceProperties/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithNewline-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithTabs-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/ParenInENV-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt2
-rw-r--r--Tests/RunCMake/TargetObjects/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetPolicies/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt2
-rw-r--r--Tests/RunCMake/TargetProperties/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetSources/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake25
-rw-r--r--Tests/RunCMake/VS10Project/InterfaceLibSources.cmake1
-rw-r--r--Tests/RunCMake/VS10Project/LanguageStandard-check.cmake23
-rw-r--r--Tests/RunCMake/VS10Project/LanguageStandard.cmake5
-rw-r--r--Tests/RunCMake/VS10Project/NoImpLib-check.cmake23
-rw-r--r--Tests/RunCMake/VS10Project/NoImpLib.cmake3
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/iface.h0
-rw-r--r--Tests/RunCMake/VSSolution/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Win32GenEx/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/Win32GenEx/RunCMakeTest.cmake28
-rw-r--r--Tests/RunCMake/Win32GenEx/Win32GenEx-debug.cmake1
-rw-r--r--Tests/RunCMake/Win32GenEx/Win32GenEx-release.cmake1
-rw-r--r--Tests/RunCMake/Win32GenEx/Win32GenEx.cmake7
-rw-r--r--Tests/RunCMake/Win32GenEx/main.c14
-rw-r--r--Tests/RunCMake/XcodeProject/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/XcodeProject/DeploymentTarget.cmake3
-rw-r--r--Tests/RunCMake/XcodeProject/InterfaceLibSources-check.cmake16
-rw-r--r--Tests/RunCMake/XcodeProject/InterfaceLibSources.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake132
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_BUILT_ONLY-check.cmake19
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_BUILT_ONLY.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake57
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID-result.txt1
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID-stderr.txt1
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_KNOWN_LOCATION-check.cmake19
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_KNOWN_LOCATION.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake19
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake40
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeBundles.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeDependOnZeroCheck-build-stdout.txt4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-result.txt1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-stderr.txt13
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand.cmake3
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject/iface.h0
-rw-r--r--Tests/RunCMake/XcodeProject/main.cpp2
-rw-r--r--Tests/RunCMake/XcodeProject/main.m2
-rw-r--r--Tests/RunCMake/add_dependencies/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-AlphaNumeric.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-BracketArgument.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-EscapedSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-FormerInvalidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-LeadingAndTrailingWhitespace.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-OtherSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-Quote.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-Semicolon.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-Space.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-ValidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common.cmake9
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialCharsMC.cmake1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-GeneratorExpressionSyntax.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-Quote-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-Quote.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-Semicolon.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-Space.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-stderr.txt5
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-stderr.txt3
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-GeneratorExpressionSyntax.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Quote-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Quote.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Test.cmake3
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-stderr.txt5
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-stderr.txt13
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-stderr.txt3
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-stderr.txt13
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC.cmake1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-GeneratorExpressionSyntax.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Quote-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Quote-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Quote.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/add_test/RunCMakeTest.cmake35
-rw-r--r--Tests/RunCMake/alias_targets/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/alias_targets/invalid-name.cmake2
-rw-r--r--Tests/RunCMake/build_command/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/cmake_language/CallInvalidCommand.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/RunCMakeTest.cmake61
-rw-r--r--Tests/RunCMake/cmake_language/call_expand_command_name.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/call_invalid_command-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_invalid_command-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/call_invalid_command.cmake15
-rw-r--r--Tests/RunCMake/cmake_language/call_message.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/defer_call-stderr.txt15
-rw-r--r--Tests/RunCMake/cmake_language/defer_call-stdout.txt8
-rw-r--r--Tests/RunCMake/cmake_language/defer_call.cmake12
-rw-r--r--Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt11
-rw-r--r--Tests/RunCMake/cmake_language/defer_call/include.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_add_subdirectory-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_add_subdirectory-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_add_subdirectory.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_add_subdirectory/CMakeLists.txt0
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_enable_language-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_enable_language-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_enable_language.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_error-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_error-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_error.cmake3
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_error/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt13
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_ids.cmake14
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_invalid_command-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_invalid_command-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_invalid_command.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_invalid_directory-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_invalid_directory-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_invalid_directory.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_invalid_directory/CMakeLists.txt0
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_missing_directory-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_missing_directory-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_missing_directory.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_policy_PUSH-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_policy_PUSH-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_policy_PUSH.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_syntax_error-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_syntax_error-stderr.txt13
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_trace-stderr.txt8
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_trace.cmake3
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_trace_json-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_language/defer_call_trace_json.cmake3
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_id-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_id-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_id.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_id_var-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_id_var-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_id_var.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory/CMakeLists.txt0
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-stderr.txt6
-rw-r--r--Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_empty-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_empty-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_empty.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_missing-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_missing-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_missing.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_multiple-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_multiple-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_directory_multiple.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id_empty-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id_empty-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id_empty.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id_var-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id_var-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_id_var.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_id-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_id-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_id.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_id_var.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory/CMakeLists.txt0
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_missing_id-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_missing_id-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_missing_id.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_missing_var-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_missing_var-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_missing_var.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_too_many_args-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_too_many_args-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_too_many_args.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-stderr.txt6
-rw-r--r--Tests/RunCMake/cmake_language/defer_get_call_unknown_argument.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_empty-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_empty-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_empty.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_missing-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_missing-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_missing.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_multiple-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_multiple-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_multiple.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_empty-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_empty-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_empty.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_missing-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_missing-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_missing.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_multiple-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_multiple-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_id_var_multiple.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_missing_arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_missing_arg-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_missing_arg.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_missing_call-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_missing_call-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/defer_missing_call.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/defer_unknown_option-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/defer_unknown_option-stderr.txt6
-rw-r--r--Tests/RunCMake/cmake_language/defer_unknown_option.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt26
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before2812.cmake6
-rw-r--r--Tests/RunCMake/cmake_minimum_required/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/cmake_path/ABSOLUTE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/ABSOLUTE_PATH-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/ABSOLUTE_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/ABSOLUTE_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/ABSOLUTE_PATH.cmake39
-rw-r--r--Tests/RunCMake/cmake_path/APPEND-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/APPEND-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/APPEND-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/APPEND.cmake77
-rw-r--r--Tests/RunCMake/cmake_path/CMAKE_PATH-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CMAKE_PATH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CMAKE_PATH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CMAKE_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CMAKE_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CMAKE_PATH.cmake43
-rw-r--r--Tests/RunCMake/cmake_path/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-EQUAL-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-EQUAL-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-EQUAL-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-wrong-operator-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-wrong-operator-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE-wrong-operator.cmake3
-rw-r--r--Tests/RunCMake/cmake_path/COMPARE.cmake22
-rw-r--r--Tests/RunCMake/cmake_path/CONCAT-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONCAT-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONCAT-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONCAT.cmake20
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-wrong-operator-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-wrong-operator-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT-wrong-operator.cmake2
-rw-r--r--Tests/RunCMake/cmake_path/CONVERT.cmake110
-rw-r--r--Tests/RunCMake/cmake_path/GET-EXTENSION-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-EXTENSION-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-EXTENSION-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-EXTENSION-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-FILENAME-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-FILENAME-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-FILENAME-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-FILENAME-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-PARENT_PATH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-PARENT_PATH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-PARENT_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-PARENT_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_NAME-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_NAME-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_NAME-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_NAME-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_PATH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_PATH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-ROOT_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-STEM-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-STEM-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-STEM-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-STEM-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-wrong-operator-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/GET-wrong-operator-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_path/GET-wrong-operator.cmake3
-rw-r--r--Tests/RunCMake/cmake_path/GET.cmake248
-rw-r--r--Tests/RunCMake/cmake_path/HASH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HASH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HASH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HASH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HASH.cmake27
-rw-r--r--Tests/RunCMake/cmake_path/HAS_EXTENSION-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_EXTENSION-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_EXTENSION-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_EXTENSION-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_FILENAME-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_FILENAME-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_FILENAME-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_FILENAME-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ITEM.cmake232
-rw-r--r--Tests/RunCMake/cmake_path/HAS_PARENT_PATH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_PARENT_PATH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_PARENT_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_PARENT_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_NAME-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_NAME-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_NAME-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_NAME-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_PATH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_PATH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_ROOT_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_STEM-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_STEM-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_STEM-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/HAS_STEM-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_ABSOLUTE-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_ABSOLUTE-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_ABSOLUTE-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_ABSOLUTE-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_ABSOLUTE.cmake48
-rw-r--r--Tests/RunCMake/cmake_path/IS_PREFIX-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_PREFIX-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_PREFIX-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_PREFIX-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_PREFIX.cmake22
-rw-r--r--Tests/RunCMake/cmake_path/IS_RELATIVE-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_RELATIVE-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_RELATIVE-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_RELATIVE-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/IS_RELATIVE.cmake48
-rw-r--r--Tests/RunCMake/cmake_path/NATIVE_PATH-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NATIVE_PATH-invalid-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NATIVE_PATH-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NATIVE_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NATIVE_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NATIVE_PATH.cmake37
-rw-r--r--Tests/RunCMake/cmake_path/NORMAL_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NORMAL_PATH-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NORMAL_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NORMAL_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/NORMAL_PATH.cmake46
-rw-r--r--Tests/RunCMake/cmake_path/OUTPUT_VARIABLE-no-arg-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_path/PROXIMATE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/PROXIMATE_PATH-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/PROXIMATE_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/PROXIMATE_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/PROXIMATE_PATH.cmake41
-rw-r--r--Tests/RunCMake/cmake_path/RELATIVE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/RELATIVE_PATH-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/RELATIVE_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/RELATIVE_PATH-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/RELATIVE_PATH.cmake76
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_EXTENSION-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_EXTENSION-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_EXTENSION-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_EXTENSION-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_EXTENSION.cmake52
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_FILENAME-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_FILENAME-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_FILENAME-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_FILENAME-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REMOVE_FILENAME.cmake25
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_EXTENSION-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_EXTENSION-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_EXTENSION-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_EXTENSION-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_EXTENSION.cmake58
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_FILENAME-OUTPUT_VARIABLE-invalid-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_FILENAME-OUTPUT_VARIABLE-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_FILENAME-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_FILENAME-wrong-path-result.txt1
-rw-r--r--Tests/RunCMake/cmake_path/REPLACE_FILENAME.cmake26
-rw-r--r--Tests/RunCMake/cmake_path/RunCMakeTest.cmake191
-rw-r--r--Tests/RunCMake/cmake_path/call-cmake_path.cmake19
-rw-r--r--Tests/RunCMake/cmake_path/check_errors.cmake12
-rw-r--r--Tests/RunCMake/cmake_path/invalid-output-var-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_path/missing-output-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_path/unexpected-arg-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_path/wrong-path-stderr.txt2
-rw-r--r--Tests/RunCMake/configure_file/NoSourcePermissions.cmake10
-rwxr-xr-xTests/RunCMake/configure_file/NoSourcePermissions.sh3
-rw-r--r--Tests/RunCMake/configure_file/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/ctest_build/BuildCommandFailure-check.cmake12
-rw-r--r--Tests/RunCMake/ctest_build/BuildCommandFailure-result.txt1
-rw-r--r--Tests/RunCMake/ctest_build/BuildCommandFailure-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_build/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-stdout.txt13
-rw-r--r--Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/ctest_memcheck/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_memcheck/testCudaSanitizer.cmake279
-rw-r--r--Tests/RunCMake/ctest_update/test.cmake.in2
-rw-r--r--Tests/RunCMake/execute_process/AnyCommandError-result.txt1
-rw-r--r--Tests/RunCMake/execute_process/AnyCommandError-stderr.txt2
-rw-r--r--Tests/RunCMake/execute_process/AnyCommandError.cmake8
-rw-r--r--Tests/RunCMake/execute_process/CommandError-result.txt1
-rw-r--r--Tests/RunCMake/execute_process/CommandError-stderr.txt2
-rw-r--r--Tests/RunCMake/execute_process/CommandError.cmake3
-rw-r--r--Tests/RunCMake/execute_process/LastCommandError-result.txt1
-rw-r--r--Tests/RunCMake/execute_process/LastCommandError-stderr.txt2
-rw-r--r--Tests/RunCMake/execute_process/LastCommandError.cmake8
-rw-r--r--Tests/RunCMake/execute_process/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/export/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/export/NamelinkOnlyExport.cmake9
-rw-r--r--Tests/RunCMake/export/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/export/UnknownExport-result.txt1
-rw-r--r--Tests/RunCMake/export/UnknownExport-stderr.txt4
-rw-r--r--Tests/RunCMake/export/UnknownExport.cmake2
-rw-r--r--Tests/RunCMake/fake_build_command.c6
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-all-perms-result.txt1
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-all-perms-stderr.txt5
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-all-perms.cmake6
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-result.txt1
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-stderr.txt6
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-invalid-path.cmake4
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-result.txt1
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-stderr.txt4
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms.cmake5
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-result.txt1
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-stderr.txt4
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-no-keyword.cmake5
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-no-perms-result.txt1
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-no-perms-stderr.txt4
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-no-perms.cmake5
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-ok.cmake5
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-override.cmake6
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-write-only-result.txt1
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-write-only-stderr.txt6
-rw-r--r--Tests/RunCMake/file-CHMOD/CHMOD-write-only.cmake6
-rw-r--r--Tests/RunCMake/file-CHMOD/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake19
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake8
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt0
-rw-r--r--Tests/RunCMake/file/GLOB-CONFIGURE_DEPENDS-RerunCMake.cmake6
-rw-r--r--Tests/RunCMake/file/REAL_PATH-no-base-dir-result.txt1
-rw-r--r--Tests/RunCMake/file/REAL_PATH-no-base-dir-stderr.txt2
-rw-r--r--Tests/RunCMake/file/REAL_PATH-no-base-dir.cmake2
-rw-r--r--Tests/RunCMake/file/REAL_PATH-unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/file/REAL_PATH-unexpected-arg-stderr.txt2
-rw-r--r--Tests/RunCMake/file/REAL_PATH-unexpected-arg.cmake2
-rw-r--r--Tests/RunCMake/file/REAL_PATH.cmake14
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/find_dependency/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_package/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_package/EmptyVersionRange-result.txt1
-rw-r--r--Tests/RunCMake/find_package/EmptyVersionRange-stderr.txt10
-rw-r--r--Tests/RunCMake/find_package/EmptyVersionRange.cmake3
-rw-r--r--Tests/RunCMake/find_package/FindVersionRange.cmake82
-rw-r--r--Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt11
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake11
-rw-r--r--Tests/RunCMake/find_package/VersionRange.cmake37
-rw-r--r--Tests/RunCMake/find_package/VersionRange2.cmake37
-rw-r--r--Tests/RunCMake/find_package/VersionRange3.cmake49
-rw-r--r--Tests/RunCMake/find_package/VersionRange4.cmake39
-rw-r--r--Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfig.cmake0
-rw-r--r--Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake74
-rw-r--r--Tests/RunCMake/find_package/VersionRangeConfig.cmake23
-rw-r--r--Tests/RunCMake/find_package/VersionRangeConfig2.cmake23
-rw-r--r--Tests/RunCMake/find_package/VersionRangeConfigStd.cmake23
-rw-r--r--Tests/RunCMake/find_package/VersionRangeConfigStd2.cmake23
-rw-r--r--Tests/RunCMake/find_package/VersionRangeStd/VersionRangeStdConfig.cmake0
-rw-r--r--Tests/RunCMake/find_package/VersionRangeStd/VersionRangeStdConfigVersion.cmake24
-rw-r--r--Tests/RunCMake/find_package/VersionRangeWithEXACT-result.txt1
-rw-r--r--Tests/RunCMake/find_package/VersionRangeWithEXACT-stderr.txt2
-rw-r--r--Tests/RunCMake/find_package/VersionRangeWithEXACT.cmake1
-rw-r--r--Tests/RunCMake/find_package/WrongVersionRange-result.txt1
-rw-r--r--Tests/RunCMake/find_package/WrongVersionRange-stderr.txt28
-rw-r--r--Tests/RunCMake/find_package/WrongVersionRange.cmake9
-rw-r--r--Tests/RunCMake/find_program/BundleSpaceInName-stdout.txt1
-rw-r--r--Tests/RunCMake/find_program/BundleSpaceInName.cmake8
-rw-r--r--Tests/RunCMake/find_program/CMP0109-Common.cmake (renamed from Tests/RunCMake/find_program/ExeNoRead.cmake)3
-rw-r--r--Tests/RunCMake/find_program/CMP0109-NEW-stdout.txt2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-NEW.cmake2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-OLD-stdout.txt2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-OLD.cmake2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-WARN-stderr.txt29
-rw-r--r--Tests/RunCMake/find_program/CMP0109-WARN-stdout.txt2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-WARN.cmake1
-rw-r--r--Tests/RunCMake/find_program/ExeNoRead-stdout.txt1
-rw-r--r--Tests/RunCMake/find_program/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake6
-rw-r--r--Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt2
-rw-r--r--Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake2
-rw-r--r--Tests/RunCMake/get_filename_component/IncorrectArguments-result.txt1
-rw-r--r--Tests/RunCMake/get_filename_component/IncorrectArguments-stderr.txt4
-rw-r--r--Tests/RunCMake/get_filename_component/IncorrectArguments.cmake2
-rw-r--r--Tests/RunCMake/get_filename_component/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt4
-rw-r--r--Tests/RunCMake/get_filename_component/UnknownComponent.cmake1
-rw-r--r--Tests/RunCMake/get_property/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/if/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include_external_msproject/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include_external_msproject/check_utils.cmake2
-rw-r--r--Tests/RunCMake/install/EXPORT-NamelinkOnly.cmake12
-rw-r--r--Tests/RunCMake/install/EXPORT-UnknownExport-result.txt1
-rw-r--r--Tests/RunCMake/install/EXPORT-UnknownExport-stderr.txt1
-rw-r--r--Tests/RunCMake/install/EXPORT-UnknownExport.cmake5
-rw-r--r--Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake11
-rw-r--r--Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake4
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/install/obj1.ispc4
-rw-r--r--Tests/RunCMake/install/obj2.ispc4
-rw-r--r--Tests/RunCMake/interface_library/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/interface_library/whitelist-stderr.txt19
-rw-r--r--Tests/RunCMake/interface_library/whitelist.cmake25
-rw-r--r--Tests/RunCMake/list/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/math/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/message/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/no_install_prefix/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/project/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/separate_arguments/MultipleArguments-result.txt1
-rw-r--r--Tests/RunCMake/separate_arguments/MultipleArguments-stderr.txt4
-rw-r--r--Tests/RunCMake/separate_arguments/MultipleArguments.cmake2
-rw-r--r--Tests/RunCMake/separate_arguments/MultipleCommands-result.txt1
-rw-r--r--Tests/RunCMake/separate_arguments/MultipleCommands-stderr.txt19
-rw-r--r--Tests/RunCMake/separate_arguments/MultipleCommands.cmake6
-rw-r--r--Tests/RunCMake/separate_arguments/NativeCommand.cmake5
-rw-r--r--Tests/RunCMake/separate_arguments/ProgramCommand.cmake48
-rw-r--r--Tests/RunCMake/separate_arguments/ProgramCommandWithSeparateArgs.cmake28
-rw-r--r--Tests/RunCMake/separate_arguments/ProgramOnly-result.txt1
-rw-r--r--Tests/RunCMake/separate_arguments/ProgramOnly-stderr.txt5
-rw-r--r--Tests/RunCMake/separate_arguments/ProgramOnly.cmake2
-rw-r--r--Tests/RunCMake/separate_arguments/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/separate_arguments/SeparateArgsOnly-result.txt1
-rw-r--r--Tests/RunCMake/separate_arguments/SeparateArgsOnly-stderr.txt4
-rw-r--r--Tests/RunCMake/separate_arguments/SeparateArgsOnly.cmake2
-rw-r--r--Tests/RunCMake/separate_arguments/UnixCommand.cmake5
-rw-r--r--Tests/RunCMake/separate_arguments/WindowsCommand.cmake5
-rw-r--r--Tests/RunCMake/string/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/string/JSON.cmake342
-rw-r--r--Tests/RunCMake/string/JSONNoArgs-result.txt1
-rw-r--r--Tests/RunCMake/string/JSONNoArgs-stderr.txt4
-rw-r--r--Tests/RunCMake/string/JSONNoArgs.cmake1
-rw-r--r--Tests/RunCMake/string/JSONNoJson-result.txt1
-rw-r--r--Tests/RunCMake/string/JSONNoJson-stderr.txt4
-rw-r--r--Tests/RunCMake/string/JSONNoJson.cmake1
-rw-r--r--Tests/RunCMake/string/JSONOneArg-result.txt1
-rw-r--r--Tests/RunCMake/string/JSONOneArg-stderr.txt4
-rw-r--r--Tests/RunCMake/string/JSONOneArg.cmake1
-rw-r--r--Tests/RunCMake/string/JSONWrongMode-result.txt1
-rw-r--r--Tests/RunCMake/string/JSONWrongMode-stderr.txt5
-rw-r--r--Tests/RunCMake/string/JSONWrongMode.cmake1
-rw-r--r--Tests/RunCMake/string/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/string/json/unicode.json8
-rw-r--r--Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake2
-rw-r--r--Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake2
-rw-r--r--Tests/RunCMake/target_link_libraries/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake3
-rw-r--r--Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake1
-rw-r--r--Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake1
-rw-r--r--Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake1
-rw-r--r--Tests/RunCMake/try_compile/CMP0056.cmake1
-rw-r--r--Tests/RunCMake/try_compile/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/try_compile/CudaStandard-stderr.txt2
-rw-r--r--Tests/RunCMake/try_compile/CudaStandard.cmake2
-rw-r--r--Tests/RunCMake/try_compile/ISPCDuplicateTarget-stderr.txt1
-rw-r--r--Tests/RunCMake/try_compile/ISPCDuplicateTarget.cmake8
-rw-r--r--Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja-result.txt1
-rw-r--r--Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja-stderr.txt1
-rw-r--r--Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja.cmake11
-rw-r--r--Tests/RunCMake/try_compile/ISPCInvalidTarget-stderr.txt1
-rw-r--r--Tests/RunCMake/try_compile/ISPCInvalidTarget.cmake7
-rw-r--r--Tests/RunCMake/try_compile/ISPCTargets-stderr.txt1
-rw-r--r--Tests/RunCMake/try_compile/ISPCTargets-stdout.txt1
-rw-r--r--Tests/RunCMake/try_compile/ISPCTargets.cmake7
-rw-r--r--Tests/RunCMake/try_compile/RunCMakeTest.cmake9
-rw-r--r--Tests/RunCMake/try_compile/proj/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/try_compile/src.ispc4
-rw-r--r--Tests/RunCMake/try_run/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/variable_watch/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/while/CMakeLists.txt2
1470 files changed, 11198 insertions, 620 deletions
diff --git a/Tests/RunCMake/Android/RunCMakeTest.cmake b/Tests/RunCMake/Android/RunCMakeTest.cmake
index 45798ce59..c4b1a00dd 100644
--- a/Tests/RunCMake/Android/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Android/RunCMakeTest.cmake
@@ -18,15 +18,33 @@ function(run_Android case)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake(${case})
- run_cmake_command(${case}-build ${CMAKE_COMMAND} --build .)
+ set(configs ".")
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(configs Release Debug)
+ endif()
+ foreach(config IN LISTS configs)
+ set(build_suffix)
+ set(config_arg)
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(build_suffix "-${config}")
+ set(config_arg --config "${config}")
+ endif()
+ run_cmake_command(${case}-build${build_suffix} ${CMAKE_COMMAND} --build . ${config_arg})
+ endforeach()
endfunction()
+set(RunCMake_GENERATOR_PLATFORM_OLD "${RunCMake_GENERATOR_PLATFORM}")
+
+if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "ARM")
+endif()
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_SYSROOT=${CMAKE_CURRENT_SOURCE_DIR}
)
run_cmake(BadSYSROOT)
unset(RunCMake_TEST_OPTIONS)
+set(RunCMake_GENERATOR_PLATFORM "${RunCMake_GENERATOR_PLATFORM_OLD}")
foreach(ndk IN LISTS TEST_ANDROID_NDK)
# Load available toolchain versions and abis.
@@ -70,6 +88,9 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
if(_versions MATCHES "clang")
set(_versions "clang" ${_versions})
endif()
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(_versions "clang")
+ endif()
list(REMOVE_DUPLICATES _versions)
list(SORT _versions)
set(_versions ";${_versions}")
@@ -77,44 +98,58 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
list(REMOVE_DUPLICATES _abis_${vers})
endforeach()
+ set(ndk_arg -DCMAKE_ANDROID_NDK=${ndk})
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(ndk_arg)
+ endif()
+
# Test failure cases.
message(STATUS "ndk='${ndk}'")
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "ARM")
+ endif()
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_ARCH_ABI=badabi
)
run_cmake(ndk-badabi)
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "x86")
+ endif()
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_ARCH_ABI=x86
-DCMAKE_ANDROID_ARM_MODE=0
)
run_cmake(ndk-badarm)
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "ARM")
+ endif()
if("armeabi" IN_LIST _abis_)
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_ARM_NEON=0
)
run_cmake(ndk-badneon)
endif()
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=badver
)
run_cmake(ndk-badver)
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=1.0
)
run_cmake(ndk-badvernum)
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_STL_TYPE=badstl
)
run_cmake(ndk-badstl)
@@ -122,7 +157,7 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
# Find a sysroot to test.
file(GLOB _sysroots "${ndk}/platforms/android-[0-9][0-9]/arch-arm")
- if(_sysroots)
+ if(_sysroots AND "armeabi" IN_LIST _abis_)
list(GET _sysroots 0 _sysroot)
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
@@ -131,6 +166,7 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
run_cmake(ndk-sysroot-armeabi)
unset(RunCMake_TEST_OPTIONS)
endif()
+ set(RunCMake_GENERATOR_PLATFORM "${RunCMake_GENERATOR_PLATFORM_OLD}")
# Find available STLs.
set(stl_types
@@ -157,23 +193,41 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
armeabi-v6
armeabi-v7a
arm64-v8a
- mips
- mips64
x86
x86_64
)
+ if(NOT RunCMake_GENERATOR MATCHES "Visual Studio")
+ list(APPEND abi_names mips mips64)
+ endif()
+ set(abi_to_arch_armeabi ARM)
+ set(abi_to_arch_armeabi-v6 ARM)
+ set(abi_to_arch_armeabi-v7a ARM)
+ set(abi_to_arch_arm64-v8a ARM64)
+ set(abi_to_arch_x86 x86)
+ set(abi_to_arch_x86_64 x64)
# Test all combinations.
foreach(vers IN LISTS _versions)
foreach(stl IN LISTS stl_types)
- foreach(config Release Debug)
+ set(configs Release Debug)
+ set(foreach_list "${configs}")
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(foreach_list ".")
+ endif()
+ foreach(config IN LISTS foreach_list)
# Test this combination for all available abis.
- message(STATUS "ndk='${ndk}' vers='${vers}' stl='${stl}' config='${config}'")
+ set(config_status " config='${config}'")
+ set(build_type_arg "-DCMAKE_BUILD_TYPE=${config}")
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(config_status)
+ string(REPLACE ";" "\\\\;" build_type_arg "-DCMAKE_CONFIGURATION_TYPES=${configs}")
+ endif()
+ message(STATUS "ndk='${ndk}' vers='${vers}' stl='${stl}'${config_status}")
set(RunCMake_TEST_OPTIONS
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=${vers}
-DCMAKE_ANDROID_STL_TYPE=${stl}
- -DCMAKE_BUILD_TYPE=${config}
+ "${build_type_arg}"
)
foreach(abi IN LISTS abi_names)
# Skip ABIs not supported by this compiler.
@@ -182,6 +236,9 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
endif()
# Run the tests for this combination.
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "${abi_to_arch_${abi}}")
+ endif()
if("${abi}" STREQUAL "armeabi")
run_Android(ndk-armeabi-thumb) # default: -DCMAKE_ANDROID_ARCH_ABI=armeabi -DCMAKE_ANDROID_ARM_MODE=0
run_Android(ndk-armeabi-arm -DCMAKE_ANDROID_ARM_MODE=1) # default: -DCMAKE_ANDROID_ARCH_ABI=armeabi
@@ -191,6 +248,7 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
run_Android(ndk-${abi}-neon -DCMAKE_ANDROID_ARCH_ABI=${abi} -DCMAKE_ANDROID_ARM_NEON=1)
endif()
endif()
+ set(RunCMake_GENERATOR_PLATFORM "${RunCMake_GENERATOR_PLATFORM_OLD}")
endforeach()
unset(RunCMake_TEST_OPTIONS)
endforeach()
diff --git a/Tests/RunCMake/Android/common.cmake b/Tests/RunCMake/Android/common.cmake
index d96ab8648..32412aa84 100644
--- a/Tests/RunCMake/Android/common.cmake
+++ b/Tests/RunCMake/Android/common.cmake
@@ -96,7 +96,7 @@ add_executable(android_c android.c)
add_executable(android_cxx android.cxx)
add_library(android_cxx_lib SHARED android_lib.cxx)
-set(objdump "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}objdump")
+set(objdump "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}objdump${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}")
if(NOT EXISTS "${objdump}")
message(FATAL_ERROR "Expected tool missing:\n ${objdump}")
endif()
diff --git a/Tests/RunCMake/Android/ndk-arm64-v8a-stderr.txt b/Tests/RunCMake/Android/ndk-arm64-v8a-stderr.txt
new file mode 100644
index 000000000..a3b3634e6
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-arm64-v8a-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-armeabi-arm-stderr.txt b/Tests/RunCMake/Android/ndk-armeabi-arm-stderr.txt
new file mode 100644
index 000000000..a3b3634e6
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-armeabi-arm-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-armeabi-thumb-stderr.txt b/Tests/RunCMake/Android/ndk-armeabi-thumb-stderr.txt
new file mode 100644
index 000000000..a3b3634e6
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-armeabi-thumb-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stderr.txt b/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stderr.txt
new file mode 100644
index 000000000..a3b3634e6
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-armeabi-v7a-stderr.txt b/Tests/RunCMake/Android/ndk-armeabi-v7a-stderr.txt
new file mode 100644
index 000000000..a3b3634e6
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-armeabi-v7a-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-x86-stderr.txt b/Tests/RunCMake/Android/ndk-x86-stderr.txt
new file mode 100644
index 000000000..a3b3634e6
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-x86-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-x86_64-stderr.txt b/Tests/RunCMake/Android/ndk-x86_64-stderr.txt
new file mode 100644
index 000000000..a3b3634e6
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-x86_64-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake b/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake
new file mode 100644
index 000000000..78a9b66a9
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake
@@ -0,0 +1,18 @@
+include(BundleUtilities)
+
+set(BU_CHMOD_BUNDLE_ITEMS ON)
+
+function(check_script script)
+ fixup_bundle_item(${script} ${script} "" "")
+endfunction()
+
+# Should not throw any errors
+# Shell script
+set(script_sh_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script.sh)
+check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script.sh)
+# Batch script
+set(script_bat_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script.bat)
+check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script.bat)
+# Shell script without extension
+set(script_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script)
+check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script)
diff --git a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
index 14aaff197..df28102f2 100644
--- a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
@@ -9,3 +9,4 @@ run_cmake(CMP0080-WARN)
run_cmake_command(CMP0080-COMMAND-OLD ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=OLD -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
run_cmake_command(CMP0080-COMMAND-NEW ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=NEW -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
run_cmake_command(CMP0080-COMMAND-WARN ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
+run_cmake_command(ExecutableScripts ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/ExecutableScripts.cmake)
diff --git a/Tests/RunCMake/BundleUtilities/test.app/script b/Tests/RunCMake/BundleUtilities/test.app/script
new file mode 100755
index 000000000..23bf47c06
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/test.app/script
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Hello World"
diff --git a/Tests/RunCMake/BundleUtilities/test.app/script.bat b/Tests/RunCMake/BundleUtilities/test.app/script.bat
new file mode 100755
index 000000000..338ae039b
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/test.app/script.bat
@@ -0,0 +1,3 @@
+@echo off
+
+echo "Hello world"
diff --git a/Tests/RunCMake/BundleUtilities/test.app/script.sh b/Tests/RunCMake/BundleUtilities/test.app/script.sh
new file mode 100755
index 000000000..23bf47c06
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/test.app/script.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Hello World"
diff --git a/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
new file mode 100644
index 000000000..66a58fb82
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
index 048762d00..a446211db 100644
--- a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
+++ b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
@@ -1,4 +1,11 @@
-^CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
++
+CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0019 will be removed from a future version
of CMake.
diff --git a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
index 1e4b47d0c..f7b9c0e88 100644
--- a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
@@ -1,3 +1,10 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
++
CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0019 is not set: Do not re-expand variables in include and link
information. Run "cmake --help-policy CMP0019" for policy details. Use
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
new file mode 100644
index 000000000..66a58fb82
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
new file mode 100644
index 000000000..66a58fb82
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt
new file mode 100644
index 000000000..66a58fb82
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt
new file mode 100644
index 000000000..66a58fb82
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt
new file mode 100644
index 000000000..66a58fb82
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
index 6a6a0c782..87404d3a9 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
@@ -1,3 +1,10 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
++
CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
index 2f7dfbfb7..5d757200b 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
@@ -1,4 +1,11 @@
-^CMake Warning \(dev\) in CMakeLists.txt:
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
++
+CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
new file mode 100644
index 000000000..66a58fb82
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake
index 650c8a5c7..ae62e795f 100644
--- a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake
+++ b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake
@@ -1,6 +1,7 @@
enable_language(CXX)
+cmake_policy(SET CMP0111 OLD)
add_library(someimportedlib SHARED IMPORTED)
get_target_property(_loc someimportedlib LOCATION)
diff --git a/Tests/RunCMake/CMP0026/CMakeLists.txt b/Tests/RunCMake/CMP0026/CMakeLists.txt
index 12cd3c775..4b3de84d9 100644
--- a/Tests/RunCMake/CMP0026/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0026/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0027/CMakeLists.txt b/Tests/RunCMake/CMP0027/CMakeLists.txt
index 12cd3c775..4b3de84d9 100644
--- a/Tests/RunCMake/CMP0027/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0027/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0028/CMakeLists.txt b/Tests/RunCMake/CMP0028/CMakeLists.txt
index 144cdb4ee..4f867df1c 100644
--- a/Tests/RunCMake/CMP0028/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0028/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
diff --git a/Tests/RunCMake/CMP0037/CMakeLists.txt b/Tests/RunCMake/CMP0037/CMakeLists.txt
index 12cd3c775..4b3de84d9 100644
--- a/Tests/RunCMake/CMP0037/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0037/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0041/CMakeLists.txt b/Tests/RunCMake/CMP0041/CMakeLists.txt
index f452db177..a06591c31 100644
--- a/Tests/RunCMake/CMP0041/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0041/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0042/CMakeLists.txt b/Tests/RunCMake/CMP0042/CMakeLists.txt
index f452db177..a06591c31 100644
--- a/Tests/RunCMake/CMP0042/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0042/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0043/CMakeLists.txt b/Tests/RunCMake/CMP0043/CMakeLists.txt
index d027f3e0e..cc8a6f812 100644
--- a/Tests/RunCMake/CMP0043/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0043/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
diff --git a/Tests/RunCMake/CMP0045/CMakeLists.txt b/Tests/RunCMake/CMP0045/CMakeLists.txt
index f452db177..a06591c31 100644
--- a/Tests/RunCMake/CMP0045/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0045/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0111/CMP0111-Common.cmake b/Tests/RunCMake/CMP0111/CMP0111-Common.cmake
new file mode 100644
index 000000000..564169d80
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-Common.cmake
@@ -0,0 +1,9 @@
+# Prevent duplicate errors on some platforms.
+set(CMAKE_IMPORT_LIBRARY_SUFFIX "placeholder")
+
+add_library(unknown_lib UNKNOWN IMPORTED)
+add_library(static_lib STATIC IMPORTED)
+add_library(shared_lib SHARED IMPORTED)
+
+add_executable(executable main.cpp)
+target_link_libraries(executable unknown_lib static_lib shared_lib)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt b/Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt
+++ b/Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt
new file mode 100644
index 000000000..ba5d9369f
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error in CMakeLists.txt:
+ IMPORTED_LOCATION not set for imported target "static_lib"( configuration
+ ".+")?.
++
+CMake Error in CMakeLists.txt:
+ IMPORTED_IMPLIB not set for imported target "shared_lib"( configuration
+ ".+")?.
diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake b/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake
new file mode 100644
index 000000000..d0c8dd3a1
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0111 NEW)
+include(CMP0111-Common.cmake)
diff --git a/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake b/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake
new file mode 100644
index 000000000..d00847a27
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0111 OLD)
+include(CMP0111-Common.cmake)
diff --git a/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
new file mode 100644
index 000000000..3abca0ab0
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
@@ -0,0 +1,29 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0111 is not set: An imported target missing its location property
+ fails during generation. Run "cmake --help-policy CMP0111" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
+
+ IMPORTED_LOCATION not set for imported target "unknown_lib"( configuration
+ ".+")?.
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0111 is not set: An imported target missing its location property
+ fails during generation. Run "cmake --help-policy CMP0111" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
+
+ IMPORTED_LOCATION not set for imported target "static_lib"( configuration
+ ".+")?.
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0111 is not set: An imported target missing its location property
+ fails during generation. Run "cmake --help-policy CMP0111" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
+
+ IMPORTED_IMPLIB not set for imported target "shared_lib"( configuration
+ ".+")?.
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake b/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake
new file mode 100644
index 000000000..0efe48c58
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake
@@ -0,0 +1 @@
+include(CMP0111-Common.cmake)
diff --git a/Tests/RunCMake/CMP0111/CMakeLists.txt b/Tests/RunCMake/CMP0111/CMakeLists.txt
new file mode 100644
index 000000000..9f19a7592
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.17)
+project(${RunCMake_TEST} CXX)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0111/RunCMakeTest.cmake b/Tests/RunCMake/CMP0111/RunCMakeTest.cmake
new file mode 100644
index 000000000..02e420a16
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(CMP0111-OLD)
+run_cmake(CMP0111-NEW)
+run_cmake(CMP0111-WARN)
diff --git a/Tests/RunCMake/CMP0111/main.cpp b/Tests/RunCMake/CMP0111/main.cpp
new file mode 100644
index 000000000..5047a34e3
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/main.cpp
@@ -0,0 +1,3 @@
+int main()
+{
+}
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index ec4c7b5a4..7000b7946 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -124,6 +124,7 @@ if(CMake_TEST_CUDA)
PROPERTY LABELS "CUDA")
endif()
add_RunCMake_test(CMP0106)
+add_RunCMake_test(CMP0111)
# The test for Policy 65 requires the use of the
# CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode
@@ -166,6 +167,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
-DPSEUDO_BC=$<TARGET_FILE:pseudo_BC>
-DPSEUDO_PURIFY=$<TARGET_FILE:pseudo_purify>
-DPSEUDO_VALGRIND=$<TARGET_FILE:pseudo_valgrind>
+ -DPSEUDO_CUDA_SANITIZER=$<TARGET_FILE:pseudo_cuda-memcheck>
-DPSEUDO_BC_NOLOG=$<TARGET_FILE:pseudonl_BC>
-DPSEUDO_PURIFY_NOLOG=$<TARGET_FILE:pseudonl_purify>
-DPSEUDO_VALGRIND_NOLOG=$<TARGET_FILE:pseudonl_valgrind>
@@ -209,6 +211,7 @@ add_RunCMake_test(DisallowedCommands)
if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
add_RunCMake_test(ExportCompileCommands)
endif()
+add_RunCMake_test(ExcludeFromAll)
add_RunCMake_test(ExternalData)
add_RunCMake_test(FeatureSummary)
add_RunCMake_test(FPHSA)
@@ -235,6 +238,9 @@ add_RunCMake_test(GenEx-GENEX_EVAL)
add_RunCMake_test(GeneratorExpression)
add_RunCMake_test(GeneratorInstance)
add_RunCMake_test(GeneratorPlatform)
+if(XCODE_VERSION)
+ set(GeneratorToolset_ARGS -DXCODE_VERSION=${XCODE_VERSION})
+endif()
add_RunCMake_test(GeneratorToolset)
add_RunCMake_test(GetPrerequisites)
add_RunCMake_test(GNUInstallDirs -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME})
@@ -290,6 +296,7 @@ add_RunCMake_test(add_dependencies)
add_RunCMake_test(add_executable)
add_RunCMake_test(add_library)
add_RunCMake_test(add_subdirectory)
+add_RunCMake_test(add_test)
add_RunCMake_test(build_command)
add_executable(exit_code exit_code.c)
set(execute_process_ARGS -DEXIT_CODE_EXE=$<TARGET_FILE:exit_code>)
@@ -301,9 +308,14 @@ add_RunCMake_test(export)
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(continue)
add_executable(color_warning color_warning.c)
-add_RunCMake_test(ctest_build -DCOLOR_WARNING=$<TARGET_FILE:color_warning>)
+add_executable(fake_build_command fake_build_command.c)
+add_RunCMake_test(ctest_build
+ -DCOLOR_WARNING=$<TARGET_FILE:color_warning>
+ -DFAKE_BUILD_COMMAND_EXE=$<TARGET_FILE:fake_build_command>
+)
add_RunCMake_test(ctest_cmake_error)
add_RunCMake_test(ctest_configure)
if(COVERAGE_COMMAND)
@@ -318,6 +330,7 @@ add_RunCMake_test(ctest_update)
add_RunCMake_test(ctest_upload)
add_RunCMake_test(ctest_fixtures)
add_RunCMake_test(file)
+add_RunCMake_test(file-CHMOD)
add_RunCMake_test(find_file)
add_RunCMake_test(find_library -DCYGWIN=${CYGWIN})
add_RunCMake_test(find_package)
@@ -381,6 +394,7 @@ function(add_RunCMake_test_try_compile)
CMAKE_CXX_COMPILER_VERSION
CMAKE_CXX_STANDARD_DEFAULT
CMake_TEST_CUDA
+ CMake_TEST_ISPC
CMake_TEST_FILESYSTEM_1S
CMAKE_OBJC_STANDARD_DEFAULT
CMAKE_OBJCXX_STANDARD_DEFAULT
@@ -391,7 +405,7 @@ function(add_RunCMake_test_try_compile)
endforeach()
add_RunCMake_test(try_compile)
set_property(TEST RunCMake.try_compile APPEND
- PROPERTY LABELS "CUDA")
+ PROPERTY LABELS "CUDA;ISPC")
endfunction()
add_RunCMake_test_try_compile()
@@ -403,11 +417,12 @@ add_RunCMake_test(while)
add_RunCMake_test(CMP0004)
add_RunCMake_test(TargetPolicies)
add_RunCMake_test(alias_targets)
-add_RunCMake_test(interface_library)
+add_RunCMake_test(InterfaceLibrary)
add_RunCMake_test(no_install_prefix)
add_RunCMake_test(configure_file)
add_RunCMake_test(CTestTimeout -DTIMEOUT=${CTestTestTimeout_TIME})
add_RunCMake_test(CTestTimeoutAfterMatch)
+add_RunCMake_test(DependencyGraph -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER})
# ctresalloc links against CMakeLib and CTestLib, which means it can't be built
# if CMake_TEST_EXTERNAL_CMAKE is activated (the compiler might be different.)
@@ -523,14 +538,29 @@ add_RunCMake_test(target_compile_features)
add_RunCMake_test(target_compile_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_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})
+add_RunCMake_test(CheckSourceCompiles -DCMake_TEST_CUDA=${CMake_TEST_CUDA}
+ -DCMake_TEST_ISPC=${CMake_TEST_ISPC})
+add_RunCMake_test(CheckSourceRuns -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
+set_property(TEST RunCMake.CheckCompilerFlag
+ RunCMake.CheckSourceCompiles
+ RunCMake.CheckSourceRuns
+ APPEND PROPERTY LABELS "CUDA")
+set_property(TEST RunCMake.CheckSourceCompiles
+ RunCMake.CheckCompilerFlag
+ APPEND PROPERTY LABELS "ISPC")
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_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}
+ -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
+ set_property(TEST RunCMake.CheckLinkerFlag APPEND PROPERTY LABELS "CUDA")
endif()
+
add_RunCMake_test(CommandLine -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DCYGWIN=${CYGWIN} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE})
add_RunCMake_test(CommandLineTar)
@@ -545,7 +575,10 @@ add_RunCMake_test(install -DNO_NAMELINK=${NO_NAMELINK} -DCYGWIN=${CYGWIN}
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-DCMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG=${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}
-DCMAKE_EXECUTABLE_FORMAT=${CMAKE_EXECUTABLE_FORMAT}
+ -DCMake_TEST_ISPC=${CMake_TEST_ISPC}
)
+set_property(TEST RunCMake.install APPEND
+ PROPERTY LABELS "ISPC")
add_RunCMake_test(file-GET_RUNTIME_DEPENDENCIES
-DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
@@ -555,6 +588,9 @@ add_RunCMake_test(file-GET_RUNTIME_DEPENDENCIES
add_RunCMake_test(CPackCommandLine)
add_RunCMake_test(CPackConfig)
add_RunCMake_test(CPackInstallProperties)
+if(XCODE_VERSION)
+ set(ExternalProject_ARGS -DXCODE_VERSION=${XCODE_VERSION})
+endif()
add_RunCMake_test(ExternalProject)
add_RunCMake_test(FetchContent)
set(CTestCommandLine_ARGS -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE})
@@ -623,6 +659,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_ISPC)
+ list(APPEND CompilerLauncher_ARGS -DCMake_TEST_ISPC=${CMake_TEST_ISPC})
+ endif()
if(CMAKE_Fortran_COMPILER)
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_Fortran=1)
endif()
@@ -631,8 +670,9 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
endif()
add_RunCMake_test(CompilerLauncher)
set_property(TEST RunCMake.CompilerLauncher APPEND
- PROPERTY LABELS "CUDA")
+ PROPERTY LABELS "CUDA;ISPC")
add_RunCMake_test(ctest_labels_for_subprojects)
+ add_RunCMake_test(CompilerArgs)
endif()
set(cpack_tests
@@ -698,8 +738,8 @@ add_RunCMake_test(AutoExportDll
add_RunCMake_test(AndroidMK)
if(CMake_TEST_ANDROID_NDK OR CMake_TEST_ANDROID_STANDALONE_TOOLCHAIN)
- if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
- message(FATAL_ERROR "Android tests supported only by Makefile and Ninja generators")
+ if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja|Visual Studio 1[456]")
+ message(FATAL_ERROR "Android tests supported only by Makefile, Ninja, and Visual Studio >= 14 generators")
endif()
foreach(v TEST_ANDROID_NDK TEST_ANDROID_STANDALONE_TOOLCHAIN)
if(CMake_${v})
@@ -725,5 +765,12 @@ endif()
add_RunCMake_test("CTestCommandExpandLists")
-add_RunCMake_test(PrecompileHeaders -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
+add_RunCMake_test(PrecompileHeaders -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
+ -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION})
+
add_RunCMake_test("UnityBuild")
+add_RunCMake_test(CMakePresets -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA})
+
+if(WIN32)
+ add_RunCMake_test(Win32GenEx)
+endif()
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-result.txt b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyDefault-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-result.txt
+++ b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyDefault-result.txt
diff --git a/Tests/RunCMake/CMakePresets/ArchToolsetStrategyDefault-stderr.txt b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyDefault-stderr.txt
new file mode 100644
index 000000000..a3b79b638
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyDefault-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Error at CMakeLists\.txt:[0-9]+ \(project\):
+ Generator
+
+ [^
+]*
+
+ does not support platform specification, but platform
+
+ a
+
+ was specified\.$
diff --git a/Tests/RunCMake/CMakePresets/ArchToolsetStrategyIgnore.cmake b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyIgnore.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyIgnore.cmake
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-result.txt b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyNone-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-result.txt
+++ b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyNone-result.txt
diff --git a/Tests/RunCMake/CMakePresets/ArchToolsetStrategyNone-stderr.txt b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyNone-stderr.txt
new file mode 100644
index 000000000..a3b79b638
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ArchToolsetStrategyNone-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Error at CMakeLists\.txt:[0-9]+ \(project\):
+ Generator
+
+ [^
+]*
+
+ does not support platform specification, but platform
+
+ a
+
+ was specified\.$
diff --git a/Tests/RunCMake/CMakePresets/CMakeLists.txt.in b/Tests/RunCMake/CMakePresets/CMakeLists.txt.in
new file mode 100644
index 000000000..67c2d48d0
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CMakeLists.txt.in
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 3.18)
+project(${RunCMake_TEST} NONE)
+set(RunCMake_SOURCE_DIR [==[@RunCMake_SOURCE_DIR@]==])
+include("${RunCMake_SOURCE_DIR}/${RunCMake_TEST}.cmake")
diff --git a/Tests/RunCMake/CMakePresets/CMakePresets.json.in b/Tests/RunCMake/CMakePresets/CMakePresets.json.in
new file mode 100644
index 000000000..54e41403e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CMakePresets.json.in
@@ -0,0 +1,504 @@
+/*
+ * Block comment
+ */
+{
+ // Inline comment
+ "version": 1,
+ "cmakeMinimumRequired": {
+ "major": 3,
+ "minor": 18,
+ "patch": 0
+ },
+ "vendor": {
+ "example.com/ExampleIDE/1.0": true
+ },
+ "configurePresets": [
+ {
+ "name": "Good",
+ "displayName": "Good Preset",
+ "description": "This preset is meant to test most of the fields when set correctly.",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cmakeExecutable": "/path/does/not/exist/cmake",
+ "vendor": {
+ "example.com/ExampleIDE/1.0": {
+ "transmogrify": true
+ }
+ },
+ "cacheVariables": {
+ "TEST_SOURCE_DIR": {
+ "type": "PATH",
+ "value": "${sourceDir}"
+ },
+ "TEST_SOURCE_PARENT_DIR": {
+ "type": "PATH",
+ "value": "${sourceParentDir}"
+ },
+ "TEST_SOURCE_LIST": {
+ "type": "FILEPATH",
+ "value": "${sourceDir}/CMakeLists.txt"
+ },
+ "TEST_TRUE": {
+ "type": "BOOL",
+ "value": "TRUE"
+ },
+ "TEST_OFF": {
+ "type": "BOOL",
+ "value": "OFF"
+ },
+ "TEST_BOOL_TRUE": true,
+ "TEST_BOOL_FALSE": false,
+ "TEST_TYPED_BOOL_TRUE": {
+ "type": "STRING",
+ "value": true
+ },
+ "TEST_TYPED_BOOL_FALSE": {
+ "type": "STRING",
+ "value": false
+ },
+ "TEST_UNTYPED_BOOL_TRUE": {
+ "value": true
+ },
+ "TEST_UNTYPED_BOOL_FALSE": {
+ "value": false
+ },
+ "TEST_PRESET_NAME": {
+ "type": "STRING",
+ "value": "x${presetName}x"
+ },
+ "TEST_GENERATOR": {
+ "value": "x${generator}x"
+ },
+ "TEST_DOLLAR": {
+ "value": "${dollar}"
+ },
+ "TEST_SOURCE_DIR_NAME": "${sourceDirName}",
+ "TEST_ENV_REF": "$env{TEST_ENV_REF}",
+ "TEST_ENV": "$env{TEST_ENV}",
+ "TEST_D_ENV_REF": "$env{TEST_D_ENV_REF}",
+ "TEST_ENV_OVERRIDE": "$env{TEST_ENV_OVERRIDE}",
+ "TEST_PENV": "$env{TEST_PENV}",
+ "TEST_ENV_REF_PENV": "$env{TEST_ENV_REF_PENV}",
+ "TEST_ENV_REF_P": "$penv{TEST_ENV_REF}",
+ "TEST_ENV_P": "$penv{TEST_ENV}",
+ "TEST_D_ENV_REF_P": "$penv{TEST_D_ENV_REF}",
+ "TEST_ENV_OVERRIDE_P": "$penv{TEST_ENV_OVERRIDE}",
+ "TEST_PENV_P": "$penv{TEST_PENV}",
+ "TEST_ENV_REF_PENV_P": "$penv{TEST_ENV_REF_PENV}",
+ "TEST_MULTIPLE_MACROS": "${presetName} ${generator}",
+ "TEST_EXPANSION": "\\${presetName} ${dollar}{dollar} $unknown{namespace} $en{NOT_ENV} $enve{NOT_ENV} $ \\$ $a",
+ "TEST_TRAILING_DOLLAR": "a $",
+ "TEST_TRAILING_BACKSLASH": "a \\",
+ "TEST_TRAILING_UNKNOWN_NAMESPACE": "$unknown{namespace",
+ "TEST_OVERRIDE_1": {
+ "type": "STRING",
+ "value": "Default value"
+ },
+ "TEST_OVERRIDE_2": "Default value",
+ "TEST_OVERRIDE_3": {
+ "type": "STRING",
+ "value": "Default value"
+ },
+ "TEST_OVERRIDE_4": {
+ "type": "STRING",
+ "value": "Default value"
+ },
+ "TEST_UNDEF": "undef"
+ },
+ "environment": {
+ "TEST_ENV_REF": "$env{TEST_ENV}",
+ "TEST_ENV": "Environment variable",
+ "TEST_D_ENV_REF": "x$env{TEST_ENV_REF}x",
+ "TEST_ENV_OVERRIDE": "Overridden environment variable",
+ "TEST_ENV_REF_PENV": "prefix+$penv{TEST_ENV_REF_PENV}",
+ "TEST_PENV": null
+ }
+ },
+ {
+ "name": "GoodNoArgs",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "GoodBinaryUp",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/../GoodBinaryUp-build"
+ },
+ {
+ "name": "GoodBinaryRelative",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "build"
+ },
+ {
+ "name": "Good Spaces",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "GoodWindowsBackslash",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}\\build"
+ },
+ {
+ "name": "GoodBinaryCmdLine",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "GoodGeneratorCmdLine",
+ "generator": "Invalid Generator",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "InvalidGeneratorCmdLine",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "GoodNoS",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "GoodNoSCachePrep",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceParentDir}/GoodNoSCachePrep-build"
+ },
+ {
+ "name": "GoodNoSCache",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "GoodNoSourceArg",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "GoodInheritanceParentBase",
+ "hidden": true,
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "TEST_VARIABLE": {
+ "type": "STRING",
+ "value": "Some string"
+ }
+ },
+ "environment": {
+ "TEST_ENV": "Some environment variable"
+ }
+ },
+ {
+ "name": "GoodInheritanceParent",
+ "inherits": "GoodInheritanceParentBase"
+ },
+ {
+ "name": "GoodInheritanceChildBase",
+ "hidden": true
+ },
+ {
+ "name": "GoodInheritanceChild",
+ "inherits": "GoodInheritanceChildBase",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "TEST_VARIABLE": {
+ "type": "STRING",
+ "value": "Some string"
+ }
+ },
+ "environment": {
+ "TEST_ENV": "Some environment variable"
+ }
+ },
+ {
+ "name": "GoodInheritanceOverrideBase",
+ "hidden": true,
+ "generator": "Invalid Generator",
+ "binaryDir": "${sourceDir}/../GoodInheritanceBase-build",
+ "cacheVariables": {
+ "PARENT_VARIABLE": {
+ "type": "STRING",
+ "value": "Parent variable"
+ },
+ "OVERRIDDEN_VARIABLE": {
+ "type": "BOOL",
+ "value": "ON"
+ },
+ "DELETED_VARIABLE": "This variable will be deleted"
+ },
+ "environment": {
+ "PARENT_ENV": "Parent environment variable",
+ "OVERRIDDEN_ENV": "This environment variable will be overridden",
+ "DELETED_ENV": "This environment variable will be deleted"
+ }
+ },
+ {
+ "name": "GoodInheritanceOverride",
+ "inherits": "GoodInheritanceOverrideBase",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "OVERRIDDEN_VARIABLE": {
+ "type": "STRING",
+ "value": "Overridden variable"
+ },
+ "CHILD_VARIABLE": {
+ "type": "STRING",
+ "value": "Child variable"
+ },
+ "DELETED_VARIABLE": null
+ },
+ "environment": {
+ "OVERRIDDEN_ENV": "Overridden environment variable",
+ "CHILD_ENV": "Child environment variable",
+ "DELETED_ENV": null
+ }
+ },
+ {
+ "name": "GoodInheritanceOverrideDummy",
+ "inherits": "GoodInheritanceOverride"
+ },
+ {
+ "name": "GoodInheritanceMulti1",
+ "hidden": true,
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "FIRST_VARIABLE": {
+ "type": "STRING",
+ "value": "First variable"
+ },
+ "OVERRIDDEN_VARIABLE": {
+ "type": "STRING",
+ "value": "Overridden variable"
+ }
+ },
+ "environment": {
+ "FIRST_ENV": "First environment variable",
+ "OVERRIDDEN_ENV": "Overridden environment variable"
+ }
+ },
+ {
+ "name": "GoodInheritanceMulti2",
+ "hidden": true,
+ "generator": "Invalid Generator",
+ "binaryDir": "${sourceDir}/../GoodInheritanceMulti2-build",
+ "cacheVariables": {
+ "SECOND_VARIABLE": {
+ "type": "STRING",
+ "value": "Second variable"
+ },
+ "OVERRIDDEN_VARIABLE": {
+ "type": "BOOL",
+ "value": "ON"
+ }
+ },
+ "environment": {
+ "SECOND_ENV": "Second environment variable",
+ "OVERRIDDEN_ENV": "This will be overridden"
+ }
+ },
+ {
+ "name": "GoodInheritanceMulti",
+ "inherits": [
+ "GoodInheritanceMulti1",
+ "GoodInheritanceMulti2"
+ ]
+ },
+ {
+ "name": "GoodInheritanceMultiSecond1",
+ "hidden": true
+ },
+ {
+ "name": "GoodInheritanceMultiSecond2",
+ "hidden": true,
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "GoodInheritanceMultiSecond",
+ "inherits": [
+ "GoodInheritanceMultiSecond1",
+ "GoodInheritanceMultiSecond2"
+ ]
+ },
+ {
+ "name": "GoodInheritanceMacroBase",
+ "hidden": true,
+ "cacheVariables": {
+ "PRESET_NAME": "${presetName}"
+ }
+ },
+ {
+ "name": "GoodInheritanceMacro",
+ "inherits": "GoodInheritanceMacroBase",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "VendorMacro",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "$vendor{unknown.unknownMacro}"
+ },
+ {
+ "name": "InvalidGenerator",
+ "generator": "Invalid Generator",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "UseHiddenPreset",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "hidden": true
+ },
+ {
+ "name": "VisualStudioGeneratorArch",
+ "generator": "@RunCMake_GENERATOR@ Win64",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "VisualStudioWin32",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "architecture": "Win32"
+ },
+ {
+ "name": "VisualStudioWin64",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "architecture": "x64"
+ },
+ {
+ "name": "VisualStudioWin32Override",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "architecture": "Win32"
+ },
+ {
+ "name": "VisualStudioToolset",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "toolset": "Test Toolset"
+ },
+ {
+ "name": "VisualStudioToolsetOverride",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "toolset": "Invalid Toolset"
+ },
+ {
+ "name": "VisualStudioInheritanceParentBase",
+ "hidden": true,
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "architecture": "Test Platform",
+ "toolset": "Test Toolset"
+ },
+ {
+ "name": "VisualStudioInheritanceParent",
+ "inherits": "VisualStudioInheritanceParentBase"
+ },
+ {
+ "name": "VisualStudioInheritanceChildBase",
+ "hidden": true
+ },
+ {
+ "name": "VisualStudioInheritanceChild",
+ "inherits": "VisualStudioInheritanceChildBase",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "architecture": "Test Platform",
+ "toolset": "Test Toolset"
+ },
+ {
+ "name": "VisualStudioInheritanceOverrideBase",
+ "hidden": true,
+ "architecture": "Invalid Platform",
+ "toolset": "Invalid Toolset"
+ },
+ {
+ "name": "VisualStudioInheritanceOverride",
+ "inherits": "VisualStudioInheritanceOverrideBase",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "architecture": "Test Platform",
+ "toolset": "Test Toolset"
+ },
+ {
+ "name": "VisualStudioInheritanceMulti1",
+ "hidden": true,
+ "architecture": "Test Platform",
+ "toolset": "Test Toolset"
+ },
+ {
+ "name": "VisualStudioInheritanceMulti2",
+ "hidden": true,
+ "architecture": "Invalid Platform",
+ "toolset": "Invalid Toolset"
+ },
+ {
+ "name": "VisualStudioInheritanceMulti",
+ "inherits": [
+ "VisualStudioInheritanceMulti1",
+ "VisualStudioInheritanceMulti2"
+ ],
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "VisualStudioInheritanceMultiSecond1",
+ "hidden": true
+ },
+ {
+ "name": "VisualStudioInheritanceMultiSecond2",
+ "hidden": true,
+ "architecture": "Test Platform",
+ "toolset": "Test Toolset"
+ },
+ {
+ "name": "VisualStudioInheritanceMultiSecond",
+ "inherits": [
+ "VisualStudioInheritanceMultiSecond1",
+ "VisualStudioInheritanceMultiSecond2"
+ ],
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "ArchToolsetStrategyNone",
+ "generator": "@RunCMake_GENERATOR@",
+ "architecture": "a",
+ "toolset": "a",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "ArchToolsetStrategyBase",
+ "generator": "@RunCMake_GENERATOR@",
+ "architecture": {
+ "value": "a",
+ "strategy": "external"
+ },
+ "toolset": {
+ "value": "a",
+ "strategy": "external"
+ },
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "ArchToolsetStrategyDefault",
+ "inherits": "ArchToolsetStrategyBase",
+ "architecture": {
+ "strategy": "set"
+ },
+ "toolset": {
+ "strategy": "set"
+ }
+ },
+ {
+ "name": "ArchToolsetStrategyIgnore",
+ "inherits": "ArchToolsetStrategyBase"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/CacheOverride.cmake b/Tests/RunCMake/CMakePresets/CacheOverride.cmake
new file mode 100644
index 000000000..d0ebe1754
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CacheOverride.cmake
@@ -0,0 +1,2 @@
+set(TEST_OVERRIDE_3 "Overridden value" CACHE STRING "")
+set(TEST_OVERRIDE_4 "Overridden value" CACHE INTERNAL "")
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-result.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance0-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-result.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance0-result.txt
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt
new file mode 100644
index 000000000..895afcb97
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance0: Cyclic preset inheritance$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance0.json.in b/Tests/RunCMake/CMakePresets/CyclicInheritance0.json.in
new file mode 100644
index 000000000..346893688
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance0.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "CyclicInheritance0",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "inherits": [
+ "CyclicInheritance0"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/interface_library/add_custom_command-TARGET-result.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance1-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/add_custom_command-TARGET-result.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance1-result.txt
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt
new file mode 100644
index 000000000..1e59e92ed
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance1: Cyclic preset inheritance$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance1.json.in b/Tests/RunCMake/CMakePresets/CyclicInheritance1.json.in
new file mode 100644
index 000000000..fabd4af75
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance1.json.in
@@ -0,0 +1,21 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "CyclicInheritance0",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "inherits": [
+ "CyclicInheritance1"
+ ]
+ },
+ {
+ "name": "CyclicInheritance1",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "inherits": [
+ "CyclicInheritance0"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/interface_library/global-interface-result.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance2-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/global-interface-result.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance2-result.txt
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt
new file mode 100644
index 000000000..56e630b52
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance2: Cyclic preset inheritance$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance2.json.in b/Tests/RunCMake/CMakePresets/CyclicInheritance2.json.in
new file mode 100644
index 000000000..0e1d7d418
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance2.json.in
@@ -0,0 +1,29 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "CyclicInheritance0",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "inherits": [
+ "CyclicInheritance1"
+ ]
+ },
+ {
+ "name": "CyclicInheritance1",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "inherits": [
+ "CyclicInheritance2"
+ ]
+ },
+ {
+ "name": "CyclicInheritance2",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "inherits": [
+ "CyclicInheritance0"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/Debug-stderr.txt b/Tests/RunCMake/CMakePresets/Debug-stderr.txt
new file mode 100644
index 000000000..7fdb8b377
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Debug-stderr.txt
@@ -0,0 +1 @@
+ find_package considered the following locations for the Config module:
diff --git a/Tests/RunCMake/CMakePresets/Debug-stdout.txt b/Tests/RunCMake/CMakePresets/Debug-stdout.txt
new file mode 100644
index 000000000..7d1f388de
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Debug-stdout.txt
@@ -0,0 +1,4 @@
+-- Generating [^
+]*/Tests/RunCMake/CMakePresets/Debug/build
+ Called from: \[1\][^
+]*/Tests/RunCMake/CMakePresets/Debug/CMakeLists\.txt
diff --git a/Tests/RunCMake/CMakePresets/Debug.cmake b/Tests/RunCMake/CMakePresets/Debug.cmake
new file mode 100644
index 000000000..19c7db282
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Debug.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/DebugBase.cmake)
+if(NOT EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CMakeLists.txt")
+ message(SEND_ERROR "Debugging try_compile() did not work")
+endif()
diff --git a/Tests/RunCMake/CMakePresets/Debug.json.in b/Tests/RunCMake/CMakePresets/Debug.json.in
new file mode 100644
index 000000000..500700eda
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Debug.json.in
@@ -0,0 +1,19 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "NoDebug",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "Debug",
+ "inherits": "NoDebug",
+ "debug": {
+ "output": true,
+ "find": true,
+ "tryCompile": true
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/DebugBase.cmake b/Tests/RunCMake/CMakePresets/DebugBase.cmake
new file mode 100644
index 000000000..870f31c59
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/DebugBase.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+try_compile(_result ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/main.c)
+find_package(ThisPackageHopefullyDoesNotExist CONFIG)
diff --git a/Tests/RunCMake/CMakePresets/DisableWarningFlags.cmake b/Tests/RunCMake/CMakePresets/DisableWarningFlags.cmake
new file mode 100644
index 000000000..5de76879a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/DisableWarningFlags.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/WarningsBase.cmake)
diff --git a/Tests/RunCMake/CMakePresets/DocumentationExample.cmake b/Tests/RunCMake/CMakePresets/DocumentationExample.cmake
new file mode 100644
index 000000000..d459e9e23
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/DocumentationExample.cmake
@@ -0,0 +1,5 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(FIRST_CACHE_VARIABLE "BOOL" "OFF")
+test_variable(SECOND_CACHE_VARIABLE "UNINITIALIZED" "ON")
+test_environment_variable(MY_ENVIRONMENT_VARIABLE "Test")
diff --git a/Tests/RunCMake/interface_library/invalid_name-result.txt b/Tests/RunCMake/CMakePresets/DuplicatePresets-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/invalid_name-result.txt
+++ b/Tests/RunCMake/CMakePresets/DuplicatePresets-result.txt
diff --git a/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt b/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt
new file mode 100644
index 000000000..c9361aea5
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/DuplicatePresets: Duplicate presets$
diff --git a/Tests/RunCMake/CMakePresets/DuplicatePresets.json.in b/Tests/RunCMake/CMakePresets/DuplicatePresets.json.in
new file mode 100644
index 000000000..cf388e73f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/DuplicatePresets.json.in
@@ -0,0 +1,15 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "DuplicatePresets",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "DuplicatePresets",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/interface_library/invalid_signature-result.txt b/Tests/RunCMake/CMakePresets/EmptyCacheKey-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/invalid_signature-result.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyCacheKey-result.txt
diff --git a/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt
new file mode 100644
index 000000000..749d306de
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/EmptyCacheKey: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/EmptyCacheKey.json.in b/Tests/RunCMake/CMakePresets/EmptyCacheKey.json.in
new file mode 100644
index 000000000..ea9c9e47a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyCacheKey.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "EmptyCacheKey",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "": "value"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/interface_library/target_commands-result.txt b/Tests/RunCMake/CMakePresets/EmptyEnv-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/target_commands-result.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyEnv-result.txt
diff --git a/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt
new file mode 100644
index 000000000..723ac2161
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/EmptyEnv: Invalid macro expansion$
diff --git a/Tests/RunCMake/CMakePresets/EmptyEnv.json.in b/Tests/RunCMake/CMakePresets/EmptyEnv.json.in
new file mode 100644
index 000000000..ef0d5758b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyEnv.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "EmptyEnv",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "MY_VAR": "$env{}"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/interface_library/whitelist-result.txt b/Tests/RunCMake/CMakePresets/EmptyEnvKey-result.txt
index d00491fd7..d00491fd7 100644
--- a/Tests/RunCMake/interface_library/whitelist-result.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyEnvKey-result.txt
diff --git a/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt
new file mode 100644
index 000000000..365f537dc
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/EmptyEnvKey: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/EmptyEnvKey.json.in b/Tests/RunCMake/CMakePresets/EmptyEnvKey.json.in
new file mode 100644
index 000000000..d87c15907
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyEnvKey.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "EmptyEnvKey",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "environment": {
+ "": "value"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/EmptyPenv-result.txt b/Tests/RunCMake/CMakePresets/EmptyPenv-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPenv-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt
new file mode 100644
index 000000000..880cee651
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/EmptyPenv: Invalid macro expansion$
diff --git a/Tests/RunCMake/CMakePresets/EmptyPenv.json.in b/Tests/RunCMake/CMakePresets/EmptyPenv.json.in
new file mode 100644
index 000000000..9081fe513
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPenv.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "EmptyPenv",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "MY_VAR": "$penv{}"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/EmptyPresetName-result.txt b/Tests/RunCMake/CMakePresets/EmptyPresetName-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPresetName-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt
new file mode 100644
index 000000000..6970674c7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/EmptyPresetName: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/EmptyPresetName.json.in b/Tests/RunCMake/CMakePresets/EmptyPresetName.json.in
new file mode 100644
index 000000000..fd4bedd75
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPresetName.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/EnvCycle-result.txt b/Tests/RunCMake/CMakePresets/EnvCycle-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EnvCycle-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt b/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt
new file mode 100644
index 000000000..1d22b8723
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/EnvCycle: Invalid macro expansion$
diff --git a/Tests/RunCMake/CMakePresets/EnvCycle.json.in b/Tests/RunCMake/CMakePresets/EnvCycle.json.in
new file mode 100644
index 000000000..25a134965
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EnvCycle.json.in
@@ -0,0 +1,14 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "EnvCycle",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "environment": {
+ "ENV_1": "$env{ENV_2}",
+ "ENV_2": "$env{ENV_1}"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/ErrorDeprecated-result.txt b/Tests/RunCMake/CMakePresets/ErrorDeprecated-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorDeprecated-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ErrorDeprecated-stderr.txt b/Tests/RunCMake/CMakePresets/ErrorDeprecated-stderr.txt
new file mode 100644
index 000000000..964a5042f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorDeprecated-stderr.txt
@@ -0,0 +1,7 @@
+^CMake Deprecation Error at [^
+]*/Tests/RunCMake/CMakePresets/WarningsBase\.cmake:[0-9]+ \(message\):
+ Deprecation warning
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/CMakePresets/ErrorDeprecated\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CMakePresets/ErrorDeprecated.cmake b/Tests/RunCMake/CMakePresets/ErrorDeprecated.cmake
new file mode 100644
index 000000000..5de76879a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorDeprecated.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/WarningsBase.cmake)
diff --git a/Tests/RunCMake/CMakePresets/ErrorDev-result.txt b/Tests/RunCMake/CMakePresets/ErrorDev-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorDev-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ErrorDev-stderr.txt b/Tests/RunCMake/CMakePresets/ErrorDev-stderr.txt
new file mode 100644
index 000000000..f76478c6d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorDev-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Error \(dev\) at [^
+]*/Tests/RunCMake/CMakePresets/WarningsBase\.cmake:[0-9]+ \(message\):
+ Dev warning
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/CMakePresets/ErrorDev\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)
+This error is for project developers\. Use -Wno-error=dev to suppress it\.$
diff --git a/Tests/RunCMake/CMakePresets/ErrorDev.cmake b/Tests/RunCMake/CMakePresets/ErrorDev.cmake
new file mode 100644
index 000000000..5de76879a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorDev.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/WarningsBase.cmake)
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-result.txt b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt
new file mode 100644
index 000000000..322134549
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated.json.in b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated.json.in
new file mode 100644
index 000000000..664b3eece
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated.json.in
@@ -0,0 +1,16 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "ErrorNoWarningDeprecated",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "warnings": {
+ "deprecated": false
+ },
+ "errors": {
+ "deprecated": true
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-result.txt b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt
new file mode 100644
index 000000000..d2ddb900d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDev: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDev.json.in b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev.json.in
new file mode 100644
index 000000000..d681b2a28
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev.json.in
@@ -0,0 +1,16 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "ErrorNoWarningDev",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "warnings": {
+ "dev": false
+ },
+ "errors": {
+ "dev": true
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/ExtraPresetField-result.txt b/Tests/RunCMake/CMakePresets/ExtraPresetField-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraPresetField-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt
new file mode 100644
index 000000000..559e3c2bd
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/ExtraPresetField: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/ExtraPresetField.json.in b/Tests/RunCMake/CMakePresets/ExtraPresetField.json.in
new file mode 100644
index 000000000..b52975842
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraPresetField.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "ExtraPresetField",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "invalid": true
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/ExtraRootField-result.txt b/Tests/RunCMake/CMakePresets/ExtraRootField-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraRootField-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt
new file mode 100644
index 000000000..bb281beed
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/ExtraRootField: Invalid root object$
diff --git a/Tests/RunCMake/CMakePresets/ExtraRootField.json.in b/Tests/RunCMake/CMakePresets/ExtraRootField.json.in
new file mode 100644
index 000000000..bcfa68b19
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraRootField.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "ExtraRootField",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ],
+ "invalid": true
+}
diff --git a/Tests/RunCMake/CMakePresets/ExtraVariableField-result.txt b/Tests/RunCMake/CMakePresets/ExtraVariableField-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraVariableField-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt
new file mode 100644
index 000000000..9b346e78e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/ExtraVariableField: Invalid CMake variable definition$
diff --git a/Tests/RunCMake/CMakePresets/ExtraVariableField.json.in b/Tests/RunCMake/CMakePresets/ExtraVariableField.json.in
new file mode 100644
index 000000000..a8105603e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ExtraVariableField.json.in
@@ -0,0 +1,16 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "ExtraVariableField",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "EXTRA": {
+ "value": "",
+ "invalid": true
+ }
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/Good-stdout.txt b/Tests/RunCMake/CMakePresets/Good-stdout.txt
new file mode 100644
index 000000000..75003c770
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Good-stdout.txt
@@ -0,0 +1,53 @@
+Preset CMake variables:
+
+ TEST_BOOL_FALSE:BOOL="FALSE"
+ TEST_BOOL_TRUE:BOOL="TRUE"
+ TEST_DOLLAR="\$"
+ TEST_D_ENV_REF="xEnvironment variablex"
+ TEST_D_ENV_REF_P=""
+ TEST_ENV="Environment variable"
+ TEST_ENV_OVERRIDE="Overridden environment variable"
+ TEST_ENV_OVERRIDE_P="This environment variable will be overridden"
+ TEST_ENV_P=""
+ TEST_ENV_REF="Environment variable"
+ TEST_ENV_REF_P=""
+ TEST_ENV_REF_PENV="prefix\+suffix"
+ TEST_ENV_REF_PENV_P="suffix"
+ TEST_EXPANSION="\\Good \${dollar} \$unknown{namespace} \$en{NOT_ENV} \$enve{NOT_ENV} \$ \\\$ \$a"
+ TEST_GENERATOR="x[^
+]*x"
+ TEST_MULTIPLE_MACROS="Good [^
+]*"
+ TEST_OFF:BOOL="OFF"
+ TEST_OVERRIDE_3:STRING="Default value"
+ TEST_OVERRIDE_4:STRING="Default value"
+ TEST_PENV="Process environment variable"
+ TEST_PENV_P="Process environment variable"
+ TEST_PRESET_NAME:STRING="xGoodx"
+ TEST_SOURCE_DIR:PATH="[^
+]*/Tests/RunCMake/CMakePresets/Good"
+ TEST_SOURCE_DIR_NAME="Good"
+ TEST_SOURCE_LIST:FILEPATH="[^
+]*/Tests/RunCMake/CMakePresets/Good/CMakeLists\.txt"
+ TEST_SOURCE_PARENT_DIR:PATH="[^
+]*/Tests/RunCMake/CMakePresets"
+ TEST_TRAILING_BACKSLASH="a \\"
+ TEST_TRAILING_DOLLAR="a \$"
+ TEST_TRAILING_UNKNOWN_NAMESPACE="\$unknown{namespace"
+ TEST_TRUE:BOOL="TRUE"
+ TEST_TYPED_BOOL_FALSE:STRING="FALSE"
+ TEST_TYPED_BOOL_TRUE:STRING="TRUE"
+ TEST_UNTYPED_BOOL_FALSE="FALSE"
+ TEST_UNTYPED_BOOL_TRUE="TRUE"
+
+Preset environment variables:
+
+ TEST_D_ENV_REF="xEnvironment variablex"
+ TEST_ENV="Environment variable"
+ TEST_ENV_OVERRIDE="Overridden environment variable"
+ TEST_ENV_REF="Environment variable"
+ TEST_ENV_REF_PENV="prefix\+suffix"
+
+(-- Selecting Windows SDK version [^
+]*
+)?-- Configuring done
diff --git a/Tests/RunCMake/CMakePresets/Good.cmake b/Tests/RunCMake/CMakePresets/Good.cmake
new file mode 100644
index 000000000..73a618d54
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Good.cmake
@@ -0,0 +1,52 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent_dir "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${CMAKE_SOURCE_DIR}/build")
+test_variable(CMAKE_GENERATOR "" "${RunCMake_GENERATOR}")
+test_variable(TEST_SOURCE_DIR "PATH" "${CMAKE_SOURCE_DIR}")
+test_variable(TEST_SOURCE_PARENT_DIR "PATH" "${_parent_dir}")
+test_variable(TEST_SOURCE_LIST "FILEPATH" "${CMAKE_SOURCE_DIR}/CMakeLists.txt")
+test_variable(TEST_TRUE "BOOL" "TRUE")
+test_variable(TEST_OFF "BOOL" "OFF")
+test_variable(TEST_BOOL_TRUE "BOOL" "TRUE")
+test_variable(TEST_BOOL_FALSE "BOOL" "FALSE")
+test_variable(TEST_TYPED_BOOL_TRUE "STRING" "TRUE")
+test_variable(TEST_TYPED_BOOL_FALSE "STRING" "FALSE")
+test_variable(TEST_UNTYPED_BOOL_TRUE "UNINITIALIZED" "TRUE")
+test_variable(TEST_UNTYPED_BOOL_FALSE "UNINITIALIZED" "FALSE")
+test_variable(TEST_PRESET_NAME "STRING" "xGoodx")
+test_variable(TEST_GENERATOR "UNINITIALIZED" "x${CMAKE_GENERATOR}x")
+test_variable(TEST_DOLLAR "UNINITIALIZED" "$")
+test_variable(TEST_SOURCE_DIR_NAME "UNINITIALIZED" "Good")
+test_variable(TEST_ENV_REF "UNINITIALIZED" "Environment variable")
+test_variable(TEST_ENV "UNINITIALIZED" "Environment variable")
+test_variable(TEST_D_ENV_REF "UNINITIALIZED" "xEnvironment variablex")
+test_variable(TEST_ENV_OVERRIDE "UNINITIALIZED" "Overridden environment variable")
+test_variable(TEST_PENV "UNINITIALIZED" "Process environment variable")
+test_variable(TEST_ENV_REF_PENV "UNINITIALIZED" "prefix+suffix")
+test_variable(TEST_ENV_REF_P "UNINITIALIZED" "")
+test_variable(TEST_ENV_P "UNINITIALIZED" "")
+test_variable(TEST_D_ENV_REF_P "UNINITIALIZED" "")
+test_variable(TEST_ENV_OVERRIDE_P "UNINITIALIZED" "This environment variable will be overridden")
+test_variable(TEST_PENV_P "UNINITIALIZED" "Process environment variable")
+test_variable(TEST_ENV_REF_PENV_P "UNINITIALIZED" "suffix")
+test_variable(TEST_MULTIPLE_MACROS "UNINITIALIZED" "Good ${CMAKE_GENERATOR}")
+test_variable(TEST_EXPANSION "UNINITIALIZED" "\\Good \${dollar} \$unknown{namespace} \$en{NOT_ENV} \$enve{NOT_ENV} $ \\$ $a")
+test_variable(TEST_TRAILING_DOLLAR "UNINITIALIZED" "a $")
+test_variable(TEST_TRAILING_BACKSLASH "UNINITIALIZED" "a \\")
+test_variable(TEST_TRAILING_UNKNOWN_NAMESPACE "UNINITIALIZED" "\$unknown{namespace")
+test_variable(TEST_OVERRIDE_1 "UNINITIALIZED" "Overridden value")
+test_variable(TEST_OVERRIDE_2 "STRING" "Overridden value")
+test_variable(TEST_OVERRIDE_3 "STRING" "Default value")
+test_variable(TEST_OVERRIDE_4 "INTERNAL" "Overridden value")
+
+if(DEFINED TEST_UNDEF OR DEFINED CACHE{TEST_UNDEF})
+ message(SEND_ERROR "TEST_UNDEF should not be defined")
+endif()
+
+test_environment_variable(TEST_ENV_REF "Environment variable")
+test_environment_variable(TEST_ENV "Environment variable")
+test_environment_variable(TEST_D_ENV_REF "xEnvironment variablex")
+test_environment_variable(TEST_ENV_OVERRIDE "Overridden environment variable")
+test_environment_variable(TEST_PENV "Process environment variable")
+test_environment_variable(TEST_ENV_REF_PENV "prefix+suffix")
diff --git a/Tests/RunCMake/CMakePresets/GoodBOM.cmake b/Tests/RunCMake/CMakePresets/GoodBOM.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodBOM.cmake
diff --git a/Tests/RunCMake/CMakePresets/GoodBOM.json.in b/Tests/RunCMake/CMakePresets/GoodBOM.json.in
new file mode 100644
index 000000000..2152511a7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodBOM.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "GoodBOM",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodBinaryCmdLine.cmake b/Tests/RunCMake/CMakePresets/GoodBinaryCmdLine.cmake
new file mode 100644
index 000000000..9f928fe74
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodBinaryCmdLine.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${_parent}/GoodBinaryCmdLine-build")
diff --git a/Tests/RunCMake/CMakePresets/GoodBinaryRelative.cmake b/Tests/RunCMake/CMakePresets/GoodBinaryRelative.cmake
new file mode 100644
index 000000000..49e7a2550
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodBinaryRelative.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/GoodBinaryUp.cmake b/Tests/RunCMake/CMakePresets/GoodBinaryUp.cmake
new file mode 100644
index 000000000..f7fb2244b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodBinaryUp.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${_parent}/GoodBinaryUp-build")
diff --git a/Tests/RunCMake/CMakePresets/GoodGeneratorCmdLine.cmake b/Tests/RunCMake/CMakePresets/GoodGeneratorCmdLine.cmake
new file mode 100644
index 000000000..4319e7216
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodGeneratorCmdLine.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_GENERATOR "" "${RunCMake_GENERATOR}")
diff --git a/Tests/RunCMake/CMakePresets/GoodInheritanceChild.cmake b/Tests/RunCMake/CMakePresets/GoodInheritanceChild.cmake
new file mode 100644
index 000000000..cfc93be55
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInheritanceChild.cmake
@@ -0,0 +1,6 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_BINARY_DIR "" "${CMAKE_SOURCE_DIR}/build")
+test_variable(TEST_VARIABLE "STRING" "Some string")
+
+test_environment_variable(TEST_ENV "Some environment variable")
diff --git a/Tests/RunCMake/CMakePresets/GoodInheritanceMacro.cmake b/Tests/RunCMake/CMakePresets/GoodInheritanceMacro.cmake
new file mode 100644
index 000000000..96fede094
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInheritanceMacro.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(PRESET_NAME "UNINITIALIZED" "GoodInheritanceMacro")
diff --git a/Tests/RunCMake/CMakePresets/GoodInheritanceMulti.cmake b/Tests/RunCMake/CMakePresets/GoodInheritanceMulti.cmake
new file mode 100644
index 000000000..6430f4d9d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInheritanceMulti.cmake
@@ -0,0 +1,10 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_BINARY_DIR "" "${CMAKE_SOURCE_DIR}/build")
+test_variable(FIRST_VARIABLE "STRING" "First variable")
+test_variable(SECOND_VARIABLE "STRING" "Second variable")
+test_variable(OVERRIDDEN_VARIABLE "STRING" "Overridden variable")
+
+test_environment_variable(FIRST_ENV "First environment variable")
+test_environment_variable(SECOND_ENV "Second environment variable")
+test_environment_variable(OVERRIDDEN_ENV "Overridden environment variable")
diff --git a/Tests/RunCMake/CMakePresets/GoodInheritanceMultiSecond.cmake b/Tests/RunCMake/CMakePresets/GoodInheritanceMultiSecond.cmake
new file mode 100644
index 000000000..49e7a2550
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInheritanceMultiSecond.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/GoodInheritanceOverride.cmake b/Tests/RunCMake/CMakePresets/GoodInheritanceOverride.cmake
new file mode 100644
index 000000000..52318039c
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInheritanceOverride.cmake
@@ -0,0 +1,18 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_BINARY_DIR "" "${CMAKE_SOURCE_DIR}/build")
+test_variable(PARENT_VARIABLE "STRING" "Parent variable")
+test_variable(OVERRIDDEN_VARIABLE "STRING" "Overridden variable")
+test_variable(CHILD_VARIABLE "STRING" "Child variable")
+
+if(DEFINED DELETED_VARIABLE OR DEFINED CACHE{DELETED_VARIABLE})
+ message(SEND_ERROR "DELETED_VARIABLE should not be defined")
+endif()
+
+test_environment_variable(PARENT_ENV "Parent environment variable")
+test_environment_variable(CHILD_ENV "Child environment variable")
+test_environment_variable(OVERRIDDEN_ENV "Overridden environment variable")
+
+if(DEFINED ENV{DELETED_ENV})
+ message(SEND_ERROR "DELETED_ENV should not be defined")
+endif()
diff --git a/Tests/RunCMake/CMakePresets/GoodInheritanceParent.cmake b/Tests/RunCMake/CMakePresets/GoodInheritanceParent.cmake
new file mode 100644
index 000000000..cfc93be55
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodInheritanceParent.cmake
@@ -0,0 +1,6 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_BINARY_DIR "" "${CMAKE_SOURCE_DIR}/build")
+test_variable(TEST_VARIABLE "STRING" "Some string")
+
+test_environment_variable(TEST_ENV "Some environment variable")
diff --git a/Tests/RunCMake/CMakePresets/GoodNoArgs.cmake b/Tests/RunCMake/CMakePresets/GoodNoArgs.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodNoArgs.cmake
diff --git a/Tests/RunCMake/CMakePresets/GoodNoS.cmake b/Tests/RunCMake/CMakePresets/GoodNoS.cmake
new file mode 100644
index 000000000..49e7a2550
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodNoS.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/GoodNoSCache.cmake b/Tests/RunCMake/CMakePresets/GoodNoSCache.cmake
new file mode 100644
index 000000000..df58e72e4
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodNoSCache.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${_parent}/GoodNoSCachePrep-build")
diff --git a/Tests/RunCMake/CMakePresets/GoodNoSCachePrep.cmake b/Tests/RunCMake/CMakePresets/GoodNoSCachePrep.cmake
new file mode 100644
index 000000000..df58e72e4
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodNoSCachePrep.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${_parent}/GoodNoSCachePrep-build")
diff --git a/Tests/RunCMake/CMakePresets/GoodNoSourceArg.cmake b/Tests/RunCMake/CMakePresets/GoodNoSourceArg.cmake
new file mode 100644
index 000000000..49e7a2550
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodNoSourceArg.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/GoodSpaces.cmake b/Tests/RunCMake/CMakePresets/GoodSpaces.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodSpaces.cmake
diff --git a/Tests/RunCMake/CMakePresets/GoodUserFromMain.cmake b/Tests/RunCMake/CMakePresets/GoodUserFromMain.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodUserFromMain.cmake
diff --git a/Tests/RunCMake/CMakePresets/GoodUserFromMain.json.in b/Tests/RunCMake/CMakePresets/GoodUserFromMain.json.in
new file mode 100644
index 000000000..348443e0c
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodUserFromMain.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "GoodUserFromMain",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodUserFromMainUser.json.in b/Tests/RunCMake/CMakePresets/GoodUserFromMainUser.json.in
new file mode 100644
index 000000000..77b4ef624
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodUserFromMainUser.json.in
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "configurePresets": []
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodUserFromUser.cmake b/Tests/RunCMake/CMakePresets/GoodUserFromUser.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodUserFromUser.cmake
diff --git a/Tests/RunCMake/CMakePresets/GoodUserFromUser.json.in b/Tests/RunCMake/CMakePresets/GoodUserFromUser.json.in
new file mode 100644
index 000000000..77b4ef624
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodUserFromUser.json.in
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "configurePresets": []
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodUserFromUserUser.json.in b/Tests/RunCMake/CMakePresets/GoodUserFromUserUser.json.in
new file mode 100644
index 000000000..83196bed9
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodUserFromUserUser.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "GoodUserFromUser",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodUserOnly.cmake b/Tests/RunCMake/CMakePresets/GoodUserOnly.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodUserOnly.cmake
diff --git a/Tests/RunCMake/CMakePresets/GoodUserOnlyUser.json.in b/Tests/RunCMake/CMakePresets/GoodUserOnlyUser.json.in
new file mode 100644
index 000000000..274f4c797
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodUserOnlyUser.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "GoodUserOnly",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/GoodWindowsBackslash.cmake b/Tests/RunCMake/CMakePresets/GoodWindowsBackslash.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/GoodWindowsBackslash.cmake
diff --git a/Tests/RunCMake/CMakePresets/HighVersion-result.txt b/Tests/RunCMake/CMakePresets/HighVersion-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/HighVersion-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt b/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt
new file mode 100644
index 000000000..d8622f212
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/HighVersion: Unrecognized "version" field$
diff --git a/Tests/RunCMake/CMakePresets/HighVersion.json.in b/Tests/RunCMake/CMakePresets/HighVersion.json.in
new file mode 100644
index 000000000..81078424e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/HighVersion.json.in
@@ -0,0 +1,4 @@
+{
+ "version": 1000,
+ "configurePresets": []
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-result.txt b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt
new file mode 100644
index 000000000..4a4d4ce70
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy.json.in b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy.json.in
new file mode 100644
index 000000000..9ec2cee2e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "InvalidArchitectureStrategy",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "architecture": {
+ "strategy": {}
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidGenerator-result.txt b/Tests/RunCMake/CMakePresets/InvalidGenerator-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidGenerator-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidGenerator-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidGenerator-stderr.txt
new file mode 100644
index 000000000..c7dd19b15
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidGenerator-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: Could not create named generator Invalid Generator
+
+Generators
diff --git a/Tests/RunCMake/CMakePresets/InvalidGeneratorCmdLine-result.txt b/Tests/RunCMake/CMakePresets/InvalidGeneratorCmdLine-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidGeneratorCmdLine-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidGeneratorCmdLine-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidGeneratorCmdLine-stderr.txt
new file mode 100644
index 000000000..c7dd19b15
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidGeneratorCmdLine-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: Could not create named generator Invalid Generator
+
+Generators
diff --git a/Tests/RunCMake/CMakePresets/InvalidInheritance-result.txt b/Tests/RunCMake/CMakePresets/InvalidInheritance-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidInheritance-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt
new file mode 100644
index 000000000..97f387673
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidInheritance: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/InvalidInheritance.json.in b/Tests/RunCMake/CMakePresets/InvalidInheritance.json.in
new file mode 100644
index 000000000..77bd9a37a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidInheritance.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "InvalidInheritance",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "inherits": [
+ "NoExist"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-result.txt b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt
new file mode 100644
index 000000000..2fe8c66e9
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir.json.in b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir.json.in
new file mode 100644
index 000000000..2bb95d9c7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "InvalidPresetBinaryDir",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": []
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-result.txt b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt
new file mode 100644
index 000000000..95728752f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidPresetGenerator: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetGenerator.json.in b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator.json.in
new file mode 100644
index 000000000..95e6e65b2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "InvalidPresetGenerator",
+ "generator": [],
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetName-result.txt b/Tests/RunCMake/CMakePresets/InvalidPresetName-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetName-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt
new file mode 100644
index 000000000..8f6ff7c1d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidPresetName: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetName.json.in b/Tests/RunCMake/CMakePresets/InvalidPresetName.json.in
new file mode 100644
index 000000000..08361da50
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetName.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": [],
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetVendor-result.txt b/Tests/RunCMake/CMakePresets/InvalidPresetVendor-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetVendor-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt
new file mode 100644
index 000000000..89a424ab9
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidPresetVendor: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetVendor.json.in b/Tests/RunCMake/CMakePresets/InvalidPresetVendor.json.in
new file mode 100644
index 000000000..2a5d9ba7c
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetVendor.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "InvalidPresetVendor",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "vendor": true
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresets-result.txt b/Tests/RunCMake/CMakePresets/InvalidPresets-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresets-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt
new file mode 100644
index 000000000..2b0f5603e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidPresets: Invalid "configurePresets" field$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresets.json.in b/Tests/RunCMake/CMakePresets/InvalidPresets.json.in
new file mode 100644
index 000000000..facfd57c1
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidPresets.json.in
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "configurePresets": {}
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidRoot-result.txt b/Tests/RunCMake/CMakePresets/InvalidRoot-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidRoot-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt
new file mode 100644
index 000000000..e5c434d9b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidRoot: Invalid root object$
diff --git a/Tests/RunCMake/CMakePresets/InvalidRoot.json.in b/Tests/RunCMake/CMakePresets/InvalidRoot.json.in
new file mode 100644
index 000000000..fe51488c7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidRoot.json.in
@@ -0,0 +1 @@
+[]
diff --git a/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-result.txt b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt
new file mode 100644
index 000000000..fab376620
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy.json.in b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy.json.in
new file mode 100644
index 000000000..7d2ab1f35
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "InvalidToolsetStrategy",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "toolset": {
+ "strategy": {}
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariableValue-result.txt b/Tests/RunCMake/CMakePresets/InvalidVariableValue-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVariableValue-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt
new file mode 100644
index 000000000..0ab07c3d0
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidVariableValue: Invalid CMake variable definition$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariableValue.json.in b/Tests/RunCMake/CMakePresets/InvalidVariableValue.json.in
new file mode 100644
index 000000000..55c7644dd
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVariableValue.json.in
@@ -0,0 +1,15 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "InvalidVariableValue",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "VAR": {
+ "value": []
+ }
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariables-result.txt b/Tests/RunCMake/CMakePresets/InvalidVariables-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVariables-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt
new file mode 100644
index 000000000..6d9102a14
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidVariables: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariables.json.in b/Tests/RunCMake/CMakePresets/InvalidVariables.json.in
new file mode 100644
index 000000000..30dcaf0ae
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVariables.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "InvalidVariables",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": []
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidVendor-result.txt b/Tests/RunCMake/CMakePresets/InvalidVendor-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVendor-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt
new file mode 100644
index 000000000..af923f0ba
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidVendor: Invalid root object$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVendor.json.in b/Tests/RunCMake/CMakePresets/InvalidVendor.json.in
new file mode 100644
index 000000000..2315b7298
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVendor.json.in
@@ -0,0 +1,5 @@
+{
+ "version": 1,
+ "vendor": true,
+ "configurePresets": []
+}
diff --git a/Tests/RunCMake/CMakePresets/InvalidVersion-result.txt b/Tests/RunCMake/CMakePresets/InvalidVersion-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVersion-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt
new file mode 100644
index 000000000..7e0fcfdd2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/InvalidVersion: Invalid "version" field$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVersion.json.in b/Tests/RunCMake/CMakePresets/InvalidVersion.json.in
new file mode 100644
index 000000000..e6e19bc6e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/InvalidVersion.json.in
@@ -0,0 +1,4 @@
+{
+ "version": "1.0",
+ "configurePresets": []
+}
diff --git a/Tests/RunCMake/CMakePresets/JSONParseError-result.txt b/Tests/RunCMake/CMakePresets/JSONParseError-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/JSONParseError-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt b/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt
new file mode 100644
index 000000000..a43bf77be
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/JSONParseError: JSON parse error$
diff --git a/Tests/RunCMake/CMakePresets/JSONParseError.json.in b/Tests/RunCMake/CMakePresets/JSONParseError.json.in
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/JSONParseError.json.in
diff --git a/Tests/RunCMake/CMakePresets/ListPresets-stdout.txt b/Tests/RunCMake/CMakePresets/ListPresets-stdout.txt
new file mode 100644
index 000000000..1758f334d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresets-stdout.txt
@@ -0,0 +1,6 @@
+^Not searching for unused variables given on the command line\.
+Available presets:
+
+ "zzzzzz" - Sleepy
+ "aaaaaaaa" - Screaming
+ "mmmmmm"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresets.json.in b/Tests/RunCMake/CMakePresets/ListPresets.json.in
new file mode 100644
index 000000000..2ef3797da
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresets.json.in
@@ -0,0 +1,36 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "zzzzzz",
+ "displayName": "Sleepy",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build/zzzzzz"
+ },
+ {
+ "name": "aaaaaaaa",
+ "displayName": "Screaming",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build/aaaaaaaa"
+ },
+ {
+ "name": "mmmmmm",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build/mmmmmm"
+ },
+ {
+ "name": "invalid-generator",
+ "generator": "Invalid Generator",
+ "binaryDir": "${sourceDir}/build/invalid"
+ },
+ {
+ "name": "invalid-macro",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "$vendor{noexist}"
+ },
+ {
+ "name": "ListPresetsHidden",
+ "hidden": true
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsHidden-result.txt b/Tests/RunCMake/CMakePresets/ListPresetsHidden-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresetsHidden-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsHidden-stderr.txt b/Tests/RunCMake/CMakePresets/ListPresetsHidden-stderr.txt
new file mode 100644
index 000000000..140381422
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresetsHidden-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Cannot use hidden preset in [^
+]*/Tests/RunCMake/CMakePresets/ListPresetsHidden: "ListPresetsHidden"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt b/Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt
new file mode 100644
index 000000000..1758f334d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresetsHidden-stdout.txt
@@ -0,0 +1,6 @@
+^Not searching for unused variables given on the command line\.
+Available presets:
+
+ "zzzzzz" - Sleepy
+ "aaaaaaaa" - Screaming
+ "mmmmmm"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-result.txt b/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stderr.txt b/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stderr.txt
new file mode 100644
index 000000000..eea1b99c1
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: No such preset in [^
+]*/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset: "ListPresetsNoSuchPreset"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt b/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt
new file mode 100644
index 000000000..1758f334d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresetsNoSuchPreset-stdout.txt
@@ -0,0 +1,6 @@
+^Not searching for unused variables given on the command line\.
+Available presets:
+
+ "zzzzzz" - Sleepy
+ "aaaaaaaa" - Screaming
+ "mmmmmm"$
diff --git a/Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt b/Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt
new file mode 100644
index 000000000..1758f334d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/ListPresetsWorkingDir-stdout.txt
@@ -0,0 +1,6 @@
+^Not searching for unused variables given on the command line\.
+Available presets:
+
+ "zzzzzz" - Sleepy
+ "aaaaaaaa" - Screaming
+ "mmmmmm"$
diff --git a/Tests/RunCMake/CMakePresets/LowVersion-result.txt b/Tests/RunCMake/CMakePresets/LowVersion-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/LowVersion-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt b/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt
new file mode 100644
index 000000000..92b3723e1
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/LowVersion: Unrecognized "version" field$
diff --git a/Tests/RunCMake/CMakePresets/LowVersion.json.in b/Tests/RunCMake/CMakePresets/LowVersion.json.in
new file mode 100644
index 000000000..e03afa998
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/LowVersion.json.in
@@ -0,0 +1,4 @@
+{
+ "version": 0,
+ "configurePresets": []
+}
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredEmpty.cmake b/Tests/RunCMake/CMakePresets/MinimumRequiredEmpty.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredEmpty.cmake
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredEmpty.json.in b/Tests/RunCMake/CMakePresets/MinimumRequiredEmpty.json.in
new file mode 100644
index 000000000..37740ef6a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredEmpty.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 1,
+ "cmakeMinimumRequired": {},
+ "configurePresets": [
+ {
+ "name": "MinimumRequiredEmpty",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-result.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt
new file mode 100644
index 000000000..6548cafe2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid: Invalid "cmakeMinimumRequired" field$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid.json.in b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid.json.in
new file mode 100644
index 000000000..da7960311
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 1,
+ "cmakeMinimumRequired": "3.18",
+ "configurePresets": [
+ {
+ "name": "MinimumRequiredInvalid",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-result.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt
new file mode 100644
index 000000000..6036fe3ae
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredMajor: "cmakeMinimumRequired" version too new$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMajor.json.in b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor.json.in
new file mode 100644
index 000000000..a17cdf6a4
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "cmakeMinimumRequired": {
+ "major": 1000
+ },
+ "configurePresets": [
+ {
+ "name": "MinimumRequiredMajor",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-result.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt
new file mode 100644
index 000000000..bdee4cdeb
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredMinor: "cmakeMinimumRequired" version too new$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMinor.json.in b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor.json.in
new file mode 100644
index 000000000..33a88164f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor.json.in
@@ -0,0 +1,14 @@
+{
+ "version": 1,
+ "cmakeMinimumRequired": {
+ "major": @CMAKE_MAJOR_VERSION@,
+ "minor": 1000
+ },
+ "configurePresets": [
+ {
+ "name": "MinimumRequiredMinor",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-result.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt
new file mode 100644
index 000000000..b5d3a393f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredPatch: "cmakeMinimumRequired" version too new$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredPatch.json.in b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch.json.in
new file mode 100644
index 000000000..4a53f8dcc
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch.json.in
@@ -0,0 +1,15 @@
+{
+ "version": 1,
+ "cmakeMinimumRequired": {
+ "major": @CMAKE_MAJOR_VERSION@,
+ "minor": @CMAKE_MINOR_VERSION@,
+ "patch": 50000000
+ },
+ "configurePresets": [
+ {
+ "name": "MinimumRequiredPatch",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/NoCMakePresets-result.txt b/Tests/RunCMake/CMakePresets/NoCMakePresets-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoCMakePresets-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt b/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt
new file mode 100644
index 000000000..c807ffc98
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/NoCMakePresets: File not found$
diff --git a/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt b/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt
new file mode 100644
index 000000000..c23ab89f2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt
@@ -0,0 +1,2 @@
+-- Configuring done
+-- Generating done
diff --git a/Tests/RunCMake/CMakePresets/NoDebug.cmake b/Tests/RunCMake/CMakePresets/NoDebug.cmake
new file mode 100644
index 000000000..f2b3d4aea
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoDebug.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/DebugBase.cmake)
+if(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CMakeLists.txt")
+ message(SEND_ERROR "Not debugging try_compile() did not work")
+endif()
diff --git a/Tests/RunCMake/CMakePresets/NoPresetArgument-result.txt b/Tests/RunCMake/CMakePresets/NoPresetArgument-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetArgument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoPresetArgument-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetArgument-stderr.txt
new file mode 100644
index 000000000..aef30d2af
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetArgument-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: No preset specified for --preset$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-result.txt b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt
new file mode 100644
index 000000000..b525fc322
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/NoPresetBinaryDir: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetBinaryDir.json.in b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir.json.in
new file mode 100644
index 000000000..8989cfd18
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir.json.in
@@ -0,0 +1,9 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "NoPresetBinaryDir",
+ "generator": "@RunCMake_GENERATOR@"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/NoPresetGenerator-result.txt b/Tests/RunCMake/CMakePresets/NoPresetGenerator-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetGenerator-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt
new file mode 100644
index 000000000..6c0c9f77a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/NoPresetGenerator: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetGenerator.json.in b/Tests/RunCMake/CMakePresets/NoPresetGenerator.json.in
new file mode 100644
index 000000000..74f83b7e4
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetGenerator.json.in
@@ -0,0 +1,9 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "NoPresetGenerator",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/NoPresetName-result.txt b/Tests/RunCMake/CMakePresets/NoPresetName-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetName-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt
new file mode 100644
index 000000000..0ee338a36
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/NoPresetName: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetName.json.in b/Tests/RunCMake/CMakePresets/NoPresetName.json.in
new file mode 100644
index 000000000..373591dcd
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresetName.json.in
@@ -0,0 +1,9 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/NoPresets-result.txt b/Tests/RunCMake/CMakePresets/NoPresets-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresets-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoPresets-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresets-stderr.txt
new file mode 100644
index 000000000..5ff3d3339
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresets-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: No such preset in [^
+]*/Tests/RunCMake/CMakePresets/NoPresets: "NoPresets"$
diff --git a/Tests/RunCMake/CMakePresets/NoPresets-stdout.txt b/Tests/RunCMake/CMakePresets/NoPresets-stdout.txt
new file mode 100644
index 000000000..cb01a02df
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresets-stdout.txt
@@ -0,0 +1 @@
+^Not searching for unused variables given on the command line\.$
diff --git a/Tests/RunCMake/CMakePresets/NoPresets.json.in b/Tests/RunCMake/CMakePresets/NoPresets.json.in
new file mode 100644
index 000000000..61a2092b1
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoPresets.json.in
@@ -0,0 +1,3 @@
+{
+ "version": 1
+}
diff --git a/Tests/RunCMake/CMakePresets/NoSuchMacro-result.txt b/Tests/RunCMake/CMakePresets/NoSuchMacro-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoSuchMacro-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt b/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt
new file mode 100644
index 000000000..7dafe623d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/NoSuchMacro: Invalid macro expansion$
diff --git a/Tests/RunCMake/CMakePresets/NoSuchMacro.json.in b/Tests/RunCMake/CMakePresets/NoSuchMacro.json.in
new file mode 100644
index 000000000..94d0b764b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoSuchMacro.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "NoSuchMacro",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${noexist}"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/NoSuchPreset-result.txt b/Tests/RunCMake/CMakePresets/NoSuchPreset-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoSuchPreset-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoSuchPreset-stderr.txt b/Tests/RunCMake/CMakePresets/NoSuchPreset-stderr.txt
new file mode 100644
index 000000000..9a2d0d5bd
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoSuchPreset-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: No such preset in [^
+]*/Tests/RunCMake/CMakePresets/NoSuchPreset: "NoSuchPreset"$
diff --git a/Tests/RunCMake/CMakePresets/NoVariableValue-result.txt b/Tests/RunCMake/CMakePresets/NoVariableValue-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoVariableValue-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt b/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt
new file mode 100644
index 000000000..cdab32f7b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/NoVariableValue: Invalid CMake variable definition$
diff --git a/Tests/RunCMake/CMakePresets/NoVariableValue.json.in b/Tests/RunCMake/CMakePresets/NoVariableValue.json.in
new file mode 100644
index 000000000..482700de5
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoVariableValue.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "NoVariableValue",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "VAR": {}
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/NoVersion-result.txt b/Tests/RunCMake/CMakePresets/NoVersion-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoVersion-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt b/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt
new file mode 100644
index 000000000..d4f07e499
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/NoVersion: No "version" field$
diff --git a/Tests/RunCMake/CMakePresets/NoVersion.json.in b/Tests/RunCMake/CMakePresets/NoVersion.json.in
new file mode 100644
index 000000000..3fe8332e4
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoVersion.json.in
@@ -0,0 +1,3 @@
+{
+ "configurePresets": []
+}
diff --git a/Tests/RunCMake/CMakePresets/NoWarningFlags-stderr.txt b/Tests/RunCMake/CMakePresets/NoWarningFlags-stderr.txt
new file mode 100644
index 000000000..a16d362f0
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoWarningFlags-stderr.txt
@@ -0,0 +1,23 @@
+^CMake Warning \(dev\) at [^
+]*/Tests/RunCMake/CMakePresets/WarningsBase\.cmake:[0-9]+ \(message\):
+ Dev warning
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/CMakePresets/NoWarningFlags\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.
+
+CMake Deprecation Warning at [^
+]*/Tests/RunCMake/CMakePresets/WarningsBase\.cmake:[0-9]+ \(message\):
+ Deprecation warning
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/CMakePresets/NoWarningFlags\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)
+
+
+CMake Warning:
+ Manually-specified variables were not used by the project:
+
+ RunCMake_GENERATOR
+ UNUSED_VARIABLE$
diff --git a/Tests/RunCMake/CMakePresets/NoWarningFlags.cmake b/Tests/RunCMake/CMakePresets/NoWarningFlags.cmake
new file mode 100644
index 000000000..5de76879a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoWarningFlags.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/WarningsBase.cmake)
diff --git a/Tests/RunCMake/CMakePresets/PresetNotObject-result.txt b/Tests/RunCMake/CMakePresets/PresetNotObject-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/PresetNotObject-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt b/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt
new file mode 100644
index 000000000..6604a14c0
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/PresetNotObject: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/PresetNotObject.json.in b/Tests/RunCMake/CMakePresets/PresetNotObject.json.in
new file mode 100644
index 000000000..d5892fc6d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/PresetNotObject.json.in
@@ -0,0 +1,6 @@
+{
+ "version": 1,
+ "configurePresets": [
+ []
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
new file mode 100644
index 000000000..1ffda3d62
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
@@ -0,0 +1,272 @@
+cmake_minimum_required(VERSION 3.19) # CMP0053
+
+include(RunCMake)
+
+# Fix Visual Studio generator name
+if(RunCMake_GENERATOR MATCHES "^(Visual Studio [0-9]+ [0-9]+) ")
+ set(RunCMake_GENERATOR "${CMAKE_MATCH_1}")
+endif()
+
+set(RunCMake-check-file check.cmake)
+
+function(validate_schema file expected_result)
+ execute_process(
+ COMMAND "${PYTHON_EXECUTABLE}" "${RunCMake_SOURCE_DIR}/validate_schema.py" "${file}"
+ RESULT_VARIABLE _result
+ OUTPUT_VARIABLE _output
+ ERROR_VARIABLE _error
+ )
+ if(NOT _result STREQUAL expected_result)
+ string(REPLACE "\n" "\n" _output_p "${_output}")
+ string(REPLACE "\n" "\n" _error_p "${_error}")
+ string(APPEND RunCMake_TEST_FAILED "Expected result of validating ${file}: ${expected_result}\nActual result: ${_result}\nOutput:\n${_output_p}\nError:\n${_error_p}")
+ endif()
+
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+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}")
+ configure_file("${RunCMake_SOURCE_DIR}/CMakeLists.txt.in" "${RunCMake_TEST_SOURCE_DIR}/CMakeLists.txt" @ONLY)
+
+ if(NOT CMakePresets_FILE)
+ set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/${name}.json.in")
+ endif()
+ if(EXISTS "${CMakePresets_FILE}")
+ configure_file("${CMakePresets_FILE}" "${RunCMake_TEST_SOURCE_DIR}/CMakePresets.json" @ONLY)
+ endif()
+
+ if(NOT CMakeUserPresets_FILE)
+ set(CMakeUserPresets_FILE "${RunCMake_SOURCE_DIR}/${name}User.json.in")
+ endif()
+ if(EXISTS "${CMakeUserPresets_FILE}")
+ configure_file("${CMakeUserPresets_FILE}" "${RunCMake_TEST_SOURCE_DIR}/CMakeUserPresets.json" @ONLY)
+ endif()
+
+ set(_s_arg -S)
+ if(CMakePresets_NO_S_ARG)
+ set(_s_arg)
+ endif()
+ set(_source_args ${_s_arg} ${_source_arg})
+ if(CMakePresets_NO_SOURCE_ARGS)
+ set(_source_args)
+ endif()
+ set(_unused_cli --no-warn-unused-cli)
+ if(CMakePresets_WARN_UNUSED_CLI)
+ set(_unused_cli)
+ endif()
+
+ set(RunCMake_TEST_COMMAND ${CMAKE_COMMAND}
+ ${_source_args}
+ -DRunCMake_TEST=${name}
+ -DRunCMake_GENERATOR=${RunCMake_GENERATOR}
+ -DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}
+ ${_unused_cli}
+ --preset=${name}
+ ${ARGN}
+ )
+ run_cmake(${name})
+endfunction()
+
+# Test CMakePresets.json errors
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+run_cmake_presets(NoCMakePresets)
+run_cmake_presets(JSONParseError)
+run_cmake_presets(InvalidRoot)
+run_cmake_presets(NoVersion)
+run_cmake_presets(InvalidVersion)
+run_cmake_presets(LowVersion)
+run_cmake_presets(HighVersion)
+run_cmake_presets(InvalidVendor)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
+run_cmake_presets(NoPresets)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+run_cmake_presets(InvalidPresets)
+run_cmake_presets(PresetNotObject)
+run_cmake_presets(NoPresetName)
+run_cmake_presets(InvalidPresetName)
+run_cmake_presets(EmptyPresetName)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
+run_cmake_presets(NoPresetGenerator)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+run_cmake_presets(InvalidPresetGenerator)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
+run_cmake_presets(NoPresetBinaryDir)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+run_cmake_presets(InvalidPresetBinaryDir)
+run_cmake_presets(InvalidVariables)
+run_cmake_presets(VariableNotObject)
+run_cmake_presets(NoVariableValue)
+run_cmake_presets(InvalidVariableValue)
+run_cmake_presets(ExtraRootField)
+run_cmake_presets(ExtraPresetField)
+run_cmake_presets(ExtraVariableField)
+run_cmake_presets(InvalidPresetVendor)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
+run_cmake_presets(DuplicatePresets)
+run_cmake_presets(CyclicInheritance0)
+run_cmake_presets(CyclicInheritance1)
+run_cmake_presets(CyclicInheritance2)
+run_cmake_presets(InvalidInheritance)
+run_cmake_presets(ErrorNoWarningDev)
+run_cmake_presets(ErrorNoWarningDeprecated)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+run_cmake_presets(InvalidArchitectureStrategy)
+run_cmake_presets(UnknownArchitectureStrategy)
+run_cmake_presets(InvalidToolsetStrategy)
+run_cmake_presets(UnknownToolsetStrategy)
+run_cmake_presets(EmptyCacheKey)
+run_cmake_presets(EmptyEnvKey)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
+run_cmake_presets(UnclosedMacro)
+run_cmake_presets(NoSuchMacro)
+run_cmake_presets(EnvCycle)
+run_cmake_presets(EmptyEnv)
+run_cmake_presets(EmptyPenv)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+
+# Test cmakeMinimumRequired field
+run_cmake_presets(MinimumRequiredInvalid)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
+run_cmake_presets(MinimumRequiredEmpty)
+run_cmake_presets(MinimumRequiredMajor)
+run_cmake_presets(MinimumRequiredMinor)
+run_cmake_presets(MinimumRequiredPatch)
+
+# Test properly working CMakePresets.json
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/CMakePresets.json.in")
+unset(ENV{TEST_ENV})
+unset(ENV{TEST_ENV_REF})
+unset(ENV{TEST_D_ENV_REF})
+set(ENV{TEST_ENV_OVERRIDE} "This environment variable will be overridden")
+set(ENV{TEST_PENV} "Process environment variable")
+set(ENV{TEST_ENV_REF_PENV} "suffix")
+run_cmake_presets(Good "-DTEST_OVERRIDE_1=Overridden value" "-DTEST_OVERRIDE_2:STRING=Overridden value" -C "${RunCMake_SOURCE_DIR}/CacheOverride.cmake" "-UTEST_UNDEF")
+unset(ENV{TEST_ENV_OVERRIDE})
+unset(ENV{TEST_PENV})
+unset(ENV{TEST_ENV_REF_PENV})
+run_cmake_presets(GoodNoArgs)
+file(REMOVE_RECURSE ${RunCMake_BINARY_DIR}/GoodBinaryUp-build)
+run_cmake_presets(GoodBinaryUp)
+set(CMakePresets_SOURCE_ARG "../GoodBinaryRelative")
+run_cmake_presets(GoodBinaryRelative)
+unset(CMakePresets_SOURCE_ARG)
+run_cmake_presets(GoodSpaces "--preset=Good Spaces")
+if(WIN32)
+ run_cmake_presets(GoodWindowsBackslash)
+endif()
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/GoodBOM.json.in")
+run_cmake_presets(GoodBOM)
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/CMakePresets.json.in")
+file(REMOVE_RECURSE ${RunCMake_BINARY_DIR}/GoodBinaryCmdLine-build)
+run_cmake_presets(GoodBinaryCmdLine -B ${RunCMake_BINARY_DIR}/GoodBinaryCmdLine-build)
+run_cmake_presets(GoodGeneratorCmdLine -G ${RunCMake_GENERATOR})
+run_cmake_presets(InvalidGeneratorCmdLine -G "Invalid Generator")
+set(CMakePresets_NO_S_ARG TRUE)
+run_cmake_presets(GoodNoS)
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/GoodNoSCachePrep-build")
+run_cmake_presets(GoodNoSCachePrep)
+set(CMakePresets_SOURCE_ARG ".")
+set(RunCMake_TEST_NO_CLEAN 1)
+run_cmake_presets(GoodNoSCache)
+unset(RunCMake_TEST_NO_CLEAN)
+unset(CMakePresets_SOURCE_ARG)
+unset(RunCMake_TEST_BINARY_DIR)
+unset(CMakePresets_NO_S_ARG)
+set(CMakePresets_NO_SOURCE_ARGS 1)
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/GoodNoSourceArg")
+set(RunCMake_TEST_NO_CLEAN 1)
+run_cmake_presets(GoodNoSourceArg)
+unset(RunCMake_TEST_NO_CLEAN)
+unset(RunCMake_TEST_BINARY_DIR)
+unset(CMakePresets_NO_SOURCE_ARGS)
+run_cmake_presets(GoodInheritanceParent)
+run_cmake_presets(GoodInheritanceChild)
+run_cmake_presets(GoodInheritanceOverride)
+run_cmake_presets(GoodInheritanceMulti)
+run_cmake_presets(GoodInheritanceMultiSecond)
+run_cmake_presets(GoodInheritanceMacro)
+
+# Test bad preset arguments
+run_cmake_presets(VendorMacro)
+run_cmake_presets(InvalidGenerator)
+
+# Test Visual Studio-specific stuff
+if(RunCMake_GENERATOR MATCHES "^Visual Studio ")
+ run_cmake_presets(VisualStudioGeneratorArch)
+ run_cmake_presets(VisualStudioWin32)
+ run_cmake_presets(VisualStudioWin64)
+ run_cmake_presets(VisualStudioWin32Override -A x64)
+ if(NOT RunCMake_GENERATOR STREQUAL "Visual Studio 9 2008")
+ run_cmake_presets(VisualStudioToolset)
+ run_cmake_presets(VisualStudioToolsetOverride -T "Test Toolset")
+ run_cmake_presets(VisualStudioInheritanceParent)
+ run_cmake_presets(VisualStudioInheritanceChild)
+ run_cmake_presets(VisualStudioInheritanceOverride)
+ run_cmake_presets(VisualStudioInheritanceMulti)
+ run_cmake_presets(VisualStudioInheritanceMultiSecond)
+ endif()
+else()
+ run_cmake_presets(ArchToolsetStrategyNone)
+ run_cmake_presets(ArchToolsetStrategyDefault)
+ run_cmake_presets(ArchToolsetStrategyIgnore)
+endif()
+
+# Test bad command line arguments
+run_cmake_presets(NoSuchPreset)
+run_cmake_presets(NoPresetArgument --preset=)
+run_cmake_presets(UseHiddenPreset)
+
+# Test CMakeUserPresets.json
+unset(CMakePresets_FILE)
+run_cmake_presets(GoodUserOnly)
+run_cmake_presets(GoodUserFromMain)
+run_cmake_presets(GoodUserFromUser)
+
+# Test CMakeUserPresets.json errors
+run_cmake_presets(UserDuplicateInUser)
+run_cmake_presets(UserDuplicateCross)
+run_cmake_presets(UserInheritance)
+
+# Test listing presets
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/ListPresets.json.in")
+run_cmake_presets(ListPresets --list-presets)
+
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/ListPresetsWorkingDir")
+set(RunCMake_TEST_NO_CLEAN 1)
+set(CMakePresets_NO_SOURCE_ARGS 1)
+run_cmake_presets(ListPresetsWorkingDir --list-presets)
+unset(CMakePresets_NO_SOURCE_ARGS)
+unset(RunCMake_TEST_NO_CLEAN)
+unset(RunCMake_TEST_BINARY_DIR)
+
+run_cmake_presets(ListPresetsNoSuchPreset)
+run_cmake_presets(ListPresetsHidden)
+
+# Test warning and error flags
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/Warnings.json.in")
+set(CMakePresets_WARN_UNUSED_CLI 1)
+run_cmake_presets(NoWarningFlags)
+run_cmake_presets(WarningFlags)
+run_cmake_presets(DisableWarningFlags)
+run_cmake_presets(ErrorDev)
+run_cmake_presets(ErrorDeprecated)
+unset(CMakePresets_WARN_UNUSED_CLI)
+
+# Test debug
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/Debug.json.in")
+run_cmake_presets(NoDebug)
+run_cmake_presets(Debug)
+
+# 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}")
+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/CMakePresets/TestVariable.cmake b/Tests/RunCMake/CMakePresets/TestVariable.cmake
new file mode 100644
index 000000000..934af5274
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TestVariable.cmake
@@ -0,0 +1,25 @@
+function(test_variable name expected_type expected_value)
+ if(NOT DEFINED "${name}")
+ message(SEND_ERROR "${name} is not defined")
+ elseif(NOT "${${name}}" STREQUAL expected_value)
+ message(SEND_ERROR "Expected value of ${name}: \"${expected_value}\"\nActual value: \"${${name}}\"")
+ endif()
+ if(expected_type)
+ if(NOT DEFINED "CACHE{${name}}")
+ message(SEND_ERROR "Cache entry ${name} does not exist")
+ else()
+ get_property(type CACHE ${name} PROPERTY TYPE)
+ if(NOT type STREQUAL expected_type)
+ message(SEND_ERROR "Expected type of ${name}: \"${expected_type}\"\nActual type: \"${type}\"")
+ endif()
+ endif()
+ endif()
+endfunction()
+
+function(test_environment_variable name expected_value)
+ if(NOT DEFINED "ENV{${name}}")
+ message(SEND_ERROR "Environment variable ${name} is not defined")
+ elseif(NOT "$ENV{${name}}" STREQUAL expected_value)
+ message(SEND_ERROR "Expected value of environment variable ${name}: \"${expected_value}\"\nActual value: \"$ENV{${name}}\"")
+ endif()
+endfunction()
diff --git a/Tests/RunCMake/CMakePresets/UnclosedMacro-result.txt b/Tests/RunCMake/CMakePresets/UnclosedMacro-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnclosedMacro-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt b/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt
new file mode 100644
index 000000000..f9481f091
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/UnclosedMacro: Invalid macro expansion$
diff --git a/Tests/RunCMake/CMakePresets/UnclosedMacro.json.in b/Tests/RunCMake/CMakePresets/UnclosedMacro.json.in
new file mode 100644
index 000000000..ad6cf7dc9
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnclosedMacro.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "UnclosedMacro",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-result.txt b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt
new file mode 100644
index 000000000..cf17881d7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy.json.in b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy.json.in
new file mode 100644
index 000000000..a3bf7c814
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "UnknownArchitectureStrategy",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "architecture": {
+ "strategy": "unknown"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-result.txt b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt
new file mode 100644
index 000000000..8f9be2998
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy: Invalid preset$
diff --git a/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy.json.in b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy.json.in
new file mode 100644
index 000000000..166870073
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "UnknownToolsetStrategy",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "toolset": {
+ "strategy": "unknown"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/UseHiddenPreset-result.txt b/Tests/RunCMake/CMakePresets/UseHiddenPreset-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UseHiddenPreset-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/UseHiddenPreset-stderr.txt b/Tests/RunCMake/CMakePresets/UseHiddenPreset-stderr.txt
new file mode 100644
index 000000000..45b4cd4ac
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UseHiddenPreset-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Cannot use hidden preset in [^
+]*/Tests/RunCMake/CMakePresets/UseHiddenPreset: "UseHiddenPreset"$
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateCross-result.txt b/Tests/RunCMake/CMakePresets/UserDuplicateCross-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateCross-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt b/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt
new file mode 100644
index 000000000..125265f0a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/UserDuplicateCross: Duplicate presets$
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateCross.json.in b/Tests/RunCMake/CMakePresets/UserDuplicateCross.json.in
new file mode 100644
index 000000000..172cfbaba
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateCross.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "UserDuplicateCross",
+ "generator": "@RunCMake_GENERATOR",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateCrossUser.json.in b/Tests/RunCMake/CMakePresets/UserDuplicateCrossUser.json.in
new file mode 100644
index 000000000..172cfbaba
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateCrossUser.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "UserDuplicateCross",
+ "generator": "@RunCMake_GENERATOR",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateInUser-result.txt b/Tests/RunCMake/CMakePresets/UserDuplicateInUser-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateInUser-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt b/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt
new file mode 100644
index 000000000..1071b1775
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/UserDuplicateInUser: Duplicate presets$
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateInUserUser.json.in b/Tests/RunCMake/CMakePresets/UserDuplicateInUserUser.json.in
new file mode 100644
index 000000000..365fafe07
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateInUserUser.json.in
@@ -0,0 +1,15 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "UserDuplicateInUser",
+ "generator": "@RunCMake_GENERATOR",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "UserDuplicateInUser",
+ "generator": "@RunCMake_GENERATOR",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/UserInheritance-result.txt b/Tests/RunCMake/CMakePresets/UserInheritance-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserInheritance-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt b/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt
new file mode 100644
index 000000000..213215a41
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/UserInheritance: Project preset inherits from user preset$
diff --git a/Tests/RunCMake/CMakePresets/UserInheritance.json.in b/Tests/RunCMake/CMakePresets/UserInheritance.json.in
new file mode 100644
index 000000000..d9973d72b
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserInheritance.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "UserInheritance",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "inherits": [
+ "UserInheritanceUser"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/UserInheritanceUser.json.in b/Tests/RunCMake/CMakePresets/UserInheritanceUser.json.in
new file mode 100644
index 000000000..1321a734f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/UserInheritanceUser.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "UserInheritanceUser",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/VariableNotObject-result.txt b/Tests/RunCMake/CMakePresets/VariableNotObject-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VariableNotObject-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt b/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt
new file mode 100644
index 000000000..8cacb0a26
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/VariableNotObject: Invalid CMake variable definition$
diff --git a/Tests/RunCMake/CMakePresets/VariableNotObject.json.in b/Tests/RunCMake/CMakePresets/VariableNotObject.json.in
new file mode 100644
index 000000000..51298f525
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VariableNotObject.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "VariableNotObject",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "VAR": []
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/VendorMacro-result.txt b/Tests/RunCMake/CMakePresets/VendorMacro-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VendorMacro-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/VendorMacro-stderr.txt b/Tests/RunCMake/CMakePresets/VendorMacro-stderr.txt
new file mode 100644
index 000000000..2e9801909
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VendorMacro-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: Could not evaluate preset "VendorMacro": Invalid macro expansion$
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioGeneratorArch-result.txt b/Tests/RunCMake/CMakePresets/VisualStudioGeneratorArch-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioGeneratorArch-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioGeneratorArch-stderr.txt b/Tests/RunCMake/CMakePresets/VisualStudioGeneratorArch-stderr.txt
new file mode 100644
index 000000000..a3113210a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioGeneratorArch-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error: Could not create named generator Visual Studio [^
+]* Win64
+Using platforms in Visual Studio generator names is not supported in CMakePresets\.json\.
+
+Generators
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioInheritanceChild.cmake b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceChild.cmake
new file mode 100644
index 000000000..d485ab384
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceChild.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_NAME "" "Test Platform")
+test_variable(CMAKE_VS_PLATFORM_TOOLSET "" "Test Toolset")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioInheritanceMulti.cmake b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceMulti.cmake
new file mode 100644
index 000000000..d485ab384
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceMulti.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_NAME "" "Test Platform")
+test_variable(CMAKE_VS_PLATFORM_TOOLSET "" "Test Toolset")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioInheritanceMultiSecond.cmake b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceMultiSecond.cmake
new file mode 100644
index 000000000..d485ab384
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceMultiSecond.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_NAME "" "Test Platform")
+test_variable(CMAKE_VS_PLATFORM_TOOLSET "" "Test Toolset")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioInheritanceOverride.cmake b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceOverride.cmake
new file mode 100644
index 000000000..d485ab384
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceOverride.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_NAME "" "Test Platform")
+test_variable(CMAKE_VS_PLATFORM_TOOLSET "" "Test Toolset")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioInheritanceParent.cmake b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceParent.cmake
new file mode 100644
index 000000000..d485ab384
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioInheritanceParent.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_NAME "" "Test Platform")
+test_variable(CMAKE_VS_PLATFORM_TOOLSET "" "Test Toolset")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioToolset.cmake b/Tests/RunCMake/CMakePresets/VisualStudioToolset.cmake
new file mode 100644
index 000000000..722e976b6
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioToolset.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_TOOLSET "" "Test Toolset")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioToolsetOverride.cmake b/Tests/RunCMake/CMakePresets/VisualStudioToolsetOverride.cmake
new file mode 100644
index 000000000..722e976b6
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioToolsetOverride.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_TOOLSET "" "Test Toolset")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioWin32.cmake b/Tests/RunCMake/CMakePresets/VisualStudioWin32.cmake
new file mode 100644
index 000000000..a1c61b49c
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioWin32.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_NAME "" "Win32")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioWin32Override.cmake b/Tests/RunCMake/CMakePresets/VisualStudioWin32Override.cmake
new file mode 100644
index 000000000..b3464d69e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioWin32Override.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_NAME "" "x64")
diff --git a/Tests/RunCMake/CMakePresets/VisualStudioWin64.cmake b/Tests/RunCMake/CMakePresets/VisualStudioWin64.cmake
new file mode 100644
index 000000000..b3464d69e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/VisualStudioWin64.cmake
@@ -0,0 +1,3 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+test_variable(CMAKE_VS_PLATFORM_NAME "" "x64")
diff --git a/Tests/RunCMake/CMakePresets/WarningFlags-stderr.txt b/Tests/RunCMake/CMakePresets/WarningFlags-stderr.txt
new file mode 100644
index 000000000..6e488a9d1
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/WarningFlags-stderr.txt
@@ -0,0 +1,34 @@
+^CMake Warning \(dev\) at [^
+]*/Modules/[^/
+]*:[0-9]+ \([a-zA-Z_][a-zA-Z0-9_]*\):
+ uninitialized variable '[^
+]*'
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(project\)
+This warning is for project developers\. Use -Wno-dev to suppress it\..*
+CMake Warning \(dev\) at [^
+]*/Tests/RunCMake/CMakePresets/WarningsBase\.cmake:[0-9]+ \(message\):
+ Dev warning
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/CMakePresets/WarningFlags\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.
+
+CMake Deprecation Warning at [^
+]*/Tests/RunCMake/CMakePresets/WarningsBase\.cmake:[0-9]+ \(message\):
+ Deprecation warning
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/CMakePresets/WarningFlags\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)
+
+
+CMake Warning \(dev\) at [^
+]*/Tests/RunCMake/CMakePresets/WarningsBase\.cmake:[0-9]+ \(set\):
+ uninitialized variable 'UNINITIALIZED_VARIABLE'
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/CMakePresets/WarningFlags\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/CMakePresets/WarningFlags.cmake b/Tests/RunCMake/CMakePresets/WarningFlags.cmake
new file mode 100644
index 000000000..5de76879a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/WarningFlags.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/WarningsBase.cmake)
diff --git a/Tests/RunCMake/CMakePresets/Warnings.json.in b/Tests/RunCMake/CMakePresets/Warnings.json.in
new file mode 100644
index 000000000..40ec6ce44
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Warnings.json.in
@@ -0,0 +1,50 @@
+{
+ "version": 1,
+ "configurePresets": [
+ {
+ "name": "NoWarningFlags",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "cacheVariables": {
+ "UNUSED_VARIABLE": "Unused"
+ }
+ },
+ {
+ "name": "WarningFlags",
+ "inherits": "NoWarningFlags",
+ "warnings": {
+ "dev": true,
+ "deprecated": true,
+ "uninitialized": true,
+ "unusedCli": false,
+ "systemVars": true
+ }
+ },
+ {
+ "name": "DisableWarningFlags",
+ "inherits": "NoWarningFlags",
+ "warnings": {
+ "dev": false,
+ "deprecated": false,
+ "unusedCli": false
+ }
+ },
+ {
+ "name": "ErrorDev",
+ "inherits": "NoWarningFlags",
+ "errors": {
+ "dev": true
+ }
+ },
+ {
+ "name": "ErrorDeprecated",
+ "inherits": "NoWarningFlags",
+ "warnings": {
+ "dev": false
+ },
+ "errors": {
+ "deprecated": true
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/WarningsBase.cmake b/Tests/RunCMake/CMakePresets/WarningsBase.cmake
new file mode 100644
index 000000000..1a434dc25
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/WarningsBase.cmake
@@ -0,0 +1,3 @@
+message(AUTHOR_WARNING "Dev warning")
+message(DEPRECATION "Deprecation warning")
+set(_uninitialized "${UNINITIALIZED_VARIABLE}")
diff --git a/Tests/RunCMake/CMakePresets/check.cmake b/Tests/RunCMake/CMakePresets/check.cmake
new file mode 100644
index 000000000..bf43c7ea3
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/check.cmake
@@ -0,0 +1,15 @@
+if(PYTHON_EXECUTABLE AND CMake_TEST_JSON_SCHEMA)
+ if(NOT CMakePresets_SCHEMA_EXPECTED_RESULT)
+ set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
+ endif()
+ if(EXISTS "${RunCMake_TEST_SOURCE_DIR}/CMakePresets.json")
+ validate_schema("${RunCMake_TEST_SOURCE_DIR}/CMakePresets.json" "${CMakePresets_SCHEMA_EXPECTED_RESULT}")
+ endif()
+
+ if(NOT CMakeUserPresets_SCHEMA_EXPECTED_RESULT)
+ set(CMakeUserPresets_SCHEMA_EXPECTED_RESULT 0)
+ endif()
+ if(EXISTS "${RunCMake_TEST_SOURCE_DIR}/CMakeUserPresets.json")
+ validate_schema("${RunCMake_TEST_SOURCE_DIR}/CMakeUserPresets.json" "${CMakeUserPresets_SCHEMA_EXPECTED_RESULT}")
+ endif()
+endif()
diff --git a/Tests/RunCMake/CMakePresets/main.c b/Tests/RunCMake/CMakePresets/main.c
new file mode 100644
index 000000000..8488f4e58
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/main.c
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CMakePresets/validate_schema.py b/Tests/RunCMake/CMakePresets/validate_schema.py
new file mode 100644
index 000000000..c9f84ee17
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/validate_schema.py
@@ -0,0 +1,17 @@
+import jsmin
+import json
+import jsonschema
+import os.path
+import sys
+
+
+with open(sys.argv[1], "rb") as f:
+ contents = json.loads(jsmin.jsmin(f.read().decode("utf-8-sig")))
+
+schema_file = os.path.join(
+ os.path.dirname(__file__),
+ "..", "..", "..", "Help", "manual", "presets", "schema.json")
+with open(schema_file) as f:
+ schema = json.load(f)
+
+jsonschema.validate(contents, schema)
diff --git a/Tests/RunCMake/CPack/DragNDrop/Accept.txt b/Tests/RunCMake/CPack/DragNDrop/Accept.txt
new file mode 100644
index 000000000..975fbec82
--- /dev/null
+++ b/Tests/RunCMake/CPack/DragNDrop/Accept.txt
@@ -0,0 +1 @@
+y
diff --git a/Tests/RunCMake/CPack/DragNDrop/Helpers.cmake b/Tests/RunCMake/CPack/DragNDrop/Helpers.cmake
index 023e597ad..896fba7c2 100644
--- a/Tests/RunCMake/CPack/DragNDrop/Helpers.cmake
+++ b/Tests/RunCMake/CPack/DragNDrop/Helpers.cmake
@@ -5,6 +5,7 @@ function(getPackageContent FILE RESULT_VAR)
file(REMOVE_RECURSE "${path_}/content")
file(MAKE_DIRECTORY "${path_}/content")
execute_process(COMMAND ${HDIUTIL_EXECUTABLE} attach -mountroot ${path_}/content -nobrowse ${FILE}
+ INPUT_FILE "${src_dir}/DragNDrop/Accept.txt"
RESULT_VARIABLE attach_result_
ERROR_VARIABLE attach_error_
OUTPUT_STRIP_TRAILING_WHITESPACE)
diff --git a/Tests/RunCMake/CPack/DragNDrop/packaging_MONOLITHIC_default.cmake b/Tests/RunCMake/CPack/DragNDrop/packaging_MONOLITHIC_default.cmake
new file mode 100644
index 000000000..ca278907c
--- /dev/null
+++ b/Tests/RunCMake/CPack/DragNDrop/packaging_MONOLITHIC_default.cmake
@@ -0,0 +1,2 @@
+set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK ON)
+set(CPACK_DMG_VOLUME_NAME "volume-name")
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 064b4dca6..530bcdf5a 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -10,6 +10,7 @@ run_cpack_test(DEBUGINFO "RPM.DEBUGINFO;DEB.DEBUGINFO" true "COMPONENT")
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")
+run_cpack_test(DMG_SLA "DragNDrop" false "MONOLITHIC")
run_cpack_test(EMPTY_DIR "RPM.EMPTY_DIR;DEB.EMPTY_DIR;TGZ" true "MONOLITHIC;COMPONENT")
run_cpack_test(VERSION "RPM.VERSION;DEB.VERSION" false "MONOLITHIC;COMPONENT")
run_cpack_test(EXTRA "DEB.EXTRA" false "COMPONENT")
@@ -46,3 +47,4 @@ run_cpack_test_subtests(
"MONOLITHIC;COMPONENT"
)
run_cpack_test(PROJECT_META "RPM.PROJECT_META;DEB.PROJECT_META" false "MONOLITHIC;COMPONENT")
+run_cpack_test_package_target(PRE_POST_SCRIPTS "ZIP" false "MONOLITHIC;COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
index 70ad48b4b..6e841fc92 100644
--- a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
@@ -34,7 +34,7 @@ set(_expected_description [[ Description: This is the summary line
This is the Debian package multiline description.
.
It must be formatted properly! Otherwise, the result `*.deb`
- package become broken and cant be installed!
+ package become broken and cannot be installed!
.
It may contains `;` characters (even like this `;;;;`). Example:
.
diff --git a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake
index 893eb0113..2a27b4622 100644
--- a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake
+++ b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake
@@ -5,7 +5,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "This is the summary line")
set(_description [[This is the Debian package multiline description.
It must be formatted properly! Otherwise, the result `*.deb`
-package become broken and cant be installed!
+package become broken and cannot be installed!
It may contains `;` characters (even like this `;;;;`). Example:
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf b/Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf
new file mode 100644
index 000000000..c1da71171
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf
@@ -0,0 +1,7 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
+{\colortbl ;\red0\green0\blue255;}
+{\*\generator Riched20 10.0.18362}\viewkind4\uc1
+\pard\sa200\sl276\slmult1\b\f0\fs22\lang9 LICENSE\b0\par
+This is an installer created using CPack ({{\field{\*\fldinst{HYPERLINK https://cmake.org }}{\fldrslt{https://cmake.org\ul0\cf0}}}}\f0\fs22 ). No license provided.\par
+\par
+}
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/English.menu.txt b/Tests/RunCMake/CPack/tests/DMG_SLA/English.menu.txt
new file mode 100644
index 000000000..b2cbc2542
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/English.menu.txt
@@ -0,0 +1,9 @@
+English
+Agree
+Disagree
+Print
+Save...
+You agree to the License Agreement terms when you click the "Agree" button.
+Software License Agreement
+This text cannot be saved. This disk may be full or locked or the file may be locked.
+Unable to print. Make sure you have selected a printer.
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DMG_SLA/ExpectedFiles.cmake
new file mode 100644
index 000000000..d1a3a5fb2
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/ExpectedFiles.cmake
@@ -0,0 +1,2 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt")
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt b/Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt
new file mode 100644
index 000000000..0edd1f2c3
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt
@@ -0,0 +1,3 @@
+LIZENZ
+------
+Dies ist ein Installationsprogramm, das mit erstellt wurde CPack (https://cmake.org). Keine Lizenz angegeben.
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt b/Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt
new file mode 100644
index 000000000..77248183d
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt
@@ -0,0 +1,9 @@
+German
+Akzeptieren
+Ablehnen
+Drucken
+Speichern...
+Klicken Sie auf "Akzeptieren", wenn Sie mit den Bestimmungen des Software-Lizenzvertrages einverstanden sind.
+Software-Lizenzvertrag
+Dieser Text kann nicht gesichert werden. Diese Festplatte ist mšglicherweise voll oder geschŸtzt oder der Ordner ist geschŸtzt.
+Es kann nicht gedruckt werden. Bitte stellen Sie sicher, dass ein Drucker ausgewŠhlt ist.
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/DMG_SLA/VerifyResult.cmake
new file mode 100644
index 000000000..010e14c73
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/VerifyResult.cmake
@@ -0,0 +1,33 @@
+set(dmg "${bin_dir}/${FOUND_FILE_1}")
+execute_process(COMMAND hdiutil udifderez -xml "${dmg}" OUTPUT_VARIABLE out ERROR_VARIABLE err RESULT_VARIABLE res)
+if(NOT res EQUAL 0)
+ string(REPLACE "\n" "\n " err " ${err}")
+ message(FATAL_ERROR "Running 'hdiutil udifderez -xml' on\n ${dmg}\nfailed with:\n${err}")
+endif()
+foreach(key "LPic" "STR#" "TEXT" "RTF ")
+ if(NOT out MATCHES "<key>${key}</key>")
+ string(REPLACE "\n" "\n " out " ${out}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${dmg}\ndid not show '${key}' key:\n${out}")
+ endif()
+endforeach()
+foreach(line
+ # LPic
+ "\tAAAAAgAAAAAAAAADAAEAAA==\n"
+ # STR# English first and last base64 lines
+ "\tAAkHRW5nbGlzaAVBZ3JlZQhEaXNhZ3JlZQVQcmludAdTYXZlLi4u\n"
+ "\tZCBhIHByaW50ZXIu\n"
+ # STR# German first and last base64 lines
+ "\tAAkGR2VybWFuC0FremVwdGllcmVuCEFibGVobmVuB0RydWNrZW4M\n"
+ "\tYXVzZ2V3wopobHQgaXN0Lg==\n"
+ # RTF English first and last base64 lines
+ "\te1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcbm91aWNvbXBh\n"
+ "\tdmlkZWQuXHBhcg1ccGFyDX0NDQ==\n"
+ # TEXT German first and last base64 lines
+ "\tTElaRU5aDS0tLS0tLQ1EaWVzIGlzdCBlaW4gSW5zdGFsbGF0aW9u\n"
+ "\tZ2ViZW4uDQ0=\n"
+ )
+ if(NOT out MATCHES "${line}")
+ string(REPLACE "\n" "\n " out " ${out}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${dmg}\ndid not show '${line}':\n${out}")
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/test.cmake b/Tests/RunCMake/CPack/tests/DMG_SLA/test.cmake
new file mode 100644
index 000000000..2804b0bb9
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/test.cmake
@@ -0,0 +1,3 @@
+install(FILES CMakeLists.txt DESTINATION foo)
+set(CPACK_DMG_SLA_DIR "${CMAKE_CURRENT_LIST_DIR}")
+set(CPACK_DMG_SLA_LANGUAGES English German)
diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake b/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake
index 6f7c4c224..3db80142f 100644
--- a/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake
+++ b/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake
@@ -29,3 +29,11 @@ expect_file(${CPACK_TEMPORARY_DIRECTORY}/f3/share/cpack-test/f3.txt)
expect_file(${CPACK_TEMPORARY_DIRECTORY}/f4/share/cpack-test/f4.txt)
message(STATUS "This status message is expected to be visible")
+
+set(
+ CPACK_EXTERNAL_BUILT_PACKAGES
+ ${CPACK_TEMPORARY_DIRECTORY}/f1/share/cpack-test/f1.txt
+ ${CPACK_TEMPORARY_DIRECTORY}/f2/share/cpack-test/f2.txt
+ ${CPACK_TEMPORARY_DIRECTORY}/f3/share/cpack-test/f3.txt
+ ${CPACK_TEMPORARY_DIRECTORY}/f4/share/cpack-test/f4.txt
+ )
diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt b/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt
index 37d635fa4..587b2e810 100644
--- a/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt
+++ b/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt
@@ -1 +1,11 @@
-- This status message is expected to be visible
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/external-0\.1\.1-.*\.json generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/external-0\.1\.1-.*\.json\.sha1 generated\.
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f1\.txt generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f1\.txt\.sha1 generated\.
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f2\.txt generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f2\.txt\.sha1 generated\.
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f3\.txt generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f3\.txt\.sha1 generated\.
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f4\.txt generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f4\.txt\.sha1 generated\.
diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake b/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake
index bc9766b15..d4781baad 100644
--- a/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake
+++ b/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake
@@ -17,6 +17,7 @@ elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "invalid_bad")
elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "stage_and_package")
set(CPACK_EXTERNAL_ENABLE_STAGING 1)
set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/create_package.cmake")
+ set(CPACK_PACKAGE_CHECKSUM SHA1)
endif()
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/f1.txt" test1)
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ExpectedFiles.cmake
new file mode 100644
index 000000000..63a36a36e
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ExpectedFiles.cmake
@@ -0,0 +1,19 @@
+set(SATU "/satu;/satu/CMakeLists.txt")
+set(DUA "/dua;/dua/CMakeLists.txt")
+
+if(GENERATOR_TYPE STREQUAL ZIP)
+ set(_ext "zip")
+elseif(GENERATOR_TYPE STREQUAL TGZ)
+ set(_ext "tar.gz")
+endif()
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+ set(EXPECTED_FILES_COUNT "2")
+ set(EXPECTED_FILE_1 "*-satu.${_ext}")
+ set(EXPECTED_FILE_CONTENT_1_LIST ${SATU})
+ set(EXPECTED_FILE_2 "*-dua.${_ext}")
+ set(EXPECTED_FILE_CONTENT_2_LIST ${DUA})
+else()
+ set(EXPECTED_FILES_COUNT "1")
+ set(EXPECTED_FILE_CONTENT_1_LIST ${SATU} ${DUA})
+endif()
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_COMPONENT-stdout.txt b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_COMPONENT-stdout.txt
new file mode 100644
index 000000000..319d0da14
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_COMPONENT-stdout.txt
@@ -0,0 +1,4 @@
+-- The message from .*/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre\.cmake and generator ZIP
+.*
+-- The message from .*/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post\.cmake and generator ZIP
+-- Built packages: .*/_CPack_Packages/.*/pre_post_scripts-.*-dua.zip;.*/_CPack_Packages/.*/pre_post_scripts-.*-satu.zip
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_MONOLITHIC-stdout.txt b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_MONOLITHIC-stdout.txt
new file mode 100644
index 000000000..632c4d14c
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_MONOLITHIC-stdout.txt
@@ -0,0 +1,4 @@
+-- The message from .*/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre\.cmake and generator ZIP
+.*
+-- The message from .*/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post\.cmake and generator ZIP
+-- Built packages: .*/_CPack_Packages/.*/pre_post_scripts-0\.1\.1-.*\.zip
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post.cmake b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post.cmake
new file mode 100644
index 000000000..cf0b1490f
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post.cmake
@@ -0,0 +1,2 @@
+message(STATUS "The message from ${CMAKE_CURRENT_LIST_FILE} and generator ${CPACK_GENERATOR}")
+message(STATUS "Built packages: ${CPACK_PACKAGE_FILES}")
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre.cmake b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre.cmake
new file mode 100644
index 000000000..b04aa6bbf
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre.cmake
@@ -0,0 +1 @@
+message(STATUS "The message from ${CMAKE_CURRENT_LIST_FILE} and generator ${CPACK_GENERATOR}")
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/test.cmake b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/test.cmake
new file mode 100644
index 000000000..f1b6d5f8f
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/test.cmake
@@ -0,0 +1,9 @@
+install(FILES CMakeLists.txt DESTINATION satu COMPONENT satu)
+install(FILES CMakeLists.txt DESTINATION dua COMPONENT dua)
+
+set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_LIST_DIR}/pre.cmake")
+set(CPACK_POST_BUILD_SCRIPTS "${CMAKE_CURRENT_LIST_DIR}/post.cmake")
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+ set(CPACK_COMPONENTS_ALL satu dua)
+endif()
diff --git a/Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake
index b3accb58f..35a93d6a4 100644
--- a/Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake
@@ -13,7 +13,7 @@ function(checkPackageURL FILE TAG EXPECTED_URL)
endif()
endforeach()
if(NOT _seen_url)
- message(FATAL_ERROR "The packge `${FILE}` do not have URL as expected")
+ message(FATAL_ERROR "The package `${FILE}` do not have URL as expected")
endif()
endfunction()
diff --git a/Tests/RunCMake/CTest/CMakeLists.txt b/Tests/RunCMake/CTest/CMakeLists.txt
index 73e6a785a..f1a83e8c4 100644
--- a/Tests/RunCMake/CTest/CMakeLists.txt
+++ b/Tests/RunCMake/CTest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
if(NOT NoProject)
project(${RunCMake_TEST} NONE)
endif()
diff --git a/Tests/RunCMake/CTest/RunCMakeTest.cmake b/Tests/RunCMake/CTest/RunCMakeTest.cmake
index 761224a6d..ffc8f7893 100644
--- a/Tests/RunCMake/CTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTest/RunCMakeTest.cmake
@@ -18,3 +18,23 @@ function(run_CMakeCTestArguments)
run_cmake_command(CMakeCTestArguments-test ${CMAKE_COMMAND} --build . --config Debug --target "${test}")
endfunction()
run_CMakeCTestArguments()
+
+function(run_TestfileErrors)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestfileErrors-build)
+ run_cmake(TestfileErrors)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(TestfileErrors-build ${CMAKE_COMMAND} --build . --config Debug)
+ run_cmake_command(TestfileErrors-test ${CMAKE_CTEST_COMMAND} -C Debug)
+endfunction()
+run_TestfileErrors()
+
+function(run_SingleConfig)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SingleConfig-build)
+ run_cmake(SingleConfig)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(SingleConfig-build ${CMAKE_COMMAND} --build .)
+ run_cmake_command(SingleConfig-test ${CMAKE_CTEST_COMMAND}) # No -C Debug required for single-config.
+endfunction()
+if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ run_SingleConfig()
+endif()
diff --git a/Tests/RunCMake/CTest/SingleConfig-test-stdout.txt b/Tests/RunCMake/CTest/SingleConfig-test-stdout.txt
new file mode 100644
index 000000000..1c39ea156
--- /dev/null
+++ b/Tests/RunCMake/CTest/SingleConfig-test-stdout.txt
@@ -0,0 +1,8 @@
+^Test project [^
+]*/Tests/RunCMake/CTest/SingleConfig-build
+ Start 1: SingleConfig
+1/1 Test #1: SingleConfig \.+ +Passed +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 1
++
+Total Test time \(real\) = +[0-9.]+ sec$
diff --git a/Tests/RunCMake/CTest/SingleConfig.cmake b/Tests/RunCMake/CTest/SingleConfig.cmake
new file mode 100644
index 000000000..7c10e06be
--- /dev/null
+++ b/Tests/RunCMake/CTest/SingleConfig.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+
+# This should be ignored by single-config generators.
+set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE INTERNAL "Supported configuration types")
+
+add_test(NAME SingleConfig COMMAND ${CMAKE_COMMAND} -E echo SingleConfig)
diff --git a/Tests/RunCMake/CTest/TestfileErrors-Script.cmake b/Tests/RunCMake/CTest/TestfileErrors-Script.cmake
new file mode 100644
index 000000000..d9fc7c89a
--- /dev/null
+++ b/Tests/RunCMake/CTest/TestfileErrors-Script.cmake
@@ -0,0 +1,4 @@
+message(SEND_ERROR "SEND_ERROR")
+message(FATAL_ERROR "FATAL_ERROR")
+# This shouldn't get printed because the script aborts on FATAL_ERROR
+message(SEND_ERROR "reaching the unreachable")
diff --git a/Tests/RunCMake/CTest/TestfileErrors-test-result.txt b/Tests/RunCMake/CTest/TestfileErrors-test-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/CTest/TestfileErrors-test-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/CTest/TestfileErrors-test-stderr.txt b/Tests/RunCMake/CTest/TestfileErrors-test-stderr.txt
new file mode 100644
index 000000000..a3a476bf1
--- /dev/null
+++ b/Tests/RunCMake/CTest/TestfileErrors-test-stderr.txt
@@ -0,0 +1,11 @@
+CMake Error at [^
+]*/Tests/RunCMake/CTest/TestfileErrors-Script.cmake:1 \(message\):
+ SEND_ERROR
+Call Stack \(most recent call first\):
+ CTestTestfile.cmake:[0-9]+ \(include\)
++
+CMake Error at [^
+]*/Tests/RunCMake/CTest/TestfileErrors-Script.cmake:2 \(message\):
+ FATAL_ERROR
+Call Stack \(most recent call first\):
+ CTestTestfile.cmake:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CTest/TestfileErrors.cmake b/Tests/RunCMake/CTest/TestfileErrors.cmake
new file mode 100644
index 000000000..676eb479d
--- /dev/null
+++ b/Tests/RunCMake/CTest/TestfileErrors.cmake
@@ -0,0 +1,3 @@
+include(CTest)
+add_test(NAME "unreachable" COMMAND ${CMAKE_COMMAND} -E true)
+set_property(DIRECTORY PROPERTY TEST_INCLUDE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TestfileErrors-Script.cmake)
diff --git a/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-result.txt b/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt b/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt
index d95bb337c..97e2a10c1 100644
--- a/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt
+++ b/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt
@@ -1,4 +1,4 @@
^CMake Error at CTestTestfile.cmake:[0-9]+ \(subdirs\):
subdirs called with incorrect number of arguments
+
-No tests were found!!!$
+Errors while running CTest$
diff --git a/Tests/RunCMake/CTestCommandLine/TestOutputSize-stderr.txt b/Tests/RunCMake/CTestCommandLine/TestOutputSize-stderr.txt
index ba4235def..19310b8ed 100644
--- a/Tests/RunCMake/CTestCommandLine/TestOutputSize-stderr.txt
+++ b/Tests/RunCMake/CTestCommandLine/TestOutputSize-stderr.txt
@@ -1 +1,2 @@
+^Cannot find file: .*/Tests/RunCMake/CTestCommandLine/TestOutputSize/DartConfiguration.tcl
Errors while running CTest
diff --git a/Tests/RunCMake/CheckCompilerFlag/CMakeLists.txt b/Tests/RunCMake/CheckCompilerFlag/CMakeLists.txt
new file mode 100644
index 000000000..0421e2803
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.13)
+
+project(${RunCMake_TEST} LANGUAGES NONE)
+
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
new file mode 100644
index 000000000..095fd5445
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
@@ -0,0 +1,22 @@
+
+enable_language (C)
+include(CheckCompilerFlag)
+
+check_compiler_flag(C "-_this_is_not_a_flag_" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid C compile flag didn't fail.")
+endif()
+
+if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang" AND NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
+ check_compiler_flag(C "-x c" SHOULD_WORK)
+ if(NOT SHOULD_WORK)
+ message(SEND_ERROR "${CMAKE_C_COMPILER_ID} compiler flag '-x c' check failed")
+ endif()
+endif()
+
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ check_compiler_flag(C "-frtti" SHOULD_FAIL_RTTI)
+ if(SHOULD_FAIL_RTTI)
+ message(SEND_ERROR "${CMAKE_C_COMPILER_ID} compiler flag '-frtti' check passed but should have failed")
+ endif()
+endif()
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake
new file mode 100644
index 000000000..a40699cad
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake
@@ -0,0 +1,13 @@
+
+enable_language (CUDA)
+include(CheckCompilerFlag)
+
+check_compiler_flag(CUDA "-_this_is_not_a_flag_" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid CUDA compile flag didn't fail.")
+endif()
+
+check_compiler_flag(CUDA "-DFOO" SHOULD_WORK)
+if(NOT SHOULD_WORK)
+ message(SEND_ERROR "${CMAKE_CUDA_COMPILER_ID} compiler flag '-DFOO' check failed")
+endif()
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
new file mode 100644
index 000000000..bbc104e91
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
@@ -0,0 +1,15 @@
+
+enable_language (CXX)
+include(CheckCompilerFlag)
+
+check_compiler_flag(CXX "-_this_is_not_a_flag_" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid CXX compile flag didn't fail.")
+endif()
+
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+ check_compiler_flag(CXX "-x c++" SHOULD_WORK)
+ if(NOT SHOULD_WORK)
+ message(SEND_ERROR "${CMAKE_CXX_COMPILER_ID} compiler flag '-x c++' check failed")
+ endif()
+endif()
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
new file mode 100644
index 000000000..220ee2935
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
@@ -0,0 +1,14 @@
+enable_language (Fortran)
+include(CheckCompilerFlag)
+
+check_compiler_flag(Fortran "-_this_is_not_a_flag_" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid Fortran compile flag didn't fail.")
+endif()
+
+if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+ check_compiler_flag(Fortran "-Wall" SHOULD_WORK)
+ if(NOT SHOULD_WORK)
+ message(SEND_ERROR "${CMAKE_Fortran_COMPILER_ID} compiler flag '-Wall' check failed")
+ endif()
+endif()
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckISPCCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckISPCCompilerFlag.cmake
new file mode 100644
index 000000000..662319ae6
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckISPCCompilerFlag.cmake
@@ -0,0 +1,13 @@
+
+enable_language (ISPC)
+include(CheckCompilerFlag)
+
+check_compiler_flag(ISPC "-_this_is_not_a_flag_" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid ISPC compile flag didn't fail.")
+endif()
+
+check_compiler_flag(ISPC "--woff" SHOULD_WORK)
+if(NOT SHOULD_WORK)
+ message(SEND_ERROR "${CMAKE_ISPC_COMPILER_ID} compiler flag '--woff' check failed")
+endif()
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake
new file mode 100644
index 000000000..e9344ca11
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake
@@ -0,0 +1,12 @@
+enable_language (OBJC)
+include(CheckCompilerFlag)
+
+check_compiler_flag(OBJC "-_this_is_not_a_flag_" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid OBJC compile flag didn't fail.")
+endif()
+
+check_compiler_flag(OBJC "-Wall" SHOULD_WORK)
+if(NOT SHOULD_WORK)
+ message(SEND_ERROR "${CMAKE_OBJC_COMPILER_ID} compiler flag '-Wall' check failed")
+endif()
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake
new file mode 100644
index 000000000..503a1de0f
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake
@@ -0,0 +1,12 @@
+enable_language (OBJCXX)
+include(CheckCompilerFlag)
+
+check_compiler_flag(OBJCXX "-_this_is_not_a_flag_" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid OBJCXX compile flag didn't fail.")
+endif()
+
+check_compiler_flag(OBJCXX "-Wall" SHOULD_WORK)
+if(NOT SHOULD_WORK)
+ message(SEND_ERROR "${CMAKE_OBJCXX_COMPILER_ID} compiler flag '-Wall' check failed")
+endif()
diff --git a/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage-result.txt b/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage-stderr.txt b/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage-stderr.txt
new file mode 100644
index 000000000..89d05650e
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*CheckCompilerFlag\.cmake:[0-9]+ \(message\):
+ check_compiler_flag: FAKE_LANG: unknown language.
diff --git a/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage.cmake b/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage.cmake
new file mode 100644
index 000000000..074195327
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/NonExistentLanguage.cmake
@@ -0,0 +1,3 @@
+
+include(CheckCompilerFlag)
+check_compiler_flag(FAKE_LANG "int main() {return 0;}" SHOULD_BUILD)
diff --git a/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage-result.txt b/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage-stderr.txt b/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage-stderr.txt
new file mode 100644
index 000000000..23dd4a165
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*CheckCompilerFlag\.cmake:[0-9]+ \(message\):
+ check_compiler_flag: C: needs to be enabled before use.
diff --git a/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage.cmake b/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage.cmake
new file mode 100644
index 000000000..14769a254
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/NotEnabledLanguage.cmake
@@ -0,0 +1,3 @@
+
+include(CheckCompilerFlag)
+check_compiler_flag(C "int main() {return 0;}" SHOULD_BUILD)
diff --git a/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake
new file mode 100644
index 000000000..7a4e2cebb
--- /dev/null
+++ b/Tests/RunCMake/CheckCompilerFlag/RunCMakeTest.cmake
@@ -0,0 +1,24 @@
+include(RunCMake)
+
+run_cmake(NotEnabledLanguage)
+run_cmake(NonExistentLanguage)
+
+run_cmake(CheckCCompilerFlag)
+run_cmake(CheckCXXCompilerFlag)
+
+if (APPLE)
+ run_cmake(CheckOBJCCompilerFlag)
+ run_cmake(CheckOBJCXXCompilerFlag)
+endif()
+
+if (CMAKE_Fortran_COMPILER_ID)
+ run_cmake(CheckFortranCompilerFlag)
+endif()
+
+if (CMake_TEST_CUDA)
+ run_cmake(CheckCUDACompilerFlag)
+endif()
+
+if(CMake_TEST_ISPC)
+ run_cmake(CheckISPCCompilerFlag)
+endif()
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckCUDALinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckCUDALinkerFlag.cmake
new file mode 100644
index 000000000..84d6dd92b
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CheckCUDALinkerFlag.cmake
@@ -0,0 +1,3 @@
+
+set (CHECK_LANGUAGE CUDA)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckLinkerFlag.cmake")
diff --git a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
index 224a2a3d0..6ec914806 100644
--- a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
@@ -12,3 +12,7 @@ endif()
if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
run_cmake(CheckFortranLinkerFlag)
endif()
+
+if (CMake_TEST_CUDA)
+ run_cmake(CheckCUDALinkerFlag)
+endif()
diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt
index 9872df2a1..842c5cf52 100644
--- a/Tests/RunCMake/CheckModules/CMakeLists.txt
+++ b/Tests/RunCMake/CheckModules/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 2.8.12)
cmake_policy(SET CMP0054 NEW)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CheckSourceCompiles/CMakeLists.txt b/Tests/RunCMake/CheckSourceCompiles/CMakeLists.txt
new file mode 100644
index 000000000..0421e2803
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.13)
+
+project(${RunCMake_TEST} LANGUAGES NONE)
+
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake
new file mode 100644
index 000000000..cf461893c
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake
@@ -0,0 +1,13 @@
+
+enable_language (C)
+include(CheckSourceCompiles)
+
+check_source_compiles(C "I don't build" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid C source didn't fail.")
+endif()
+
+check_source_compiles(C "int main() {return 0;}" SHOULD_BUILD)
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid C source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake
new file mode 100644
index 000000000..1e6e6b266
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake
@@ -0,0 +1,27 @@
+
+enable_language (CUDA)
+include(CheckSourceCompiles)
+
+check_source_compiles(CUDA "I don't build" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid CUDA source didn't fail.")
+endif()
+
+check_source_compiles(CUDA [=[
+ #include <vector>
+ __device__ int d_func() { }
+ int main() {
+ return 0;
+ }
+]=]
+ SHOULD_BUILD)
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid CUDA source.")
+endif()
+
+check_source_compiles(CUDA "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 CUDA complex source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake
new file mode 100644
index 000000000..ec01d42f7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake
@@ -0,0 +1,26 @@
+
+enable_language (CXX)
+include(CheckSourceCompiles)
+
+check_source_compiles(CXX "I don't build" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid CXX source didn't fail.")
+endif()
+
+check_source_compiles(CXX [=[
+ #include <vector>
+ int main() {
+ return 0;
+ }
+]=]
+ SHOULD_BUILD)
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid CXX source.")
+endif()
+
+check_source_compiles(CXX "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 CXX complex source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake
new file mode 100644
index 000000000..1d4e16d45
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake
@@ -0,0 +1,14 @@
+
+
+enable_language (Fortran)
+include(CheckSourceCompiles)
+
+check_source_compiles(Fortran [=[
+ PROGRAM TEST_HAVE_PRINT
+ PRINT *, 'Hello'
+ END
+]=] SHOULD_BUILD)
+
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid Fortran source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckISPCSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckISPCSourceCompiles.cmake
new file mode 100644
index 000000000..74b83c083
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckISPCSourceCompiles.cmake
@@ -0,0 +1,20 @@
+
+enable_language (ISPC)
+include(CheckSourceCompiles)
+
+check_source_compiles(ISPC "I don't build" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "invalid ISPC source didn't fail.")
+endif()
+
+check_source_compiles(ISPC [=[
+
+float func(uniform int32, float a)
+{
+ return a / 2.25;
+}
+]=]
+ SHOULD_BUILD)
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid ISPC source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake
new file mode 100644
index 000000000..2f53cfc4f
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake
@@ -0,0 +1,14 @@
+enable_language (OBJC)
+include(CheckSourceCompiles)
+
+check_source_compiles(OBJC [[
+ #import <Foundation/Foundation.h>
+ int main() {
+ NSObject *foo;
+ return 0;
+ }
+]] SHOULD_BUILD)
+
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid OBJC source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake
new file mode 100644
index 000000000..805d5136c
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake
@@ -0,0 +1,17 @@
+enable_language (OBJCXX)
+include(CheckSourceCompiles)
+
+check_source_compiles(OBJCXX [[
+ #include <vector>
+ #import <Foundation/Foundation.h>
+ int main() {
+ std::vector<int> v;
+ NSObject *foo;
+ return 0;
+ }
+]] SHOULD_BUILD)
+
+
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for OBJCXX source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage-result.txt b/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage-stderr.txt b/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage-stderr.txt
new file mode 100644
index 000000000..bf2ea8233
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*CheckSourceCompiles\.cmake:[0-9]+ \(message\):
+ check_source_compiles: FAKE_LANG: unknown language.
diff --git a/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage.cmake b/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage.cmake
new file mode 100644
index 000000000..fc7de0697
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/NonExistentLanguage.cmake
@@ -0,0 +1,3 @@
+
+include(CheckSourceCompiles)
+check_source_compiles(FAKE_LANG "int main() {return 0;}" SHOULD_BUILD)
diff --git a/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage-result.txt b/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage-stderr.txt b/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage-stderr.txt
new file mode 100644
index 000000000..ebc983ae3
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*CheckSourceCompiles\.cmake:[0-9]+ \(message\):
+ check_source_compiles: C: needs to be enabled before use.
diff --git a/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage.cmake b/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage.cmake
new file mode 100644
index 000000000..dec0db363
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/NotEnabledLanguage.cmake
@@ -0,0 +1,3 @@
+
+include(CheckSourceCompiles)
+check_source_compiles(C "int main() {return 0;}" SHOULD_BUILD)
diff --git a/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake
new file mode 100644
index 000000000..6e9088f82
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake
@@ -0,0 +1,25 @@
+include(RunCMake)
+
+run_cmake(NotEnabledLanguage)
+run_cmake(NonExistentLanguage)
+run_cmake(UnknownArgument)
+
+run_cmake(CheckCSourceCompiles)
+run_cmake(CheckCXXSourceCompiles)
+
+if (APPLE)
+ run_cmake(CheckOBJCSourceCompiles)
+ run_cmake(CheckOBJCXXSourceCompiles)
+endif()
+
+if (CMAKE_Fortran_COMPILER_ID)
+ run_cmake(CheckFortranSourceCompiles)
+endif()
+
+if (CMake_TEST_CUDA)
+ run_cmake(CheckCUDASourceCompiles)
+endif()
+
+if(CMake_TEST_ISPC)
+ run_cmake(CheckISPCSourceCompiles)
+endif()
diff --git a/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt
new file mode 100644
index 000000000..a7e0af515
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Error at [^
+]*/Modules/Internal/CheckSourceCompiles.cmake:[0-9]+ \(message\):
+ Unknown argument:
+
+ BAD
+
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/CheckSourceCompiles.cmake:[0-9]+ \(cmake_check_source_compiles\)
+ UnknownArgument.cmake:[0-9]+ \(check_source_compiles\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake
new file mode 100644
index 000000000..3b861da7f
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake
@@ -0,0 +1,5 @@
+
+enable_language (C)
+include(CheckSourceCompiles)
+
+check_source_compiles(C "int main() {return 0;}" SHOULD_BUILD SRC_EXT C BAD)
diff --git a/Tests/RunCMake/CheckSourceRuns/CMakeLists.txt b/Tests/RunCMake/CheckSourceRuns/CMakeLists.txt
new file mode 100644
index 000000000..0421e2803
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.13)
+
+project(${RunCMake_TEST} LANGUAGES NONE)
+
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake
new file mode 100644
index 000000000..3029ac26b
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake
@@ -0,0 +1,13 @@
+
+enable_language (C)
+include(CheckSourceRuns)
+
+check_source_runs(C "int main() {return 2;}" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "C check_source_runs succeeded, but should have failed.")
+endif()
+
+check_source_runs(C "int main() {return 0;}" SHOULD_RUN)
+if(NOT SHOULD_RUN)
+ message(SEND_ERROR "C check_source_runs failed for valid C executable.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake
new file mode 100644
index 000000000..01e5ac83c
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake
@@ -0,0 +1,21 @@
+
+enable_language (CUDA)
+include(CheckSourceRuns)
+
+check_source_runs(CUDA "int main() {return 2;}" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "CUDA check_source_runs succeeded, but should have failed.")
+endif()
+
+check_source_runs(CUDA
+[=[
+ #include <vector>
+ __device__ __host__ void fake_function();
+ __host__ int main() {
+ return 0;
+ }
+]=]
+ SHOULD_RUN)
+if(NOT SHOULD_RUN)
+ message(SEND_ERROR "CUDA check_source_runs failed for valid CUDA executable.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake
new file mode 100644
index 000000000..d47ddda33
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake
@@ -0,0 +1,20 @@
+
+enable_language (CXX)
+include(CheckSourceRuns)
+
+check_source_runs(CXX "int main() {return 2;}" SHOULD_FAIL)
+if(SHOULD_FAIL)
+ message(SEND_ERROR "CXX check_source_runs succeeded, but should have failed.")
+endif()
+
+check_source_runs(CXX
+[=[
+ #include <vector>
+ int main() {
+ return 0;
+ }
+]=]
+ SHOULD_RUN)
+if(NOT SHOULD_RUN)
+ message(SEND_ERROR "CXX check_source_runs failed for valid C executable.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake
new file mode 100644
index 000000000..2a1fdfe19
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake
@@ -0,0 +1,14 @@
+
+
+enable_language (Fortran)
+include(CheckSourceRuns)
+
+check_source_runs(Fortran [=[
+ PROGRAM TEST_HAVE_PRINT
+ PRINT *, 'Hello'
+ END
+]=] SHOULD_BUILD)
+
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid Fortran source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake
new file mode 100644
index 000000000..55f28f3a7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake
@@ -0,0 +1,14 @@
+enable_language (OBJC)
+include(CheckSourceRuns)
+
+check_source_runs(OBJC [[
+ #import <Foundation/Foundation.h>
+ int main() {
+ NSObject *foo;
+ return 0;
+ }
+]] SHOULD_BUILD)
+
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid OBJC source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake
new file mode 100644
index 000000000..a218acdd7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake
@@ -0,0 +1,17 @@
+enable_language (OBJCXX)
+include(CheckSourceRuns)
+
+check_source_runs(OBJCXX [[
+ #include <vector>
+ #import <Foundation/Foundation.h>
+ int main() {
+ std::vector<int> v;
+ NSObject *foo;
+ return 0;
+ }
+]] SHOULD_BUILD)
+
+
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for OBJCXX source.")
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage-result.txt b/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage-stderr.txt b/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage-stderr.txt
new file mode 100644
index 000000000..08ffc2d42
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*CheckSourceRuns\.cmake:[0-9]+ \(message\):
+ check_source_runs: FAKE_LANG: unknown language.
diff --git a/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage.cmake b/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage.cmake
new file mode 100644
index 000000000..830074036
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/NonExistentLanguage.cmake
@@ -0,0 +1,3 @@
+
+include(CheckSourceRuns)
+check_source_runs(FAKE_LANG "int main() {return 0;}" SHOULD_BUILD)
diff --git a/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage-result.txt b/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage-stderr.txt b/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage-stderr.txt
new file mode 100644
index 000000000..b590763c4
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*CheckSourceRuns\.cmake:[0-9]+ \(message\):
+ check_source_runs: C: needs to be enabled before use.
diff --git a/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage.cmake b/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage.cmake
new file mode 100644
index 000000000..e16cec2cb
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/NotEnabledLanguage.cmake
@@ -0,0 +1,3 @@
+
+include(CheckSourceRuns)
+check_source_runs(C "int main() {return 0;}" SHOULD_BUILD)
diff --git a/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
new file mode 100644
index 000000000..c99ac8be2
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
@@ -0,0 +1,21 @@
+include(RunCMake)
+
+run_cmake(NotEnabledLanguage)
+run_cmake(NonExistentLanguage)
+run_cmake(UnknownArgument)
+
+run_cmake(CheckCSourceRuns)
+run_cmake(CheckCXXSourceRuns)
+
+if (APPLE)
+ run_cmake(CheckOBJCSourceRuns)
+ run_cmake(CheckOBJCXXSourceRuns)
+endif()
+
+if (CMAKE_Fortran_COMPILER_ID)
+ run_cmake(CheckFortranSourceRuns)
+endif()
+
+if (CMake_TEST_CUDA)
+ run_cmake(CheckCUDASourceRuns)
+endif()
diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt
new file mode 100644
index 000000000..6824e7264
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt
@@ -0,0 +1,24 @@
+^CMake Warning \(dev\) at [^
+]*/Modules/Internal/CheckSourceRuns.cmake:[0-9]+ \(message\):
+ Unknown argument:
+
+ BAD
+
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/CheckCSourceRuns.cmake:[0-9]+ \(cmake_check_source_runs\)
+ UnknownArgument.cmake:[0-9]+ \(check_c_source_runs\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at [^
+]*/Modules/Internal/CheckSourceRuns.cmake:[0-9]+ \(message\):
+ Unknown argument:
+
+ BAD
+
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/CheckSourceRuns.cmake:[0-9]+ \(cmake_check_source_runs\)
+ UnknownArgument.cmake:[0-9]+ \(check_source_runs\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake b/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake
new file mode 100644
index 000000000..927a6b06a
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake
@@ -0,0 +1,7 @@
+
+enable_language (C)
+include(CheckCSourceRuns)
+include(CheckSourceRuns)
+
+check_c_source_runs("int main() {return 0;}" C_SHOULD_BUILD BAD)
+check_source_runs(C "int main() {return 0;}" SHOULD_BUILD SRC_EXT c BAD)
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt b/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt
index d2a28310d..f6d72a9f2 100644
--- a/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt
@@ -1,7 +1,19 @@
add_custom_command(
- OUTPUT output.txt
- COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output.txt
+ OUTPUT output1.txt
+ COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output1.txt
)
-add_custom_target(CustomTarget ALL DEPENDS output.txt)
-add_custom_target(CustomTarget2 ALL DEPENDS output.txt)
-add_custom_target(CustomTarget3 ALL DEPENDS output.txt)
+add_custom_target(CustomTarget ALL DEPENDS output1.txt)
+
+add_custom_command(
+ OUTPUT output2.txt
+ COMMAND ${CMAKE_COMMAND} -E echo CustomCommand2 > output2.txt
+ )
+add_custom_target(CustomTarget2 ALL DEPENDS output2.txt)
+
+add_custom_command(
+ OUTPUT output3.txt
+ COMMAND ${CMAKE_COMMAND} -E echo CustomCommand2 > output3.txt
+ )
+add_custom_target(CustomTarget3 ALL DEPENDS output3.txt)
+
+add_custom_target(CustomTargetFail COMMAND DoesNotExist)
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
index 03286f1f7..e24e131b7 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":1}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":true,"version":{.*}}$
+^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":2}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":true,"version":{.*}}$
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt
deleted file mode 100644
index 4729ccb8f..000000000
--- a/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^Files ".*/compare_files/lf" to ".*/compare_files/crlf" are different.$
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt
deleted file mode 100644
index 8a9ca81f8..000000000
--- a/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^Files "nonexistent_a" to "nonexistent_b" are different.$
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt
@@ -0,0 +1 @@
+2
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-result.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-stderr.txt
new file mode 100644
index 000000000..50d9b0332
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: cmake version .*
+Usage: .* -E <command> \[arguments\.\.\.\]
+Available commands:
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-result.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt
new file mode 100644
index 000000000..21e60eec0
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: failed to create link .* no such file or directory
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-result.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-stderr.txt
new file mode 100644
index 000000000..a3345712b
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-stderr.txt
@@ -0,0 +1 @@
+^failed to create hard link because source path .* does not exist
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
new file mode 100644
index 000000000..5b97aecc0
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake
@@ -0,0 +1,3 @@
+if(${actual_stderr_var} MATCHES "operation not permitted")
+ unset(msg)
+endif()
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-result.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-stderr.txt
new file mode 100644
index 000000000..a3345712b
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-stderr.txt
@@ -0,0 +1 @@
+^failed to create hard link because source path .* does not exist
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt b/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt
index fc6291445..0fee56ce8 100644
--- a/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt
@@ -1,9 +1,20 @@
cmake_minimum_required(VERSION 3.14)
project(ExplicitDirs NONE)
+
add_custom_command(
- OUTPUT output.txt
- COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output.txt
+ OUTPUT output1.txt
+ COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output1.txt
)
-add_custom_target(CustomTarget ALL DEPENDS output.txt)
-add_custom_target(CustomTarget2 ALL DEPENDS output.txt)
-add_custom_target(CustomTarget3 ALL DEPENDS output.txt)
+add_custom_target(CustomTarget ALL DEPENDS output1.txt)
+
+add_custom_command(
+ OUTPUT output2.txt
+ COMMAND ${CMAKE_COMMAND} -E echo CustomCommand2 > output2.txt
+ )
+add_custom_target(CustomTarget2 ALL DEPENDS output2.txt)
+
+add_custom_command(
+ OUTPUT output3.txt
+ COMMAND ${CMAKE_COMMAND} -E echo CustomCommand2 > output3.txt
+ )
+add_custom_target(CustomTarget3 ALL DEPENDS output3.txt)
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index abb90509c..b23c8c26d 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -22,6 +22,7 @@ run_cmake_command(E_compare_files-different-eol ${CMAKE_COMMAND} -E compare_file
run_cmake_command(E_compare_files-ignore-eol-same ${CMAKE_COMMAND} -E compare_files --ignore-eol ${RunCMake_SOURCE_DIR}/compare_files/lf ${RunCMake_SOURCE_DIR}/compare_files/crlf)
run_cmake_command(E_compare_files-ignore-eol-empty ${CMAKE_COMMAND} -E compare_files --ignore-eol ${RunCMake_SOURCE_DIR}/compare_files/empty1 ${RunCMake_SOURCE_DIR}/compare_files/empty2)
run_cmake_command(E_compare_files-ignore-eol-nonexistent ${CMAKE_COMMAND} -E compare_files --ignore-eol nonexistent_a nonexistent_b)
+run_cmake_command(E_compare_files-invalid-arguments ${CMAKE_COMMAND} -E compare_files file1.txt file2.txt file3.txt)
run_cmake_command(E_echo_append ${CMAKE_COMMAND} -E echo_append)
run_cmake_command(E_rename-no-arg ${CMAKE_COMMAND} -E rename)
run_cmake_command(E_server-arg ${CMAKE_COMMAND} -E server --extra-arg)
@@ -66,6 +67,32 @@ run_cmake_command(install-bad-dir
run_cmake_command(install-options-to-vars
${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-install-options-to-vars
--strip --prefix /var/test --config sample --component pack)
+run_cmake_command(install-default-dir-permissions-all
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,g=rx,o=rx)
+run_cmake_command(install-default-dir-permissions-afew
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,g=rx)
+run_cmake_command(install-default-dir-permissions-none
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars)
+run_cmake_command(install-default-dir-permissions-invalid-comma1
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwxg=,x)
+run_cmake_command(install-default-dir-permissions-invalid-comma2
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwxg,=x)
+run_cmake_command(install-default-dir-permissions-comma-at-the-end
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,)
+run_cmake_command(install-default-dir-permissions-invalid-assignment
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,=x)
+run_cmake_command(install-default-dir-permissions-assignment-at-the-end
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,g=)
+run_cmake_command(install-default-dir-permissions-assignment-at-the-beginning
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions =u=rwx,g=rx)
run_cmake_command(cache-bad-entry
${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-entry/)
@@ -134,6 +161,8 @@ function(run_BuildDir)
${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget)
run_cmake_command(BuildDir--build-multiple-targets ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build -t CustomTarget2 --target CustomTarget3)
+ run_cmake_command(BuildDir--build-multiple-targets-fail ${CMAKE_COMMAND} -E chdir ..
+ ${CMAKE_COMMAND} --build BuildDir-build -t CustomTargetFail --target CustomTarget3)
run_cmake_command(BuildDir--build-multiple-targets-jobs ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget CustomTarget2 -j2 --target CustomTarget3)
run_cmake_command(BuildDir--build-multiple-targets-with-clean-first ${CMAKE_COMMAND} -E chdir ..
@@ -319,6 +348,42 @@ run_cmake_command(E_create_symlink-no-replace-dir
${CMAKE_COMMAND} -E create_symlink T .
)
+#create hard link tests
+run_cmake_command(E_create_hardlink-no-arg
+ ${CMAKE_COMMAND} -E create_hardlink
+ )
+
+set(dir ${RunCMake_BINARY_DIR}/hardlink_tests)
+file(REMOVE_RECURSE "${dir}")
+file(MAKE_DIRECTORY ${dir})
+
+run_cmake_command(E_create_hardlink-non-existent-source
+ ${CMAKE_COMMAND} -E create_hardlink ${dir}/I_dont_exist ${dir}/link
+ )
+
+file(TOUCH ${dir}/1)
+
+run_cmake_command(E_create_hardlink-ok
+ ${CMAKE_COMMAND} -E create_hardlink ${dir}/1 ${dir}/1-link
+ )
+
+run_cmake_command(E_create_hardlink-no-directory
+ ${CMAKE_COMMAND} -E create_hardlink ${dir}/1 ${dir}/a/1-link
+ )
+
+#On Windows, if the user does not have sufficient privileges
+#don't fail this test
+set(RunCMake_DEFAULT_stderr "(operation not permitted)?")
+run_cmake_command(E_create_hardlink-unresolved-symlink-prereq
+ ${CMAKE_COMMAND} -E create_symlink ${dir}/1 ${dir}/1-symlink
+ )
+file(REMOVE ${dir}/1)
+
+run_cmake_command(E_create_hardlink-unresolved-symlink
+ ${CMAKE_COMMAND} -E create_hardlink ${dir}/1-symlink ${dir}/1s-link
+ )
+unset(RunCMake_DEFAULT_stderr)
+
set(in ${RunCMake_SOURCE_DIR}/copy_input)
set(out ${RunCMake_BINARY_DIR}/copy_output)
file(REMOVE_RECURSE "${out}")
@@ -717,15 +782,15 @@ function(run_llvm_rc)
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake_command(llvm_rc_no_args ${CMAKE_COMMAND} -E cmake_llvm_rc)
run_cmake_command(llvm_rc_no_-- ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_empty_preprocessor ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp -- ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_failing_first_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -P FailedProgram.cmake -- ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_failing_second_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -P FailedProgram.cmake )
+ run_cmake_command(llvm_rc_empty_preprocessor ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ++ ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_failing_first_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -P FailedProgram.cmake ++ ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_failing_second_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" ++ ${CMAKE_COMMAND} -P FailedProgram.cmake )
if(EXISTS ${RunCMake_TEST_BINARY_DIR}/test.tmp)
message(SEND_ERROR "${test} - FAILED:\n"
"test.tmp was not deleted")
endif()
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir")
- run_cmake_command(llvm_rc_full_run ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -E copy test.tmp SOURCE_DIR/llvmrc.result )
+ run_cmake_command(llvm_rc_full_run ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" ++ ${CMAKE_COMMAND} -E copy test.tmp SOURCE_DIR/llvmrc.result )
if(EXISTS ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/test.tmp)
message(SEND_ERROR "${test} - FAILED:\n"
"test.tmp was not deleted")
diff --git a/Tests/RunCMake/CommandLine/dir-permissions-install-options-to-vars/cmake_install.cmake b/Tests/RunCMake/CommandLine/dir-permissions-install-options-to-vars/cmake_install.cmake
new file mode 100644
index 000000000..42ef7456f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/dir-permissions-install-options-to-vars/cmake_install.cmake
@@ -0,0 +1,3 @@
+if(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS)
+ message("CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is ${CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS}")
+endif()
diff --git a/Tests/RunCMake/interface_library/genex_link-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-result.txt
index 573541ac9..573541ac9 100644
--- a/Tests/RunCMake/interface_library/genex_link-result.txt
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-result.txt
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-stderr.txt
new file mode 100644
index 000000000..42f4b3f85
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-stderr.txt
@@ -0,0 +1 @@
+CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is OWNER_READ;OWNER_WRITE;OWNER_EXECUTE;GROUP_READ;GROUP_EXECUTE
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-result.txt
new file mode 100644
index 000000000..573541ac9
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-stderr.txt
new file mode 100644
index 000000000..813d9c366
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-stderr.txt
@@ -0,0 +1 @@
+CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is OWNER_READ;OWNER_WRITE;OWNER_EXECUTE;GROUP_READ;GROUP_EXECUTE;WORLD_READ;WORLD_EXECUTE
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-stderr.txt
new file mode 100644
index 000000000..1b8095240
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-result.txt
new file mode 100644
index 000000000..573541ac9
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-stderr.txt
new file mode 100644
index 000000000..6680932e1
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-stderr.txt
@@ -0,0 +1 @@
+CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is OWNER_READ;OWNER_WRITE;OWNER_EXECUTE
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-stderr.txt
new file mode 100644
index 000000000..1b8095240
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-stderr.txt
new file mode 100644
index 000000000..1b8095240
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-stderr.txt
new file mode 100644
index 000000000..1b8095240
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-stderr.txt
new file mode 100644
index 000000000..1b8095240
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-result.txt
new file mode 100644
index 000000000..573541ac9
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-stderr.txt
new file mode 100644
index 000000000..10f32932e
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CommandLine/trace-json-v1-check.py b/Tests/RunCMake/CommandLine/trace-json-v1-check.py
index e617b7632..1ee005ede 100755
--- a/Tests/RunCMake/CommandLine/trace-json-v1-check.py
+++ b/Tests/RunCMake/CommandLine/trace-json-v1-check.py
@@ -56,7 +56,7 @@ with open(trace_file, 'r') as fp:
assert sorted(vers.keys()) == ['version']
assert sorted(vers['version'].keys()) == ['major', 'minor']
assert vers['version']['major'] == 1
- assert vers['version']['minor'] == 0
+ assert vers['version']['minor'] == 1
for i in fp.readlines():
line = json.loads(i)
diff --git a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
index f452db177..ebab7a357 100644
--- a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
+++ b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
index 0196611ca..64b52d9e1 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.3)
project(CompatibleInterface)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
index 5772856cc..f072eb0bc 100644
--- a/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
@@ -5,5 +5,5 @@ add_library(bar UNKNOWN IMPORTED)
set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_STRING INCLUDE_DIRECTORIES)
add_executable(user main.cpp)
-set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES bar_inc)
+set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/bar_inc)
target_link_libraries(user foo bar)
diff --git a/Tests/RunCMake/CompilerArgs/C.cmake b/Tests/RunCMake/CompilerArgs/C.cmake
new file mode 100644
index 000000000..96b004bda
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/C.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.c)
diff --git a/Tests/RunCMake/interface_library/CMakeLists.txt b/Tests/RunCMake/CompilerArgs/CMakeLists.txt
index 12cd3c775..18dfd2686 100644
--- a/Tests/RunCMake/interface_library/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerArgs/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.2)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompilerArgs/CXX.cmake b/Tests/RunCMake/CompilerArgs/CXX.cmake
new file mode 100644
index 000000000..3d2ee0012
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/CXX.cmake
@@ -0,0 +1,3 @@
+enable_language(CXX)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.cxx)
diff --git a/Tests/RunCMake/CompilerArgs/FindCCompiler.cmake b/Tests/RunCMake/CompilerArgs/FindCCompiler.cmake
new file mode 100644
index 000000000..aeaaf7f7e
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/FindCCompiler.cmake
@@ -0,0 +1,2 @@
+enable_language(C)
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/C_comp.cmake" "set(temp_CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")\n")
diff --git a/Tests/RunCMake/CompilerArgs/FindCXXCompiler.cmake b/Tests/RunCMake/CompilerArgs/FindCXXCompiler.cmake
new file mode 100644
index 000000000..663ac83f9
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/FindCXXCompiler.cmake
@@ -0,0 +1,2 @@
+enable_language(CXX)
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CXX_comp.cmake" "set(temp_CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")\n")
diff --git a/Tests/RunCMake/CompilerArgs/RunCMakeTest.cmake b/Tests/RunCMake/CompilerArgs/RunCMakeTest.cmake
new file mode 100644
index 000000000..9e5a18ad3
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/RunCMakeTest.cmake
@@ -0,0 +1,58 @@
+include(RunCMake)
+
+function(find_compiler lang)
+ # Detect the compiler in use in the current environment.
+ run_cmake(Find${lang}Compiler)
+ # Use the detected compiler
+ include(${RunCMake_BINARY_DIR}/Find${lang}Compiler-build/${lang}_comp.cmake)
+ if(NOT temp_CMAKE_${lang}_COMPILER)
+ message(FATAL_ERROR "FindCompiler provided no compiler!")
+ endif()
+ # Create a toolchain file
+ set(__test_compiler_var CMAKE_${lang}_COMPILER)
+ set(__test_compiler "${temp_CMAKE_${lang}_COMPILER}")
+ configure_file(${RunCMake_SOURCE_DIR}/toolchain.cmake.in
+ ${RunCMake_BINARY_DIR}/Find${lang}Compiler-build/toolchain_${lang}_comp.cmake @ONLY)
+endfunction()
+
+function(run_compiler_env lang)
+ # Use the correct compiler
+ include(${RunCMake_BINARY_DIR}/Find${lang}Compiler-build/${lang}_comp.cmake)
+
+ # Use a single build tree for tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${lang}-env-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ # Set the compiler
+ if(lang STREQUAL "C")
+ set(ENV{CC} "'${temp_CMAKE_${lang}_COMPILER}' -DFOO1 -DFOO2")
+ else()
+ set(ENV{${lang}} "'${temp_CMAKE_${lang}_COMPILER}' -DFOO1 -DFOO2")
+ endif()
+
+ run_cmake(${lang})
+ run_cmake_command(${lang}-Build ${CMAKE_COMMAND} --build . ${verbose_args})
+endfunction()
+
+function(run_compiler_tc lang)
+ # Use a single build tree for tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${lang}-tc-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ set(RunCMake_TEST_OPTIONS
+ -DCMAKE_TOOLCHAIN_FILE=${RunCMake_BINARY_DIR}/Find${lang}Compiler-build/toolchain_${lang}_comp.cmake)
+ run_cmake(${lang})
+ run_cmake_command(${lang}-Build ${CMAKE_COMMAND} --build . ${verbose_args})
+endfunction()
+
+set(langs C CXX)
+
+foreach(lang ${langs})
+ find_compiler(${lang})
+ run_compiler_env(${lang})
+ run_compiler_tc(${lang})
+endforeach()
diff --git a/Tests/RunCMake/CompilerArgs/main.c b/Tests/RunCMake/CompilerArgs/main.c
new file mode 100644
index 000000000..b52613531
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/main.c
@@ -0,0 +1,10 @@
+#ifndef FOO1
+# error Missing FOO1
+#endif
+#ifndef FOO2
+# error Missing FOO2
+#endif
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CompilerArgs/main.cxx b/Tests/RunCMake/CompilerArgs/main.cxx
new file mode 100644
index 000000000..db90e933e
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/main.cxx
@@ -0,0 +1,10 @@
+#ifndef FOO1
+# error Missing FOO1
+#endif
+#ifndef FOO2
+# error Missing FOO2
+#endif
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CompilerArgs/toolchain.cmake.in b/Tests/RunCMake/CompilerArgs/toolchain.cmake.in
new file mode 100644
index 000000000..ff776397c
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/toolchain.cmake.in
@@ -0,0 +1 @@
+set(@__test_compiler_var@ "@__test_compiler@" -DFOO1 -DFOO2)
diff --git a/Tests/RunCMake/CompilerChange/CMakeLists.txt b/Tests/RunCMake/CompilerChange/CMakeLists.txt
index b4b30165f..14c47ad6b 100644
--- a/Tests/RunCMake/CompilerChange/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerChange/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
if(NOT RunCMake_TEST)
set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted
endif()
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-Build-stdout.txt
new file mode 100644
index 000000000..3313e31f6
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-common.cmake b/Tests/RunCMake/CompilerLauncher/ISPC-common.cmake
new file mode 100644
index 000000000..a6e576e31
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-common.cmake
@@ -0,0 +1,8 @@
+enable_language(ISPC)
+enable_language(CXX)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+
+if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(CMAKE_ISPC_FLAGS "--arch=x86")
+endif()
+add_executable(main main.cxx test.ispc)
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt
new file mode 100644
index 000000000..3313e31f6
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-env-launch-Build-stdout.txt
new file mode 100644
index 000000000..3313e31f6
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-env-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-env.cmake b/Tests/RunCMake/CompilerLauncher/ISPC-env.cmake
new file mode 100644
index 000000000..4afd9190c
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-env.cmake
@@ -0,0 +1 @@
+include(ISPC-common.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-launch-Build-stdout.txt
new file mode 100644
index 000000000..3313e31f6
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-launch-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-launch-env.cmake b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env.cmake
new file mode 100644
index 000000000..f50fb6500
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(ISPC-env.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-launch.cmake b/Tests/RunCMake/CompilerLauncher/ISPC-launch.cmake
new file mode 100644
index 000000000..b0cafbe7f
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(ISPC.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC.cmake b/Tests/RunCMake/CompilerLauncher/ISPC.cmake
new file mode 100644
index 000000000..83efa8096
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/ISPC.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_ISPC_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+include(ISPC-common.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
index 69fff2091..293d71199 100644
--- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
@@ -29,6 +29,9 @@ endif()
if(CMake_TEST_Fortran)
list(APPEND langs Fortran)
endif()
+if(CMake_TEST_ISPC)
+ list(APPEND langs ISPC)
+endif()
if(CMake_TEST_OBJC)
list(APPEND langs OBJC OBJCXX)
endif()
diff --git a/Tests/RunCMake/CompilerLauncher/test.ispc b/Tests/RunCMake/CompilerLauncher/test.ispc
new file mode 100644
index 000000000..b061f40a5
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/test.ispc
@@ -0,0 +1,4 @@
+
+float func(float a, float b) {
+ return a + b / 2.;
+}
diff --git a/Tests/RunCMake/CompilerNotFound/CMakeLists.txt b/Tests/RunCMake/CompilerNotFound/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/CompilerNotFound/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerNotFound/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Configure/CMakeLists.txt b/Tests/RunCMake/Configure/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/Configure/CMakeLists.txt
+++ b/Tests/RunCMake/Configure/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/CMakeLists.txt b/Tests/RunCMake/DependencyGraph/CMakeLists.txt
new file mode 100644
index 000000000..b646c4ac6
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.18)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeCommon.cmake b/Tests/RunCMake/DependencyGraph/OptimizeCommon.cmake
new file mode 100644
index 000000000..4954bc46c
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeCommon.cmake
@@ -0,0 +1,40 @@
+enable_language(C)
+
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY out)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY out)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY out)
+
+add_library(SharedTop SHARED mylib.c)
+add_library(StaticTop STATIC mylib.c)
+add_library(StaticMiddle STATIC mylib.c)
+
+add_library(StaticNone STATIC mylib.c)
+add_library(StaticPreBuild STATIC mylib.c)
+add_library(StaticPreLink STATIC mylib.c)
+add_library(StaticPostBuild STATIC mylib.c)
+add_library(StaticCc STATIC mylibcc.c)
+
+add_custom_command(TARGET StaticPreBuild PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E true)
+add_custom_command(TARGET StaticPreLink PRE_LINK
+ COMMAND ${CMAKE_COMMAND} -E true)
+add_custom_command(TARGET StaticPostBuild POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E true)
+add_custom_command(OUTPUT mylibcc.c
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/mylib.c ${CMAKE_BINARY_DIR}/mylibcc.c)
+
+target_link_libraries(SharedTop PRIVATE StaticMiddle)
+target_link_libraries(StaticTop PRIVATE StaticMiddle)
+target_link_libraries(StaticMiddle PRIVATE StaticNone StaticPreBuild StaticPreLink StaticPostBuild StaticCc)
+
+if(OPTIMIZE_TOP)
+ set_target_properties(SharedTop StaticTop PROPERTIES
+ OPTIMIZE_DEPENDENCIES TRUE)
+endif()
+if(OPTIMIZE_MIDDLE)
+ set_target_properties(StaticMiddle PROPERTIES
+ OPTIMIZE_DEPENDENCIES TRUE)
+endif()
+
+include(WriteTargets.cmake)
+write_targets()
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-check.cmake
new file mode 100644
index 000000000..1020cb344
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-check.cmake
@@ -0,0 +1,5 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${FortranTop_TARGET_FILE}
+ ${FortranBottom_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-stderr.txt b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-stderr.txt
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-both.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both.cmake
new file mode 100644
index 000000000..581fd46e6
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both.cmake
@@ -0,0 +1 @@
+include(OptimizeFortranCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-check.cmake
new file mode 100644
index 000000000..5c7e8cd1e
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-check.cmake
@@ -0,0 +1,6 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${FortranTop_TARGET_FILE}
+ ${CMiddle_TARGET_FILE}
+ ${FortranBottom_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-stderr.txt b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-stderr.txt
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle.cmake
new file mode 100644
index 000000000..581fd46e6
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle.cmake
@@ -0,0 +1 @@
+include(OptimizeFortranCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-check.cmake
new file mode 100644
index 000000000..5c7e8cd1e
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-check.cmake
@@ -0,0 +1,6 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${FortranTop_TARGET_FILE}
+ ${CMiddle_TARGET_FILE}
+ ${FortranBottom_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-stderr.txt b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-stderr.txt
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-none.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none.cmake
new file mode 100644
index 000000000..581fd46e6
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none.cmake
@@ -0,0 +1 @@
+include(OptimizeFortranCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-check.cmake
new file mode 100644
index 000000000..1020cb344
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-check.cmake
@@ -0,0 +1,5 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${FortranTop_TARGET_FILE}
+ ${FortranBottom_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-stderr.txt b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-stderr.txt
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-top.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top.cmake
new file mode 100644
index 000000000..581fd46e6
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top.cmake
@@ -0,0 +1 @@
+include(OptimizeFortranCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortranCommon.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortranCommon.cmake
new file mode 100644
index 000000000..354d3fc53
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortranCommon.cmake
@@ -0,0 +1,25 @@
+enable_language(C)
+enable_language(Fortran)
+
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY out)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY out)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY out)
+
+add_library(FortranTop STATIC mylib.f90)
+add_library(CMiddle STATIC mylib.c)
+add_library(FortranBottom STATIC mylib.f90)
+
+target_link_libraries(FortranTop PRIVATE CMiddle)
+target_link_libraries(CMiddle PRIVATE FortranBottom)
+
+if(OPTIMIZE_TOP)
+ set_target_properties(FortranTop PROPERTIES
+ OPTIMIZE_DEPENDENCIES TRUE)
+endif()
+if(OPTIMIZE_MIDDLE)
+ set_target_properties(CMiddle PROPERTIES
+ OPTIMIZE_DEPENDENCIES TRUE)
+endif()
+
+include(WriteTargets.cmake)
+write_targets()
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-both-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-both-build-check.cmake
new file mode 100644
index 000000000..312de0425
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-both-build-check.cmake
@@ -0,0 +1,11 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${SharedTop_TARGET_FILE}
+ ${SharedTop_TARGET_LINKER_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-both.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-both.cmake
new file mode 100644
index 000000000..c150e6279
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-both.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-middle-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-middle-build-check.cmake
new file mode 100644
index 000000000..312de0425
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-middle-build-check.cmake
@@ -0,0 +1,11 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${SharedTop_TARGET_FILE}
+ ${SharedTop_TARGET_LINKER_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-middle.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-middle.cmake
new file mode 100644
index 000000000..c150e6279
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-middle.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-none-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-none-build-check.cmake
new file mode 100644
index 000000000..312de0425
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-none-build-check.cmake
@@ -0,0 +1,11 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${SharedTop_TARGET_FILE}
+ ${SharedTop_TARGET_LINKER_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-none.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-none.cmake
new file mode 100644
index 000000000..c150e6279
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-none.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-top-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-top-build-check.cmake
new file mode 100644
index 000000000..312de0425
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-top-build-check.cmake
@@ -0,0 +1,11 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${SharedTop_TARGET_FILE}
+ ${SharedTop_TARGET_LINKER_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-top.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-top.cmake
new file mode 100644
index 000000000..c150e6279
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-top.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-both-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-both-build-check.cmake
new file mode 100644
index 000000000..5222ed7f4
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-both-build-check.cmake
@@ -0,0 +1,8 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${StaticTop_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-both.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-both.cmake
new file mode 100644
index 000000000..c150e6279
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-both.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle-build-check.cmake
new file mode 100644
index 000000000..5cba2238a
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle-build-check.cmake
@@ -0,0 +1,10 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${StaticTop_TARGET_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle.cmake
new file mode 100644
index 000000000..c150e6279
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-none-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-none-build-check.cmake
new file mode 100644
index 000000000..5cba2238a
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-none-build-check.cmake
@@ -0,0 +1,10 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${StaticTop_TARGET_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-none.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-none.cmake
new file mode 100644
index 000000000..c150e6279
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-none.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-top-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-top-build-check.cmake
new file mode 100644
index 000000000..5222ed7f4
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-top-build-check.cmake
@@ -0,0 +1,8 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${StaticTop_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-top.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-top.cmake
new file mode 100644
index 000000000..c150e6279
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-top.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/Property.cmake b/Tests/RunCMake/DependencyGraph/Property.cmake
new file mode 100644
index 000000000..08fdd2b3b
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/Property.cmake
@@ -0,0 +1,24 @@
+enable_language(C)
+
+add_library(Unset STATIC mylib.c)
+
+set(CMAKE_OPTIMIZE_DEPENDENCIES TRUE)
+add_library(SetTrue STATIC mylib.c)
+
+set(CMAKE_OPTIMIZE_DEPENDENCIES FALSE)
+add_library(SetFalse STATIC mylib.c)
+
+get_property(_set TARGET Unset PROPERTY OPTIMIZE_DEPENDENCIES SET)
+if(_set)
+ message(SEND_ERROR "OPTIMIZE_DEPENDENCIES property should not be set on Unset target")
+endif()
+
+get_property(_true TARGET SetTrue PROPERTY OPTIMIZE_DEPENDENCIES)
+if(NOT _true STREQUAL "TRUE")
+ message(SEND_ERROR "OPTIMIZE_DEPENDENCIES property should be TRUE on SetTrue target")
+endif()
+
+get_property(_false TARGET SetFalse PROPERTY OPTIMIZE_DEPENDENCIES)
+if(NOT _false STREQUAL "FALSE")
+ message(SEND_ERROR "OPTIMIZE_DEPENDENCIES property should be FALSE on SetFalse target")
+endif()
diff --git a/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake b/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake
new file mode 100644
index 000000000..cb0d541b7
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake
@@ -0,0 +1,60 @@
+include(RunCMake)
+
+function(check_files dir)
+ set(expected ${ARGN})
+ list(FILTER expected EXCLUDE REGEX "^$")
+ list(REMOVE_DUPLICATES expected)
+ list(SORT expected)
+
+ file(GLOB_RECURSE glob "${dir}/*")
+ set(actual)
+ foreach(i IN LISTS glob)
+ if(NOT i MATCHES "(\\.manifest$)|(\\.exp$)|(\\.tds$)")
+ list(APPEND actual ${i})
+ endif()
+ endforeach()
+ list(REMOVE_DUPLICATES actual)
+ list(SORT actual)
+
+ if(NOT "${expected}" STREQUAL "${actual}")
+ string(REPLACE ";" "\n " expected_formatted "${expected}")
+ string(REPLACE ";" "\n " actual_formatted "${actual}")
+ string(APPEND RunCMake_TEST_FAILED "Actual files did not match expected\nExpected:\n ${expected_formatted}\nActual:\n ${actual_formatted}\n")
+ endif()
+
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+endfunction()
+
+function(run_cmake_build name)
+ set(RunCMake_TEST_NO_CLEAN TRUE)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
+ file(REMOVE_RECURSE ${RunCMake_TEST_BINARY_DIR})
+ if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
+ endif()
+ run_cmake(${name})
+ set(RunCMake_TEST_OPTIONS)
+ run_cmake_command(${name}-build ${CMAKE_COMMAND}
+ --build ${RunCMake_TEST_BINARY_DIR}
+ --config Release
+ --target ${ARGN})
+endfunction()
+
+function(run_optimize_test name)
+ set(RunCMake_TEST_OPTIONS)
+ run_cmake_build(${name}-none ${ARGN})
+ set(RunCMake_TEST_OPTIONS -DOPTIMIZE_TOP=TRUE)
+ run_cmake_build(${name}-top ${ARGN})
+ set(RunCMake_TEST_OPTIONS -DOPTIMIZE_MIDDLE=TRUE)
+ run_cmake_build(${name}-middle ${ARGN})
+ set(RunCMake_TEST_OPTIONS -DOPTIMIZE_TOP=TRUE -DOPTIMIZE_MIDDLE=TRUE)
+ run_cmake_build(${name}-both ${ARGN})
+endfunction()
+
+run_cmake(Property)
+
+run_optimize_test(OptimizeShared SharedTop)
+run_optimize_test(OptimizeStatic StaticTop)
+if(CMAKE_Fortran_COMPILER)
+ run_optimize_test(OptimizeFortran FortranTop)
+endif()
diff --git a/Tests/RunCMake/DependencyGraph/WriteTargets.cmake b/Tests/RunCMake/DependencyGraph/WriteTargets.cmake
new file mode 100644
index 000000000..e1012c119
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/WriteTargets.cmake
@@ -0,0 +1,16 @@
+function(write_targets)
+ set(_input "")
+
+ get_property(_targets DIRECTORY . PROPERTY BUILDSYSTEM_TARGETS)
+ foreach(_t IN LISTS _targets)
+ get_property(_type TARGET "${_t}" PROPERTY TYPE)
+ if(_type STREQUAL "SHARED_LIBRARY")
+ string(APPEND _input "set(${_t}_TARGET_FILE [==[$<TARGET_FILE:${_t}>]==])\n")
+ string(APPEND _input "set(${_t}_TARGET_LINKER_FILE [==[$<TARGET_LINKER_FILE:${_t}>]==])\n")
+ elseif(_type STREQUAL "STATIC_LIBRARY")
+ string(APPEND _input "set(${_t}_TARGET_FILE [==[$<TARGET_FILE:${_t}>]==])\n")
+ endif()
+ endforeach()
+
+ file(GENERATE OUTPUT target_files.cmake CONTENT "${_input}" CONDITION $<CONFIG:Release>)
+endfunction()
diff --git a/Tests/RunCMake/DependencyGraph/mylib.c b/Tests/RunCMake/DependencyGraph/mylib.c
new file mode 100644
index 000000000..5422fe307
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/mylib.c
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void mylib(void)
+{
+}
diff --git a/Tests/RunCMake/DependencyGraph/mylib.f90 b/Tests/RunCMake/DependencyGraph/mylib.f90
new file mode 100644
index 000000000..104768f89
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/mylib.f90
@@ -0,0 +1,3 @@
+function mylib_fortran()
+ mylib_fortran = 42
+end function mylib_fortran
diff --git a/Tests/RunCMake/DisallowedCommands/CMakeLists.txt b/Tests/RunCMake/DisallowedCommands/CMakeLists.txt
index 12cd3c775..4b3de84d9 100644
--- a/Tests/RunCMake/DisallowedCommands/CMakeLists.txt
+++ b/Tests/RunCMake/DisallowedCommands/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt
new file mode 100644
index 000000000..74b3ff8de
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.3)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
new file mode 100644
index 000000000..2b4fc8931
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
@@ -0,0 +1,26 @@
+include(RunCMake)
+
+function(run_single_config_test label config exclude_from_all_value expectation)
+ set(case single-config)
+ message("-- Starting ${case} test: ${label}")
+ set(full_case_name "${case}-build-${config}")
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${full_case_name}/")
+ run_cmake_with_options(${case}
+ -DCMAKE_BUILD_TYPE=${config}
+ -DTOOL_EXCLUDE_FROM_ALL=${exclude_from_all_value})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ include(${RunCMake_TEST_BINARY_DIR}/target_files_${config}.cmake)
+ 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("excluded" Debug 1 "should_not_exist")
+
+if(RunCMake_GENERATOR MATCHES "^(Xcode|Visual Studio)")
+ run_cmake(error-on-mixed-config)
+else()
+ run_single_config_test("explicitly not excluded with genex"
+ Release $<CONFIG:Debug> "should_exist")
+ run_single_config_test("excluded with genex"
+ Debug $<CONFIG:Debug> "should_not_exist")
+endif()
diff --git a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-result.txt b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
new file mode 100644
index 000000000..6dc785f3f
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error in CMakeLists.txt:
+ The EXCLUDE_FROM_ALL property of target "release_only_tool" varies by
+ configuration. This is not supported by the "[^"]+"
diff --git a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config.cmake b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config.cmake
new file mode 100644
index 000000000..6c0ed1d4a
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config.cmake
@@ -0,0 +1,6 @@
+enable_language(C)
+
+set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "")
+
+add_executable(release_only_tool main.c)
+set_property(TARGET release_only_tool PROPERTY EXCLUDE_FROM_ALL "$<NOT:$<CONFIG:Release>>")
diff --git a/Tests/RunCMake/ExcludeFromAll/main.c b/Tests/RunCMake/ExcludeFromAll/main.c
new file mode 100644
index 000000000..f8b643afb
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/main.c
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake b/Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake
new file mode 100644
index 000000000..1c455f256
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake
@@ -0,0 +1,17 @@
+if(expectation STREQUAL "should_not_exist")
+ set(should_exist FALSE)
+elseif(expectation STREQUAL "should_exist")
+ set(should_exist TRUE)
+else()
+ message(FATAL_ERROR "Encountered unknown expectation: ${expectation}")
+endif()
+
+if(EXISTS "${TARGET_FILE_tool_${config}}")
+ if(NOT should_exist)
+ message(FATAL_ERROR "${TARGET_FILE_tool_${config}} should not exist.")
+ endif()
+else()
+ if(should_exist)
+ message(FATAL_ERROR "${TARGET_FILE_tool_${config}} should exist.")
+ endif()
+endif()
diff --git a/Tests/RunCMake/ExcludeFromAll/single-config.cmake b/Tests/RunCMake/ExcludeFromAll/single-config.cmake
new file mode 100644
index 000000000..aa49c214e
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/single-config.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+add_executable(tool main.c)
+set_property(TARGET tool PROPERTY EXCLUDE_FROM_ALL "${TOOL_EXCLUDE_FROM_ALL}")
+
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/target_files_$<CONFIG>.cmake" CONTENT [[
+set(TARGET_FILE_tool_$<CONFIG> [==[$<TARGET_FILE:tool>]==])
+]])
diff --git a/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt b/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
+++ b/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalData/CMakeLists.txt b/Tests/RunCMake/ExternalData/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/ExternalData/CMakeLists.txt
+++ b/Tests/RunCMake/ExternalData/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake
index 38683f12e..bfed4fa7c 100644
--- a/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake
@@ -1,4 +1,9 @@
cmake_minimum_required(VERSION ${CMAKE_VERSION})
+if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
+ cmake_policy(SET CMP0114 NEW)
+else()
+ cmake_policy(SET CMP0114 OLD) # Test deprecated behavior.
+endif()
include(ExternalProject)
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake
index 264c3f04c..039dec6a1 100644
--- a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake
@@ -1,4 +1,9 @@
cmake_minimum_required(VERSION ${CMAKE_VERSION})
+if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
+ cmake_policy(SET CMP0114 NEW)
+else()
+ cmake_policy(SET CMP0114 OLD) # Test deprecated behavior.
+endif()
include(ExternalProject)
diff --git a/Tests/RunCMake/ExternalProject/BadIndependentStep1-result.txt b/Tests/RunCMake/ExternalProject/BadIndependentStep1-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/BadIndependentStep1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/BadIndependentStep1-stderr.txt b/Tests/RunCMake/ExternalProject/BadIndependentStep1-stderr.txt
new file mode 100644
index 000000000..3188910a0
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/BadIndependentStep1-stderr.txt
@@ -0,0 +1,7 @@
+^CMake Error at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ ExternalProject 'proj' step 'custom' is marked INDEPENDENT but depends on
+ step 'configure' that is not marked INDEPENDENT.
+Call Stack \(most recent call first\):
+ BadIndependentStep1.cmake:[0-9]+ \(ExternalProject_Add_Step\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/BadIndependentStep1.cmake b/Tests/RunCMake/ExternalProject/BadIndependentStep1.cmake
new file mode 100644
index 000000000..c81eb07c3
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/BadIndependentStep1.cmake
@@ -0,0 +1,14 @@
+include(ExternalProject)
+cmake_policy(SET CMP0114 NEW)
+
+ExternalProject_Add(proj
+ SOURCE_DIR "."
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ )
+ExternalProject_Add_Step(proj custom
+ DEPENDEES configure
+ INDEPENDENT 1
+ )
diff --git a/Tests/RunCMake/ExternalProject/BadIndependentStep2-result.txt b/Tests/RunCMake/ExternalProject/BadIndependentStep2-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/BadIndependentStep2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/BadIndependentStep2-stderr.txt b/Tests/RunCMake/ExternalProject/BadIndependentStep2-stderr.txt
new file mode 100644
index 000000000..0b87e5e5f
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/BadIndependentStep2-stderr.txt
@@ -0,0 +1,7 @@
+^CMake Error at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ ExternalProject 'proj' step 'update' is marked INDEPENDENT but depends on
+ step 'custom' that is not marked INDEPENDENT.
+Call Stack \(most recent call first\):
+ BadIndependentStep2.cmake:[0-9]+ \(ExternalProject_Add_Step\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/BadIndependentStep2.cmake b/Tests/RunCMake/ExternalProject/BadIndependentStep2.cmake
new file mode 100644
index 000000000..4a530eace
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/BadIndependentStep2.cmake
@@ -0,0 +1,13 @@
+include(ExternalProject)
+cmake_policy(SET CMP0114 NEW)
+
+ExternalProject_Add(proj
+ SOURCE_DIR "."
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ )
+ExternalProject_Add_Step(proj custom
+ DEPENDERS update
+ )
diff --git a/Tests/RunCMake/ExternalProject/CMakeLists.txt b/Tests/RunCMake/ExternalProject/CMakeLists.txt
index c585733b6..933a57a4d 100644
--- a/Tests/RunCMake/ExternalProject/CMakeLists.txt
+++ b/Tests/RunCMake/ExternalProject/CMakeLists.txt
@@ -1,3 +1,6 @@
-cmake_minimum_required(VERSION ${CMAKE_VERSION})
+cmake_minimum_required(VERSION 3.18)
project(${RunCMake_TEST} NONE)
+if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12 AND NOT RunCMake_TEST STREQUAL "Xcode-CMP0114")
+ cmake_policy(SET CMP0114 NEW)
+endif()
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalProject/DownloadInactivityResume.cmake b/Tests/RunCMake/ExternalProject/DownloadInactivityResume.cmake
new file mode 100644
index 000000000..d34482dd7
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadInactivityResume.cmake
@@ -0,0 +1,5 @@
+include(ExternalProject)
+ExternalProject_Add(MyProj URL ${SERVER_URL} INACTIVITY_TIMEOUT 2 DOWNLOAD_NO_EXTRACT TRUE
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND "")
diff --git a/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-result.txt b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-stdout.txt b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-stdout.txt
new file mode 100644
index 000000000..323814792
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-stdout.txt
@@ -0,0 +1 @@
+(Timeout was reached)?
diff --git a/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout.cmake b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout.cmake
new file mode 100644
index 000000000..d34482dd7
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout.cmake
@@ -0,0 +1,5 @@
+include(ExternalProject)
+ExternalProject_Add(MyProj URL ${SERVER_URL} INACTIVITY_TIMEOUT 2 DOWNLOAD_NO_EXTRACT TRUE
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND "")
diff --git a/Tests/RunCMake/ExternalProject/DownloadServer.py b/Tests/RunCMake/ExternalProject/DownloadServer.py
new file mode 100644
index 000000000..63b7fa725
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadServer.py
@@ -0,0 +1,53 @@
+from http.server import HTTPServer, BaseHTTPRequestHandler
+import argparse
+import time
+import subprocess
+import sys
+import os
+import threading
+args = None
+outerthread = None
+
+barrier = threading.Barrier(2)
+
+class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
+ def do_GET(self):
+ barrier.wait()
+ self.send_response(200)
+ self.end_headers()
+ data = b'D'
+
+ if args.speed_limit:
+ slow_deadline = time.time()+args.limit_duration
+
+ while time.time() < slow_deadline:
+ self.wfile.write(data)
+ if args.speed_limit:
+ time.sleep(1.1)
+
+ data = data * 100
+ self.wfile.write(data)
+ self.close_connection = True
+
+def runServer(fileName):
+ httpd = HTTPServer(('localhost', 0), SimpleHTTPRequestHandler)
+ with open(fileName,"w") as f:
+ f.write('http://localhost:{}/test'.format(httpd.socket.getsockname()[1]))
+ httpd.handle_request()
+ os.remove(fileName)
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--speed_limit', help='transfer rate limitation', action='store_true',default=False)
+ parser.add_argument('--limit_duration', help='duration of the transfer rate limitation',default=1, type=float)
+ parser.add_argument('--file', help='file to write the url to connect to')
+ parser.add_argument('--subprocess', action='store_true')
+ args = parser.parse_args()
+ if not args.subprocess:
+ subprocess.Popen([sys.executable]+sys.argv+['--subprocess'],stdin=subprocess.DEVNULL, stderr=subprocess.DEVNULL,stdout=subprocess.DEVNULL)
+ else:
+ serverThread = threading.Thread(target=runServer,args=(args.file,))
+ serverThread.daemon = True
+ serverThread.start()
+ barrier.wait(60)
+ serverThread.join(20)
diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt
new file mode 100644
index 000000000..c20fd86c7
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt
@@ -0,0 +1 @@
+^[^0]
diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake b/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake
new file mode 100644
index 000000000..c90b4bada
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake
@@ -0,0 +1,5 @@
+include(ExternalProject)
+set(source_dir "${CMAKE_CURRENT_BINARY_DIR}/DownloadTimeout")
+file(REMOVE_RECURSE "${source_dir}")
+file(MAKE_DIRECTORY "${source_dir}")
+ExternalProject_Add(MyProj URL "http://cmake.org/invalid_file.tar.gz")
diff --git a/Tests/RunCMake/ExternalProject/MultiCommand.cmake b/Tests/RunCMake/ExternalProject/MultiCommand.cmake
index a8dbfea5d..dbf67eb71 100644
--- a/Tests/RunCMake/ExternalProject/MultiCommand.cmake
+++ b/Tests/RunCMake/ExternalProject/MultiCommand.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.9)
-
include(ExternalProject)
# Verify COMMAND keyword is recognised after various *_COMMAND options
@@ -20,10 +18,6 @@ ExternalProject_Add(multiCommand
COMMAND "${CMAKE_COMMAND}" -E echo "install 2"
)
-# Workaround for issue 17229 (missing dependency between update and patch steps)
-ExternalProject_Add_StepTargets(multiCommand NO_DEPENDS update)
-ExternalProject_Add_StepDependencies(multiCommand patch multiCommand-update)
-
# Force all steps to be re-run by removing timestamps from any previous run
ExternalProject_Get_Property(multiCommand STAMP_DIR)
file(REMOVE_RECURSE "${STAMP_DIR}")
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS.cmake b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-Common.cmake
index 57626d679..176e28beb 100644
--- a/Tests/RunCMake/ExternalProject/NO_DEPENDS.cmake
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-Common.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
include(ExternalProject RESULT_VARIABLE GOO)
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct-result.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct-stderr.txt
new file mode 100644
index 000000000..c6bf767fa
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct-stderr.txt
@@ -0,0 +1,7 @@
+^CMake Error at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ The 'NO_DEPENDS' option is no longer allowed. It has been superseded by
+ the per-step 'INDEPENDENT' option. See policy CMP0114.
+Call Stack \(most recent call first\):
+ NO_DEPENDS-CMP0114-NEW-Direct.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct.cmake b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct.cmake
new file mode 100644
index 000000000..7ec1a0050
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-Direct.cmake
@@ -0,0 +1,4 @@
+cmake_policy(SET CMP0114 NEW)
+include(ExternalProject)
+ExternalProject_Add(BAR SOURCE_DIR . TEST_COMMAND echo test)
+ExternalProject_Add_StepTargets(BAR NO_DEPENDS test)
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-result.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt
new file mode 100644
index 000000000..5a5ba891d
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt
@@ -0,0 +1,16 @@
+^CMake Error at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ ExternalProject 'FOO' option 'INDEPENDENT_STEP_TARGETS' is set to
+
+ download;patch;update;configure;build
+
+ but the option is no longer allowed. It has been superseded by the
+ per-step 'INDEPENDENT' option. See policy CMP0114.
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_mkdir_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-NEW.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW.cmake b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW.cmake
new file mode 100644
index 000000000..9622a600c
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0114 NEW)
+include(NO_DEPENDS-CMP0114-Common.cmake)
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt
new file mode 100644
index 000000000..2b0feb6e4
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt
@@ -0,0 +1,61 @@
+^CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Using NO_DEPENDS for "configure" step might break parallel builds
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_step_add_target\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(cmake_language\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_configure_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-OLD.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Using NO_DEPENDS for "build" step might break parallel builds
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_step_add_target\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(cmake_language\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_build_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-OLD.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Using NO_DEPENDS for "install" step might break parallel builds
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_step_add_target\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(cmake_language\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_install_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-OLD.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Using NO_DEPENDS for "test" step might break parallel builds
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_step_add_target\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
+ NO_DEPENDS-CMP0114-OLD.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD.cmake b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD.cmake
new file mode 100644
index 000000000..c20d443c5
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0114 OLD)
+include(NO_DEPENDS-CMP0114-Common.cmake)
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt
new file mode 100644
index 000000000..bbf7178f2
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt
@@ -0,0 +1,119 @@
+^CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Policy CMP0114 is not set: ExternalProject step targets fully adopt their
+ steps. Run "cmake --help-policy CMP0114" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ ExternalProject 'FOO' option INDEPENDENT_STEP_TARGETS is set to
+
+ download;patch;update;configure;build
+
+ but the option is deprecated in favor of policy CMP0114.
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_mkdir_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Using NO_DEPENDS for "configure" step might break parallel builds
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_step_add_target\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(cmake_language\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_configure_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Using NO_DEPENDS for "build" step might break parallel builds
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_step_add_target\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(cmake_language\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_build_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Policy CMP0114 is not set: ExternalProject step targets fully adopt their
+ steps. Run "cmake --help-policy CMP0114" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ ExternalProject 'BAR' option INDEPENDENT_STEP_TARGETS is set to
+
+ install
+
+ but the option is deprecated in favor of policy CMP0114.
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_mkdir_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Using NO_DEPENDS for "install" step might break parallel builds
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_step_add_target\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(cmake_language\)
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_install_command\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
+ NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Policy CMP0114 is not set: ExternalProject step targets fully adopt their
+ steps. Run "cmake --help-policy CMP0114" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ ExternalProject target 'BAR' would depend on the targets for step\(s\)
+ 'test;bar' under policy CMP0114, but this is being left out for
+ compatibility since the policy is not set. Also, the NO_DEPENDS option is
+ deprecated in favor of policy CMP0114.
+Call Stack \(most recent call first\):
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
+ NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Using NO_DEPENDS for "test" step might break parallel builds
+Call Stack \(most recent call first\):
+ [^
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_step_add_target\)
+ NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
+ NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN.cmake b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN.cmake
new file mode 100644
index 000000000..3d9642df0
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN.cmake
@@ -0,0 +1,2 @@
+# Policy CMP0114 not set.
+include(NO_DEPENDS-CMP0114-Common.cmake)
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt
deleted file mode 100644
index 928d88a9c..000000000
--- a/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\):
- Using NO_DEPENDS for "configure" step might break parallel builds
-Call Stack \(most recent call first\):
- .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
- .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
- .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_configure_command\)
- NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\)
- CMakeLists.txt:[0-9]+ \(include\)
-This warning is for project developers. Use -Wno-dev to suppress it.
-
-CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\):
- Using NO_DEPENDS for "build" step might break parallel builds
-Call Stack \(most recent call first\):
- .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
- .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
- .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_build_command\)
- NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\)
- CMakeLists.txt:[0-9]+ \(include\)
-This warning is for project developers. Use -Wno-dev to suppress it.
-
-CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\):
- Using NO_DEPENDS for "install" step might break parallel builds
-Call Stack \(most recent call first\):
- .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
- .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
- .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_install_command\)
- NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\)
- CMakeLists.txt:[0-9]+ \(include\)
-This warning is for project developers. Use -Wno-dev to suppress it.
-
-CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\):
- Using NO_DEPENDS for "test" step might break parallel builds
-Call Stack \(most recent call first\):
- NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
- CMakeLists.txt:[0-9]+ \(include\)
-This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index 0d1da26b5..598671f82 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -1,5 +1,13 @@
+cmake_minimum_required(VERSION 3.12)
include(RunCMake)
+# We do not contact any remote URLs, but may use a local one.
+# Remove any proxy configuration that may change behavior.
+unset(ENV{http_proxy})
+unset(ENV{https_proxy})
+
+run_cmake(BadIndependentStep1)
+run_cmake(BadIndependentStep2)
run_cmake(IncludeScope-Add)
run_cmake(IncludeScope-Add_Step)
run_cmake(NoOptions)
@@ -8,12 +16,52 @@ run_cmake(SourceMissing)
run_cmake(CMAKE_CACHE_ARGS)
run_cmake(CMAKE_CACHE_DEFAULT_ARGS)
run_cmake(CMAKE_CACHE_mix)
-run_cmake(NO_DEPENDS)
+if(NOT XCODE_VERSION OR XCODE_VERSION VERSION_LESS 12)
+ run_cmake(NO_DEPENDS-CMP0114-WARN)
+ run_cmake(NO_DEPENDS-CMP0114-OLD)
+endif()
+run_cmake(NO_DEPENDS-CMP0114-NEW)
+run_cmake(NO_DEPENDS-CMP0114-NEW-Direct)
run_cmake(Add_StepDependencies)
run_cmake(Add_StepDependencies_iface)
run_cmake(Add_StepDependencies_iface_step)
run_cmake(Add_StepDependencies_no_target)
run_cmake(UsesTerminal)
+if(XCODE_VERSION AND XCODE_VERSION VERSION_GREATER_EQUAL 12)
+ run_cmake(Xcode-CMP0114)
+endif()
+
+macro(check_steps_missing proj)
+ set(steps "${ARGN}")
+ foreach(step ${steps})
+ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/${proj}-${step}-mark)
+ string(APPEND RunCMake_TEST_FAILED "${proj} '${step}' step ran but should not have\n")
+ endif()
+ endforeach()
+endmacro()
+
+macro(check_steps_present proj)
+ set(steps "${ARGN}")
+ foreach(step ${steps})
+ if(NOT EXISTS ${RunCMake_TEST_BINARY_DIR}/${proj}-${step}-mark)
+ string(APPEND RunCMake_TEST_FAILED "${proj} '${step}' step did not run but should have\n")
+ endif()
+ endforeach()
+endmacro()
+
+function(run_steps_CMP0114 val)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Steps-CMP0114-${val}-build)
+ run_cmake(Steps-CMP0114-${val})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(Steps-CMP0114-${val}-build-download ${CMAKE_COMMAND} --build . --target proj1-download)
+ run_cmake_command(Steps-CMP0114-${val}-build-update ${CMAKE_COMMAND} --build . --target proj1-update)
+ run_cmake_command(Steps-CMP0114-${val}-build-install ${CMAKE_COMMAND} --build . --target proj1-install)
+ run_cmake_command(Steps-CMP0114-${val}-build-test ${CMAKE_COMMAND} --build . --target proj1-test)
+endfunction()
+if(NOT XCODE_VERSION OR XCODE_VERSION VERSION_LESS 12)
+ run_steps_CMP0114(OLD)
+endif()
+run_steps_CMP0114(NEW)
# Run both cmake and build steps. We always do a clean before the
# build to ensure that the download step re-runs each time.
@@ -27,6 +75,50 @@ function(__ep_test_with_build testName)
run_cmake_command(${testName}-build ${CMAKE_COMMAND} --build .)
endfunction()
+find_package(Python3)
+function(__ep_test_with_build_with_server testName)
+ if(NOT Python3_EXECUTABLE)
+ return()
+ endif()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${testName}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_TIMEOUT 20)
+ set(RunCMake_TEST_OUTPUT_MERGE TRUE)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ set(URL_FILE ${RunCMake_BINARY_DIR}/${testName}.url)
+ if(EXISTS "${URL_FILE}")
+ file(REMOVE "${URL_FILE}")
+ endif()
+ execute_process(
+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/DownloadServer.py --file "${URL_FILE}" ${ARGN}
+ OUTPUT_FILE ${RunCMake_BINARY_DIR}/${testName}-python.txt
+ ERROR_FILE ${RunCMake_BINARY_DIR}/${testName}-python.txt
+ RESULT_VARIABLE result
+ TIMEOUT 30
+ )
+ if(NOT result EQUAL 0)
+ message(FATAL_ERROR "Failed to start download server:\n ${result}")
+ endif()
+
+ foreach(i RANGE 1 8)
+ if(EXISTS ${URL_FILE})
+ break()
+ endif()
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${i})
+ endforeach()
+
+ if(NOT EXISTS ${URL_FILE})
+ message(FATAL_ERROR "Failed to load download server URL from:\n ${URL_FILE}")
+ endif()
+
+ file(READ ${URL_FILE} SERVER_URL)
+ message(STATUS "URL : ${URL_FILE} - ${SERVER_URL}")
+ run_cmake_with_options(${testName} ${CMAKE_COMMAND} -DSERVER_URL=${SERVER_URL} )
+ run_cmake_command(${testName}-clean ${CMAKE_COMMAND} --build . --target clean)
+ run_cmake_command(${testName}-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
__ep_test_with_build(MultiCommand)
set(RunCMake_TEST_OUTPUT_MERGE 1)
@@ -38,6 +130,9 @@ set(RunCMake_TEST_OUTPUT_MERGE 0)
if(NOT RunCMake_GENERATOR MATCHES "Visual Studio")
__ep_test_with_build(LogOutputOnFailure)
__ep_test_with_build(LogOutputOnFailureMerged)
+ __ep_test_with_build(DownloadTimeout)
+ __ep_test_with_build_with_server(DownloadInactivityTimeout --speed_limit --limit_duration 40)
+ __ep_test_with_build_with_server(DownloadInactivityResume --speed_limit --limit_duration 1)
endif()
# We can't test the substitution when using the old MSYS due to
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-Common.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-Common.cmake
new file mode 100644
index 000000000..210edb151
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-Common.cmake
@@ -0,0 +1,34 @@
+include(ExternalProject)
+
+ExternalProject_Add(proj0
+ SOURCE_DIR "."
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj0-download-mark
+ CONFIGURE_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj0-configure-mark
+ BUILD_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj0-build-mark
+ INSTALL_COMMAND ""
+ )
+
+cmake_policy(GET CMP0114 cmp0114)
+if(cmp0114 STREQUAL "NEW")
+ set(step_targets "update;test")
+ set(independent_step_targets "")
+else()
+ set(step_targets "install;test")
+ set(independent_step_targets "download;update")
+endif()
+
+ExternalProject_Add(proj1
+ DEPENDS proj0
+ SOURCE_DIR "."
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj1-download-mark
+ UPDATE_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj1-update-mark
+ PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj1-patch-mark
+ CONFIGURE_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj1-configure-mark
+ BUILD_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj1-build-mark
+ INSTALL_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj1-install-mark
+ TEST_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/proj1-test-mark
+ TEST_EXCLUDE_FROM_MAIN 1 # Along with 'STEP_TARGETS test', implies 'STEP_TARGETS install'
+ UPDATE_DISCONNECTED 1 # Along with 'STEP_TARGETS update', implies 'STEP_TARGETS download'
+ STEP_TARGETS ${step_targets}
+ INDEPENDENT_STEP_TARGETS ${independent_step_targets}
+ )
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-download-check.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-download-check.cmake
new file mode 100644
index 000000000..1439f0216
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-download-check.cmake
@@ -0,0 +1,3 @@
+check_steps_missing(proj0 download configure build)
+check_steps_present(proj1 download)
+check_steps_missing(proj1 update patch configure build install test)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-install-check.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-install-check.cmake
new file mode 100644
index 000000000..c1c9c8f3b
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-install-check.cmake
@@ -0,0 +1,3 @@
+check_steps_present(proj0 download configure build)
+check_steps_present(proj1 download patch configure build install)
+check_steps_missing(proj1 test)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-test-check.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-test-check.cmake
new file mode 100644
index 000000000..fe256f200
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-test-check.cmake
@@ -0,0 +1,2 @@
+check_steps_present(proj0 download configure build)
+check_steps_present(proj1 download patch configure build install test)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-update-check.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-update-check.cmake
new file mode 100644
index 000000000..63e2e1dcf
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW-build-update-check.cmake
@@ -0,0 +1,3 @@
+check_steps_missing(proj0 download configure build)
+check_steps_present(proj1 download update)
+check_steps_missing(proj1 patch configure build install test)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW.cmake
new file mode 100644
index 000000000..9d8e99ee1
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0114 NEW)
+include(Steps-CMP0114-Common.cmake)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-download-check.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-download-check.cmake
new file mode 100644
index 000000000..1439f0216
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-download-check.cmake
@@ -0,0 +1,3 @@
+check_steps_missing(proj0 download configure build)
+check_steps_present(proj1 download)
+check_steps_missing(proj1 update patch configure build install test)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-install-check.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-install-check.cmake
new file mode 100644
index 000000000..c1c9c8f3b
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-install-check.cmake
@@ -0,0 +1,3 @@
+check_steps_present(proj0 download configure build)
+check_steps_present(proj1 download patch configure build install)
+check_steps_missing(proj1 test)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-test-check.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-test-check.cmake
new file mode 100644
index 000000000..fe256f200
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-test-check.cmake
@@ -0,0 +1,2 @@
+check_steps_present(proj0 download configure build)
+check_steps_present(proj1 download patch configure build install test)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-update-check.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-update-check.cmake
new file mode 100644
index 000000000..63e2e1dcf
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-build-update-check.cmake
@@ -0,0 +1,3 @@
+check_steps_missing(proj0 download configure build)
+check_steps_present(proj1 download update)
+check_steps_missing(proj1 patch configure build install test)
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD.cmake b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD.cmake
new file mode 100644
index 000000000..0b51ad8d6
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0114 OLD)
+include(Steps-CMP0114-Common.cmake)
diff --git a/Tests/RunCMake/ExternalProject/Xcode-CMP0114-stderr.txt b/Tests/RunCMake/ExternalProject/Xcode-CMP0114-stderr.txt
new file mode 100644
index 000000000..a616185c9
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Xcode-CMP0114-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Policy CMP0114 is not set to NEW. In order to support the Xcode "new build
+ system", this project must be updated to set policy CMP0114 to NEW.
+
+ Since CMake is generating for the Xcode "new build system",
+ ExternalProject_Add will use policy CMP0114's NEW behavior anyway, but the
+ generated build system may not match what the project intends.
+Call Stack \(most recent call first\):
+ Xcode-CMP0114.cmake:[0-9]+ \(ExternalProject_Add\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/ExternalProject/Xcode-CMP0114.cmake b/Tests/RunCMake/ExternalProject/Xcode-CMP0114.cmake
new file mode 100644
index 000000000..5039daaca
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Xcode-CMP0114.cmake
@@ -0,0 +1,2 @@
+include(ExternalProject)
+ExternalProject_Add(MyProj SOURCE_DIR .)
diff --git a/Tests/RunCMake/FPHSA/CMakeLists.txt b/Tests/RunCMake/FPHSA/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/FPHSA/CMakeLists.txt
+++ b/Tests/RunCMake/FPHSA/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FPHSA/FindPseudoRange.cmake b/Tests/RunCMake/FPHSA/FindPseudoRange.cmake
new file mode 100644
index 000000000..ad0342c65
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/FindPseudoRange.cmake
@@ -0,0 +1,7 @@
+# pseudo find_module
+
+set(FOOBAR TRUE)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PseudoRange REQUIRED_VARS FOOBAR VERSION_VAR PseudoRange_VERSION
+ HANDLE_VERSION_RANGE)
diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
index 8e390908a..28b8570d0 100644
--- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
@@ -55,3 +55,13 @@ run_cmake(required_and_optional_components)
run_cmake(all_optional_components)
list(APPEND RunCMake_TEST_OPTIONS "-DUseComponents_REQUIRE_VARS=TRUE")
run_cmake(required_components_with_vars)
+
+# check handling of version range
+set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=2.3.4.5")
+run_cmake(range_ignored)
+set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudoRange_VERSION=2.0")
+run_cmake(range_no-range)
+run_cmake(range_1-3)
+run_cmake(range_1-2-include)
+run_cmake(range_1-2-exclude)
+run_cmake(range_3-4)
diff --git a/Tests/RunCMake/FPHSA/range_1-2-exclude-result.txt b/Tests/RunCMake/FPHSA/range_1-2-exclude-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_1-2-exclude-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/range_1-2-exclude-stderr.txt b/Tests/RunCMake/FPHSA/range_1-2-exclude-stderr.txt
new file mode 100644
index 000000000..8e34630c2
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_1-2-exclude-stderr.txt
@@ -0,0 +1,2 @@
+ Could NOT find PseudoRange: Found unsuitable version "2\.0", required range
+ is "1.0...<2.0" \(found TRUE\)
diff --git a/Tests/RunCMake/FPHSA/range_1-2-exclude.cmake b/Tests/RunCMake/FPHSA/range_1-2-exclude.cmake
new file mode 100644
index 000000000..0cba368a7
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_1-2-exclude.cmake
@@ -0,0 +1 @@
+find_package(PseudoRange 1.0...<2.0 REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/range_1-2-include.cmake b/Tests/RunCMake/FPHSA/range_1-2-include.cmake
new file mode 100644
index 000000000..467267f6e
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_1-2-include.cmake
@@ -0,0 +1 @@
+find_package(PseudoRange 1.0...2.0 REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/range_1-3.cmake b/Tests/RunCMake/FPHSA/range_1-3.cmake
new file mode 100644
index 000000000..f1506c581
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_1-3.cmake
@@ -0,0 +1 @@
+find_package(PseudoRange 1.0...3.0 REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/range_3-4-result.txt b/Tests/RunCMake/FPHSA/range_3-4-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_3-4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/range_3-4-stderr.txt b/Tests/RunCMake/FPHSA/range_3-4-stderr.txt
new file mode 100644
index 000000000..8ea19ce73
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_3-4-stderr.txt
@@ -0,0 +1,2 @@
+ Could NOT find PseudoRange: Found unsuitable version "2\.0", required range
+ is "3.0...4.0" \(found TRUE\)
diff --git a/Tests/RunCMake/FPHSA/range_3-4.cmake b/Tests/RunCMake/FPHSA/range_3-4.cmake
new file mode 100644
index 000000000..dd1931447
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_3-4.cmake
@@ -0,0 +1 @@
+find_package(PseudoRange 3.0...4.0 REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/range_ignored-stderr.txt b/Tests/RunCMake/FPHSA/range_ignored-stderr.txt
new file mode 100644
index 000000000..43f233669
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_ignored-stderr.txt
@@ -0,0 +1,4 @@
+CMake Warning \(dev\) at .+FindPackageHandleStandardArgs.cmake:[0-9]+ \(message\):
+ `find_package\(\)` specify a version range but the module Pseudo does not
+ support this capability. Only the lower endpoint of the range will be
+ used.
diff --git a/Tests/RunCMake/FPHSA/range_ignored.cmake b/Tests/RunCMake/FPHSA/range_ignored.cmake
new file mode 100644
index 000000000..ff1ad15b2
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_ignored.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.0...2.0 REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/range_no-range.cmake b/Tests/RunCMake/FPHSA/range_no-range.cmake
new file mode 100644
index 000000000..24896b1c2
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/range_no-range.cmake
@@ -0,0 +1 @@
+find_package(PseudoRange 1.0 REQUIRED)
diff --git a/Tests/RunCMake/FeatureSummary/CMakeLists.txt b/Tests/RunCMake/FeatureSummary/CMakeLists.txt
index 72abfc809..74b3ff8de 100644
--- a/Tests/RunCMake/FeatureSummary/CMakeLists.txt
+++ b/Tests/RunCMake/FeatureSummary/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FetchContent/DirOverrides.cmake b/Tests/RunCMake/FetchContent/DirOverrides.cmake
index 50eef161b..ad61a00df 100644
--- a/Tests/RunCMake/FetchContent/DirOverrides.cmake
+++ b/Tests/RunCMake/FetchContent/DirOverrides.cmake
@@ -4,18 +4,23 @@ include(FetchContent)
FetchContent_Declare(
t1
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/savedSrc
- DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR>
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/savedBin
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR> <BINARY_DIR>
)
FetchContent_Populate(t1)
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/savedSrc)
message(FATAL_ERROR "Saved details SOURCE_DIR override failed")
endif()
+if(NOT IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/savedBin)
+ message(FATAL_ERROR "Saved details BINARY_DIR override failed")
+endif()
# Test direct population
FetchContent_Populate(
t2
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/directSrc
- DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR>
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/directBin
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR> <BINARY_DIR>
)
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/directSrc)
message(FATAL_ERROR "Direct details SOURCE_DIR override failed")
@@ -44,3 +49,19 @@ FetchContent_Populate(
if(IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/savedNobuildDir-build)
message(FATAL_ERROR "Direct details BINARY_DIR override failed")
endif()
+
+# Test overriding the source directory by reusing the one from t1
+set(FETCHCONTENT_SOURCE_DIR_T5 ${CMAKE_CURRENT_BINARY_DIR}/savedSrc)
+FetchContent_Declare(
+ t5
+ SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/doesNotExist
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/wontBeCreated
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E false
+)
+FetchContent_Populate(t5)
+if(NOT "${t5_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/savedSrc")
+ message(FATAL_ERROR "Wrong SOURCE_DIR returned: ${t5_SOURCE_DIR}")
+endif()
+if(NOT "${t5_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/wontBeCreated")
+ message(FATAL_ERROR "Wrong BINARY_DIR returned: ${t5_BINARY_DIR}")
+endif()
diff --git a/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake b/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake
new file mode 100644
index 000000000..768a82e7b
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake
@@ -0,0 +1,18 @@
+include(FetchContent)
+
+# Test using saved details. We are re-using a SOURCE_DIR from a previous test
+# so the download command should not be executed.
+FetchContent_Declare(
+ t1
+ SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/savedSrc
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/savedBin
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E false
+)
+FetchContent_Populate(t1)
+
+if(NOT "${t1_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/savedSrc")
+ message(FATAL_ERROR "Wrong SOURCE_DIR returned: ${t1_SOURCE_DIR}")
+endif()
+if(NOT "${t1_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/savedBin")
+ message(FATAL_ERROR "Wrong BINARY_DIR returned: ${t1_BINARY_DIR}")
+endif()
diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectory.cmake b/Tests/RunCMake/FetchContent/ManualSourceDirectory.cmake
new file mode 100644
index 000000000..83fcc4b42
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/ManualSourceDirectory.cmake
@@ -0,0 +1,8 @@
+include(FetchContent)
+
+FetchContent_Declare(
+ WithProject
+ SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/ADirThatDoesNotExist
+)
+
+FetchContent_MakeAvailable(WithProject)
diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-result.txt b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-stderr.txt b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-stderr.txt
new file mode 100644
index 000000000..7ecb06b49
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-stderr.txt
@@ -0,0 +1,2 @@
+ *Manually specified source directory is missing:
++ *FETCHCONTENT_SOURCE_DIR_WITHPROJECT --> .*/ADirThatDoesNotExist
diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing.cmake b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing.cmake
new file mode 100644
index 000000000..0e24c1a1c
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing.cmake
@@ -0,0 +1,8 @@
+include(FetchContent)
+
+FetchContent_Declare(
+ WithProject
+ SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/WithProject
+)
+
+FetchContent_MakeAvailable(WithProject)
diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
index f3ed3e2d6..3eb331f6b 100644
--- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
@@ -10,12 +10,32 @@ run_cmake(DownloadFile)
run_cmake(SameGenerator)
run_cmake(VarDefinitions)
run_cmake(GetProperties)
-run_cmake(DirOverrides)
run_cmake(UsesTerminalOverride)
run_cmake(MakeAvailable)
run_cmake(MakeAvailableTwice)
run_cmake(MakeAvailableUndeclared)
+run_cmake_with_options(ManualSourceDirectory
+ -D "FETCHCONTENT_SOURCE_DIR_WITHPROJECT=${CMAKE_CURRENT_LIST_DIR}/WithProject"
+)
+run_cmake_with_options(ManualSourceDirectoryMissing
+ -D "FETCHCONTENT_SOURCE_DIR_WITHPROJECT=${CMAKE_CURRENT_LIST_DIR}/ADirThatDoesNotExist"
+)
+
+function(run_FetchContent_DirOverrides)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/DirOverrides-build)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(DirOverrides)
+
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_with_options(DirOverridesDisconnected
+ -D FETCHCONTENT_FULLY_DISCONNECTED=YES
+ )
+endfunction()
+run_FetchContent_DirOverrides()
+
set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake(PreserveEmptyArgs)
set(RunCMake_TEST_OUTPUT_MERGE 0)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index a3dd9ffc3..c66757f84 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, 1, check_object_codemodel(g))
+ check_index_object(o[0], "codemodel", 2, 2, check_object_codemodel(g))
def check_backtrace(t, b, backtrace):
btg = t["backtraceGraph"]
@@ -42,6 +42,16 @@ def check_backtrace(t, b, backtrace):
assert b is None
+def check_backtraces(t, actual, expected):
+ assert is_list(actual)
+ assert is_list(expected)
+ assert len(actual) == len(expected)
+
+ i = 0
+ while i < len(actual):
+ check_backtrace(t, actual[i], expected[i])
+ i += 1
+
def check_directory(c):
def _check(actual, expected):
assert is_dict(actual)
@@ -421,6 +431,19 @@ def check_target(c):
missing_exception=lambda e: "Precompile header: %s" % e["header"],
extra_exception=lambda a: "Precompile header: %s" % a["header"])
+ if "languageStandard" in expected:
+ expected_keys.append("languageStandard")
+
+ def check_language_standard(actual, expected):
+ assert is_dict(actual)
+ expected_keys = ["backtraces", "standard"]
+ assert actual["standard"] == expected["standard"]
+ check_backtraces(obj, actual["backtraces"], expected["backtraces"])
+
+ assert sorted(actual.keys()) == sorted(expected_keys)
+
+ check_language_standard(actual["languageStandard"], expected["languageStandard"])
+
if expected["defines"] is not None:
expected_keys.append("defines")
@@ -499,6 +522,7 @@ def gen_check_directories(c, g):
read_codemodel_json_data("directories/custom.json"),
read_codemodel_json_data("directories/cxx.json"),
read_codemodel_json_data("directories/imported.json"),
+ read_codemodel_json_data("directories/interface.json"),
read_codemodel_json_data("directories/object.json"),
read_codemodel_json_data("directories/dir.json"),
read_codemodel_json_data("directories/dir_dir.json"),
@@ -544,6 +568,8 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/zero_check_cxx.json"),
read_codemodel_json_data("targets/cxx_lib.json"),
read_codemodel_json_data("targets/cxx_exe.json"),
+ read_codemodel_json_data("targets/cxx_standard_compile_feature_exe.json"),
+ read_codemodel_json_data("targets/cxx_standard_exe.json"),
read_codemodel_json_data("targets/cxx_shared_lib.json"),
read_codemodel_json_data("targets/cxx_shared_exe.json"),
read_codemodel_json_data("targets/cxx_static_lib.json"),
@@ -569,6 +595,10 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/link_imported_object_exe.json"),
read_codemodel_json_data("targets/link_imported_interface_exe.json"),
+ read_codemodel_json_data("targets/all_build_interface.json"),
+ read_codemodel_json_data("targets/zero_check_interface.json"),
+ read_codemodel_json_data("targets/iface_srcs.json"),
+
read_codemodel_json_data("targets/all_build_custom.json"),
read_codemodel_json_data("targets/zero_check_custom.json"),
read_codemodel_json_data("targets/custom_tgt.json"),
@@ -592,6 +622,12 @@ def gen_check_targets(c, g, inSource):
e["sources"] = precompile_header_data["sources"]
e["sourceGroups"] = precompile_header_data["sourceGroups"]
+ if os.path.exists(os.path.join(reply_dir, "..", "..", "..", "..", "cxx", "cxx_std_11.txt")):
+ for e in expected:
+ if e["name"] == "cxx_standard_compile_feature_exe":
+ language_standard_data = read_codemodel_json_data("targets/cxx_standard_compile_feature_exe_languagestandard.json")
+ e["compileGroups"][0]["languageStandard"] = language_standard_data["languageStandard"]
+
if not os.path.exists(os.path.join(reply_dir, "..", "..", "..", "..", "ipo_enabled.txt")):
for e in expected:
try:
@@ -691,6 +727,7 @@ def gen_check_projects(c, g):
read_codemodel_json_data("projects/alias.json"),
read_codemodel_json_data("projects/object.json"),
read_codemodel_json_data("projects/imported.json"),
+ read_codemodel_json_data("projects/interface.json"),
read_codemodel_json_data("projects/custom.json"),
read_codemodel_json_data("projects/external.json"),
]
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
index ebe717aea..a51b6eb8d 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
@@ -7,6 +7,8 @@
"^ALL_BUILD::@a56b12a3f5c0529fb296$",
"^ZERO_CHECK::@a56b12a3f5c0529fb296$",
"^cxx_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
"^cxx_lib::@a56b12a3f5c0529fb296$",
"^cxx_shared_exe::@a56b12a3f5c0529fb296$",
"^cxx_shared_lib::@a56b12a3f5c0529fb296$",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json
new file mode 100644
index 000000000..b10d49605
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json
@@ -0,0 +1,14 @@
+{
+ "source": "^interface$",
+ "build": "^interface$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@25b7fa8ea00134654b85$",
+ "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "^iface_srcs::@25b7fa8ea00134654b85$"
+ ],
+ "projectName": "Interface",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
index c14495349..736d1f5a3 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
@@ -7,6 +7,7 @@
"^custom$",
"^cxx$",
"^imported$",
+ "^interface$",
"^object$",
"^.*/Tests/RunCMake/FileAPIExternalSource$",
"^dir$"
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
index f3aac63db..4d0cdc056 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
@@ -6,6 +6,7 @@
"Custom",
"Cxx",
"Imported",
+ "Interface",
"Object",
"External"
],
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
index 296ae6c25..363e8530c 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
@@ -10,6 +10,8 @@
"^ZERO_CHECK::@a56b12a3f5c0529fb296$",
"^cxx_lib::@a56b12a3f5c0529fb296$",
"^cxx_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
"^cxx_shared_lib::@a56b12a3f5c0529fb296$",
"^cxx_shared_exe::@a56b12a3f5c0529fb296$",
"^cxx_static_lib::@a56b12a3f5c0529fb296$",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json
new file mode 100644
index 000000000..2a2276762
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json
@@ -0,0 +1,13 @@
+{
+ "name": "Interface",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^interface$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@25b7fa8ea00134654b85$",
+ "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "^iface_srcs::@25b7fa8ea00134654b85$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
index 92a794444..1f443b12a 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
@@ -80,6 +80,14 @@
"backtrace": null
},
{
+ "id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
"id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
"backtrace": null
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json
new file mode 100644
index 000000000..fa2a6e5d1
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json
@@ -0,0 +1,79 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@25b7fa8ea00134654b85$",
+ "directorySource": "^interface$",
+ "projectName": "Interface",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^interface$",
+ "source": "^interface$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "backtrace": null
+ },
+ {
+ "id": "^iface_srcs::@25b7fa8ea00134654b85$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
index b4def78c5..d023f99a7 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
@@ -116,6 +116,14 @@
"backtrace": null
},
{
+ "id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
"id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
"backtrace": null
},
@@ -168,6 +176,10 @@
"backtrace": null
},
{
+ "id": "^iface_srcs::@25b7fa8ea00134654b85$",
+ "backtrace": null
+ },
+ {
"id": "^custom_exe::@c11385ffed57b860da63$",
"backtrace": null
},
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 e7ab55ba3..c9e652b2a 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
@@ -119,7 +119,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 37,
+ "line": 38,
"command": "install",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
new file mode 100644
index 000000000..d6d573f8b
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
@@ -0,0 +1,110 @@
+{
+ "name": "cxx_standard_compile_feature_exe",
+ "id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 26,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "languageStandard" :
+ {
+ "backtraces": [
+ [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 27,
+ "command": "set_property",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ ],
+ "standard" : "98"
+ },
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 26,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_standard_compile_feature_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_standard_compile_feature_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_standard_compile_feature_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe_languagestandard.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe_languagestandard.json
new file mode 100644
index 000000000..0c4eabb09
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe_languagestandard.json
@@ -0,0 +1,36 @@
+{
+ "languageStandard" :
+ {
+ "backtraces": [
+ [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 29,
+ "command": "target_compile_features",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 30,
+ "command": "target_compile_features",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ ],
+ "standard" : "11"
+ }
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
new file mode 100644
index 000000000..9cb28321a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
@@ -0,0 +1,110 @@
+{
+ "name": "cxx_standard_exe",
+ "id": "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 23,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "languageStandard" :
+ {
+ "backtraces": [
+ [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 24,
+ "command": "set_property",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ ],
+ "standard" : "17"
+ },
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 23,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_standard_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_standard_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_standard_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json
new file mode 100644
index 000000000..97d7ccd77
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json
@@ -0,0 +1,67 @@
+{
+ "name": "iface_srcs",
+ "id": "^iface_srcs::@25b7fa8ea00134654b85$",
+ "directorySource": "^interface$",
+ "projectName": "Interface",
+ "type": "INTERFACE_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": 3,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": 3,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^interface$",
+ "source": "^interface$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
index 312f4c5ab..451e8d482 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 5,
+ "line": 6,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 5,
+ "line": 6,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
index 7d0e6df6d..cbd4346c8 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 23,
+ "line": 29,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 23,
+ "line": 29,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
index 4aec5249b..d92a81076 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 18,
+ "line": 24,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 18,
+ "line": 24,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
index f5846ec9d..1197a73cc 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 9,
+ "line": 14,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 9,
+ "line": 14,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
index 29a16958f..42564e047 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 13,
+ "line": 19,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 13,
+ "line": 19,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json
new file mode 100644
index 000000000..fdd4b2a56
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "directorySource": "^interface$",
+ "projectName": "Interface",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^interface$",
+ "source": "^interface$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2.cmake b/Tests/RunCMake/FileAPI/codemodel-v2.cmake
index c98a84c26..240595442 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2.cmake
+++ b/Tests/RunCMake/FileAPI/codemodel-v2.cmake
@@ -18,6 +18,7 @@ add_subdirectory(cxx)
add_subdirectory(alias)
add_subdirectory(object)
add_subdirectory(imported)
+add_subdirectory(interface)
add_subdirectory(custom)
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../FileAPIExternalSource" "${CMAKE_CURRENT_BINARY_DIR}/../FileAPIExternalBuild")
add_subdirectory(dir)
diff --git a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
index fa51195fe..76235f5c5 100644
--- a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
@@ -19,3 +19,14 @@ target_link_options(cxx_exe PUBLIC TargetLinkOptions)
target_link_directories(cxx_exe PUBLIC "${CMAKE_BINARY_DIR}/TargetLinkDir")
target_precompile_headers(cxx_exe PUBLIC ../empty.h)
+
+add_executable(cxx_standard_exe ../empty.cxx)
+set_property(TARGET cxx_standard_exe PROPERTY CXX_STANDARD 17)
+
+add_executable(cxx_standard_compile_feature_exe ../empty.cxx)
+set_property(TARGET cxx_standard_compile_feature_exe PROPERTY CXX_STANDARD 98)
+if(CMAKE_CXX_STANDARD_DEFAULT AND DEFINED CMAKE_CXX11_STANDARD_COMPILE_OPTION)
+ target_compile_features(cxx_standard_compile_feature_exe PRIVATE cxx_std_11)
+ target_compile_features(cxx_standard_compile_feature_exe PRIVATE cxx_decltype)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cxx_std_11.txt" "")
+endif()
diff --git a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
index d36d88ba8..f79d87c82 100644
--- a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
@@ -1,15 +1,21 @@
project(Imported)
add_library(imported_lib UNKNOWN IMPORTED)
+set_target_properties(imported_lib PROPERTIES IMPORTED_LOCATION "imported_unk${CMAKE_STATIC_LIBRARY_SUFFIX}")
add_executable(imported_exe IMPORTED)
add_executable(link_imported_exe ../empty.c)
target_link_libraries(link_imported_exe PRIVATE imported_lib)
add_library(imported_shared_lib SHARED IMPORTED)
+set_target_properties(imported_shared_lib PROPERTIES
+ IMPORTED_LOCATION "imported_shared${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ IMPORTED_IMPLIB "imported_shared${CMAKE_IMPORT_LIBRARY_SUFFIX}"
+)
add_executable(link_imported_shared_exe ../empty.c)
target_link_libraries(link_imported_shared_exe PRIVATE imported_shared_lib)
add_library(imported_static_lib STATIC IMPORTED)
+set_target_properties(imported_static_lib PROPERTIES IMPORTED_LOCATION "imported_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
add_executable(link_imported_static_exe ../empty.c)
target_link_libraries(link_imported_static_exe PRIVATE imported_static_lib)
diff --git a/Tests/RunCMake/FileAPI/interface/CMakeLists.txt b/Tests/RunCMake/FileAPI/interface/CMakeLists.txt
new file mode 100644
index 000000000..97948c56c
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/interface/CMakeLists.txt
@@ -0,0 +1,3 @@
+project(Interface)
+add_library(iface_none INTERFACE)
+add_library(iface_srcs INTERFACE ../empty.c)
diff --git a/Tests/RunCMake/File_Archive/RunCMakeTest.cmake b/Tests/RunCMake/File_Archive/RunCMakeTest.cmake
index 2bd0cd892..3908f4243 100644
--- a/Tests/RunCMake/File_Archive/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Archive/RunCMakeTest.cmake
@@ -16,3 +16,11 @@ run_cmake(zip-filtered)
run_cmake(unsupported-format)
run_cmake(zip-with-bad-compression)
run_cmake(7zip-with-bad-compression)
+
+run_cmake(unsupported-compression-level)
+run_cmake(argument-validation-compression-level-1)
+run_cmake(argument-validation-compression-level-2)
+run_cmake(gnutar-gz-compression-level)
+run_cmake(pax-xz-compression-level)
+run_cmake(pax-zstd-compression-level)
+run_cmake(paxr-bz2-compression-level)
diff --git a/Tests/RunCMake/File_Archive/argument-validation-compression-level-1-result.txt b/Tests/RunCMake/File_Archive/argument-validation-compression-level-1-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/argument-validation-compression-level-1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Archive/argument-validation-compression-level-1-stderr.txt b/Tests/RunCMake/File_Archive/argument-validation-compression-level-1-stderr.txt
new file mode 100644
index 000000000..d7bc79a14
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/argument-validation-compression-level-1-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at compression-level.cmake:39 \(file\):
+ file compression level 100 should be in range 0 to 9
+Call Stack \(most recent call first\):
+ argument-validation-compression-level-1.cmake:8 \(check_compression_level\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Archive/argument-validation-compression-level-1.cmake b/Tests/RunCMake/File_Archive/argument-validation-compression-level-1.cmake
new file mode 100644
index 000000000..adedc34db
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/argument-validation-compression-level-1.cmake
@@ -0,0 +1,8 @@
+set(OUTPUT_NAME "test.tar.gz")
+
+set(ARCHIVE_FORMAT gnutar)
+set(COMPRESSION_TYPE GZip)
+
+include(${CMAKE_CURRENT_LIST_DIR}/compression-level.cmake)
+
+check_compression_level("100")
diff --git a/Tests/RunCMake/File_Archive/argument-validation-compression-level-2-result.txt b/Tests/RunCMake/File_Archive/argument-validation-compression-level-2-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/argument-validation-compression-level-2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Archive/argument-validation-compression-level-2-stderr.txt b/Tests/RunCMake/File_Archive/argument-validation-compression-level-2-stderr.txt
new file mode 100644
index 000000000..0f7bd9ef9
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/argument-validation-compression-level-2-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at compression-level.cmake:39 \(file\):
+ file compression level high should be in range 0 to 9
+Call Stack \(most recent call first\):
+ argument-validation-compression-level-2.cmake:8 \(check_compression_level\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Archive/argument-validation-compression-level-2.cmake b/Tests/RunCMake/File_Archive/argument-validation-compression-level-2.cmake
new file mode 100644
index 000000000..fa6d3fd9f
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/argument-validation-compression-level-2.cmake
@@ -0,0 +1,8 @@
+set(OUTPUT_NAME "test.tar.gz")
+
+set(ARCHIVE_FORMAT gnutar)
+set(COMPRESSION_TYPE GZip)
+
+include(${CMAKE_CURRENT_LIST_DIR}/compression-level.cmake)
+
+check_compression_level("high")
diff --git a/Tests/RunCMake/File_Archive/compression-level.cmake b/Tests/RunCMake/File_Archive/compression-level.cmake
new file mode 100644
index 000000000..2f5141df1
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/compression-level.cmake
@@ -0,0 +1,85 @@
+foreach(parameter OUTPUT_NAME ARCHIVE_FORMAT)
+ if(NOT DEFINED ${parameter})
+ message(FATAL_ERROR "missing required parameter ${parameter}")
+ endif()
+endforeach()
+
+set(COMPRESS_DIR compress_dir)
+set(FULL_COMPRESS_DIR ${CMAKE_CURRENT_BINARY_DIR}/${COMPRESS_DIR})
+
+set(DECOMPRESS_DIR decompress_dir)
+set(FULL_DECOMPRESS_DIR ${CMAKE_CURRENT_BINARY_DIR}/${DECOMPRESS_DIR})
+
+set(FULL_OUTPUT_NAME ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME})
+
+set(CHECK_FILES
+ "f1.txt"
+ "d1/f1.txt"
+ "d 2/f1.txt"
+ "d + 3/f1.txt"
+ "d_4/f1.txt"
+ "d-4/f1.txt"
+ "My Special Directory/f1.txt"
+)
+
+function(check_compression_level COMPRESSION_LEVEL)
+ foreach(file ${CHECK_FILES})
+ configure_file(${CMAKE_CURRENT_LIST_FILE} ${FULL_COMPRESS_DIR}/${file} COPYONLY)
+ endforeach()
+
+ if(UNIX)
+ execute_process(COMMAND ln -sf f1.txt ${FULL_COMPRESS_DIR}/d1/f2.txt)
+ list(APPEND CHECK_FILES "d1/f2.txt")
+ endif()
+
+ file(REMOVE ${FULL_OUTPUT_NAME})
+ file(REMOVE_RECURSE ${FULL_DECOMPRESS_DIR})
+ file(MAKE_DIRECTORY ${FULL_DECOMPRESS_DIR})
+
+ file(ARCHIVE_CREATE
+ OUTPUT ${FULL_OUTPUT_NAME}
+ FORMAT "${ARCHIVE_FORMAT}"
+ COMPRESSION "${COMPRESSION_TYPE}"
+ COMPRESSION_LEVEL ${COMPRESSION_LEVEL}
+ VERBOSE
+ PATHS ${COMPRESS_DIR})
+
+ file(ARCHIVE_EXTRACT
+ INPUT ${FULL_OUTPUT_NAME}
+ ${DECOMPRESSION_OPTIONS}
+ DESTINATION ${FULL_DECOMPRESS_DIR}
+ VERBOSE)
+
+ if(CUSTOM_CHECK_FILES)
+ set(CHECK_FILES ${CUSTOM_CHECK_FILES})
+ endif()
+
+ foreach(file ${CHECK_FILES})
+ set(input ${FULL_COMPRESS_DIR}/${file})
+ set(output ${FULL_DECOMPRESS_DIR}/${COMPRESS_DIR}/${file})
+
+ if(NOT EXISTS ${input})
+ message(SEND_ERROR "Cannot find input file ${output}")
+ endif()
+
+ if(NOT EXISTS ${output})
+ message(SEND_ERROR "Cannot find output file ${output}")
+ endif()
+
+ file(MD5 ${input} input_md5)
+ file(MD5 ${output} output_md5)
+
+ if(NOT input_md5 STREQUAL output_md5)
+ message(SEND_ERROR "Files \"${input}\" and \"${output}\" are different")
+ endif()
+ endforeach()
+
+ foreach(file ${NOT_EXISTING_FILES_CHECK})
+ set(output ${FULL_DECOMPRESS_DIR}/${COMPRESS_DIR}/${file})
+
+ if(EXISTS ${output})
+ message(SEND_ERROR "File ${output} exists but it shouldn't")
+ endif()
+ endforeach()
+
+endfunction()
diff --git a/Tests/RunCMake/File_Archive/gnutar-gz-compression-level.cmake b/Tests/RunCMake/File_Archive/gnutar-gz-compression-level.cmake
new file mode 100644
index 000000000..4106db595
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/gnutar-gz-compression-level.cmake
@@ -0,0 +1,10 @@
+set(OUTPUT_NAME "test.tar.gz")
+
+set(ARCHIVE_FORMAT gnutar)
+set(COMPRESSION_TYPE GZip)
+
+include(${CMAKE_CURRENT_LIST_DIR}/compression-level.cmake)
+
+check_compression_level("1")
+check_compression_level("5")
+check_compression_level("9")
diff --git a/Tests/RunCMake/File_Archive/pax-xz-compression-level.cmake b/Tests/RunCMake/File_Archive/pax-xz-compression-level.cmake
new file mode 100644
index 000000000..d241adb94
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/pax-xz-compression-level.cmake
@@ -0,0 +1,10 @@
+set(OUTPUT_NAME "test.tar.xz")
+
+set(ARCHIVE_FORMAT pax)
+set(COMPRESSION_TYPE XZ)
+
+include(${CMAKE_CURRENT_LIST_DIR}/compression-level.cmake)
+
+check_compression_level("1")
+check_compression_level("5")
+check_compression_level("9")
diff --git a/Tests/RunCMake/File_Archive/pax-zstd-compression-level.cmake b/Tests/RunCMake/File_Archive/pax-zstd-compression-level.cmake
new file mode 100644
index 000000000..73fd84dd2
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/pax-zstd-compression-level.cmake
@@ -0,0 +1,10 @@
+set(OUTPUT_NAME "test.tar.zstd")
+
+set(ARCHIVE_FORMAT pax)
+set(COMPRESSION_TYPE Zstd)
+
+include(${CMAKE_CURRENT_LIST_DIR}/compression-level.cmake)
+
+check_compression_level("1")
+check_compression_level("5")
+check_compression_level("9")
diff --git a/Tests/RunCMake/File_Archive/paxr-bz2-compression-level.cmake b/Tests/RunCMake/File_Archive/paxr-bz2-compression-level.cmake
new file mode 100644
index 000000000..05ea3fce7
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/paxr-bz2-compression-level.cmake
@@ -0,0 +1,10 @@
+set(OUTPUT_NAME "test.tar.bz2")
+
+set(ARCHIVE_FORMAT paxr)
+set(COMPRESSION_TYPE BZip2)
+
+include(${CMAKE_CURRENT_LIST_DIR}/compression-level.cmake)
+
+check_compression_level("1")
+check_compression_level("5")
+check_compression_level("9")
diff --git a/Tests/RunCMake/File_Archive/roundtrip.cmake b/Tests/RunCMake/File_Archive/roundtrip.cmake
index 063836791..404925663 100644
--- a/Tests/RunCMake/File_Archive/roundtrip.cmake
+++ b/Tests/RunCMake/File_Archive/roundtrip.cmake
@@ -90,3 +90,20 @@ function(check_magic EXPECTED)
"Actual [${ACTUAL}] does not match expected [${EXPECTED}]")
endif()
endfunction()
+
+
+function(check_compression_level COMPRESSION_LEVEL)
+ file(ARCHIVE_CREATE
+ OUTPUT "${FULL_OUTPUT_NAME}_compression_level"
+ FORMAT "${ARCHIVE_FORMAT}"
+ COMPRESSION_LEVEL ${COMPRESSION_LEVEL}
+ COMPRESSION "${COMPRESSION_TYPE}"
+ VERBOSE
+ PATHS ${COMPRESS_DIR})
+
+ file(ARCHIVE_EXTRACT
+ INPUT "${FULL_OUTPUT_NAME}_compression_level"
+ ${DECOMPRESSION_OPTIONS}
+ DESTINATION ${FULL_DECOMPRESS_DIR}
+ VERBOSE)
+endfunction()
diff --git a/Tests/RunCMake/File_Archive/unsupported-compression-level-result.txt b/Tests/RunCMake/File_Archive/unsupported-compression-level-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/unsupported-compression-level-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Archive/unsupported-compression-level-stderr.txt b/Tests/RunCMake/File_Archive/unsupported-compression-level-stderr.txt
new file mode 100644
index 000000000..860b4229a
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/unsupported-compression-level-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at compression-level.cmake:39 \(file\):
+ file compression level is not supported for compression "None"
+Call Stack \(most recent call first\):
+ unsupported-compression-level.cmake:7 \(check_compression_level\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Archive/unsupported-compression-level.cmake b/Tests/RunCMake/File_Archive/unsupported-compression-level.cmake
new file mode 100644
index 000000000..ea06d1d00
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/unsupported-compression-level.cmake
@@ -0,0 +1,7 @@
+set(OUTPUT_NAME "test.7z")
+
+set(ARCHIVE_FORMAT 7zip)
+
+include(${CMAKE_CURRENT_LIST_DIR}/compression-level.cmake)
+
+check_compression_level("1")
diff --git a/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt b/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt
new file mode 100644
index 000000000..08c2adabb
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt
@@ -0,0 +1 @@
+^foo-\$<CONFIG>$
diff --git a/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake b/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake
new file mode 100644
index 000000000..04c63bb63
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake
@@ -0,0 +1,6 @@
+file(CONFIGURE
+ OUTPUT "file.txt"
+ CONTENT "foo-$<CONFIG>"
+)
+file(READ ${CMAKE_CURRENT_BINARY_DIR}/file.txt out)
+message("${out}")
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt
deleted file mode 100644
index acda6541a..000000000
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error at BadArgGeneratorExpressionContent.cmake:[0-9]+ \(file\):
- file CONFIGURE called with CONTENT containing a "<". This character is not
- allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake
deleted file mode 100644
index 75fe9e5d1..000000000
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-file(CONFIGURE
- OUTPUT "file.txt"
- CONTENT "foo-$<CONFIG>"
-)
diff --git a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
index 0337014eb..e79de795f 100644
--- a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
@@ -1,7 +1,7 @@
include(RunCMake)
+run_cmake(AngleBracketsContent)
run_cmake(BadArg)
-run_cmake(BadArgGeneratorExpressionContent)
run_cmake(BadArgGeneratorExpressionOutput)
run_cmake(DirOutput)
run_cmake(NewLineStyle-NoArg)
diff --git a/Tests/RunCMake/File_Generate/AdjacentInOut.cmake b/Tests/RunCMake/File_Generate/AdjacentInOut.cmake
new file mode 100644
index 000000000..828c2ee69
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/AdjacentInOut.cmake
@@ -0,0 +1,6 @@
+cmake_policy(SET CMP0070 NEW)
+if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/AdjacentInOut.txt")
+ message(FATAL_ERROR "CMake should not re-run during the build!")
+endif()
+configure_file(AdjacentInOut.in ${CMAKE_CURRENT_BINARY_DIR}/AdjacentInOut.txt.tmp)
+file(GENERATE OUTPUT AdjacentInOut.txt INPUT ${CMAKE_CURRENT_BINARY_DIR}/AdjacentInOut.txt.tmp)
diff --git a/Tests/RunCMake/File_Generate/AdjacentInOut.in b/Tests/RunCMake/File_Generate/AdjacentInOut.in
new file mode 100644
index 000000000..bfbbda73c
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/AdjacentInOut.in
@@ -0,0 +1 @@
+Sample Text File
diff --git a/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt b/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt
index dbabaa97b..a7a231b12 100644
--- a/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt
+++ b/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt
@@ -1,4 +1,18 @@
-^CMake Warning \(dev\) in CMakeLists.txt:
+^(CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0070 is not set: Define file\(GENERATE\) behavior for relative
+ paths. Run "cmake --help-policy CMP0070" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ file\(GENERATE\) given relative OUTPUT path:
+
+ relative-output-WARN.txt
+
+ This is not defined behavior unless CMP0070 is set to NEW. For
+ compatibility with older versions of CMake, the previous undefined behavior
+ will be used.
+This warning is for project developers. Use -Wno-dev to suppress it.
++)+
+CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0070 is not set: Define file\(GENERATE\) behavior for relative
paths. Run "cmake --help-policy CMP0070" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
diff --git a/Tests/RunCMake/File_Generate/CMakeLists.txt b/Tests/RunCMake/File_Generate/CMakeLists.txt
index bc0cf5d16..3178de583 100644
--- a/Tests/RunCMake/File_Generate/CMakeLists.txt
+++ b/Tests/RunCMake/File_Generate/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
if(NOT TEST_FILE)
set(TEST_FILE ${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/File_Generate/GenerateSource.cmake b/Tests/RunCMake/File_Generate/GenerateSource.cmake
index 147a7f66a..d5504e330 100644
--- a/Tests/RunCMake/File_Generate/GenerateSource.cmake
+++ b/Tests/RunCMake/File_Generate/GenerateSource.cmake
@@ -10,3 +10,6 @@ file(GENERATE
)
add_executable(mn "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
+
+add_subdirectory(GenerateSource)
+target_link_libraries(mn PRIVATE ObjLib)
diff --git a/Tests/RunCMake/File_Generate/GenerateSource/CMakeLists.txt b/Tests/RunCMake/File_Generate/GenerateSource/CMakeLists.txt
new file mode 100644
index 000000000..bca892278
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/GenerateSource/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_library(ObjLib OBJECT)
+
+target_sources(ObjLib PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/ObjLib.cpp")
+
+# Ensure re-generation
+file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/ObjLib.cpp")
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/ObjLib.cpp" CONTENT "")
diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
index 94aaca84a..48fb71c7c 100644
--- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
@@ -4,6 +4,10 @@ run_cmake(CMP0070-NEW)
run_cmake(CMP0070-OLD)
run_cmake(CMP0070-WARN)
+run_cmake(SourceProperty)
+run_cmake(SourceProperty-CMP0070-NEW)
+run_cmake(SourceProperty-CMP0070-OLD)
+
run_cmake(CommandConflict)
if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
run_cmake(OutputConflict)
@@ -29,6 +33,13 @@ foreach(l CXX C)
endif()
endforeach()
+run_cmake(Target)
+file(READ "${RunCMake_BINARY_DIR}/Target-build/sub1/output.txt" sub_1)
+file(READ "${RunCMake_BINARY_DIR}/Target-build/sub2/output.txt" sub_2)
+if(NOT sub_1 MATCHES "first" OR NOT sub_2 MATCHES "second")
+ message(SEND_ERROR "Wrong target used by TARGET argument! ${sub_1} ${sub_2}")
+endif()
+
set(timeformat "%Y%j%H%M%S")
file(REMOVE "${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt")
@@ -72,6 +83,7 @@ if (UNIX AND EXISTS /bin/sh)
if (NOT script_output STREQUAL SUCCESS)
message(SEND_ERROR "Generated script did not execute correctly:\n${script_output}\n====\n${script_error}")
endif()
+ unset(RunCMake_TEST_NO_CLEAN)
endif()
if (RunCMake_GENERATOR MATCHES Makefiles)
@@ -104,3 +116,10 @@ if (RunCMake_GENERATOR MATCHES Makefiles)
message(SEND_ERROR "File did not re-generate: \"${RunCMake_BINARY_DIR}/ReRunCMake-build/output_file.txt\"")
endif()
endif()
+
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AdjacentInOut-build)
+run_cmake(AdjacentInOut)
+set(RunCMake_TEST_NO_CLEAN 1)
+run_cmake_command(AdjacentInOut-nowork ${CMAKE_COMMAND} --build .)
+unset(RunCMake_TEST_BINARY_DIR)
+unset(RunCMake_TEST_NO_CLEAN)
diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-result.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt
new file mode 100644
index 000000000..2c385c48f
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Error at SourceProperty-CMP0070-NEW.cmake:[0-9]+ \(add_library\):
+ Cannot find source file:
+
+.*\/relative-output-NEW\.c
+
+ Tried extensions \.c \.C.*
+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/File_Generate/SourceProperty-CMP0070-NEW.cmake b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake
new file mode 100644
index 000000000..d2b3e0c0a
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake
@@ -0,0 +1,8 @@
+enable_language(C)
+add_library(foo)
+
+cmake_policy(SET CMP0070 NEW)
+file(GENERATE OUTPUT relative-output-NEW.c CONTENT "")
+target_sources(foo PRIVATE
+ "${CMAKE_CURRENT_SOURCE_DIR}/relative-output-NEW.c"
+)
diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-result.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt
new file mode 100644
index 000000000..fcb53a781
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt
@@ -0,0 +1,23 @@
+^CMake Deprecation Warning at SourceProperty-CMP0070-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0070 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 SourceProperty-CMP0070-OLD.cmake:[0-9]+ \(add_library\):
+ Cannot find source file:
+
+.*\/relative-output-OLD\.c
+
+ Tried extensions \.c \.C.*
+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/File_Generate/SourceProperty-CMP0070-OLD.cmake b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake
new file mode 100644
index 000000000..48eae1e45
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake
@@ -0,0 +1,8 @@
+enable_language(C)
+add_library(foo)
+
+cmake_policy(SET CMP0070 OLD)
+file(GENERATE OUTPUT relative-output-OLD.c CONTENT "")
+target_sources(foo PRIVATE
+ "${CMAKE_CURRENT_BINARY_DIR}/relative-output-OLD.c"
+)
diff --git a/Tests/RunCMake/File_Generate/SourceProperty-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-stderr.txt
new file mode 100644
index 000000000..47ec651fb
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/SourceProperty-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at SourceProperty.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0070 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/File_Generate/SourceProperty.cmake b/Tests/RunCMake/File_Generate/SourceProperty.cmake
new file mode 100644
index 000000000..231c67022
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/SourceProperty.cmake
@@ -0,0 +1,14 @@
+enable_language(C)
+add_library(SourceProperty)
+
+cmake_policy(SET CMP0070 OLD)
+file(GENERATE OUTPUT relative-output-OLD.c CONTENT "")
+target_sources(SourceProperty PRIVATE
+ "${CMAKE_CURRENT_SOURCE_DIR}/relative-output-OLD.c"
+)
+
+cmake_policy(SET CMP0070 NEW)
+file(GENERATE OUTPUT relative-output-NEW.c CONTENT "")
+target_sources(SourceProperty PRIVATE
+ "${CMAKE_CURRENT_BINARY_DIR}/relative-output-NEW.c"
+)
diff --git a/Tests/RunCMake/File_Generate/Target.cmake b/Tests/RunCMake/File_Generate/Target.cmake
new file mode 100644
index 000000000..16e8457d0
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/Target.cmake
@@ -0,0 +1,2 @@
+add_subdirectory(sub1)
+add_subdirectory(sub2)
diff --git a/Tests/RunCMake/File_Generate/sub1/CMakeLists.txt b/Tests/RunCMake/File_Generate/sub1/CMakeLists.txt
new file mode 100644
index 000000000..34c51a437
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/sub1/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_library(library IMPORTED STATIC)
+set_property(TARGET library PROPERTY COMPILE_DEFINITIONS "first")
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output.txt"
+ CONTENT "$<TARGET_PROPERTY:COMPILE_DEFINITIONS>"
+ TARGET library
+)
diff --git a/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt b/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt
new file mode 100644
index 000000000..09b81aca3
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_library(library IMPORTED STATIC)
+set_property(TARGET library PROPERTY COMPILE_DEFINITIONS "second")
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output.txt"
+ CONTENT "$<TARGET_PROPERTY:COMPILE_DEFINITIONS>"
+ TARGET library
+)
diff --git a/Tests/RunCMake/FindOpenGL/CMP0072-OLD-stderr.txt b/Tests/RunCMake/FindOpenGL/CMP0072-OLD-stderr.txt
new file mode 100644
index 000000000..68d23d48c
--- /dev/null
+++ b/Tests/RunCMake/FindOpenGL/CMP0072-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0072-OLD.cmake:1 \(cmake_policy\):
+ The OLD behavior for policy CMP0072 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:3 \(include\)$
diff --git a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
index 72abfc809..74b3ff8de 100644
--- a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
+++ b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake
index fc3a7664b..aa293d55a 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake
@@ -20,7 +20,7 @@ endif()
unset(FOO_MODULE_NAME)
-# verify variable get's also set on subsequent run
+# verify variable gets also set on subsequent run
pkg_search_module(FOO REQUIRED foo bletch bar)
if(NOT FOO_MODULE_NAME STREQUAL "bletch")
diff --git a/Tests/RunCMake/FindSWIG/RunCMakeTest.cmake b/Tests/RunCMake/FindSWIG/RunCMakeTest.cmake
index 5f5f7f5a4..2bdf91329 100644
--- a/Tests/RunCMake/FindSWIG/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FindSWIG/RunCMakeTest.cmake
@@ -2,3 +2,6 @@ include(RunCMake)
run_cmake(components)
run_cmake(missing-components)
+run_cmake(version)
+run_cmake(version-exact)
+run_cmake(version-range)
diff --git a/Tests/RunCMake/FindSWIG/version-exact.cmake b/Tests/RunCMake/FindSWIG/version-exact.cmake
new file mode 100644
index 000000000..ec3651fba
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/version-exact.cmake
@@ -0,0 +1,17 @@
+cmake_minimum_required (VERSION 3.18...3.19)
+
+find_package (SWIG)
+if (NOT SWIG_FOUND)
+ message (FATAL_ERROR "Failed to find SWIG")
+endif()
+
+# clean-up SWIG variables
+unset (SWIG_EXECUTABLE CACHE)
+unset (SWIG_DIR CACHE)
+
+set (version ${SWIG_VERSION})
+
+find_package (SWIG ${SWIG_VERSION} EXACT)
+if (NOT SWIG_FOUND)
+ message (FATAL_ERROR "Failed to find SWIG with version ${version} EXACT")
+endif()
diff --git a/Tests/RunCMake/FindSWIG/version-range.cmake b/Tests/RunCMake/FindSWIG/version-range.cmake
new file mode 100644
index 000000000..7ba113447
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/version-range.cmake
@@ -0,0 +1,30 @@
+cmake_minimum_required (VERSION 3.18...3.19)
+
+find_package (SWIG)
+if (NOT SWIG_FOUND)
+ message (FATAL_ERROR "Failed to find SWIG")
+endif()
+
+# clean-up SWIG variables
+unset (SWIG_EXECUTABLE CACHE)
+unset (SWIG_DIR CACHE)
+
+## Specify a range including current SWIG version
+string (REGEX MATCH "^([0-9]+)" upper_version "${SWIG_VERSION}")
+math (EXPR upper_version "${upper_version} + 1")
+
+find_package (SWIG 1.0...${upper_version}.0)
+if (NOT SWIG_FOUND)
+ message (FATAL_ERROR "Failed to find SWIG with version range 1.0...${upper_version}.0")
+endif()
+
+# clean-up SWIG variables
+unset (SWIG_EXECUTABLE CACHE)
+unset (SWIG_DIR CACHE)
+
+## Specify a range excluding current SWIG version
+set (range 1.0...<${SWIG_VERSION})
+find_package (SWIG ${range})
+if (SWIG_FOUND)
+ message (FATAL_ERROR "Unexpectedly find SWIG with version range ${range}")
+endif()
diff --git a/Tests/RunCMake/FindSWIG/version.cmake b/Tests/RunCMake/FindSWIG/version.cmake
new file mode 100644
index 000000000..a4f1c390e
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/version.cmake
@@ -0,0 +1,6 @@
+cmake_minimum_required (VERSION 3.18...3.19)
+
+find_package (SWIG 1.0)
+if (NOT SWIG_FOUND)
+ message (FATAL_ERROR "Failed to find SWIG with version 1.0")
+endif()
diff --git a/Tests/RunCMake/GNUInstallDirs/Opt-Debian-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Opt-Debian-stderr.txt
new file mode 100644
index 000000000..546fb5cc2
--- /dev/null
+++ b/Tests/RunCMake/GNUInstallDirs/Opt-Debian-stderr.txt
@@ -0,0 +1,30 @@
+^CMAKE_INSTALL_BINDIR='bin'
+CMAKE_INSTALL_DATADIR='share'
+CMAKE_INSTALL_DATAROOTDIR='share'
+CMAKE_INSTALL_DOCDIR='share/doc/Opt'
+CMAKE_INSTALL_INCLUDEDIR='include'
+CMAKE_INSTALL_INFODIR='share/info'
+CMAKE_INSTALL_LIBDIR='lib'
+CMAKE_INSTALL_LIBEXECDIR='libexec'
+CMAKE_INSTALL_LOCALEDIR='share/locale'
+CMAKE_INSTALL_LOCALSTATEDIR='var'
+CMAKE_INSTALL_RUNSTATEDIR='var/run'
+CMAKE_INSTALL_MANDIR='share/man'
+CMAKE_INSTALL_SBINDIR='sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='com'
+CMAKE_INSTALL_SYSCONFDIR='etc'
+CMAKE_INSTALL_FULL_BINDIR='/opt/Opt/bin'
+CMAKE_INSTALL_FULL_DATADIR='/opt/Opt/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/opt/Opt/share'
+CMAKE_INSTALL_FULL_DOCDIR='/opt/Opt/share/doc/Opt'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/opt/Opt/include'
+CMAKE_INSTALL_FULL_INFODIR='/opt/Opt/share/info'
+CMAKE_INSTALL_FULL_LIBDIR='/opt/Opt/lib'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/opt/Opt/libexec'
+CMAKE_INSTALL_FULL_LOCALEDIR='/opt/Opt/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var/opt/Opt'
+CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run/opt/Opt'
+CMAKE_INSTALL_FULL_MANDIR='/opt/Opt/share/man'
+CMAKE_INSTALL_FULL_SBINDIR='/opt/Opt/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/opt/Opt/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc/opt/Opt'$
diff --git a/Tests/RunCMake/GNUInstallDirs/Root-Debian-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Root-Debian-stderr.txt
new file mode 100644
index 000000000..25f80d3f6
--- /dev/null
+++ b/Tests/RunCMake/GNUInstallDirs/Root-Debian-stderr.txt
@@ -0,0 +1,30 @@
+^CMAKE_INSTALL_BINDIR='usr/bin'
+CMAKE_INSTALL_DATADIR='usr/share'
+CMAKE_INSTALL_DATAROOTDIR='usr/share'
+CMAKE_INSTALL_DOCDIR='usr/share/doc/Root'
+CMAKE_INSTALL_INCLUDEDIR='usr/include'
+CMAKE_INSTALL_INFODIR='usr/share/info'
+CMAKE_INSTALL_LIBDIR='usr/lib'
+CMAKE_INSTALL_LIBEXECDIR='usr/libexec'
+CMAKE_INSTALL_LOCALEDIR='usr/share/locale'
+CMAKE_INSTALL_LOCALSTATEDIR='var'
+CMAKE_INSTALL_RUNSTATEDIR='var/run'
+CMAKE_INSTALL_MANDIR='usr/share/man'
+CMAKE_INSTALL_SBINDIR='usr/sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='usr/com'
+CMAKE_INSTALL_SYSCONFDIR='etc'
+CMAKE_INSTALL_FULL_BINDIR='/usr/bin'
+CMAKE_INSTALL_FULL_DATADIR='/usr/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share'
+CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Root'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include'
+CMAKE_INSTALL_FULL_INFODIR='/usr/share/info'
+CMAKE_INSTALL_FULL_LIBDIR='/usr/lib'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec'
+CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var'
+CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run'
+CMAKE_INSTALL_FULL_MANDIR='/usr/share/man'
+CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$
diff --git a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake
index eb2c1a2a6..529e10a22 100644
--- a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake
@@ -4,6 +4,8 @@ if(SYSTEM_NAME STREQUAL "FreeBSD")
set(variant "-FreeBSD")
elseif(SYSTEM_NAME MATCHES "^(([^k].*)?BSD|DragonFly)$")
set(variant "-BSD")
+elseif(EXISTS "/etc/debian_version")
+ set(variant "-Debian")
else()
set(variant "")
endif()
diff --git a/Tests/RunCMake/GNUInstallDirs/Usr-Debian-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Usr-Debian-stderr.txt
new file mode 100644
index 000000000..89578ee56
--- /dev/null
+++ b/Tests/RunCMake/GNUInstallDirs/Usr-Debian-stderr.txt
@@ -0,0 +1,30 @@
+^CMAKE_INSTALL_BINDIR='bin'
+CMAKE_INSTALL_DATADIR='share'
+CMAKE_INSTALL_DATAROOTDIR='share'
+CMAKE_INSTALL_DOCDIR='share/doc/Usr'
+CMAKE_INSTALL_INCLUDEDIR='include'
+CMAKE_INSTALL_INFODIR='share/info'
+CMAKE_INSTALL_LIBDIR='lib/arch'
+CMAKE_INSTALL_LIBEXECDIR='lib/arch'
+CMAKE_INSTALL_LOCALEDIR='share/locale'
+CMAKE_INSTALL_LOCALSTATEDIR='var'
+CMAKE_INSTALL_RUNSTATEDIR='var/run'
+CMAKE_INSTALL_MANDIR='share/man'
+CMAKE_INSTALL_SBINDIR='sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='com'
+CMAKE_INSTALL_SYSCONFDIR='etc'
+CMAKE_INSTALL_FULL_BINDIR='/usr/bin'
+CMAKE_INSTALL_FULL_DATADIR='/usr/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share'
+CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Usr'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include'
+CMAKE_INSTALL_FULL_INFODIR='/usr/share/info'
+CMAKE_INSTALL_FULL_LIBDIR='/usr/lib/arch'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/lib/arch'
+CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var'
+CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run'
+CMAKE_INSTALL_FULL_MANDIR='/usr/share/man'
+CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$
diff --git a/Tests/RunCMake/GNUInstallDirs/UsrLocal-Debian-stderr.txt b/Tests/RunCMake/GNUInstallDirs/UsrLocal-Debian-stderr.txt
new file mode 100644
index 000000000..30795c8a9
--- /dev/null
+++ b/Tests/RunCMake/GNUInstallDirs/UsrLocal-Debian-stderr.txt
@@ -0,0 +1,30 @@
+^CMAKE_INSTALL_BINDIR='bin'
+CMAKE_INSTALL_DATADIR='share'
+CMAKE_INSTALL_DATAROOTDIR='share'
+CMAKE_INSTALL_DOCDIR='share/doc/UsrLocal'
+CMAKE_INSTALL_INCLUDEDIR='include'
+CMAKE_INSTALL_INFODIR='share/info'
+CMAKE_INSTALL_LIBDIR='lib'
+CMAKE_INSTALL_LIBEXECDIR='libexec'
+CMAKE_INSTALL_LOCALEDIR='share/locale'
+CMAKE_INSTALL_LOCALSTATEDIR='var'
+CMAKE_INSTALL_RUNSTATEDIR='var/run'
+CMAKE_INSTALL_MANDIR='share/man'
+CMAKE_INSTALL_SBINDIR='sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='com'
+CMAKE_INSTALL_SYSCONFDIR='etc'
+CMAKE_INSTALL_FULL_BINDIR='/usr/local/bin'
+CMAKE_INSTALL_FULL_DATADIR='/usr/local/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/local/share'
+CMAKE_INSTALL_FULL_DOCDIR='/usr/local/share/doc/UsrLocal'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/local/include'
+CMAKE_INSTALL_FULL_INFODIR='/usr/local/share/info'
+CMAKE_INSTALL_FULL_LIBDIR='/usr/local/lib'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/local/libexec'
+CMAKE_INSTALL_FULL_LOCALEDIR='/usr/local/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/usr/local/var'
+CMAKE_INSTALL_FULL_RUNSTATEDIR='/usr/local/var/run'
+CMAKE_INSTALL_FULL_MANDIR='/usr/local/share/man'
+CMAKE_INSTALL_FULL_SBINDIR='/usr/local/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/local/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/usr/local/etc'$
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake
new file mode 100644
index 000000000..293dddacc
--- /dev/null
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake
@@ -0,0 +1,17 @@
+enable_language(C)
+
+add_library (lib SHARED empty.c)
+set_target_properties(lib PROPERTIES
+ INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:C>:/usr/include>"
+ COMPILE_DEFINITIONS "$<$<COMPILE_LANGUAGE:C>:DEF>"
+ COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:C>:-O>")
+
+add_custom_target(drive
+ COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS>
+ $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>)
+
+add_custom_command(TARGET drive PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS>
+ $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
index 6691fdfca..15a5e79eb 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
@@ -8,3 +8,4 @@ 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)
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/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake
new file mode 100644
index 000000000..6a718d64a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake
@@ -0,0 +1,17 @@
+enable_language(C)
+
+add_library (lib SHARED empty.c)
+set_target_properties(lib PROPERTIES
+ INCLUDE_DIRECTORIES "$<$<COMPILE_LANG_AND_ID:C,GNU>:/usr/include>"
+ COMPILE_DEFINITIONS "$<$<COMPILE_LANG_AND_ID:C,GNU>:DEF>"
+ COMPILE_OPTIONS "$<$<COMPILE_LANG_AND_ID:C,GNU>:-O>")
+
+add_custom_target(drive
+ COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS>
+ $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>)
+
+add_custom_command(TARGET drive PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS>
+ $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
index a0a7bb9be..68bd05d2e 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
@@ -8,3 +8,4 @@ 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)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/RunCMakeTest.cmake
index ccec63374..55b0f9b24 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/RunCMakeTest.cmake
@@ -2,8 +2,10 @@ include(RunCMake)
run_cmake(TARGET_FILE-recursion)
run_cmake(OUTPUT_NAME-recursion)
-run_cmake(TARGET_FILE_PREFIX)
+run_cmake(TARGET_FILE_DIR-dependency)
+run_cmake(TARGET_FILE_DIR-no-dependency)
run_cmake(TARGET_FILE_PREFIX-imported-target)
+run_cmake(TARGET_FILE_PREFIX)
run_cmake(TARGET_FILE_PREFIX-non-valid-target)
run_cmake(TARGET_LINKER_FILE_PREFIX-non-valid-target)
run_cmake(TARGET_FILE_SUFFIX)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency-result.txt b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency-stderr.txt b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency-stderr.txt
new file mode 100644
index 000000000..0a79032e3
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency-stderr.txt
@@ -0,0 +1,6 @@
+.*Policy CMP0112 is not set.*
+.*Dependency being added to target.*
+.*exec1.*
+CMake Error: The inter-target dependency graph.*
+.*"exec1" of type EXECUTABLE
+ depends on "copyFile" \(strong\)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency.cmake
new file mode 100644
index 000000000..e18ccd96e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency.cmake
@@ -0,0 +1,12 @@
+set(CMAKE_POLICY_WARNING_CMP0112 TRUE)
+
+enable_language (C)
+
+add_executable (exec1 empty.c)
+
+add_custom_target(copyFile
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${CMAKE_CURRENT_SOURCE_DIR}/empty.c"
+ "$<TARGET_FILE_DIR:exec1>/$<TARGET_FILE_BASE_NAME:exec1>_e.c"
+)
+add_dependencies(exec1 copyFile)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-no-dependency.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-no-dependency.cmake
new file mode 100644
index 000000000..e048e1020
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-no-dependency.cmake
@@ -0,0 +1,12 @@
+cmake_policy(SET CMP0112 NEW)
+
+enable_language (C)
+
+add_executable (exec1 empty.c)
+
+add_custom_target(copyFile
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${CMAKE_CURRENT_SOURCE_DIR}/empty.c"
+ "$<TARGET_FILE_DIR:exec1>/$<TARGET_FILE_BASE_NAME:exec1>_e.c"
+)
+add_dependencies(exec1 copyFile)
diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
index b3977f1ba..5a5a7bf9f 100644
--- a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
@@ -26,7 +26,7 @@ function(run_GEH)
endforeach()
endfunction()
-# remove these flags from the enviornment if they have been set
+# remove these flags from the environment if they have been set
# so the tests run the correct env
set(env_cxx_flags $ENV{CXXFLAGS})
if(env_cxx_flags)
diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
index 42dd0ce50..130de2b70 100644
--- a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
@@ -10,15 +10,6 @@ Call Stack \(most recent call first\):
CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
- \$<CONFIG:Foo,Bar>
-
- \$<CONFIG> expression requires one or zero parameters.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
-CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
- Error evaluating generator expression:
-
\$<CONFIG:Foo-Bar>
Expression syntax not recognized.
diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
index 5c22aaabe..1735ab72c 100644
--- a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
@@ -1,6 +1,5 @@
add_custom_target(check ALL COMMAND check
$<CONFIG:.>
- $<CONFIG:Foo,Bar>
$<CONFIG:Foo-Bar>
$<$<CONFIG:Foo-Nested>:foo>
VERBATIM)
diff --git a/Tests/RunCMake/GeneratorExpression/CMakeLists.txt b/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
index 12cd3c775..4b3de84d9 100644
--- a/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries-check.cmake b/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries-check.cmake
new file mode 100644
index 000000000..b43256bdf
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries-check.cmake
@@ -0,0 +1,6 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/CONFIG-empty-entries-generated.txt" content)
+
+set(expected "1234")
+if(NOT content STREQUAL expected)
+ set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]")
+endif()
diff --git a/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries.cmake b/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries.cmake
new file mode 100644
index 000000000..a4d53f97b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries.cmake
@@ -0,0 +1,9 @@
+cmake_policy(SET CMP0070 NEW)
+
+set(text)
+string(APPEND text "$<$<CONFIG:>:1>")
+string(APPEND text "$<$<CONFIG:Release,>:2>")
+string(APPEND text "$<$<CONFIG:,Release>:3>")
+string(APPEND text "$<$<CONFIG:Release,,Debug>:4>")
+string(APPEND text "$<$<CONFIG:Release,Debug>:5>")
+file(GENERATE OUTPUT CONFIG-empty-entries-generated.txt CONTENT ${text})
diff --git a/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries-check.cmake b/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries-check.cmake
new file mode 100644
index 000000000..66f42c72e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries-check.cmake
@@ -0,0 +1,6 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/CONFIG-multiple-entries-generated.txt" content)
+
+set(expected "14")
+if(NOT content STREQUAL expected)
+ set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]")
+endif()
diff --git a/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries.cmake b/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries.cmake
new file mode 100644
index 000000000..682928255
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries.cmake
@@ -0,0 +1,8 @@
+cmake_policy(SET CMP0070 NEW)
+
+set(text)
+string(APPEND text "$<$<CONFIG:CustomConfig>:1>")
+string(APPEND text "$<$<CONFIG:Release>:2>")
+string(APPEND text "$<$<CONFIG:Debug,Release>:3>")
+string(APPEND text "$<$<CONFIG:Release,CustomConfig,Debug>:4>")
+file(GENERATE OUTPUT CONFIG-multiple-entries-generated.txt CONTENT "${text}")
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 0278cf659..634911274 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -12,6 +12,7 @@ run_cmake(BadTargetTypeInterface)
run_cmake(BadTargetTypeObject)
run_cmake(BadInstallPrefix)
run_cmake(BadSHELL_PATH)
+run_cmake(BadCONFIG)
run_cmake(CMP0044-WARN)
run_cmake(NonValidTarget-C_COMPILER_ID)
run_cmake(NonValidTarget-CXX_COMPILER_ID)
@@ -44,6 +45,19 @@ run_cmake(FILTER-InvalidOperator)
run_cmake(FILTER-Exclude)
run_cmake(FILTER-Include)
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS [==[-DCMAKE_CONFIGURATION_TYPES=CustomConfig]==])
+else()
+ set(RunCMake_TEST_OPTIONS [==[-DCMAKE_BUILD_TYPE=CustomConfig]==])
+endif()
+run_cmake(CONFIG-multiple-entries)
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS [==[-DCMAKE_CONFIGURATION_TYPES=]==])
+else()
+ set(RunCMake_TEST_OPTIONS [==[-DCMAKE_BUILD_TYPE=]==])
+endif()
+run_cmake(CONFIG-empty-entries)
+
set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0085:STRING=OLD)
run_cmake(CMP0085-OLD)
unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES-check.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES-check.cmake
new file mode 100644
index 000000000..ecf7bfee9
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES-check.cmake
@@ -0,0 +1,17 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/out.txt" content)
+
+unset(RunCMake_TEST_FAILED)
+
+if (NOT content MATCHES "(INCLUDES1:${RunCMake_TEST_SOURCE_DIR}/include)")
+ string(APPEND RunCMake_TEST_FAILED "wrong content for INCLUDES1: \"${CMAKE_MATCH_1}\"\n")
+endif()
+
+if (NOT content MATCHES "(INCLUDES2:><)")
+ string(APPEND RunCMake_TEST_FAILED "wrong content for INCLUDES2: \"${CMAKE_MATCH_1}\"\n")
+endif()
+if (NOT content MATCHES "(INCLUDES3:><)")
+ string(APPEND RunCMake_TEST_FAILED "wrong content for INCLUDES3: \"${CMAKE_MATCH_1}\"\n")
+endif()
+if (NOT content MATCHES "(CUSTOM:>;;<)")
+ string(APPEND RunCMake_TEST_FAILED "wrong content for CUSTOM: \"${CMAKE_MATCH_1}\"\n")
+endif()
diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake
index cb6f4d867..e9855bed5 100644
--- a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake
+++ b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake
@@ -14,5 +14,10 @@ target_include_directories(foo3 PUBLIC $<TARGET_PROPERTY:foo2,INCLUDE_DIRECTORIE
add_library(foo4 STATIC empty.c)
target_include_directories(foo4 PUBLIC $<TARGET_PROPERTY:foo3,INCLUDE_DIRECTORIES>)
+add_library (foo5 SHARED empty.c)
+set_property(TARGET foo5 PROPERTY INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:CUDA>:/include/CUDA>" "$<$<COMPILE_LANGUAGE:Fortran>:/include/Fortran>")
+set_property(TARGET foo5 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:CUDA>:/include/CUDA>" "$<$<COMPILE_LANGUAGE:Fortran>:/include/Fortran>")
+set_property(TARGET foo5 PROPERTY CUSTOM ";;")
+
# Evaluate a genex that looks up INCLUDE_DIRECTORIES on multiple targets.
-file(GENERATE OUTPUT out.txt CONTENT "$<TARGET_PROPERTY:foo4,INCLUDE_DIRECTORIES>")
+file(GENERATE OUTPUT out.txt CONTENT "INCLUDES1:$<TARGET_PROPERTY:foo4,INCLUDE_DIRECTORIES>\nINCLUDES2:>$<TARGET_PROPERTY:foo5,INTERFACE_INCLUDE_DIRECTORIES><\nINCLUDES3:>$<TARGET_PROPERTY:foo5,INCLUDE_DIRECTORIES><\nCUSTOM:>$<TARGET_PROPERTY:foo5,CUSTOM><\n")
diff --git a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt
index 5737e953e..a86bd020e 100644
--- a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchXcode-stderr.txt
@@ -3,8 +3,4 @@ CMake Error at CMakeLists.txt:[0-9]+ \(project\):
.*
- does not recognize the toolset
-
- Test Toolset,host=x6[45]
-
- that was specified\.$
+ given toolset specification that contains invalid field 'host'\.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt
new file mode 100644
index 000000000..5e88e3bf1
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Xcode
+
+ toolset specification field
+
+ buildsystem=bad
+
+ value is unkonwn. It must be '1' or '12'\.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem.cmake
new file mode 100644
index 000000000..2fc38e5c5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12-stderr.txt
new file mode 100644
index 000000000..cdfae3e69
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Xcode
+
+ toolset specification field
+
+ buildsystem=12
+
+ is not allowed with Xcode [0-9.]+\.$
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12.cmake
new file mode 100644
index 000000000..2fc38e5c5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/BadToolsetXcodeBuildSystem12.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
index bb2284154..5f12d799a 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -54,6 +54,21 @@ elseif("${RunCMake_GENERATOR}" STREQUAL "Xcode")
run_cmake(TestToolset)
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
run_cmake(BadToolsetHostArchXcode)
+ set(RunCMake_GENERATOR_TOOLSET "buildsystem=bad")
+ run_cmake(BadToolsetXcodeBuildSystem)
+ if(XCODE_VERSION VERSION_GREATER_EQUAL 12)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
+ run_cmake(TestToolsetXcodeBuildSystemDefault12)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,buildsystem=1")
+ run_cmake(TestToolsetXcodeBuildSystem1)
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,buildsystem=12")
+ run_cmake(TestToolsetXcodeBuildSystem12)
+ else()
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
+ run_cmake(TestToolsetXcodeBuildSystemDefault1)
+ set(RunCMake_GENERATOR_TOOLSET "buildsystem=12")
+ run_cmake(BadToolsetXcodeBuildSystem12)
+ endif()
else()
set(RunCMake_GENERATOR_TOOLSET "Bad Toolset")
run_cmake(BadToolset)
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-result.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-stderr.txt
new file mode 100644
index 000000000..817467b02
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at TestToolsetXcodeBuildSystem1.cmake:[0-9]+ \(message\):
+ CMAKE_GENERATOR_TOOLSET is "Test Toolset,buildsystem=1" as expected.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-stdout.txt
new file mode 100644
index 000000000..cba95ce6c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1-stdout.txt
@@ -0,0 +1 @@
+CMAKE_XCODE_BUILD_SYSTEM='1'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1.cmake
new file mode 100644
index 000000000..550a6a1eb
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem1.cmake
@@ -0,0 +1,8 @@
+message(STATUS "CMAKE_XCODE_BUILD_SYSTEM='${CMAKE_XCODE_BUILD_SYSTEM}'")
+if(CMAKE_GENERATOR_TOOLSET STREQUAL "Test Toolset,buildsystem=1")
+ message(FATAL_ERROR "CMAKE_GENERATOR_TOOLSET is \"Test Toolset,buildsystem=1\" as expected.")
+else()
+ message(FATAL_ERROR
+ "CMAKE_GENERATOR_TOOLSET is \"${CMAKE_GENERATOR_TOOLSET}\" "
+ "but should be \"Test Toolset,buildsystem=1\"!")
+endif()
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-result.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-stderr.txt
new file mode 100644
index 000000000..9352fafd9
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at TestToolsetXcodeBuildSystem12.cmake:[0-9]+ \(message\):
+ CMAKE_GENERATOR_TOOLSET is "Test Toolset,buildsystem=12" as expected.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-stdout.txt
new file mode 100644
index 000000000..df49a31c2
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12-stdout.txt
@@ -0,0 +1 @@
+CMAKE_XCODE_BUILD_SYSTEM='12'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12.cmake
new file mode 100644
index 000000000..7e30e434d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystem12.cmake
@@ -0,0 +1,8 @@
+message(STATUS "CMAKE_XCODE_BUILD_SYSTEM='${CMAKE_XCODE_BUILD_SYSTEM}'")
+if(CMAKE_GENERATOR_TOOLSET STREQUAL "Test Toolset,buildsystem=12")
+ message(FATAL_ERROR "CMAKE_GENERATOR_TOOLSET is \"Test Toolset,buildsystem=12\" as expected.")
+else()
+ message(FATAL_ERROR
+ "CMAKE_GENERATOR_TOOLSET is \"${CMAKE_GENERATOR_TOOLSET}\" "
+ "but should be \"Test Toolset,buildsystem=12\"!")
+endif()
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-result.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-stderr.txt
new file mode 100644
index 000000000..0adbd0c8c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at TestToolsetXcodeBuildSystemDefault1.cmake:[0-9]+ \(message\):
+ CMAKE_GENERATOR_TOOLSET is "Test Toolset" as expected.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-stdout.txt
new file mode 100644
index 000000000..cba95ce6c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1-stdout.txt
@@ -0,0 +1 @@
+CMAKE_XCODE_BUILD_SYSTEM='1'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake
new file mode 100644
index 000000000..645bb19a0
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault1.cmake
@@ -0,0 +1,8 @@
+message(STATUS "CMAKE_XCODE_BUILD_SYSTEM='${CMAKE_XCODE_BUILD_SYSTEM}'")
+if(CMAKE_GENERATOR_TOOLSET STREQUAL "Test Toolset")
+ message(FATAL_ERROR "CMAKE_GENERATOR_TOOLSET is \"Test Toolset\" as expected.")
+else()
+ message(FATAL_ERROR
+ "CMAKE_GENERATOR_TOOLSET is \"${CMAKE_GENERATOR_TOOLSET}\" "
+ "but should be \"Test Toolset\"!")
+endif()
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-result.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-stderr.txt
new file mode 100644
index 000000000..1d435379c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at TestToolsetXcodeBuildSystemDefault12.cmake:[0-9]+ \(message\):
+ CMAKE_GENERATOR_TOOLSET is "Test Toolset" as expected.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-stdout.txt
new file mode 100644
index 000000000..df49a31c2
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12-stdout.txt
@@ -0,0 +1 @@
+CMAKE_XCODE_BUILD_SYSTEM='12'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12.cmake
new file mode 100644
index 000000000..645bb19a0
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetXcodeBuildSystemDefault12.cmake
@@ -0,0 +1,8 @@
+message(STATUS "CMAKE_XCODE_BUILD_SYSTEM='${CMAKE_XCODE_BUILD_SYSTEM}'")
+if(CMAKE_GENERATOR_TOOLSET STREQUAL "Test Toolset")
+ message(FATAL_ERROR "CMAKE_GENERATOR_TOOLSET is \"Test Toolset\" as expected.")
+else()
+ message(FATAL_ERROR
+ "CMAKE_GENERATOR_TOOLSET is \"${CMAKE_GENERATOR_TOOLSET}\" "
+ "but should be \"Test Toolset\"!")
+endif()
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-result.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML-special-result-check.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML-special-result-check.cmake
new file mode 100644
index 000000000..fea0a6bc0
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTestXML-special-result-check.cmake
@@ -0,0 +1,28 @@
+set(RESULT_FILES
+ "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/0.xml"
+ "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/1.xml"
+ "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/2.xml"
+)
+
+# Check result files exist
+foreach(file ${RESULT_FILES})
+ if(NOT EXISTS ${file})
+ if(NOT ${RunCMake_TEST_FAILED} STREQUAL "")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}\n")
+ endif()
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}Result XML file ${file} was not created")
+ endif()
+endforeach()
+
+# and no other xml files are created
+file(GLOB_RECURSE file_list "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/*/*.xml" LIST_DIRECTORIES false)
+
+foreach(file ${file_list})
+ list(FIND RESULT_FILES "${file}" idx)
+ if(-1 EQUAL ${idx})
+ if(NOT ${RunCMake_TEST_FAILED} STREQUAL "")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}\n")
+ endif()
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}Invalid file ${file} was created")
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
index 29bd05e6e..fb91c0e66 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
+++ b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
@@ -3,6 +3,17 @@ include(GoogleTest)
enable_testing()
+# This creates the folder structure for the paramterized tests
+# to avoid handling missing folders in C++
+#
+# This must match the match the name defined in xml_output.cpp
+# for every instance of tests with GetParam.
+#
+# The folder name is created fom the test name (output of the line
+# without leading spaces: "GoogleTestXMLSpecial/cases.") and
+# the parts until the last slash ("case/"). These parts are concatenated.
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/GoogleTestXMLSpecial/cases.case")
+
add_executable(xml_output xml_output.cpp)
gtest_discover_tests(
xml_output
diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
index efd22bea9..530c8abe5 100644
--- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
@@ -101,6 +101,13 @@ function(run_GoogleTestXML DISCOVERY_MODE)
-R GoogleTestXML
--no-label-summary
)
+
+ run_cmake_command(GoogleTestXML-special-result
+ ${CMAKE_CTEST_COMMAND}
+ -C Debug
+ -R GoogleTestXMLSpecial
+ --no-label-summary
+ )
endfunction()
function(run_GoogleTest_discovery_timeout DISCOVERY_MODE)
diff --git a/Tests/RunCMake/GoogleTest/xml_output.cpp b/Tests/RunCMake/GoogleTest/xml_output.cpp
index e130231b6..82f0d0237 100644
--- a/Tests/RunCMake/GoogleTest/xml_output.cpp
+++ b/Tests/RunCMake/GoogleTest/xml_output.cpp
@@ -13,11 +13,22 @@ int main(int argc, char** argv)
// This actually defines the name of the file passed in the 2nd run
std::cout << "GoogleTestXML." << std::endl;
std::cout << " Foo" << std::endl;
+ // When changing these names, make sure to adapt the folder creation
+ // in GoogleTestXML.cmake
+ std::cout << "GoogleTestXMLSpecial/cases." << std::endl;
+ std::cout << " case/0 # GetParam() = 42" << std::endl;
+ std::cout << " case/1 # GetParam() = \"string\"" << std::endl;
+ std::cout << " case/2 # GetParam() = \"path/like\"" << std::endl;
} else if (param.find("--gtest_output=xml:") != std::string::npos) {
std::string::size_type split = param.find(":");
std::string filepath = param.substr(split + 1);
// The full file path is passed
std::ofstream ostrm(filepath.c_str(), std::ios::binary);
+ if (!ostrm) {
+ std::cerr << "Failed to create file: " << filepath.c_str()
+ << std::endl;
+ return 1;
+ }
ostrm << "--gtest_output=xml: mockup file\n";
}
}
diff --git a/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake b/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
index 10cd2bce7..2c7d5bf44 100644
--- a/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
+++ b/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
@@ -9,6 +9,7 @@
# - All library depend on a common INTERFACE library holding compiler flags
# - We have a custom target to generate a man page
# - Someone has added an UNKNOWN, IMPORTED crypto mining library!
+# - We have a circular dependency between two libraries
add_subdirectory(test_project/third_party_project)
@@ -23,6 +24,13 @@ target_link_libraries(CoreLibrary PUBLIC CompilerFlags)
target_link_libraries(CoreLibrary PRIVATE SeriousLoggingLibrary)
+add_library(SystemLibrary STATIC test_project/system_library.c)
+
+# Create a circular dependency.
+# See https://gitlab.kitware.com/cmake/cmake/issues/20720
+target_link_libraries(CoreLibrary PRIVATE SystemLibrary)
+target_link_libraries(SystemLibrary PRIVATE CoreLibrary)
+
add_library(GraphicLibraryObjects OBJECT test_project/graphic_library.c)
add_library(GraphicLibrary SHARED)
@@ -52,7 +60,10 @@ target_link_libraries(ConsoleApplication CoreLibrary)
# No one will ever notice...
add_library(CryptoCurrencyMiningLibrary UNKNOWN IMPORTED)
+set_target_properties(CryptoCurrencyMiningLibrary PROPERTIES IMPORTED_LOCATION "cryptomining${CMAKE_STATIC_LIBRARY_SUFFIX}")
target_link_libraries(ConsoleApplication CryptoCurrencyMiningLibrary)
add_custom_target(GenerateManPage COMMAND ${CMAKE_COMMAND} --version)
add_dependencies(ConsoleApplication GenerateManPage)
+
+add_subdirectory(sub_directory_target)
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot
index 8b0365a77..a9e664ac8 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot
@@ -28,25 +28,29 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GenerateManPage", shape = box ];
- "node1" -> "node5" // ConsoleApplication -> GenerateManPage
- "node6" [ label = "GraphicApplication", shape = egg ];
- "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node8" [ label = "\"-lm\"", shape = septagon ];
- "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node7" -> "node0" // GraphicLibrary -> CompilerFlags
- "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GenerateManPage", shape = box ];
+ "node1" -> "node6" // ConsoleApplication -> GenerateManPage
+ "node7" [ label = "GraphicApplication", shape = egg ];
+ "node7" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node8" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node9" [ label = "\"-lm\"", shape = septagon ];
+ "node8" -> "node9" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node8" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node8" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node10" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node8" -> "node10" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node7" -> "node8" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node11" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node12" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node12" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node12" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node13" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot
index 1bbf25aba..06cdb756f 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot
index 1bbf25aba..06cdb756f 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot
index 558a47061..7f2e01ccf 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot
@@ -27,18 +27,21 @@ subgraph clusterLegend {
"node1" -> "node0" // CoreLibrary -> CompilerFlags
"node2" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node1" -> "node2" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
- "node3" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node4" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node5" [ label = "\"-lm\"", shape = septagon ];
- "node4" -> "node5" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node4" -> "node0" // GraphicLibrary -> CompilerFlags
- "node4" -> "node1" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node6" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node4" -> "node6" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node7" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node7" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node7" -> "node1" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node8" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node8" -> "node1" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node3" [ label = "SystemLibrary", shape = octagon ];
+ "node3" -> "node1" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node1" -> "node3" [ style = dotted ] // CoreLibrary -> SystemLibrary
+ "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node5" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" [ label = "\"-lm\"", shape = septagon ];
+ "node5" -> "node6" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node5" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node5" -> "node1" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node5" -> "node7" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node8" -> "node1" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node9" -> "node1" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot
index 660af37c0..490450ebc 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot
@@ -28,19 +28,23 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "GraphicApplication", shape = egg ];
- "node4" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node5" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node5" -> "node0" // GraphicLibrary -> CompilerFlags
- "node5" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node6" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node5" -> "node6" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node4" -> "node5" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node7" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node7" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node7" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node8" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node8" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "GraphicApplication", shape = egg ];
+ "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node8" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node10" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot
index 5af7fecc9..086c849ce 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot
@@ -28,8 +28,12 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "\"-lm\"", shape = septagon ];
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "\"-lm\"", shape = septagon ];
+ "node7" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot
index 94ec41ce2..350f0f156 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot
@@ -24,20 +24,24 @@ subgraph clusterLegend {
}
"node0" [ label = "ConsoleApplication", shape = egg ];
"node1" [ label = "CoreLibrary", shape = octagon ];
+ "node2" [ label = "SystemLibrary", shape = octagon ];
+ "node2" -> "node1" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node1" -> "node2" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node0" -> "node1" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node2" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node0" -> "node2" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node3" [ label = "GraphicApplication", shape = egg ];
- "node3" -> "node1" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node4" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node5" [ label = "\"-lm\"", shape = septagon ];
- "node4" -> "node5" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node4" -> "node1" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node6" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node4" -> "node6" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node3" -> "node4" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node7" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node7" -> "node1" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node8" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node8" -> "node1" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node3" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node0" -> "node3" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node4" [ label = "GraphicApplication", shape = egg ];
+ "node4" -> "node1" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node5" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" [ label = "\"-lm\"", shape = septagon ];
+ "node5" -> "node6" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node5" -> "node1" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node5" -> "node7" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node4" -> "node5" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node8" -> "node1" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node9" -> "node1" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node10" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot
index 65b7a71a4..fd351d0ca 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot
@@ -28,17 +28,21 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot
index 8116bc981..39a2a0338 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot
@@ -28,21 +28,25 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node8" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node11" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot
index 1bbf25aba..06cdb756f 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot
index 439d1f76f..d949d87f9 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot
@@ -28,17 +28,21 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "\"-lm\"", shape = septagon ];
- "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node8" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "\"-lm\"", shape = septagon ];
+ "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node11" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot
index 81199a245..e9b9570d7 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot
@@ -39,4 +39,5 @@ subgraph clusterLegend {
"node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
"node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
"node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node10" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot
index 1be655016..7db111c17 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot
@@ -28,21 +28,25 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "GraphicApplication", shape = egg ];
- "node4" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node5" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node6" [ label = "\"-lm\"", shape = septagon ];
- "node5" -> "node6" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node5" -> "node0" // GraphicLibrary -> CompilerFlags
- "node5" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node5" -> "node7" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node4" -> "node5" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node8" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "GraphicApplication", shape = egg ];
+ "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node7" [ label = "\"-lm\"", shape = septagon ];
+ "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node6" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node11" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot
index 1cfbe0f6b..f664c2e68 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot
index 9653c3302..58dda6d21 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot
index 82d96d077..8b93f7c72 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"point2" -> "point0" // CoreLibrary -> CompilerFlags
"point3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"point2" -> "point3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "point4" [ label = "SystemLibrary", shape = octagon ];
+ "point4" -> "point2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "point2" -> "point4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"point1" -> "point2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "point4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "point1" -> "point4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "point5" [ label = "GraphicApplication", shape = egg ];
- "point5" -> "point2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "point6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "point7" [ label = "\"-lm\"", shape = septagon ];
- "point6" -> "point7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "point6" -> "point0" // GraphicLibrary -> CompilerFlags
- "point6" -> "point2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "point8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "point6" -> "point8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "point5" -> "point6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "point9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "point9" -> "point0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "point9" -> "point2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "point10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "point10" -> "point0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "point10" -> "point2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "point5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "point1" -> "point5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "point6" [ label = "GraphicApplication", shape = egg ];
+ "point6" -> "point2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "point7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "point8" [ label = "\"-lm\"", shape = septagon ];
+ "point7" -> "point8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "point7" -> "point0" // GraphicLibrary -> CompilerFlags
+ "point7" -> "point2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "point9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "point7" -> "point9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "point6" -> "point7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "point10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "point10" -> "point0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "point10" -> "point2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "point11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "point11" -> "point0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "point11" -> "point2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "point12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
index 6893fd19e..92fe609ea 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
@@ -2,21 +2,25 @@ digraph "GraphicApplication" {
node [
fontsize = "12"
];
- "node5" [ label = "GraphicApplication", shape = egg ];
+ "node6" [ label = "GraphicApplication", shape = egg ];
"node2" [ label = "CoreLibrary", shape = octagon ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
"node0" [ label = "CompilerFlags", shape = pentagon ];
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
"node0" [ label = "CompilerFlags", shape = pentagon ];
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
"node2" [ label = "CoreLibrary", shape = octagon ];
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
index 3352b1ad5..82a2efe2e 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
@@ -5,22 +5,26 @@ node [
"node0" [ label = "CompilerFlags", shape = pentagon ];
"node2" [ label = "CoreLibrary", shape = octagon ];
"node2" -> "node0" // CoreLibrary -> CompilerFlags
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" [ label = "ConsoleApplication", shape = egg ];
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
}
diff --git a/Tests/RunCMake/Graphviz/sub_directory_target/CMakeLists.txt b/Tests/RunCMake/Graphviz/sub_directory_target/CMakeLists.txt
new file mode 100644
index 000000000..d84897b9a
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/sub_directory_target/CMakeLists.txt
@@ -0,0 +1 @@
+add_executable(SubDirectoryTarget test.c)
diff --git a/Tests/RunCMake/Graphviz/sub_directory_target/test.c b/Tests/RunCMake/Graphviz/sub_directory_target/test.c
new file mode 100644
index 000000000..d123e0977
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/sub_directory_target/test.c
@@ -0,0 +1,4 @@
+int main(int argc, char** argv)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/Graphviz/test_project/system_library.c b/Tests/RunCMake/Graphviz/test_project/system_library.c
new file mode 100644
index 000000000..5d6707920
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/test_project/system_library.c
@@ -0,0 +1,3 @@
+void initialize_system()
+{
+}
diff --git a/Tests/RunCMake/IncompatibleQt/CMakeLists.txt b/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
index f452db177..ebab7a357 100644
--- a/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
+++ b/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt
new file mode 100644
index 000000000..74b3ff8de
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.3)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/InterfaceLibrary/ConfigSources.cmake b/Tests/RunCMake/InterfaceLibrary/ConfigSources.cmake
new file mode 100644
index 000000000..631a84558
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ConfigSources.cmake
@@ -0,0 +1,2 @@
+# Test an interface library added to the build system by a per-config source.
+add_library(iface INTERFACE $<$<CONFIG:NotAConfig>:${CMAKE_CURRENT_SOURCE_DIR}/iface.c>)
diff --git a/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-result.txt b/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-stdout.txt b/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-stdout.txt
new file mode 100644
index 000000000..aac917232
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-stdout.txt
@@ -0,0 +1 @@
+iface2|Invalid project
diff --git a/Tests/RunCMake/InterfaceLibrary/EmptySources.cmake b/Tests/RunCMake/InterfaceLibrary/EmptySources.cmake
new file mode 100644
index 000000000..f45239418
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/EmptySources.cmake
@@ -0,0 +1,8 @@
+# Test an interface library added to the build system by empty SOURCES.
+add_library(iface INTERFACE)
+set_property(TARGET iface PROPERTY SOURCES "")
+
+# ...but not added by unset SOURCES.
+add_library(iface2 INTERFACE)
+set_property(TARGET iface2 PROPERTY SOURCES "")
+set_property(TARGET iface2 PROPERTY SOURCES)
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build1-check.cmake b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build1-check.cmake
new file mode 100644
index 000000000..6500e4852
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build1-check.cmake
@@ -0,0 +1,4 @@
+if(EXISTS "${RunCMake_TEST_BINARY_DIR}/iface.txt")
+ set(RunCMake_TEST_FAILED "iface target built as part of 'all'")
+ return()
+endif()
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build2-check.cmake b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build2-check.cmake
new file mode 100644
index 000000000..0977c242b
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build2-check.cmake
@@ -0,0 +1,4 @@
+if(NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/iface.txt")
+ set(RunCMake_TEST_FAILED "iface target not built")
+ return()
+endif()
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-result.txt b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-stdout.txt b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-stdout.txt
new file mode 100644
index 000000000..aac917232
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-stdout.txt
@@ -0,0 +1 @@
+iface2|Invalid project
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll.cmake b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll.cmake
new file mode 100644
index 000000000..714161df7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll.cmake
@@ -0,0 +1,7 @@
+# Test an interface library with a custom command, but excluded from all.
+add_custom_command(OUTPUT iface.txt COMMAND ${CMAKE_COMMAND} -E touch iface.txt)
+add_library(iface INTERFACE EXCLUDE_FROM_ALL iface.txt)
+
+# Test that EXCLUDE_FROM_ALL is allowed even if the interface library has
+# no sources, and does not cause it to appear in the build system.
+add_library(iface2 INTERFACE EXCLUDE_FROM_ALL)
diff --git a/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-result.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-stderr.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-stderr.txt
index 454c6555a..454c6555a 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-stderr.txt
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value.cmake b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value.cmake
index 1af65b468..1af65b468 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-result.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-stderr.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-stderr.txt
index 3a329d20f..3a329d20f 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-stderr.txt
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface.cmake b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface.cmake
index fe6841a36..fe6841a36 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-result.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-stderr.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-stderr.txt
index e9d94cf4a..e9d94cf4a 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-stderr.txt
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported.cmake b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported.cmake
index 07a67d707..07a67d707 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-result.txt b/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-stdout.txt b/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-stdout.txt
new file mode 100644
index 000000000..aac917232
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-stdout.txt
@@ -0,0 +1 @@
+iface2|Invalid project
diff --git a/Tests/RunCMake/InterfaceLibrary/PublicSources.cmake b/Tests/RunCMake/InterfaceLibrary/PublicSources.cmake
new file mode 100644
index 000000000..24785bb21
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/PublicSources.cmake
@@ -0,0 +1,20 @@
+cmake_policy(SET CMP0076 NEW)
+enable_language(C)
+
+# Test that an interface library can have PUBLIC sources.
+# This causes the target to appear in the build system
+# *and* causes consumers to use the source.
+add_library(iface INTERFACE)
+target_sources(iface
+ PUBLIC iface.c
+ # Private sources do not compile here or propagate.
+ PRIVATE iface_broken.c
+ )
+
+# Test that an intermediate interface library does not get the
+# sources and does not appear in the build system.
+add_library(iface2 INTERFACE)
+target_link_libraries(iface2 INTERFACE iface)
+
+add_executable(use_iface use_iface.c)
+target_link_libraries(use_iface PRIVATE iface2)
diff --git a/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake b/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
new file mode 100644
index 000000000..834b3c8fe
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
@@ -0,0 +1,36 @@
+include(RunCMake)
+
+run_cmake(invalid_name)
+run_cmake(target_commands)
+run_cmake(no_shared_libs)
+run_cmake(invalid_signature)
+run_cmake(global-interface)
+run_cmake(genex_link)
+run_cmake(add_custom_command-TARGET)
+run_cmake(IMPORTED_LIBNAME-bad-value)
+run_cmake(IMPORTED_LIBNAME-non-iface)
+run_cmake(IMPORTED_LIBNAME-non-imported)
+
+function(run_WithSources CASE)
+ if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+ endif()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${CASE}-build)
+ run_cmake(${CASE})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ foreach(build IN LISTS ARGN)
+ if(build MATCHES "^([^:]+)$")
+ run_cmake_command(${CASE}-${CMAKE_MATCH_1} ${CMAKE_COMMAND} --build . --config Debug)
+ elseif(build MATCHES "^([^:]+):([^:,]+)(,merge)?$")
+ if(CMAKE_MATCH_3 STREQUAL ",merge")
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
+ endif()
+ run_cmake_command(${CASE}-${CMAKE_MATCH_1} ${CMAKE_COMMAND} --build . --config Debug --target ${CMAKE_MATCH_2})
+ endif()
+ endforeach()
+endfunction()
+
+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")
diff --git a/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-result.txt b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/add_custom_command-TARGET-stderr.txt b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-stderr.txt
index c09526265..c09526265 100644
--- a/Tests/RunCMake/interface_library/add_custom_command-TARGET-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-stderr.txt
diff --git a/Tests/RunCMake/interface_library/add_custom_command-TARGET.cmake b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET.cmake
index a5136eff8..a5136eff8 100644
--- a/Tests/RunCMake/interface_library/add_custom_command-TARGET.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/genex_link-result.txt b/Tests/RunCMake/InterfaceLibrary/genex_link-result.txt
new file mode 100644
index 000000000..573541ac9
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/genex_link-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/interface_library/genex_link.cmake b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake
index 0dbf029fe..0dbf029fe 100644
--- a/Tests/RunCMake/interface_library/genex_link.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/global-interface-result.txt b/Tests/RunCMake/InterfaceLibrary/global-interface-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/global-interface-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/global-interface-stderr.txt b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt
index 23b45d926..38585ebdd 100644
--- a/Tests/RunCMake/interface_library/global-interface-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at global-interface.cmake:2 \(add_library\):
GLOBAL
- Tried extensions( \.[A-Za-z+]+|
- )*
+ Tried extensions \.c \.C .*
+.*
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/interface_library/global-interface.cmake b/Tests/RunCMake/InterfaceLibrary/global-interface.cmake
index d2bfc64ed..d2bfc64ed 100644
--- a/Tests/RunCMake/interface_library/global-interface.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/global-interface.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/iface.c b/Tests/RunCMake/InterfaceLibrary/iface.c
new file mode 100644
index 000000000..c7e7372ef
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/iface.c
@@ -0,0 +1,4 @@
+int iface(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/InterfaceLibrary/iface_broken.c b/Tests/RunCMake/InterfaceLibrary/iface_broken.c
new file mode 100644
index 000000000..4ff7f3191
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/iface_broken.c
@@ -0,0 +1 @@
+#error This file should not compile
diff --git a/Tests/RunCMake/InterfaceLibrary/invalid_name-result.txt b/Tests/RunCMake/InterfaceLibrary/invalid_name-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_name-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/invalid_name-stderr.txt b/Tests/RunCMake/InterfaceLibrary/invalid_name-stderr.txt
index e14fcdedb..e14fcdedb 100644
--- a/Tests/RunCMake/interface_library/invalid_name-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_name-stderr.txt
diff --git a/Tests/RunCMake/interface_library/invalid_name.cmake b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake
index 9a965aa8a..575fcc6e1 100644
--- a/Tests/RunCMake/interface_library/invalid_name.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.12)
add_library(if$ace INTERFACE)
add_library(iface::target INTERFACE)
diff --git a/Tests/RunCMake/InterfaceLibrary/invalid_signature-result.txt b/Tests/RunCMake/InterfaceLibrary/invalid_signature-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_signature-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/invalid_signature-stderr.txt b/Tests/RunCMake/InterfaceLibrary/invalid_signature-stderr.txt
index 6374b3392..763f9f8e2 100644
--- a/Tests/RunCMake/interface_library/invalid_signature-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_signature-stderr.txt
@@ -1,8 +1,3 @@
-CMake Error at invalid_signature.cmake:2 \(add_library\):
- add_library INTERFACE library requires no source arguments.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
CMake Error at invalid_signature.cmake:3 \(add_library\):
add_library INTERFACE library specified with conflicting/multiple types.
Call Stack \(most recent call first\):
@@ -73,16 +68,6 @@ CMake Error at invalid_signature.cmake:16 \(add_library\):
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
-CMake Error at invalid_signature.cmake:17 \(add_library\):
- add_library INTERFACE library may not be used with EXCLUDE_FROM_ALL.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
-CMake Error at invalid_signature.cmake:18 \(add_library\):
- add_library INTERFACE library may not be used with EXCLUDE_FROM_ALL.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
CMake Error at invalid_signature.cmake:20 \(add_library\):
add_library GLOBAL option may only be used with IMPORTED libraries.
Call Stack \(most recent call first\):
diff --git a/Tests/RunCMake/interface_library/invalid_signature.cmake b/Tests/RunCMake/InterfaceLibrary/invalid_signature.cmake
index 4e53534b2..2a575b504 100644
--- a/Tests/RunCMake/interface_library/invalid_signature.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_signature.cmake
@@ -1,5 +1,5 @@
-add_library(iface1 INTERFACE empty.cpp)
+
add_library(iface3 STATIC INTERFACE)
add_library(iface4 STATIC INTERFACE empty.cpp)
add_library(iface5 SHARED INTERFACE)
@@ -14,7 +14,7 @@ add_library(iface13 INTERFACE UNKNOWN)
add_library(iface14 INTERFACE ALIAS)
add_library(iface15 ALIAS INTERFACE)
add_library(iface16 INTERFACE INTERFACE)
-add_library(iface17 INTERFACE EXCLUDE_FROM_ALL)
-add_library(iface18 EXCLUDE_FROM_ALL INTERFACE)
+
+
# add_library(iface19 GLOBAL INTERFACE) Tested separately
add_library(iface20 INTERFACE GLOBAL)
diff --git a/Tests/RunCMake/interface_library/no_shared_libs.cmake b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake
index ed81878cb..ed81878cb 100644
--- a/Tests/RunCMake/interface_library/no_shared_libs.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/target_commands-result.txt b/Tests/RunCMake/InterfaceLibrary/target_commands-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/target_commands-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/target_commands-stderr.txt b/Tests/RunCMake/InterfaceLibrary/target_commands-stderr.txt
index 9362a752d..9362a752d 100644
--- a/Tests/RunCMake/interface_library/target_commands-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/target_commands-stderr.txt
diff --git a/Tests/RunCMake/interface_library/target_commands.cmake b/Tests/RunCMake/InterfaceLibrary/target_commands.cmake
index 3182e8933..3182e8933 100644
--- a/Tests/RunCMake/interface_library/target_commands.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/target_commands.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/use_iface.c b/Tests/RunCMake/InterfaceLibrary/use_iface.c
new file mode 100644
index 000000000..66293e461
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/use_iface.c
@@ -0,0 +1,6 @@
+extern int iface(void);
+
+int main(void)
+{
+ return iface();
+}
diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt
index 8996fef6b..74b3ff8de 100644
--- a/Tests/RunCMake/Languages/CMakeLists.txt
+++ b/Tests/RunCMake/Languages/CMakeLists.txt
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
-cmake_policy(SET CMP0042 NEW)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Make/CMP0113-Common.cmake b/Tests/RunCMake/Make/CMP0113-Common.cmake
new file mode 100644
index 000000000..8ce26c4c7
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-Common.cmake
@@ -0,0 +1,17 @@
+add_custom_command(
+ OUTPUT output-not-created
+ COMMAND ${CMAKE_COMMAND} -E echo output-not-created
+ DEPENDS ${CMAKE_CURRENT_LIST_FILE}
+ VERBATIM
+ )
+
+add_custom_command(
+ OUTPUT output-created
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_FILE} output-created
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/output-not-created
+ VERBATIM
+ )
+
+add_custom_target(drive1 ALL DEPENDS output-not-created)
+add_custom_target(drive2 ALL DEPENDS output-created)
+add_dependencies(drive2 drive1)
diff --git a/Tests/RunCMake/Make/CMP0113-NEW-build-gnu-stderr.txt b/Tests/RunCMake/Make/CMP0113-NEW-build-gnu-stderr.txt
new file mode 100644
index 000000000..0af354a05
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-NEW-build-gnu-stderr.txt
@@ -0,0 +1,5 @@
+No rule to make target [^
+]*output-not-created[^
+]*, needed by [^
+]*output-created[^
+]*
diff --git a/Tests/RunCMake/Make/CMP0113-NEW-build-result.txt b/Tests/RunCMake/Make/CMP0113-NEW-build-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-NEW-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/Make/CMP0113-NEW-build-stderr.txt b/Tests/RunCMake/Make/CMP0113-NEW-build-stderr.txt
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-NEW-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/Make/CMP0113-NEW-build-stdout.txt b/Tests/RunCMake/Make/CMP0113-NEW-build-stdout.txt
new file mode 100644
index 000000000..a6b851e9f
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-NEW-build-stdout.txt
@@ -0,0 +1 @@
+Generating output-not-created.*Built target drive1
diff --git a/Tests/RunCMake/Make/CMP0113-NEW.cmake b/Tests/RunCMake/Make/CMP0113-NEW.cmake
new file mode 100644
index 000000000..a2d1db53f
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0113 NEW)
+include(CMP0113-Common.cmake)
diff --git a/Tests/RunCMake/Make/CMP0113-OLD-build-stdout.txt b/Tests/RunCMake/Make/CMP0113-OLD-build-stdout.txt
new file mode 100644
index 000000000..f6e1f0f47
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-OLD-build-stdout.txt
@@ -0,0 +1 @@
+Generating output-not-created.*Built target drive1.*Generating output-not-created.*Built target drive2
diff --git a/Tests/RunCMake/Make/CMP0113-OLD.cmake b/Tests/RunCMake/Make/CMP0113-OLD.cmake
new file mode 100644
index 000000000..b6ab1203f
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0113 OLD)
+include(CMP0113-Common.cmake)
diff --git a/Tests/RunCMake/Make/CMP0113-WARN-build-stdout.txt b/Tests/RunCMake/Make/CMP0113-WARN-build-stdout.txt
new file mode 100644
index 000000000..f6e1f0f47
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-WARN-build-stdout.txt
@@ -0,0 +1 @@
+Generating output-not-created.*Built target drive1.*Generating output-not-created.*Built target drive2
diff --git a/Tests/RunCMake/Make/CMP0113-WARN.cmake b/Tests/RunCMake/Make/CMP0113-WARN.cmake
new file mode 100644
index 000000000..48e035a44
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-WARN.cmake
@@ -0,0 +1,2 @@
+# Policy CMP0113 not set.
+include(CMP0113-Common.cmake)
diff --git a/Tests/RunCMake/Make/RunCMakeTest.cmake b/Tests/RunCMake/Make/RunCMakeTest.cmake
index 6b2721c6e..5562acabd 100644
--- a/Tests/RunCMake/Make/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Make/RunCMakeTest.cmake
@@ -27,14 +27,39 @@ function(run_VerboseBuild)
run_cmake_command(VerboseBuild-build ${CMAKE_COMMAND} --build . -v --clean-first)
unset(RunCMake-stdout-file)
set(_backup_lang "$ENV{LANG}")
+ set(_backup_lc_Messages "$ENV{LC_MESSAGES}")
if(MAKE_IS_GNU)
set(RunCMake-stdout-file VerboseBuild-nowork-gnu-stdout.txt)
set(ENV{LANG} "C")
+ set(ENV{LC_MESSAGES} "C")
endif()
run_cmake_command(VerboseBuild-nowork ${CMAKE_COMMAND} --build . --verbose)
set(ENV{LANG} "${_backup_lang}")
+ set(ENV{LC_MESSAGES} "${_backup_lc_messages}")
endfunction()
run_VerboseBuild()
run_cmake(CustomCommandDepfile-ERROR)
run_cmake(IncludeRegexSubdir)
+
+function(run_CMP0113 val)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0113-${val}-build)
+ run_cmake(CMP0113-${val})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(_backup_lang "$ENV{LANG}")
+ set(_backup_lc_Messages "$ENV{LC_MESSAGES}")
+ if(MAKE_IS_GNU)
+ set(RunCMake-stderr-file CMP0113-${val}-build-gnu-stderr.txt)
+ set(ENV{LANG} "C")
+ set(ENV{LC_MESSAGES} "C")
+ endif()
+ run_cmake_command(CMP0113-${val}-build ${CMAKE_COMMAND} --build .)
+ set(ENV{LANG} "${_backup_lang}")
+ set(ENV{LC_MESSAGES} "${_backup_lc_messages}")
+endfunction()
+
+if(NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
+ run_CMP0113(WARN)
+ run_CMP0113(OLD)
+ run_CMP0113(NEW)
+endif()
diff --git a/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake
new file mode 100644
index 000000000..a4d2758bd
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake
@@ -0,0 +1,9 @@
+check_files("${RunCMake_TEST_BINARY_DIR}"
+ INCLUDE
+ ${TARGET_FILE_release_only_tool_Release}
+ ${TARGET_EXE_FILE_release_only_tool_Release}
+
+ EXCLUDE
+ ${TARGET_FILE_release_only_tool_Debug}
+ ${TARGET_EXE_FILE_release_only_tool_Debug}
+ )
diff --git a/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake
new file mode 100644
index 000000000..52f84ea92
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake
@@ -0,0 +1,12 @@
+enable_language(C)
+
+set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "")
+set(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "")
+set(CMAKE_CROSS_CONFIGS "all" CACHE STRING "")
+set(CMAKE_DEFAULT_CONFIGS "all" CACHE STRING "")
+
+add_executable(release_only_tool main.c)
+set_property(TARGET release_only_tool PROPERTY EXCLUDE_FROM_ALL "$<NOT:$<CONFIG:Release>>")
+
+include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
+generate_output_files(release_only_tool)
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index 8496d6373..6699a0990 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -284,6 +284,11 @@ run_ninja(Install default-install build.ninja install)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/install")
run_ninja(Install all-install build.ninja install:all)
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll-build)
+run_cmake_configure(ExcludeFromAll)
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+run_cmake_build(ExcludeFromAll all "" all:all)
+
# FIXME Get this working
#set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AutoMocExecutable-build)
#run_cmake_configure(AutoMocExecutable)
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
index 411cd7cb7..5c7882d68 100644
--- a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at MissingSource.cmake:1 \(add_library\):
missing.c
- Tried extensions( \.[A-Za-z+]+|
- )*
+ Tried extensions \.c \.C .*
+.*
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt b/Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt
index 65ac8e8db..44b5d30c0 100644
--- a/Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt
+++ b/Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
index 90afc127e..c3922d623 100644
--- a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
+++ b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} CXX)
# MSVC creates extra targets which pollute the stderr unless we set this.
diff --git a/Tests/RunCMake/PrecompileHeaders/PchInstantiateTemplates-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchInstantiateTemplates-check.cmake
new file mode 100644
index 000000000..81449ca62
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchInstantiateTemplates-check.cmake
@@ -0,0 +1,17 @@
+file(STRINGS ${RunCMake_TEST_BINARY_DIR}/compile_commands.json empty_dir_commands
+ REGEX "command.*-fpch-instantiate-templates.*empty.dir/cmake_pch[A-Za-z0-9_.]*.h")
+file(STRINGS ${RunCMake_TEST_BINARY_DIR}/compile_commands.json foo_dir_commands
+ REGEX "command.*-fpch-instantiate-templates.*foo.dir/cmake_pch[A-Za-z0-9_.]*.h")
+
+list(LENGTH empty_dir_commands empty_dir_commands_size)
+list(LENGTH foo_dir_commands foo_dir_commands_size)
+
+if (empty_dir_commands_size EQUAL 0)
+ set(RunCMake_TEST_FAILED "empty target should have -fpch-instantiate-templates compile option present")
+ return()
+endif()
+
+if (foo_dir_commands_size GREATER 0)
+ set(RunCMake_TEST_FAILED "foo target should not have -fpch-instantiate-templates compile option present")
+ return()
+endif()
diff --git a/Tests/RunCMake/PrecompileHeaders/PchInstantiateTemplates.cmake b/Tests/RunCMake/PrecompileHeaders/PchInstantiateTemplates.cmake
new file mode 100644
index 000000000..3aebbe0c0
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchInstantiateTemplates.cmake
@@ -0,0 +1,16 @@
+enable_language(C)
+
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+add_library(empty empty.c)
+target_precompile_headers(empty PUBLIC
+ <stdio.h>
+ <string.h>
+)
+
+add_library(foo foo.c)
+target_precompile_headers(foo PUBLIC
+ <stdio.h>
+ <string.h>
+)
+set_target_properties(foo PROPERTIES PCH_INSTANTIATE_TEMPLATES OFF)
diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
index 381b800a6..74670bafc 100644
--- a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
@@ -20,4 +20,9 @@ run_test(PchReuseFromSubdir)
run_cmake(PchMultilanguage)
if(RunCMake_GENERATOR MATCHES "Make|Ninja")
run_cmake(PchWarnInvalid)
+
+ if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND
+ CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0.0)
+ run_cmake(PchInstantiateTemplates)
+ endif()
endif()
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index cb20fb1f3..7d96e503d 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -153,7 +153,9 @@ function(run_cmake test)
"|contact PGI Sales at"
"|[^\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"
+ "|[^\n]*offset in archive not a multiple of 8"
"|[^\n]*from Time Machine by path"
"|[^\n]*Bullseye Testing Technology"
")[^\n]*\n)+"
diff --git a/Tests/RunCMake/SourceProperties/CMakeLists.txt b/Tests/RunCMake/SourceProperties/CMakeLists.txt
index a17c8cd13..e93f0b69e 100644
--- a/Tests/RunCMake/SourceProperties/CMakeLists.txt
+++ b/Tests/RunCMake/SourceProperties/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} C)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt
index aecd4d333..141d66d1e 100644
--- a/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt
+++ b/Tests/RunCMake/Syntax/CMP0053-Dollar-OLD-stderr.txt
@@ -19,6 +19,6 @@ CMake Error at CMP0053-Dollar-OLD.cmake:6 \(message\):
-->\${\$}<--
- syntax error, unexpected \$, expecting } \(7\)
+ syntax error, unexpected \$, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt
index 7448b59cc..71b9c3cbd 100644
--- a/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt
@@ -7,6 +7,6 @@
\${var\\rwith\\rcarriagereturn}
- syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt
index f5e03edb2..c43e1be97 100644
--- a/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt
@@ -7,6 +7,6 @@
\${var\\rwith\\rcarriagereturn}
- syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt
index fa16a8a5f..3a2613592 100644
--- a/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt
@@ -7,6 +7,6 @@
\${var\\ with\\ escaped\\ space}
- syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt
index 07cbf24c5..0f40649c5 100644
--- a/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt
@@ -7,6 +7,6 @@
\${var\\ with\\ escaped\\ space}
- syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt b/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt
index 5cc111b5c..77bd470fa 100644
--- a/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt
@@ -7,6 +7,6 @@
\${var\\nwith\\nnewline}
- syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt
index 0067c2f3a..1d14b1d46 100644
--- a/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt
@@ -7,6 +7,6 @@
\${var\\nwith\\nnewline}
- syntax error, unexpected cal_SYMBOL, expecting } \(7\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt b/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt
index 04bc2260a..cf6dad5d3 100644
--- a/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt
@@ -7,6 +7,6 @@
\${var
- syntax error, unexpected \$end, expecting } \(5\)
+ syntax error, unexpected \$end, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt
index 66cf9a26a..6e3744a62 100644
--- a/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt
@@ -7,6 +7,6 @@
\${var with space}
- syntax error, unexpected cal_SYMBOL, expecting } \(17\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(3\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt b/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt
index e8880965b..70e7c125b 100644
--- a/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt
@@ -7,6 +7,6 @@
\${var
- syntax error, unexpected \$end, expecting } \(5\)
+ syntax error, unexpected \$end, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt
index b02007484..e18268ac5 100644
--- a/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt
+++ b/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt
@@ -7,6 +7,6 @@
\${var with tab}
- syntax error, unexpected cal_SYMBOL, expecting } \(15\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(3\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/Syntax/ParenInENV-stderr.txt b/Tests/RunCMake/Syntax/ParenInENV-stderr.txt
index d7861e2eb..144b57c1e 100644
--- a/Tests/RunCMake/Syntax/ParenInENV-stderr.txt
+++ b/Tests/RunCMake/Syntax/ParenInENV-stderr.txt
@@ -15,6 +15,6 @@ CMake Error at ParenInENV.cmake:2 \(message\):
-->\$ENV{e
- syntax error, unexpected \$end, expecting } \(9\)
+ syntax error, unexpected \$end, expecting } \(10\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt b/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt
index 81b17174b..18ca946fd 100644
--- a/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt
+++ b/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt
@@ -7,6 +7,6 @@ CMake Error at ParenInVarName1.cmake:4 \(message\):
-->\${e\(x\)}<--
- syntax error, unexpected cal_SYMBOL, expecting } \(10\)
+ syntax error, unexpected cal_SYMBOL, expecting } \(6\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt
index 1e0ce493b..cf63dbe77 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt
@@ -7,6 +7,6 @@ CMake Error at UnterminatedBrace0.cmake:2 \(set\):
\${
- syntax error, unexpected \$end, expecting } \(2\)
+ syntax error, unexpected \$end, expecting } \(3\)
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
index 4e3c2b563..0e6f7864e 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
@@ -7,7 +7,7 @@ CMake Warning \(dev\) at UnterminatedBrace1.cmake:3 \(set\):
\${
- syntax error, unexpected \$end, expecting } \(2\)
+ syntax error, unexpected \$end, expecting } \(3\)
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/TargetObjects/CMakeLists.txt b/Tests/RunCMake/TargetObjects/CMakeLists.txt
index be9d4038d..44b5d30c0 100644
--- a/Tests/RunCMake/TargetObjects/CMakeLists.txt
+++ b/Tests/RunCMake/TargetObjects/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetPolicies/CMakeLists.txt b/Tests/RunCMake/TargetPolicies/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/TargetPolicies/CMakeLists.txt
+++ b/Tests/RunCMake/TargetPolicies/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
index 2454f25ff..b3f3a5ea7 100644
--- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
+++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
@@ -32,6 +32,8 @@
\* CMP0104
\* CMP0105
\* CMP0108
+ \* CMP0112
+ \* CMP0113
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/TargetProperties/CMakeLists.txt b/Tests/RunCMake/TargetProperties/CMakeLists.txt
index be9d4038d..44b5d30c0 100644
--- a/Tests/RunCMake/TargetProperties/CMakeLists.txt
+++ b/Tests/RunCMake/TargetProperties/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
index 90afc127e..c3922d623 100644
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} CXX)
# MSVC creates extra targets which pollute the stderr unless we set this.
diff --git a/Tests/RunCMake/TargetSources/CMakeLists.txt b/Tests/RunCMake/TargetSources/CMakeLists.txt
index f452db177..a06591c31 100644
--- a/Tests/RunCMake/TargetSources/CMakeLists.txt
+++ b/Tests/RunCMake/TargetSources/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake
index f26ec2ea5..85e658742 100644
--- a/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake
+++ b/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake
@@ -2,6 +2,6 @@ set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0_c
file(STRINGS ${unitybuild_c} unitybuild_c_strings)
string(REGEX MATCH ".*#include.*s3.c.*#include.*s1.c.*#include.*s2.c.*" matched_code ${unitybuild_c_strings})
if(NOT matched_code)
- set(RunCMake_TEST_FAILED "Generated unity file doesn't include expected oder of source files")
+ set(RunCMake_TEST_FAILED "Generated unity file doesn't include expected order of source files")
return()
endif()
diff --git a/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake b/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake
new file mode 100644
index 000000000..bcdc10105
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake
@@ -0,0 +1,25 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/iface.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_iface_h 0)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "<([A-Za-z0-9_]+) +Include=.*iface\\.h")
+ set(rule "${CMAKE_MATCH_1}")
+ if(NOT rule STREQUAL "None")
+ set(RunCMake_TEST_FAILED "iface.h referenced as ${rule} instead of None in\n ${vcProjectFile}")
+ return()
+ endif()
+ if(found_iface_h)
+ set(RunCMake_TEST_FAILED "iface.h referenced multiple times in\n ${vcProjectFile}")
+ return()
+ endif()
+ set(found_iface_h 1)
+ endif()
+endforeach()
+if(NOT found_iface_h)
+ set(RunCMake_TEST_FAILED "iface.h not referenced in\n ${vcProjectFile}")
+endif()
diff --git a/Tests/RunCMake/VS10Project/InterfaceLibSources.cmake b/Tests/RunCMake/VS10Project/InterfaceLibSources.cmake
new file mode 100644
index 000000000..3672be18c
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/InterfaceLibSources.cmake
@@ -0,0 +1 @@
+add_library(iface INTERFACE iface.h)
diff --git a/Tests/RunCMake/VS10Project/LanguageStandard-check.cmake b/Tests/RunCMake/VS10Project/LanguageStandard-check.cmake
new file mode 100644
index 000000000..85e28581b
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/LanguageStandard-check.cmake
@@ -0,0 +1,23 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_LanguageStandard_stdcpp17 0)
+set(found_LanguageStandard_C_stdc11 0)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "<LanguageStandard>stdcpp17</LanguageStandard>")
+ set(found_LanguageStandard_stdcpp17 1)
+ endif()
+ if(line MATCHES "<LanguageStandard_C>stdc11</LanguageStandard_C>")
+ set(found_LanguageStandard_C_stdc11 1)
+ endif()
+endforeach()
+if(NOT found_LanguageStandard_stdcpp17)
+ string(APPEND RunCMake_TEST_FAILED "LanguageStandard stdcpp17 not found in\n ${vcProjectFile}\n")
+endif()
+if(NOT found_LanguageStandard_C_stdc11)
+ string(APPEND RunCMake_TEST_FAILED "LanguageStandard_C stdc11 not found in\n ${vcProjectFile}\n")
+endif()
diff --git a/Tests/RunCMake/VS10Project/LanguageStandard.cmake b/Tests/RunCMake/VS10Project/LanguageStandard.cmake
new file mode 100644
index 000000000..f8b62e2e6
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/LanguageStandard.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+enable_language(CXX)
+
+add_library(foo empty.c empty.cxx)
+target_compile_features(foo PRIVATE c_std_11 cxx_std_17)
diff --git a/Tests/RunCMake/VS10Project/NoImpLib-check.cmake b/Tests/RunCMake/VS10Project/NoImpLib-check.cmake
new file mode 100644
index 000000000..50722b22e
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/NoImpLib-check.cmake
@@ -0,0 +1,23 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_ImportLibrary 0)
+set(found_TargetExt_dll 0)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "<ImportLibrary>")
+ set(found_ImportLibrary 1)
+ endif()
+ if(line MATCHES "<TargetExt[^\n]*\\.dll")
+ set(found_TargetExt_dll 1)
+ endif()
+endforeach()
+if(found_ImportLibrary)
+ string(APPEND RunCMake_TEST_FAILED "ImportLibrary incorrectly found in\n ${vcProjectFile}\n")
+endif()
+if(NOT found_TargetExt_dll)
+ string(APPEND RunCMake_TEST_FAILED "TargetExt not found in\n ${vcProjectFile}\n")
+endif()
diff --git a/Tests/RunCMake/VS10Project/NoImpLib.cmake b/Tests/RunCMake/VS10Project/NoImpLib.cmake
new file mode 100644
index 000000000..2c11eac60
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/NoImpLib.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+set(CMAKE_IMPORT_LIBRARY_SUFFIX "")
+add_library(foo SHARED empty.c)
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index 93ef60343..133dacc17 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -3,9 +3,15 @@ cmake_policy(SET CMP0057 NEW)
include(RunCMake)
cmake_policy(SET CMP0054 NEW)
+if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.27)
+ run_cmake(LanguageStandard)
+endif()
+
run_cmake(VsCsharpSourceGroup)
run_cmake(VsCSharpCompilerOpts)
run_cmake(ExplicitCMakeLists)
+run_cmake(InterfaceLibSources)
+run_cmake(NoImpLib)
run_cmake(RuntimeLibrary)
run_cmake(SourceGroupCMakeLists)
run_cmake(SourceGroupTreeCMakeLists)
diff --git a/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake b/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake
index 416220b83..0d82d3feb 100644
--- a/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake
@@ -31,6 +31,6 @@ if (NOT "${OVERRIDEN_TOOLSET}" STREQUAL "MyCustomToolset")
endif()
if ("${NORMAL_TOOLSET}" STREQUAL "MyCustomToolset")
- set(RunCMake_TEST_FAILED "Main toolset was overriden (it shouldn't)")
+ set(RunCMake_TEST_FAILED "Main toolset was overridden (it shouldn't)")
return()
endif()
diff --git a/Tests/RunCMake/VS10Project/iface.h b/Tests/RunCMake/VS10Project/iface.h
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/iface.h
diff --git a/Tests/RunCMake/VSSolution/CMakeLists.txt b/Tests/RunCMake/VSSolution/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/VSSolution/CMakeLists.txt
+++ b/Tests/RunCMake/VSSolution/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Win32GenEx/CMakeLists.txt b/Tests/RunCMake/Win32GenEx/CMakeLists.txt
new file mode 100644
index 000000000..b646c4ac6
--- /dev/null
+++ b/Tests/RunCMake/Win32GenEx/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.18)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Win32GenEx/RunCMakeTest.cmake b/Tests/RunCMake/Win32GenEx/RunCMakeTest.cmake
new file mode 100644
index 000000000..d5529b022
--- /dev/null
+++ b/Tests/RunCMake/Win32GenEx/RunCMakeTest.cmake
@@ -0,0 +1,28 @@
+include(RunCMake)
+
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Win32GenEx-build)
+ run_cmake(Win32GenEx)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(Win32GenEx-debug-build ${CMAKE_COMMAND} --build ${RunCMake_TEST_BINARY_DIR} --config Debug)
+ run_cmake_command(Win32GenEx-release-build ${CMAKE_COMMAND} --build ${RunCMake_TEST_BINARY_DIR} --config Release)
+ unset(RunCMake_TEST_NO_CLEAN)
+else()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Win32GenEx-debug-build)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+ run_cmake(Win32GenEx-debug)
+ unset(RunCMake_TEST_OPTIONS)
+
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(Win32GenEx-debug-build ${CMAKE_COMMAND} --build ${RunCMake_TEST_BINARY_DIR})
+ unset(RunCMake_TEST_NO_CLEAN)
+
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Win32GenEx-release-build)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
+ run_cmake(Win32GenEx-release)
+ unset(RunCMake_TEST_OPTIONS)
+
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(Win32GenEx-release-build ${CMAKE_COMMAND} --build ${RunCMake_TEST_BINARY_DIR})
+ unset(RunCMake_TEST_NO_CLEAN)
+endif()
diff --git a/Tests/RunCMake/Win32GenEx/Win32GenEx-debug.cmake b/Tests/RunCMake/Win32GenEx/Win32GenEx-debug.cmake
new file mode 100644
index 000000000..74c5bd8a2
--- /dev/null
+++ b/Tests/RunCMake/Win32GenEx/Win32GenEx-debug.cmake
@@ -0,0 +1 @@
+include(Win32GenEx.cmake)
diff --git a/Tests/RunCMake/Win32GenEx/Win32GenEx-release.cmake b/Tests/RunCMake/Win32GenEx/Win32GenEx-release.cmake
new file mode 100644
index 000000000..74c5bd8a2
--- /dev/null
+++ b/Tests/RunCMake/Win32GenEx/Win32GenEx-release.cmake
@@ -0,0 +1 @@
+include(Win32GenEx.cmake)
diff --git a/Tests/RunCMake/Win32GenEx/Win32GenEx.cmake b/Tests/RunCMake/Win32GenEx/Win32GenEx.cmake
new file mode 100644
index 000000000..80f8b8019
--- /dev/null
+++ b/Tests/RunCMake/Win32GenEx/Win32GenEx.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+
+add_executable(Win32GenEx main.c)
+set_target_properties(Win32GenEx PROPERTIES
+ WIN32_EXECUTABLE $<CONFIG:Release>
+ )
+target_compile_definitions(Win32GenEx PRIVATE $<$<CONFIG:Release>:USE_WIN32_MAIN>)
diff --git a/Tests/RunCMake/Win32GenEx/main.c b/Tests/RunCMake/Win32GenEx/main.c
new file mode 100644
index 000000000..1cf9f8116
--- /dev/null
+++ b/Tests/RunCMake/Win32GenEx/main.c
@@ -0,0 +1,14 @@
+#ifdef USE_WIN32_MAIN
+# include <windows.h>
+
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine, int nShowCmd)
+{
+ return 0;
+}
+#else
+int main(void)
+{
+ return 0;
+}
+#endif
diff --git a/Tests/RunCMake/XcodeProject/CMakeLists.txt b/Tests/RunCMake/XcodeProject/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/XcodeProject/CMakeLists.txt
+++ b/Tests/RunCMake/XcodeProject/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
index 288735e87..3d8fa1792 100644
--- a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
+++ b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
@@ -5,15 +5,18 @@ project(DeploymentTarget C)
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
set(CMAKE_OSX_DEPLOYMENT_TARGET "9.1")
+ set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
elseif(CMAKE_SYSTEM_NAME STREQUAL "watchOS")
set(CMAKE_OSX_DEPLOYMENT_TARGET "2.0")
+ set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
elseif(CMAKE_SYSTEM_NAME STREQUAL "tvOS")
set(CMAKE_OSX_DEPLOYMENT_TARGET "9.0")
+ set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
diff --git a/Tests/RunCMake/XcodeProject/InterfaceLibSources-check.cmake b/Tests/RunCMake/XcodeProject/InterfaceLibSources-check.cmake
new file mode 100644
index 000000000..613951a46
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/InterfaceLibSources-check.cmake
@@ -0,0 +1,16 @@
+set(xcProjectFile "${RunCMake_TEST_BINARY_DIR}/InterfaceLibSources.xcodeproj/project.pbxproj")
+if(NOT EXISTS "${xcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${xcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_iface_h 0)
+file(STRINGS "${xcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "PBXFileReference.*explicitFileType.*sourcecode\\.c\\.h.*iface\\.h")
+ set(found_iface_h 1)
+ endif()
+endforeach()
+if(NOT found_iface_h)
+ set(RunCMake_TEST_FAILED "iface.h not referenced in\n ${xcProjectFile}")
+endif()
diff --git a/Tests/RunCMake/XcodeProject/InterfaceLibSources.cmake b/Tests/RunCMake/XcodeProject/InterfaceLibSources.cmake
new file mode 100644
index 000000000..3672be18c
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/InterfaceLibSources.cmake
@@ -0,0 +1 @@
+add_library(iface INTERFACE iface.h)
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake
new file mode 100644
index 000000000..7abc58bf4
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake
@@ -0,0 +1,132 @@
+enable_language(C)
+
+set(prototypes [[
+#include <stdio.h>
+#include <zlib.h>
+#include <resolv.h>
+int func1();
+int func2();
+int func3();
+int func4();
+int func5();
+int func6();
+int func7();
+]])
+set(prototypes_objc [[
+#import <CoreFoundation/CoreFoundation.h>
+]])
+set(impl [[
+{
+ printf("%p %p\n", compress, res_close);
+ return func1() + func2() + func3() + func4() + func5() + func6() + func7();
+}
+]])
+set(impl_objc [[
+{
+ CFStringRef cfStr = CFSTR("This is a string");
+ printf("%p %p %ld\n", compress, res_close, (long)CFStringGetLength(cfStr));
+ return func1() + func2() + func3() + func4() + func5() + func6() + func7();
+}
+]])
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/mainOuter.m
+ "${prototypes}\n${prototypes_objc}\nint main(int argc, char** argv) ${impl_objc}"
+)
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/funcOuter.c
+ "${prototypes}\nint funcOuter() ${impl}"
+)
+
+foreach(i RANGE 1 5)
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/func${i}.c
+ "int func${i}() { return 32 + ${i}; }\n"
+ )
+endforeach()
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/CMakeLists.txt
+[[
+cmake_minimum_required(VERSION 3.18)
+project(ExternalFrameworks)
+add_library(staticFrameworkExt STATIC func6.c)
+add_library(sharedFrameworkExt SHARED func7.c)
+set_target_properties(staticFrameworkExt PROPERTIES FRAMEWORK TRUE)
+set_target_properties(sharedFrameworkExt PROPERTIES FRAMEWORK TRUE)
+]]
+)
+
+foreach(i RANGE 6 7)
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/func${i}.c
+ "int func${i}() { return 32 + ${i}; }\n"
+ )
+endforeach()
+
+add_custom_target(prebuildDependencies ALL
+ COMMAND ${CMAKE_COMMAND} -S ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks -B ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build -G Xcode
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build --target staticFrameworkExt sharedFrameworkExt --config Debug
+)
+add_executable(app1 mainOuter.m)
+add_library(static1 STATIC funcOuter.c)
+add_library(shared1 SHARED funcOuter.c)
+add_library(module1 MODULE funcOuter.c)
+add_library(obj1 OBJECT funcOuter.c)
+add_library(staticFramework1 STATIC funcOuter.c)
+add_library(sharedFramework1 SHARED funcOuter.c)
+set_target_properties(staticFramework1 PROPERTIES FRAMEWORK TRUE)
+set_target_properties(sharedFramework1 PROPERTIES FRAMEWORK TRUE)
+add_dependencies(app1 prebuildDependencies)
+add_dependencies(static1 prebuildDependencies)
+add_dependencies(shared1 prebuildDependencies)
+add_dependencies(module1 prebuildDependencies)
+add_dependencies(obj1 prebuildDependencies)
+add_dependencies(staticFramework1 prebuildDependencies)
+add_dependencies(sharedFramework1 prebuildDependencies)
+
+add_library(static2 STATIC func1.c)
+add_library(shared2 SHARED func2.c)
+add_library(obj2 OBJECT func3.c)
+add_library(staticFramework2 STATIC func4.c)
+add_library(sharedFramework2 SHARED func5.c)
+set_target_properties(staticFramework2 PROPERTIES FRAMEWORK TRUE)
+set_target_properties(sharedFramework2 PROPERTIES FRAMEWORK TRUE)
+
+# Pick some external libraries that are always present in the Xcode SDK
+find_library(libz z REQUIRED)
+find_library(libresolv resolv REQUIRED)
+find_library(CoreFoundation CoreFoundation REQUIRED)
+add_library(imported2 UNKNOWN IMPORTED)
+set_target_properties(imported2 PROPERTIES IMPORTED_LOCATION ${libz})
+
+# Save these for the check script to use
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/foundLibs.cmake "
+set(libz \"${libz}\")
+set(libresolv \"${libresolv}\")
+set(CoreFoundation \"${CoreFoundation}\")
+")
+
+set(mainTargets
+ app1
+ static1
+ shared1
+ module1
+ obj1
+ staticFramework1
+ sharedFramework1
+)
+set(linkToThings
+ static2
+ shared2
+ obj2
+ staticFramework2
+ sharedFramework2
+ imported2
+ ${libresolv}
+ ${CoreFoundation}
+ "${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build/Debug/sharedFrameworkExt.framework"
+ "${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build/Debug/staticFrameworkExt.framework"
+)
+
+foreach(mainTarget IN LISTS mainTargets)
+ foreach(linkTo IN LISTS linkToThings)
+ target_link_libraries(${mainTarget} PRIVATE ${linkTo})
+ endforeach()
+endforeach()
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_BUILT_ONLY-check.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_BUILT_ONLY-check.cmake
new file mode 100644
index 000000000..d07a25be0
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_BUILT_ONLY-check.cmake
@@ -0,0 +1,19 @@
+include(${RunCMake_TEST_SOURCE_DIR}/LinkBinariesBuildPhase_Funcs.cmake)
+include(${RunCMake_TEST_BINARY_DIR}/foundLibs.cmake)
+
+# obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path
+# ${libz} --> This is for imported2
+
+foreach(mainTarget IN ITEMS app1 shared1 module1 sharedFramework1)
+ checkFlags(OTHER_LDFLAGS ${mainTarget}
+ "obj2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
+ "static2;shared2;staticFramework2;sharedFramework2"
+ )
+endforeach()
+
+foreach(mainTarget IN ITEMS static1 staticFramework1)
+ checkFlags(OTHER_LIBTOOLFLAGS ${mainTarget}
+ "obj2"
+ "static2;shared2;staticFramework2;sharedFramework2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
+ )
+endforeach()
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_BUILT_ONLY.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_BUILT_ONLY.cmake
new file mode 100644
index 000000000..f9dd6430f
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_BUILT_ONLY.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/LinkBinariesBuildPhase.cmake)
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake
new file mode 100644
index 000000000..e72bf4dc9
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake
@@ -0,0 +1,57 @@
+cmake_minimum_required(VERSION 3.18...3.19)
+
+macro(returnOnError errorMsg)
+ if(NOT "${errorMsg}" STREQUAL "")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}\n${errorMsg}" PARENT_SCOPE)
+ return()
+ endif()
+endmacro()
+
+function(getTargetFlags mainTarget projFlagsVar flagsVar errorVar)
+ # The flags variables in the project file might span over multiple lines
+ # so we can't easily read the flags directly from there. Instead, we use
+ # the xcodebuild -showBuildSettings option to report it on a single line.
+ execute_process(
+ COMMAND ${CMAKE_COMMAND}
+ --build ${RunCMake_TEST_BINARY_DIR}
+ --target ${mainTarget}
+ --config Debug
+ --
+ -showBuildSettings
+ COMMAND grep ${projFlagsVar}
+ OUTPUT_VARIABLE flagsContents
+ RESULT_VARIABLE result
+ )
+
+ if(result)
+ set(${errorVar} "Failed to get flags for ${mainTarget}: ${result}" PARENT_SCOPE)
+ else()
+ unset(${errorVar} PARENT_SCOPE)
+ endif()
+ set(${flagsVar} "${flagsContents}" PARENT_SCOPE)
+endfunction()
+
+function(checkFlags projFlagsVar mainTarget present absent)
+ getTargetFlags(${mainTarget} ${projFlagsVar} flags errorMsg)
+ returnOnError("${errorMsg}")
+
+ foreach(linkTo IN LISTS present)
+ string(REGEX MATCH "${linkTo}" result "${flags}")
+ if("${result}" STREQUAL "")
+ string(APPEND RunCMake_TEST_FAILED
+ "\n${mainTarget} ${projFlagsVar} is missing ${linkTo}"
+ )
+ endif()
+ endforeach()
+
+ foreach(linkTo IN LISTS absent)
+ string(REGEX MATCH "${linkTo}" result "${flags}")
+ if(NOT "${result}" STREQUAL "")
+ string(APPEND RunCMake_TEST_FAILED
+ "\n${mainTarget} ${projFlagsVar} unexpectedly contains ${linkTo}"
+ )
+ endif()
+ endforeach()
+
+ set(RunCMake_TEST_FAILED ${RunCMake_TEST_FAILED} PARENT_SCOPE)
+endfunction()
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID-result.txt b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID-stderr.txt b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID-stderr.txt
new file mode 100644
index 000000000..066430434
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID-stderr.txt
@@ -0,0 +1 @@
+CMake Error: Invalid value for XCODE_LINK_BUILD_PHASE_MODE: INVALID
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID.cmake
new file mode 100644
index 000000000..0a20d204a
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_INVALID.cmake
@@ -0,0 +1,4 @@
+enable_language(CXX)
+
+add_executable(app main.cpp)
+set_target_properties(app PROPERTIES XCODE_LINK_BUILD_PHASE_MODE INVALID)
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_KNOWN_LOCATION-check.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_KNOWN_LOCATION-check.cmake
new file mode 100644
index 000000000..e1484e790
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_KNOWN_LOCATION-check.cmake
@@ -0,0 +1,19 @@
+include(${RunCMake_TEST_SOURCE_DIR}/LinkBinariesBuildPhase_Funcs.cmake)
+include(${RunCMake_TEST_BINARY_DIR}/foundLibs.cmake)
+
+# obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path
+# ${libz} --> This is for imported2
+
+foreach(mainTarget IN ITEMS app1 shared1 module1 sharedFramework1)
+ checkFlags(OTHER_LDFLAGS ${mainTarget}
+ "obj2"
+ "static2;shared2;staticFramework2;sharedFramework2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
+ )
+endforeach()
+
+foreach(mainTarget IN ITEMS static1 staticFramework1)
+ checkFlags(OTHER_LIBTOOLFLAGS ${mainTarget}
+ "obj2"
+ "static2;shared2;staticFramework2;sharedFramework2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
+ )
+endforeach()
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_KNOWN_LOCATION.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_KNOWN_LOCATION.cmake
new file mode 100644
index 000000000..f9dd6430f
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_KNOWN_LOCATION.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/LinkBinariesBuildPhase.cmake)
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake
new file mode 100644
index 000000000..260167607
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake
@@ -0,0 +1,19 @@
+include(${RunCMake_TEST_SOURCE_DIR}/LinkBinariesBuildPhase_Funcs.cmake)
+include(${RunCMake_TEST_BINARY_DIR}/foundLibs.cmake)
+
+# obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path
+# ${libz} --> This is for imported2
+
+foreach(mainTarget IN ITEMS app1 shared1 module1 sharedFramework1)
+ checkFlags(OTHER_LDFLAGS ${mainTarget}
+ "static2;shared2;staticFramework2;sharedFramework2;obj2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
+ ""
+ )
+endforeach()
+
+foreach(mainTarget IN ITEMS static1 staticFramework1)
+ checkFlags(OTHER_LIBTOOLFLAGS ${mainTarget}
+ "obj2"
+ "static2;shared2;staticFramework2;sharedFramework2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
+ )
+endforeach()
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE.cmake
new file mode 100644
index 000000000..f9dd6430f
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/LinkBinariesBuildPhase.cmake)
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 342dbbcdc..62163acd8 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -2,6 +2,7 @@ include(RunCMake)
run_cmake(ExplicitCMakeLists)
run_cmake(ImplicitCMakeLists)
+run_cmake(InterfaceLibSources)
run_cmake(XcodeFileType)
run_cmake(XcodeAttributeLocation)
@@ -9,6 +10,10 @@ run_cmake(XcodeAttributeGenex)
run_cmake(XcodeAttributeGenexError)
run_cmake(XcodeGenerateTopLevelProjectOnly)
+if(XCODE_VERSION VERSION_GREATER_EQUAL 12)
+ run_cmake(XcodeDuplicateCustomCommand)
+endif()
+
function(XcodeGenerateTopLevelProjectOnlyWithObjectLibrary)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeGenerateTopLevelProjectOnlyWithObjectLibrary-build)
run_cmake(XcodeGenerateTopLevelProjectOnlyWithObjectLibrary)
@@ -18,6 +23,19 @@ endfunction()
XcodeGenerateTopLevelProjectOnlyWithObjectLibrary()
+function(LinkBinariesBuildPhase mode)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/LinkBinariesBuildPhase_${mode}-build)
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_XCODE_LINK_BUILD_PHASE_MODE=${mode}")
+ run_cmake(LinkBinariesBuildPhase_${mode})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(LinkBinariesBuildPhase_${mode}-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+LinkBinariesBuildPhase(NONE)
+LinkBinariesBuildPhase(BUILT_ONLY)
+LinkBinariesBuildPhase(KNOWN_LOCATION)
+run_cmake(LinkBinariesBuildPhase_INVALID)
+
run_cmake(XcodeObjectNeedsEscape)
run_cmake(XcodeObjectNeedsQuote)
run_cmake(XcodeOptimizationFlags)
@@ -119,8 +137,8 @@ if(NOT XCODE_VERSION VERSION_LESS 5)
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install)
+ run_cmake_command(XcodeBundles-build-macOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-macOS ${CMAKE_COMMAND} --build . --target install)
unset(RunCMake_TEST_BINARY_DIR)
unset(RunCMake_TEST_NO_CLEAN)
@@ -136,8 +154,8 @@ if(NOT XCODE_VERSION VERSION_LESS 5)
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install)
+ run_cmake_command(XcodeBundles-build-iOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-iOS ${CMAKE_COMMAND} --build . --target install)
unset(RunCMake_TEST_BINARY_DIR)
unset(RunCMake_TEST_NO_CLEAN)
@@ -155,8 +173,8 @@ if(NOT XCODE_VERSION VERSION_LESS 7)
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install)
+ run_cmake_command(XcodeBundles-build-watchOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-watchOS ${CMAKE_COMMAND} --build . --target install)
unset(RunCMake_TEST_BINARY_DIR)
unset(RunCMake_TEST_NO_CLEAN)
@@ -174,8 +192,8 @@ if(NOT XCODE_VERSION VERSION_LESS 7.1)
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install)
+ run_cmake_command(XcodeBundles-build-tvOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-tvOS ${CMAKE_COMMAND} --build . --target install)
unset(RunCMake_TEST_BINARY_DIR)
unset(RunCMake_TEST_NO_CLEAN)
@@ -188,7 +206,7 @@ if(NOT XCODE_VERSION VERSION_LESS 7)
unset(RunCMake_TEST_OPTIONS)
endif()
-if(NOT XCODE_VERSION VERSION_LESS 6)
+if(XCODE_VERSION VERSION_GREATER_EQUAL 6 AND XCODE_VERSION VERSION_LESS 12)
# XcodeIOSInstallCombined
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build)
set(RunCMake_TEST_NO_CLEAN 1)
@@ -309,10 +327,10 @@ endif()
if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
function(XcodeRemoveExcessiveISystemSDK SDK)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeRemoveExcessiveISystemSDK-${SDK}-build)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS")
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=${SDK}")
run_cmake(XcodeRemoveExcessiveISystem)
set(RunCMake_TEST_NO_CLEAN 1)
- run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build . -- -sdk ${SDK})
+ run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build .)
endfunction()
XcodeRemoveExcessiveISystemSDK(iphoneos)
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
index 8c0b470c2..bc14874ad 100644
--- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
@@ -4,12 +4,14 @@ cmake_minimum_required(VERSION 3.3)
enable_language(C)
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "watchOS")
+ set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
diff --git a/Tests/RunCMake/XcodeProject/XcodeDependOnZeroCheck-build-stdout.txt b/Tests/RunCMake/XcodeProject/XcodeDependOnZeroCheck-build-stdout.txt
index 92c9a2948..402f9d54d 100644
--- a/Tests/RunCMake/XcodeProject/XcodeDependOnZeroCheck-build-stdout.txt
+++ b/Tests/RunCMake/XcodeProject/XcodeDependOnZeroCheck-build-stdout.txt
@@ -1 +1,3 @@
-BUILD AGGREGATE TARGET ZERO_CHECK
+BUILD AGGREGATE TARGET ZERO_CHECK|PhaseScriptExecution [^
+]*/ZERO_CHECK.build/Script-[^
+]*in target 'ZERO_CHECK' from project 'XcodeDependOnZeroCheck'
diff --git a/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-result.txt b/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-stderr.txt b/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-stderr.txt
new file mode 100644
index 000000000..02af7835a
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-stderr.txt
@@ -0,0 +1,13 @@
+^CMake Error in CMakeLists.txt:
+ The custom command generating
+
+ [^
+]*/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand-build/out.txt
+
+ is attached to multiple targets:
+
+ drive[0-9]
+ drive[0-9]
+
+ but none of these is a common dependency of the other\(s\). This is not
+ allowed by the Xcode "new build system".
diff --git a/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand.cmake b/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand.cmake
new file mode 100644
index 000000000..3ef13122c
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeDuplicateCustomCommand.cmake
@@ -0,0 +1,3 @@
+add_custom_command(OUTPUT out.txt COMMAND false)
+add_custom_target(drive1 DEPENDS out.txt)
+add_custom_target(drive2 DEPENDS out.txt)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
index c2210332e..19f8e2fb4 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
@@ -10,6 +10,7 @@ if(NOT IOS)
message(FATAL_ERROR "IOS variable is not set")
endif()
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf")
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
index 172f2e85e..7d14d195f 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
@@ -6,6 +6,7 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 9)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10)
endif()
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf")
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
index 038a89057..974ae47eb 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
@@ -6,6 +6,7 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 9)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10)
endif()
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf")
diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
index ab31387cd..75da7b1c4 100644
--- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.5)
+cmake_minimum_required(VERSION 3.3)
project(XcodeInstallIOS)
diff --git a/Tests/RunCMake/XcodeProject/iface.h b/Tests/RunCMake/XcodeProject/iface.h
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/iface.h
diff --git a/Tests/RunCMake/XcodeProject/main.cpp b/Tests/RunCMake/XcodeProject/main.cpp
index c94753f84..f8b643afb 100644
--- a/Tests/RunCMake/XcodeProject/main.cpp
+++ b/Tests/RunCMake/XcodeProject/main.cpp
@@ -1,4 +1,4 @@
-int main(int argc, const char* argv[])
+int main()
{
return 0;
}
diff --git a/Tests/RunCMake/XcodeProject/main.m b/Tests/RunCMake/XcodeProject/main.m
index 6dc190ad8..3e70e5079 100644
--- a/Tests/RunCMake/XcodeProject/main.m
+++ b/Tests/RunCMake/XcodeProject/main.m
@@ -1,3 +1,3 @@
-int main(int argc, const char * argv[]) {
+int main(void) {
return 1;
}
diff --git a/Tests/RunCMake/add_dependencies/CMakeLists.txt b/Tests/RunCMake/add_dependencies/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/add_dependencies/CMakeLists.txt
+++ b/Tests/RunCMake/add_dependencies/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-AlphaNumeric.cmake b/Tests/RunCMake/add_test/CMP0110-Common-AlphaNumeric.cmake
new file mode 100644
index 000000000..c2ab433d8
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-AlphaNumeric.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "abcdefghijklmnopqrstuvwxyz0123456789")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-BracketArgument.cmake b/Tests/RunCMake/add_test/CMP0110-Common-BracketArgument.cmake
new file mode 100644
index 000000000..77cd3eb1e
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-BracketArgument.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "[=[InBracketBeforeSemi;InBracketAfterSemi]=]")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-EscapedSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-Common-EscapedSpecialChars.cmake
new file mode 100644
index 000000000..268b622e6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-EscapedSpecialChars.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME \(\)\ \# )
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-FormerInvalidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-Common-FormerInvalidSpecialChars.cmake
new file mode 100644
index 000000000..65bca1052
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-FormerInvalidSpecialChars.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "$[] #;\t\n\"\\")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-LeadingAndTrailingWhitespace.cmake b/Tests/RunCMake/add_test/CMP0110-Common-LeadingAndTrailingWhitespace.cmake
new file mode 100644
index 000000000..ec90e134a
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-LeadingAndTrailingWhitespace.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME " SurroundedByWhitespace ")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-OtherSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-Common-OtherSpecialChars.cmake
new file mode 100644
index 000000000..f74c3b5dc
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-OtherSpecialChars.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "!§%&/ü:*😤~")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-Quote.cmake b/Tests/RunCMake/add_test/CMP0110-Common-Quote.cmake
new file mode 100644
index 000000000..a1ddb66b7
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-Quote.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "BeforeQuote\"\"AfterEscapedQuote")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-Semicolon.cmake b/Tests/RunCMake/add_test/CMP0110-Common-Semicolon.cmake
new file mode 100644
index 000000000..11fd4fbfa
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-Semicolon.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "BeforeSemi;AfterSemi")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-Space.cmake b/Tests/RunCMake/add_test/CMP0110-Common-Space.cmake
new file mode 100644
index 000000000..38dd28e54
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-Space.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "BeforeSpace AfterSpace")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-ValidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-Common-ValidSpecialChars.cmake
new file mode 100644
index 000000000..bfd082b98
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-ValidSpecialChars.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "abc_.+-012")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common.cmake b/Tests/RunCMake/add_test/CMP0110-Common.cmake
new file mode 100644
index 000000000..915d17164
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common.cmake
@@ -0,0 +1,9 @@
+include(CTest)
+add_test(
+ NAME "${TEST_NAME}"
+ COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/CMP0110-Test.cmake"
+)
+set_property(
+ TEST "${TEST_NAME}"
+ PROPERTY ENVIRONMENT CMAKE_add_test_ENVVAR=1
+)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric-ctest-stdout.txt
new file mode 100644
index 000000000..ed939bf40
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric.cmake
new file mode 100644
index 000000000..7ea704213
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-AlphaNumeric.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument-ctest-stdout.txt
new file mode 100644
index 000000000..7364d5634
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \[=\[InBracketBeforeSemi;InBracketAfterSemi\]=\] \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument.cmake
new file mode 100644
index 000000000..baef07c32
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-BracketArgument.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..80435b619
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars.cmake
new file mode 100644
index 000000000..c9b06bd6c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-EscapedSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..5ad8694c8
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$\[\] .+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars.cmake
new file mode 100644
index 000000000..86ddf14f5
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-FormerInvalidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialCharsMC.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialCharsMC.cmake
new file mode 100644
index 000000000..f9b556a72
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialCharsMC.cmake
@@ -0,0 +1 @@
+include(CMP0110-NEW-FormerInvalidSpecialChars.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-GeneratorExpressionSyntax.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-GeneratorExpressionSyntax.cmake
new file mode 100644
index 000000000..079053699
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-GeneratorExpressionSyntax.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-GeneratorExpressionSyntax.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace-ctest-stdout.txt
new file mode 100644
index 000000000..78379cd1b
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: [ ]SurroundedByWhitespace[ ] \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace.cmake
new file mode 100644
index 000000000..2d636a87a
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-LeadingAndTrailingWhitespace.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..8ee3ea9c2
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars.cmake
new file mode 100644
index 000000000..d77a6ce76
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-OtherSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-Quote-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-Quote-ctest-stdout.txt
new file mode 100644
index 000000000..23dafd459
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-Quote-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeQuote""AfterEscapedQuote \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-Quote.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-Quote.cmake
new file mode 100644
index 000000000..2e7a6e162
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-Quote.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-Quote.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-Semicolon.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-Semicolon.cmake
new file mode 100644
index 000000000..1c6e1b147
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-Semicolon.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-Semicolon.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-Space.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-Space.cmake
new file mode 100644
index 000000000..38afb8524
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-Space.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-Space.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..ae1a0b112
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars.cmake
new file mode 100644
index 000000000..62bb6384a
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-ValidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-ctest-stdout.txt
new file mode 100644
index 000000000..ed939bf40
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric.cmake
new file mode 100644
index 000000000..bf4e82b2b
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-AlphaNumeric.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-ctest-stdout.txt
new file mode 100644
index 000000000..093f5d426
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: InBracketBeforeSemi;InBracketAfterSemi \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument.cmake
new file mode 100644
index 000000000..05dfeb49e
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-BracketArgument.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-stderr.txt
new file mode 100644
index 000000000..296e4262b
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at CTestTestfile.cmake:[0-9]+:
+ Parse error\. Function missing ending "\)"\. End of file reached\.
+
+
+Errors while running CTest
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars.cmake
new file mode 100644
index 000000000..1f0c99f9a
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-EscapedSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-result.txt
new file mode 100644
index 000000000..45a4fb75d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stderr.txt
new file mode 100644
index 000000000..c656b4c7f
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable:
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..d3b0fac31
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$\[\] \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars.cmake
new file mode 100644
index 000000000..883c5b6e1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-FormerInvalidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-stderr.txt
new file mode 100644
index 000000000..06ad9270d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error at CTestTestfile.cmake:[0-9]+:
+ Parse error. Function missing ending "\)". Instead found unterminated
+ string with text "\\ NOT_AVAILABLE\)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake
new file mode 100644
index 000000000..47e03bc86
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake
@@ -0,0 +1 @@
+include(CMP0110-OLD-FormerInvalidSpecialChars.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-GeneratorExpressionSyntax.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-GeneratorExpressionSyntax.cmake
new file mode 100644
index 000000000..7ee6b5061
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-GeneratorExpressionSyntax.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-GeneratorExpressionSyntax.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-ctest-stdout.txt
new file mode 100644
index 000000000..870483ea6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: SurroundedByWhitespace \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace.cmake
new file mode 100644
index 000000000..a20d21153
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-LeadingAndTrailingWhitespace.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..8ee3ea9c2
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars.cmake
new file mode 100644
index 000000000..0e88183e0
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-OtherSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Quote-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Quote-ctest-stdout.txt
new file mode 100644
index 000000000..23dafd459
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Quote-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeQuote""AfterEscapedQuote \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Quote.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-Quote.cmake
new file mode 100644
index 000000000..c910a7cc9
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Quote.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-Quote.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-result.txt
new file mode 100644
index 000000000..45a4fb75d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stderr.txt
new file mode 100644
index 000000000..0d4376889
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: AfterSemi
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stdout.txt
new file mode 100644
index 000000000..0a6ebedb3
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeSemi \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon.cmake
new file mode 100644
index 000000000..283aeed81
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-Semicolon.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-result.txt
new file mode 100644
index 000000000..45a4fb75d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stderr.txt
new file mode 100644
index 000000000..2ded1d442
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: AfterSpace
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stdout.txt
new file mode 100644
index 000000000..059c62557
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeSpace \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-Space.cmake
new file mode 100644
index 000000000..46f7c26fd
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-Space.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..ae1a0b112
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars.cmake
new file mode 100644
index 000000000..ffc6462f4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-ValidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Test.cmake b/Tests/RunCMake/add_test/CMP0110-Test.cmake
new file mode 100644
index 000000000..3f1dfade3
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Test.cmake
@@ -0,0 +1,3 @@
+if(NOT DEFINED ENV{CMAKE_add_test_ENVVAR})
+ message(FATAL_ERROR "Setting property on test did not succeed!")
+endif()
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric-ctest-stdout.txt
new file mode 100644
index 000000000..ed939bf40
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric.cmake
new file mode 100644
index 000000000..d2af2aa0a
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-AlphaNumeric.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-ctest-stdout.txt
new file mode 100644
index 000000000..093f5d426
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: InBracketBeforeSemi;InBracketAfterSemi \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-stderr.txt
new file mode 100644
index 000000000..19e60c1ed
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `\[=\[InBracketBeforeSemi;InBracketAfterSemi\]=\]´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument.cmake
new file mode 100644
index 000000000..7887658e0
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-BracketArgument.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-stderr.txt
new file mode 100644
index 000000000..296e4262b
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at CTestTestfile.cmake:[0-9]+:
+ Parse error\. Function missing ending "\)"\. End of file reached\.
+
+
+Errors while running CTest
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-stderr.txt
new file mode 100644
index 000000000..057f2d666
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `\(\) #´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars.cmake
new file mode 100644
index 000000000..ca2746267
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-EscapedSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-result.txt
new file mode 100644
index 000000000..45a4fb75d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stderr.txt
new file mode 100644
index 000000000..c656b4c7f
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable:
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..d3b0fac31
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$\[\] \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-stderr.txt
new file mode 100644
index 000000000..4f20ab9ef
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-stderr.txt
@@ -0,0 +1,13 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `\$\[\] #;[ ]
+
+ "\\´
+
+This warning is for project developers\. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars.cmake
new file mode 100644
index 000000000..3b689c2b3
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-FormerInvalidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-result.txt
new file mode 100644
index 000000000..d197c913c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-stderr.txt
new file mode 100644
index 000000000..06ad9270d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error at CTestTestfile.cmake:[0-9]+:
+ Parse error. Function missing ending "\)". Instead found unterminated
+ string with text "\\ NOT_AVAILABLE\)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-stderr.txt
new file mode 100644
index 000000000..4f20ab9ef
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-stderr.txt
@@ -0,0 +1,13 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `\$\[\] #;[ ]
+
+ "\\´
+
+This warning is for project developers\. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC.cmake
new file mode 100644
index 000000000..f77ff5c85
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC.cmake
@@ -0,0 +1 @@
+include(CMP0110-WARN-FormerInvalidSpecialChars.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-GeneratorExpressionSyntax.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-GeneratorExpressionSyntax.cmake
new file mode 100644
index 000000000..77c9ed237
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-GeneratorExpressionSyntax.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-GeneratorExpressionSyntax.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-ctest-stdout.txt
new file mode 100644
index 000000000..870483ea6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: SurroundedByWhitespace \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-stderr.txt
new file mode 100644
index 000000000..a392fed78
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ ` SurroundedByWhitespace ´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace.cmake
new file mode 100644
index 000000000..322bb4a99
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-LeadingAndTrailingWhitespace.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..8ee3ea9c2
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars.cmake
new file mode 100644
index 000000000..19fa6e633
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-OtherSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Quote-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Quote-ctest-stdout.txt
new file mode 100644
index 000000000..23dafd459
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Quote-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeQuote""AfterEscapedQuote \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Quote-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Quote-stderr.txt
new file mode 100644
index 000000000..39f3a925b
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Quote-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `BeforeQuote""AfterEscapedQuote´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Quote.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-Quote.cmake
new file mode 100644
index 000000000..33aaad0b4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Quote.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-Quote.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-result.txt
new file mode 100644
index 000000000..45a4fb75d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stderr.txt
new file mode 100644
index 000000000..0d4376889
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: AfterSemi
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stdout.txt
new file mode 100644
index 000000000..0a6ebedb3
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeSemi \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-stderr.txt
new file mode 100644
index 000000000..5101618bb
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `BeforeSemi;AfterSemi´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon.cmake
new file mode 100644
index 000000000..c5da394f6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-Semicolon.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-result.txt
new file mode 100644
index 000000000..45a4fb75d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stderr.txt
new file mode 100644
index 000000000..2ded1d442
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: AfterSpace
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stdout.txt
new file mode 100644
index 000000000..059c62557
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeSpace \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Space-stderr.txt
new file mode 100644
index 000000000..862eaa209
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `BeforeSpace AfterSpace´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-Space.cmake
new file mode 100644
index 000000000..1f3234c65
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-Space.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars-ctest-stdout.txt
new file mode 100644
index 000000000..ae1a0b112
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars.cmake
new file mode 100644
index 000000000..687c89940
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-ValidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMakeLists.txt b/Tests/RunCMake/add_test/CMakeLists.txt
new file mode 100644
index 000000000..ee8fc2969
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.18)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/add_test/RunCMakeTest.cmake b/Tests/RunCMake/add_test/RunCMakeTest.cmake
new file mode 100644
index 000000000..bf6cbff65
--- /dev/null
+++ b/Tests/RunCMake/add_test/RunCMakeTest.cmake
@@ -0,0 +1,35 @@
+include(RunCMake)
+
+set(ENV{CTEST_OUTPUT_ON_FAILURE} 1)
+
+function(run_case CASE_NAME)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0110-${CASE_NAME}-build)
+ run_cmake(CMP0110-${CASE_NAME})
+ # Run ctest on the generated CTestTestfile.cmake.
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(CMP0110-${CASE_NAME}-ctest ${CMAKE_CTEST_COMMAND} -C Debug)
+endfunction()
+
+set(cases
+ AlphaNumeric
+ ValidSpecialChars
+ OtherSpecialChars
+ EscapedSpecialChars
+ Space
+ LeadingAndTrailingWhitespace
+ Semicolon
+ Quote
+ BracketArgument
+ )
+
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ list(APPEND cases FormerInvalidSpecialCharsMC)
+else()
+ list(APPEND cases FormerInvalidSpecialChars)
+endif()
+
+foreach(case IN LISTS cases)
+ run_case(WARN-${case})
+ run_case(OLD-${case})
+ run_case(NEW-${case})
+endforeach()
diff --git a/Tests/RunCMake/alias_targets/CMakeLists.txt b/Tests/RunCMake/alias_targets/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/alias_targets/CMakeLists.txt
+++ b/Tests/RunCMake/alias_targets/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/alias_targets/invalid-name.cmake b/Tests/RunCMake/alias_targets/invalid-name.cmake
index bbd39e3b6..01983e54f 100644
--- a/Tests/RunCMake/alias_targets/invalid-name.cmake
+++ b/Tests/RunCMake/alias_targets/invalid-name.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.12)
enable_language(CXX)
add_library(foo empty.cpp)
diff --git a/Tests/RunCMake/build_command/CMakeLists.txt b/Tests/RunCMake/build_command/CMakeLists.txt
index 73e6a785a..f1a83e8c4 100644
--- a/Tests/RunCMake/build_command/CMakeLists.txt
+++ b/Tests/RunCMake/build_command/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
if(NOT NoProject)
project(${RunCMake_TEST} NONE)
endif()
diff --git a/Tests/RunCMake/cmake_language/CallInvalidCommand.cmake b/Tests/RunCMake/cmake_language/CallInvalidCommand.cmake
deleted file mode 100644
index 8bee6f264..000000000
--- a/Tests/RunCMake/cmake_language/CallInvalidCommand.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-
-cmake_language(CALL ${COMMAND})
diff --git a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake
index 5fb93c8d8..6480b2e0c 100644
--- a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake
@@ -2,7 +2,16 @@ include(RunCMake)
run_cmake(no_parameters)
run_cmake(unknown_meta_operation)
-run_cmake(call_invalid_command)
+foreach(command IN ITEMS
+ "function" "ENDFUNCTION"
+ "macro" "endMACRO"
+ "if" "elseif" "else" "endif"
+ "while" "endwhile"
+ "foreach" "endforeach"
+ )
+ message(STATUS "Running call_invalid_command for ${command}...")
+ run_cmake_with_options(call_invalid_command -Dcommand=${command})
+endforeach()
run_cmake(call_valid_command)
run_cmake(call_double_evaluation)
run_cmake(call_expanded_command)
@@ -23,3 +32,53 @@ run_cmake(eval_message_fatal_error)
run_cmake(eval_no_code)
run_cmake(eval_no_parameters)
run_cmake(eval_variable_outside_message)
+run_cmake(defer_call)
+run_cmake(defer_call_add_subdirectory)
+run_cmake(defer_call_enable_language)
+run_cmake(defer_call_ids)
+foreach(command IN ITEMS
+ "function" "endfunction"
+ "macro" "endmacro"
+ "if" "elseif" "else" "endif"
+ "while" "endwhile"
+ "foreach" "endforeach"
+ "return"
+ )
+ message(STATUS "Running defer_call_invalid_command for ${command}...")
+ run_cmake_with_options(defer_call_invalid_command -Dcommand=${command})
+endforeach()
+run_cmake(defer_call_invalid_directory)
+run_cmake(defer_call_error)
+run_cmake(defer_call_missing_directory)
+run_cmake(defer_call_policy_PUSH)
+run_cmake(defer_call_syntax_error)
+run_cmake_with_options(defer_call_trace --trace-expand)
+run_cmake_with_options(defer_call_trace_json --trace --trace-format=json-v1)
+run_cmake(defer_cancel_call_unknown_argument)
+run_cmake(defer_cancel_call_invalid_directory)
+run_cmake(defer_cancel_call_id)
+run_cmake(defer_cancel_call_id_var)
+run_cmake(defer_directory_empty)
+run_cmake(defer_directory_missing)
+run_cmake(defer_directory_multiple)
+run_cmake(defer_id_empty)
+run_cmake(defer_id_missing)
+run_cmake(defer_id_multiple)
+run_cmake(defer_id_var_empty)
+run_cmake(defer_id_var_missing)
+run_cmake(defer_id_var_multiple)
+run_cmake(defer_get_call_ids_missing_var)
+run_cmake(defer_get_call_ids_too_many_args)
+run_cmake(defer_get_call_ids_invalid_directory)
+run_cmake(defer_get_call_ids_id)
+run_cmake(defer_get_call_ids_id_var)
+run_cmake(defer_get_call_missing_id)
+run_cmake(defer_get_call_missing_var)
+run_cmake(defer_get_call_too_many_args)
+run_cmake(defer_get_call_id_empty)
+run_cmake(defer_get_call_unknown_argument)
+run_cmake(defer_get_call_id)
+run_cmake(defer_get_call_id_var)
+run_cmake(defer_missing_arg)
+run_cmake(defer_missing_call)
+run_cmake(defer_unknown_option)
diff --git a/Tests/RunCMake/cmake_language/call_expand_command_name.cmake b/Tests/RunCMake/cmake_language/call_expand_command_name.cmake
index e03bb1fd2..f74d303a0 100644
--- a/Tests/RunCMake/cmake_language/call_expand_command_name.cmake
+++ b/Tests/RunCMake/cmake_language/call_expand_command_name.cmake
@@ -1,2 +1,2 @@
set (my_call "CALL")
-cmake_language (${my_call} message "OK!")
+cmake_language (${my_call} ${empty} message "OK!")
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command.cmake b/Tests/RunCMake/cmake_language/call_expanded_command.cmake
index e76e61231..c52468d18 100644
--- a/Tests/RunCMake/cmake_language/call_expanded_command.cmake
+++ b/Tests/RunCMake/cmake_language/call_expanded_command.cmake
@@ -3,4 +3,4 @@ function (itsok)
endfunction()
set (cmd CALL itsok)
-cmake_language (${cmd})
+cmake_language (${empty} ${cmd})
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt
index e87e9bc27..82411d2e3 100644
--- a/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt
+++ b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt
@@ -1,4 +1,4 @@
CMake Error at call_expanded_command_and_arguments.cmake:2 \(cmake_language\):
- cmake_language called with incorrect number of arguments
+ cmake_language CALL command's arguments must be literal
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_language/call_invalid_command-result.txt b/Tests/RunCMake/cmake_language/call_invalid_command-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_invalid_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/call_invalid_command-stderr.txt b/Tests/RunCMake/cmake_language/call_invalid_command-stderr.txt
new file mode 100644
index 000000000..4439842ed
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_invalid_command-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at call_invalid_command.cmake:1 \(cmake_language\):
+ cmake_language invalid command specified: [A-Za-z_]+
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/call_invalid_command.cmake b/Tests/RunCMake/cmake_language/call_invalid_command.cmake
index 88bf08c2d..f2138957d 100644
--- a/Tests/RunCMake/cmake_language/call_invalid_command.cmake
+++ b/Tests/RunCMake/cmake_language/call_invalid_command.cmake
@@ -1,14 +1 @@
-
-foreach (command IN ITEMS "function" "ENDFUNCTION"
- "macro" "endMACRO"
- "if" "elseif" "else" "endif"
- "while" "endwhile"
- "foreach" "endforeach")
- execute_process(COMMAND "${CMAKE_COMMAND}" -DCOMMAND=${command}
- -P "${CMAKE_CURRENT_SOURCE_DIR}/CallInvalidCommand.cmake"
- OUTPUT_QUIET ERROR_QUIET
- RESULT_VARIABLE result)
- if (NOT result)
- message (SEND_ERROR "cmake_language(CALL ${command}) unexpectedly successfull.")
- endif()
-endforeach()
+cmake_language(CALL ${command})
diff --git a/Tests/RunCMake/cmake_language/call_message.cmake b/Tests/RunCMake/cmake_language/call_message.cmake
index 31aefdf21..3b98c80d9 100644
--- a/Tests/RunCMake/cmake_language/call_message.cmake
+++ b/Tests/RunCMake/cmake_language/call_message.cmake
@@ -1 +1 @@
-cmake_language(CALL message WORKS!)
+cmake_language(CALL ${empty} message WORKS!)
diff --git a/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt b/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt
index 9e2c08fd7..f6a04587f 100644
--- a/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt
+++ b/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt
@@ -1,2 +1,2 @@
CMake Error at call_no_parameters.cmake:1 \(cmake_language\):
- cmake_language called with incorrect number of arguments
+ cmake_language CALL missing command name
diff --git a/Tests/RunCMake/cmake_language/defer_call-stderr.txt b/Tests/RunCMake/cmake_language/defer_call-stderr.txt
new file mode 100644
index 000000000..7e8d8ca15
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call-stderr.txt
@@ -0,0 +1,15 @@
+^CMake Deprecation Warning at defer_call/CMakeLists.txt:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0053 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.
++
+CMake Warning at defer_call/CMakeLists.txt:3 \(message\):
+ Double-Deferred Warning In Subdirectory:
+
+ '[^']*/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt:DEFERRED:id3'
+Call Stack \(most recent call first\):
+ defer_call/CMakeLists.txt:DEFERRED$
diff --git a/Tests/RunCMake/cmake_language/defer_call-stdout.txt b/Tests/RunCMake/cmake_language/defer_call-stdout.txt
new file mode 100644
index 000000000..fcf9f29e5
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call-stdout.txt
@@ -0,0 +1,8 @@
+-- Immediate Message In Subdirectory: ids='__0;__1'
+-- Deferred Message In Subdirectory: '[^']*/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt:DEFERRED:id1'
+-- Deferred Message In Included File: '[^']*/Tests/RunCMake/cmake_language/defer_call/include.cmake:1'
+-- Immediate Message: ids='__0;__1;__2;__3;__4'
+-- First Deferred Message
+-- Deferred Message From Subdirectory
+-- Deferred Message: ids='__4;__5'
+-- Final Deferred Message
diff --git a/Tests/RunCMake/cmake_language/defer_call.cmake b/Tests/RunCMake/cmake_language/defer_call.cmake
new file mode 100644
index 000000000..2e9595f8a
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call.cmake
@@ -0,0 +1,12 @@
+set(message_command "message")
+set(final_message "This should not be printed because variable evaluation is deferred too.")
+cmake_language(DEFER CALL ${message_command} STATUS "First Deferred Message")
+add_subdirectory(defer_call)
+cmake_language(DEFER CALL cmake_language DEFER CALL "${final_message_command}" STATUS "${final_message}")
+cmake_language(DEFER CALL cmake_language DEFER GET_CALL_IDS ids)
+cmake_language(DEFER CALL cmake_language EVAL CODE [[message(STATUS "Deferred Message: ids='${ids}'")]])
+cmake_language(DEFER GET_CALL_IDS ids)
+message(STATUS "Immediate Message: ids='${ids}'")
+set(final_message_command "message")
+set(final_message "Final Deferred Message")
+set(subdir_message "Deferred Message From Subdirectory")
diff --git a/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt
new file mode 100644
index 000000000..544b9f48d
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_policy(SET CMP0053 OLD)
+cmake_language(DEFER ID id1 CALL message STATUS "Deferred Message In Subdirectory: '${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}'")
+cmake_language(DEFER ID id2 CALL
+ cmake_language DEFER ID id3 CALL
+ message WARNING "Double-Deferred Warning In Subdirectory:\n '${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}'")
+cmake_language(DEFER ID id4 CALL include "${CMAKE_CURRENT_LIST_DIR}/include.cmake")
+
+set(subdir_message "This should not be printed because variable evaluation is in deferred scope.")
+cmake_language(DEFER DIRECTORY .. CALL message STATUS "${subdir_message}")
+cmake_language(DEFER DIRECTORY .. GET_CALL_IDS ids)
+message(STATUS "Immediate Message In Subdirectory: ids='${ids}'")
diff --git a/Tests/RunCMake/cmake_language/defer_call/include.cmake b/Tests/RunCMake/cmake_language/defer_call/include.cmake
new file mode 100644
index 000000000..272c61b98
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call/include.cmake
@@ -0,0 +1 @@
+message(STATUS "Deferred Message In Included File: '${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}'")
diff --git a/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-result.txt b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-stderr.txt
new file mode 100644
index 000000000..ec20b8f77
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at defer_call_add_subdirectory.cmake:1 \(add_subdirectory\):
+ Subdirectories may not be created during deferred execution.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:DEFERRED
++
+CMake Error at defer_call_add_subdirectory.cmake:2 \(subdirs\):
+ Subdirectories may not be created during deferred execution.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:DEFERRED$
diff --git a/Tests/RunCMake/cmake_language/defer_call_add_subdirectory.cmake b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory.cmake
new file mode 100644
index 000000000..6b7ee6392
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory.cmake
@@ -0,0 +1,2 @@
+cmake_language(DEFER CALL add_subdirectory defer_call_add_subdirectory)
+cmake_language(DEFER CALL subdirs defer_call_add_subdirectory)
diff --git a/Tests/RunCMake/cmake_language/defer_call_add_subdirectory/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory/CMakeLists.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory/CMakeLists.txt
diff --git a/Tests/RunCMake/cmake_language/defer_call_enable_language-result.txt b/Tests/RunCMake/cmake_language/defer_call_enable_language-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_enable_language-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_call_enable_language-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_enable_language-stderr.txt
new file mode 100644
index 000000000..65a0b99cc
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_enable_language-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at defer_call_enable_language.cmake:1 \(enable_language\):
+ Languages may not be enabled during deferred execution.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:DEFERRED
++
+CMake Error at defer_call_enable_language.cmake:2 \(project\):
+ Languages may not be enabled during deferred execution.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:DEFERRED$
diff --git a/Tests/RunCMake/cmake_language/defer_call_enable_language.cmake b/Tests/RunCMake/cmake_language/defer_call_enable_language.cmake
new file mode 100644
index 000000000..eb43f8070
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_enable_language.cmake
@@ -0,0 +1,2 @@
+cmake_language(DEFER CALL enable_language C)
+cmake_language(DEFER CALL project foo C)
diff --git a/Tests/RunCMake/cmake_language/defer_call_error-result.txt b/Tests/RunCMake/cmake_language/defer_call_error-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_error-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_call_error-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_error-stderr.txt
new file mode 100644
index 000000000..63ce145c9
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_error-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at defer_call_error.cmake:2 \(message\):
+ Deferred Error
+Call Stack \(most recent call first\):
+ CMakeLists.txt:DEFERRED
++
+CMake Error at defer_call_error/CMakeLists.txt:2 \(message\):
+ Deferred Error from Subdirectory
+Call Stack \(most recent call first\):
+ CMakeLists.txt:DEFERRED$
diff --git a/Tests/RunCMake/cmake_language/defer_call_error.cmake b/Tests/RunCMake/cmake_language/defer_call_error.cmake
new file mode 100644
index 000000000..083e82ac1
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_error.cmake
@@ -0,0 +1,3 @@
+# Error message backtrace points here but call stack shows DEFERRED execution.
+cmake_language(DEFER CALL message SEND_ERROR "Deferred Error")
+add_subdirectory(defer_call_error)
diff --git a/Tests/RunCMake/cmake_language/defer_call_error/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_call_error/CMakeLists.txt
new file mode 100644
index 000000000..0acac6920
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_error/CMakeLists.txt
@@ -0,0 +1,2 @@
+# Error message backtrace points here but call stack shows DEFERRED execution in parent.
+cmake_language(DEFER DIRECTORY .. CALL message SEND_ERROR "Deferred Error from Subdirectory")
diff --git a/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt b/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt
new file mode 100644
index 000000000..2fd194dc9
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt
@@ -0,0 +1,13 @@
+-- Immediate Message: ids='message0;getCallIds1;messageIds1;cancelCall;getCallIds2;messageIds2;toBeCancelled;message3'
+-- Immediate Message: message0='message;STATUS;First Deferred Message'
+-- Immediate Message: getCallIds1='cmake_language;DEFER;GET_CALL_IDS;ids'
+-- Immediate Message: messageIds1='cmake_language;EVAL;CODE;message\(STATUS "Deferred Message: ids='\${ids}'"\)'
+-- 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: message3='message;STATUS;Final Deferred Message'
+-- First Deferred Message
+-- Deferred Message: ids='messageIds1;cancelCall;getCallIds2;messageIds2;toBeCancelled;message3'
+-- Deferred Message: ids='messageIds2;message3'
+-- Final Deferred Message
diff --git a/Tests/RunCMake/cmake_language/defer_call_ids.cmake b/Tests/RunCMake/cmake_language/defer_call_ids.cmake
new file mode 100644
index 000000000..287489417
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_ids.cmake
@@ -0,0 +1,14 @@
+cmake_language(DEFER ID message0 CALL message STATUS "First Deferred Message")
+cmake_language(DEFER ID getCallIds1 CALL cmake_language DEFER GET_CALL_IDS ids)
+cmake_language(DEFER ID messageIds1 CALL cmake_language EVAL CODE [[message(STATUS "Deferred Message: ids='${ids}'")]])
+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 message3 CALL message STATUS "Final Deferred Message")
+cmake_language(DEFER GET_CALL_IDS ids)
+message(STATUS "Immediate Message: ids='${ids}'")
+foreach(id ${ids})
+ cmake_language(DEFER GET_CALL ${id} call)
+ message(STATUS "Immediate Message: ${id}='${call}'")
+endforeach()
diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_command-result.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_command-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_invalid_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_command-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_command-stderr.txt
new file mode 100644
index 000000000..4cdbf0c4c
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_invalid_command-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_call_invalid_command.cmake:1 \(cmake_language\):
+ cmake_language invalid command specified: [A-Za-z_]+
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_command.cmake b/Tests/RunCMake/cmake_language/defer_call_invalid_command.cmake
new file mode 100644
index 000000000..d6cc93629
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_invalid_command.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER CALL ${command})
diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_directory-result.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_directory-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_invalid_directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_directory-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_directory-stderr.txt
new file mode 100644
index 000000000..afe9a0e54
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_invalid_directory-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at defer_call_invalid_directory.cmake:2 \(cmake_language\):
+ cmake_language DEFER CALL may not be scheduled in directory:
+
+ [^
+]*/Tests/RunCMake/cmake_language/defer_call_invalid_directory-build/defer_call_invalid_directory
+
+ at this time.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_directory.cmake b/Tests/RunCMake/cmake_language/defer_call_invalid_directory.cmake
new file mode 100644
index 000000000..cc1eb8d64
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_invalid_directory.cmake
@@ -0,0 +1,2 @@
+add_subdirectory(defer_call_invalid_directory)
+cmake_language(DEFER DIRECTORY defer_call_invalid_directory CALL message "Should not be allowed.")
diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_directory/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_directory/CMakeLists.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_invalid_directory/CMakeLists.txt
diff --git a/Tests/RunCMake/cmake_language/defer_call_missing_directory-result.txt b/Tests/RunCMake/cmake_language/defer_call_missing_directory-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_missing_directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_call_missing_directory-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_missing_directory-stderr.txt
new file mode 100644
index 000000000..db4f90e7e
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_missing_directory-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at defer_call_missing_directory.cmake:1 \(cmake_language\):
+ cmake_language DEFER DIRECTORY:
+
+ [^
+]*/Tests/RunCMake/cmake_language/does_not_exist
+
+ is not known. It may not have been processed yet.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_call_missing_directory.cmake b/Tests/RunCMake/cmake_language/defer_call_missing_directory.cmake
new file mode 100644
index 000000000..01f4c40b9
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_missing_directory.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER DIRECTORY does_not_exist CALL message "Should not be allowed.")
diff --git a/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-result.txt b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-stderr.txt
new file mode 100644
index 000000000..923be13fa
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error at CMakeLists.txt:DEFERRED:
+ cmake_policy PUSH without matching POP$
diff --git a/Tests/RunCMake/cmake_language/defer_call_policy_PUSH.cmake b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH.cmake
new file mode 100644
index 000000000..66cb760f2
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER CALL cmake_policy PUSH)
diff --git a/Tests/RunCMake/cmake_language/defer_call_syntax_error-result.txt b/Tests/RunCMake/cmake_language/defer_call_syntax_error-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_syntax_error-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_call_syntax_error-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_syntax_error-stderr.txt
new file mode 100644
index 000000000..80db4aa04
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_syntax_error-stderr.txt
@@ -0,0 +1,13 @@
+^CMake Error at defer_call_syntax_error.cmake:2 \(message\):
+ Syntax error in cmake code at
+
+ [^
+]*/Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake:2
+
+ when parsing string
+
+ Deferred \\X Error
+
+ Invalid character escape '\\X'.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:DEFERRED$
diff --git a/Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake b/Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake
new file mode 100644
index 000000000..c3c044bc8
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake
@@ -0,0 +1,2 @@
+# Argument syntax error evaluated at deferred call site.
+cmake_language(DEFER CALL message "Deferred \X Error")
diff --git a/Tests/RunCMake/cmake_language/defer_call_trace-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_trace-stderr.txt
new file mode 100644
index 000000000..b61b236df
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_trace-stderr.txt
@@ -0,0 +1,8 @@
+[^
+]*/Tests/RunCMake/cmake_language/defer_call_trace.cmake\(2\): cmake_language\(DEFER CALL message Deferred Message \)
+[^
+]*/Tests/RunCMake/cmake_language/defer_call_trace.cmake\(3\): message\(Immediate Message \)
+Immediate Message
+[^
+]*/Tests/RunCMake/cmake_language/defer_call_trace.cmake\(2\):DEFERRED:__0: message\(Deferred Message \)
+Deferred Message$
diff --git a/Tests/RunCMake/cmake_language/defer_call_trace.cmake b/Tests/RunCMake/cmake_language/defer_call_trace.cmake
new file mode 100644
index 000000000..5ed383f95
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_trace.cmake
@@ -0,0 +1,3 @@
+# The --trace and --trace-expand output point here for deferred call.
+cmake_language(DEFER CALL message "Deferred Message")
+message("Immediate Message")
diff --git a/Tests/RunCMake/cmake_language/defer_call_trace_json-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_trace_json-stderr.txt
new file mode 100644
index 000000000..647beb05c
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_trace_json-stderr.txt
@@ -0,0 +1,5 @@
+{"args":\["DEFER","CALL","message","Deferred Message"\],"cmd":"cmake_language","file":"[^"]*/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake","frame":2,"line":2,"time":[0-9.]+}
+{"args":\["Immediate Message"\],"cmd":"message","file":"[^"]*/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake","frame":2,"line":3,"time":[0-9.]+}
+Immediate Message
+{"args":\["Deferred Message"],"cmd":"message","defer":"__0","file":"[^"]*/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake","frame":1,"line":2,"time":[0-9.]+}
+Deferred Message$
diff --git a/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake b/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake
new file mode 100644
index 000000000..5ed383f95
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake
@@ -0,0 +1,3 @@
+# The --trace and --trace-expand output point here for deferred call.
+cmake_language(DEFER CALL message "Deferred Message")
+message("Immediate Message")
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id-result.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_id-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id-stderr.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_id-stderr.txt
new file mode 100644
index 000000000..8a13c0db5
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_cancel_call_id.cmake:1 \(cmake_language\):
+ cmake_language DEFER CANCEL_CALL does not accept ID or ID_VAR.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id.cmake b/Tests/RunCMake/cmake_language/defer_cancel_call_id.cmake
new file mode 100644
index 000000000..6e5b5c89f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID id CANCEL_CALL)
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-result.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-stderr.txt
new file mode 100644
index 000000000..5783c50cc
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_cancel_call_id_var.cmake:1 \(cmake_language\):
+ cmake_language DEFER CANCEL_CALL does not accept ID or ID_VAR.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id_var.cmake b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var.cmake
new file mode 100644
index 000000000..9f7522138
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID_VAR id_var CANCEL_CALL)
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-result.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-stderr.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-stderr.txt
new file mode 100644
index 000000000..cacbf9a21
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at defer_cancel_call_invalid_directory.cmake:2 \(cmake_language\):
+ cmake_language DEFER CANCEL_CALL may not update directory:
+
+ [^
+]*/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-build/defer_cancel_call_invalid_directory
+
+ at this time.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory.cmake b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory.cmake
new file mode 100644
index 000000000..29a8fc210
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory.cmake
@@ -0,0 +1,2 @@
+add_subdirectory(defer_cancel_call_invalid_directory)
+cmake_language(DEFER DIRECTORY defer_cancel_call_invalid_directory CANCEL_CALL _)
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory/CMakeLists.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory/CMakeLists.txt
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-result.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-stderr.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-stderr.txt
new file mode 100644
index 000000000..eb8f2b9fc
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at defer_cancel_call_unknown_argument.cmake:1 \(cmake_language\):
+ cmake_language DEFER CANCEL_CALL unknown argument:
+
+ UNKNOWN
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument.cmake b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument.cmake
new file mode 100644
index 000000000..fbc6309a8
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER CANCEL_CALL UNKNOWN)
diff --git a/Tests/RunCMake/cmake_language/defer_directory_empty-result.txt b/Tests/RunCMake/cmake_language/defer_directory_empty-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_empty-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_directory_empty-stderr.txt b/Tests/RunCMake/cmake_language/defer_directory_empty-stderr.txt
new file mode 100644
index 000000000..587dfa97e
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_empty-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_directory_empty.cmake:1 \(cmake_language\):
+ cmake_language DEFER DIRECTORY may not be empty
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_directory_empty.cmake b/Tests/RunCMake/cmake_language/defer_directory_empty.cmake
new file mode 100644
index 000000000..f4e45536a
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_empty.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER DIRECTORY "")
diff --git a/Tests/RunCMake/cmake_language/defer_directory_missing-result.txt b/Tests/RunCMake/cmake_language/defer_directory_missing-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_missing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_directory_missing-stderr.txt b/Tests/RunCMake/cmake_language/defer_directory_missing-stderr.txt
new file mode 100644
index 000000000..1db8e995b
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_missing-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_directory_missing.cmake:1 \(cmake_language\):
+ cmake_language DEFER DIRECTORY missing value
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_directory_missing.cmake b/Tests/RunCMake/cmake_language/defer_directory_missing.cmake
new file mode 100644
index 000000000..fbdb17792
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_missing.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER DIRECTORY)
diff --git a/Tests/RunCMake/cmake_language/defer_directory_multiple-result.txt b/Tests/RunCMake/cmake_language/defer_directory_multiple-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_multiple-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_directory_multiple-stderr.txt b/Tests/RunCMake/cmake_language/defer_directory_multiple-stderr.txt
new file mode 100644
index 000000000..f4d09b922
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_multiple-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_directory_multiple.cmake:1 \(cmake_language\):
+ cmake_language DEFER given multiple DIRECTORY arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_directory_multiple.cmake b/Tests/RunCMake/cmake_language/defer_directory_multiple.cmake
new file mode 100644
index 000000000..baf037bf5
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_directory_multiple.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER DIRECTORY . DIRECTORY x CALL message "Should not be allowed.")
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_id-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_id-stderr.txt
new file mode 100644
index 000000000..e161a5fac
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_id.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL does not accept ID or ID_VAR.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id.cmake b/Tests/RunCMake/cmake_language/defer_get_call_id.cmake
new file mode 100644
index 000000000..7a395ea63
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID id GET_CALL)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_empty-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_id_empty-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id_empty-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_empty-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_id_empty-stderr.txt
new file mode 100644
index 000000000..c7c534ba0
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id_empty-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_id_empty.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL id may not be empty
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_empty.cmake b/Tests/RunCMake/cmake_language/defer_get_call_id_empty.cmake
new file mode 100644
index 000000000..4f39f2d0e
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id_empty.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER GET_CALL "" var)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_var-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_id_var-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id_var-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_id_var-stderr.txt
new file mode 100644
index 000000000..2cfd94274
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id_var-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_id_var.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL does not accept ID or ID_VAR.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_var.cmake b/Tests/RunCMake/cmake_language/defer_get_call_id_var.cmake
new file mode 100644
index 000000000..ade0815a3
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_id_var.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID_VAR id_var GET_CALL)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_id-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_id-stderr.txt
new file mode 100644
index 000000000..072ee45eb
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_ids_id.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL_IDS does not accept ID or ID_VAR.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_id.cmake
new file mode 100644
index 000000000..4eb2555a3
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID id GET_CALL_IDS)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-stderr.txt
new file mode 100644
index 000000000..e4a288c77
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_ids_id_var.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL_IDS does not accept ID or ID_VAR.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var.cmake
new file mode 100644
index 000000000..c27de79af
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID_VAR id_var GET_CALL_IDS)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-stderr.txt
new file mode 100644
index 000000000..edebe32f7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at defer_get_call_ids_invalid_directory.cmake:2 \(cmake_language\):
+ cmake_language DEFER GET_CALL_IDS may not access directory:
+
+ [^
+]*/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-build/defer_get_call_ids_invalid_directory
+
+ at this time.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory.cmake
new file mode 100644
index 000000000..81f098ea5
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory.cmake
@@ -0,0 +1,2 @@
+add_subdirectory(defer_get_call_ids_invalid_directory)
+cmake_language(DEFER DIRECTORY defer_get_call_ids_invalid_directory GET_CALL_IDS var)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory/CMakeLists.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory/CMakeLists.txt
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-stderr.txt
new file mode 100644
index 000000000..a2951cf2f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_ids_missing_var.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL_IDS missing output variable
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var.cmake
new file mode 100644
index 000000000..b171f04d0
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER GET_CALL_IDS)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-stderr.txt
new file mode 100644
index 000000000..56915199f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_ids_too_many_args.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL_IDS given too many arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args.cmake
new file mode 100644
index 000000000..0158684f3
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER GET_CALL_IDS var extra)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_id-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_missing_id-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_id-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_id-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_missing_id-stderr.txt
new file mode 100644
index 000000000..081aa95f7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_id-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_missing_id.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL missing id
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_id.cmake b/Tests/RunCMake/cmake_language/defer_get_call_missing_id.cmake
new file mode 100644
index 000000000..0542abca2
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_id.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER GET_CALL)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_var-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_missing_var-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_var-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_missing_var-stderr.txt
new file mode 100644
index 000000000..1b2641f20
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_var-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_missing_var.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL missing output variable
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_var.cmake b/Tests/RunCMake/cmake_language/defer_get_call_missing_var.cmake
new file mode 100644
index 000000000..7916d290d
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_var.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER GET_CALL id)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-stderr.txt
new file mode 100644
index 000000000..b6ee2d64b
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_get_call_too_many_args.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL given too many arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_too_many_args.cmake b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args.cmake
new file mode 100644
index 000000000..ed6577907
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER GET_CALL id var extra)
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-stderr.txt
new file mode 100644
index 000000000..ac165965b
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at defer_get_call_unknown_argument.cmake:1 \(cmake_language\):
+ cmake_language DEFER GET_CALL unknown argument:
+
+ UNKNOWN
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument.cmake b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument.cmake
new file mode 100644
index 000000000..d0caa39d6
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER GET_CALL UNKNOWN var)
diff --git a/Tests/RunCMake/cmake_language/defer_id_empty-result.txt b/Tests/RunCMake/cmake_language/defer_id_empty-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_empty-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_id_empty-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_empty-stderr.txt
new file mode 100644
index 000000000..1e7f7725e
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_empty-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_id_empty.cmake:1 \(cmake_language\):
+ cmake_language DEFER ID may not be empty
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_id_empty.cmake b/Tests/RunCMake/cmake_language/defer_id_empty.cmake
new file mode 100644
index 000000000..326762c1a
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_empty.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID "")
diff --git a/Tests/RunCMake/cmake_language/defer_id_missing-result.txt b/Tests/RunCMake/cmake_language/defer_id_missing-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_missing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_id_missing-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_missing-stderr.txt
new file mode 100644
index 000000000..cef5f0e2c
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_missing-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_id_missing.cmake:1 \(cmake_language\):
+ cmake_language DEFER ID missing value
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_id_missing.cmake b/Tests/RunCMake/cmake_language/defer_id_missing.cmake
new file mode 100644
index 000000000..4de687d51
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_missing.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID)
diff --git a/Tests/RunCMake/cmake_language/defer_id_multiple-result.txt b/Tests/RunCMake/cmake_language/defer_id_multiple-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_multiple-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_id_multiple-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_multiple-stderr.txt
new file mode 100644
index 000000000..172552116
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_multiple-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_id_multiple.cmake:1 \(cmake_language\):
+ cmake_language DEFER given multiple ID arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_id_multiple.cmake b/Tests/RunCMake/cmake_language/defer_id_multiple.cmake
new file mode 100644
index 000000000..69187af41
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_multiple.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID a ID b CALL message "Should not be allowed.")
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_empty-result.txt b/Tests/RunCMake/cmake_language/defer_id_var_empty-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_empty-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_empty-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_var_empty-stderr.txt
new file mode 100644
index 000000000..bb5cd4386
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_empty-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_id_var_empty.cmake:1 \(cmake_language\):
+ cmake_language DEFER ID_VAR may not be empty
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_empty.cmake b/Tests/RunCMake/cmake_language/defer_id_var_empty.cmake
new file mode 100644
index 000000000..c7198f54b
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_empty.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID_VAR "")
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_missing-result.txt b/Tests/RunCMake/cmake_language/defer_id_var_missing-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_missing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_missing-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_var_missing-stderr.txt
new file mode 100644
index 000000000..f4e0d6e05
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_missing-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_id_var_missing.cmake:1 \(cmake_language\):
+ cmake_language DEFER ID_VAR missing variable name
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_missing.cmake b/Tests/RunCMake/cmake_language/defer_id_var_missing.cmake
new file mode 100644
index 000000000..359d14936
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_missing.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID_VAR)
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_multiple-result.txt b/Tests/RunCMake/cmake_language/defer_id_var_multiple-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_multiple-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_multiple-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_var_multiple-stderr.txt
new file mode 100644
index 000000000..4368b06ea
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_multiple-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_id_var_multiple.cmake:1 \(cmake_language\):
+ cmake_language DEFER given multiple ID_VAR arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_id_var_multiple.cmake b/Tests/RunCMake/cmake_language/defer_id_var_multiple.cmake
new file mode 100644
index 000000000..665ea9481
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_id_var_multiple.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER ID_VAR a ID_VAR b CALL message "Should not be allowed.")
diff --git a/Tests/RunCMake/cmake_language/defer_missing_arg-result.txt b/Tests/RunCMake/cmake_language/defer_missing_arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_missing_arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_missing_arg-stderr.txt b/Tests/RunCMake/cmake_language/defer_missing_arg-stderr.txt
new file mode 100644
index 000000000..3e656cd64
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_missing_arg-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_missing_arg.cmake:1 \(cmake_language\):
+ cmake_language DEFER requires at least one argument
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_missing_arg.cmake b/Tests/RunCMake/cmake_language/defer_missing_arg.cmake
new file mode 100644
index 000000000..737a8c89d
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_missing_arg.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER)
diff --git a/Tests/RunCMake/cmake_language/defer_missing_call-result.txt b/Tests/RunCMake/cmake_language/defer_missing_call-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_missing_call-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_missing_call-stderr.txt b/Tests/RunCMake/cmake_language/defer_missing_call-stderr.txt
new file mode 100644
index 000000000..7eeef7677
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_missing_call-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at defer_missing_call.cmake:1 \(cmake_language\):
+ cmake_language DEFER must be followed by a CALL argument
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_missing_call.cmake b/Tests/RunCMake/cmake_language/defer_missing_call.cmake
new file mode 100644
index 000000000..0b330efb6
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_missing_call.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER DIRECTORY .)
diff --git a/Tests/RunCMake/cmake_language/defer_unknown_option-result.txt b/Tests/RunCMake/cmake_language/defer_unknown_option-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_unknown_option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/defer_unknown_option-stderr.txt b/Tests/RunCMake/cmake_language/defer_unknown_option-stderr.txt
new file mode 100644
index 000000000..95d87c6dc
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_unknown_option-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at defer_unknown_option.cmake:1 \(cmake_language\):
+ cmake_language DEFER unknown option:
+
+ UNKNOWN
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_language/defer_unknown_option.cmake b/Tests/RunCMake/cmake_language/defer_unknown_option.cmake
new file mode 100644
index 000000000..876b3f14e
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/defer_unknown_option.cmake
@@ -0,0 +1 @@
+cmake_language(DEFER UNKNOWN)
diff --git a/Tests/RunCMake/cmake_language/no_parameters-stderr.txt b/Tests/RunCMake/cmake_language/no_parameters-stderr.txt
index 194bbe355..1862c7717 100644
--- a/Tests/RunCMake/cmake_language/no_parameters-stderr.txt
+++ b/Tests/RunCMake/cmake_language/no_parameters-stderr.txt
@@ -1,2 +1,2 @@
CMake Error at no_parameters.cmake:1 \(cmake_language\):
- cmake_language called with incorrect number of arguments
+ cmake_language CALL missing command name
diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
new file mode 100644
index 000000000..7d40dcb04
--- /dev/null
+++ b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
@@ -0,0 +1,26 @@
+^CMake Deprecation Warning at Before2812.cmake:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Deprecation Warning at Before2812.cmake:2 \(cmake_policy\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Deprecation Warning at Before2812.cmake:6 \(cmake_policy\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake b/Tests/RunCMake/cmake_minimum_required/Before2812.cmake
new file mode 100644
index 000000000..220e359d4
--- /dev/null
+++ b/Tests/RunCMake/cmake_minimum_required/Before2812.cmake
@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 2.8.11)
+cmake_policy(VERSION 2.6)
+cmake_policy(PUSH)
+cmake_policy(VERSION 2.6) # simulate pre-3.18 install(EXPORT)-generated call
+cmake_policy(POP)
+cmake_policy(VERSION 2.8.11)
diff --git a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
index e8db6b05b..667561ea7 100644
--- a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
+++ b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
-include(${RunCMake_TEST}.cmake)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
index a874466d3..81d26d260 100644
--- a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
+++ b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
@@ -1,3 +1,12 @@
+^CMake Deprecation Warning at CompatBefore24.cmake:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
CMake Error in CMakeLists.txt:
You have set CMAKE_BACKWARDS_COMPATIBILITY to a CMake version less than
2.4. This version of CMake only supports backwards compatibility with
diff --git a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
index 1030211e7..3a959bb2f 100644
--- a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
@@ -4,6 +4,7 @@ run_cmake(Before24)
run_cmake(CompatBefore24)
run_cmake(Future)
run_cmake(PolicyBefore24)
+run_cmake(Before2812)
run_cmake(Range)
run_cmake(RangeBad)
run_cmake(Unknown)
diff --git a/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/ABSOLUTE_PATH.cmake b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH.cmake
new file mode 100644
index 000000000..4fd3c7df8
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/ABSOLUTE_PATH.cmake
@@ -0,0 +1,39 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "../../a/d")
+cmake_path(ABSOLUTE_PATH path BASE_DIRECTORY "/x/y/a/f")
+if (NOT path STREQUAL "/x/y/a/f/../../a/d")
+ list (APPEND errors "'${path}' instead of '/x/y/a/f/../../a/d'")
+endif()
+
+set (path "../../a/d")
+cmake_path(ABSOLUTE_PATH path BASE_DIRECTORY "/x/y/a/f" NORMALIZE)
+if (NOT path STREQUAL "/x/y/a/d")
+ list (APPEND errors "'${path}' instead of '/x/y/a/d'")
+endif()
+
+set (path "../../a/d")
+cmake_path(ABSOLUTE_PATH path BASE_DIRECTORY "/x/y/a/f" NORMALIZE OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "../../a/d")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "/x/y/a/d")
+ list (APPEND errors "'${output}' instead of '/x/y/a/d'")
+endif()
+
+set (path "/a/d/../e")
+cmake_path(ABSOLUTE_PATH path BASE_DIRECTORY "/x/y/a/f")
+if (NOT path STREQUAL "/a/d/../e")
+ list (APPEND errors "'${path}' instead of '/a/d/../e'")
+endif()
+
+set (path "/a/d/../e")
+cmake_path(ABSOLUTE_PATH path BASE_DIRECTORY "/x/y/a/f" NORMALIZE)
+if (NOT path STREQUAL "/a/e")
+ list (APPEND errors "'${path}' instead of '/a/e'")
+endif()
+
+
+check_errors (ABSOLUTE_PATH ${errors})
diff --git a/Tests/RunCMake/cmake_path/APPEND-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/APPEND-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/APPEND-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/APPEND-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/APPEND-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/APPEND-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/APPEND-wrong-path-result.txt b/Tests/RunCMake/cmake_path/APPEND-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/APPEND-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/APPEND.cmake b/Tests/RunCMake/cmake_path/APPEND.cmake
new file mode 100644
index 000000000..565b26dde
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/APPEND.cmake
@@ -0,0 +1,77 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+cmake_path (APPEND path "/a/b" "c")
+if (NOT path STREQUAL "/a/b/c")
+ list (APPEND errors "'${path}' instead of '/a/b/c'")
+endif()
+
+set (path "/a/b")
+cmake_path (APPEND path "c")
+if (NOT path STREQUAL "/a/b/c")
+ list (APPEND errors "'${path}' instead of '/a/b/c'")
+endif()
+
+cmake_path (APPEND path "x/y" "z" OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "/a/b/c")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "/a/b/c/x/y/z")
+ list (APPEND errors "'${output}' instead of '/a/b/c/x/y/z'")
+endif()
+
+set (path "a")
+cmake_path (APPEND path "")
+if (NOT path STREQUAL "a/")
+ list (APPEND errors "'${path}' instead of 'a/'")
+endif()
+
+cmake_path (APPEND path "/b")
+if (NOT path STREQUAL "/b")
+ list (APPEND errors "'${path}' instead of '/b'")
+endif()
+
+if (WIN32)
+ set (path "a")
+ cmake_path (APPEND path "c:/b")
+ if (NOT path STREQUAL "c:/b")
+ list (APPEND errors "'${path}' instead of 'c:/b'")
+ endif()
+
+ set (path "a")
+ cmake_path (APPEND path "c:")
+ if (NOT path STREQUAL "c:")
+ list (APPEND errors "'${path}' instead of 'c:'")
+ endif()
+ cmake_path (APPEND path "")
+ if (NOT path STREQUAL "c:")
+ list (APPEND errors "'${path}' instead of 'c:'")
+ endif()
+
+ set (path "c:a")
+ cmake_path (APPEND path "/b")
+ if (NOT path STREQUAL "c:/b")
+ list (APPEND errors "'${path}' instead of 'c:/b'")
+ endif()
+
+ set (path "c:a")
+ cmake_path (APPEND path "c:b")
+ if (NOT path STREQUAL "c:a/b")
+ list (APPEND errors "'${path}' instead of 'c:a/b'")
+ endif()
+
+ set (path "//host")
+ cmake_path (APPEND path "b")
+ if (NOT path STREQUAL "//host/b")
+ list (APPEND errors "'${path}' instead of '//host/b'")
+ endif()
+
+ set (path "//host/")
+ cmake_path (APPEND path "b")
+ if (NOT path STREQUAL "//host/b")
+ list (APPEND errors "'${path}' instead of '//host/b'")
+ endif()
+endif()
+
+check_errors (APPEND ${errors})
diff --git a/Tests/RunCMake/cmake_path/CMAKE_PATH-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/CMAKE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CMAKE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CMAKE_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/CMAKE_PATH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CMAKE_PATH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CMAKE_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/CMAKE_PATH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CMAKE_PATH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CMAKE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/CMAKE_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CMAKE_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CMAKE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/CMAKE_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CMAKE_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CMAKE_PATH.cmake b/Tests/RunCMake/cmake_path/CMAKE_PATH.cmake
new file mode 100644
index 000000000..b9320f365
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CMAKE_PATH.cmake
@@ -0,0 +1,43 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+cmake_path(CMAKE_PATH path "/x/y/z/../../a/d")
+if (NOT path STREQUAL "/x/y/z/../../a/d")
+ list (APPEND errors "'${path}' instead of '/x/y/z/../../a/d'")
+endif()
+cmake_path(CMAKE_PATH path NORMALIZE "/x/y/z/../../a/d")
+if (NOT path STREQUAL "/x/a/d")
+ list (APPEND errors "'${path}' instead of '/x/a/d'")
+endif()
+
+if (WIN32)
+ cmake_path(CMAKE_PATH path "/x\\y/z\\..\\../a/d")
+ if (NOT path STREQUAL "/x/y/z/../../a/d")
+ list (APPEND errors "'${path}' instead of '/x/y/z/../../a/d'")
+ endif()
+ cmake_path(CMAKE_PATH path NORMALIZE "/x\\y/z\\..\\../a/d")
+ if (NOT path STREQUAL "/x/a/d")
+ list (APPEND errors "'${path}' instead of '/x/a/d'")
+ endif()
+
+ cmake_path(CMAKE_PATH path "//?/c:/x\\y/z\\..\\../a/d")
+ if (NOT path STREQUAL "c:/x/y/z/../../a/d")
+ list (APPEND errors "'${path}' instead of 'c:/x/y/z/../../a/d'")
+ endif()
+ cmake_path(CMAKE_PATH path NORMALIZE "//?/c:/x\\y/z\\..\\../a/d")
+ if (NOT path STREQUAL "c:/x/a/d")
+ list (APPEND errors "'${path}' instead of 'c:/x/a/d'")
+ endif()
+
+ cmake_path(CMAKE_PATH path "\\\\?\\UNC/host/x\\y/z\\..\\../a/d")
+ if (NOT path STREQUAL "//host/x/y/z/../../a/d")
+ list (APPEND errors "'${path}' instead of '//host/x/y/z/../../a/d'")
+ endif()
+ cmake_path(CMAKE_PATH path NORMALIZE "\\\\?\\UNC\\host/x\\y/z\\..\\../a/d")
+ if (NOT path STREQUAL "//host/x/a/d")
+ list (APPEND errors "'${path}' instead of '//host/x/a/d'")
+ endif()
+endif()
+
+check_errors (CMAKE_PATH ${errors})
diff --git a/Tests/RunCMake/cmake_path/CMakeLists.txt b/Tests/RunCMake/cmake_path/CMakeLists.txt
new file mode 100644
index 000000000..1f195c69e
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.18...3.19)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/cmake_path/COMPARE-EQUAL-invalid-output-result.txt b/Tests/RunCMake/cmake_path/COMPARE-EQUAL-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-EQUAL-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/COMPARE-EQUAL-missing-output-result.txt b/Tests/RunCMake/cmake_path/COMPARE-EQUAL-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-EQUAL-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/COMPARE-EQUAL-wrong-path-result.txt b/Tests/RunCMake/cmake_path/COMPARE-EQUAL-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-EQUAL-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-invalid-output-result.txt b/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-missing-output-result.txt b/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-wrong-path-result.txt b/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-NOT_EQUAL-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/COMPARE-wrong-operator-result.txt b/Tests/RunCMake/cmake_path/COMPARE-wrong-operator-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-wrong-operator-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/COMPARE-wrong-operator-stderr.txt b/Tests/RunCMake/cmake_path/COMPARE-wrong-operator-stderr.txt
new file mode 100644
index 000000000..674d94264
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-wrong-operator-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at COMPARE-wrong-operator.cmake:[0-9]+ \(cmake_path\):
+ cmake_path COMPARE called with an unknown comparison operator: FOO.
diff --git a/Tests/RunCMake/cmake_path/COMPARE-wrong-operator.cmake b/Tests/RunCMake/cmake_path/COMPARE-wrong-operator.cmake
new file mode 100644
index 000000000..7da5d29c8
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE-wrong-operator.cmake
@@ -0,0 +1,3 @@
+
+set (path "/a/b")
+cmake_path(COMPARE path FOO "/other" output)
diff --git a/Tests/RunCMake/cmake_path/COMPARE.cmake b/Tests/RunCMake/cmake_path/COMPARE.cmake
new file mode 100644
index 000000000..bc6b9b46c
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/COMPARE.cmake
@@ -0,0 +1,22 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "a///b/c")
+cmake_path(COMPARE path EQUAL "a/b/c" output)
+if (NOT output)
+ list (APPEND errors "'${path}' not equal to 'a/b/c'")
+endif()
+
+set (path "a/b/d/../c")
+cmake_path(COMPARE path NOT_EQUAL "a/b/c" output)
+if (NOT output)
+ list (APPEND errors "'${path}' equal to 'a/b/c'")
+endif()
+cmake_path(NORMAL_PATH path)
+cmake_path(COMPARE path EQUAL "a/b/c" output)
+if (NOT output)
+ list (APPEND errors "'${path}' not equal to 'a/b/c'")
+endif()
+
+check_errors (COMPARE ${errors})
diff --git a/Tests/RunCMake/cmake_path/CONCAT-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/CONCAT-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONCAT-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONCAT-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/CONCAT-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONCAT-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONCAT-wrong-path-result.txt b/Tests/RunCMake/cmake_path/CONCAT-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONCAT-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONCAT.cmake b/Tests/RunCMake/cmake_path/CONCAT.cmake
new file mode 100644
index 000000000..62b5eb001
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONCAT.cmake
@@ -0,0 +1,20 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "/a/b")
+cmake_path (CONCAT path "cd")
+if (NOT path STREQUAL "/a/bcd")
+ list (APPEND errors "'${path}' instead of 'a/bcd'")
+endif()
+
+set (path "/a/b")
+cmake_path (CONCAT path "cd" "ef" OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "/a/b")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "/a/bcdef")
+ list (APPEND errors "'${output}' instead of 'a/bcdef'")
+endif()
+
+check_errors (CONCAT ${errors})
diff --git a/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-invalid-output-result.txt b/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-missing-output-result.txt b/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-TO_CMAKE_PATH_LIST-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-invalid-output-result.txt b/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-missing-output-result.txt b/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-TO_NATIVE_PATH_LIST-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONVERT-wrong-operator-result.txt b/Tests/RunCMake/cmake_path/CONVERT-wrong-operator-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-wrong-operator-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/CONVERT-wrong-operator-stderr.txt b/Tests/RunCMake/cmake_path/CONVERT-wrong-operator-stderr.txt
new file mode 100644
index 000000000..9aa75ec69
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-wrong-operator-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at CONVERT-wrong-operator.cmake:[0-9]+ \(cmake_path\):
+ cmake_path CONVERT called with an unknown action: FOO.
diff --git a/Tests/RunCMake/cmake_path/CONVERT-wrong-operator.cmake b/Tests/RunCMake/cmake_path/CONVERT-wrong-operator.cmake
new file mode 100644
index 000000000..12ffccc32
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT-wrong-operator.cmake
@@ -0,0 +1,2 @@
+
+cmake_path(CONVERT "/a/b" FOO output)
diff --git a/Tests/RunCMake/cmake_path/CONVERT.cmake b/Tests/RunCMake/cmake_path/CONVERT.cmake
new file mode 100644
index 000000000..b08bc26cf
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONVERT.cmake
@@ -0,0 +1,110 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+cmake_path(CONVERT "/x/y/z/../../a/d" TO_CMAKE_PATH_LIST output)
+if (NOT output STREQUAL "/x/y/z/../../a/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '/x/y/z/../../a/d'")
+endif()
+cmake_path(CONVERT "/x/y/z/../../a/d" TO_CMAKE_PATH_LIST output NORMALIZE)
+if (NOT output STREQUAL "/x/a/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '/x/a/d'")
+endif()
+
+if (WIN32)
+ cmake_path(CONVERT "/x\\y/z\\..\\../a/d" TO_CMAKE_PATH_LIST output)
+ if (NOT output STREQUAL "/x/y/z/../../a/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '/x/y/z/../../a/d'")
+ endif()
+ cmake_path(CONVERT "/x\\y/z\\..\\../a/d" TO_CMAKE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "/x/a/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '/x/a/d'")
+ endif()
+
+ cmake_path(CONVERT "//?/c:/x\\y/z\\..\\../a/d" TO_CMAKE_PATH_LIST output)
+ if (NOT output STREQUAL "c:/x/y/z/../../a/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of 'c:/x/y/z/../../a/d'")
+ endif()
+ cmake_path(CONVERT "//?/c:/x\\y/z\\..\\../a/d" TO_CMAKE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "c:/x/a/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of 'c:/x/a/d'")
+ endif()
+
+ cmake_path(CONVERT "//?/UNC/host/x\\y/z\\..\\../a/d" TO_CMAKE_PATH_LIST output)
+ if (NOT output STREQUAL "//host/x/y/z/../../a/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '//host/x/y/z/../../a/d'")
+ endif()
+ cmake_path(CONVERT "//?/UNC/host/x\\y/z\\..\\../a/d" TO_CMAKE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "//host/x/a/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '//host/x/a/d'")
+ endif()
+endif()
+
+if (WIN32)
+ cmake_path(CONVERT "/x\\y/z/..\\../a\\d;c:\\a/b\\c/..\\d" TO_CMAKE_PATH_LIST output)
+ if (NOT output STREQUAL "/x/y/z/../../a/d;c:/a/b/c/../d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '/x/y/z/../../a/d;c:/a/b/c/../d'")
+ endif()
+ cmake_path(CONVERT "/x\\y/z/..\\../a\\d;c:\\a/b\\c/..\\d" TO_CMAKE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "/x/a/d;c:/a/b/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '/x/a/d;c:/a/b/d'")
+ endif()
+else()
+ cmake_path(CONVERT "/x/y/z/../../a/d:/a/b/c/../d" TO_CMAKE_PATH_LIST output)
+ if (NOT output STREQUAL "/x/y/z/../../a/d;/a/b/c/../d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${outputh}' instead of '/x/y/z/../../a/d;/a/b/c/../d'")
+ endif()
+ cmake_path(CONVERT "/x/y/z/../../a/d:/a/b/c/../d" TO_CMAKE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "/x/a/d;/a/b/d")
+ list (APPEND errors "TO_CMAKE_PATH_LIST: '${output}' instead of '/x/a/d;/a/b/d'")
+ endif()
+endif()
+
+
+if (WIN32)
+ cmake_path(CONVERT "c:/a//b\\c/..\\d" TO_NATIVE_PATH_LIST output)
+ if (NOT output STREQUAL "c:\\a\\\\b\\c\\..\\d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of 'c:\\a\\\\b\\c\\..\\d'")
+ endif()
+ cmake_path(CONVERT "c:/a//b\\c/..\\d" TO_NATIVE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "c:\\a\\b\\d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of 'c:\\a\\b\\d'")
+ endif()
+
+ cmake_path(CONVERT "//host/a//b\\c/..\\d" TO_NATIVE_PATH_LIST output)
+ if (NOT output STREQUAL "\\\\host\\a\\\\b\\c\\..\\d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of '\\\\host\\a\\\\b\\c\\..\\d'")
+ endif()
+ cmake_path(CONVERT "//host/a//b\\c/..\\d" TO_NATIVE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "\\\\host\\a\\b\\d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of '\\\\host\\a\\b\\d'")
+ endif()
+ cmake_path(CONVERT "//host/a//b\\c/..\\d;c:/a//b\\c/..\\d" TO_NATIVE_PATH_LIST output)
+ if (NOT output STREQUAL "\\\\host\\a\\\\b\\c\\..\\d;c:\\a\\\\b\\c\\..\\d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of '\\\\host\\a\\\\b\\c\\..\\d;c:\\a\\\\b\\c\\..\\d'")
+ endif()
+ cmake_path(CONVERT "//host/a//b\\c/..\\d;c:/a//b\\c/..\\d" TO_NATIVE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "\\\\host\\a\\b\\d;c:\\a\\b\\d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of '\\\\host\\a\\b\\d;c:\\a\\b\\d'")
+ endif()
+else()
+ cmake_path(CONVERT "/a//b/c/../d" TO_NATIVE_PATH_LIST output)
+ if (NOT output STREQUAL "/a//b/c/../d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of '/a//b/c/../d'")
+ endif()
+ cmake_path(CONVERT "/a//b/c/../d" TO_NATIVE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "/a/b/d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of '/a/b/d'")
+ endif()
+ cmake_path(CONVERT "/x/y/z/../../a/d;/a/b/c/../d" TO_NATIVE_PATH_LIST output)
+ if (NOT output STREQUAL "/x/y/z/../../a/d:/a/b/c/../d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of '/x/y/z/../../a/d:/a/b/c/../d'")
+ endif()
+ cmake_path(CONVERT "/x/y/z/../../a/d;/a/b/c/../d" TO_NATIVE_PATH_LIST output NORMALIZE)
+ if (NOT output STREQUAL "/x/a/d:/a/b/d")
+ list (APPEND errors "TO_NATIVE_PATH_LIST: '${output}' instead of '/x/a/d:/a/b/d'")
+ endif()
+endif()
+
+
+check_errors (CONVERT ${errors})
diff --git a/Tests/RunCMake/cmake_path/GET-EXTENSION-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-EXTENSION-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-EXTENSION-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-EXTENSION-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-EXTENSION-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-EXTENSION-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-EXTENSION-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-EXTENSION-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-EXTENSION-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-EXTENSION-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-EXTENSION-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-EXTENSION-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-FILENAME-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-FILENAME-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-FILENAME-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-FILENAME-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-FILENAME-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-FILENAME-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-FILENAME-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-FILENAME-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-FILENAME-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-FILENAME-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-FILENAME-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-FILENAME-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-PARENT_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-PARENT_PATH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-PARENT_PATH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-PARENT_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-PARENT_PATH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-PARENT_PATH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-PARENT_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-PARENT_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-PARENT_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-PARENT_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-PARENT_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-PARENT_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-RELATIVE_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_DIRECTORY-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_NAME-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_NAME-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_NAME-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_NAME-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_NAME-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_NAME-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_NAME-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_NAME-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_NAME-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_NAME-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_NAME-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_NAME-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_PATH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_PATH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_PATH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_PATH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-ROOT_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-ROOT_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-ROOT_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-STEM-invalid-output-result.txt b/Tests/RunCMake/cmake_path/GET-STEM-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-STEM-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-STEM-missing-output-result.txt b/Tests/RunCMake/cmake_path/GET-STEM-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-STEM-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-STEM-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/GET-STEM-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-STEM-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-STEM-wrong-path-result.txt b/Tests/RunCMake/cmake_path/GET-STEM-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-STEM-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-wrong-operator-result.txt b/Tests/RunCMake/cmake_path/GET-wrong-operator-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-wrong-operator-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/GET-wrong-operator-stderr.txt b/Tests/RunCMake/cmake_path/GET-wrong-operator-stderr.txt
new file mode 100644
index 000000000..71afc9262
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-wrong-operator-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at GET-wrong-operator.cmake:[0-9]+ \(cmake_path\):
+ cmake_path GET called with an unknown action: FOO.
diff --git a/Tests/RunCMake/cmake_path/GET-wrong-operator.cmake b/Tests/RunCMake/cmake_path/GET-wrong-operator.cmake
new file mode 100644
index 000000000..e09d6d7d8
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET-wrong-operator.cmake
@@ -0,0 +1,3 @@
+
+set (path "/a/b")
+cmake_path(GET path FOO output)
diff --git a/Tests/RunCMake/cmake_path/GET.cmake b/Tests/RunCMake/cmake_path/GET.cmake
new file mode 100644
index 000000000..e68e65403
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/GET.cmake
@@ -0,0 +1,248 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+###############################################
+## First test with a path defining all elements
+###############################################
+if (WIN32)
+ set (path "C:/aa/bb/cc.ext1.ext2")
+else()
+ set (path "/aa/bb/cc.ext1.ext2")
+endif()
+
+cmake_path(GET path ROOT_NAME output)
+if (WIN32)
+ if (NOT output STREQUAL "C:")
+ list (APPEND errors "ROOT_NAME returns bad data: ${output}")
+ endif()
+else()
+ if (NOT output STREQUAL "")
+ list (APPEND errors "ROOT_NAME returns bad data: ${output}")
+ endif()
+endif()
+
+cmake_path(GET path ROOT_DIRECTORY output)
+if (NOT output STREQUAL "/")
+ list (APPEND errors "ROOT_DIRECTORY returns bad data: ${output}")
+endif()
+
+cmake_path(GET path ROOT_PATH output)
+if (WIN32)
+ if (NOT output STREQUAL "C:/")
+ list (APPEND errors "ROOT_PATH returns bad data: ${output}")
+ endif()
+else()
+ if (NOT output STREQUAL "/")
+ list (APPEND errors "ROOT_PATH returns bad data: ${output}")
+ endif()
+endif()
+
+cmake_path(GET path FILENAME output)
+if (NOT output STREQUAL "cc.ext1.ext2")
+ list (APPEND errors "FILENAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path EXTENSION output)
+if (NOT output STREQUAL ".ext1.ext2")
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+cmake_path(GET path EXTENSION LAST_ONLY output)
+if (NOT output STREQUAL ".ext2")
+ list (APPEND errors "EXTENSION LAST_ONLY returns bad data: ${output}")
+endif()
+
+cmake_path(GET path STEM output)
+if (NOT output STREQUAL "cc")
+ list (APPEND errors "STEM returns bad data: ${output}")
+endif()
+cmake_path(GET path STEM LAST_ONLY output)
+if (NOT output STREQUAL "cc.ext1")
+ list (APPEND errors "STEM LAST_ONLY returns bad data: ${output}")
+endif()
+
+cmake_path(GET path RELATIVE_PATH output)
+if (NOT output STREQUAL "aa/bb/cc.ext1.ext2")
+ list (APPEND errors "RELATIVE_PATH returns bad data: ${output}")
+endif()
+
+cmake_path(GET path PARENT_PATH output)
+if (WIN32)
+ if (NOT output STREQUAL "C:/aa/bb")
+ list (APPEND errors "PARENT_PATH returns bad data: ${output}")
+ endif()
+else()
+ if (NOT output STREQUAL "/aa/bb")
+ list (APPEND errors "PARENT_PATH returns bad data: ${output}")
+ endif()
+endif()
+
+######################################
+## second, tests with missing elements
+######################################
+set (path "aa/bb/")
+
+cmake_path(GET path ROOT_NAME output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "ROOT_NAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path ROOT_DIRECTORY output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "ROOT_DIRECTORY returns bad data: ${output}")
+endif()
+
+cmake_path(GET path ROOT_PATH output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "ROOT_PATH returns bad data: ${output}")
+endif()
+
+cmake_path(GET path FILENAME output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "FILENAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path EXTENSION output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+
+cmake_path(GET path STEM output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "STEM returns bad data: ${output}")
+endif()
+
+cmake_path(GET path RELATIVE_PATH output)
+if (NOT output STREQUAL path)
+ list (APPEND errors "RELATIVE_PATH returns bad data: ${output}")
+endif()
+
+cmake_path(GET path PARENT_PATH output)
+if (NOT output STREQUAL "aa/bb")
+ list (APPEND errors "PARENT_PATH returns bad data: ${output}")
+endif()
+
+##################################
+set (path "/aa/bb/")
+
+cmake_path(GET path ROOT_NAME output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "ROOT_NAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path ROOT_DIRECTORY output)
+if (NOT output STREQUAL "/")
+ list (APPEND errors "ROOT_DIRECTORY returns bad data: ${output}")
+endif()
+
+cmake_path(GET path ROOT_PATH output)
+if (NOT output STREQUAL "/")
+ list (APPEND errors "ROOT_PATH returns bad data: ${output}")
+endif()
+
+###################################
+set (path "/")
+
+cmake_path(GET path ROOT_NAME output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "ROOT_NAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path ROOT_DIRECTORY output)
+if (NOT output STREQUAL "/")
+ list (APPEND errors "ROOT_DIRECTORY returns bad data: ${output}")
+endif()
+
+cmake_path(GET path ROOT_PATH output)
+if (NOT output STREQUAL "/")
+ list (APPEND errors "ROOT_PATH returns bad data: ${output}")
+endif()
+
+cmake_path(GET path FILENAME output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "FILENAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path EXTENSION output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+
+cmake_path(GET path STEM output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "STEM returns bad data: ${output}")
+endif()
+
+cmake_path(GET path RELATIVE_PATH output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "RELATIVE_PATH returns bad data: ${output}")
+endif()
+
+cmake_path(GET path PARENT_PATH output)
+if (NOT output STREQUAL "/")
+ list (APPEND errors "PARENT_PATH returns bad data: ${output}")
+endif()
+
+###################################
+set (path ".file")
+
+cmake_path(GET path FILENAME output)
+if (NOT output STREQUAL ".file")
+ list (APPEND errors "FILENAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path EXTENSION output)
+if (NOT output STREQUAL "")
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+
+cmake_path(GET path STEM output)
+if (NOT output STREQUAL ".file")
+ list (APPEND errors "STEM returns bad data: ${output}")
+endif()
+
+###################################
+set (path ".file.ext")
+
+cmake_path(GET path FILENAME output)
+if (NOT output STREQUAL ".file.ext")
+ list (APPEND errors "FILENAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path EXTENSION output)
+if (NOT output STREQUAL ".ext")
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+cmake_path(GET path EXTENSION LAST_ONLY output)
+if (NOT output STREQUAL ".ext")
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+
+cmake_path(GET path STEM output)
+if (NOT output STREQUAL ".file")
+ list (APPEND errors "STEM returns bad data: ${output}")
+endif()
+
+###################################
+set (path ".file.ext1.ext2")
+
+cmake_path(GET path FILENAME output)
+if (NOT output STREQUAL ".file.ext1.ext2")
+ list (APPEND errors "FILENAME returns bad data: ${output}")
+endif()
+
+cmake_path(GET path EXTENSION output)
+if (NOT output STREQUAL ".ext1.ext2")
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+cmake_path(GET path EXTENSION LAST_ONLY output)
+if (NOT output STREQUAL ".ext2")
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+
+cmake_path(GET path STEM output)
+if (NOT output STREQUAL ".file")
+ list (APPEND errors "STEM returns bad data: ${output}")
+endif()
+
+check_errors (GET ${errors})
diff --git a/Tests/RunCMake/cmake_path/HASH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HASH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HASH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HASH-missing-output-result.txt b/Tests/RunCMake/cmake_path/HASH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HASH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HASH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HASH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HASH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HASH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HASH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HASH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HASH.cmake b/Tests/RunCMake/cmake_path/HASH.cmake
new file mode 100644
index 000000000..dfcf2b2a1
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HASH.cmake
@@ -0,0 +1,27 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path1 "a///b/c")
+cmake_path(HASH path1 hash1)
+set (path2 "a/b////c")
+cmake_path(HASH path2 hash2)
+if (NOT hash1 STREQUAL hash2)
+ list (APPEND errors "'hash values not equal for '${path1}' and '${path2}'")
+endif()
+
+set (path1 "a///b/c/../d")
+cmake_path(HASH path1 hash1)
+set (path2 "a/b////d")
+cmake_path(HASH path2 hash2)
+if (hash1 STREQUAL hash2)
+ list (APPEND errors "'hash values equal for '${path1}' and '${path2}'")
+endif()
+cmake_path(HASH path1 hash1 NORMALIZE)
+cmake_path(HASH path2 NORMALIZE hash2)
+if (NOT hash1 STREQUAL hash2)
+ list (APPEND errors "'hash values not equal for '${path1}' and '${path2}'")
+endif()
+
+
+check_errors (HASH ${errors})
diff --git a/Tests/RunCMake/cmake_path/HAS_EXTENSION-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_EXTENSION-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_EXTENSION-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_EXTENSION-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_EXTENSION-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_EXTENSION-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_EXTENSION-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_EXTENSION-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_EXTENSION-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_EXTENSION-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_EXTENSION-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_EXTENSION-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_FILENAME-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_FILENAME-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_FILENAME-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_FILENAME-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_FILENAME-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_FILENAME-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_FILENAME-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_FILENAME-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_FILENAME-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_FILENAME-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_FILENAME-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_FILENAME-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ITEM.cmake b/Tests/RunCMake/cmake_path/HAS_ITEM.cmake
new file mode 100644
index 000000000..eb73bd5df
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ITEM.cmake
@@ -0,0 +1,232 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "/a/b")
+cmake_path(HAS_ROOT_NAME path output)
+if (output)
+ list (APPEND errors "ROOT_NAME: ${path} has root name")
+endif()
+cmake_path(HAS_ROOT_DIRECTORY path output)
+if (NOT output)
+ list (APPEND errors "ROOT_DIRECTORY: ${path} does not have root directory")
+endif()
+cmake_path(HAS_ROOT_PATH path output)
+if (NOT output)
+ list (APPEND errors "ROOT_PATH: ${path} does not have root path")
+endif()
+
+set (path "a/b")
+cmake_path(HAS_ROOT_PATH path output)
+if (output)
+ list (APPEND errors "ROOT_PATH: ${path} has root path")
+endif()
+
+set (path "/a/b")
+cmake_path(HAS_FILENAME path output)
+if (NOT output)
+ list (APPEND errors "FILENAME: ${path} does not have filename")
+endif()
+set (path "a.b")
+cmake_path(HAS_FILENAME path output)
+if (NOT output)
+ list (APPEND errors "FILENAME: ${path} does not have filename")
+endif()
+set (path "/a/b/")
+cmake_path(HAS_FILENAME path output)
+if (output)
+ list (APPEND errors "FILENAME: ${path} has filename")
+endif()
+set (path "/")
+cmake_path(HAS_FILENAME path output)
+if (output)
+ list (APPEND errors "FILENAME: ${path} has filename")
+endif()
+
+set (path "/a/b")
+cmake_path(HAS_STEM path output)
+if (NOT output)
+ list (APPEND errors "STEM: ${path} does not have stem")
+endif()
+set (path "a.b")
+cmake_path(HAS_STEM path output)
+if (NOT output)
+ list (APPEND errors "STEM: ${path} does not have stem")
+endif()
+set (path ".a")
+cmake_path(HAS_STEM path output)
+if (NOT output)
+ list (APPEND errors "STEM: ${path} does not have stem")
+endif()
+set (path "/a/")
+cmake_path(HAS_STEM path output)
+if (output)
+ list (APPEND errors "STEM: ${path} has stem")
+endif()
+set (path "/")
+cmake_path(HAS_STEM path output)
+if (output)
+ list (APPEND errors "STEM: ${path} has stem")
+endif()
+
+set (path "/a/b.c")
+cmake_path(HAS_EXTENSION path output)
+if (NOT output)
+ list (APPEND errors "EXTENSION: ${path} does not have extension")
+endif()
+set (path "b.c")
+cmake_path(HAS_EXTENSION path output)
+if (NOT output)
+ list (APPEND errors "EXTENSION: ${path} does not have extension")
+endif()
+set (path "/.a")
+cmake_path(HAS_EXTENSION path output)
+if (output)
+ list (APPEND errors "EXTENSION: ${path} has extension")
+endif()
+set (path "/a/")
+cmake_path(HAS_EXTENSION path output)
+if (output)
+ list (APPEND errors "EXTENSION: ${path} has extension")
+endif()
+set (path "/")
+cmake_path(HAS_EXTENSION path output)
+if (output)
+ list (APPEND errors "EXTENSION: ${path} has extension")
+endif()
+
+set (path "/a/b")
+cmake_path(HAS_RELATIVE_PATH path output)
+if (NOT output)
+ list (APPEND errors "RELATIVE_PATH: ${path} does not have relative path")
+endif()
+set (path "/")
+cmake_path(HAS_RELATIVE_PATH path output)
+if (output)
+ list (APPEND errors "RELATIVE_PATH: ${path} has relative path")
+endif()
+
+set (path "/a/b")
+cmake_path(HAS_PARENT_PATH path output)
+if (NOT output)
+ list (APPEND errors "PARENT_PATH: ${path} does not have parent path")
+endif()
+set (path "/")
+cmake_path(HAS_PARENT_PATH path output)
+if (NOT output)
+ list (APPEND errors "PARENT_PATH: ${path} does not have parent path")
+endif()
+set (path "a")
+cmake_path(HAS_PARENT_PATH path output)
+if (output)
+ list (APPEND errors "PARENT_PATH: ${path} has parent path")
+endif()
+
+if (WIN32)
+ set (path "c:/a/b")
+ cmake_path(HAS_ROOT_NAME path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_NAME: ${path} does not have root name")
+ endif()
+ cmake_path(HAS_ROOT_DIRECTORY path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_DIRECTORY: ${path} does not have root directory")
+ endif()
+ cmake_path(HAS_ROOT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_PATH: ${path} does not have root path")
+ endif()
+
+ set (path "c:a/b")
+ cmake_path(HAS_ROOT_NAME path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_NAME: ${path} does not have root name")
+ endif()
+ cmake_path(HAS_ROOT_DIRECTORY path output)
+ if (output)
+ list (APPEND errors "ROOT_DIRECTORY: ${path} has root directory")
+ endif()
+ cmake_path(HAS_ROOT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_PATH: ${path} does not have root path")
+ endif()
+
+ set (path "//host/b")
+ cmake_path(HAS_ROOT_NAME path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_NAME: ${path} does not have root name")
+ endif()
+ cmake_path(HAS_ROOT_DIRECTORY path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_DIRECTORY: ${path} does not have root directory")
+ endif()
+ cmake_path(HAS_ROOT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_PATH: ${path} does not have root path")
+ endif()
+
+ set (path "//host")
+ cmake_path(HAS_ROOT_NAME path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_NAME: ${path} does not have root name")
+ endif()
+ cmake_path(HAS_ROOT_DIRECTORY path output)
+ if (output)
+ list (APPEND errors "ROOT_DIRECTORY: ${path} has root directory")
+ endif()
+ cmake_path(HAS_ROOT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "ROOT_PATH: ${path} does not have root path")
+ endif()
+
+ set (path "c:/a/b")
+ cmake_path(HAS_RELATIVE_PATH path output)
+ if (NOT output)
+ list (APPEND errors "RELATIVE_PATH: ${path} does not have relative path")
+ endif()
+
+ set (path "c:a/b")
+ cmake_path(HAS_RELATIVE_PATH path output)
+ if (NOT output)
+ list (APPEND errors "RELATIVE_PATH: ${path} does not have relative path")
+ endif()
+
+ set (path "//host/b")
+ cmake_path(HAS_RELATIVE_PATH path output)
+ if (NOT output)
+ list (APPEND errors "RELATIVE_PATH: ${path} does not have relative path")
+ endif()
+
+ set (path "c:/a/b")
+ cmake_path(HAS_PARENT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "PARENT_PATH: ${path} does not have parent path")
+ endif()
+
+ set (path "c:/")
+ cmake_path(HAS_PARENT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "PARENT_PATH: ${path} does not have parent path")
+ endif()
+
+ set (path "c:")
+ cmake_path(HAS_PARENT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "PARENT_PATH: ${path} does not have parent path")
+ endif()
+
+ set (path "//host/")
+ cmake_path(HAS_PARENT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "PARENT_PATH: ${path} does not have parent path")
+ endif()
+
+ set (path "//host")
+ cmake_path(HAS_PARENT_PATH path output)
+ if (NOT output)
+ list (APPEND errors "PARENT_PATH: ${path} does not have parent path")
+ endif()
+endif()
+
+
+check_errors (HAS ${errors})
diff --git a/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_PARENT_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_RELATIVE_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_DIRECTORY-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_NAME-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_ROOT_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_STEM-invalid-output-result.txt b/Tests/RunCMake/cmake_path/HAS_STEM-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_STEM-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_STEM-missing-output-result.txt b/Tests/RunCMake/cmake_path/HAS_STEM-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_STEM-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_STEM-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/HAS_STEM-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_STEM-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/HAS_STEM-wrong-path-result.txt b/Tests/RunCMake/cmake_path/HAS_STEM-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/HAS_STEM-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_ABSOLUTE-invalid-output-result.txt b/Tests/RunCMake/cmake_path/IS_ABSOLUTE-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_ABSOLUTE-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_ABSOLUTE-missing-output-result.txt b/Tests/RunCMake/cmake_path/IS_ABSOLUTE-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_ABSOLUTE-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_ABSOLUTE-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/IS_ABSOLUTE-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_ABSOLUTE-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_ABSOLUTE-wrong-path-result.txt b/Tests/RunCMake/cmake_path/IS_ABSOLUTE-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_ABSOLUTE-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_ABSOLUTE.cmake b/Tests/RunCMake/cmake_path/IS_ABSOLUTE.cmake
new file mode 100644
index 000000000..794e78637
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_ABSOLUTE.cmake
@@ -0,0 +1,48 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+if (WIN32)
+ set (path "c:/a")
+else()
+ set (path "/a")
+endif()
+cmake_path(IS_ABSOLUTE path output)
+if (NOT output)
+ list (APPEND errors "'${path} is not absolute")
+endif()
+
+set (path "a/b")
+cmake_path(IS_ABSOLUTE path output)
+if (output)
+ list (APPEND errors "'${path} is absolute")
+endif()
+
+if (WIN32)
+ set (path "c:/a/b")
+ cmake_path(IS_ABSOLUTE path output)
+ if (NOT output)
+ list (APPEND errors "'${path} is not absolute")
+ endif()
+
+ set (path "//host/b")
+ cmake_path(IS_ABSOLUTE path output)
+ if (NOT output)
+ list (APPEND errors "'${path} is not absolute")
+ endif()
+
+ set (path "/a")
+ cmake_path(IS_ABSOLUTE path output)
+ if (output)
+ list (APPEND errors "'${path} is absolute")
+ endif()
+
+ set (path "c:a")
+ cmake_path(IS_ABSOLUTE path output)
+ if (output)
+ list (APPEND errors "'${path} is absolute")
+ endif()
+endif()
+
+
+check_errors (IS_ABSOLUTE ${errors})
diff --git a/Tests/RunCMake/cmake_path/IS_PREFIX-invalid-output-result.txt b/Tests/RunCMake/cmake_path/IS_PREFIX-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_PREFIX-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_PREFIX-missing-output-result.txt b/Tests/RunCMake/cmake_path/IS_PREFIX-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_PREFIX-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_PREFIX-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/IS_PREFIX-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_PREFIX-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_PREFIX-wrong-path-result.txt b/Tests/RunCMake/cmake_path/IS_PREFIX-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_PREFIX-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_PREFIX.cmake b/Tests/RunCMake/cmake_path/IS_PREFIX.cmake
new file mode 100644
index 000000000..53da93bc9
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_PREFIX.cmake
@@ -0,0 +1,22 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "a///b/c")
+cmake_path(IS_PREFIX path "a/b/c/d" output)
+if (NOT output)
+ list (APPEND errors "'${path} is not prefix of 'a/b/c/d'")
+endif()
+
+set (path "a///b/c/../d")
+cmake_path(IS_PREFIX path "a/b/d/e" output)
+if (output)
+ list (APPEND errors "'${path} is prefix of 'a/b/d/e'")
+endif()
+cmake_path(IS_PREFIX path "a/b/d/e" NORMALIZE output)
+if (NOT output)
+ list (APPEND errors "'${path} is not prefix of 'a/b/d/e'")
+endif()
+
+
+check_errors (IS_PREFIX ${errors})
diff --git a/Tests/RunCMake/cmake_path/IS_RELATIVE-invalid-output-result.txt b/Tests/RunCMake/cmake_path/IS_RELATIVE-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_RELATIVE-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_RELATIVE-missing-output-result.txt b/Tests/RunCMake/cmake_path/IS_RELATIVE-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_RELATIVE-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_RELATIVE-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/IS_RELATIVE-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_RELATIVE-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_RELATIVE-wrong-path-result.txt b/Tests/RunCMake/cmake_path/IS_RELATIVE-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_RELATIVE-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/IS_RELATIVE.cmake b/Tests/RunCMake/cmake_path/IS_RELATIVE.cmake
new file mode 100644
index 000000000..ad1225390
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/IS_RELATIVE.cmake
@@ -0,0 +1,48 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+if (WIN32)
+ set (path "c:/a")
+else()
+ set (path "/a")
+endif()
+cmake_path(IS_RELATIVE path output)
+if (output)
+ list (APPEND errors "'${path} is relative")
+endif()
+
+set (path "a/b")
+cmake_path(IS_RELATIVE path output)
+if (NOT output)
+ list (APPEND errors "'${path} is not relative")
+endif()
+
+if (WIN32)
+ set (path "c:/a/b")
+ cmake_path(IS_RELATIVE path output)
+ if (output)
+ list (APPEND errors "'${path} is relative")
+ endif()
+
+ set (path "//host/b")
+ cmake_path(IS_RELATIVE path output)
+ if (output)
+ list (APPEND errors "'${path} is relative")
+ endif()
+
+ set (path "/a")
+ cmake_path(IS_RELATIVE path output)
+ if (NOT output)
+ list (APPEND errors "'${path} is not relative")
+ endif()
+
+ set (path "c:a")
+ cmake_path(IS_RELATIVE path output)
+ if (NOT output)
+ list (APPEND errors "'${path} is not relative")
+ endif()
+endif()
+
+
+check_errors (IS_RELATIVE ${errors})
diff --git a/Tests/RunCMake/cmake_path/NATIVE_PATH-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/NATIVE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NATIVE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NATIVE_PATH-invalid-output-result.txt b/Tests/RunCMake/cmake_path/NATIVE_PATH-invalid-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NATIVE_PATH-invalid-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NATIVE_PATH-missing-output-result.txt b/Tests/RunCMake/cmake_path/NATIVE_PATH-missing-output-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NATIVE_PATH-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NATIVE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/NATIVE_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NATIVE_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NATIVE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/NATIVE_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NATIVE_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NATIVE_PATH.cmake b/Tests/RunCMake/cmake_path/NATIVE_PATH.cmake
new file mode 100644
index 000000000..066c44dc5
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NATIVE_PATH.cmake
@@ -0,0 +1,37 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+if (WIN32)
+ set (path "c:/a//b\\c/..\\d")
+ cmake_path(NATIVE_PATH path output)
+ if (NOT output STREQUAL "c:\\a\\\\b\\c\\..\\d")
+ list (APPEND errors "'${output}' instead of 'c:\\a\\\\b\\c\\..\\d'")
+ endif()
+ cmake_path(NATIVE_PATH path output NORMALIZE)
+ if (NOT output STREQUAL "c:\\a\\b\\d")
+ list (APPEND errors "'${output}' instead of 'c:\\a\\b\\d'")
+ endif()
+
+ set (path "//host/a//b\\c/..\\d")
+ cmake_path(NATIVE_PATH path output)
+ if (NOT output STREQUAL "\\\\host\\a\\\\b\\c\\..\\d")
+ list (APPEND errors "'${output}' instead of '\\\\host\\a\\\\b\\c\\..\\d'")
+ endif()
+ cmake_path(NATIVE_PATH path output NORMALIZE)
+ if (NOT output STREQUAL "\\\\host\\a\\b\\d")
+ list (APPEND errors "'${output}' instead of '\\\\host\\a\\b\\d'")
+ endif()
+else()
+ set (path "/a//b/c/../d")
+ cmake_path(NATIVE_PATH path output)
+ if (NOT output STREQUAL "/a//b/c/../d")
+ list (APPEND errors "'${output}' instead of '/a//b/c/../d'")
+ endif()
+ cmake_path(NATIVE_PATH path NORMALIZE output)
+ if (NOT output STREQUAL "/a/b/d")
+ list (APPEND errors "'${output}' instead of '/a/b/d'")
+ endif()
+endif()
+
+check_errors (NATIVE_PATH ${errors})
diff --git a/Tests/RunCMake/cmake_path/NORMAL_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/NORMAL_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NORMAL_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NORMAL_PATH-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/NORMAL_PATH-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NORMAL_PATH-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NORMAL_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/NORMAL_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NORMAL_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NORMAL_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/NORMAL_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NORMAL_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/NORMAL_PATH.cmake b/Tests/RunCMake/cmake_path/NORMAL_PATH.cmake
new file mode 100644
index 000000000..88db76ae7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/NORMAL_PATH.cmake
@@ -0,0 +1,46 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "a/./b/..")
+cmake_path(NORMAL_PATH path)
+if (NOT path STREQUAL "a/")
+ list (APPEND errors "'${path}' instead of 'a/'")
+endif()
+
+set (path "a/.///b/../")
+cmake_path(NORMAL_PATH path)
+if (NOT path STREQUAL "a/")
+ list (APPEND errors "'${path}' instead of 'a/'")
+endif()
+
+set (path "a/.///b/../")
+cmake_path(NORMAL_PATH path OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "a/.///b/../")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "a/")
+ list (APPEND errors "'${output}' instead of 'a/'")
+endif()
+
+if (WIN32)
+ set (path "//host/./b/..")
+ cmake_path(NORMAL_PATH path)
+ if (NOT path STREQUAL "//host/")
+ list (APPEND errors "'${path}' instead of '//host/'")
+ endif()
+
+ set (path "//host/./b/../")
+ cmake_path(NORMAL_PATH path)
+ if (NOT path STREQUAL "//host/")
+ list (APPEND errors "'${path}' instead of '//host/'")
+ endif()
+
+ set (path "c://a/.///b/../")
+ cmake_path(NORMAL_PATH path)
+ if (NOT path STREQUAL "c:/a/")
+ list (APPEND errors "'${path}' instead of 'c:/a/'")
+ endif()
+endif()
+
+check_errors (NORMAL_PATH ${errors})
diff --git a/Tests/RunCMake/cmake_path/OUTPUT_VARIABLE-no-arg-stderr.txt b/Tests/RunCMake/cmake_path/OUTPUT_VARIABLE-no-arg-stderr.txt
new file mode 100644
index 000000000..e1d6592cf
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/OUTPUT_VARIABLE-no-arg-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .+/cmake_path/call-cmake_path.cmake:[0-9]+ \(cmake_path\):
+ cmake_path OUTPUT_VARIABLE requires an argument.
diff --git a/Tests/RunCMake/cmake_path/PROXIMATE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/PROXIMATE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/PROXIMATE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/PROXIMATE_PATH-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/PROXIMATE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/PROXIMATE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/PROXIMATE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/PROXIMATE_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/PROXIMATE_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/PROXIMATE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/PROXIMATE_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/PROXIMATE_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/PROXIMATE_PATH.cmake b/Tests/RunCMake/cmake_path/PROXIMATE_PATH.cmake
new file mode 100644
index 000000000..ad2337764
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/PROXIMATE_PATH.cmake
@@ -0,0 +1,41 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+if (WIN32)
+ set (path "c:/a/d")
+ cmake_path(PROXIMATE_PATH path BASE_DIRECTORY "e/d/c")
+ if (NOT path STREQUAL "c:/a/d")
+ list (APPEND errors "'${path}' instead of 'c:/a/d'")
+ endif()
+else()
+ set (path "/a/d")
+ cmake_path(PROXIMATE_PATH path BASE_DIRECTORY "e/d/c")
+ if (NOT path STREQUAL "/a/d")
+ list (APPEND errors "'${path}' instead of '/a/d'")
+ endif()
+endif()
+
+set (path "/a/d")
+cmake_path(PROXIMATE_PATH path BASE_DIRECTORY "/a/b/c" OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "/a/d")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "../../d")
+ list (APPEND errors "'${output}' instead of '../../d'")
+endif()
+
+set (path "${CMAKE_CURRENT_SOURCE_DIR}/a/d")
+cmake_path(PROXIMATE_PATH path)
+if (NOT path STREQUAL "a/d")
+ list (APPEND errors "'${path}' instead of 'a/d'")
+endif()
+
+set (path "a/b/c")
+cmake_path(PROXIMATE_PATH path)
+if (NOT path STREQUAL "a/b/c")
+ list (APPEND errors "'${path}' instead of 'a/b/c'")
+endif()
+
+
+check_errors (PROXIMATE_PATH ${errors})
diff --git a/Tests/RunCMake/cmake_path/RELATIVE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/RELATIVE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/RELATIVE_PATH-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/RELATIVE_PATH-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/RELATIVE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/RELATIVE_PATH-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/RELATIVE_PATH-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/RELATIVE_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/RELATIVE_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/RELATIVE_PATH-wrong-path-result.txt b/Tests/RunCMake/cmake_path/RELATIVE_PATH-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/RELATIVE_PATH-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/RELATIVE_PATH.cmake b/Tests/RunCMake/cmake_path/RELATIVE_PATH.cmake
new file mode 100644
index 000000000..522a8991b
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/RELATIVE_PATH.cmake
@@ -0,0 +1,76 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "/a//d")
+cmake_path(RELATIVE_PATH path BASE_DIRECTORY "/a/b/c")
+if (NOT path STREQUAL "../../d")
+ list (APPEND errors "'${path}' instead of '../../d'")
+endif()
+
+set (path "/a//b///c")
+cmake_path(RELATIVE_PATH path BASE_DIRECTORY "/a/d")
+if (NOT path STREQUAL "../b/c")
+ list (APPEND errors "'${path}' instead of '../b/c'")
+endif()
+
+set (path "a/b/c")
+cmake_path(RELATIVE_PATH path BASE_DIRECTORY "a")
+if (NOT path STREQUAL "b/c")
+ list (APPEND errors "'${path}' instead of 'b/c'")
+endif()
+
+set (path "a/b/c")
+cmake_path(RELATIVE_PATH path BASE_DIRECTORY "a/b/c/x/y")
+if (NOT path STREQUAL "../..")
+ list (APPEND errors "'${path}' instead of '../..'")
+endif()
+
+set (path "a/b/c")
+cmake_path(RELATIVE_PATH path BASE_DIRECTORY "a/b/c")
+if (NOT path STREQUAL ".")
+ list (APPEND errors "'${path}' instead of '.'")
+endif()
+
+set (path "a/b")
+cmake_path(RELATIVE_PATH path BASE_DIRECTORY "c/d")
+if (NOT path STREQUAL "../../a/b")
+ list (APPEND errors "'${path}' instead of '../../a/b'")
+endif()
+
+set (path "${CMAKE_CURRENT_SOURCE_DIR}/../../b")
+cmake_path(RELATIVE_PATH path)
+if (NOT path STREQUAL "../../b")
+ list (APPEND errors "'${path}' instead of '../../b'")
+endif()
+
+set (path "${CMAKE_CURRENT_SOURCE_DIR}/../../b")
+cmake_path(RELATIVE_PATH path OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/../../b")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "../../b")
+ list (APPEND errors "'${output}' instead of '../../b'")
+endif()
+
+if (WIN32)
+ set (path "/a/d")
+ cmake_path(RELATIVE_PATH path BASE_DIRECTORY "e/d/c")
+ if (NOT path STREQUAL "/a/d")
+ list (APPEND errors "'${path}' instead of '/a/d'")
+ endif()
+
+ set (path "c:/a/d")
+ cmake_path(RELATIVE_PATH path BASE_DIRECTORY "e/d/c")
+ if (NOT path STREQUAL "")
+ list (APPEND errors "'${path}' instead of ''")
+ endif()
+elseif()
+ set (path "/a/d")
+ cmake_path(RELATIVE_PATH path BASE_DIRECTORY "e/d/c")
+ if (NOT path STREQUAL "")
+ list (APPEND errors "'${path}' instead of ''")
+ endif()
+endif()
+
+check_errors (RELATIVE_PATH ${errors})
diff --git a/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-wrong-path-result.txt b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REMOVE_EXTENSION.cmake b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION.cmake
new file mode 100644
index 000000000..ac06fde64
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_EXTENSION.cmake
@@ -0,0 +1,52 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "a/b/c.e.f")
+cmake_path (REMOVE_EXTENSION path)
+if (NOT path STREQUAL "a/b/c")
+ list (APPEND errors "'${path}' instead of 'a/b/c'")
+endif()
+
+set (path "a/b/c.e.f")
+cmake_path (REMOVE_EXTENSION path LAST_ONLY)
+if (NOT path STREQUAL "a/b/c.e")
+ list (APPEND errors "'${path}' instead of 'a/b/c.e'")
+endif()
+cmake_path (REMOVE_EXTENSION path)
+if (NOT path STREQUAL "a/b/c")
+ list (APPEND errors "'${path}' instead of 'a/b/c'")
+endif()
+
+set (path "a/b/c.e.f")
+cmake_path (REMOVE_EXTENSION path OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "a/b/c.e.f")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "a/b/c")
+ list (APPEND errors "'${output}' instead of 'a/b/'")
+endif()
+
+set (path "a/b/c")
+cmake_path (REMOVE_EXTENSION path)
+if (NOT path STREQUAL "a/b/c")
+ list (APPEND errors "'${path}' instead of 'a/b/c'")
+endif()
+
+set (path "a/b/.c")
+cmake_path (REMOVE_EXTENSION path)
+if (NOT path STREQUAL "a/b/.c")
+ list (APPEND errors "'${path}' instead of 'a/b/.c'")
+endif()
+cmake_path (REMOVE_EXTENSION path LAST_ONLY)
+if (NOT path STREQUAL "a/b/.c")
+ list (APPEND errors "'${path}' instead of 'a/b/.c'")
+endif()
+
+set (path "a/b/.")
+cmake_path (REMOVE_EXTENSION path LAST_ONLY)
+if (NOT path STREQUAL "a/b/.")
+ list (APPEND errors "'${path}' instead of 'a/b/.'")
+endif()
+
+check_errors (REMOVE_EXTENSION ${errors})
diff --git a/Tests/RunCMake/cmake_path/REMOVE_FILENAME-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/REMOVE_FILENAME-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_FILENAME-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REMOVE_FILENAME-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/REMOVE_FILENAME-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_FILENAME-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REMOVE_FILENAME-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/REMOVE_FILENAME-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_FILENAME-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REMOVE_FILENAME-wrong-path-result.txt b/Tests/RunCMake/cmake_path/REMOVE_FILENAME-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_FILENAME-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REMOVE_FILENAME.cmake b/Tests/RunCMake/cmake_path/REMOVE_FILENAME.cmake
new file mode 100644
index 000000000..385dcd0fd
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REMOVE_FILENAME.cmake
@@ -0,0 +1,25 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "a/b/c.e.f")
+cmake_path (REMOVE_FILENAME path)
+if (NOT path STREQUAL "a/b/")
+ list (APPEND errors "'${path}' instead of 'a/b/'")
+endif()
+
+cmake_path (REMOVE_FILENAME path)
+if (NOT path STREQUAL "a/b/")
+ list (APPEND errors "'${path}' instead of 'a/b/'")
+endif()
+
+set (path "a/b/c.e.f")
+cmake_path (REMOVE_FILENAME path OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "a/b/c.e.f")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "a/b/")
+ list (APPEND errors "'${output}' instead of 'a/b/'")
+endif()
+
+check_errors (REMOVE_FILENAME ${errors})
diff --git a/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-wrong-path-result.txt b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REPLACE_EXTENSION.cmake b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION.cmake
new file mode 100644
index 000000000..45c15750d
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_EXTENSION.cmake
@@ -0,0 +1,58 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "a/b/c.e.f")
+cmake_path (REPLACE_EXTENSION path ".x")
+if (NOT path STREQUAL "a/b/c.x")
+ list (APPEND errors "'${path}' instead of 'a/b/c.x'")
+endif()
+cmake_path (REPLACE_EXTENSION path ".y")
+if (NOT path STREQUAL "a/b/c.y")
+ list (APPEND errors "'${path}' instead of 'a/b/c.y'")
+endif()
+cmake_path (REPLACE_EXTENSION path "")
+if (NOT path STREQUAL "a/b/c")
+ list (APPEND errors "'${path}' instead of 'a/b/c'")
+endif()
+
+set (path "a/b/c.e.f")
+cmake_path (REPLACE_EXTENSION path ".x" LAST_ONLY)
+if (NOT path STREQUAL "a/b/c.e.x")
+ list (APPEND errors "'${path}' instead of 'a/b/c.e.x'")
+endif()
+cmake_path (REPLACE_EXTENSION path ".y" LAST_ONLY)
+if (NOT path STREQUAL "a/b/c.e.y")
+ list (APPEND errors "'${path}' instead of 'a/b/c.e.y'")
+endif()
+cmake_path (REPLACE_EXTENSION path "" LAST_ONLY)
+if (NOT path STREQUAL "a/b/c.e")
+ list (APPEND errors "'${path}' instead of 'a/b/c.e'")
+endif()
+
+set (path "/a/.b")
+cmake_path (REPLACE_EXTENSION path ".x")
+if (NOT path STREQUAL "/a/.b.x")
+ list (APPEND errors "'${path}' instead of '/a/.b.x'")
+endif()
+cmake_path (REPLACE_EXTENSION path ".x" LAST_ONLY)
+if (NOT path STREQUAL "/a/.b.x")
+ list (APPEND errors "'${path}' instead of '/a/.b.x'")
+endif()
+
+set (path "/a/b")
+cmake_path (REPLACE_EXTENSION path ".x")
+if (NOT path STREQUAL "/a/b.x")
+ list (APPEND errors "'${path}' instead of '/a/b.x'")
+endif()
+
+set (path "/a/b/")
+cmake_path (REPLACE_EXTENSION path ".x" OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "/a/b/")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "/a/b/.x")
+ list (APPEND errors "'${output}' instead of '/a/b/.x'")
+endif()
+
+check_errors (REPLACE_EXTENSION ${errors})
diff --git a/Tests/RunCMake/cmake_path/REPLACE_FILENAME-OUTPUT_VARIABLE-invalid-arg-result.txt b/Tests/RunCMake/cmake_path/REPLACE_FILENAME-OUTPUT_VARIABLE-invalid-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_FILENAME-OUTPUT_VARIABLE-invalid-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REPLACE_FILENAME-OUTPUT_VARIABLE-no-arg-result.txt b/Tests/RunCMake/cmake_path/REPLACE_FILENAME-OUTPUT_VARIABLE-no-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_FILENAME-OUTPUT_VARIABLE-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REPLACE_FILENAME-unexpected-arg-result.txt b/Tests/RunCMake/cmake_path/REPLACE_FILENAME-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_FILENAME-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REPLACE_FILENAME-wrong-path-result.txt b/Tests/RunCMake/cmake_path/REPLACE_FILENAME-wrong-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_FILENAME-wrong-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_path/REPLACE_FILENAME.cmake b/Tests/RunCMake/cmake_path/REPLACE_FILENAME.cmake
new file mode 100644
index 000000000..f7a9600a0
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/REPLACE_FILENAME.cmake
@@ -0,0 +1,26 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "a/b/c.e.f")
+cmake_path (REPLACE_FILENAME path "x.y")
+if (NOT path STREQUAL "a/b/x.y")
+ list (APPEND errors "'${path}' instead of 'a/b/x.y'")
+endif()
+
+set (path "a/b/")
+cmake_path (REPLACE_FILENAME path "x.y")
+if (NOT path STREQUAL "a/b/")
+ list (APPEND errors "'${path}' instead of 'a/b/'")
+endif()
+
+set (path "a/b/c.e.f")
+cmake_path (REPLACE_FILENAME path "" OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "a/b/c.e.f")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "a/b/")
+ list (APPEND errors "'${output}' instead of 'a/b/'")
+endif()
+
+check_errors (REPLACE_FILENAME ${errors})
diff --git a/Tests/RunCMake/cmake_path/RunCMakeTest.cmake b/Tests/RunCMake/cmake_path/RunCMakeTest.cmake
new file mode 100644
index 000000000..ca9cba66a
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/RunCMakeTest.cmake
@@ -0,0 +1,191 @@
+include(RunCMake)
+
+# Validate parsing arguments
+
+## input path is not a variable
+set (RunCMake-stderr-file "wrong-path-stderr.txt")
+
+### GET sub-command
+foreach (subcommand IN ITEMS ROOT_NAME ROOT_DIRECTORY ROOT_PATH FILENAME EXTENSION
+ STEM RELATIVE_PATH PARENT_PATH)
+ run_cmake_command (GET-${subcommand}-wrong-path "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=GET wrong_path ${subcommand} output" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+### COMPARE sub-command
+foreach (subcommand IN ITEMS EQUAL NOT_EQUAL)
+ run_cmake_command (COMPARE-${subcommand}-wrong-path "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=COMPARE wrong_path ${subcommand} path2 output" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+foreach (command IN ITEMS CONCAT REMOVE_FILENAME REPLACE_FILENAME
+ REMOVE_EXTENSION REPLACE_EXTENSION NORMAL_PATH
+ RELATIVE_PATH PROXIMATE_PATH ABSOLUTE_PATH)
+ run_cmake_command (${command}-wrong-path "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} wrong_path" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+foreach (command IN ITEMS NATIVE_PATH
+ HAS_ROOT_NAME HAS_ROOT_DIRECTORY HAS_ROOT_PATH
+ HAS_FILENAME HAS_EXTENSION HAS_STEM
+ HAS_RELATIVE_PATH HAS_PARENT_PATH
+ IS_ABSOLUTE IS_RELATIVE IS_PREFIX HASH)
+ if (command STREQUAL "IS_PREFIX")
+ set (extra_args path2)
+ else()
+ unset (extra_args)
+ endif()
+ run_cmake_command (${command}-wrong-path "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} wrong_path ${extra_args} output" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+
+## missing output parameter
+set (RunCMake-stderr-file "missing-output-stderr.txt")
+
+### GET sub-command
+foreach (subcommand IN ITEMS ROOT_NAME ROOT_DIRECTORY ROOT_PATH FILENAME EXTENSION
+ STEM RELATIVE_PATH PARENT_PATH)
+ run_cmake_command (GET-${subcommand}-missing-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=GET path ${subcommand}" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+### CONVERT sub-command
+foreach (subcommand IN ITEMS TO_CMAKE_PATH_LIST TO_NATIVE_PATH_LIST)
+ run_cmake_command (CONVERT-${subcommand}-missing-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=CONVERT path ${subcommand}" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+### COMPARE sub-command
+foreach (subcommand IN ITEMS EQUAL NOT_EQUAL)
+ run_cmake_command (COMPARE-${subcommand}-missing-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=COMPARE path ${subcommand} path2" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+foreach (command IN ITEMS CMAKE_PATH NATIVE_PATH
+ HAS_ROOT_NAME HAS_ROOT_DIRECTORY HAS_ROOT_PATH
+ HAS_FILENAME HAS_EXTENSION HAS_STEM
+ HAS_RELATIVE_PATH HAS_PARENT_PATH
+ IS_ABSOLUTE IS_RELATIVE IS_PREFIX HASH)
+ if (command STREQUAL "IS_PREFIX")
+ set (extra_args path2)
+ else()
+ unset (extra_args)
+ endif()
+ run_cmake_command (${command}-missing-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} path ${extra_args}" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+
+## OUTPUT_VARIABLE without argument
+set (RunCMake-stderr-file "OUTPUT_VARIABLE-no-arg-stderr.txt")
+
+foreach (command IN ITEMS APPEND CONCAT REMOVE_FILENAME REPLACE_FILENAME
+ REMOVE_EXTENSION REPLACE_EXTENSION NORMAL_PATH
+ RELATIVE_PATH PROXIMATE_PATH ABSOLUTE_PATH)
+ run_cmake_command (${command}-OUTPUT_VARIABLE-no-arg "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} path OUTPUT_VARIABLE" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+
+## Invalid output variable
+set (RunCMake-stderr-file "invalid-output-var-stderr.txt")
+
+### GET sub-command
+foreach (subcommand IN ITEMS ROOT_NAME ROOT_DIRECTORY ROOT_PATH FILENAME EXTENSION
+ STEM RELATIVE_PATH PARENT_PATH)
+ run_cmake_command (GET-${subcommand}-invalid-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=GET path ${subcommand}" -DCHECK_INVALID_OUTPUT=ON -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+### CONVERT sub-command
+foreach (subcommand IN ITEMS TO_CMAKE_PATH_LIST TO_NATIVE_PATH_LIST)
+ run_cmake_command (CONVERT-${subcommand}-invalid-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=CONVERT path ${subcommand}" -DCHECK_INVALID_OUTPUT=ON -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+### COMPARE sub-command
+foreach (subcommand IN ITEMS EQUAL NOT_EQUAL)
+ run_cmake_command (COMPARE-${subcommand}-invalid-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=COMPARE path ${subcommand} path2" -DCHECK_INVALID_OUTPUT=ON -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+foreach (command IN ITEMS CMAKE_PATH NATIVE_PATH
+ HAS_ROOT_NAME HAS_ROOT_DIRECTORY HAS_ROOT_PATH
+ HAS_FILENAME HAS_EXTENSION HAS_STEM
+ HAS_RELATIVE_PATH HAS_PARENT_PATH
+ IS_ABSOLUTE IS_RELATIVE IS_PREFIX HASH)
+ if (command STREQUAL "IS_PREFIX")
+ set (extra_args path2)
+ else()
+ unset (extra_args)
+ endif()
+ run_cmake_command (${command}-invalid-output "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} path ${extra_args}" -DCHECK_INVALID_OUTPUT=ON -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+foreach (command IN ITEMS APPEND CONCAT REMOVE_FILENAME REPLACE_FILENAME
+ REMOVE_EXTENSION REPLACE_EXTENSION NORMAL_PATH
+ RELATIVE_PATH PROXIMATE_PATH ABSOLUTE_PATH)
+ run_cmake_command (${command}-OUTPUT_VARIABLE-invalid-arg "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} path OUTPUT_VARIABLE" -DCHECK_INVALID_OUTPUT=ON -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+
+## Unexpected arguments
+set (RunCMake-stderr-file "unexpected-arg-stderr.txt")
+
+### GET sub-command
+foreach (subcommand IN ITEMS ROOT_NAME ROOT_DIRECTORY ROOT_PATH FILENAME EXTENSION
+ STEM RELATIVE_PATH PARENT_PATH)
+ if (subcommand STREQUAL "EXTENSION" OR subcommand STREQUAL "STEM")
+ set (extra_args LAST_ONLY)
+ else()
+ unset (extra_args)
+ endif()
+ run_cmake_command (GET-${subcommand}-unexpected-arg "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=GET path ${subcommand} ${extra_args} unexpected output" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+### CONVERT sub-command
+foreach (subcommand IN ITEMS TO_CMAKE_PATH_LIST TO_NATIVE_PATH_LIST)
+ run_cmake_command (CONVERT-${subcommand}-unexpected-arg "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=CONVERT path ${subcommand} output unexpected" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+foreach (command IN ITEMS REMOVE_FILENAME REPLACE_FILENAME
+ REMOVE_EXTENSION REPLACE_EXTENSION NORMAL_PATH
+ RELATIVE_PATH PROXIMATE_PATH ABSOLUTE_PATH)
+ if (command STREQUAL "REPLACE_FILENAME" OR command STREQUAL "REPLACE_EXTENSION")
+ set (extra_args input)
+ else()
+ unset (extra_args)
+ endif()
+ run_cmake_command (${command}-unexpected-arg "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} path ${extra_args} unexpected" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+
+foreach (command IN ITEMS CMAKE_PATH NATIVE_PATH
+ HAS_ROOT_NAME HAS_ROOT_DIRECTORY HAS_ROOT_PATH
+ HAS_FILENAME HAS_EXTENSION HAS_STEM
+ HAS_RELATIVE_PATH HAS_PARENT_PATH
+ IS_ABSOLUTE IS_RELATIVE IS_PREFIX
+ HASH)
+ if (command STREQUAL "IS_PREFIX")
+ set (extra_args input)
+ else()
+ unset (extra_args)
+ endif()
+ run_cmake_command (${command}-unexpected-arg "${CMAKE_COMMAND}" "-DCMAKE_PATH_ARGUMENTS=${command} path ${extra_args} unexpected output" -P "${RunCMake_SOURCE_DIR}/call-cmake_path.cmake")
+endforeach()
+unset (RunCMake-stderr-file)
+
+run_cmake(GET-wrong-operator)
+run_cmake(CONVERT-wrong-operator)
+run_cmake(COMPARE-wrong-operator)
+
+set (RunCMake_TEST_OPTIONS "-DRunCMake_SOURCE_DIR=${RunCMake_SOURCE_DIR}")
+
+run_cmake(GET)
+run_cmake(APPEND)
+run_cmake(CONCAT)
+run_cmake(REMOVE_FILENAME)
+run_cmake(REPLACE_FILENAME)
+run_cmake(REMOVE_EXTENSION)
+run_cmake(REPLACE_EXTENSION)
+run_cmake(NORMAL_PATH)
+run_cmake(RELATIVE_PATH)
+run_cmake(PROXIMATE_PATH)
+run_cmake(ABSOLUTE_PATH)
+run_cmake(CMAKE_PATH)
+run_cmake(NATIVE_PATH)
+run_cmake(CONVERT)
+run_cmake(COMPARE)
+run_cmake(HAS_ITEM)
+run_cmake(IS_ABSOLUTE)
+run_cmake(IS_RELATIVE)
+run_cmake(IS_PREFIX)
+run_cmake(HASH)
diff --git a/Tests/RunCMake/cmake_path/call-cmake_path.cmake b/Tests/RunCMake/cmake_path/call-cmake_path.cmake
new file mode 100644
index 000000000..70fd6f53f
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/call-cmake_path.cmake
@@ -0,0 +1,19 @@
+
+cmake_minimum_required(VERSION 3.18...3.19)
+
+# define input variable
+set (path "")
+
+separate_arguments(CMAKE_PATH_ARGUMENTS UNIX_COMMAND "${CMAKE_PATH_ARGUMENTS}")
+
+if (CHECK_INVALID_OUTPUT)
+ # special handling for CMAKE_PATH
+ list(GET CMAKE_PATH_ARGUMENTS 0 command)
+ if (command STREQUAL "CMAKE_PATH")
+ cmake_path(CMAKE_PATH "" "input")
+ else()
+ cmake_path(${CMAKE_PATH_ARGUMENTS} "")
+ endif()
+else()
+ cmake_path(${CMAKE_PATH_ARGUMENTS})
+endif()
diff --git a/Tests/RunCMake/cmake_path/check_errors.cmake b/Tests/RunCMake/cmake_path/check_errors.cmake
new file mode 100644
index 000000000..d1369710e
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/check_errors.cmake
@@ -0,0 +1,12 @@
+
+function (CHECK_ERRORS command)
+ set (errors ${ARGN})
+ if (errors)
+ string (LENGTH "${command}" length)
+ math (EXPR count "${length} + 2")
+ string (REPEAT " " ${count} shift)
+ list (TRANSFORM errors PREPEND "${shift}")
+ list (JOIN errors "\n" msg)
+ message (FATAL_ERROR "${command}: ${msg}")
+ endif()
+endfunction()
diff --git a/Tests/RunCMake/cmake_path/invalid-output-var-stderr.txt b/Tests/RunCMake/cmake_path/invalid-output-var-stderr.txt
new file mode 100644
index 000000000..32a89481d
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/invalid-output-var-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .+/call-cmake_path.cmake:[0-9]+ \(cmake_path\):
+ cmake_path Invalid name for output variable.
diff --git a/Tests/RunCMake/cmake_path/missing-output-stderr.txt b/Tests/RunCMake/cmake_path/missing-output-stderr.txt
new file mode 100644
index 000000000..8ac049bc6
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/missing-output-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .+/cmake_path/call-cmake_path.cmake:[0-9]+ \(cmake_path\):
+ cmake_path [A-Z_]+ must be called with ((at least )?(two|three|four)|two or three|three or four) arguments.
diff --git a/Tests/RunCMake/cmake_path/unexpected-arg-stderr.txt b/Tests/RunCMake/cmake_path/unexpected-arg-stderr.txt
new file mode 100644
index 000000000..8f0e2f25b
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/unexpected-arg-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .+/cmake_path/call-cmake_path.cmake:[0-9]+ \(cmake_path\):
+ cmake_path [A-Z_]+ (called with unexpected|must be called with two) arguments.
diff --git a/Tests/RunCMake/cmake_path/wrong-path-stderr.txt b/Tests/RunCMake/cmake_path/wrong-path-stderr.txt
new file mode 100644
index 000000000..c42b5a2ee
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/wrong-path-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .+/cmake_path/call-cmake_path.cmake:[0-9]+ \(cmake_path\):
+ cmake_path undefined variable for input path.
diff --git a/Tests/RunCMake/configure_file/NoSourcePermissions.cmake b/Tests/RunCMake/configure_file/NoSourcePermissions.cmake
new file mode 100644
index 000000000..c6ad1311e
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NoSourcePermissions.cmake
@@ -0,0 +1,10 @@
+configure_file(NoSourcePermissions.sh NoSourcePermissions.sh.out
+ NO_SOURCE_PERMISSIONS)
+
+if (UNIX)
+ execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/NoSourcePermissions.sh.out
+ RESULT_VARIABLE result)
+ if (result EQUAL "0")
+ message(FATAL_ERROR "Copied file has executable permissions")
+ endif()
+endif()
diff --git a/Tests/RunCMake/configure_file/NoSourcePermissions.sh b/Tests/RunCMake/configure_file/NoSourcePermissions.sh
new file mode 100755
index 000000000..0aa8f412e
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NoSourcePermissions.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+#Testing NO_SOURCE_PERMISSIONS option of configure_file.
diff --git a/Tests/RunCMake/configure_file/RunCMakeTest.cmake b/Tests/RunCMake/configure_file/RunCMakeTest.cmake
index 32a0770b9..71694fb0b 100644
--- a/Tests/RunCMake/configure_file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/configure_file/RunCMakeTest.cmake
@@ -15,6 +15,7 @@ run_cmake(NewLineStyle-NoArg)
run_cmake(NewLineStyle-WrongArg)
run_cmake(NewLineStyle-ValidArg)
run_cmake(NewLineStyle-COPYONLY)
+run_cmake(NoSourcePermissions)
if(RunCMake_GENERATOR MATCHES "Make")
# Use a single build tree for a few tests without cleaning.
diff --git a/Tests/RunCMake/ctest_build/BuildCommandFailure-check.cmake b/Tests/RunCMake/ctest_build/BuildCommandFailure-check.cmake
new file mode 100644
index 000000000..feac3ced2
--- /dev/null
+++ b/Tests/RunCMake/ctest_build/BuildCommandFailure-check.cmake
@@ -0,0 +1,12 @@
+file(GLOB build_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Build.xml")
+if(build_xml_file)
+ file(READ "${build_xml_file}" build_xml LIMIT 4096)
+ if(NOT build_xml MATCHES [[this command failed]])
+ string(REPLACE "\n" "\n " build_xml " ${build_xml}")
+ set(RunCMake_TEST_FAILED
+ "Build.xml does not have expected error message:\n${build_xml}"
+ )
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "Build.xml not found")
+endif()
diff --git a/Tests/RunCMake/ctest_build/BuildCommandFailure-result.txt b/Tests/RunCMake/ctest_build/BuildCommandFailure-result.txt
new file mode 100644
index 000000000..b57e2deb7
--- /dev/null
+++ b/Tests/RunCMake/ctest_build/BuildCommandFailure-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_build/BuildCommandFailure-stderr.txt b/Tests/RunCMake/ctest_build/BuildCommandFailure-stderr.txt
new file mode 100644
index 000000000..bbe9410a1
--- /dev/null
+++ b/Tests/RunCMake/ctest_build/BuildCommandFailure-stderr.txt
@@ -0,0 +1 @@
+^Error\(s\) when building project
diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
index b2e562a93..072fbac22 100644
--- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
@@ -48,8 +48,12 @@ function(run_BuildChangeId)
endfunction()
run_BuildChangeId()
-set(RunCMake_USE_LAUNCHERS FALSE)
set(RunCMake_USE_CUSTOM_BUILD_COMMAND TRUE)
+set(RunCMake_BUILD_COMMAND "${FAKE_BUILD_COMMAND_EXE}")
+run_ctest(BuildCommandFailure)
+unset(RunCMake_BUILD_COMMAND)
+
+set(RunCMake_USE_LAUNCHERS FALSE)
set(RunCMake_BUILD_COMMAND "${COLOR_WARNING}")
run_ctest(IgnoreColor)
unset(RunCMake_BUILD_COMMAND)
diff --git a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in
index 3b8edf4c9..68a0fcb8b 100644
--- a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 3.3)
project(CTestTestMemcheck@CASE_NAME@ NONE)
include(CTest)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-result.txt b/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-result.txt
new file mode 100644
index 000000000..573541ac9
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-stderr.txt b/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-stderr.txt
new file mode 100644
index 000000000..d302b5cb6
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-stderr.txt
@@ -0,0 +1 @@
+Defect count: 23
diff --git a/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-stdout.txt b/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-stdout.txt
new file mode 100644
index 000000000..034ee1e54
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/DummyCudaSanitizer-stdout.txt
@@ -0,0 +1,13 @@
+Memory checking results:
+Uninitialized __global__ memory read - 1
+Unused memory - 1
+Host API memory access error - 1
+Barrier error - 2
+Invalid __global__ read - 1
+cudaErrorLaunchFailure - 2
+Fatal UVM GPU fault - 1
+Fatal UVM CPU fault - 1
+Memory leak - 1
+Potential WAR hazard detected - 4
+Potential RAW hazard detected - 4
+Race reported - 4
diff --git a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
index ab4c5abe5..6e0a91c85 100644
--- a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
@@ -175,3 +175,15 @@ unset(CMAKELISTS_EXTRA_CODE)
unset(CTEST_EXTRA_CODE)
unset(CTEST_MEMCHECK_ARGS)
unset(CTEST_SUFFIX_CODE)
+
+#-----------------------------------------------------------------------------
+set(CMAKELISTS_EXTRA_CODE
+"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\"
+-P \"${RunCMake_SOURCE_DIR}/testCudaSanitizer.cmake\")
+")
+set(CTEST_SUFFIX_CODE "message(\"Defect count: \${defect_count}\")")
+set(CTEST_MEMCHECK_ARGS "DEFECT_COUNT defect_count")
+run_mc_test(DummyCudaSanitizer "${PSEUDO_CUDA_SANITIZER}")
+unset(CTEST_MEMCHECK_ARGS)
+unset(CTEST_SUFFIX_CODE)
+unset(CTEST_EXTRA_CODE)
diff --git a/Tests/RunCMake/ctest_memcheck/test.cmake.in b/Tests/RunCMake/ctest_memcheck/test.cmake.in
index 50b4b6ab6..eedf080b7 100644
--- a/Tests/RunCMake/ctest_memcheck/test.cmake.in
+++ b/Tests/RunCMake/ctest_memcheck/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 3.3)
# Settings:
set(CTEST_SITE "@SITE@")
diff --git a/Tests/RunCMake/ctest_memcheck/testCudaSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testCudaSanitizer.cmake
new file mode 100644
index 000000000..adc7a1a36
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/testCudaSanitizer.cmake
@@ -0,0 +1,279 @@
+# this file simulates an execution of cuda-memcheck
+
+set(LOG_FILE "$ENV{PSEUDO_LOGFILE}")
+message("LOG_FILE=[${LOG_FILE}]")
+
+# clear the log file
+file(REMOVE "${LOG_FILE}")
+
+# create an error of each type of sanitizer tool and failure
+
+# initcheck
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= Uninitialized __global__ memory read of size 4
+========= at 0x00000020 in test(int*, int*)
+========= by thread (0,0,0) in block (0,0,0)
+========= Address 0x1303d80000
+========= Saved host backtrace up to driver entry point
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./uninit-read [0x101d9]
+========= Host Frame:./uninit-read [0x10267]
+========= Host Frame:./uninit-read [0x465b5]
+========= Host Frame:./uninit-read [0x3342]
+========= Host Frame:./uninit-read [0x3143]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./uninit-read [0x31e2]
+=========
+========= Unused memory in allocation 0x1303d80000 of size 16 bytes
+========= Not written any memory.
+========= 100.00% of allocation were unused.
+========= Saved host backtrace up to driver entry point
+========= Host Frame:/lib64/libcuda.so.1 (cuMemAlloc_v2 + 0x1b7) [0x26ec97]
+========= Host Frame:./uninit-read [0x2bbd3]
+========= Host Frame:./uninit-read [0x71ab]
+========= Host Frame:./uninit-read [0x3c84f]
+========= Host Frame:./uninit-read [0x3111]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./uninit-read [0x31e2]
+=========
+========= Host API memory access error at host access to 0x1303fd1400 of size 25600 bytes
+========= Uninitialized access at 0x1303fd4600 on access by cudaMemcopy source.
+========= Saved host backtrace up to driver entry point at error
+========= Host Frame:/usr/lib/x86_64-linux-gnu/libcuda.so.1 (cuMemcpyDtoH_v2 + 0x1ec) [0x29200c]
+========= Host Frame:/usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.10.1 [0x38aaa]
+========= Host Frame:/usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.10.1 [0x18946]
+========= Host Frame:/usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.10.1 (cudaMemcpy + 0x1a2) [0x3b8c2]
+========= Host Frame:/something/somewhere [0xcafe]
+=========
+========= ERROR SUMMARY: 2 errors
+")
+
+
+# synccheck
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= Barrier error detected. Divergent thread(s) in warp
+========= at 0x00000058 in test(int*, int*)
+========= by thread (1,0,0) in block (0,0,0)
+========= Device Frame:test(int*, int*) (test(int*, int*) : 0x60)
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./sync [0x101d9]
+========= Host Frame:./sync [0x10267]
+========= Host Frame:./sync [0x465b5]
+========= Host Frame:./sync [0x3342]
+========= Host Frame:./sync [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./sync [0x31e2]
+=========
+========= Barrier error detected. Divergent thread(s) in warp
+========= at 0x00000058 in test(int*, int*)
+========= by thread (0,0,0) in block (0,0,0)
+========= Device Frame:test(int*, int*) (test(int*, int*) : 0x60)
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./sync [0x101d9]
+========= Host Frame:./sync [0x10267]
+========= Host Frame:./sync [0x465b5]
+========= Host Frame:./sync [0x3342]
+========= Host Frame:./sync [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./sync [0x31e2]
+=========
+========= ERROR SUMMARY: 2 errors
+")
+
+# memcheck
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= Invalid __global__ read of size 4
+========= at 0x00000020 in test(int*, int*)
+========= by thread (0,0,0) in block (0,0,0)
+========= Address 0x00000000 is out of bounds
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./invalid-read [0x101d9]
+========= Host Frame:./invalid-read [0x10267]
+========= Host Frame:./invalid-read [0x465b5]
+========= Host Frame:./invalid-read [0x3342]
+========= Host Frame:./invalid-read [0x3142]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./invalid-read [0x31e2]
+=========
+========= Program hit cudaErrorLaunchFailure (error 719) due to \"unspecified launch failure\" on CUDA API call to cudaDeviceSynchronize.
+========= Saved host backtrace up to driver entry point at error
+========= Host Frame:/lib64/libcuda.so.1 [0x3ac5a3]
+========= Host Frame:./invalid-read [0x2e576]
+========= Host Frame:./invalid-read [0x3147]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./invalid-read [0x31e2]
+=========
+========= Program hit cudaErrorLaunchFailure (error 719) due to \"unspecified launch failure\" on CUDA API call to cudaFree.
+========= Saved host backtrace up to driver entry point at error
+========= Host Frame:/lib64/libcuda.so.1 [0x3ac5a3]
+========= Host Frame:./invalid-read [0x3c106]
+========= Host Frame:./invalid-read [0x3150]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./invalid-read [0x31e2]
+=========
+========= Fatal UVM GPU fault of type invalid pde due to invalid address
+========= during atomic access to address 0x20be00000
+=========
+========= Fatal UVM CPU fault due to invalid operation
+========= during read access to address 0x1357c92000
+=========
+========= LEAK SUMMARY: 0 bytes leaked in 0 allocations
+========= ERROR SUMMARY: 3 errors
+")
+
+# memcheck with leak-check full
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= Leaked 10 bytes at 0x1303d80000
+========= Saved host backtrace up to driver entry point at cudaMalloc time
+========= Host Frame:/lib64/libcuda.so.1 (cuMemAlloc_v2 + 0x1b7) [0x26ec97]
+========= Host Frame:./leak [0x2bab3]
+========= Host Frame:./leak [0x708b]
+========= Host Frame:./leak [0x3c72f]
+========= Host Frame:./leak [0x3113]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./leak [0x3174]
+=========
+========= LEAK SUMMARY: 10 bytes leaked in 1 allocations
+========= ERROR SUMMARY: 1 error
+")
+
+# racecheck with racecheck-report all
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= WARN:(Warp Level Programming) Potential WAR hazard detected at __shared__ 0x3 in block (0, 0, 0) :
+========= Read Thread (31, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Write Thread (0, 0, 0) at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0, Incoming Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential WAR hazard detected at __shared__ 0x2 in block (0, 0, 0) :
+========= Read Thread (31, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Write Thread (0, 0, 0) at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0, Incoming Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential WAR hazard detected at __shared__ 0x1 in block (0, 0, 0) :
+========= Read Thread (31, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Write Thread (0, 0, 0) at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0, Incoming Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential WAR hazard detected at __shared__ 0x0 in block (0, 0, 0) :
+========= Read Thread (31, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Write Thread (0, 0, 0) at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0, Incoming Value : 1
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential RAW hazard detected at __shared__ 0x3 in block (0, 0, 0) :
+========= Write Thread (31, 0, 0) at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= Read Thread (0, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential RAW hazard detected at __shared__ 0x2 in block (0, 0, 0) :
+========= Write Thread (31, 0, 0) at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= Read Thread (0, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential RAW hazard detected at __shared__ 0x1 in block (0, 0, 0) :
+========= Write Thread (31, 0, 0) at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= Read Thread (0, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential RAW hazard detected at __shared__ 0x0 in block (0, 0, 0) :
+========= Write Thread (31, 0, 0) at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= Read Thread (0, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN: Race reported between Read access at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= and Write access at 0x00000148 in ./race.cu:3:test(int*, int*) [4 hazards]
+========= and Write access at 0x000001a8 in ./race.cu:4:test(int*, int*) [4 hazards]
+=========
+========= WARN: Race reported between Write access at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= and Write access at 0x00000148 in ./race.cu:3:test(int*, int*) [124 hazards]
+========= and Read access at 0x00000170 in ./race.cu:4:test(int*, int*) [4 hazards]
+=========
+========= WARN: Race reported between Write access at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= and Write access at 0x000001a8 in ./race.cu:4:test(int*, int*) [124 hazards]
+========= and Read access at 0x00000170 in ./race.cu:4:test(int*, int*) [4 hazards]
+=========
+========= WARN: Race reported between Write access at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= and Write access at 0x00000148 in ./race.cu:3:test(int*, int*) [124 hazards]
+========= and Read access at 0x00000170 in ./race.cu:4:test(int*, int*) [4 hazards]
+=========
+========= RACECHECK SUMMARY: 12 hazards displayed (0 errors, 12 warnings)
+")
diff --git a/Tests/RunCMake/ctest_update/test.cmake.in b/Tests/RunCMake/ctest_update/test.cmake.in
index 25b842324..01aab26bb 100644
--- a/Tests/RunCMake/ctest_update/test.cmake.in
+++ b/Tests/RunCMake/ctest_update/test.cmake.in
@@ -10,7 +10,7 @@ set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-# FIXME: update test to do someting meaningful with this.
+# FIXME: update test to do something meaningful with this.
set(CTEST_UPDATE_COMMAND "not-actually-used")
set(ctest_test_args "@CASE_CTEST_UPDATE_ARGS@")
diff --git a/Tests/RunCMake/execute_process/AnyCommandError-result.txt b/Tests/RunCMake/execute_process/AnyCommandError-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/execute_process/AnyCommandError-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/execute_process/AnyCommandError-stderr.txt b/Tests/RunCMake/execute_process/AnyCommandError-stderr.txt
new file mode 100644
index 000000000..038056231
--- /dev/null
+++ b/Tests/RunCMake/execute_process/AnyCommandError-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*AnyCommandError.cmake:1 \(execute_process\):
+ execute_process failed command indexes: 2, 3, 4
diff --git a/Tests/RunCMake/execute_process/AnyCommandError.cmake b/Tests/RunCMake/execute_process/AnyCommandError.cmake
new file mode 100644
index 000000000..f8ec38513
--- /dev/null
+++ b/Tests/RunCMake/execute_process/AnyCommandError.cmake
@@ -0,0 +1,8 @@
+execute_process(COMMAND ${CMAKE_COMMAND} -E true
+ COMMAND ${CMAKE_COMMAND} -E false
+ COMMAND ${CMAKE_COMMAND} -E false
+ COMMAND ${CMAKE_COMMAND} -E false
+ COMMAND ${CMAKE_COMMAND} -E true
+ COMMAND ${CMAKE_COMMAND} -E true
+ COMMAND_ERROR_IS_FATAL ANY
+)
diff --git a/Tests/RunCMake/execute_process/CommandError-result.txt b/Tests/RunCMake/execute_process/CommandError-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/execute_process/CommandError-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/execute_process/CommandError-stderr.txt b/Tests/RunCMake/execute_process/CommandError-stderr.txt
new file mode 100644
index 000000000..c28f3a311
--- /dev/null
+++ b/Tests/RunCMake/execute_process/CommandError-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*CommandError.cmake:1 \(execute_process\):
+ execute_process COMMAND_ERROR_IS_FATAL option can be ANY or LAST
diff --git a/Tests/RunCMake/execute_process/CommandError.cmake b/Tests/RunCMake/execute_process/CommandError.cmake
new file mode 100644
index 000000000..da5892876
--- /dev/null
+++ b/Tests/RunCMake/execute_process/CommandError.cmake
@@ -0,0 +1,3 @@
+execute_process(COMMAND ${CMAKE_COMMAND} -E true
+ COMMAND_ERROR_IS_FATAL ALL
+)
diff --git a/Tests/RunCMake/execute_process/LastCommandError-result.txt b/Tests/RunCMake/execute_process/LastCommandError-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/execute_process/LastCommandError-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/execute_process/LastCommandError-stderr.txt b/Tests/RunCMake/execute_process/LastCommandError-stderr.txt
new file mode 100644
index 000000000..ff191b3cd
--- /dev/null
+++ b/Tests/RunCMake/execute_process/LastCommandError-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*LastCommandError.cmake:1 \(execute_process\):
+ execute_process last command failed
diff --git a/Tests/RunCMake/execute_process/LastCommandError.cmake b/Tests/RunCMake/execute_process/LastCommandError.cmake
new file mode 100644
index 000000000..6116a5c23
--- /dev/null
+++ b/Tests/RunCMake/execute_process/LastCommandError.cmake
@@ -0,0 +1,8 @@
+execute_process(COMMAND ${CMAKE_COMMAND} -E true
+ COMMAND ${CMAKE_COMMAND} -E false
+ COMMAND ${CMAKE_COMMAND} -E false
+ COMMAND ${CMAKE_COMMAND} -E false
+ COMMAND ${CMAKE_COMMAND} -E true
+ COMMAND ${CMAKE_COMMAND} -E false
+ COMMAND_ERROR_IS_FATAL LAST
+)
diff --git a/Tests/RunCMake/execute_process/RunCMakeTest.cmake b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
index 89ad6b207..f4c3d1919 100644
--- a/Tests/RunCMake/execute_process/RunCMakeTest.cmake
+++ b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
@@ -26,3 +26,7 @@ run_cmake_command(EchoCommand3 ${CMAKE_COMMAND}
${RunCMake_SOURCE_DIR}/EchoCommand.cmake)
run_cmake_command(EchoVariable ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/EchoVariable.cmake)
+
+run_cmake_command(AnyCommandError ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/AnyCommandError.cmake)
+run_cmake_command(LastCommandError ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/LastCommandError.cmake)
+run_cmake_command(CommandError ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/CommandError.cmake)
diff --git a/Tests/RunCMake/export/CMakeLists.txt b/Tests/RunCMake/export/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/export/CMakeLists.txt
+++ b/Tests/RunCMake/export/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/export/NamelinkOnlyExport.cmake b/Tests/RunCMake/export/NamelinkOnlyExport.cmake
new file mode 100644
index 000000000..4bdd180ab
--- /dev/null
+++ b/Tests/RunCMake/export/NamelinkOnlyExport.cmake
@@ -0,0 +1,9 @@
+enable_language(CXX)
+add_library(foo SHARED empty.cpp)
+install(TARGETS foo EXPORT fooExport
+ RUNTIME DESTINATION bin
+ LIBRARY
+ DESTINATION lib
+ NAMELINK_ONLY
+)
+export(EXPORT fooExport FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake")
diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake
index 1c747623a..95c8d5cf4 100644
--- a/Tests/RunCMake/export/RunCMakeTest.cmake
+++ b/Tests/RunCMake/export/RunCMakeTest.cmake
@@ -15,3 +15,5 @@ run_cmake(ForbiddenToExportPropertyWithGenExp)
run_cmake(ExportPropertiesUndefined)
run_cmake(DependOnNotExport)
run_cmake(DependOnDoubleExport)
+run_cmake(UnknownExport)
+run_cmake(NamelinkOnlyExport)
diff --git a/Tests/RunCMake/export/UnknownExport-result.txt b/Tests/RunCMake/export/UnknownExport-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/export/UnknownExport-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/export/UnknownExport-stderr.txt b/Tests/RunCMake/export/UnknownExport-stderr.txt
new file mode 100644
index 000000000..a8f8453ec
--- /dev/null
+++ b/Tests/RunCMake/export/UnknownExport-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UnknownExport\.cmake:[0-9]+ \(export\):
+ export Export set "fooExport" not found\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/export/UnknownExport.cmake b/Tests/RunCMake/export/UnknownExport.cmake
new file mode 100644
index 000000000..bf82d1f32
--- /dev/null
+++ b/Tests/RunCMake/export/UnknownExport.cmake
@@ -0,0 +1,2 @@
+enable_language(CXX)
+export(EXPORT fooExport FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake")
diff --git a/Tests/RunCMake/fake_build_command.c b/Tests/RunCMake/fake_build_command.c
new file mode 100644
index 000000000..d87335b98
--- /dev/null
+++ b/Tests/RunCMake/fake_build_command.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+int main(void)
+{
+ printf("this command failed\n");
+ return 1;
+}
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-result.txt b/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-stderr.txt
new file mode 100644
index 000000000..b22387bbd
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at CHMOD-all-perms\.cmake:[0-9]+ \(file\):
+ file Remove either PERMISSIONS or FILE_PERMISSIONS or DIRECTORY_PERMISSIONS
+ from the invocation
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-all-perms.cmake
new file mode 100644
index 000000000..b49583d5c
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-all-perms.cmake
@@ -0,0 +1,6 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_READ
+ FILE_PERMISSIONS OWNER_READ DIRECTORY_PERMISSIONS OWNER_READ)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-result.txt b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-stderr.txt
new file mode 100644
index 000000000..8d09e3510
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at CHMOD-invalid-path\.cmake:[0-9]+ \(file\):
+ file does not exist:
+
+ .*/chmod-tests/I_dont_exist
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path.cmake
new file mode 100644
index 000000000..36915c15b
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path.cmake
@@ -0,0 +1,4 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/I_dont_exist PERMISSIONS OWNER_READ)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-result.txt b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-stderr.txt
new file mode 100644
index 000000000..84ba2a299
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CHMOD-invalid-perms\.cmake:[0-9]+ \(file\):
+ file INVALID_PERMISSION is an invalid permission specifier
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms.cmake
new file mode 100644
index 000000000..22cab0b14
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms.cmake
@@ -0,0 +1,5 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS INVALID_PERMISSION)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-result.txt b/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-stderr.txt
new file mode 100644
index 000000000..2c248f8bf
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CHMOD-no-keyword\.cmake:[0-9]+ \(file\):
+ file No permissions given
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword.cmake
new file mode 100644
index 000000000..8b6210651
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword.cmake
@@ -0,0 +1,5 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-result.txt b/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-stderr.txt
new file mode 100644
index 000000000..a18609f2c
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CHMOD-no-perms\.cmake:[0-9]+ \(file\):
+ file No permissions given
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-no-perms.cmake
new file mode 100644
index 000000000..9fbd3599d
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-no-perms.cmake
@@ -0,0 +1,5 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-ok.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-ok.cmake
new file mode 100644
index 000000000..87e3e5766
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-ok.cmake
@@ -0,0 +1,5 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_READ)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-override.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-override.cmake
new file mode 100644
index 000000000..d9226b835
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-override.cmake
@@ -0,0 +1,6 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_READ
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-write-only-result.txt b/Tests/RunCMake/file-CHMOD/CHMOD-write-only-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-write-only-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-write-only-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-write-only-stderr.txt
new file mode 100644
index 000000000..1c87a593f
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-write-only-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at CHMOD-write-only\.cmake:[0-9]+ \(file\):
+ file failed to open for reading \(Permission denied\):
+
+ .*/chmod-tests/a
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-write-only.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-write-only.cmake
new file mode 100644
index 000000000..1289efc10
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CHMOD-write-only.cmake
@@ -0,0 +1,6 @@
+file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests)
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a "CONTENT")
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_WRITE)
+file(READ ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a content)
diff --git a/Tests/RunCMake/file-CHMOD/CMakeLists.txt b/Tests/RunCMake/file-CHMOD/CMakeLists.txt
new file mode 100644
index 000000000..289710955
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.0)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
new file mode 100644
index 000000000..c7bff15c2
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
@@ -0,0 +1,19 @@
+include(RunCMake)
+
+run_cmake(CHMOD-no-perms)
+run_cmake(CHMOD-no-keyword)
+run_cmake(CHMOD-all-perms)
+run_cmake(CHMOD-invalid-perms)
+run_cmake(CHMOD-invalid-path)
+run_cmake(CHMOD-ok)
+run_cmake(CHMOD-override)
+
+if(UNIX)
+ execute_process(COMMAND id -u $ENV{USER}
+ OUTPUT_VARIABLE uid
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif()
+
+if(NOT WIN32 AND NOT "${uid}" STREQUAL "0")
+ run_cmake(CHMOD-write-only)
+endif()
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt
new file mode 100644
index 000000000..b0f0d1934
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at DOWNLOAD-no-save-hash\.cmake:[0-9]+ \(file\):
+ file DOWNLOAD cannot calculate hash if file is not saved\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake
new file mode 100644
index 000000000..ce959a7fe
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake
@@ -0,0 +1,8 @@
+if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
+ set(slash /)
+endif()
+file(DOWNLOAD
+ "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-no-save-md5.txt"
+ EXPECTED_HASH MD5=55555555555555555555555555555555
+ STATUS status
+ )
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt
diff --git a/Tests/RunCMake/file/GLOB-CONFIGURE_DEPENDS-RerunCMake.cmake b/Tests/RunCMake/file/GLOB-CONFIGURE_DEPENDS-RerunCMake.cmake
index fe87c7849..684c1960e 100644
--- a/Tests/RunCMake/file/GLOB-CONFIGURE_DEPENDS-RerunCMake.cmake
+++ b/Tests/RunCMake/file/GLOB-CONFIGURE_DEPENDS-RerunCMake.cmake
@@ -8,3 +8,9 @@ file(GLOB_RECURSE
)
string(SHA1 CONTENT_LIST_HASH "${CONTENT_LIST}")
add_custom_target(CONTENT_ECHO ALL ${CMAKE_COMMAND} -E echo ${CONTENT_LIST_HASH})
+if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
+ # Xcode's "new build system" does not reload the project file if it is updated
+ # during the build. Print the output we expect the build to print just to make
+ # the test pass.
+ message(STATUS "CONTENT_LIST_HASH: ${CONTENT_LIST_HASH}")
+endif()
diff --git a/Tests/RunCMake/file/REAL_PATH-no-base-dir-result.txt b/Tests/RunCMake/file/REAL_PATH-no-base-dir-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file/REAL_PATH-no-base-dir-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/REAL_PATH-no-base-dir-stderr.txt b/Tests/RunCMake/file/REAL_PATH-no-base-dir-stderr.txt
new file mode 100644
index 000000000..7c58aeb4a
--- /dev/null
+++ b/Tests/RunCMake/file/REAL_PATH-no-base-dir-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at REAL_PATH-no-base-dir.cmake:[0-9]+ \(file\):
+ file BASE_DIRECTORY requires a value
diff --git a/Tests/RunCMake/file/REAL_PATH-no-base-dir.cmake b/Tests/RunCMake/file/REAL_PATH-no-base-dir.cmake
new file mode 100644
index 000000000..132aee6f6
--- /dev/null
+++ b/Tests/RunCMake/file/REAL_PATH-no-base-dir.cmake
@@ -0,0 +1,2 @@
+
+file(REAL_PATH "some-path" real_path BASE_DIRECTORY)
diff --git a/Tests/RunCMake/file/REAL_PATH-unexpected-arg-result.txt b/Tests/RunCMake/file/REAL_PATH-unexpected-arg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/file/REAL_PATH-unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/REAL_PATH-unexpected-arg-stderr.txt b/Tests/RunCMake/file/REAL_PATH-unexpected-arg-stderr.txt
new file mode 100644
index 000000000..301db75b5
--- /dev/null
+++ b/Tests/RunCMake/file/REAL_PATH-unexpected-arg-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at REAL_PATH-unexpected-arg.cmake:[0-9]+ \(file\):
+ file REAL_PATH called with unexpected arguments
diff --git a/Tests/RunCMake/file/REAL_PATH-unexpected-arg.cmake b/Tests/RunCMake/file/REAL_PATH-unexpected-arg.cmake
new file mode 100644
index 000000000..144f30bb4
--- /dev/null
+++ b/Tests/RunCMake/file/REAL_PATH-unexpected-arg.cmake
@@ -0,0 +1,2 @@
+
+file(REAL_PATH "some-path" real_path extra_arg)
diff --git a/Tests/RunCMake/file/REAL_PATH.cmake b/Tests/RunCMake/file/REAL_PATH.cmake
new file mode 100644
index 000000000..be25706b2
--- /dev/null
+++ b/Tests/RunCMake/file/REAL_PATH.cmake
@@ -0,0 +1,14 @@
+
+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\"")
+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()
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index a4de1d3ee..22813eb16 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -11,6 +11,7 @@ run_cmake(DOWNLOAD-netrc-bad)
run_cmake(DOWNLOAD-tls-cainfo-not-set)
run_cmake(DOWNLOAD-tls-verify-not-set)
run_cmake(DOWNLOAD-pass-not-set)
+run_cmake(DOWNLOAD-no-save-hash)
run_cmake(TOUCH)
run_cmake(TOUCH-error-in-source-directory)
run_cmake(TOUCH-error-missing-directory)
@@ -71,6 +72,9 @@ 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()
if(RunCMake_GENERATOR MATCHES "Ninja")
diff --git a/Tests/RunCMake/find_dependency/CMakeLists.txt b/Tests/RunCMake/find_dependency/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/find_dependency/CMakeLists.txt
+++ b/Tests/RunCMake/find_dependency/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_package/CMakeLists.txt b/Tests/RunCMake/find_package/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/find_package/CMakeLists.txt
+++ b/Tests/RunCMake/find_package/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_package/EmptyVersionRange-result.txt b/Tests/RunCMake/find_package/EmptyVersionRange-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/find_package/EmptyVersionRange-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_package/EmptyVersionRange-stderr.txt b/Tests/RunCMake/find_package/EmptyVersionRange-stderr.txt
new file mode 100644
index 000000000..9c00b9687
--- /dev/null
+++ b/Tests/RunCMake/find_package/EmptyVersionRange-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at EmptyVersionRange.cmake:[0-9]+ \(find_package\):
+ find_package specified version range is empty.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at EmptyVersionRange.cmake:[0-9]+ \(find_package\):
+ find_package specified version range is empty.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/EmptyVersionRange.cmake b/Tests/RunCMake/find_package/EmptyVersionRange.cmake
new file mode 100644
index 000000000..553e297a8
--- /dev/null
+++ b/Tests/RunCMake/find_package/EmptyVersionRange.cmake
@@ -0,0 +1,3 @@
+find_package(VersionRange 2.3...1.2)
+
+find_package(VersionRange 2.3...<2.3)
diff --git a/Tests/RunCMake/find_package/FindVersionRange.cmake b/Tests/RunCMake/find_package/FindVersionRange.cmake
new file mode 100644
index 000000000..27e5b90b3
--- /dev/null
+++ b/Tests/RunCMake/find_package/FindVersionRange.cmake
@@ -0,0 +1,82 @@
+
+if (NOT VersionRange_FIND_VERSION_COMPLETE STREQUAL VersionRange_SPECIFIED_VERSION_COMPLETE)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_COMPLETE: ${VersionRange_FIND_VERSION_COMPLETE}")
+endif()
+
+if (NOT VersionRange_FIND_VERSION VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION: ${VersionRange_FIND_VERSION}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MAJOR VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN_MAJOR)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MAJOR: ${VersionRange_FIND_VERSION_MAJOR}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MINOR VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN_MINOR)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MINOR: ${VersionRange_FIND_VERSION_MINOR}")
+endif()
+if (NOT VersionRange_FIND_VERSION_PATCH VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN_PATCH)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_PATCH: ${VersionRange_FIND_VERSION_PATCH}")
+endif()
+if (NOT VersionRange_FIND_VERSION_TWEAK VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN_TWEAK)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_TWEAK: ${VersionRange_FIND_VERSION_TWEAK}")
+endif()
+
+if (NOT VersionRange_FIND_VERSION_RANGE STREQUAL VersionRange_SPECIFIED_VERSION_RANGE)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_RANGE: ${VersionRange_FIND_VERSION_RANGE}")
+endif()
+if (NOT VersionRange_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE")
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_RANGE_MIN: ${VersionRange_FIND_VERSION_RANGE_MIN}")
+endif()
+if (VersionRange_FIND_VERSION_RANGE MATCHES "<[0-9.]+$")
+ if (NOT VersionRange_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE")
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_RANGE_MAX: ${VersionRange_FIND_VERSION_RANGE_MAX}")
+ endif()
+else()
+ if (NOT VersionRange_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE")
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_RANGE_MAX: ${VersionRange_FIND_VERSION_RANGE_MAX}")
+ endif()
+endif()
+
+if (NOT VersionRange_FIND_VERSION_MIN VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MIN: ${VersionRange_FIND_VERSION_MIN}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MIN_MAJOR VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN_MAJOR)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MIN_MAJOR: ${VersionRange_FIND_VERSION_MIN_MAJOR}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MIN_MINOR VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN_MINOR)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MIN_MINOR: ${VersionRange_FIND_VERSION_MIN_MINOR}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MIN_PATCH VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN_PATCH)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MIN_PATCH: ${VersionRange_FIND_VERSION_MIN_PATCH}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MIN_TWEAK VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MIN_TWEAK)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MIN_TWEAK: ${VersionRange_FIND_VERSION_MIN_TWEAK}")
+endif()
+
+if (NOT VersionRange_FIND_VERSION_MAX VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MAX)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MAX: ${VersionRange_FIND_VERSION_MAX}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MAX_MAJOR VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MAX_MAJOR)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MAX_MAJOR: ${VersionRange_FIND_VERSION_MAX_MAJOR}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MAX_MINOR VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MAX_MINOR)
+ message (SEND_ERROR "Wrong value for VersionRange_FIND_VERSION_MAX_MINOR: ${VersionRange_FIND_VERSION_MAX_MINOR}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MAX_PATCH VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MAX_PATCH)
+ message (SEND_ERROR "Wrong value for VersionRange_VERSION_FIND_MAX_PATCH: ${VersionRange_FIND_VERSION_MAX_PATCH}")
+endif()
+if (NOT VersionRange_FIND_VERSION_MAX_TWEAK VERSION_EQUAL VersionRange_SPECIFIED_VERSION_MAX_TWEAK)
+ message (SEND_ERROR "Wrong value for VersionRange_VERSION_FIND_MAX_TWEAK: ${VersionRange_FIND_VERSION_MAX_TWEAK}")
+endif()
+
+if ((VersionRange_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE"
+ AND "2.3.4.5" VERSION_LESS_EQUAL VersionRange_FIND_VERSION_MAX)
+ OR (VersionRange_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE"
+ AND "2.3.4.5" VERSION_LESS VersionRange_FIND_VERSION_MAX))
+set (VersionRange_FOUND TRUE)
+set (VersionRange_VERSION 2.3.4.5)
+set (VersionRange_VERSION_MAJOR 2)
+set (VersionRange_VERSION_MINOR 3)
+set (VersionRange_VERSION_PATCH 4)
+set (VersionRange_VERSION_TWEAK 5)
+else()
+ set (VersionRange_FOUND FALSE)
+endif()
diff --git a/Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt b/Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt
index b336b5621..ebfd7d030 100644
--- a/Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt
+++ b/Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt
@@ -1,9 +1,10 @@
CMake Warning \(dev\) at MissingNormalWarnNoModuleOld.cmake:2 \(find_package\):
- find_package called without NO_MODULE option and no FindNotHere.cmake
- module is in CMAKE_MODULE_PATH. Add NO_MODULE to exclusively request
- Config mode and search for a package configuration file provided by NotHere
- \(NotHereConfig.cmake or nothere-config.cmake\). Otherwise make
- FindNotHere.cmake available in CMAKE_MODULE_PATH.
+ find_package called without either MODULE or CONFIG option and no
+ FindNotHere.cmake module is in CMAKE_MODULE_PATH. Add MODULE to
+ exclusively request Module mode and fail if FindNotHere.cmake is missing.
+ Add CONFIG to exclusively request Config mode and search for a package
+ configuration file provided by NotHere \(NotHereConfig.cmake or
+ nothere-config.cmake\).
\(Variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE enabled this warning.\)
Call Stack \(most recent call first\):
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index 5186297df..a899f46ad 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -29,6 +29,17 @@ run_cmake(WrongVersionConfig)
run_cmake(CMP0084-OLD)
run_cmake(CMP0084-WARN)
run_cmake(CMP0084-NEW)
+run_cmake(WrongVersionRange)
+run_cmake(EmptyVersionRange)
+run_cmake(VersionRangeWithEXACT)
+run_cmake(VersionRange)
+run_cmake(VersionRange2)
+run_cmake(VersionRange3)
+run_cmake(VersionRange4)
+run_cmake(VersionRangeConfig)
+run_cmake(VersionRangeConfig2)
+run_cmake(VersionRangeConfigStd)
+run_cmake(VersionRangeConfigStd2)
if(UNIX)
run_cmake(SetFoundResolved)
endif()
diff --git a/Tests/RunCMake/find_package/VersionRange.cmake b/Tests/RunCMake/find_package/VersionRange.cmake
new file mode 100644
index 000000000..30b88a80a
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRange.cmake
@@ -0,0 +1,37 @@
+
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+
+set (VersionRange_SPECIFIED_VERSION_COMPLETE 1.2.3.4...5.6.7.8)
+set (VersionRange_SPECIFIED_VERSION_RANGE 1.2.3.4...5.6.7.8)
+set (VersionRange_SPECIFIED_VERSION_MIN 1.2.3.4)
+set (VersionRange_SPECIFIED_VERSION_MIN_MAJOR 1)
+set (VersionRange_SPECIFIED_VERSION_MIN_MINOR 2)
+set (VersionRange_SPECIFIED_VERSION_MIN_PATCH 3)
+set (VersionRange_SPECIFIED_VERSION_MIN_TWEAK 4)
+set (VersionRange_SPECIFIED_VERSION_MAX 5.6.7.8)
+set (VersionRange_SPECIFIED_VERSION_MAX_MAJOR 5)
+set (VersionRange_SPECIFIED_VERSION_MAX_MINOR 6)
+set (VersionRange_SPECIFIED_VERSION_MAX_PATCH 7)
+set (VersionRange_SPECIFIED_VERSION_MAX_TWEAK 8)
+
+find_package (VersionRange ${VersionRange_SPECIFIED_VERSION_RANGE})
+
+if (NOT VersionRange_FOUND)
+ message (FATAL_ERROR "Package VersionRange not found.")
+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_package/VersionRange2.cmake b/Tests/RunCMake/find_package/VersionRange2.cmake
new file mode 100644
index 000000000..9adcc6400
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRange2.cmake
@@ -0,0 +1,37 @@
+
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+
+set (VersionRange_SPECIFIED_VERSION_COMPLETE 1.2.3.4...<5.6.7.8)
+set (VersionRange_SPECIFIED_VERSION_RANGE 1.2.3.4...<5.6.7.8)
+set (VersionRange_SPECIFIED_VERSION_MIN 1.2.3.4)
+set (VersionRange_SPECIFIED_VERSION_MIN_MAJOR 1)
+set (VersionRange_SPECIFIED_VERSION_MIN_MINOR 2)
+set (VersionRange_SPECIFIED_VERSION_MIN_PATCH 3)
+set (VersionRange_SPECIFIED_VERSION_MIN_TWEAK 4)
+set (VersionRange_SPECIFIED_VERSION_MAX 5.6.7.8)
+set (VersionRange_SPECIFIED_VERSION_MAX_MAJOR 5)
+set (VersionRange_SPECIFIED_VERSION_MAX_MINOR 6)
+set (VersionRange_SPECIFIED_VERSION_MAX_PATCH 7)
+set (VersionRange_SPECIFIED_VERSION_MAX_TWEAK 8)
+
+find_package (VersionRange ${VersionRange_SPECIFIED_VERSION_RANGE})
+
+if (NOT VersionRange_FOUND)
+ message (FATAL_ERROR "Package VersionRange not found.")
+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_package/VersionRange3.cmake b/Tests/RunCMake/find_package/VersionRange3.cmake
new file mode 100644
index 000000000..41efac461
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRange3.cmake
@@ -0,0 +1,49 @@
+
+# show the effect of the exclusion or inclusion of the upper endpoint
+
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+
+set (VersionRange_SPECIFIED_VERSION_COMPLETE 1.2.3.4...<2.3.4.5)
+set (VersionRange_SPECIFIED_VERSION_RANGE 1.2.3.4...<2.3.4.5)
+set (VersionRange_SPECIFIED_VERSION_MIN 1.2.3.4)
+set (VersionRange_SPECIFIED_VERSION_MIN_MAJOR 1)
+set (VersionRange_SPECIFIED_VERSION_MIN_MINOR 2)
+set (VersionRange_SPECIFIED_VERSION_MIN_PATCH 3)
+set (VersionRange_SPECIFIED_VERSION_MIN_TWEAK 4)
+set (VersionRange_SPECIFIED_VERSION_MAX 2.3.4.5)
+set (VersionRange_SPECIFIED_VERSION_MAX_MAJOR 2)
+set (VersionRange_SPECIFIED_VERSION_MAX_MINOR 3)
+set (VersionRange_SPECIFIED_VERSION_MAX_PATCH 4)
+set (VersionRange_SPECIFIED_VERSION_MAX_TWEAK 5)
+
+find_package (VersionRange ${VersionRange_SPECIFIED_VERSION_RANGE})
+
+if (VersionRange_FOUND)
+ message (FATAL_ERROR "Package VersionRange found unexpectedly.")
+endif()
+
+
+set (VersionRange_SPECIFIED_VERSION_COMPLETE 1.2.3.4...2.3.4.5)
+set (VersionRange_SPECIFIED_VERSION_RANGE 1.2.3.4...2.3.4.5)
+
+find_package (VersionRange ${VersionRange_SPECIFIED_VERSION_RANGE})
+
+if (NOT VersionRange_FOUND)
+ message (FATAL_ERROR "Package VersionRange not found.")
+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_package/VersionRange4.cmake b/Tests/RunCMake/find_package/VersionRange4.cmake
new file mode 100644
index 000000000..0953d0429
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRange4.cmake
@@ -0,0 +1,39 @@
+
+# show the effect of the exclusion or inclusion of the upper endpoint
+
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+
+set (VersionRange_SPECIFIED_VERSION_COMPLETE 2.3.4.5...2.3.4.5)
+set (VersionRange_SPECIFIED_VERSION_RANGE 2.3.4.5...2.3.4.5)
+set (VersionRange_SPECIFIED_VERSION_MIN 2.3.4.5)
+set (VersionRange_SPECIFIED_VERSION_MIN_MAJOR 2)
+set (VersionRange_SPECIFIED_VERSION_MIN_MINOR 3)
+set (VersionRange_SPECIFIED_VERSION_MIN_PATCH 4)
+set (VersionRange_SPECIFIED_VERSION_MIN_TWEAK 5)
+set (VersionRange_SPECIFIED_VERSION_MAX 2.3.4.5)
+set (VersionRange_SPECIFIED_VERSION_MAX_MAJOR 2)
+set (VersionRange_SPECIFIED_VERSION_MAX_MINOR 3)
+set (VersionRange_SPECIFIED_VERSION_MAX_PATCH 4)
+set (VersionRange_SPECIFIED_VERSION_MAX_TWEAK 5)
+
+find_package (VersionRange ${VersionRange_SPECIFIED_VERSION_RANGE})
+
+if (NOT VersionRange_FOUND)
+ message (FATAL_ERROR "Package VersionRange not found.")
+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_package/VersionRangeCfg/VersionRangeCfgConfig.cmake b/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfig.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfig.cmake
diff --git a/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake b/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake
new file mode 100644
index 000000000..e9f607685
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeCfg/VersionRangeCfgConfigVersion.cmake
@@ -0,0 +1,74 @@
+
+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")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_COMPLETE: ${PACKAGE_FIND_VERSION_COMPLETE}")
+endif()
+
+if (NOT PACKAGE_FIND_VERSION VERSION_EQUAL "1.2.3.4")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION: ${PACKAGE_FIND_VERSION}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MAJOR VERSION_EQUAL "1")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MAJOR: ${PACKAGE_FIND_VERSION_MAJOR}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MINOR VERSION_EQUAL "2")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MINOR: ${PACKAGE_FIND_VERSION_MINOR}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_PATCH VERSION_EQUAL "3")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_PATCH: ${PACKAGE_FIND_VERSION_PATCH}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_TWEAK VERSION_EQUAL "4")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_TWEAK: ${PACKAGE_FIND_VERSION_TWEAK}")
+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")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_RANGE: ${PACKAGE_FIND_VERSION_RANGE}")
+endif()
+
+if (NOT PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_RANGE_MIN: ${PACKAGE_FIND_VERSION_RANGE_MIN}")
+endif()
+if (PACKAGE_FIND_VERSION_RANGE MATCHES "<[0-9.]+$")
+ if (NOT PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_RANGE_MAX: ${PACKAGE_FIND_VERSION_RANGE_MAX}")
+ endif()
+else()
+ if (NOT PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_RANGE_MAX: ${PACKAGE_FIND_VERSION_RANGE_MAX}")
+ endif()
+endif()
+
+if (NOT PACKAGE_FIND_VERSION_MIN VERSION_EQUAL "1.2.3.4")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MIN: ${PACKAGE_FIND_VERSION_MIN}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR VERSION_EQUAL "1")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MIN_MAJOR: ${PACKAGE_FIND_VERSION_MIN_MAJOR}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MIN_MINOR VERSION_EQUAL "2")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MIN_MINOR: ${PACKAGE_FIND_VERSION_MIN_MINOR}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MIN_PATCH VERSION_EQUAL "3")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MIN_PATCH: ${PACKAGE_FIND_VERSION_MIN_PATCH}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MIN_TWEAK VERSION_EQUAL "4")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MIN_TWEAK: ${PACKAGE_FIND_VERSION_MIN_TWEAK}")
+endif()
+
+if (NOT PACKAGE_FIND_VERSION_MAX VERSION_EQUAL "5.6.7.8")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MAX: ${PACKAGE_FIND_VERSION_MAX}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MAX_MAJOR VERSION_EQUAL "5")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MAX_MAJOR: ${PACKAGE_FIND_VERSION_MAX_MAJOR}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MAX_MINOR VERSION_EQUAL "6")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MAX_MINOR: ${PACKAGE_FIND_VERSION_MAX_MINOR}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MAX_PATCH VERSION_EQUAL "7")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MAXPATCH: ${PACKAGE_FIND_VERSION_MAX_PATCH}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MAX_TWEAK VERSION_EQUAL "8")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MAX_TWEAK: ${PACKAGE_FIND_VERSION_MAX_TWEAK}")
+endif()
+
+set (PACKAGE_VERSION 2.3.4.5)
+set (PACKAGE_VERSION_COMPATIBLE TRUE)
diff --git a/Tests/RunCMake/find_package/VersionRangeConfig.cmake b/Tests/RunCMake/find_package/VersionRangeConfig.cmake
new file mode 100644
index 000000000..b39a96698
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeConfig.cmake
@@ -0,0 +1,23 @@
+set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+
+find_package(VersionRange 1.2.3.4...5.6.7.8 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_package/VersionRangeConfig2.cmake b/Tests/RunCMake/find_package/VersionRangeConfig2.cmake
new file mode 100644
index 000000000..04c570a99
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeConfig2.cmake
@@ -0,0 +1,23 @@
+set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+
+find_package(VersionRange 1.2.3.4...<5.6.7.8 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_package/VersionRangeConfigStd.cmake b/Tests/RunCMake/find_package/VersionRangeConfigStd.cmake
new file mode 100644
index 000000000..3ffc72f56
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeConfigStd.cmake
@@ -0,0 +1,23 @@
+set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+
+find_package(VersionRange 1.2.3.4 CONFIG NAMES VersionRangeStd)
+
+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_package/VersionRangeConfigStd2.cmake b/Tests/RunCMake/find_package/VersionRangeConfigStd2.cmake
new file mode 100644
index 000000000..8b48828f0
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeConfigStd2.cmake
@@ -0,0 +1,23 @@
+set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+
+find_package(VersionRange 1.2.3.4...5.6.7.8 CONFIG NAMES VersionRangeStd)
+
+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_package/VersionRangeStd/VersionRangeStdConfig.cmake b/Tests/RunCMake/find_package/VersionRangeStd/VersionRangeStdConfig.cmake
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeStd/VersionRangeStdConfig.cmake
diff --git a/Tests/RunCMake/find_package/VersionRangeStd/VersionRangeStdConfigVersion.cmake b/Tests/RunCMake/find_package/VersionRangeStd/VersionRangeStdConfigVersion.cmake
new file mode 100644
index 000000000..6e9151ca3
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeStd/VersionRangeStdConfigVersion.cmake
@@ -0,0 +1,24 @@
+
+if (NOT PACKAGE_FIND_VERSION VERSION_EQUAL "1.2.3.4")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION: ${PACKAGE_FIND_VERSION}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MAJOR VERSION_EQUAL "1")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MAJOR: ${PACKAGE_FIND_VERSION_MAJOR}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_MINOR VERSION_EQUAL "2")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_MINOR: ${PACKAGE_FIND_VERSION_MINOR}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_PATCH VERSION_EQUAL "3")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_PATCH: ${PACKAGE_FIND_VERSION_PATCH}")
+endif()
+if (NOT PACKAGE_FIND_VERSION_TWEAK VERSION_EQUAL "4")
+ message (SEND_ERROR "Wrong value for PACKAGE_FIND_VERSION_TWEAK: ${PACKAGE_FIND_VERSION_TWEAK}")
+endif()
+
+set (PACKAGE_VERSION 2.3.4.5)
+
+if (PACKAGE_FIND_VERSION VERSION_LESS_EQUAL PACKAGE_VERSION)
+ set (PACKAGE_VERSION_COMPATIBLE TRUE)
+else()
+ set (PACKAGE_VERSION_UNSUITABLE TRUE)
+endif()
diff --git a/Tests/RunCMake/find_package/VersionRangeWithEXACT-result.txt b/Tests/RunCMake/find_package/VersionRangeWithEXACT-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeWithEXACT-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_package/VersionRangeWithEXACT-stderr.txt b/Tests/RunCMake/find_package/VersionRangeWithEXACT-stderr.txt
new file mode 100644
index 000000000..6319aeed5
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeWithEXACT-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at VersionRangeWithEXACT.cmake:[0-9]+ \(find_package\):
+ find_package EXACT cannot be specified with a version range.
diff --git a/Tests/RunCMake/find_package/VersionRangeWithEXACT.cmake b/Tests/RunCMake/find_package/VersionRangeWithEXACT.cmake
new file mode 100644
index 000000000..419c7c53f
--- /dev/null
+++ b/Tests/RunCMake/find_package/VersionRangeWithEXACT.cmake
@@ -0,0 +1 @@
+find_package(VersionRange 1.2...3.4 EXACT)
diff --git a/Tests/RunCMake/find_package/WrongVersionRange-result.txt b/Tests/RunCMake/find_package/WrongVersionRange-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/find_package/WrongVersionRange-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_package/WrongVersionRange-stderr.txt b/Tests/RunCMake/find_package/WrongVersionRange-stderr.txt
new file mode 100644
index 000000000..fe0b0887f
--- /dev/null
+++ b/Tests/RunCMake/find_package/WrongVersionRange-stderr.txt
@@ -0,0 +1,28 @@
+CMake Error at WrongVersionRange.cmake:[0-9]+ \(find_package\):
+ find_package called with invalid argument "1\.2\.\.\."
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at WrongVersionRange.cmake:[0-9]+ \(find_package\):
+ find_package called with invalid argument "\.\.\.1\.2"
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at WrongVersionRange.cmake:[0-9]+ \(find_package\):
+ find_package called with invalid argument "1\.2\.\.\.\.2\.3"
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at WrongVersionRange.cmake:[0-9]+ \(find_package\):
+ find_package called with invalid argument "1\.2\.\.\.>2\.3"
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at WrongVersionRange.cmake:[0-9]+ \(find_package\):
+ find_package called with invalid argument "1\.2>\.\.\.2\.3"
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/WrongVersionRange.cmake b/Tests/RunCMake/find_package/WrongVersionRange.cmake
new file mode 100644
index 000000000..9851ade92
--- /dev/null
+++ b/Tests/RunCMake/find_package/WrongVersionRange.cmake
@@ -0,0 +1,9 @@
+find_package(VersionRange 1.2...)
+
+find_package(VersionRange ...1.2)
+
+find_package(VersionRange 1.2....2.3)
+
+find_package(VersionRange 1.2...>2.3)
+
+find_package(VersionRange 1.2>...2.3)
diff --git a/Tests/RunCMake/find_program/BundleSpaceInName-stdout.txt b/Tests/RunCMake/find_program/BundleSpaceInName-stdout.txt
new file mode 100644
index 000000000..331d46577
--- /dev/null
+++ b/Tests/RunCMake/find_program/BundleSpaceInName-stdout.txt
@@ -0,0 +1 @@
+-- FakeApp_EXECUTABLE='.*/Tests/RunCMake/find_program/BundleSpaceInName-build/Fake app.app/Contents/MacOS/Fake app'
diff --git a/Tests/RunCMake/find_program/BundleSpaceInName.cmake b/Tests/RunCMake/find_program/BundleSpaceInName.cmake
new file mode 100644
index 000000000..9152d5b2e
--- /dev/null
+++ b/Tests/RunCMake/find_program/BundleSpaceInName.cmake
@@ -0,0 +1,8 @@
+set(fakeApp "${CMAKE_CURRENT_BINARY_DIR}/Fake app.app/Contents/MacOS/Fake app")
+file(WRITE "${fakeApp}" "#!/bin/sh\n")
+execute_process(COMMAND chmod a+rx "${fakeApp}")
+
+find_program(FakeApp_EXECUTABLE NAMES "Fake app" NO_DEFAULT_PATH
+ PATHS "${CMAKE_CURRENT_BINARY_DIR}"
+)
+message(STATUS "FakeApp_EXECUTABLE='${FakeApp_EXECUTABLE}'")
diff --git a/Tests/RunCMake/find_program/ExeNoRead.cmake b/Tests/RunCMake/find_program/CMP0109-Common.cmake
index 7e22dc5b3..525413a3d 100644
--- a/Tests/RunCMake/find_program/ExeNoRead.cmake
+++ b/Tests/RunCMake/find_program/CMP0109-Common.cmake
@@ -1,4 +1,7 @@
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ExeNoRead" "#!/bin/sh\n")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ReadNoExe" "#ReadNoExe")
execute_process(COMMAND chmod -r+x "${CMAKE_CURRENT_BINARY_DIR}/ExeNoRead")
find_program(ExeNoRead_EXECUTABLE NAMES ExeNoRead NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_BINARY_DIR}")
message(STATUS "ExeNoRead_EXECUTABLE='${ExeNoRead_EXECUTABLE}'")
+find_program(ReadNoExe_EXECUTABLE NAMES ReadNoExe NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_BINARY_DIR}")
+message(STATUS "ReadNoExe_EXECUTABLE='${ReadNoExe_EXECUTABLE}'")
diff --git a/Tests/RunCMake/find_program/CMP0109-NEW-stdout.txt b/Tests/RunCMake/find_program/CMP0109-NEW-stdout.txt
new file mode 100644
index 000000000..2744463a3
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-NEW-stdout.txt
@@ -0,0 +1,2 @@
+-- ExeNoRead_EXECUTABLE='.*/Tests/RunCMake/find_program/CMP0109-NEW-build/ExeNoRead'
+-- ReadNoExe_EXECUTABLE='ReadNoExe_EXECUTABLE-NOTFOUND'
diff --git a/Tests/RunCMake/find_program/CMP0109-NEW.cmake b/Tests/RunCMake/find_program/CMP0109-NEW.cmake
new file mode 100644
index 000000000..b4a4033ae
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0109 NEW)
+include(CMP0109-Common.cmake)
diff --git a/Tests/RunCMake/find_program/CMP0109-OLD-stdout.txt b/Tests/RunCMake/find_program/CMP0109-OLD-stdout.txt
new file mode 100644
index 000000000..1a0e2a8e2
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-OLD-stdout.txt
@@ -0,0 +1,2 @@
+-- ExeNoRead_EXECUTABLE='ExeNoRead_EXECUTABLE-NOTFOUND'
+-- ReadNoExe_EXECUTABLE='.*/Tests/RunCMake/find_program/CMP0109-OLD-build/ReadNoExe'
diff --git a/Tests/RunCMake/find_program/CMP0109-OLD.cmake b/Tests/RunCMake/find_program/CMP0109-OLD.cmake
new file mode 100644
index 000000000..826016115
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0109 OLD)
+include(CMP0109-Common.cmake)
diff --git a/Tests/RunCMake/find_program/CMP0109-WARN-stderr.txt b/Tests/RunCMake/find_program/CMP0109-WARN-stderr.txt
new file mode 100644
index 000000000..202fc6def
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-WARN-stderr.txt
@@ -0,0 +1,29 @@
+^CMake Warning \(dev\) at CMP0109-Common.cmake:4 \(find_program\):
+ Policy CMP0109 is not set: find_program\(\) requires permission to execute
+ but not to read. Run "cmake --help-policy CMP0109" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+
+ The file
+
+ .*/Tests/RunCMake/find_program/CMP0109-WARN-build/ExeNoRead
+
+ is executable but not readable. CMake is ignoring it for compatibility.
+Call Stack \(most recent call first\):
+ CMP0109-WARN.cmake:1 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at CMP0109-Common.cmake:6 \(find_program\):
+ Policy CMP0109 is not set: find_program\(\) requires permission to execute
+ but not to read. Run "cmake --help-policy CMP0109" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+
+ The file
+
+ .*/Tests/RunCMake/find_program/CMP0109-WARN-build/ReadNoExe
+
+ is readable but not executable. CMake is using it for compatibility.
+Call Stack \(most recent call first\):
+ CMP0109-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/find_program/CMP0109-WARN-stdout.txt b/Tests/RunCMake/find_program/CMP0109-WARN-stdout.txt
new file mode 100644
index 000000000..baf560f6f
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-WARN-stdout.txt
@@ -0,0 +1,2 @@
+-- ExeNoRead_EXECUTABLE='ExeNoRead_EXECUTABLE-NOTFOUND'
+-- ReadNoExe_EXECUTABLE='.*/Tests/RunCMake/find_program/CMP0109-WARN-build/ReadNoExe'
diff --git a/Tests/RunCMake/find_program/CMP0109-WARN.cmake b/Tests/RunCMake/find_program/CMP0109-WARN.cmake
new file mode 100644
index 000000000..a3d59af49
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-WARN.cmake
@@ -0,0 +1 @@
+include(CMP0109-Common.cmake)
diff --git a/Tests/RunCMake/find_program/ExeNoRead-stdout.txt b/Tests/RunCMake/find_program/ExeNoRead-stdout.txt
deleted file mode 100644
index f2311782d..000000000
--- a/Tests/RunCMake/find_program/ExeNoRead-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- ExeNoRead_EXECUTABLE='ExeNoRead_EXECUTABLE-NOTFOUND'
diff --git a/Tests/RunCMake/find_program/RunCMakeTest.cmake b/Tests/RunCMake/find_program/RunCMakeTest.cmake
index 2bb777bff..3e2392031 100644
--- a/Tests/RunCMake/find_program/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_program/RunCMakeTest.cmake
@@ -17,6 +17,12 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT "${uid}" STREQUAL "0")
- run_cmake(ExeNoRead)
+ run_cmake(CMP0109-WARN)
+ run_cmake(CMP0109-OLD)
+ run_cmake(CMP0109-NEW)
endif()
endif()
+
+if(APPLE)
+ run_cmake(BundleSpaceInName)
+endif()
diff --git a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake
index 9647deabd..3b03ed7a9 100644
--- a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake
+++ b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake
@@ -8,13 +8,13 @@ function(foreachTest result list_var_1 list_var_2 list_var_3)
list(APPEND CMAKE_MESSAGE_INDENT "| ")
foreach(first second third IN ZIP_LISTS ${list_var_1} ${list_var_2} ${list_var_3})
if(NOT first)
- set(first "[undefiend]")
+ set(first "[undefined]")
endif()
if(NOT second)
- set(second "[undefiend]")
+ set(second "[undefined]")
endif()
if(NOT third)
- set(third "[undefiend]")
+ set(third "[undefined]")
endif()
if(NOT _arg_MUTE)
message(STATUS "${first}, ${second}, ${third}")
diff --git a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt
index 25433fdc3..4730a86ed 100644
--- a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt
+++ b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt
@@ -14,6 +14,6 @@
-- | one, satu, raz
-- | two, dua, dva
-- | three, tiga, tri
--- | \[undefiend\], empat, \[undefiend\]
+-- | \[undefined\], empat, \[undefined\]
-- End output
-- <<< test variable value restored -- PASSED >>>
diff --git a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake
index 56cfe6434..aa0ed0717 100644
--- a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake
+++ b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake
@@ -9,7 +9,7 @@ function(foreachTest result list_var_1 list_var_2 list_var_3)
foreach(num IN ZIP_LISTS ${list_var_1} ${list_var_2} ${list_var_3})
foreach(i RANGE 2)
if(NOT num_${i})
- set(num_${i} "[undefiend]")
+ set(num_${i} "[undefined]")
endif()
endforeach()
if(NOT _arg_MUTE)
diff --git a/Tests/RunCMake/get_filename_component/IncorrectArguments-result.txt b/Tests/RunCMake/get_filename_component/IncorrectArguments-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/get_filename_component/IncorrectArguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_filename_component/IncorrectArguments-stderr.txt b/Tests/RunCMake/get_filename_component/IncorrectArguments-stderr.txt
new file mode 100644
index 000000000..af08afae6
--- /dev/null
+++ b/Tests/RunCMake/get_filename_component/IncorrectArguments-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at IncorrectArguments.cmake:1 \(get_filename_component\):
+ get_filename_component called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/get_filename_component/IncorrectArguments.cmake b/Tests/RunCMake/get_filename_component/IncorrectArguments.cmake
new file mode 100644
index 000000000..e329e2925
--- /dev/null
+++ b/Tests/RunCMake/get_filename_component/IncorrectArguments.cmake
@@ -0,0 +1,2 @@
+get_filename_component(var)
+message("The error is fatal, so this should not print")
diff --git a/Tests/RunCMake/get_filename_component/RunCMakeTest.cmake b/Tests/RunCMake/get_filename_component/RunCMakeTest.cmake
index 156fc8f3c..a7820a0de 100644
--- a/Tests/RunCMake/get_filename_component/RunCMakeTest.cmake
+++ b/Tests/RunCMake/get_filename_component/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+run_cmake(IncorrectArguments)
run_cmake(KnownComponents)
run_cmake(UnknownComponent)
diff --git a/Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt b/Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt
index b146e5b4b..f86a6889a 100644
--- a/Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt
+++ b/Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at UnknownComponent.cmake:1 \(get_filename_component\):
+^CMake Error at UnknownComponent.cmake:1 \(get_filename_component\):
get_filename_component unknown component BOGUS
Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/get_filename_component/UnknownComponent.cmake b/Tests/RunCMake/get_filename_component/UnknownComponent.cmake
index 06abc51e6..19521ba46 100644
--- a/Tests/RunCMake/get_filename_component/UnknownComponent.cmake
+++ b/Tests/RunCMake/get_filename_component/UnknownComponent.cmake
@@ -1 +1,2 @@
get_filename_component(var "/path/to/filename.ext.in" BOGUS)
+message("The error is fatal, so this should not print")
diff --git a/Tests/RunCMake/get_property/CMakeLists.txt b/Tests/RunCMake/get_property/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/get_property/CMakeLists.txt
+++ b/Tests/RunCMake/get_property/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/if/CMakeLists.txt b/Tests/RunCMake/if/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/if/CMakeLists.txt
+++ b/Tests/RunCMake/if/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include/CMakeLists.txt b/Tests/RunCMake/include/CMakeLists.txt
index 12cd3c775..4b3de84d9 100644
--- a/Tests/RunCMake/include/CMakeLists.txt
+++ b/Tests/RunCMake/include/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_external_msproject/CMakeLists.txt b/Tests/RunCMake/include_external_msproject/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/include_external_msproject/CMakeLists.txt
+++ b/Tests/RunCMake/include_external_msproject/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_external_msproject/check_utils.cmake b/Tests/RunCMake/include_external_msproject/check_utils.cmake
index 0a2ba63f5..016251936 100644
--- a/Tests/RunCMake/include_external_msproject/check_utils.cmake
+++ b/Tests/RunCMake/include_external_msproject/check_utils.cmake
@@ -63,7 +63,7 @@ function(check_custom_platform TARGET_FILE PROJECT_NAME PLATFORM_NAME RESULT)
return()
endif()
- # probably whould be better to use configuration name
+ # probably would be better to use configuration name
# extracted from CMAKE_CONFIGURATION_TYPES than just hardcoded "Debug" instead
set(REG_EXP "^(\t)*\\{${FOUND_GUID}\\}\\.Debug[^ ]*\\.ActiveCfg = Debug\\|${PLATFORM_NAME}$")
check_line_exists(${TARGET_FILE} REG_EXP)
diff --git a/Tests/RunCMake/install/EXPORT-NamelinkOnly.cmake b/Tests/RunCMake/install/EXPORT-NamelinkOnly.cmake
new file mode 100644
index 000000000..1c310d1f9
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-NamelinkOnly.cmake
@@ -0,0 +1,12 @@
+enable_language(C)
+add_library(foo SHARED empty.c)
+install(TARGETS foo EXPORT fooExport
+ RUNTIME DESTINATION bin
+ LIBRARY
+ DESTINATION lib
+ NAMELINK_ONLY
+)
+install(EXPORT fooExport
+ DESTINATION "lib/cmake/"
+ FILE "foo.cmake"
+)
diff --git a/Tests/RunCMake/install/EXPORT-UnknownExport-result.txt b/Tests/RunCMake/install/EXPORT-UnknownExport-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-UnknownExport-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/EXPORT-UnknownExport-stderr.txt b/Tests/RunCMake/install/EXPORT-UnknownExport-stderr.txt
new file mode 100644
index 000000000..bd49fa26e
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-UnknownExport-stderr.txt
@@ -0,0 +1 @@
+CMake Error: INSTALL\(EXPORT\) given unknown export "fooExport"
diff --git a/Tests/RunCMake/install/EXPORT-UnknownExport.cmake b/Tests/RunCMake/install/EXPORT-UnknownExport.cmake
new file mode 100644
index 000000000..2dbba4e28
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-UnknownExport.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+install(EXPORT fooExport
+ DESTINATION "lib/cmake/"
+ FILE "foo.cmake"
+)
diff --git a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake
new file mode 100644
index 000000000..8750a7685
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake
@@ -0,0 +1,11 @@
+
+set(objs obj1 obj2)
+set(targets sse2 sse4 avx avx2)
+foreach(o IN LISTS objs)
+ set(item "objs/${o}\\.ispc\\.(o|obj)")
+ check_installed("${item}")
+ foreach(t IN LISTS targets)
+ set(item "objs/${o}\\.ispc_${t}\\.(o|obj)")
+ check_installed("${item}")
+ endforeach()
+endforeach()
diff --git a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake
new file mode 100644
index 000000000..ad542ed82
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake
@@ -0,0 +1,4 @@
+enable_language(ISPC)
+add_library(objs OBJECT obj1.ispc obj2.ispc)
+set_target_properties(objs PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4")
+install(FILES $<TARGET_OBJECTS:objs> DESTINATION objs)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index d83a07cdb..5aab88ca8 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -76,6 +76,8 @@ run_cmake(DIRECTORY-DESTINATION-bad)
run_cmake(FILES-DESTINATION-bad)
run_cmake(TARGETS-DESTINATION-bad)
run_cmake(EXPORT-OldIFace)
+run_cmake(EXPORT-UnknownExport)
+run_cmake(EXPORT-NamelinkOnly)
run_cmake(CMP0062-OLD)
run_cmake(CMP0062-NEW)
run_cmake(CMP0062-WARN)
@@ -96,6 +98,11 @@ if(NOT RunCMake_GENERATOR STREQUAL "Xcode" OR NOT "$ENV{CMAKE_OSX_ARCHITECTURES}
run_install_test(FILES-TARGET_OBJECTS)
endif()
+if(CMake_TEST_ISPC)
+ run_install_test(FILES-EXTRA_ISPC_TARGET_OBJECTS)
+endif()
+
+
run_install_test(TARGETS-InstallFromSubDir)
run_install_test(TARGETS-OPTIONAL)
run_install_test(FILES-OPTIONAL)
diff --git a/Tests/RunCMake/install/obj1.ispc b/Tests/RunCMake/install/obj1.ispc
new file mode 100644
index 000000000..0dc983c3f
--- /dev/null
+++ b/Tests/RunCMake/install/obj1.ispc
@@ -0,0 +1,4 @@
+
+float func1(float a, float b) {
+ return a + b / 2.;
+}
diff --git a/Tests/RunCMake/install/obj2.ispc b/Tests/RunCMake/install/obj2.ispc
new file mode 100644
index 000000000..7b2aeb97f
--- /dev/null
+++ b/Tests/RunCMake/install/obj2.ispc
@@ -0,0 +1,4 @@
+
+float func2(float a, float b) {
+ return a + b / 2.;
+}
diff --git a/Tests/RunCMake/interface_library/RunCMakeTest.cmake b/Tests/RunCMake/interface_library/RunCMakeTest.cmake
deleted file mode 100644
index 5a6af1da6..000000000
--- a/Tests/RunCMake/interface_library/RunCMakeTest.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-include(RunCMake)
-
-run_cmake(invalid_name)
-run_cmake(target_commands)
-run_cmake(no_shared_libs)
-run_cmake(whitelist)
-run_cmake(invalid_signature)
-run_cmake(global-interface)
-run_cmake(genex_link)
-run_cmake(add_custom_command-TARGET)
-run_cmake(IMPORTED_LIBNAME-bad-value)
-run_cmake(IMPORTED_LIBNAME-non-iface)
-run_cmake(IMPORTED_LIBNAME-non-imported)
diff --git a/Tests/RunCMake/interface_library/whitelist-stderr.txt b/Tests/RunCMake/interface_library/whitelist-stderr.txt
deleted file mode 100644
index 577c0cc5d..000000000
--- a/Tests/RunCMake/interface_library/whitelist-stderr.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-CMake Error at whitelist.cmake:4 \(set_property\):
- INTERFACE_LIBRARY targets may only have whitelisted properties. The
- property "OUTPUT_NAME" is not allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-
-
-CMake Error at whitelist.cmake:5 \(set_property\):
- INTERFACE_LIBRARY targets may only have whitelisted properties. The
- property "OUTPUT_NAME" is not allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-
-
-CMake Error at whitelist.cmake:6 \(get_target_property\):
- INTERFACE_LIBRARY targets may only have whitelisted properties. The
- property "OUTPUT_NAME" is not allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/interface_library/whitelist.cmake b/Tests/RunCMake/interface_library/whitelist.cmake
deleted file mode 100644
index 0db637531..000000000
--- a/Tests/RunCMake/interface_library/whitelist.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-
-add_library(iface INTERFACE)
-
-set_property(TARGET iface PROPERTY OUTPUT_NAME output)
-set_property(TARGET iface APPEND PROPERTY OUTPUT_NAME append)
-get_target_property(outname iface OUTPUT_NAME)
-
-# Properties starting with `_` are allowed.
-set_property(TARGET iface PROPERTY "_custom_property" output)
-set_property(TARGET iface APPEND PROPERTY "_custom_property" append)
-get_target_property(outname iface "_custom_property")
-
-# Properties starting with a lowercase letter are allowed.
-set_property(TARGET iface PROPERTY "custom_property" output)
-set_property(TARGET iface APPEND PROPERTY "custom_property" append)
-get_target_property(outname iface "custom_property")
-
-# PUBLIC_HEADER / PRIVATE_HEADER properties are allowed
-set_property(TARGET iface PROPERTY PUBLIC_HEADER foo.h)
-set_property(TARGET iface APPEND PROPERTY PUBLIC_HEADER bar.h)
-get_target_property(outname iface PUBLIC_HEADER)
-
-set_property(TARGET iface PROPERTY PRIVATE_HEADER foo.h)
-set_property(TARGET iface APPEND PROPERTY PRIVATE_HEADER bar.h)
-get_target_property(outname iface PRIVATE_HEADER)
diff --git a/Tests/RunCMake/list/CMakeLists.txt b/Tests/RunCMake/list/CMakeLists.txt
index 12cd3c775..4b3de84d9 100644
--- a/Tests/RunCMake/list/CMakeLists.txt
+++ b/Tests/RunCMake/list/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
index a0f883780..9103bd2d4 100644
--- a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
+++ b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
@@ -1,4 +1,13 @@
-^CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
+^CMake Deprecation Warning at GET-CMP0007-WARN.cmake:1 \(cmake_policy\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
Policy CMP0007 is not set: list command no longer ignores empty elements.
Run "cmake --help-policy CMP0007" for policy details. Use the cmake_policy
command to set the policy and suppress this warning. List has value =
diff --git a/Tests/RunCMake/math/CMakeLists.txt b/Tests/RunCMake/math/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/math/CMakeLists.txt
+++ b/Tests/RunCMake/math/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/message/CMakeLists.txt b/Tests/RunCMake/message/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/message/CMakeLists.txt
+++ b/Tests/RunCMake/message/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/no_install_prefix/CMakeLists.txt b/Tests/RunCMake/no_install_prefix/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/no_install_prefix/CMakeLists.txt
+++ b/Tests/RunCMake/no_install_prefix/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/project/CMakeLists.txt b/Tests/RunCMake/project/CMakeLists.txt
index 12cd3c775..4b3de84d9 100644
--- a/Tests/RunCMake/project/CMakeLists.txt
+++ b/Tests/RunCMake/project/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/separate_arguments/MultipleArguments-result.txt b/Tests/RunCMake/separate_arguments/MultipleArguments-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/MultipleArguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/separate_arguments/MultipleArguments-stderr.txt b/Tests/RunCMake/separate_arguments/MultipleArguments-stderr.txt
new file mode 100644
index 000000000..bbf1cf243
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/MultipleArguments-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at MultipleArguments.cmake:[0-9]+ \(separate_arguments\):
+ separate_arguments given unexpected argument\(s\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/separate_arguments/MultipleArguments.cmake b/Tests/RunCMake/separate_arguments/MultipleArguments.cmake
new file mode 100644
index 000000000..d38a03b04
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/MultipleArguments.cmake
@@ -0,0 +1,2 @@
+
+separate_arguments (var UNIX_COMMAND arg1 arg2)
diff --git a/Tests/RunCMake/separate_arguments/MultipleCommands-result.txt b/Tests/RunCMake/separate_arguments/MultipleCommands-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/MultipleCommands-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/separate_arguments/MultipleCommands-stderr.txt b/Tests/RunCMake/separate_arguments/MultipleCommands-stderr.txt
new file mode 100644
index 000000000..9dca8f675
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/MultipleCommands-stderr.txt
@@ -0,0 +1,19 @@
+CMake Error at MultipleCommands.cmake:[0-9]+ \(separate_arguments\):
+ separate_arguments 'UNIX_COMMAND', 'WINDOWS_COMMAND' and 'NATIVE_COMMAND'
+ are mutually exclusive
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at MultipleCommands.cmake:[0-9]+ \(separate_arguments\):
+ separate_arguments 'UNIX_COMMAND', 'WINDOWS_COMMAND' and 'NATIVE_COMMAND'
+ are mutually exclusive
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at MultipleCommands.cmake:[0-9]+ \(separate_arguments\):
+ separate_arguments 'UNIX_COMMAND', 'WINDOWS_COMMAND' and 'NATIVE_COMMAND'
+ are mutually exclusive
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/separate_arguments/MultipleCommands.cmake b/Tests/RunCMake/separate_arguments/MultipleCommands.cmake
new file mode 100644
index 000000000..cb71fcbda
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/MultipleCommands.cmake
@@ -0,0 +1,6 @@
+
+separate_arguments(var UNIX_COMMAND WINDOWS_COMMAND)
+
+separate_arguments(var UNIX_COMMAND NATIVE_COMMAND)
+
+separate_arguments(var WINDOWS_COMMAND NATIVE_COMMAND)
diff --git a/Tests/RunCMake/separate_arguments/NativeCommand.cmake b/Tests/RunCMake/separate_arguments/NativeCommand.cmake
index 1cb009e9f..0051a7938 100644
--- a/Tests/RunCMake/separate_arguments/NativeCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/NativeCommand.cmake
@@ -17,3 +17,8 @@ if(NOT "${native_out}" STREQUAL "${native_exp}")
message(FATAL_ERROR "separate_arguments native-style failed. "
"Expected\n [${native_exp}]\nbut got\n [${native_out}]\n")
endif()
+
+separate_arguments(empty_out NATIVE_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments native-style failed on no arguments")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/ProgramCommand.cmake b/Tests/RunCMake/separate_arguments/ProgramCommand.cmake
new file mode 100644
index 000000000..8325def1b
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/ProgramCommand.cmake
@@ -0,0 +1,48 @@
+
+separate_arguments (out UNIX_COMMAND PROGRAM "xx a b c")
+if (out)
+ message (SEND_ERROR "unexpected result with nonexistent program")
+endif()
+
+set (TEST_EXE_DIR "${CMAKE_CURRENT_BINARY_DIR}/TestExe")
+file(MAKE_DIRECTORY "${TEST_EXE_DIR}")
+file(COPY "${CMAKE_COMMAND}" DESTINATION "${TEST_EXE_DIR}")
+get_filename_component (cmake_exe "${CMAKE_COMMAND}" NAME)
+
+set (ENV{PATH} "${TEST_EXE_DIR}")
+
+
+separate_arguments (out UNIX_COMMAND PROGRAM "${cmake_exe}")
+list (LENGTH out length)
+if (length EQUAL 0)
+ message(FATAL_ERROR "existent program not found")
+endif()
+if (NOT length EQUAL 2)
+ message(FATAL_ERROR "unexpected arguments")
+endif()
+list(GET out 0 cmake)
+list(GET out 1 args)
+if (NOT cmake STREQUAL "${TEST_EXE_DIR}/${cmake_exe}")
+ message (SEND_ERROR "bad path for program: '${cmake}' instead of '${TEST_EXE_DIR}/${cmake_exe}'")
+endif()
+if (NOT args STREQUAL "")
+ message (SEND_ERROR "bad value for args: '${args}' instead of ''")
+endif()
+
+
+separate_arguments (out UNIX_COMMAND PROGRAM "${cmake_exe} a b c")
+list (LENGTH out length)
+if (length EQUAL 0)
+ message(FATAL_ERROR "existent program not found")
+endif()
+if (NOT length EQUAL 2)
+ message(FATAL_ERROR "unexpected arguments")
+endif()
+list(GET out 0 cmake)
+list(GET out 1 args)
+if (NOT cmake STREQUAL "${TEST_EXE_DIR}/${cmake_exe}")
+ message (SEND_ERROR "bad path for program: '${cmake}' instead of '${TEST_EXE_DIR}/${cmake_exe}'")
+endif()
+if (NOT args STREQUAL " a b c")
+ message (SEND_ERROR "bad value for args: '${args}' instead of ' a b c'")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/ProgramCommandWithSeparateArgs.cmake b/Tests/RunCMake/separate_arguments/ProgramCommandWithSeparateArgs.cmake
new file mode 100644
index 000000000..07572ba60
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/ProgramCommandWithSeparateArgs.cmake
@@ -0,0 +1,28 @@
+
+separate_arguments (out UNIX_COMMAND PROGRAM SEPARATE_ARGS "xx a b c")
+if (out)
+ message (SEND_ERROR "unexpected result with nonexistent program")
+endif()
+
+set (TEST_EXE_DIR "${CMAKE_CURRENT_BINARY_DIR}/TestExe")
+file(MAKE_DIRECTORY "${TEST_EXE_DIR}")
+file(COPY "${CMAKE_COMMAND}" DESTINATION "${TEST_EXE_DIR}")
+get_filename_component (cmake_exe "${CMAKE_COMMAND}" NAME)
+
+set (ENV{PATH} "${TEST_EXE_DIR}")
+
+separate_arguments (out UNIX_COMMAND PROGRAM SEPARATE_ARGS "${cmake_exe} a b c")
+list (LENGTH out length)
+if (length EQUAL 0)
+ message(FATAL_ERROR "existent program not found")
+endif()
+if (NOT length EQUAL 4)
+ message(FATAL_ERROR "unexpected arguments")
+endif()
+list(POP_FRONT out cmake)
+if (NOT cmake STREQUAL "${TEST_EXE_DIR}/${cmake_exe}")
+ message (SEND_ERROR "bad path for program: '${cmake}' instead of '${TEST_EXE_DIR}/${cmake_exe}'")
+endif()
+if (NOT out STREQUAL "a;b;c")
+ message (SEND_ERROR "bad path for args: '${out}' instead of 'a;b;c'")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/ProgramOnly-result.txt b/Tests/RunCMake/separate_arguments/ProgramOnly-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/ProgramOnly-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/separate_arguments/ProgramOnly-stderr.txt b/Tests/RunCMake/separate_arguments/ProgramOnly-stderr.txt
new file mode 100644
index 000000000..e34ca4c85
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/ProgramOnly-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at ProgramOnly.cmake:[0-9]+ \(separate_arguments\):
+ separate_arguments missing required option: 'UNIX_COMMAND' or
+ 'WINDOWS_COMMAND' or 'NATIVE_COMMAND'
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/separate_arguments/ProgramOnly.cmake b/Tests/RunCMake/separate_arguments/ProgramOnly.cmake
new file mode 100644
index 000000000..cc21d2ba1
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/ProgramOnly.cmake
@@ -0,0 +1,2 @@
+
+separate_arguments (var PROGRAM arg)
diff --git a/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake b/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
index 07951bb59..3c02c49fa 100644
--- a/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
+++ b/Tests/RunCMake/separate_arguments/RunCMakeTest.cmake
@@ -1,7 +1,15 @@
include(RunCMake)
+run_cmake(MultipleCommands)
+run_cmake(MultipleArguments)
+run_cmake(ProgramOnly)
+run_cmake(SeparateArgsOnly)
+
run_cmake(EmptyCommand)
run_cmake(PlainCommand)
run_cmake(UnixCommand)
run_cmake(WindowsCommand)
run_cmake(NativeCommand)
+
+run_cmake(ProgramCommand)
+run_cmake(ProgramCommandWithSeparateArgs)
diff --git a/Tests/RunCMake/separate_arguments/SeparateArgsOnly-result.txt b/Tests/RunCMake/separate_arguments/SeparateArgsOnly-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/SeparateArgsOnly-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/separate_arguments/SeparateArgsOnly-stderr.txt b/Tests/RunCMake/separate_arguments/SeparateArgsOnly-stderr.txt
new file mode 100644
index 000000000..e87b1cb2b
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/SeparateArgsOnly-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at SeparateArgsOnly.cmake:[0-9]+ \(separate_arguments\):
+ separate_arguments `SEPARATE_ARGS` option requires `PROGRAM' option
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/separate_arguments/SeparateArgsOnly.cmake b/Tests/RunCMake/separate_arguments/SeparateArgsOnly.cmake
new file mode 100644
index 000000000..876fd7cfc
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/SeparateArgsOnly.cmake
@@ -0,0 +1,2 @@
+
+separate_arguments (var UNIX_COMMAND SEPARATE_ARGS arg)
diff --git a/Tests/RunCMake/separate_arguments/UnixCommand.cmake b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
index 0b5767ac5..c56cd632d 100644
--- a/Tests/RunCMake/separate_arguments/UnixCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
@@ -6,3 +6,8 @@ if(NOT "${unix_out}" STREQUAL "${unix_exp}")
message(FATAL_ERROR "separate_arguments unix-style failed. "
"Expected\n [${unix_exp}]\nbut got\n [${unix_out}]\n")
endif()
+
+separate_arguments(empty_out UNIX_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments unix-style failed on no arguments")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
index 86aa14ad0..cd0749487 100644
--- a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
@@ -6,3 +6,8 @@ if(NOT "${windows_out}" STREQUAL "${windows_exp}")
message(FATAL_ERROR "separate_arguments windows-style failed. "
"Expected\n [${windows_exp}]\nbut got\n [${windows_out}]\n")
endif()
+
+separate_arguments(empty_out WINDOWS_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments windows-style failed on no arguments")
+endif()
diff --git a/Tests/RunCMake/string/CMakeLists.txt b/Tests/RunCMake/string/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/string/CMakeLists.txt
+++ b/Tests/RunCMake/string/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/string/JSON.cmake b/Tests/RunCMake/string/JSON.cmake
new file mode 100644
index 000000000..ab4194d26
--- /dev/null
+++ b/Tests/RunCMake/string/JSON.cmake
@@ -0,0 +1,342 @@
+function(assert_strequal actual expected)
+ if(NOT expected STREQUAL actual)
+ message(SEND_ERROR "Output:\n${actual}\nDid not match expected:\n${expected}\n")
+ endif()
+endfunction()
+
+function(assert_strequal_error actual expected error)
+ if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+ endif()
+ assert_strequal("${actual}" "${expected}")
+endfunction()
+
+function(assert_json_equal error actual expected)
+ if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+ endif()
+ string(JSON eql EQUAL "${actual}" "${expected}")
+ if(NOT eql)
+ message(SEND_ERROR "Expected equality got\n ${actual}\n expected\n${expected}")
+ endif()
+endfunction()
+
+# test EQUAL
+string(JSON result EQUAL
+[=[ {"foo":"bar"} ]=]
+[=[
+{
+"foo": "bar"
+}
+]=])
+if(NOT result)
+ message(SEND_ERROR "Expected ON got ${result}")
+endif()
+
+string(JSON result EQUAL
+[=[ {"foo":"bar"} ]=]
+[=[
+{
+"foo1": "bar"
+}
+]=])
+if(result)
+ message(SEND_ERROR "Expected OFF got ${result}")
+endif()
+
+
+
+set(json1 [=[
+{
+ "foo" : "bar",
+ "array" : [5, "val", {"some": "other"}, null],
+ "types" : {
+ "null" : null,
+ "number" : 5,
+ "string" : "foo",
+ "boolean" : false,
+ "array" : [1,2,3],
+ "object" : {}
+ },
+ "values" : {
+ "null" : null,
+ "number" : 5,
+ "string" : "foo",
+ "false" : false,
+ "true" : true
+ },
+ "special" : {
+ "foo;bar" : "value1",
+ ";" : "value2",
+ "semicolon" : ";",
+ "list" : ["one", "two;three", "four"],
+ "quote" : "\"",
+ "\"" : "quote",
+ "backslash" : "\\",
+ "\\" : "backslash",
+ "slash" : "\/",
+ "\/" : "slash",
+ "newline" : "\n",
+ "\n" : "newline",
+ "return" : "\r",
+ "\r" : "return",
+ "tab" : "\t",
+ "\t" : "tab",
+ "backspace" : "\b",
+ "\b" : "backspace",
+ "formfeed" : "\f",
+ "\f" : "formfeed"
+ }
+}
+]=])
+
+string(JSON result GET "${json1}" foo)
+assert_strequal("${result}" bar)
+string(JSON result GET "${json1}" array 0)
+assert_strequal("${result}" 5)
+string(JSON result GET "${json1}" array 1)
+assert_strequal("${result}" val)
+string(JSON result GET "${json1}" array 2 some)
+assert_strequal("${result}" other)
+
+string(JSON result GET "${json1}" values null)
+assert_strequal("${result}" "")
+string(JSON result GET "${json1}" values number)
+assert_strequal("${result}" 5)
+string(JSON result GET "${json1}" values string)
+assert_strequal("${result}" "foo")
+string(JSON result GET "${json1}" values true)
+assert_strequal("${result}" "ON")
+if(NOT result)
+ message(SEND_ERROR "Output did not match expected: TRUE actual: ${result}")
+endif()
+string(JSON result GET "${json1}" values false)
+assert_strequal("${result}" "OFF")
+if(result)
+ message(SEND_ERROR "Output did not match expected: FALSE actual: ${result}")
+endif()
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" foo)
+assert_strequal_error("${result}" "bar" "${error}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" notThere)
+assert_strequal("${result}" "notThere-NOTFOUND")
+assert_strequal("${error}" "member 'notThere' not found")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" 0)
+assert_strequal("${result}" "0-NOTFOUND")
+assert_strequal("${error}" "member '0' not found")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" array 10)
+assert_strequal("${result}" "array-10-NOTFOUND")
+assert_strequal("${error}" "expected an index less then 4 got '10'")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" array 2 some notThere)
+assert_strequal("${result}" "array-2-some-notThere-NOTFOUND")
+assert_strequal("${error}" "invalid path 'array 2 some notThere', need element of OBJECT or ARRAY type to lookup 'notThere' got STRING")
+
+# special chars
+string(JSON result ERROR_VARIABLE error GET "${json1}" special "foo;bar")
+assert_strequal_error("${result}" "value1" "${error}")
+string(JSON result ERROR_VARIABLE error GET "${json1}" special ";")
+assert_strequal_error("${result}" "value2" "${error}")
+string(JSON result ERROR_VARIABLE error GET "${json1}" special semicolon)
+assert_strequal_error("${result}" ";" "${error}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" special list 1)
+assert_strequal_error("${result}" "two;three" "${error}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}")
+assert_json_equal("${error}" "${result}" "${json1}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" array)
+assert_json_equal("${error}" "${result}" [=[ [5, "val", {"some": "other"}, null] ]=])
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" special quote)
+assert_strequal_error("${result}" "\"" "${error}")
+string(JSON result ERROR_VARIABLE error GET "${json1}" special "\"")
+assert_strequal_error("${result}" "quote" "${error}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" special backslash)
+assert_strequal_error("${result}" "\\" "${error}")
+string(JSON result ERROR_VARIABLE error GET "${json1}" special "\\")
+assert_strequal_error("${result}" "backslash" "${error}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" special slash)
+assert_strequal_error("${result}" "/" "${error}")
+string(JSON result ERROR_VARIABLE error GET "${json1}" special "/")
+assert_strequal_error("${result}" "slash" "${error}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" special newline)
+assert_strequal_error("${result}" "\n" "${error}")
+string(JSON result ERROR_VARIABLE error GET "${json1}" special "\n")
+assert_strequal_error("${result}" "newline" "${error}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" special return)
+assert_strequal_error("${result}" "\r" "${error}")
+string(JSON result ERROR_VARIABLE error GET "${json1}" special "\r")
+assert_strequal_error("${result}" "return" "${error}")
+
+string(JSON result ERROR_VARIABLE error GET "${json1}" special tab)
+assert_strequal_error("${result}" "\t" "${error}")
+string(JSON result ERROR_VARIABLE error GET "${json1}" special "\t")
+assert_strequal_error("${result}" "tab" "${error}")
+
+file(READ ${CMAKE_CURRENT_LIST_DIR}/json/unicode.json unicode)
+string(JSON char ERROR_VARIABLE error GET "${unicode}" backspace)
+string(JSON result ERROR_VARIABLE error GET "${unicode}" "${char}")
+assert_strequal_error("${result}" "backspace" "${error}")
+
+file(READ ${CMAKE_CURRENT_LIST_DIR}/json/unicode.json unicode)
+string(JSON char ERROR_VARIABLE error GET "${unicode}" backspace)
+string(JSON result ERROR_VARIABLE error GET "${unicode}" "${char}")
+assert_strequal_error("${result}" "backspace" "${error}")
+
+string(JSON char ERROR_VARIABLE error GET "${unicode}" formfeed)
+string(JSON result ERROR_VARIABLE error GET "${unicode}" "${char}")
+assert_strequal_error("${result}" "formfeed" "${error}")
+
+string(JSON char ERROR_VARIABLE error GET "${unicode}" datalinkescape)
+string(JSON result ERROR_VARIABLE error GET "${unicode}" "${char}")
+assert_strequal_error("${result}" "datalinkescape" "${error}")
+
+# Test TYPE
+string(JSON result TYPE "${json1}" types null)
+assert_strequal("${result}" NULL)
+string(JSON result TYPE "${json1}" types number)
+assert_strequal("${result}" NUMBER)
+string(JSON result TYPE "${json1}" types string)
+assert_strequal("${result}" STRING)
+string(JSON result TYPE "${json1}" types boolean)
+assert_strequal("${result}" BOOLEAN)
+string(JSON result TYPE "${json1}" types array)
+assert_strequal("${result}" ARRAY)
+string(JSON result TYPE "${json1}" types object)
+assert_strequal("${result}" OBJECT)
+
+# Test LENGTH
+string(JSON result ERROR_VARIABLE error LENGTH "${json1}")
+assert_strequal("${result}" 5)
+if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+endif()
+
+string(JSON result ERROR_VARIABLE error LENGTH "${json1}" array)
+assert_strequal("${result}" 4)
+if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+endif()
+
+string(JSON result ERROR_VARIABLE error LENGTH "${json1}" foo)
+assert_strequal("${result}" "foo-NOTFOUND")
+assert_strequal("${error}" "LENGTH needs to be called with an element of type ARRAY or OBJECT, got STRING")
+
+# Test MEMBER
+string(JSON result ERROR_VARIABLE error MEMBER "${json1}" values 2)
+assert_strequal("${result}" "number")
+if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+endif()
+
+string(JSON result ERROR_VARIABLE error MEMBER "${json1}" values 100)
+assert_strequal("${result}" "values-100-NOTFOUND")
+assert_strequal("${error}" "expected an index less then 5 got '100'")
+
+# Test length loops
+string(JSON arrayLength ERROR_VARIABLE error LENGTH "${json1}" types array)
+if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+endif()
+set(values "")
+math(EXPR arrayLength "${arrayLength}-1")
+foreach(index RANGE ${arrayLength})
+ string(JSON value ERROR_VARIABLE error GET "${json1}" types array ${index})
+ if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+ endif()
+ list(APPEND values "${value}")
+endforeach()
+assert_strequal("${values}" "1;2;3")
+
+string(JSON valuesLength ERROR_VARIABLE error LENGTH "${json1}" values)
+if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+endif()
+set(values "")
+set(members "")
+math(EXPR valuesLength "${valuesLength}-1")
+foreach(index RANGE ${valuesLength})
+ string(JSON member ERROR_VARIABLE error MEMBER "${json1}" values ${index})
+ if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+ endif()
+ string(JSON value ERROR_VARIABLE error GET "${json1}" values ${member})
+ if(error)
+ message(SEND_ERROR "Unexpected error: ${error}")
+ endif()
+
+ list(APPEND members "${member}")
+ list(APPEND values "${value}")
+endforeach()
+assert_strequal("${members}" "false;null;number;string;true")
+assert_strequal("${values}" "OFF;;5;foo;ON")
+
+# Test REMOVE
+set(json2 [=[{
+ "foo" : "bar",
+ "array" : [5, "val", {"some": "other"}, null]
+}]=])
+string(JSON result ERROR_VARIABLE error REMOVE ${json2} foo)
+assert_json_equal("${error}" "${result}"
+[=[{
+ "array" : [5, "val", {"some": "other"}, null]
+}]=])
+
+string(JSON result ERROR_VARIABLE error REMOVE ${json2} array 1)
+assert_json_equal("${error}" "${result}"
+[=[{
+ "foo" : "bar",
+ "array" : [5, {"some": "other"}, null]
+}]=])
+
+string(JSON result ERROR_VARIABLE error REMOVE ${json2} array 100)
+assert_strequal("${result}" "array-100-NOTFOUND")
+assert_strequal("${error}" "expected an index less then 4 got '100'")
+
+# Test SET
+string(JSON result ERROR_VARIABLE error SET ${json2} new 5)
+assert_json_equal("${error}" "${result}"
+[=[{
+ "foo" : "bar",
+ "array" : [5, "val", {"some": "other"}, null],
+ "new" : 5
+}]=])
+
+string(JSON result ERROR_VARIABLE error SET ${json2} new [=[ {"obj" : false} ]=])
+assert_json_equal("${error}" "${result}"
+[=[{
+ "foo" : "bar",
+ "array" : [5, "val", {"some": "other"}, null],
+ "new" : {"obj" : false}
+}]=])
+
+string(JSON result ERROR_VARIABLE error SET ${json2} array 0 6)
+assert_json_equal("${error}" "${result}"
+[=[{
+ "foo" : "bar",
+ "array" : [6, "val", {"some": "other"}, null]
+}]=])
+
+string(JSON result ERROR_VARIABLE error SET ${json2} array 5 [["append"]])
+assert_json_equal("${error}" "${result}"
+[=[{
+ "foo" : "bar",
+ "array" : [5, "val", {"some": "other"}, null, "append"]
+}]=])
+
+string(JSON result ERROR_VARIABLE error SET ${json2} array 100 [["append"]])
+assert_json_equal("${error}" "${result}"
+[=[{
+ "foo" : "bar",
+ "array" : [5, "val", {"some": "other"}, null, "append"]
+}]=])
diff --git a/Tests/RunCMake/string/JSONNoArgs-result.txt b/Tests/RunCMake/string/JSONNoArgs-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/string/JSONNoArgs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/JSONNoArgs-stderr.txt b/Tests/RunCMake/string/JSONNoArgs-stderr.txt
new file mode 100644
index 000000000..426735ac4
--- /dev/null
+++ b/Tests/RunCMake/string/JSONNoArgs-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at JSONNoArgs.cmake:1 \(string\):
+ string sub-command JSON missing out-var argument.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/string/JSONNoArgs.cmake b/Tests/RunCMake/string/JSONNoArgs.cmake
new file mode 100644
index 000000000..4463fe4a2
--- /dev/null
+++ b/Tests/RunCMake/string/JSONNoArgs.cmake
@@ -0,0 +1 @@
+string(JSON)
diff --git a/Tests/RunCMake/string/JSONNoJson-result.txt b/Tests/RunCMake/string/JSONNoJson-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/string/JSONNoJson-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/JSONNoJson-stderr.txt b/Tests/RunCMake/string/JSONNoJson-stderr.txt
new file mode 100644
index 000000000..26804dfeb
--- /dev/null
+++ b/Tests/RunCMake/string/JSONNoJson-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at JSONNoJson.cmake:1 \(string\):
+ string sub-command JSON missing json string argument.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/string/JSONNoJson.cmake b/Tests/RunCMake/string/JSONNoJson.cmake
new file mode 100644
index 000000000..4f819f16e
--- /dev/null
+++ b/Tests/RunCMake/string/JSONNoJson.cmake
@@ -0,0 +1 @@
+string(JSON var GET)
diff --git a/Tests/RunCMake/string/JSONOneArg-result.txt b/Tests/RunCMake/string/JSONOneArg-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/string/JSONOneArg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/JSONOneArg-stderr.txt b/Tests/RunCMake/string/JSONOneArg-stderr.txt
new file mode 100644
index 000000000..282139cf1
--- /dev/null
+++ b/Tests/RunCMake/string/JSONOneArg-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at JSONOneArg.cmake:1 \(string\):
+ string sub-command JSON missing mode argument.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/string/JSONOneArg.cmake b/Tests/RunCMake/string/JSONOneArg.cmake
new file mode 100644
index 000000000..143f9ca1a
--- /dev/null
+++ b/Tests/RunCMake/string/JSONOneArg.cmake
@@ -0,0 +1 @@
+string(JSON var)
diff --git a/Tests/RunCMake/string/JSONWrongMode-result.txt b/Tests/RunCMake/string/JSONWrongMode-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/string/JSONWrongMode-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/JSONWrongMode-stderr.txt b/Tests/RunCMake/string/JSONWrongMode-stderr.txt
new file mode 100644
index 000000000..c70991b27
--- /dev/null
+++ b/Tests/RunCMake/string/JSONWrongMode-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at JSONWrongMode.cmake:1 \(string\):
+ string sub-command JSON got an invalid mode 'FOO', expected one of GET,
+ GET_ARRAY, TYPE, MEMBER, MEMBERS, LENGTH, REMOVE, SET, EQUAL.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/string/JSONWrongMode.cmake b/Tests/RunCMake/string/JSONWrongMode.cmake
new file mode 100644
index 000000000..7301f7a88
--- /dev/null
+++ b/Tests/RunCMake/string/JSONWrongMode.cmake
@@ -0,0 +1 @@
+string(JSON var FOO)
diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake
index bb7cb174e..ff0bb51a3 100644
--- a/Tests/RunCMake/string/RunCMakeTest.cmake
+++ b/Tests/RunCMake/string/RunCMakeTest.cmake
@@ -1,5 +1,12 @@
include(RunCMake)
+run_cmake(JSON)
+
+run_cmake(JSONNoJson)
+run_cmake(JSONWrongMode)
+run_cmake(JSONOneArg)
+run_cmake(JSONNoArgs)
+
run_cmake(Append)
run_cmake(AppendNoArgs)
diff --git a/Tests/RunCMake/string/json/unicode.json b/Tests/RunCMake/string/json/unicode.json
new file mode 100644
index 000000000..86fd232c4
--- /dev/null
+++ b/Tests/RunCMake/string/json/unicode.json
@@ -0,0 +1,8 @@
+{
+ "backspace" : "\b",
+ "\b" : "backspace",
+ "formfeed" : "\f",
+ "\f" : "formfeed" ,
+ "datalinkescape" : "\u0010",
+ "\u0010" : "datalinkescape"
+}
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake
index 2e9cba82c..6c7254641 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake
+++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.11)
project(CMP0022-WARN)
add_library(foo SHARED empty_vs6_1.cpp)
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake
index fcc8da03e..dfdf70b27 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake
+++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.11)
project(CMP0022-WARN)
add_library(foo SHARED empty_vs6_1.cpp)
diff --git a/Tests/RunCMake/target_link_libraries/CMakeLists.txt b/Tests/RunCMake/target_link_libraries/CMakeLists.txt
index 8f85fbf54..667561ea7 100644
--- a/Tests/RunCMake/target_link_libraries/CMakeLists.txt
+++ b/Tests/RunCMake/target_link_libraries/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake b/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake
index bab537edb..d6ddfaefb 100644
--- a/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake
+++ b/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake
@@ -3,7 +3,8 @@ set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
add_library(imported SHARED IMPORTED)
set_target_properties(imported PROPERTIES
- IMPORTED_LOCATION "imported"
+ IMPORTED_LOCATION "imported${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ IMPORTED_IMPLIB "imported${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LINK_DEPENDENT_LIBRARIES "/path/to/libSharedDep.so"
)
add_executable(empty empty.c)
diff --git a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake
index 9b97918a5..9f86b1850 100644
--- a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake
+++ b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake
@@ -1,4 +1,3 @@
-cmake_policy(SET CMP0022 NEW)
enable_language(C)
add_library(foo STATIC empty.c)
add_library(not_exported STATIC empty.c)
diff --git a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake
index 7122ae91e..20ec43825 100644
--- a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake
+++ b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake
@@ -1,4 +1,3 @@
-cmake_policy(SET CMP0022 NEW)
enable_language(C)
add_library(foo STATIC empty.c)
target_link_libraries(foo PRIVATE not_a_target)
diff --git a/Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake b/Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake
index f52fa30bc..608f47b6f 100644
--- a/Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake
+++ b/Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake
@@ -1,4 +1,5 @@
enable_language(C)
add_library(UnknownImportedGlobal UNKNOWN IMPORTED GLOBAL)
+set_target_properties(UnknownImportedGlobal PROPERTIES IMPORTED_LOCATION "unknown.${CMAKE_SHARED_LIBRARY_SUFFIX}")
add_library(mylib empty.c)
target_link_libraries(mylib UnknownImportedGlobal)
diff --git a/Tests/RunCMake/try_compile/CMP0056.cmake b/Tests/RunCMake/try_compile/CMP0056.cmake
index e8d3d4a3b..2ab79d5dd 100644
--- a/Tests/RunCMake/try_compile/CMP0056.cmake
+++ b/Tests/RunCMake/try_compile/CMP0056.cmake
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.1)
enable_language(C)
set(obj "${CMAKE_C_OUTPUT_EXTENSION}")
if(BORLAND)
diff --git a/Tests/RunCMake/try_compile/CMakeLists.txt b/Tests/RunCMake/try_compile/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/try_compile/CMakeLists.txt
+++ b/Tests/RunCMake/try_compile/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/try_compile/CudaStandard-stderr.txt b/Tests/RunCMake/try_compile/CudaStandard-stderr.txt
index 3c6bdf6b7..bcf95d546 100644
--- a/Tests/RunCMake/try_compile/CudaStandard-stderr.txt
+++ b/Tests/RunCMake/try_compile/CudaStandard-stderr.txt
@@ -1,5 +1,5 @@
^CMake Error at .*/Tests/RunCMake/try_compile/CudaStandard-build/CMakeFiles/CMakeTmp/CMakeLists.txt:[0-9]+ \(add_executable\):
- CUDA_STANDARD is set to invalid value '3'
+ CUDA_STANDARD is set to invalid value '4'
+
CMake Error at CudaStandard.cmake:[0-9]+ \(try_compile\):
Failed to generate test project build system.
diff --git a/Tests/RunCMake/try_compile/CudaStandard.cmake b/Tests/RunCMake/try_compile/CudaStandard.cmake
index 96da422c6..a230424bf 100644
--- a/Tests/RunCMake/try_compile/CudaStandard.cmake
+++ b/Tests/RunCMake/try_compile/CudaStandard.cmake
@@ -1,7 +1,7 @@
enable_language(CUDA)
try_compile(result ${CMAKE_CURRENT_BINARY_DIR}
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.cu
- CUDA_STANDARD 3
+ CUDA_STANDARD 4
OUTPUT_VARIABLE out
)
message("try_compile output:\n${out}")
diff --git a/Tests/RunCMake/try_compile/ISPCDuplicateTarget-stderr.txt b/Tests/RunCMake/try_compile/ISPCDuplicateTarget-stderr.txt
new file mode 100644
index 000000000..7dcb1de78
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCDuplicateTarget-stderr.txt
@@ -0,0 +1 @@
+.*Error: Can't compile to multiple variants of avx512skx target!.*
diff --git a/Tests/RunCMake/try_compile/ISPCDuplicateTarget.cmake b/Tests/RunCMake/try_compile/ISPCDuplicateTarget.cmake
new file mode 100644
index 000000000..6d29069cd
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCDuplicateTarget.cmake
@@ -0,0 +1,8 @@
+enable_language(ISPC)
+set(CMAKE_ISPC_INSTRUCTION_SETS avx512skx-i32x16
+ avx512skx-i32x16)
+try_compile(result ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.ispc
+ OUTPUT_VARIABLE out
+ )
+message("try_compile output:\n${out}")
diff --git a/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja-result.txt b/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja-stderr.txt b/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja-stderr.txt
new file mode 100644
index 000000000..99248bfea
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja-stderr.txt
@@ -0,0 +1 @@
+.*ninja: error: .* multiple rules generate.*src.ispc_avx512skx.o.*
diff --git a/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja.cmake b/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja.cmake
new file mode 100644
index 000000000..7f59c1451
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCDuplicateTargetNinja.cmake
@@ -0,0 +1,11 @@
+enable_language(ISPC)
+set(CMAKE_ISPC_INSTRUCTION_SETS avx512skx-i32x16
+ avx512skx-i32x16)
+try_compile(result ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.ispc
+ OUTPUT_VARIABLE out
+ )
+message("try_compile output:\n${out}")
+if(NOT result)
+ message(FATAL_ERROR "making Ninja and Ninja Multi-Config behave the same")
+endif()
diff --git a/Tests/RunCMake/try_compile/ISPCInvalidTarget-stderr.txt b/Tests/RunCMake/try_compile/ISPCInvalidTarget-stderr.txt
new file mode 100644
index 000000000..44543addd
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCInvalidTarget-stderr.txt
@@ -0,0 +1 @@
+.*Error: Incorrect targets: avxknl-i32x16.*
diff --git a/Tests/RunCMake/try_compile/ISPCInvalidTarget.cmake b/Tests/RunCMake/try_compile/ISPCInvalidTarget.cmake
new file mode 100644
index 000000000..c1ab6f24e
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCInvalidTarget.cmake
@@ -0,0 +1,7 @@
+enable_language(ISPC)
+set(CMAKE_ISPC_INSTRUCTION_SETS "avxknl-i32x16")
+try_compile(result ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.ispc
+ OUTPUT_VARIABLE out
+ )
+message("try_compile output:\n${out}")
diff --git a/Tests/RunCMake/try_compile/ISPCTargets-stderr.txt b/Tests/RunCMake/try_compile/ISPCTargets-stderr.txt
new file mode 100644
index 000000000..72e0a018a
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCTargets-stderr.txt
@@ -0,0 +1 @@
+.*Linking ISPC static library*
diff --git a/Tests/RunCMake/try_compile/ISPCTargets-stdout.txt b/Tests/RunCMake/try_compile/ISPCTargets-stdout.txt
new file mode 100644
index 000000000..a731d52b8
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCTargets-stdout.txt
@@ -0,0 +1 @@
+.*Detecting ISPC compiler ABI info - done.*
diff --git a/Tests/RunCMake/try_compile/ISPCTargets.cmake b/Tests/RunCMake/try_compile/ISPCTargets.cmake
new file mode 100644
index 000000000..0d3bd4369
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ISPCTargets.cmake
@@ -0,0 +1,7 @@
+enable_language(ISPC)
+set(CMAKE_ISPC_INSTRUCTION_SETS avx512knl-i32x16 avx512skx-i32x16)
+try_compile(result ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.ispc
+ OUTPUT_VARIABLE out
+ )
+message("try_compile output:\n${out}")
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index 82c55ccb6..5b849bf8a 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -51,6 +51,15 @@ endif()
if(CMake_TEST_CUDA)
run_cmake(CudaStandard)
endif()
+if(CMake_TEST_ISPC)
+ run_cmake(ISPCTargets)
+ run_cmake(ISPCInvalidTarget)
+ set(ninja "")
+ if(RunCMake_GENERATOR MATCHES "Ninja")
+ set(ninja "Ninja")
+ endif()
+ run_cmake(ISPCDuplicateTarget${ninja})
+endif()
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
run_cmake(CStandardGNU)
endif()
diff --git a/Tests/RunCMake/try_compile/proj/CMakeLists.txt b/Tests/RunCMake/try_compile/proj/CMakeLists.txt
index 78a87c016..652f5b6be 100644
--- a/Tests/RunCMake/try_compile/proj/CMakeLists.txt
+++ b/Tests/RunCMake/try_compile/proj/CMakeLists.txt
@@ -1,2 +1,2 @@
-cmake_minimum_required(VERSION 2.8.10)
+cmake_minimum_required(VERSION 3.3)
project(TestProject NONE)
diff --git a/Tests/RunCMake/try_compile/src.ispc b/Tests/RunCMake/try_compile/src.ispc
new file mode 100644
index 000000000..b061f40a5
--- /dev/null
+++ b/Tests/RunCMake/try_compile/src.ispc
@@ -0,0 +1,4 @@
+
+float func(float a, float b) {
+ return a + b / 2.;
+}
diff --git a/Tests/RunCMake/try_run/CMakeLists.txt b/Tests/RunCMake/try_run/CMakeLists.txt
index e03478039..e93f0b69e 100644
--- a/Tests/RunCMake/try_run/CMakeLists.txt
+++ b/Tests/RunCMake/try_run/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.0)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} C)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/variable_watch/CMakeLists.txt b/Tests/RunCMake/variable_watch/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/variable_watch/CMakeLists.txt
+++ b/Tests/RunCMake/variable_watch/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/while/CMakeLists.txt b/Tests/RunCMake/while/CMakeLists.txt
index 12cd3c775..74b3ff8de 100644
--- a/Tests/RunCMake/while/CMakeLists.txt
+++ b/Tests/RunCMake/while/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)