summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml1
-rw-r--r--.gitlab/artifacts.yml9
-rw-r--r--.gitlab/ci/configure_sphinx.cmake3
-rw-r--r--.gitlab/ci/configure_windows_vs_common.cmake1
-rw-r--r--.gitlab/ci/configure_windows_vs_common_ninja.cmake1
-rw-r--r--CMakeLists.txt2
-rw-r--r--Help/command/add_custom_command.rst18
-rw-r--r--Help/command/add_test.rst65
-rw-r--r--Help/command/math.rst3
-rw-r--r--Help/command/separate_arguments.rst2
-rw-r--r--Help/command/set_property.rst6
-rw-r--r--Help/cpack_gen/nuget.rst4
-rw-r--r--Help/cpack_gen/wix.rst4
-rw-r--r--Help/generator/CodeBlocks.rst6
-rw-r--r--Help/generator/CodeLite.rst6
-rw-r--r--Help/generator/Eclipse CDT4.rst6
-rw-r--r--Help/generator/Kate.rst6
-rw-r--r--Help/generator/Sublime Text 2.rst6
-rw-r--r--Help/generator/Visual Studio 9 2008.rst10
-rw-r--r--Help/manual/cmake-generators.7.rst6
-rw-r--r--Help/manual/cmake-gui.1.rst8
-rw-r--r--Help/manual/cmake-variables.7.rst2
-rw-r--r--Help/manual/cmake.1.rst15
-rw-r--r--Help/prop_test/WILL_FAIL.rst5
-rw-r--r--Help/prop_tgt/LANG_LINKER_LAUNCHER.rst5
-rw-r--r--Help/release/dev/0-sample-topic.rst7
-rw-r--r--Help/release/dev/deprecate-extra-generators.rst5
-rw-r--r--Help/release/dev/deprecate-policy-old.rst7
-rw-r--r--Help/release/dev/lang-linker-launcher-genex.rst5
-rw-r--r--Help/release/dev/ninja-custom-command-depends.rst7
-rw-r--r--Help/release/dev/vs9-deprecate.rst5
-rw-r--r--Help/release/index.rst2
-rw-r--r--Help/variable/CMAKE_EDIT_COMMAND.rst3
-rw-r--r--Help/variable/CMAKE_EXTRA_GENERATOR.rst6
-rw-r--r--Help/variable/CMAKE_KATE_FILES_MODE.rst20
-rw-r--r--Help/variable/CMAKE_KATE_MAKE_ARGUMENTS.rst11
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
-rw-r--r--Modules/CMakeFindKate.cmake8
-rw-r--r--Modules/CMakeSwiftInformation.cmake4
-rw-r--r--Modules/CPackIFW.cmake2
-rw-r--r--Modules/CTestTargets.cmake2
-rw-r--r--Modules/Compiler/LCC-Fortran.cmake7
-rw-r--r--Modules/ExternalProject.cmake8
-rw-r--r--Modules/FindCUDAToolkit.cmake8
-rw-r--r--Modules/FindOpenCL.cmake14
-rw-r--r--Modules/FindPNG.cmake26
-rw-r--r--Modules/FindXCTest.cmake2
-rw-r--r--Modules/Platform/Linux-LCC-Fortran.cmake6
-rw-r--r--Modules/Platform/Windows-Apple-Swift.cmake2
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CPack/cmCPackFreeBSDGenerator.cxx4
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx10
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx4
-rw-r--r--Source/CTest/cmCTestCurl.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/Modules/CMakeBuildUtilities.cmake1
-rw-r--r--Source/QtDialog/CMakeSetup.cxx11
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx7
-rw-r--r--Source/bindexplib.cxx9
-rw-r--r--Source/cmAddCustomCommandCommand.cxx8
-rw-r--r--Source/cmCommonTargetGenerator.cxx18
-rw-r--r--Source/cmComputeLinkInformation.cxx84
-rw-r--r--Source/cmCurl.cxx6
-rw-r--r--Source/cmCustomCommand.cxx29
-rw-r--r--Source/cmCustomCommand.h26
-rw-r--r--Source/cmExportFileGenerator.cxx4
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx2
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx2
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx2
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx3
-rw-r--r--Source/cmExtraKateGenerator.cxx65
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx3
-rw-r--r--Source/cmFileLockResult.cxx4
-rw-r--r--Source/cmFileLockWin32.cxx4
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx9
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h1
-rw-r--r--Source/cmGeneratorExpressionNode.cxx9
-rw-r--r--Source/cmGeneratorTarget.cxx23
-rw-r--r--Source/cmGeneratorTarget.h2
-rw-r--r--Source/cmGlobalGenerator.cxx12
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx3
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
-rw-r--r--Source/cmGlobalNinjaGenerator.h1
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx20
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx3
-rw-r--r--Source/cmGlobalVisualStudio9Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx19
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx3
-rw-r--r--Source/cmLocalGenerator.cxx14
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmLocalNinjaGenerator.cxx52
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx6
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx2
-rw-r--r--Source/cmMakefile.cxx27
-rw-r--r--Source/cmMakefile.h5
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx14
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx14
-rw-r--r--Source/cmMakefileTargetGenerator.cxx10
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx12
-rw-r--r--Source/cmNinjaTargetGenerator.cxx71
-rw-r--r--Source/cmNinjaTargetGenerator.h15
-rw-r--r--Source/cmPolicies.cxx5
-rw-r--r--Source/cmPolicies.h2
-rw-r--r--Source/cmProcessOutput.cxx10
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.cxx2
-rw-r--r--Source/cmQtAutoGenInitializer.cxx5
-rw-r--r--Source/cmSystemTools.cxx43
-rw-r--r--Source/cmTarget.cxx835
-rw-r--r--Source/cmTarget.h11
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx26
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h1
-rw-r--r--Source/cm_codecvt.cxx4
-rw-r--r--Source/cmake.cxx4
-rw-r--r--Source/cmcmd.cxx24
-rw-r--r--Source/kwsys/CMakeLists.txt18
-rw-r--r--Source/kwsys/CommandLineArguments.cxx13
-rw-r--r--Source/kwsys/SharedForward.h.in873
-rw-r--r--Source/kwsys/String.hxx.in57
-rw-r--r--Source/kwsys/SystemTools.cxx29
-rw-r--r--Source/kwsys/SystemTools.hxx.in5
-rw-r--r--Source/kwsys/testDynamicLoader.cxx4
-rw-r--r--Source/kwsys/testSharedForward.c.in31
-rw-r--r--Tests/CMakeLib/testVisualStudioSlnParser.cxx1
-rw-r--r--Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file16
-rw-r--r--Tests/CMakeLists.txt38
-rw-r--r--Tests/CMakeTests/EndStuffTestScript.cmake2
-rw-r--r--Tests/COnly/CMakeLists.txt6
-rw-r--r--Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt2
-rw-r--r--Tests/CTestCoverageCollectGCOV/test.cmake.in2
-rw-r--r--Tests/CTestTest2/test.cmake.in2
-rw-r--r--Tests/CTestTestBadExe/test.cmake.in2
-rw-r--r--Tests/CTestTestBadGenerator/test.cmake.in2
-rw-r--r--Tests/CTestTestChecksum/test.cmake.in2
-rw-r--r--Tests/CTestTestCostSerial/test.cmake.in2
-rw-r--r--Tests/CTestTestCrash/test.cmake.in2
-rw-r--r--Tests/CTestTestCycle/test.cmake.in2
-rw-r--r--Tests/CTestTestDepends/test.cmake.in2
-rw-r--r--Tests/CTestTestEmptyBinaryDirectory/test.cmake.in2
-rw-r--r--Tests/CTestTestFdSetSize/test.cmake.in2
-rw-r--r--Tests/CTestTestLaunchers/test.cmake.in2
-rw-r--r--Tests/CTestTestParallel/test.cmake.in2
-rw-r--r--Tests/CTestTestResourceLock/test.cmake.in2
-rw-r--r--Tests/CTestTestScheduler/test.cmake.in2
-rw-r--r--Tests/CTestTestSkipReturnCode/test.cmake.in2
-rw-r--r--Tests/CTestTestStopTime/GetDate.cmake2
-rw-r--r--Tests/CTestTestStopTime/test.cmake.in2
-rw-r--r--Tests/CTestTestSubdir/test.cmake.in2
-rw-r--r--Tests/CTestTestTimeout/test.cmake.in2
-rw-r--r--Tests/CTestTestUpload/test.cmake.in2
-rw-r--r--Tests/CTestTestVerboseOutput/test.cmake.in2
-rw-r--r--Tests/CTestTestZeroTimeout/test.cmake.in2
-rw-r--r--Tests/CheckFortran.cmake2
-rw-r--r--Tests/CustomCommandByproducts/External/CMakeLists.txt2
-rw-r--r--Tests/EnforceConfig.cmake.in2
-rw-r--r--Tests/FindPatch/CMakeLists.txt1
-rw-r--r--Tests/Fortran/CMakeLists.txt2
-rw-r--r--Tests/FortranOnly/CMakeLists.txt17
-rw-r--r--Tests/LinkFlags/CMakeLists.txt5
-rw-r--r--Tests/OutDir/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/AutoExportDll/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/AutoExportDll/hello.cxx9
-rw-r--r--Tests/RunCMake/AutoExportDll/hello.h17
-rw-r--r--Tests/RunCMake/AutoExportDll/say.cxx3
-rw-r--r--Tests/RunCMake/BuildDepends/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/BundleUtilities/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/Byproducts/CleanByproducts.cmake4
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-NEW.cmake3
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-OLD.cmake3
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake3
-rw-r--r--Tests/RunCMake/CMP0004/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0019/RunCMakeTest.cmake1
-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.txt9
-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/CMP0022/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0026/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0037/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0038/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0039/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0040/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0041/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0042/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0043/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0045/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0046/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0049/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0050/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0051/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0053/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0054/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0055/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0057/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0060/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0060/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0064/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0065/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0081/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0102/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0106/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0139/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/CPack/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CPackConfig/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CPackInstallProperties/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CPackSymlinks/testcpacksym.tarbin20480 -> 10240 bytes
-rw-r--r--Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CTest/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/test.cmake.in2
-rw-r--r--Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in2
-rw-r--r--Tests/RunCMake/CacheNewline/CacheNewline.cmake4
-rw-r--r--Tests/RunCMake/CheckIPOSupported/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/CheckModules/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CommandLine/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake (renamed from Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/E_time-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake9
-rw-r--r--Tests/RunCMake/CommandLine/trace-expand-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/trace-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake4
-rw-r--r--Tests/RunCMake/CommandLine/trace-try_compile.cmake4
-rw-r--r--Tests/RunCMake/CommandLineTar/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompatibleInterface/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompatibleInterface/DebugProperties.cmake5
-rw-r--r--Tests/RunCMake/CompileDefinitions/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompileFeatures/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompilerArgs/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompilerChange/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/Configure/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/ExcludeFromAll/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExternalData/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies-stderr.txt10
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target-stderr.txt10
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt13
-rw-r--r--Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake2
-rw-r--r--Tests/RunCMake/ExtraGenerators/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake19
-rw-r--r--Tests/RunCMake/ExtraGenerators/Simple-stderr.txt8
-rw-r--r--Tests/RunCMake/ExtraGenerators/Simple.cmake4
-rw-r--r--Tests/RunCMake/FPHSA/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FeatureSummary/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/File_Archive/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/File_Generate/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake3
-rw-r--r--Tests/RunCMake/FindLua/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FindMatlab/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/FindMatlab/MatlabTest1.cmake5
-rw-r--r--Tests/RunCMake/FindMatlab/MatlabTest2.cmake4
-rw-r--r--Tests/RunCMake/FindMatlab/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/FindOpenSSL/version-exact.cmake2
-rw-r--r--Tests/RunCMake/FindOpenSSL/version-range.cmake2
-rw-r--r--Tests/RunCMake/FindOpenSSL/version.cmake2
-rw-r--r--Tests/RunCMake/FindPkgConfig/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake4
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake4
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake2
-rw-r--r--Tests/RunCMake/FindSWIG/version-exact.cmake2
-rw-r--r--Tests/RunCMake/FindSWIG/version-range.cmake2
-rw-r--r--Tests/RunCMake/FindSWIG/version.cmake2
-rw-r--r--Tests/RunCMake/Framework/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Framework/FrameworkConsumption.cmake2
-rw-r--r--Tests/RunCMake/Framework/FrameworkLayout.cmake1
-rw-r--r--Tests/RunCMake/GNUInstallDirs/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt7
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/IfacePaths/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/genex_link.cmake5
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_name.cmake2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake2
-rw-r--r--Tests/RunCMake/Languages/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt11
-rw-r--r--Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/LinkItemValidation/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/LinkStatic/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt2
-rw-r--r--Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/Make/CMP0113-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/Make/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Ninja/AssumedSources.cmake3
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt13
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt13
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt8
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt11
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake1
-rw-r--r--Tests/RunCMake/Ninja/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Ninja/CommandConcat.cmake2
-rw-r--r--Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake18
-rw-r--r--Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake3
-rw-r--r--Tests/RunCMake/Ninja/Executable.cmake3
-rw-r--r--Tests/RunCMake/Ninja/LooseObjectDepends.cmake3
-rw-r--r--Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake3
-rw-r--r--Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake3
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/Ninja/SharedLib.cmake3
-rw-r--r--Tests/RunCMake/Ninja/StaticLib.cmake3
-rw-r--r--Tests/RunCMake/Ninja/SubDirPrefix.cmake3
-rw-r--r--Tests/RunCMake/Ninja/TwoLibs.cmake3
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake3
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake3
-rw-r--r--Tests/RunCMake/PolicyScope/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/PositionIndependentCode/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/RunCMake.cmake12
-rw-r--r--Tests/RunCMake/Swift/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt2
-rw-r--r--Tests/RunCMake/Swift/SwiftMultiArch.cmake4
-rw-r--r--Tests/RunCMake/SymlinkTrees/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Syntax/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/Syntax/String1-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/String1.cmake4
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace0.cmake1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace1.cmake1
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/UnterminatedBrace2.cmake1
-rw-r--r--Tests/RunCMake/TargetProperties/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/VSSolution/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake4
-rw-r--r--Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/XcodeProject/DeploymentTarget.cmake3
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeBundles.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake4
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake4
-rw-r--r--Tests/RunCMake/add_custom_command/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_custom_command/WorkingDirectory.cmake2
-rw-r--r--Tests/RunCMake/add_custom_target/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_dependencies/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake3
-rw-r--r--Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake3
-rw-r--r--Tests/RunCMake/add_executable/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_library/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake2
-rw-r--r--Tests/RunCMake/add_subdirectory/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Quote-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space-stderr.txt10
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-stderr.txt10
-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_minimum_required/Before2812-stderr.txt26
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt26
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before3_5.cmake (renamed from Tests/RunCMake/cmake_minimum_required/Before2812.cmake)0
-rw-r--r--Tests/RunCMake/cmake_minimum_required/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt10
-rw-r--r--Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/cmake_path/call-cmake_path.cmake3
-rw-r--r--Tests/RunCMake/configure_file/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/continue/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt9
-rw-r--r--Tests/RunCMake/ctest_build/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_build/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/ctest_build/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_cmake_error/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_configure/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_configure/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_coverage/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_coverage/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_memcheck/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_start/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_start/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_submit/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_test/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_test/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_update/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_update/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_upload/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_upload/test.cmake.in2
-rw-r--r--Tests/RunCMake/export/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/file/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_dependency/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_file/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_library/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_package/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_path/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/find_program/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/get_filename_component/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/get_property/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/if/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include_directories/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include_external_msproject/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/install/CMP0062-OLD-stderr.txt15
-rw-r--r--Tests/RunCMake/install/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt4
-rw-r--r--Tests/RunCMake/install/TARGETS-Defaults-stderr.txt4
-rw-r--r--Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake1
-rw-r--r--Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake1
-rw-r--r--Tests/RunCMake/install/TARGETS-RPATH.cmake3
-rw-r--r--Tests/RunCMake/list/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/math/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/message/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/message/warnmessage-rootdir.cmake2
-rw-r--r--Tests/RunCMake/no_install_prefix/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/project/CMP0048-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/project/CMP0048-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/project/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt13
-rw-r--r--Tests/RunCMake/separate_arguments/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/set/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/set/ParentPulling.cmake3
-rw-r--r--Tests/RunCMake/set/ParentPullingRecursive.cmake3
-rw-r--r--Tests/RunCMake/set_property/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/string/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/string/RegexClear.cmake3
-rw-r--r--Tests/RunCMake/string/RegexMultiMatchClear.cmake3
-rw-r--r--Tests/RunCMake/target_compile_features/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake3
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake3
-rw-r--r--Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake3
-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/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-WARN.cmake2
-rw-r--r--Tests/RunCMake/target_sources/OriginDebug-stderr.txt8
-rw-r--r--Tests/RunCMake/target_sources/OriginDebug.cmake5
-rw-r--r--Tests/RunCMake/try_compile/CMP0056.cmake2
-rw-r--r--Tests/RunCMake/try_compile/CMakeLists.txt2
-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
-rw-r--r--Utilities/Doxygen/CMakeLists.txt2
-rw-r--r--Utilities/Sphinx/CMakeLists.txt2
-rw-r--r--Utilities/Sphinx/conf.py.in8
-rwxr-xr-xbootstrap1
527 files changed, 2109 insertions, 2388 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 87a75e8..56e934b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -116,6 +116,7 @@ l:sphinx-fedora37:
extends:
- .fedora37_sphinx
- .cmake_build_linux
+ - .cmake_sphinx_artifacts
- .linux_x86_64_tags
- .run_automatically
variables:
diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml
index 1b5384f..f7c7668 100644
--- a/.gitlab/artifacts.yml
+++ b/.gitlab/artifacts.yml
@@ -118,6 +118,15 @@
junit:
- build/junit.xml
+.cmake_sphinx_artifacts:
+ artifacts:
+ expire_in: 1d
+ when: always
+ paths:
+ # Take the sphinx logs.
+ - build/build-*.log
+ - build/linkcheck/output.*
+
.cmake_test_artifacts:
artifacts:
expire_in: 1d
diff --git a/.gitlab/ci/configure_sphinx.cmake b/.gitlab/ci/configure_sphinx.cmake
index 3750309..9f3f0be 100644
--- a/.gitlab/ci/configure_sphinx.cmake
+++ b/.gitlab/ci/configure_sphinx.cmake
@@ -4,3 +4,6 @@ set(SPHINX_HTML ON CACHE BOOL "")
set(SPHINX_SINGLEHTML ON CACHE BOOL "")
set(SPHINX_QTHELP ON CACHE BOOL "")
set(SPHINX_TEXT ON CACHE BOOL "")
+if(NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "")
+ set(SPHINX_LINKCHECK ON CACHE BOOL "")
+endif()
diff --git a/.gitlab/ci/configure_windows_vs_common.cmake b/.gitlab/ci/configure_windows_vs_common.cmake
index 962f03d..daf9aaa 100644
--- a/.gitlab/ci/configure_windows_vs_common.cmake
+++ b/.gitlab/ci/configure_windows_vs_common.cmake
@@ -4,6 +4,7 @@ set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "")
set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "")
set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "")
set(CMake_TEST_FindOpenMP_Fortran "OFF" CACHE BOOL "")
+set(CMake_TEST_FindPatch "ON" CACHE BOOL "")
set(CMake_TEST_Java OFF CACHE BOOL "")
set(CMake_TEST_MFC "ON" CACHE BOOL "")
diff --git a/.gitlab/ci/configure_windows_vs_common_ninja.cmake b/.gitlab/ci/configure_windows_vs_common_ninja.cmake
index 1ae1a66..9f7acc3 100644
--- a/.gitlab/ci/configure_windows_vs_common_ninja.cmake
+++ b/.gitlab/ci/configure_windows_vs_common_ninja.cmake
@@ -6,6 +6,7 @@ set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "")
set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "")
set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "")
set(CMake_TEST_FindOpenMP_Fortran "OFF" CACHE BOOL "")
+set(CMake_TEST_FindPatch "ON" CACHE BOOL "")
set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "")
set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "")
set(CMake_TEST_MFC "ON" CACHE BOOL "")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d11b4cd..ce11311 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-cmake_minimum_required(VERSION 3.13...3.24 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.13...3.25 FATAL_ERROR)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index 293d3f0..2cf88fc 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -25,7 +25,8 @@ The first signature is for adding a custom command to produce an output:
[DEPFILE depfile]
[JOB_POOL job_pool]
[VERBATIM] [APPEND] [USES_TERMINAL]
- [COMMAND_EXPAND_LISTS])
+ [COMMAND_EXPAND_LISTS]
+ [DEPENDS_EXPLICIT_ONLY])
This defines a command to generate specified ``OUTPUT`` file(s).
A target created in the same directory (``CMakeLists.txt`` file)
@@ -357,6 +358,21 @@ The options are:
:ref:`Makefile Generators`, :ref:`Visual Studio Generators`,
and the :generator:`Xcode` generator.
+``DEPENDS_EXPLICIT_ONLY``
+
+ .. versionadded:: 3.27
+
+ Indicate that the command's ``DEPENDS`` argument represents all files
+ required by the command and implicit dependencies are not required.
+
+ Without this option, if any target uses the output of the custom command,
+ CMake will consider that target's dependencies as implicit dependencies for
+ the custom command in case this custom command requires files implicitly
+ created by those targets.
+
+ Only the :ref:`Ninja Generators` actually use this information to remove
+ unnecessary implicit dependencies.
+
Examples: Generating Files
^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/Help/command/add_test.rst b/Help/command/add_test.rst
index 53555a4..02dd3986 100644
--- a/Help/command/add_test.rst
+++ b/Help/command/add_test.rst
@@ -12,13 +12,24 @@ Add a test to the project to be run by :manual:`ctest(1)`.
Adds a test called ``<name>``. The test name may contain arbitrary
characters, expressed as a :ref:`Quoted Argument` or :ref:`Bracket Argument`
-if necessary. See policy :policy:`CMP0110`. The options are:
+if necessary. See policy :policy:`CMP0110`.
+
+CMake only generates tests if the :command:`enable_testing` command has been
+invoked. The :module:`CTest` module invokes ``enable_testing`` automatically
+unless ``BUILD_TESTING`` is set to ``OFF``.
+
+Tests added with the ``add_test(NAME)`` signature support using
+:manual:`generator expressions <cmake-generator-expressions(7)>`
+in test properties set by :command:`set_property(TEST)` or
+:command:`set_tests_properties`. Test properties may only be set in the
+directory the test is created in.
+
+``add_test`` options are:
``COMMAND``
- Specify the test command-line. If ``<command>`` specifies an
- executable target (created by :command:`add_executable`) it will
- automatically be replaced by the location of the executable created
- at build time.
+ Specify the test command-line. If ``<command>`` specifies an executable
+ target created by :command:`add_executable`, it will automatically be
+ replaced by the location of the executable created at build time.
The command may be specified using
:manual:`generator expressions <cmake-generator-expressions(7)>`.
@@ -27,38 +38,29 @@ if necessary. See policy :policy:`CMP0110`. The options are:
Restrict execution of the test only to the named configurations.
``WORKING_DIRECTORY``
- Set the :prop_test:`WORKING_DIRECTORY` test property to
- specify the working directory in which to execute the test.
- If not specified the test will be run with the current working
- directory set to the build directory corresponding to the
- current source directory.
-
- The working directory may be specified using
- :manual:`generator expressions <cmake-generator-expressions(7)>`.
+ Set the test property :prop_test:`WORKING_DIRECTORY` in which to execute the
+ test. If not specified, the test will be run in
+ :variable:`CMAKE_CURRENT_BINARY_DIR`. The working directory may be specified
+ using :manual:`generator expressions <cmake-generator-expressions(7)>`.
``COMMAND_EXPAND_LISTS``
.. versionadded:: 3.16
- Lists in ``COMMAND`` arguments will be expanded, including those
- created with
+ Lists in ``COMMAND`` arguments will be expanded, including those created with
:manual:`generator expressions <cmake-generator-expressions(7)>`.
-The given test command is expected to exit with code ``0`` to pass and
-non-zero to fail, or vice-versa if the :prop_test:`WILL_FAIL` test
-property is set. Any output written to stdout or stderr will be
-captured by :manual:`ctest(1)` but does not affect the pass/fail status
-unless the :prop_test:`PASS_REGULAR_EXPRESSION`,
-:prop_test:`FAIL_REGULAR_EXPRESSION` or
-:prop_test:`SKIP_REGULAR_EXPRESSION` test property is used.
+If the test command exits with code ``0`` the test passes. Non-zero exit code
+is a "failed" test. The test property :prop_test:`WILL_FAIL` inverts this
+logic. Note that system-level test failures such as segmentation faults or
+heap errors will still fail the test even if ``WILL_FALL`` is true. Output
+written to stdout or stderr is captured by :manual:`ctest(1)` and only
+affects the pass/fail status via the :prop_test:`PASS_REGULAR_EXPRESSION`,
+:prop_test:`FAIL_REGULAR_EXPRESSION`, or :prop_test:`SKIP_REGULAR_EXPRESSION`
+test properties.
.. versionadded:: 3.16
Added :prop_test:`SKIP_REGULAR_EXPRESSION` property.
-Tests added with the ``add_test(NAME)`` signature support using
-:manual:`generator expressions <cmake-generator-expressions(7)>`
-in test properties set by :command:`set_property(TEST)` or
-:command:`set_tests_properties`.
-
Example usage:
.. code-block:: cmake
@@ -71,16 +73,9 @@ This creates a test ``mytest`` whose command runs a ``testDriver`` tool
passing the configuration name and the full path to the executable
file produced by target ``myexe``.
-.. note::
-
- CMake will generate tests only if the :command:`enable_testing`
- command has been invoked. The :module:`CTest` module invokes the
- command automatically unless the ``BUILD_TESTING`` option is turned
- ``OFF``.
-
---------------------------------------------------------------------
-This command also supports a simpler, but less flexible, signature:
+The command syntax above is recommended over the older, less flexible form:
.. code-block:: cmake
diff --git a/Help/command/math.rst b/Help/command/math.rst
index 8386aab..6989ebc 100644
--- a/Help/command/math.rst
+++ b/Help/command/math.rst
@@ -9,7 +9,8 @@ Evaluate a mathematical expression.
Evaluates a mathematical ``<expression>`` and sets ``<variable>`` to the
resulting value. The result of the expression must be representable as a
-64-bit signed integer.
+64-bit signed integer. Floating point inputs are invalid e.g. ``1.1 * 10``.
+Non-integer results e.g. ``3 / 2`` are truncated.
The mathematical expression must be given as a string (i.e. enclosed in
double quotation marks). An example is ``"5 * (10 + 13)"``.
diff --git a/Help/command/separate_arguments.rst b/Help/command/separate_arguments.rst
index f66af35..4f0b25e 100644
--- a/Help/command/separate_arguments.rst
+++ b/Help/command/separate_arguments.rst
@@ -69,7 +69,7 @@ be one of the following keywords:
The contents of ``out`` will be: ``/path/to/cc;-c;main.c``
-.. _`Parsing C Command-Line Arguments`: https://msdn.microsoft.com/library/a1y7w461.aspx
+.. _`Parsing C Command-Line Arguments`: https://learn.microsoft.com/en-us/cpp/c-language/parsing-c-command-line-arguments
.. code-block:: cmake
diff --git a/Help/command/set_property.rst b/Help/command/set_property.rst
index d446a2d..8dd4b94 100644
--- a/Help/command/set_property.rst
+++ b/Help/command/set_property.rst
@@ -82,15 +82,15 @@ It must be one of the following:
to the installation prefix.
``TEST``
- Scope may name zero or more existing tests.
- See also the :command:`set_tests_properties` command.
+ Scope is limited to the directory the command is called in. It may name zero
+ or more existing tests. See also command :command:`set_tests_properties`.
Test property values may be specified using
:manual:`generator expressions <cmake-generator-expressions(7)>`
for tests created by the :command:`add_test(NAME)` signature.
``CACHE``
- Scope must name zero or more cache existing entries.
+ Scope must name zero or more existing cache entries.
The required ``PROPERTY`` option is immediately followed by the name of
the property to set. Remaining arguments are used to compose the
diff --git a/Help/cpack_gen/nuget.rst b/Help/cpack_gen/nuget.rst
index 1f2e762..8ee2816 100644
--- a/Help/cpack_gen/nuget.rst
+++ b/Help/cpack_gen/nuget.rst
@@ -258,7 +258,7 @@ List of CPack NuGet generator specific variables:
.. _nuget.org: https://www.nuget.org
.. _version specification: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges
-.. _SPDX license identifier: https://spdx.github.io/spdx-spec/SPDX-license-list
-.. _SPDX specification: https://spdx.github.io/spdx-spec/SPDX-license-expressions
+.. _SPDX license identifier: https://spdx.org/licenses
+.. _SPDX specification: https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions
.. NuGet spec docs https://docs.microsoft.com/en-us/nuget/reference/nuspec
diff --git a/Help/cpack_gen/wix.rst b/Help/cpack_gen/wix.rst
index c880049..af01252 100644
--- a/Help/cpack_gen/wix.rst
+++ b/Help/cpack_gen/wix.rst
@@ -111,7 +111,7 @@ Windows using WiX.
simply provide the name of the culture. If you specify more than one
culture identifier in a comma or semicolon delimited list, the first one
that is found will be used. You can find a list of supported languages at:
- https://wixtoolset.org//documentation/manual/v3/wixui/wixui_localization.html
+ https://wixtoolset.org/docs/v3/wixui/wixui_localization/
.. variable:: CPACK_WIX_TEMPLATE
@@ -319,7 +319,7 @@ Windows using WiX.
for using WiX extensions. Each declaration should be in the form name=url, where
name is the plain namespace without the usual xmlns: prefix and url is an unquoted
namespace url. A list of commonly known WiX schemata can be found here:
- https://wixtoolset.org/documentation/manual/v3/xsd/
+ https://wixtoolset.org/docs/v3/xsd/
.. variable:: CPACK_WIX_SKIP_WIX_UI_EXTENSION
diff --git a/Help/generator/CodeBlocks.rst b/Help/generator/CodeBlocks.rst
index 85da715..5c48bc9 100644
--- a/Help/generator/CodeBlocks.rst
+++ b/Help/generator/CodeBlocks.rst
@@ -1,6 +1,12 @@
CodeBlocks
----------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates CodeBlocks project files.
Project files for CodeBlocks will be created in the top directory and
diff --git a/Help/generator/CodeLite.rst b/Help/generator/CodeLite.rst
index 4f276df..faec9b9 100644
--- a/Help/generator/CodeLite.rst
+++ b/Help/generator/CodeLite.rst
@@ -1,6 +1,12 @@
CodeLite
----------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates CodeLite project files.
Project files for CodeLite will be created in the top directory and
diff --git a/Help/generator/Eclipse CDT4.rst b/Help/generator/Eclipse CDT4.rst
index 634e2b6..9c1610d 100644
--- a/Help/generator/Eclipse CDT4.rst
+++ b/Help/generator/Eclipse CDT4.rst
@@ -1,6 +1,12 @@
Eclipse CDT4
------------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates Eclipse CDT 4.0 project files.
Project files for Eclipse will be created in the top directory. In
diff --git a/Help/generator/Kate.rst b/Help/generator/Kate.rst
index 129bf63..d12723b 100644
--- a/Help/generator/Kate.rst
+++ b/Help/generator/Kate.rst
@@ -1,6 +1,12 @@
Kate
----
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates Kate project files.
A project file for Kate will be created in the top directory in the top level
diff --git a/Help/generator/Sublime Text 2.rst b/Help/generator/Sublime Text 2.rst
index 0a07ea9..a45ab08 100644
--- a/Help/generator/Sublime Text 2.rst
+++ b/Help/generator/Sublime Text 2.rst
@@ -1,6 +1,12 @@
Sublime Text 2
--------------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Generates Sublime Text 2 project files.
Project files for Sublime Text 2 will be created in the top directory
diff --git a/Help/generator/Visual Studio 9 2008.rst b/Help/generator/Visual Studio 9 2008.rst
index 3434956..816969d 100644
--- a/Help/generator/Visual Studio 9 2008.rst
+++ b/Help/generator/Visual Studio 9 2008.rst
@@ -1,7 +1,15 @@
Visual Studio 9 2008
--------------------
-Generates Visual Studio 9 2008 project files.
+Deprecated. Generates Visual Studio 9 2008 project files.
+
+.. note::
+ This generator is deprecated and will be removed in a future version
+ of CMake. It will still be possible to build with VS 9 2008 tools
+ using the :generator:`Visual Studio 12 2013` generator (or above,
+ and with VS 10 2010 also installed) with
+ :variable:`CMAKE_GENERATOR_TOOLSET` set to ``v90``,
+ or by using the :generator:`NMake Makefiles` generator.
Platform Selection
^^^^^^^^^^^^^^^^^^
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst
index ed5bbbf..9647f0d 100644
--- a/Help/manual/cmake-generators.7.rst
+++ b/Help/manual/cmake-generators.7.rst
@@ -107,6 +107,12 @@ Other Generators
Extra Generators
================
+.. deprecated:: 3.27
+
+ Support for "Extra Generators" is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
Some of the `CMake Generators`_ listed in the :manual:`cmake(1)`
command-line tool :option:`--help <cmake --help>` output may have
variants that specify an extra generator for an auxiliary IDE tool.
diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst
index cdb860f..367b0a7 100644
--- a/Help/manual/cmake-gui.1.rst
+++ b/Help/manual/cmake-gui.1.rst
@@ -11,7 +11,7 @@ Synopsis
cmake-gui [<options>]
cmake-gui [<options>] <path-to-source | path-to-existing-build>
cmake-gui [<options>] -S <path-to-source> -B <path-to-build>
- cmake-gui [<options>] --browse-manual
+ cmake-gui [<options>] --browse-manual [<filename>]
Description
===========
@@ -46,9 +46,11 @@ Options
Name of the preset to use from the project's
:manual:`presets <cmake-presets(7)>` files, if it has them.
-.. option:: --browse-manual
+.. option:: --browse-manual [<filename>]
- Open the CMake reference manual in a browser and immediately exit.
+ Open the CMake reference manual in a browser and immediately exit. If
+ ``<filename>`` is specified, open that file within the reference manual
+ instead of ``index.html``.
.. include:: OPTIONS_HELP.txt
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 23d8256..8564e7c 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -226,6 +226,8 @@ Variables that Change Behavior
/variable/CMAKE_INSTALL_MESSAGE
/variable/CMAKE_INSTALL_PREFIX
/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
+ /variable/CMAKE_KATE_FILES_MODE
+ /variable/CMAKE_KATE_MAKE_ARGUMENTS
/variable/CMAKE_LIBRARY_PATH
/variable/CMAKE_LINK_DIRECTORIES_BEFORE
/variable/CMAKE_LINK_LIBRARIES_ONLY_TARGETS
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index e48ecd9..a107c66 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -781,7 +781,7 @@ Available commands are:
(:option:`-A ... <cmake -A>`). The value is a list of platforms known to
be supported.
``extraGenerators``
- A list of strings with all the extra generators compatible with
+ A list of strings with all the :ref:`Extra Generators` compatible with
the generator.
``fileApi``
@@ -1080,11 +1080,18 @@ Available commands are:
situations instead. Use ``--`` to stop interpreting options and treat all
remaining arguments as paths, even if they start with ``-``.
-.. option:: sleep <number>...
+.. option:: sleep <number>
.. versionadded:: 3.0
- Sleep for given number of seconds.
+ Sleep for ``<number>`` seconds. ``<number>`` may be a floating point number.
+ A practical minimum is about 0.1 seconds due to overhead in starting/stopping
+ CMake executable. This can be useful in a CMake script to insert a delay:
+
+ .. code-block:: cmake
+
+ # Sleep for about 0.5 seconds
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 0.5)
.. option:: tar [cxt][vf][zjJ] file.tar [<options>] [--] [<pathname>...]
@@ -1189,7 +1196,7 @@ Available commands are:
.. option:: time <command> [<args>...]
- Run command and display elapsed time.
+ Run ``<command>`` and display elapsed time (including overhead of CMake frontend).
.. versionadded:: 3.5
The command now properly passes arguments with spaces or special characters
diff --git a/Help/prop_test/WILL_FAIL.rst b/Help/prop_test/WILL_FAIL.rst
index f1f94a4..4926f40 100644
--- a/Help/prop_test/WILL_FAIL.rst
+++ b/Help/prop_test/WILL_FAIL.rst
@@ -3,5 +3,6 @@ WILL_FAIL
If set to true, this will invert the pass/fail flag of the test.
-This property can be used for tests that are expected to fail and
-return a non zero return code.
+This property can be used for tests that are expected to fail and return a
+non-zero return code. Note that system-level test failures such as segmentation
+faults or heap errors will still fail the test even if ``WILL_FALL`` is true.
diff --git a/Help/prop_tgt/LANG_LINKER_LAUNCHER.rst b/Help/prop_tgt/LANG_LINKER_LAUNCHER.rst
index f6ca5ad..d39ec20 100644
--- a/Help/prop_tgt/LANG_LINKER_LAUNCHER.rst
+++ b/Help/prop_tgt/LANG_LINKER_LAUNCHER.rst
@@ -14,3 +14,8 @@ arguments to the tool. This is useful for tools such as static analyzers.
This property is initialized by the value of the
:variable:`CMAKE_<LANG>_LINKER_LAUNCHER` variable if it is set when a target is
created.
+
+.. versionadded:: 3.27
+
+ The property value may use
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst
new file mode 100644
index 0000000..e4cc01e
--- /dev/null
+++ b/Help/release/dev/0-sample-topic.rst
@@ -0,0 +1,7 @@
+0-sample-topic
+--------------
+
+* This is a sample release note for the change in a topic.
+ Developers should add similar notes for each topic branch
+ making a noteworthy change. Each document should be named
+ and titled to match the topic name to avoid merge conflicts.
diff --git a/Help/release/dev/deprecate-extra-generators.rst b/Help/release/dev/deprecate-extra-generators.rst
new file mode 100644
index 0000000..ceb2f4e
--- /dev/null
+++ b/Help/release/dev/deprecate-extra-generators.rst
@@ -0,0 +1,5 @@
+deprecate-extra-generators
+--------------------------
+
+* The :ref:`Extra Generators` have been deprecated. IDEs may use the
+ :manual:`cmake-file-api(7)` to view CMake-generated project build trees.
diff --git a/Help/release/dev/deprecate-policy-old.rst b/Help/release/dev/deprecate-policy-old.rst
new file mode 100644
index 0000000..9c38866
--- /dev/null
+++ b/Help/release/dev/deprecate-policy-old.rst
@@ -0,0 +1,7 @@
+deprecate-policy-old
+--------------------
+
+* Compatibility with versions of CMake older than 3.5 is now deprecated
+ and will be removed from a future version. Calls to
+ :command:`cmake_minimum_required` or :command:`cmake_policy` that set
+ the policy version to an older value now issue a deprecation diagnostic.
diff --git a/Help/release/dev/lang-linker-launcher-genex.rst b/Help/release/dev/lang-linker-launcher-genex.rst
new file mode 100644
index 0000000..b6494eb
--- /dev/null
+++ b/Help/release/dev/lang-linker-launcher-genex.rst
@@ -0,0 +1,5 @@
+lang-linker-launcher-genex
+--------------------------
+
+* The :prop_tgt:`<LANG>_LINKER_LAUNCHER` target property now supports
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
diff --git a/Help/release/dev/ninja-custom-command-depends.rst b/Help/release/dev/ninja-custom-command-depends.rst
new file mode 100644
index 0000000..10c68cf
--- /dev/null
+++ b/Help/release/dev/ninja-custom-command-depends.rst
@@ -0,0 +1,7 @@
+ninja-custom-command-depends
+----------------------------
+
+* The :command:`add_custom_command` command gained a new
+ ``DEPENDS_EXPLICIT_ONLY`` option to tell the :ref:`Ninja Generators`
+ not to add any dependencies implied by the target to which it is
+ attached.
diff --git a/Help/release/dev/vs9-deprecate.rst b/Help/release/dev/vs9-deprecate.rst
new file mode 100644
index 0000000..46568f8
--- /dev/null
+++ b/Help/release/dev/vs9-deprecate.rst
@@ -0,0 +1,5 @@
+vs9-deprecate
+-------------
+
+* The :generator:`Visual Studio 9 2008` generator is now deprecated
+ and will be removed in a future version of CMake.
diff --git a/Help/release/index.rst b/Help/release/index.rst
index c82889f..d434a3a 100644
--- a/Help/release/index.rst
+++ b/Help/release/index.rst
@@ -7,6 +7,8 @@ CMake Release Notes
This file should include the adjacent "dev.txt" file
in development versions but not in release versions.
+.. include:: dev.txt
+
Releases
========
diff --git a/Help/variable/CMAKE_EDIT_COMMAND.rst b/Help/variable/CMAKE_EDIT_COMMAND.rst
index 2f4ab1f..b21434f 100644
--- a/Help/variable/CMAKE_EDIT_COMMAND.rst
+++ b/Help/variable/CMAKE_EDIT_COMMAND.rst
@@ -2,7 +2,8 @@ CMAKE_EDIT_COMMAND
------------------
Full path to :manual:`cmake-gui(1)` or :manual:`ccmake(1)`. Defined only for
-:ref:`Makefile Generators` when not using an "extra" generator for an IDE.
+:ref:`Makefile Generators` and :ref:`Ninja Generators` when not using any
+:ref:`Extra Generators`.
This is the full path to the CMake executable that can graphically
edit the cache. For example, :manual:`cmake-gui(1)` or :manual:`ccmake(1)`.
diff --git a/Help/variable/CMAKE_EXTRA_GENERATOR.rst b/Help/variable/CMAKE_EXTRA_GENERATOR.rst
index 2c92323..0a113a5 100644
--- a/Help/variable/CMAKE_EXTRA_GENERATOR.rst
+++ b/Help/variable/CMAKE_EXTRA_GENERATOR.rst
@@ -1,6 +1,12 @@
CMAKE_EXTRA_GENERATOR
---------------------
+.. deprecated:: 3.27
+
+ Support for :ref:`Extra Generators` is deprecated and will be removed from
+ a future version of CMake. IDEs may use the :manual:`cmake-file-api(7)`
+ to view CMake-generated project build trees.
+
The extra generator used to build the project. See
:manual:`cmake-generators(7)`.
diff --git a/Help/variable/CMAKE_KATE_FILES_MODE.rst b/Help/variable/CMAKE_KATE_FILES_MODE.rst
new file mode 100644
index 0000000..195c15d
--- /dev/null
+++ b/Help/variable/CMAKE_KATE_FILES_MODE.rst
@@ -0,0 +1,20 @@
+CMAKE_KATE_FILES_MODE
+---------------------
+
+.. versionadded:: 3.27
+
+This cache variable is used by the Kate project generator and controls
+to what mode the ``files`` entry in the project file will be set. See
+:manual:`cmake-generators(7)`.
+
+Possible values are ``AUTO``, ``SVN``, ``GIT``, ``HG``, ``FOSSIL`` and ``LIST``.
+
+When set to ``LIST``, CMake will put the list of source files known to CMake
+in the project file.
+When set to ``SVN``, ``GIT``, ``HG`` or ``FOSSIL``, CMake will set
+the generated project accordingly to Subversion, git, Mercurial
+or Fossil, and Kate will then use the respective command line tool to
+retrieve the list of files in the project.
+When unset or set to ``AUTO``, CMake will try to detect whether the
+source directory is part of a git or svn checkout or not, and put the
+respective entry into the project file.
diff --git a/Help/variable/CMAKE_KATE_MAKE_ARGUMENTS.rst b/Help/variable/CMAKE_KATE_MAKE_ARGUMENTS.rst
new file mode 100644
index 0000000..c830332
--- /dev/null
+++ b/Help/variable/CMAKE_KATE_MAKE_ARGUMENTS.rst
@@ -0,0 +1,11 @@
+CMAKE_KATE_MAKE_ARGUMENTS
+-------------------------
+
+.. versionadded:: 3.0
+
+This cache variable is used by the Kate project generator. See
+:manual:`cmake-generators(7)`.
+
+This variable holds arguments which are used when Kate invokes the make
+tool. By default it is initialized to hold flags to enable parallel builds
+(using -j typically).
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 41e0e1a..1f89c74 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -35,7 +35,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
else(CMAKE_${lang}_FLAGS_INIT)
set(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS_INIT})
endif()
- string(REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
+ separate_arguments(CMAKE_${lang}_COMPILER_ID_FLAGS_LIST NATIVE_COMMAND "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
# Compute the directory in which to run the test.
set(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_PLATFORM_INFO_DIR}/CompilerId${lang})
diff --git a/Modules/CMakeFindKate.cmake b/Modules/CMakeFindKate.cmake
index 9aaf6e5..521bc5c 100644
--- a/Modules/CMakeFindKate.cmake
+++ b/Modules/CMakeFindKate.cmake
@@ -3,7 +3,7 @@
# This file is included in CMakeSystemSpecificInformation.cmake if
-# the Eclipse CDT4 extra generator has been selected.
+# the Kate extra generator has been selected.
# Try to find out how many CPUs we have and set the -j argument for make accordingly
@@ -17,5 +17,9 @@ if("${_CMAKE_KATE_PROCESSOR_COUNT}" GREATER 1 AND CMAKE_HOST_UNIX AND "${CMA
set(_CMAKE_KATE_INITIAL_MAKE_ARGS "-j${_CMAKE_KATE_PROCESSOR_COUNT}")
endif()
-# This variable is used by the Eclipse generator and appended to the make invocation commands.
+# This variable is used by the Kate generator and appended to the make invocation commands.
set(CMAKE_KATE_MAKE_ARGUMENTS "${_CMAKE_KATE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Kate invokes make. Enter e.g. -j<some_number> to get parallel builds")
+
+
+set(CMAKE_KATE_FILES_MODE "AUTO" CACHE STRING "Option to override the version control detection and force a mode for the Kate project.")
+set_property(CACHE CMAKE_KATE_FILES_MODE PROPERTY STRINGS "AUTO;SVN;GIT;LIST")
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index a75dfce..d27aa3f 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -72,9 +72,9 @@ if(CMAKE_GENERATOR STREQUAL "Xcode")
# these options here will have no effect when compiling with the built-in driver,
# and will explode violently, leaving build products in the source directory, when
# using the old swift driver.
- set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g")
+ set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g ${CMAKE_Swift_FLAGS_DEBUG_LINKER_FLAGS}")
set(CMAKE_Swift_FLAGS_RELEASE_INIT "-O")
- set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g")
+ set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g ${CMAKE_Swift_FLAGS_RELWITHDEBINFO_LINKER_FLAGS}")
set(CMAKE_Swift_FLAGS_MINSIZEREL_INIT "-Osize")
else()
set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g -incremental")
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index d4e02f1..2338b79 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -8,7 +8,7 @@ CPackIFW
.. versionadded:: 3.1
This module looks for the location of the command-line utilities supplied with the
-`Qt Installer Framework <http://doc.qt.io/qtinstallerframework/index.html>`_
+`Qt Installer Framework <https://doc.qt.io/qtinstallerframework/index.html>`_
(QtIFW).
The module also defines several commands to control the behavior of the
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake
index b91b48e..99ef8e5 100644
--- a/Modules/CTestTargets.cmake
+++ b/Modules/CTestTargets.cmake
@@ -41,7 +41,7 @@ set(__conf_types "")
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
# We need to pass the configuration type on the test command line.
- set(__conf_types -C "${CMAKE_CFG_INTDIR}")
+ set(__conf_types -C "$<CONFIG>")
endif()
# Add convenience targets. Do this at most once in case of nested
diff --git a/Modules/Compiler/LCC-Fortran.cmake b/Modules/Compiler/LCC-Fortran.cmake
index 8091b29..2d82ea8 100644
--- a/Modules/Compiler/LCC-Fortran.cmake
+++ b/Modules/Compiler/LCC-Fortran.cmake
@@ -10,8 +10,11 @@ set(CMAKE_Fortran_PREPROCESS_SOURCE
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
-set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
-set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
+# LCC < 1.24.00 has a broken Fortran preprocessor
+if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.24.00")
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
+endif()
set(CMAKE_Fortran_POSTPROCESS_FLAG "-fpreprocessed")
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 3752ceb..18068cb 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2091,13 +2091,7 @@ function(_ep_get_configuration_subdir_genex suffix_var)
set(suffix "")
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
- if(CMAKE_GENERATOR STREQUAL "Xcode")
- # The Xcode generator does not support per-config sources,
- # so use the underlying build system's placeholder instead.
- set(suffix "/${CMAKE_CFG_INTDIR}")
- else()
- set(suffix "/$<CONFIG>")
- endif()
+ set(suffix "/$<CONFIG>")
endif()
set(${suffix_var} "${suffix}" PARENT_SCOPE)
endfunction()
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index c3b6bc3..d7c6d5e 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -173,7 +173,7 @@ cuFile
.. versionadded:: 3.25
-The NVIDIA GPUDirect Storage `cuFile <https://docs.nvidia.com/cuda/cufile-api/index.html>`_ library.
+The NVIDIA GPUDirect Storage `cuFile <https://docs.nvidia.com/gpudirect-storage/api-reference-guide/index.html>`_ library.
Targets Created:
@@ -236,7 +236,7 @@ Targets Created:
cupti
"""""
-The `NVIDIA CUDA Profiling Tools Interface <https://developer.nvidia.com/CUPTI>`_.
+The `NVIDIA CUDA Profiling Tools Interface <https://developer.nvidia.com/cupti>`_.
Targets Created:
@@ -330,7 +330,7 @@ Targets Created:
nvGRAPH
"""""""
-The `nvGRAPH <https://docs.nvidia.com/cuda/nvgraph/index.html>`_ library.
+The `nvGRAPH <https://web.archive.org/web/20201111171403/https://docs.nvidia.com/cuda/nvgraph/index.html>`_ library.
Removed starting in CUDA 11.0
Targets Created:
@@ -417,7 +417,7 @@ nvToolsExt
.. deprecated:: 3.25 With CUDA 10.0+, use :ref:`nvtx3 <cuda_toolkit_nvtx3>`.
-The `NVIDIA Tools Extension <https://docs.nvidia.com/gameworks/content/gameworkslibrary/nvtx/nvidia_tools_extension_library_nvtx.htm>`_.
+The `NVIDIA Tools Extension <https://docs.nvidia.com/nvtx/>`_.
This is a shared library only.
Targets Created:
diff --git a/Modules/FindOpenCL.cmake b/Modules/FindOpenCL.cmake
index 2b700ff..55be667 100644
--- a/Modules/FindOpenCL.cmake
+++ b/Modules/FindOpenCL.cmake
@@ -39,6 +39,8 @@ The module will also define two cache variables::
#]=======================================================================]
+set(_OPENCL_x86 "(x86)")
+
function(_FIND_OPENCL_VERSION)
include(CheckSymbolExists)
include(CMakePushCheckState)
@@ -79,6 +81,9 @@ find_path(OpenCL_INCLUDE_DIR
CL/cl.h OpenCL/cl.h
PATHS
ENV "PROGRAMFILES(X86)"
+ ENV "PROGRAMFILES"
+ $ENV{PROGRAMFILES${_OPENCL_x86}}/OpenCLHeaders
+ $ENV{PROGRAMFILES}/OpenCLHeaders
ENV AMDAPPSDKROOT
ENV INTELOCLSDKROOT
ENV NVSDKCOMPUTE_ROOT
@@ -100,6 +105,9 @@ if(WIN32)
NAMES OpenCL
PATHS
ENV "PROGRAMFILES(X86)"
+ ENV "PROGRAMFILES"
+ $ENV{PROGRAMFILES${_OPENCL_x86}}/OpenCL-ICD-Loader
+ $ENV{PROGRAMFILES}/OpenCL-ICD-Loader
ENV AMDAPPSDKROOT
ENV INTELOCLSDKROOT
ENV CUDA_PATH
@@ -116,6 +124,9 @@ if(WIN32)
NAMES OpenCL
PATHS
ENV "PROGRAMFILES(X86)"
+ ENV "PROGRAMFILES"
+ $ENV{PROGRAMFILES${_OPENCL_x86}}/OpenCL-ICD-Loader
+ $ENV{PROGRAMFILES}/OpenCL-ICD-Loader
ENV AMDAPPSDKROOT
ENV INTELOCLSDKROOT
ENV CUDA_PATH
@@ -126,6 +137,7 @@ if(WIN32)
"AMD APP/lib/x86_64"
lib/x86_64
lib/x64
+ lib
OpenCL/common/lib/x64)
endif()
else()
@@ -156,6 +168,8 @@ else()
endif()
endif()
+unset(_OPENCL_x86)
+
set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})
set(OpenCL_INCLUDE_DIRS ${OpenCL_INCLUDE_DIR})
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 94d15db..043b69c 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -48,18 +48,35 @@ Since PNG depends on the ZLib compression library, none of the above
will be defined unless ZLib can be found.
#]=======================================================================]
+# Default install location on windows when installing from included cmake build
+# From FindZLIB.cmake
+set(_PNG_x86 "(x86)")
+set(_PNG_INCLUDE_SEARCH_NORMAL
+ "$ENV{ProgramFiles}/libpng"
+ "$ENV{ProgramFiles${_PNG_x86}}/libpng")
+set(_PNG_LIB_SEARCH_NORMAL
+ "$ENV{ProgramFiles}/libpng/lib"
+ "$ENV{ProgramFiles${_PNG_x86}}/libpng/lib")
+unset(_PNG_x86)
+
if(PNG_FIND_QUIETLY)
set(_FIND_ZLIB_ARG QUIET)
endif()
find_package(ZLIB ${_FIND_ZLIB_ARG})
if(ZLIB_FOUND)
- find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES include/libpng)
+ set(_PNG_VERSION_SUFFIXES 17 16 15 14 12)
+
+ list(APPEND _PNG_INCLUDE_PATH_SUFFIXES include/libpng)
+ foreach(v IN LISTS _PNG_VERSION_SUFFIXES)
+ list(APPEND _PNG_INCLUDE_PATH_SUFFIXES include/libpng${v})
+ endforeach()
+
+ find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES ${_PNG_INCLUDE_PATH_SUFFIXES} PATHS ${_PNG_INCLUDE_SEARCH_NORMAL} )
mark_as_advanced(PNG_PNG_INCLUDE_DIR)
list(APPEND PNG_NAMES png libpng)
unset(PNG_NAMES_DEBUG)
- set(_PNG_VERSION_SUFFIXES 17 16 15 14 12)
if (PNG_FIND_VERSION MATCHES "^([0-9]+)\\.([0-9]+)(\\..*)?$")
set(_PNG_VERSION_SUFFIX_MIN "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
if (PNG_FIND_VERSION_EXACT)
@@ -79,14 +96,15 @@ if(ZLIB_FOUND)
# For compatibility with versions prior to this multi-config search, honor
# any PNG_LIBRARY that is already specified and skip the search.
if(NOT PNG_LIBRARY)
- find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES} NAMES_PER_DIR)
- find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG} NAMES_PER_DIR)
+ find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES} NAMES_PER_DIR PATHS ${_PNG_LIB_SEARCH_NORMAL})
+ find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG} NAMES_PER_DIR PATHS ${_PNG_LIB_SEARCH_NORMAL})
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
select_library_configurations(PNG)
mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
endif()
unset(PNG_NAMES)
unset(PNG_NAMES_DEBUG)
+ unset(_PNG_INCLUDE_PATH_SUFFIXES)
# Set by select_library_configurations(), but we want the one from
# find_package_handle_standard_args() below.
diff --git a/Modules/FindXCTest.cmake b/Modules/FindXCTest.cmake
index 7118df2..40e767b 100644
--- a/Modules/FindXCTest.cmake
+++ b/Modules/FindXCTest.cmake
@@ -13,7 +13,7 @@ An XCTest bundle is a CFBundle with a special product-type
and bundle extension. The Mac Developer Library provides more
information in the `Testing with Xcode`_ document.
-.. _Testing with Xcode: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/
+.. _Testing with Xcode: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/
Module Functions
^^^^^^^^^^^^^^^^
diff --git a/Modules/Platform/Linux-LCC-Fortran.cmake b/Modules/Platform/Linux-LCC-Fortran.cmake
index bf2a1c2..308c771 100644
--- a/Modules/Platform/Linux-LCC-Fortran.cmake
+++ b/Modules/Platform/Linux-LCC-Fortran.cmake
@@ -1,7 +1,9 @@
include(Platform/Linux-LCC)
__linux_compiler_lcc(Fortran)
-if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "1.26.03")
+if (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.26.03")
+ set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-lgfortran")
+elseif (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.24.01")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-llfortran")
else()
- set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-lgfortran")
+ unset(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
endif()
diff --git a/Modules/Platform/Windows-Apple-Swift.cmake b/Modules/Platform/Windows-Apple-Swift.cmake
index 1177755..3f754fd 100644
--- a/Modules/Platform/Windows-Apple-Swift.cmake
+++ b/Modules/Platform/Windows-Apple-Swift.cmake
@@ -1 +1,3 @@
set(CMAKE_Swift_IMPLIB_LINKER_FLAGS "-Xlinker -implib:<TARGET_IMPLIB>")
+set(CMAKE_Swift_FLAGS_DEBUG_LINKER_FLAGS "-Xlinker -debug")
+set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_LINKER_FLAGS "-Xlinker -debug")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index e1f298a..7e13e07 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,8 +1,8 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 26)
-set(CMake_VERSION_PATCH 0)
-set(CMake_VERSION_RC 3)
+set(CMake_VERSION_PATCH 20230220)
+#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
# Start with the full version number used in tags. It has no dev info.
diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx
index 162dfc7..ea7b24b 100644
--- a/Source/CPack/cmCPackFreeBSDGenerator.cxx
+++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx
@@ -263,7 +263,7 @@ cmGeneratedFileStream& operator<<(cmGeneratedFileStream& s,
}
// Look up variable; if no value is set, returns an empty string;
-// basically a wrapper that handles the NULL-ptr return from GetOption().
+// basically a wrapper that handles the nullptr return from GetOption().
std::string cmCPackFreeBSDGenerator::var_lookup(const char* var_name)
{
cmValue pv = this->GetOption(var_name);
@@ -402,7 +402,7 @@ int cmCPackFreeBSDGenerator::PackageFiles()
this->packageFileNames.emplace_back(actualPackage);
}
- if (!pkg_initialized() && pkg_init(NULL, NULL) != EPKG_OK) {
+ if (!pkg_initialized() && pkg_init(nullptr, nullptr) != EPKG_OK) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Can not initialize FreeBSD libpkg." << std::endl);
return 0;
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index 643bc6f..cece98e 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -72,11 +72,6 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
-#ifdef CMAKE_INTDIR
- if (!config) {
- config = CMAKE_INTDIR;
- }
-#endif
if (config) {
args.push_back("-DCMAKE_BUILD_TYPE:STRING=" + std::string(config));
@@ -256,11 +251,6 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
-#ifdef CMAKE_INTDIR
- if (!config) {
- config = CMAKE_INTDIR;
- }
-#endif
if (!config) {
config = "Debug";
}
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 71787ea..50d69df 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -89,11 +89,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
}
}
if (cmakeBuildConfiguration.empty()) {
-#ifdef CMAKE_INTDIR
- cmakeBuildConfiguration = CMAKE_INTDIR;
-#else
cmakeBuildConfiguration = "Debug";
-#endif
}
std::string dir = this->CTest->GetCTestConfiguration("BuildDirectory");
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx
index 13b0278..8f7d581 100644
--- a/Source/CTest/cmCTestCurl.cxx
+++ b/Source/CTest/cmCTestCurl.cxx
@@ -157,7 +157,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
// Now run off and do what you've been told!
::curl_easy_perform(this->Curl);
::fclose(ftpfile);
- ::curl_easy_setopt(this->Curl, CURLOPT_HTTPHEADER, NULL);
+ ::curl_easy_setopt(this->Curl, CURLOPT_HTTPHEADER, nullptr);
::curl_slist_free_all(headers);
if (!responseData.empty()) {
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 1c8c713..1d509cf 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -2569,7 +2569,7 @@ bool cmCTestTestHandler::WriteJUnitXML()
xml.EndElement(); // </skipped>
} else if (status == "fail") {
xml.StartElement("failure");
- xml.Attribute("message", result.Reason);
+ xml.Attribute("message", this->GetTestStatus(result));
xml.EndElement(); // </failure>
}
diff --git a/Source/Modules/CMakeBuildUtilities.cmake b/Source/Modules/CMakeBuildUtilities.cmake
index 5cfb0e7..3dc099f 100644
--- a/Source/Modules/CMakeBuildUtilities.cmake
+++ b/Source/Modules/CMakeBuildUtilities.cmake
@@ -54,7 +54,6 @@ if(BUILD_TESTING)
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}")
- CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}")
endif()
#---------------------------------------------------------------------
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index 50e8e3a..21ed8c8 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -34,7 +34,7 @@ const cmDocumentationEntry cmDocumentationUsage = {
" cmake-gui [options] <path-to-source>\n"
" cmake-gui [options] <path-to-existing-build>\n"
" cmake-gui [options] -S <path-to-source> -B <path-to-build>\n"
- " cmake-gui [options] --browse-manual"
+ " cmake-gui [options] --browse-manual [<filename>]"
};
const cmDocumentationEntry cmDocumentationOptions[3] = {
@@ -62,7 +62,7 @@ Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin);
int CMakeGUIExec(CMakeSetupDialog* window);
void SetupDefaultQSettings();
-void OpenReferenceManual();
+void OpenReferenceManual(const QString& filename);
int main(int argc, char** argv)
{
@@ -199,7 +199,12 @@ int main(int argc, char** argv)
}
presetName = preset.toStdString();
} else if (arg == "--browse-manual") {
- OpenReferenceManual();
+ ++i;
+ if (i >= args.size()) {
+ OpenReferenceManual("index.html");
+ } else {
+ OpenReferenceManual(args[i]);
+ }
return 0;
}
}
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 3d4d726..8641407 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -42,7 +42,7 @@
#include "RegexExplorer.h"
#include "WarningMessagesDialog.h"
-void OpenReferenceManual()
+void OpenReferenceManual(const QString& filename)
{
QString urlFormat("https://cmake.org/cmake/help/v%1.%2/");
QUrl url(urlFormat.arg(QString::number(cmVersion::GetMajorVersion()),
@@ -51,7 +51,7 @@ void OpenReferenceManual()
if (!cmSystemTools::GetHTMLDoc().empty()) {
url = QUrl::fromLocalFile(
QDir(QString::fromStdString(cmSystemTools::GetHTMLDoc()))
- .filePath("index.html"));
+ .filePath(filename));
}
QDesktopServices::openUrl(url);
@@ -212,7 +212,8 @@ CMakeSetupDialog::CMakeSetupDialog()
QObject::connect(a, &QAction::triggered, this, &CMakeSetupDialog::doHelp);
a->setShortcut(QKeySequence::HelpContents);
a = HelpMenu->addAction(tr("CMake Reference Manual"));
- QObject::connect(a, &QAction::triggered, this, OpenReferenceManual);
+ QObject::connect(a, &QAction::triggered, this,
+ [] { OpenReferenceManual("index.html"); });
a = HelpMenu->addAction(tr("About"));
QObject::connect(a, &QAction::triggered, this, &CMakeSetupDialog::doAbout);
diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx
index 52e200c..3495aed 100644
--- a/Source/bindexplib.cxx
+++ b/Source/bindexplib.cxx
@@ -281,6 +281,7 @@ public:
// the symbol
const char* scalarPrefix = "??_G";
const char* vectorPrefix = "??_E";
+ const char* vftablePrefix = "??_7";
// The original code had a check for
// symbol.find("real@") == std::string::npos)
// but this disallows member functions with the name "real".
@@ -302,7 +303,8 @@ public:
this->DataSymbols.insert(symbol);
} else {
if (pSymbolTable->Type || !(SectChar & IMAGE_SCN_MEM_READ) ||
- (SectChar & IMAGE_SCN_MEM_EXECUTE)) {
+ (SectChar & IMAGE_SCN_MEM_EXECUTE) ||
+ (symbol.compare(0, 4, vftablePrefix) == 0)) {
this->Symbols.insert(symbol);
}
}
@@ -406,7 +408,7 @@ static bool DumpFile(std::string const& nmPath, const char* filename,
LPVOID lpFileBase;
hFile = CreateFileW(cmsys::Encoding::ToWide(filename).c_str(), GENERIC_READ,
- FILE_SHARE_READ, NULL, OPEN_EXISTING,
+ FILE_SHARE_READ, nullptr, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, 0);
if (hFile == INVALID_HANDLE_VALUE) {
@@ -414,7 +416,8 @@ static bool DumpFile(std::string const& nmPath, const char* filename,
return false;
}
- hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
+ hFileMapping =
+ CreateFileMapping(hFile, nullptr, PAGE_READONLY, 0, 0, nullptr);
if (hFileMapping == 0) {
CloseHandle(hFile);
fprintf(stderr, "Couldn't open file mapping with CreateFileMapping()\n");
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 831e9c7..65a8eb5 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -49,6 +49,7 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
bool append = false;
bool uses_terminal = false;
bool command_expand_lists = false;
+ bool depends_explicit_only = false;
std::string implicit_depends_lang;
cmImplicitDependsList implicit_depends;
@@ -104,6 +105,7 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
MAKE_STATIC_KEYWORD(USES_TERMINAL);
MAKE_STATIC_KEYWORD(VERBATIM);
MAKE_STATIC_KEYWORD(WORKING_DIRECTORY);
+ MAKE_STATIC_KEYWORD(DEPENDS_EXPLICIT_ONLY);
#undef MAKE_STATIC_KEYWORD
static std::unordered_set<std::string> const keywords{
keyAPPEND,
@@ -126,7 +128,8 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
keyTARGET,
keyUSES_TERMINAL,
keyVERBATIM,
- keyWORKING_DIRECTORY
+ keyWORKING_DIRECTORY,
+ keyDEPENDS_EXPLICIT_ONLY
};
for (std::string const& copy : args) {
@@ -155,6 +158,8 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
uses_terminal = true;
} else if (copy == keyCOMMAND_EXPAND_LISTS) {
command_expand_lists = true;
+ } else if (copy == keyDEPENDS_EXPLICIT_ONLY) {
+ depends_explicit_only = true;
} else if (copy == keyTARGET) {
doing = doing_target;
} else if (copy == keyARGS) {
@@ -329,6 +334,7 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
cc->SetDepfile(depfile);
cc->SetJobPool(job_pool);
cc->SetCommandExpandLists(command_expand_lists);
+ cc->SetDependsExplicitOnly(depends_explicit_only);
if (source.empty() && output.empty()) {
// Source is empty, use the target.
mf.AddCustomCommandToTarget(target, cctype, std::move(cc));
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index a065ba9..1705763 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -10,6 +10,8 @@
#include <cmext/string_view>
#include "cmComputeLinkInformation.h"
+#include "cmGeneratorExpression.h"
+#include "cmGeneratorExpressionDAGChecker.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalCommonGenerator.h"
#include "cmGlobalGenerator.h"
@@ -174,7 +176,9 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories(
// We can ignore the INTERFACE_LIBRARY items because
// Target->GetLinkInformation already processed their
// link interface and they don't have any output themselves.
- && linkee->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
+ && (linkee->GetType() != cmStateEnums::INTERFACE_LIBRARY
+ // Synthesized targets may have relevant rules.
+ || linkee->IsSynthetic()) &&
((lang == "CXX"_s && linkee->HaveCxx20ModuleSources()) ||
(lang == "Fortran"_s && linkee->HaveFortranSources(config))) &&
emitted.insert(linkee).second) {
@@ -288,11 +292,17 @@ std::string cmCommonTargetGenerator::GetLinkerLauncher(
const std::string& config)
{
std::string lang = this->GeneratorTarget->GetLinkerLanguage(config);
- cmValue launcherProp =
- this->GeneratorTarget->GetProperty(lang + "_LINKER_LAUNCHER");
+ std::string propName = lang + "_LINKER_LAUNCHER";
+ cmValue launcherProp = this->GeneratorTarget->GetProperty(propName);
if (cmNonempty(launcherProp)) {
+ cmGeneratorExpressionDAGChecker dagChecker(this->GeneratorTarget, propName,
+ nullptr, nullptr);
+ std::string evaluatedLinklauncher = cmGeneratorExpression::Evaluate(
+ *launcherProp, this->LocalCommonGenerator, config, this->GeneratorTarget,
+ &dagChecker, this->GeneratorTarget, lang);
// Convert ;-delimited list to single string
- std::vector<std::string> args = cmExpandedList(*launcherProp, true);
+ std::vector<std::string> args =
+ cmExpandedList(evaluatedLinklauncher, true);
if (!args.empty()) {
args[0] = this->LocalCommonGenerator->ConvertToOutputFormat(
args[0], cmOutputConverter::SHELL);
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index ad8fb8b..ff688a4 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -289,28 +289,28 @@ cmComputeLinkInformation::cmComputeLinkInformation(
// Get options needed to link libraries.
if (cmValue flag = this->Makefile->GetDefinition(
- "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_FLAG")) {
+ cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_LIBRARY_FLAG"))) {
this->LibLinkFlag = *flag;
} else {
this->LibLinkFlag =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG");
}
if (cmValue flag = this->Makefile->GetDefinition(
- "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_FILE_FLAG")) {
+ cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_LIBRARY_FILE_FLAG"))) {
this->LibLinkFileFlag = *flag;
} else {
this->LibLinkFileFlag =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FILE_FLAG");
}
if (cmValue suffix = this->Makefile->GetDefinition(
- "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_SUFFIX")) {
+ cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_LIBRARY_SUFFIX"))) {
this->LibLinkSuffix = *suffix;
} else {
this->LibLinkSuffix =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_SUFFIX");
}
if (cmValue flag = this->Makefile->GetDefinition(
- "CMAKE_" + this->LinkLanguage + "_LINK_OBJECT_FILE_FLAG")) {
+ cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_OBJECT_FILE_FLAG"))) {
this->ObjLinkFileFlag = *flag;
} else {
this->ObjLinkFileFlag =
@@ -325,7 +325,7 @@ cmComputeLinkInformation::cmComputeLinkInformation(
: "SHARED_LIBRARY");
std::string rtVar =
cmStrCat("CMAKE_", tType, "_RUNTIME_", this->LinkLanguage, "_FLAG");
- std::string rtSepVar = rtVar + "_SEP";
+ std::string rtSepVar = cmStrCat(rtVar, "_SEP");
this->RuntimeFlag = this->Makefile->GetSafeDefinition(rtVar);
this->RuntimeSep = this->Makefile->GetSafeDefinition(rtSepVar);
this->RuntimeAlways = (this->Makefile->GetSafeDefinition(
@@ -1070,8 +1070,8 @@ void cmComputeLinkInformation::AddRuntimeLinkLibrary(std::string const& lang)
if (runtimeLibrary.empty()) {
return;
}
- if (cmValue runtimeLinkOptions = this->Makefile->GetDefinition(
- "CMAKE_" + lang + "_RUNTIME_LIBRARY_LINK_OPTIONS_" + runtimeLibrary)) {
+ if (cmValue runtimeLinkOptions = this->Makefile->GetDefinition(cmStrCat(
+ "CMAKE_", lang, "_RUNTIME_LIBRARY_LINK_OPTIONS_", runtimeLibrary))) {
std::vector<std::string> libsVec = cmExpandedList(*runtimeLinkOptions);
for (std::string const& i : libsVec) {
if (!cm::contains(this->ImplicitLinkLibs, i)) {
@@ -1399,10 +1399,9 @@ void cmComputeLinkInformation::ComputeItemParserInfo()
reg = "^(";
for (std::string const& p : this->LinkPrefixes) {
reg += p;
- reg += "|";
+ reg += '|';
}
- reg += ")";
- reg += "([^/:]*)";
+ reg += ")([^/:]*)";
// Create a regex to match any library name.
std::string reg_any = cmStrCat(reg, libext);
@@ -1479,14 +1478,14 @@ std::string cmComputeLinkInformation::CreateExtensionRegex(
}
// Finish the list.
- libext += ")";
+ libext += ')';
// Add an optional OpenBSD-style version or major.minor.version component.
if (this->OpenBSD || type == LinkShared) {
libext += "(\\.[0-9]+)*";
}
- libext += "$";
+ libext += '$';
return libext;
}
@@ -1697,7 +1696,8 @@ bool cmComputeLinkInformation::CheckImplicitDirItem(LinkEntry const& entry)
case cmPolicies::WARN:
if (this->CMP0060Warn) {
// Print the warning at most once for this item.
- std::string const& wid = "CMP0060-WARNING-GIVEN-" + item.Value;
+ std::string const& wid =
+ cmStrCat("CMP0060-WARNING-GIVEN-", item.Value);
if (!this->CMakeInstance->GetPropertyAsBool(wid)) {
this->CMakeInstance->SetProperty(wid, "1");
this->CMP0060WarnItems.insert(item.Value);
@@ -1859,8 +1859,8 @@ void cmComputeLinkInformation::AddFrameworkItem(LinkEntry const& entry)
: cmGlobalGenerator::FrameworkFormat::Extended);
if (!fwDescriptor) {
std::ostringstream e;
- e << "Could not parse framework path \"" << item << "\" "
- << "linked by target " << this->Target->GetName() << ".";
+ e << "Could not parse framework path \"" << item << "\" linked by target "
+ << this->Target->GetName() << '.';
cmSystemTools::Error(e.str());
return;
}
@@ -1994,9 +1994,9 @@ void cmComputeLinkInformation::HandleBadFullItem(LinkEntry const& entry,
std::ostringstream w;
/* clang-format off */
w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0008) << "\n"
- << "Target \"" << this->Target->GetName() << "\" links to item\n"
- << " " << item << "\n"
- << "which is a full-path but not a valid library file name.";
+ "Target \"" << this->Target->GetName() << "\" links to item\n"
+ " " << item << "\n"
+ "which is a full-path but not a valid library file name.";
/* clang-format on */
this->CMakeInstance->IssueMessage(MessageType::AUTHOR_WARNING, w.str(),
this->Target->GetBacktrace());
@@ -2014,9 +2014,9 @@ void cmComputeLinkInformation::HandleBadFullItem(LinkEntry const& entry,
std::ostringstream e;
/* clang-format off */
e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0008) << "\n"
- << "Target \"" << this->Target->GetName() << "\" links to item\n"
- << " " << item << "\n"
- << "which is a full-path but not a valid library file name.";
+ "Target \"" << this->Target->GetName() << "\" links to item\n"
+ " " << item << "\n"
+ "which is a full-path but not a valid library file name.";
/* clang-format on */
this->CMakeInstance->IssueMessage(MessageType::FATAL_ERROR, e.str(),
this->Target->GetBacktrace());
@@ -2055,7 +2055,7 @@ bool cmComputeLinkInformation::FinishLinkerSearchDirectories()
case cmPolicies::REQUIRED_IF_USED:
case cmPolicies::REQUIRED_ALWAYS: {
std::ostringstream e;
- e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0003) << "\n";
+ e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0003) << '\n';
this->PrintLinkPolicyDiagnosis(e);
this->CMakeInstance->IssueMessage(MessageType::FATAL_ERROR, e.str(),
this->Target->GetBacktrace());
@@ -2075,18 +2075,17 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
// Tell the user what to do.
/* clang-format off */
os << "Policy CMP0003 should be set before this line. "
- << "Add code such as\n"
- << " if(COMMAND cmake_policy)\n"
- << " cmake_policy(SET CMP0003 NEW)\n"
- << " endif(COMMAND cmake_policy)\n"
- << "as early as possible but after the most recent call to "
- << "cmake_minimum_required or cmake_policy(VERSION). ";
+ "Add code such as\n"
+ " if(COMMAND cmake_policy)\n"
+ " cmake_policy(SET CMP0003 NEW)\n"
+ " endif(COMMAND cmake_policy)\n"
+ "as early as possible but after the most recent call to "
+ "cmake_minimum_required or cmake_policy(VERSION). ";
/* clang-format on */
// List the items that might need the old-style paths.
os << "This warning appears because target \"" << this->Target->GetName()
- << "\" "
- << "links to some libraries for which the linker must search:\n";
+ << "\" links to some libraries for which the linker must search:\n";
{
// Format the list of unknown items to be as short as possible while
// still fitting in the allowed width (a true solution would be the
@@ -2099,7 +2098,7 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
// output the current line and reset it. Note that the separator
// is either " " or ", " which is always 2 characters.
if (!line.empty() && (line.size() + i.size() + 2) > max_size) {
- os << line << "\n";
+ os << line << '\n';
sep = " ";
line.clear();
}
@@ -2109,7 +2108,7 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
sep = ", ";
}
if (!line.empty()) {
- os << line << "\n";
+ os << line << '\n';
}
}
@@ -2118,17 +2117,17 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
std::set<std::string> emitted;
for (std::string const& i : this->OldLinkDirItems) {
if (emitted.insert(cmSystemTools::GetFilenamePath(i)).second) {
- os << " " << i << "\n";
+ os << " " << i << '\n';
}
}
// Explain.
os << "CMake is adding directories in the second list to the linker "
- << "search path in case they are needed to find libraries from the "
- << "first list (for backwards compatibility with CMake 2.4). "
- << "Set policy CMP0003 to OLD or NEW to enable or disable this "
- << "behavior explicitly. "
- << "Run \"cmake --help-policy CMP0003\" for more information.";
+ "search path in case they are needed to find libraries from the "
+ "first list (for backwards compatibility with CMake 2.4). "
+ "Set policy CMP0003 to OLD or NEW to enable or disable this "
+ "behavior explicitly. "
+ "Run \"cmake --help-policy CMP0003\" for more information.";
}
void cmComputeLinkInformation::LoadImplicitLinkInfo()
@@ -2144,7 +2143,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
if (cmValue libraryArch =
this->Makefile->GetDefinition("CMAKE_LIBRARY_ARCHITECTURE")) {
for (std::string const& i : implicitDirVec) {
- this->ImplicitLinkDirs.insert(i + "/" + *libraryArch);
+ this->ImplicitLinkDirs.insert(cmStrCat(i, '/', *libraryArch));
}
}
@@ -2400,10 +2399,11 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
cmGeneratorTarget::LinkClosure const* lc =
this->Target->GetLinkClosure(this->Config);
for (std::string const& li : lc->Languages) {
- std::string useVar =
- "CMAKE_" + li + "_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH";
+ std::string useVar = cmStrCat(
+ "CMAKE_", li, "_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH");
if (this->Makefile->IsOn(useVar)) {
- std::string dirVar = "CMAKE_" + li + "_IMPLICIT_LINK_DIRECTORIES";
+ std::string dirVar =
+ cmStrCat("CMAKE_", li, "_IMPLICIT_LINK_DIRECTORIES");
if (cmValue dirs = this->Makefile->GetDefinition(dirVar)) {
cmCLI_ExpandListUnique(*dirs, runtimeDirs, emitted);
}
diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx
index fd6aee1..24ba368 100644
--- a/Source/cmCurl.cxx
+++ b/Source/cmCurl.cxx
@@ -131,12 +131,12 @@ std::string cmCurlFixFileURL(std::string url)
// Convert string from UTF-8 to ACP if this is a file:// URL.
std::wstring wurl = cmsys::Encoding::ToWide(url);
if (!wurl.empty()) {
- int mblen =
- WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, NULL, 0, NULL, NULL);
+ int mblen = WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, nullptr, 0,
+ nullptr, nullptr);
if (mblen > 0) {
std::vector<char> chars(mblen);
mblen = WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, &chars[0],
- mblen, NULL, NULL);
+ mblen, nullptr, nullptr);
if (mblen > 0) {
url = &chars[0];
}
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index 68c65bb..e12cf70 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -7,6 +7,8 @@
#include <cmext/algorithm>
+#include "cmStateSnapshot.h"
+
const std::vector<std::string>& cmCustomCommand::GetOutputs() const
{
return this->Outputs;
@@ -162,6 +164,16 @@ void cmCustomCommand::SetCommandExpandLists(bool b)
this->CommandExpandLists = b;
}
+bool cmCustomCommand::GetDependsExplicitOnly() const
+{
+ return this->DependsExplicitOnly;
+}
+
+void cmCustomCommand::SetDependsExplicitOnly(bool b)
+{
+ this->DependsExplicitOnly = b;
+}
+
const std::string& cmCustomCommand::GetDepfile() const
{
return this->Depfile;
@@ -182,14 +194,19 @@ void cmCustomCommand::SetJobPool(const std::string& job_pool)
this->JobPool = job_pool;
}
-cmPolicies::PolicyStatus cmCustomCommand::GetCMP0116Status() const
-{
- return this->CMP0116Status;
-}
+#define DEFINE_CC_POLICY_ACCESSOR(P) \
+ cmPolicies::PolicyStatus cmCustomCommand::Get##P##Status() const \
+ { \
+ return this->P##Status; \
+ }
+CM_FOR_EACH_CUSTOM_COMMAND_POLICY(DEFINE_CC_POLICY_ACCESSOR)
+#undef DEFINE_CC_POLICY_ACCESSOR
-void cmCustomCommand::SetCMP0116Status(cmPolicies::PolicyStatus cmp0116)
+void cmCustomCommand::RecordPolicyValues(const cmStateSnapshot& snapshot)
{
- this->CMP0116Status = cmp0116;
+#define SET_CC_POLICY(P) this->P##Status = snapshot.GetPolicy(cmPolicies::P);
+ CM_FOR_EACH_CUSTOM_COMMAND_POLICY(SET_CC_POLICY)
+#undef SET_CC_POLICY
}
const std::string& cmCustomCommand::GetTarget() const
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h
index 5533847..1e68dbf 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -17,6 +17,8 @@ class cmImplicitDependsList
{
};
+class cmStateSnapshot;
+
/** \class cmCustomCommand
* \brief A class to encapsulate a custom command
*
@@ -100,6 +102,11 @@ public:
bool GetCommandExpandLists() const;
void SetCommandExpandLists(bool b);
+ /** Set/Get whether to use additional dependencies coming from
+ users of OUTPUT of the custom command. */
+ bool GetDependsExplicitOnly() const;
+ void SetDependsExplicitOnly(bool b);
+
/** Set/Get the depfile (used by the Ninja generator) */
const std::string& GetDepfile() const;
void SetDepfile(const std::string& depfile);
@@ -108,9 +115,13 @@ public:
const std::string& GetJobPool() const;
void SetJobPool(const std::string& job_pool);
- /** Set/Get the CMP0116 status (used by the Ninja generator) */
- cmPolicies::PolicyStatus GetCMP0116Status() const;
- void SetCMP0116Status(cmPolicies::PolicyStatus cmp0116);
+#define DECLARE_CC_POLICY_ACCESSOR(P) \
+ cmPolicies::PolicyStatus Get##P##Status() const;
+ CM_FOR_EACH_CUSTOM_COMMAND_POLICY(DECLARE_CC_POLICY_ACCESSOR)
+#undef DECLARE_CC_POLICY_ACCESSOR
+
+ /** Record policy values from state snapshot */
+ void RecordPolicyValues(const cmStateSnapshot& snapshot);
/** Set/Get the associated target */
const std::string& GetTarget() const;
@@ -135,5 +146,12 @@ private:
bool CommandExpandLists = false;
bool StdPipesUTF8 = false;
bool HasMainDependency_ = false;
- cmPolicies::PolicyStatus CMP0116Status = cmPolicies::WARN;
+ bool DependsExplicitOnly = false;
+
+// Policies are NEW for synthesized custom commands, and set by cmMakefile for
+// user-created custom commands.
+#define DECLARE_CC_POLICY_FIELD(P) \
+ cmPolicies::PolicyStatus P##Status = cmPolicies::NEW;
+ CM_FOR_EACH_CUSTOM_COMMAND_POLICY(DECLARE_CC_POLICY_FIELD)
+#undef DECLARE_CC_POLICY_FIELD
};
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index c8e2cb8..7f1afba 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -938,13 +938,13 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os)
// Isolate the file policy level.
// Support CMake versions as far back as 2.6 but also support using NEW
- // policy settings for up to CMake 3.24 (this upper limit may be reviewed
+ // policy settings for up to CMake 3.25 (this upper limit may be reviewed
// and increased from time to time). This reduces the opportunity for CMake
// warnings when an older export file is later used with newer CMake
// versions.
/* clang-format off */
os << "cmake_policy(PUSH)\n"
- << "cmake_policy(VERSION 2.8.3...3.24)\n";
+ << "cmake_policy(VERSION 2.8.3...3.25)\n";
/* clang-format on */
}
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index 33c057d..c6ebad5 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -85,7 +85,7 @@ std::string cmExportTryCompileFileGenerator::FindTargets(
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*prop);
cmTarget dummyHead("try_compile_dummy_exe", cmStateEnums::EXECUTABLE,
- cmTarget::VisibilityNormal, tgt->Target->GetMakefile(),
+ cmTarget::Visibility::Normal, tgt->Target->GetMakefile(),
cmTarget::PerConfig::Yes);
cmGeneratorTarget gDummyHead(&dummyHead, tgt->GetLocalGenerator());
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 988c5c3..e9e2921 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -45,7 +45,7 @@ cmExtraCodeBlocksGenerator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<
cmExtraCodeBlocksGenerator>
- factory("CodeBlocks", "Generates CodeBlocks project files.");
+ factory("CodeBlocks", "Generates CodeBlocks project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
#if defined(_WIN32)
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 9e8ac5c..7538a7f 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -33,7 +33,7 @@ cmExtraCodeLiteGenerator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<
cmExtraCodeLiteGenerator>
- factory("CodeLite", "Generates CodeLite project files.");
+ factory("CodeLite", "Generates CodeLite project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
#if defined(_WIN32)
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index a07acdc..6201889 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -63,7 +63,8 @@ cmExtraEclipseCDT4Generator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<
cmExtraEclipseCDT4Generator>
- factory("Eclipse CDT4", "Generates Eclipse CDT 4.0 project files.");
+ factory("Eclipse CDT4",
+ "Generates Eclipse CDT 4.0 project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
// TODO: Verify if __CYGWIN__ should be checked.
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index eec43c4..a128a8b 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -8,6 +8,7 @@
#include <set>
#include <vector>
+#include "cmCMakePath.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
@@ -24,7 +25,7 @@ cmExtraKateGenerator::cmExtraKateGenerator() = default;
cmExternalMakefileProjectGeneratorFactory* cmExtraKateGenerator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<cmExtraKateGenerator>
- factory("Kate", "Generates Kate project files.");
+ factory("Kate", "Generates Kate project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
#if defined(_WIN32)
@@ -220,17 +221,58 @@ void cmExtraKateGenerator::CreateDummyKateProjectFile(
std::string cmExtraKateGenerator::GenerateFilesString(
const cmLocalGenerator& lg) const
{
- std::string s = cmStrCat(lg.GetSourceDirectory(), "/.git");
- if (cmSystemTools::FileExists(s)) {
- return "\"git\": 1 ";
+ const cmMakefile* mf = lg.GetMakefile();
+ std::string mode =
+ cmSystemTools::UpperCase(mf->GetSafeDefinition("CMAKE_KATE_FILES_MODE"));
+ static const std::string gitString = "\"git\": 1 ";
+ static const std::string svnString = "\"svn\": 1 ";
+ static const std::string hgString = "\"hg\": 1 ";
+ static const std::string fossilString = "\"fossil\": 1 ";
+
+ if (mode == "SVN") {
+ return svnString;
}
-
- s = cmStrCat(lg.GetSourceDirectory(), "/.svn");
- if (cmSystemTools::FileExists(s)) {
- return "\"svn\": 1 ";
+ if (mode == "GIT") {
+ return gitString;
+ }
+ if (mode == "HG") {
+ return hgString;
}
+ if (mode == "FOSSIL") {
+ return fossilString;
+ }
+
+ // check for the VCS files except when "forced" to "FILES" mode:
+ if (mode != "LIST") {
+ cmCMakePath startDir(lg.GetSourceDirectory(), cmCMakePath::auto_format);
+ // move the directories up to the root directory to see whether we are in
+ // a subdir of a svn, git, hg or fossil checkout
+ for (;;) {
+ std::string s = startDir.String() + "/.git";
+ if (cmSystemTools::FileExists(s)) {
+ return gitString;
+ }
+
+ s = startDir.String() + "/.svn";
+ if (cmSystemTools::FileExists(s)) {
+ return svnString;
+ }
- s = cmStrCat(lg.GetSourceDirectory(), '/');
+ s = startDir.String() + "/.hg";
+ if (cmSystemTools::FileExists(s)) {
+ return hgString;
+ }
+ s = startDir.String() + "/.fslckout";
+ if (cmSystemTools::FileExists(s)) {
+ return fossilString;
+ }
+
+ if (!startDir.HasRelativePath()) { // have we reached the root dir ?
+ break;
+ }
+ startDir = startDir.GetParentPath();
+ }
+ }
std::set<std::string> files;
std::string tmp;
@@ -240,9 +282,8 @@ std::string cmExtraKateGenerator::GenerateFilesString(
cmMakefile* makefile = lgen->GetMakefile();
const std::vector<std::string>& listFiles = makefile->GetListFiles();
for (std::string const& listFile : listFiles) {
- tmp = listFile;
- {
- files.insert(tmp);
+ if (listFile.find("/CMakeFiles/") == std::string::npos) {
+ files.insert(listFile);
}
}
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 19e87d5..33901ac 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -43,7 +43,8 @@ cmExtraSublimeTextGenerator::GetFactory()
{
static cmExternalMakefileProjectGeneratorSimpleFactory<
cmExtraSublimeTextGenerator>
- factory("Sublime Text 2", "Generates Sublime Text 2 project files.");
+ factory("Sublime Text 2",
+ "Generates Sublime Text 2 project files (deprecated).");
if (factory.GetSupportedGlobalGenerators().empty()) {
#if defined(_WIN32)
diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx
index 70b8cdb..b7f7f38 100644
--- a/Source/cmFileLockResult.cxx
+++ b/Source/cmFileLockResult.cxx
@@ -56,9 +56,9 @@ std::string cmFileLockResult::GetOutputMessage() const
# define WINMSG_BUF_LEN (1024)
char winmsg[WINMSG_BUF_LEN];
DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
- if (FormatMessageA(flags, NULL, this->ErrorValue,
+ if (FormatMessageA(flags, nullptr, this->ErrorValue,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPSTR)winmsg, WINMSG_BUF_LEN, NULL)) {
+ (LPSTR)winmsg, WINMSG_BUF_LEN, nullptr)) {
const std::string message = winmsg;
return message;
} else {
diff --git a/Source/cmFileLockWin32.cxx b/Source/cmFileLockWin32.cxx
index b8e435a..7bee5f2 100644
--- a/Source/cmFileLockWin32.cxx
+++ b/Source/cmFileLockWin32.cxx
@@ -36,9 +36,9 @@ cmFileLockResult cmFileLock::OpenFile()
{
const DWORD access = GENERIC_READ | GENERIC_WRITE;
const DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
- const PSECURITY_ATTRIBUTES security = NULL;
+ const PSECURITY_ATTRIBUTES security = nullptr;
const DWORD attr = 0;
- const HANDLE templ = NULL;
+ const HANDLE templ = nullptr;
this->File = CreateFileW(
cmSystemTools::ConvertToWindowsExtendedPath(this->Filename).c_str(),
access, shareMode, security, OPEN_EXISTING, attr, templ);
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index 6be5153..82a6c57 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -177,6 +177,15 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkOptionsExpression() const
return property == "LINK_OPTIONS"_s;
}
+bool cmGeneratorExpressionDAGChecker::EvaluatingLinkerLauncher() const
+{
+ cm::string_view property(this->Top()->Property);
+
+ return property.length() > cmStrLen("_LINKER_LAUNCHER") &&
+ property.substr(property.length() - cmStrLen("_LINKER_LAUNCHER")) ==
+ "_LINKER_LAUNCHER"_s;
+}
+
bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(
cmGeneratorTarget const* tgt, ForGenex genex) const
{
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index 55d131f..df1e005 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -70,6 +70,7 @@ struct cmGeneratorExpressionDAGChecker
bool EvaluatingCompileExpression() const;
bool EvaluatingLinkExpression() const;
bool EvaluatingLinkOptionsExpression() const;
+ bool EvaluatingLinkerLauncher() const;
enum class ForGenex
{
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 6595323..4c6dda9 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -1548,7 +1548,8 @@ static const struct LinkLanguageNode : public cmGeneratorExpressionNode
{
if (!context->HeadTarget || !dagChecker ||
!(dagChecker->EvaluatingLinkExpression() ||
- dagChecker->EvaluatingLinkLibraries())) {
+ dagChecker->EvaluatingLinkLibraries() ||
+ dagChecker->EvaluatingLinkerLauncher())) {
reportError(context, content->GetOriginalExpression(),
"$<LINK_LANGUAGE:...> may only be used with binary targets "
"to specify link libraries, link directories, link options "
@@ -1641,7 +1642,8 @@ static const struct LinkLanguageAndIdNode : public cmGeneratorExpressionNode
{
if (!context->HeadTarget || !dagChecker ||
!(dagChecker->EvaluatingLinkExpression() ||
- dagChecker->EvaluatingLinkLibraries())) {
+ dagChecker->EvaluatingLinkLibraries() ||
+ dagChecker->EvaluatingLinkerLauncher())) {
reportError(
context, content->GetOriginalExpression(),
"$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets "
@@ -2098,7 +2100,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
if (dagCheckerParent) {
if (dagCheckerParent->EvaluatingGenexExpression() ||
- dagCheckerParent->EvaluatingPICExpression()) {
+ dagCheckerParent->EvaluatingPICExpression() ||
+ dagCheckerParent->EvaluatingLinkerLauncher()) {
// No check required.
} else if (dagCheckerParent->EvaluatingLinkLibraries()) {
evaluatingLinkLibraries = true;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 5e352b2..be6456b 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1222,10 +1222,12 @@ bool cmGeneratorTarget::IsInBuildSystem() const
case cmStateEnums::GLOBAL_TARGET:
return true;
case cmStateEnums::INTERFACE_LIBRARY:
- // An INTERFACE library is in the build system if it has SOURCES or
- // HEADER_SETS.
+ // An INTERFACE library is in the build system if it has SOURCES,
+ // HEADER_SETS, or C++ module filesets.
if (!this->SourceEntries.empty() ||
- !this->Target->GetHeaderSetsEntries().empty()) {
+ !this->Target->GetHeaderSetsEntries().empty() ||
+ !this->Target->GetCxxModuleSetsEntries().empty() ||
+ !this->Target->GetCxxModuleHeaderSetsEntries().empty()) {
return true;
}
break;
@@ -1235,6 +1237,16 @@ bool cmGeneratorTarget::IsInBuildSystem() const
return false;
}
+bool cmGeneratorTarget::IsNormal() const
+{
+ return this->Target->IsNormal();
+}
+
+bool cmGeneratorTarget::IsSynthetic() const
+{
+ return this->Target->IsSynthetic();
+}
+
bool cmGeneratorTarget::IsImported() const
{
return this->Target->IsImported();
@@ -7103,6 +7115,11 @@ cmGeneratorTarget::OutputInfo const* cmGeneratorTarget::GetOutputInfo(
return nullptr;
}
+ // Synthetic targets don't have output.
+ if (this->IsSynthetic()) {
+ return nullptr;
+ }
+
// Only libraries and executables have well-defined output files.
if (!this->HaveWellDefinedOutputFiles()) {
std::string msg = cmStrCat("cmGeneratorTarget::GetOutputInfo called for ",
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index afd9da4..e46c719 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -50,6 +50,8 @@ public:
cmGlobalGenerator* GetGlobalGenerator() const;
bool IsInBuildSystem() const;
+ bool IsNormal() const;
+ bool IsSynthetic() const;
bool IsImported() const;
bool IsImportedGloballyVisible() const;
bool CanCompileSources() const;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 4cfec22..72eed69 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1327,6 +1327,16 @@ void cmGlobalGenerator::Configure()
this->BinaryDirectories.insert(
this->CMakeInstance->GetHomeOutputDirectory());
+ if (this->ExtraGenerator && !this->CMakeInstance->GetIsInTryCompile()) {
+ this->CMakeInstance->IssueMessage(
+ MessageType::DEPRECATION_WARNING,
+ cmStrCat("Support for \"Extra Generators\" like\n ",
+ this->ExtraGenerator->GetName(),
+ "\nis deprecated and will be removed from a future version "
+ "of CMake. IDEs may use the cmake-file-api(7) to view "
+ "CMake-generated project build trees."));
+ }
+
// now do it
this->ConfigureDoneCMP0026AndCMP0024 = false;
dirMf->Configure();
@@ -2911,7 +2921,7 @@ void cmGlobalGenerator::AddGlobalTarget_Install(
singleLine.push_back(cfgArg);
cfgArg = "-DEFFECTIVE_PLATFORM_NAME=$(EFFECTIVE_PLATFORM_NAME)";
} else {
- cfgArg += *mf->GetDefinition("CMAKE_CFG_INTDIR");
+ cfgArg += this->GetCMakeCFGIntDir();
}
singleLine.push_back(cfgArg);
}
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 3da15f6..b1f2b4a 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -22,7 +22,6 @@
#include "cmLocalGhsMultiGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
-#include "cmPolicies.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmStateTypes.h"
@@ -717,7 +716,6 @@ bool cmGlobalGhsMultiGenerator::AddCheckTarget()
cc->SetDepends(listFiles);
cc->SetCommandLines(commandLines);
cc->SetComment("Checking Build System");
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(true);
@@ -747,7 +745,6 @@ void cmGlobalGhsMultiGenerator::AddAllTarget()
// Use no actual command lines so that the target itself is not
// considered always out of date.
auto cc = cm::make_unique<cmCustomCommand>();
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetComment("Build all projects");
cmTarget* allBuild = gen[0]->AddUtilityCommand(this->GetAllTargetName(),
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 93aa30a..b5e1529 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -318,12 +318,6 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
}
}
- if (build.Variables.count("dyndep") > 0) {
- // The ninja 'cleandead' operation does not account for outputs
- // discovered by 'dyndep' bindings. Avoid removing them.
- this->DisableCleandead = true;
- }
-
os << buildStr << arguments << assignments << "\n";
}
@@ -591,7 +585,6 @@ void cmGlobalNinjaGenerator::Generate()
this->InitOutputPathPrefix();
this->TargetAll = this->NinjaOutputPath("all");
this->CMakeCacheFile = this->NinjaOutputPath("CMakeCache.txt");
- this->DisableCleandead = false;
this->DiagnosedCxxModuleNinjaSupport = false;
this->ClangTidyExportFixesDirs.clear();
this->ClangTidyExportFixesFiles.clear();
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 1436c83..6d23e89 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -596,7 +596,6 @@ private:
std::string OutputPathPrefix;
std::string TargetAll;
std::string CMakeCacheFile;
- bool DisableCleandead = false;
struct ByConfig
{
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index d483135..5de3a55 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -309,6 +309,26 @@ void cmGlobalVisualStudio7Generator::Generate()
GetSLNFile(this->LocalGenerators[0].get()));
}
+ if (this->Version == VSVersion::VS9 &&
+ !this->CMakeInstance->GetIsInTryCompile()) {
+ std::string cmakeWarnVS9;
+ if (cmValue cached = this->CMakeInstance->GetState()->GetCacheEntryValue(
+ "CMAKE_WARN_VS9")) {
+ this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS9");
+ cmakeWarnVS9 = *cached;
+ } else {
+ cmSystemTools::GetEnv("CMAKE_WARN_VS9", cmakeWarnVS9);
+ }
+ if (cmakeWarnVS9.empty() || !cmIsOff(cmakeWarnVS9)) {
+ this->CMakeInstance->IssueMessage(
+ MessageType::WARNING,
+ "The \"Visual Studio 9 2008\" generator is deprecated "
+ "and will be removed in a future version of CMake."
+ "\n"
+ "Add CMAKE_WARN_VS9=OFF to the cache to disable this warning.");
+ }
+ }
+
if (this->Version == VSVersion::VS11 &&
!this->CMakeInstance->GetIsInTryCompile()) {
std::string cmakeWarnVS11;
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 647fc2d..2e2c8b6 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -169,7 +169,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
cm::static_reference_cast<cmLocalVisualStudio7Generator>(generators[0]);
auto cc = cm::make_unique<cmCustomCommand>();
- cc->SetCMP0116Status(cmPolicies::NEW);
cmTarget* tgt = lg.AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false,
std::move(cc));
@@ -225,7 +224,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
cc->SetByproducts(byproducts);
cc->SetCommandLines(verifyCommandLines);
cc->SetComment("Checking File Globs");
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetStdPipesUTF8(stdPipesUTF8);
lg.AddCustomCommandToTarget(CMAKE_CHECK_BUILD_SYSTEM_TARGET,
cmCustomCommandType::PRE_BUILD,
@@ -260,7 +258,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
cc->SetDepends(listFiles);
cc->SetCommandLines(commandLines);
cc->SetComment("Checking Build System");
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(stdPipesUTF8);
if (cmSourceFile* file =
diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx
index 9f6550b..e396405 100644
--- a/Source/cmGlobalVisualStudio9Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Generator.cxx
@@ -64,7 +64,7 @@ public:
cmDocumentationEntry GetDocumentation() const override
{
return { std::string(vs9generatorName) + " [arch]",
- "Generates Visual Studio 2008 project files. "
+ "Deprecated. Generates Visual Studio 2008 project files. "
"Optional [arch] can be \"Win64\" or \"IA64\"." };
}
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 31f6f77..702199d 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -201,7 +201,6 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
// Use no actual command lines so that the target itself is not
// considered always out of date.
auto cc = cm::make_unique<cmCustomCommand>();
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetComment("Build all projects");
cmTarget* allBuild =
@@ -545,12 +544,12 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
cmSystemTools::ConvertToUnixSlashes(s1);
std::string keyname;
- HKEY hkey = NULL;
+ HKEY hkey = nullptr;
LONG result = ERROR_SUCCESS;
DWORD index = 0;
keyname = regKeyBase + "\\OtherProjects7";
- hkey = NULL;
+ hkey = nullptr;
result =
RegOpenKeyExW(HKEY_CURRENT_USER, cmsys::Encoding::ToWide(keyname).c_str(),
0, KEY_READ, &hkey);
@@ -568,7 +567,7 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
RegEnumKeyExW(hkey, index, subkeyname, &cch_subkeyname, 0, keyclass,
&cch_keyclass, &lastWriteTime)) {
// Open the subkey and query the values of interest:
- HKEY hsubkey = NULL;
+ HKEY hsubkey = nullptr;
result = RegOpenKeyExW(hkey, subkeyname, 0, KEY_READ, &hsubkey);
if (ERROR_SUCCESS == result) {
DWORD valueType = REG_SZ;
@@ -642,7 +641,7 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
nextAvailableSubKeyName = std::to_string(index);
keyname = regKeyBase + "\\RecordingProject7";
- hkey = NULL;
+ hkey = nullptr;
result =
RegOpenKeyExW(HKEY_CURRENT_USER, cmsys::Encoding::ToWide(keyname).c_str(),
0, KEY_READ, &hkey);
@@ -688,13 +687,13 @@ void WriteVSMacrosFileRegistryEntry(const std::string& nextAvailableSubKeyName,
const std::string& regKeyBase)
{
std::string keyname = regKeyBase + "\\OtherProjects7";
- HKEY hkey = NULL;
+ HKEY hkey = nullptr;
LONG result =
RegOpenKeyExW(HKEY_CURRENT_USER, cmsys::Encoding::ToWide(keyname).c_str(),
0, KEY_READ | KEY_WRITE, &hkey);
if (ERROR_SUCCESS == result) {
// Create the subkey and set the values of interest:
- HKEY hsubkey = NULL;
+ HKEY hsubkey = nullptr;
wchar_t lpClass[] = L"";
result = RegCreateKeyExW(
hkey, cmsys::Encoding::ToWide(nextAvailableSubKeyName).c_str(), 0,
@@ -961,13 +960,13 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
static bool OpenSolution(std::string const& sln)
{
HRESULT comInitialized =
- CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
+ CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (FAILED(comInitialized)) {
return false;
}
- HINSTANCE hi =
- ShellExecuteA(NULL, "open", sln.c_str(), NULL, NULL, SW_SHOWNORMAL);
+ HINSTANCE hi = ShellExecuteA(nullptr, "open", sln.c_str(), nullptr, nullptr,
+ SW_SHOWNORMAL);
CoUninitialize();
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 4746507..d4ce69e 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -615,7 +615,6 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetCommandLines(
cmMakeSingleCommandLine({ "echo", "Build all projects" }));
- cc->SetCMP0116Status(cmPolicies::NEW);
cmTarget* allbuild =
root->AddUtilityCommand("ALL_BUILD", true, std::move(cc));
@@ -655,7 +654,6 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
cmSystemTools::ReplaceString(file, "\\ ", " ");
cc = cm::make_unique<cmCustomCommand>();
cc->SetCommandLines(cmMakeSingleCommandLine({ "make", "-f", file }));
- cc->SetCMP0116Status(cmPolicies::NEW);
cmTarget* check = root->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET,
true, std::move(cc));
@@ -687,7 +685,6 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
cc->SetCommandLines(legacyDependHelperCommandLines);
cc->SetComment("Depend check for xcode");
cc->SetWorkingDirectory(legacyDependHelperDir.c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
gen->AddCustomCommandToTarget(
target->GetName(), cmCustomCommandType::POST_BUILD, std::move(cc),
cmObjectLibraryCommands::Accept);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 75ec694..c2138ee 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -827,13 +827,18 @@ cmStateSnapshot cmLocalGenerator::GetStateSnapshot() const
return this->Makefile->GetStateSnapshot();
}
-cmValue cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target,
- const std::string& prop)
+std::string cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target,
+ const std::string& prop,
+ const std::string& config)
{
+ cmValue value = this->Makefile->GetProperty(prop);
if (target) {
- return target->GetProperty(prop);
+ value = target->GetProperty(prop);
+ }
+ if (value) {
+ return cmGeneratorExpression::Evaluate(*value, this, config, target);
}
- return this->Makefile->GetProperty(prop);
+ return "";
}
std::string cmLocalGenerator::ConvertToIncludeReference(
@@ -2841,7 +2846,6 @@ void cmLocalGenerator::CopyPchCompilePdb(
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetCommandLines(commandLines);
cc->SetComment(no_message);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetStdPipesUTF8(true);
if (this->GetGlobalGenerator()->IsVisualStudio()) {
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 20f23de..bda82bc 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -532,7 +532,9 @@ public:
void CreateEvaluationFileOutputs(const std::string& config);
void ProcessEvaluationFiles(std::vector<std::string>& generatedFiles);
- cmValue GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop);
+ std::string GetRuleLauncher(cmGeneratorTarget* target,
+ const std::string& prop,
+ const std::string& config);
protected:
// The default implementation converts to a Windows shortpath to
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 1e2ea2a..f8027c0 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -586,32 +586,34 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
cmNinjaDeps orderOnlyDeps;
- // A custom command may appear on multiple targets. However, some build
- // systems exist where the target dependencies on some of the targets are
- // overspecified, leading to a dependency cycle. If we assume all target
- // dependencies are a superset of the true target dependencies for this
- // custom command, we can take the set intersection of all target
- // dependencies to obtain a correct dependency list.
- //
- // FIXME: This won't work in certain obscure scenarios involving indirect
- // dependencies.
- auto j = targets.begin();
- assert(j != targets.end());
- this->GetGlobalNinjaGenerator()->AppendTargetDependsClosure(
- *j, orderOnlyDeps, ccg.GetOutputConfig(), fileConfig, ccgs.size() > 1);
- std::sort(orderOnlyDeps.begin(), orderOnlyDeps.end());
- ++j;
-
- for (; j != targets.end(); ++j) {
- std::vector<std::string> jDeps;
- std::vector<std::string> depsIntersection;
+ if (!cc->GetDependsExplicitOnly()) {
+ // A custom command may appear on multiple targets. However, some build
+ // systems exist where the target dependencies on some of the targets are
+ // overspecified, leading to a dependency cycle. If we assume all target
+ // dependencies are a superset of the true target dependencies for this
+ // custom command, we can take the set intersection of all target
+ // dependencies to obtain a correct dependency list.
+ //
+ // FIXME: This won't work in certain obscure scenarios involving indirect
+ // dependencies.
+ auto j = targets.begin();
+ assert(j != targets.end());
this->GetGlobalNinjaGenerator()->AppendTargetDependsClosure(
- *j, jDeps, ccg.GetOutputConfig(), fileConfig, ccgs.size() > 1);
- std::sort(jDeps.begin(), jDeps.end());
- std::set_intersection(orderOnlyDeps.begin(), orderOnlyDeps.end(),
- jDeps.begin(), jDeps.end(),
- std::back_inserter(depsIntersection));
- orderOnlyDeps = depsIntersection;
+ *j, orderOnlyDeps, ccg.GetOutputConfig(), fileConfig, ccgs.size() > 1);
+ std::sort(orderOnlyDeps.begin(), orderOnlyDeps.end());
+ ++j;
+
+ for (; j != targets.end(); ++j) {
+ std::vector<std::string> jDeps;
+ std::vector<std::string> depsIntersection;
+ this->GetGlobalNinjaGenerator()->AppendTargetDependsClosure(
+ *j, jDeps, ccg.GetOutputConfig(), fileConfig, ccgs.size() > 1);
+ std::sort(jDeps.begin(), jDeps.end());
+ std::set_intersection(orderOnlyDeps.begin(), orderOnlyDeps.end(),
+ jDeps.begin(), jDeps.end(),
+ std::back_inserter(depsIntersection));
+ orderOnlyDeps = depsIntersection;
+ }
}
const std::vector<std::string>& outputs = ccg.GetOutputs();
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 7172d34..56a41b1 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1003,7 +1003,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
std::string launcher;
// Short-circuit if there is no launcher.
- cmValue val = this->GetRuleLauncher(target, "RULE_LAUNCH_CUSTOM");
+ std::string val = this->GetRuleLauncher(
+ target, "RULE_LAUNCH_CUSTOM",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
// Expand rule variables referenced in the given launcher command.
cmRulePlaceholderExpander::RuleVariables vars;
@@ -1022,7 +1024,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
}
vars.Output = output.c_str();
- launcher = *val;
+ launcher = val;
rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars);
if (!launcher.empty()) {
launcher += " ";
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index ded1647..6806a5b 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -141,7 +141,6 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
cc->SetOutputs(force);
cc->SetCommandLines(force_commands);
cc->SetComment(" ");
- cc->SetCMP0116Status(cmPolicies::NEW);
if (cmSourceFile* file =
this->AddCustomCommandToOutput(std::move(cc), true)) {
l->AddSource(file->ResolveFullPath());
@@ -269,7 +268,6 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
cc->SetDepends(listFiles);
cc->SetCommandLines(commandLines);
cc->SetComment(comment.c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(true);
this->AddCustomCommandToOutput(std::move(cc), true);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d26f383..d963a5a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1117,7 +1117,7 @@ cmTarget* cmMakefile::AddCustomCommandToTarget(
// Always create the byproduct sources and mark them generated.
this->CreateGeneratedOutputs(byproducts);
- cc->SetCMP0116Status(this->GetPolicyStatus(cmPolicies::CMP0116));
+ cc->RecordPolicyValues(this->GetStateSnapshot());
// Dispatch command creation to allow generator expressions in outputs.
this->AddGeneratorAction(
@@ -1156,7 +1156,7 @@ void cmMakefile::AddCustomCommandToOutput(
this->CreateGeneratedOutputs(outputs);
this->CreateGeneratedOutputs(byproducts);
- cc->SetCMP0116Status(this->GetPolicyStatus(cmPolicies::CMP0116));
+ cc->RecordPolicyValues(this->GetStateSnapshot());
// Dispatch command creation to allow generator expressions in outputs.
this->AddGeneratorAction(
@@ -1274,7 +1274,7 @@ cmTarget* cmMakefile::AddUtilityCommand(const std::string& utilityName,
// Always create the byproduct sources and mark them generated.
this->CreateGeneratedOutputs(byproducts);
- cc->SetCMP0116Status(this->GetPolicyStatus(cmPolicies::CMP0116));
+ cc->RecordPolicyValues(this->GetStateSnapshot());
// Dispatch command creation to allow generator expressions in outputs.
this->AddGeneratorAction(
@@ -2115,12 +2115,21 @@ cmTarget* cmMakefile::AddNewTarget(cmStateEnums::TargetType type,
return &this->CreateNewTarget(name, type).first;
}
+cmTarget* cmMakefile::AddSynthesizedTarget(cmStateEnums::TargetType type,
+ const std::string& name)
+{
+ return &this
+ ->CreateNewTarget(name, type, cmTarget::PerConfig::Yes,
+ cmTarget::Visibility::Generated)
+ .first;
+}
+
std::pair<cmTarget&, bool> cmMakefile::CreateNewTarget(
const std::string& name, cmStateEnums::TargetType type,
- cmTarget::PerConfig perConfig)
+ cmTarget::PerConfig perConfig, cmTarget::Visibility vis)
{
- auto ib = this->Targets.emplace(
- name, cmTarget(name, type, cmTarget::VisibilityNormal, this, perConfig));
+ auto ib =
+ this->Targets.emplace(name, cmTarget(name, type, vis, this, perConfig));
auto it = ib.first;
if (!ib.second) {
return std::make_pair(std::ref(it->second), false);
@@ -4203,8 +4212,8 @@ cmTarget* cmMakefile::AddImportedTarget(const std::string& name,
// Create the target.
std::unique_ptr<cmTarget> target(
new cmTarget(name, type,
- global ? cmTarget::VisibilityImportedGlobally
- : cmTarget::VisibilityImported,
+ global ? cmTarget::Visibility::ImportedGlobally
+ : cmTarget::Visibility::Imported,
this, cmTarget::PerConfig::Yes));
// Add to the set of available imported targets.
@@ -4486,7 +4495,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
}
// Deprecate old policies.
- if (status == cmPolicies::OLD && id <= cmPolicies::CMP0108 &&
+ if (status == cmPolicies::OLD && id <= cmPolicies::CMP0114 &&
!(this->GetCMakeInstance()->GetIsInTryCompile() &&
(
// Policies set by cmCoreTryCompile::TryCompileCode.
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 3866aca..7b19c97 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -241,10 +241,13 @@ public:
std::pair<cmTarget&, bool> CreateNewTarget(
const std::string& name, cmStateEnums::TargetType type,
- cmTarget::PerConfig perConfig = cmTarget::PerConfig::Yes);
+ cmTarget::PerConfig perConfig = cmTarget::PerConfig::Yes,
+ cmTarget::Visibility vis = cmTarget::Visibility::Normal);
cmTarget* AddNewTarget(cmStateEnums::TargetType type,
const std::string& name);
+ cmTarget* AddSynthesizedTarget(cmStateEnums::TargetType type,
+ const std::string& name);
/** Create a target instance for the utility. */
cmTarget* AddNewUtilityTarget(const std::string& utilityName,
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index e53d28c..41daa5a 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -222,10 +222,11 @@ void cmMakefileExecutableTargetGenerator::WriteNvidiaDeviceExecutableRule(
std::string launcher;
- cmValue val = this->LocalGenerator->GetRuleLauncher(this->GeneratorTarget,
- "RULE_LAUNCH_LINK");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_LINK",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
@@ -587,10 +588,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string launcher;
- cmValue val = this->LocalGenerator->GetRuleLauncher(this->GeneratorTarget,
- "RULE_LAUNCH_LINK");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_LINK",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 9669293..cb567ff 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -362,10 +362,11 @@ void cmMakefileLibraryTargetGenerator::WriteNvidiaDeviceLibraryRules(
vars.TargetCompilePDB = targetOutPathCompilePDB.c_str();
std::string launcher;
- cmValue val = this->LocalGenerator->GetRuleLauncher(this->GeneratorTarget,
- "RULE_LAUNCH_LINK");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_LINK",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
@@ -808,10 +809,11 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
}
std::string launcher;
- cmValue val = this->LocalGenerator->GetRuleLauncher(this->GeneratorTarget,
- "RULE_LAUNCH_LINK");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_LINK",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index c40d685..2b817c3 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1044,7 +1044,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
- *clauncher, this->LocalGenerator, config);
+ *clauncher, this->LocalGenerator, config, this->GeneratorTarget,
+ nullptr, this->GeneratorTarget, lang);
if (!evaluatedClauncher.empty()) {
compilerLauncher = evaluatedClauncher;
}
@@ -1166,10 +1167,11 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
std::string launcher;
{
- cmValue val = this->LocalGenerator->GetRuleLauncher(
- this->GeneratorTarget, "RULE_LAUNCH_COMPILE");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_COMPILE",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
}
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index a1633ca..45a4dda 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -263,10 +263,10 @@ void cmNinjaNormalTargetGenerator::WriteNvidiaDeviceLinkRule(
vars.LanguageCompileFlags = "$LANGUAGE_COMPILE_FLAGS";
std::string launcher;
- cmValue val = this->GetLocalGenerator()->GetRuleLauncher(
- this->GetGeneratorTarget(), "RULE_LAUNCH_LINK");
+ std::string val = this->GetLocalGenerator()->GetRuleLauncher(
+ this->GetGeneratorTarget(), "RULE_LAUNCH_LINK", config);
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
@@ -458,10 +458,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile,
}
std::string launcher;
- cmValue val = this->GetLocalGenerator()->GetRuleLauncher(
- this->GetGeneratorTarget(), "RULE_LAUNCH_LINK");
+ std::string val = this->GetLocalGenerator()->GetRuleLauncher(
+ this->GetGeneratorTarget(), "RULE_LAUNCH_LINK", config);
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 13782b0..8663f46 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -670,10 +670,10 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
cmLocalGenerator::SHELL);
std::string launcher;
- cmValue val = this->GetLocalGenerator()->GetRuleLauncher(
- this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE");
+ std::string val = this->GetLocalGenerator()->GetRuleLauncher(
+ this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE", config);
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::string const cmakeCmd =
@@ -886,7 +886,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
std::string const clauncher_prop = cmStrCat(lang, "_COMPILER_LAUNCHER");
cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
- *clauncher, this->LocalGenerator, config);
+ *clauncher, this->LocalGenerator, config, this->GeneratorTarget, nullptr,
+ this->GeneratorTarget, lang);
if (!evaluatedClauncher.empty()) {
compilerLauncher = evaluatedClauncher;
}
@@ -1139,27 +1140,32 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements(
}
}
- for (auto const& langDDIFiles : this->Configs[config].DDIFiles) {
- std::string const& language = langDDIFiles.first;
- cmNinjaDeps const& ddiFiles = langDDIFiles.second;
+ for (auto const& langScanningFiles : this->Configs[config].ScanningInfo) {
+ std::string const& language = langScanningFiles.first;
+ std::vector<ScanningFiles> const& scanningFiles = langScanningFiles.second;
cmNinjaBuild build(this->LanguageDyndepRule(language, config));
build.Outputs.push_back(this->GetDyndepFilePath(language, config));
- build.ExplicitDeps = ddiFiles;
+ build.ImplicitOuts.push_back(
+ cmStrCat(this->Makefile->GetCurrentBinaryDirectory(), '/',
+ this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget),
+ this->GetGlobalGenerator()->ConfigDirectory(config), '/',
+ language, "Modules.json"));
+ for (auto const& scanFiles : scanningFiles) {
+ if (!scanFiles.ScanningOutput.empty()) {
+ build.ExplicitDeps.push_back(scanFiles.ScanningOutput);
+ }
+ if (!scanFiles.ModuleMapFile.empty()) {
+ build.ImplicitOuts.push_back(scanFiles.ModuleMapFile);
+ }
+ }
this->WriteTargetDependInfo(language, config);
- // Make sure dyndep files for all our dependencies have already
- // been generated so that the '<LANG>Modules.json' files they
- // produced as side-effects are available for us to read.
- // Ideally we should depend on the '<LANG>Modules.json' files
- // from our dependencies directly, but we don't know which of
- // our dependencies produces them. Fixing this will require
- // refactoring the Ninja generator to generate targets in
- // dependency order so that we can collect the needed information.
- this->GetLocalGenerator()->AppendTargetDepends(
- this->GeneratorTarget, build.OrderOnlyDeps, config, fileConfig,
- DependOnTargetArtifact);
+ for (std::string const& l :
+ this->GetLinkedTargetDirectories(language, config)) {
+ build.ImplicitDeps.push_back(cmStrCat(l, '/', language, "Modules.json"));
+ }
this->GetGlobalGenerator()->WriteBuild(this->GetImplFileStream(fileConfig),
build);
@@ -1209,7 +1215,6 @@ cmNinjaBuild GetScanBuildStatement(const std::string& ruleName,
const std::string& ppFileName,
bool compilePP, bool compilePPWithDefines,
cmNinjaBuild& objBuild, cmNinjaVars& vars,
- std::string const& modmapFormat,
const std::string& objectFileName,
cmLocalGenerator* lg)
{
@@ -1278,15 +1283,6 @@ cmNinjaBuild GetScanBuildStatement(const std::string& ruleName,
vars.erase("DEP_FILE");
}
- if (!modmapFormat.empty()) {
- // XXX(modmap): If changing this path construction, change
- // `cmGlobalNinjaGenerator::WriteDyndep` to expect the corresponding
- // file path.
- std::string const ddModmapFile = cmStrCat(objectFileName, ".modmap");
- scanBuild.Variables["DYNDEP_MODULE_MAP_FILE"] = ddModmapFile;
- scanBuild.ImplicitOuts.push_back(ddModmapFile);
- }
-
return scanBuild;
}
}
@@ -1481,7 +1477,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
cmNinjaBuild ppBuild = GetScanBuildStatement(
scanRuleName, ppFileName, compilePP, compilePPWithDefines, objBuild,
- vars, modmapFormat, objectFileName, this->LocalGenerator);
+ vars, objectFileName, this->LocalGenerator);
if (compilePP) {
// In case compilation requires flags that are incompatible with
@@ -1502,9 +1498,10 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
vars["INCLUDES"] = cmStrCat(sourceDirectoryFlag, ' ', vars["INCLUDES"]);
}
+ ScanningFiles scanningFiles;
+
if (firstForConfig) {
- std::string const ddiFile = cmStrCat(objectFileName, ".ddi");
- this->Configs[config].DDIFiles[language].push_back(ddiFile);
+ scanningFiles.ScanningOutput = cmStrCat(objectFileName, ".ddi");
}
this->addPoolNinjaVariable("JOB_POOL_COMPILE", this->GetGeneratorTarget(),
@@ -1518,9 +1515,17 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
vars["dyndep"] = dyndep;
if (!modmapFormat.empty()) {
- std::string const ddModmapFile = cmStrCat(objectFileName, ".modmap");
+ // XXX(modmap): If changing this path construction, change
+ // `cmGlobalNinjaGenerator::WriteDyndep` to expect the corresponding file
+ // path.
+ std::string ddModmapFile = cmStrCat(objectFileName, ".modmap");
vars["DYNDEP_MODULE_MAP_FILE"] = ddModmapFile;
objBuild.OrderOnlyDeps.push_back(ddModmapFile);
+ scanningFiles.ModuleMapFile = std::move(ddModmapFile);
+ }
+
+ if (!scanningFiles.IsEmpty()) {
+ this->Configs[config].ScanningInfo[language].emplace_back(scanningFiles);
}
}
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 8bf7986..8f4a764 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -222,12 +222,23 @@ protected:
private:
cmLocalNinjaGenerator* LocalGenerator;
+ struct ScanningFiles
+ {
+ bool IsEmpty() const
+ {
+ return this->ScanningOutput.empty() && this->ModuleMapFile.empty();
+ }
+
+ std::string ScanningOutput;
+ std::string ModuleMapFile;
+ };
+
struct ByConfig
{
/// List of object files for this target.
cmNinjaDeps Objects;
- // Fortran Support
- std::map<std::string, cmNinjaDeps> DDIFiles;
+ // Dyndep Support
+ std::map<std::string, std::vector<ScanningFiles>> ScanningInfo;
// Swift Support
Json::Value SwiftOutputMap;
std::vector<cmCustomCommand const*> CustomCommands;
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index da5f5e5..d5e5725 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -259,8 +259,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer,
{
// Warn about policy versions for which support will be removed.
if (warnCompat == WarnCompat::On &&
- (majorVer < 2 || (majorVer == 2 && minorVer < 8) ||
- (majorVer == 2 && minorVer == 8 && patchVer < 12)) &&
+ (majorVer < 3 || (majorVer == 3 && minorVer < 5)) &&
// Avoid warning on calls generated by install(EXPORT)
// in CMake versions prior to 3.18.
!(majorVer == 2 && minorVer == 6 && patchVer == 0 &&
@@ -269,7 +268,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer,
"cmake_policy") == 0)) {
mf->IssueMessage(
MessageType::DEPRECATION_WARNING,
- "Compatibility with CMake < 2.8.12 will be removed from "
+ "Compatibility with CMake < 3.5 will be removed from "
"a future version of CMake.\n"
"Update the VERSION argument <min> value or use a ...<max> suffix "
"to tell CMake that the project does not need compatibility with "
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index fa24f57..568eca3 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -474,6 +474,8 @@ class cmMakefile;
F(CMP0131) \
F(CMP0142)
+#define CM_FOR_EACH_CUSTOM_COMMAND_POLICY(F) F(CMP0116)
+
/** \class cmPolicies
* \brief Handles changes in CMake behavior and policies
*
diff --git a/Source/cmProcessOutput.cxx b/Source/cmProcessOutput.cxx
index 10c4215..e1df661 100644
--- a/Source/cmProcessOutput.cxx
+++ b/Source/cmProcessOutput.cxx
@@ -85,7 +85,7 @@ bool cmProcessOutput::DecodeText(std::string raw, std::string& decoded,
rawparts[id - 1] += *(raw.end() - 1);
raw.resize(raw.size() - 1);
}
- success = DoDecodeText(raw, decoded, NULL);
+ success = DoDecodeText(raw, decoded, nullptr);
} else {
bool restoreDecoded = false;
std::string firstDecoded = decoded;
@@ -114,7 +114,7 @@ bool cmProcessOutput::DecodeText(std::string raw, std::string& decoded,
}
}
} else {
- success = DoDecodeText(raw, decoded, NULL);
+ success = DoDecodeText(raw, decoded, nullptr);
}
}
return success;
@@ -143,7 +143,7 @@ bool cmProcessOutput::DoDecodeText(std::string raw, std::string& decoded,
{
bool success = false;
const int wlength =
- MultiByteToWideChar(codepage, 0, raw.c_str(), int(raw.size()), NULL, 0);
+ MultiByteToWideChar(codepage, 0, raw.c_str(), int(raw.size()), nullptr, 0);
auto wdata = cm::make_unique<wchar_t[]>(wlength);
int r = MultiByteToWideChar(codepage, 0, raw.c_str(), int(raw.size()),
wdata.get(), wlength);
@@ -156,10 +156,10 @@ bool cmProcessOutput::DoDecodeText(std::string raw, std::string& decoded,
}
}
int length = WideCharToMultiByte(defaultCodepage, 0, wdata.get(), wlength,
- NULL, 0, NULL, NULL);
+ nullptr, 0, nullptr, nullptr);
auto data = cm::make_unique<char[]>(length);
r = WideCharToMultiByte(defaultCodepage, 0, wdata.get(), wlength,
- data.get(), length, NULL, NULL);
+ data.get(), length, nullptr, nullptr);
if (r > 0) {
decoded = std::string(data.get(), length);
success = true;
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx
index b7ea7d6..9e3fe7f 100644
--- a/Source/cmQtAutoGenGlobalInitializer.cxx
+++ b/Source/cmQtAutoGenGlobalInitializer.cxx
@@ -13,7 +13,6 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
-#include "cmPolicies.h"
#include "cmProcessOutput.h"
#include "cmQtAutoGen.h"
#include "cmQtAutoGenInitializer.h"
@@ -173,7 +172,6 @@ void cmQtAutoGenGlobalInitializer::GetOrCreateGlobalTarget(
// Create utility target
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetWorkingDirectory(makefile->GetHomeOutputDirectory().c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetComment(comment.c_str());
cmTarget* target = localGen->AddUtilityCommand(name, true, std::move(cc));
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 66e591e..410330a 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1238,7 +1238,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetDepends(uicDependencies);
cc->SetComment("");
cc->SetWorkingDirectory(this->Dir.Work.c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(stdPipesUTF8);
this->LocalGen->AddCustomCommandToOutput(std::move(cc));
@@ -1332,7 +1331,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetByproducts(timestampTargetProvides);
cc->SetDepends(dependencies);
cc->SetCommandLines(timestampTargetCommandLines);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cmTarget* timestampTarget = this->LocalGen->AddUtilityCommand(
timestampTargetName, true, std::move(cc));
@@ -1371,7 +1369,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetCommandLines(commandLines);
cc->SetComment(autogenComment.c_str());
cc->SetWorkingDirectory(this->Dir.Work.c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetDepfile(this->AutogenTarget.DepFile);
cc->SetStdPipesUTF8(stdPipesUTF8);
@@ -1391,7 +1388,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetByproducts(autogenByproducts);
cc->SetDepends(dependencies);
cc->SetCommandLines(commandLines);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetComment(autogenComment.c_str());
cmTarget* autogenTarget = this->LocalGen->AddUtilityCommand(
@@ -1472,7 +1468,6 @@ bool cmQtAutoGenInitializer::InitRccTargets()
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetWorkingDirectory(this->Dir.Work.c_str());
cc->SetCommandLines(commandLines);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetComment(ccComment.c_str());
cc->SetStdPipesUTF8(true);
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 0b29b0d..f34e35f 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -956,7 +956,7 @@ std::string cmSystemTools::GetRealPathResolvingWindowsSubst(
// uv_fs_realpath uses Windows Vista API so fallback to kwsys if not found
std::string resolved_path;
uv_fs_t req;
- int err = uv_fs_realpath(NULL, &req, path.c_str(), NULL);
+ int err = uv_fs_realpath(nullptr, &req, path.c_str(), nullptr);
if (!err) {
resolved_path = std::string((char*)req.ptr);
cmSystemTools::ConvertToUnixSlashes(resolved_path);
@@ -967,12 +967,12 @@ std::string cmSystemTools::GetRealPathResolvingWindowsSubst(
} else if (err == UV_ENOSYS) {
resolved_path = cmsys::SystemTools::GetRealPath(path, errorMessage);
} else if (errorMessage) {
- LPSTR message = NULL;
+ LPSTR message = nullptr;
DWORD size = FormatMessageA(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&message, 0,
- NULL);
+ nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&message,
+ 0, nullptr);
*errorMessage = std::string(message, size);
LocalFree(message);
@@ -1329,32 +1329,33 @@ std::string cmSystemTools::ComputeCertificateThumbprint(
std::string thumbprint;
CRYPT_INTEGER_BLOB cryptBlob;
- HCERTSTORE certStore = NULL;
- PCCERT_CONTEXT certContext = NULL;
+ HCERTSTORE certStore = nullptr;
+ PCCERT_CONTEXT certContext = nullptr;
HANDLE certFile = CreateFileW(
cmsys::Encoding::ToWide(source.c_str()).c_str(), GENERIC_READ,
- FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
- if (certFile != INVALID_HANDLE_VALUE && certFile != NULL) {
- DWORD fileSize = GetFileSize(certFile, NULL);
+ if (certFile != INVALID_HANDLE_VALUE && certFile != nullptr) {
+ DWORD fileSize = GetFileSize(certFile, nullptr);
if (fileSize != INVALID_FILE_SIZE) {
auto certData = cm::make_unique<BYTE[]>(fileSize);
- if (certData != NULL) {
+ if (certData != nullptr) {
DWORD dwRead = 0;
- if (ReadFile(certFile, certData.get(), fileSize, &dwRead, NULL)) {
+ if (ReadFile(certFile, certData.get(), fileSize, &dwRead, nullptr)) {
cryptBlob.cbData = fileSize;
cryptBlob.pbData = certData.get();
// Verify that this is a valid cert
if (PFXIsPFXBlob(&cryptBlob)) {
// Open the certificate as a store
- certStore = PFXImportCertStore(&cryptBlob, NULL, CRYPT_EXPORTABLE);
- if (certStore != NULL) {
+ certStore =
+ PFXImportCertStore(&cryptBlob, nullptr, CRYPT_EXPORTABLE);
+ if (certStore != nullptr) {
// There should only be 1 cert.
certContext =
CertEnumCertificatesInStore(certStore, certContext);
- if (certContext != NULL) {
+ if (certContext != nullptr) {
// The hash is 20 bytes
BYTE hashData[20];
DWORD hashLength = 20;
@@ -2375,22 +2376,22 @@ static void EnsureStdPipe(DWORD fd)
}
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof(sa);
- sa.lpSecurityDescriptor = NULL;
+ sa.lpSecurityDescriptor = nullptr;
sa.bInheritHandle = TRUE;
HANDLE h = CreateFileW(
L"NUL",
fd == STD_INPUT_HANDLE ? FILE_GENERIC_READ
: FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES,
- FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING, 0, NULL);
+ FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING, 0, nullptr);
if (h == INVALID_HANDLE_VALUE) {
- LPSTR message = NULL;
+ LPSTR message = nullptr;
DWORD size = FormatMessageA(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPSTR)&message, 0, NULL);
+ nullptr, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPSTR)&message, 0, nullptr);
std::string msg = std::string(message, size);
LocalFree(message);
std::cerr << "failed to open NUL for missing stdio pipe: " << msg;
@@ -2535,10 +2536,10 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
#if defined(_WIN32) && !defined(__CYGWIN__)
(void)argv0; // ignore this on windows
wchar_t modulepath[_MAX_PATH];
- ::GetModuleFileNameW(NULL, modulepath, sizeof(modulepath));
+ ::GetModuleFileNameW(nullptr, modulepath, sizeof(modulepath));
std::string path = cmsys::Encoding::ToNarrow(modulepath);
std::string realPath =
- cmSystemTools::GetRealPathResolvingWindowsSubst(path, NULL);
+ cmSystemTools::GetRealPathResolvingWindowsSubst(path, nullptr);
if (realPath.empty()) {
realPath = path;
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index debf593..91d5de6 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4,7 +4,6 @@
#include <algorithm>
#include <cassert>
-#include <initializer_list>
#include <iterator>
#include <map>
#include <set>
@@ -273,6 +272,346 @@ struct UsageRequirementProperty
std::vector<BT<std::string>> Entries;
};
+
+struct TargetProperty
+{
+ enum class InitCondition
+ {
+ // Always initialize the property.
+ Always,
+ // Never initialize the property.
+ Never,
+ // Only initialize if the target can compile sources.
+ CanCompileSources,
+ // Only apply to Xcode generators.
+ NeedsXcode,
+ // Only apply to Xcode generators on targets that can compile sources.
+ NeedsXcodeAndCanCompileSources,
+ // Needs to be a "normal" target (any non-global, non-utility target).
+ NormalTarget,
+ // Any non-imported target.
+ NonImportedTarget,
+ // Needs to be a "normal" target (any non-global, non-utility target) that
+ // is not `IMPORTED`.
+ NormalNonImportedTarget,
+ // Needs to be a "normal" target with an artifact (no `INTERFACE`
+ // libraries).
+ TargetWithArtifact,
+ // Needs to be a "normal" target with an artifact that is not an
+ // executable.
+ NonExecutableWithArtifact,
+ // Needs to be a linkable library target (no `OBJECT` or `MODULE`
+ // libraries).
+ LinkableLibraryTarget,
+ // Needs to be an executable.
+ ExecutableTarget,
+ // Needs to be a target with meaningful symbol exports (`SHARED` or
+ // `EXECUTABLE`).
+ TargetWithSymbolExports,
+ // Targets with "commands" associated with them. Basically everything
+ // except global and `INTERFACE` targets.
+ TargetWithCommands,
+ };
+
+ enum class Repetition
+ {
+ Once,
+ PerConfig,
+ PerConfigPrefix,
+ };
+
+ TargetProperty(cm::static_string_view name)
+ : Name(name)
+ {
+ }
+
+ TargetProperty(cm::static_string_view name, cm::static_string_view dflt,
+ InitCondition init)
+ : Name(name)
+ , Default(dflt)
+ , InitConditional(init)
+ {
+ }
+
+ TargetProperty(cm::static_string_view name, InitCondition init)
+ : Name(name)
+ , InitConditional(init)
+ {
+ }
+
+ TargetProperty(cm::static_string_view name, InitCondition init,
+ Repetition repeat)
+ : Name(name)
+ , InitConditional(init)
+ , Repeat(repeat)
+ {
+ }
+
+ cm::static_string_view const Name;
+ cm::optional<cm::static_string_view> const Default = {};
+ InitCondition const InitConditional = InitCondition::Always;
+ Repetition const Repeat = Repetition::Once;
+};
+
+#define IC TargetProperty::InitCondition
+#define R TargetProperty::Repetition
+
+/* clang-format off */
+#define COMMON_LANGUAGE_PROPERTIES(lang) \
+ { #lang "_COMPILER_LAUNCHER"_s, IC::CanCompileSources }, \
+ { #lang "_STANDARD"_s, IC::CanCompileSources }, \
+ { #lang "_STANDARD_REQUIRED"_s, IC::CanCompileSources }, \
+ { #lang "_EXTENSIONS"_s, IC::CanCompileSources }, \
+ { #lang "_VISIBILITY_PRESET"_s, IC::CanCompileSources }
+/* clang-format on */
+
+TargetProperty const StaticTargetProperties[] = {
+ /* clang-format off */
+ // Compilation properties
+ { "COMPILE_WARNING_AS_ERROR"_s, IC::CanCompileSources },
+ { "INTERPROCEDURAL_OPTIMIZATION"_s, IC::CanCompileSources },
+ { "INTERPROCEDURAL_OPTIMIZATION_"_s, IC::TargetWithArtifact, R::PerConfig },
+ { "NO_SYSTEM_FROM_IMPORTED"_s, IC::CanCompileSources },
+ // Set to `True` for `SHARED` and `MODULE` targets.
+ { "POSITION_INDEPENDENT_CODE"_s, IC::CanCompileSources },
+ { "VISIBILITY_INLINES_HIDDEN"_s, IC::CanCompileSources },
+ // -- Features
+ // ---- PCH
+ { "DISABLE_PRECOMPILE_HEADERS"_s, IC::CanCompileSources },
+ { "PCH_WARN_INVALID"_s, "ON"_s, IC::CanCompileSources },
+ { "PCH_INSTANTIATE_TEMPLATES"_s, "ON"_s, IC::CanCompileSources },
+ // -- Platforms
+ // ---- Android
+ { "ANDROID_API"_s, IC::CanCompileSources },
+ { "ANDROID_API_MIN"_s, IC::CanCompileSources },
+ { "ANDROID_ARCH"_s, IC::CanCompileSources },
+ { "ANDROID_ASSETS_DIRECTORIES"_s, IC::CanCompileSources },
+ { "ANDROID_JAVA_SOURCE_DIR"_s, IC::CanCompileSources },
+ { "ANDROID_STL_TYPE"_s, IC::CanCompileSources },
+ // ---- macOS
+ { "OSX_ARCHITECTURES"_s, IC::CanCompileSources },
+ // ---- Windows
+ { "MSVC_DEBUG_INFORMATION_FORMAT"_s, IC::CanCompileSources },
+ { "MSVC_RUNTIME_LIBRARY"_s, IC::CanCompileSources },
+ { "VS_JUST_MY_CODE_DEBUGGING"_s, IC::CanCompileSources },
+ // ---- OpenWatcom
+ { "WATCOM_RUNTIME_LIBRARY"_s, IC::CanCompileSources },
+ // -- Language
+ // ---- C
+ COMMON_LANGUAGE_PROPERTIES(C),
+ // ---- C++
+ COMMON_LANGUAGE_PROPERTIES(CXX),
+ // ---- CSharp
+ { "DOTNET_SDK"_s, IC::NonImportedTarget },
+ { "DOTNET_TARGET_FRAMEWORK"_s, IC::TargetWithCommands },
+ { "DOTNET_TARGET_FRAMEWORK_VERSION"_s, IC::TargetWithCommands },
+ // ---- CUDA
+ COMMON_LANGUAGE_PROPERTIES(CUDA),
+ { "CUDA_SEPARABLE_COMPILATION"_s, IC::CanCompileSources },
+ { "CUDA_ARCHITECTURES"_s, IC::CanCompileSources },
+ // ---- Fortran
+ { "Fortran_FORMAT"_s, IC::CanCompileSources },
+ { "Fortran_MODULE_DIRECTORY"_s, IC::CanCompileSources },
+ { "Fortran_COMPILER_LAUNCHER"_s, IC::CanCompileSources },
+ { "Fortran_PREPRPOCESS"_s, IC::CanCompileSources },
+ { "Fortran_VISIBILITY_PRESET"_s, IC::CanCompileSources },
+ // ---- HIP
+ COMMON_LANGUAGE_PROPERTIES(HIP),
+ { "HIP_ARCHITECTURES"_s, IC::CanCompileSources },
+ // ---- ISPC
+ { "ISPC_COMPILER_LAUNCHER"_s, IC::CanCompileSources },
+ { "ISPC_HEADER_DIRECTORY"_s, IC::CanCompileSources },
+ { "ISPC_HEADER_SUFFIX"_s, "_ispc.h"_s, IC::CanCompileSources },
+ { "ISPC_INSTRUCTION_SETS"_s, IC::CanCompileSources },
+ // ---- Objective C
+ COMMON_LANGUAGE_PROPERTIES(OBJC),
+ // ---- Objective C++
+ COMMON_LANGUAGE_PROPERTIES(OBJCXX),
+ // ---- Swift
+ { "Swift_LANGUAGE_VERSION"_s, IC::CanCompileSources },
+ { "Swift_MODULE_DIRECTORY"_s, IC::CanCompileSources },
+ // ---- moc
+ { "AUTOMOC"_s, IC::CanCompileSources },
+ { "AUTOMOC_COMPILER_PREDEFINES"_s, IC::CanCompileSources },
+ { "AUTOMOC_MACRO_NAMES"_s, IC::CanCompileSources },
+ { "AUTOMOC_MOC_OPTIONS"_s, IC::CanCompileSources },
+ { "AUTOMOC_PATH_PREFIX"_s, IC::CanCompileSources },
+ // ---- uic
+ { "AUTOUIC"_s, IC::CanCompileSources },
+ { "AUTOUIC_OPTIONS"_s, IC::CanCompileSources },
+ { "AUTOUIC_SEARCH_PATHS"_s, IC::CanCompileSources },
+ // ---- rcc
+ { "AUTORCC"_s, IC::CanCompileSources },
+ { "AUTORCC_OPTIONS"_s, IC::CanCompileSources },
+
+ // Linking properties
+ { "ENABLE_EXPORTS"_s, IC::ExecutableTarget },
+ { "LINK_LIBRARIES_ONLY_TARGETS"_s, IC::NormalNonImportedTarget },
+ { "LINK_SEARCH_START_STATIC"_s, IC::CanCompileSources },
+ { "LINK_SEARCH_END_STATIC"_s, IC::CanCompileSources },
+ // Initialize per-configuration name postfix property from the variable only
+ // for non-executable targets. This preserves compatibility with previous
+ // CMake versions in which executables did not support this variable.
+ // Projects may still specify the property directly.
+ { "_POSTFIX"_s, IC::NonExecutableWithArtifact, R::PerConfigPrefix },
+ // -- Dependent library lookup
+ { "MACOSX_RPATH"_s, IC::CanCompileSources },
+ // ---- Build
+ { "BUILD_RPATH"_s, IC::CanCompileSources },
+ { "BUILD_RPATH_USE_ORIGIN"_s, IC::CanCompileSources },
+ { "SKIP_BUILD_RPATH"_s, "OFF"_s, IC::CanCompileSources },
+ { "BUILD_WITH_INSTALL_RPATH"_s, "OFF"_s, IC::CanCompileSources },
+ { "BUILD_WITH_INSTALL_NAME_DIR"_s, IC::CanCompileSources },
+ // ---- Install
+ { "INSTALL_NAME_DIR"_s, IC::CanCompileSources },
+ { "INSTALL_REMOVE_ENVIRONMENT_RPATH"_s, IC::CanCompileSources },
+ { "INSTALL_RPATH"_s, ""_s, IC::CanCompileSources },
+ { "INSTALL_RPATH_USE_LINK_PATH"_s, "OFF"_s, IC::CanCompileSources },
+ // -- Platforms
+ // ---- AIX
+ { "AIX_EXPORT_ALL_SYMBOLS"_s, IC::TargetWithSymbolExports },
+ // ---- Android
+ { "ANDROID_GUI"_s, IC::ExecutableTarget },
+ { "ANDROID_JAR_DIRECTORIES"_s, IC::CanCompileSources },
+ { "ANDROID_JAR_DEPENDENCIES"_s, IC::CanCompileSources },
+ { "ANDROID_NATIVE_LIB_DIRECTORIES"_s, IC::CanCompileSources },
+ { "ANDROID_NATIVE_LIB_DEPENDENCIES"_s, IC::CanCompileSources },
+ { "ANDROID_PROGUARD"_s, IC::CanCompileSources },
+ { "ANDROID_PROGUARD_CONFIG_PATH"_s, IC::CanCompileSources },
+ { "ANDROID_SECURE_PROPS_PATH"_s, IC::CanCompileSources },
+ // ---- iOS
+ { "IOS_INSTALL_COMBINED"_s, IC::CanCompileSources },
+ // ---- macOS
+ { "FRAMEWORK_MULTI_CONFIG_POSTFIX_"_s, IC::LinkableLibraryTarget, R::PerConfig },
+ // ---- Windows
+ { "GNUtoMS"_s, IC::CanCompileSources },
+ { "WIN32_EXECUTABLE"_s, IC::CanCompileSources },
+ { "WINDOWS_EXPORT_ALL_SYMBOLS"_s, IC::TargetWithSymbolExports },
+ // -- Languages
+ // ---- C
+ { "C_LINKER_LAUNCHER"_s, IC::CanCompileSources },
+ // ---- C++
+ { "CXX_LINKER_LAUNCHER"_s, IC::CanCompileSources },
+ // ---- CUDA
+ { "CUDA_RESOLVE_DEVICE_SYMBOLS"_s, IC::CanCompileSources },
+ { "CUDA_RUNTIME_LIBRARY"_s, IC::CanCompileSources },
+ // ---- HIP
+ { "HIP_RUNTIME_LIBRARY"_s, IC::CanCompileSources },
+ // ---- Objective C
+ { "OBJC_LINKER_LAUNCHER"_s, IC::CanCompileSources },
+ // ---- Objective C++
+ { "OBJCXX_LINKER_LAUNCHER"_s, IC::CanCompileSources },
+
+ // Static analysis
+ // -- C
+ { "C_CLANG_TIDY"_s, IC::CanCompileSources },
+ { "C_CLANG_TIDY_EXPORT_FIXES_DIR"_s, IC::CanCompileSources },
+ { "C_CPPLINT"_s, IC::CanCompileSources },
+ { "C_CPPCHECK"_s, IC::CanCompileSources },
+ { "C_INCLUDE_WHAT_YOU_USE"_s, IC::CanCompileSources },
+ // -- C++
+ { "CXX_CLANG_TIDY"_s, IC::CanCompileSources },
+ { "CXX_CLANG_TIDY_EXPORT_FIXES_DIR"_s, IC::CanCompileSources },
+ { "CXX_CPPLINT"_s, IC::CanCompileSources },
+ { "CXX_CPPCHECK"_s, IC::CanCompileSources },
+ { "CXX_INCLUDE_WHAT_YOU_USE"_s, IC::CanCompileSources },
+ // -- Objective C
+ { "OBJC_CLANG_TIDY"_s, IC::CanCompileSources },
+ { "OBJC_CLANG_TIDY_EXPORT_FIXES_DIR"_s, IC::CanCompileSources },
+ // -- Objective C++
+ { "OBJCXX_CLANG_TIDY"_s, IC::CanCompileSources },
+ { "OBJCXX_CLANG_TIDY_EXPORT_FIXES_DIR"_s, IC::CanCompileSources },
+ // -- Linking
+ { "LINK_WHAT_YOU_USE"_s, IC::CanCompileSources },
+
+ // Build graph properties
+ { "LINK_DEPENDS_NO_SHARED"_s, IC::CanCompileSources },
+ { "UNITY_BUILD"_s, IC::CanCompileSources },
+ { "UNITY_BUILD_UNIQUE_ID"_s, IC::CanCompileSources },
+ { "UNITY_BUILD_BATCH_SIZE"_s, "8"_s, IC::CanCompileSources },
+ { "UNITY_BUILD_MODE"_s, "BATCH"_s, IC::CanCompileSources },
+ { "OPTIMIZE_DEPENDENCIES"_s, IC::CanCompileSources },
+ { "VERIFY_INTERFACE_HEADER_SETS"_s },
+ // -- Android
+ { "ANDROID_ANT_ADDITIONAL_OPTIONS"_s, IC::CanCompileSources },
+ { "ANDROID_PROCESS_MAX"_s, IC::CanCompileSources },
+ { "ANDROID_SKIP_ANT_STEP"_s, IC::CanCompileSources },
+ // -- Autogen
+ { "AUTOGEN_ORIGIN_DEPENDS"_s, IC::CanCompileSources },
+ { "AUTOGEN_PARALLEL"_s, IC::CanCompileSources },
+ // -- moc
+ { "AUTOMOC_DEPEND_FILTERS"_s, IC::CanCompileSources },
+ // -- C++
+ { "CXX_SCAN_FOR_MODULES"_s, IC::CanCompileSources },
+ // -- Ninja
+ { "JOB_POOL_COMPILE"_s, IC::CanCompileSources },
+ { "JOB_POOL_LINK"_s, IC::CanCompileSources },
+ { "JOB_POOL_PRECOMPILE_HEADER"_s, IC::CanCompileSources },
+ // -- Visual Studio
+ { "VS_NO_COMPILE_BATCHING"_s, IC::CanCompileSources },
+
+ // Output location properties
+ { "ARCHIVE_OUTPUT_DIRECTORY"_s, IC::CanCompileSources },
+ { "ARCHIVE_OUTPUT_DIRECTORY_"_s, IC::TargetWithArtifact, R::PerConfig },
+ { "COMPILE_PDB_OUTPUT_DIRECTORY"_s, IC::CanCompileSources },
+ { "COMPILE_PDB_OUTPUT_DIRECTORY_"_s, IC::TargetWithArtifact, R::PerConfig },
+ { "LIBRARY_OUTPUT_DIRECTORY"_s, IC::CanCompileSources },
+ { "LIBRARY_OUTPUT_DIRECTORY_"_s, IC::TargetWithArtifact, R::PerConfig },
+ { "PDB_OUTPUT_DIRECTORY"_s, IC::CanCompileSources },
+ { "PDB_OUTPUT_DIRECTORY_"_s, IC::TargetWithArtifact, R::PerConfig },
+ { "RUNTIME_OUTPUT_DIRECTORY"_s, IC::CanCompileSources },
+ { "RUNTIME_OUTPUT_DIRECTORY_"_s, IC::TargetWithArtifact, R::PerConfig },
+
+ // macOS bundle properties
+ { "FRAMEWORK"_s, IC::CanCompileSources },
+ { "FRAMEWORK_MULTI_CONFIG_POSTFIX"_s, IC::CanCompileSources },
+ { "MACOSX_BUNDLE"_s, IC::CanCompileSources },
+
+ // Usage requirement properties
+ { "LINK_INTERFACE_LIBRARIES"_s, IC::CanCompileSources },
+ { "MAP_IMPORTED_CONFIG_"_s, IC::NormalTarget, R::PerConfig },
+
+ // Metadata
+ { "CROSSCOMPILING_EMULATOR"_s, IC::ExecutableTarget },
+ { "EXPORT_COMPILE_COMMANDS"_s, IC::CanCompileSources },
+ { "FOLDER"_s },
+
+ // Xcode properties
+ { "XCODE_GENERATE_SCHEME"_s, IC::NeedsXcode },
+
+#ifdef __APPLE__
+ { "XCODE_SCHEME_ADDRESS_SANITIZER"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_THREAD_SANITIZER"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_THREAD_SANITIZER_STOP"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_LAUNCH_CONFIGURATION"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_ENABLE_GPU_API_VALIDATION"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_WORKING_DIRECTORY"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_MALLOC_SCRIBBLE"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_MALLOC_GUARD_EDGES"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_GUARD_MALLOC"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_LAUNCH_MODE"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_ZOMBIE_OBJECTS"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_MALLOC_STACK"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_SCHEME_ENVIRONMENT"_s, IC::NeedsXcodeAndCanCompileSources },
+ { "XCODE_LINK_BUILD_PHASE_MODE"_s, "NONE"_s, IC::NeedsXcodeAndCanCompileSources },
+#endif
+ /* clang-format on */
+};
+
+#undef COMMON_LANGUAGE_PROPERTIES
+#undef IC
+#undef R
+
}
class cmTargetInternals
@@ -290,10 +629,9 @@ public:
bool IsDLLPlatform;
bool IsAIX;
bool IsAndroid;
- bool IsImportedTarget;
- bool ImportedGloballyVisible;
bool BuildInterfaceIncludesAppended;
bool PerConfig;
+ cmTarget::Visibility TargetVisibility;
std::set<BT<std::pair<std::string, bool>>> Utilities;
std::vector<cmCustomCommand> PreBuildCommands;
std::vector<cmCustomCommand> PreLinkCommands;
@@ -328,6 +666,8 @@ public:
cmTargetInternals();
+ bool IsImported() const;
+
bool CheckImportedLibName(std::string const& prop,
std::string const& value) const;
@@ -562,15 +902,6 @@ std::pair<bool, cmValue> UsageRequirementProperty::Read(
return { did_read, value };
}
-namespace {
-#define SETUP_COMMON_LANGUAGE_PROPERTIES(lang) \
- initProp(#lang "_COMPILER_LAUNCHER"); \
- initProp(#lang "_STANDARD"); \
- initProp(#lang "_STANDARD_REQUIRED"); \
- initProp(#lang "_EXTENSIONS"); \
- initProp(#lang "_VISIBILITY_PRESET")
-}
-
cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
Visibility vis, cmMakefile* mf, PerConfig perConfig)
: impl(cm::make_unique<cmTargetInternals>())
@@ -584,9 +915,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->impl->IsDLLPlatform = false;
this->impl->IsAIX = false;
this->impl->IsAndroid = false;
- this->impl->IsImportedTarget =
- (vis == VisibilityImported || vis == VisibilityImportedGlobally);
- this->impl->ImportedGloballyVisible = vis == VisibilityImportedGlobally;
+ this->impl->TargetVisibility = vis;
this->impl->BuildInterfaceIncludesAppended = false;
this->impl->PerConfig = (perConfig == PerConfig::Yes);
@@ -606,302 +935,10 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->impl->IsAndroid = (this->impl->Makefile->GetSafeDefinition(
"CMAKE_SYSTEM_NAME") == "Android");
- std::string defKey;
- defKey.reserve(128);
- defKey += "CMAKE_";
- auto initProp = [this, mf, &defKey](const std::string& property) {
- // Replace everything after "CMAKE_"
- defKey.replace(defKey.begin() + 6, defKey.end(), property);
- if (cmValue value = mf->GetDefinition(defKey)) {
- this->SetProperty(property, value);
- }
- };
- auto initPropValue = [this, mf, &defKey](const std::string& property,
- const char* default_value) {
- // Replace everything after "CMAKE_"
- defKey.replace(defKey.begin() + 6, defKey.end(), property);
- if (cmValue value = mf->GetDefinition(defKey)) {
- this->SetProperty(property, value);
- } else if (default_value) {
- this->SetProperty(property, default_value);
- }
- };
-
- // Setup default property values.
- if (this->CanCompileSources()) {
-
- // Compilation properties
- initProp("INTERPROCEDURAL_OPTIMIZATION");
- // initProp("INTERPROCEDURAL_OPTIMIZATION_<CONFIG>"); (per-config block)
- initProp("NO_SYSTEM_FROM_IMPORTED");
- initProp("VISIBILITY_INLINES_HIDDEN");
- initProp("COMPILE_WARNING_AS_ERROR");
- // -- Features
- // ---- PCH
- initProp("DISABLE_PRECOMPILE_HEADERS");
- initPropValue("PCH_WARN_INVALID", "ON");
- initPropValue("PCH_INSTANTIATE_TEMPLATES", "ON");
- // -- Platforms
- // ---- Android
- initProp("ANDROID_API");
- initProp("ANDROID_API_MIN");
- initProp("ANDROID_ARCH");
- initProp("ANDROID_ASSETS_DIRECTORIES");
- initProp("ANDROID_JAVA_SOURCE_DIR");
- initProp("ANDROID_STL_TYPE");
- // ---- macOS
- initProp("OSX_ARCHITECTURES");
- // ---- Windows
- initProp("MSVC_DEBUG_INFORMATION_FORMAT");
- initProp("MSVC_RUNTIME_LIBRARY");
- initProp("VS_JUST_MY_CODE_DEBUGGING");
- // ---- OpenWatcom
- initProp("WATCOM_RUNTIME_LIBRARY");
- // -- Language
- // ---- C
- SETUP_COMMON_LANGUAGE_PROPERTIES(C);
- // ---- C++
- SETUP_COMMON_LANGUAGE_PROPERTIES(CXX);
- // ---- CUDA
- SETUP_COMMON_LANGUAGE_PROPERTIES(CUDA);
- initProp("CUDA_SEPARABLE_COMPILATION");
- initProp("CUDA_ARCHITECTURES");
- // ---- Fortran
- initProp("Fortran_FORMAT");
- initProp("Fortran_MODULE_DIRECTORY");
- initProp("Fortran_COMPILER_LAUNCHER");
- initProp("Fortran_PREPROCESS");
- initProp("Fortran_VISIBILITY_PRESET");
- // ---- HIP
- SETUP_COMMON_LANGUAGE_PROPERTIES(HIP);
- initProp("HIP_ARCHITECTURES");
- // ---- ISPC
- initProp("ISPC_COMPILER_LAUNCHER");
- initProp("ISPC_HEADER_DIRECTORY");
- initPropValue("ISPC_HEADER_SUFFIX", "_ispc.h");
- initProp("ISPC_INSTRUCTION_SETS");
- // ---- Objective C
- SETUP_COMMON_LANGUAGE_PROPERTIES(OBJC);
- // ---- Objective C++
- SETUP_COMMON_LANGUAGE_PROPERTIES(OBJCXX);
- // ---- Swift
- initProp("Swift_LANGUAGE_VERSION");
- initProp("Swift_MODULE_DIRECTORY");
- // ---- moc
- initProp("AUTOMOC");
- initProp("AUTOMOC_COMPILER_PREDEFINES");
- initProp("AUTOMOC_MACRO_NAMES");
- initProp("AUTOMOC_MOC_OPTIONS");
- initProp("AUTOMOC_PATH_PREFIX");
- // ---- uic
- initProp("AUTOUIC");
- initProp("AUTOUIC_OPTIONS");
- initProp("AUTOUIC_SEARCH_PATHS");
- // ---- rcc
- initProp("AUTORCC");
- initProp("AUTORCC_OPTIONS");
-
- // Linking properties
- initProp("LINK_SEARCH_START_STATIC");
- initProp("LINK_SEARCH_END_STATIC");
- // -- Dependent library lookup
- initProp("MACOSX_RPATH");
- // ---- Build
- initProp("BUILD_RPATH");
- initProp("BUILD_RPATH_USE_ORIGIN");
- initPropValue("SKIP_BUILD_RPATH", "OFF");
- initPropValue("BUILD_WITH_INSTALL_RPATH", "OFF");
- initProp("BUILD_WITH_INSTALL_NAME_DIR");
- // ---- Install
- initProp("INSTALL_NAME_DIR");
- initProp("INSTALL_REMOVE_ENVIRONMENT_RPATH");
- initPropValue("INSTALL_RPATH", "");
- initPropValue("INSTALL_RPATH_USE_LINK_PATH", "OFF");
- // -- Platforms
- // ---- Android
- initProp("ANDROID_JAR_DIRECTORIES");
- initProp("ANDROID_JAR_DEPENDENCIES");
- initProp("ANDROID_NATIVE_LIB_DIRECTORIES");
- initProp("ANDROID_NATIVE_LIB_DEPENDENCIES");
- initProp("ANDROID_PROGUARD");
- initProp("ANDROID_PROGUARD_CONFIG_PATH");
- initProp("ANDROID_SECURE_PROPS_PATH");
- // ---- iOS
- initProp("IOS_INSTALL_COMBINED");
- // ---- Windows
- initProp("GNUtoMS");
- initProp("WIN32_EXECUTABLE");
- // -- Languages
- // ---- C
- initProp("C_LINKER_LAUNCHER");
- // ---- C++
- initProp("CXX_LINKER_LAUNCHER");
- // ---- CUDA
- initProp("CUDA_RESOLVE_DEVICE_SYMBOLS");
- initProp("CUDA_RUNTIME_LIBRARY");
- // ---- HIP
- initProp("HIP_RUNTIME_LIBRARY");
- // ---- Objective C
- initProp("OBJC_LINKER_LAUNCHER");
- // ---- Objective C++
- initProp("OBJCXX_LINKER_LAUNCHER");
-
- // Static analysis
- // -- C
- initProp("C_CLANG_TIDY");
- initProp("C_CLANG_TIDY_EXPORT_FIXES_DIR");
- initProp("C_CPPLINT");
- initProp("C_CPPCHECK");
- initProp("C_INCLUDE_WHAT_YOU_USE");
- // -- C++
- initProp("CXX_CLANG_TIDY");
- initProp("CXX_CLANG_TIDY_EXPORT_FIXES_DIR");
- initProp("CXX_CPPLINT");
- initProp("CXX_CPPCHECK");
- initProp("CXX_INCLUDE_WHAT_YOU_USE");
- // -- Objective C
- initProp("OBJC_CLANG_TIDY");
- initProp("OBJC_CLANG_TIDY_EXPORT_FIXES_DIR");
- // -- Objective C++
- initProp("OBJCXX_CLANG_TIDY");
- initProp("OBJCXX_CLANG_TIDY_EXPORT_FIXES_DIR");
- // -- Linking
- initProp("LINK_WHAT_YOU_USE");
-
- // Build graph properties
- initProp("LINK_DEPENDS_NO_SHARED");
- initProp("UNITY_BUILD");
- initProp("UNITY_BUILD_UNIQUE_ID");
- initPropValue("UNITY_BUILD_BATCH_SIZE", "8");
- initPropValue("UNITY_BUILD_MODE", "BATCH");
- initProp("OPTIMIZE_DEPENDENCIES");
- // -- Android
- initProp("ANDROID_ANT_ADDITIONAL_OPTIONS");
- initProp("ANDROID_PROCESS_MAX");
- initProp("ANDROID_SKIP_ANT_STEP");
- // -- Autogen
- initProp("AUTOGEN_ORIGIN_DEPENDS");
- initProp("AUTOGEN_PARALLEL");
- // -- moc
- initProp("AUTOMOC_DEPEND_FILTERS");
- // -- C++
- initProp("CXX_SCAN_FOR_MODULES");
- // -- Ninja
- initProp("JOB_POOL_COMPILE");
- initProp("JOB_POOL_LINK");
- initProp("JOB_POOL_PRECOMPILE_HEADER");
- // -- Visual Studio
- initProp("VS_NO_COMPILE_BATCHING");
-
- // Output location properties
- initProp("ARCHIVE_OUTPUT_DIRECTORY");
- initProp("LIBRARY_OUTPUT_DIRECTORY");
- initProp("RUNTIME_OUTPUT_DIRECTORY");
- initProp("PDB_OUTPUT_DIRECTORY");
- initProp("COMPILE_PDB_OUTPUT_DIRECTORY");
-
- // -- macOS bundle properties
- initProp("FRAMEWORK");
- initProp("FRAMEWORK_MULTI_CONFIG_POSTFIX");
- initProp("MACOSX_BUNDLE");
-
- // Usage requirement properties
- initProp("LINK_INTERFACE_LIBRARIES");
-
- // Metadata
- initProp("EXPORT_COMPILE_COMMANDS");
-
-#ifdef __APPLE__
- if (this->GetGlobalGenerator()->IsXcode()) {
- initProp("XCODE_SCHEME_ADDRESS_SANITIZER");
- initProp("XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN");
- initProp("XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING");
- initProp("XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE");
- initProp("XCODE_SCHEME_THREAD_SANITIZER");
- initProp("XCODE_SCHEME_THREAD_SANITIZER_STOP");
- initProp("XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER");
- initProp("XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP");
- initProp("XCODE_SCHEME_LAUNCH_CONFIGURATION");
- initProp("XCODE_SCHEME_ENABLE_GPU_API_VALIDATION");
- initProp("XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION");
- initProp("XCODE_SCHEME_WORKING_DIRECTORY");
- initProp("XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER");
- initProp("XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP");
- initProp("XCODE_SCHEME_MALLOC_SCRIBBLE");
- initProp("XCODE_SCHEME_MALLOC_GUARD_EDGES");
- initProp("XCODE_SCHEME_GUARD_MALLOC");
- initProp("XCODE_SCHEME_LAUNCH_MODE");
- initProp("XCODE_SCHEME_ZOMBIE_OBJECTS");
- initProp("XCODE_SCHEME_MALLOC_STACK");
- initProp("XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE");
- initProp("XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS");
- initProp("XCODE_SCHEME_ENVIRONMENT");
- initPropValue("XCODE_LINK_BUILD_PHASE_MODE", "NONE");
- }
-#endif
- }
-
- initProp("FOLDER");
- initProp("VERIFY_INTERFACE_HEADER_SETS");
-
- if (this->GetGlobalGenerator()->IsXcode()) {
- initProp("XCODE_GENERATE_SCHEME");
- }
-
- // Setup per-configuration property default values.
- if (this->GetType() != cmStateEnums::UTILITY &&
- this->GetType() != cmStateEnums::GLOBAL_TARGET) {
- static const auto configProps = {
- /* clang-format needs this comment to break after the opening brace */
- "ARCHIVE_OUTPUT_DIRECTORY_"_s, "LIBRARY_OUTPUT_DIRECTORY_"_s,
- "RUNTIME_OUTPUT_DIRECTORY_"_s, "PDB_OUTPUT_DIRECTORY_"_s,
- "COMPILE_PDB_OUTPUT_DIRECTORY_"_s, "MAP_IMPORTED_CONFIG_"_s,
- "INTERPROCEDURAL_OPTIMIZATION_"_s
- };
- // Collect the set of configuration types.
- std::vector<std::string> configNames =
- mf->GetGeneratorConfigs(cmMakefile::ExcludeEmptyConfig);
- for (std::string const& configName : configNames) {
- std::string configUpper = cmSystemTools::UpperCase(configName);
- for (auto const& prop : configProps) {
- // Interface libraries have no output locations, so honor only
- // the configuration map.
- if (this->impl->TargetType == cmStateEnums::INTERFACE_LIBRARY &&
- prop != "MAP_IMPORTED_CONFIG_") {
- continue;
- }
- std::string property = cmStrCat(prop, configUpper);
- initProp(property);
- }
-
- // Initialize per-configuration name postfix property from the
- // variable only for non-executable targets. This preserves
- // compatibility with previous CMake versions in which executables
- // did not support this variable. Projects may still specify the
- // property directly.
- if (this->impl->TargetType != cmStateEnums::EXECUTABLE &&
- this->impl->TargetType != cmStateEnums::INTERFACE_LIBRARY) {
- std::string property =
- cmStrCat(cmSystemTools::UpperCase(configName), "_POSTFIX");
- initProp(property);
- }
-
- if (this->impl->TargetType == cmStateEnums::SHARED_LIBRARY ||
- this->impl->TargetType == cmStateEnums::STATIC_LIBRARY) {
- std::string property = cmStrCat("FRAMEWORK_MULTI_CONFIG_POSTFIX_",
- cmSystemTools::UpperCase(configName));
- initProp(property);
- }
- }
- if (!this->IsImported()) {
- initProp("LINK_LIBRARIES_ONLY_TARGETS");
- }
- }
-
// Save the backtrace of target construction.
this->impl->Backtrace = this->impl->Makefile->GetBacktrace();
- if (!this->IsImported()) {
+ if (this->IsNormal()) {
// Initialize the INCLUDE_DIRECTORIES property based on the current value
// of the same directory property:
this->impl->IncludeDirectories.CopyFromDirectory(
@@ -921,23 +958,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->impl->Makefile->GetLinkDirectoriesEntries());
}
- if (this->impl->TargetType == cmStateEnums::EXECUTABLE) {
- initProp("ANDROID_GUI");
- initProp("CROSSCOMPILING_EMULATOR");
- initProp("ENABLE_EXPORTS");
- }
- if (this->impl->TargetType == cmStateEnums::SHARED_LIBRARY ||
- this->impl->TargetType == cmStateEnums::MODULE_LIBRARY) {
- this->SetProperty("POSITION_INDEPENDENT_CODE", "True");
- } else if (this->CanCompileSources()) {
- initProp("POSITION_INDEPENDENT_CODE");
- }
- if (this->impl->TargetType == cmStateEnums::SHARED_LIBRARY ||
- this->impl->TargetType == cmStateEnums::EXECUTABLE) {
- initProp("AIX_EXPORT_ALL_SYMBOLS");
- initProp("WINDOWS_EXPORT_ALL_SYMBOLS");
- }
-
// Record current policies for later use.
this->impl->Makefile->RecordPolicies(this->impl->PolicyMap);
@@ -949,13 +969,105 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->impl->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW);
}
+ std::set<TargetProperty::InitCondition> metConditions;
+ metConditions.insert(TargetProperty::InitCondition::Always);
+ if (this->CanCompileSources()) {
+ metConditions.insert(TargetProperty::InitCondition::CanCompileSources);
+ }
+ if (this->GetGlobalGenerator()->IsXcode()) {
+ metConditions.insert(TargetProperty::InitCondition::NeedsXcode);
+ if (this->CanCompileSources()) {
+ metConditions.insert(
+ TargetProperty::InitCondition::NeedsXcodeAndCanCompileSources);
+ }
+ }
if (!this->IsImported()) {
- initProp("DOTNET_SDK");
+ metConditions.insert(TargetProperty::InitCondition::NonImportedTarget);
+ }
+ if (this->impl->TargetType != cmStateEnums::UTILITY &&
+ this->impl->TargetType != cmStateEnums::GLOBAL_TARGET) {
+ metConditions.insert(TargetProperty::InitCondition::NormalTarget);
+ if (this->IsNormal()) {
+ metConditions.insert(
+ TargetProperty::InitCondition::NormalNonImportedTarget);
+ }
+ if (this->impl->TargetType != cmStateEnums::INTERFACE_LIBRARY) {
+ metConditions.insert(TargetProperty::InitCondition::TargetWithArtifact);
+ if (this->impl->TargetType != cmStateEnums::EXECUTABLE) {
+ metConditions.insert(
+ TargetProperty::InitCondition::NonExecutableWithArtifact);
+ }
+ }
+ if (this->impl->TargetType == cmStateEnums::SHARED_LIBRARY ||
+ this->impl->TargetType == cmStateEnums::STATIC_LIBRARY) {
+ metConditions.insert(
+ TargetProperty::InitCondition::LinkableLibraryTarget);
+ }
+ }
+ if (this->impl->TargetType == cmStateEnums::EXECUTABLE) {
+ metConditions.insert(TargetProperty::InitCondition::ExecutableTarget);
+ }
+ if (this->impl->TargetType == cmStateEnums::SHARED_LIBRARY ||
+ this->impl->TargetType == cmStateEnums::EXECUTABLE) {
+ metConditions.insert(
+ TargetProperty::InitCondition::TargetWithSymbolExports);
}
-
if (this->impl->TargetType <= cmStateEnums::GLOBAL_TARGET) {
- initProp("DOTNET_TARGET_FRAMEWORK");
- initProp("DOTNET_TARGET_FRAMEWORK_VERSION");
+ metConditions.insert(TargetProperty::InitCondition::TargetWithCommands);
+ }
+
+ std::vector<std::string> configNames =
+ mf->GetGeneratorConfigs(cmMakefile::ExcludeEmptyConfig);
+ for (auto& config : configNames) {
+ config = cmSystemTools::UpperCase(config);
+ }
+
+ std::string defKey;
+ defKey.reserve(128);
+ defKey += "CMAKE_";
+ auto initProperty = [this, mf, &defKey](const std::string& property,
+ const char* default_value) {
+ // Replace everything after "CMAKE_"
+ defKey.replace(defKey.begin() + 6, defKey.end(), property);
+ if (cmValue value = mf->GetDefinition(defKey)) {
+ this->SetProperty(property, value);
+ } else if (default_value) {
+ this->SetProperty(property, default_value);
+ }
+ };
+
+ std::string dflt_storage;
+ for (auto const& tp : StaticTargetProperties) {
+ // Ignore properties that we have not met the condition for.
+ if (!metConditions.count(tp.InitConditional)) {
+ continue;
+ }
+
+ const char* dflt = nullptr;
+ if (tp.Default) {
+ dflt_storage = std::string(*tp.Default);
+ dflt = dflt_storage.c_str();
+ }
+
+ if (tp.Repeat == TargetProperty::Repetition::Once) {
+ initProperty(std::string(tp.Name), dflt);
+ } else {
+ std::string propertyName;
+ for (auto const& configName : configNames) {
+ if (tp.Repeat == TargetProperty::Repetition::PerConfig) {
+ propertyName = cmStrCat(tp.Name, configName);
+ } else if (tp.Repeat == TargetProperty::Repetition::PerConfigPrefix) {
+ propertyName = cmStrCat(configName, tp.Name);
+ }
+ initProperty(propertyName, dflt);
+ }
+ }
+ }
+
+ // Clean up some property defaults.
+ if (this->impl->TargetType == cmStateEnums::SHARED_LIBRARY ||
+ this->impl->TargetType == cmStateEnums::MODULE_LIBRARY) {
+ this->SetProperty("POSITION_INDEPENDENT_CODE", "True");
}
// check for "CMAKE_VS_GLOBALS" variable and set up target properties
@@ -972,13 +1084,13 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
if (assignment != std::string::npos) {
const std::string propName = vsGlobal + i.substr(0, assignment);
const std::string propValue = i.substr(assignment + 1);
- initPropValue(propName, propValue.c_str());
+ initProperty(propName, propValue.c_str());
}
}
}
}
- if (this->IsImported() || mf->GetPropertyAsBool("SYSTEM")) {
+ if (!this->IsNormal() || mf->GetPropertyAsBool("SYSTEM")) {
this->SetProperty("SYSTEM", "ON");
}
@@ -1750,8 +1862,8 @@ void cmTarget::StoreProperty(const std::string& prop, ValueType value)
return;
}
/* no need to change anything if value does not change */
- if (!this->impl->ImportedGloballyVisible) {
- this->impl->ImportedGloballyVisible = true;
+ if (!this->IsImportedGloballyVisible()) {
+ this->impl->TargetVisibility = Visibility::ImportedGlobally;
this->GetGlobalGenerator()->IndexTarget(this);
}
} else if (cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME") &&
@@ -2442,14 +2554,65 @@ bool cmTarget::IsAIX() const
return this->impl->IsAIX;
}
+bool cmTarget::IsNormal() const
+{
+ switch (this->impl->TargetVisibility) {
+ case Visibility::Normal:
+ return true;
+ case Visibility::Generated:
+ case Visibility::Imported:
+ case Visibility::ImportedGlobally:
+ return false;
+ }
+ assert(false && "unknown visibility (IsNormal)");
+ return false;
+}
+
+bool cmTarget::IsSynthetic() const
+{
+ switch (this->impl->TargetVisibility) {
+ case Visibility::Generated:
+ return true;
+ case Visibility::Normal:
+ case Visibility::Imported:
+ case Visibility::ImportedGlobally:
+ return false;
+ }
+ assert(false && "unknown visibility (IsSynthetic)");
+ return false;
+}
+
+bool cmTargetInternals::IsImported() const
+{
+ switch (this->TargetVisibility) {
+ case cmTarget::Visibility::Imported:
+ case cmTarget::Visibility::ImportedGlobally:
+ return true;
+ case cmTarget::Visibility::Normal:
+ case cmTarget::Visibility::Generated:
+ return false;
+ }
+ assert(false && "unknown visibility (IsImported)");
+ return false;
+}
+
bool cmTarget::IsImported() const
{
- return this->impl->IsImportedTarget;
+ return this->impl->IsImported();
}
bool cmTarget::IsImportedGloballyVisible() const
{
- return this->impl->ImportedGloballyVisible;
+ switch (this->impl->TargetVisibility) {
+ case Visibility::ImportedGlobally:
+ return true;
+ case Visibility::Normal:
+ case Visibility::Generated:
+ case Visibility::Imported:
+ return false;
+ }
+ assert(false && "unknown visibility (IsImportedGloballyVisible)");
+ return false;
}
bool cmTarget::IsPerConfig() const
@@ -2745,7 +2908,7 @@ bool cmTargetInternals::CheckImportedLibName(std::string const& prop,
std::string const& value) const
{
if (this->TargetType != cmStateEnums::INTERFACE_LIBRARY ||
- !this->IsImportedTarget) {
+ !this->IsImported()) {
this->Makefile->IssueMessage(
MessageType::FATAL_ERROR,
prop +
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 38bd036..95539fa 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -46,11 +46,12 @@ class BTs;
class cmTarget
{
public:
- enum Visibility
+ enum class Visibility
{
- VisibilityNormal,
- VisibilityImported,
- VisibilityImportedGlobally
+ Normal,
+ Generated,
+ Imported,
+ ImportedGlobally,
};
enum class PerConfig
@@ -205,6 +206,8 @@ public:
//! Return whether or not we are targeting AIX.
bool IsAIX() const;
+ bool IsNormal() const;
+ bool IsSynthetic() const;
bool IsImported() const;
bool IsImportedGloballyVisible() const;
bool IsPerConfig() const;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index c88679c..ae0d255 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3108,6 +3108,17 @@ std::vector<std::string> cmVisualStudio10TargetGenerator::GetIncludes(
return includes;
}
+std::string cmVisualStudio10TargetGenerator::GetTargetOutputName() const
+{
+ std::string config;
+ if (!this->Configurations.empty()) {
+ config = this->Configurations[0];
+ }
+ const auto& nameComponents =
+ this->GeneratorTarget->GetFullNameComponents(config);
+ return nameComponents.prefix + nameComponents.base;
+}
+
bool cmVisualStudio10TargetGenerator::ComputeClOptions()
{
return std::all_of(
@@ -5057,8 +5068,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP80(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
@@ -5140,8 +5150,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP81(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
@@ -5203,8 +5212,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS80(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
@@ -5258,8 +5266,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS81(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
@@ -5318,8 +5325,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS10_0(Elem& e1)
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
ConvertToWindowsSlash(artifactDir);
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
- std::string targetNameXML =
- cmVS10EscapeXML(this->GeneratorTarget->GetName());
+ const std::string& targetNameXML = cmVS10EscapeXML(GetTargetOutputName());
cmGeneratedFileStream fout(manifestFile);
fout.SetCopyIfDifferent(true);
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index e00f692..97ae69f 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -117,6 +117,7 @@ private:
std::vector<std::string> GetIncludes(std::string const& config,
std::string const& lang) const;
+ std::string GetTargetOutputName() const;
bool ComputeClOptions();
bool ComputeClOptions(std::string const& configName);
diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx
index 2d2a377..12877b8 100644
--- a/Source/cm_codecvt.cxx
+++ b/Source/cm_codecvt.cxx
@@ -171,7 +171,7 @@ std::codecvt_base::result codecvt::Decode(mbstate_t& state, int size,
}
int tlen = WideCharToMultiByte(m_codepage, 0, wbuf, wlen, to_next,
- to_end - to_next, NULL, NULL);
+ to_end - to_next, nullptr, nullptr);
if (tlen <= 0) {
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
return std::codecvt_base::partial;
@@ -206,7 +206,7 @@ std::codecvt_base::result codecvt::DecodePartial(mbstate_t& state,
}
int tlen = WideCharToMultiByte(m_codepage, 0, wbuf, wlen, to_next,
- to_end - to_next, NULL, NULL);
+ to_end - to_next, nullptr, nullptr);
if (tlen <= 0) {
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
return std::codecvt_base::partial;
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 468ff73..dbf961d 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -964,7 +964,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
return true;
};
- auto ToolsetLamda = [&](std::string const& value, cmake* state) -> bool {
+ auto ToolsetLambda = [&](std::string const& value, cmake* state) -> bool {
if (haveToolset) {
cmSystemTools::Error("Multiple -T options not allowed");
return false;
@@ -1016,7 +1016,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
CommandArgument::RequiresSeparator::No, PlatformLambda },
CommandArgument{ "-T", "No toolset specified for -T",
CommandArgument::Values::One,
- CommandArgument::RequiresSeparator::No, ToolsetLamda },
+ CommandArgument::RequiresSeparator::No, ToolsetLambda },
CommandArgument{ "--toolchain", "No file specified for --toolchain",
CommandArgument::Values::One, IgnoreAndTrueLambda },
CommandArgument{ "--install-prefix",
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 21d0cc9..d57b78b 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -50,10 +50,10 @@
#endif
#include <array>
+#include <chrono>
#include <cstdio>
#include <cstdlib>
#include <cstring>
-#include <ctime>
#include <iostream>
#include <memory>
#include <sstream>
@@ -1104,27 +1104,13 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
if (args[1] == "time" && args.size() > 2) {
std::vector<std::string> command(args.begin() + 2, args.end());
- clock_t clock_start;
- clock_t clock_finish;
- time_t time_start;
- time_t time_finish;
-
- time(&time_start);
- clock_start = clock();
int ret = 0;
+ auto time_start = std::chrono::steady_clock::now();
cmSystemTools::RunSingleCommand(command, nullptr, nullptr, &ret);
+ auto time_finish = std::chrono::steady_clock::now();
- clock_finish = clock();
- time(&time_finish);
-
- double clocks_per_sec = static_cast<double>(CLOCKS_PER_SEC);
- std::cout << "Elapsed time: "
- << static_cast<long>(time_finish - time_start) << " s. (time)"
- << ", "
- << static_cast<double>(clock_finish - clock_start) /
- clocks_per_sec
- << " s. (clock)"
- << "\n";
+ std::chrono::duration<double> time_elapsed = time_finish - time_start;
+ std::cout << "Elapsed time (seconds): " << time_elapsed.count() << "\n";
return ret;
}
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index af02f7f..2defc6c 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -630,8 +630,8 @@ endif()
# Build a list of classes and headers we need to implement the
# selected components. Initialize with required components.
set(KWSYS_CLASSES)
-set(KWSYS_H_FILES Configure SharedForward)
-set(KWSYS_HXX_FILES Configure String)
+set(KWSYS_H_FILES Configure)
+set(KWSYS_HXX_FILES Configure)
# Add selected C++ classes.
set(cppclasses
@@ -1038,6 +1038,10 @@ if(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
set_property(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY CXX_INCLUDE_WHAT_YOU_USE "")
set_property(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY LABELS ${KWSYS_LABELS_EXE})
target_link_libraries(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_TARGET_LINK})
+ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if(_isMultiConfig)
+ set_property(TARGET ${KWSYS_NAMESPACE}TestsCxx APPEND PROPERTY COMPILE_DEFINITIONS BUILD_CONFIG="$<CONFIG>")
+ endif()
set(TEST_SYSTEMTOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(TEST_SYSTEMTOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
@@ -1118,16 +1122,6 @@ if(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
endif()
set_property(SOURCE testProcess.c PROPERTY COMPILE_FLAGS "${testProcess_COMPILE_FLAGS}")
- # Test SharedForward
- configure_file(${PROJECT_SOURCE_DIR}/testSharedForward.c.in
- ${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE)
- add_executable(${KWSYS_NAMESPACE}TestSharedForward
- ${PROJECT_BINARY_DIR}/testSharedForward.c)
- set_property(TARGET ${KWSYS_NAMESPACE}TestSharedForward PROPERTY LABELS ${KWSYS_LABELS_EXE})
- add_dependencies(${KWSYS_NAMESPACE}TestSharedForward ${KWSYS_TARGET_C_LINK})
- add_test(kwsys.testSharedForward ${EXEC_DIR}/${KWSYS_NAMESPACE}TestSharedForward 1)
- set_property(TEST kwsys.testSharedForward PROPERTY LABELS ${KWSYS_LABELS_TEST})
-
# Configure some test properties.
if(KWSYS_STANDALONE)
# We expect test to fail
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index ccd5f6d..50171dd 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/CommandLineArguments.cxx
@@ -4,20 +4,19 @@
#include KWSYS_HEADER(CommandLineArguments.hxx)
#include KWSYS_HEADER(Configure.hxx)
-#include KWSYS_HEADER(String.hxx)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "CommandLineArguments.hxx.in"
# include "Configure.hxx.in"
-# include "String.hxx.in"
#endif
#include <iostream>
#include <map>
#include <set>
#include <sstream>
+#include <string>
#include <vector>
#include <cstdio>
@@ -52,14 +51,14 @@ struct CommandLineArgumentsCallbackStructure
const char* Help;
};
-class CommandLineArgumentsVectorOfStrings : public std::vector<kwsys::String>
+class CommandLineArgumentsVectorOfStrings : public std::vector<std::string>
{
};
-class CommandLineArgumentsSetOfStrings : public std::set<kwsys::String>
+class CommandLineArgumentsSetOfStrings : public std::set<std::string>
{
};
class CommandLineArgumentsMapOfStrucs
- : public std::map<kwsys::String, CommandLineArgumentsCallbackStructure>
+ : public std::map<std::string, CommandLineArgumentsCallbackStructure>
{
};
@@ -70,7 +69,7 @@ public:
using VectorOfStrings = CommandLineArgumentsVectorOfStrings;
using CallbacksMap = CommandLineArgumentsMapOfStrucs;
- using String = kwsys::String;
+ using String = std::string;
using SetOfStrings = CommandLineArgumentsSetOfStrings;
VectorOfStrings Argv;
@@ -306,7 +305,7 @@ void CommandLineArguments::GetUnusedArguments(int* argc, char*** argv)
// Copy everything after the LastArgument, since that was not parsed.
for (cc = 0; cc < this->Internals->UnusedArguments.size(); cc++) {
- kwsys::String& str = this->Internals->UnusedArguments[cc];
+ std::string& str = this->Internals->UnusedArguments[cc];
args[cnt] = new char[str.size() + 1];
strcpy(args[cnt], str.c_str());
cnt++;
diff --git a/Source/kwsys/SharedForward.h.in b/Source/kwsys/SharedForward.h.in
deleted file mode 100644
index d6ae75c..0000000
--- a/Source/kwsys/SharedForward.h.in
+++ /dev/null
@@ -1,873 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
-#ifndef @KWSYS_NAMESPACE@_SharedForward_h
-# define @KWSYS_NAMESPACE@_SharedForward_h
-
-/*
- This header is used to create a forwarding executable sets up the
- shared library search path and replaces itself with a real
- executable. This is useful when creating installations on UNIX with
- shared libraries that will run from any install directory. Typical
- usage:
-
- #if defined(CMAKE_INTDIR)
- # define CONFIG_DIR_PRE CMAKE_INTDIR "/"
- # define CONFIG_DIR_POST "/" CMAKE_INTDIR
- #else
- # define CONFIG_DIR_PRE ""
- # define CONFIG_DIR_POST ""
- #endif
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD "/path/to/foo-build/bin"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD "." CONFIG_DIR_POST
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL "../lib/foo-1.2"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD CONFIG_DIR_PRE "foo-real"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL
- "../lib/foo-1.2/foo-real"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND "--command"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT "--print"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD "--ldd"
- #if defined(CMAKE_INTDIR)
- # define @KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME CMAKE_INTDIR
- #endif
- #include <@KWSYS_NAMESPACE@/SharedForward.h>
- int main(int argc, char** argv)
- {
- return @KWSYS_NAMESPACE@_shared_forward_to_real(argc, argv);
- }
-
- Specify search and executable paths relative to the forwarding
- executable location or as full paths. Include no trailing slash.
- In the case of a multi-configuration build, when CMAKE_INTDIR is
- defined, the DIR_BUILD setting should point at the directory above
- the executable (the one containing the per-configuration
- subdirectory specified by CMAKE_INTDIR). Then PATH_BUILD entries
- and EXE_BUILD should be specified relative to this location and use
- CMAKE_INTDIR as necessary. In the above example imagine appending
- the PATH_BUILD or EXE_BUILD setting to the DIR_BUILD setting. The
- result should form a valid path with per-configuration subdirectory.
-
- Additional paths may be specified in the PATH_BUILD and PATH_INSTALL
- variables by using comma-separated strings. For example:
-
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD \
- "." CONFIG_DIR_POST, "/path/to/bar-build" CONFIG_DIR_POST
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL \
- "../lib/foo-1.2", "../lib/bar-4.5"
-
- See the comments below for specific explanations of each macro.
-*/
-
-/* Disable -Wcast-qual warnings since they are too hard to fix in a
- cross-platform way. */
-# if defined(__clang__) && defined(__has_warning)
-# if __has_warning("-Wcast-qual")
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wcast-qual"
-# endif
-# endif
-
-/* Full path to the directory in which this executable is built. Do
- not include a trailing slash. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_DIR_BUILD)
-# define KWSYS_SHARED_FORWARD_DIR_BUILD \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD
-# endif
-
-/* Library search path for build tree. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_PATH_BUILD)
-# define KWSYS_SHARED_FORWARD_PATH_BUILD \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD
-# endif
-
-/* Library search path for install tree. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_PATH_INSTALL)
-# define KWSYS_SHARED_FORWARD_PATH_INSTALL \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL
-# endif
-
-/* The real executable to which to forward in the build tree. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_EXE_BUILD)
-# define KWSYS_SHARED_FORWARD_EXE_BUILD \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD
-# endif
-
-/* The real executable to which to forward in the install tree. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_EXE_INSTALL)
-# define KWSYS_SHARED_FORWARD_EXE_INSTALL \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL
-# endif
-
-/* The configuration name with which this executable was built (Debug/Release).
- */
-# if defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME)
-# define KWSYS_SHARED_FORWARD_CONFIG_NAME \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME
-# else
-# undef KWSYS_SHARED_FORWARD_CONFIG_NAME
-# endif
-
-/* Create command line option to replace executable. */
-# if defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND)
-# if !defined(KWSYS_SHARED_FORWARD_OPTION_COMMAND)
-# define KWSYS_SHARED_FORWARD_OPTION_COMMAND \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND
-# endif
-# else
-# undef KWSYS_SHARED_FORWARD_OPTION_COMMAND
-# endif
-
-/* Create command line option to print environment setting and exit. */
-# if defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT)
-# if !defined(KWSYS_SHARED_FORWARD_OPTION_PRINT)
-# define KWSYS_SHARED_FORWARD_OPTION_PRINT \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT
-# endif
-# else
-# undef KWSYS_SHARED_FORWARD_OPTION_PRINT
-# endif
-
-/* Create command line option to run ldd or equivalent. */
-# if defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD)
-# if !defined(KWSYS_SHARED_FORWARD_OPTION_LDD)
-# define KWSYS_SHARED_FORWARD_OPTION_LDD \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD
-# endif
-# else
-# undef KWSYS_SHARED_FORWARD_OPTION_LDD
-# endif
-
-/* Include needed system headers. */
-
-# include <errno.h>
-# include <limits.h>
-# include <stddef.h> /* size_t */
-# include <stdio.h>
-# include <stdlib.h>
-# include <string.h>
-
-# if defined(_WIN32) && !defined(__CYGWIN__)
-# include <windows.h>
-
-# include <io.h>
-# include <process.h>
-# define KWSYS_SHARED_FORWARD_ESCAPE_ARGV /* re-escape argv for execvp */
-# else
-# include <sys/stat.h>
-# include <unistd.h>
-# endif
-
-/* Configuration for this platform. */
-
-/* The path separator for this platform. */
-# if defined(_WIN32) && !defined(__CYGWIN__)
-# define KWSYS_SHARED_FORWARD_PATH_SEP ';'
-# define KWSYS_SHARED_FORWARD_PATH_SLASH '\\'
-# else
-# define KWSYS_SHARED_FORWARD_PATH_SEP ':'
-# define KWSYS_SHARED_FORWARD_PATH_SLASH '/'
-# endif
-static const char kwsys_shared_forward_path_sep[2] = {
- KWSYS_SHARED_FORWARD_PATH_SEP, 0
-};
-static const char kwsys_shared_forward_path_slash[2] = {
- KWSYS_SHARED_FORWARD_PATH_SLASH, 0
-};
-
-/* The maximum length of a file name. */
-# if defined(PATH_MAX)
-# define KWSYS_SHARED_FORWARD_MAXPATH PATH_MAX
-# elif defined(MAXPATHLEN)
-# define KWSYS_SHARED_FORWARD_MAXPATH MAXPATHLEN
-# else
-# define KWSYS_SHARED_FORWARD_MAXPATH 16384
-# endif
-
-/* Select the environment variable holding the shared library runtime
- search path for this platform and build configuration. Also select
- ldd command equivalent. */
-
-/* Linux */
-# if defined(__linux)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-
-/* FreeBSD */
-# elif defined(__FreeBSD__)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-
-/* OpenBSD */
-# elif defined(__OpenBSD__)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-
-/* OS X */
-# elif defined(__APPLE__)
-# define KWSYS_SHARED_FORWARD_LDD "otool", "-L"
-# define KWSYS_SHARED_FORWARD_LDD_N 2
-# define KWSYS_SHARED_FORWARD_LDPATH "DYLD_LIBRARY_PATH"
-
-/* AIX */
-# elif defined(_AIX)
-# define KWSYS_SHARED_FORWARD_LDD "dump", "-H"
-# define KWSYS_SHARED_FORWARD_LDD_N 2
-# define KWSYS_SHARED_FORWARD_LDPATH "LIBPATH"
-
-/* SUN */
-# elif defined(__sun)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# include <sys/isa_defs.h>
-# if defined(_ILP32)
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-# elif defined(_LP64)
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH_64"
-# endif
-
-/* HP-UX */
-# elif defined(__hpux)
-# define KWSYS_SHARED_FORWARD_LDD "chatr"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# if defined(__LP64__)
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-# else
-# define KWSYS_SHARED_FORWARD_LDPATH "SHLIB_PATH"
-# endif
-
-/* SGI MIPS */
-# elif defined(__sgi) && defined(_MIPS_SIM)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# if _MIPS_SIM == _ABIO32
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-# elif _MIPS_SIM == _ABIN32
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARYN32_PATH"
-# elif _MIPS_SIM == _ABI64
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY64_PATH"
-# endif
-
-/* Cygwin */
-# elif defined(__CYGWIN__)
-# define KWSYS_SHARED_FORWARD_LDD \
- "cygcheck" /* TODO: cygwin 1.7 has ldd \
- */
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "PATH"
-
-/* Windows */
-# elif defined(_WIN32)
-# define KWSYS_SHARED_FORWARD_LDPATH "PATH"
-
-/* Guess on this unknown system. */
-# else
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-# endif
-
-# ifdef KWSYS_SHARED_FORWARD_ESCAPE_ARGV
-typedef struct kwsys_sf_arg_info_s
-{
- const char* arg;
- int size;
- int quote;
-} kwsys_sf_arg_info;
-
-static kwsys_sf_arg_info kwsys_sf_get_arg_info(const char* in)
-{
- /* Initialize information. */
- kwsys_sf_arg_info info;
-
- /* String iterator. */
- const char* c;
-
- /* Keep track of how many backslashes have been encountered in a row. */
- int windows_backslashes = 0;
-
- /* Start with the length of the original argument, plus one for
- either a terminating null or a separating space. */
- info.arg = in;
- info.size = (int)strlen(in) + 1;
- info.quote = 0;
-
- /* Scan the string for characters that require escaping or quoting. */
- for (c = in; *c; ++c) {
- /* Check whether this character needs quotes. */
- if (strchr(" \t?'#&<>|^", *c)) {
- info.quote = 1;
- }
-
- /* On Windows only backslashes and double-quotes need escaping. */
- if (*c == '\\') {
- /* Found a backslash. It may need to be escaped later. */
- ++windows_backslashes;
- } else if (*c == '"') {
- /* Found a double-quote. We need to escape it and all
- immediately preceding backslashes. */
- info.size += windows_backslashes + 1;
- windows_backslashes = 0;
- } else {
- /* Found another character. This eliminates the possibility
- that any immediately preceding backslashes will be
- escaped. */
- windows_backslashes = 0;
- }
- }
-
- /* Check whether the argument needs surrounding quotes. */
- if (info.quote) {
- /* Surrounding quotes are needed. Allocate space for them. */
- info.size += 2;
-
- /* We must escape all ending backslashes when quoting on windows. */
- info.size += windows_backslashes;
- }
-
- return info;
-}
-
-static char* kwsys_sf_get_arg(kwsys_sf_arg_info info, char* out)
-{
- /* String iterator. */
- const char* c;
-
- /* Keep track of how many backslashes have been encountered in a row. */
- int windows_backslashes = 0;
-
- /* Whether the argument must be quoted. */
- if (info.quote) {
- /* Add the opening quote for this argument. */
- *out++ = '"';
- }
-
- /* Scan the string for characters that require escaping or quoting. */
- for (c = info.arg; *c; ++c) {
- /* On Windows only backslashes and double-quotes need escaping. */
- if (*c == '\\') {
- /* Found a backslash. It may need to be escaped later. */
- ++windows_backslashes;
- } else if (*c == '"') {
- /* Found a double-quote. Escape all immediately preceding
- backslashes. */
- while (windows_backslashes > 0) {
- --windows_backslashes;
- *out++ = '\\';
- }
-
- /* Add the backslash to escape the double-quote. */
- *out++ = '\\';
- } else {
- /* We encountered a normal character. This eliminates any
- escaping needed for preceding backslashes. */
- windows_backslashes = 0;
- }
-
- /* Store this character. */
- *out++ = *c;
- }
-
- if (info.quote) {
- /* Add enough backslashes to escape any trailing ones. */
- while (windows_backslashes > 0) {
- --windows_backslashes;
- *out++ = '\\';
- }
-
- /* Add the closing quote for this argument. */
- *out++ = '"';
- }
-
- /* Store a terminating null without incrementing. */
- *out = 0;
-
- return out;
-}
-# endif
-
-/* Function to convert a logical or relative path to a physical full path. */
-static int kwsys_shared_forward_realpath(const char* in_path, char* out_path)
-{
-# if defined(_WIN32) && !defined(__CYGWIN__)
- /* Implementation for Windows. */
- DWORD n =
- GetFullPathNameA(in_path, KWSYS_SHARED_FORWARD_MAXPATH, out_path, 0);
- return n > 0 && n <= KWSYS_SHARED_FORWARD_MAXPATH;
-# else
- /* Implementation for UNIX. */
- return realpath(in_path, out_path) != 0;
-# endif
-}
-
-static int kwsys_shared_forward_samepath(const char* file1, const char* file2)
-{
-# if defined(_WIN32)
- int result = 0;
- HANDLE h1 = CreateFileA(file1, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
- HANDLE h2 = CreateFileA(file2, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
- if (h1 != INVALID_HANDLE_VALUE && h2 != INVALID_HANDLE_VALUE) {
- BY_HANDLE_FILE_INFORMATION fi1;
- BY_HANDLE_FILE_INFORMATION fi2;
- GetFileInformationByHandle(h1, &fi1);
- GetFileInformationByHandle(h2, &fi2);
- result = (fi1.dwVolumeSerialNumber == fi2.dwVolumeSerialNumber &&
- fi1.nFileIndexHigh == fi2.nFileIndexHigh &&
- fi1.nFileIndexLow == fi2.nFileIndexLow);
- }
- CloseHandle(h1);
- CloseHandle(h2);
- return result;
-# else
- struct stat fs1, fs2;
- return (stat(file1, &fs1) == 0 && stat(file2, &fs2) == 0 &&
- memcmp(&fs2.st_dev, &fs1.st_dev, sizeof(fs1.st_dev)) == 0 &&
- memcmp(&fs2.st_ino, &fs1.st_ino, sizeof(fs1.st_ino)) == 0 &&
- fs2.st_size == fs1.st_size);
-# endif
-}
-
-/* Function to report a system error message. */
-static void kwsys_shared_forward_strerror(char* message)
-{
-# if defined(_WIN32) && !defined(__CYGWIN__)
- /* Implementation for Windows. */
- DWORD original = GetLastError();
- DWORD length =
- FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- 0, original, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- message, KWSYS_SHARED_FORWARD_MAXPATH, 0);
- if (length < 1 || length > KWSYS_SHARED_FORWARD_MAXPATH) {
- /* FormatMessage failed. Use a default message. */
- snprintf(message, KWSYS_SHARED_FORWARD_MAXPATH,
- "Error 0x%lX (FormatMessage failed with error 0x%lX)", original,
- GetLastError());
- }
-# else
- /* Implementation for UNIX. */
- strcpy(message, strerror(errno));
-# endif
-}
-
-/* Functions to execute a child process. */
-static void kwsys_shared_forward_execvp(const char* cmd,
- char const* const* argv)
-{
-# ifdef KWSYS_SHARED_FORWARD_ESCAPE_ARGV
- /* Count the number of arguments. */
- int argc = 0;
- {
- char const* const* argvc;
- for (argvc = argv; *argvc; ++argvc, ++argc) {
- }
- }
-
- /* Create the escaped arguments. */
- {
- char** nargv = (char**)malloc((argc + 1) * sizeof(char*));
- int i;
- for (i = 0; i < argc; ++i) {
- kwsys_sf_arg_info info = kwsys_sf_get_arg_info(argv[i]);
- nargv[i] = (char*)malloc(info.size);
- kwsys_sf_get_arg(info, nargv[i]);
- }
- nargv[argc] = 0;
-
- /* Replace the command line to be used. */
- argv = (char const* const*)nargv;
- }
-# endif
-
-/* Invoke the child process. */
-# if defined(_MSC_VER)
- _execvp(cmd, argv);
-# elif defined(__MINGW32__) && !defined(__MINGW64__)
- execvp(cmd, argv);
-# else
- execvp(cmd, (char* const*)argv);
-# endif
-}
-
-/* Function to get the directory containing the given file or directory. */
-static void kwsys_shared_forward_dirname(const char* begin, char* result)
-{
- /* Find the location of the last slash. */
- int last_slash_index = -1;
- const char* end = begin + strlen(begin);
- for (; begin <= end && last_slash_index < 0; --end) {
- if (*end == '/' || *end == '\\') {
- last_slash_index = (int)(end - begin);
- }
- }
-
- /* Handle each case of the index of the last slash. */
- if (last_slash_index < 0) {
- /* No slashes. */
- strcpy(result, ".");
- } else if (last_slash_index == 0) {
- /* Only one leading slash. */
- strcpy(result, kwsys_shared_forward_path_slash);
- }
-# if defined(_WIN32)
- else if (last_slash_index == 2 && begin[1] == ':') {
- /* Only one leading drive letter and slash. */
- strncpy(result, begin, (size_t)last_slash_index);
- result[last_slash_index] = KWSYS_SHARED_FORWARD_PATH_SLASH;
- result[last_slash_index + 1] = 0;
- }
-# endif
- else {
- /* A non-leading slash. */
- strncpy(result, begin, (size_t)last_slash_index);
- result[last_slash_index] = 0;
- }
-}
-
-/* Function to check if a file exists and is executable. */
-static int kwsys_shared_forward_is_executable(const char* f)
-{
-# if defined(_MSC_VER)
-# define KWSYS_SHARED_FORWARD_ACCESS _access
-# else
-# define KWSYS_SHARED_FORWARD_ACCESS access
-# endif
-# if defined(X_OK)
-# define KWSYS_SHARED_FORWARD_ACCESS_OK X_OK
-# else
-# define KWSYS_SHARED_FORWARD_ACCESS_OK 04
-# endif
- if (KWSYS_SHARED_FORWARD_ACCESS(f, KWSYS_SHARED_FORWARD_ACCESS_OK) == 0) {
- return 1;
- } else {
- return 0;
- }
-}
-
-/* Function to locate the executable currently running. */
-static int kwsys_shared_forward_self_path(const char* argv0, char* result)
-{
- /* Check whether argv0 has a slash. */
- int has_slash = 0;
- const char* p = argv0;
- for (; *p && !has_slash; ++p) {
- if (*p == '/' || *p == '\\') {
- has_slash = 1;
- }
- }
-
- if (has_slash) {
- /* There is a slash. Use the dirname of the given location. */
- kwsys_shared_forward_dirname(argv0, result);
- return 1;
- } else {
- /* There is no slash. Search the PATH for the executable. */
- const char* path = getenv("PATH");
- const char* begin = path;
- const char* end = begin + (begin ? strlen(begin) : 0);
- const char* first = begin;
- while (first != end) {
- /* Store the end of this path entry. */
- const char* last;
-
- /* Skip all path separators. */
- for (; *first && *first == KWSYS_SHARED_FORWARD_PATH_SEP; ++first)
- ;
-
- /* Find the next separator. */
- for (last = first; *last && *last != KWSYS_SHARED_FORWARD_PATH_SEP;
- ++last)
- ;
-
- /* If we got a non-empty directory, look for the executable there. */
- if (first < last) {
- /* Determine the length without trailing slash. */
- size_t length = (size_t)(last - first);
- if (*(last - 1) == '/' || *(last - 1) == '\\') {
- --length;
- }
-
- /* Construct the name of the executable in this location. */
- strncpy(result, first, length);
- result[length] = KWSYS_SHARED_FORWARD_PATH_SLASH;
- strcpy(result + (length) + 1, argv0);
-
- /* Check if it exists and is executable. */
- if (kwsys_shared_forward_is_executable(result)) {
- /* Found it. */
- result[length] = 0;
- return 1;
- }
- }
-
- /* Move to the next directory in the path. */
- first = last;
- }
- }
-
- /* We could not find the executable. */
- return 0;
-}
-
-/* Function to convert a specified path to a full path. If it is not
- already full, it is taken relative to the self path. */
-static int kwsys_shared_forward_fullpath(const char* self_path,
- const char* in_path, char* result,
- const char* desc)
-{
- /* Check the specified path type. */
- if (in_path[0] == '/') {
- /* Already a full path. */
- strcpy(result, in_path);
- }
-# if defined(_WIN32)
- else if (in_path[0] && in_path[1] == ':') {
- /* Already a full path. */
- strcpy(result, in_path);
- }
-# endif
- else {
- /* Relative to self path. */
- char temp_path[KWSYS_SHARED_FORWARD_MAXPATH];
- strcpy(temp_path, self_path);
- strcat(temp_path, kwsys_shared_forward_path_slash);
- strcat(temp_path, in_path);
- if (!kwsys_shared_forward_realpath(temp_path, result)) {
- if (desc) {
- char msgbuf[KWSYS_SHARED_FORWARD_MAXPATH];
- kwsys_shared_forward_strerror(msgbuf);
- fprintf(stderr, "Error converting %s \"%s\" to real path: %s\n", desc,
- temp_path, msgbuf);
- }
- return 0;
- }
- }
- return 1;
-}
-
-/* Function to compute the library search path and executable name
- based on the self path. */
-static int kwsys_shared_forward_get_settings(const char* self_path,
- char* ldpath, char* exe)
-{
- /* Possible search paths. */
- static const char* search_path_build[] = { KWSYS_SHARED_FORWARD_PATH_BUILD,
- 0 };
- static const char* search_path_install[] = {
- KWSYS_SHARED_FORWARD_PATH_INSTALL, 0
- };
-
- /* Chosen paths. */
- const char** search_path;
- const char* exe_path;
-
-/* Get the real name of the build and self paths. */
-# if defined(KWSYS_SHARED_FORWARD_CONFIG_NAME)
- char build_path[] =
- KWSYS_SHARED_FORWARD_DIR_BUILD "/" KWSYS_SHARED_FORWARD_CONFIG_NAME;
- char self_path_logical[KWSYS_SHARED_FORWARD_MAXPATH];
-# else
- char build_path[] = KWSYS_SHARED_FORWARD_DIR_BUILD;
- const char* self_path_logical = self_path;
-# endif
- char build_path_real[KWSYS_SHARED_FORWARD_MAXPATH];
- char self_path_real[KWSYS_SHARED_FORWARD_MAXPATH];
- if (!kwsys_shared_forward_realpath(self_path, self_path_real)) {
- char msgbuf[KWSYS_SHARED_FORWARD_MAXPATH];
- kwsys_shared_forward_strerror(msgbuf);
- fprintf(stderr, "Error converting self path \"%s\" to real path: %s\n",
- self_path, msgbuf);
- return 0;
- }
-
- /* Check whether we are running in the build tree or an install tree. */
- if (kwsys_shared_forward_realpath(build_path, build_path_real) &&
- kwsys_shared_forward_samepath(self_path_real, build_path_real)) {
- /* Running in build tree. Use the build path and exe. */
- search_path = search_path_build;
-# if defined(_WIN32)
- exe_path = KWSYS_SHARED_FORWARD_EXE_BUILD ".exe";
-# else
- exe_path = KWSYS_SHARED_FORWARD_EXE_BUILD;
-# endif
-
-# if defined(KWSYS_SHARED_FORWARD_CONFIG_NAME)
- /* Remove the configuration directory from self_path. */
- kwsys_shared_forward_dirname(self_path, self_path_logical);
-# endif
- } else {
- /* Running in install tree. Use the install path and exe. */
- search_path = search_path_install;
-# if defined(_WIN32)
- exe_path = KWSYS_SHARED_FORWARD_EXE_INSTALL ".exe";
-# else
- exe_path = KWSYS_SHARED_FORWARD_EXE_INSTALL;
-# endif
-
-# if defined(KWSYS_SHARED_FORWARD_CONFIG_NAME)
- /* Use the original self path directory. */
- strcpy(self_path_logical, self_path);
-# endif
- }
-
- /* Construct the runtime search path. */
- {
- const char** dir;
- for (dir = search_path; *dir; ++dir) {
- /* Add separator between path components. */
- if (dir != search_path) {
- strcat(ldpath, kwsys_shared_forward_path_sep);
- }
-
- /* Add this path component. */
- if (!kwsys_shared_forward_fullpath(self_path_logical, *dir,
- ldpath + strlen(ldpath),
- "runtime path entry")) {
- return 0;
- }
- }
- }
-
- /* Construct the executable location. */
- if (!kwsys_shared_forward_fullpath(self_path_logical, exe_path, exe,
- "executable file")) {
- return 0;
- }
- return 1;
-}
-
-/* Function to print why execution of a command line failed. */
-static void kwsys_shared_forward_print_failure(char const* const* argv)
-{
- char msg[KWSYS_SHARED_FORWARD_MAXPATH];
- char const* const* arg = argv;
- kwsys_shared_forward_strerror(msg);
- fprintf(stderr, "Error running");
- for (; *arg; ++arg) {
- fprintf(stderr, " \"%s\"", *arg);
- }
- fprintf(stderr, ": %s\n", msg);
-}
-
-/* Static storage space to store the updated environment variable. */
-static char kwsys_shared_forward_ldpath[65535] =
- KWSYS_SHARED_FORWARD_LDPATH "=";
-
-/* Main driver function to be called from main. */
-static int @KWSYS_NAMESPACE@_shared_forward_to_real(int argc, char** argv_in)
-{
- char const** argv = (char const**)argv_in;
- /* Get the directory containing this executable. */
- char self_path[KWSYS_SHARED_FORWARD_MAXPATH];
- if (kwsys_shared_forward_self_path(argv[0], self_path)) {
- /* Found this executable. Use it to get the library directory. */
- char exe[KWSYS_SHARED_FORWARD_MAXPATH];
- if (kwsys_shared_forward_get_settings(self_path,
- kwsys_shared_forward_ldpath, exe)) {
- /* Append the old runtime search path. */
- const char* old_ldpath = getenv(KWSYS_SHARED_FORWARD_LDPATH);
- if (old_ldpath) {
- strcat(kwsys_shared_forward_ldpath, kwsys_shared_forward_path_sep);
- strcat(kwsys_shared_forward_ldpath, old_ldpath);
- }
-
- /* Store the environment variable. */
- putenv(kwsys_shared_forward_ldpath);
-
-# if defined(KWSYS_SHARED_FORWARD_OPTION_COMMAND)
- /* Look for the command line replacement option. */
- if (argc > 1 &&
- strcmp(argv[1], KWSYS_SHARED_FORWARD_OPTION_COMMAND) == 0) {
- if (argc > 2) {
- /* Use the command line given. */
- strcpy(exe, argv[2]);
- argv += 2;
- argc -= 2;
- } else {
- /* The option was not given an executable. */
- fprintf(stderr,
- "Option " KWSYS_SHARED_FORWARD_OPTION_COMMAND
- " must be followed by a command line.\n");
- return 1;
- }
- }
-# endif
-
-# if defined(KWSYS_SHARED_FORWARD_OPTION_PRINT)
- /* Look for the print command line option. */
- if (argc > 1 &&
- strcmp(argv[1], KWSYS_SHARED_FORWARD_OPTION_PRINT) == 0) {
- fprintf(stdout, "%s\n", kwsys_shared_forward_ldpath);
- fprintf(stdout, "%s\n", exe);
- return 0;
- }
-# endif
-
-# if defined(KWSYS_SHARED_FORWARD_OPTION_LDD)
- /* Look for the ldd command line option. */
- if (argc > 1 && strcmp(argv[1], KWSYS_SHARED_FORWARD_OPTION_LDD) == 0) {
-# if defined(KWSYS_SHARED_FORWARD_LDD)
- /* Use the named ldd-like executable and arguments. */
- char const* ldd_argv[] = { KWSYS_SHARED_FORWARD_LDD, 0, 0 };
- ldd_argv[KWSYS_SHARED_FORWARD_LDD_N] = exe;
- kwsys_shared_forward_execvp(ldd_argv[0], ldd_argv);
-
- /* Report why execution failed. */
- kwsys_shared_forward_print_failure(ldd_argv);
- return 1;
-# else
- /* We have no ldd-like executable available on this platform. */
- fprintf(stderr, "No ldd-like tool is known to this executable.\n");
- return 1;
-# endif
- }
-# endif
-
- /* Replace this process with the real executable. */
- argv[0] = exe;
- kwsys_shared_forward_execvp(argv[0], argv);
-
- /* Report why execution failed. */
- kwsys_shared_forward_print_failure(argv);
- } else {
- /* Could not convert self path to the library directory. */
- }
- } else {
- /* Could not find this executable. */
- fprintf(stderr, "Error locating executable \"%s\".\n", argv[0]);
- }
-
- /* Avoid unused argument warning. */
- (void)argc;
-
- /* Exit with failure. */
- return 1;
-}
-
-/* Restore warning stack. */
-# if defined(__clang__) && defined(__has_warning)
-# if __has_warning("-Wcast-qual")
-# pragma clang diagnostic pop
-# endif
-# endif
-
-#else
-# error "@KWSYS_NAMESPACE@/SharedForward.h should be included only once."
-#endif
diff --git a/Source/kwsys/String.hxx.in b/Source/kwsys/String.hxx.in
deleted file mode 100644
index c36f4ce..0000000
--- a/Source/kwsys/String.hxx.in
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
-#ifndef @KWSYS_NAMESPACE@_String_hxx
-#define @KWSYS_NAMESPACE@_String_hxx
-
-#include <string>
-
-namespace @KWSYS_NAMESPACE@ {
-
-/** \class String
- * \brief Short-name version of the STL basic_string class template.
- *
- * The standard library "string" type is actually a typedef for
- * "basic_string<..long argument list..>". This string class is
- * simply a subclass of this type with the same interface so that the
- * name is shorter in debugging symbols and error messages.
- */
-class String : public std::string
-{
- /** The original string type. */
- typedef std::string stl_string;
-
-public:
- /** String member types. */
- typedef stl_string::value_type value_type;
- typedef stl_string::pointer pointer;
- typedef stl_string::reference reference;
- typedef stl_string::const_reference const_reference;
- typedef stl_string::size_type size_type;
- typedef stl_string::difference_type difference_type;
- typedef stl_string::iterator iterator;
- typedef stl_string::const_iterator const_iterator;
- typedef stl_string::reverse_iterator reverse_iterator;
- typedef stl_string::const_reverse_iterator const_reverse_iterator;
-
- /** String constructors. */
- String()
- : stl_string()
- {
- }
- String(const value_type* s)
- : stl_string(s)
- {
- }
- String(const value_type* s, size_type n)
- : stl_string(s, n)
- {
- }
- String(const stl_string& s, size_type pos = 0, size_type n = npos)
- : stl_string(s, pos, n)
- {
- }
-}; // End Class: String
-
-} // namespace @KWSYS_NAMESPACE@
-
-#endif
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index a3ab51a..6cdd5a3 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3418,9 +3418,7 @@ bool SystemTools::SplitProgramPath(const std::string& in_name,
}
bool SystemTools::FindProgramPath(const char* argv0, std::string& pathOut,
- std::string& errorMsg, const char* exeName,
- const char* buildDir,
- const char* installPrefix)
+ std::string& errorMsg)
{
std::vector<std::string> failures;
std::string self = argv0 ? argv0 : "";
@@ -3428,34 +3426,9 @@ bool SystemTools::FindProgramPath(const char* argv0, std::string& pathOut,
SystemTools::ConvertToUnixSlashes(self);
self = SystemTools::FindProgram(self);
if (!SystemTools::FileIsExecutable(self)) {
- if (buildDir) {
- std::string intdir = ".";
-#ifdef CMAKE_INTDIR
- intdir = CMAKE_INTDIR;
-#endif
- self = buildDir;
- self += "/bin/";
- self += intdir;
- self += "/";
- self += exeName;
- self += SystemTools::GetExecutableExtension();
- }
- }
- if (installPrefix) {
- if (!SystemTools::FileIsExecutable(self)) {
- failures.push_back(self);
- self = installPrefix;
- self += "/bin/";
- self += exeName;
- }
- }
- if (!SystemTools::FileIsExecutable(self)) {
failures.push_back(self);
std::ostringstream msg;
msg << "Can not find the command line program ";
- if (exeName) {
- msg << exeName;
- }
msg << "\n";
if (argv0) {
msg << " argv[0] = \"" << argv0 << "\"\n";
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in
index 56b65fd..729928e 100644
--- a/Source/kwsys/SystemTools.hxx.in
+++ b/Source/kwsys/SystemTools.hxx.in
@@ -395,10 +395,7 @@ public:
* installPrefix is a possibly null pointer to the install directory.
*/
static bool FindProgramPath(const char* argv0, std::string& pathOut,
- std::string& errorMsg,
- const char* exeName = nullptr,
- const char* buildDir = nullptr,
- const char* installPrefix = nullptr);
+ std::string& errorMsg);
/**
* Given a path to a file or directory, convert it to a full path.
diff --git a/Source/kwsys/testDynamicLoader.cxx b/Source/kwsys/testDynamicLoader.cxx
index 806c01a..a5095a5 100644
--- a/Source/kwsys/testDynamicLoader.cxx
+++ b/Source/kwsys/testDynamicLoader.cxx
@@ -53,9 +53,9 @@ static std::string GetLibName(const char* lname, const char* subdir = nullptr)
slname += "/";
slname += subdir;
}
-#ifdef CMAKE_INTDIR
+#ifdef BUILD_CONFIG
slname += "/";
- slname += CMAKE_INTDIR;
+ slname += BUILD_CONFIG;
#endif
slname += "/";
slname += kwsys::DynamicLoader::LibPrefix();
diff --git a/Source/kwsys/testSharedForward.c.in b/Source/kwsys/testSharedForward.c.in
deleted file mode 100644
index e909458..0000000
--- a/Source/kwsys/testSharedForward.c.in
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
-#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
-/* NOLINTNEXTLINE(bugprone-reserved-identifier) */
-# define _XOPEN_SOURCE 600
-#endif
-#if defined(CMAKE_INTDIR)
-# define CONFIG_DIR_PRE CMAKE_INTDIR "/"
-# define CONFIG_DIR_POST "/" CMAKE_INTDIR
-#else
-# define CONFIG_DIR_PRE ""
-# define CONFIG_DIR_POST ""
-#endif
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD "@EXEC_DIR@"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD "." CONFIG_DIR_POST
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL 0
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD \
- CONFIG_DIR_PRE "@KWSYS_NAMESPACE@TestProcess"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL \
- "@KWSYS_NAMESPACE@TestProcess"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND "--command"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT "--print"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD "--ldd"
-#if defined(CMAKE_INTDIR)
-# define @KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME CMAKE_INTDIR
-#endif
-#include <@KWSYS_NAMESPACE@/SharedForward.h>
-int main(int argc, char** argv)
-{
- return @KWSYS_NAMESPACE@_shared_forward_to_real(argc, argv);
-}
diff --git a/Tests/CMakeLib/testVisualStudioSlnParser.cxx b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
index c1bf3d4..3485bac 100644
--- a/Tests/CMakeLib/testVisualStudioSlnParser.cxx
+++ b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
@@ -80,7 +80,6 @@ int testVisualStudioSlnParser(int, char*[])
"cmsysProcessFwd9x",
"cmsysTestDynload",
"cmsysTestProcess",
- "cmsysTestSharedForward",
"cmsysTestsC",
"cmsysTestsCxx",
"cmsys_c",
diff --git a/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file b/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file
index 395b953..1f148fc 100644
--- a/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file
+++ b/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file
@@ -21,7 +21,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxp
{29D5FCAF-20D0-4DEF-8529-F035C249E996} = {29D5FCAF-20D0-4DEF-8529-F035C249E996}
{A0421DCA-AC3E-42D0-94AC-379A21A1E591} = {A0421DCA-AC3E-42D0-94AC-379A21A1E591}
{C6AF7E57-CE57-4462-AE1D-BF520701480E} = {C6AF7E57-CE57-4462-AE1D-BF520701480E}
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7} = {F2CAAAB3-9568-4284-B8E3-13955183A6D7}
{D8294E4A-03C5-43D7-AE35-15603F502DC0} = {D8294E4A-03C5-43D7-AE35-15603F502DC0}
{A4921D15-411F-436A-B6F3-F8381652A8E1} = {A4921D15-411F-436A-B6F3-F8381652A8E1}
{60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C}
@@ -220,12 +219,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestProcess", "Source\
{60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestSharedForward", "Source\kwsys\cmsysTestSharedForward.vcxproj", "{F2CAAAB3-9568-4284-B8E3-13955183A6D7}"
- ProjectSection(ProjectDependencies) = postProject
- {90BC31D7-A3E8-4F04-8049-2236C239A044} = {90BC31D7-A3E8-4F04-8049-2236C239A044}
- {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestsC", "Source\kwsys\cmsysTestsC.vcxproj", "{D8294E4A-03C5-43D7-AE35-15603F502DC0}"
ProjectSection(ProjectDependencies) = postProject
{90BC31D7-A3E8-4F04-8049-2236C239A044} = {90BC31D7-A3E8-4F04-8049-2236C239A044}
@@ -528,14 +521,6 @@ Global
{C6AF7E57-CE57-4462-AE1D-BF520701480E}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{C6AF7E57-CE57-4462-AE1D-BF520701480E}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{C6AF7E57-CE57-4462-AE1D-BF520701480E}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Debug|x64.ActiveCfg = Debug|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Debug|x64.Build.0 = Debug|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Release|x64.ActiveCfg = Release|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Release|x64.Build.0 = Release|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{D8294E4A-03C5-43D7-AE35-15603F502DC0}.Debug|x64.ActiveCfg = Debug|x64
{D8294E4A-03C5-43D7-AE35-15603F502DC0}.Debug|x64.Build.0 = Debug|x64
{D8294E4A-03C5-43D7-AE35-15603F502DC0}.Release|x64.ActiveCfg = Release|x64
@@ -667,7 +652,6 @@ Global
{29D5FCAF-20D0-4DEF-8529-F035C249E996} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{A0421DCA-AC3E-42D0-94AC-379A21A1E591} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{C6AF7E57-CE57-4462-AE1D-BF520701480E} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{D8294E4A-03C5-43D7-AE35-15603F502DC0} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{A4921D15-411F-436A-B6F3-F8381652A8E1} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index c22f704..d913e93 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -40,10 +40,12 @@ set(ENV{HOME} \"${TEST_HOME}\")
endif()
# Suppress generator deprecation warnings in test suite.
-if(CMAKE_GENERATOR MATCHES "^Visual Studio 11 2012")
- set(TEST_WARN_VS11_CODE "set(ENV{CMAKE_WARN_VS11} OFF)")
+if(CMAKE_GENERATOR MATCHES "^Visual Studio 9 2008")
+ set(TEST_WARN_VS_CODE "set(ENV{CMAKE_WARN_VS9} OFF)")
+elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 11 2012")
+ set(TEST_WARN_VS_CODE "set(ENV{CMAKE_WARN_VS11} OFF)")
else()
- set(TEST_WARN_VS11_CODE "")
+ set(TEST_WARN_VS_CODE "")
endif()
# 3.9 or later provides a definitive answer to whether we are multi-config
@@ -744,36 +746,6 @@ if(BUILD_TESTING)
ADD_LINK_FLAGS_TEST(mod_flags_config dll_flags_config)
ADD_LINK_FLAGS_TEST(exe_flags_config mod_flags_config)
- # If we are running right now with a Unix Makefiles or Ninja based generator,
- # build the "Simple" test with the ExtraGenerators, if available
- # This doesn't test whether the generated project files work (unfortunately),
- # mainly it tests that cmake doesn't crash when generating these project files.
- if(CMAKE_GENERATOR MATCHES "^(Unix Makefiles|Ninja)$"
- AND NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
- foreach(
- extraGenerator
- IN ITEMS
- "CodeBlocks"
- "CodeLite"
- "Eclipse CDT4"
- "Kate"
- "Sublime Text 2"
- )
- string(REPLACE " " "" extraGeneratorTestName "Simple_${extraGenerator}Generator")
- add_test(${extraGeneratorTestName} ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/Simple"
- "${CMake_BINARY_DIR}/Tests/${extraGeneratorTestName}"
- --build-two-config
- --build-generator "${extraGenerator} - ${CMAKE_GENERATOR}"
- --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
- --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
- --build-project Simple
- --test-command Simple)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${extraGeneratorTestName}")
- endforeach()
- endif()
-
# test for correct sub-project generation
# not implemented in Xcode or Ninja
if(NOT CMAKE_GENERATOR MATCHES "Xcode|Ninja")
diff --git a/Tests/CMakeTests/EndStuffTestScript.cmake b/Tests/CMakeTests/EndStuffTestScript.cmake
index e0d826d..bd89246 100644
--- a/Tests/CMakeTests/EndStuffTestScript.cmake
+++ b/Tests/CMakeTests/EndStuffTestScript.cmake
@@ -22,7 +22,7 @@ elseif(testname STREQUAL bad_endfunction) # fail
do_end("endfunction()\n")
elseif(testname STREQUAL bad_endif) # fail
- do_end("cmake_minimum_required(VERSION 2.8.12)\nendif()\n")
+ do_end("cmake_minimum_required(VERSION 3.5)\nendif()\n")
elseif(testname STREQUAL endif_low_min_version) # fail
do_end("cmake_minimum_required(VERSION 1.2)\nendif()\n")
diff --git a/Tests/COnly/CMakeLists.txt b/Tests/COnly/CMakeLists.txt
index 1c24017..fcfce48 100644
--- a/Tests/COnly/CMakeLists.txt
+++ b/Tests/COnly/CMakeLists.txt
@@ -7,11 +7,5 @@ add_library(testc1 STATIC libc1.c)
add_library(testc2 SHARED libc2.c)
add_executable (COnly conly.c foo.c foo.h)
target_link_libraries(COnly testc1 testc2)
-if(MSVC_VERSION AND NOT CMAKE_C_COMPILER_ID STREQUAL Clang OR "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
- set_target_properties(COnly PROPERTIES
- LINK_FLAGS " /NODEFAULTLIB:\"libcdg.lib\" /NODEFAULTLIB:\"libcmtg.lib\" /NODEFAULTLIB:\"foomsvcrt.lib\" /NODEFAULTLIB:\"libbar.lib\" /NODEFAULTLIB:\"libfooba.lib\"")
-endif()
-string(ASCII 35 32 67 77 97 107 101 ASCII_STRING)
-message(STATUS "String: ${ASCII_STRING}")
add_library(testCModule MODULE testCModule.c)
diff --git a/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt b/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt
index ce6fac4..79e968a 100644
--- a/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt
+++ b/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(TestProject CXX)
diff --git a/Tests/CTestCoverageCollectGCOV/test.cmake.in b/Tests/CTestCoverageCollectGCOV/test.cmake.in
index 7c7a3e5..aaf3070 100644
--- a/Tests/CTestCoverageCollectGCOV/test.cmake.in
+++ b/Tests/CTestCoverageCollectGCOV/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestCoverageCollectGCOV/TestProject")
set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestCoverageCollectGCOV/TestProject")
set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
diff --git a/Tests/CTestTest2/test.cmake.in b/Tests/CTestTest2/test.cmake.in
index d5d4d2f..4f4f6cf 100644
--- a/Tests/CTestTest2/test.cmake.in
+++ b/Tests/CTestTest2/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestBadExe/test.cmake.in b/Tests/CTestTestBadExe/test.cmake.in
index dd180f0..e46f71b 100644
--- a/Tests/CTestTestBadExe/test.cmake.in
+++ b/Tests/CTestTestBadExe/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestBadGenerator/test.cmake.in b/Tests/CTestTestBadGenerator/test.cmake.in
index ae6d0b5..34003b4 100644
--- a/Tests/CTestTestBadGenerator/test.cmake.in
+++ b/Tests/CTestTestBadGenerator/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in
index 3bac0e0..916bbbb 100644
--- a/Tests/CTestTestChecksum/test.cmake.in
+++ b/Tests/CTestTestChecksum/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestCostSerial/test.cmake.in b/Tests/CTestTestCostSerial/test.cmake.in
index 1c46d4c..0df9f37 100644
--- a/Tests/CTestTestCostSerial/test.cmake.in
+++ b/Tests/CTestTestCostSerial/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestCrash/test.cmake.in b/Tests/CTestTestCrash/test.cmake.in
index 916d4e9..34c9f3e 100644
--- a/Tests/CTestTestCrash/test.cmake.in
+++ b/Tests/CTestTestCrash/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in
index 507d46b..78b0ebb 100644
--- a/Tests/CTestTestCycle/test.cmake.in
+++ b/Tests/CTestTestCycle/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in
index 11bc92a..ea01297 100644
--- a/Tests/CTestTestDepends/test.cmake.in
+++ b/Tests/CTestTestDepends/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in b/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in
index 8eb808f..3aed1ab 100644
--- a/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in
+++ b/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_RUN_CURRENT_SCRIPT 0)
diff --git a/Tests/CTestTestFdSetSize/test.cmake.in b/Tests/CTestTestFdSetSize/test.cmake.in
index bfe4459..73b2cfa 100644
--- a/Tests/CTestTestFdSetSize/test.cmake.in
+++ b/Tests/CTestTestFdSetSize/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.10)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestLaunchers/test.cmake.in b/Tests/CTestTestLaunchers/test.cmake.in
index 2db1ddd..c3edfd5 100644
--- a/Tests/CTestTestLaunchers/test.cmake.in
+++ b/Tests/CTestTestLaunchers/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
set(TEST_SUCCESS TRUE)
diff --git a/Tests/CTestTestParallel/test.cmake.in b/Tests/CTestTestParallel/test.cmake.in
index 517db72..d60d16f 100644
--- a/Tests/CTestTestParallel/test.cmake.in
+++ b/Tests/CTestTestParallel/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestResourceLock/test.cmake.in b/Tests/CTestTestResourceLock/test.cmake.in
index 826226d..dab26fc 100644
--- a/Tests/CTestTestResourceLock/test.cmake.in
+++ b/Tests/CTestTestResourceLock/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestScheduler/test.cmake.in b/Tests/CTestTestScheduler/test.cmake.in
index 5dcfb63..3b03a7c 100644
--- a/Tests/CTestTestScheduler/test.cmake.in
+++ b/Tests/CTestTestScheduler/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestSkipReturnCode/test.cmake.in b/Tests/CTestTestSkipReturnCode/test.cmake.in
index 2988d2f..b45e4a6 100644
--- a/Tests/CTestTestSkipReturnCode/test.cmake.in
+++ b/Tests/CTestTestSkipReturnCode/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestStopTime/GetDate.cmake b/Tests/CTestTestStopTime/GetDate.cmake
index 64a4fb9..f8e40fc 100644
--- a/Tests/CTestTestStopTime/GetDate.cmake
+++ b/Tests/CTestTestStopTime/GetDate.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.5)
macro(GET_DATE)
#
diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in
index 3797d40..2d69f1d 100644
--- a/Tests/CTestTestStopTime/test.cmake.in
+++ b/Tests/CTestTestStopTime/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestSubdir/test.cmake.in b/Tests/CTestTestSubdir/test.cmake.in
index 3b1fb5f..8b8d85e 100644
--- a/Tests/CTestTestSubdir/test.cmake.in
+++ b/Tests/CTestTestSubdir/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestTimeout/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in
index ce9c497..9d9e430 100644
--- a/Tests/CTestTestTimeout/test.cmake.in
+++ b/Tests/CTestTestTimeout/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestUpload/test.cmake.in b/Tests/CTestTestUpload/test.cmake.in
index 74fd1ec..db428e9 100644
--- a/Tests/CTestTestUpload/test.cmake.in
+++ b/Tests/CTestTestUpload/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestVerboseOutput/test.cmake.in b/Tests/CTestTestVerboseOutput/test.cmake.in
index 9c9a4dc..b47383a 100644
--- a/Tests/CTestTestVerboseOutput/test.cmake.in
+++ b/Tests/CTestTestVerboseOutput/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CTestTestZeroTimeout/test.cmake.in b/Tests/CTestTestZeroTimeout/test.cmake.in
index 50dbba0..e0dbbc6 100644
--- a/Tests/CTestTestZeroTimeout/test.cmake.in
+++ b/Tests/CTestTestZeroTimeout/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
diff --git a/Tests/CheckFortran.cmake b/Tests/CheckFortran.cmake
index 1e943a1..850406b 100644
--- a/Tests/CheckFortran.cmake
+++ b/Tests/CheckFortran.cmake
@@ -7,7 +7,7 @@ if(NOT DEFINED CMAKE_Fortran_COMPILER)
message(STATUS ${_desc})
file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran/CMakeLists.txt"
- "cmake_minimum_required(VERSION 2.8.12)
+ "cmake_minimum_required(VERSION 3.5)
project(CheckFortran Fortran)
file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
\"set(CMAKE_Fortran_COMPILER \\\"\${CMAKE_Fortran_COMPILER}\\\")\\n\"
diff --git a/Tests/CustomCommandByproducts/External/CMakeLists.txt b/Tests/CustomCommandByproducts/External/CMakeLists.txt
index feaa12e..81e072b 100644
--- a/Tests/CustomCommandByproducts/External/CMakeLists.txt
+++ b/Tests/CustomCommandByproducts/External/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(External C)
add_library(ExternalLibrary STATIC ExternalLibrary.c)
diff --git a/Tests/EnforceConfig.cmake.in b/Tests/EnforceConfig.cmake.in
index 7722d7d..61be40b 100644
--- a/Tests/EnforceConfig.cmake.in
+++ b/Tests/EnforceConfig.cmake.in
@@ -36,4 +36,4 @@ unset(ENV{CMAKE_GENERATOR_TOOLSET})
unset(ENV{CMAKE_EXPORT_COMPILE_COMMANDS})
@TEST_HOME_ENV_CODE@
-@TEST_WARN_VS11_CODE@
+@TEST_WARN_VS_CODE@
diff --git a/Tests/FindPatch/CMakeLists.txt b/Tests/FindPatch/CMakeLists.txt
index 541f5bd..65b778b 100644
--- a/Tests/FindPatch/CMakeLists.txt
+++ b/Tests/FindPatch/CMakeLists.txt
@@ -4,5 +4,6 @@ add_test(NAME FindPatch.Test COMMAND
"${CMake_SOURCE_DIR}/Tests/FindPatch/Test"
"${CMake_BINARY_DIR}/Tests/FindPatch/Test"
${build_generator_args}
+ --build-project TestFindPatch
--build-options ${build_options}
)
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 0fede25..30ab16b 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -49,7 +49,7 @@ function(test_fortran_c_interface_module)
FortranCInterface_VERIFY()
FortranCInterface_VERIFY(CXX)
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|PathScale|Absoft|Fujitsu")
+ if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|PathScale|Absoft|Fujitsu|LCC")
set(module_expected 1)
endif()
if(FortranCInterface_MODULE_FOUND OR module_expected)
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index fc71a18..d749fe1 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -152,13 +152,16 @@ if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON AND
set_property(SOURCE preprocess3.f PROPERTY Fortran_PREPROCESS ON)
endif()
-# Test that neither the compiler nor CMake performs unnecessary preprocessing.
-add_library(no_preprocess_target_lower STATIC no_preprocess_target_lower.f)
-target_compile_options(no_preprocess_target_lower PRIVATE -DINTEGER=nonsense)
-set_property(TARGET no_preprocess_target_lower PROPERTY Fortran_PREPROCESS OFF)
-add_library(no_preprocess_source_lower STATIC no_preprocess_source_lower.f)
-target_compile_options(no_preprocess_source_lower PRIVATE -DINTEGER=nonsense)
-set_property(SOURCE no_preprocess_source_lower.f PROPERTY Fortran_PREPROCESS OFF)
+# LCC < 1.24 has no way to disable Fortran preprocessor
+if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL "LCC" OR CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.24.00")
+ # Test that neither the compiler nor CMake performs unnecessary preprocessing.
+ add_library(no_preprocess_target_lower STATIC no_preprocess_target_lower.f)
+ target_compile_options(no_preprocess_target_lower PRIVATE -DINTEGER=nonsense)
+ set_property(TARGET no_preprocess_target_lower PROPERTY Fortran_PREPROCESS OFF)
+ add_library(no_preprocess_source_lower STATIC no_preprocess_source_lower.f)
+ target_compile_options(no_preprocess_source_lower PRIVATE -DINTEGER=nonsense)
+ set_property(SOURCE no_preprocess_source_lower.f PROPERTY Fortran_PREPROCESS OFF)
+endif()
# Test that we can explicitly not preprocess a target or source.
# This will not work on certain compilers due to either missing a
diff --git a/Tests/LinkFlags/CMakeLists.txt b/Tests/LinkFlags/CMakeLists.txt
index 31ff9b5..de853cf 100644
--- a/Tests/LinkFlags/CMakeLists.txt
+++ b/Tests/LinkFlags/CMakeLists.txt
@@ -32,6 +32,11 @@ add_executable(LinkFlags_exe_config LinkFlagsExe.c)
set_property(TARGET LinkFlags_exe_config PROPERTY LINK_FLAGS_${TEST_CONFIG_UPPER} ${pre}BADFLAG_${TEST_CONFIG}${obj})
add_executable(LinkFlags LinkFlags.c)
+if("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC")
+ set_property(TARGET LinkFlags PROPERTY
+ LINK_FLAGS "/NODEFAULTLIB:\"libcdg.lib\" /NODEFAULTLIB:\"libcmtg.lib\" /NODEFAULTLIB:\"foomsvcrt.lib\" /NODEFAULTLIB:\"libbar.lib\" /NODEFAULTLIB:\"libfooba.lib\""
+ )
+endif()
add_subdirectory(LinkerFlags)
add_subdirectory(LinkerFlagsConfig)
diff --git a/Tests/OutDir/CMakeLists.txt b/Tests/OutDir/CMakeLists.txt
index 8afe036..e7bc3ab 100644
--- a/Tests/OutDir/CMakeLists.txt
+++ b/Tests/OutDir/CMakeLists.txt
@@ -7,7 +7,7 @@ if(_isMultiConfig)
string(TOUPPER "${config}" CONFIG)
list(APPEND configs "${CONFIG}")
endforeach()
- set(CMAKE_BUILD_TYPE)
+ unset(CMAKE_BUILD_TYPE CACHE)
elseif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
diff --git a/Tests/RunCMake/AutoExportDll/CMakeLists.txt b/Tests/RunCMake/AutoExportDll/CMakeLists.txt
index 18dfd26..93ee9df 100644
--- a/Tests/RunCMake/AutoExportDll/CMakeLists.txt
+++ b/Tests/RunCMake/AutoExportDll/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/AutoExportDll/hello.cxx b/Tests/RunCMake/AutoExportDll/hello.cxx
index 74e7a4e..35ccbb7 100644
--- a/Tests/RunCMake/AutoExportDll/hello.cxx
+++ b/Tests/RunCMake/AutoExportDll/hello.cxx
@@ -12,3 +12,12 @@ void hello()
}
void Hello::operator delete[](void*){};
void Hello::operator delete(void*){};
+
+#ifdef HELLO_VFTABLE
+HelloVFTable::HelloVFTable()
+{
+}
+HelloVFTable::~HelloVFTable()
+{
+}
+#endif
diff --git a/Tests/RunCMake/AutoExportDll/hello.h b/Tests/RunCMake/AutoExportDll/hello.h
index 7192f65..410ffab 100644
--- a/Tests/RunCMake/AutoExportDll/hello.h
+++ b/Tests/RunCMake/AutoExportDll/hello.h
@@ -16,3 +16,20 @@ public:
static void operator delete[](void*);
static void operator delete(void*);
};
+
+// In the MSVC ABI, a delegating constructor references the vftable.
+#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
+# define HELLO_VFTABLE
+#endif
+#ifdef HELLO_VFTABLE
+class HelloVFTable
+{
+public:
+ HelloVFTable();
+ HelloVFTable(int)
+ : HelloVFTable()
+ {
+ }
+ virtual ~HelloVFTable();
+};
+#endif
diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx
index 8fc768a..a9459a9 100644
--- a/Tests/RunCMake/AutoExportDll/say.cxx
+++ b/Tests/RunCMake/AutoExportDll/say.cxx
@@ -53,5 +53,8 @@ int main()
#ifdef HAS_JUSTNOP
justnop();
#endif
+#ifdef HELLO_VFTABLE
+ HelloVFTable helloVFTable(1);
+#endif
return 0;
}
diff --git a/Tests/RunCMake/BuildDepends/CMakeLists.txt b/Tests/RunCMake/BuildDepends/CMakeLists.txt
index 99f238b..8eb5748 100644
--- a/Tests/RunCMake/BuildDepends/CMakeLists.txt
+++ b/Tests/RunCMake/BuildDepends/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/BundleUtilities/CMakeLists.txt b/Tests/RunCMake/BundleUtilities/CMakeLists.txt
index 6dd8cdf..44025d3 100644
--- a/Tests/RunCMake/BundleUtilities/CMakeLists.txt
+++ b/Tests/RunCMake/BundleUtilities/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
index df28102..a7b05d2 100644
--- a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.4)
include(RunCMake)
# TODO Migrate Tests/BundleUtilities here
diff --git a/Tests/RunCMake/Byproducts/CleanByproducts.cmake b/Tests/RunCMake/Byproducts/CleanByproducts.cmake
index 85d9582..961deb9 100644
--- a/Tests/RunCMake/Byproducts/CleanByproducts.cmake
+++ b/Tests/RunCMake/Byproducts/CleanByproducts.cmake
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.10)
-project(CleanByproducts)
+enable_language(C)
+enable_language(CXX)
# Configurable parameters
set(TEST_CLEAN_NO_CUSTOM FALSE CACHE BOOL "Value for the CLEAN_NO_CUSTOM PROPERTY")
diff --git a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake
index f42d8e4..3d861fb 100644
--- a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake
+++ b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 2.8.4)
-
cmake_policy(SET CMP0004 NEW)
add_library(foo SHARED empty.cpp)
diff --git a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake
index 3fa58b6..32c1474 100644
--- a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake
+++ b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 2.8.4)
-
cmake_policy(SET CMP0004 OLD)
add_library(foo SHARED empty.cpp)
diff --git a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
index 2970476..b7cd7ff 100644
--- a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
+++ b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 2.8.4)
-
cmake_policy(SET CMP0004 NEW)
add_library(foo SHARED empty.cpp)
diff --git a/Tests/RunCMake/CMP0004/CMakeLists.txt b/Tests/RunCMake/CMP0004/CMakeLists.txt
index 12cd3c7..93ee9df 100644
--- a/Tests/RunCMake/CMP0004/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0004/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
deleted file mode 100644
index 66a58fb..0000000
--- a/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^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 a446211..dc03414 100644
--- a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
+++ b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
@@ -1,13 +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.
-+
-CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
+^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.
+ 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
diff --git a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
index f7b9c0e..6eee437 100644
--- a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
@@ -1,11 +1,4 @@
-^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:
+^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
the cmake_policy command to set the policy and suppress this warning.
diff --git a/Tests/RunCMake/CMP0019/RunCMakeTest.cmake b/Tests/RunCMake/CMP0019/RunCMakeTest.cmake
index 119fc2b..fcd080f 100644
--- a/Tests/RunCMake/CMP0019/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0019/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0019-WARN)
run_cmake(CMP0019-OLD)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
deleted file mode 100644
index 66a58fb..0000000
--- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^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
deleted file mode 100644
index 66a58fb..0000000
--- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^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
deleted file mode 100644
index 66a58fb..0000000
--- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^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
deleted file mode 100644
index 66a58fb..0000000
--- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^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
deleted file mode 100644
index 66a58fb..0000000
--- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^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 87404d3..c84a289 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
@@ -1,11 +1,4 @@
-^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:
+^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-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
index 5d75720..39a9511 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
@@ -1,11 +1,4 @@
-^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:
+^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
deleted file mode 100644
index 66a58fb..0000000
--- a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-^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/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
index 4c10996..ea956fc 100644
--- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0022-WARN)
run_cmake(CMP0022-WARN-tll)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt
new file mode 100644
index 0000000..259eabd
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0026-IMPORTED.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0111 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/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
index 047da28..6476176 100644
--- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0026-WARN)
run_cmake(CMP0026-OLD)
diff --git a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake
index 5952279..558fba3 100644
--- a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
if(RunCMake_GENERATOR MATCHES "^Ninja")
# Detect ninja version so we know what tests can be supported.
diff --git a/Tests/RunCMake/CMP0038/RunCMakeTest.cmake b/Tests/RunCMake/CMP0038/RunCMakeTest.cmake
index fc3500a..3e7b5f3 100644
--- a/Tests/RunCMake/CMP0038/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0038/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0038-WARN)
run_cmake(CMP0038-NEW)
diff --git a/Tests/RunCMake/CMP0039/RunCMakeTest.cmake b/Tests/RunCMake/CMP0039/RunCMakeTest.cmake
index 58e8ea9..ce7541a 100644
--- a/Tests/RunCMake/CMP0039/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0039/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0039-WARN)
run_cmake(CMP0039-NEW)
diff --git a/Tests/RunCMake/CMP0040/RunCMakeTest.cmake b/Tests/RunCMake/CMP0040/RunCMakeTest.cmake
index 13160e3..e5e6c37 100644
--- a/Tests/RunCMake/CMP0040/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0040/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0040-OLD-missing-target)
run_cmake(CMP0040-NEW-missing-target)
diff --git a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
index f47bb2e..93378c2 100644
--- a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
# Protect tests from running inside the default install prefix.
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefaultPrefix")
diff --git a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake
index 3b226d7..6b23145 100644
--- a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0042-OLD)
run_cmake(CMP0042-NEW)
diff --git a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake
index 7f9572e..b940528 100644
--- a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
diff --git a/Tests/RunCMake/CMP0045/RunCMakeTest.cmake b/Tests/RunCMake/CMP0045/RunCMakeTest.cmake
index 7c0e8a2..009d455 100644
--- a/Tests/RunCMake/CMP0045/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0045/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0045-OLD)
run_cmake(CMP0045-NEW)
diff --git a/Tests/RunCMake/CMP0046/RunCMakeTest.cmake b/Tests/RunCMake/CMP0046/RunCMakeTest.cmake
index 0a39c76..86b749a 100644
--- a/Tests/RunCMake/CMP0046/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0046/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0046-OLD-missing-dependency)
run_cmake(CMP0046-NEW-missing-dependency)
diff --git a/Tests/RunCMake/CMP0049/RunCMakeTest.cmake b/Tests/RunCMake/CMP0049/RunCMakeTest.cmake
index a8aa9d9..e71f31e 100644
--- a/Tests/RunCMake/CMP0049/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0049/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0049-OLD)
run_cmake(CMP0049-NEW)
diff --git a/Tests/RunCMake/CMP0050/RunCMakeTest.cmake b/Tests/RunCMake/CMP0050/RunCMakeTest.cmake
index b7de284..526a9aa 100644
--- a/Tests/RunCMake/CMP0050/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0050/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0050-OLD)
run_cmake(CMP0050-NEW)
diff --git a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake
index 621192d..955d898 100644
--- a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0051-OLD)
run_cmake(CMP0051-NEW)
diff --git a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake
index 6521ac0..de58c25 100644
--- a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0053-OLD)
run_cmake(CMP0053-NEW)
diff --git a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake
index 2f2fb76..fc031de 100644
--- a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0054-OLD)
run_cmake(CMP0054-NEW)
diff --git a/Tests/RunCMake/CMP0055/RunCMakeTest.cmake b/Tests/RunCMake/CMP0055/RunCMakeTest.cmake
index efcfcab..33a5b4b 100644
--- a/Tests/RunCMake/CMP0055/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0055/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0055-OLD-Out-of-Scope)
run_cmake(CMP0055-NEW-Out-of-Scope)
diff --git a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake
index 719e054..76eaca6 100644
--- a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0057-OLD)
run_cmake(CMP0057-WARN)
diff --git a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt
index e2c280e..7230a07 100644
--- a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt
+++ b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt
@@ -12,5 +12,5 @@
will ask the linker to search for these by library name.
Call Stack \(most recent call first\):
CMP0060-WARN-ON.cmake:[0-9]+ \(include\)
- CMakeLists.txt:4 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/CMP0060/CMakeLists.txt b/Tests/RunCMake/CMP0060/CMakeLists.txt
index 291d34d..db6b701 100644
--- a/Tests/RunCMake/CMP0060/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0060/CMakeLists.txt
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.9)
-cmake_policy(VERSION 3.2)
+cmake_minimum_required(VERSION 3.2)
project(${RunCMake_TEST} C)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0060/RunCMakeTest.cmake b/Tests/RunCMake/CMP0060/RunCMakeTest.cmake
index 445156f..b7eae5a 100644
--- a/Tests/RunCMake/CMP0060/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0060/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
function(run_cmake_CMP0060 CASE)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0060-${CASE}-build)
diff --git a/Tests/RunCMake/CMP0064/RunCMakeTest.cmake b/Tests/RunCMake/CMP0064/RunCMakeTest.cmake
index 26e0a91..4c68510 100644
--- a/Tests/RunCMake/CMP0064/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0064/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0064-OLD)
run_cmake(CMP0064-WARN)
diff --git a/Tests/RunCMake/CMP0065/RunCMakeTest.cmake b/Tests/RunCMake/CMP0065/RunCMakeTest.cmake
index e86b50e..1ca4605 100644
--- a/Tests/RunCMake/CMP0065/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0065/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(OLDBad1)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "AIX")
diff --git a/Tests/RunCMake/CMP0081/CMakeLists.txt b/Tests/RunCMake/CMP0081/CMakeLists.txt
index ef2163c..44025d3 100644
--- a/Tests/RunCMake/CMP0081/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0081/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0102/CMakeLists.txt b/Tests/RunCMake/CMP0102/CMakeLists.txt
index ef2163c..2632ffa 100644
--- a/Tests/RunCMake/CMP0102/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0102/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0106/CMakeLists.txt b/Tests/RunCMake/CMP0106/CMakeLists.txt
index eafa642..0a96a26 100644
--- a/Tests/RunCMake/CMP0106/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0106/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.17)
if (RunCMake_TEST STREQUAL "CMP0106-WARN-VTK")
project(VTK NONE)
else ()
diff --git a/Tests/RunCMake/CMP0111/CMP0111-OLD-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-OLD-stderr.txt
new file mode 100644
index 0000000..bf7fb08
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0111-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0111 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/CMP0139/CMakeLists.txt b/Tests/RunCMake/CMP0139/CMakeLists.txt
index 18dfd26..5ff8d3e 100644
--- a/Tests/RunCMake/CMP0139/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0139/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.23)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 930122c..e372286 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -323,6 +323,10 @@ endif()
add_RunCMake_test(ExcludeFromAll)
add_RunCMake_test(ExportImport)
add_RunCMake_test(ExternalData)
+if(CMAKE_GENERATOR MATCHES "^(Unix Makefiles|Ninja)$"
+ AND NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+ add_RunCMake_test(ExtraGenerators)
+endif()
add_RunCMake_test(FeatureSummary)
add_RunCMake_test(FPHSA)
if(CMAKE_USE_SYSTEM_JSONCPP)
diff --git a/Tests/RunCMake/CPack/CMakeLists.txt b/Tests/RunCMake/CPack/CMakeLists.txt
index c81b34e..f210474 100644
--- a/Tests/RunCMake/CPack/CMakeLists.txt
+++ b/Tests/RunCMake/CPack/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
if(POLICY CMP0129)
cmake_policy(SET CMP0129 NEW)
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index ef4cf5e..ca02b76 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
include(RunCMake)
include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
diff --git a/Tests/RunCMake/CPackConfig/CMakeLists.txt b/Tests/RunCMake/CPackConfig/CMakeLists.txt
index 1e071ec..2b3e1f9 100644
--- a/Tests/RunCMake/CPackConfig/CMakeLists.txt
+++ b/Tests/RunCMake/CPackConfig/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt b/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt
index 89ff7c4..404e162 100644
--- a/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt
+++ b/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar
index c24af48..7cfcb36 100644
--- a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar
+++ b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar
Binary files differ
diff --git a/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt b/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt
+++ b/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt b/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt
+++ b/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CTest/CMakeLists.txt b/Tests/RunCMake/CTest/CMakeLists.txt
index f1a83e8..1319aec 100644
--- a/Tests/RunCMake/CTest/CMakeLists.txt
+++ b/Tests/RunCMake/CTest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
if(NOT NoProject)
project(${RunCMake_TEST} NONE)
endif()
diff --git a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt
+++ b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CTestCommandLine/test.cmake.in b/Tests/RunCMake/CTestCommandLine/test.cmake.in
index b82968a..11bede7 100644
--- a/Tests/RunCMake/CTestCommandLine/test.cmake.in
+++ b/Tests/RunCMake/CTestCommandLine/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in b/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in
index e9592f6..cfcf56d 100644
--- a/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in
+++ b/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TimeoutAfterMatch NONE)
include(CTest)
add_test(NAME SleepFor1Second COMMAND "${CMAKE_COMMAND}" -P ${CMAKE_SOURCE_DIR}/SleepFor1Second.cmake)
diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in b/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in
index d049c9f..172d2c6 100644
--- a/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in
+++ b/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
diff --git a/Tests/RunCMake/CacheNewline/CacheNewline.cmake b/Tests/RunCMake/CacheNewline/CacheNewline.cmake
index 81851db..418a847 100644
--- a/Tests/RunCMake/CacheNewline/CacheNewline.cmake
+++ b/Tests/RunCMake/CacheNewline/CacheNewline.cmake
@@ -1,5 +1 @@
-cmake_minimum_required(VERSION 3.5)
-
-project(CacheNewlineTest NONE)
-
set(NEWLINE_VARIABLE "a\nb" CACHE STRING "Offending entry")
diff --git a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt
index 4a13d29..9f18d8d 100644
--- a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt
+++ b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt
@@ -1,7 +1,5 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.9)
project(${RunCMake_TEST} NONE)
-cmake_policy(SET CMP0069 NEW)
-
include(CheckIPOSupported)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt
index 842c5cf..93ee9df 100644
--- a/Tests/RunCMake/CheckModules/CMakeLists.txt
+++ b/Tests/RunCMake/CheckModules/CMakeLists.txt
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
-cmake_policy(SET CMP0054 NEW)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CommandLine/CMakeLists.txt b/Tests/RunCMake/CommandLine/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/CommandLine/CMakeLists.txt
+++ b/Tests/RunCMake/CommandLine/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake
index e69de29..e69de29 100644
--- a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt
+++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt
new file mode 100644
index 0000000..c3329a0
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning:
+ The "Visual Studio 9 2008" generator is deprecated and will be removed in a
+ future version of CMake.
+
+ Add CMAKE_WARN_VS9=OFF to the cache to disable this warning.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake
diff --git a/Tests/RunCMake/CommandLine/E_time-stdout.txt b/Tests/RunCMake/CommandLine/E_time-stdout.txt
index a51446a..1a5e134 100644
--- a/Tests/RunCMake/CommandLine/E_time-stdout.txt
+++ b/Tests/RunCMake/CommandLine/E_time-stdout.txt
@@ -1,3 +1,3 @@
^hello world
-Elapsed time: [^
+Elapsed time \(seconds\): [^
]*$
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 943be24..205949b 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
include(RunCMake)
@@ -1101,6 +1101,13 @@ set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${P
run_cmake(ProfilingTest)
unset(RunCMake_TEST_OPTIONS)
+if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 2008")
+ run_cmake_with_options(DeprecateVS9-WARN-ON -DCMAKE_WARN_VS9=ON)
+ unset(ENV{CMAKE_WARN_VS9})
+ run_cmake(DeprecateVS9-WARN-ON)
+ run_cmake_with_options(DeprecateVS9-WARN-OFF -DCMAKE_WARN_VS9=OFF)
+endif()
+
if(RunCMake_GENERATOR MATCHES "^Visual Studio 11 2012")
run_cmake_with_options(DeprecateVS11-WARN-ON -DCMAKE_WARN_VS11=ON)
unset(ENV{CMAKE_WARN_VS11})
diff --git a/Tests/RunCMake/CommandLine/trace-expand-stderr.txt b/Tests/RunCMake/CommandLine/trace-expand-stderr.txt
index 4fee9bc..b900686 100644
--- a/Tests/RunCMake/CommandLine/trace-expand-stderr.txt
+++ b/Tests/RunCMake/CommandLine/trace-expand-stderr.txt
@@ -1,2 +1,2 @@
-^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \)
+^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \)
.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(trace-expand NONE \)
diff --git a/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt
index 74429b6..88aad00 100644
--- a/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt
+++ b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt
@@ -1,2 +1,2 @@
-^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \)
+^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \)
.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(trace-expand-warn-uninitialized NONE \)
diff --git a/Tests/RunCMake/CommandLine/trace-stderr.txt b/Tests/RunCMake/CommandLine/trace-stderr.txt
index 8e8ddfa..4bf3cff 100644
--- a/Tests/RunCMake/CommandLine/trace-stderr.txt
+++ b/Tests/RunCMake/CommandLine/trace-stderr.txt
@@ -1,2 +1,2 @@
-^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \)
+^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \)
.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(\${RunCMake_TEST} NONE \)
diff --git a/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake b/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake
index 982cb89..4107aa4 100644
--- a/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake
+++ b/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake
@@ -1,2 +1,2 @@
-cmake_minimum_required(VERSION 3.24)
-project(test C)
+cmake_policy(VERSION 3.24)
+enable_language(C)
diff --git a/Tests/RunCMake/CommandLine/trace-try_compile.cmake b/Tests/RunCMake/CommandLine/trace-try_compile.cmake
index 982cb89..4107aa4 100644
--- a/Tests/RunCMake/CommandLine/trace-try_compile.cmake
+++ b/Tests/RunCMake/CommandLine/trace-try_compile.cmake
@@ -1,2 +1,2 @@
-cmake_minimum_required(VERSION 3.24)
-project(test C)
+cmake_policy(VERSION 3.24)
+enable_language(C)
diff --git a/Tests/RunCMake/CommandLineTar/CMakeLists.txt b/Tests/RunCMake/CommandLineTar/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/CommandLineTar/CMakeLists.txt
+++ b/Tests/RunCMake/CommandLineTar/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
index ebab7a3..12a7fd4 100644
--- a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
+++ b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
index 64b52d9..60a4246 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -1,7 +1,4 @@
-
-cmake_minimum_required(VERSION 3.3)
-
-project(CompatibleInterface)
+enable_language(CXX)
include(GenerateExportHeader)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/Tests/RunCMake/CompileDefinitions/CMakeLists.txt b/Tests/RunCMake/CompileDefinitions/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/CompileDefinitions/CMakeLists.txt
+++ b/Tests/RunCMake/CompileDefinitions/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompileFeatures/CMakeLists.txt b/Tests/RunCMake/CompileFeatures/CMakeLists.txt
index 3482e6b..12a7fd4 100644
--- a/Tests/RunCMake/CompileFeatures/CMakeLists.txt
+++ b/Tests/RunCMake/CompileFeatures/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompilerArgs/CMakeLists.txt b/Tests/RunCMake/CompilerArgs/CMakeLists.txt
index 18dfd26..93ee9df 100644
--- a/Tests/RunCMake/CompilerArgs/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerArgs/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompilerChange/CMakeLists.txt b/Tests/RunCMake/CompilerChange/CMakeLists.txt
index 14c47ad..b41f3f3 100644
--- a/Tests/RunCMake/CompilerChange/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerChange/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
if(NOT RunCMake_TEST)
set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted
endif()
diff --git a/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt
index 3313e31..544b65f 100644
--- a/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.*
diff --git a/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt
index 3313e31..544b65f 100644
--- a/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.*
diff --git a/Tests/RunCMake/CompilerLauncher/CMakeLists.txt b/Tests/RunCMake/CompilerLauncher/CMakeLists.txt
index 18dfd26..93ee9df 100644
--- a/Tests/RunCMake/CompilerLauncher/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerLauncher/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt
index 3313e31..a6e8b0a 100644
--- a/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CUDA.*
diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt
index 3313e31..a6e8b0a 100644
--- a/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CUDA.*
diff --git a/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt
index 3313e31..082c7b5 100644
--- a/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.*
diff --git a/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt
index 3313e31..082c7b5 100644
--- a/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.*
diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt
index 3313e31..9f8c754 100644
--- a/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=Fortran.*
diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt
index 3313e31..9f8c754 100644
--- a/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=Fortran.*
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt
index 3313e31..354e317 100644
--- a/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=HIP.*
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt
deleted file mode 100644
index 3313e31..0000000
--- a/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt
new file mode 100644
index 0000000..354e317
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=HIP.*
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt
index 3313e31..6b71839 100644
--- a/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=ISPC.*
diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt
index 3313e31..6b71839 100644
--- a/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=ISPC.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt
index 3313e31..d2efd3d 100644
--- a/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt
deleted file mode 100644
index 3313e31..0000000
--- a/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt
new file mode 100644
index 0000000..d2efd3d
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt
index 3313e31..0082ab2 100644
--- a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt
+++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt
deleted file mode 100644
index 3313e31..0000000
--- a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-.*-E env USED_LAUNCHER=1.*
diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt
new file mode 100644
index 0000000..0082ab2
--- /dev/null
+++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt
@@ -0,0 +1 @@
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.*
diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
index e6a2605..b051a19 100644
--- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
@@ -18,7 +18,7 @@ endfunction()
function(run_compiler_launcher_env lang)
string(REGEX REPLACE "-.*" "" core_lang "${lang}")
# Use the noop genexp $<PATH:...> genexp to validate genexp support.
- set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1")
+ set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1;TARGET_NAME=$<TARGET_PROPERTY:NAME>;LANGUAGE=$<COMPILE_LANGUAGE>")
run_compiler_launcher(${lang})
unset(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER})
endfunction()
diff --git a/Tests/RunCMake/Configure/CMakeLists.txt b/Tests/RunCMake/Configure/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/Configure/CMakeLists.txt
+++ b/Tests/RunCMake/Configure/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt b/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt
index 2d75985..12a7fd4 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt
+++ b/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
index 208ea20..f3974ea 100644
--- a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
+++ b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
foreach(p
CMP0029
diff --git a/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt
+++ b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalData/CMakeLists.txt b/Tests/RunCMake/ExternalData/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/ExternalData/CMakeLists.txt
+++ b/Tests/RunCMake/ExternalData/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies-stderr.txt
new file mode 100644
index 0000000..650be64
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies-stderr.txt
@@ -0,0 +1,10 @@
+^(CMake Deprecation Warning at Add_StepDependencies.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0114 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/ExternalProject/Add_StepDependencies.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake
index 364bf9e..02c7c8e 100644
--- a/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION ${CMAKE_VERSION})
+cmake_policy(VERSION ${CMAKE_VERSION})
if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
cmake_policy(SET CMP0114 NEW)
else()
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target-stderr.txt
new file mode 100644
index 0000000..c142541
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target-stderr.txt
@@ -0,0 +1,10 @@
+^(CMake Deprecation Warning at Add_StepDependencies_no_target.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0114 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/ExternalProject/Add_StepDependencies_no_target.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake
index da823cd..31b7baf 100644
--- a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION ${CMAKE_VERSION})
+cmake_policy(VERSION ${CMAKE_VERSION})
if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
cmake_policy(SET CMP0114 NEW)
else()
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt
index 2b0feb6..2428b8c 100644
--- a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt
@@ -1,4 +1,15 @@
-^CMake Warning \(dev\) at [^
+^CMake Deprecation Warning at NO_DEPENDS-CMP0114-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0114 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 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\):
diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-stderr.txt b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-stderr.txt
new file mode 100644
index 0000000..6dd7cb0
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at Steps-CMP0114-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0114 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/ExternalProject/UsesTerminal-check.cmake b/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake
index 2946c0b..351d70f 100644
--- a/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake
+++ b/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
-
# If we are using the Ninja generator, we can check and verify that the
# USES_TERMINAL option actually works by examining the Ninja build file.
# This is the only way, since CMake doesn't offer a way to examine the
diff --git a/Tests/RunCMake/ExtraGenerators/CMakeLists.txt b/Tests/RunCMake/ExtraGenerators/CMakeLists.txt
new file mode 100644
index 0000000..93ee9df
--- /dev/null
+++ b/Tests/RunCMake/ExtraGenerators/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.5)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake b/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake
new file mode 100644
index 0000000..fbef79c
--- /dev/null
+++ b/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake
@@ -0,0 +1,19 @@
+include(RunCMake)
+
+foreach(
+ extraGenerator
+ IN ITEMS
+ "CodeBlocks"
+ "CodeLite"
+ "Eclipse CDT4"
+ "Kate"
+ "Sublime Text 2"
+ )
+ block()
+ set(RunCMake_GENERATOR "${extraGenerator} - ${RunCMake_GENERATOR}")
+ set(RunCMake_TEST_VARIANT_DESCRIPTION ": ${RunCMake_GENERATOR}")
+ string(REPLACE " " "" extraGeneratorNoSpaces "${extraGenerator}")
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Simple-${extraGeneratorNoSpaces})
+ run_cmake(Simple)
+ endblock()
+endforeach()
diff --git a/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt b/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt
new file mode 100644
index 0000000..e327a9f
--- /dev/null
+++ b/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Deprecation Warning:
+ Support for "Extra Generators" like
+
+ [^
+]+
+
+ is deprecated and will be removed from a future version of CMake\. IDEs may
+ use the cmake-file-api\(7\) to view CMake-generated project build trees\.
diff --git a/Tests/RunCMake/ExtraGenerators/Simple.cmake b/Tests/RunCMake/ExtraGenerators/Simple.cmake
new file mode 100644
index 0000000..d077046
--- /dev/null
+++ b/Tests/RunCMake/ExtraGenerators/Simple.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+enable_language(CXX)
+
+add_subdirectory(../../Simple Simple)
diff --git a/Tests/RunCMake/FPHSA/CMakeLists.txt b/Tests/RunCMake/FPHSA/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/FPHSA/CMakeLists.txt
+++ b/Tests/RunCMake/FPHSA/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FeatureSummary/CMakeLists.txt b/Tests/RunCMake/FeatureSummary/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/FeatureSummary/CMakeLists.txt
+++ b/Tests/RunCMake/FeatureSummary/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/File_Archive/CMakeLists.txt b/Tests/RunCMake/File_Archive/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/File_Archive/CMakeLists.txt
+++ b/Tests/RunCMake/File_Archive/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/File_Generate/CMakeLists.txt b/Tests/RunCMake/File_Generate/CMakeLists.txt
index 3178de5..eec672f 100644
--- a/Tests/RunCMake/File_Generate/CMakeLists.txt
+++ b/Tests/RunCMake/File_Generate/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
if(NOT TEST_FILE)
set(TEST_FILE ${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake b/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake
index e0585ee..b20f824 100644
--- a/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake
+++ b/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.7)
-project(testFindGTK2 C)
+enable_language(C)
# First call
find_package(GTK2 REQUIRED)
diff --git a/Tests/RunCMake/FindLua/CMakeLists.txt b/Tests/RunCMake/FindLua/CMakeLists.txt
index a2c4d98..e6c41a5 100644
--- a/Tests/RunCMake/FindLua/CMakeLists.txt
+++ b/Tests/RunCMake/FindLua/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} C)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FindMatlab/CMakeLists.txt b/Tests/RunCMake/FindMatlab/CMakeLists.txt
index 1b9a957..93ee9df 100644
--- a/Tests/RunCMake/FindMatlab/CMakeLists.txt
+++ b/Tests/RunCMake/FindMatlab/CMakeLists.txt
@@ -1,3 +1,3 @@
-
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
+project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FindMatlab/MatlabTest1.cmake b/Tests/RunCMake/FindMatlab/MatlabTest1.cmake
index b4cc741..8eaf903 100644
--- a/Tests/RunCMake/FindMatlab/MatlabTest1.cmake
+++ b/Tests/RunCMake/FindMatlab/MatlabTest1.cmake
@@ -1,7 +1,6 @@
-
-cmake_minimum_required (VERSION 2.8.12)
+enable_language(C)
+enable_language(CXX)
enable_testing()
-project(test_should_fail)
if(NOT "${matlab_root}" STREQUAL "")
set(Matlab_ROOT_DIR ${matlab_root})
diff --git a/Tests/RunCMake/FindMatlab/MatlabTest2.cmake b/Tests/RunCMake/FindMatlab/MatlabTest2.cmake
index 4295d3c..95b1c22 100644
--- a/Tests/RunCMake/FindMatlab/MatlabTest2.cmake
+++ b/Tests/RunCMake/FindMatlab/MatlabTest2.cmake
@@ -1,6 +1,6 @@
-cmake_minimum_required (VERSION 2.8.12)
+enable_language(C)
+enable_language(CXX)
enable_testing()
-project(findmatlab_runcmake_test2)
if(NOT DEFINED matlab_required)
set(matlab_required REQUIRED)
diff --git a/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake b/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake
index deebf89..45dc799 100644
--- a/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake
@@ -1,7 +1,5 @@
-
include(RunCMake)
-
if(NOT "${MCR_ROOT}" STREQUAL "")
if(NOT EXISTS "${MCR_ROOT}")
message(FATAL_ERROR "MCR does not exist ${MCR_ROOT}")
diff --git a/Tests/RunCMake/FindOpenSSL/version-exact.cmake b/Tests/RunCMake/FindOpenSSL/version-exact.cmake
index 29c2ce3..11826cf 100644
--- a/Tests/RunCMake/FindOpenSSL/version-exact.cmake
+++ b/Tests/RunCMake/FindOpenSSL/version-exact.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required (VERSION 3.19...3.20)
-
find_package (OpenSSL REQUIRED COMPONENTS Crypto)
# Store version without a possibly trailing letter.
string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}")
diff --git a/Tests/RunCMake/FindOpenSSL/version-range.cmake b/Tests/RunCMake/FindOpenSSL/version-range.cmake
index 9390032..f9689b6 100644
--- a/Tests/RunCMake/FindOpenSSL/version-range.cmake
+++ b/Tests/RunCMake/FindOpenSSL/version-range.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required (VERSION 3.19...3.20)
-
find_package (OpenSSL REQUIRED COMPONENTS Crypto)
# Store version without a possibly trailing letter.
string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}")
diff --git a/Tests/RunCMake/FindOpenSSL/version.cmake b/Tests/RunCMake/FindOpenSSL/version.cmake
index d06cd1f..3d151ab 100644
--- a/Tests/RunCMake/FindOpenSSL/version.cmake
+++ b/Tests/RunCMake/FindOpenSSL/version.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required (VERSION 3.19...3.20)
-
find_package (OpenSSL REQUIRED COMPONENTS Crypto)
# Store version without a possibly trailing letter.
string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}")
diff --git a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
+++ b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
index 69ab4da..457747f 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
-
-project(FindPkgConfig_IMPORTED_TARGET C)
+enable_language(C)
find_package(PkgConfig REQUIRED)
pkg_check_modules(NCURSES IMPORTED_TARGET QUIET ncurses)
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake
index f7a9815..95a2e32 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
-
-project(FindPkgConfig_IMPORTED_TARGET C)
+enable_language(C)
find_package(PkgConfig REQUIRED)
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
index d0046ca..15baa0d 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
-
find_package(PkgConfig REQUIRED)
pkg_check_modules(NCURSES QUIET ncurses)
diff --git a/Tests/RunCMake/FindSWIG/version-exact.cmake b/Tests/RunCMake/FindSWIG/version-exact.cmake
index ec3651f..98903ff 100644
--- a/Tests/RunCMake/FindSWIG/version-exact.cmake
+++ b/Tests/RunCMake/FindSWIG/version-exact.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required (VERSION 3.18...3.19)
-
find_package (SWIG)
if (NOT SWIG_FOUND)
message (FATAL_ERROR "Failed to find SWIG")
diff --git a/Tests/RunCMake/FindSWIG/version-range.cmake b/Tests/RunCMake/FindSWIG/version-range.cmake
index 7ba1134..e776961 100644
--- a/Tests/RunCMake/FindSWIG/version-range.cmake
+++ b/Tests/RunCMake/FindSWIG/version-range.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required (VERSION 3.18...3.19)
-
find_package (SWIG)
if (NOT SWIG_FOUND)
message (FATAL_ERROR "Failed to find SWIG")
diff --git a/Tests/RunCMake/FindSWIG/version.cmake b/Tests/RunCMake/FindSWIG/version.cmake
index a4f1c39..b5ed6a7 100644
--- a/Tests/RunCMake/FindSWIG/version.cmake
+++ b/Tests/RunCMake/FindSWIG/version.cmake
@@ -1,5 +1,3 @@
-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")
diff --git a/Tests/RunCMake/Framework/CMakeLists.txt b/Tests/RunCMake/Framework/CMakeLists.txt
index 6dd8cdf..93ee9df 100644
--- a/Tests/RunCMake/Framework/CMakeLists.txt
+++ b/Tests/RunCMake/Framework/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Framework/FrameworkConsumption.cmake b/Tests/RunCMake/Framework/FrameworkConsumption.cmake
index 58b70a3..a1ce006 100644
--- a/Tests/RunCMake/Framework/FrameworkConsumption.cmake
+++ b/Tests/RunCMake/Framework/FrameworkConsumption.cmake
@@ -1,5 +1,3 @@
-
-cmake_minimum_required(VERSION 3.22...3.24)
enable_language(C)
# Create framework and ensure header is placed in Headers
diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake
index 84012aa..d09e8a0 100644
--- a/Tests/RunCMake/Framework/FrameworkLayout.cmake
+++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.4)
enable_language(C)
set(CMAKE_CONFIGURATION_TYPES "Debug" CACHE INTERNAL "Supported configuration types")
diff --git a/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt b/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt
+++ b/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt
index 4b3de84..93ee9df 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake
index 7eec527..187e7d6 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.14)
-
enable_language (C)
set (GENERATE_CONTENT [[
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake
index 1963244..d550431 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.14)
-
enable_language (C)
set (GENERATE_CONTENT [[
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake
index cc9cd5a..01926fe 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.14)
-
enable_language (C)
set (win_platforms Windows CYGWIN MSYS)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake
index edfb40c..a9a76bf 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.14)
-
enable_language (C)
set (win_platforms Windows CYGWIN MSYS)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake
index 3ee42a5..ddf3887 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.14)
-
enable_language (C)
set (win_platforms Windows CYGWIN MSYS)
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake
index 1fe75d9..9c5d932 100644
--- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.14)
-
enable_language (C)
set (win_platforms Windows CYGWIN MSYS)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake
index 212c034..eed194b 100644
--- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.17)
-
add_library(lib-global SHARED IMPORTED GLOBAL)
add_library(alias-lib-global ALIAS lib-global)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt
index 26a73f9..32d92d8 100644
--- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.10)
if(RunCMake_TEST STREQUAL "LOCATION")
cmake_minimum_required(VERSION 2.8.12) # Leave CMP0026 unset.
endif()
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake
index e9855be..0f0c399 100644
--- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.14)
enable_language(C)
add_library(foo1 STATIC empty.c)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt
index a4c8dcd..fab2ce2 100644
--- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt
@@ -1,3 +1,10 @@
+^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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 CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 2d545d9..b139210 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(BadIF)
run_cmake(BadCONFIG)
diff --git a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt
index 37747a1..d0aef2c 100644
--- a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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 CMakeLists.txt:[0-9]+ \(cmake_minimum_required\):
The OLD behavior for policy CMP0052 will be removed from a future version
- of CMake.
+ 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
diff --git a/Tests/RunCMake/IfacePaths/CMakeLists.txt b/Tests/RunCMake/IfacePaths/CMakeLists.txt
index 5cd4825..0d707f0 100644
--- a/Tests/RunCMake/IfacePaths/CMakeLists.txt
+++ b/Tests/RunCMake/IfacePaths/CMakeLists.txt
@@ -1,4 +1,8 @@
-cmake_minimum_required(VERSION 3.0)
+if(RunCMake_TEST MATCHES "-CMP0052")
+ cmake_minimum_required(VERSION 3.0)
+else()
+ cmake_minimum_required(VERSION 3.5)
+endif()
project(${RunCMake_TEST} NONE)
if(NOT TEST_FILE)
set(TEST_FILE ${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt
index 37747a1..4db8209 100644
--- a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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 CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
The OLD behavior for policy CMP0052 will be removed from a future version
- of CMake.
+ 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
diff --git a/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt b/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt
index 18dfd26..93ee9df 100644
--- a/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt
+++ b/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt
+++ b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/InterfaceLibrary/genex_link.cmake b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake
index 0dbf029..3445864 100644
--- a/Tests/RunCMake/InterfaceLibrary/genex_link.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake
@@ -1,7 +1,4 @@
-
-cmake_minimum_required(VERSION 2.8.12.20131125 FATAL_ERROR)
-
-project(genex_link)
+enable_language(CXX)
set(_main_cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp)
file(WRITE ${_main_cpp}
diff --git a/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake
index 575fcc6..4a8ca37 100644
--- a/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_policy(SET CMP0037 OLD)
add_library(if$ace INTERFACE)
add_library(iface::target INTERFACE)
diff --git a/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake
index ed81878..eae8f57 100644
--- a/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake
@@ -1,5 +1,3 @@
-
-cmake_minimum_required(VERSION 2.8.12.20131009)
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
add_library(foo INTERFACE)
target_compile_definitions(foo INTERFACE FOO_DEFINE)
diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/Languages/CMakeLists.txt
+++ b/Tests/RunCMake/Languages/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt
index b7a0755..55aa1bb 100644
--- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt
+++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMP0028-OLD-iface.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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 CMP0028-OLD-iface\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0028 will be removed from a future version
- of CMake.
+ 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
diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt
index 586a876..f11d8f5 100644
--- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt
+++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMP0028-OLD.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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 CMP0028-OLD\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0028 will be removed from a future version
- of CMake.
+ 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
diff --git a/Tests/RunCMake/LinkItemValidation/CMakeLists.txt b/Tests/RunCMake/LinkItemValidation/CMakeLists.txt
index 185cd91..6e1f8a2 100644
--- a/Tests/RunCMake/LinkItemValidation/CMakeLists.txt
+++ b/Tests/RunCMake/LinkItemValidation/CMakeLists.txt
@@ -1,6 +1,6 @@
-cmake_minimum_required(VERSION 2.8.12)
-if(NOT RunCMake_TEST MATCHES "^CMP0028")
- cmake_minimum_required(VERSION 3.22)
+cmake_minimum_required(VERSION 3.5)
+if(RunCMake_TEST MATCHES "^CMP0028")
+ cmake_minimum_required(VERSION 2.8.12)
endif()
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
diff --git a/Tests/RunCMake/LinkStatic/CMakeLists.txt b/Tests/RunCMake/LinkStatic/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/LinkStatic/CMakeLists.txt
+++ b/Tests/RunCMake/LinkStatic/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt b/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt
index 18dfd26..93ee9df 100644
--- a/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt
+++ b/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt
index 3313e31..544b65f 100644
--- a/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt
+++ b/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.*
diff --git a/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt
index 3313e31..544b65f 100644
--- a/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.*
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt
index 3313e31..082c7b5 100644
--- a/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt
+++ b/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.*
diff --git a/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt
index 3313e31..082c7b5 100644
--- a/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt
index 3313e31..d2efd3d 100644
--- a/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt
index 3313e31..d2efd3d 100644
--- a/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt
index 3313e31..0082ab2 100644
--- a/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.*
diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt
index 3313e31..0082ab2 100644
--- a/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt
+++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt
@@ -1 +1 @@
-.*-E env USED_LAUNCHER=1.*
+.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.*
diff --git a/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake
index 8f2bf63..025f367 100644
--- a/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake
+++ b/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake
@@ -17,7 +17,8 @@ endfunction()
function(run_linker_launcher_env lang)
string(REGEX REPLACE "-.*" "" core_lang "${lang}")
- set(ENV{CMAKE_${core_lang}_LINKER_LAUNCHER} "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+ # Use the noop genexp $<PATH:...> genexp to validate genexp support.
+ set(ENV{CMAKE_${core_lang}_LINKER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1;TARGET_NAME=$<TARGET_PROPERTY:NAME>;LANGUAGE=$<LINK_LANGUAGE>")
run_linker_launcher(${lang})
unset(ENV{CMAKE_${core_lang}_LINKER_LAUNCHER})
endfunction()
diff --git a/Tests/RunCMake/Make/CMP0113-OLD-stderr.txt b/Tests/RunCMake/Make/CMP0113-OLD-stderr.txt
new file mode 100644
index 0000000..42742f7
--- /dev/null
+++ b/Tests/RunCMake/Make/CMP0113-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0113-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0113 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/Make/CMakeLists.txt b/Tests/RunCMake/Make/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/Make/CMakeLists.txt
+++ b/Tests/RunCMake/Make/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Ninja/AssumedSources.cmake b/Tests/RunCMake/Ninja/AssumedSources.cmake
index d5364f0..d68fca9 100644
--- a/Tests/RunCMake/Ninja/AssumedSources.cmake
+++ b/Tests/RunCMake/Ninja/AssumedSources.cmake
@@ -1,6 +1,5 @@
-cmake_minimum_required(VERSION 3.8)
cmake_policy(SET CMP0118 NEW)
-project(AssumedSources)
+enable_language(C)
set_source_files_properties(
"${CMAKE_CURRENT_BINARY_DIR}/target.c"
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt
index 9a606ee..6d340b0 100644
--- a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt
@@ -1,6 +1,15 @@
-^CMake Deprecation Warning at CMP0058-OLD-by.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[0-9] \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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:[0-9] \(include\)
++
+CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0058 will be removed from a future version
- of CMake.
+ 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
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake
index 92a3a0f..45e5aa3 100644
--- a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake
@@ -1,3 +1,4 @@
+cmake_policy(VERSION 3.2)
cmake_policy(SET CMP0058 OLD)
set(byproducts BYPRODUCTS byproduct1a byproduct1b)
include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt
index ba6e5da..834c781 100644
--- a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt
@@ -1,6 +1,15 @@
-^CMake Deprecation Warning at CMP0058-OLD-no.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[0-9] \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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:[0-9] \(include\)
++
+CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0058 will be removed from a future version
- of CMake.
+ 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
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake
index 0326e07..388e018 100644
--- a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake
@@ -1,2 +1,3 @@
+cmake_policy(VERSION 3.2)
cmake_policy(SET CMP0058 OLD)
include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt
new file mode 100644
index 0000000..2927f52
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Deprecation Warning at CMP0058-WARN-by\.cmake:[0-9] \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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:[0-9] \(include\)$
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake
index 6128167..6f5484a 100644
--- a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake
@@ -1,2 +1,3 @@
+cmake_policy(VERSION 3.2)
set(byproducts BYPRODUCTS byproduct1a byproduct1b)
include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt
index 439a2d9..1ffb416 100644
--- a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt
@@ -1,4 +1,13 @@
-^CMake Warning \(dev\):
+^CMake Deprecation Warning at CMP0058-WARN-no\.cmake:[0-9] \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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:[0-9] \(include\)
++
+CMake Warning \(dev\):
Policy CMP0058 is not set: Ninja requires custom command byproducts to be
explicit. Run "cmake --help-policy CMP0058" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake
index 7bc66ef..714ae64 100644
--- a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake
@@ -1 +1,2 @@
+cmake_policy(VERSION 3.2)
include(CMP0058-common.cmake)
diff --git a/Tests/RunCMake/Ninja/CMakeLists.txt b/Tests/RunCMake/Ninja/CMakeLists.txt
index 2a0591e..8eb5748 100644
--- a/Tests/RunCMake/Ninja/CMakeLists.txt
+++ b/Tests/RunCMake/Ninja/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/Ninja/CommandConcat.cmake b/Tests/RunCMake/Ninja/CommandConcat.cmake
index 790cf9d..7d6faf5 100644
--- a/Tests/RunCMake/Ninja/CommandConcat.cmake
+++ b/Tests/RunCMake/Ninja/CommandConcat.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.7)
-project(concat_cmd NONE)
set(output1 ${CMAKE_BINARY_DIR}/out1.txt)
set(output2 ${CMAKE_BINARY_DIR}/out2.txt)
file(REMOVE ${output1} ${output2})
diff --git a/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake b/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake
new file mode 100644
index 0000000..e0c2434
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.26)
+project(CustomCommandExplicitDepends C)
+
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command.h"
+ COMMAND "${CMAKE_COMMAND}" -E touch
+ "${CMAKE_CURRENT_BINARY_DIR}/command.h"
+ COMMENT "Creating command.h"
+ DEPENDS_EXPLICIT_ONLY
+)
+
+add_library(dep STATIC dep.c)
+
+add_library(top STATIC
+ top.c
+ "${CMAKE_CURRENT_BINARY_DIR}/command.h"
+)
+target_link_libraries(top PRIVATE dep)
diff --git a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
index 8e01c8c..e04ac21 100644
--- a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
+++ b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
@@ -1,6 +1,3 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello NONE)
-
add_custom_command(
OUTPUT hello.copy.c
COMMAND "${CMAKE_COMMAND}" -E copy
diff --git a/Tests/RunCMake/Ninja/Executable.cmake b/Tests/RunCMake/Ninja/Executable.cmake
index 4e17d68..2b6a61b 100644
--- a/Tests/RunCMake/Ninja/Executable.cmake
+++ b/Tests/RunCMake/Ninja/Executable.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
add_executable(hello hello.c)
include(CheckOutput.cmake)
include(CheckNoPrefixSubDir.cmake)
diff --git a/Tests/RunCMake/Ninja/LooseObjectDepends.cmake b/Tests/RunCMake/Ninja/LooseObjectDepends.cmake
index 360c7ba..90f8249 100644
--- a/Tests/RunCMake/Ninja/LooseObjectDepends.cmake
+++ b/Tests/RunCMake/Ninja/LooseObjectDepends.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.8)
-project(LooseObjectDepends C)
+enable_language(C)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command.h"
diff --git a/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake b/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake
index 505f750..9615c56 100644
--- a/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake
+++ b/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
-project(Test LANGUAGES C)
+enable_language(C)
configure_file(PreventConfigureFileDupBuildRule.cmake PreventTargetAliasesDupBuildRule.cmake @ONLY)
add_subdirectory(SubDirConfigureFileDup)
diff --git a/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake b/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake
index da6f86a..81eb731 100644
--- a/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake
+++ b/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
-project(Test LANGUAGES C)
+enable_language(C)
# fake launcher executable
set(input_launcher_executable ${CMAKE_CURRENT_BINARY_DIR}/fake_launcher_executable)
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 9214e90..17ad035 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -190,6 +190,18 @@ function (run_LooseObjectDepends)
endfunction ()
run_LooseObjectDepends()
+function (run_CustomCommandExplictDepends)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandExplicitDepends-build)
+ run_cmake(CustomCommandExplicitDepends)
+ run_ninja("${RunCMake_TEST_BINARY_DIR}" "command.h")
+ if (EXISTS "${RunCMake_TEST_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}dep${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ message(FATAL_ERROR
+ "The `dep` library was created when requesting an custom command to be "
+ "generated; this should no longer be necessary when passing DEPENDS_EXPLICIT_ONLY keyword.")
+ endif ()
+endfunction ()
+run_CustomCommandExplictDepends()
+
function (run_AssumedSources)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AssumedSources-build)
run_cmake(AssumedSources)
diff --git a/Tests/RunCMake/Ninja/SharedLib.cmake b/Tests/RunCMake/Ninja/SharedLib.cmake
index 1a78390..c295c16 100644
--- a/Tests/RunCMake/Ninja/SharedLib.cmake
+++ b/Tests/RunCMake/Ninja/SharedLib.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
add_library(greeting SHARED greeting.c)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(hello hello_with_greeting.c)
diff --git a/Tests/RunCMake/Ninja/StaticLib.cmake b/Tests/RunCMake/Ninja/StaticLib.cmake
index 0f815ae..dab6742 100644
--- a/Tests/RunCMake/Ninja/StaticLib.cmake
+++ b/Tests/RunCMake/Ninja/StaticLib.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
add_definitions(-DGREETING_STATIC)
add_library(greeting STATIC greeting.c)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/Tests/RunCMake/Ninja/SubDirPrefix.cmake b/Tests/RunCMake/Ninja/SubDirPrefix.cmake
index 30ad1e6..49d075f 100644
--- a/Tests/RunCMake/Ninja/SubDirPrefix.cmake
+++ b/Tests/RunCMake/Ninja/SubDirPrefix.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
add_subdirectory(SubDirPrefix)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/Tests/RunCMake/Ninja/TwoLibs.cmake b/Tests/RunCMake/Ninja/TwoLibs.cmake
index 666452f..10ac5a6 100644
--- a/Tests/RunCMake/Ninja/TwoLibs.cmake
+++ b/Tests/RunCMake/Ninja/TwoLibs.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
-project(hello C)
+enable_language(C)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib-static")
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt b/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt
index 2897109..3e470a2 100644
--- a/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.14)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
index 75c26a7..6027f03 100644
--- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
@@ -1,6 +1,3 @@
-cmake_minimum_required(VERSION 3.14)
-project(Minimal NONE)
-
#
# list of targets to test. to add a target: put its files in the data
# subdirectory and add it to this list... we run each target's
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt b/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt
index 2897109..3e470a2 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.14)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
index df4ef1f..fa7bf07 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
@@ -1,6 +1,3 @@
-cmake_minimum_required(VERSION 3.14)
-project(Minimal NONE)
-
#
# list of targets to test. to add a target: put its files in the data
# subdirectory and add it to this list... we run each target's
diff --git a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
index abd27f4..da608b3 100644
--- a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(NotClosed)
run_cmake(NotOpened)
diff --git a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
index c3922d6..42b0577 100644
--- a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
+++ b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
@@ -1,5 +1,4 @@
-
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} CXX)
# MSVC creates extra targets which pollute the stderr unless we set this.
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 54d7eb5..e1c923d 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -186,6 +186,18 @@ function(run_cmake test)
"|[^\n]*Bullseye Testing Technology"
")[^\n]*\n)+"
)
+ if(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION)
+ string(REGEX REPLACE [[
+^CMake Deprecation Warning at [^
+]*CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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\.
++
+]] "" actual_stderr "${actual_stderr}")
+ endif()
foreach(o IN ITEMS stdout stderr config)
string(REGEX REPLACE "\r\n" "\n" actual_${o} "${actual_${o}}")
string(REGEX REPLACE "${ignore_line_regex}" "\\1" actual_${o} "${actual_${o}}")
diff --git a/Tests/RunCMake/Swift/CMakeLists.txt b/Tests/RunCMake/Swift/CMakeLists.txt
index 74b3ff8..77030d6 100644
--- a/Tests/RunCMake/Swift/CMakeLists.txt
+++ b/Tests/RunCMake/Swift/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.15)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt b/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt
index 874bdc7..16d2e21 100644
--- a/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt
+++ b/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt
@@ -1,4 +1,4 @@
-^CMake Error at SwiftMultiArch.cmake:3 \(project\):
+^CMake Error at SwiftMultiArch.cmake:2 \(enable_language\):
multiple values for CMAKE_OSX_ARCHITECTURES not supported with Swift
Call Stack \(most recent call first\):
CMakeLists.txt:3
diff --git a/Tests/RunCMake/Swift/SwiftMultiArch.cmake b/Tests/RunCMake/Swift/SwiftMultiArch.cmake
index 5fdb688..b59bb62 100644
--- a/Tests/RunCMake/Swift/SwiftMultiArch.cmake
+++ b/Tests/RunCMake/Swift/SwiftMultiArch.cmake
@@ -1,4 +1,2 @@
-cmake_minimum_required(VERSION 3.15.1)
set(CMAKE_OSX_ARCHITECTURES "armv7;arm64;i386;x86_64")
-project(SwiftMultiArch
- LANGUAGES Swift)
+enable_language(Swift)
diff --git a/Tests/RunCMake/SymlinkTrees/CMakeLists.txt b/Tests/RunCMake/SymlinkTrees/CMakeLists.txt
index e16faea..919a168 100644
--- a/Tests/RunCMake/SymlinkTrees/CMakeLists.txt
+++ b/Tests/RunCMake/SymlinkTrees/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
message(STATUS "source: '${CMAKE_SOURCE_DIR}'")
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
index f0c287c..f56ac64 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(BOM-UTF-8)
run_cmake(BOM-UTF-16-LE)
diff --git a/Tests/RunCMake/Syntax/String1-stderr.txt b/Tests/RunCMake/Syntax/String1-stderr.txt
index 07e98da..382ea00 100644
--- a/Tests/RunCMake/Syntax/String1-stderr.txt
+++ b/Tests/RunCMake/Syntax/String1-stderr.txt
@@ -1,3 +1,3 @@
-^
+^'
1 \${var} 4
- $
+ '$
diff --git a/Tests/RunCMake/Syntax/String1.cmake b/Tests/RunCMake/Syntax/String1.cmake
index a94c9ff..20ed3c1 100644
--- a/Tests/RunCMake/Syntax/String1.cmake
+++ b/Tests/RunCMake/Syntax/String1.cmake
@@ -1,3 +1,3 @@
-message("
+message("'
1 \${var} 4
- ")
+ '")
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt
index b309c3b..c7238df 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt
@@ -1,7 +1,7 @@
-CMake Error at UnterminatedBrace0.cmake:2 \(set\):
+CMake Error at UnterminatedBrace0.cmake:1 \(set\):
Syntax error in cmake code at
- .*/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake:2
+ .*/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake:1
when parsing string
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake
index 0da1290..09af0ce 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake
@@ -1,2 +1 @@
-cmake_minimum_required(VERSION 3.0)
set(var "${")
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
index ffe0e2a..3d88f36 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt
@@ -1,7 +1,7 @@
-CMake Warning \(dev\) at UnterminatedBrace1.cmake:3 \(set\):
+CMake Warning \(dev\) at UnterminatedBrace1.cmake:2 \(set\):
Syntax error in cmake code at
- .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:3
+ .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:2
when parsing string
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
index 93fba34..8b40b19 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake
@@ -1,3 +1,2 @@
-cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0010 OLD)
set(var "${")
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt
index b332d34..0d76251 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt
@@ -1,7 +1,7 @@
-CMake Error at UnterminatedBrace2.cmake:4 \(set\):
+CMake Error at UnterminatedBrace2.cmake:3 \(set\):
Syntax error in cmake code at
- .*/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake:4
+ .*/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake:3
when parsing string
diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake
index a650e5b..30d4d4d 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake
+++ b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0010 OLD)
cmake_policy(SET CMP0053 NEW)
set(var "${")
diff --git a/Tests/RunCMake/TargetProperties/CMakeLists.txt b/Tests/RunCMake/TargetProperties/CMakeLists.txt
index 44b5d30..26f536b 100644
--- a/Tests/RunCMake/TargetProperties/CMakeLists.txt
+++ b/Tests/RunCMake/TargetProperties/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/VSSolution/CMakeLists.txt b/Tests/RunCMake/VSSolution/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/VSSolution/CMakeLists.txt
+++ b/Tests/RunCMake/VSSolution/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake
index 7a000ee..133dbe1 100644
--- a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(PropertyTypo)
run_cmake(CMP0063-OLD)
diff --git a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake
index bd914f8..623ef2a 100644
--- a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake
+++ b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake
@@ -1,7 +1,5 @@
-cmake_minimum_required(VERSION 3.22)
-
# a simple CSharp only test case
-project (DotNetSdk CSharp)
+enable_language(CSharp)
set(CMAKE_DOTNET_TARGET_FRAMEWORK net472)
set(CMAKE_DOTNET_SDK "Microsoft.NET.Sdk")
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt
index 872338d..1d0bd70 100644
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake
index 1f3c19d..68372a1 100644
--- a/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake
+++ b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 3.23)
-
-project(BundleLinkBundle CXX)
+enable_language(CXX)
add_subdirectory(lib_bundle)
diff --git a/Tests/RunCMake/XcodeProject/CMakeLists.txt b/Tests/RunCMake/XcodeProject/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/XcodeProject/CMakeLists.txt
+++ b/Tests/RunCMake/XcodeProject/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
index 3d8fa17..234ceef 100644
--- a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
+++ b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.10)
-project(DeploymentTarget C)
+enable_language(C)
# using Xcode 7.1 SDK versions for deployment targets
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake
index a9ea717..b42e933 100644
--- a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake
@@ -45,7 +45,6 @@ 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)
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake
index e72bf4d..ab64db7 100644
--- a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.18...3.19)
macro(returnOnError errorMsg)
if(NOT "${errorMsg}" STREQUAL "")
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
index bc14874..a9fafd2 100644
--- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
@@ -1,6 +1,5 @@
# check if Xcode and CMake have the same understanding of Bundle layout
-cmake_minimum_required(VERSION 3.3)
enable_language(C)
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
index 8426148..f8eccc7 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
-
-project(IOSInstallCombined CXX)
+enable_language(CXX)
set(maybe_armv7 armv7)
set(maybe_i386 i386)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
index 7d14d19..e719428 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
-
-project(XcodeIOSInstallCombinedPrune CXX)
+enable_language(CXX)
if(XCODE_VERSION VERSION_GREATER_EQUAL 9)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
index 5177ec2..cb22e51 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
-
-project(XcodeIOSInstallCombinedSingleArch CXX)
+enable_language(CXX)
set(iphoneos_arch armv7)
if(XCODE_VERSION VERSION_GREATER_EQUAL 14)
diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
index 75da7b1..fccd4c6 100644
--- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
-
-project(XcodeInstallIOS)
+enable_language(CXX)
set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
diff --git a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake
index a1064f4..b334b7d 100644
--- a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
enable_language(CXX)
set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME ON)
diff --git a/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake b/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake
index 4840276..8f54046 100644
--- a/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.15)
-project(objctest LANGUAGES C OBJC)
+enable_language(C)
+enable_language(OBJC)
include(CheckOBJCCompilerFlag)
check_objc_compiler_flag(-fobjc-arc HAVE_OBJC_ARC)
diff --git a/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake b/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake
index 0ad942f..193860c 100644
--- a/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.15)
-project(objcxxtest LANGUAGES CXX OBJCXX)
+enable_language(CXX)
+enable_language(OBJCXX)
include(CheckOBJCXXCompilerFlag)
check_objcxx_compiler_flag(-fobjc-arc HAVE_OBJC_ARC)
diff --git a/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake b/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake
index 3ca24af..5e66e82 100644
--- a/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake
@@ -1,5 +1 @@
-cmake_minimum_required (VERSION 3.19)
-
-project (test_xcode_fail NONE)
-
add_subdirectory(subproject_two_object_libs)
diff --git a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
index 44052f0..80107cb 100644
--- a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required (VERSION 3.14)
if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
set(USE_SWIFT 1)
diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake
index 2fe5a9f..ff3419c 100644
--- a/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.7)
-
-project(XcodeSchemaGeneration CXX)
+enable_language(CXX)
add_executable(foo main.cpp)
diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
index 267e379..05a8976 100644
--- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
@@ -1,9 +1,7 @@
-cmake_minimum_required(VERSION 3.7)
+enable_language(CXX)
set(CMAKE_XCODE_GENERATE_SCHEME ON)
-project(XcodeSchemaProperty CXX)
-
function(create_scheme_for_variable variable)
set(CMAKE_XCODE_SCHEME_${variable} ON)
add_executable(${variable} main.cpp)
diff --git a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake b/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake
index e83d7f3..55dd1a7 100644
--- a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake
@@ -1,2 +1 @@
-cmake_minimum_required(VERSION 3.3)
find_package(ZLIB REQUIRED)
diff --git a/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake b/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
index 58d2616..bd8995b 100644
--- a/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 3.23)
-
-project(XcodeXCConfig C)
+enable_language(C)
set(CMAKE_XCODE_XCCONFIG "$<IF:$<CONFIG:Debug>,XcodeXCConfig.global.debug.xcconfig,XcodeXCConfig.global.release.xcconfig>")
diff --git a/Tests/RunCMake/add_custom_command/CMakeLists.txt b/Tests/RunCMake/add_custom_command/CMakeLists.txt
index ef2163c..93ee9df 100644
--- a/Tests/RunCMake/add_custom_command/CMakeLists.txt
+++ b/Tests/RunCMake/add_custom_command/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake b/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake
index 65b7250..d8a5d86 100644
--- a/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake
+++ b/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake
@@ -2,7 +2,7 @@ add_custom_target(mkdir COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURR
add_custom_command(
OUTPUT out.txt
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/PrintDir.cmake
- WORKING_DIRECTORY ${CMAKE_CFG_INTDIR}
+ WORKING_DIRECTORY $<CONFIG>
)
set_property(SOURCE out.txt PROPERTY SYMBOLIC 1)
add_custom_target(drive ALL DEPENDS out.txt)
diff --git a/Tests/RunCMake/add_custom_target/CMakeLists.txt b/Tests/RunCMake/add_custom_target/CMakeLists.txt
index ef2163c..93ee9df 100644
--- a/Tests/RunCMake/add_custom_target/CMakeLists.txt
+++ b/Tests/RunCMake/add_custom_target/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/add_dependencies/CMakeLists.txt b/Tests/RunCMake/add_dependencies/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/add_dependencies/CMakeLists.txt
+++ b/Tests/RunCMake/add_dependencies/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake b/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake
index f0e4069..547c101 100644
--- a/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake
+++ b/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.7)
-project(ReadOnlyProperty C)
+enable_language(C)
add_library(a a.c)
diff --git a/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake b/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake
index 45b3974..2f883af 100644
--- a/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake
+++ b/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.7)
-project(RetrieveDependencies C)
+enable_language(C)
add_library(a a.c)
diff --git a/Tests/RunCMake/add_executable/CMakeLists.txt b/Tests/RunCMake/add_executable/CMakeLists.txt
index ef2163c..93ee9df 100644
--- a/Tests/RunCMake/add_executable/CMakeLists.txt
+++ b/Tests/RunCMake/add_executable/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/add_library/CMakeLists.txt b/Tests/RunCMake/add_library/CMakeLists.txt
index ef2163c..93ee9df 100644
--- a/Tests/RunCMake/add_library/CMakeLists.txt
+++ b/Tests/RunCMake/add_library/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake b/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake
index c77b43c..f7c551d 100644
--- a/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake
+++ b/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake
@@ -11,7 +11,7 @@ string(REPLACE "${CMAKE_END_TEMP_FILE}" "" CMAKE_C_CREATE_SHARED_LIBRARY "${CMAK
add_library(example SHARED LinkOptionsLib.c)
# use LAUNCH facility to dump linker command
-set_property(TARGET example PROPERTY RULE_LAUNCH_LINK "\"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/dump${CMAKE_EXECUTABLE_SUFFIX}\"")
+set_property(TARGET example PROPERTY RULE_LAUNCH_LINK "\"$<TARGET_FILE:dump>\"")
add_dependencies (example dump)
diff --git a/Tests/RunCMake/add_subdirectory/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMakeLists.txt
index 47d249c..b5d7262 100644
--- a/Tests/RunCMake/add_subdirectory/CMakeLists.txt
+++ b/Tests/RunCMake/add_subdirectory/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
# Have to set policy here due to policy scope
if(DEFINED CMP0082_VALUE)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-stderr.txt
new file mode 100644
index 0000000..46b32d1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-AlphaNumeric.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-BracketArgument-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-stderr.txt
new file mode 100644
index 0000000..906f318
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-BracketArgument.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-EscapedSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-stderr.txt
new file mode 100644
index 0000000..65818fa
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-EscapedSpecialChars.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-FormerInvalidSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-stderr.txt
new file mode 100644
index 0000000..db88659
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-FormerInvalidSpecialChars.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-stderr.txt
new file mode 100644
index 0000000..42cc02a
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Deprecation Warning at CMP0110-OLD-FormerInvalidSpecialChars.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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\):
+ CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-stderr.txt
new file mode 100644
index 0000000..6a39db6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-LeadingAndTrailingWhitespace.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-OtherSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-stderr.txt
new file mode 100644
index 0000000..d5dcada
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-OtherSpecialChars.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-Quote-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Quote-stderr.txt
new file mode 100644
index 0000000..69cd304
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Quote-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-Quote.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-Semicolon-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-stderr.txt
new file mode 100644
index 0000000..e601bfc
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-Semicolon.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-Space-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Space-stderr.txt
new file mode 100644
index 0000000..618d2b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-Space.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/add_test/CMP0110-OLD-ValidSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-stderr.txt
new file mode 100644
index 0000000..ad67c08
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0110-OLD-ValidSpecialChars.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0110 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/alias_targets/CMakeLists.txt b/Tests/RunCMake/alias_targets/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/alias_targets/CMakeLists.txt
+++ b/Tests/RunCMake/alias_targets/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
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 01983e5..e2ebbfa 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)
+cmake_policy(SET CMP0037 OLD)
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 f1a83e8..1319aec 100644
--- a/Tests/RunCMake/build_command/CMakeLists.txt
+++ b/Tests/RunCMake/build_command/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
if(NOT NoProject)
project(${RunCMake_TEST} NONE)
endif()
diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
deleted file mode 100644
index 7d40dcb..0000000
--- a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-^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/Before3_5-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt
new file mode 100644
index 0000000..7981235
--- /dev/null
+++ b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt
@@ -0,0 +1,26 @@
+^CMake Deprecation Warning at Before3_5\.cmake:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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 Before3_5\.cmake:2 \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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 Before3_5\.cmake:6 \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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/Before3_5.cmake
index 220e359..220e359 100644
--- a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake
+++ b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake
diff --git a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
index 667561e..8eb5748 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.12)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
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 81d26d2..3eb980a 100644
--- a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
+++ b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
@@ -1,9 +1,9 @@
-^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.
+^CMake Deprecation Warning at CompatBefore24\.cmake:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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.
+ 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/RunCMakeTest.cmake b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
index 3a959bb..36c44cb 100644
--- a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
@@ -4,7 +4,7 @@ run_cmake(Before24)
run_cmake(CompatBefore24)
run_cmake(Future)
run_cmake(PolicyBefore24)
-run_cmake(Before2812)
+run_cmake(Before3_5)
run_cmake(Range)
run_cmake(RangeBad)
run_cmake(Unknown)
diff --git a/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt b/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt
index 6dd8cdf..93ee9df 100644
--- a/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt
+++ b/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/cmake_path/call-cmake_path.cmake b/Tests/RunCMake/cmake_path/call-cmake_path.cmake
index 70fd6f5..655115f 100644
--- a/Tests/RunCMake/cmake_path/call-cmake_path.cmake
+++ b/Tests/RunCMake/cmake_path/call-cmake_path.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.18...3.19)
-
# define input variable
set (path "")
diff --git a/Tests/RunCMake/configure_file/CMakeLists.txt b/Tests/RunCMake/configure_file/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/configure_file/CMakeLists.txt
+++ b/Tests/RunCMake/configure_file/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/continue/CMakeLists.txt b/Tests/RunCMake/continue/CMakeLists.txt
index ef2163c..93ee9df 100644
--- a/Tests/RunCMake/continue/CMakeLists.txt
+++ b/Tests/RunCMake/continue/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt
index af70ac3..f5d57e9 100644
--- a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt
+++ b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt
@@ -1,2 +1,9 @@
-^(Error\(s\) when building project
+^CMake Deprecation Warning at [^
+]*/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD/test\.cmake:[0-9]+ \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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\.
++(Error\(s\) when building project
)?ctest_build returned zero$
diff --git a/Tests/RunCMake/ctest_build/CMakeLists.txt.in b/Tests/RunCMake/ctest_build/CMakeLists.txt.in
index 4a067fa..0a59940 100644
--- a/Tests/RunCMake/ctest_build/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_build/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
@CASE_CMAKELISTS_PREFIX_CODE@
project(CTestBuild@CASE_NAME@ @LANG@)
include(CTest)
diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
index 6f1b4b6..12525f2 100644
--- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
@@ -35,7 +35,9 @@ endif()
run_ctest(BuildFailure)
if (RunCMake_GENERATOR MATCHES "Makefiles")
- set(CASE_TEST_PREFIX_CODE "")
+ set(CASE_TEST_PREFIX_CODE [[
+cmake_policy(VERSION 3.2)
+]])
run_ctest(BuildFailure-CMP0061-OLD)
endif()
endfunction()
diff --git a/Tests/RunCMake/ctest_build/test.cmake.in b/Tests/RunCMake/ctest_build/test.cmake.in
index 9f7fa13..f92568f 100644
--- a/Tests/RunCMake/ctest_build/test.cmake.in
+++ b/Tests/RunCMake/ctest_build/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
@CASE_TEST_PREFIX_CODE@
set(CTEST_SITE "test-site")
diff --git a/Tests/RunCMake/ctest_cmake_error/test.cmake.in b/Tests/RunCMake/ctest_cmake_error/test.cmake.in
index 0648e7c..711a77f 100644
--- a/Tests/RunCMake/ctest_cmake_error/test.cmake.in
+++ b/Tests/RunCMake/ctest_cmake_error/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
diff --git a/Tests/RunCMake/ctest_configure/CMakeLists.txt.in b/Tests/RunCMake/ctest_configure/CMakeLists.txt.in
index 2fb21d4..2860b5c 100644
--- a/Tests/RunCMake/ctest_configure/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_configure/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(CTestConfigure@CASE_NAME@ NONE)
include(CTest)
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
diff --git a/Tests/RunCMake/ctest_configure/test.cmake.in b/Tests/RunCMake/ctest_configure/test.cmake.in
index 72d199a..5935809 100644
--- a/Tests/RunCMake/ctest_configure/test.cmake.in
+++ b/Tests/RunCMake/ctest_configure/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
diff --git a/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in b/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in
index 1babd72..da7ec1a 100644
--- a/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(CTestCoverage@CASE_NAME@ NONE)
include(CTest)
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
diff --git a/Tests/RunCMake/ctest_coverage/test.cmake.in b/Tests/RunCMake/ctest_coverage/test.cmake.in
index 1788e66..f5a1223 100644
--- a/Tests/RunCMake/ctest_coverage/test.cmake.in
+++ b/Tests/RunCMake/ctest_coverage/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
diff --git a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in
index 68a0fcb..1de338b 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 3.3)
+cmake_minimum_required(VERSION 3.5)
project(CTestTestMemcheck@CASE_NAME@ NONE)
include(CTest)
diff --git a/Tests/RunCMake/ctest_memcheck/test.cmake.in b/Tests/RunCMake/ctest_memcheck/test.cmake.in
index eedf080..af995fc 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 3.3)
+cmake_minimum_required(VERSION 3.5)
# Settings:
set(CTEST_SITE "@SITE@")
diff --git a/Tests/RunCMake/ctest_start/CMakeLists.txt.in b/Tests/RunCMake/ctest_start/CMakeLists.txt.in
index 913239c..e497a7d 100644
--- a/Tests/RunCMake/ctest_start/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_start/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(CTestStart@CASE_NAME@ NONE)
include(CTest)
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
diff --git a/Tests/RunCMake/ctest_start/test.cmake.in b/Tests/RunCMake/ctest_start/test.cmake.in
index 4063ece..82acc19 100644
--- a/Tests/RunCMake/ctest_start/test.cmake.in
+++ b/Tests/RunCMake/ctest_start/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
diff --git a/Tests/RunCMake/ctest_submit/test.cmake.in b/Tests/RunCMake/ctest_submit/test.cmake.in
index 35cd16a..0f4885f 100644
--- a/Tests/RunCMake/ctest_submit/test.cmake.in
+++ b/Tests/RunCMake/ctest_submit/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
diff --git a/Tests/RunCMake/ctest_test/CMakeLists.txt.in b/Tests/RunCMake/ctest_test/CMakeLists.txt.in
index e61b556..8eb422d 100644
--- a/Tests/RunCMake/ctest_test/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_test/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(CTestTest@CASE_NAME@ NONE)
include(CTest)
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
diff --git a/Tests/RunCMake/ctest_test/test.cmake.in b/Tests/RunCMake/ctest_test/test.cmake.in
index 36b1dbd..16dde1c 100644
--- a/Tests/RunCMake/ctest_test/test.cmake.in
+++ b/Tests/RunCMake/ctest_test/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
@CASE_TEST_PREFIX_CODE@
set(CTEST_SITE "test-site")
diff --git a/Tests/RunCMake/ctest_update/CMakeLists.txt.in b/Tests/RunCMake/ctest_update/CMakeLists.txt.in
index ecf0e54..f816fac 100644
--- a/Tests/RunCMake/ctest_update/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_update/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(CTestTest@CASE_NAME@ NONE)
include(CTest)
@CASE_CMAKELISTS_SUFFIX_CODE@
diff --git a/Tests/RunCMake/ctest_update/test.cmake.in b/Tests/RunCMake/ctest_update/test.cmake.in
index 01aab26..faaf9b4 100644
--- a/Tests/RunCMake/ctest_update/test.cmake.in
+++ b/Tests/RunCMake/ctest_update/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
@CASE_TEST_PREFIX_CODE@
set(CTEST_SITE "test-site")
diff --git a/Tests/RunCMake/ctest_upload/CMakeLists.txt.in b/Tests/RunCMake/ctest_upload/CMakeLists.txt.in
index 1fab71b..21e5273 100644
--- a/Tests/RunCMake/ctest_upload/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_upload/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(CTestUpload@CASE_NAME@ NONE)
include(CTest)
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
diff --git a/Tests/RunCMake/ctest_upload/test.cmake.in b/Tests/RunCMake/ctest_upload/test.cmake.in
index f13bdd1..a546d38 100644
--- a/Tests/RunCMake/ctest_upload/test.cmake.in
+++ b/Tests/RunCMake/ctest_upload/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
diff --git a/Tests/RunCMake/export/CMakeLists.txt b/Tests/RunCMake/export/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/export/CMakeLists.txt
+++ b/Tests/RunCMake/export/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/file/CMakeLists.txt b/Tests/RunCMake/file/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/file/CMakeLists.txt
+++ b/Tests/RunCMake/file/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_dependency/CMakeLists.txt b/Tests/RunCMake/find_dependency/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/find_dependency/CMakeLists.txt
+++ b/Tests/RunCMake/find_dependency/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_file/CMakeLists.txt b/Tests/RunCMake/find_file/CMakeLists.txt
index ef2163c..93ee9df 100644
--- a/Tests/RunCMake/find_file/CMakeLists.txt
+++ b/Tests/RunCMake/find_file/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_library/CMakeLists.txt b/Tests/RunCMake/find_library/CMakeLists.txt
index ef2163c..93ee9df 100644
--- a/Tests/RunCMake/find_library/CMakeLists.txt
+++ b/Tests/RunCMake/find_library/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
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 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/find_package/CMakeLists.txt
+++ b/Tests/RunCMake/find_package/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_path/CMakeLists.txt b/Tests/RunCMake/find_path/CMakeLists.txt
index ef2163c..93ee9df 100644
--- a/Tests/RunCMake/find_path/CMakeLists.txt
+++ b/Tests/RunCMake/find_path/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_program/CMP0109-OLD-stderr.txt b/Tests/RunCMake/find_program/CMP0109-OLD-stderr.txt
new file mode 100644
index 0000000..fa767b9
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0109-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0109 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/find_program/CMakeLists.txt b/Tests/RunCMake/find_program/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/find_program/CMakeLists.txt
+++ b/Tests/RunCMake/find_program/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/get_filename_component/CMakeLists.txt b/Tests/RunCMake/get_filename_component/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/get_filename_component/CMakeLists.txt
+++ b/Tests/RunCMake/get_filename_component/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/get_property/CMakeLists.txt b/Tests/RunCMake/get_property/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/get_property/CMakeLists.txt
+++ b/Tests/RunCMake/get_property/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/if/CMakeLists.txt b/Tests/RunCMake/if/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/if/CMakeLists.txt
+++ b/Tests/RunCMake/if/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/include_directories/CMakeLists.txt
+++ b/Tests/RunCMake/include_directories/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
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 74b3ff8..93ee9df 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 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt
index de0b70f..6b4c4b0 100644
--- a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt
+++ b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt
@@ -1,10 +1,19 @@
-^CMake Deprecation Warning at CMP0062-OLD.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMP0062-OLD\.cmake:[0-9]+ \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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:[0-9]+ \(include\)
++
+CMake Deprecation Warning at CMP0062-OLD\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0062 will be removed from a future version
- of CMake.
+ 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\)$
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/install/CMakeLists.txt b/Tests/RunCMake/install/CMakeLists.txt
index 6dd8cdf..93ee9df 100644
--- a/Tests/RunCMake/install/CMakeLists.txt
+++ b/Tests/RunCMake/install/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 477ffe0..fa61bdb 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.4)
include(RunCMake)
# Function to build and install a project. The latter step *-check.cmake
diff --git a/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt b/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt
index 138a69d..7d1477f 100644
--- a/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt
+++ b/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt
@@ -1,11 +1,11 @@
^CMake Warning \(dev\) at TARGETS-Defaults-Cache.cmake:[0-9]+ \(install\):
Target lib3 has PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION.
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning \(dev\) at TARGETS-Defaults-Cache.cmake:[0-9]+ \(install\):
Target lib4 has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt b/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt
index 5f56986..5600801 100644
--- a/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt
+++ b/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt
@@ -1,11 +1,11 @@
^CMake Warning \(dev\) at TARGETS-Defaults.cmake:[0-9]+ \(install\):
Target lib3 has PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION.
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.
+
CMake Warning \(dev\) at TARGETS-Defaults.cmake:[0-9]+ \(install\):
Target lib4 has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake
index cba04b2..c72e405 100644
--- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake
+++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.14)
enable_language(C)
# test matrix
diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake
index 43ae787..891b1ac 100644
--- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake
+++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 3.14)
enable_language(C)
add_library(utils SHARED obj1.c)
diff --git a/Tests/RunCMake/install/TARGETS-RPATH.cmake b/Tests/RunCMake/install/TARGETS-RPATH.cmake
index b75deff..3e182f8 100644
--- a/Tests/RunCMake/install/TARGETS-RPATH.cmake
+++ b/Tests/RunCMake/install/TARGETS-RPATH.cmake
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 3.9)
-
+cmake_policy(SET CMP0068 NEW)
enable_language(C)
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
diff --git a/Tests/RunCMake/list/CMakeLists.txt b/Tests/RunCMake/list/CMakeLists.txt
index 4b3de84..93ee9df 100644
--- a/Tests/RunCMake/list/CMakeLists.txt
+++ b/Tests/RunCMake/list/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
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 9103bd2..5dd76f7 100644
--- a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
+++ b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
@@ -1,13 +1,13 @@
-^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.
+^CMake Deprecation Warning at GET-CMP0007-WARN\.cmake:1 \(cmake_policy\):
+ Compatibility with CMake < 3\.5 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.
+ 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\):
+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 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/math/CMakeLists.txt
+++ b/Tests/RunCMake/math/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/message/CMakeLists.txt b/Tests/RunCMake/message/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/message/CMakeLists.txt
+++ b/Tests/RunCMake/message/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/message/warnmessage-rootdir.cmake b/Tests/RunCMake/message/warnmessage-rootdir.cmake
index f82efb9..f400079 100644
--- a/Tests/RunCMake/message/warnmessage-rootdir.cmake
+++ b/Tests/RunCMake/message/warnmessage-rootdir.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.15)
-
# Generating the backtrace for this warning message used to trigger a
# spurious assertion when the current directory is the root directory
message(WARNING "We expect to see this warning message")
diff --git a/Tests/RunCMake/no_install_prefix/CMakeLists.txt b/Tests/RunCMake/no_install_prefix/CMakeLists.txt
index 74b3ff8..93ee9df 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 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/project/CMP0048-NEW-stderr.txt b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt
new file mode 100644
index 0000000..ad75f43
--- /dev/null
+++ b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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/project/CMP0048-OLD-stderr.txt b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt
index 695fb70..376249b 100644
--- a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt
+++ b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMP0048-OLD.cmake:1 \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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 CMP0048-OLD\.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0048 will be removed from a future version
- of CMake.
+ 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
diff --git a/Tests/RunCMake/project/CMakeLists.txt b/Tests/RunCMake/project/CMakeLists.txt
index fdcaee9..a0ee6d7 100644
--- a/Tests/RunCMake/project/CMakeLists.txt
+++ b/Tests/RunCMake/project/CMakeLists.txt
@@ -1,5 +1,9 @@
-if(NOT "x${RunCMake_TEST}" STREQUAL "xNoMinimumRequired")
+if("x${RunCMake_TEST}" STREQUAL "xNoMinimumRequired")
+ # No cmake_minimum_required(VERSION)
+elseif(RunCMake_TEST MATCHES "^CMP0048")
cmake_minimum_required(VERSION 2.8.12)
+else()
+ cmake_minimum_required(VERSION 3.5)
endif()
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt
index fc1a02b..c72534f 100644
--- a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt
+++ b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt
@@ -1,4 +1,4 @@
-^CMake Warning \(dev\) in CMakeLists.txt:
+^CMake Warning \(dev\) in CMakeLists\.txt:
No project\(\) command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project\(\) command. Add a line of
code such as
@@ -8,5 +8,12 @@
near the top of the file, but after cmake_minimum_required\(\).
CMake is pretending there is a "project\(Project\)" command on the first
- line.
-This warning is for project developers. Use -Wno-dev to suppress it.$
+ line\.
+This warning is for project developers. Use -Wno-dev to suppress it\.
++
+CMake Deprecation Warning at CMakeLists\.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 3\.5 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/separate_arguments/CMakeLists.txt b/Tests/RunCMake/separate_arguments/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/separate_arguments/CMakeLists.txt
+++ b/Tests/RunCMake/separate_arguments/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/set/CMakeLists.txt b/Tests/RunCMake/set/CMakeLists.txt
index 4b3de84..93ee9df 100644
--- a/Tests/RunCMake/set/CMakeLists.txt
+++ b/Tests/RunCMake/set/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/set/ParentPulling.cmake b/Tests/RunCMake/set/ParentPulling.cmake
index 2614533..5649cb2 100644
--- a/Tests/RunCMake/set/ParentPulling.cmake
+++ b/Tests/RunCMake/set/ParentPulling.cmake
@@ -1,6 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
-project(Minimal NONE)
-
function(test_set)
set(blah "value2")
message("before PARENT_SCOPE blah=${blah}")
diff --git a/Tests/RunCMake/set/ParentPullingRecursive.cmake b/Tests/RunCMake/set/ParentPullingRecursive.cmake
index a3e29f5..4d50561 100644
--- a/Tests/RunCMake/set/ParentPullingRecursive.cmake
+++ b/Tests/RunCMake/set/ParentPullingRecursive.cmake
@@ -1,6 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
-project(Minimal NONE)
-
function(report where)
message("----------")
message("variable values at ${where}:")
diff --git a/Tests/RunCMake/set_property/CMakeLists.txt b/Tests/RunCMake/set_property/CMakeLists.txt
index 18dfd26..93ee9df 100644
--- a/Tests/RunCMake/set_property/CMakeLists.txt
+++ b/Tests/RunCMake/set_property/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/string/CMakeLists.txt b/Tests/RunCMake/string/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/string/CMakeLists.txt
+++ b/Tests/RunCMake/string/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/string/RegexClear.cmake b/Tests/RunCMake/string/RegexClear.cmake
index d5edaac..4abe25e 100644
--- a/Tests/RunCMake/string/RegexClear.cmake
+++ b/Tests/RunCMake/string/RegexClear.cmake
@@ -1,6 +1,3 @@
-cmake_minimum_required (VERSION 3.0)
-project (RegexClear C)
-
function (output_results msg)
message("results from: ${msg}")
message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--")
diff --git a/Tests/RunCMake/string/RegexMultiMatchClear.cmake b/Tests/RunCMake/string/RegexMultiMatchClear.cmake
index 80b6b3c..788ba5e 100644
--- a/Tests/RunCMake/string/RegexMultiMatchClear.cmake
+++ b/Tests/RunCMake/string/RegexMultiMatchClear.cmake
@@ -1,6 +1,3 @@
-cmake_minimum_required (VERSION 3.0)
-project (RegexClear NONE)
-
function (output_results msg)
message("results from: ${msg}")
message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--")
diff --git a/Tests/RunCMake/target_compile_features/CMakeLists.txt b/Tests/RunCMake/target_compile_features/CMakeLists.txt
index 2897109..93ee9df 100644
--- a/Tests/RunCMake/target_compile_features/CMakeLists.txt
+++ b/Tests/RunCMake/target_compile_features/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake b/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake
index 316b74b..4a0f068 100644
--- a/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake
+++ b/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.16...3.17)
-
enable_language(C)
add_library (func SHARED func.c)
diff --git a/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake b/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake
index 22d3df7..6610d40 100644
--- a/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake
+++ b/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.16...3.17)
-
enable_language(C)
enable_language(CXX)
diff --git a/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake b/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake
index 9feccd0..e2bd669 100644
--- a/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake
+++ b/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake
@@ -1,6 +1,3 @@
-
-cmake_minimum_required(VERSION 3.16...3.17)
-
enable_language(C)
enable_language(CXX)
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake
index 6c72546..a5bf2fb 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)
+cmake_policy(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 dfdf70b..d6f34a1 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)
+cmake_policy(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 667561e..8eb5748 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.12)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
index 189592d..7c5d77d 100644
--- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug)
diff --git a/Tests/RunCMake/target_sources/CMP0076-WARN.cmake b/Tests/RunCMake/target_sources/CMP0076-WARN.cmake
index 2e07331..20f1d5e 100644
--- a/Tests/RunCMake/target_sources/CMP0076-WARN.cmake
+++ b/Tests/RunCMake/target_sources/CMP0076-WARN.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.12)
-
add_library(publiclib)
add_subdirectory(CMP0076-WARN)
diff --git a/Tests/RunCMake/target_sources/OriginDebug-stderr.txt b/Tests/RunCMake/target_sources/OriginDebug-stderr.txt
index 502d5f1..fd797cf 100644
--- a/Tests/RunCMake/target_sources/OriginDebug-stderr.txt
+++ b/Tests/RunCMake/target_sources/OriginDebug-stderr.txt
@@ -1,4 +1,4 @@
-CMake Debug Log at OriginDebug.cmake:13 \(add_library\):
+CMake Debug Log at OriginDebug\.cmake:10 \(add_library\):
Used sources for target OriginDebug:
\* .*Tests/RunCMake/target_sources/empty_2.cpp
@@ -6,7 +6,7 @@ CMake Debug Log at OriginDebug.cmake:13 \(add_library\):
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
.*
-CMake Debug Log at OriginDebug.cmake:16 \(set_property\):
+CMake Debug Log at OriginDebug\.cmake:13 \(set_property\):
Used sources for target OriginDebug:
\* .*Tests/RunCMake/target_sources/empty_3.cpp
@@ -14,7 +14,7 @@ CMake Debug Log at OriginDebug.cmake:16 \(set_property\):
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
.*
-CMake Debug Log at OriginDebug.cmake:20 \(target_sources\):
+CMake Debug Log at OriginDebug\.cmake:17 \(target_sources\):
Used sources for target OriginDebug:
\* .*Tests/RunCMake/target_sources/empty_4.cpp
@@ -22,7 +22,7 @@ CMake Debug Log at OriginDebug.cmake:20 \(target_sources\):
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
.*
-CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\):
+CMake Debug Log at OriginDebug\.cmake:11 \(target_link_libraries\):
Used sources for target OriginDebug:
\* .*Tests/RunCMake/target_sources/empty_1.cpp
diff --git a/Tests/RunCMake/target_sources/OriginDebug.cmake b/Tests/RunCMake/target_sources/OriginDebug.cmake
index d40a1d8..e2d8477 100644
--- a/Tests/RunCMake/target_sources/OriginDebug.cmake
+++ b/Tests/RunCMake/target_sources/OriginDebug.cmake
@@ -1,7 +1,4 @@
-
-cmake_minimum_required(VERSION 3.0)
-
-project(OriginDebug)
+enable_language(CXX)
set(CMAKE_DEBUG_TARGET_PROPERTIES SOURCES)
diff --git a/Tests/RunCMake/try_compile/CMP0056.cmake b/Tests/RunCMake/try_compile/CMP0056.cmake
index 2ab79d5..634576e 100644
--- a/Tests/RunCMake/try_compile/CMP0056.cmake
+++ b/Tests/RunCMake/try_compile/CMP0056.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_policy(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 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/try_compile/CMakeLists.txt
+++ b/Tests/RunCMake/try_compile/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/try_run/CMakeLists.txt b/Tests/RunCMake/try_run/CMakeLists.txt
index e93f0b6..e6c41a5 100644
--- a/Tests/RunCMake/try_run/CMakeLists.txt
+++ b/Tests/RunCMake/try_run/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
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 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/variable_watch/CMakeLists.txt
+++ b/Tests/RunCMake/variable_watch/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/while/CMakeLists.txt b/Tests/RunCMake/while/CMakeLists.txt
index 74b3ff8..93ee9df 100644
--- a/Tests/RunCMake/while/CMakeLists.txt
+++ b/Tests/RunCMake/while/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index b084dd5..fee21b6 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeDeveloperReference_STANDALONE 1)
- cmake_minimum_required(VERSION 3.13...3.24 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.13...3.25 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index a9aa47d..bde6c6b 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeHelp_STANDALONE 1)
- cmake_minimum_required(VERSION 3.13...3.24 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.13...3.25 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in
index fc3ecb5..d4e4059 100644
--- a/Utilities/Sphinx/conf.py.in
+++ b/Utilities/Sphinx/conf.py.in
@@ -89,3 +89,11 @@ html_favicon = '@conf_path@/static/cmake-favicon.ico'
# qthelp_qch_name = "CMake.qch"
linkcheck_ignore = [r'about:|https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack']
+
+linkcheck_allowed_redirects = {
+ r'https://cdash\.org': r'https://www\.cdash\.org/',
+ r'https://docs\.nvidia\.com/cuda/': r'https://docs\.nvidia\.com/cuda/index\.html',
+ r'https://learn\.microsoft\.com/en-us/cpp/c-language/parsing-c-command-line-arguments': r'https://learn\.microsoft\.com/en-us/cpp/c-language/parsing-c-command-line-arguments\?.*',
+ r'https://openjdk\.java\.net/jeps/313': r'https://openjdk\.org:443/jeps/313',
+ r'https://www\.sphinx-doc\.org': r'https://www\.sphinx-doc\.org/en/master/',
+}
diff --git a/bootstrap b/bootstrap
index ea9816c..83f4814 100755
--- a/bootstrap
+++ b/bootstrap
@@ -569,7 +569,6 @@ KWSYS_FILES="\
RegularExpression.hxx \
Status.hxx \
String.h \
- String.hxx \
System.h \
SystemTools.hxx \
Terminal.h"