summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Architecture/CMakeLists.txt2
-rw-r--r--Tests/ArgumentExpansion/CMakeLists.txt2
-rw-r--r--Tests/BundleGeneratorTest/CMakeLists.txt2
-rw-r--r--Tests/BundleUtilities/CMakeLists.txt2
-rw-r--r--Tests/CFBundleTest/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/add_compile_options/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/target_compile_options/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/target_include_directories/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/target_link_libraries/CMakeLists.txt2
-rw-r--r--Tests/CMakeLib/CMakeLists.txt1
-rw-r--r--Tests/CMakeLib/testCTestResourceAllocator.cxx16
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec.cxx115
-rw-r--r--Tests/CMakeLib/testGccDepfileReader_data/deps1.txt30
-rw-r--r--Tests/CMakeLib/testGccDepfileReader_data/deps3.txt8
-rw-r--r--Tests/CMakeLib/testJSONHelpers.cxx203
-rw-r--r--Tests/CMakeLib/testList.cxx995
-rw-r--r--Tests/CMakeLib/testRST.expect28
-rw-r--r--Tests/CMakeLib/testRST.rst28
-rw-r--r--Tests/CMakeLib/testSystemTools.cxx47
-rw-r--r--Tests/CMakeLib/testVisualStudioSlnParser.cxx1
-rw-r--r--Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file16
-rw-r--r--Tests/CMakeLists.txt64
-rw-r--r--Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CheckLanguage/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CompilerIdOBJC/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CompilerIdOBJCXX/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/LinkInterfaceLoop/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/TargetScope/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/find_library/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/find_path/CMakeLists.txt2
-rw-r--r--Tests/CMakeTests/EndStuffTestScript.cmake2
-rw-r--r--Tests/COnly/CMakeLists.txt8
-rw-r--r--Tests/CPackComponents/CMakeLists.txt2
-rw-r--r--Tests/CPackInnoSetupGenerator/CMakeLists.txt55
-rw-r--r--Tests/CPackInnoSetupGenerator/Code.pas4
-rw-r--r--Tests/CPackInnoSetupGenerator/RunCPackVerifyResult.cmake136
-rw-r--r--Tests/CPackInnoSetupGenerator/main.c7
-rw-r--r--Tests/CPackInnoSetupGenerator/my_bitmap.bmpbin0 -> 9294 bytes
-rw-r--r--Tests/CPackInnoSetupGenerator/my_file.txt1
-rw-r--r--Tests/CPackTestAllGenerators/CMakeLists.txt2
-rw-r--r--Tests/CPackWiXGenerator/CMakeLists.txt2
-rw-r--r--Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt2
-rw-r--r--Tests/CTestCoverageCollectGCOV/test.cmake.in2
-rw-r--r--Tests/CTestLimitDashJ/CMakeLists.txt2
-rw-r--r--Tests/CTestTest/SmallAndFast/CMakeLists.txt2
-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/CMakeLists.txt2
-rw-r--r--Tests/CTestTestCrash/test.cmake.in2
-rw-r--r--Tests/CTestTestCycle/CMakeLists.txt2
-rw-r--r--Tests/CTestTestCycle/test.cmake.in2
-rw-r--r--Tests/CTestTestDepends/CMakeLists.txt2
-rw-r--r--Tests/CTestTestDepends/test.cmake.in2
-rw-r--r--Tests/CTestTestEmptyBinaryDirectory/test.cmake.in2
-rw-r--r--Tests/CTestTestFailure/CMakeLists.txt2
-rw-r--r--Tests/CTestTestFailure/testNoBuild.cmake.in2
-rw-r--r--Tests/CTestTestFailure/testNoExe.cmake.in2
-rw-r--r--Tests/CTestTestFdSetSize/test.cmake.in2
-rw-r--r--Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt2
-rw-r--r--Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt2
-rw-r--r--Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt2
-rw-r--r--Tests/CTestTestLaunchers/test.cmake.in2
-rw-r--r--Tests/CTestTestMissingDependsExe/CMakeLists.txt2
-rw-r--r--Tests/CTestTestParallel/CMakeLists.txt2
-rw-r--r--Tests/CTestTestParallel/test.cmake.in2
-rw-r--r--Tests/CTestTestResourceLock/CMakeLists.txt2
-rw-r--r--Tests/CTestTestResourceLock/test.cmake.in2
-rw-r--r--Tests/CTestTestScheduler/CMakeLists.txt2
-rw-r--r--Tests/CTestTestScheduler/test.cmake.in2
-rw-r--r--Tests/CTestTestSerialInDepends/CMakeLists.txt2
-rw-r--r--Tests/CTestTestSerialOrder/CMakeLists.txt2
-rw-r--r--Tests/CTestTestSkipReturnCode/CMakeLists.txt2
-rw-r--r--Tests/CTestTestSkipReturnCode/test.cmake.in2
-rw-r--r--Tests/CTestTestStopTime/CMakeLists.txt2
-rw-r--r--Tests/CTestTestStopTime/GetDate.cmake2
-rw-r--r--Tests/CTestTestStopTime/test.cmake.in2
-rw-r--r--Tests/CTestTestSubdir/CMakeLists.txt2
-rw-r--r--Tests/CTestTestSubdir/test.cmake.in2
-rw-r--r--Tests/CTestTestTimeout/test.cmake.in2
-rw-r--r--Tests/CTestTestUpload/CMakeLists.txt2
-rw-r--r--Tests/CTestTestUpload/test.cmake.in2
-rw-r--r--Tests/CTestTestVerboseOutput/CMakeLists.txt2
-rw-r--r--Tests/CTestTestVerboseOutput/test.cmake.in2
-rw-r--r--Tests/CTestTestZeroTimeout/CMakeLists.txt2
-rw-r--r--Tests/CTestTestZeroTimeout/test.cmake.in2
-rw-r--r--Tests/CheckCompilerRelatedVariables/CMakeLists.txt2
-rw-r--r--Tests/CheckFortran.cmake2
-rw-r--r--Tests/CompileDefinitions/CMakeLists.txt2
-rw-r--r--Tests/CompileFeatures/default_dialect.c3
-rw-r--r--Tests/Contracts/Trilinos/CMakeLists.txt2
-rw-r--r--Tests/Contracts/VTK/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/CMakeLists.txt3
-rw-r--r--Tests/CudaOnly/CUBIN/CMakeLists.txt29
-rw-r--r--Tests/CudaOnly/CUBIN/kernelA.cu7
-rw-r--r--Tests/CudaOnly/CUBIN/kernelB.cu7
-rw-r--r--Tests/CudaOnly/CUBIN/kernelC.cu7
-rw-r--r--Tests/CudaOnly/CUBIN/main.cu58
-rw-r--r--Tests/CudaOnly/CUBIN/main_no_native_archs.cu4
-rw-r--r--Tests/CudaOnly/Fatbin/CMakeLists.txt25
-rw-r--r--Tests/CudaOnly/Fatbin/main.cu58
-rw-r--r--Tests/CudaOnly/OptixIR/CMakeLists.txt33
-rw-r--r--Tests/CudaOnly/OptixIR/main.cu53
-rw-r--r--Tests/CudaOnly/RuntimeControls/verify_runtime.cmake2
-rw-r--r--Tests/CustomCommand/CMakeLists.txt2
-rw-r--r--Tests/CustomCommandByproducts/External/CMakeLists.txt2
-rw-r--r--Tests/CustomCommandWorkingDirectory/CMakeLists.txt2
-rw-r--r--Tests/CxxDialect/CMakeLists.txt3
-rw-r--r--Tests/CxxOnly/CMakeLists.txt2
-rw-r--r--Tests/Dependency/CMakeLists.txt2
-rw-r--r--Tests/EmptyDepends/CMakeLists.txt2
-rw-r--r--Tests/EnforceConfig.cmake.in5
-rw-r--r--Tests/ExportImport/Import/try_compile/CMakeLists.txt2
-rw-r--r--Tests/ExternalProject/CMakeLists.txt2
-rw-r--r--Tests/ExternalProject/Example/CMakeLists.txt2
-rw-r--r--Tests/ExternalProjectLocal/CMakeLists.txt2
-rw-r--r--Tests/ExternalProjectUpdate/CMakeLists.txt2
-rw-r--r--Tests/FindBLAS/Test/CMakeLists.txt2
-rw-r--r--Tests/FindBZip2/Test/CMakeLists.txt2
-rw-r--r--Tests/FindBoost/Test/CMakeLists.txt2
-rw-r--r--Tests/FindBoost/TestFail/CMakeLists.txt2
-rw-r--r--Tests/FindBoost/TestHeaders/CMakeLists.txt2
-rw-r--r--Tests/FindDevIL/Test/CMakeLists.txt2
-rw-r--r--Tests/FindGIF/Test/CMakeLists.txt2
-rw-r--r--Tests/FindGLEW/Test/CMakeLists.txt2
-rw-r--r--Tests/FindGSL/rng/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/atk/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/atkmm/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/cairo/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/cairomm/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gdk/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gdk_pixbuf/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gdkmm/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gio/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/giomm/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/glib/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/glibmm/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gmodule/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gobject/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gthread/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gtk/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/gtkmm/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/pango/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/pangocairo/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/pangoft2/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/pangomm/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/pangoxft/CMakeLists.txt2
-rw-r--r--Tests/FindGTK2/sigc++/CMakeLists.txt2
-rw-r--r--Tests/FindGTest/Test/CMakeLists.txt2
-rw-r--r--Tests/FindGnuTLS/Test/CMakeLists.txt2
-rw-r--r--Tests/FindHDF5/CMakeLists.txt87
-rw-r--r--Tests/FindHDF5/Test/CMakeLists.txt106
-rw-r--r--Tests/FindHDF5/Test/test_C.c12
-rw-r--r--Tests/FindHDF5/Test/test_CXX.cxx14
-rw-r--r--Tests/FindHDF5/Test/test_Fortran.f906
-rw-r--r--Tests/FindICU/Test/CMakeLists.txt2
-rw-r--r--Tests/FindImageMagick/Test/CMakeLists.txt2
-rw-r--r--Tests/FindJPEG/Test/CMakeLists.txt2
-rw-r--r--Tests/FindJsonCpp/Test/CMakeLists.txt2
-rw-r--r--Tests/FindLAPACK/Test/CMakeLists.txt2
-rw-r--r--Tests/FindLibLZMA/Test/CMakeLists.txt2
-rw-r--r--Tests/FindLibXml2/Test/CMakeLists.txt2
-rw-r--r--Tests/FindLibXslt/Test/CMakeLists.txt2
-rw-r--r--Tests/FindMPI/CMakeLists.txt3
-rw-r--r--Tests/FindMatlab/basic_checks/CMakeLists.txt2
-rw-r--r--Tests/FindMatlab/components_checks/CMakeLists.txt2
-rw-r--r--Tests/FindMatlab/failure_reports/CMakeLists.txt2
-rw-r--r--Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt2
-rw-r--r--Tests/FindMatlab/r2018a_check/CMakeLists.txt2
-rw-r--r--Tests/FindMatlab/targets_checks/CMakeLists.txt2
-rw-r--r--Tests/FindMatlab/versions_checks/CMakeLists.txt2
-rw-r--r--Tests/FindODBC/Test/CMakeLists.txt2
-rw-r--r--Tests/FindOpenAL/Test/CMakeLists.txt6
-rw-r--r--Tests/FindOpenAL/Test/main.cxx9
-rw-r--r--Tests/FindOpenCL/Test/CMakeLists.txt2
-rw-r--r--Tests/FindOpenGL/Test/CMakeLists.txt129
-rw-r--r--Tests/FindOpenGL/Test/main_gles2.c17
-rw-r--r--Tests/FindOpenGL/Test/main_gles3.c17
-rw-r--r--Tests/FindOpenSP/Test/CMakeLists.txt2
-rw-r--r--Tests/FindOpenSSL/rand/CMakeLists.txt2
-rw-r--r--Tests/FindPNG/Test/CMakeLists.txt2
-rw-r--r--Tests/FindPatch/CMakeLists.txt1
-rw-r--r--Tests/FindPython/ArtifactsInteractive/CMakeLists.txt2
-rw-r--r--Tests/FindPython/CustomFailureMessage/CMakeLists.txt2
-rw-r--r--Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt2
-rw-r--r--Tests/FindPython/DifferentComponents/CMakeLists.txt2
-rw-r--r--Tests/FindPython/ExactVersion/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Implementation/CMakeLists.txt2
-rw-r--r--Tests/FindPython/IronPython/CMakeLists.txt2
-rw-r--r--Tests/FindPython/IronPython2/CMakeLists.txt2
-rw-r--r--Tests/FindPython/MultiplePackages/CMakeLists.txt2
-rw-r--r--Tests/FindPython/NumPy/CMakeLists.txt2
-rw-r--r--Tests/FindPython/NumPyOnly/CMakeLists.txt2
-rw-r--r--Tests/FindPython/PyPy/CMakeLists.txt2
-rw-r--r--Tests/FindPython/PyPy2/CMakeLists.txt2
-rw-r--r--Tests/FindPython/PyPy3/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python2/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python2Embedded/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python2Fail/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python2Module/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python2SABIModule/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python3/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python3Embedded/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python3Fail/CMakeLists.txt2
-rw-r--r--Tests/FindPython/Python3Module/CMakeLists.txt2
-rw-r--r--Tests/FindPython/RequiredArtifacts/CMakeLists.txt2
-rw-r--r--Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt2
-rw-r--r--Tests/FindPython/SOABI/CMakeLists.txt2
-rw-r--r--Tests/FindPython/VirtualEnv/CMakeLists.txt2
-rw-r--r--Tests/FindPython/VirtualEnvConda/CMakeLists.txt2
-rw-r--r--Tests/FindSDL/Test/CMakeLists.txt2
-rw-r--r--Tests/FindSQLite3/Test/CMakeLists.txt2
-rw-r--r--Tests/FindTIFF/Test/CMakeLists.txt2
-rw-r--r--Tests/FindThreads/C-only/CMakeLists.txt2
-rw-r--r--Tests/FindThreads/CXX-only/CMakeLists.txt2
-rw-r--r--Tests/FindVulkan/Test/CMakeLists.txt2
-rw-r--r--Tests/FindX11/Test/CMakeLists.txt57
-rw-r--r--Tests/FindX11/Test/main.c552
-rw-r--r--Tests/FindXalanC/Test/CMakeLists.txt2
-rw-r--r--Tests/FindXercesC/Test/CMakeLists.txt2
-rw-r--r--Tests/FindwxWidgets/CMakeLists.txt10
-rw-r--r--Tests/FindwxWidgets/Test/CMakeLists.txt17
-rw-r--r--Tests/FindwxWidgets/Test/main.cpp7
-rw-r--r--Tests/Fortran/CMakeLists.txt2
-rw-r--r--Tests/FortranC/CMakeLists.txt2
-rw-r--r--Tests/FortranOnly/CMakeLists.txt19
-rw-r--r--Tests/Framework/CMakeLists.txt2
-rw-r--r--Tests/FunctionTest/CMakeLists.txt2
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt16
-rw-r--r--Tests/GeneratorExpression/check-part3.cmake1
-rw-r--r--Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt2
-rw-r--r--Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt2
-rw-r--r--Tests/InterfaceLibrary/CMakeLists.txt2
-rw-r--r--Tests/JCTest/CMakeLists.txt2
-rw-r--r--Tests/Java/CMakeLists.txt2
-rw-r--r--Tests/JavaJavah/CMakeLists.txt2
-rw-r--r--Tests/JavaNativeHeaders/CMakeLists.txt2
-rw-r--r--Tests/LinkDirectory/CMakeLists.txt2
-rw-r--r--Tests/LinkDirectory/External/CMakeLists.txt2
-rw-r--r--Tests/LinkFlags/CMakeLists.txt7
-rw-r--r--Tests/LoadCommand/CMakeCommands/CMakeLists.txt2
-rw-r--r--Tests/LoadCommand/CMakeLists.txt3
-rw-r--r--Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt2
-rw-r--r--Tests/LoadCommandOneConfig/CMakeLists.txt3
-rw-r--r--Tests/MFC/CMakeLists.txt2
-rw-r--r--Tests/MFC/CMakeLists.txt.in2
-rw-r--r--Tests/MFC/try_compile/CMakeLists.txt2
-rw-r--r--Tests/MSManifest/Subdir/CMakeLists.txt5
-rw-r--r--Tests/MSManifest/Subdir2/CMakeLists.txt10
-rw-r--r--Tests/MacRuntimePath/A/CMakeLists.txt2
-rw-r--r--Tests/MacRuntimePath/B/CMakeLists.txt2
-rw-r--r--Tests/MakeClean/CMakeLists.txt2
-rw-r--r--Tests/MissingSourceFile/CMakeLists.txt2
-rw-r--r--Tests/ModuleDefinition/CMakeLists.txt2
-rw-r--r--Tests/NewlineArgs/CMakeLists.txt2
-rw-r--r--Tests/ObjectLibrary/CMakeLists.txt2
-rw-r--r--Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt2
-rw-r--r--Tests/ObjectLibrary/ExportLanguages/ExportLanguagesTest/CMakeLists.txt2
-rw-r--r--Tests/OutDir/CMakeLists.txt2
-rw-r--r--Tests/PDBDirectoryAndName/CMakeLists.txt3
-rw-r--r--Tests/Plugin/CMakeLists.txt3
-rw-r--r--Tests/Plugin/PluginTest/CMakeLists.txt2
-rw-r--r--Tests/PositionIndependentTargets/CMakeLists.txt2
-rw-r--r--Tests/Preprocess/CMakeLists.txt4
-rw-r--r--Tests/Qt4And5Automoc/CMakeLists.txt2
-rw-r--r--Tests/Qt4Targets/CMakeLists.txt2
-rw-r--r--Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt2
-rw-r--r--Tests/QtAutogen/GlobalAutogenExecutable/CMakeLists.txt30
-rw-r--r--Tests/QtAutogen/GlobalAutogenExecutable/main.cpp4
-rw-r--r--Tests/QtAutogen/GlobalAutogenSystemUseInclude/CMakeLists.txt28
-rw-r--r--Tests/QtAutogen/GlobalAutogenSystemUseInclude/main.cpp4
-rw-r--r--Tests/QtAutogen/MocInterfaceMacroNames/CMakeLists.txt61
-rw-r--r--Tests/QtAutogen/MocInterfaceMacroNames/CheckAutogenJson.cmake27
-rw-r--r--Tests/QtAutogen/MocInterfaceMacroNames/CheckExportTargets.cmake45
-rw-r--r--Tests/QtAutogen/MocInterfaceMacroNames/dummy.cpp4
-rw-r--r--Tests/QtAutogen/MocInterfaceMacroNames/shared_lib.cpp6
-rw-r--r--Tests/QtAutogen/MocInterfaceMacroNames/static_lib.cpp3
-rw-r--r--Tests/QtAutogen/RccAutogenBuildDir/CMakeLists.txt33
-rw-r--r--Tests/QtAutogen/RccAutogenBuildDir/lib.cpp6
-rw-r--r--Tests/QtAutogen/RccAutogenBuildDir/lib.h6
-rw-r--r--Tests/QtAutogen/RccAutogenBuildDir/main.cpp7
-rw-r--r--Tests/QtAutogen/RccAutogenBuildDir/resource.qrc2
-rw-r--r--Tests/QtAutogen/Tests.cmake8
-rw-r--r--Tests/QtAutomocNoQt/CMakeLists.txt2
-rw-r--r--Tests/ReturnTest/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/AddRunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/AppleSilicon/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/AppleSilicon/default-target-arm64-build-check.cmake5
-rw-r--r--Tests/RunCMake/AppleSilicon/default-target-arm64.cmake5
-rw-r--r--Tests/RunCMake/AppleSilicon/default-target-x86_64-build-check.cmake5
-rw-r--r--Tests/RunCMake/AppleSilicon/default-target-x86_64.cmake5
-rw-r--r--Tests/RunCMake/AppleTextStubs/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/AppleTextStubs/Framework-export.cmake12
-rw-r--r--Tests/RunCMake/AppleTextStubs/Framework-import.cmake62
-rw-r--r--Tests/RunCMake/AppleTextStubs/Framework-install-check.cmake1
-rw-r--r--Tests/RunCMake/AppleTextStubs/Framework.cmake59
-rw-r--r--Tests/RunCMake/AppleTextStubs/Library-export.cmake12
-rw-r--r--Tests/RunCMake/AppleTextStubs/Library-import.cmake54
-rw-r--r--Tests/RunCMake/AppleTextStubs/LibraryWithOutputs-install-check.cmake1
-rw-r--r--Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake52
-rw-r--r--Tests/RunCMake/AppleTextStubs/LibraryWithVersions-install-check.cmake1
-rw-r--r--Tests/RunCMake/AppleTextStubs/LibraryWithVersions.cmake96
-rw-r--r--Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake58
-rw-r--r--Tests/RunCMake/AppleTextStubs/Simple-install-check.cmake1
-rw-r--r--Tests/RunCMake/AppleTextStubs/Simple.cmake41
-rw-r--r--Tests/RunCMake/AppleTextStubs/foo-config.cmake.in1
-rw-r--r--Tests/RunCMake/AppleTextStubs/foo.c5
-rw-r--r--Tests/RunCMake/AppleTextStubs/main.c7
-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/Autogen/AutogenUseSystemIncludeCommon.cmake10
-rw-r--r--Tests/RunCMake/Autogen/AutogenUseSystemIncludeOff.cmake3
-rw-r--r--Tests/RunCMake/Autogen/AutogenUseSystemIncludeOn.cmake3
-rw-r--r--Tests/RunCMake/Autogen/CMP0151-common.cmake10
-rw-r--r--Tests/RunCMake/Autogen/CMP0151-new.cmake1
-rw-r--r--Tests/RunCMake/Autogen/CMP0151-old.cmake1
-rw-r--r--Tests/RunCMake/Autogen/Inspect.cmake13
-rw-r--r--Tests/RunCMake/Autogen/MocPredefs-build-stderr.txt1
-rw-r--r--Tests/RunCMake/Autogen/MocPredefs-check.cxx60
-rw-r--r--Tests/RunCMake/Autogen/MocPredefs-prefix.cmake3
-rw-r--r--Tests/RunCMake/Autogen/MocPredefs.cmake39
-rw-r--r--Tests/RunCMake/Autogen/MocPredefs.cxx3
-rw-r--r--Tests/RunCMake/Autogen/RunCMakeTest.cmake73
-rw-r--r--Tests/RunCMake/BuildDepends/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/BuildDepends/LinkDepends.cmake22
-rw-r--r--Tests/RunCMake/BuildDepends/LinkDepends.step1.cmake23
-rw-r--r--Tests/RunCMake/BuildDepends/LinkDepends.step2.cmake4
-rw-r--r--Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake11
-rw-r--r--Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake13
-rw-r--r--Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.step1.cmake11
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake12
-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/CMP0115/CMP0115-OLD-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-NEW-Test1-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-NEW-Test4-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-NEW-Test4b-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-NEW-Test7-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-NEW-Test9-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test1-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test10-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test14-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test6-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test8-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt5
-rw-r--r--Tests/RunCMake/CMP0118/GenInSubdir-WARN-stderr.txt5
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt4
-rw-r--r--Tests/RunCMake/CMP0139/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-NEW-build-stdout.txt7
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-NEW-resolve.cmake107
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-NEW-stdout.txt4
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-NEW.cmake45
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-OLD-build-stdout.txt3
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-OLD-common.cmake21
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-OLD-stdout.txt3
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-WARN-build-stdout.txt3
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-WARN-stderr.txt25
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-WARN-stdout.txt3
-rw-r--r--Tests/RunCMake/CMP0150/CMP0150-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0150/CMakeLists.txt27
-rw-r--r--Tests/RunCMake/CMP0150/CMakeLists.txt.in23
-rw-r--r--Tests/RunCMake/CMP0150/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/CMakeLists.txt22
-rw-r--r--Tests/RunCMake/CMakePresets/Comment-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPenvInInclude-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPenvInInclude-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPenvInInclude.json.in11
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt8
-rw-r--r--Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/ExplicitNoTrace.cmake (renamed from Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt)0
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/HighVersion-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt6
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeExpansion-stdout.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeExpansion.json.in10
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt7
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt10
-rw-r--r--Tests/RunCMake/CMakePresets/LowVersion-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/NoTrace.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/NoVersion-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/RunCMakeTest.cmake20
-rw-r--r--Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/Trace-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/Trace.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/Trace.json.in69
-rw-r--r--Tests/RunCMake/CMakePresets/TraceAll.cmake4
-rw-r--r--Tests/RunCMake/CMakePresets/TraceExpand-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/TraceExpand.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/TraceFormatHuman-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/TraceFormatHuman.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/TraceFormatJSON-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/TraceFormatJSON.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/TraceNotSupported-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/TraceNotSupported-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/TraceNotSupported.json.in13
-rw-r--r--Tests/RunCMake/CMakePresets/TraceRedirect.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/TraceSource.cmake0
-rw-r--r--Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/validate_schema.py6
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt3
-rw-r--r--Tests/RunCMake/CPack/CMakeLists.txt6
-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/CMP0145-Dart-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CTest/CMP0145-Dart-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/CTest/CMP0145-Dart-NEW.cmake2
-rw-r--r--Tests/RunCMake/CTest/CMP0145-Dart-OLD.cmake7
-rw-r--r--Tests/RunCMake/CTest/CMP0145-Dart-WARN-stderr.txt18
-rw-r--r--Tests/RunCMake/CTest/CMP0145-Dart-WARN.cmake7
-rw-r--r--Tests/RunCMake/CTest/CMP0145-FindDart-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CTest/CMP0145-FindDart-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/CTest/CMP0145-FindDart-NEW.cmake2
-rw-r--r--Tests/RunCMake/CTest/CMP0145-FindDart-OLD.cmake7
-rw-r--r--Tests/RunCMake/CTest/CMP0145-FindDart-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/CTest/CMP0145-FindDart-WARN.cmake7
-rw-r--r--Tests/RunCMake/CTest/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CTest/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/CTestCommandLine/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/test.cmake.in2
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx6
-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/CheckCompilerFlag/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/CheckIPOSupported/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/CheckModules/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/ClangTidy/CXX.cmake2
-rw-r--r--Tests/RunCMake/CommandLine/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake0
-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/Cppcheck/CXX.cmake2
-rw-r--r--Tests/RunCMake/Cpplint/CXX.cmake2
-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/FetchContent/IgnoreToolchainFile.cmake2
-rw-r--r--Tests/RunCMake/FetchContent/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py214
-rw-r--r--Tests/RunCMake/File_Archive/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/File_Generate/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt10
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt13
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake2
-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.cmake12
-rw-r--r--Tests/RunCMake/Framework/FrameworkLayout.cmake1
-rw-r--r--Tests/RunCMake/Framework/consumer.c9
-rw-r--r--Tests/RunCMake/GNUInstallDirs/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-LIST/APPEND.cmake.in34
-rw-r--r--Tests/RunCMake/GenEx-LIST/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/FIND.cmake.in20
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index1-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index1.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index2-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index2.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index3-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index3-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET-wrong-index3.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/GET.cmake.in20
-rw-r--r--Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/INSERT.cmake.in50
-rw-r--r--Tests/RunCMake/GenEx-LIST/JOIN.cmake.in35
-rw-r--r--Tests/RunCMake/GenEx-LIST/LENGTH.cmake.in30
-rw-r--r--Tests/RunCMake/GenEx-LIST/POP_BACK.cmake.in18
-rw-r--r--Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in18
-rw-r--r--Tests/RunCMake/GenEx-LIST/PREPEND.cmake.in34
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_AT.cmake.in25
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_DUPLICATES.cmake.in20
-rw-r--r--Tests/RunCMake/GenEx-LIST/REMOVE_ITEM.cmake.in32
-rw-r--r--Tests/RunCMake/GenEx-LIST/REVERSE.cmake.in19
-rw-r--r--Tests/RunCMake/GenEx-LIST/RunCMakeTest.cmake130
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-option-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-option-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT-wrong-option.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SORT.cmake.in92
-rw-r--r--Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/SUBLIST.cmake.in32
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-APPEND.cmake.in50
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-PREPEND.cmake.in50
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE.cmake.in50
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-STRIP.cmake.in50
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-TOLOWER.cmake.in50
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-TOUPPER.cmake.in50
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-missing-arg-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-unexpected-arg-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action-stderr.txt7
-rw-r--r--Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/bad-option-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/bad-option-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/bad-option.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/check_errors.cmake13
-rw-r--r--Tests/RunCMake/GenEx-LIST/generate.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/missing-arg-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/missing-arg-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/missing-arg.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/no-arguments-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/no-arguments-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/no-arguments.cmake2
-rw-r--r--Tests/RunCMake/GenEx-LIST/unexpected-arg-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-LIST/unexpected-arg-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-LIST/unexpected-arg.cmake2
-rw-r--r--Tests/RunCMake/GenEx-PATH/ABSOLUTE_PATH.cmake.in24
-rw-r--r--Tests/RunCMake/GenEx-PATH/APPEND.cmake.in35
-rw-r--r--Tests/RunCMake/GenEx-PATH/CMAKE_PATH.cmake.in42
-rw-r--r--Tests/RunCMake/GenEx-PATH/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-PATH/GET_ITEM.cmake.in123
-rw-r--r--Tests/RunCMake/GenEx-PATH/NORMAL_PATH.cmake.in14
-rw-r--r--Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in14
-rw-r--r--Tests/RunCMake/GenEx-PATH/REMOVE_ITEM.cmake.in36
-rw-r--r--Tests/RunCMake/GenEx-PATH/REPLACE_ITEM.cmake.in36
-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_IMPORT_FILE/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/RunCMakeTest.cmake21
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE-check.cmake1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE.cmake47
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE_SUFFIX-check.cmake1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE_SUFFIX.cmake44
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target.cmake9
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target-stderr.txt9
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target.cmake9
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-check.cmake1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target-stderr.txt8
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target.cmake8
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE.cmake32
-rw-r--r--Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/empty.c0
-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/GenEx-TARGET_RUNTIME_DLLS/check.cmake15
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared-check.cmake15
-rw-r--r--Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake13
-rw-r--r--Tests/RunCMake/GenerateExportHeader/GEH.cmake4
-rw-r--r--Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libshared_export.h42
-rw-r--r--Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libstatic_export.h42
-rw-r--r--Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h2
-rw-r--r--Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h2
-rw-r--r--Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h2
-rw-r--r--Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h2
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadFieldNoComma-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadFieldNoComma-stderr.txt11
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadFieldNoComma.cmake1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadFieldUnknown-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadFieldUnknown-stderr.txt11
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadFieldUnknown.cmake1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionEmpty-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionEmpty-stderr.txt11
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionEmpty.cmake1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionMissing-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionMissing-stderr.txt11
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionMissing.cmake1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionPlatform-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionPlatform-stderr.txt19
-rw-r--r--Tests/RunCMake/GeneratorPlatform/BadVersionPlatform.cmake1
-rw-r--r--Tests/RunCMake/GeneratorPlatform/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake83
-rw-r--r--Tests/RunCMake/GeneratorPlatform/VersionExists-check.cmake9
-rw-r--r--Tests/RunCMake/GeneratorPlatform/VersionExists.cmake5
-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/C-error-Build-result.txt1
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/C-error-Build-stdout.txt4
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/C-error.cmake3
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/CXX-error-Build-result.txt1
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/CXX-error-Build-stdout.txt4
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/CXX-error.cmake3
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/CXX.cmake2
-rw-r--r--Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/genex_link.cmake5
-rw-r--r--Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt6
-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/MaxRecursionDepth/RunCMakeTest.cmake44
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-stderr.txt34
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-stderr.txt5
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt8
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt6
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-env-script-stderr.txt21
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-env-stderr.txt21
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt7
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt5
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt8
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt6
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/function-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/function-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/function-env-script-stderr.txt21
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/function-env-stderr.txt21
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/function-invalid-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-stderr.txt5
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/function-invalid-env-stderr.txt5
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/include-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/include-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/include-env-script-stderr.txt21
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/include-env-stderr.txt21
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/include-invalid-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-stderr.txt5
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/include-invalid-env-stderr.txt5
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/macro-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/macro-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/macro-env-script-stderr.txt21
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/macro-env-stderr.txt21
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-stderr.txt5
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-stderr.txt5
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/variable_watch-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-stderr.txt22
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/variable_watch-env-stderr.txt22
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-result.txt1
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-stderr.txt6
-rw-r--r--Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-stderr.txt6
-rw-r--r--Tests/RunCMake/MultiLint/CXX.cmake8
-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.cmake36
-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.cmake32
-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/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt1
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix.cmake1
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake9
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt6
-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/README.rst7
-rw-r--r--Tests/RunCMake/RunCMake.cmake26
-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/TargetArtifacts/CMakeLists.txt (renamed from Tests/RunCMake/ArtifactOutputDirs/CMakeLists.txt)0
-rw-r--r--Tests/RunCMake/TargetArtifacts/DLL-SOVERSION-build-stdout.txt2
-rw-r--r--Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake18
-rw-r--r--Tests/RunCMake/TargetArtifacts/OutputDirs.cmake (renamed from Tests/RunCMake/ArtifactOutputDirs/ArtifactOutputDirs.cmake)0
-rw-r--r--Tests/RunCMake/TargetArtifacts/RunCMakeTest.cmake (renamed from Tests/RunCMake/ArtifactOutputDirs/RunCMakeTest.cmake)12
-rw-r--r--Tests/RunCMake/TargetArtifacts/check.cmake (renamed from Tests/RunCMake/ArtifactOutputDirs/check.cmake)0
-rw-r--r--Tests/RunCMake/TargetArtifacts/dll.c6
-rw-r--r--Tests/RunCMake/TargetArtifacts/lib.c (renamed from Tests/RunCMake/ArtifactOutputDirs/lib.c)0
-rw-r--r--Tests/RunCMake/TargetArtifacts/main.c (renamed from Tests/RunCMake/ArtifactOutputDirs/main.c)0
-rw-r--r--Tests/RunCMake/TargetProperties/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/ToolchainFile/SetCrossCompiling-stderr.txt8
-rw-r--r--Tests/RunCMake/ToolchainFile/SetCrossCompiling-toolchain.cmake1
-rw-r--r--Tests/RunCMake/ToolchainFile/SetCrossCompiling.cmake0
-rw-r--r--Tests/RunCMake/TransformDepfile/deps-unix.d.txt8
-rw-r--r--Tests/RunCMake/TransformDepfile/deps-windows.d.txt8
-rw-r--r--Tests/RunCMake/VS10Project/CMakeInputs-check.cmake25
-rw-r--r--Tests/RunCMake/VS10Project/CMakeInputs.cmake0
-rw-r--r--Tests/RunCMake/VS10Project/CustomCommandParallel-check.cmake52
-rw-r--r--Tests/RunCMake/VS10Project/CustomCommandParallel.cmake5
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake4
-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-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake14
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-all-stderr-Borland.txt7
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-unresolved-all-stderr-Borland.txt4
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows.cmake5
-rw-r--r--Tests/RunCMake/file/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/file/REAL_PATH.cmake16
-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/CMP0144-NEW-CaseInsensitive-stderr.txt45
-rw-r--r--Tests/RunCMake/find_package/CMP0144-NEW-CaseInsensitive.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0144-NEW-CaseSensitive-stderr.txt45
-rw-r--r--Tests/RunCMake/find_package/CMP0144-NEW-CaseSensitive.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0144-OLD-CaseInsensitive-stderr.txt45
-rw-r--r--Tests/RunCMake/find_package/CMP0144-OLD-CaseInsensitive.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0144-OLD-CaseSensitive-stderr.txt45
-rw-r--r--Tests/RunCMake/find_package/CMP0144-OLD-CaseSensitive.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0144-WARN-CaseInsensitive-stderr.txt63
-rw-r--r--Tests/RunCMake/find_package/CMP0144-WARN-CaseInsensitive.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-Mixed-stderr.txt45
-rw-r--r--Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-Mixed.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-stderr.txt68
-rw-r--r--Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0144-common.cmake78
-rw-r--r--Tests/RunCMake/find_package/CMP0145-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/find_package/CMP0145-NEW.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0145-OLD.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0145-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/find_package/CMP0145-WARN.cmake6
-rw-r--r--Tests/RunCMake/find_package/CMP0146-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/find_package/CMP0146-NEW.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0146-OLD.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/find_package/CMP0146-WARN.cmake6
-rw-r--r--Tests/RunCMake/find_package/CMP0147-NEW-result.txt1
-rw-r--r--Tests/RunCMake/find_package/CMP0147-NEW-stderr.txt7
-rw-r--r--Tests/RunCMake/find_package/CMP0147-NEW.cmake2
-rw-r--r--Tests/RunCMake/find_package/CMP0147-OLD.cmake2
-rw-r--r--Tests/RunCMake/find_package/CMP0147-WARN.cmake2
-rw-r--r--Tests/RunCMake/find_package/CMP0147-common.cmake3
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-NEW.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-OLD.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-WARN.cmake6
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-NEW.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-OLD.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-WARN.cmake6
-rw-r--r--Tests/RunCMake/find_package/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake28
-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/CMP0024-NEW-stderr.txt11
-rw-r--r--Tests/RunCMake/include/CMP0024-NEW.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0024-WARN-stderr.txt26
-rw-r--r--Tests/RunCMake/include/CMP0024-WARN.cmake1
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-name-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-name-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-name.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-path-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-path-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-path.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0146-OLD.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0146-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/include/CMP0146-WARN.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-name-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-name-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-name.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-path-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-path-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-path.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-OLD.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-WARN.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-name-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-name-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-name.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-path-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-path-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-path.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-OLD.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-WARN.cmake7
-rw-r--r--Tests/RunCMake/include/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include/EmptyString-stderr.txt6
-rw-r--r--Tests/RunCMake/include/EmptyStringOptional-stderr.txt6
-rw-r--r--Tests/RunCMake/include/ExportExportInclude-stderr.txt7
-rw-r--r--Tests/RunCMake/include/IncludeIsDirectory-stderr.txt7
-rw-r--r--Tests/RunCMake/include/IncludeMalformed-stderr.txt17
-rw-r--r--Tests/RunCMake/include/RunCMakeTest.cmake14
-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.cmake10
-rw-r--r--Tests/RunCMake/install/SCRIPT-all-check.cmake2
-rw-r--r--Tests/RunCMake/install/SCRIPT.cmake6
-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-NAMELINK-No-Tweak.cmake20
-rw-r--r--Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt5
-rw-r--r--Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt5
-rw-r--r--Tests/RunCMake/install/TARGETS-RPATH.cmake3
-rw-r--r--Tests/RunCMake/install/empty3.cmake1
-rw-r--r--Tests/RunCMake/install/empty4.cmake1
-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/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/target_sources/FileSetDirect-result.txt1
-rw-r--r--Tests/RunCMake/target_sources/FileSetDirect-stderr.txt12
-rw-r--r--Tests/RunCMake/target_sources/FileSetDirect.cmake3
-rw-r--r--Tests/RunCMake/target_sources/FileSetFileNoExist-stderr.txt2
-rw-r--r--Tests/RunCMake/target_sources/FileSetWrongSyntax-result.txt1
-rw-r--r--Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt12
-rw-r--r--Tests/RunCMake/target_sources/FileSetWrongSyntax.cmake4
-rw-r--r--Tests/RunCMake/target_sources/MissingSource-result.txt1
-rw-r--r--Tests/RunCMake/target_sources/MissingSource-stderr.txt6
-rw-r--r--Tests/RunCMake/target_sources/MissingSource.cmake3
-rw-r--r--Tests/RunCMake/target_sources/OriginDebug-stderr.txt8
-rw-r--r--Tests/RunCMake/target_sources/OriginDebug.cmake5
-rw-r--r--Tests/RunCMake/target_sources/RunCMakeTest.cmake3
-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--Tests/StagingPrefix/Consumer/CMakeLists.txt2
-rw-r--r--Tests/StagingPrefix/Producer/CMakeLists.txt2
-rw-r--r--Tests/StringFileTest/CMakeLists.txt2
-rw-r--r--Tests/SubDirSpaces/CMakeLists.txt2
-rw-r--r--Tests/TargetName/CMakeLists.txt2
-rw-r--r--Tests/TestDriver/CMakeLists.txt2
-rw-r--r--Tests/Testing/CMakeLists.txt8
-rw-r--r--Tests/TestsWorkingDirectory/CMakeLists.txt2
-rw-r--r--Tests/TryCompile/CMakeLists.txt2
-rw-r--r--Tests/TryCompile/Inner/CMakeLists.txt2
-rw-r--r--Tests/VSExternalInclude/CMakeLists.txt2
-rw-r--r--Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt2
-rw-r--r--Tests/VSMidl/CMakeLists.txt2
-rw-r--r--Tests/VSMidl/src/CMakeLists.txt2
-rw-r--r--Tests/VSNASM/CMakeLists.txt2
1296 files changed, 9859 insertions, 1504 deletions
diff --git a/Tests/Architecture/CMakeLists.txt b/Tests/Architecture/CMakeLists.txt
index 96def003b9..3d10ee0a88 100644
--- a/Tests/Architecture/CMakeLists.txt
+++ b/Tests/Architecture/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(Architecture C)
function(test_for_xcode4 result_var)
diff --git a/Tests/ArgumentExpansion/CMakeLists.txt b/Tests/ArgumentExpansion/CMakeLists.txt
index da3bb4c902..9ab87b2cd9 100644
--- a/Tests/ArgumentExpansion/CMakeLists.txt
+++ b/Tests/ArgumentExpansion/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ArgumentExpansion)
diff --git a/Tests/BundleGeneratorTest/CMakeLists.txt b/Tests/BundleGeneratorTest/CMakeLists.txt
index cf7e2ce864..069fb77460 100644
--- a/Tests/BundleGeneratorTest/CMakeLists.txt
+++ b/Tests/BundleGeneratorTest/CMakeLists.txt
@@ -1,6 +1,6 @@
project(BundleGeneratorTest)
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
# Build a shared library and install it in lib/
add_library(Library SHARED Library.cxx)
diff --git a/Tests/BundleUtilities/CMakeLists.txt b/Tests/BundleUtilities/CMakeLists.txt
index 4a95e2fd4a..b53d499ec8 100644
--- a/Tests/BundleUtilities/CMakeLists.txt
+++ b/Tests/BundleUtilities/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(BundleUtilities)
if(CMAKE_GENERATOR STREQUAL "Xcode" AND
diff --git a/Tests/CFBundleTest/CMakeLists.txt b/Tests/CFBundleTest/CMakeLists.txt
index 5f2e8ec257..40dd887531 100644
--- a/Tests/CFBundleTest/CMakeLists.txt
+++ b/Tests/CFBundleTest/CMakeLists.txt
@@ -1,6 +1,6 @@
#this is adapted from FireBreath (http://www.firebreath.org)
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CFBundleTest)
diff --git a/Tests/CMakeCommands/add_compile_options/CMakeLists.txt b/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
index a6b3ffe101..96f553a03c 100644
--- a/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
if(POLICY CMP0129)
cmake_policy(SET CMP0129 NEW)
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index 72b3502ba8..0c1af9e731 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(target_compile_definitions)
diff --git a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
index 2e3760a634..dd4fe02d9d 100644
--- a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
if(POLICY CMP0129)
cmake_policy(SET CMP0129 NEW)
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index 3de9ef7e00..d5d4970ca1 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(target_include_directories)
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
index 52080bdc97..b2365ca92b 100644
--- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
@@ -1,6 +1,6 @@
# Using 2.8 will trigger a deprecation warning. In this case it's explicitly
# intentional since the tests checks various policy implementations prior to
-# 2.8.12
+# 3.5
cmake_minimum_required(VERSION 2.8)
if(POLICY CMP0129)
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt
index 612d4b4d82..0fc3debc9f 100644
--- a/Tests/CMakeLib/CMakeLists.txt
+++ b/Tests/CMakeLib/CMakeLists.txt
@@ -30,6 +30,7 @@ set(CMakeLib_TESTS
testCMExtMemory.cxx
testCMExtAlgorithm.cxx
testCMExtEnumSet.cxx
+ testList.cxx
)
if (CMake_TEST_FILESYSTEM_PATH OR NOT CMake_HAVE_CXX_FILESYSTEM)
list(APPEND CMakeLib_TESTS testCMFilesystemPath.cxx)
diff --git a/Tests/CMakeLib/testCTestResourceAllocator.cxx b/Tests/CMakeLib/testCTestResourceAllocator.cxx
index 72e06e5d40..3a2e524c9b 100644
--- a/Tests/CMakeLib/testCTestResourceAllocator.cxx
+++ b/Tests/CMakeLib/testCTestResourceAllocator.cxx
@@ -5,12 +5,16 @@
#include "cmCTestResourceAllocator.h"
#include "cmCTestResourceSpec.h"
-
-static const cmCTestResourceSpec spec{ { {
- /* clang-format off */
- { "gpus", { { "0", 4 }, { "1", 8 }, { "2", 0 }, { "3", 8 } } },
- /* clang-format on */
-} } };
+#include "cmJSONState.h"
+
+static const cmCTestResourceSpec spec{
+ { {
+ /* clang-format off */
+ { "gpus", { { "0", 4 }, { "1", 8 }, { "2", 0 }, { "3", 8 } }, },
+ /* clang-format on */
+ } },
+ cmJSONState()
+};
static bool testInitializeFromResourceSpec()
{
diff --git a/Tests/CMakeLib/testCTestResourceSpec.cxx b/Tests/CMakeLib/testCTestResourceSpec.cxx
index b49f8ff2b4..4a0021f711 100644
--- a/Tests/CMakeLib/testCTestResourceSpec.cxx
+++ b/Tests/CMakeLib/testCTestResourceSpec.cxx
@@ -3,89 +3,72 @@
#include <vector>
#include "cmCTestResourceSpec.h"
+#include "cmJSONState.h"
struct ExpectedSpec
{
std::string Path;
- cmCTestResourceSpec::ReadFileResult ParseResult;
+ bool ParseResult;
cmCTestResourceSpec Expected;
};
static const std::vector<ExpectedSpec> expectedResourceSpecs = {
{ "spec1.json",
- cmCTestResourceSpec::ReadFileResult::READ_OK,
+ true,
{ { {
- { "gpus",
- {
- { "2", 4 },
- { "e", 1 },
- } },
- { "threads", {} },
- } } } },
- { "spec2.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec3.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
- {} },
- { "spec4.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
- {} },
- { "spec5.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
- {} },
- { "spec6.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
- {} },
- { "spec7.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE_TYPE,
- {} },
- { "spec8.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec9.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec10.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec11.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec12.json", cmCTestResourceSpec::ReadFileResult::INVALID_ROOT, {} },
- { "spec13.json", cmCTestResourceSpec::ReadFileResult::JSON_PARSE_ERROR, {} },
- { "spec14.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec15.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec16.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec17.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec18.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec19.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec20.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec21.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec22.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec23.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec24.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec25.json",
- cmCTestResourceSpec::ReadFileResult::UNSUPPORTED_VERSION,
- {} },
- { "spec26.json",
- cmCTestResourceSpec::ReadFileResult::UNSUPPORTED_VERSION,
- {} },
- { "spec27.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec28.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec29.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec30.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec31.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec32.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec33.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec34.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec35.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec36.json", cmCTestResourceSpec::ReadFileResult::NO_VERSION, {} },
- { "noexist.json", cmCTestResourceSpec::ReadFileResult::FILE_NOT_FOUND, {} },
+ { "gpus",
+ {
+ { "2", 4 },
+ { "e", 1 },
+ } },
+ { "threads", {} },
+ } },
+ cmJSONState() } },
+ { "spec2.json", true, {} },
+ { "spec3.json", false, {} },
+ { "spec4.json", false, {} },
+ { "spec5.json", false, {} },
+ { "spec6.json", false, {} },
+ { "spec7.json", false, {} },
+ { "spec8.json", false, {} },
+ { "spec9.json", false, {} },
+ { "spec10.json", false, {} },
+ { "spec11.json", false, {} },
+ { "spec12.json", false, {} },
+ { "spec13.json", false, {} },
+ { "spec14.json", true, {} },
+ { "spec15.json", true, {} },
+ { "spec16.json", true, {} },
+ { "spec17.json", false, {} },
+ { "spec18.json", false, {} },
+ { "spec19.json", false, {} },
+ { "spec20.json", true, {} },
+ { "spec21.json", false, {} },
+ { "spec22.json", false, {} },
+ { "spec23.json", false, {} },
+ { "spec24.json", false, {} },
+ { "spec25.json", false, {} },
+ { "spec26.json", false, {} },
+ { "spec27.json", false, {} },
+ { "spec28.json", false, {} },
+ { "spec29.json", false, {} },
+ { "spec30.json", false, {} },
+ { "spec31.json", false, {} },
+ { "spec32.json", false, {} },
+ { "spec33.json", false, {} },
+ { "spec34.json", false, {} },
+ { "spec35.json", false, {} },
+ { "spec36.json", false, {} },
+ { "noexist.json", false, {} },
};
-static bool testSpec(const std::string& path,
- cmCTestResourceSpec::ReadFileResult expectedResult,
+static bool testSpec(const std::string& path, bool expectedResult,
const cmCTestResourceSpec& expected)
{
cmCTestResourceSpec actual;
auto result = actual.ReadFromJSONFile(path);
if (result != expectedResult) {
- std::cout << "ReadFromJSONFile(\"" << path << "\") returned \""
- << cmCTestResourceSpec::ResultToString(result)
- << "\", should be \""
- << cmCTestResourceSpec::ResultToString(expectedResult) << "\""
- << std::endl;
+ std::cout << "ReadFromJSONFile(\"" << path << "\") failed \"" << std::endl;
return false;
}
diff --git a/Tests/CMakeLib/testGccDepfileReader_data/deps1.txt b/Tests/CMakeLib/testGccDepfileReader_data/deps1.txt
index fd2679f41a..4207b58139 100644
--- a/Tests/CMakeLib/testGccDepfileReader_data/deps1.txt
+++ b/Tests/CMakeLib/testGccDepfileReader_data/deps1.txt
@@ -1,26 +1,26 @@
--RULES--
main.o
--DEPENDENCIES--
-main.cpp
+/usr/include/features.h
/usr/include/stdc-predef.h
/usr/include/stdio.h
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h
-/usr/include/features.h
-/usr/include/x86_64-linux-gnu/sys/cdefs.h
-/usr/include/x86_64-linux-gnu/bits/wordsize.h
/usr/include/x86_64-linux-gnu/bits/long-double.h
-/usr/include/x86_64-linux-gnu/gnu/stubs.h
-/usr/include/x86_64-linux-gnu/gnu/stubs-64.h
-/usr/lib/gcc/x86_64-linux-gnu/8/include/stddef.h
-/usr/lib/gcc/x86_64-linux-gnu/8/include/stdarg.h
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h
/usr/include/x86_64-linux-gnu/bits/types.h
-/usr/include/x86_64-linux-gnu/bits/typesizes.h
+/usr/include/x86_64-linux-gnu/bits/types/FILE.h
+/usr/include/x86_64-linux-gnu/bits/types/__FILE.h
+/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h
/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h
/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h
-/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h
-/usr/include/x86_64-linux-gnu/bits/types/__FILE.h
-/usr/include/x86_64-linux-gnu/bits/types/FILE.h
-/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h
-/usr/include/x86_64-linux-gnu/bits/stdio_lim.h
-/usr/include/x86_64-linux-gnu/bits/sys_errlist.h
+/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h
+/usr/include/x86_64-linux-gnu/bits/typesizes.h
+/usr/include/x86_64-linux-gnu/bits/wordsize.h
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h
+/usr/include/x86_64-linux-gnu/gnu/stubs.h
+/usr/include/x86_64-linux-gnu/sys/cdefs.h
+/usr/lib/gcc/x86_64-linux-gnu/8/include/stdarg.h
+/usr/lib/gcc/x86_64-linux-gnu/8/include/stddef.h
+main.cpp
diff --git a/Tests/CMakeLib/testGccDepfileReader_data/deps3.txt b/Tests/CMakeLib/testGccDepfileReader_data/deps3.txt
index 448f69c1e5..8d82c60d44 100644
--- a/Tests/CMakeLib/testGccDepfileReader_data/deps3.txt
+++ b/Tests/CMakeLib/testGccDepfileReader_data/deps3.txt
@@ -1,11 +1,11 @@
--RULES--
main.o
--DEPENDENCIES--
-main.cpp
-foo#bar.h
-foo\#bar.h
foo bar.h
+foo#bar.h
+foo$bar.h
foo\ bar.h
+foo\#bar.h
foo\\ bar.h
foo\\\\
-foo$bar.h
+main.cpp
diff --git a/Tests/CMakeLib/testJSONHelpers.cxx b/Tests/CMakeLib/testJSONHelpers.cxx
index 053c163ec9..50f0386567 100644
--- a/Tests/CMakeLib/testJSONHelpers.cxx
+++ b/Tests/CMakeLib/testJSONHelpers.cxx
@@ -10,6 +10,7 @@
#include <cm3p/json/value.h>
#include "cmJSONHelpers.h"
+#include "cmJSONState.h"
#define ASSERT_TRUE(x) \
do { \
@@ -31,59 +32,65 @@ struct InheritedStruct : public ObjectStruct
std::string Field3;
};
-enum class ErrorCode
+namespace ErrorMessages {
+using ErrorGenerator =
+ std::function<void(const Json::Value*, cmJSONState* state)>;
+ErrorGenerator ErrorGeneratorBuilder(std::string errorMessage)
{
- Success,
- InvalidInt,
- InvalidBool,
- InvalidString,
- InvalidSubObject,
- InvalidObject,
- InvalidArray,
- MissingRequired,
+ return [errorMessage](const Json::Value* value, cmJSONState* state) -> void {
+ state->AddErrorAtValue(errorMessage, value);
+ };
+};
+ErrorGenerator InvalidArray = ErrorGeneratorBuilder("Invalid Array");
+ErrorGenerator MissingRequired = ErrorGeneratorBuilder("Missing Required");
+ErrorGenerator InvalidMap = ErrorGeneratorBuilder("Invalid Map");
+ErrorGenerator InvalidObject(JsonErrors::ObjectError /*errorType*/,
+ const Json::Value::Members& extraFields)
+{
+ return [extraFields](const Json::Value* value, cmJSONState* state) -> void {
+ state->AddErrorAtValue("Invalid Object", value);
+ };
+};
};
-using JSONHelperBuilder = cmJSONHelperBuilder<ErrorCode>;
+using JSONHelperBuilder = cmJSONHelperBuilder;
-auto const IntHelper =
- JSONHelperBuilder::Int(ErrorCode::Success, ErrorCode::InvalidInt, 1);
+auto const IntHelper = JSONHelperBuilder::Int(1);
auto const RequiredIntHelper =
- JSONHelperBuilder::Required<int>(ErrorCode::MissingRequired, IntHelper);
-auto const UIntHelper =
- JSONHelperBuilder::UInt(ErrorCode::Success, ErrorCode::InvalidInt, 1);
-auto const BoolHelper =
- JSONHelperBuilder::Bool(ErrorCode::Success, ErrorCode::InvalidBool, false);
-auto const StringHelper = JSONHelperBuilder::String(
- ErrorCode::Success, ErrorCode::InvalidString, "default");
+ JSONHelperBuilder::Required<int>(ErrorMessages::MissingRequired, IntHelper);
+auto const UIntHelper = JSONHelperBuilder::UInt(1);
+auto const BoolHelper = JSONHelperBuilder::Bool(false);
+auto const StringHelper = JSONHelperBuilder::String("default");
auto const RequiredStringHelper = JSONHelperBuilder::Required<std::string>(
- ErrorCode::MissingRequired, StringHelper);
+ ErrorMessages::MissingRequired, StringHelper);
auto const StringVectorHelper = JSONHelperBuilder::Vector<std::string>(
- ErrorCode::Success, ErrorCode::InvalidArray, StringHelper);
+ ErrorMessages::InvalidArray, StringHelper);
auto const StringVectorFilterHelper =
JSONHelperBuilder::VectorFilter<std::string>(
- ErrorCode::Success, ErrorCode::InvalidArray, StringHelper,
+ ErrorMessages::InvalidArray, StringHelper,
[](const std::string& value) { return value != "ignore"; });
-auto const StringMapHelper = JSONHelperBuilder::Map<std::string>(
- ErrorCode::Success, ErrorCode::InvalidObject, StringHelper);
+auto const StringMapHelper =
+ JSONHelperBuilder::Map<std::string>(ErrorMessages::InvalidMap, StringHelper);
auto const StringMapFilterHelper = JSONHelperBuilder::MapFilter<std::string>(
- ErrorCode::Success, ErrorCode::InvalidObject, StringHelper,
+ ErrorMessages::InvalidMap, StringHelper,
[](const std::string& key) { return key != "ignore"; });
auto const OptionalStringHelper =
- JSONHelperBuilder::Optional<std::string>(ErrorCode::Success, StringHelper);
+ JSONHelperBuilder::Optional<std::string>(StringHelper);
bool testInt()
{
Json::Value v(2);
+ cmJSONState state;
int i = 0;
- ASSERT_TRUE(IntHelper(i, &v) == ErrorCode::Success);
+ ASSERT_TRUE(IntHelper(i, &v, &state));
ASSERT_TRUE(i == 2);
i = 0;
v = Json::nullValue;
- ASSERT_TRUE(IntHelper(i, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!IntHelper(i, &v, &state));
i = 0;
- ASSERT_TRUE(IntHelper(i, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(IntHelper(i, nullptr, &state));
ASSERT_TRUE(i == 1);
return true;
@@ -92,16 +99,16 @@ bool testInt()
bool testUInt()
{
Json::Value v(2);
+ cmJSONState state;
unsigned int i = 0;
- ASSERT_TRUE(UIntHelper(i, &v) == ErrorCode::Success);
+ ASSERT_TRUE(UIntHelper(i, &v, &state));
ASSERT_TRUE(i == 2);
-
i = 0;
v = Json::nullValue;
- ASSERT_TRUE(UIntHelper(i, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!UIntHelper(i, &v, &state));
i = 0;
- ASSERT_TRUE(UIntHelper(i, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(UIntHelper(i, nullptr, &state));
ASSERT_TRUE(i == 1);
return true;
@@ -110,21 +117,22 @@ bool testUInt()
bool testBool()
{
Json::Value v(true);
+ cmJSONState state;
bool b = false;
- ASSERT_TRUE(BoolHelper(b, &v) == ErrorCode::Success);
+ ASSERT_TRUE(BoolHelper(b, &v, &state));
ASSERT_TRUE(b);
b = false;
v = false;
- ASSERT_TRUE(BoolHelper(b, &v) == ErrorCode::Success);
+ ASSERT_TRUE(BoolHelper(b, &v, &state));
ASSERT_TRUE(!b);
b = false;
v = 4;
- ASSERT_TRUE(BoolHelper(b, &v) == ErrorCode::InvalidBool);
+ ASSERT_TRUE(!BoolHelper(b, &v, &state));
b = true;
- ASSERT_TRUE(BoolHelper(b, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(BoolHelper(b, nullptr, &state));
ASSERT_TRUE(!b);
return true;
@@ -133,16 +141,17 @@ bool testBool()
bool testString()
{
Json::Value v("str");
+ cmJSONState state;
std::string str = "";
- ASSERT_TRUE(StringHelper(str, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringHelper(str, &v, &state));
ASSERT_TRUE(str == "str");
str = "";
v = Json::nullValue;
- ASSERT_TRUE(StringHelper(str, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!StringHelper(str, &v, &state));
str = "";
- ASSERT_TRUE(StringHelper(str, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringHelper(str, nullptr, &state));
ASSERT_TRUE(str == "default");
return true;
@@ -150,17 +159,15 @@ bool testString()
bool testObject()
{
- auto const subhelper =
- JSONHelperBuilder::Object<ObjectStruct>(ErrorCode::Success,
- ErrorCode::InvalidSubObject)
- .Bind("subfield"_s, &ObjectStruct::Field2, IntHelper);
- auto const helper = JSONHelperBuilder::Object<ObjectStruct>(
- ErrorCode::Success, ErrorCode::InvalidObject)
+ auto const subhelper = JSONHelperBuilder::Object<ObjectStruct>().Bind(
+ "subfield"_s, &ObjectStruct::Field2, IntHelper);
+ auto const helper = JSONHelperBuilder::Object<ObjectStruct>()
.Bind("field1"_s, &ObjectStruct::Field1, StringHelper)
.Bind("field2"_s, subhelper)
.Bind<std::string>("field3"_s, nullptr, StringHelper);
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = Json::objectValue;
v["field2"]["subfield"] = 2;
@@ -168,38 +175,38 @@ bool testObject()
v["extra"] = "extra";
ObjectStruct s1;
- ASSERT_TRUE(helper(s1, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s1, &v, &state));
ASSERT_TRUE(s1.Field1 == "Hello");
ASSERT_TRUE(s1.Field2 == 2);
v["field2"]["subfield"] = "wrong";
ObjectStruct s2;
- ASSERT_TRUE(helper(s2, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!helper(s2, &v, &state));
v["field2"].removeMember("subfield");
ObjectStruct s3;
- ASSERT_TRUE(helper(s3, &v) == ErrorCode::InvalidSubObject);
+ ASSERT_TRUE(!helper(s3, &v, &state));
v.removeMember("field2");
ObjectStruct s4;
- ASSERT_TRUE(helper(s4, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s4, &v, &state));
v["field2"] = Json::objectValue;
v["field2"]["subfield"] = 2;
v["field3"] = 3;
ObjectStruct s5;
- ASSERT_TRUE(helper(s5, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!helper(s5, &v, &state));
v.removeMember("field3");
ObjectStruct s6;
- ASSERT_TRUE(helper(s6, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s6, &v, &state));
v = "Hello";
ObjectStruct s7;
- ASSERT_TRUE(helper(s7, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s7, &v, &state));
ObjectStruct s8;
- ASSERT_TRUE(helper(s8, nullptr) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s8, nullptr, &state));
return true;
}
@@ -207,47 +214,48 @@ bool testObject()
bool testObjectInherited()
{
auto const helper =
- JSONHelperBuilder::Object<InheritedStruct>(ErrorCode::Success,
- ErrorCode::InvalidObject)
+ JSONHelperBuilder::Object<InheritedStruct>(ErrorMessages::InvalidObject,
+ true)
.Bind("field1"_s, &InheritedStruct::Field1, StringHelper)
.Bind("field2"_s, &InheritedStruct::Field2, IntHelper)
.Bind("field3"_s, &InheritedStruct::Field3, StringHelper);
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = 2;
v["field3"] = "world!";
v["extra"] = "extra";
InheritedStruct s1;
- ASSERT_TRUE(helper(s1, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s1, &v, &state));
ASSERT_TRUE(s1.Field1 == "Hello");
ASSERT_TRUE(s1.Field2 == 2);
ASSERT_TRUE(s1.Field3 == "world!");
v["field2"] = "wrong";
InheritedStruct s2;
- ASSERT_TRUE(helper(s2, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!helper(s2, &v, &state));
v.removeMember("field2");
InheritedStruct s3;
- ASSERT_TRUE(helper(s3, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s3, &v, &state));
v["field2"] = 2;
v["field3"] = 3;
InheritedStruct s4;
- ASSERT_TRUE(helper(s4, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!helper(s4, &v, &state));
v.removeMember("field3");
InheritedStruct s5;
- ASSERT_TRUE(helper(s5, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s5, &v, &state));
v = "Hello";
InheritedStruct s6;
- ASSERT_TRUE(helper(s6, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s6, &v, &state));
InheritedStruct s7;
- ASSERT_TRUE(helper(s7, nullptr) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s7, nullptr, &state));
return true;
}
@@ -255,22 +263,23 @@ bool testObjectInherited()
bool testObjectNoExtra()
{
auto const helper = JSONHelperBuilder::Object<ObjectStruct>(
- ErrorCode::Success, ErrorCode::InvalidObject, false)
+ ErrorMessages::InvalidObject, false)
.Bind("field1"_s, &ObjectStruct::Field1, StringHelper)
.Bind("field2"_s, &ObjectStruct::Field2, IntHelper);
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = 2;
ObjectStruct s1;
- ASSERT_TRUE(helper(s1, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s1, &v, &state));
ASSERT_TRUE(s1.Field1 == "Hello");
ASSERT_TRUE(s1.Field2 == 2);
v["extra"] = "world!";
ObjectStruct s2;
- ASSERT_TRUE(helper(s2, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s2, &v, &state));
return true;
}
@@ -278,31 +287,31 @@ bool testObjectNoExtra()
bool testObjectOptional()
{
auto const helper =
- JSONHelperBuilder::Object<ObjectStruct>(ErrorCode::Success,
- ErrorCode::InvalidObject)
+ JSONHelperBuilder::Object<ObjectStruct>(ErrorMessages::InvalidObject, true)
.Bind("field1"_s, &ObjectStruct::Field1, StringHelper, false)
.Bind("field2"_s, &ObjectStruct::Field2, IntHelper, false)
.Bind<std::string>("field3_s", nullptr, StringHelper, false);
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = 2;
v["field3"] = "world!";
v["extra"] = "extra";
ObjectStruct s1;
- ASSERT_TRUE(helper(s1, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s1, &v, &state));
ASSERT_TRUE(s1.Field1 == "Hello");
ASSERT_TRUE(s1.Field2 == 2);
v = Json::objectValue;
ObjectStruct s2;
- ASSERT_TRUE(helper(s2, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s2, &v, &state));
ASSERT_TRUE(s2.Field1 == "default");
ASSERT_TRUE(s2.Field2 == 1);
ObjectStruct s3;
- ASSERT_TRUE(helper(s3, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s3, nullptr, &state));
ASSERT_TRUE(s3.Field1 == "default");
ASSERT_TRUE(s3.Field2 == 1);
@@ -312,25 +321,26 @@ bool testObjectOptional()
bool testVector()
{
Json::Value v(Json::arrayValue);
+ cmJSONState state;
v.append("Hello");
v.append("world!");
v.append("ignore");
std::vector<std::string> l{ "default" };
std::vector<std::string> expected{ "Hello", "world!", "ignore" };
- ASSERT_TRUE(StringVectorHelper(l, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringVectorHelper(l, &v, &state));
ASSERT_TRUE(l == expected);
v[1] = 2;
l = { "default" };
- ASSERT_TRUE(StringVectorHelper(l, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!StringVectorHelper(l, &v, &state));
v = "Hello";
l = { "default" };
- ASSERT_TRUE(StringVectorHelper(l, &v) == ErrorCode::InvalidArray);
+ ASSERT_TRUE(!StringVectorHelper(l, &v, &state));
l = { "default" };
- ASSERT_TRUE(StringVectorHelper(l, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringVectorHelper(l, nullptr, &state));
ASSERT_TRUE(l.empty());
return true;
@@ -339,6 +349,7 @@ bool testVector()
bool testVectorFilter()
{
Json::Value v(Json::arrayValue);
+ cmJSONState state;
v.append("Hello");
v.append("world!");
v.append("ignore");
@@ -348,19 +359,19 @@ bool testVectorFilter()
"Hello",
"world!",
};
- ASSERT_TRUE(StringVectorFilterHelper(l, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringVectorFilterHelper(l, &v, &state));
ASSERT_TRUE(l == expected);
v[1] = 2;
l = { "default" };
- ASSERT_TRUE(StringVectorFilterHelper(l, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!StringVectorFilterHelper(l, &v, &state));
v = "Hello";
l = { "default" };
- ASSERT_TRUE(StringVectorFilterHelper(l, &v) == ErrorCode::InvalidArray);
+ ASSERT_TRUE(!StringVectorFilterHelper(l, &v, &state));
l = { "default" };
- ASSERT_TRUE(StringVectorFilterHelper(l, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringVectorFilterHelper(l, nullptr, &state));
ASSERT_TRUE(l.empty());
return true;
@@ -372,20 +383,21 @@ bool testMap()
v["field1"] = "Hello";
v["field2"] = "world!";
v["ignore"] = "ignore";
+ cmJSONState state;
std::map<std::string, std::string> m{ { "key", "default" } };
std::map<std::string, std::string> expected{ { "field1", "Hello" },
{ "field2", "world!" },
{ "ignore", "ignore" } };
- ASSERT_TRUE(StringMapHelper(m, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringMapHelper(m, &v, &state));
ASSERT_TRUE(m == expected);
v = Json::arrayValue;
m = { { "key", "default" } };
- ASSERT_TRUE(StringMapHelper(m, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!StringMapHelper(m, &v, &state));
m = { { "key", "default" } };
- ASSERT_TRUE(StringMapHelper(m, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringMapHelper(m, nullptr, &state));
ASSERT_TRUE(m.empty());
return true;
@@ -394,6 +406,7 @@ bool testMap()
bool testMapFilter()
{
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = "world!";
v["ignore"] = "ignore";
@@ -401,15 +414,15 @@ bool testMapFilter()
std::map<std::string, std::string> m{ { "key", "default" } };
std::map<std::string, std::string> expected{ { "field1", "Hello" },
{ "field2", "world!" } };
- ASSERT_TRUE(StringMapFilterHelper(m, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringMapFilterHelper(m, &v, &state));
ASSERT_TRUE(m == expected);
v = Json::arrayValue;
m = { { "key", "default" } };
- ASSERT_TRUE(StringMapFilterHelper(m, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!StringMapFilterHelper(m, &v, &state));
m = { { "key", "default" } };
- ASSERT_TRUE(StringMapFilterHelper(m, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringMapFilterHelper(m, nullptr, &state));
ASSERT_TRUE(m.empty());
return true;
@@ -418,13 +431,14 @@ bool testMapFilter()
bool testOptional()
{
Json::Value v = "Hello";
+ cmJSONState state;
cm::optional<std::string> str{ "default" };
- ASSERT_TRUE(OptionalStringHelper(str, &v) == ErrorCode::Success);
+ ASSERT_TRUE(OptionalStringHelper(str, &v, &state));
ASSERT_TRUE(str == "Hello");
str.emplace("default");
- ASSERT_TRUE(OptionalStringHelper(str, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(OptionalStringHelper(str, nullptr, &state));
ASSERT_TRUE(str == cm::nullopt);
return true;
@@ -433,25 +447,24 @@ bool testOptional()
bool testRequired()
{
Json::Value v = "Hello";
-
std::string str = "default";
int i = 1;
- ASSERT_TRUE(RequiredStringHelper(str, &v) == ErrorCode::Success);
+ cmJSONState state;
+ ASSERT_TRUE(RequiredStringHelper(str, &v, &state));
ASSERT_TRUE(str == "Hello");
- ASSERT_TRUE(RequiredIntHelper(i, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!RequiredIntHelper(i, &v, &state));
v = 2;
str = "default";
i = 1;
- ASSERT_TRUE(RequiredStringHelper(str, &v) == ErrorCode::InvalidString);
- ASSERT_TRUE(RequiredIntHelper(i, &v) == ErrorCode::Success);
+ ASSERT_TRUE(!RequiredStringHelper(str, &v, &state));
+ ASSERT_TRUE(RequiredIntHelper(i, &v, &state));
ASSERT_TRUE(i == 2);
str = "default";
i = 1;
- ASSERT_TRUE(RequiredStringHelper(str, nullptr) ==
- ErrorCode::MissingRequired);
- ASSERT_TRUE(RequiredIntHelper(i, nullptr) == ErrorCode::MissingRequired);
+ ASSERT_TRUE(!RequiredStringHelper(str, nullptr, &state));
+ ASSERT_TRUE(!RequiredIntHelper(i, nullptr, &state));
return true;
}
diff --git a/Tests/CMakeLib/testList.cxx b/Tests/CMakeLib/testList.cxx
new file mode 100644
index 0000000000..f6ec7208ea
--- /dev/null
+++ b/Tests/CMakeLib/testList.cxx
@@ -0,0 +1,995 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+
+#include <iostream>
+#include <stdexcept>
+#include <string>
+#include <type_traits>
+#include <utility>
+#include <vector>
+
+#include <cmext/string_view>
+
+#include "cmList.h"
+
+namespace {
+
+void checkResult(bool success)
+{
+ if (!success) {
+ std::cout << " => failed";
+ }
+ std::cout << std::endl;
+}
+
+bool testConstructors()
+{
+ std::cout << "testConstructors()";
+
+ bool result = true;
+
+ {
+ cmList list;
+ if (!list.empty() || list != cmList{}) {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "aa;bb" };
+ if (list.size() != 2 || list.to_string() != "aa;bb") {
+ result = false;
+ }
+ }
+ {
+ cmList list1{ "aa", "bb" };
+ cmList list2("aa;bb"_s);
+
+ if (list1.size() != 2 || list2.size() != 2 || list1 != list2) {
+ result = false;
+ }
+ if (list1.to_string() != "aa;bb") {
+ result = false;
+ }
+ if (list1.to_string() != list2.to_string()) {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> v{ "aa", "bb", "cc" };
+ cmList list(v.begin(), v.end());
+ if (list.size() != 3 || list.to_string() != "aa;bb;cc") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> values{ "aa;bb", "cc", "dd;ee" };
+ cmList list1(values.begin(), values.end());
+ cmList list2(values.begin(), values.end(), cmList::ExpandElements::No);
+
+ if (list1.size() != 5 || list1.to_string() != "aa;bb;cc;dd;ee") {
+ result = false;
+ }
+ if (list2.size() != 3 || list2.to_string() != "aa;bb;cc;dd;ee") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> values{ "aa;bb;;cc", "", "dd;ee" };
+ cmList list1(values.begin(), values.end(), cmList::ExpandElements::No,
+ cmList::EmptyElements::No);
+ cmList list2(values.begin(), values.end(), cmList::ExpandElements::No,
+ cmList::EmptyElements::Yes);
+ cmList list3(values.begin(), values.end(), cmList::ExpandElements::Yes,
+ cmList::EmptyElements::No);
+ cmList list4(values.begin(), values.end(), cmList::ExpandElements::Yes,
+ cmList::EmptyElements::Yes);
+
+ if (list1.size() != 2 || list1.to_string() != "aa;bb;;cc;dd;ee") {
+ result = false;
+ }
+ if (list2.size() != 3 || list2.to_string() != "aa;bb;;cc;;dd;ee") {
+ result = false;
+ }
+ if (list3.size() != 5 || list3.to_string() != "aa;bb;cc;dd;ee") {
+ result = false;
+ }
+ if (list4.size() != 7 || list4.to_string() != "aa;bb;;cc;;dd;ee") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> values{ "aa;bb", "cc", "dd;ee" };
+ cmList list1(values);
+ cmList list2(values, cmList::ExpandElements::No);
+
+ if (list1.size() != 5 || list1.to_string() != "aa;bb;cc;dd;ee") {
+ result = false;
+ }
+ if (list2.size() != 3 || list2.to_string() != "aa;bb;cc;dd;ee") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> values{ "aa", "bb", "cc", "dd", "ee" };
+ cmList list(std::move(values));
+
+ if (list.size() != 5 || list.to_string() != "aa;bb;cc;dd;ee") {
+ result = false;
+ }
+ if (!values.empty()) {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testAssign()
+{
+ std::cout << "testAssign()";
+
+ bool result = true;
+
+ {
+ cmList list1{ "aa", "bb" };
+ cmList list2{ "cc", "dd" };
+
+ list2 = list1;
+ if (list1.size() != 2 || list2.size() != 2 || list1 != list2) {
+ result = false;
+ }
+ if (list1.to_string() != "aa;bb") {
+ result = false;
+ }
+ if (list1.to_string() != list2.to_string()) {
+ result = false;
+ }
+ }
+ {
+ cmList list1{ "aa", "bb" };
+ cmList list2{ "cc", "dd" };
+
+ list2 = std::move(list1);
+ if (!list1.empty() || list2.size() != 2) {
+ result = false;
+ }
+ if (list2.to_string() != "aa;bb") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> v{ "aa", "bb" };
+ cmList list{ "cc", "dd" };
+
+ list = std::move(v);
+ if (!v.empty() || list.size() != 2) {
+ result = false;
+ }
+ if (list.to_string() != "aa;bb") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "cc", "dd" };
+
+ list = "aa;bb"_s;
+ if (list.size() != 2) {
+ result = false;
+ }
+ if (list.to_string() != "aa;bb") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testConversions()
+{
+ std::cout << "testConversions()";
+
+ bool result = true;
+
+ {
+ cmList list("a;b;c"_s);
+ std::string s = list.to_string();
+
+ if (s != "a;b;c") {
+ result = false;
+ }
+ }
+ {
+ cmList list("a;b;c"_s);
+ std::vector<std::string> v = list;
+
+ if (list.size() != 3 || v.size() != 3) {
+ result = false;
+ }
+ }
+ {
+ cmList list("a;b;c"_s);
+ std::vector<std::string> v = std::move(list);
+
+ // Microsoft compiler is not able to handle correctly the move semantics
+ // so the initial list is not moved, so do not check its size...
+ if (v.size() != 3) {
+ result = false;
+ }
+ }
+ {
+ cmList list("a;b;c"_s);
+ std::vector<std::string> v;
+
+ // compiler is not able to select the cmList conversion operator
+ // and the std::vector assignment operator using the move semantics
+ // v = std::move(list);
+ v = std::move(list.data());
+
+ if (!list.empty() || v.size() != 3) {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testAccess()
+{
+ std::cout << "testAccess()";
+
+ bool result = true;
+
+ {
+ cmList list{ "a", "b", "c" };
+ if (list.get_item(1) != "b") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "a", "b", "c" };
+ if (list.get_item(-3) != "a") {
+ result = false;
+ }
+ }
+ {
+ try {
+ cmList list{ "a", "b", "c" };
+ if (list.get_item(4) != "a") {
+ result = false;
+ }
+ } catch (std::out_of_range&) {
+ }
+ }
+ {
+ try {
+ cmList list{ "a", "b", "c" };
+ if (list.get_item(-4) != "a") {
+ result = false;
+ }
+ } catch (std::out_of_range&) {
+ }
+ }
+ {
+ cmList list{ "a", "b", "c", "d", "e" };
+ auto sublist = list.sublist(list.begin() + 1, list.begin() + 3);
+ if (sublist.size() != 2 || sublist != cmList{ "b", "c" }) {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "a", "b", "c", "d", "e" };
+ auto sublist = list.sublist(1, 2);
+ if (sublist.size() != 2 || sublist != cmList{ "b", "c" }) {
+ result = false;
+ }
+
+ sublist = list.sublist(1, cmList::npos);
+ if (sublist.size() != 4 || sublist != cmList{ "b", "c", "d", "e" }) {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "a", "b", "c", "d", "e", "f" };
+ auto sublist = list.get_items({ 1, 3, 5 });
+ if (sublist.size() != 3 || sublist != cmList{ "b", "d", "f" }) {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "a", "b", "c", "d", "e", "f" };
+ auto sublist = list.get_items({ 1, -3, 5, -3 });
+ if (sublist.size() != 4 || sublist != cmList{ "b", "d", "f", "d" }) {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "a", "b", "c", "d", "e", "f" };
+ try {
+ if (list.get_items({ 1, -3, 5, -3, 10 }).size() != 5) {
+ result = false;
+ }
+ } catch (std::out_of_range&) {
+ }
+ }
+ {
+ cmList list{ "a", "b", "c", "d", "e", "f" };
+
+ if (list.find("b") != 1) {
+ result = false;
+ }
+ if (list.find("x") != cmList::npos) {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testModifiers()
+{
+ std::cout << "testModifiers()";
+
+ bool result = true;
+
+ {
+ cmList list{ "1;2;3;4;5" };
+
+ auto it = list.insert(list.begin() + 2, "6;7;8"_s);
+ if (list.size() != 8 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+
+ auto it =
+ list.insert(list.begin() + 2, "6;7;8"_s, cmList::ExpandElements::No);
+ if (list.size() != 6 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6;7;8") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+ cmList v{ "6", "7", "8" };
+
+ auto it = list.insert(list.begin() + 2, v);
+ if (list.size() != 8 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+ cmList v{ "6", "7", "8" };
+
+ auto it = list.insert(list.begin() + 2, std::move(v));
+ if (list.size() != 8 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6") {
+ result = false;
+ }
+
+ if (!v.empty()) {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+ std::vector<std::string> v{ "6", "7", "8" };
+
+ auto it = list.insert(list.begin() + 2, v);
+ if (list.size() != 8 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+ std::vector<std::string> v{ "6;7", "8" };
+
+ auto it = list.insert(list.begin() + 2, v);
+ if (list.size() != 8 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+ std::vector<std::string> v{ "6;7", "8" };
+
+ auto it = list.insert(list.begin() + 2, v, cmList::ExpandElements::No);
+ if (list.size() != 7 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6;7") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+ std::vector<std::string> v{ "6;;7", "8" };
+
+ auto it = list.insert(list.begin() + 2, v);
+ if (list.size() != 8 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+ std::vector<std::string> v{ "6;;7", "8" };
+
+ auto it = list.insert(list.begin() + 2, v, cmList::EmptyElements::Yes);
+ if (list.size() != 9 || list.to_string() != "1;2;6;;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "1;2;3;4;5" };
+ std::vector<std::string> v{ "6", "7", "8" };
+
+ auto it = list.insert(list.begin() + 2, std::move(v));
+ if (list.size() != 8 || list.to_string() != "1;2;6;7;8;3;4;5") {
+ result = false;
+ }
+ if (*it != "6") {
+ result = false;
+ }
+
+ if (!v.empty()) {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testRemoveItems()
+{
+ std::cout << "testRemoveItems()";
+
+ bool result = true;
+
+ {
+ cmList list("a;b;c;d;e;f;g;h"_s);
+
+ list.remove_items({ 1, 3, 5 });
+
+ if (list.size() != 5 || list.to_string() != "a;c;e;g;h") {
+ result = false;
+ }
+ }
+ {
+ cmList list("a;b;c;b;a;d;e;f"_s);
+
+ list.remove_items({ "a", "b", "h" });
+
+ if (list.size() != 4 || list.to_string() != "c;d;e;f") {
+ result = false;
+ }
+ }
+ {
+ cmList list("a;b;c;d;e;f;g;h"_s);
+ std::vector<cmList::index_type> remove{ 1, 3, 5 };
+
+ list.remove_items(remove.begin(), remove.end());
+
+ if (list.size() != 5 || list.to_string() != "a;c;e;g;h") {
+ result = false;
+ }
+ }
+ {
+ cmList list("a;b;c;b;a;d;e;f"_s);
+ std::vector<std::string> remove{ "b", "a", "h" };
+
+ list.remove_items(remove.begin(), remove.end());
+
+ if (list.size() != 4 || list.to_string() != "c;d;e;f") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testRemoveDuplicates()
+{
+ std::cout << "testRemoveDuplicates()";
+
+ bool result = true;
+
+ {
+ cmList list("b;c;b;a;a;c;b;a;c;b"_s);
+
+ list.remove_duplicates();
+
+ if (list.size() != 3 || list.to_string() != "b;c;a") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testFilter()
+{
+ std::cout << "testFilter()";
+
+ bool result = true;
+
+ {
+ cmList list{ "AA", "Aa", "aA" };
+
+ list.filter("^A", cmList::FilterMode::INCLUDE);
+ if (list.size() != 2 || list.to_string() != "AA;Aa") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "AA", "Aa", "aA" };
+
+ list.filter("^A", cmList::FilterMode::EXCLUDE);
+ if (list.size() != 1 || list.to_string() != "aA") {
+ result = false;
+ }
+ }
+ {
+ cmList list{ "AA", "Aa", "aA" };
+
+ try {
+ list.filter("^(A", cmList::FilterMode::EXCLUDE);
+ if (list.size() != 1) {
+ result = false;
+ }
+ } catch (const std::invalid_argument&) {
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testReverse()
+{
+ std::cout << "testReverse()";
+
+ bool result = true;
+
+ {
+ cmList list{ "a", "b", "c" };
+ if (list.reverse().to_string() != "c;b;a") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testSort()
+{
+ std::cout << "testSort()";
+
+ bool result = true;
+
+ using SortConfiguration = cmList::SortConfiguration;
+
+ {
+ cmList list{ "A", "D", "C", "B", "A" };
+
+ list.sort();
+ if (list.to_string() != "A;A;B;C;D") {
+ result = false;
+ }
+
+ list.sort({ SortConfiguration::OrderMode::DESCENDING,
+ SortConfiguration::CompareMethod::DEFAULT,
+ SortConfiguration::CaseSensitivity::DEFAULT });
+ if (list.to_string() != "D;C;B;A;A") {
+ result = false;
+ }
+ }
+ {
+ SortConfiguration sortCfg;
+ cmList list{ "1.0", "1.1", "2.5", "10.2" };
+
+ list.sort(sortCfg);
+ if (list.to_string() != "1.0;1.1;10.2;2.5") {
+ result = false;
+ }
+
+ sortCfg.Compare = SortConfiguration::CompareMethod::NATURAL;
+ list.sort(sortCfg);
+ if (list.to_string() != "1.0;1.1;2.5;10.2") {
+ result = false;
+ }
+
+ sortCfg.Order = SortConfiguration::OrderMode::DESCENDING;
+ list.sort(sortCfg);
+ if (list.to_string() != "10.2;2.5;1.1;1.0") {
+ result = false;
+ }
+ }
+ {
+ SortConfiguration sortCfg;
+ cmList list{ "/zz/bb.cc", "/xx/yy/dd.cc", "/aa/cc.aa" };
+
+ list.sort(sortCfg);
+ if (list.to_string() != "/aa/cc.aa;/xx/yy/dd.cc;/zz/bb.cc") {
+ result = false;
+ }
+
+ sortCfg.Compare = SortConfiguration::CompareMethod::FILE_BASENAME;
+ if (list.sort(sortCfg).to_string() != "/zz/bb.cc;/aa/cc.aa;/xx/yy/dd.cc") {
+ result = false;
+ }
+ }
+ {
+ SortConfiguration sortCfg;
+ cmList list{ "c/B", "a/c", "B/a" };
+
+ if (list.sort().to_string() != "B/a;a/c;c/B") {
+ result = false;
+ }
+
+ sortCfg.Case = SortConfiguration::CaseSensitivity::INSENSITIVE;
+ if (list.sort(sortCfg).to_string() != "a/c;B/a;c/B") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testTransform()
+{
+ std::cout << "testTransform()";
+
+ bool result = true;
+
+ using AT = cmList::TransformSelector::AT;
+ using FOR = cmList::TransformSelector::FOR;
+ using REGEX = cmList::TransformSelector::REGEX;
+
+ {
+ cmList list({ "AA", "BB", "CC", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::APPEND, "-X");
+ if (list.to_string() != "AA-X;BB-X;CC-X;DD-X;EE-X") {
+ result = false;
+ }
+ }
+ {
+ cmList list({ "AA", "BB", "CC", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::PREPEND, "X-");
+ if (list.to_string() != "X-AA;X-BB;X-CC;X-DD;X-EE") {
+ result = false;
+ }
+ }
+ {
+ cmList list({ "AA", "BB", "CC", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::TOLOWER);
+ if (list.to_string() != "aa;bb;cc;dd;ee") {
+ result = false;
+ }
+ }
+ {
+ cmList list({ "aa", "bb", "cc", "dd", "ee" });
+
+ list.transform(cmList::TransformAction::TOUPPER);
+ if (list.to_string() != "AA;BB;CC;DD;EE") {
+ result = false;
+ }
+ }
+ {
+ cmList list({ " AA", "BB ", " CC ", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::STRIP);
+ if (list.to_string() != "AA;BB;CC;DD;EE") {
+ result = false;
+ }
+ }
+ {
+ cmList list({ "$<CONFIG>AA", "BB$<OR>", "C$<AND>C", "$<OR>DD$<AND>",
+ "$<>E$<>E$<>" });
+
+ list.transform(cmList::TransformAction::GENEX_STRIP);
+ if (list.to_string() != "AA;BB;CC;DD;EE") {
+ result = false;
+ }
+ }
+ {
+ cmList list({ "ABC", "BBCB", "BCCCBC", "BCBCDD", "EBCBCEBC" });
+
+ list.transform(cmList::TransformAction::REPLACE, "^BC|BC$", "X");
+ if (list.to_string() != "AX;BBCB;XCCX;XXDD;EBCBCEX") {
+ result = false;
+ }
+ }
+ {
+ auto atSelector = cmList::TransformSelector::New<AT>({ 1, 2, 4 });
+ cmList list({ "AA", "BB", "CC", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::TOLOWER, std::move(atSelector));
+ if (list.to_string() != "AA;bb;cc;DD;ee") {
+ result = false;
+ }
+ }
+ {
+ auto atSelector = cmList::TransformSelector::New<AT>({ 1, 2, -1 });
+ cmList list({ "AA", "BB", "CC", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::TOLOWER, std::move(atSelector));
+ if (list.to_string() != "AA;bb;cc;DD;ee") {
+ result = false;
+ }
+ }
+ {
+ auto forSelector = cmList::TransformSelector::New<FOR>({ 1, 3 });
+ cmList list({ "AA", "BB", "CC", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::TOLOWER, std::move(forSelector));
+ if (list.to_string() != "AA;bb;cc;dd;EE") {
+ result = false;
+ }
+ }
+ {
+ auto forSelector = cmList::TransformSelector::New<FOR>({ 0, 4, 2 });
+ cmList list({ "AA", "BB", "CC", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::TOLOWER, std::move(forSelector));
+ if (list.to_string() != "aa;BB;cc;DD;ee") {
+ result = false;
+ }
+ }
+ {
+ auto regexSelector = cmList::TransformSelector::New<REGEX>("^(A|D|E)");
+ cmList list({ "AA", "BB", "CC", "DD", "EE" });
+
+ list.transform(cmList::TransformAction::TOLOWER, std::move(regexSelector));
+ if (list.to_string() != "aa;BB;CC;dd;ee") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testStaticModifiers()
+{
+ std::cout << "testStaticModifiers()";
+
+ bool result = true;
+
+ {
+ std::vector<std::string> v{ "a", "b", "c" };
+ cmList::assign(v, "d;e"_s);
+
+ if (v.size() != 2 || v[0] != "d" || v[1] != "e") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> v{ "a", "b", "c" };
+ cmList::append(v, "d;;e"_s);
+
+ if (v.size() != 5 || v[3] != "d" || v[4] != "e") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> v{ "a", "b", "c" };
+ cmList::append(v, "d;;e"_s, cmList::EmptyElements::Yes);
+
+ if (v.size() != 6 || v[3] != "d" || !v[4].empty() || v[5] != "e") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> v{ "a", "b", "c" };
+ cmList::prepend(v, "d;e"_s);
+
+ if (v.size() != 5 || v[0] != "d" || v[1] != "e") {
+ result = false;
+ }
+ }
+ {
+ std::vector<std::string> v{ "a", "b", "c" };
+ cmList::prepend(v, "d;;e"_s, cmList::EmptyElements::Yes);
+
+ if (v.size() != 6 || v[0] != "d" || !v[1].empty() || v[2] != "e") {
+ result = false;
+ }
+ }
+ {
+ std::string list{ "a;b;c" };
+ cmList::append(list, "d;e"_s);
+
+ if (list != "a;b;c;d;e") {
+ result = false;
+ }
+ }
+ {
+ std::string list;
+ cmList::append(list, "d;e"_s);
+
+ if (list != "d;e") {
+ result = false;
+ }
+ }
+ {
+ std::string list{ "a;b;c" };
+ cmList::append(list, "");
+
+ if (list != "a;b;c;") {
+ result = false;
+ }
+ }
+ {
+ std::string list{ "a;b;c" };
+ std::vector<std::string> v{ "d", "e" };
+ cmList::append(list, v.begin(), v.end());
+
+ if (list != "a;b;c;d;e") {
+ result = false;
+ }
+ }
+ {
+ std::string list{ "a;b;c" };
+ std::vector<std::string> v;
+ cmList::append(list, v.begin(), v.end());
+
+ if (list != "a;b;c") {
+ result = false;
+ }
+ }
+ {
+ std::string list;
+ std::vector<std::string> v{ "d", "e" };
+ cmList::append(list, v.begin(), v.end());
+
+ if (list != "d;e") {
+ result = false;
+ }
+ }
+ {
+ std::string list{ "a;b;c" };
+ cmList::prepend(list, "d;e");
+
+ if (list != "d;e;a;b;c") {
+ result = false;
+ }
+ }
+ {
+ std::string list;
+ cmList::prepend(list, "d;e");
+
+ if (list != "d;e") {
+ result = false;
+ }
+ }
+ {
+ std::string list{ "a;b;c" };
+ cmList::prepend(list, "");
+
+ if (list != ";a;b;c") {
+ result = false;
+ }
+ }
+ {
+ std::string list{ "a;b;c" };
+ std::vector<std::string> v{ "d", "e" };
+ cmList::prepend(list, v.begin(), v.end());
+
+ if (list != "d;e;a;b;c") {
+ result = false;
+ }
+ }
+ {
+ std::string list{ "a;b;c" };
+ std::vector<std::string> v;
+ cmList::prepend(list, v.begin(), v.end());
+
+ if (list != "a;b;c") {
+ result = false;
+ }
+ }
+ {
+ std::string list;
+ std::vector<std::string> v{ "d", "e" };
+ cmList::prepend(list, v.begin(), v.end());
+
+ if (list != "d;e") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+}
+
+int testList(int /*unused*/, char* /*unused*/[])
+{
+ int result = 0;
+
+ if (!testConstructors()) {
+ result = 1;
+ }
+ if (!testAssign()) {
+ result = 1;
+ }
+ if (!testConversions()) {
+ result = 1;
+ }
+ if (!testAccess()) {
+ result = 1;
+ }
+ if (!testModifiers()) {
+ result = 1;
+ }
+ if (!testRemoveItems()) {
+ result = 1;
+ }
+ if (!testRemoveDuplicates()) {
+ result = 1;
+ }
+ if (!testFilter()) {
+ result = 1;
+ }
+ if (!testReverse()) {
+ result = 1;
+ }
+ if (!testSort()) {
+ result = 1;
+ }
+ if (!testTransform()) {
+ result = 1;
+ }
+ if (!testStaticModifiers()) {
+ result = 1;
+ }
+
+ return result;
+}
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect
index 5e3cdb1045..424b7d419a 100644
--- a/Tests/CMakeLib/testRST.expect
+++ b/Tests/CMakeLib/testRST.expect
@@ -26,10 +26,15 @@ Generator expression ``$<SOME_GENEX:...>`` with brackets and parameter.
Generator expression ``some genex`` with space and target.
Generator expression ``$<SOME_GENEX>`` with brackets, space, and target.
Generator expression ``$<SOME_GENEX:...>`` with brackets, parameter, space, and target.
-Inline literal ``~!@#$%^&*( )_+-=\\[]{}'":;,<>.?/``.
+Inline cref ``Link Dest``.
+Inline cref ``Link_Dest_<Placeholder>``.
+Inline cref ``Link Text``.
+Inline cref ``Link_Text_<Placeholder>``.
+Inline link Link Dest.
Inline link Link Text.
Inline link Link Text <With \-escaped Brackets>.
Inline literal ``__`` followed by inline link Link Text.
+Inline literal ``~!@#$%^&*( )_+-=\\[]{}'":;,<>.?/``.
First TOC entry.
@@ -46,7 +51,8 @@ Bracket Comment Content
Bracket Comment Content
]
-.. cmake:command:: some_cmd
+.. cmake:command::
+ some_cmd
Command some_cmd description.
@@ -54,7 +60,8 @@ Bracket Comment Content
Command other_cmd description.
-.. cmake:envvar:: some_var
+.. cmake:envvar::
+ some_var
Environment variable some_var description.
@@ -62,7 +69,8 @@ Bracket Comment Content
Environment variable other_var description.
-.. cmake:genex:: SOME_GENEX
+.. cmake:genex::
+ SOME_GENEX
Generator expression SOME_GENEX description.
@@ -70,7 +78,17 @@ Bracket Comment Content
Generator expression $<OTHER_GENEX> description.
-.. cmake:variable:: some_var
+.. cmake:signature::
+ some_command(SOME_SIGNATURE)
+
+ Command some_command SOME_SIGNATURE description.
+
+.. signature:: other_command(OTHER_SIGNATURE)
+
+ Command other_command OTHER_SIGNATURE description.
+
+.. cmake:variable::
+ some_var
Variable some_var description.
diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst
index 4139801833..3a384077cf 100644
--- a/Tests/CMakeLib/testRST.rst
+++ b/Tests/CMakeLib/testRST.rst
@@ -33,10 +33,15 @@ Generator expression :genex:`$<SOME_GENEX:...>` with brackets and parameter.
Generator expression :genex:`some genex <SOME_GENEX>` with space and target.
Generator expression :genex:`$<SOME_GENEX> <SOME_GENEX>` with brackets, space, and target.
Generator expression :genex:`$<SOME_GENEX:...> <SOME_GENEX>` with brackets, parameter, space, and target.
-Inline literal ``~!@#$%^&*( )_+-=\\[]{}'":;,<>.?/``.
+Inline cref :cref:`Link Dest`.
+Inline cref :cref:`Link_Dest_<Placeholder>`.
+Inline cref :cref:`Link Text <ExternalDest>`.
+Inline cref :cref:`Link_Text_<Placeholder> <ExternalDest>`.
+Inline link `Link Dest`_.
Inline link `Link Text <ExternalDest>`_.
Inline link `Link Text \<With \\-escaped Brackets\> <ExternalDest>`_.
Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
+Inline literal ``~!@#$%^&*( )_+-=\\[]{}'":;,<>.?/``.
.. |not replaced| replace:: not replaced through toctree
.. |not replaced in literal| replace:: replaced in parsed literal
@@ -49,7 +54,8 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
.. cmake-module:: testRSTmod.cmake
-.. cmake:command:: some_cmd
+.. cmake:command::
+ some_cmd
Command some_cmd description.
@@ -57,7 +63,8 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
Command other_cmd description.
-.. cmake:envvar:: some_var
+.. cmake:envvar::
+ some_var
Environment variable some_var description.
@@ -65,7 +72,8 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
Environment variable other_var description.
-.. cmake:genex:: SOME_GENEX
+.. cmake:genex::
+ SOME_GENEX
Generator expression SOME_GENEX description.
@@ -73,7 +81,17 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
Generator expression $<OTHER_GENEX> description.
-.. cmake:variable:: some_var
+.. cmake:signature::
+ some_command(SOME_SIGNATURE)
+
+ Command some_command SOME_SIGNATURE description.
+
+.. signature:: other_command(OTHER_SIGNATURE)
+
+ Command other_command OTHER_SIGNATURE description.
+
+.. cmake:variable::
+ some_var
Variable some_var description.
diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx
index 754205e46f..0f0c025d46 100644
--- a/Tests/CMakeLib/testSystemTools.cxx
+++ b/Tests/CMakeLib/testSystemTools.cxx
@@ -36,6 +36,53 @@ int testSystemTools(int /*unused*/, char* /*unused*/[])
"cmSystemTools::UpperCase");
// ----------------------------------------------------------------------
+ // Test cmSystemTools::VersionCompare
+ cmAssert(cmSystemTools::VersionCompareEqual("", ""),
+ "VersionCompareEqual empty string");
+ cmAssert(!cmSystemTools::VersionCompareGreater("", ""),
+ "VersionCompareGreater empty string");
+ cmAssert(cmSystemTools::VersionCompareEqual("1", "1a"),
+ "VersionCompareEqual letters");
+ cmAssert(!cmSystemTools::VersionCompareGreater("1", "1a"),
+ "VersionCompareGreater letters");
+ cmAssert(cmSystemTools::VersionCompareEqual("001", "1"),
+ "VersionCompareEqual leading zeros equal");
+ cmAssert(!cmSystemTools::VersionCompareGreater("001", "1"),
+ "VersionCompareGreater leading zeros equal");
+ cmAssert(!cmSystemTools::VersionCompareEqual("002", "1"),
+ "VersionCompareEqual leading zeros greater");
+ cmAssert(cmSystemTools::VersionCompareGreater("002", "1"),
+ "VersionCompareGreater leading zeros greater");
+ cmAssert(!cmSystemTools::VersionCompareEqual("6.2.1", "6.3.1"),
+ "VersionCompareEqual components less");
+ cmAssert(!cmSystemTools::VersionCompareGreater("6.2.1", "6.3.1"),
+ "VersionCompareGreater components less");
+ cmAssert(!cmSystemTools::VersionCompareEqual("6.2.1", "6.2"),
+ "VersionCompareEqual different length");
+ cmAssert(cmSystemTools::VersionCompareGreater("6.2.1", "6.2"),
+ "VersionCompareGreater different length");
+ cmAssert(
+ !cmSystemTools::VersionCompareEqual(
+ "3.14159265358979323846264338327950288419716939937510582097494459230",
+ "3.14159265358979323846264338327950288419716939937510582097494459231"),
+ "VersionCompareEqual long number");
+ cmAssert(
+ !cmSystemTools::VersionCompareGreater(
+ "3.14159265358979323846264338327950288419716939937510582097494459230",
+ "3.14159265358979323846264338327950288419716939937510582097494459231"),
+ "VersionCompareGreater long number");
+ cmAssert(
+ !cmSystemTools::VersionCompareEqual(
+ "3.141592653589793238462643383279502884197169399375105820974944592307",
+ "3.14159265358979323846264338327950288419716939937510582097494459231"),
+ "VersionCompareEqual more digits");
+ cmAssert(
+ cmSystemTools::VersionCompareGreater(
+ "3.141592653589793238462643383279502884197169399375105820974944592307",
+ "3.14159265358979323846264338327950288419716939937510582097494459231"),
+ "VersionCompareGreater more digits");
+
+ // ----------------------------------------------------------------------
// Test cmSystemTools::strverscmp
cmAssert(cmSystemTools::strverscmp("", "") == 0, "strverscmp empty string");
cmAssert(cmSystemTools::strverscmp("abc", "") > 0,
diff --git a/Tests/CMakeLib/testVisualStudioSlnParser.cxx b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
index c1bf3d41b2..3485bac4d5 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 395b953d86..1f148fc420 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 c22f70449d..e3b5ec41d8 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")
@@ -1014,6 +986,30 @@ if(BUILD_TESTING)
endif()
endif()
+ # On Windows run the CPackInnoSetupGenerator test
+ if(WIN32 AND CMake_TEST_CPACK_INNOSETUP)
+ add_test(CPackInnoSetupGenerator ${CMAKE_CTEST_COMMAND}
+ -C \${CTEST_CONFIGURATION_TYPE}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/CPackInnoSetupGenerator"
+ "${CMake_BINARY_DIR}/Tests/CPackInnoSetupGenerator"
+ ${build_generator_args}
+ --build-project CPackInnoSetupGenerator
+ --build-options
+ --test-command ${CMAKE_CMAKE_COMMAND}
+ "-DCPackInnoSetupGenerator_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackInnoSetupGenerator"
+ "-Dconfig=\${CTEST_CONFIGURATION_TYPE}"
+ -P "${CMake_SOURCE_DIR}/Tests/CPackInnoSetupGenerator/RunCPackVerifyResult.cmake")
+
+ set_property(TEST CPackInnoSetupGenerator PROPERTY
+ ATTACHED_FILES_ON_FAIL
+ "${CMake_BINARY_DIR}/Tests/CPackInnoSetupGenerator/_CPack_Packages/win32/INNOSETUP/ISCCOutput.log")
+
+ set_property(TEST CPackInnoSetupGenerator PROPERTY
+ ATTACHED_FILES
+ "${CMake_BINARY_DIR}/Tests/CPackInnoSetupGenerator/_CPack_Packages/win32/INNOSETUP/ISScript.iss")
+ endif()
+
# On Windows run the CPackNSISGenerator test
# if the nsis is available
if(WIN32 AND NSIS_MAKENSIS_EXECUTABLE)
@@ -1478,6 +1474,7 @@ if(BUILD_TESTING)
GnuTLS
GSL
GTK2
+ HDF5
Iconv
ICU
ImageMagick
@@ -1512,6 +1509,7 @@ if(BUILD_TESTING)
SQLite3
TIFF
Vulkan
+ wxWidgets
X11
XalanC
XercesC
diff --git a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
index c7e3105045..e6ed5598d1 100644
--- a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
if(POLICY CMP0129)
cmake_policy(SET CMP0129 NEW)
endif()
diff --git a/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
index 2784e3bc5d..24a0a865e3 100644
--- a/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
@@ -9,7 +9,7 @@
project(CheckCXXSymbolExists CXX)
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../CheckSymbolExists")
diff --git a/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt b/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt
index 2e5d8d3b28..0c76158510 100644
--- a/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CheckLanguage NONE)
include(CheckLanguage)
diff --git a/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt b/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
index 4cbccd398c..6ecd194203 100644
--- a/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CheckStructHasMember)
diff --git a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
index 3d65b7ab18..b6ed9e961b 100644
--- a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
@@ -9,7 +9,7 @@
project(CheckSymbolExists C)
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}")
diff --git a/Tests/CMakeOnly/CompilerIdOBJC/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdOBJC/CMakeLists.txt
index 8f1378706b..18a1ff658b 100644
--- a/Tests/CMakeOnly/CompilerIdOBJC/CMakeLists.txt
+++ b/Tests/CMakeOnly/CompilerIdOBJC/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CompilerIdOBJC OBJC)
foreach(v
diff --git a/Tests/CMakeOnly/CompilerIdOBJCXX/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdOBJCXX/CMakeLists.txt
index 8f41db050e..76c1e4b0e4 100644
--- a/Tests/CMakeOnly/CompilerIdOBJCXX/CMakeLists.txt
+++ b/Tests/CMakeOnly/CompilerIdOBJCXX/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CompilerIdOBJCXX OBJCXX)
foreach(v
diff --git a/Tests/CMakeOnly/LinkInterfaceLoop/CMakeLists.txt b/Tests/CMakeOnly/LinkInterfaceLoop/CMakeLists.txt
index d66eb06d76..77dadcf277 100644
--- a/Tests/CMakeOnly/LinkInterfaceLoop/CMakeLists.txt
+++ b/Tests/CMakeOnly/LinkInterfaceLoop/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(LinkInterfaceLoop C)
# Add a shared library that incorrectly names itself as a
diff --git a/Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt b/Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt
index 9f30c7dd59..664682598e 100644
--- a/Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt
+++ b/Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
if (NOT MAJOR_TEST_MODULE OR NOT MAJOR_TEST_VERSION)
message(FATAL_ERROR "test selection variables not set up")
diff --git a/Tests/CMakeOnly/TargetScope/CMakeLists.txt b/Tests/CMakeOnly/TargetScope/CMakeLists.txt
index faf2250992..3bcbb00a78 100644
--- a/Tests/CMakeOnly/TargetScope/CMakeLists.txt
+++ b/Tests/CMakeOnly/TargetScope/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(TargetScope NONE)
add_subdirectory(Sub)
diff --git a/Tests/CMakeOnly/find_library/CMakeLists.txt b/Tests/CMakeOnly/find_library/CMakeLists.txt
index b23d5e2ea4..2d487e3fff 100644
--- a/Tests/CMakeOnly/find_library/CMakeLists.txt
+++ b/Tests/CMakeOnly/find_library/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(FindLibraryTest NONE)
set(CMAKE_FIND_DEBUG_MODE 1)
diff --git a/Tests/CMakeOnly/find_path/CMakeLists.txt b/Tests/CMakeOnly/find_path/CMakeLists.txt
index bf4e350c7d..7cc08add91 100644
--- a/Tests/CMakeOnly/find_path/CMakeLists.txt
+++ b/Tests/CMakeOnly/find_path/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(FindPathTest NONE)
set(CMAKE_FIND_DEBUG_MODE 1)
diff --git a/Tests/CMakeTests/EndStuffTestScript.cmake b/Tests/CMakeTests/EndStuffTestScript.cmake
index e0d826d797..bd8924669e 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 1c24017b6c..728ec5b677 100644
--- a/Tests/COnly/CMakeLists.txt
+++ b/Tests/COnly/CMakeLists.txt
@@ -1,5 +1,5 @@
# a simple C only test case
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project (COnly C)
set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
@@ -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/CPackComponents/CMakeLists.txt b/Tests/CPackComponents/CMakeLists.txt
index c1b348ef40..a886b3df60 100644
--- a/Tests/CPackComponents/CMakeLists.txt
+++ b/Tests/CPackComponents/CMakeLists.txt
@@ -4,7 +4,7 @@
# application (mylibapp). We create a binary installer that allows
# users to select which pieces will be installed: the example
# application, the library binaries, and/or the header file.
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CPackComponents)
# Create the mylib library
diff --git a/Tests/CPackInnoSetupGenerator/CMakeLists.txt b/Tests/CPackInnoSetupGenerator/CMakeLists.txt
new file mode 100644
index 0000000000..bca0ad6cd7
--- /dev/null
+++ b/Tests/CPackInnoSetupGenerator/CMakeLists.txt
@@ -0,0 +1,55 @@
+cmake_minimum_required(VERSION 3.13)
+
+project(CPackInnoSetupGenerator VERSION 42.0 HOMEPAGE_URL "https://www.example.com")
+
+add_executable(hello main.c)
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/empty)
+
+install(TARGETS hello DESTINATION / COMPONENT application)
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/empty DESTINATION / COMPONENT extras)
+install(FILES my_bitmap.bmp DESTINATION awesome COMPONENT extras)
+install(FILES my_file.txt DESTINATION / COMPONENT hidden_component)
+install(FILES my_file.txt DESTINATION / COMPONENT hidden_component2)
+
+set(CPACK_GENERATOR "INNOSETUP")
+
+set(CPACK_PACKAGE_NAME "Hello, World!") # Test constant escape (like {cm:...}, see code documentation)
+set(CPACK_PACKAGE_VENDOR "Sheldon Cooper")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "hello_world")
+set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hello_world")
+set(CPACK_PACKAGE_FILE_NAME "hello_world_setup")
+set(CPACK_SYSTEM_NAME "win32")
+set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/my_bitmap.bmp")
+set(CPACK_VERBATIM_VARIABLES ON)
+set(CPACK_PACKAGE_EXECUTABLES "hello" "Hello, World!")
+set(CPACK_CREATE_DESKTOP_LINKS hello)
+
+set(CPACK_INNOSETUP_INSTALL_ROOT "{autopf}\\Sheldon Cooper")
+set(CPACK_INNOSETUP_PROGRAM_MENU_FOLDER ".")
+set(CPACK_INNOSETUP_IGNORE_LICENSE_PAGE ON)
+set(CPACK_INNOSETUP_IGNORE_README_PAGE OFF) # Test if only readme page is shown
+set(CPACK_INNOSETUP_SETUP_AppComments ON) # Test if CPACK_INNOSETUP_USE_CMAKE_BOOL_FORMAT works
+set(CPACK_INNOSETUP_CUSTOM_INSTALL_INSTRUCTIONS "extras/empty"
+ "Name: \"{userdocs}\\empty\"\; Check: ReturnTrue\; Components: accessories\\extras")
+set(CPACK_INNOSETUP_MENU_LINKS "https://www.example.com" "Web"
+ "my_file.txt" "Text")
+set(CPACK_INNOSETUP_RUN_EXECUTABLES hello)
+set(CPACK_INNOSETUP_CREATE_UNINSTALL_LINK ON)
+# Test if this macro is available in the code file below containing the check function
+set(CPACK_INNOSETUP_DEFINE_PascalMacro "end;")
+set(CPACK_INNOSETUP_CODE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Code.pas")
+set(CPACK_INNOSETUP_EXECUTABLE "ISCC.exe")
+
+include(CPackComponent)
+
+cpack_add_install_type(basic DISPLAY_NAME "Basic installation")
+cpack_add_install_type(full DISPLAY_NAME "\"Large\" installation") # Test double quote syntax
+cpack_add_component_group(accessories DISPLAY_NAME "Accessories")
+
+cpack_add_component(application DISPLAY_NAME "Application" INSTALL_TYPES basic full REQUIRED)
+cpack_add_component(extras DISPLAY_NAME "Additional components" INSTALL_TYPES full GROUP accessories)
+cpack_add_component(hidden_component HIDDEN)
+cpack_add_component(hidden_component2 HIDDEN DISABLED)
+set(CPACK_INNOSETUP_extras_INSTALL_DIRECTORY "{userdocs}")
+
+include(CPack)
diff --git a/Tests/CPackInnoSetupGenerator/Code.pas b/Tests/CPackInnoSetupGenerator/Code.pas
new file mode 100644
index 0000000000..d96d82f2df
--- /dev/null
+++ b/Tests/CPackInnoSetupGenerator/Code.pas
@@ -0,0 +1,4 @@
+function ReturnTrue(): Boolean;
+begin
+ Result := true;
+{#PascalMacro}
diff --git a/Tests/CPackInnoSetupGenerator/RunCPackVerifyResult.cmake b/Tests/CPackInnoSetupGenerator/RunCPackVerifyResult.cmake
new file mode 100644
index 0000000000..72a26ee754
--- /dev/null
+++ b/Tests/CPackInnoSetupGenerator/RunCPackVerifyResult.cmake
@@ -0,0 +1,136 @@
+message(STATUS "=============================================================")
+message(STATUS "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)")
+message(STATUS "")
+
+if(NOT CPackInnoSetupGenerator_BINARY_DIR)
+ message(FATAL_ERROR "CPackInnoSetupGenerator_BINARY_DIR not set")
+endif()
+
+message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}")
+message(STATUS "CMAKE_CPACK_COMMAND: ${CMAKE_CPACK_COMMAND}")
+message(STATUS "CPackInnoSetupGenerator_BINARY_DIR: ${CPackInnoSetupGenerator_BINARY_DIR}")
+
+if(config)
+ set(_C_config -C ${config})
+endif()
+
+execute_process(COMMAND "${CMAKE_CPACK_COMMAND}"
+ ${_C_config}
+ RESULT_VARIABLE CPack_result
+ OUTPUT_VARIABLE CPack_output
+ ERROR_VARIABLE CPack_output
+ WORKING_DIRECTORY "${CPackInnoSetupGenerator_BINARY_DIR}")
+
+if(CPack_result)
+ message(FATAL_ERROR "CPack execution went wrong!, Output: ${CPack_output}")
+else ()
+ message(STATUS "Output: ${CPack_output}")
+endif()
+
+file(GLOB project_file "${CPackInnoSetupGenerator_BINARY_DIR}/_CPack_Packages/win32/INNOSETUP/ISScript.iss")
+file(GLOB installer_file "${CPackInnoSetupGenerator_BINARY_DIR}/_CPack_Packages/win32/INNOSETUP/hello_world_setup.exe")
+
+message(STATUS "Project file: '${project_file}'")
+message(STATUS "Installer file: '${installer_file}'")
+
+if(NOT project_file)
+ message(FATAL_ERROR "Project file does not exist")
+endif()
+
+if(NOT installer_file)
+ message(FATAL_ERROR "Installer file does not exist")
+endif()
+
+# Test if the correct registry key is set
+file(STRINGS "${project_file}" results REGEX "^AppId=hello_world$")
+if(results STREQUAL "")
+ message(FATAL_ERROR "CPACK_PACKAGE_INSTALL_REGISTRY_KEY doesn't match AppId")
+endif()
+
+# Test if only readme page is shown
+file(STRINGS "${project_file}" results REGEX "^LicenseFile=")
+file(STRINGS "${project_file}" results2 REGEX "^InfoBeforeFile=")
+if(NOT results STREQUAL "" OR results2 STREQUAL "")
+ message(FATAL_ERROR "Erroneous output with license and readme files")
+endif()
+
+# Test if classic style is used by default
+file(STRINGS "${project_file}" results REGEX "compiler:SetupClassicIcon\\.ico")
+file(STRINGS "${project_file}" results2 REGEX "compiler:WizClassicImage\\.bmp")
+if(results STREQUAL "" OR results2 STREQUAL "")
+ message(FATAL_ERROR "Images of classic style not used")
+endif()
+
+# Test if the top-level start menu folder is used
+file(STRINGS "${project_file}" results REGEX "{autoprograms}")
+file(STRINGS "${project_file}" results2 REGEX "{group}")
+if(results STREQUAL "" OR NOT results2 STREQUAL "")
+ message(FATAL_ERROR "Top-level start menu folder not used")
+endif()
+
+# Test CPACK_INNOSETUP_USE_CMAKE_BOOL_FORMAT
+file(STRINGS "${project_file}" results REGEX "^AppComments=yes$")
+if(results STREQUAL "")
+ message(FATAL_ERROR "CPACK_INNOSETUP_USE_CMAKE_BOOL_FORMAT doesn't convert booleans")
+endif()
+
+# Test the custom installation rule
+file(STRINGS "${project_file}" results REGEX "^Name: \"{userdocs}\\\\empty\"; Check: ReturnTrue; Components: accessories\\\\extras$")
+if(results STREQUAL "")
+ message(FATAL_ERROR "Custom installation rule not found or incomplete")
+endif()
+
+# Test if an uninstall shortcut has been created
+file(STRINGS "${project_file}" results REGEX "{uninstallexe}")
+if(results STREQUAL "")
+ message(FATAL_ERROR "No uninstall shortcut created")
+endif()
+
+# Test CPACK_INNOSETUP_<compName>_INSTALL_DIRECTORY
+file(STRINGS "${project_file}" results REGEX "{app}.*Components: accessories\\\\extras")
+if(NOT results STREQUAL "")
+ message(FATAL_ERROR "Component not in custom install directory")
+endif()
+
+# Test if component names are nested correctly
+file(STRINGS "${project_file}" results REGEX "Components:.* extras")
+if(NOT results STREQUAL "")
+ message(FATAL_ERROR "Component names must contain their parent groups according to the documentation")
+endif()
+
+# Test if custom installation type exists
+file(STRINGS "${project_file}" results REGEX "Flags: .*iscustom")
+if(results STREQUAL "")
+ message(FATAL_ERROR "Custom installation type doesn't exist")
+endif()
+
+# Test if hidden components are processed but not displayed
+file(STRINGS "${project_file}" results REGEX "Source:.+hidden_component\\\\my_file\\.txt")
+file(STRINGS "${project_file}" results2 REGEX "Name: \"hidden_component\"")
+if(results STREQUAL "" OR NOT results2 STREQUAL "")
+ message(FATAL_ERROR "Hidden component displayed or one of its files ignored")
+endif()
+
+# Test if disabled and hidden components are ignored at all
+file(STRINGS "${project_file}" results REGEX "Source:.+hidden_component2\\\\my_file\\.txt")
+if(NOT results STREQUAL "")
+ message(FATAL_ERROR "Disabled and hidden component not ignored")
+endif()
+
+# Test if required components ignore their installation types
+file(STRINGS "${project_file}" results REGEX "Types: (basic|full|custom|basic full|full basic|basic custom|full custom); Flags: fixed")
+if(NOT results STREQUAL "")
+ message(FATAL_ERROR "Required components don't ignore their installation types")
+endif()
+
+# Test constant escape (should contain Hello%2c World!)
+file(STRINGS "${project_file}" results REGEX "Hello%2c World!")
+if(results STREQUAL "")
+ message(FATAL_ERROR "The comma character isn't escaped to %2c")
+endif()
+
+# Test double quote syntax
+file(STRINGS "${project_file}" results REGEX "\"\"Large\"\"")
+if(results STREQUAL "")
+ message(FATAL_ERROR "The quote character isn't escaped correctly")
+endif()
diff --git a/Tests/CPackInnoSetupGenerator/main.c b/Tests/CPackInnoSetupGenerator/main.c
new file mode 100644
index 0000000000..413899c807
--- /dev/null
+++ b/Tests/CPackInnoSetupGenerator/main.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ printf("Hello, World!\n");
+ return 42;
+}
diff --git a/Tests/CPackInnoSetupGenerator/my_bitmap.bmp b/Tests/CPackInnoSetupGenerator/my_bitmap.bmp
new file mode 100644
index 0000000000..d0e562fb37
--- /dev/null
+++ b/Tests/CPackInnoSetupGenerator/my_bitmap.bmp
Binary files differ
diff --git a/Tests/CPackInnoSetupGenerator/my_file.txt b/Tests/CPackInnoSetupGenerator/my_file.txt
new file mode 100644
index 0000000000..8ab686eafe
--- /dev/null
+++ b/Tests/CPackInnoSetupGenerator/my_file.txt
@@ -0,0 +1 @@
+Hello, World!
diff --git a/Tests/CPackTestAllGenerators/CMakeLists.txt b/Tests/CPackTestAllGenerators/CMakeLists.txt
index 95daabff0c..e7fed3b06e 100644
--- a/Tests/CPackTestAllGenerators/CMakeLists.txt
+++ b/Tests/CPackTestAllGenerators/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CPackTestAllGenerators)
add_subdirectory(../CTestTest/SmallAndFast SmallAndFast)
install(FILES RunCPack.cmake DESTINATION .)
diff --git a/Tests/CPackWiXGenerator/CMakeLists.txt b/Tests/CPackWiXGenerator/CMakeLists.txt
index 2249d703ae..33fdc5ef44 100644
--- a/Tests/CPackWiXGenerator/CMakeLists.txt
+++ b/Tests/CPackWiXGenerator/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CPackWiXGenerator)
diff --git a/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt b/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt
index ce6fac4352..79e968a581 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 7c7a3e5bb4..aaf30704bc 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/CTestLimitDashJ/CMakeLists.txt b/Tests/CTestLimitDashJ/CMakeLists.txt
index d04b3adf45..5bb7369949 100644
--- a/Tests/CTestLimitDashJ/CMakeLists.txt
+++ b/Tests/CTestLimitDashJ/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CTestLimitDashJ NONE)
# This file demonstrates https://gitlab.kitware.com/cmake/cmake/-/issues/12904
diff --git a/Tests/CTestTest/SmallAndFast/CMakeLists.txt b/Tests/CTestTest/SmallAndFast/CMakeLists.txt
index 06cbafde23..d5b3b61a22 100644
--- a/Tests/CTestTest/SmallAndFast/CMakeLists.txt
+++ b/Tests/CTestTest/SmallAndFast/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(SmallAndFast)
include(CTest)
diff --git a/Tests/CTestTest2/test.cmake.in b/Tests/CTestTest2/test.cmake.in
index d5d4d2f39d..4f4f6cfb6c 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 dd180f0fe7..e46f71bbaa 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 ae6d0b578c..34003b43e2 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 3bac0e00b0..916bbbb088 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 1c46d4ca5a..0df9f378eb 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/CMakeLists.txt b/Tests/CTestTestCrash/CMakeLists.txt
index 663d2e45ca..c7e5b91d96 100644
--- a/Tests/CTestTestCrash/CMakeLists.txt
+++ b/Tests/CTestTestCrash/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestCrash)
include(CTest)
diff --git a/Tests/CTestTestCrash/test.cmake.in b/Tests/CTestTestCrash/test.cmake.in
index 916d4e9fc2..34c9f3e387 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/CMakeLists.txt b/Tests/CTestTestCycle/CMakeLists.txt
index 19f4dd7d10..4093111d2c 100644
--- a/Tests/CTestTestCycle/CMakeLists.txt
+++ b/Tests/CTestTestCycle/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestCycle)
include(CTest)
diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in
index 507d46bc5f..78b0ebbd16 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/CMakeLists.txt b/Tests/CTestTestDepends/CMakeLists.txt
index 462ad8c7a8..5a011d0159 100644
--- a/Tests/CTestTestDepends/CMakeLists.txt
+++ b/Tests/CTestTestDepends/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestDepends)
include(CTest)
diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in
index 11bc92a250..ea01297295 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 8eb808f7de..3aed1ab13c 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/CTestTestFailure/CMakeLists.txt b/Tests/CTestTestFailure/CMakeLists.txt
index db14b3d924..b6c1e7a091 100644
--- a/Tests/CTestTestFailure/CMakeLists.txt
+++ b/Tests/CTestTestFailure/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestFailure)
include(CTest)
diff --git a/Tests/CTestTestFailure/testNoBuild.cmake.in b/Tests/CTestTestFailure/testNoBuild.cmake.in
index 47d254f567..505916e795 100644
--- a/Tests/CTestTestFailure/testNoBuild.cmake.in
+++ b/Tests/CTestTestFailure/testNoBuild.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/CTestTestFailure/testNoExe.cmake.in b/Tests/CTestTestFailure/testNoExe.cmake.in
index 8496c80e1a..e3d7742a86 100644
--- a/Tests/CTestTestFailure/testNoExe.cmake.in
+++ b/Tests/CTestTestFailure/testNoExe.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/CTestTestFdSetSize/test.cmake.in b/Tests/CTestTestFdSetSize/test.cmake.in
index bfe4459259..73b2cfa032 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/launcher_compiler_test_project/CMakeLists.txt b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt
index 7376a40e6a..24da9ca5c4 100644
--- a/Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt
+++ b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(launcher_compiler_test_project)
diff --git a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt
index b31f587796..72764ca966 100644
--- a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt
+++ b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(launcher_custom_command_test_project)
diff --git a/Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt b/Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt
index 38980aa7e0..7bf0362a26 100644
--- a/Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt
+++ b/Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(launcher_linker_test_project)
diff --git a/Tests/CTestTestLaunchers/test.cmake.in b/Tests/CTestTestLaunchers/test.cmake.in
index 2db1ddd1d1..c3edfd5883 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/CTestTestMissingDependsExe/CMakeLists.txt b/Tests/CTestTestMissingDependsExe/CMakeLists.txt
index 9826da661a..07df19464b 100644
--- a/Tests/CTestTestMissingDependsExe/CMakeLists.txt
+++ b/Tests/CTestTestMissingDependsExe/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CTestTestMissingDependsExe)
diff --git a/Tests/CTestTestParallel/CMakeLists.txt b/Tests/CTestTestParallel/CMakeLists.txt
index 819fee4ebe..7527202a8c 100644
--- a/Tests/CTestTestParallel/CMakeLists.txt
+++ b/Tests/CTestTestParallel/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestParallel)
include(CTest)
diff --git a/Tests/CTestTestParallel/test.cmake.in b/Tests/CTestTestParallel/test.cmake.in
index 517db726ec..d60d16f548 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/CMakeLists.txt b/Tests/CTestTestResourceLock/CMakeLists.txt
index 4bc4366c3a..683aba53d2 100644
--- a/Tests/CTestTestResourceLock/CMakeLists.txt
+++ b/Tests/CTestTestResourceLock/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestResourceLock)
include(CTest)
diff --git a/Tests/CTestTestResourceLock/test.cmake.in b/Tests/CTestTestResourceLock/test.cmake.in
index 826226de0b..dab26fceff 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/CMakeLists.txt b/Tests/CTestTestScheduler/CMakeLists.txt
index a3f0f27cdc..91d565d402 100644
--- a/Tests/CTestTestScheduler/CMakeLists.txt
+++ b/Tests/CTestTestScheduler/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project (CTestTestScheduler)
include (CTest)
diff --git a/Tests/CTestTestScheduler/test.cmake.in b/Tests/CTestTestScheduler/test.cmake.in
index 5dcfb635ad..3b03a7c452 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/CTestTestSerialInDepends/CMakeLists.txt b/Tests/CTestTestSerialInDepends/CMakeLists.txt
index 90e50f9827..03ad4b3dcf 100644
--- a/Tests/CTestTestSerialInDepends/CMakeLists.txt
+++ b/Tests/CTestTestSerialInDepends/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CTestTestSerialInDepends)
diff --git a/Tests/CTestTestSerialOrder/CMakeLists.txt b/Tests/CTestTestSerialOrder/CMakeLists.txt
index 69c11fcde1..d46d80e358 100644
--- a/Tests/CTestTestSerialOrder/CMakeLists.txt
+++ b/Tests/CTestTestSerialOrder/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CTestTestSerialOrder)
diff --git a/Tests/CTestTestSkipReturnCode/CMakeLists.txt b/Tests/CTestTestSkipReturnCode/CMakeLists.txt
index 26c4178fd9..1eeeec6ef1 100644
--- a/Tests/CTestTestSkipReturnCode/CMakeLists.txt
+++ b/Tests/CTestTestSkipReturnCode/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CTestTestSkipReturnCode)
include(CTest)
diff --git a/Tests/CTestTestSkipReturnCode/test.cmake.in b/Tests/CTestTestSkipReturnCode/test.cmake.in
index 2988d2fe95..b45e4a6672 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/CMakeLists.txt b/Tests/CTestTestStopTime/CMakeLists.txt
index 08116e25b9..4f6e7958cd 100644
--- a/Tests/CTestTestStopTime/CMakeLists.txt
+++ b/Tests/CTestTestStopTime/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestStopTime)
include(CTest)
diff --git a/Tests/CTestTestStopTime/GetDate.cmake b/Tests/CTestTestStopTime/GetDate.cmake
index 64a4fb9b39..f8e40fcf80 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 3797d40eda..2d69f1d7f5 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/CMakeLists.txt b/Tests/CTestTestSubdir/CMakeLists.txt
index 87c4604d8a..e6f3209236 100644
--- a/Tests/CTestTestSubdir/CMakeLists.txt
+++ b/Tests/CTestTestSubdir/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestSubdir)
include(CTest)
diff --git a/Tests/CTestTestSubdir/test.cmake.in b/Tests/CTestTestSubdir/test.cmake.in
index 3b1fb5fc86..8b8d85e201 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 ce9c4979f0..9d9e430a09 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/CMakeLists.txt b/Tests/CTestTestUpload/CMakeLists.txt
index 5e02b2f4ac..5bf428d2a8 100644
--- a/Tests/CTestTestUpload/CMakeLists.txt
+++ b/Tests/CTestTestUpload/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestUpload)
add_executable (Sleep sleep.c)
diff --git a/Tests/CTestTestUpload/test.cmake.in b/Tests/CTestTestUpload/test.cmake.in
index 74fd1ecdf4..db428e98de 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/CMakeLists.txt b/Tests/CTestTestVerboseOutput/CMakeLists.txt
index 3792385842..d44e9fc5f3 100644
--- a/Tests/CTestTestVerboseOutput/CMakeLists.txt
+++ b/Tests/CTestTestVerboseOutput/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CTestTestVerboseOutput)
include(CTest)
diff --git a/Tests/CTestTestVerboseOutput/test.cmake.in b/Tests/CTestTestVerboseOutput/test.cmake.in
index 9c9a4dca83..b47383a693 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/CMakeLists.txt b/Tests/CTestTestZeroTimeout/CMakeLists.txt
index 2d404c8cbd..51ef80788d 100644
--- a/Tests/CTestTestZeroTimeout/CMakeLists.txt
+++ b/Tests/CTestTestZeroTimeout/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project (CTestTestZeroTimeout)
include (CTest)
diff --git a/Tests/CTestTestZeroTimeout/test.cmake.in b/Tests/CTestTestZeroTimeout/test.cmake.in
index 50dbba03ff..e0dbbc614d 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/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
index 69fa4b6104..92593092f4 100644
--- a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
+++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CheckCompilerRelatedVariables)
diff --git a/Tests/CheckFortran.cmake b/Tests/CheckFortran.cmake
index 1e943a1d1c..850406bb0f 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/CompileDefinitions/CMakeLists.txt b/Tests/CompileDefinitions/CMakeLists.txt
index 8347d5a225..cd0a0b0da0 100644
--- a/Tests/CompileDefinitions/CMakeLists.txt
+++ b/Tests/CompileDefinitions/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(CompileDefinitions)
# Use compile flags to tell executables which config is built
diff --git a/Tests/CompileFeatures/default_dialect.c b/Tests/CompileFeatures/default_dialect.c
index b990e53258..c696c83f3e 100644
--- a/Tests/CompileFeatures/default_dialect.c
+++ b/Tests/CompileFeatures/default_dialect.c
@@ -20,7 +20,8 @@
# error Buildsystem error
# endif
# if defined(__STDC_VERSION__) && \
- !(defined(__SUNPRO_C) && __STDC_VERSION__ == 199409L)
+ !(__STDC_VERSION__ == 199409L && \
+ (defined(__INTEL_COMPILER) || defined(__SUNPRO_C)))
# error Unexpected __STDC_VERSION__ definition
# endif
#endif
diff --git a/Tests/Contracts/Trilinos/CMakeLists.txt b/Tests/Contracts/Trilinos/CMakeLists.txt
index 6cc2d09dd1..e23a643300 100644
--- a/Tests/Contracts/Trilinos/CMakeLists.txt
+++ b/Tests/Contracts/Trilinos/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(Trilinos)
include(ExternalProject)
diff --git a/Tests/Contracts/VTK/CMakeLists.txt b/Tests/Contracts/VTK/CMakeLists.txt
index 0d36323902..aee4dc6125 100644
--- a/Tests/Contracts/VTK/CMakeLists.txt
+++ b/Tests/Contracts/VTK/CMakeLists.txt
@@ -1,6 +1,6 @@
# The VTK external project for CMake
# ---------------------------------------------------------------------------
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(VTK)
include(ExternalProject)
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt
index db08076d26..aa25c4cb09 100644
--- a/Tests/CudaOnly/CMakeLists.txt
+++ b/Tests/CudaOnly/CMakeLists.txt
@@ -27,6 +27,9 @@ if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang")
# Only NVCC defines __CUDACC_DEBUG__ when compiling in debug mode.
add_cuda_test_macro(CudaOnly.GPUDebugFlag CudaOnlyGPUDebugFlag)
+ add_cuda_test_macro(CudaOnly.CUBIN CudaOnlyCUBIN)
+ add_cuda_test_macro(CudaOnly.Fatbin CudaOnlyFatbin)
+ add_cuda_test_macro(CudaOnly.OptixIR CudaOnlyOptixIR)
endif()
add_cuda_test_macro(CudaOnly.DeviceLTO CudaOnlyDeviceLTO)
diff --git a/Tests/CudaOnly/CUBIN/CMakeLists.txt b/Tests/CudaOnly/CUBIN/CMakeLists.txt
new file mode 100644
index 0000000000..81787e4c81
--- /dev/null
+++ b/Tests/CudaOnly/CUBIN/CMakeLists.txt
@@ -0,0 +1,29 @@
+cmake_minimum_required(VERSION 3.18)
+unset(ENV{CMAKE_CUDA_ARCHITECTURES_NATIVE_CLAMP}) # CUBIN needs true native arch
+project(CudaCUBIN LANGUAGES CUDA)
+
+set(CMAKE_CUDA_ARCHITECTURES all-major)
+
+# CUBIN needs the true native arch to be supported by the CUDA toolkit.
+set(unavailable_native_archs "${CMAKE_CUDA_ARCHITECTURES_NATIVE}")
+list(REMOVE_ITEM unavailable_native_archs ${CMAKE_CUDA_ARCHITECTURES_ALL})
+if(unavailable_native_archs)
+ add_executable(CudaOnlyCUBIN main_no_native_archs.cu)
+ return()
+endif()
+
+add_library(CudaCUBIN OBJECT kernelA.cu kernelB.cu kernelC.cu)
+set_property(TARGET CudaCUBIN PROPERTY CUDA_CUBIN_COMPILATION ON)
+set_property(TARGET CudaCUBIN PROPERTY CUDA_ARCHITECTURES native)
+
+add_executable(CudaOnlyCUBIN main.cu)
+target_compile_features(CudaOnlyCUBIN PRIVATE cuda_std_11)
+target_compile_definitions(CudaOnlyCUBIN PRIVATE "CUBIN_FILE_PATHS=\"$<JOIN:$<TARGET_OBJECTS:CudaCUBIN>,~_~>\"")
+
+find_package(CUDAToolkit REQUIRED)
+target_link_libraries(CudaOnlyCUBIN PRIVATE CUDA::cuda_driver)
+
+if(APPLE)
+ # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
+ set_property(TARGET CudaOnlyCUBIN PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+endif()
diff --git a/Tests/CudaOnly/CUBIN/kernelA.cu b/Tests/CudaOnly/CUBIN/kernelA.cu
new file mode 100644
index 0000000000..fbe0d26d70
--- /dev/null
+++ b/Tests/CudaOnly/CUBIN/kernelA.cu
@@ -0,0 +1,7 @@
+
+__global__ void kernelA(float* r, float* x, float* y, float* z, int size)
+{
+ for (int i = threadIdx.x; i < size; i += blockDim.x) {
+ r[i] = x[i] * y[i] + z[i];
+ }
+}
diff --git a/Tests/CudaOnly/CUBIN/kernelB.cu b/Tests/CudaOnly/CUBIN/kernelB.cu
new file mode 100644
index 0000000000..74782532b9
--- /dev/null
+++ b/Tests/CudaOnly/CUBIN/kernelB.cu
@@ -0,0 +1,7 @@
+
+__global__ void kernelB(float* r, float* x, float* y, float* z, int size)
+{
+ for (int i = threadIdx.x; i < size; i += blockDim.x) {
+ r[i] = x[i] * y[i] + z[i];
+ }
+}
diff --git a/Tests/CudaOnly/CUBIN/kernelC.cu b/Tests/CudaOnly/CUBIN/kernelC.cu
new file mode 100644
index 0000000000..5f8a0ce93d
--- /dev/null
+++ b/Tests/CudaOnly/CUBIN/kernelC.cu
@@ -0,0 +1,7 @@
+
+__global__ void kernelC(float* r, float* x, float* y, float* z, int size)
+{
+ for (int i = threadIdx.x; i < size; i += blockDim.x) {
+ r[i] = x[i] * y[i] + z[i];
+ }
+}
diff --git a/Tests/CudaOnly/CUBIN/main.cu b/Tests/CudaOnly/CUBIN/main.cu
new file mode 100644
index 0000000000..581970a0c2
--- /dev/null
+++ b/Tests/CudaOnly/CUBIN/main.cu
@@ -0,0 +1,58 @@
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include <cuda.h>
+
+#define GENERATED_HEADER(x) GENERATED_HEADER1(x)
+#define GENERATED_HEADER1(x) <x>
+
+static std::string input_paths = { CUBIN_FILE_PATHS };
+
+int main()
+{
+ const std::string delimiter = "~_~";
+ input_paths += delimiter;
+
+ size_t end = 0;
+ size_t previous_end = 0;
+ std::vector<std::string> actual_paths;
+ while ((end = input_paths.find(delimiter, previous_end)) !=
+ std::string::npos) {
+ actual_paths.emplace_back(
+ input_paths.substr(previous_end, end - previous_end));
+ previous_end = end + 3;
+ }
+
+ cuInit(0);
+ int count = 0;
+ cuDeviceGetCount(&count);
+ if (count == 0) {
+ std::cerr << "No CUDA devices found\n";
+ return 1;
+ }
+
+ CUdevice device;
+ cuDeviceGet(&device, 0);
+
+ CUcontext context;
+ cuCtxCreate(&context, 0, device);
+
+ CUmodule module;
+ for (auto p : actual_paths) {
+ if (p.find(".cubin") == std::string::npos) {
+ std::cout << p << " Doesn't have the .cubin suffix" << p << std::endl;
+ return 1;
+ }
+ std::cout << "trying to load cubin: " << p << std::endl;
+ CUresult result = cuModuleLoad(&module, p.c_str());
+ std::cout << "module pointer: " << module << '\n';
+ if (result != CUDA_SUCCESS || module == nullptr) {
+ std::cerr << "Failed to load the embedded cubin with error: "
+ << static_cast<unsigned int>(result) << '\n';
+ return 1;
+ }
+ }
+
+ return 0;
+}
diff --git a/Tests/CudaOnly/CUBIN/main_no_native_archs.cu b/Tests/CudaOnly/CUBIN/main_no_native_archs.cu
new file mode 100644
index 0000000000..f8b643afbf
--- /dev/null
+++ b/Tests/CudaOnly/CUBIN/main_no_native_archs.cu
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/CudaOnly/Fatbin/CMakeLists.txt b/Tests/CudaOnly/Fatbin/CMakeLists.txt
new file mode 100644
index 0000000000..db0dc227e0
--- /dev/null
+++ b/Tests/CudaOnly/Fatbin/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required(VERSION 3.18)
+project(CudaFATBIN LANGUAGES CUDA)
+
+
+set(CMAKE_CUDA_ARCHITECTURES all-major)
+
+add_library(CudaFATBIN OBJECT
+${CMAKE_CURRENT_SOURCE_DIR}/../CUBIN/kernelA.cu
+${CMAKE_CURRENT_SOURCE_DIR}/../CUBIN/kernelB.cu
+${CMAKE_CURRENT_SOURCE_DIR}/../CUBIN/kernelC.cu)
+
+set_property(TARGET CudaFATBIN PROPERTY CUDA_FATBIN_COMPILATION ON)
+
+# Will use `cuModuleLoadFatBinary` to load the fatbinaries
+add_executable(CudaOnlyFatbin main.cu)
+target_compile_features(CudaOnlyFatbin PRIVATE cuda_std_11)
+target_compile_definitions(CudaOnlyFatbin PRIVATE "FATBIN_FILE_PATHS=\"$<JOIN:$<TARGET_OBJECTS:CudaFATBIN>,~_~>\"")
+
+find_package(CUDAToolkit REQUIRED)
+target_link_libraries(CudaOnlyFatbin PRIVATE CUDA::cuda_driver)
+
+if(APPLE)
+ # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
+ set_property(TARGET CudaOnlyFatbin PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+endif()
diff --git a/Tests/CudaOnly/Fatbin/main.cu b/Tests/CudaOnly/Fatbin/main.cu
new file mode 100644
index 0000000000..89af0e3a70
--- /dev/null
+++ b/Tests/CudaOnly/Fatbin/main.cu
@@ -0,0 +1,58 @@
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include <cuda.h>
+
+#define GENERATED_HEADER(x) GENERATED_HEADER1(x)
+#define GENERATED_HEADER1(x) <x>
+
+static std::string input_paths = { FATBIN_FILE_PATHS };
+
+int main()
+{
+ const std::string delimiter = "~_~";
+ input_paths += delimiter;
+
+ size_t end = 0;
+ size_t previous_end = 0;
+ std::vector<std::string> actual_paths;
+ while ((end = input_paths.find(delimiter, previous_end)) !=
+ std::string::npos) {
+ actual_paths.emplace_back(
+ input_paths.substr(previous_end, end - previous_end));
+ previous_end = end + 3;
+ }
+
+ cuInit(0);
+ int count = 0;
+ cuDeviceGetCount(&count);
+ if (count == 0) {
+ std::cerr << "No CUDA devices found\n";
+ return 1;
+ }
+
+ CUdevice device;
+ cuDeviceGet(&device, 0);
+
+ CUcontext context;
+ cuCtxCreate(&context, 0, device);
+
+ CUmodule module;
+ for (auto p : actual_paths) {
+ if (p.find(".fatbin") == std::string::npos) {
+ std::cout << p << " Doesn't have the .fatbin suffix" << p << std::endl;
+ return 1;
+ }
+ std::cout << "trying to load fatbin: " << p << std::endl;
+ CUresult result = cuModuleLoad(&module, p.c_str());
+ std::cout << "module pointer: " << module << '\n';
+ if (result != CUDA_SUCCESS || module == nullptr) {
+ std::cerr << "Failed to load the embedded fatbin with error: "
+ << static_cast<unsigned int>(result) << '\n';
+ return 1;
+ }
+ }
+
+ return 0;
+}
diff --git a/Tests/CudaOnly/OptixIR/CMakeLists.txt b/Tests/CudaOnly/OptixIR/CMakeLists.txt
new file mode 100644
index 0000000000..afeabdade7
--- /dev/null
+++ b/Tests/CudaOnly/OptixIR/CMakeLists.txt
@@ -0,0 +1,33 @@
+cmake_minimum_required(VERSION 3.18)
+project(CudaOptix LANGUAGES CUDA)
+
+
+set(CMAKE_CUDA_ARCHITECTURES all-major)
+
+add_library(CudaOptix OBJECT
+ ${CMAKE_CURRENT_SOURCE_DIR}/../CUBIN/kernelA.cu
+ ${CMAKE_CURRENT_SOURCE_DIR}/../CUBIN/kernelB.cu
+ ${CMAKE_CURRENT_SOURCE_DIR}/../CUBIN/kernelC.cu)
+
+if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "11.7.0")
+ set_property(TARGET CudaOptix PROPERTY CUDA_OPTIX_COMPILATION ON)
+endif()
+
+set_property(TARGET CudaOptix PROPERTY CUDA_ARCHITECTURES native)
+
+add_executable(CudaOnlyOptixIR main.cu)
+target_compile_features(CudaOnlyOptixIR PRIVATE cuda_std_11)
+
+if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "11.7.0")
+ target_compile_definitions(CudaOnlyOptixIR PRIVATE "OPTIX_FILE_PATHS=\"$<JOIN:$<TARGET_OBJECTS:CudaOptix>,~_~>\"")
+else()
+ target_compile_definitions(CudaOnlyOptixIR PRIVATE "OPTIX_FILE_PATHS=\"NO_OPTIX_SUPPORT\"")
+endif()
+
+find_package(CUDAToolkit REQUIRED)
+target_link_libraries(CudaOnlyOptixIR PRIVATE CUDA::cuda_driver)
+
+if(APPLE)
+ # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
+ set_property(TARGET CudaOnlyOptixIR PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+endif()
diff --git a/Tests/CudaOnly/OptixIR/main.cu b/Tests/CudaOnly/OptixIR/main.cu
new file mode 100644
index 0000000000..c79829b297
--- /dev/null
+++ b/Tests/CudaOnly/OptixIR/main.cu
@@ -0,0 +1,53 @@
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include <cuda.h>
+
+#define GENERATED_HEADER(x) GENERATED_HEADER1(x)
+#define GENERATED_HEADER1(x) <x>
+
+static std::string input_paths = { OPTIX_FILE_PATHS };
+
+int main()
+{
+ if (input_paths == "NO_OPTIX_SUPPORT") {
+ return 0;
+ }
+
+ const std::string delimiter = "~_~";
+ input_paths += delimiter;
+
+ size_t end = 0;
+ size_t previous_end = 0;
+ std::vector<std::string> actual_paths;
+ while ((end = input_paths.find(delimiter, previous_end)) !=
+ std::string::npos) {
+ actual_paths.emplace_back(
+ input_paths.substr(previous_end, end - previous_end));
+ previous_end = end + 3;
+ }
+
+ if (actual_paths.empty()) {
+ std::cerr << "Failed to parse OPTIX_FILE_PATHS" << std::endl;
+ return 1;
+ }
+
+ const std::uint32_t optix_magic_value = 0x7f4e43ed;
+ for (auto p : actual_paths) {
+ if (p.find(".optixir") == std::string::npos) {
+ std::cout << p << " Doesn't have the .optixir suffix" << p << std::endl;
+ return 1;
+ }
+ std::ifstream input(p, std::ios::binary);
+ std::uint32_t value;
+ input.read(reinterpret_cast<char*>(&value), sizeof(value));
+ if (value != optix_magic_value) {
+ std::cerr << p << " Doesn't look like an optix-ir file" << std::endl;
+ return 1;
+ }
+ }
+
+ return 0;
+}
diff --git a/Tests/CudaOnly/RuntimeControls/verify_runtime.cmake b/Tests/CudaOnly/RuntimeControls/verify_runtime.cmake
index b313dac937..27fbe45874 100644
--- a/Tests/CudaOnly/RuntimeControls/verify_runtime.cmake
+++ b/Tests/CudaOnly/RuntimeControls/verify_runtime.cmake
@@ -7,7 +7,7 @@ file(GET_RUNTIME_DEPENDENCIES
EXECUTABLES ${EXEC_PATH}
)
-list(FILTER resolved_libs INCLUDE REGEX ".*cudart.*")
+list(FILTER resolved_libs INCLUDE REGEX ".*[Cc][Uu][Dd][Aa][Rr][Tt].*")
list(LENGTH resolved_libs has_cudart)
if(has_cudart EQUAL 0)
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index fa06a94fa0..25df30075d 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -1,7 +1,7 @@
#
# Wrapping
#
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project (CustomCommand)
add_subdirectory(GeneratedHeader)
diff --git a/Tests/CustomCommandByproducts/External/CMakeLists.txt b/Tests/CustomCommandByproducts/External/CMakeLists.txt
index feaa12ea4c..81e072bc45 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/CustomCommandWorkingDirectory/CMakeLists.txt b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt
index 7697a9b727..531690ae16 100644
--- a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt
+++ b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(TestWorkingDir)
add_custom_command(
diff --git a/Tests/CxxDialect/CMakeLists.txt b/Tests/CxxDialect/CMakeLists.txt
index 8c903398cb..c88641b830 100644
--- a/Tests/CxxDialect/CMakeLists.txt
+++ b/Tests/CxxDialect/CMakeLists.txt
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
-cmake_policy(SET CMP0025 NEW)
+cmake_minimum_required(VERSION 3.5)
project(CxxDialect)
add_executable(use_typeof use_typeof.cxx)
diff --git a/Tests/CxxOnly/CMakeLists.txt b/Tests/CxxOnly/CMakeLists.txt
index 09689cb429..6cd3a8ecd6 100644
--- a/Tests/CxxOnly/CMakeLists.txt
+++ b/Tests/CxxOnly/CMakeLists.txt
@@ -1,5 +1,5 @@
# a simple CXX only test case
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project (CxxOnly CXX)
set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
diff --git a/Tests/Dependency/CMakeLists.txt b/Tests/Dependency/CMakeLists.txt
index 58d3fb7c51..cae108ea87 100644
--- a/Tests/Dependency/CMakeLists.txt
+++ b/Tests/Dependency/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project( Dependency )
# to test directories with only one character One was changed to 1
diff --git a/Tests/EmptyDepends/CMakeLists.txt b/Tests/EmptyDepends/CMakeLists.txt
index 272eff7fa8..5ba0b49ce9 100644
--- a/Tests/EmptyDepends/CMakeLists.txt
+++ b/Tests/EmptyDepends/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(EmptyDepends)
include(CTest)
diff --git a/Tests/EnforceConfig.cmake.in b/Tests/EnforceConfig.cmake.in
index 7722d7d5fb..a652efcd0a 100644
--- a/Tests/EnforceConfig.cmake.in
+++ b/Tests/EnforceConfig.cmake.in
@@ -35,5 +35,8 @@ unset(ENV{CMAKE_GENERATOR_PLATFORM})
unset(ENV{CMAKE_GENERATOR_TOOLSET})
unset(ENV{CMAKE_EXPORT_COMPILE_COMMANDS})
+# Verify that our module implementations do not recurse too much.
+set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 100)
+
@TEST_HOME_ENV_CODE@
-@TEST_WARN_VS11_CODE@
+@TEST_WARN_VS_CODE@
diff --git a/Tests/ExportImport/Import/try_compile/CMakeLists.txt b/Tests/ExportImport/Import/try_compile/CMakeLists.txt
index 813cf0666b..bb390f927c 100644
--- a/Tests/ExportImport/Import/try_compile/CMakeLists.txt
+++ b/Tests/ExportImport/Import/try_compile/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
find_package(testLibRequired 2.5 REQUIRED)
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 81d31e77b1..d1ab7ace7a 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ExternalProjectTest NONE)
if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
cmake_policy(SET CMP0114 NEW)
diff --git a/Tests/ExternalProject/Example/CMakeLists.txt b/Tests/ExternalProject/Example/CMakeLists.txt
index c3f2614e47..b6785a6191 100644
--- a/Tests/ExternalProject/Example/CMakeLists.txt
+++ b/Tests/ExternalProject/Example/CMakeLists.txt
@@ -1,5 +1,5 @@
# This is the canonical simplest ExternalProject example CMakeLists.txt file:
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ExternalProjectExample NONE)
include(ExternalProject)
diff --git a/Tests/ExternalProjectLocal/CMakeLists.txt b/Tests/ExternalProjectLocal/CMakeLists.txt
index 57e81052bf..2dfc4252f2 100644
--- a/Tests/ExternalProjectLocal/CMakeLists.txt
+++ b/Tests/ExternalProjectLocal/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ExternalProjectLocalTest NONE)
if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
cmake_policy(SET CMP0114 NEW)
diff --git a/Tests/ExternalProjectUpdate/CMakeLists.txt b/Tests/ExternalProjectUpdate/CMakeLists.txt
index 6f8a7b15bc..1b84ff37b0 100644
--- a/Tests/ExternalProjectUpdate/CMakeLists.txt
+++ b/Tests/ExternalProjectUpdate/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ExternalProjectUpdateTest NONE)
if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
cmake_policy(SET CMP0114 NEW)
diff --git a/Tests/FindBLAS/Test/CMakeLists.txt b/Tests/FindBLAS/Test/CMakeLists.txt
index 14bf19f391..9909d2ea3c 100644
--- a/Tests/FindBLAS/Test/CMakeLists.txt
+++ b/Tests/FindBLAS/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindBLAS C)
include(CTest)
diff --git a/Tests/FindBZip2/Test/CMakeLists.txt b/Tests/FindBZip2/Test/CMakeLists.txt
index e9cb6187fa..136b3fdab9 100644
--- a/Tests/FindBZip2/Test/CMakeLists.txt
+++ b/Tests/FindBZip2/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindBZip2 C)
include(CTest)
diff --git a/Tests/FindBoost/Test/CMakeLists.txt b/Tests/FindBoost/Test/CMakeLists.txt
index f60ccfa009..39fa53206a 100644
--- a/Tests/FindBoost/Test/CMakeLists.txt
+++ b/Tests/FindBoost/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindBoost CXX)
include(CTest)
diff --git a/Tests/FindBoost/TestFail/CMakeLists.txt b/Tests/FindBoost/TestFail/CMakeLists.txt
index 7c14a59905..3db1a4f4d1 100644
--- a/Tests/FindBoost/TestFail/CMakeLists.txt
+++ b/Tests/FindBoost/TestFail/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindBoost CXX)
include(CTest)
diff --git a/Tests/FindBoost/TestHeaders/CMakeLists.txt b/Tests/FindBoost/TestHeaders/CMakeLists.txt
index d7be32703c..7dd12e9bb3 100644
--- a/Tests/FindBoost/TestHeaders/CMakeLists.txt
+++ b/Tests/FindBoost/TestHeaders/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindBoostHeaders CXX)
include(CTest)
diff --git a/Tests/FindDevIL/Test/CMakeLists.txt b/Tests/FindDevIL/Test/CMakeLists.txt
index c2c132223e..db80ccb85c 100644
--- a/Tests/FindDevIL/Test/CMakeLists.txt
+++ b/Tests/FindDevIL/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindDevIL C)
include(CTest)
diff --git a/Tests/FindGIF/Test/CMakeLists.txt b/Tests/FindGIF/Test/CMakeLists.txt
index 961e636faa..eb0291e99b 100644
--- a/Tests/FindGIF/Test/CMakeLists.txt
+++ b/Tests/FindGIF/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindGIF C)
include(CTest)
diff --git a/Tests/FindGLEW/Test/CMakeLists.txt b/Tests/FindGLEW/Test/CMakeLists.txt
index 954ee1092b..de8d97ded8 100644
--- a/Tests/FindGLEW/Test/CMakeLists.txt
+++ b/Tests/FindGLEW/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindGLEW LANGUAGES CXX)
include(CTest)
diff --git a/Tests/FindGSL/rng/CMakeLists.txt b/Tests/FindGSL/rng/CMakeLists.txt
index b15d6acab0..497b6c3855 100644
--- a/Tests/FindGSL/rng/CMakeLists.txt
+++ b/Tests/FindGSL/rng/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(FindGSL_rng CXX)
include(CTest)
diff --git a/Tests/FindGTK2/atk/CMakeLists.txt b/Tests/FindGTK2/atk/CMakeLists.txt
index 0392d88c48..b80c6fca92 100644
--- a/Tests/FindGTK2/atk/CMakeLists.txt
+++ b/Tests/FindGTK2/atk/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(atk C)
diff --git a/Tests/FindGTK2/atkmm/CMakeLists.txt b/Tests/FindGTK2/atkmm/CMakeLists.txt
index ec838deb95..cea87cdb32 100644
--- a/Tests/FindGTK2/atkmm/CMakeLists.txt
+++ b/Tests/FindGTK2/atkmm/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(atkmm CXX)
diff --git a/Tests/FindGTK2/cairo/CMakeLists.txt b/Tests/FindGTK2/cairo/CMakeLists.txt
index 3652ad603b..42d371a241 100644
--- a/Tests/FindGTK2/cairo/CMakeLists.txt
+++ b/Tests/FindGTK2/cairo/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(cairo C)
diff --git a/Tests/FindGTK2/cairomm/CMakeLists.txt b/Tests/FindGTK2/cairomm/CMakeLists.txt
index cde0f42204..5d957eedee 100644
--- a/Tests/FindGTK2/cairomm/CMakeLists.txt
+++ b/Tests/FindGTK2/cairomm/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(cairomm CXX)
diff --git a/Tests/FindGTK2/gdk/CMakeLists.txt b/Tests/FindGTK2/gdk/CMakeLists.txt
index 35ef337773..2b8f533b4e 100644
--- a/Tests/FindGTK2/gdk/CMakeLists.txt
+++ b/Tests/FindGTK2/gdk/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gdk C)
diff --git a/Tests/FindGTK2/gdk_pixbuf/CMakeLists.txt b/Tests/FindGTK2/gdk_pixbuf/CMakeLists.txt
index ea1b05da66..3524f065db 100644
--- a/Tests/FindGTK2/gdk_pixbuf/CMakeLists.txt
+++ b/Tests/FindGTK2/gdk_pixbuf/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gdk_pixbuf C)
diff --git a/Tests/FindGTK2/gdkmm/CMakeLists.txt b/Tests/FindGTK2/gdkmm/CMakeLists.txt
index 72fc6f415f..be1ccebf90 100644
--- a/Tests/FindGTK2/gdkmm/CMakeLists.txt
+++ b/Tests/FindGTK2/gdkmm/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gdkmm CXX)
diff --git a/Tests/FindGTK2/gio/CMakeLists.txt b/Tests/FindGTK2/gio/CMakeLists.txt
index 4835afa543..b420f48d26 100644
--- a/Tests/FindGTK2/gio/CMakeLists.txt
+++ b/Tests/FindGTK2/gio/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gio C)
diff --git a/Tests/FindGTK2/giomm/CMakeLists.txt b/Tests/FindGTK2/giomm/CMakeLists.txt
index b639979b5c..bae34ffa6e 100644
--- a/Tests/FindGTK2/giomm/CMakeLists.txt
+++ b/Tests/FindGTK2/giomm/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(giomm CXX)
diff --git a/Tests/FindGTK2/glib/CMakeLists.txt b/Tests/FindGTK2/glib/CMakeLists.txt
index 536fc67d07..8efde3d00d 100644
--- a/Tests/FindGTK2/glib/CMakeLists.txt
+++ b/Tests/FindGTK2/glib/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(glib C)
diff --git a/Tests/FindGTK2/glibmm/CMakeLists.txt b/Tests/FindGTK2/glibmm/CMakeLists.txt
index 25d55184c5..f0785dc1a8 100644
--- a/Tests/FindGTK2/glibmm/CMakeLists.txt
+++ b/Tests/FindGTK2/glibmm/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(glibmm CXX)
diff --git a/Tests/FindGTK2/gmodule/CMakeLists.txt b/Tests/FindGTK2/gmodule/CMakeLists.txt
index 2bfb81eeb7..9c686a679f 100644
--- a/Tests/FindGTK2/gmodule/CMakeLists.txt
+++ b/Tests/FindGTK2/gmodule/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gmodule C)
diff --git a/Tests/FindGTK2/gobject/CMakeLists.txt b/Tests/FindGTK2/gobject/CMakeLists.txt
index 11520f8a10..83d9546402 100644
--- a/Tests/FindGTK2/gobject/CMakeLists.txt
+++ b/Tests/FindGTK2/gobject/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gobject C)
diff --git a/Tests/FindGTK2/gthread/CMakeLists.txt b/Tests/FindGTK2/gthread/CMakeLists.txt
index 5ecfd9be6c..d97585c481 100644
--- a/Tests/FindGTK2/gthread/CMakeLists.txt
+++ b/Tests/FindGTK2/gthread/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gthread C)
diff --git a/Tests/FindGTK2/gtk/CMakeLists.txt b/Tests/FindGTK2/gtk/CMakeLists.txt
index 2c67619981..2b5a56dd42 100644
--- a/Tests/FindGTK2/gtk/CMakeLists.txt
+++ b/Tests/FindGTK2/gtk/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gtk C)
diff --git a/Tests/FindGTK2/gtkmm/CMakeLists.txt b/Tests/FindGTK2/gtkmm/CMakeLists.txt
index 3375a5583d..179f5dbf83 100644
--- a/Tests/FindGTK2/gtkmm/CMakeLists.txt
+++ b/Tests/FindGTK2/gtkmm/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(gtkmm CXX)
diff --git a/Tests/FindGTK2/pango/CMakeLists.txt b/Tests/FindGTK2/pango/CMakeLists.txt
index bd6b13a6e9..e9d6b9d9c2 100644
--- a/Tests/FindGTK2/pango/CMakeLists.txt
+++ b/Tests/FindGTK2/pango/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(pango C)
diff --git a/Tests/FindGTK2/pangocairo/CMakeLists.txt b/Tests/FindGTK2/pangocairo/CMakeLists.txt
index 157b9c2fec..bbb1f279ff 100644
--- a/Tests/FindGTK2/pangocairo/CMakeLists.txt
+++ b/Tests/FindGTK2/pangocairo/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(pangocairo C)
diff --git a/Tests/FindGTK2/pangoft2/CMakeLists.txt b/Tests/FindGTK2/pangoft2/CMakeLists.txt
index 76966e7a97..801629cd20 100644
--- a/Tests/FindGTK2/pangoft2/CMakeLists.txt
+++ b/Tests/FindGTK2/pangoft2/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(pangoft2 C)
diff --git a/Tests/FindGTK2/pangomm/CMakeLists.txt b/Tests/FindGTK2/pangomm/CMakeLists.txt
index 0bb49e2d06..853a1ddd23 100644
--- a/Tests/FindGTK2/pangomm/CMakeLists.txt
+++ b/Tests/FindGTK2/pangomm/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(pangomm CXX)
diff --git a/Tests/FindGTK2/pangoxft/CMakeLists.txt b/Tests/FindGTK2/pangoxft/CMakeLists.txt
index 7051d35133..f267d6c428 100644
--- a/Tests/FindGTK2/pangoxft/CMakeLists.txt
+++ b/Tests/FindGTK2/pangoxft/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(pangoxft C)
diff --git a/Tests/FindGTK2/sigc++/CMakeLists.txt b/Tests/FindGTK2/sigc++/CMakeLists.txt
index 9c1fff783e..f09ea66f1d 100644
--- a/Tests/FindGTK2/sigc++/CMakeLists.txt
+++ b/Tests/FindGTK2/sigc++/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(sigc++ CXX)
diff --git a/Tests/FindGTest/Test/CMakeLists.txt b/Tests/FindGTest/Test/CMakeLists.txt
index 9c1eb5e92b..582cbaa19e 100644
--- a/Tests/FindGTest/Test/CMakeLists.txt
+++ b/Tests/FindGTest/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindGTest CXX)
include(CTest)
diff --git a/Tests/FindGnuTLS/Test/CMakeLists.txt b/Tests/FindGnuTLS/Test/CMakeLists.txt
index c5a9819b2f..e17987daa0 100644
--- a/Tests/FindGnuTLS/Test/CMakeLists.txt
+++ b/Tests/FindGnuTLS/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindGnuTLS C)
include(CTest)
diff --git a/Tests/FindHDF5/CMakeLists.txt b/Tests/FindHDF5/CMakeLists.txt
new file mode 100644
index 0000000000..6bc551ac4d
--- /dev/null
+++ b/Tests/FindHDF5/CMakeLists.txt
@@ -0,0 +1,87 @@
+# These tests may be configured by cache entries:
+#
+# CMake_TEST_FindHDF5:BOOL=ON
+# Enable this directory.
+#
+# CMake_TEST_FindHDF5_<variant>_<lang>_COMPILER:FILEPATH=...
+# Enable testing for a variant/language combination with the given wrapper.
+# Variants: Serial, OpenMPI, MPICH
+# Languages: C, CXX, Fortran
+#
+# CMake_TEST_FindHDF5_<variant>_<lang>_COMPILER_EXPLICIT:BOOL=ON
+# Pass the above wrapper path to the test as HDF5_<lang>_COMPILER_EXECUTABLE.
+
+set(test_langs C CXX)
+if(CMAKE_Fortran_COMPILER)
+ list(APPEND test_langs Fortran)
+endif()
+
+# Test detection without any special hints.
+add_test(NAME FindHDF5.Default COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindHDF5/Test"
+ "${CMake_BINARY_DIR}/Tests/FindHDF5/Test-Default"
+ ${build_generator_args}
+ --build-project TestFindHDF5
+ --build-options ${build_options} -DTEST_SERIAL=1 "-DTEST_LANGS=${test_langs}"
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+
+foreach(variant Serial OpenMPI MPICH)
+ set(wrapper "")
+ set(wrapper_langs "")
+ set(wrapper_as_compiler "")
+ foreach(lang IN LISTS test_langs)
+ if(CMake_TEST_FindHDF5_${variant}_${lang}_COMPILER)
+ list(APPEND wrapper_langs ${lang})
+ list(APPEND wrapper_as_compiler -DCMAKE_${lang}_COMPILER=${CMake_TEST_FindHDF5_${variant}_${lang}_COMPILER})
+ if(CMake_TEST_FindHDF5_${variant}_${lang}_COMPILER_EXPLICIT)
+ list(APPEND wrapper -DHDF5_${lang}_COMPILER_EXECUTABLE=${CMake_TEST_FindHDF5_${variant}_${lang}_COMPILER})
+ endif()
+ endif()
+ endforeach()
+
+ if(NOT wrapper_langs)
+ continue()
+ endif()
+
+ if(variant STREQUAL "Serial")
+ set(test_kind -DTEST_SERIAL=1)
+ else()
+ set(test_kind -DTEST_PARALLEL=1)
+ endif()
+
+ # Test detection using the HDF5 compiler wrappers as a reference.
+ add_test(NAME FindHDF5.${variant} COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindHDF5/Test"
+ "${CMake_BINARY_DIR}/Tests/FindHDF5/Test-${variant}"
+ ${build_generator_args}
+ --build-project TestFindHDF5
+ --build-options ${build_options} ${test_kind} "-DTEST_LANGS=${wrapper_langs}" ${wrapper}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+ if(CMake_TEST_FindHDF5_${variant}_ENVMOD)
+ set_property(TEST FindHDF5.${variant} PROPERTY ENVIRONMENT_MODIFICATION ${CMake_TEST_FindHDF5_${variant}_ENVMOD})
+ endif()
+
+ # Test detection using the HDF5 compiler wrappers as the compiler.
+ # Skip this if there are spaces in the path. The HDF5 wrappers do not like them.
+ if(NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ")
+ add_test(NAME FindHDF5.${variant}-Wrapper COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindHDF5/Test"
+ "${CMake_BINARY_DIR}/Tests/FindHDF5/Test-${variant}-Wrapper"
+ ${build_generator_args}
+ --build-project TestFindHDF5
+ --build-options ${build_options} ${test_kind} "-DTEST_LANGS=${wrapper_langs}" -D TEST_WRAPPER_AS_COMPILER=1 ${wrapper_as_compiler}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+ if(CMake_TEST_FindHDF5_${variant}_ENVMOD)
+ set_property(TEST FindHDF5.${variant}-Wrapper PROPERTY ENVIRONMENT_MODIFICATION ${CMake_TEST_FindHDF5_${variant}_ENVMOD})
+ endif()
+ endif()
+endforeach()
diff --git a/Tests/FindHDF5/Test/CMakeLists.txt b/Tests/FindHDF5/Test/CMakeLists.txt
new file mode 100644
index 0000000000..da1b3690e3
--- /dev/null
+++ b/Tests/FindHDF5/Test/CMakeLists.txt
@@ -0,0 +1,106 @@
+cmake_minimum_required(VERSION 3.26)
+project(TestFindHDF5 LANGUAGES ${TEST_LANGS})
+include(CTest)
+message(STATUS "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)")
+
+if(TEST_PARALLEL)
+ set(HDF5_PREFER_PARALLEL 1)
+endif()
+
+find_package(HDF5 REQUIRED COMPONENTS ${TEST_LANGS} HL)
+
+set(variables HDF5_FOUND HDF5_VERSION)
+if(NOT TEST_WRAPPER_AS_COMPILER)
+ list(APPEND variables HDF5_INCLUDE_DIRS HDF5_LIBRARIES HDF5_HL_LIBRARIES)
+ foreach(lang ${TEST_LANGS})
+ list(APPEND variables
+ HDF5_${lang}_COMPILER_EXECUTABLE
+ HDF5_${lang}_INCLUDE_DIRS
+ HDF5_${lang}_LIBRARIES
+ HDF5_${lang}_HL_LIBRARIES
+ )
+ endforeach()
+ endif()
+foreach(var IN LISTS variables)
+ message(STATUS "${var}='${${var}}'")
+endforeach()
+foreach(var IN LISTS variables)
+ if(NOT DEFINED ${var})
+ message(SEND_ERROR "Variable '${var}' is not defined!")
+ endif()
+endforeach()
+
+set(targets HDF5::HDF5)
+if(CMAKE_C_COMPILER_LOADED)
+ list(APPEND targets hdf5::hdf5 hdf5::hdf5_hl)
+endif()
+if(CMAKE_CXX_COMPILER_LOADED)
+ list(APPEND targets hdf5::hdf5_cpp hdf5::hdf5_hl_cpp)
+endif()
+if(CMAKE_Fortran_COMPILER_LOADED)
+ list(APPEND targets hdf5::hdf5_fortran hdf5::hdf5_hl_fortran)
+endif()
+foreach(target IN LISTS targets)
+ if(NOT TARGET ${target})
+ message(SEND_ERROR "Target '${target}' not defined!")
+ endif()
+endforeach()
+
+message(STATUS "HDF5_IS_PARALLEL='${HDF5_IS_PARALLEL}'")
+if(TEST_SERIAL)
+ if(HDF5_IS_PARALLEL)
+ message(SEND_ERROR "HDF5_IS_PARALLEL is true in serial test.")
+ endif()
+endif()
+if(TEST_PARALLEL)
+ if(NOT HDF5_IS_PARALLEL)
+ message(SEND_ERROR "HDF5_IS_PARALLEL is false in parallel test.")
+ endif()
+endif()
+
+if(TEST_PARALLEL)
+ set(MPI_CXX_SKIP_MPICXX TRUE)
+ set(MPI_CXX_VALIDATE_SKIP_MPICXX TRUE)
+ find_package(MPI REQUIRED)
+ set(mpi_C_tgt MPI::MPI_C)
+ set(mpi_C_inc ${MPI_C_INCLUDE_PATH})
+ set(mpi_C_lib ${MPI_C_LINK_FLAGS} ${MPI_C_LIBRARIES})
+ set(mpi_Fortran_tgt MPI::MPI_Fortran)
+ set(mpi_Fortran_inc ${MPI_Fortran_INCLUDE_PATH})
+ set(mpi_Fortran_lib ${MPI_Fortran_LIBRARIES})
+endif()
+
+if(CMAKE_C_COMPILER_LOADED)
+ add_executable(test_C_tgt test_C.c)
+ target_link_libraries(test_C_tgt PRIVATE hdf5::hdf5 ${mpi_C_tgt})
+ add_test(NAME test_C_tgt COMMAND test_C_tgt test_C_tgt.h5)
+
+ add_executable(test_C_var test_C.c)
+ target_include_directories(test_C_var PRIVATE ${HDF5_C_INCLUDE_DIRS} ${mpi_C_inc})
+ target_link_libraries(test_C_var PRIVATE ${HDF5_C_LIBRARIES} ${mpi_C_lib})
+ add_test(NAME test_C_var COMMAND test_C_var test_C_var.h5)
+endif()
+
+if(CMAKE_CXX_COMPILER_LOADED)
+ add_executable(test_CXX_tgt test_CXX.cxx)
+ target_link_libraries(test_CXX_tgt PRIVATE hdf5::hdf5_cpp
+ hdf5::hdf5 # FIXME: hdf5::hdf5_cpp should link hdf5::hdf5 automatically.
+ ${mpi_C_tgt})
+ add_test(NAME test_CXX_tgt COMMAND test_CXX_tgt test_CXX_tgt.h5)
+
+ add_executable(test_CXX_var test_CXX.cxx)
+ target_include_directories(test_CXX_var PRIVATE ${HDF5_CXX_INCLUDE_DIRS} ${mpi_C_inc})
+ target_link_libraries(test_CXX_var PRIVATE ${HDF5_CXX_LIBRARIES} ${mpi_C_lib})
+ add_test(NAME test_CXX_var COMMAND test_CXX_var test_CXX_var.h5)
+endif()
+
+if(CMAKE_Fortran_COMPILER_LOADED)
+ add_executable(test_Fortran_tgt test_Fortran.f90)
+ target_link_libraries(test_Fortran_tgt PRIVATE hdf5::hdf5_fortran ${mpi_Fortran_tgt})
+ add_test(NAME test_Fortran_tgt COMMAND test_Fortran_tgt)
+
+ add_executable(test_Fortran_var test_Fortran.f90)
+ target_include_directories(test_Fortran_var PRIVATE ${HDF5_Fortran_INCLUDE_DIRS} ${mpi_Fortran_inc})
+ target_link_libraries(test_Fortran_var PRIVATE ${HDF5_Fortran_LIBRARIES} ${mpi_Fortran_lib})
+ add_test(NAME test_Fortran_var COMMAND test_Fortran_var)
+endif()
diff --git a/Tests/FindHDF5/Test/test_C.c b/Tests/FindHDF5/Test/test_C.c
new file mode 100644
index 0000000000..4c18364528
--- /dev/null
+++ b/Tests/FindHDF5/Test/test_C.c
@@ -0,0 +1,12 @@
+#include <hdf5.h>
+
+int main(int argc, const char* argv[])
+{
+ hid_t fid;
+ if (argc != 2) {
+ return 1;
+ }
+ fid = H5Fcreate(argv[1], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ H5Fclose(fid);
+ return 0;
+}
diff --git a/Tests/FindHDF5/Test/test_CXX.cxx b/Tests/FindHDF5/Test/test_CXX.cxx
new file mode 100644
index 0000000000..93fb462b65
--- /dev/null
+++ b/Tests/FindHDF5/Test/test_CXX.cxx
@@ -0,0 +1,14 @@
+#include <H5Cpp.h>
+
+#ifndef H5_NO_NAMESPACE
+using namespace H5;
+#endif
+
+int main(int argc, const char* argv[])
+{
+ if (argc != 2) {
+ return 1;
+ }
+ H5File f(argv[1], H5F_ACC_TRUNC);
+ return 0;
+}
diff --git a/Tests/FindHDF5/Test/test_Fortran.f90 b/Tests/FindHDF5/Test/test_Fortran.f90
new file mode 100644
index 0000000000..4c12c8ce02
--- /dev/null
+++ b/Tests/FindHDF5/Test/test_Fortran.f90
@@ -0,0 +1,6 @@
+program hdf5_hello
+ use hdf5
+ integer error
+ call h5open_f(error)
+ call h5close_f(error)
+end
diff --git a/Tests/FindICU/Test/CMakeLists.txt b/Tests/FindICU/Test/CMakeLists.txt
index 1247ac778f..066d1733d5 100644
--- a/Tests/FindICU/Test/CMakeLists.txt
+++ b/Tests/FindICU/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindICU LANGUAGES CXX)
include(CTest)
diff --git a/Tests/FindImageMagick/Test/CMakeLists.txt b/Tests/FindImageMagick/Test/CMakeLists.txt
index 618226004a..4e4f14dbbd 100644
--- a/Tests/FindImageMagick/Test/CMakeLists.txt
+++ b/Tests/FindImageMagick/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(FindImageMagick C CXX)
include(CTest)
diff --git a/Tests/FindJPEG/Test/CMakeLists.txt b/Tests/FindJPEG/Test/CMakeLists.txt
index 912c7a19b1..390b3a7471 100644
--- a/Tests/FindJPEG/Test/CMakeLists.txt
+++ b/Tests/FindJPEG/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindJPEG C)
include(CTest)
diff --git a/Tests/FindJsonCpp/Test/CMakeLists.txt b/Tests/FindJsonCpp/Test/CMakeLists.txt
index d1dc647b39..5f100ea5c5 100644
--- a/Tests/FindJsonCpp/Test/CMakeLists.txt
+++ b/Tests/FindJsonCpp/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindJsonCpp CXX)
include(CTest)
diff --git a/Tests/FindLAPACK/Test/CMakeLists.txt b/Tests/FindLAPACK/Test/CMakeLists.txt
index f5d5a7391d..ce9af9851b 100644
--- a/Tests/FindLAPACK/Test/CMakeLists.txt
+++ b/Tests/FindLAPACK/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindLAPACK C)
include(CTest)
diff --git a/Tests/FindLibLZMA/Test/CMakeLists.txt b/Tests/FindLibLZMA/Test/CMakeLists.txt
index c59dcdbdd6..438938e542 100644
--- a/Tests/FindLibLZMA/Test/CMakeLists.txt
+++ b/Tests/FindLibLZMA/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindLZMA C)
include(CTest)
diff --git a/Tests/FindLibXml2/Test/CMakeLists.txt b/Tests/FindLibXml2/Test/CMakeLists.txt
index 041cc132e7..9b866ab082 100644
--- a/Tests/FindLibXml2/Test/CMakeLists.txt
+++ b/Tests/FindLibXml2/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindLibXml2 C)
include(CTest)
diff --git a/Tests/FindLibXslt/Test/CMakeLists.txt b/Tests/FindLibXslt/Test/CMakeLists.txt
index e93266138d..32a157f660 100644
--- a/Tests/FindLibXslt/Test/CMakeLists.txt
+++ b/Tests/FindLibXslt/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindLibXslt C)
include(CTest)
diff --git a/Tests/FindMPI/CMakeLists.txt b/Tests/FindMPI/CMakeLists.txt
index 121d978a80..1bc12c8154 100644
--- a/Tests/FindMPI/CMakeLists.txt
+++ b/Tests/FindMPI/CMakeLists.txt
@@ -19,3 +19,6 @@ add_test(NAME FindMPI.Test COMMAND
-DMPI_TEST_Fortran=${CMake_TEST_FindMPI_FLAG_Fortran}
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
+if(CMake_TEST_FindMPI_ENVMOD)
+ set_property(TEST FindMPI.Test PROPERTY ENVIRONMENT_MODIFICATION ${CMake_TEST_FindMPI_ENVMOD})
+endif()
diff --git a/Tests/FindMatlab/basic_checks/CMakeLists.txt b/Tests/FindMatlab/basic_checks/CMakeLists.txt
index c0c752a0d1..e9b696c760 100644
--- a/Tests/FindMatlab/basic_checks/CMakeLists.txt
+++ b/Tests/FindMatlab/basic_checks/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
enable_testing()
project(basic_checks)
diff --git a/Tests/FindMatlab/components_checks/CMakeLists.txt b/Tests/FindMatlab/components_checks/CMakeLists.txt
index f5d4880609..efb99aefa9 100644
--- a/Tests/FindMatlab/components_checks/CMakeLists.txt
+++ b/Tests/FindMatlab/components_checks/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
enable_testing()
project(component_checks)
diff --git a/Tests/FindMatlab/failure_reports/CMakeLists.txt b/Tests/FindMatlab/failure_reports/CMakeLists.txt
index 4b092cd28f..45e48d7d24 100644
--- a/Tests/FindMatlab/failure_reports/CMakeLists.txt
+++ b/Tests/FindMatlab/failure_reports/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
enable_testing()
project(failure_reports)
diff --git a/Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt b/Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt
index bceeba1767..58db0ecea0 100644
--- a/Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt
+++ b/Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
enable_testing()
project(no_implicit_links_checks)
diff --git a/Tests/FindMatlab/r2018a_check/CMakeLists.txt b/Tests/FindMatlab/r2018a_check/CMakeLists.txt
index c732be1512..8b21888715 100644
--- a/Tests/FindMatlab/r2018a_check/CMakeLists.txt
+++ b/Tests/FindMatlab/r2018a_check/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
enable_testing()
project(r2018a_checks)
diff --git a/Tests/FindMatlab/targets_checks/CMakeLists.txt b/Tests/FindMatlab/targets_checks/CMakeLists.txt
index 4af7cc3606..c709bbd90d 100644
--- a/Tests/FindMatlab/targets_checks/CMakeLists.txt
+++ b/Tests/FindMatlab/targets_checks/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
enable_testing()
project(targets_checks)
diff --git a/Tests/FindMatlab/versions_checks/CMakeLists.txt b/Tests/FindMatlab/versions_checks/CMakeLists.txt
index d015730b0b..f203f4b26e 100644
--- a/Tests/FindMatlab/versions_checks/CMakeLists.txt
+++ b/Tests/FindMatlab/versions_checks/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
enable_testing()
project(versions_checks)
diff --git a/Tests/FindODBC/Test/CMakeLists.txt b/Tests/FindODBC/Test/CMakeLists.txt
index a20c0f7071..1e3a2390d1 100644
--- a/Tests/FindODBC/Test/CMakeLists.txt
+++ b/Tests/FindODBC/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindODBC C)
include(CTest)
diff --git a/Tests/FindOpenAL/Test/CMakeLists.txt b/Tests/FindOpenAL/Test/CMakeLists.txt
index fa3e2638ee..6479df6420 100644
--- a/Tests/FindOpenAL/Test/CMakeLists.txt
+++ b/Tests/FindOpenAL/Test/CMakeLists.txt
@@ -12,3 +12,9 @@ add_executable(test_var main.cxx)
target_include_directories(test_var PRIVATE ${OPENAL_INCLUDE_DIR})
target_link_libraries(test_var PRIVATE ${OPENAL_LIBRARY})
add_test(NAME test_var COMMAND test_var)
+
+# OpenAL has been deprecated on macOS since Catalina (10.15)
+if(APPLE)
+ target_compile_options(test_tgt PRIVATE "-Wno-deprecated-declarations")
+ target_compile_options(test_var PRIVATE "-Wno-deprecated-declarations")
+endif()
diff --git a/Tests/FindOpenAL/Test/main.cxx b/Tests/FindOpenAL/Test/main.cxx
index bb45faf5b9..1396c60b32 100644
--- a/Tests/FindOpenAL/Test/main.cxx
+++ b/Tests/FindOpenAL/Test/main.cxx
@@ -1,5 +1,10 @@
-#include <AL/al.h>
-#include <AL/alc.h>
+#ifdef __APPLE__
+# include "OpenAL/al.h"
+# include "OpenAL/alc.h"
+#else
+# include <AL/al.h>
+# include <AL/alc.h>
+#endif
#include <stdio.h>
int main()
diff --git a/Tests/FindOpenCL/Test/CMakeLists.txt b/Tests/FindOpenCL/Test/CMakeLists.txt
index f8a65877b0..4a1f6bde60 100644
--- a/Tests/FindOpenCL/Test/CMakeLists.txt
+++ b/Tests/FindOpenCL/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindOpenCL C)
include(CTest)
diff --git a/Tests/FindOpenGL/Test/CMakeLists.txt b/Tests/FindOpenGL/Test/CMakeLists.txt
index 9004a9860b..7c805c0c5f 100644
--- a/Tests/FindOpenGL/Test/CMakeLists.txt
+++ b/Tests/FindOpenGL/Test/CMakeLists.txt
@@ -44,28 +44,115 @@ else()
add_test(NAME test_comp_glx_novnd COMMAND test_comp_glx_novnd)
endif()
-# EGL is only available on Linux+GLVND at present.
-if(OpenGL_TEST_VND)
- find_package(OpenGL COMPONENTS OpenGL EGL)
- if(OpenGL_EGL_FOUND)
- add_executable(test_comp_egl main.c)
- target_link_libraries(test_comp_egl PRIVATE OpenGL::OpenGL OpenGL::EGL)
- add_test(NAME test_comp_egl COMMAND test_comp_egl)
- # EGL-only code should not link to GLX.
- execute_process(COMMAND ldd test_comp_egl
- OUTPUT_VARIABLE LDD_OUT
- ERROR_VARIABLE LDD_ERR)
- if("${LDD_OUT}" MATCHES "GLX")
- message(FATAL_ERROR "EGL-only code links to GLX!")
- endif()
+find_package(OpenGL COMPONENTS OpenGL EGL)
+if(OpenGL_EGL_FOUND)
+ add_executable(test_comp_egl main.c)
+ target_link_libraries(test_comp_egl PRIVATE OpenGL::OpenGL OpenGL::EGL)
+ add_test(NAME test_comp_egl COMMAND test_comp_egl)
+ # EGL-only code should not link to GLX.
+ get_target_property(iface_libs OpenGL::EGL INTERFACE_LINK_LIBRARIES)
+ if(iface_libs MATCHES "GLX")
+ message(FATAL_ERROR "EGL-only code links to GLX!")
+ endif()
+endif()
+
+# all three COMPONENTS together.
+find_package(OpenGL COMPONENTS OpenGL EGL GLX)
+if(OpenGL_EGL_FOUND AND OpenGL_GLX_FOUND)
+ add_executable(test_comp_both main.c)
+ target_link_libraries(test_comp_both PRIVATE OpenGL::OpenGL OpenGL::EGL
+ OpenGL::GLX)
+ add_test(NAME test_comp_both COMMAND test_comp_both)
+endif()
+
+find_package(OpenGL COMPONENTS GLES2)
+if(OpenGL_GLES2_FOUND)
+ add_executable(test_comp_gles2 main_gles2.c)
+ target_link_libraries(test_comp_gles2 PRIVATE OpenGL::GLES2)
+ add_test(NAME test_comp_gles2 COMMAND test_comp_gles2)
+ # GLES2-only code should not link to OpenGL
+ get_target_property(iface_libs test_comp_gles2 LINK_LIBRARIES)
+ if(iface_libs MATCHES "OpenGL::OpenGL")
+ message(FATAL_ERROR "GLES2-only code links to OpenGL!")
endif()
+endif()
+
+# GLES2 and EGL together.
+find_package(OpenGL COMPONENTS GLES2 EGL)
+if(OpenGL_GLES2_FOUND AND OpenGL_EGL_FOUND)
+ add_executable(test_comp_gles2_egl main_gles2.c)
+ target_link_libraries(test_comp_gles2_egl PRIVATE OpenGL::GLES2
+ OpenGL::EGL)
+ add_test(NAME test_comp_gles2_egl COMMAND test_comp_gles2_egl)
+ # GLES2-EGL-only code should not link to OpenGL or GLX
+ get_target_property(iface_libs test_comp_gles2_egl LINK_LIBRARIES)
+ if(iface_libs MATCHES "OpenGL::OpenGL")
+ message(FATAL_ERROR "GLES2-only code links to OpenGL!")
+ endif()
+ if(iface_libs MATCHES "GLX")
+ message(FATAL_ERROR "GLES2-EGL-only code links to GLX!")
+ endif()
+endif()
- # all three COMPONENTS together.
- find_package(OpenGL COMPONENTS OpenGL EGL GLX)
- if(OpenGL_EGL_FOUND AND OpenGL_GLX_FOUND)
- add_executable(test_comp_both main.c)
- target_link_libraries(test_comp_both PRIVATE OpenGL::OpenGL OpenGL::EGL
- OpenGL::GLX)
- add_test(NAME test_comp_both COMMAND test_comp_both)
+# GLES2 and GLX together.
+find_package(OpenGL COMPONENTS GLES2 GLX)
+if(OpenGL_GLES2_FOUND AND OpenGL_GLX_FOUND)
+ add_executable(test_comp_gles2_glx main_gles2.c)
+ target_link_libraries(test_comp_gles2_glx PRIVATE OpenGL::GLES2
+ OpenGL::GLX)
+ add_test(NAME test_comp_gles2_glx COMMAND test_comp_gles2_glx)
+ # GLES2-GLX-only code should not link to OpenGL or EGL
+ get_target_property(iface_libs test_comp_gles2_glx LINK_LIBRARIES)
+ if(iface_libs MATCHES "OpenGL::OpenGL")
+ message(FATAL_ERROR "GLES2-only code links to OpenGL!")
+ endif()
+ if(iface_libs MATCHES "EGL")
+ message(FATAL_ERROR "GLES2-GLX-only code links to EGL!")
+ endif()
+endif()
+
+find_package(OpenGL COMPONENTS GLES3)
+if(OpenGL_GLES3_FOUND)
+ add_executable(test_comp_gles3 main_gles3.c)
+ target_link_libraries(test_comp_gles3 PRIVATE OpenGL::GLES3)
+ add_test(NAME test_comp_gles3 COMMAND test_comp_gles3)
+ # GLES3-only code should not link to OpenGL.
+ get_target_property(iface_libs test_comp_gles3 LINK_LIBRARIES)
+ if(iface_libs MATCHES "OpenGL::OpenGL")
+ message(FATAL_ERROR "GLES3-only code links to OpenGL!")
+ endif()
+endif()
+
+# GLES3 and EGL together.
+find_package(OpenGL COMPONENTS GLES3 EGL)
+if(OpenGL_GLES3_FOUND AND OpenGL_EGL_FOUND)
+ add_executable(test_comp_gles3_egl main_gles3.c)
+ target_link_libraries(test_comp_gles3_egl PRIVATE OpenGL::GLES3
+ OpenGL::EGL)
+ add_test(NAME test_comp_gles3_egl COMMAND test_comp_gles3_egl)
+ # GLES3-EGL-only code should not link to OpenGL or GLX
+ get_target_property(iface_libs test_comp_gles3_egl LINK_LIBRARIES)
+ if(iface_libs MATCHES "OpenGL::OpenGL")
+ message(FATAL_ERROR "GLES3-only code links to OpenGL!")
+ endif()
+ if(iface_libs MATCHES "GLX")
+ message(FATAL_ERROR "GLES3-EGL-only code links to GLX!")
+ endif()
+endif()
+
+# GLES3 and GLX together.
+find_package(OpenGL COMPONENTS GLES3 GLX)
+if(OpenGL_GLES3_FOUND AND OpenGL_GLX_FOUND)
+ add_executable(test_comp_gles3_glx main_gles3.c)
+ target_link_libraries(test_comp_gles3_glx PRIVATE OpenGL::GLES3
+ OpenGL::GLX)
+ add_test(NAME test_comp_gles3_glx COMMAND test_comp_gles3_glx)
+ # GLESr-GLX-only code should not link to OpenGL or EGL
+ get_target_property(iface_libs test_comp_gles3_glx LINK_LIBRARIES)
+ if(iface_libs MATCHES "OpenGL::OpenGL")
+ message(FATAL_ERROR "GLES3-only code links to OpenGL!")
+ endif()
+ if(iface_libs MATCHES "EGL")
+ message(FATAL_ERROR "GLES3-GLX-only code links to EGL!")
endif()
endif()
diff --git a/Tests/FindOpenGL/Test/main_gles2.c b/Tests/FindOpenGL/Test/main_gles2.c
new file mode 100644
index 0000000000..52f5936089
--- /dev/null
+++ b/Tests/FindOpenGL/Test/main_gles2.c
@@ -0,0 +1,17 @@
+#ifdef _WIN32
+# error "GLES2 cannot be tested on WIN32 platforms."
+#endif
+#ifdef __APPLE__
+# error "GLES2 cannot be tested on macOS platform."
+#else
+# include <GLES2/gl2.h>
+#endif
+
+#include <stdio.h>
+
+int main()
+{
+ /* Reference a GL symbol without requiring a context at runtime. */
+ printf("&glGetString = %p\n", &glGetString);
+ return 0;
+}
diff --git a/Tests/FindOpenGL/Test/main_gles3.c b/Tests/FindOpenGL/Test/main_gles3.c
new file mode 100644
index 0000000000..875f73c992
--- /dev/null
+++ b/Tests/FindOpenGL/Test/main_gles3.c
@@ -0,0 +1,17 @@
+#ifdef _WIN32
+# error "GLES3 cannot be tested on WIN32 platforms."
+#endif
+#ifdef __APPLE__
+# error "GLES3 cannot be tested on macOS platform."
+#else
+# include <GLES3/gl3.h>
+#endif
+
+#include <stdio.h>
+
+int main()
+{
+ /* Reference a GL symbol without requiring a context at runtime. */
+ printf("&glGetString = %p\n", &glGetString);
+ return 0;
+}
diff --git a/Tests/FindOpenSP/Test/CMakeLists.txt b/Tests/FindOpenSP/Test/CMakeLists.txt
index d8992d9af5..266a459eb3 100644
--- a/Tests/FindOpenSP/Test/CMakeLists.txt
+++ b/Tests/FindOpenSP/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindOpenSP CXX)
include(CTest)
diff --git a/Tests/FindOpenSSL/rand/CMakeLists.txt b/Tests/FindOpenSSL/rand/CMakeLists.txt
index 520d5d2032..c4432219ff 100644
--- a/Tests/FindOpenSSL/rand/CMakeLists.txt
+++ b/Tests/FindOpenSSL/rand/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(FindOpenSSL_rand CXX)
include(CTest)
diff --git a/Tests/FindPNG/Test/CMakeLists.txt b/Tests/FindPNG/Test/CMakeLists.txt
index ad50011c75..66cdda19f2 100644
--- a/Tests/FindPNG/Test/CMakeLists.txt
+++ b/Tests/FindPNG/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindPNG C)
include(CTest)
diff --git a/Tests/FindPatch/CMakeLists.txt b/Tests/FindPatch/CMakeLists.txt
index 541f5bd150..65b778b952 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/FindPython/ArtifactsInteractive/CMakeLists.txt b/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt
index 524be9205f..99823a60d6 100644
--- a/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt
+++ b/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestArtifactsInteractive LANGUAGES C)
diff --git a/Tests/FindPython/CustomFailureMessage/CMakeLists.txt b/Tests/FindPython/CustomFailureMessage/CMakeLists.txt
index a0d8eb2f44..283aeec9b8 100644
--- a/Tests/FindPython/CustomFailureMessage/CMakeLists.txt
+++ b/Tests/FindPython/CustomFailureMessage/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestCustomFailureMessage LANGUAGES NONE)
diff --git a/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt b/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt
index 2164ac1ab9..0fb30368b0 100644
--- a/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt
+++ b/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestCustomFailureMessage.Check LANGUAGES NONE)
diff --git a/Tests/FindPython/DifferentComponents/CMakeLists.txt b/Tests/FindPython/DifferentComponents/CMakeLists.txt
index 7476632a4e..e3e7b367ee 100644
--- a/Tests/FindPython/DifferentComponents/CMakeLists.txt
+++ b/Tests/FindPython/DifferentComponents/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestDifferentComponents LANGUAGES C)
diff --git a/Tests/FindPython/ExactVersion/CMakeLists.txt b/Tests/FindPython/ExactVersion/CMakeLists.txt
index 60abb26208..1bd94c47e0 100644
--- a/Tests/FindPython/ExactVersion/CMakeLists.txt
+++ b/Tests/FindPython/ExactVersion/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestExactVersion LANGUAGES C)
diff --git a/Tests/FindPython/Implementation/CMakeLists.txt b/Tests/FindPython/Implementation/CMakeLists.txt
index 592329b8cd..8086c16b66 100644
--- a/Tests/FindPython/Implementation/CMakeLists.txt
+++ b/Tests/FindPython/Implementation/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestImplementation${Python_REQUESTED_IMPLEMENTATION} LANGUAGES NONE)
diff --git a/Tests/FindPython/IronPython/CMakeLists.txt b/Tests/FindPython/IronPython/CMakeLists.txt
index 47ca022a9f..fd3182e1d2 100644
--- a/Tests/FindPython/IronPython/CMakeLists.txt
+++ b/Tests/FindPython/IronPython/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestIronPython LANGUAGES NONE)
diff --git a/Tests/FindPython/IronPython2/CMakeLists.txt b/Tests/FindPython/IronPython2/CMakeLists.txt
index fd9d947970..b623972753 100644
--- a/Tests/FindPython/IronPython2/CMakeLists.txt
+++ b/Tests/FindPython/IronPython2/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestIronPython2 LANGUAGES NONE)
diff --git a/Tests/FindPython/MultiplePackages/CMakeLists.txt b/Tests/FindPython/MultiplePackages/CMakeLists.txt
index 5c85155bb5..48450352f0 100644
--- a/Tests/FindPython/MultiplePackages/CMakeLists.txt
+++ b/Tests/FindPython/MultiplePackages/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestMultiplePackages C)
diff --git a/Tests/FindPython/NumPy/CMakeLists.txt b/Tests/FindPython/NumPy/CMakeLists.txt
index 3e17f68952..9920336b77 100644
--- a/Tests/FindPython/NumPy/CMakeLists.txt
+++ b/Tests/FindPython/NumPy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestNumPy LANGUAGES C)
diff --git a/Tests/FindPython/NumPyOnly/CMakeLists.txt b/Tests/FindPython/NumPyOnly/CMakeLists.txt
index bedc627e0c..9aa1bcf9e1 100644
--- a/Tests/FindPython/NumPyOnly/CMakeLists.txt
+++ b/Tests/FindPython/NumPyOnly/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestNumPyOnly LANGUAGES C)
diff --git a/Tests/FindPython/PyPy/CMakeLists.txt b/Tests/FindPython/PyPy/CMakeLists.txt
index 4cf7c0ab75..dfc22d8aef 100644
--- a/Tests/FindPython/PyPy/CMakeLists.txt
+++ b/Tests/FindPython/PyPy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPyPy LANGUAGES C)
diff --git a/Tests/FindPython/PyPy2/CMakeLists.txt b/Tests/FindPython/PyPy2/CMakeLists.txt
index ebfc9abd0c..5b7ce307b7 100644
--- a/Tests/FindPython/PyPy2/CMakeLists.txt
+++ b/Tests/FindPython/PyPy2/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPyPy2 LANGUAGES C)
diff --git a/Tests/FindPython/PyPy3/CMakeLists.txt b/Tests/FindPython/PyPy3/CMakeLists.txt
index bf7cd61aeb..b702c994ce 100644
--- a/Tests/FindPython/PyPy3/CMakeLists.txt
+++ b/Tests/FindPython/PyPy3/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPyPy3 LANGUAGES C)
diff --git a/Tests/FindPython/Python/CMakeLists.txt b/Tests/FindPython/Python/CMakeLists.txt
index 9bec22f767..85b1711381 100644
--- a/Tests/FindPython/Python/CMakeLists.txt
+++ b/Tests/FindPython/Python/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython LANGUAGES C)
diff --git a/Tests/FindPython/Python2/CMakeLists.txt b/Tests/FindPython/Python2/CMakeLists.txt
index 39577b2a2b..95ed495bd4 100644
--- a/Tests/FindPython/Python2/CMakeLists.txt
+++ b/Tests/FindPython/Python2/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython2 LANGUAGES C)
diff --git a/Tests/FindPython/Python2Embedded/CMakeLists.txt b/Tests/FindPython/Python2Embedded/CMakeLists.txt
index a1036ce741..d9b2d220d7 100644
--- a/Tests/FindPython/Python2Embedded/CMakeLists.txt
+++ b/Tests/FindPython/Python2Embedded/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython2Embedded LANGUAGES C)
diff --git a/Tests/FindPython/Python2Fail/CMakeLists.txt b/Tests/FindPython/Python2Fail/CMakeLists.txt
index 989688f552..7a6520dfa8 100644
--- a/Tests/FindPython/Python2Fail/CMakeLists.txt
+++ b/Tests/FindPython/Python2Fail/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython2Fail C)
diff --git a/Tests/FindPython/Python2Module/CMakeLists.txt b/Tests/FindPython/Python2Module/CMakeLists.txt
index c9d46ac62f..7334d7af53 100644
--- a/Tests/FindPython/Python2Module/CMakeLists.txt
+++ b/Tests/FindPython/Python2Module/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython2Module LANGUAGES C)
diff --git a/Tests/FindPython/Python2SABIModule/CMakeLists.txt b/Tests/FindPython/Python2SABIModule/CMakeLists.txt
index 4f01197aec..ffbaa3383e 100644
--- a/Tests/FindPython/Python2SABIModule/CMakeLists.txt
+++ b/Tests/FindPython/Python2SABIModule/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython2SABIModule LANGUAGES C)
diff --git a/Tests/FindPython/Python3/CMakeLists.txt b/Tests/FindPython/Python3/CMakeLists.txt
index e40557dfc5..42d31f2758 100644
--- a/Tests/FindPython/Python3/CMakeLists.txt
+++ b/Tests/FindPython/Python3/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython3 LANGUAGES C)
diff --git a/Tests/FindPython/Python3Embedded/CMakeLists.txt b/Tests/FindPython/Python3Embedded/CMakeLists.txt
index c45bd8c832..1d362bea66 100644
--- a/Tests/FindPython/Python3Embedded/CMakeLists.txt
+++ b/Tests/FindPython/Python3Embedded/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython3Embedded LANGUAGES C)
diff --git a/Tests/FindPython/Python3Fail/CMakeLists.txt b/Tests/FindPython/Python3Fail/CMakeLists.txt
index cd46c88642..5eca0cb25e 100644
--- a/Tests/FindPython/Python3Fail/CMakeLists.txt
+++ b/Tests/FindPython/Python3Fail/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython3Fail C)
diff --git a/Tests/FindPython/Python3Module/CMakeLists.txt b/Tests/FindPython/Python3Module/CMakeLists.txt
index ccc1fdb2a4..57c0ddf63d 100644
--- a/Tests/FindPython/Python3Module/CMakeLists.txt
+++ b/Tests/FindPython/Python3Module/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestPython3Module LANGUAGES C)
diff --git a/Tests/FindPython/RequiredArtifacts/CMakeLists.txt b/Tests/FindPython/RequiredArtifacts/CMakeLists.txt
index 42d282d9a5..cb9d4d380e 100644
--- a/Tests/FindPython/RequiredArtifacts/CMakeLists.txt
+++ b/Tests/FindPython/RequiredArtifacts/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestRequiredArtifacts LANGUAGES C)
diff --git a/Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt b/Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt
index bb4f67cfd2..4d9c7c8206 100644
--- a/Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt
+++ b/Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestRequiredArtifacts.Check LANGUAGES C)
diff --git a/Tests/FindPython/SOABI/CMakeLists.txt b/Tests/FindPython/SOABI/CMakeLists.txt
index 84f7362433..60399d3677 100644
--- a/Tests/FindPython/SOABI/CMakeLists.txt
+++ b/Tests/FindPython/SOABI/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestSOABI LANGUAGES C)
diff --git a/Tests/FindPython/VirtualEnv/CMakeLists.txt b/Tests/FindPython/VirtualEnv/CMakeLists.txt
index dae3282694..e2e5bd2b2f 100644
--- a/Tests/FindPython/VirtualEnv/CMakeLists.txt
+++ b/Tests/FindPython/VirtualEnv/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestVirtualEnv LANGUAGES NONE)
diff --git a/Tests/FindPython/VirtualEnvConda/CMakeLists.txt b/Tests/FindPython/VirtualEnvConda/CMakeLists.txt
index 23d208d4cb..2f7c0db0c3 100644
--- a/Tests/FindPython/VirtualEnvConda/CMakeLists.txt
+++ b/Tests/FindPython/VirtualEnvConda/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestVirtualEnvConda LANGUAGES NONE)
diff --git a/Tests/FindSDL/Test/CMakeLists.txt b/Tests/FindSDL/Test/CMakeLists.txt
index 61d4f4b334..0dd1047035 100644
--- a/Tests/FindSDL/Test/CMakeLists.txt
+++ b/Tests/FindSDL/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindSDL C)
include(CTest)
diff --git a/Tests/FindSQLite3/Test/CMakeLists.txt b/Tests/FindSQLite3/Test/CMakeLists.txt
index bcc6ebd204..43cdd37fa8 100644
--- a/Tests/FindSQLite3/Test/CMakeLists.txt
+++ b/Tests/FindSQLite3/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
project(TestFindSQLite3 C)
include(CTest)
diff --git a/Tests/FindTIFF/Test/CMakeLists.txt b/Tests/FindTIFF/Test/CMakeLists.txt
index e235db3697..54404d0a99 100644
--- a/Tests/FindTIFF/Test/CMakeLists.txt
+++ b/Tests/FindTIFF/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindTIFF)
include(CTest)
diff --git a/Tests/FindThreads/C-only/CMakeLists.txt b/Tests/FindThreads/C-only/CMakeLists.txt
index ee2a5f991a..9bc50a48de 100644
--- a/Tests/FindThreads/C-only/CMakeLists.txt
+++ b/Tests/FindThreads/C-only/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(FindThreads_C-only C)
find_package(Threads REQUIRED)
diff --git a/Tests/FindThreads/CXX-only/CMakeLists.txt b/Tests/FindThreads/CXX-only/CMakeLists.txt
index 3c6cc1e55b..11ae60ccbd 100644
--- a/Tests/FindThreads/CXX-only/CMakeLists.txt
+++ b/Tests/FindThreads/CXX-only/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(FindThreads_CXX-only CXX)
find_package(Threads REQUIRED)
diff --git a/Tests/FindVulkan/Test/CMakeLists.txt b/Tests/FindVulkan/Test/CMakeLists.txt
index dfcfc156a7..7198d2249b 100644
--- a/Tests/FindVulkan/Test/CMakeLists.txt
+++ b/Tests/FindVulkan/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4)
+cmake_minimum_required(VERSION 3.5)
cmake_policy(SET CMP0091 NEW)
project(TestFindVulkan C CXX)
include(CTest)
diff --git a/Tests/FindX11/Test/CMakeLists.txt b/Tests/FindX11/Test/CMakeLists.txt
index 18a73a335b..3312f6f772 100644
--- a/Tests/FindX11/Test/CMakeLists.txt
+++ b/Tests/FindX11/Test/CMakeLists.txt
@@ -32,13 +32,38 @@ test_x11_component(x11_components Xau)
test_x11_component(x11_components Xaw)
test_x11_component(x11_components xcb)
test_x11_component(x11_components X11_xcb)
+test_x11_component(x11_components xcb_composite)
+test_x11_component(x11_components xcb_cursor)
+test_x11_component(x11_components xcb_damage)
+test_x11_component(x11_components xcb_dpms)
+test_x11_component(x11_components xcb_dri2)
+test_x11_component(x11_components xcb_dri3)
+test_x11_component(x11_components xcb_errors)
+test_x11_component(x11_components xcb_ewmh)
+test_x11_component(x11_components xcb_glx)
test_x11_component(x11_components xcb_icccm)
+test_x11_component(x11_components xcb_image)
+test_x11_component(x11_components xcb_keysyms)
+test_x11_component(x11_components xcb_present)
test_x11_component(x11_components xcb_randr)
+test_x11_component(x11_components xcb_record)
+test_x11_component(x11_components xcb_render)
+test_x11_component(x11_components xcb_render_util)
+test_x11_component(x11_components xcb_res)
+test_x11_component(x11_components xcb_screensaver)
+test_x11_component(x11_components xcb_shape)
+test_x11_component(x11_components xcb_shm)
+test_x11_component(x11_components xcb_sync)
test_x11_component(x11_components xcb_util)
+test_x11_component(x11_components xcb_xf86dri)
test_x11_component(x11_components xcb_xfixes)
-test_x11_component(x11_components xcb_xtest)
-test_x11_component(x11_components xcb_keysyms)
+test_x11_component(x11_components xcb_xinerama)
+test_x11_component(x11_components xcb_xinput)
test_x11_component(x11_components xcb_xkb)
+test_x11_component(x11_components xcb_xrm)
+test_x11_component(x11_components xcb_xtest)
+test_x11_component(x11_components xcb_xvmc)
+test_x11_component(x11_components xcb_xv)
test_x11_component(x11_components Xcomposite)
test_x11_component(x11_components Xdamage)
test_x11_component(x11_components Xdmcp)
@@ -76,10 +101,38 @@ foreach(lib
Xaw
xcb
X11_xcb
+ xcb_composite
+ xcb_cursor
+ xcb_damage
+ xcb_dpms
+ xcb_dri2
+ xcb_dri3
+ xcb_errors
+ xcb_ewmh
+ xcb_glx
xcb_icccm
+ xcb_image
+ xcb_keysyms
+ xcb_present
xcb_randr
+ xcb_record
+ xcb_render
+ xcb_render_util
+ xcb_res
+ xcb_screensaver
+ xcb_shape
+ xcb_shm
+ xcb_sync
xcb_util
+ xcb_xf86dri
xcb_xfixes
+ xcb_xinerama
+ xcb_xinput
+ xcb_xkb
+ xcb_xrm
+ xcb_xtest
+ xcb_xvmc
+ xcb_xv
Xcomposite
Xdamage
Xdmcp
diff --git a/Tests/FindX11/Test/main.c b/Tests/FindX11/Test/main.c
index 653a2be2e3..2542145e5f 100644
--- a/Tests/FindX11/Test/main.c
+++ b/Tests/FindX11/Test/main.c
@@ -326,7 +326,7 @@ static void test_Xaw(void)
#endif
-#ifdef HAVE_xcb
+#ifdef HAVE_X11_xcb
# include <xcb/xcb.h>
static void test_xcb(void)
@@ -336,8 +336,216 @@ static void test_xcb(void)
xcb_disconnect(connection);
}
-# ifdef HAVE_xcb_randr
-# include <xcb/randr.h>
+#endif
+
+#ifdef HAVE_X11_xcb_composite
+# include <xcb/composite.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_composite(void)
+{
+ xcb_connection_t* connection = xcb_connect(NULL, NULL);
+ xcb_composite_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_cursor
+# include <xcb/xcb.h>
+# include <xcb/xcb_cursor.h>
+
+static void test_xcb_cursor(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_screen_iterator_t screens =
+ xcb_setup_roots_iterator(xcb_get_setup(connection));
+ xcb_cursor_context_t* ctx;
+ xcb_cursor_context_new(connection, screens.data, &ctx);
+ xcb_cursor_context_free(ctx);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_damage
+# include <xcb/damage.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_damage(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_damage_query_version_cookie_t cookie =
+ xcb_damage_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_dpms
+# include <xcb/dpms.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_dpms(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_dpms_get_version_cookie_t cookie =
+ xcb_dpms_get_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_dri2
+# include <xcb/dri2.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_dri2(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_dri2_query_version_cookie_t cookie =
+ xcb_dri2_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_dri3
+# include <xcb/dri3.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_dri3(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_dri3_query_version_cookie_t cookie =
+ xcb_dri3_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_errors
+# include <xcb/xcb.h>
+# include <xcb/xcb_errors.h>
+
+static void test_xcb_errors(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_errors_context_t* context;
+ xcb_errors_context_new(connection, &context);
+ xcb_errors_context_free(context);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_ewmh
+# include <xcb/xcb.h>
+# include <xcb/xcb_ewmh.h>
+
+static void test_xcb_ewmh(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_ewmh_connection_t ewmh_connection;
+ xcb_intern_atom_cookie_t* cookie =
+ xcb_ewmh_init_atoms(connection, &ewmh_connection);
+ xcb_ewmh_init_atoms_replies(&ewmh_connection, cookie, NULL);
+ xcb_ewmh_connection_wipe(&ewmh_connection);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_glx
+# include <xcb/glx.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_glx(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_glx_query_version_cookie_t cookie =
+ xcb_glx_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_icccm
+# include <xcb/xcb.h>
+# include <xcb/xcb_icccm.h>
+
+static void test_xcb_icccm(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_window_t root =
+ xcb_setup_roots_iterator(xcb_get_setup(connection)).data->root;
+ xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_name(connection, root);
+ xcb_icccm_get_text_property_reply_t reply;
+ xcb_icccm_get_wm_name_reply(connection, cookie, &reply, NULL);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_image
+# include <xcb/xcb.h>
+# include <xcb/xcb_image.h>
+
+static void test_xcb_image(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ // xcb_image is too convoluted/undocumented to make an
+ // actually working example, apologies :)
+ xcb_image_create(0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_keysyms
+# include <xcb/xcb.h>
+# include <xcb/xcb_keysyms.h>
+
+static void test_xcb_keysyms(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_key_symbols_t* symbols = xcb_key_symbols_alloc(connection);
+ if (symbols != NULL)
+ xcb_key_symbols_free(symbols);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_present
+# include <xcb/present.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_present(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_present_query_version_cookie_t cookie =
+ xcb_present_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_randr
+# include <xcb/randr.h>
+# include <xcb/xcb.h>
static void test_xcb_randr(void)
{
@@ -348,10 +556,129 @@ static void test_xcb_randr(void)
xcb_disconnect(connection);
}
-# endif
+#endif
+
+#ifdef HAVE_X11_xcb_record
+# include <xcb/record.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_record(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_record_query_version_cookie_t cookie =
+ xcb_record_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_render
+# include <xcb/render.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_render(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_render_query_version_cookie_t cookie =
+ xcb_render_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_render_util
+# include <xcb/xcb.h>
+# include <xcb/xcb_renderutil.h>
+
+static void test_xcb_render_util(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ const xcb_render_query_version_reply_t* cookie =
+ xcb_render_util_query_version(connection);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_res
+# include <xcb/res.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_res(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_res_query_version_cookie_t cookie =
+ xcb_res_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_screensaver
+# include <xcb/screensaver.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_screensaver(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_screensaver_query_version_cookie_t cookie =
+ xcb_screensaver_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_shape
+# include <xcb/shape.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_shape(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_shape_query_version_cookie_t cookie =
+ xcb_shape_query_version(connection);
+ xcb_disconnect(connection);
+}
+
+#endif
-# ifdef HAVE_xcb_util
-# include <xcb/xcb_aux.h>
+#ifdef HAVE_X11_xcb_shm
+# include <xcb/shm.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_shm(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_shm_query_version_cookie_t cookie = xcb_shm_query_version(connection);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_sync
+# include <xcb/sync.h>
+# include <xcb/xcb.h>
+
+static void test_xcb_sync(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_sync_initialize_cookie_t cookie = xcb_sync_initialize(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_util
+# include <xcb/xcb.h>
+# include <xcb/xcb_aux.h>
static void test_xcb_util(void)
{
@@ -361,10 +688,26 @@ static void test_xcb_util(void)
xcb_disconnect(connection);
}
-# endif
+#endif
-# ifdef HAVE_xcb_xfixes
-# include <xcb/xcb_xfixes.h>
+#ifdef HAVE_X11_xcb_xf86dri
+# include <xcb/xcb.h>
+# include <xcb/xf86dri.h>
+
+static void test_xcb_xf86dri(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_xf86dri_query_version_cookie_t cookie =
+ xcb_xf86dri_query_version(connection);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_xfixes
+# include <xcb/xcb.h>
+# include <xcb/xfixes.h>
static void test_xcb_xfixes(void)
{
@@ -374,10 +717,71 @@ static void test_xcb_xfixes(void)
xcb_disconnect(connection);
}
-# endif
+#endif
+
+#ifdef HAVE_X11_xcb_xinerama
+# include <xcb/xcb.h>
+# include <xcb/xinerama.h>
+
+static void test_xcb_xinerama(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_xinerama_query_version_cookie_t cookie =
+ xcb_xinerama_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_xinput
+# include <xcb/xcb.h>
+# include <xcb/xinput.h>
+
+static void test_xcb_xinput(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_input_xi_query_version_cookie_t cookie =
+ xcb_input_xi_query_version(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_xkb
+# include <xcb/xcb.h>
+# include <xcb/xkb.h>
+
+static void test_xcb_xkb(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_xkb_use_extension_cookie_t cookie =
+ xcb_xkb_use_extension(connection, 0, 0);
+ xcb_disconnect(connection);
+}
+
+#endif
+
+#ifdef HAVE_X11_xcb_xrm
+# include <xcb/xcb.h>
+# include <xcb/xcb_xrm.h>
+
+static void test_xcb_xrm(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_xrm_database_t* db = xcb_xrm_database_from_default(connection);
+ xcb_xrm_database_free(db);
+ xcb_disconnect(connection);
+}
+
+#endif
-# ifdef HAVE_xcb_xtest
-# include <xcb/xtest.h>
+#ifdef HAVE_X11_xcb_xtest
+# include <xcb/xcb.h>
+# include <xcb/xtest.h>
static void test_xcb_xtest(void)
{
@@ -387,22 +791,33 @@ static void test_xcb_xtest(void)
xcb_disconnect(connection);
}
-# endif
+#endif
-# ifdef HAVE_xcb_keysyms
-# include <xcb/xcb_keysyms.h>
+#ifdef HAVE_X11_xcb_xvmc
+# include <xcb/xcb.h>
+# include <xcb/xvmc.h>
-static void test_xcb_keysyms(void)
+static void test_xcb_xvmc(void)
{
int screen_nbr;
xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
- xcb_key_symbols_t* symbols = xcb_key_symbols_alloc(connection);
- if (symbols != NULL)
- xcb_key_symbols_free(symbols);
+ xcb_xvmc_query_version_cookie_t cookie = xcb_xvmc_query_version(connection);
xcb_disconnect(connection);
}
-# endif
+#endif
+
+#ifdef HAVE_X11_xcb_xv
+# include <xcb/xcb.h>
+# include <xcb/xv.h>
+
+static void test_xcb_xv(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_xv_query_extension_cookie_t cookie = xcb_xv_query_extension(connection);
+ xcb_disconnect(connection);
+}
#endif
@@ -493,19 +908,105 @@ int main(int argc, char* argv[])
#ifdef HAVE_X11_Xaw
test_Xaw,
#endif
-#ifdef HAVE_xcb
+#ifdef HAVE_X11_xcb
test_xcb,
#endif
-#ifdef HAVE_xcb_util
+#ifdef HAVE_X11_xcb_composite
+ test_xcb_composite,
+#endif
+#ifdef HAVE_X11_xcb_cursor
+ test_xcb_cursor,
+#endif
+#ifdef HAVE_X11_xcb_damage
+ test_xcb_damage,
+#endif
+#ifdef HAVE_X11_xcb_dpms
+ test_xcb_dpms,
+#endif
+#ifdef HAVE_X11_xcb_dri2
+ test_xcb_dri2,
+#endif
+#ifdef HAVE_X11_xcb_dri3
+ test_xcb_dri3,
+#endif
+#ifdef HAVE_X11_xcb_errors
+ test_xcb_errors,
+#endif
+#ifdef HAVE_X11_xcb_ewmh
+ test_xcb_ewmh,
+#endif
+#ifdef HAVE_X11_xcb_glx
+ test_xcb_glx,
+#endif
+#ifdef HAVE_X11_xcb_icccm
+ test_xcb_icccm,
+#endif
+#ifdef HAVE_X11_xcb_image
+ test_xcb_image,
+#endif
+#ifdef HAVE_X11_xcb_keysyms
+ test_xcb_keysyms,
+#endif
+#ifdef HAVE_X11_xcb_present
+ test_xcb_present,
+#endif
+#ifdef HAVE_X11_xcb_randr
test_xcb_randr,
#endif
-#ifdef HAVE_xcb_util
+#ifdef HAVE_X11_xcb_record
+ test_xcb_record,
+#endif
+#ifdef HAVE_X11_xcb_render
+ test_xcb_render,
+#endif
+#ifdef HAVE_X11_xcb_render_util
+ test_xcb_render_util,
+#endif
+#ifdef HAVE_X11_xcb_res
+ test_xcb_res,
+#endif
+#ifdef HAVE_X11_xcb_screensaver
+ test_xcb_screensaver,
+#endif
+#ifdef HAVE_X11_xcb_shape
+ test_xcb_shape,
+#endif
+#ifdef HAVE_X11_xcb_shm
+ test_xcb_shm,
+#endif
+#ifdef HAVE_X11_xcb_sync
+ test_xcb_sync,
+#endif
+#ifdef HAVE_X11_xcb_util
test_xcb_util,
#endif
-#ifdef HAVE_xcb_xfixes
+#ifdef HAVE_X11_xcb_xf86dri
+ test_xcb_xf86dri,
+#endif
+#ifdef HAVE_X11_xcb_xfixes
test_xcb_xfixes,
#endif
-
+#ifdef HAVE_X11_xcb_xinerama
+ test_xcb_xinerama,
+#endif
+#ifdef HAVE_X11_xcb_xinput
+ test_xcb_xinput,
+#endif
+#ifdef HAVE_X11_xcb_xkb
+ test_xcb_xkb,
+#endif
+#ifdef HAVE_X11_xcb_xrm
+ test_xcb_xrm,
+#endif
+#ifdef HAVE_X11_xcb_xtest
+ test_xcb_xtest,
+#endif
+#ifdef HAVE_X11_xcb_xvmc
+ test_xcb_xvmc,
+#endif
+#ifdef HAVE_X11_xcb_xv
+ test_xcb_xv,
+#endif
NULL,
};
@@ -514,5 +1015,6 @@ int main(int argc, char* argv[])
// always 1 in the test harness which always returns the sentinel at the end
// of the array. The array logic is there to ensure that the contents of
// `fptrs` is not optimized out.
+#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
return (int)fptrs[(sizeof(fptrs) / sizeof(*fptrs)) - argc];
}
diff --git a/Tests/FindXalanC/Test/CMakeLists.txt b/Tests/FindXalanC/Test/CMakeLists.txt
index a8c2a0a8ad..eb45802aa8 100644
--- a/Tests/FindXalanC/Test/CMakeLists.txt
+++ b/Tests/FindXalanC/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindXalanC CXX)
include(CTest)
diff --git a/Tests/FindXercesC/Test/CMakeLists.txt b/Tests/FindXercesC/Test/CMakeLists.txt
index 267c6a9076..38ae6e4050 100644
--- a/Tests/FindXercesC/Test/CMakeLists.txt
+++ b/Tests/FindXercesC/Test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
project(TestFindXercesC CXX)
include(CTest)
diff --git a/Tests/FindwxWidgets/CMakeLists.txt b/Tests/FindwxWidgets/CMakeLists.txt
new file mode 100644
index 0000000000..b66f838166
--- /dev/null
+++ b/Tests/FindwxWidgets/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_test(NAME FindwxWidgets.Test COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindwxWidgets/Test"
+ "${CMake_BINARY_DIR}/Tests/FindwxWidgets/Test"
+ ${build_generator_args}
+ --build-project TestFindwxWidgets
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
diff --git a/Tests/FindwxWidgets/Test/CMakeLists.txt b/Tests/FindwxWidgets/Test/CMakeLists.txt
new file mode 100644
index 0000000000..ecc9c369cc
--- /dev/null
+++ b/Tests/FindwxWidgets/Test/CMakeLists.txt
@@ -0,0 +1,17 @@
+cmake_minimum_required(VERSION 3.26)
+project(TestFindwxWidgets CXX)
+include(CTest)
+
+find_package(wxWidgets REQUIRED)
+
+add_executable(test_tgt main.cpp)
+target_link_libraries(test_tgt wxWidgets::wxWidgets)
+add_test(NAME test_tgt COMMAND test_tgt)
+
+add_executable(test_var main.cpp)
+target_link_libraries(test_var PRIVATE ${wxWidgets_LIBRARIES})
+target_link_directories(test_var PRIVATE ${wxWidgets_LIBRARY_DIRS})
+target_include_directories(test_var PRIVATE ${wxWidgets_INCLUDE_DIRS})
+target_compile_options(test_var PRIVATE ${wxWidgets_CONFIG_OPTIONS})
+target_compile_definitions(test_var PRIVATE ${wxWidgets_DEFINITIONS})
+add_test(NAME test_var COMMAND test_var)
diff --git a/Tests/FindwxWidgets/Test/main.cpp b/Tests/FindwxWidgets/Test/main.cpp
new file mode 100644
index 0000000000..0e576cfede
--- /dev/null
+++ b/Tests/FindwxWidgets/Test/main.cpp
@@ -0,0 +1,7 @@
+#include <wx/filefn.h>
+
+int main()
+{
+ wxGetCwd();
+ return 0;
+}
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 0fede25675..30ab16b51b 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/FortranC/CMakeLists.txt b/Tests/FortranC/CMakeLists.txt
index 1403aa0d59..f5e056b05f 100644
--- a/Tests/FortranC/CMakeLists.txt
+++ b/Tests/FortranC/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(FortranC C Fortran)
# Skip this test for compilers not known to be compatible.
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index fc71a18ccf..ed2a440d46 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(FortranOnly Fortran)
message("CTEST_FULL_OUTPUT ")
@@ -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/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt
index 287be949d7..629deebe5e 100644
--- a/Tests/Framework/CMakeLists.txt
+++ b/Tests/Framework/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(Framework)
add_library(foo SHARED
diff --git a/Tests/FunctionTest/CMakeLists.txt b/Tests/FunctionTest/CMakeLists.txt
index 0660d0fa3b..a5a8b115c2 100644
--- a/Tests/FunctionTest/CMakeLists.txt
+++ b/Tests/FunctionTest/CMakeLists.txt
@@ -1,5 +1,5 @@
# a simple C only test case
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project (FunctionTest)
function(FAILED testname)
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 3fb53d1bc8..ef115e60a0 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -200,6 +200,21 @@ set_property(TARGET importedFallback PROPERTY IMPORTED_LOCATION fallback_loc)
set_property(TARGET importedFallback PROPERTY MAP_IMPORTED_CONFIG_DEBUG "" DEBUG)
set_property(TARGET importedFallback PROPERTY MAP_IMPORTED_CONFIG_RELEASE "")
+add_library(importedFallback2 SHARED IMPORTED)
+set_property(TARGET importedFallback2 PROPERTY ENABLE_EXPORTS TRUE)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_LOCATION_NOCONFIG noconfig_loc)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_IMPLIB_NOCONFIG noconfig_imp)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_LOCATION_DEBUG debug_loc)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_IMPLIB_DEBUG debug_imp)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_LOCATION_RELEASE release_loc)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_IMPLIB_RELEASE release_imp)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_LOCATION fallback_loc)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_IMPLIB fallback_imp)
+set_property(TARGET importedFallback2 PROPERTY IMPORTED_IMPLIB_SPECIAL special_imp)
+set_property(TARGET importedFallback2 PROPERTY MAP_IMPORTED_CONFIG_NOCONFIG SPECIAL "")
+set_property(TARGET importedFallback2 PROPERTY MAP_IMPORTED_CONFIG_DEBUG SPECIAL "")
+set_property(TARGET importedFallback2 PROPERTY MAP_IMPORTED_CONFIG_RELEASE SPECIAL "")
+
add_library(importedFallback_genex STATIC IMPORTED)
set_property(TARGET importedFallback_genex PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_property(TARGET importedFallback_genex PROPERTY IMPORTED_LOCATION_RELEASE release_loc)
@@ -217,6 +232,7 @@ add_custom_target(check-part3 ALL
-Dconfig=$<CONFIGURATION>
-Dtest_imported_includes=$<TARGET_PROPERTY:imported4,INCLUDE_DIRECTORIES>
-Dtest_imported_fallback=$<STREQUAL:$<TARGET_FILE_NAME:importedFallback>,fallback_loc>
+ -Dtest_imported_fallback2=$<IF:$<OR:$<PLATFORM_ID:Windows,CYGWIN,MSYS>,$<AND:$<PLATFORM_ID:Darwin>,$<BOOL:${CMAKE_TAPI}>>>,$<STREQUAL:$<TARGET_LINKER_FILE_NAME:importedFallback2>,special_imp>,$<STREQUAL:$<TARGET_LINKER_FILE_NAME:importedFallback2>,fallback_loc>>
-Dtest_imported_fallback_genex=$<STREQUAL:$<TARGET_PROPERTY:importedFallback_genex,INTERFACE_COMPILE_DEFINITIONS>,FOOBAR=1>
-Dtest_alias_file_exe=$<STREQUAL:$<TARGET_FILE:Alias::SomeExe>,$<TARGET_FILE:someexe>>
-Dtest_alias_file_lib=$<STREQUAL:$<TARGET_FILE:Alias::SomeLib>,$<TARGET_FILE:empty1>>
diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake
index e1b1f9364e..7bb0d85ad2 100644
--- a/Tests/GeneratorExpression/check-part3.cmake
+++ b/Tests/GeneratorExpression/check-part3.cmake
@@ -19,6 +19,7 @@ else()
endif()
check(test_imported_fallback "1")
+check(test_imported_fallback2 "1")
check(test_imported_fallback_genex "1")
check(test_alias_file_exe "1")
diff --git a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
index e4973b03b2..d4720be12c 100644
--- a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(SystemIncludeDirectories)
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
index 3b994a233b..6812267170 100644
--- a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(TargetIncludeDirectories)
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt
index a302c7c287..d57eccc442 100644
--- a/Tests/InterfaceLibrary/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(InterfaceLibrary)
diff --git a/Tests/JCTest/CMakeLists.txt b/Tests/JCTest/CMakeLists.txt
index b1206408d2..adbdf9a338 100644
--- a/Tests/JCTest/CMakeLists.txt
+++ b/Tests/JCTest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(TestTime)
enable_testing()
add_executable(TestTime TestTime.cxx)
diff --git a/Tests/Java/CMakeLists.txt b/Tests/Java/CMakeLists.txt
index 1d8d7ac67b..c1c68177c7 100644
--- a/Tests/Java/CMakeLists.txt
+++ b/Tests/Java/CMakeLists.txt
@@ -1,6 +1,6 @@
project(hello Java)
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
set(CMAKE_VERBOSE_MAKEFILE 1)
include(CTest)
diff --git a/Tests/JavaJavah/CMakeLists.txt b/Tests/JavaJavah/CMakeLists.txt
index b56cc216ee..06fc06a88b 100644
--- a/Tests/JavaJavah/CMakeLists.txt
+++ b/Tests/JavaJavah/CMakeLists.txt
@@ -1,6 +1,6 @@
project(helloJavah Java CXX)
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
set(CMAKE_VERBOSE_MAKEFILE 1)
include(CTest)
diff --git a/Tests/JavaNativeHeaders/CMakeLists.txt b/Tests/JavaNativeHeaders/CMakeLists.txt
index 2471e013fd..8a2e4603bd 100644
--- a/Tests/JavaNativeHeaders/CMakeLists.txt
+++ b/Tests/JavaNativeHeaders/CMakeLists.txt
@@ -1,6 +1,6 @@
project(helloJavaNativeHeaders Java CXX)
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
set(CMAKE_VERBOSE_MAKEFILE 1)
include (CTest)
diff --git a/Tests/LinkDirectory/CMakeLists.txt b/Tests/LinkDirectory/CMakeLists.txt
index d9a8ac8e2b..2c2e488a3e 100644
--- a/Tests/LinkDirectory/CMakeLists.txt
+++ b/Tests/LinkDirectory/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(LinkDirectory C)
# Put the subproject source tree in our build tree so it can refer to
diff --git a/Tests/LinkDirectory/External/CMakeLists.txt b/Tests/LinkDirectory/External/CMakeLists.txt
index e2229299ed..431fd8977e 100644
--- a/Tests/LinkDirectory/External/CMakeLists.txt
+++ b/Tests/LinkDirectory/External/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(LinkDirectoryExternal C)
diff --git a/Tests/LinkFlags/CMakeLists.txt b/Tests/LinkFlags/CMakeLists.txt
index 31ff9b5cf3..c25c4b2bca 100644
--- a/Tests/LinkFlags/CMakeLists.txt
+++ b/Tests/LinkFlags/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(LinkFlags C)
string(TOUPPER "${TEST_CONFIG}" TEST_CONFIG_UPPER)
@@ -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/LoadCommand/CMakeCommands/CMakeLists.txt b/Tests/LoadCommand/CMakeCommands/CMakeLists.txt
index cafa99b90b..3313c572b1 100644
--- a/Tests/LoadCommand/CMakeCommands/CMakeLists.txt
+++ b/Tests/LoadCommand/CMakeCommands/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CMAKE_LOADED_COMMANDS)
if (MUDSLIDE_TYPE MATCHES MUCHO)
diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt
index e1c4998c69..c0dc24720e 100644
--- a/Tests/LoadCommand/CMakeLists.txt
+++ b/Tests/LoadCommand/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
+cmake_policy(SET CMP0031 OLD) # testing the old behavior
project(LoadCommand)
# set a definition
diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt
index dc029a4f7d..74a1f550e7 100644
--- a/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt
+++ b/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(CMAKE_LOADED_COMMANDS)
if (MUDSLIDE_TYPE MATCHES MUCHO)
diff --git a/Tests/LoadCommandOneConfig/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeLists.txt
index fef4bb777a..35dc0fe594 100644
--- a/Tests/LoadCommandOneConfig/CMakeLists.txt
+++ b/Tests/LoadCommandOneConfig/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
+cmake_policy(SET CMP0031 OLD) # testing the old behavior
project(LoadCommand)
# set a definition
diff --git a/Tests/MFC/CMakeLists.txt b/Tests/MFC/CMakeLists.txt
index d17b955437..3f78a81113 100644
--- a/Tests/MFC/CMakeLists.txt
+++ b/Tests/MFC/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(mfc_driver)
include(CTest)
diff --git a/Tests/MFC/CMakeLists.txt.in b/Tests/MFC/CMakeLists.txt.in
index a600c63cbe..bae3d2fb19 100644
--- a/Tests/MFC/CMakeLists.txt.in
+++ b/Tests/MFC/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(mfc1)
macro(replace_flags var these those)
diff --git a/Tests/MFC/try_compile/CMakeLists.txt b/Tests/MFC/try_compile/CMakeLists.txt
index 768d2a639a..d22b8b6991 100644
--- a/Tests/MFC/try_compile/CMakeLists.txt
+++ b/Tests/MFC/try_compile/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(try_compile_mfc)
set(files
diff --git a/Tests/MSManifest/Subdir/CMakeLists.txt b/Tests/MSManifest/Subdir/CMakeLists.txt
index 3b4fccc1bd..68c66fe209 100644
--- a/Tests/MSManifest/Subdir/CMakeLists.txt
+++ b/Tests/MSManifest/Subdir/CMakeLists.txt
@@ -5,6 +5,11 @@ if(MSVC AND NOT MSVC_VERSION LESS 1400)
add_test(NAME MSManifest.Single COMMAND
${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:MSManifest>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake)
+ add_executable(MSManifestNonIncremental main.c ${CMAKE_CURRENT_BINARY_DIR}/test.manifest)
+ set_property(TARGET MSManifestNonIncremental PROPERTY LINK_FLAGS "/INCREMENTAL:NO")
+ add_test(NAME MSManifest.Single.NonIncremental COMMAND
+ ${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:MSManifestNonIncremental>
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake)
add_executable(MSManifestNone main.c)
set_property(TARGET MSManifestNone PROPERTY LINK_FLAGS "/MANIFEST:NO")
elseif(WIN32 AND CMAKE_C_COMPILER_ID MATCHES "Clang")
diff --git a/Tests/MSManifest/Subdir2/CMakeLists.txt b/Tests/MSManifest/Subdir2/CMakeLists.txt
index 0d960ad516..bbc70dcb1b 100644
--- a/Tests/MSManifest/Subdir2/CMakeLists.txt
+++ b/Tests/MSManifest/Subdir2/CMakeLists.txt
@@ -10,4 +10,14 @@ if((MSVC AND NOT MSVC_VERSION LESS 1400) OR (WIN32 AND CMAKE_C_COMPILER_ID MATCH
add_test(NAME MSManifest.Multiple COMMAND
${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:MSMultipleManifest>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake)
+ if(MSVC AND NOT MSVC_VERSION LESS 1400)
+ add_executable(MSMultipleManifestNonIncremental main.c
+ ${CMAKE_CURRENT_BINARY_DIR}/test_manifest1.manifest
+ ${CMAKE_CURRENT_BINARY_DIR}/test_manifest2.manifest
+ ${CMAKE_CURRENT_BINARY_DIR}/test_manifest3.manifest)
+ set_property(TARGET MSMultipleManifestNonIncremental PROPERTY LINK_FLAGS "/INCREMENTAL:NO")
+ add_test(NAME MSManifest.Multiple.NonIncremental COMMAND
+ ${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:MSMultipleManifestNonIncremental>
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake)
+ endif()
endif()
diff --git a/Tests/MacRuntimePath/A/CMakeLists.txt b/Tests/MacRuntimePath/A/CMakeLists.txt
index c9d3f2c437..7af746c5f3 100644
--- a/Tests/MacRuntimePath/A/CMakeLists.txt
+++ b/Tests/MacRuntimePath/A/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(MacRuntimePath_A)
# a shared library
diff --git a/Tests/MacRuntimePath/B/CMakeLists.txt b/Tests/MacRuntimePath/B/CMakeLists.txt
index 85598c4185..e88433caef 100644
--- a/Tests/MacRuntimePath/B/CMakeLists.txt
+++ b/Tests/MacRuntimePath/B/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(MacRuntimePath_B)
include(${MacRuntimePath_B_BINARY_DIR}/../Root/lib/exp.cmake)
diff --git a/Tests/MakeClean/CMakeLists.txt b/Tests/MakeClean/CMakeLists.txt
index 809d65bcc0..b7b9602c2f 100644
--- a/Tests/MakeClean/CMakeLists.txt
+++ b/Tests/MakeClean/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(MakeClean)
# Build the to-clean project.
diff --git a/Tests/MissingSourceFile/CMakeLists.txt b/Tests/MissingSourceFile/CMakeLists.txt
index b4f00333fc..f4fd8b0fb5 100644
--- a/Tests/MissingSourceFile/CMakeLists.txt
+++ b/Tests/MissingSourceFile/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(MissingSourceFile C)
add_executable(MissingSourceFile DoesNotExist/MissingSourceFile.c)
diff --git a/Tests/ModuleDefinition/CMakeLists.txt b/Tests/ModuleDefinition/CMakeLists.txt
index 483bd8b219..49577a79b8 100644
--- a/Tests/ModuleDefinition/CMakeLists.txt
+++ b/Tests/ModuleDefinition/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ModuleDefinition C)
# Test .def file source recognition for DLLs.
diff --git a/Tests/NewlineArgs/CMakeLists.txt b/Tests/NewlineArgs/CMakeLists.txt
index 3e4b436f5b..c822113653 100644
--- a/Tests/NewlineArgs/CMakeLists.txt
+++ b/Tests/NewlineArgs/CMakeLists.txt
@@ -1,5 +1,5 @@
# a simple CXX only test case
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project (NewlineArgs CXX)
add_definitions("-DTEST_FLAG_1
diff --git a/Tests/ObjectLibrary/CMakeLists.txt b/Tests/ObjectLibrary/CMakeLists.txt
index 06167a83f4..05a35bb268 100644
--- a/Tests/ObjectLibrary/CMakeLists.txt
+++ b/Tests/ObjectLibrary/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ObjectLibrary C)
add_subdirectory(A)
diff --git a/Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt b/Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt
index fb0ebc0cc0..f19d5a47b9 100644
--- a/Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt
+++ b/Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ExportLanguages CXX)
add_library(ExportLanguagesA OBJECT a.cxx)
add_library(ExportLanguagesB STATIC a.c $<TARGET_OBJECTS:ExportLanguagesA>)
diff --git a/Tests/ObjectLibrary/ExportLanguages/ExportLanguagesTest/CMakeLists.txt b/Tests/ObjectLibrary/ExportLanguages/ExportLanguagesTest/CMakeLists.txt
index 8544798599..093aca6988 100644
--- a/Tests/ObjectLibrary/ExportLanguages/ExportLanguagesTest/CMakeLists.txt
+++ b/Tests/ObjectLibrary/ExportLanguages/ExportLanguagesTest/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(ExportLanguagesTest)
diff --git a/Tests/OutDir/CMakeLists.txt b/Tests/OutDir/CMakeLists.txt
index 8afe03618a..e7bc3abff3 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/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt
index 5aa2459f99..81207bcad6 100644
--- a/Tests/PDBDirectoryAndName/CMakeLists.txt
+++ b/Tests/PDBDirectoryAndName/CMakeLists.txt
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
-cmake_policy(SET CMP0054 NEW)
+cmake_minimum_required(VERSION 3.5)
project(PDBDirectoryAndName C)
# Make sure the proper compiler is in use.
diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt
index c2f43cdee9..a62e53f605 100644
--- a/Tests/Plugin/CMakeLists.txt
+++ b/Tests/Plugin/CMakeLists.txt
@@ -1,5 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
-cmake_policy(SET CMP0054 NEW)
+cmake_minimum_required (VERSION 3.5)
project(Plugin)
# Test per-target output directory properties.
diff --git a/Tests/Plugin/PluginTest/CMakeLists.txt b/Tests/Plugin/PluginTest/CMakeLists.txt
index f00122dcbc..4100683f8e 100644
--- a/Tests/Plugin/PluginTest/CMakeLists.txt
+++ b/Tests/Plugin/PluginTest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(PluginTest)
diff --git a/Tests/PositionIndependentTargets/CMakeLists.txt b/Tests/PositionIndependentTargets/CMakeLists.txt
index ff779d3933..4f7e285fc8 100644
--- a/Tests/PositionIndependentTargets/CMakeLists.txt
+++ b/Tests/PositionIndependentTargets/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(PositionIndependentTargets)
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt
index 84ca5e8a96..63a7b5e609 100644
--- a/Tests/Preprocess/CMakeLists.txt
+++ b/Tests/Preprocess/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
+cmake_policy(SET CMP0043 OLD) # testing the old behavior
+
project(Preprocess)
# This test is meant both as a test and as a reference for supported
diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt
index ad74961d9f..12dc99b2a4 100644
--- a/Tests/Qt4And5Automoc/CMakeLists.txt
+++ b/Tests/Qt4And5Automoc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(Qt4And5Automoc)
diff --git a/Tests/Qt4Targets/CMakeLists.txt b/Tests/Qt4Targets/CMakeLists.txt
index 3ddc3459b6..83cd44f187 100644
--- a/Tests/Qt4Targets/CMakeLists.txt
+++ b/Tests/Qt4Targets/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(Qt4Targets)
diff --git a/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt b/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt
index 65e2b64bfc..d0e96170b2 100644
--- a/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt
+++ b/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(IncrementalMoc)
find_package(Qt4 REQUIRED)
diff --git a/Tests/QtAutogen/GlobalAutogenExecutable/CMakeLists.txt b/Tests/QtAutogen/GlobalAutogenExecutable/CMakeLists.txt
new file mode 100644
index 0000000000..34da744b7d
--- /dev/null
+++ b/Tests/QtAutogen/GlobalAutogenExecutable/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 3.26)
+project(GlobalAutogenExecutable)
+
+include("../AutogenCoreTest.cmake")
+
+set(test_automoc_path "global_automoc_exe_path")
+set(test_autouic_path "global_autouic_exe_path")
+set(test_autorcc_path "global_autorcc_exe_path")
+
+set(CMAKE_AUTOMOC_EXECUTABLE ${test_automoc_path})
+set(CMAKE_AUTOUIC_EXECUTABLE ${test_autouic_path})
+set(CMAKE_AUTORCC_EXECUTABLE ${test_autorcc_path})
+
+add_executable(autogen_test main.cpp)
+
+get_target_property(target_automoc_path autogen_test AUTOMOC_EXECUTABLE)
+get_target_property(target_autouic_path autogen_test AUTOUIC_EXECUTABLE)
+get_target_property(target_autorcc_path autogen_test AUTORCC_EXECUTABLE)
+
+if(NOT ${target_automoc_path} STREQUAL ${test_automoc_path})
+ message(FATAL_ERROR "CMAKE_AUTOMOC_EXECUTABLE not set")
+endif()
+
+if (NOT ${target_autouic_path} STREQUAL ${test_autouic_path})
+ message(FATAL_ERROR "CMAKE_AUTOUIC_EXECUTABLE not set")
+endif()
+
+if (NOT ${target_autorcc_path} STREQUAL ${test_autorcc_path})
+ message(FATAL_ERROR "CMAKE_AUTORCC_EXECUTABLE not set")
+endif()
diff --git a/Tests/QtAutogen/GlobalAutogenExecutable/main.cpp b/Tests/QtAutogen/GlobalAutogenExecutable/main.cpp
new file mode 100644
index 0000000000..f8b643afbf
--- /dev/null
+++ b/Tests/QtAutogen/GlobalAutogenExecutable/main.cpp
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/QtAutogen/GlobalAutogenSystemUseInclude/CMakeLists.txt b/Tests/QtAutogen/GlobalAutogenSystemUseInclude/CMakeLists.txt
new file mode 100644
index 0000000000..1095fb1e66
--- /dev/null
+++ b/Tests/QtAutogen/GlobalAutogenSystemUseInclude/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.26)
+project(GlobalAutogenSystemUseInclude)
+
+include("../AutogenCoreTest.cmake")
+
+block()
+ set(test_autogen_use_system_include ON)
+ set(CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE ${test_autogen_use_system_include})
+
+ add_executable(autogen_test_on main.cpp)
+ get_target_property(target_autogen_use_system_include autogen_test_on AUTOGEN_USE_SYSTEM_INCLUDE)
+
+ if(NOT ${CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE} STREQUAL ${target_autogen_use_system_include})
+ message(FATAL_ERROR "CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE not set")
+ endif()
+endblock()
+
+block()
+ set(test_autogen_use_system_include OFF)
+ set(CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE ${test_autogen_use_system_include})
+
+ add_executable(autogen_test_off main.cpp)
+ get_target_property(target_autogen_use_system_include autogen_test_off AUTOGEN_USE_SYSTEM_INCLUDE)
+
+ if(NOT ${CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE} STREQUAL ${target_autogen_use_system_include})
+ message(FATAL_ERROR "CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE not set")
+ endif()
+endblock()
diff --git a/Tests/QtAutogen/GlobalAutogenSystemUseInclude/main.cpp b/Tests/QtAutogen/GlobalAutogenSystemUseInclude/main.cpp
new file mode 100644
index 0000000000..f8b643afbf
--- /dev/null
+++ b/Tests/QtAutogen/GlobalAutogenSystemUseInclude/main.cpp
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/QtAutogen/MocInterfaceMacroNames/CMakeLists.txt b/Tests/QtAutogen/MocInterfaceMacroNames/CMakeLists.txt
new file mode 100644
index 0000000000..7744d78402
--- /dev/null
+++ b/Tests/QtAutogen/MocInterfaceMacroNames/CMakeLists.txt
@@ -0,0 +1,61 @@
+cmake_minimum_required(VERSION 3.16)
+project(MocInterfaceMacroNames)
+
+include("../AutogenCoreTest.cmake")
+
+set(CMAKE_AUTOMOC ON)
+
+add_executable(dummy dummy.cpp)
+target_link_libraries(dummy PRIVATE static_lib interface_lib shared_lib)
+
+add_library(shared_lib SHARED shared_lib.cpp)
+set_target_properties(shared_lib PROPERTIES INTERFACE_AUTOMOC_MACRO_NAMES "SHARED_LIB_MACRO")
+
+add_library(interface_lib INTERFACE)
+set_target_properties(interface_lib PROPERTIES INTERFACE_AUTOMOC_MACRO_NAMES "INTERFACE_LIB_MACRO")
+
+add_library(static_lib STATIC static_lib.cpp)
+set_target_properties(static_lib PROPERTIES INTERFACE_AUTOMOC_MACRO_NAMES "STATIC_LIB_MACRO")
+
+set(AUTOGEN_INFO_FILE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy_autogen.dir/AutogenInfo.json")
+set(CHECK_AUTOGEN_JSON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CheckAutogenJson.cmake")
+message(STATUS "AutogenInfo.json: ${AUTOGEN_INFO_FILE}")
+
+add_custom_command(TARGET dummy POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -DFILE_PATH=${AUTOGEN_INFO_FILE} -P ${CHECK_AUTOGEN_JSON_PATH}
+)
+
+install(TARGETS shared_lib EXPORT shared_lib)
+install(TARGETS interface_lib EXPORT interface_lib)
+install(TARGETS static_lib EXPORT static_lib)
+
+install(EXPORT shared_lib FILE shared_libTargets.cmake DESTINATION lib/cmake/shared_lib)
+install(EXPORT interface_lib FILE interface_libTargets.cmake DESTINATION lib/cmake/interface_lib)
+install(EXPORT static_lib FILE static_libTargets.cmake DESTINATION lib/cmake/static_lib)
+
+set(CHECK_EXPORT_TARGETS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CheckExportTargets.cmake")
+set(EXPORT_FOLDER_PATH "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export")
+
+add_custom_command(TARGET dummy POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -DFOLDER_PATH=${EXPORT_FOLDER_PATH} -P ${CHECK_EXPORT_TARGETS_PATH}
+)
+
+# check if INTERFACE_AUTOMOC_MACRO_NAMES were transferred to the *_link libraries correctly
+add_executable(dummy_link dummy.cpp)
+target_link_libraries(dummy_link PRIVATE static_link_lib interface_link_lib shared_link_lib)
+
+add_library(shared_link_lib SHARED shared_lib.cpp)
+target_link_libraries(shared_link_lib PUBLIC shared_lib)
+
+add_library(interface_link_lib INTERFACE)
+target_link_libraries(interface_link_lib INTERFACE interface_lib)
+
+add_library(static_link_lib STATIC static_lib.cpp)
+target_link_libraries(static_link_lib PUBLIC static_lib)
+
+set(AUTOGEN_INFO_FILE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy_link_autogen.dir/AutogenInfo.json")
+message(STATUS "AutogenInfo.json: ${AUTOGEN_INFO_FILE}")
+
+add_custom_command(TARGET dummy_link POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -DFILE_PATH=${AUTOGEN_INFO_FILE} -P ${CHECK_AUTOGEN_JSON_PATH}
+)
diff --git a/Tests/QtAutogen/MocInterfaceMacroNames/CheckAutogenJson.cmake b/Tests/QtAutogen/MocInterfaceMacroNames/CheckAutogenJson.cmake
new file mode 100644
index 0000000000..338f345029
--- /dev/null
+++ b/Tests/QtAutogen/MocInterfaceMacroNames/CheckAutogenJson.cmake
@@ -0,0 +1,27 @@
+
+
+set(expected_values "SHARED_LIB_MACRO" "INTERFACE_LIB_MACRO" "STATIC_LIB_MACRO")
+function(checkAutoMocMacroNames FILE_PATH)
+ message(STATUS "Checking for auto moc macro names in ${FILE_PATH}")
+ file(READ ${FILE_PATH} FILE_CONTENT)
+ string(JSON MOC_MACRO_NAMES_ARR GET ${FILE_CONTENT} MOC_MACRO_NAMES)
+ # get the length of MOC_MACRO_NAMES in JSON
+ string(JSON MOC_MACRO_NAMES_LENGTH LENGTH ${MOC_MACRO_NAMES_ARR})
+ if(${MOC_MACRO_NAMES_LENGTH} EQUAL 0)
+ message(FATAL_ERROR "MOC_MACRO_NAMES is empty")
+ endif()
+ message(STATUS "MOC_MACRO_NAMES: ${MOC_MACRO_NAMES_ARR}")
+
+ math(EXPR last_index "${MOC_MACRO_NAMES_LENGTH} - 1")
+ set(reverse_index ${last_index})
+ foreach(expected_value IN LISTS expected_values)
+ string(JSON element GET ${MOC_MACRO_NAMES_ARR} ${reverse_index})
+ # check if element equals to expected value
+ if(NOT ${element} STREQUAL ${expected_value})
+ message(FATAL_ERROR "MOC_MACRO_NAMES is expected to contain ${expected_value} but contains ${element}")
+ endif()
+ math(EXPR reverse_index "${reverse_index} - 1")
+ endforeach()
+endfunction()
+
+checkAutoMocMacroNames(${FILE_PATH})
diff --git a/Tests/QtAutogen/MocInterfaceMacroNames/CheckExportTargets.cmake b/Tests/QtAutogen/MocInterfaceMacroNames/CheckExportTargets.cmake
new file mode 100644
index 0000000000..9db23f62b8
--- /dev/null
+++ b/Tests/QtAutogen/MocInterfaceMacroNames/CheckExportTargets.cmake
@@ -0,0 +1,45 @@
+
+set(TARGET_NAMES "static_lib" "shared_lib" "interface_lib")
+set(static_lib_FOUND "0")
+set(shared_lib_FOUND "0")
+set(interface_lib_FOUND "0")
+
+macro(checkExportTargets FOLDER_PATH)
+ message("Checking folder: ${FOLDER_PATH}")
+ file(GLOB sources_list LIST_DIRECTORIES true RELATIVE ${FOLDER_PATH} ${FOLDER_PATH}/*)
+ message("Found files and folders: ${sources_list}")
+ foreach(source ${sources_list})
+ set(SOURCE_ABS "${FOLDER_PATH}/${source}")
+ if(IS_DIRECTORY ${SOURCE_ABS})
+ message("Found subfolder: ${source}")
+ checkExportTargets(${SOURCE_ABS})
+ else()
+ message("Found file: ${source}")
+ foreach(TARGET_NAME ${TARGET_NAMES})
+ set(TARGETS_FILE "${TARGET_NAME}Targets.cmake")
+ if(${source} STREQUAL ${TARGETS_FILE})
+ message("Found ${TARGETS_FILE} in ${FOLDER_PATH}")
+ string(TOUPPER ${TARGET_NAME} TARGET_NAME_UPPER)
+ set(expected_macro "${TARGET_NAME_UPPER}_MACRO")
+ set(expected_string "INTERFACE_AUTOMOC_MACRO_NAMES \"${expected_macro}\"")
+ file(READ ${FOLDER_PATH}/${source} contents)
+ if (NOT contents MATCHES ${expected_string})
+ message(FATAL_ERROR "Expected ${expected_string} in ${FOLDER_PATH}/${source}")
+ else()
+ message("Found ${expected_string} in ${FOLDER_PATH}/${source}")
+ set(${TARGET_NAME}_FOUND "1")
+ endif()
+ endif()
+ endforeach()
+ endif()
+ endforeach()
+endmacro()
+
+checkExportTargets(${FOLDER_PATH})
+
+foreach(TARGET_NAME ${TARGET_NAMES})
+ # check if the target found equals the expected value
+ if(NOT ${TARGET_NAME}_FOUND STREQUAL "1")
+ message(FATAL_ERROR "Did not find ${TARGET_NAME}Targets.cmake")
+ endif()
+endforeach()
diff --git a/Tests/QtAutogen/MocInterfaceMacroNames/dummy.cpp b/Tests/QtAutogen/MocInterfaceMacroNames/dummy.cpp
new file mode 100644
index 0000000000..f8b643afbf
--- /dev/null
+++ b/Tests/QtAutogen/MocInterfaceMacroNames/dummy.cpp
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/QtAutogen/MocInterfaceMacroNames/shared_lib.cpp b/Tests/QtAutogen/MocInterfaceMacroNames/shared_lib.cpp
new file mode 100644
index 0000000000..3a5c48208f
--- /dev/null
+++ b/Tests/QtAutogen/MocInterfaceMacroNames/shared_lib.cpp
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void foo()
+{
+}
diff --git a/Tests/QtAutogen/MocInterfaceMacroNames/static_lib.cpp b/Tests/QtAutogen/MocInterfaceMacroNames/static_lib.cpp
new file mode 100644
index 0000000000..3695dc91e3
--- /dev/null
+++ b/Tests/QtAutogen/MocInterfaceMacroNames/static_lib.cpp
@@ -0,0 +1,3 @@
+void foo()
+{
+}
diff --git a/Tests/QtAutogen/RccAutogenBuildDir/CMakeLists.txt b/Tests/QtAutogen/RccAutogenBuildDir/CMakeLists.txt
new file mode 100644
index 0000000000..9bdb68986d
--- /dev/null
+++ b/Tests/QtAutogen/RccAutogenBuildDir/CMakeLists.txt
@@ -0,0 +1,33 @@
+cmake_minimum_required(VERSION 3.16)
+project(RccAutogenBuildDir)
+include("../AutogenCoreTest.cmake")
+
+set(PROJECTS_ROOT ${CMAKE_BINARY_DIR})
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_AUTORCC ON)
+
+macro(set_build_type_dependent varName debugValue releaseValue
+ relWithDebInfoValue minSizeRelValue)
+
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
+ set(${varName} ${debugValue})
+ elseif(CMAKE_BUILD_TYPE MATCHES Release)
+ set(${varName} ${releaseValue})
+ elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
+ set(${varName} ${relWithDebInfoValue})
+ elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel)
+ set(${varName} ${minSizeRelValue})
+ endif()
+endmacro()
+
+set_build_type_dependent(AUTOGEN_DIR agd agr ags agm)
+add_library(testlib SHARED lib.h lib.cpp resource.qrc)
+set_target_properties(testlib PROPERTIES AUTOGEN_BUILD_DIR "${PROJECTS_ROOT}/${AUTOGEN_DIR}/testlib_ag")
+target_link_libraries(testlib ${QT_LIBRARIES})
+
+set_build_type_dependent(AUTOGEN_DIR agd agr ags agm)
+add_executable(autorcctest main.cpp lib.h)
+set_target_properties(autorcctest PROPERTIES AUTOGEN_BUILD_DIR "${PROJECTS_ROOT}/${AUTOGEN_DIR}/autorcctest_ag")
+target_link_libraries(autorcctest ${QT_LIBRARIES} testlib)
diff --git a/Tests/QtAutogen/RccAutogenBuildDir/lib.cpp b/Tests/QtAutogen/RccAutogenBuildDir/lib.cpp
new file mode 100644
index 0000000000..3a5c48208f
--- /dev/null
+++ b/Tests/QtAutogen/RccAutogenBuildDir/lib.cpp
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void foo()
+{
+}
diff --git a/Tests/QtAutogen/RccAutogenBuildDir/lib.h b/Tests/QtAutogen/RccAutogenBuildDir/lib.h
new file mode 100644
index 0000000000..28138f189a
--- /dev/null
+++ b/Tests/QtAutogen/RccAutogenBuildDir/lib.h
@@ -0,0 +1,6 @@
+#ifndef LIB_H
+#define LIB_H
+
+void foo();
+
+#endif
diff --git a/Tests/QtAutogen/RccAutogenBuildDir/main.cpp b/Tests/QtAutogen/RccAutogenBuildDir/main.cpp
new file mode 100644
index 0000000000..a211f4011e
--- /dev/null
+++ b/Tests/QtAutogen/RccAutogenBuildDir/main.cpp
@@ -0,0 +1,7 @@
+#include "lib.h"
+
+int main()
+{
+ foo();
+ return 0;
+}
diff --git a/Tests/QtAutogen/RccAutogenBuildDir/resource.qrc b/Tests/QtAutogen/RccAutogenBuildDir/resource.qrc
new file mode 100644
index 0000000000..90f4a8379a
--- /dev/null
+++ b/Tests/QtAutogen/RccAutogenBuildDir/resource.qrc
@@ -0,0 +1,2 @@
+<!DOCTYPE RCC>
+<RCC version="1.0"/>
diff --git a/Tests/QtAutogen/Tests.cmake b/Tests/QtAutogen/Tests.cmake
index a3c57a5871..3e4f04d07e 100644
--- a/Tests/QtAutogen/Tests.cmake
+++ b/Tests/QtAutogen/Tests.cmake
@@ -1,11 +1,14 @@
-# Qt4 and Qt5 tests
+# Qt4, Qt5 and Qt6 tests
ADD_AUTOGEN_TEST(AutogenOriginDependsOff autogenOriginDependsOff)
ADD_AUTOGEN_TEST(AutogenOriginDependsOn)
ADD_AUTOGEN_TEST(AutogenTargetDepends)
ADD_AUTOGEN_TEST(Complex QtAutogen)
+ADD_AUTOGEN_TEST(GlobalAutogenSystemUseInclude)
ADD_AUTOGEN_TEST(GlobalAutogenTarget)
+ADD_AUTOGEN_TEST(GlobalAutogenExecutable)
ADD_AUTOGEN_TEST(LowMinimumVersion lowMinimumVersion)
ADD_AUTOGEN_TEST(ManySources manySources)
+ADD_AUTOGEN_TEST(MocInterfaceMacroNames)
ADD_AUTOGEN_TEST(MocOnly mocOnly)
ADD_AUTOGEN_TEST(MocOptions mocOptions)
ADD_AUTOGEN_TEST(ObjectLibrary someProgram)
@@ -15,6 +18,7 @@ ADD_AUTOGEN_TEST(Parallel2 parallel2)
ADD_AUTOGEN_TEST(Parallel3 parallel3)
ADD_AUTOGEN_TEST(Parallel4 parallel4)
ADD_AUTOGEN_TEST(ParallelAUTO parallelAUTO)
+ADD_AUTOGEN_TEST(RccAutogenBuildDir)
ADD_AUTOGEN_TEST(RccEmpty rccEmpty)
ADD_AUTOGEN_TEST(RccOffMocLibrary)
ADD_AUTOGEN_TEST(RccOnly rccOnly)
@@ -44,7 +48,7 @@ if(QT_TEST_ALLOW_QT_MACROS)
ADD_AUTOGEN_TEST(MocSkipSource)
endif()
-# Qt5 only tests
+# Qt5 and Qt6 only tests
if(QT_TEST_VERSION GREATER 4)
ADD_AUTOGEN_TEST(MocMacroName mocMacroName)
ADD_AUTOGEN_TEST(MocOsMacros)
diff --git a/Tests/QtAutomocNoQt/CMakeLists.txt b/Tests/QtAutomocNoQt/CMakeLists.txt
index 655f12befb..4e2ceeb32b 100644
--- a/Tests/QtAutomocNoQt/CMakeLists.txt
+++ b/Tests/QtAutomocNoQt/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(QtAutomocNoQt)
diff --git a/Tests/ReturnTest/CMakeLists.txt b/Tests/ReturnTest/CMakeLists.txt
index 78e3fc1ca4..03a0f7aa63 100644
--- a/Tests/ReturnTest/CMakeLists.txt
+++ b/Tests/ReturnTest/CMakeLists.txt
@@ -1,5 +1,5 @@
# a simple C only test case
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project (ReturnTest)
function (FAILED testname)
diff --git a/Tests/RunCMake/AddRunCMakeTest.cmake b/Tests/RunCMake/AddRunCMakeTest.cmake
new file mode 100644
index 0000000000..c0c3bba822
--- /dev/null
+++ b/Tests/RunCMake/AddRunCMakeTest.cmake
@@ -0,0 +1,10 @@
+if(NOT DEFINED RunCMake_TEST_SUITE)
+ message("Usage: ${CMAKE_COMMAND} -DRunCMake_TEST_SUITE=<test name> -P Tests/RunCMake/AddRunCMakeTestSuite.cmake")
+else()
+ include("Source/CMakeVersion.cmake")
+ set(RunCMake_TEST_DIR "Tests/RunCMake/${RunCMake_TEST_SUITE}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_DIR}")
+ file(WRITE "${RunCMake_TEST_DIR}/CMakeLists.txt" "cmake_minimum_required(VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR})\nproject(\${RunCMake_TEST} NONE)\ninclude(\${RunCMake_TEST}.cmake)\n")
+ file(WRITE "${RunCMake_TEST_DIR}/RunCMakeTest.cmake" "include(RunCMake)\n\n# Write your test cases below, like so:\n#\n# run_cmake(TestCaseName)\n")
+ file(APPEND "Tests/RunCMake/CMakeLists.txt" "add_RunCMake_test(${RunCMake_TEST_SUITE})\n")
+endif()
diff --git a/Tests/RunCMake/AppleSilicon/RunCMakeTest.cmake b/Tests/RunCMake/AppleSilicon/RunCMakeTest.cmake
index 39e462e41f..58c50e0ea5 100644
--- a/Tests/RunCMake/AppleSilicon/RunCMakeTest.cmake
+++ b/Tests/RunCMake/AppleSilicon/RunCMakeTest.cmake
@@ -10,11 +10,17 @@ function(run_arch case)
run_cmake(${case})
unset(RunCMake_TEST_OPTIONS)
set(RunCMake_TEST_NO_CLEAN 1)
- run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config Debug)
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
+ run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config Debug --verbose)
endfunction()
run_arch(default)
+if(RunCMake_GENERATOR MATCHES "Makefiles|Ninja")
+ run_arch(default-target-arm64 -DCMAKE_C_COMPILER_TARGET=arm64-apple-macosx)
+ run_arch(default-target-x86_64 -DCMAKE_C_COMPILER_TARGET=x86_64-apple-macosx)
+endif()
+
run_arch(arm64-var -DCMAKE_APPLE_SILICON_PROCESSOR=arm64)
run_arch(x86_64-var -DCMAKE_APPLE_SILICON_PROCESSOR=x86_64)
diff --git a/Tests/RunCMake/AppleSilicon/default-target-arm64-build-check.cmake b/Tests/RunCMake/AppleSilicon/default-target-arm64-build-check.cmake
new file mode 100644
index 0000000000..33ad9313e4
--- /dev/null
+++ b/Tests/RunCMake/AppleSilicon/default-target-arm64-build-check.cmake
@@ -0,0 +1,5 @@
+if(NOT actual_stdout MATCHES "[ -]-target=arm64-apple-macosx ")
+ set(RunCMake_TEST_FAILED "No -target=arm64-apple-macosx flag found!")
+elseif(actual_stdout MATCHES " (-arch +[^ ]*)")
+ set(RunCMake_TEST_FAILED "'${CMAKE_MATCH_1}' flag incorrectly found!")
+endif()
diff --git a/Tests/RunCMake/AppleSilicon/default-target-arm64.cmake b/Tests/RunCMake/AppleSilicon/default-target-arm64.cmake
new file mode 100644
index 0000000000..8c94020d77
--- /dev/null
+++ b/Tests/RunCMake/AppleSilicon/default-target-arm64.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "")
+ message(FATAL_ERROR "CMAKE_OSX_ARCHITECTURES is '${CMAKE_OSX_ARCHITECTURES}', not empty ''")
+endif()
+add_library(arm64 arm64.c)
diff --git a/Tests/RunCMake/AppleSilicon/default-target-x86_64-build-check.cmake b/Tests/RunCMake/AppleSilicon/default-target-x86_64-build-check.cmake
new file mode 100644
index 0000000000..9116ef4e72
--- /dev/null
+++ b/Tests/RunCMake/AppleSilicon/default-target-x86_64-build-check.cmake
@@ -0,0 +1,5 @@
+if(NOT actual_stdout MATCHES "[ -]-target=x86_64-apple-macosx ")
+ set(RunCMake_TEST_FAILED "No -target=x86_64-apple-macosx flag found!")
+elseif(actual_stdout MATCHES " (-arch +[^ ]*)")
+ set(RunCMake_TEST_FAILED "'${CMAKE_MATCH_1}' flag incorrectly found!")
+endif()
diff --git a/Tests/RunCMake/AppleSilicon/default-target-x86_64.cmake b/Tests/RunCMake/AppleSilicon/default-target-x86_64.cmake
new file mode 100644
index 0000000000..ded46b7968
--- /dev/null
+++ b/Tests/RunCMake/AppleSilicon/default-target-x86_64.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "")
+ message(FATAL_ERROR "CMAKE_OSX_ARCHITECTURES is '${CMAKE_OSX_ARCHITECTURES}', not empty ''")
+endif()
+add_library(x86_64 x86_64.c)
diff --git a/Tests/RunCMake/AppleTextStubs/CMakeLists.txt b/Tests/RunCMake/AppleTextStubs/CMakeLists.txt
new file mode 100644
index 0000000000..93ee9dfd5f
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/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/AppleTextStubs/Framework-export.cmake b/Tests/RunCMake/AppleTextStubs/Framework-export.cmake
new file mode 100644
index 0000000000..f75c6d1ed2
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/Framework-export.cmake
@@ -0,0 +1,12 @@
+enable_language(C)
+
+add_library(foo SHARED foo.c)
+set_property(TARGET foo PROPERTY FRAMEWORK TRUE)
+set_property(TARGET foo PROPERTY ENABLE_EXPORTS TRUE)
+set_property(TARGET foo PROPERTY LIBRARY_OUTPUT_DIRECTORY $<CONFIG>)
+
+install(TARGETS foo EXPORT foo FRAMEWORK DESTINATION DESTINATION "${CMAKE_BINARY_DIR}/$<CONFIG>")
+install(EXPORT foo DESTINATION lib/foo NAMESPACE foo-install::)
+install(FILES foo-config.cmake.in RENAME foo-config.cmake DESTINATION lib/foo)
+
+export(TARGETS foo NAMESPACE foo-build:: FILE Release/foo.cmake)
diff --git a/Tests/RunCMake/AppleTextStubs/Framework-import.cmake b/Tests/RunCMake/AppleTextStubs/Framework-import.cmake
new file mode 100644
index 0000000000..e0001d0b84
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/Framework-import.cmake
@@ -0,0 +1,62 @@
+enable_language(C)
+
+find_package(foo REQUIRED CONFIG NO_DEFAULT_PATH)
+
+add_executable(main main.c)
+target_link_libraries(main PRIVATE foo-install::foo)
+
+get_property(is_framework TARGET foo-install::foo PROPERTY FRAMEWORK)
+if (NOT is_framework)
+ message(SEND_ERROR "foo-build::foo: FRAMEWORK not set.")
+endif()
+get_property(enable_exports TARGET foo-install::foo PROPERTY ENABLE_EXPORTS)
+if (CAMKE_TAPI AND NOT enable_exports)
+ message(SEND_ERROR "foo-install::foo: ENABLE_EXPORTS not set.")
+endif()
+
+get_property(implib TARGET foo-install::foo PROPERTY IMPORTED_IMPLIB_RELEASE)
+if (CAMKE_TAPI AND NOT implib)
+ message(SEND_ERROR "foo-install::foo: IMPORTED_IMPLIB_RELEASE not set.")
+endif()
+if (CAMKE_TAPI AND NOT implib MATCHES "foo.framework/Versions/A/foo.tbd$")
+ message(SEND_ERROR "foo-install::foo: ${implib}: wrong value for IMPORTED_IMPLIB_RELEASE.")
+endif()
+
+get_property(location TARGET foo-install::foo PROPERTY IMPORTED_LOCATION_RELEASE)
+if (NOT location)
+ message(SEND_ERROR "foo-install::foo: IMPORTED_LOCATION_RELEASE not set.")
+endif()
+if (NOT location MATCHES "foo.framework/Versions/A/foo$")
+ message(SEND_ERROR "foo-install::foo: ${location}: wrong value for IMPORTED_LOCATION_RELEASE.")
+endif()
+
+
+include(${foo_BUILD}/foo.cmake)
+
+add_executable(main2 main.c)
+target_link_libraries(main2 PRIVATE foo-build::foo)
+
+get_property(is_framework TARGET foo-build::foo PROPERTY FRAMEWORK)
+if (NOT is_framework)
+ message(SEND_ERROR "foo-build::foo: FRAMEWORK not set.")
+endif()
+get_property(enable_exports TARGET foo-build::foo PROPERTY ENABLE_EXPORTS)
+if (CAMKE_TAPI AND NOT enable_exports)
+ message(SEND_ERROR "foo-build::foo: ENABLE_EXPORTS not set.")
+endif()
+
+get_property(implib TARGET foo-build::foo PROPERTY IMPORTED_IMPLIB_RELEASE)
+if (CAMKE_TAPI AND NOT implib)
+ message(SEND_ERROR "foo-build::foo: IMPORTED_IMPLIB_RELEASE not set.")
+endif()
+if (CAMKE_TAPI AND NOT implib STREQUAL "${foo_BUILD}/foo.framework/Versions/A/foo.tbd")
+ message(SEND_ERROR "foo-build::foo: ${implib}: wrong value for IMPORTED_IMPLIB_RELEASE.")
+endif()
+
+get_property(location TARGET foo-build::foo PROPERTY IMPORTED_LOCATION_RELEASE)
+if (NOT location)
+ message(SEND_ERROR "foo-build::foo: IMPORTED_LOCATION_RELEASE not set.")
+endif()
+if (NOT location STREQUAL "${foo_BUILD}/foo.framework/Versions/A/foo")
+ message(SEND_ERROR "foo-build::foo: ${location}: wrong value for IMPORTED_LOCATION_RELEASE.")
+endif()
diff --git a/Tests/RunCMake/AppleTextStubs/Framework-install-check.cmake b/Tests/RunCMake/AppleTextStubs/Framework-install-check.cmake
new file mode 100644
index 0000000000..e8a555773c
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/Framework-install-check.cmake
@@ -0,0 +1 @@
+include ("${RunCMake_TEST_BINARY_DIR}/Framework-Release-generated.cmake")
diff --git a/Tests/RunCMake/AppleTextStubs/Framework.cmake b/Tests/RunCMake/AppleTextStubs/Framework.cmake
new file mode 100644
index 0000000000..f99eb5e813
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/Framework.cmake
@@ -0,0 +1,59 @@
+enable_language(C)
+
+add_library(foo SHARED foo.c)
+set_property(TARGET foo PROPERTY ENABLE_EXPORTS TRUE)
+set_property(TARGET foo PROPERTY FRAMEWORK TRUE)
+
+add_executable(main main.c)
+target_link_libraries(main PRIVATE foo)
+
+
+install(TARGETS foo FRAMEWORK DESTINATION "${CMAKE_BINARY_DIR}/INSTALL")
+
+# LIBRARY and ARCHIVE should be ignored
+install(TARGETS foo FRAMEWORK DESTINATION "${CMAKE_BINARY_DIR}/INSTALL2"
+ LIBRARY DESTINATION "${CMAKE_BINARY_DIR}/INSTALL2/lib"
+ ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/INSTALL2/dev")
+
+
+set (GENERATE_CONTENT "if (\"${CMAKE_TAPI}\")
+ set (APPLE_TEXT_STUBS_SUPPORTED TRUE)
+endif()\n\n")
+
+string (APPEND GENERATE_CONTENT [[
+macro (CHECK_FILE test_msg path)
+ if (NOT EXISTS "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" not found\n")
+ endif()
+endmacro()
+
+macro (CHECK_SYMLINK test_msg path)
+ if(NOT IS_SYMLINK "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" is not a symbolic link\n")
+ elseif (NOT EXISTS "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" is not a valid symlink\n")
+ endif()
+endmacro()
+
+check_file("DYLIB file" "$<TARGET_FILE:foo>")
+check_symlink("Public DYLIB file" "$<TARGET_LINKER_LIBRARY_FILE:foo>")
+check_file("executable file" "$<TARGET_FILE:main>")
+
+check_file("Installed DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/foo.framework/Versions/A/$<TARGET_FILE_NAME:foo>")
+check_symlink("Installed Public DULIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/foo.framework/$<TARGET_FILE_NAME:foo>")
+check_file("Installed DULIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/foo.framework/Versions/A/$<TARGET_FILE_NAME:foo>")
+check_symlink("Installed Public DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/foo.framework/$<TARGET_FILE_NAME:foo>")
+
+if (APPLE_TEXT_STUBS_SUPPORTED)
+ check_file("TBD file" "$<TARGET_IMPORT_FILE:foo>")
+ check_symlink("Public TBD file" "$<TARGET_LINKER_IMPORT_FILE:foo>")
+
+ check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/foo.framework/Versions/A/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_symlink("Installed Public TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/foo.framework/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/foo.framework/Versions/A/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_symlink("Installed Public TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/foo.framework/$<TARGET_IMPORT_FILE_NAME:foo>")
+endif()
+]])
+
+file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Framework-$<CONFIG>-generated.cmake"
+ CONTENT "${GENERATE_CONTENT}")
diff --git a/Tests/RunCMake/AppleTextStubs/Library-export.cmake b/Tests/RunCMake/AppleTextStubs/Library-export.cmake
new file mode 100644
index 0000000000..d2e09ea35d
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/Library-export.cmake
@@ -0,0 +1,12 @@
+enable_language(C)
+
+add_library(foo SHARED foo.c)
+set_property(TARGET foo PROPERTY ENABLE_EXPORTS TRUE)
+set_property(TARGET foo PROPERTY LIBRARY_OUTPUT_DIRECTORY $<CONFIG>)
+set_property(TARGET foo PROPERTY ARCHIVE_OUTPUT_DIRECTORY $<CONFIG>)
+
+install(TARGETS foo EXPORT foo DESTINATION "${CMAKE_BINARY_DIR}/$<CONFIG>")
+install(EXPORT foo DESTINATION lib/foo NAMESPACE foo-install::)
+install(FILES foo-config.cmake.in RENAME foo-config.cmake DESTINATION lib/foo)
+
+export(TARGETS foo NAMESPACE foo-build:: FILE Release/foo.cmake)
diff --git a/Tests/RunCMake/AppleTextStubs/Library-import.cmake b/Tests/RunCMake/AppleTextStubs/Library-import.cmake
new file mode 100644
index 0000000000..9406aacac0
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/Library-import.cmake
@@ -0,0 +1,54 @@
+enable_language(C)
+
+find_package(foo REQUIRED CONFIG NO_DEFAULT_PATH)
+
+add_executable(main main.c)
+target_link_libraries(main PRIVATE foo-install::foo)
+
+get_property(enable_exports TARGET foo-install::foo PROPERTY ENABLE_EXPORTS)
+if (CMAKE_TAPI AND NOT enable_exports)
+ message(SEND_ERROR "foo-install::foo: ENABLE_EXPORTS not set.")
+endif()
+
+get_property(implib TARGET foo-install::foo PROPERTY IMPORTED_IMPLIB_RELEASE)
+if (CMAKE_TAPI AND NOT implib)
+ message(SEND_ERROR "foo-install::foo: IMPORTED_IMPLIB_RELEASE not set.")
+endif()
+if (CMAKE_TAPI AND NOT implib MATCHES "Release/libfoo.tbd$")
+ message(SEND_ERROR "foo-install::foo: ${implib}: wrong value for IMPORTED_IMPLIB_RELEASE.")
+endif()
+
+get_property(location TARGET foo-install::foo PROPERTY IMPORTED_LOCATION_RELEASE)
+if (NOT location)
+ message(SEND_ERROR "foo-install::foo: IMPORTED_LOCATION_RELEASE not set.")
+endif()
+if (NOT location MATCHES "Release/libfoo.dylib$")
+ message(SEND_ERROR "foo-install::foo: ${location}: wrong value for IMPORTED_LOCATION_RELEASE.")
+endif()
+
+
+include(${foo_BUILD}/foo.cmake)
+
+add_executable(main2 main.c)
+target_link_libraries(main2 PRIVATE foo-build::foo)
+
+get_property(enable_exports TARGET foo-build::foo PROPERTY ENABLE_EXPORTS)
+if (CMAKE_TAPI AND NOT enable_exports)
+ message(SEND_ERROR "foo-build::foo: ENABLE_EXPORTS not set.")
+endif()
+
+get_property(implib TARGET foo-build::foo PROPERTY IMPORTED_IMPLIB_RELEASE)
+if (CMAKE_TAPI AND NOT implib)
+ message(SEND_ERROR "foo-build::foo: IMPORTED_IMPLIB_RELEASE not set.")
+endif()
+if (CMAKE_TAPI AND NOT implib STREQUAL "${foo_BUILD}/libfoo.tbd")
+ message(SEND_ERROR "foo-build::foo: ${implib}: wrong value for IMPORTED_IMPLIB_RELEASE.")
+endif()
+
+get_property(location TARGET foo-build::foo PROPERTY IMPORTED_LOCATION_RELEASE)
+if (NOT location)
+ message(SEND_ERROR "foo-build::foo: IMPORTED_LOCATION_RELEASE not set.")
+endif()
+if (NOT location STREQUAL "${foo_BUILD}/libfoo.dylib")
+ message(SEND_ERROR "foo-build::foo: ${location}: wrong value for IMPORTED_LOCATION_RELEASE.")
+endif()
diff --git a/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs-install-check.cmake b/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs-install-check.cmake
new file mode 100644
index 0000000000..40ec0a6ffc
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs-install-check.cmake
@@ -0,0 +1 @@
+include ("${RunCMake_TEST_BINARY_DIR}/LibraryWithOutputs-Release-generated.cmake")
diff --git a/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake b/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake
new file mode 100644
index 0000000000..f61c8f2a7e
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake
@@ -0,0 +1,52 @@
+enable_language(C)
+
+add_library(foo SHARED foo.c)
+set_property(TARGET foo PROPERTY ENABLE_EXPORTS TRUE)
+set_property(TARGET foo PROPERTY ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/TBD/$<CONFIG>")
+set_property(TARGET foo PROPERTY ARCHIVE_OUTPUT_NAME "tbd")
+
+add_executable(main main.c)
+target_link_libraries(main PRIVATE foo)
+
+
+set (GENERATE_CONTENT "if (\"${CMAKE_TAPI}\")
+ set (APPLE_TEXT_STUBS_SUPPORTED TRUE)
+endif()\n\n")
+
+string (APPEND GENERATE_CONTENT [[
+macro (CHECK_FILE test_msg path)
+ if (NOT EXISTS "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" not found\n")
+ endif()
+endmacro()
+
+check_file("DYLIB file" "$<TARGET_FILE:foo>")
+check_file("executable file" "$<TARGET_FILE:main>")
+
+if (APPLE_TEXT_STUBS_SUPPORTED)
+ check_file("TBD file" "$<TARGET_IMPORT_FILE:foo>")
+]])
+
+if (CMAKE_GENERATOR STREQUAL "Xcode")
+ # ARCHIVE outputs are ignored by this generator
+ string (APPEND GENERATE_CONTENT
+ "\n if (NOT \"$<TARGET_IMPORT_FILE_DIR:foo>\" STREQUAL \"${CMAKE_BINARY_DIR}/$<CONFIG>\")
+ string (APPEND RunCMake_TEST_FAILED \"Wrong directory for TBD file: \\\"$<TARGET_IMPORT_FILE_DIR:foo>\\\"\n\")
+ endif()
+ if (NOT \"$<TARGET_IMPORT_FILE_BASE_NAME:foo>\" STREQUAL \"foo\")
+ string (APPEND RunCMake_TEST_FAILED \"Wrong base name for TBD file: \\\"$<TARGET_IMPORT_FILE_BASE_NAME:foo>\\\"\n\")
+ endif()\n")
+else()
+ string (APPEND GENERATE_CONTENT
+ "\n if (NOT \"$<TARGET_IMPORT_FILE_DIR:foo>\" STREQUAL \"${CMAKE_BINARY_DIR}/TBD/$<CONFIG>\")
+ string (APPEND RunCMake_TEST_FAILED \"Wrong directory for TBD file: \\\"$<TARGET_IMPORT_FILE_DIR:foo>\\\"\n\")
+ endif()
+ if (NOT \"$<TARGET_IMPORT_FILE_BASE_NAME:foo>\" STREQUAL \"tbd\")
+ string (APPEND RunCMake_TEST_FAILED \"Wrong base name for TBD file: \\\"$<TARGET_IMPORT_FILE_BASE_NAME:foo>\\\"\n\")
+ endif()\n")
+endif()
+string (APPEND GENERATE_CONTENT "endif()\n")
+
+
+file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/LibraryWithOutputs-$<CONFIG>-generated.cmake"
+ CONTENT "${GENERATE_CONTENT}")
diff --git a/Tests/RunCMake/AppleTextStubs/LibraryWithVersions-install-check.cmake b/Tests/RunCMake/AppleTextStubs/LibraryWithVersions-install-check.cmake
new file mode 100644
index 0000000000..af7328610b
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/LibraryWithVersions-install-check.cmake
@@ -0,0 +1 @@
+include ("${RunCMake_TEST_BINARY_DIR}/LibraryWithVersions-Release-generated.cmake")
diff --git a/Tests/RunCMake/AppleTextStubs/LibraryWithVersions.cmake b/Tests/RunCMake/AppleTextStubs/LibraryWithVersions.cmake
new file mode 100644
index 0000000000..28c175df31
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/LibraryWithVersions.cmake
@@ -0,0 +1,96 @@
+enable_language(C)
+
+add_library(foo SHARED foo.c)
+set_property(TARGET foo PROPERTY ENABLE_EXPORTS TRUE)
+set_property (TARGET foo PROPERTY VERSION 2.5.0)
+set_property (TARGET foo PROPERTY SOVERSION 2.0.0)
+
+add_executable(main main.c)
+target_link_libraries(main PRIVATE foo)
+
+
+install(TARGETS foo DESTINATION "${CMAKE_BINARY_DIR}/INSTALL" COMPONENT default)
+
+install(TARGETS foo ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/INSTALL2/dev1" NAMELINK_SKIP COMPONENT default)
+install(TARGETS foo ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/INSTALL2/dev2" NAMELINK_ONLY COMPONENT default)
+
+install(TARGETS foo ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/INSTALL3"
+ COMPONENT lib3 NAMELINK_COMPONENT dev3)
+install(TARGETS foo ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/INSTALL4"
+ COMPONENT lib4 NAMELINK_COMPONENT dev4)
+
+
+set (GENERATE_CONTENT "if (\"${CMAKE_TAPI}\")
+ set (APPLE_TEXT_STUBS_SUPPORTED TRUE)
+endif()\n\n")
+
+string (APPEND GENERATE_CONTENT [[
+cmake_policy (SET CMP0011 NEW)
+cmake_policy (SET CMP0057 NEW)
+
+macro (CHECK_FILE test_msg path)
+ if (NOT EXISTS "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" not found\n")
+ endif()
+endmacro()
+
+macro (CHECK_SYMLINK test_msg path)
+ if (NOT IS_SYMLINK "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" is not a symbolic link\n")
+ elseif (NOT EXISTS "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" not a valid symlink\n")
+ endif()
+endmacro()
+
+macro (CHECK_NOFILE test_msg path)
+ if (EXISTS "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" was found\n")
+ endif()
+endmacro()
+
+macro (CHECK_INSTALLED test_msg dir file)
+ file(GLOB installed_files LIST_DIRECTORIES FALSE RELATIVE "${dir}" "${dir}/*")
+ if (NOT "${file}" IN_LIST installed_files)
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${dir}/${file}\" not found\n")
+ endif()
+endmacro()
+
+
+check_file("DYLIB file" "$<TARGET_FILE:foo>")
+check_symlink("Linkable DYLIB file" "$<TARGET_LINKER_LIBRARY_FILE:foo>")
+check_symlink("SONAME DYLIB file" "$<TARGET_SONAME_FILE:foo>")
+check_file("executable file" "$<TARGET_FILE:main>")
+
+check_file("Installed DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_FILE_NAME:foo>")
+check_symlink("Installed Linkable DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_LINKER_LIBRARY_FILE_NAME:foo>")
+check_symlink("Installed SONAME DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_SONAME_FILE_NAME:foo>")
+
+if (APPLE_TEXT_STUBS_SUPPORTED)
+ check_file("TBD file" "$<TARGET_IMPORT_FILE:foo>")
+ check_symlink("Linkable TBD file" "$<TARGET_LINKER_IMPORT_FILE:foo>")
+ check_symlink("SONAME TBD file" "$<TARGET_SONAME_IMPORT_FILE:foo>")
+
+ check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_symlink("Installed Linkable TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_LINKER_IMPORT_FILE_NAME:foo>")
+ check_symlink("Installed SONAME TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_SONAME_IMPORT_FILE_NAME:foo>")
+
+ check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/dev1/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_symlink("Installed SONAME TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/dev1/$<TARGET_SONAME_IMPORT_FILE_NAME:foo>")
+ check_nofile("Installed Linkable TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/dev1/$<TARGET_LINKER_IMPORT_FILE_NAME:foo>")
+
+ check_installed("Installed Linkable TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/dev2" "$<TARGET_LINKER_IMPORT_FILE_NAME:foo>")
+ check_nofile("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/dev2/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_nofile("Installed SONAME TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/dev2/$<TARGET_SONAME_IMPORT_FILE_NAME:foo>")
+
+ check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL3/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_symlink("Installed SONAME TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL3/$<TARGET_SONAME_IMPORT_FILE_NAME:foo>")
+ check_nofile("Installed Linkable TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL3/$<TARGET_LINKER_IMPORT_FILE_NAME:foo>")
+
+ check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL4/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_symlink("Installed SONAME TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL4/$<TARGET_SONAME_IMPORT_FILE_NAME:foo>")
+ check_symlink("Installed Linkable TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL4/$<TARGET_LINKER_IMPORT_FILE_NAME:foo>")
+endif()
+]])
+
+file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/LibraryWithVersions-$<CONFIG>-generated.cmake"
+ CONTENT "${GENERATE_CONTENT}")
diff --git a/Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake b/Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake
new file mode 100644
index 0000000000..9ccd685d03
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake
@@ -0,0 +1,58 @@
+include(RunCMake)
+
+function(build_project test)
+ if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
+ endif()
+ run_cmake(${test})
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+
+ run_cmake_command(${test}-build ${CMAKE_COMMAND} --build . --config Release)
+ if ("${ARGC}" GREATER "1")
+ # custom install step
+ cmake_language(CALL ${ARGV1})
+ else()
+ run_cmake_command(${test}-install ${CMAKE_COMMAND} --install . --config Release)
+ endif()
+endfunction()
+
+build_project(Simple)
+build_project(Framework)
+build_project(LibraryWithOutputs)
+
+
+function(LibraryWithVersions-install)
+ run_cmake_command(LibraryWithVersions-install-component-lib3 ${CMAKE_COMMAND} --install . --config Release --component lib3)
+ run_cmake_command(LibraryWithVersions-install-component-lib4 ${CMAKE_COMMAND} --install . --config Release --component lib4)
+ run_cmake_command(LibraryWithVersions-install-components-dev4 ${CMAKE_COMMAND} --install . --config Release --component dev4)
+ run_cmake_command(LibraryWithVersions-install ${CMAKE_COMMAND} --install . --config Release --component default)
+endfunction()
+
+build_project(LibraryWithVersions LibraryWithVersions-install)
+
+
+function(build_ExportImport_project test)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-export-build)
+ set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root)
+ if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
+ endif()
+ run_cmake(${test}-export)
+ unset(RunCMake_TEST_OPTIONS)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(${test}-export-build ${CMAKE_COMMAND} --build . --config Release)
+ run_cmake_command(${test}-export-install ${CMAKE_COMMAND} --install . --prefix ${CMAKE_INSTALL_PREFIX} --config Release)
+
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-import-build)
+ set (foo_BUILD "${RunCMake_BINARY_DIR}/${test}-export-build")
+ if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ string (APPEND foo_BUILD "/Release")
+ endif()
+ run_cmake_with_options(${test}-import -Dfoo_DIR=${CMAKE_INSTALL_PREFIX}/lib/foo
+ -Dfoo_BUILD=${RunCMake_BINARY_DIR}/${test}-export-build/Release)
+ run_cmake_command(${test}-import-build ${CMAKE_COMMAND} --build . --config Release)
+endfunction()
+
+build_ExportImport_project(Library)
+build_ExportImport_project(Framework)
diff --git a/Tests/RunCMake/AppleTextStubs/Simple-install-check.cmake b/Tests/RunCMake/AppleTextStubs/Simple-install-check.cmake
new file mode 100644
index 0000000000..94054fad5f
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/Simple-install-check.cmake
@@ -0,0 +1 @@
+include ("${RunCMake_TEST_BINARY_DIR}/Simple-Release-generated.cmake")
diff --git a/Tests/RunCMake/AppleTextStubs/Simple.cmake b/Tests/RunCMake/AppleTextStubs/Simple.cmake
new file mode 100644
index 0000000000..9f6318c561
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/Simple.cmake
@@ -0,0 +1,41 @@
+enable_language(C)
+
+add_library(foo SHARED foo.c)
+set_property(TARGET foo PROPERTY ENABLE_EXPORTS TRUE)
+
+add_executable(main main.c)
+target_link_libraries(main PRIVATE foo)
+
+
+install(TARGETS foo DESTINATION "${CMAKE_BINARY_DIR}/INSTALL")
+
+install(TARGETS foo LIBRARY DESTINATION "${CMAKE_BINARY_DIR}/INSTALL2/lib"
+ ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/INSTALL2/dev")
+
+
+set (GENERATE_CONTENT "if (\"${CMAKE_TAPI}\")
+ set (APPLE_TEXT_STUBS_SUPPORTED TRUE)
+endif()\n\n")
+
+string (APPEND GENERATE_CONTENT [[
+macro (CHECK_FILE test_msg path)
+ if (NOT EXISTS "${path}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: \"${path}\" not found\n")
+ endif()
+endmacro()
+
+check_file("DYLIB file" "$<TARGET_FILE:foo>")
+check_file("executable file" "$<TARGET_FILE:main>")
+
+check_file("Installed DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/lib/$<TARGET_FILE_NAME:foo>")
+
+if (APPLE_TEXT_STUBS_SUPPORTED)
+ check_file("TBD file" "$<TARGET_IMPORT_FILE:foo>")
+
+ check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_IMPORT_FILE_NAME:foo>")
+ check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/dev/$<TARGET_IMPORT_FILE_NAME:foo>")
+endif()
+]])
+
+file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Simple-$<CONFIG>-generated.cmake"
+ CONTENT "${GENERATE_CONTENT}")
diff --git a/Tests/RunCMake/AppleTextStubs/foo-config.cmake.in b/Tests/RunCMake/AppleTextStubs/foo-config.cmake.in
new file mode 100644
index 0000000000..b0381387a6
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/foo-config.cmake.in
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/foo.cmake)
diff --git a/Tests/RunCMake/AppleTextStubs/foo.c b/Tests/RunCMake/AppleTextStubs/foo.c
new file mode 100644
index 0000000000..7f39d71755
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/foo.c
@@ -0,0 +1,5 @@
+
+int foo()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/AppleTextStubs/main.c b/Tests/RunCMake/AppleTextStubs/main.c
new file mode 100644
index 0000000000..dc5ce3d101
--- /dev/null
+++ b/Tests/RunCMake/AppleTextStubs/main.c
@@ -0,0 +1,7 @@
+
+extern int foo(void);
+
+int main()
+{
+ return foo();
+}
diff --git a/Tests/RunCMake/AutoExportDll/CMakeLists.txt b/Tests/RunCMake/AutoExportDll/CMakeLists.txt
index 18dfd2686f..93ee9dfd5f 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 74e7a4e948..35ccbb78f9 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 7192f65af9..410ffabdda 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 8fc768a368..a9459a9b23 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/Autogen/AutogenUseSystemIncludeCommon.cmake b/Tests/RunCMake/Autogen/AutogenUseSystemIncludeCommon.cmake
new file mode 100644
index 0000000000..bbefd5f55b
--- /dev/null
+++ b/Tests/RunCMake/Autogen/AutogenUseSystemIncludeCommon.cmake
@@ -0,0 +1,10 @@
+enable_language(CXX)
+
+find_package(Qt${with_qt_version} REQUIRED COMPONENTS Core Widgets Gui)
+
+set(CMAKE_AUTOMOC ON)
+
+add_library(dummy SHARED empty.cpp)
+target_link_libraries(dummy Qt${with_qt_version}::Core
+ Qt${with_qt_version}::Widgets
+ Qt${with_qt_version}::Gui)
diff --git a/Tests/RunCMake/Autogen/AutogenUseSystemIncludeOff.cmake b/Tests/RunCMake/Autogen/AutogenUseSystemIncludeOff.cmake
new file mode 100644
index 0000000000..dfdbb98b5b
--- /dev/null
+++ b/Tests/RunCMake/Autogen/AutogenUseSystemIncludeOff.cmake
@@ -0,0 +1,3 @@
+include("${CMAKE_CURRENT_LIST_DIR}/AutogenUseSystemIncludeCommon.cmake")
+
+set_target_properties(dummy PROPERTIES AUTOGEN_USE_SYSTEM_INCLUDE OFF)
diff --git a/Tests/RunCMake/Autogen/AutogenUseSystemIncludeOn.cmake b/Tests/RunCMake/Autogen/AutogenUseSystemIncludeOn.cmake
new file mode 100644
index 0000000000..f556ed43af
--- /dev/null
+++ b/Tests/RunCMake/Autogen/AutogenUseSystemIncludeOn.cmake
@@ -0,0 +1,3 @@
+include("${CMAKE_CURRENT_LIST_DIR}/AutogenUseSystemIncludeCommon.cmake")
+
+set_target_properties(dummy PROPERTIES AUTOGEN_USE_SYSTEM_INCLUDE ON)
diff --git a/Tests/RunCMake/Autogen/CMP0151-common.cmake b/Tests/RunCMake/Autogen/CMP0151-common.cmake
new file mode 100644
index 0000000000..bbefd5f55b
--- /dev/null
+++ b/Tests/RunCMake/Autogen/CMP0151-common.cmake
@@ -0,0 +1,10 @@
+enable_language(CXX)
+
+find_package(Qt${with_qt_version} REQUIRED COMPONENTS Core Widgets Gui)
+
+set(CMAKE_AUTOMOC ON)
+
+add_library(dummy SHARED empty.cpp)
+target_link_libraries(dummy Qt${with_qt_version}::Core
+ Qt${with_qt_version}::Widgets
+ Qt${with_qt_version}::Gui)
diff --git a/Tests/RunCMake/Autogen/CMP0151-new.cmake b/Tests/RunCMake/Autogen/CMP0151-new.cmake
new file mode 100644
index 0000000000..9c77e586f9
--- /dev/null
+++ b/Tests/RunCMake/Autogen/CMP0151-new.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0151-common.cmake")
diff --git a/Tests/RunCMake/Autogen/CMP0151-old.cmake b/Tests/RunCMake/Autogen/CMP0151-old.cmake
new file mode 100644
index 0000000000..9c77e586f9
--- /dev/null
+++ b/Tests/RunCMake/Autogen/CMP0151-old.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0151-common.cmake")
diff --git a/Tests/RunCMake/Autogen/Inspect.cmake b/Tests/RunCMake/Autogen/Inspect.cmake
new file mode 100644
index 0000000000..d5dc4b4093
--- /dev/null
+++ b/Tests/RunCMake/Autogen/Inspect.cmake
@@ -0,0 +1,13 @@
+enable_language(CXX)
+
+set(info "")
+foreach(var
+ CMAKE_INCLUDE_FLAG_CXX
+ CMAKE_INCLUDE_SYSTEM_FLAG_CXX
+ )
+ if(DEFINED ${var})
+ string(APPEND info "set(${var} \"${${var}}\")\n")
+ endif()
+endforeach()
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/info.cmake" "${info}")
diff --git a/Tests/RunCMake/Autogen/MocPredefs-build-stderr.txt b/Tests/RunCMake/Autogen/MocPredefs-build-stderr.txt
new file mode 100644
index 0000000000..8d98f9debd
--- /dev/null
+++ b/Tests/RunCMake/Autogen/MocPredefs-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/Autogen/MocPredefs-check.cxx b/Tests/RunCMake/Autogen/MocPredefs-check.cxx
new file mode 100644
index 0000000000..2b4791fc49
--- /dev/null
+++ b/Tests/RunCMake/Autogen/MocPredefs-check.cxx
@@ -0,0 +1,60 @@
+#include <iostream>
+
+#include "check_predefs.h"
+
+#define TO_STRING(x) TO_STRING0(x)
+#define TO_STRING0(x) #x
+
+int main()
+{
+ int ret = 0;
+#if defined(__STRICT_ANSI__)
+# if !defined(CHECK___STRICT_ANSI__)
+ std::cout << "__STRICT_ANSI__: Expected " << TO_STRING(__STRICT_ANSI__)
+ << " but it is not defined.\n";
+ ret = 1;
+# elif __STRICT_ANSI__ != CHECK___STRICT_ANSI__
+ std::cout << "__STRICT_ANSI__: Expected " << TO_STRING(__STRICT_ANSI__)
+ << " but got: " << TO_STRING(CHECK___STRICT_ANSI__) << "\n";
+ ret = 1;
+# endif
+#elif defined(CHECK___STRICT_ANSI__)
+ std::cout << "__STRICT_ANSI__: Expected undefined but got: "
+ << TO_STRING(CHECK___STRICT_ANSI__) << "\n";
+ ret = 1;
+#endif
+
+#if defined(__cplusplus)
+# if !defined(CHECK___cplusplus)
+ std::cout << "__cplusplus: Expected " << TO_STRING(__cplusplus)
+ << " but it is not defined.\n";
+ ret = 1;
+# elif __cplusplus != CHECK___cplusplus
+ std::cout << "__cplusplus: Expected " << TO_STRING(__cplusplus)
+ << " but got: " << TO_STRING(CHECK___cplusplus) << "\n";
+ ret = 1;
+# endif
+#elif defined(CHECK___cplusplus)
+ std::cout << "__cplusplus: Expected undefined but got: "
+ << TO_STRING(CHECK___cplusplus) << "\n";
+ ret = 1;
+#endif
+
+#if defined(_MSVC_LANG)
+# if !defined(CHECK__MSVC_LANG)
+ std::cout << "_MSVC_LANG: Expected " << TO_STRING(_MSVC_LANG)
+ << " but it is not defined.\n";
+ ret = 1;
+# elif _MSVC_LANG != CHECK__MSVC_LANG
+ std::cout << "_MSVC_LANG: Expected " << TO_STRING(_MSVC_LANG)
+ << " but got: " << TO_STRING(CHECK__MSVC_LANG) << "\n";
+ ret = 1;
+# endif
+#elif defined(CHECK__MSVC_LANG)
+ std::cout << "_MSVC_LANG: Expected undefined but got: "
+ << TO_STRING(CHECK__MSVC_LANG) << "\n";
+ ret = 1;
+#endif
+
+ return ret;
+}
diff --git a/Tests/RunCMake/Autogen/MocPredefs-prefix.cmake b/Tests/RunCMake/Autogen/MocPredefs-prefix.cmake
new file mode 100644
index 0000000000..460a05d436
--- /dev/null
+++ b/Tests/RunCMake/Autogen/MocPredefs-prefix.cmake
@@ -0,0 +1,3 @@
+file(READ ${in} predefs)
+string(REGEX REPLACE "#define +" "#define CHECK_" predefs "${predefs}")
+file(WRITE ${out} "${predefs}")
diff --git a/Tests/RunCMake/Autogen/MocPredefs.cmake b/Tests/RunCMake/Autogen/MocPredefs.cmake
new file mode 100644
index 0000000000..8307e04cce
--- /dev/null
+++ b/Tests/RunCMake/Autogen/MocPredefs.cmake
@@ -0,0 +1,39 @@
+enable_language(CXX)
+
+find_package(Qt${with_qt_version} REQUIRED COMPONENTS Core)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
+add_library(MocPredefs MocPredefs.cxx)
+
+if(NOT DEFINED CMAKE_CXX_COMPILER_PREDEFINES_COMMAND)
+ return()
+endif()
+
+if(CMAKE_CXX_COMPILER_ID STREQUAL "LCC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "1.26")
+ return()
+endif()
+
+get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if(_isMultiConfig)
+ set(moc_predefs_h "moc_predefs_$<CONFIG>.h")
+ set(check_dir "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
+else()
+ set(moc_predefs_h "moc_predefs.h")
+ set(check_dir "${CMAKE_CURRENT_BINARY_DIR}")
+endif()
+
+add_custom_command(TARGET MocPredefs POST_BUILD VERBATIM COMMAND
+ ${CMAKE_COMMAND}
+ -Din=${CMAKE_CURRENT_BINARY_DIR}/MocPredefs_autogen/${moc_predefs_h}
+ -Dout=${check_dir}/check_predefs.h
+ -P${CMAKE_CURRENT_SOURCE_DIR}/MocPredefs-prefix.cmake
+ )
+
+add_executable(MocPredefs-check MocPredefs-check.cxx)
+target_include_directories(MocPredefs-check PRIVATE ${check_dir})
+add_dependencies(MocPredefs-check MocPredefs)
+
+add_custom_target(MocPredefs-run-check ALL VERBATIM COMMAND MocPredefs-check)
diff --git a/Tests/RunCMake/Autogen/MocPredefs.cxx b/Tests/RunCMake/Autogen/MocPredefs.cxx
new file mode 100644
index 0000000000..b27cec5f60
--- /dev/null
+++ b/Tests/RunCMake/Autogen/MocPredefs.cxx
@@ -0,0 +1,3 @@
+void MocPredefs()
+{
+}
diff --git a/Tests/RunCMake/Autogen/RunCMakeTest.cmake b/Tests/RunCMake/Autogen/RunCMakeTest.cmake
index e4c5811466..45051326cb 100644
--- a/Tests/RunCMake/Autogen/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Autogen/RunCMakeTest.cmake
@@ -15,4 +15,77 @@ if (DEFINED with_qt_version)
run_cmake(CMP0111-imported-target-full)
run_cmake(CMP0111-imported-target-libname)
run_cmake(CMP0111-imported-target-implib-only)
+
+ block()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/MocPredefs-build)
+ run_cmake(MocPredefs)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(MocPredefs-build ${CMAKE_COMMAND} --build . --config Debug)
+ endblock()
+
+ # Detect information from the toolchain:
+ # - CMAKE_INCLUDE_FLAG_CXX
+ # - CMAKE_INCLUDE_SYSTEM_FLAG_CXX
+ run_cmake(Inspect)
+ include("${RunCMake_BINARY_DIR}/Inspect-build/info.cmake")
+
+ if(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ string(REGEX REPLACE "^-" "/" test_expect_stdout "${CMAKE_INCLUDE_SYSTEM_FLAG_CXX}")
+ else()
+ set(test_expect_stdout "-*${CMAKE_INCLUDE_SYSTEM_FLAG_CXX}")
+ endif()
+ string(APPEND test_expect_stdout " *(\"[^\"]*|([^ ]|\\ )*)[\\/]dummy_autogen[\\/]include")
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ string(APPEND test_expect_stdout "_Debug")
+ endif()
+
+ block()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0151-new-build)
+ run_cmake_with_options(CMP0151-new ${RunCMake_TEST_OPTIONS} -DCMAKE_POLICY_DEFAULT_CMP0151=NEW)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_EXPECT_stdout "${test_expect_stdout}")
+ message(STATUS "RunCMake_TEST_EXPECT_stdout: ${RunCMake_TEST_EXPECT_stdout}")
+ run_cmake_command(CMP0151-new-build ${CMAKE_COMMAND} --build . --config Debug --verbose)
+ endblock()
+
+ block()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AutogenUseSystemIncludeOn-build)
+ run_cmake_with_options(AutogenUseSystemIncludeOn ${RunCMake_TEST_OPTIONS} -DCMAKE_POLICY_DEFAULT_CMP0151=NEW)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_EXPECT_stdout "${test_expect_stdout}")
+ message(STATUS "RunCMake_TEST_EXPECT_stdout: ${RunCMake_TEST_EXPECT_stdout}")
+ run_cmake_command(AutogenUseSystemIncludeOn ${CMAKE_COMMAND} --build . --config Debug --verbose)
+ endblock()
+ endif()
+
+ if(CMAKE_INCLUDE_FLAG_CXX)
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ string(REGEX REPLACE "^-" "/" test_expect_stdout "${CMAKE_INCLUDE_FLAG_CXX}")
+ else()
+ set(test_expect_stdout "-*${CMAKE_INCLUDE_FLAG_CXX}")
+ endif()
+ string(APPEND test_expect_stdout " *(\"[^\"]*|([^ ]|\\ )*)[\\/]dummy_autogen[\\/]include")
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ string(APPEND test_expect_stdout "_Debug")
+ endif()
+
+ block()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0151-old-build)
+ run_cmake_with_options(CMP0151-old ${RunCMake_TEST_OPTIONS} -DCMAKE_POLICY_DEFAULT_CMP0151=OLD)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_EXPECT_stdout "${test_expect_stdout}")
+ message(STATUS "RunCMake_TEST_EXPECT_stdout: ${RunCMake_TEST_EXPECT_stdout}")
+ run_cmake_command(CMP0151-old-build ${CMAKE_COMMAND} --build . --config Debug --verbose)
+ endblock()
+
+ block()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AutogenUseSystemIncludeOff-build)
+ run_cmake_with_options(AutogenUseSystemIncludeOff ${RunCMake_TEST_OPTIONS} -DCMAKE_POLICY_DEFAULT_CMP0151=NEW)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_EXPECT_stdout "${test_expect_stdout}")
+ message(STATUS "RunCMake_TEST_EXPECT_stdout: ${RunCMake_TEST_EXPECT_stdout}")
+ run_cmake_command(AutogenUseSystemIncludeOff ${CMAKE_COMMAND} --build . --config Debug --verbose)
+ endblock()
+ endif()
endif ()
diff --git a/Tests/RunCMake/BuildDepends/CMakeLists.txt b/Tests/RunCMake/BuildDepends/CMakeLists.txt
index 99f238b9ed..8eb57486ad 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/BuildDepends/LinkDepends.cmake b/Tests/RunCMake/BuildDepends/LinkDepends.cmake
new file mode 100644
index 0000000000..a414e03597
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/LinkDepends.cmake
@@ -0,0 +1,22 @@
+
+enable_language(C)
+
+include("${CMAKE_BINARY_DIR}/../LinkDependsExternalLibrary-build/ExternalLibrary-debug.cmake")
+cmake_path(GET EXTERNAL_LIBRARY PARENT_PATH EXTERNAL_DIR)
+
+add_library(LinkDependsLib SHARED "${CMAKE_CURRENT_BINARY_DIR}/lib_depends.c")
+target_link_directories(LinkDependsLib PRIVATE "${EXTERNAL_DIR}")
+target_link_libraries(LinkDependsLib PRIVATE External)
+
+add_executable(LinkDependsExe "${CMAKE_CURRENT_BINARY_DIR}/exe_depends.c")
+target_link_directories(LinkDependsExe PRIVATE "${EXTERNAL_DIR}")
+target_link_libraries(LinkDependsExe PRIVATE External)
+
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake"
+ CONTENT "
+set(check_pairs
+ \"$<TARGET_FILE:LinkDependsLib>|${EXTERNAL_LIBRARY}\"
+ \"$<TARGET_FILE:LinkDependsExe>|${EXTERNAL_LIBRARY}\"
+ )
+")
diff --git a/Tests/RunCMake/BuildDepends/LinkDepends.step1.cmake b/Tests/RunCMake/BuildDepends/LinkDepends.step1.cmake
new file mode 100644
index 0000000000..5ce55b0177
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/LinkDepends.step1.cmake
@@ -0,0 +1,23 @@
+
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/lib_depends.c" [[
+
+extern void external(void);
+
+void lib_depends(void)
+{
+ external();
+}
+]])
+
+
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/exe_depends.c" [[
+
+extern void external(void);
+
+int main(void)
+{
+ external();
+
+ return 0;
+}
+]])
diff --git a/Tests/RunCMake/BuildDepends/LinkDepends.step2.cmake b/Tests/RunCMake/BuildDepends/LinkDepends.step2.cmake
new file mode 100644
index 0000000000..f2c0067747
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/LinkDepends.step2.cmake
@@ -0,0 +1,4 @@
+
+include ("${RunCMake_TEST_BINARY_DIR}/../LinkDependsExternalLibrary-build/ExternalLibrary-debug.cmake")
+
+file(TOUCH "${EXTERNAL_LIBRARY}")
diff --git a/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake b/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake
new file mode 100644
index 0000000000..a21096b2ae
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake
@@ -0,0 +1,11 @@
+
+enable_language(C)
+
+file(WRITE "${CMAKE_BINARY_DIR}/LinkDependsUseLinker.cmake"
+ "set(CMAKE_C_LINK_DEPENDS_USE_LINKER \"${CMAKE_C_LINK_DEPENDS_USE_LINKER}\")\n")
+
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake"
+ CONTENT "
+# no required actions
+")
diff --git a/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake b/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake
new file mode 100644
index 0000000000..fe6575c9b8
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake
@@ -0,0 +1,13 @@
+
+enable_language(C)
+
+add_library(External SHARED "${CMAKE_CURRENT_BINARY_DIR}/external.c")
+
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/ExternalLibrary-$<LOWER_CASE:$<CONFIG>>.cmake"
+ CONTENT "set(EXTERNAL_LIBRARY \"$<TARGET_LINKER_FILE:External>\")\n")
+
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake"
+ CONTENT "
+# no required actions
+")
diff --git a/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.step1.cmake b/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.step1.cmake
new file mode 100644
index 0000000000..df302f7614
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.step1.cmake
@@ -0,0 +1,11 @@
+
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/external.c" [[
+
+
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+ void external(void)
+{
+}
+]])
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 809907931d..b52758045e 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -194,3 +194,15 @@ if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 " OR
endif()
run_BuildDepends(CustomCommandUnityBuild)
unset(run_BuildDepends_skip_step_2)
+
+#if (RunCMake_GENERATOR MATCHES "Make|Ninja" AND CMAKE_C_LINK_DEPENDS_USE_LINKER)
+if (RunCMake_GENERATOR MATCHES "Make|Ninja")
+ set(run_BuildDepends_skip_step_2 1)
+ run_BuildDepends(LinkDependsCheck)
+ include("${RunCMake_BINARY_DIR}/LinkDependsCheck-build/LinkDependsUseLinker.cmake")
+ if (CMAKE_C_LINK_DEPENDS_USE_LINKER)
+ run_BuildDepends(LinkDependsExternalLibrary)
+ unset(run_BuildDepends_skip_step_2)
+ run_BuildDepends(LinkDepends)
+ endif()
+endif()
diff --git a/Tests/RunCMake/BundleUtilities/CMakeLists.txt b/Tests/RunCMake/BundleUtilities/CMakeLists.txt
index 6dd8cdf551..44025d3bd1 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 df28102f2a..a7b05d293e 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 85d9582959..961deb95dc 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 f42d8e49dc..3d861fbfe1 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 3fa58b6b6a..32c147424e 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 297047662c..b7cd7ff0b5 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 12cd3c7757..93ee9dfd5f 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 66a58fb827..0000000000
--- 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 a446211dbe..dc0341453a 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 f7b9c0e889..6eee437b2e 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 119fc2b300..fcd080ff4a 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 66a58fb827..0000000000
--- 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 66a58fb827..0000000000
--- 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 66a58fb827..0000000000
--- 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 66a58fb827..0000000000
--- 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 66a58fb827..0000000000
--- 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 87404d3a97..c84a289c15 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 5d757200bc..39a9511844 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 66a58fb827..0000000000
--- 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 4c1099607a..ea956fc70d 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 0000000000..259eabdbaf
--- /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 047da283b9..6476176d51 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 5952279eb4..558fba3bf2 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 fc3500addd..3e7b5f3b56 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 58e8ea91eb..ce7541aaf4 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 13160e3a40..e5e6c3759d 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 f47bb2ee31..93378c20aa 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 3b226d74cb..6b2314542e 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 7f9572e5af..b940528a5a 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 7c0e8a2151..009d455cae 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 0a39c76596..86b749aacc 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 a8aa9d9650..e71f31e87b 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 b7de28491d..526a9aacbf 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 621192d9f6..955d8987ce 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 6521ac074d..de58c25723 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 2f2fb765da..fc031de9fb 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 efcfcab674..33a5b4b3b7 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 719e054a57..76eaca6e7f 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 e2c280ee73..7230a07412 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 291d34d43d..db6b701c04 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 445156fa1a..b7eae5a46b 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 26e0a91a74..4c68510eee 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 e86b50eb16..1ca4605a7e 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 ef2163c298..44025d3bd1 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 ef2163c298..2632ffa91f 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 eafa642358..0a96a26fdd 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 0000000000..bf7fb08492
--- /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/CMP0115/CMP0115-OLD-stderr.txt b/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt
index 8b9031111d..67d00f75dd 100644
--- a/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt
+++ b/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt
@@ -3,11 +3,9 @@
noexist
- Tried extensions [^
-]*
- [^
-]*
-Call Stack \(most recent call first\):
+ Tried extensions ([^
+]+
+)+Call Stack \(most recent call first\):
CMP0115-OLD\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt b/Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt
index 7b100b6e4c..e79ca97be2 100644
--- a/Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt
@@ -17,11 +17,9 @@ CMake Error at CMP0115\.cmake:[0-9]+ \(add_executable\):
noexist
- Tried extensions [^
-]*
- [^
-]*
-Call Stack \(most recent call first\):
+ Tried extensions ([^
+]+
+)+Call Stack \(most recent call first\):
CMP0115-WARN\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1-stderr.txt
index ec777f7634..acd145e113 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1-stderr.txt
@@ -1,5 +1,5 @@
^prop: `0`
-CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test1-build/GeneratedMain\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt
index f7d9f6bff1..929dafd6ea 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt
index a876390394..6a096b802b 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test4-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test4-stderr.txt
index b750ae7e5b..e721876456 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test4-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test4-stderr.txt
@@ -124,7 +124,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4-build/Generated_with_relative_path1\.txt)
@@ -132,7 +132,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4-build/Generated_with_relative_path1\.txt)
@@ -140,7 +140,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4-build/Generated_with_relative_path1\.txt)
@@ -148,7 +148,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4-build/Generated_with_relative_path1\.txt)
@@ -156,7 +156,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4-build/Generated_with_relative_path1\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test4b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test4b-stderr.txt
index 580f04f9c1..f358297970 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test4b-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test4b-stderr.txt
@@ -124,7 +124,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4b-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4b-build/Generated_with_relative_path1\.txt)
@@ -132,7 +132,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4b-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4b-build/Generated_with_relative_path1\.txt)
@@ -140,7 +140,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4b-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4b-build/Generated_with_relative_path1\.txt)
@@ -148,7 +148,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4b-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4b-build/Generated_with_relative_path1\.txt)
@@ -156,7 +156,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test4b-build/Generated_with_full_path1\.txt|CMP0118-NEW-Test4b-build/Generated_with_relative_path1\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt
index e268a7ac36..0e27c1d336 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt
@@ -115,7 +115,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -123,7 +123,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -131,7 +131,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -139,7 +139,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -147,7 +147,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -155,7 +155,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -163,7 +163,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test7-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test7-stderr.txt
index 08eb6826a2..4de6e76e14 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test7-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test7-stderr.txt
@@ -47,7 +47,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test7-build/Generated_source[4-6]\.txt
@@ -55,7 +55,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test7-build/Generated_source[4-6]\.txt
@@ -63,7 +63,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test7-build/Generated_source[4-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9-stderr.txt
index b7c496c5b7..b7a170beb9 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9-stderr.txt
@@ -47,7 +47,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9-build/Generated_source[4-6]\.txt
@@ -55,7 +55,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test9\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9-build/Generated_source[4-6]\.txt
@@ -63,7 +63,7 @@ Call Stack \(most recent call first\):
CMP0118-NEW-Test9\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9-build/Generated_source[4-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt
index 58144c8d8c..2af72a433c 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt
@@ -1,5 +1,5 @@
^prop: `0`
-CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-build/GeneratedMain\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt
index 1f1bc904ab..6109f65898 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt
@@ -40,7 +40,7 @@ Generated_source6\.txt: # 2a # GENERATED = `1`
Generated_source6\.txt: # 2b # GENERATED = `1`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test10\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test10\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-build/Generated_source4\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt
index 5c15f1203e..e5e97def75 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt
@@ -40,7 +40,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-build/Generated_source[4-6]\.txt
@@ -48,7 +48,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test11\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-build/Generated_source[4-6]\.txt
@@ -56,7 +56,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test11\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-build/Generated_source[4-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt
index 12a913a9eb..f5b3d1a624 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt
@@ -40,7 +40,7 @@ Generated_source6\.txt: # 2a # GENERATED = `1`
Generated_source6\.txt: # 2b # GENERATED = `1`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test14\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test14\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-build/Generated_source4\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt
index 62db7ee4a8..a30bc84209 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt
@@ -40,7 +40,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-build/Generated_source[4-6]\.txt
@@ -48,7 +48,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test15\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-build/Generated_source[4-6]\.txt
@@ -56,7 +56,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test15\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-build/Generated_source[4-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt
index 7f86d38b31..4f4fea3e06 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt
index 4104fc0037..3c80531f17 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt
index 7a16d0b64c..9600feeb91 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.txt)
@@ -84,7 +84,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt
index 5a5c4eceae..e6386605a1 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.txt)
@@ -84,7 +84,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt
index 12fa617ab4..18e6a8c715 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -84,7 +84,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -92,7 +92,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -100,7 +100,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt
index 7199f0441a..a60545f435 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt
@@ -34,7 +34,7 @@ Generated_source6\.txt: # 2a # GENERATED = `1`
Generated_source6\.txt: # 2b # GENERATED = `1`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test6\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test6\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-build/Generated_source4\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt
index 233fd8bdf6..fd496cbd22 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt
@@ -34,7 +34,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.txt
@@ -42,7 +42,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.txt
@@ -50,7 +50,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.txt
@@ -58,7 +58,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.txt
@@ -66,7 +66,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt
index 4aed2edd1c..3505242f9c 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt
@@ -34,7 +34,7 @@ Generated_source6\.txt: # 2a # GENERATED = `1`
Generated_source6\.txt: # 2b # GENERATED = `1`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test8\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test8\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-build/Generated_source4\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt
index cea8c224d2..63a9341a05 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt
@@ -34,7 +34,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-build/Generated_source[4-6]\.txt
@@ -42,7 +42,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test9\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-build/Generated_source[4-6]\.txt
@@ -50,7 +50,7 @@ Call Stack \(most recent call first\):
CMP0118-OLD-Test9\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-build/Generated_source[4-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1-stderr.txt
index e2a2cf5470..1d7cbde5ce 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1-stderr.txt
@@ -1,5 +1,5 @@
^prop: `0`
-CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test1-build/GeneratedMain\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test10-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test10-stderr.txt
index bce7681313..f4c7d00d5d 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test10-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test10-stderr.txt
@@ -40,7 +40,7 @@ Generated_source6\.txt: # 2a # GENERATED = `1`
Generated_source6\.txt: # 2b # GENERATED = `1`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test10\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test10\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test10-build/Generated_source4\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt
index 00c47e9e67..93d8b83d12 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt
@@ -63,7 +63,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-build/Generated_source[4-6]\.txt
@@ -71,7 +71,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test11\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-build/Generated_source[4-6]\.txt
@@ -79,7 +79,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test11\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-build/Generated_source[4-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test14-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test14-stderr.txt
index 5b7994c5f9..fdde792058 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test14-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test14-stderr.txt
@@ -40,7 +40,7 @@ Generated_source6\.txt: # 2a # GENERATED = `1`
Generated_source6\.txt: # 2b # GENERATED = `1`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test14\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test14\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test14-build/Generated_source4\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt
index c975c235e9..9e6a4a5656 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt
@@ -63,7 +63,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-build/Generated_source[4-6]\.txt
@@ -71,7 +71,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test15\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-build/Generated_source[4-6]\.txt
@@ -79,7 +79,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test15\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-build/Generated_source[4-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt
index 142d8a0765..58ba79328f 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt
index d4ef667fc6..cdb7cb4a78 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt
@@ -52,7 +52,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt)
@@ -60,7 +60,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt)
@@ -76,7 +76,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt
index ceeb570edd..4cd401c4ba 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt
@@ -169,7 +169,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4-build/Generated_with_relative_path1\.txt)
@@ -177,7 +177,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4-build/Generated_with_relative_path1\.txt)
@@ -185,7 +185,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4-build/Generated_with_relative_path1\.txt)
@@ -193,7 +193,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4-build/Generated_with_relative_path1\.txt)
@@ -201,7 +201,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test4\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4-build/Generated_with_relative_path1\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt
index f8484d0b52..6acd3df827 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt
@@ -169,7 +169,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4b-build/Generated_with_relative_path1\.txt)
@@ -177,7 +177,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4b-build/Generated_with_relative_path1\.txt)
@@ -185,7 +185,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4b-build/Generated_with_relative_path1\.txt)
@@ -193,7 +193,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4b-build/Generated_with_relative_path1\.txt)
@@ -201,7 +201,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test4b\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN-Test4b-build/Generated_with_relative_path1\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt
index 0556391efb..2805cbfe23 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt
@@ -154,7 +154,7 @@ Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0`
Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -162,7 +162,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -170,7 +170,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -178,7 +178,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -186,7 +186,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -194,7 +194,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt)
@@ -202,7 +202,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt)
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test6-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test6-stderr.txt
index 7d588a2d6a..6f29170bf6 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test6-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test6-stderr.txt
@@ -34,7 +34,7 @@ Generated_source6\.txt: # 2a # GENERATED = `1`
Generated_source6\.txt: # 2b # GENERATED = `1`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test6\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test6\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test6-build/Generated_source4\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt
index 8421061ce4..cde1164a94 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt
@@ -57,7 +57,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-build/Generated_source[2-6]\.txt
@@ -65,7 +65,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-build/Generated_source[2-6]\.txt
@@ -73,7 +73,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-build/Generated_source[2-6]\.txt
@@ -81,7 +81,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-build/Generated_source[2-6]\.txt
@@ -89,7 +89,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test7\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-build/Generated_source[2-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8-stderr.txt
index e0f17e675a..91c4c4c5a1 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8-stderr.txt
@@ -34,7 +34,7 @@ Generated_source6\.txt: # 2a # GENERATED = `1`
Generated_source6\.txt: # 2b # GENERATED = `1`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test8\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test8\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test8-build/Generated_source4\.txt
diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt
index 80f3edf365..547e8207ad 100644
--- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt
+++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt
@@ -57,7 +57,7 @@ Generated_source6\.txt: # 2a # GENERATED = `0`
Generated_source6\.txt: # 2b # GENERATED = `0`
Generated_source6\.txt: # 3a # GENERATED = `0`
Generated_source6\.txt: # 3b # GENERATED = `0`
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-build/Generated_source[4-6]\.txt
@@ -65,7 +65,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test9\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-build/Generated_source[4-6]\.txt
@@ -73,7 +73,7 @@ Call Stack \(most recent call first\):
CMP0118-WARN-Test9\.cmake:[0-9]+ \(include\)
CMakeLists\.txt:[0-9]+ \(include\)
+
-CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_custom_target\):
+CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-build/Generated_source[4-6]\.txt
diff --git a/Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt b/Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt
index d3aa546301..5e9cf6cd79 100644
--- a/Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt
+++ b/Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt
@@ -1,8 +1,5 @@
-^CMake Error at GenInSubdir-Common.cmake:[0-9]+ \(add_custom_target\):
+^CMake Error at GenInSubdir/CMakeLists\.txt:[0-9]+ \(target_sources\):
Cannot find source file:
[^
]*/Tests/RunCMake/CMP0118/GenInSubdir-OLD-build/GenInSubdir/sub.txt
-Call Stack \(most recent call first\):
- GenInSubdir-OLD.cmake:[0-9]+ \(include\)
- CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CMP0118/GenInSubdir-WARN-stderr.txt b/Tests/RunCMake/CMP0118/GenInSubdir-WARN-stderr.txt
index 5eb8a34b60..2820ba3add 100644
--- a/Tests/RunCMake/CMP0118/GenInSubdir-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0118/GenInSubdir-WARN-stderr.txt
@@ -1,8 +1,5 @@
-^CMake Error at GenInSubdir-Common.cmake:[0-9]+ \(add_custom_target\):
+^CMake Error at GenInSubdir/CMakeLists\.txt:[0-9]+ \(target_sources\):
Cannot find source file:
[^
]*/Tests/RunCMake/CMP0118/GenInSubdir-WARN-build/GenInSubdir/sub.txt
-Call Stack \(most recent call first\):
- GenInSubdir-WARN.cmake:[0-9]+ \(include\)
- CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt
index 5a035596e3..ac01c80b32 100644
--- a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt
@@ -1,5 +1,5 @@
CMake Error at CMP0121-ERANGE-Common.cmake:3 \(list\):
- list index: (-2147483643|2147483647) out of range \(-5, 4\)
+ list index: (-2147483648|2147483647) out of range \(-5, 4\)
Call Stack \(most recent call first\):
CMP0121-ERANGE-OLD.cmake:2 \(include\)
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt
index 1e7b127571..c644dd3618 100644
--- a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt
@@ -7,9 +7,9 @@ Call Stack \(most recent call first\):
CMP0121-ERANGE-WARN.cmake:2 \(include\)
CMakeLists.txt:3 \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.
-
+.*
CMake Error at CMP0121-ERANGE-Common.cmake:3 \(list\):
- list index: (-2147483643|2147483647) out of range \(-5, 4\)
+ list index: (-2147483648|2147483647) out of range \(-5, 4\)
Call Stack \(most recent call first\):
CMP0121-ERANGE-WARN.cmake:2 \(include\)
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0139/CMakeLists.txt b/Tests/RunCMake/CMP0139/CMakeLists.txt
index 18dfd2686f..5ff8d3e0ff 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/CMP0150/CMP0150-NEW-build-stdout.txt b/Tests/RunCMake/CMP0150/CMP0150-NEW-build-stdout.txt
new file mode 100644
index 0000000000..9e71b731c7
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-NEW-build-stdout.txt
@@ -0,0 +1,7 @@
+.*-- Configured bottom project
+.*ExternalProject for ep-Y
+.*-- Configured bottom project
+[^\n]*-- Completed configuring project middle
+.*-- Configured bottom project
+.*ExternalProject for ep-X
+.*Non-ep top project
diff --git a/Tests/RunCMake/CMP0150/CMP0150-NEW-resolve.cmake b/Tests/RunCMake/CMP0150/CMP0150-NEW-resolve.cmake
new file mode 100644
index 0000000000..f43f3d5f7b
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-NEW-resolve.cmake
@@ -0,0 +1,107 @@
+include(ExternalProject/shared_internal_commands)
+
+function(test_resolve parentUrl relativeUrl expectedResult)
+ _ep_resolve_relative_git_remote(result "${parentUrl}" "${relativeUrl}")
+ if(NOT result STREQUAL expectedResult)
+ message(SEND_ERROR "URL resolved to unexpected result:\n"
+ " Expected: ${expectedResult}\n"
+ " Actual : ${result}"
+ )
+ endif()
+endfunction()
+
+test_resolve(
+ "https://example.com/group/parent"
+ "../other"
+ "https://example.com/group/other"
+)
+test_resolve(
+ "https://example.com/group/parent"
+ "../../alt/other"
+ "https://example.com/alt/other"
+)
+
+test_resolve(
+ "git@example.com:group/parent"
+ "../other"
+ "git@example.com:group/other"
+)
+test_resolve(
+ "git@example.com:group/parent"
+ "../../alt/other"
+ "git@example.com:alt/other"
+)
+test_resolve(
+ "git@example.com:/group/parent"
+ "../other"
+ "git@example.com:/group/other"
+)
+test_resolve(
+ "git@example.com:/group/parent"
+ "../../alt/other"
+ "git@example.com:/alt/other"
+)
+test_resolve(
+ "git+ssh://git@example.com:group/parent"
+ "../other"
+ "git+ssh://git@example.com:group/other"
+)
+test_resolve(
+ "ssh://git@example.com:1234/group/parent"
+ "../../alt/other"
+ "ssh://git@example.com:1234/alt/other"
+)
+
+test_resolve(
+ "file:///group/parent"
+ "../other"
+ "file:///group/other"
+)
+test_resolve(
+ "file:///group/parent"
+ "../../alt/other"
+ "file:///alt/other"
+)
+test_resolve(
+ "file:///~/group/parent"
+ "../../other"
+ "file:///~/other"
+)
+test_resolve(
+ "/group/parent"
+ "../other"
+ "/group/other"
+)
+test_resolve(
+ "/group/parent"
+ "../../alt/other"
+ "/alt/other"
+)
+test_resolve(
+ "C:/group/parent"
+ "../other"
+ "C:/group/other"
+)
+test_resolve(
+ "C:/group/parent"
+ "../../alt/other"
+ "C:/alt/other"
+)
+
+test_resolve(
+ "x-Test+v1.0://example.com/group/parent"
+ "../other"
+ "x-Test+v1.0://example.com/group/other"
+)
+
+# IPv6 literals
+test_resolve(
+ "http://[::1]/group/parent"
+ "../../alt/other"
+ "http://[::1]/alt/other"
+)
+test_resolve(
+ "git@[::1]:group/parent"
+ "../../alt/other"
+ "git@[::1]:alt/other"
+)
diff --git a/Tests/RunCMake/CMP0150/CMP0150-NEW-stdout.txt b/Tests/RunCMake/CMP0150/CMP0150-NEW-stdout.txt
new file mode 100644
index 0000000000..0f25fabf40
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-NEW-stdout.txt
@@ -0,0 +1,4 @@
+-- Configured bottom project
+-- Completed configuring project middle
+-- Completed configuring project top
+-- Configuring done
diff --git a/Tests/RunCMake/CMP0150/CMP0150-NEW.cmake b/Tests/RunCMake/CMP0150/CMP0150-NEW.cmake
new file mode 100644
index 0000000000..c1c5607af7
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-NEW.cmake
@@ -0,0 +1,45 @@
+set(policyCommand "cmake_policy(SET CMP0150 NEW)")
+
+# Need to keep paths and file names short to avoid hitting limits on Windows.
+# Directory names "a" through to "g" are used here according to the following:
+# a = Top project
+# b/c = Middle project
+# d = Bottom project
+# e/f = Cloned Top project
+# g = Build directory for cloned Top project
+#
+# Dependency names map as follows:
+# X = middle dependency
+# Y = bottom dependency
+
+set(projName top)
+set(depName X)
+set(epRelativeGitRepo ../b/c)
+set(fcRelativeGitRepo ../b/c)
+configure_file(CMakeLists.txt.in a/CMakeLists.txt @ONLY)
+initGitRepo("${CMAKE_CURRENT_BINARY_DIR}/a")
+
+set(projName middle)
+set(depName Y)
+set(epRelativeGitRepo ../../d)
+set(fcRelativeGitRepo ../../d)
+configure_file(CMakeLists.txt.in b/c/CMakeLists.txt @ONLY)
+initGitRepo("${CMAKE_CURRENT_BINARY_DIR}/b/c")
+
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/d")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/d/CMakeLists.txt" [[
+cmake_minimum_required(VERSION 3.26)
+project(bottom LANGUAGES NONE)
+message(STATUS "Configured bottom project")
+]])
+initGitRepo("${CMAKE_CURRENT_BINARY_DIR}/d")
+
+set(clonedTopDir "${CMAKE_CURRENT_BINARY_DIR}/e/f")
+file(MAKE_DIRECTORY "${clonedTopDir}")
+execGitCommand(${CMAKE_CURRENT_BINARY_DIR} clone --quiet "file://${CMAKE_CURRENT_BINARY_DIR}/a" "${clonedTopDir}")
+add_subdirectory("${clonedTopDir}" "${CMAKE_CURRENT_BINARY_DIR}/g")
+
+# Ensure build order is predictable
+add_custom_target(non-ep-top ALL COMMAND ${CMAKE_COMMAND} -E echo "Non-ep top project")
+add_dependencies(non-ep-top ep-X)
+add_dependencies(ep-X ep-Y)
diff --git a/Tests/RunCMake/CMP0150/CMP0150-OLD-build-stdout.txt b/Tests/RunCMake/CMP0150/CMP0150-OLD-build-stdout.txt
new file mode 100644
index 0000000000..0150af769b
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-OLD-build-stdout.txt
@@ -0,0 +1,3 @@
+.*-- Configured bottom project
+.*ExternalProject for ep-bottom
+.*Non-ep top project
diff --git a/Tests/RunCMake/CMP0150/CMP0150-OLD-common.cmake b/Tests/RunCMake/CMP0150/CMP0150-OLD-common.cmake
new file mode 100644
index 0000000000..69748f7325
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-OLD-common.cmake
@@ -0,0 +1,21 @@
+# There's no point testing more than one level for OLD, since the behavior only
+# depends on the current build, not anything about the parent git repo, etc.
+set(projName top)
+set(depName bottom)
+set(epRelativeGitRepo ../../../Bottom)
+set(fcRelativeGitRepo ../Bottom)
+configure_file(CMakeLists.txt.in Top/CMakeLists.txt @ONLY)
+
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Bottom")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/Bottom/CMakeLists.txt" [[
+cmake_minimum_required(VERSION 3.26)
+project(bottom LANGUAGES NONE)
+message(STATUS "Configured bottom project")
+]])
+initGitRepo("${CMAKE_CURRENT_BINARY_DIR}/Bottom")
+
+add_subdirectory("${CMAKE_CURRENT_BINARY_DIR}/Top" "${CMAKE_CURRENT_BINARY_DIR}/Top-build")
+
+# Ensure build order is predictable
+add_custom_target(non-ep-top ALL COMMAND ${CMAKE_COMMAND} -E echo "Non-ep top project")
+add_dependencies(non-ep-top ep-bottom)
diff --git a/Tests/RunCMake/CMP0150/CMP0150-OLD-stdout.txt b/Tests/RunCMake/CMP0150/CMP0150-OLD-stdout.txt
new file mode 100644
index 0000000000..680f9c1d3d
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-OLD-stdout.txt
@@ -0,0 +1,3 @@
+-- Configured bottom project
+-- Completed configuring project top
+-- Configuring done
diff --git a/Tests/RunCMake/CMP0150/CMP0150-OLD.cmake b/Tests/RunCMake/CMP0150/CMP0150-OLD.cmake
new file mode 100644
index 0000000000..6b58e70c83
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-OLD.cmake
@@ -0,0 +1,2 @@
+set(policyCommand "cmake_policy(SET CMP0150 OLD)")
+include(CMP0150-OLD-common.cmake)
diff --git a/Tests/RunCMake/CMP0150/CMP0150-WARN-build-stdout.txt b/Tests/RunCMake/CMP0150/CMP0150-WARN-build-stdout.txt
new file mode 100644
index 0000000000..0150af769b
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-WARN-build-stdout.txt
@@ -0,0 +1,3 @@
+.*-- Configured bottom project
+.*ExternalProject for ep-bottom
+.*Non-ep top project
diff --git a/Tests/RunCMake/CMP0150/CMP0150-WARN-stderr.txt b/Tests/RunCMake/CMP0150/CMP0150-WARN-stderr.txt
new file mode 100644
index 0000000000..74c932aaa2
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-WARN-stderr.txt
@@ -0,0 +1,25 @@
+CMake Warning \(dev\) at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\):
+ Policy CMP0150 is not set: ExternalProject_Add and FetchContent_Declare
+ commands treat relative GIT_REPOSITORY paths as being relative to the
+ parent project's remote\. Run "cmake --help-policy CMP0150" for policy
+ details\. Use the cmake_policy command to set the policy and suppress this
+ warning\.
+
+ A relative GIT_REPOSITORY path was detected\. This will be interpreted as a
+ local path to where the project is being cloned\. Set GIT_REPOSITORY to an
+ absolute path or set policy CMP0150 to NEW to avoid this warning\.
+Call Stack \(most recent call first\):
+ .*/Modules/ExternalProject\.cmake:[0-9]+ \(_ep_resolve_git_remote\)
+.*
+CMake Warning \(dev\) at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\):
+ Policy CMP0150 is not set: ExternalProject_Add and FetchContent_Declare
+ commands treat relative GIT_REPOSITORY paths as being relative to the
+ parent project's remote\. Run "cmake --help-policy CMP0150" for policy
+ details\. Use the cmake_policy command to set the policy and suppress this
+ warning\.
+
+ A relative GIT_REPOSITORY path was detected\. This will be interpreted as a
+ local path to where the project is being cloned\. Set GIT_REPOSITORY to an
+ absolute path or set policy CMP0150 to NEW to avoid this warning\.
+Call Stack \(most recent call first\):
+ .*/Modules/FetchContent\.cmake:[0-9]+ \(_ep_resolve_git_remote\)
diff --git a/Tests/RunCMake/CMP0150/CMP0150-WARN-stdout.txt b/Tests/RunCMake/CMP0150/CMP0150-WARN-stdout.txt
new file mode 100644
index 0000000000..680f9c1d3d
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-WARN-stdout.txt
@@ -0,0 +1,3 @@
+-- Configured bottom project
+-- Completed configuring project top
+-- Configuring done
diff --git a/Tests/RunCMake/CMP0150/CMP0150-WARN.cmake b/Tests/RunCMake/CMP0150/CMP0150-WARN.cmake
new file mode 100644
index 0000000000..20fd45d4e6
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMP0150-WARN.cmake
@@ -0,0 +1,2 @@
+set(policyCommand "")
+include(CMP0150-OLD-common.cmake)
diff --git a/Tests/RunCMake/CMP0150/CMakeLists.txt b/Tests/RunCMake/CMP0150/CMakeLists.txt
new file mode 100644
index 0000000000..371dccc7b2
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.25)
+project(${RunCMake_TEST} NONE)
+
+find_package(Git REQUIRED)
+
+function(execGitCommand workDir)
+ execute_process(
+ WORKING_DIRECTORY "${workDir}"
+ COMMAND "${GIT_EXECUTABLE}" ${ARGN}
+ COMMAND_ECHO STDOUT
+ COMMAND_ERROR_IS_FATAL ANY
+ )
+endfunction()
+
+function(initGitRepo workDir)
+ # init.defaultBranch only works with git 2.28 or later, so we must use the
+ # historical default branch name "master". Force the old default in case test
+ # sites have overridden the default to something else.
+ execGitCommand("${workDir}" -c init.defaultBranch=master init)
+ execGitCommand("${workDir}" config user.email "testauthor@cmake.org")
+ execGitCommand("${workDir}" config user.name testauthor)
+ execGitCommand("${workDir}" config core.autocrlf false)
+ execGitCommand("${workDir}" add CMakeLists.txt)
+ execGitCommand("${workDir}" commit -m "Initial commit")
+endfunction()
+
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0150/CMakeLists.txt.in b/Tests/RunCMake/CMP0150/CMakeLists.txt.in
new file mode 100644
index 0000000000..db6cfc76e0
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/CMakeLists.txt.in
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.25)
+project(@projName@ LANGUAGES NONE)
+
+@policyCommand@
+
+include(ExternalProject)
+ExternalProject_Add(ep-@depName@
+ GIT_REPOSITORY @epRelativeGitRepo@
+ GIT_TAG master
+ GIT_CONFIG init.defaultBranch=master
+ TEST_COMMAND ""
+ INSTALL_COMMAND "${CMAKE_COMMAND}" -E echo "ExternalProject for ep-@depName@"
+)
+
+include(FetchContent)
+FetchContent_Declare(@depName@
+ GIT_REPOSITORY @fcRelativeGitRepo@
+ GIT_TAG master
+ GIT_CONFIG init.defaultBranch=master
+)
+FetchContent_MakeAvailable(@depName@)
+
+message(STATUS "Completed configuring project @projName@")
diff --git a/Tests/RunCMake/CMP0150/RunCMakeTest.cmake b/Tests/RunCMake/CMP0150/RunCMakeTest.cmake
new file mode 100644
index 0000000000..940c33e65b
--- /dev/null
+++ b/Tests/RunCMake/CMP0150/RunCMakeTest.cmake
@@ -0,0 +1,17 @@
+include(RunCMake)
+
+function(test_CMP0150 val)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${val}-build)
+ run_cmake(CMP0150-${val})
+ set(RunCMake_TEST_NO_CLEAN TRUE)
+ # Some git versions write clone messages to stderr. These would cause the
+ # test to fail, so we need to merge them into stdout.
+ set(RunCMake_TEST_OUTPUT_MERGE TRUE)
+ run_cmake_command(CMP0150-${val}-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+test_CMP0150(WARN)
+test_CMP0150(OLD)
+test_CMP0150(NEW)
+
+run_cmake_script(CMP0150-NEW-resolve)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 930122c961..ada913299b 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -15,6 +15,9 @@ macro(add_RunCMake_test test)
else()
set(Test_Dir ${test})
endif()
+ if(CMAKE_C_COMPILER_ID STREQUAL "LCC")
+ list(APPEND TEST_ARGS -DRunCMake_TEST_LCC=1)
+ endif()
add_test(NAME RunCMake.${test} COMMAND ${CMAKE_CMAKE_COMMAND}
-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}
-DRunCMake_GENERATOR_IS_MULTI_CONFIG=${_isMultiConfig}
@@ -41,6 +44,11 @@ function(add_RunCMake_test_group test types)
file(REMOVE_RECURSE "${TEST_CONFIG_DIR}")
file(MAKE_DIRECTORY "${TEST_CONFIG_DIR}")
+ set(TEST_ARGS "")
+ if(CMAKE_C_COMPILER_ID STREQUAL "LCC")
+ list(APPEND TEST_ARGS -DRunCMake_TEST_LCC=1)
+ endif()
+
foreach(type IN LISTS types)
# generate prerequirements config file in cmake as ctest doesn't have as
# much system information so it is easier to set programs and environment
@@ -68,6 +76,7 @@ function(add_RunCMake_test_group test types)
-DRunCMake_MAKE_PROGRAM=${CMake_TEST_EXPLICIT_MAKE_PROGRAM}
-DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test}
-DRunCMake_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/${type}/${test}
+ ${TEST_ARGS}
-Dconfig_file=${TEST_CONFIG_DIR}/${type}_config.cmake
-P "${CMAKE_CURRENT_SOURCE_DIR}/${test}/RunCMakeTest.cmake"
)
@@ -151,6 +160,7 @@ endif()
add_RunCMake_test(CMP0132)
add_RunCMake_test(CMP0135)
add_RunCMake_test(CMP0139)
+add_RunCMake_test(CMP0150)
# The test for Policy 65 requires the use of the
# CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode
@@ -270,8 +280,6 @@ if(want_NoQt_test)
add_RunCMake_test(AutogenNoQt TEST_DIR Autogen)
endif()
-add_RunCMake_test(ArtifactOutputDirs)
-
if(NOT DEFINED CMake_TEST_BuildDepends_GNU_AS
AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC")
AND CMAKE_GENERATOR MATCHES "^Ninja"
@@ -287,6 +295,7 @@ endif()
add_RunCMake_test(BuildDepends
-DMSVC_VERSION=${MSVC_VERSION}
-DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
+ -DCMAKE_C_LINK_DEPENDS_USE_COMPILER=${CMAKE_C_LINK_DEPENDS_USE_COMPILER}
-DCMake_TEST_BuildDepends_GNU_AS=${CMake_TEST_BuildDepends_GNU_AS}
)
if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
@@ -323,6 +332,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)
@@ -353,11 +366,13 @@ add_RunCMake_test(GenEx-DEVICE_LINK)
add_RunCMake_test(GenEx-LINK_LIBRARY)
add_RunCMake_test(GenEx-LINK_GROUP)
add_RunCMake_test(GenEx-TARGET_FILE -DLINKER_SUPPORTS_PDB=${LINKER_SUPPORTS_PDB})
+add_RunCMake_test(GenEx-TARGET_IMPORT_FILE)
add_RunCMake_test(GenEx-GENEX_EVAL)
add_RunCMake_test(GenEx-TARGET_PROPERTY)
add_RunCMake_test(GenEx-TARGET_RUNTIME_DLLS)
add_RunCMake_test(GenEx-PATH)
add_RunCMake_test(GenEx-PATH_EQUAL)
+add_RunCMake_test(GenEx-LIST)
add_RunCMake_test(GeneratorExpression)
add_RunCMake_test(GeneratorInstance)
add_RunCMake_test(GeneratorPlatform)
@@ -392,6 +407,7 @@ if(UNIX AND CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG AND CMAKE_EXECUTABLE_FORMAT STRE
endif()
add_RunCMake_test(ScriptMode)
add_RunCMake_test(Swift -DCMAKE_Swift_COMPILER=${CMAKE_Swift_COMPILER} -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
+add_RunCMake_test(TargetArtifacts -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
add_RunCMake_test(TargetObjects)
add_RunCMake_test(TargetProperties)
add_RunCMake_test(ToolchainFile)
@@ -511,6 +527,7 @@ add_RunCMake_test(BundleUtilities)
if(APPLE)
add_RunCMake_test(INSTALL_NAME_DIR)
add_RunCMake_test(MacOSVersions)
+ add_RunCMake_test(AppleTextStubs)
endif()
function(add_RunCMake_test_try_compile)
@@ -779,6 +796,7 @@ if(DEFINED CMake_COMPILER_FORCES_NEW_DTAGS)
endif()
add_RunCMake_test(file-GET_RUNTIME_DEPENDENCIES
-DCMake_INSTALL_NAME_TOOL_BUG=${CMake_INSTALL_NAME_TOOL_BUG}
+ -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
)
add_RunCMake_test(CPackCommandLine)
diff --git a/Tests/RunCMake/CMakePresets/Comment-stderr.txt b/Tests/RunCMake/CMakePresets/Comment-stderr.txt
index b3b6b66d9f..8619cf5fad 100644
--- a/Tests/RunCMake/CMakePresets/Comment-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/Comment-stderr.txt
@@ -1,7 +1,6 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/Comment: JSON parse error
-Errors:
-[^
+]*/Tests/RunCMake/CMakePresets/Comment:
+JSON Parse Error: [^
]*Comment\/CMakePresets.json:
\* Line 1, Column 1
Syntax error: value, object or array expected\.
diff --git a/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt b/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt
index ea5f47f653..31ebbc1312 100644
--- a/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ConditionFuture: File version must be 3 or higher for condition support$
+]*/Tests/RunCMake/CMakePresets/ConditionFuture:
+File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt
index 895afcb97c..2d5b477937 100644
--- a/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/CyclicInheritance0: Cyclic preset inheritance$
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance0:
+Cyclic preset inheritance for preset "CyclicInheritance0"$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt
index 1e59e92ed3..596fcf8c17 100644
--- a/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/CyclicInheritance1: Cyclic preset inheritance$
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance1:
+Cyclic preset inheritance for preset "CyclicInheritance0"$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt
index 56e630b526..a6b83c8136 100644
--- a/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/CyclicInheritance2: Cyclic preset inheritance$
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance2:
+Cyclic preset inheritance for preset "CyclicInheritance0"$
diff --git a/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt b/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt
index c9361aea5e..ebb9a2d864 100644
--- a/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/DuplicatePresets: Duplicate presets$
+]*/Tests/RunCMake/CMakePresets/DuplicatePresets:
+Duplicate preset: "DuplicatePresets"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt
index 749d306de6..cb9e545c4a 100644
--- a/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyCacheKey: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/EmptyCacheKey:
+Invalid preset: "EmptyCacheKey"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt
index 723ac2161b..7774fee8c5 100644
--- a/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyEnv: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/EmptyEnv:
+Invalid macro expansion in "EmptyEnv"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt
index 365f537dc3..bc0f8663e7 100644
--- a/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyEnvKey: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/EmptyEnvKey:
+Invalid preset: "EmptyEnvKey"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt
index 880cee6516..b3bfe21226 100644
--- a/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyPenv: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/EmptyPenv:
+Invalid macro expansion in "EmptyPenv"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyPenvInInclude-result.txt b/Tests/RunCMake/CMakePresets/EmptyPenvInInclude-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPenvInInclude-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/EmptyPenvInInclude-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyPenvInInclude-stderr.txt
new file mode 100644
index 0000000000..e0f858a1e1
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPenvInInclude-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/EmptyPenvInInclude:
+Error: @3,15: Invalid "include" field
+ "include": \["\$penv\{\}"\],
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/EmptyPenvInInclude.json.in b/Tests/RunCMake/CMakePresets/EmptyPenvInInclude.json.in
new file mode 100644
index 0000000000..651b0de1b9
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/EmptyPenvInInclude.json.in
@@ -0,0 +1,11 @@
+{
+ "version": 7,
+ "include": ["$penv{}"],
+ "configurePresets": [
+ {
+ "name": "EmptyPenvInInclude",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt
index 0d3c5001a1..6f8469022d 100644
--- a/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt
@@ -1,5 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyPresetName: Invalid preset
-Errors:
-[^
-]*/EmptyPresetName/CMakePresets.json$
+]*/Tests/RunCMake/CMakePresets/EmptyPresetName:
+Error: @5,15: Invalid Preset Name
+ "name": "",
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt b/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt
index 1d22b87232..8e19c693aa 100644
--- a/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EnvCycle: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/EnvCycle:
+Invalid preset: "EnvCycle"
+Invalid macro expansion in "EnvCycle"$
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt
index 3221345498..5c02d5b5e8 100644
--- a/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated:
+Invalid preset: "ErrorNoWarningDeprecated"$
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt
index d2ddb900de..4640b1ef31 100644
--- a/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDev: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDev:
+Invalid preset: "ErrorNoWarningDev"$
diff --git a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt b/Tests/RunCMake/CMakePresets/ExplicitNoTrace.cmake
index e69de29bb2..e69de29bb2 100644
--- a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ExplicitNoTrace.cmake
diff --git a/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt
index 559e3c2bd2..2e94831c99 100644
--- a/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ExtraPresetField: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/ExtraPresetField:
+Error: @8,18: Invalid extra field "invalid" in Preset
+ "invalid": true
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt
index bb281beed8..554cd4aa3d 100644
--- a/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ExtraRootField: Invalid root object$
+]*/Tests/RunCMake/CMakePresets/ExtraRootField:
+Error: @10,14: Invalid extra field "invalid" in root object
+ "invalid": true
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt
index 9b346e78e8..5cb777c42f 100644
--- a/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ExtraVariableField: Invalid CMake variable definition$
+]*/Tests/RunCMake/CMakePresets/ExtraVariableField:
+Error: @11,22: Invalid extra field "invalid" in variable "EXTRA" for preset "ExtraVariableField"
+ "invalid": true
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt b/Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt
index ba85f0f42e..b49df79227 100644
--- a/Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/FileDirFuture: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/FileDirFuture:
+Invalid macro expansion in "FileDirFuture"$
diff --git a/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt
index 36123bdaca..ca481c6a02 100644
--- a/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField: File version must be 3 or higher for installDir preset support.$
+]*/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField:
+File version must be 3 or higher for installDir preset support$
diff --git a/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt
index 9382423a35..7aedc6d330 100644
--- a/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/FuturePresetToolchainField: File version must be 3 or higher for toolchainFile preset support.$
+]*/Tests/RunCMake/CMakePresets/FuturePresetToolchainField:
+File version must be 3 or higher for toolchainFile preset support$
diff --git a/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt b/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt
index d8622f212e..598478fc66 100644
--- a/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/HighVersion: Unrecognized "version" field$
+]*/Tests/RunCMake/CMakePresets/HighVersion:
+Error: @2,14: Unrecognized "version" field
+ "version": 1000,
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt b/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt
index 7f4bb9a243..a1dae4ce72 100644
--- a/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/HostSystemNameFuture: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/HostSystemNameFuture:
+Invalid macro expansion in "HostSystemNameFuture"$
diff --git a/Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt
index 3343204ca2..fc6292d422 100644
--- a/Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeCycle: Cyclic include among preset files$
+]*/Tests/RunCMake/CMakePresets/IncludeCycle:
+Cyclic include among preset files: [^
+]*/CMakeUserPresets.json$
diff --git a/Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt
index 35aea4c9ca..1bc402a006 100644
--- a/Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt
@@ -1,2 +1,4 @@
-^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeCycle3Files: Cyclic include among preset files$
+CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/IncludeCycle3Files:
+Cyclic include among preset files: [^
+]*/CMakePresets.json
diff --git a/Tests/RunCMake/CMakePresets/IncludeExpansion-stdout.txt b/Tests/RunCMake/CMakePresets/IncludeExpansion-stdout.txt
new file mode 100644
index 0000000000..d3f1afceb2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/IncludeExpansion-stdout.txt
@@ -0,0 +1,5 @@
+^Not searching for unused variables given on the command line\.
+Available configure presets:
+
+ "Include"
+ "IncludeCommon"$
diff --git a/Tests/RunCMake/CMakePresets/IncludeExpansion.json.in b/Tests/RunCMake/CMakePresets/IncludeExpansion.json.in
new file mode 100644
index 0000000000..b4f82927b5
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/IncludeExpansion.json.in
@@ -0,0 +1,10 @@
+{
+ "version": 7,
+ "include": ["$penv{TEST_ENV_INCLUDE_DIR}/IncludeCommon.json"],
+ "configurePresets": [
+ {
+ "name": "Include",
+ "inherits": ["IncludeCommon"]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt
index 85a2d78903..fba5b01b74 100644
--- a/Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt
@@ -1,5 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeNotFound: File not found
-Errors:
-[^
-]*/IncludeNotFound/NotFound.json: Failed to read file$
+]*/Tests/RunCMake/CMakePresets/IncludeNotFound:
+File not found: [^
+]*/IncludeNotFound/NotFound.json$
diff --git a/Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt
index 1869b6db5f..7e975a7b11 100644
--- a/Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeV3: File version must be 4 or higher for include support$
+]*/Tests/RunCMake/CMakePresets/IncludeV3:
+File version must be 4 or higher for include support$
diff --git a/Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt
index 89e3e3ddbf..f14c583eea 100644
--- a/Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeV4V3: File version must be 4 or higher for include support$
+]*/Tests/RunCMake/CMakePresets/IncludeV4V3:
+File version must be 4 or higher for include support$
diff --git a/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt
index 4a4d4ce70c..5df075d789 100644
--- a/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy:
+Error: @9,21: Invalid preset
+ "strategy": {}
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt
index 97f3876737..216f308259 100644
--- a/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidInheritance: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidInheritance:
+Invalid preset: "InvalidInheritance"$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt
index 2fe8c66e93..deb35b46d2 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir:
+Error: @7,20: "binaryDir" expected a string
+ "binaryDir": \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt
index 95728752f6..7f194123ff 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresetGenerator: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidPresetGenerator:
+Error: @6,20: "generator" expected a string
+ "generator": \[\],
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt
index 8f6ff7c1d8..4cceb73ad9 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresetName: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidPresetName:
+Error: @5,15: Invalid Preset Name
+ "name": \[\],
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt
index 89a424ab99..f92c48ec92 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresetVendor: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidPresetVendor:
+Error: @8,17: Invalid preset
+ "vendor": true
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt
index 2b0f5603e3..d7081afbd8 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresets: Invalid "configurePresets" field$
+]*/Tests/RunCMake/CMakePresets/InvalidPresets:
+Error: @3,23: Invalid "configurePresets" field
+ "configurePresets": {}
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt
index 5b500e44e8..86cd861729 100644
--- a/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidRegex: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/InvalidRegex:
+Invalid preset: "InvalidRegex"
+Invalid macro expansion in "InvalidRegex"$
diff --git a/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt
index e5c434d9bb..5f2dcc1b33 100644
--- a/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidRoot: Invalid root object$
+]*/Tests/RunCMake/CMakePresets/InvalidRoot:
+Error: \@1\,1\: Invalid root object
+\[\]
+\^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt
index fab3766200..d0974aca81 100644
--- a/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy:
+Error: @9,21: Invalid preset
+ "strategy": {}
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt
index 0ab07c3d0b..fdb7072c87 100644
--- a/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidVariableValue: Invalid CMake variable definition$
+]*/Tests/RunCMake/CMakePresets/InvalidVariableValue:
+Error: @10,20: "value" expected a string
+ "value": \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt
index 6d9102a14b..f329d973d1 100644
--- a/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidVariables: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidVariables:
+Error: @8,25: Invalid preset
+ "cacheVariables": \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt
index af923f0ba2..fc6534e2a5 100644
--- a/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidVendor: Invalid root object$
+]*/Tests/RunCMake/CMakePresets/InvalidVendor:
+Error: @3,13: Invalid root object
+ "vendor": true,
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt
index 7e0fcfdd21..97fe9d6e04 100644
--- a/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidVersion: Invalid "version" field$
+]*/Tests/RunCMake/CMakePresets/InvalidVersion:
+Error: @2,14: Invalid "version" field
+ "version": "1.0",
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt b/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt
index 89eff9fc5b..92a1b2b746 100644
--- a/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt
@@ -1,9 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/JSONParseError: JSON parse error
-Errors:
-[^
-]*JSONParseError/CMakePresets.json:
-\* Line 1, Column 1
- Syntax error: value, object or array expected\.
-\* Line 1, Column 1
- A valid JSON document must be either an array or an object value\.$
+]*/Tests/RunCMake/CMakePresets/JSONParseError:
+A JSON document cannot be empty
diff --git a/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt b/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt
index 92b3723e1e..e9331006d2 100644
--- a/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/LowVersion: Unrecognized "version" field$
+]*/Tests/RunCMake/CMakePresets/LowVersion:
+Error: @2,14: Unrecognized "version" field
+ "version": 0,
+ \^
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt
index 6548cafe21..30ab9ced74 100644
--- a/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid: Invalid "cmakeMinimumRequired" field$
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid:
+Error: @3,27: Invalid "cmakeMinimumRequired"
+ "cmakeMinimumRequired": "3.18",
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt
index 6036fe3ae3..c9001ea13b 100644
--- a/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/MinimumRequiredMajor: "cmakeMinimumRequired" version too new$
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredMajor:
+Error: @4,14: "cmakeMinimumRequired" major version 1000 must be less than [0-9]*
+ "major": 1000
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt
index bdee4cdeb8..3911c84e84 100644
--- a/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/MinimumRequiredMinor: "cmakeMinimumRequired" version too new$
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredMinor:
+Error: @5,14: "cmakeMinimumRequired" minor version 1000 must be less than [0-9]*
+ "minor": 1000
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt
index b5d3a393f0..e989fa8a7f 100644
--- a/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/MinimumRequiredPatch: "cmakeMinimumRequired" version too new$
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredPatch:
+Error: @6,14: "cmakeMinimumRequired" patch version 50000000 must be less than [0-9]*
+ "patch": 50000000
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt b/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt
index c807ffc988..afc5887f34 100644
--- a/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoCMakePresets: File not found$
+]*/Tests/RunCMake/CMakePresets/NoCMakePresets:
+File not found: [^
+]*/CMakePresets.json$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt
index b525fc322c..bae979473d 100644
--- a/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoPresetBinaryDir: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/NoPresetBinaryDir:
+Preset "NoPresetBinaryDir" missing field "binaryDir"
+Invalid preset: "NoPresetBinaryDir"$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt
index 6c0c9f77ab..c7e5b5e23b 100644
--- a/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoPresetGenerator: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/NoPresetGenerator:
+Preset "NoPresetGenerator" missing field "generator"
+Invalid preset: "NoPresetGenerator"$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt
index 0ee338a369..9aff07f45f 100644
--- a/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoPresetName: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/NoPresetName:
+Error: @4,5: Missing required field "name" in Preset
+ {
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt b/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt
index 7dafe623df..8c7ca6e9f8 100644
--- a/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoSuchMacro: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/NoSuchMacro:
+Invalid macro expansion in "NoSuchMacro"$
diff --git a/Tests/RunCMake/CMakePresets/NoTrace.cmake b/Tests/RunCMake/CMakePresets/NoTrace.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/NoTrace.cmake
diff --git a/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt b/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt
index cdab32f7ba..630c288995 100644
--- a/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoVariableValue: Invalid CMake variable definition$
+]*/Tests/RunCMake/CMakePresets/NoVariableValue:
+Error: @9,16: Missing required field "value" in variable "VAR" for preset "NoVariableValue"
+ "VAR": {}
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt b/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt
index d4f07e499c..f7c95db9fc 100644
--- a/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoVersion: No "version" field$
+]*/Tests/RunCMake/CMakePresets/NoVersion:
+No "version" field$
diff --git a/Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt b/Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt
index b961aaf459..7652ddc0e1 100644
--- a/Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/PathListSepFuture: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/PathListSepFuture:
+Invalid macro expansion in "PathListSepFuture"$
diff --git a/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt b/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt
index 6604a14c09..62e92485ac 100644
--- a/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/PresetNotObject: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/PresetNotObject:
+Error: @4,5: Invalid Preset
+ \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
index efa838e822..c4a8b3f080 100644
--- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
@@ -146,10 +146,12 @@ run_cmake_presets(NoSuchMacro)
run_cmake_presets(EnvCycle)
run_cmake_presets(EmptyEnv)
run_cmake_presets(EmptyPenv)
+run_cmake_presets(EmptyPenvInInclude)
run_cmake_presets(InvalidRegex)
set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
run_cmake_presets(ConditionFuture)
run_cmake_presets(SubConditionNull)
+run_cmake_presets(TraceNotSupported)
# Test cmakeMinimumRequired field
run_cmake_presets(MinimumRequiredInvalid)
@@ -326,6 +328,18 @@ set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/Debug.json.in")
run_cmake_presets(NoDebug)
run_cmake_presets(Debug)
+# Test trace
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/Trace.json.in")
+run_cmake_presets(NoTrace)
+run_cmake_presets(ExplicitNoTrace)
+run_cmake_presets(Trace)
+run_cmake_presets(TraceExpand)
+run_cmake_presets(TraceFormatJSON)
+run_cmake_presets(TraceFormatHuman)
+run_cmake_presets(TraceSource)
+run_cmake_presets(TraceRedirect)
+run_cmake_presets(TraceAll)
+
# Test ${hostSystemName} macro
set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/HostSystemName.json.in")
run_cmake_presets(HostSystemName)
@@ -380,6 +394,12 @@ set(CMakePresets_EXTRA_FILES
"${RunCMake_SOURCE_DIR}/subdir/CMakePresets.json.in"
)
run_cmake_presets(Include --list-presets)
+set(CMakePresets_EXTRA_FILES
+ "${RunCMake_SOURCE_DIR}/IncludeCommon.json.in"
+ )
+set(ENV{TEST_ENV_INCLUDE_DIR} ${RunCMake_BINARY_DIR}/IncludeExpansion)
+run_cmake_presets(IncludeExpansion --list-presets)
+unset(ENV{TEST_ENV_INCLUDE_DIR})
unset(CMakePresets_EXTRA_FILES)
run_cmake_presets(IncludeNotFound)
run_cmake_presets(IncludeCycle)
diff --git a/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt b/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt
index 42b74d6177..520b473e6a 100644
--- a/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/SubConditionNull: Invalid preset condition$
+]*/Tests/RunCMake/CMakePresets/SubConditionNull:
+Invalid condition for preset "SubConditionNull"$
diff --git a/Tests/RunCMake/CMakePresets/Trace-stderr.txt b/Tests/RunCMake/CMakePresets/Trace-stderr.txt
new file mode 100644
index 0000000000..5ed769cf55
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Trace-stderr.txt
@@ -0,0 +1,4 @@
+^[^
+]*/Tests/RunCMake/CMakePresets/Trace/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.18 \)
+[^
+]*/Tests/RunCMake/CMakePresets/Trace/CMakeLists.txt\(2\): project\(\${RunCMake_TEST} NONE \)
diff --git a/Tests/RunCMake/CMakePresets/Trace.cmake b/Tests/RunCMake/CMakePresets/Trace.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Trace.cmake
diff --git a/Tests/RunCMake/CMakePresets/Trace.json.in b/Tests/RunCMake/CMakePresets/Trace.json.in
new file mode 100644
index 0000000000..f50a6f25b3
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/Trace.json.in
@@ -0,0 +1,69 @@
+{
+ "version": 7,
+ "configurePresets": [
+ {
+ "name": "NoTrace",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build"
+ },
+ {
+ "name": "ExplicitNoTrace",
+ "inherits": "NoTrace",
+ "trace": {
+ "mode": "off"
+ }
+ },
+ {
+ "name": "Trace",
+ "inherits": "NoTrace",
+ "trace": {
+ "mode": "on"
+ }
+ },
+ {
+ "name": "TraceExpand",
+ "inherits": "NoTrace",
+ "trace": {
+ "mode": "expand"
+ }
+ },
+ {
+ "name": "TraceFormatJSON",
+ "inherits": "NoTrace",
+ "trace": {
+ "format": "json-v1"
+ }
+ },
+ {
+ "name": "TraceFormatHuman",
+ "inherits": "NoTrace",
+ "trace": {
+ "format": "human"
+ }
+ },
+ {
+ "name": "TraceSource",
+ "inherits": "NoTrace",
+ "trace": {
+ "source": "TraceSourceFile.txt"
+ }
+ },
+ {
+ "name": "TraceRedirect",
+ "inherits": "NoTrace",
+ "trace": {
+ "redirect": "TraceRedirectFile.txt"
+ }
+ },
+ {
+ "name": "TraceAll",
+ "inherits": "NoTrace",
+ "trace": {
+ "mode": "expand",
+ "format": "json-v1",
+ "source": "TraceSourceFile.txt",
+ "redirect": "TraceRedirectFile.json"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/TraceAll.cmake b/Tests/RunCMake/CMakePresets/TraceAll.cmake
new file mode 100644
index 0000000000..9896ec0b29
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceAll.cmake
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TraceExpand.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/TraceFormatJSON.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/TraceSource.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/TraceRedirect.cmake)
diff --git a/Tests/RunCMake/CMakePresets/TraceExpand-stderr.txt b/Tests/RunCMake/CMakePresets/TraceExpand-stderr.txt
new file mode 100644
index 0000000000..7ee4fea2b8
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceExpand-stderr.txt
@@ -0,0 +1,4 @@
+^[^
+]*/Tests/RunCMake/CMakePresets/TraceExpand/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.18 \)
+[^
+]*/Tests/RunCMake/CMakePresets/TraceExpand/CMakeLists.txt\(2\): project\(TraceExpand NONE \)
diff --git a/Tests/RunCMake/CMakePresets/TraceExpand.cmake b/Tests/RunCMake/CMakePresets/TraceExpand.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceExpand.cmake
diff --git a/Tests/RunCMake/CMakePresets/TraceFormatHuman-stderr.txt b/Tests/RunCMake/CMakePresets/TraceFormatHuman-stderr.txt
new file mode 100644
index 0000000000..1d3450daea
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceFormatHuman-stderr.txt
@@ -0,0 +1,4 @@
+^[^
+]*/Tests/RunCMake/CMakePresets/TraceFormatHuman/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.18 \)
+[^
+]*/Tests/RunCMake/CMakePresets/TraceFormatHuman/CMakeLists.txt\(2\): project\(\${RunCMake_TEST} NONE \)
diff --git a/Tests/RunCMake/CMakePresets/TraceFormatHuman.cmake b/Tests/RunCMake/CMakePresets/TraceFormatHuman.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceFormatHuman.cmake
diff --git a/Tests/RunCMake/CMakePresets/TraceFormatJSON-stderr.txt b/Tests/RunCMake/CMakePresets/TraceFormatJSON-stderr.txt
new file mode 100644
index 0000000000..edf044c655
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceFormatJSON-stderr.txt
@@ -0,0 +1,3 @@
+^{"version":{"major":1,"minor":2}}
+{"args":\["VERSION","3\.18"\],"cmd":"cmake_minimum_required","file":"[^"]*/Tests/RunCMake/CMakePresets/TraceFormatJSON/CMakeLists\.txt","frame":1,"global_frame":1,"line":1,"time":[0-9.]+}
+{"args":\["\${RunCMake_TEST}","NONE"\],"cmd":"project","file":"[^"]*/Tests/RunCMake/CMakePresets/TraceFormatJSON/CMakeLists\.txt","frame":1,"global_frame":1,"line":2,"time":[0-9.]+}
diff --git a/Tests/RunCMake/CMakePresets/TraceFormatJSON.cmake b/Tests/RunCMake/CMakePresets/TraceFormatJSON.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceFormatJSON.cmake
diff --git a/Tests/RunCMake/CMakePresets/TraceNotSupported-result.txt b/Tests/RunCMake/CMakePresets/TraceNotSupported-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceNotSupported-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/TraceNotSupported-stderr.txt b/Tests/RunCMake/CMakePresets/TraceNotSupported-stderr.txt
new file mode 100644
index 0000000000..de19a8c36f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceNotSupported-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/TraceNotSupported:
+File version must be 7 or higher for trace preset support$
diff --git a/Tests/RunCMake/CMakePresets/TraceNotSupported.json.in b/Tests/RunCMake/CMakePresets/TraceNotSupported.json.in
new file mode 100644
index 0000000000..f3d3fbdb3a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceNotSupported.json.in
@@ -0,0 +1,13 @@
+{
+ "version": 6,
+ "configurePresets": [
+ {
+ "name": "TraceNotSupported",
+ "generator": "@RunCMake_GENERATOR@",
+ "binaryDir": "${sourceDir}/build",
+ "trace": {
+ "mode": "expand"
+ }
+ }
+ ]
+}
diff --git a/Tests/RunCMake/CMakePresets/TraceRedirect.cmake b/Tests/RunCMake/CMakePresets/TraceRedirect.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceRedirect.cmake
diff --git a/Tests/RunCMake/CMakePresets/TraceSource.cmake b/Tests/RunCMake/CMakePresets/TraceSource.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/TraceSource.cmake
diff --git a/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt b/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt
index f9481f091d..abdbb810c0 100644
--- a/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UnclosedMacro: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/UnclosedMacro:
+Invalid macro expansion in "UnclosedMacro"$
diff --git a/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt
index cf17881d7a..606376264c 100644
--- a/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy:
+Error: @9,21: Invalid preset
+ "strategy": "unknown"
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt
index 8f9be2998d..55f9c7a779 100644
--- a/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy:
+Error: @9,21: Invalid preset
+ "strategy": "unknown"
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt b/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt
index 125265f0a6..8b4139ffd9 100644
--- a/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UserDuplicateCross: Duplicate presets$
+]*/Tests/RunCMake/CMakePresets/UserDuplicateCross:
+Duplicate preset: "UserDuplicateCross"$
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt b/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt
index 1071b1775d..15c46f48fd 100644
--- a/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UserDuplicateInUser: Duplicate presets$
+]*/Tests/RunCMake/CMakePresets/UserDuplicateInUser:
+Duplicate preset: "UserDuplicateInUser"$
diff --git a/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt b/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt
index 5ad8b4b6b6..2ce1316413 100644
--- a/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UserInheritance: Inherited preset is unreachable from preset's file$
+]*/Tests/RunCMake/CMakePresets/UserInheritance:
+Inherited preset "UserInheritance" is unreachable from preset's file$
diff --git a/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt b/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt
index 8cacb0a26e..ce1aa20ef7 100644
--- a/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/VariableNotObject: Invalid CMake variable definition$
+]*/Tests/RunCMake/CMakePresets/VariableNotObject:
+Error: @9,16: Invalid CMake variable "VAR" for preset "VariableNotObject"
+ "VAR": \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/validate_schema.py b/Tests/RunCMake/CMakePresets/validate_schema.py
index b2a67fc4b9..836147aab2 100644
--- a/Tests/RunCMake/CMakePresets/validate_schema.py
+++ b/Tests/RunCMake/CMakePresets/validate_schema.py
@@ -4,13 +4,13 @@ import os.path
import sys
-with open(sys.argv[1], "rb") as f:
- contents = json.loads(f.read().decode("utf-8-sig"))
+with open(sys.argv[1], "r", encoding="utf-8-sig") as f:
+ contents = json.load(f)
schema_file = os.path.join(
os.path.dirname(__file__),
"..", "..", "..", "Help", "manual", "presets", "schema.json")
-with open(schema_file) as f:
+with open(schema_file, "r", encoding="utf-8") as f:
schema = json.load(f)
jsonschema.validate(contents, schema)
diff --git a/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt
index f08f4c11ba..aea1dcebd4 100644
--- a/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/ConditionFuture: File version must be 3 or higher for condition support$
+]*/Tests/RunCMake/CMakePresetsBuild/ConditionFuture:
+File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt
index 05695d9f75..13b4158dca 100644
--- a/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable: Configure preset is unreachable from preset's file$
+]*/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable:
+Configure preset "x" is unreachable from preset's file$
diff --git a/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt
index 303632e54f..b62fd164fa 100644
--- a/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset: Invalid "configurePreset" field
+]*/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset:
+Invalid "configurePreset": "badConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt
index 303632e54f..b62fd164fa 100644
--- a/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset: Invalid "configurePreset" field
+]*/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset:
+Invalid "configurePreset": "badConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt
index fcb37bc439..9ce6ea5aad 100644
--- a/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset: Invalid preset
+]*/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset:
+Invalid preset: "noConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt
index d6ae62d6a4..48a5bd39a8 100644
--- a/Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported: File version must be 2 or higher for build and test preset support.
+]*Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported:
+File version must be 2 or higher for build and test preset support$
diff --git a/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt b/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt
index 4c461e3f8b..38ec6bfc53 100644
--- a/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion: File version must be 6 or higher for package preset support$
+]*/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion:
+File version must be 6 or higher for package preset support$
diff --git a/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt
index b814bbb94b..3f1a506571 100644
--- a/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/ConditionFuture: File version must be 3 or higher for condition support$
+]*/Tests/RunCMake/CMakePresetsTest/ConditionFuture:
+File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt
index d49148deb8..0be98efc30 100644
--- a/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable: Configure preset is unreachable from preset's file$
+]*/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable:
+Configure preset "x" is unreachable from preset's file
diff --git a/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt b/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt
index 3d7cdd075e..c427e4221b 100644
--- a/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset: Invalid "configurePreset" field
+]*/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset:
+Invalid "configurePreset": "badConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt b/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt
index 3d7cdd075e..c427e4221b 100644
--- a/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset: Invalid "configurePreset" field
+]*/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset:
+Invalid "configurePreset": "badConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt b/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt
index b167f68ef6..a70497f295 100644
--- a/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset: Invalid preset
+]*/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset:
+Invalid preset: "noConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt
index acd5785489..da94c3a027 100644
--- a/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported: File version must be 6 or higher for CTest JUnit output support$
+]*/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported:
+File version must be 6 or higher for CTest JUnit output support$
diff --git a/Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt
index eb0ec1a225..74c0740018 100644
--- a/Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*Tests/RunCMake/CMakePresetsTest/PresetsUnsupported: File version must be 2 or higher for build and test preset support.
+]*Tests/RunCMake/CMakePresetsTest/PresetsUnsupported:
+File version must be 2 or higher for build and test preset support
diff --git a/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt
index 90ea7c3b28..4deb755a9e 100644
--- a/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported: File version must be 5 or higher for testOutputTruncation preset support\.$
+]*/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported:
+File version must be 5 or higher for testOutputTruncation preset support$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt
index 22ca94d0da..33fe914149 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch:
+Invalid workflow step "default"$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt
index cbfee5a5c2..776257bd93 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure:
+First workflow step "default" must be a configure step$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt
index 049ed6bc51..f34a6053a9 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps:
+No workflow steps specified for "default"$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt
index c522b84d42..a9029e116b 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep:
+Invalid workflow step "default"$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt
index b0ad7d530e..35eac16c38 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure:
+Configure workflow step "default" must be the first step
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt
index 425e7196f0..f0a36f898a 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep: Workflow step is unreachable from preset's file$
+]*/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep:
+Workflow step "default" is unreachable from preset's file$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt
index 5cf01aaa51..93e31eb99d 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion: File version must be 6 or higher for workflow preset support$
+]*/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion:
+File version must be 6 or higher for workflow preset support$
diff --git a/Tests/RunCMake/CPack/CMakeLists.txt b/Tests/RunCMake/CPack/CMakeLists.txt
index c81b34ecd6..18a673e7d7 100644
--- a/Tests/RunCMake/CPack/CMakeLists.txt
+++ b/Tests/RunCMake/CPack/CMakeLists.txt
@@ -1,8 +1,4 @@
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
-
-if(POLICY CMP0129)
- cmake_policy(SET CMP0129 NEW)
-endif()
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "")
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index ef4cf5ed10..ca02b76fdd 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 1e071ec527..2b3e1f9914 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 89ff7c49fe..404e162d5e 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 c24af48a24..7cfcb363fa 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 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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/CMP0145-Dart-NEW-result.txt b/Tests/RunCMake/CTest/CMP0145-Dart-NEW-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-Dart-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CTest/CMP0145-Dart-NEW-stderr.txt b/Tests/RunCMake/CTest/CMP0145-Dart-NEW-stderr.txt
new file mode 100644
index 0000000000..06fce771bb
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-Dart-NEW-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at CMP0145-Dart-NEW\.cmake:[0-9]+ \(include\):
+ include could not find requested file:
+
+ Dart
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CTest/CMP0145-Dart-NEW.cmake b/Tests/RunCMake/CTest/CMP0145-Dart-NEW.cmake
new file mode 100644
index 0000000000..5b14ecc3e2
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-Dart-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0145 NEW)
+include(Dart)
diff --git a/Tests/RunCMake/CTest/CMP0145-Dart-OLD.cmake b/Tests/RunCMake/CTest/CMP0145-Dart-OLD.cmake
new file mode 100644
index 0000000000..2f66c3f314
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-Dart-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0145 OLD)
+set(_FindDart_testing 1)
+include(Dart)
+
+if(NOT _FindDart_included)
+ message(FATAL_ERROR "FindDart.cmake not included")
+endif()
diff --git a/Tests/RunCMake/CTest/CMP0145-Dart-WARN-stderr.txt b/Tests/RunCMake/CTest/CMP0145-Dart-WARN-stderr.txt
new file mode 100644
index 0000000000..5a751fc68b
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-Dart-WARN-stderr.txt
@@ -0,0 +1,18 @@
+^CMake Warning \(dev\) at CMP0145-Dart-WARN\.cmake:[0-9]+ \(include\):
+ Policy CMP0145 is not set: The Dart and FindDart modules are removed\. Run
+ "cmake --help-policy CMP0145" for policy details\. Use the cmake_policy
+ command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.
++
+CMake Warning \(dev\) at [^
+]*/Modules/Dart\.cmake:[0-9]+ \(message\):
+ Policy CMP0145 is not set: The Dart and FindDart modules are removed\. Run
+ "cmake --help-policy CMP0145" for policy details\. Use the cmake_policy
+ command to set the policy and suppress this warning\.
+Call Stack \(most recent call first\):
+ CMP0145-Dart-WARN\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/CTest/CMP0145-Dart-WARN.cmake b/Tests/RunCMake/CTest/CMP0145-Dart-WARN.cmake
new file mode 100644
index 0000000000..1398dbe379
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-Dart-WARN.cmake
@@ -0,0 +1,7 @@
+# Do not set CMP0145.
+set(_FindDart_testing 1)
+include(Dart)
+
+if(NOT _FindDart_included)
+ message(FATAL_ERROR "FindDart.cmake not included")
+endif()
diff --git a/Tests/RunCMake/CTest/CMP0145-FindDart-NEW-result.txt b/Tests/RunCMake/CTest/CMP0145-FindDart-NEW-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-FindDart-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CTest/CMP0145-FindDart-NEW-stderr.txt b/Tests/RunCMake/CTest/CMP0145-FindDart-NEW-stderr.txt
new file mode 100644
index 0000000000..b0456362f9
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-FindDart-NEW-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at CMP0145-FindDart-NEW\.cmake:[0-9]+ \(include\):
+ include could not find requested file:
+
+ FindDart
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CTest/CMP0145-FindDart-NEW.cmake b/Tests/RunCMake/CTest/CMP0145-FindDart-NEW.cmake
new file mode 100644
index 0000000000..c1227d69e8
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-FindDart-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0145 NEW)
+include(FindDart)
diff --git a/Tests/RunCMake/CTest/CMP0145-FindDart-OLD.cmake b/Tests/RunCMake/CTest/CMP0145-FindDart-OLD.cmake
new file mode 100644
index 0000000000..b9f3c76708
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-FindDart-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0145 OLD)
+set(_FindDart_testing 1)
+include(FindDart)
+
+if(NOT _FindDart_included)
+ message(FATAL_ERROR "FindDart.cmake not included")
+endif()
diff --git a/Tests/RunCMake/CTest/CMP0145-FindDart-WARN-stderr.txt b/Tests/RunCMake/CTest/CMP0145-FindDart-WARN-stderr.txt
new file mode 100644
index 0000000000..d07623562c
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-FindDart-WARN-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Warning \(dev\) at CMP0145-FindDart-WARN\.cmake:[0-9]+ \(include\):
+ Policy CMP0145 is not set: The Dart and FindDart modules are removed\. Run
+ "cmake --help-policy CMP0145" for policy details\. Use the cmake_policy
+ command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/CTest/CMP0145-FindDart-WARN.cmake b/Tests/RunCMake/CTest/CMP0145-FindDart-WARN.cmake
new file mode 100644
index 0000000000..59febdf34e
--- /dev/null
+++ b/Tests/RunCMake/CTest/CMP0145-FindDart-WARN.cmake
@@ -0,0 +1,7 @@
+# Do not set CMP0145.
+set(_FindDart_testing 1)
+include(FindDart)
+
+if(NOT _FindDart_included)
+ message(FATAL_ERROR "FindDart.cmake not included")
+endif()
diff --git a/Tests/RunCMake/CTest/CMakeLists.txt b/Tests/RunCMake/CTest/CMakeLists.txt
index f1a83e8c4b..1319aecc3d 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/CTest/RunCMakeTest.cmake b/Tests/RunCMake/CTest/RunCMakeTest.cmake
index b81f319f58..4c2c107647 100644
--- a/Tests/RunCMake/CTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTest/RunCMakeTest.cmake
@@ -39,3 +39,10 @@ endfunction()
if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
run_SingleConfig()
endif()
+
+run_cmake(CMP0145-Dart-OLD)
+run_cmake(CMP0145-Dart-WARN)
+run_cmake(CMP0145-Dart-NEW)
+run_cmake(CMP0145-FindDart-OLD)
+run_cmake(CMP0145-FindDart-WARN)
+run_cmake(CMP0145-FindDart-NEW)
diff --git a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt
index 2897109554..93ee9dfd5f 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 b82968a9f5..11bede7215 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/CTestResourceAllocation/ctresalloc.cxx b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
index 5c6c8d87b6..2824fbfe31 100644
--- a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
+++ b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
@@ -19,6 +19,7 @@
#include "cmCTestTestHandler.h"
#include "cmFileLock.h"
#include "cmFileLockResult.h"
+#include "cmList.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -282,12 +283,11 @@ static int doVerify(int argc, char const* const* argv)
if (argc == 5) {
testNames = argv[4];
}
- auto testNameList = cmExpandedList(testNames, false);
+ cmList testNameList{ testNames };
std::set<std::string> testNameSet(testNameList.begin(), testNameList.end());
cmCTestResourceSpec spec;
- if (spec.ReadFromJSONFile(resFile) !=
- cmCTestResourceSpec::ReadFileResult::READ_OK) {
+ if (spec.ReadFromJSONFile(resFile) != true) {
std::cout << "Could not read resource spec " << resFile << std::endl;
return 1;
}
diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in b/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in
index e9592f6d17..cfcf56d256 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 d049c9ff0b..172d2c6bcf 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 81851dbe01..418a8473e1 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/CheckCompilerFlag/CMakeLists.txt b/Tests/RunCMake/CheckCompilerFlag/CMakeLists.txt
index 30cb9aebf0..67eae6576c 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CMakeLists.txt
+++ b/Tests/RunCMake/CheckCompilerFlag/CMakeLists.txt
@@ -1,9 +1,3 @@
cmake_minimum_required(VERSION 3.13)
-
-if(POLICY CMP0129)
- cmake_policy(SET CMP0129 NEW)
-endif()
-
project(${RunCMake_TEST} LANGUAGES NONE)
-
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt
index 4a13d29a0e..9f18d8d2a3 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 842c5cf523..93ee9dfd5f 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/ClangTidy/CXX.cmake b/Tests/RunCMake/ClangTidy/CXX.cmake
index 2d22325ccd..3214122544 100644
--- a/Tests/RunCMake/ClangTidy/CXX.cmake
+++ b/Tests/RunCMake/ClangTidy/CXX.cmake
@@ -1,3 +1,3 @@
enable_language(CXX)
-set(CMAKE_CXX_CLANG_TIDY "${PSEUDO_TIDY}" -some -args)
+set(CMAKE_CXX_CLANG_TIDY "$<1:${PSEUDO_TIDY}>" -some -args)
add_executable(main main.cxx)
diff --git a/Tests/RunCMake/CommandLine/CMakeLists.txt b/Tests/RunCMake/CommandLine/CMakeLists.txt
index 2897109554..93ee9dfd5f 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/CommandLine/DeprecateVS9-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ 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 0000000000..c3329a0ed8
--- /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 0000000000..e69de29bb2
--- /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 a51446a67e..1a5e13479b 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 943be248ce..205949b568 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 4fee9bc96f..b900686606 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 74429b6433..88aad00698 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 8e8ddfa59b..4bf3cffb43 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 982cb89024..4107aa4cc7 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 982cb89024..4107aa4cc7 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 2897109554..93ee9dfd5f 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 ebab7a357a..12a7fd463a 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 64b52d9e1a..60a4246c30 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 74b3ff8de3..93ee9dfd5f 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 3482e6baf2..12a7fd463a 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 18dfd2686f..93ee9dfd5f 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 14c47ad6bb..b41f3f323a 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 3313e31f63..544b65fceb 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 3313e31f63..544b65fceb 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 18dfd2686f..93ee9dfd5f 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 3313e31f63..a6e8b0aba6 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 3313e31f63..a6e8b0aba6 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 3313e31f63..082c7b575f 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 3313e31f63..082c7b575f 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 3313e31f63..9f8c7541c8 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 3313e31f63..9f8c7541c8 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 3313e31f63..354e317028 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 3313e31f63..0000000000
--- 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 0000000000..354e317028
--- /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 3313e31f63..6b71839b41 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 3313e31f63..6b71839b41 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 3313e31f63..d2efd3d539 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 3313e31f63..0000000000
--- 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 0000000000..d2efd3d539
--- /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 3313e31f63..0082ab2b4b 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 3313e31f63..0000000000
--- 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 0000000000..0082ab2b4b
--- /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 e6a26052cc..b051a19db7 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 74b3ff8de3..93ee9dfd5f 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/Cppcheck/CXX.cmake b/Tests/RunCMake/Cppcheck/CXX.cmake
index 3b79471276..7030c61b5e 100644
--- a/Tests/RunCMake/Cppcheck/CXX.cmake
+++ b/Tests/RunCMake/Cppcheck/CXX.cmake
@@ -1,3 +1,3 @@
enable_language(CXX)
-set(CMAKE_CXX_CPPCHECK "${PSEUDO_CPPCHECK}")
+set(CMAKE_CXX_CPPCHECK "$<1:${PSEUDO_CPPCHECK}>")
add_executable(main main.cxx)
diff --git a/Tests/RunCMake/Cpplint/CXX.cmake b/Tests/RunCMake/Cpplint/CXX.cmake
index 35f05ee91a..b58609cb86 100644
--- a/Tests/RunCMake/Cpplint/CXX.cmake
+++ b/Tests/RunCMake/Cpplint/CXX.cmake
@@ -1,3 +1,3 @@
enable_language(CXX)
-set(CMAKE_CXX_CPPLINT "${PSEUDO_CPPLINT}" --verbose=0 --linelength=80)
+set(CMAKE_CXX_CPPLINT "$<1:${PSEUDO_CPPLINT}>" --verbose=0 --linelength=80)
add_executable(main main.cxx)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt b/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt
index 2d75985749..12a7fd463a 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 208ea20855..f3974eacf4 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 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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 0000000000..650be6430e
--- /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 364bf9e526..02c7c8e349 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 0000000000..c142541acd
--- /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 da823cdeb6..31b7baf196 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 2b0feb6e44..2428b8c5fa 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 0000000000..6dd7cb0cc5
--- /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 2946c0b6cf..351d70f0e9 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 0000000000..93ee9dfd5f
--- /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 0000000000..fbef79c8e8
--- /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 0000000000..e327a9f3ec
--- /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 0000000000..d0770469bc
--- /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 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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/FetchContent/IgnoreToolchainFile.cmake b/Tests/RunCMake/FetchContent/IgnoreToolchainFile.cmake
new file mode 100644
index 0000000000..f8ee74995c
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/IgnoreToolchainFile.cmake
@@ -0,0 +1,2 @@
+set(ENV{CMAKE_TOOLCHAIN_FILE} path/to/somewhere/iDoNotExist.cmake)
+include(DownloadFile.cmake)
diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
index bb27491b6b..378108991a 100644
--- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
@@ -7,6 +7,7 @@ run_cmake(DirectIgnoresDetails)
run_cmake(FirstDetailsWin)
run_cmake(DownloadTwice)
run_cmake(DownloadFile)
+run_cmake(IgnoreToolchainFile)
run_cmake(SameGenerator)
run_cmake(System)
run_cmake(VarDefinitions)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index fda18b5c08..eb52975265 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -848,8 +848,204 @@ def gen_check_targets(c, g, inSource):
for e in expected:
if e["type"] == "UTILITY":
if e["id"] == "^ZERO_CHECK::@6890427a1f51a3e7e1df$":
+ # The json files have data for Xcode. Substitute data for VS.
e["sources"] = [
{
+ "path": "^CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^alias/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^codemodel-v2\\.cmake$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^custom/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^cxx/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^dir/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^dir/dir/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^fileset/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^imported/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^include_test\\.cmake$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^interface/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^object/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
+ "path": "^subdir/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
"path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/([0-9a-f]+/)?generate\\.stamp\\.rule$",
"isGenerated": True,
"fileSetName": None,
@@ -867,6 +1063,24 @@ def gen_check_targets(c, g, inSource):
]
e["sourceGroups"] = [
{
+ "name": "",
+ "sourcePaths": [
+ "^CMakeLists\\.txt$",
+ "^alias/CMakeLists\\.txt$",
+ "^codemodel-v2\\.cmake$",
+ "^custom/CMakeLists\\.txt$",
+ "^cxx/CMakeLists\\.txt$",
+ "^dir/CMakeLists\\.txt$",
+ "^dir/dir/CMakeLists\\.txt$",
+ "^fileset/CMakeLists\\.txt$",
+ "^imported/CMakeLists\\.txt$",
+ "^include_test\\.cmake$",
+ "^interface/CMakeLists\\.txt$",
+ "^object/CMakeLists\\.txt$",
+ "^subdir/CMakeLists\\.txt$",
+ ],
+ },
+ {
"name": "CMake Rules",
"sourcePaths": [
"^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/([0-9a-f]+/)?generate\\.stamp\\.rule$",
diff --git a/Tests/RunCMake/File_Archive/CMakeLists.txt b/Tests/RunCMake/File_Archive/CMakeLists.txt
index 2897109554..93ee9dfd5f 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 3178de5834..eec672f8e2 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/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt
index 2c385c48f6..b47a137c2f 100644
--- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt
@@ -1,11 +1,11 @@
-^CMake Error at SourceProperty-CMP0070-NEW.cmake:[0-9]+ \(add_library\):
+^CMake Error at SourceProperty-CMP0070-NEW.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
.*\/relative-output-NEW\.c
- Tried extensions \.c \.C.*
-Call Stack \(most recent call first\):
+ Tried extensions ([^
+]+
+)+Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
-
-
++
CMake Generate step failed. Build files cannot be regenerated correctly.$
diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake
index d2b3e0c0a9..16d5563b97 100644
--- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake
@@ -1,5 +1,5 @@
enable_language(C)
-add_library(foo)
+add_library(foo empty.c)
cmake_policy(SET CMP0070 NEW)
file(GENERATE OUTPUT relative-output-NEW.c CONTENT "")
diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt
index fcb53a781b..39735d717d 100644
--- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt
@@ -8,16 +8,15 @@
behavior and not rely on setting a policy to OLD.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
-
-
-CMake Error at SourceProperty-CMP0070-OLD.cmake:[0-9]+ \(add_library\):
++
+CMake Error at SourceProperty-CMP0070-OLD.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
.*\/relative-output-OLD\.c
- Tried extensions \.c \.C.*
-Call Stack \(most recent call first\):
+ Tried extensions ([^
+]+
+)+Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
-
-
++
CMake Generate step failed. Build files cannot be regenerated correctly.$
diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake
index 48eae1e450..4f566b095e 100644
--- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake
+++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake
@@ -1,5 +1,5 @@
enable_language(C)
-add_library(foo)
+add_library(foo empty.c)
cmake_policy(SET CMP0070 OLD)
file(GENERATE OUTPUT relative-output-OLD.c CONTENT "")
diff --git a/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake b/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake
index e0585eebc6..b20f824ab1 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 a2c4d98126..e6c41a5cbb 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 1b9a957882..93ee9dfd5f 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 b4cc7415b1..8eaf90358b 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 4295d3c730..95b1c2214d 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 deebf89d9f..45dc7993a6 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 29c2ce3713..11826cf41d 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 939003206f..f9689b641a 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 d06cd1f2b5..3d151ab97e 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 74b3ff8de3..93ee9dfd5f 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 69ab4da000..457747feb5 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 f7a9815b1c..95a2e321d4 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 d0046caa11..15baa0d753 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 ec3651fbaf..98903ffc13 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 7ba1134473..e776961861 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 a4f1c390ef..b5ed6a71df 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 6dd8cdf551..93ee9dfd5f 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 58b70a31c7..2180cf92dc 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
@@ -24,10 +22,14 @@ set_target_properties(Gui2 PROPERTIES
)
add_executable(app2 main2.c)
-set_target_properties(Gui2 PROPERTIES
- PUBLIC_HEADER "${input_header}"
- FRAMEWORK TRUE
+set_target_properties(app2 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY bin
)
target_link_libraries(app2 PRIVATE Gui2)
+
+
+# Same test with STATIC consumer
+add_library(Consumer STATIC consumer.c)
+
+target_link_libraries(Consumer PRIVATE Gui2)
diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake
index 84012aa364..d09e8a0294 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/Framework/consumer.c b/Tests/RunCMake/Framework/consumer.c
new file mode 100644
index 0000000000..a578976498
--- /dev/null
+++ b/Tests/RunCMake/Framework/consumer.c
@@ -0,0 +1,9 @@
+
+#include <Gui2/Gui.h>
+
+int consumer()
+{
+ foo();
+
+ return 0;
+}
diff --git a/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt b/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt
index 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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-LIST/APPEND.cmake.in b/Tests/RunCMake/GenEx-LIST/APPEND.cmake.in
new file mode 100644
index 0000000000..19e1d127bb
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/APPEND.cmake.in
@@ -0,0 +1,34 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+list(APPEND listvar e)
+set (output "$<LIST:APPEND,a;b;c;d,e>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(APPEND listvar e f)
+set (output "$<LIST:APPEND,a;b;c;d,e,f>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(APPEND listvar e f)
+set (output "$<LIST:APPEND,a;b;c;d,e;f>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+unset(listvar)
+list(APPEND listvar e f)
+set (output "$<LIST:APPEND,,e,f>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:APPEND..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/CMakeLists.txt b/Tests/RunCMake/GenEx-LIST/CMakeLists.txt
new file mode 100644
index 0000000000..5161b995a9
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.18...3.25)
+
+project(${RunCMake_TEST} NONE)
+
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator-result.txt b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator-stderr.txt b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator-stderr.txt
new file mode 100644
index 0000000000..3064c00ee5
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at FILTER-wrong-operator.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:FILTER,a;b;c,WRONG_OPERATOR,\^a>
+
+ sub-command FILTER does not recognize operator "WRONG_OPERATOR". It must
+ be either INCLUDE or EXCLUDE.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator.cmake b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator.cmake
new file mode 100644
index 0000000000..e01b4fe7ae
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-operator.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:FILTER,a;b;c,WRONG_OPERATOR,^a>")
diff --git a/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex-result.txt b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex-stderr.txt b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex-stderr.txt
new file mode 100644
index 0000000000..b2f9b8a97b
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at FILTER-wrong-regex.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:FILTER,a;b;c,INCLUDE,\^\(a>
+
+ sub-command FILTER, failed to compile regex "\^\(a".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex.cmake b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex.cmake
new file mode 100644
index 0000000000..1311f319cd
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/FILTER-wrong-regex.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:FILTER,a;b;c,INCLUDE,^(a>")
diff --git a/Tests/RunCMake/GenEx-LIST/FIND.cmake.in b/Tests/RunCMake/GenEx-LIST/FIND.cmake.in
new file mode 100644
index 0000000000..e2242c3a4c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/FIND.cmake.in
@@ -0,0 +1,20 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+
+list(FIND listvar "c" reference)
+set (output "$<LIST:FIND,a;b;c;d,c>")
+if (NOT output EQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(FIND listvar "e" reference)
+set (output "$<LIST:FIND,a;b;c;d,e>")
+if (NOT output EQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:FIND..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index1-result.txt b/Tests/RunCMake/GenEx-LIST/GET-wrong-index1-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index1-stderr.txt b/Tests/RunCMake/GenEx-LIST/GET-wrong-index1-stderr.txt
new file mode 100644
index 0000000000..dcd1f2f3bf
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index1-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at GET-wrong-index1.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:GET,,0>
+
+ given empty list
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index1.cmake b/Tests/RunCMake/GenEx-LIST/GET-wrong-index1.cmake
new file mode 100644
index 0000000000..4c395b318c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index1.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:GET,,0>")
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index2-result.txt b/Tests/RunCMake/GenEx-LIST/GET-wrong-index2-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index2-stderr.txt b/Tests/RunCMake/GenEx-LIST/GET-wrong-index2-stderr.txt
new file mode 100644
index 0000000000..20f1af4fd6
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index2-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at GET-wrong-index2.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:GET,a;b,2>
+
+ index: 2 out of range \(-2, 1\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index2.cmake b/Tests/RunCMake/GenEx-LIST/GET-wrong-index2.cmake
new file mode 100644
index 0000000000..28c97e2fd8
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index2.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:GET,a;b,2>")
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index3-result.txt b/Tests/RunCMake/GenEx-LIST/GET-wrong-index3-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index3-stderr.txt b/Tests/RunCMake/GenEx-LIST/GET-wrong-index3-stderr.txt
new file mode 100644
index 0000000000..a5dccbe953
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index3-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at GET-wrong-index3.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:GET,a;b,1,-3>
+
+ index: -3 out of range \(-2, 1\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/GET-wrong-index3.cmake b/Tests/RunCMake/GenEx-LIST/GET-wrong-index3.cmake
new file mode 100644
index 0000000000..fd7be176d3
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET-wrong-index3.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:GET,a;b,1,-3>")
diff --git a/Tests/RunCMake/GenEx-LIST/GET.cmake.in b/Tests/RunCMake/GenEx-LIST/GET.cmake.in
new file mode 100644
index 0000000000..102eb42e3d
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/GET.cmake.in
@@ -0,0 +1,20 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+
+list(GET listvar 0 2 reference)
+set (output "$<LIST:GET,a;b;c;d,0,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(GET listvar 0 -3 2 reference)
+set (output "$<LIST:GET,a;b;c;d,0,-3,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:GET..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1-result.txt b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1-stderr.txt b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1-stderr.txt
new file mode 100644
index 0000000000..ce36fb1197
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at INSERT-wrong-index1.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:INSERT,a;b;c,4,d>
+
+ index: 4 out of range \(-3, 3\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1.cmake b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1.cmake
new file mode 100644
index 0000000000..ead5832418
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index1.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:INSERT,a;b;c,4,d>")
diff --git a/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2-result.txt b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2-stderr.txt b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2-stderr.txt
new file mode 100644
index 0000000000..f0ea1d70c3
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at INSERT-wrong-index2.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:INSERT,a;b;c,-4,d>
+
+ index: -4 out of range \(-3, 3\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2.cmake b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2.cmake
new file mode 100644
index 0000000000..c057b876a9
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/INSERT-wrong-index2.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:INSERT,a;b;c,-4,d>")
diff --git a/Tests/RunCMake/GenEx-LIST/INSERT.cmake.in b/Tests/RunCMake/GenEx-LIST/INSERT.cmake.in
new file mode 100644
index 0000000000..d3bb9b9b18
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/INSERT.cmake.in
@@ -0,0 +1,50 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+
+list(INSERT listvar 1 e)
+set (output "$<LIST:INSERT,a;b;c;d,1,e>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+
+list(INSERT listvar 2 e f)
+set (output "$<LIST:INSERT,a;b;c;d,2,e,f>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(INSERT listvar 0 e f)
+set (output "$<LIST:INSERT,a;b;c;d,0,e;f>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(INSERT listvar -2 e f)
+set (output "$<LIST:INSERT,a;b;c;d,-2,e;f>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(INSERT listvar 3 e f)
+set (output "$<LIST:INSERT,a;b;c;d,3,e;f>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+unset(listvar)
+list(INSERT listvar 0 e f)
+set (output "$<LIST:INSERT,,0,e,f>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:INSERT..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/JOIN.cmake.in b/Tests/RunCMake/GenEx-LIST/JOIN.cmake.in
new file mode 100644
index 0000000000..0a564507be
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/JOIN.cmake.in
@@ -0,0 +1,35 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+
+list(JOIN listvar ":" reference)
+set (output "$<LIST:JOIN,a;b;c;d,:>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(JOIN listvar "" reference)
+set (output "$<LIST:JOIN,a;b;c;d,>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a)
+
+list(JOIN listvar ":" reference)
+set (output "$<LIST:JOIN,a,:>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+unset(listvar)
+
+list(JOIN listvar ":" reference)
+set (output "$<LIST:JOIN,,:>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+check_errors("LIST:JOIN..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/LENGTH.cmake.in b/Tests/RunCMake/GenEx-LIST/LENGTH.cmake.in
new file mode 100644
index 0000000000..0840e11116
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/LENGTH.cmake.in
@@ -0,0 +1,30 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+
+list(LENGTH listvar reference)
+set (output "$<LIST:LENGTH,a;b;c;d>")
+if (NOT output EQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar "")
+
+list(LENGTH listvar reference)
+set (output "$<LIST:LENGTH,>")
+if (NOT output EQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+unset(listvar)
+
+list(LENGTH listvar reference)
+set (output "$<LIST:LENGTH,>")
+if (NOT output EQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:LENGTH..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/POP_BACK.cmake.in b/Tests/RunCMake/GenEx-LIST/POP_BACK.cmake.in
new file mode 100644
index 0000000000..ba95c839c0
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/POP_BACK.cmake.in
@@ -0,0 +1,18 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+list(POP_BACK listvar)
+set (output "$<LIST:POP_BACK,a;b;c;d>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set (output "$<LIST:POP_BACK,>")
+if (NOT output STREQUAL "")
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:POP_BACK..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in b/Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in
new file mode 100644
index 0000000000..0d676af60e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in
@@ -0,0 +1,18 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+list(POP_FRONT listvar)
+set (output "$<LIST:POP_FRONT,a;b;c;d>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set (output "$<LIST:POP_FRONT,>")
+if (NOT output STREQUAL "")
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:POP_FRONT..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/PREPEND.cmake.in b/Tests/RunCMake/GenEx-LIST/PREPEND.cmake.in
new file mode 100644
index 0000000000..49b8f98239
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/PREPEND.cmake.in
@@ -0,0 +1,34 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+list(PREPEND listvar e)
+set (output "$<LIST:PREPEND,a;b;c;d,e>")
+if (NOT output STREQUAL listvar)
+ list (PREPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(PREPEND listvar e f)
+set (output "$<LIST:PREPEND,a;b;c;d,e,f>")
+if (NOT output STREQUAL listvar)
+ list (PREPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(PREPEND listvar e f)
+set (output "$<LIST:PREPEND,a;b;c;d,e;f>")
+if (NOT output STREQUAL listvar)
+ list (PREPEND errors "returns bad value: ${output}")
+endif()
+
+unset(listvar)
+list(PREPEND listvar e f)
+set (output "$<LIST:PREPEND,,e,f>")
+if (NOT output STREQUAL listvar)
+ list (PREPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:PREPEND..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1-result.txt b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1-stderr.txt b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1-stderr.txt
new file mode 100644
index 0000000000..b874f1d09b
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at REMOVE_AT-wrong-index1.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:REMOVE_AT,,0>
+
+ index: 0 out of range \(0, 0\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1.cmake b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1.cmake
new file mode 100644
index 0000000000..d87559e83b
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index1.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:REMOVE_AT,,0>")
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2-result.txt b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2-stderr.txt b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2-stderr.txt
new file mode 100644
index 0000000000..509eed4b16
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at REMOVE_AT-wrong-index2.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:REMOVE_AT,a;b;c,3>
+
+ index: 3 out of range \(-3, 2\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2.cmake b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2.cmake
new file mode 100644
index 0000000000..7ecfad2281
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index2.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:REMOVE_AT,a;b;c,3>")
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3-result.txt b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3-stderr.txt b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3-stderr.txt
new file mode 100644
index 0000000000..c8fc465062
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at REMOVE_AT-wrong-index3.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:REMOVE_AT,a;b;c,-4>
+
+ index: -4 out of range \(-3, 2\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3.cmake b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3.cmake
new file mode 100644
index 0000000000..f8f9a3e24b
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT-wrong-index3.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:REMOVE_AT,a;b;c,-4>")
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_AT.cmake.in b/Tests/RunCMake/GenEx-LIST/REMOVE_AT.cmake.in
new file mode 100644
index 0000000000..42a94766f9
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_AT.cmake.in
@@ -0,0 +1,25 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+list(REMOVE_AT listvar 1 3)
+set (output "$<LIST:REMOVE_AT,a;b;c;d,1,3>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(REMOVE_AT listvar 1 -2)
+set (output "$<LIST:REMOVE_AT,a;b;c;d,1;-2>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set (output "$<LIST:REMOVE_AT,a;b;c;d,1,0,3;2>")
+if (NOT output STREQUAL "")
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:REMOVE_AT..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_DUPLICATES.cmake.in b/Tests/RunCMake/GenEx-LIST/REMOVE_DUPLICATES.cmake.in
new file mode 100644
index 0000000000..8785ae522a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_DUPLICATES.cmake.in
@@ -0,0 +1,20 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+list(REMOVE_DUPLICATES listvar)
+set (output "$<LIST:REMOVE_DUPLICATES,a;b;c;d>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar "b;c;b;a;a;c;b;a;c;b")
+list(REMOVE_DUPLICATES listvar)
+set (output "$<LIST:REMOVE_DUPLICATES,b;c;b;a;a;c;b;a;c;b>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:REMOVE_DUPLICATES..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/REMOVE_ITEM.cmake.in b/Tests/RunCMake/GenEx-LIST/REMOVE_ITEM.cmake.in
new file mode 100644
index 0000000000..5434a5d51d
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REMOVE_ITEM.cmake.in
@@ -0,0 +1,32 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+list(REMOVE_ITEM listvar b d)
+set (output "$<LIST:REMOVE_ITEM,a;b;c;d,b,d>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(REMOVE_ITEM listvar b e)
+set (output "$<LIST:REMOVE_ITEM,a;b;c;d,b,e>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar a b c d)
+list(REMOVE_ITEM listvar b a d c)
+set (output "$<LIST:REMOVE_ITEM,a;b;c;d,b;a;d;c>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set (output "$<LIST:REMOVE_ITEM,,b;a;d;c>")
+if (NOT output STREQUAL "")
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:REMOVE_ITEM..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/REVERSE.cmake.in b/Tests/RunCMake/GenEx-LIST/REVERSE.cmake.in
new file mode 100644
index 0000000000..295e1a3c8a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/REVERSE.cmake.in
@@ -0,0 +1,19 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+
+list(REVERSE listvar)
+set (output "$<LIST:REVERSE,a;b;c;d>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set (output "$<LIST:REVERSE,>")
+if (NOT output STREQUAL "")
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:REVERSE..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-LIST/RunCMakeTest.cmake
new file mode 100644
index 0000000000..1946e84915
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/RunCMakeTest.cmake
@@ -0,0 +1,130 @@
+
+include(RunCMake)
+
+run_cmake(no-arguments)
+run_cmake(bad-option)
+
+function(check_list_syntax name test)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-${test}-build)
+ set(RunCMake_TEST_VARIANT_DESCRIPTION " - ${name}")
+ run_cmake_with_options(${test} ${ARGN})
+endfunction()
+
+## Unexpected arguments
+### sub-commands with one argument
+foreach (subcommand IN ITEMS LENGTH POP_BACK POP_FRONT REMOVE_DUPLICATES REVERSE)
+ check_list_syntax (${subcommand} unexpected-arg "-DLIST_ARGUMENTS=${subcommand},ARG1,ARG2")
+endforeach()
+
+### sub-commands with two arguments
+foreach (subcommand IN ITEMS FIND JOIN)
+ check_list_syntax (${subcommand} unexpected-arg "-DLIST_ARGUMENTS=${subcommand},ARG1,ARG2,ARG3")
+endforeach()
+
+### sub-commands with three arguments
+foreach (subcommand IN ITEMS SUBLIST FILTER)
+ check_list_syntax (${subcommand} unexpected-arg "-DLIST_ARGUMENTS=${subcommand},ARG1,ARG2,ARG3,ARG4")
+endforeach()
+
+# TRANSFORM sub-commands
+ set(RunCMake-stderr-file "TRANSFORM-unexpected-arg-stderr.txt")
+foreach (action IN ITEMS TOLOWER TOUPPER STRIP)
+ check_list_syntax (TRANSFORM-${action} unexpected-arg "-DLIST_ARGUMENTS=TRANSFORM,ARG1,${action},ARG2")
+endforeach()
+foreach (action IN ITEMS APPEND PREPEND)
+ check_list_syntax (TRANSFORM-${action} unexpected-arg "-DLIST_ARGUMENTS=TRANSFORM,ARG1,${action},ARG2,ARG3")
+endforeach()
+foreach (action IN ITEMS REPLACE)
+ check_list_syntax (TRANSFORM-${action} unexpected-arg "-DLIST_ARGUMENTS=TRANSFORM,ARG1,${action},ARG2,ARG3,ARG4")
+endforeach()
+check_list_syntax (TRANSFORM-SELECTOR-REGEX unexpected-arg "-DLIST_ARGUMENTS=TRANSFORM,ARG1,STRIP,REGEX,ARG2,ARG3")
+check_list_syntax (TRANSFORM-SELECTOR-FOR unexpected-arg "-DLIST_ARGUMENTS=TRANSFORM,ARG1,STRIP,FOR,1,2,3,4")
+unset(RunCMake-stderr-file)
+
+## Missing arguments
+### sub-command with, at least, two arguments
+foreach (subcommand IN ITEMS GET APPEND PREPEND REMOVE_ITEM REMOVE_AT TRANSFORM)
+ check_list_syntax (${subcommand} missing-arg "-DLIST_ARGUMENTS=${subcommand},ARG1")
+endforeach()
+
+### sub-command with, at least, three arguments
+foreach (subcommand IN ITEMS INSERT)
+ check_list_syntax (${subcommand} missing-arg "-DLIST_ARGUMENTS=${subcommand},ARG1,ARG2")
+endforeach()
+
+# TRANSFORM sub-commands
+set(RunCMake-stderr-file "TRANSFORM-missing-arg-stderr.txt")
+foreach (action IN ITEMS APPEND PREPEND)
+ check_list_syntax (TRANSFORM-${action} missing-arg "-DLIST_ARGUMENTS=TRANSFORM,ARG1,${action}")
+endforeach()
+check_list_syntax (TRANSFORM-REPLACE-1 missing-arg "-DLIST_ARGUMENTS=TRANSFORM,ARG1,REPLACE,ARG2")
+check_list_syntax (TRANSFORM-REPLACE-2 missing-arg "-DLIST_ARGUMENTS=TRANSFORM,ARG1,REPLACE")
+unset(RunCMake-stderr-file)
+
+
+run_cmake(GET-wrong-index1)
+run_cmake(GET-wrong-index2)
+run_cmake(GET-wrong-index3)
+run_cmake(SUBLIST-wrong-argument1)
+run_cmake(SUBLIST-wrong-argument2)
+run_cmake(INSERT-wrong-index1)
+run_cmake(INSERT-wrong-index2)
+run_cmake(REMOVE_AT-wrong-index1)
+run_cmake(REMOVE_AT-wrong-index2)
+run_cmake(REMOVE_AT-wrong-index3)
+run_cmake(FILTER-wrong-operator)
+run_cmake(FILTER-wrong-regex)
+run_cmake(TRANSFORM-wrong-action)
+run_cmake(TRANSFORM-REPLACE-wrong-regex)
+run_cmake(TRANSFORM-REPLACE-invalid-replace1)
+run_cmake(TRANSFORM-REPLACE-invalid-replace2)
+run_cmake(TRANSFORM-selector-REGEX-no-arguments)
+run_cmake(TRANSFORM-selector-REGEX-wrong-regex)
+run_cmake(TRANSFORM-selector-AT-no-arguments)
+run_cmake(TRANSFORM-selector-AT-wrong-argument)
+run_cmake(TRANSFORM-selector-AT-wrong-index)
+run_cmake(TRANSFORM-selector-FOR-no-arguments)
+run_cmake(TRANSFORM-selector-FOR-missing-arguments)
+run_cmake(TRANSFORM-selector-FOR-wrong-argument)
+run_cmake(TRANSFORM-selector-FOR-wrong-index)
+run_cmake(TRANSFORM-selector-FOR-zero-step)
+run_cmake(TRANSFORM-selector-FOR-negative-step)
+run_cmake(TRANSFORM-selector-FOR-backwards-range)
+run_cmake(SORT-wrong-option)
+run_cmake(SORT-wrong-COMPARE-option)
+run_cmake(SORT-wrong-CASE-option)
+run_cmake(SORT-wrong-ORDER-option)
+run_cmake(SORT-duplicate-COMPARE-option)
+run_cmake(SORT-duplicate-CASE-option)
+run_cmake(SORT-duplicate-ORDER-option)
+
+
+function(check_list_execution name)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_VARIANT_DESCRIPTION " - ${name}")
+ run_cmake_with_options(generate -DLIST_TEST=${name})
+ run_cmake_command(check "${CMAKE_COMMAND}" "-DRunCMake_SOURCE_DIR=${RunCMake_SOURCE_DIR}" -P "${RunCMake_TEST_BINARY_DIR}/${name}.cmake")
+endfunction()
+
+check_list_execution (LENGTH)
+check_list_execution (GET)
+check_list_execution (JOIN)
+check_list_execution (SUBLIST)
+check_list_execution (FIND)
+check_list_execution (APPEND)
+check_list_execution (PREPEND)
+check_list_execution (INSERT)
+check_list_execution (POP_BACK)
+check_list_execution (POP_FRONT)
+check_list_execution (REMOVE_ITEM)
+check_list_execution (REMOVE_AT)
+check_list_execution (REMOVE_DUPLICATES)
+check_list_execution (TRANSFORM-TOUPPER)
+check_list_execution (TRANSFORM-TOLOWER)
+check_list_execution (TRANSFORM-STRIP)
+check_list_execution (TRANSFORM-APPEND)
+check_list_execution (TRANSFORM-PREPEND)
+check_list_execution (TRANSFORM-REPLACE)
+check_list_execution (REVERSE)
+check_list_execution (SORT)
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option-result.txt b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option-stderr.txt b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option-stderr.txt
new file mode 100644
index 0000000000..4f3121a361
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at SORT-duplicate-CASE-option.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SORT,a;b,COMPARE:STRING,CASE:SENSITIVE,CASE:SENSITIVE>
+
+ sub-command SORT, CASE option has been specified multiple times.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option.cmake b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option.cmake
new file mode 100644
index 0000000000..e09dc6ca07
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-CASE-option.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SORT,a;b,COMPARE:STRING,CASE:SENSITIVE,CASE:SENSITIVE>")
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option-result.txt b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option-stderr.txt b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option-stderr.txt
new file mode 100644
index 0000000000..fbb96bbb29
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at SORT-duplicate-COMPARE-option.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SORT,a;b,COMPARE:STRING,COMPARE:NATURAL>
+
+ sub-command SORT, COMPARE option has been specified multiple times.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option.cmake b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option.cmake
new file mode 100644
index 0000000000..cf8da0d32e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-COMPARE-option.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SORT,a;b,COMPARE:STRING,COMPARE:NATURAL>")
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option-result.txt b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option-stderr.txt b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option-stderr.txt
new file mode 100644
index 0000000000..b45034a7db
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at SORT-duplicate-ORDER-option.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SORT,a;b,ORDER:ASCENDING,COMPARE:STRING,ORDER:DESCENDING,CASE:SENSITIVE>
+
+ sub-command SORT, ORDER option has been specified multiple times.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option.cmake b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option.cmake
new file mode 100644
index 0000000000..3826072fdc
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-duplicate-ORDER-option.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SORT,a;b,ORDER:ASCENDING,COMPARE:STRING,ORDER:DESCENDING,CASE:SENSITIVE>")
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option-result.txt b/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option-stderr.txt b/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option-stderr.txt
new file mode 100644
index 0000000000..d36e63b1ec
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at SORT-wrong-CASE-option.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SORT,a;b,COMPARE:STRING,CASE:WRONG_OPTION>
+
+ sub-command SORT, an invalid CASE option has been specified:
+ "WRONG_OPTION".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option.cmake b/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option.cmake
new file mode 100644
index 0000000000..58df9ea3dc
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-CASE-option.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SORT,a;b,COMPARE:STRING,CASE:WRONG_OPTION>")
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option-result.txt b/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option-stderr.txt b/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option-stderr.txt
new file mode 100644
index 0000000000..70a99c6419
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at SORT-wrong-COMPARE-option.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SORT,a;b,COMPARE:WRONG_OPTION>
+
+ sub-command SORT, an invalid COMPARE option has been specified:
+ "WRONG_OPTION".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option.cmake b/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option.cmake
new file mode 100644
index 0000000000..73727bb416
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-COMPARE-option.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SORT,a;b,COMPARE:WRONG_OPTION>")
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option-result.txt b/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option-stderr.txt b/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option-stderr.txt
new file mode 100644
index 0000000000..2e23d8c4b0
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at SORT-wrong-ORDER-option.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SORT,a;b,COMPARE:STRING,CASE:SENSITIVE,ORDER:WRONG_OPTION>
+
+ sub-command SORT, an invalid ORDER option has been specified:
+ "WRONG_OPTION".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option.cmake b/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option.cmake
new file mode 100644
index 0000000000..135c9350eb
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-ORDER-option.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SORT,a;b,COMPARE:STRING,CASE:SENSITIVE,ORDER:WRONG_OPTION>")
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-option-result.txt b/Tests/RunCMake/GenEx-LIST/SORT-wrong-option-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-option-stderr.txt b/Tests/RunCMake/GenEx-LIST/SORT-wrong-option-stderr.txt
new file mode 100644
index 0000000000..3c2d492508
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-option-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at SORT-wrong-option.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SORT,a;b,WRONG_OPTION>
+
+ sub-command SORT, option "WRONG_OPTION" is invalid.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SORT-wrong-option.cmake b/Tests/RunCMake/GenEx-LIST/SORT-wrong-option.cmake
new file mode 100644
index 0000000000..fca268b817
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT-wrong-option.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SORT,a;b,WRONG_OPTION>")
diff --git a/Tests/RunCMake/GenEx-LIST/SORT.cmake.in b/Tests/RunCMake/GenEx-LIST/SORT.cmake.in
new file mode 100644
index 0000000000..aca6691f90
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SORT.cmake.in
@@ -0,0 +1,92 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(source_unsorted c/B.h a/c.h B/a.h)
+
+set(listvar ${source_unsorted})
+list(SORT listvar)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar ${source_unsorted})
+list(SORT listvar CASE INSENSITIVE ORDER ASCENDING COMPARE STRING)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h,CASE:INSENSITIVE,ORDER:ASCENDING,COMPARE:STRING>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar ${source_unsorted})
+list(SORT listvar CASE INSENSITIVE ORDER DESCENDING COMPARE STRING)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h,CASE:INSENSITIVE,ORDER:DESCENDING,COMPARE:STRING>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar ${source_unsorted})
+list(SORT listvar CASE SENSITIVE ORDER ASCENDING COMPARE STRING)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h,CASE:SENSITIVE,ORDER:ASCENDING,COMPARE:STRING>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar ${source_unsorted})
+list(SORT listvar CASE SENSITIVE ORDER DESCENDING COMPARE STRING)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h,CASE:SENSITIVE,ORDER:DESCENDING,COMPARE:STRING>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar ${source_unsorted})
+list(SORT listvar CASE INSENSITIVE ORDER ASCENDING COMPARE FILE_BASENAME)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h,CASE:INSENSITIVE,ORDER:ASCENDING,COMPARE:FILE_BASENAME>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar ${source_unsorted})
+list(SORT listvar CASE INSENSITIVE ORDER DESCENDING COMPARE FILE_BASENAME)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h,CASE:INSENSITIVE,ORDER:DESCENDING,COMPARE:FILE_BASENAME>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar ${source_unsorted})
+list(SORT listvar CASE SENSITIVE ORDER ASCENDING COMPARE FILE_BASENAME)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h,CASE:SENSITIVE,ORDER:ASCENDING,COMPARE:FILE_BASENAME>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar ${source_unsorted})
+list(SORT listvar CASE SENSITIVE ORDER DESCENDING COMPARE FILE_BASENAME)
+set (output "$<LIST:SORT,c/B.h;a/c.h;B/a.h,CASE:SENSITIVE,ORDER:DESCENDING,COMPARE:FILE_BASENAME>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar 10.0 1.1 2.1 8.0 2.0 3.1)
+list(SORT listvar CASE SENSITIVE ORDER DESCENDING COMPARE STRING)
+set (output "$<LIST:SORT,10.0;1.1;2.1;8.0;2.0;3.1,CASE:SENSITIVE,ORDER:DESCENDING,COMPARE:STRING>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar 10.0 1.1 2.1 8.0 2.0 3.1)
+list(SORT listvar CASE SENSITIVE ORDER DESCENDING COMPARE NATURAL)
+set (output "$<LIST:SORT,10.0;1.1;2.1;8.0;2.0;3.1,CASE:SENSITIVE,ORDER:DESCENDING,COMPARE:NATURAL>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+set(listvar 10.0 1.1 2.1 8.0 2.0 3.1)
+list(SORT listvar CASE SENSITIVE ORDER ASCENDING COMPARE NATURAL)
+set (output "$<LIST:SORT,10.0;1.1;2.1;8.0;2.0;3.1,CASE:SENSITIVE,ORDER:ASCENDING,COMPARE:NATURAL>")
+if (NOT output STREQUAL listvar)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:SORT..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1-result.txt b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1-stderr.txt b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1-stderr.txt
new file mode 100644
index 0000000000..078f345e3f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at SUBLIST-wrong-argument1.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SUBLIST,a;b;c,3,-1>
+
+ begin index: 3 is out of range 0 - 2
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1.cmake b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1.cmake
new file mode 100644
index 0000000000..293c2ae977
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument1.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SUBLIST,a;b;c,3,-1>")
diff --git a/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2-result.txt b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2-stderr.txt b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2-stderr.txt
new file mode 100644
index 0000000000..7271b30b3f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at SUBLIST-wrong-argument2.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:SUBLIST,a;b;c,1,-2>
+
+ length: -2 should be -1 or greater
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2.cmake b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2.cmake
new file mode 100644
index 0000000000..9d1db53245
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SUBLIST-wrong-argument2.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:SUBLIST,a;b;c,1,-2>")
diff --git a/Tests/RunCMake/GenEx-LIST/SUBLIST.cmake.in b/Tests/RunCMake/GenEx-LIST/SUBLIST.cmake.in
new file mode 100644
index 0000000000..9fcb6d50ab
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/SUBLIST.cmake.in
@@ -0,0 +1,32 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar a b c d)
+
+list(SUBLIST listvar 1 2 reference)
+set (output "$<LIST:SUBLIST,a;b;c;d,1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(SUBLIST listvar 1 -1 reference)
+set (output "$<LIST:SUBLIST,a;b;c;d,1,-1>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(SUBLIST listvar 1 0 reference)
+set (output "$<LIST:SUBLIST,a;b;c;d,1,0>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(SUBLIST listvar 1 5 reference)
+set (output "$<LIST:SUBLIST,a;b;c;d,1,5>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:SUBLIST..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-APPEND.cmake.in b/Tests/RunCMake/GenEx-LIST/TRANSFORM-APPEND.cmake.in
new file mode 100644
index 0000000000..a6529ec578
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-APPEND.cmake.in
@@ -0,0 +1,50 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar alpha bravo charlie delta)
+
+list(TRANSFORM listvar APPEND "_A" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,APPEND,_A>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar APPEND "_A" AT 1 3 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,APPEND,_A,AT,1,3>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar APPEND "_A" AT 1 -2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,APPEND,_A,AT,1,-2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar APPEND "_A" FOR 1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,APPEND,_A,FOR,1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar APPEND "_A" FOR 1 -1 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,APPEND,_A,FOR,1,-1>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar APPEND "_A" FOR 1 -1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,APPEND,_A,FOR,1,-1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar APPEND "_A" REGEX "(r|t)a" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,APPEND,_A,REGEX,(r|t)a>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:TRANSFORM,APPEND..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-PREPEND.cmake.in b/Tests/RunCMake/GenEx-LIST/TRANSFORM-PREPEND.cmake.in
new file mode 100644
index 0000000000..5ec6acdcc8
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-PREPEND.cmake.in
@@ -0,0 +1,50 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar alpha bravo charlie delta)
+
+list(TRANSFORM listvar PREPEND "P_" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,PREPEND,P_>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar PREPEND "P_" AT 1 3 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,PREPEND,P_,AT,1,3>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar PREPEND "P_" AT 1 -2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,PREPEND,P_,AT,1,-2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar PREPEND "P_" FOR 1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,PREPEND,P_,FOR,1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar PREPEND "P_" FOR 1 -1 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,PREPEND,P_,FOR,1,-1>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar PREPEND "P_" FOR 1 -1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,PREPEND,P_,FOR,1,-1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar PREPEND "P_" REGEX "(r|t)a" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,PREPEND,P_,REGEX,(r|t)a>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:TRANSFORM,PREPEND..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1-stderr.txt
new file mode 100644
index 0000000000..6674b30688
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TRANSFORM-REPLACE-invalid-replace1.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,REPLACE,\^a,b\\>
+
+ sub-command TRANSFORM, action REPLACE: replace-expression ends in a
+ backslash.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1.cmake
new file mode 100644
index 0000000000..d45e1fdaf4
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace1.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,REPLACE,^a,b\\>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2-stderr.txt
new file mode 100644
index 0000000000..2351b72eb1
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TRANSFORM-REPLACE-invalid-replace2.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,REPLACE,\^a,\\b>
+
+ sub-command TRANSFORM, action REPLACE: Unknown escape "\\b" in
+ replace-expression.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2.cmake
new file mode 100644
index 0000000000..b800f24f2e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-invalid-replace2.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,REPLACE,^a,\\b>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex-stderr.txt
new file mode 100644
index 0000000000..617c3d6d04
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-REPLACE-wrong-regex.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,REPLACE,\(a,b>
+
+ sub-command TRANSFORM, action REPLACE: Failed to compile regex "\(a".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex.cmake
new file mode 100644
index 0000000000..941e3e7ff8
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE-wrong-regex.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,REPLACE,(a,b>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE.cmake.in b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE.cmake.in
new file mode 100644
index 0000000000..5fba23109c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-REPLACE.cmake.in
@@ -0,0 +1,50 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar alpha bravo charlie delta)
+
+list(TRANSFORM listvar REPLACE "(.+a)$" "\\1_\\1" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,REPLACE,(.+a)$,\1_\1>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar REPLACE "(.+a)$" "\\1_\\1" AT 1 3 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,REPLACE,(.+a)$,\1_\1,AT,1,3>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar REPLACE "(.+a)$" "\\1_\\1" AT 1 -2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,REPLACE,(.+a)$,\1_\1,AT,1,-2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar REPLACE "(.+a)$" "\\1_\\1" FOR 1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,REPLACE,(.+a)$,\1_\1,FOR,1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar REPLACE "(.+a)$" "\\1_\\1" FOR 1 -1 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,REPLACE,(.+a)$,\1_\1,FOR,1,-1>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar REPLACE "(.+a)$" "\\1_\\1" FOR 1 -1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,REPLACE,(.+a)$,\1_\1,FOR,1,-1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar REPLACE "(.+a)$" "\\1_\\1" REGEX "(r|t)a" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,REPLACE,(.+a)$,\1_\1,REGEX,(r|t)a>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:TRANSFORM,REPLACE..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-STRIP.cmake.in b/Tests/RunCMake/GenEx-LIST/TRANSFORM-STRIP.cmake.in
new file mode 100644
index 0000000000..860faec771
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-STRIP.cmake.in
@@ -0,0 +1,50 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar " alpha" "bravo " " charlie " delta)
+
+list(TRANSFORM listvar STRIP OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM, alpha;bravo ; charlie ;delta,STRIP>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar STRIP AT 1 3 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM, alpha;bravo ; charlie ;delta,STRIP,AT,1,3>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar STRIP AT 1 -2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM, alpha;bravo ; charlie ;delta,STRIP,AT,1,-2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar STRIP FOR 1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM, alpha;bravo ; charlie ;delta,STRIP,FOR,1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar STRIP FOR 1 -1 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM, alpha;bravo ; charlie ;delta,STRIP,FOR,1,-1>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar STRIP FOR 1 -1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM, alpha;bravo ; charlie ;delta,STRIP,FOR,1,-1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar STRIP REGEX "(r|t)a" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM, alpha;bravo ; charlie ;delta,STRIP,REGEX,(r|t)a>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:TRANSFORM,STRIP..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-TOLOWER.cmake.in b/Tests/RunCMake/GenEx-LIST/TRANSFORM-TOLOWER.cmake.in
new file mode 100644
index 0000000000..43e99556c6
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-TOLOWER.cmake.in
@@ -0,0 +1,50 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar ALPHA BRAVO CHARLIE DELTA)
+
+list(TRANSFORM listvar TOLOWER OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,ALPHA;BRAVO;CHARLIE;DELTA,TOLOWER>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOLOWER AT 1 3 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,ALPHA;BRAVO;CHARLIE;DELTA,TOLOWER,AT,1,3>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOLOWER AT 1 -2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,ALPHA;BRAVO;CHARLIE;DELTA,TOLOWER,AT,1,-2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOLOWER FOR 1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,ALPHA;BRAVO;CHARLIE;DELTA,TOLOWER,FOR,1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOLOWER FOR 1 -1 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,ALPHA;BRAVO;CHARLIE;DELTA,TOLOWER,FOR,1,-1>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOLOWER FOR 1 -1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,ALPHA;BRAVO;CHARLIE;DELTA,TOLOWER,FOR,1,-1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOLOWER REGEX "(R|T)A" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,ALPHA;BRAVO;CHARLIE;DELTA,TOLOWER,REGEX,(R|T)A>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:TRANSFORM,TOLOWER..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-TOUPPER.cmake.in b/Tests/RunCMake/GenEx-LIST/TRANSFORM-TOUPPER.cmake.in
new file mode 100644
index 0000000000..be2bc3039c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-TOUPPER.cmake.in
@@ -0,0 +1,50 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set(listvar alpha bravo charlie delta)
+
+list(TRANSFORM listvar TOUPPER OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,TOUPPER>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOUPPER AT 1 3 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,TOUPPER,AT,1,3>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOUPPER AT 1 -2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,TOUPPER,AT,1,-2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOUPPER FOR 1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,TOUPPER,FOR,1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOUPPER FOR 1 -1 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,TOUPPER,FOR,1,-1>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOUPPER FOR 1 -1 2 OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,TOUPPER,FOR,1,-1,2>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+list(TRANSFORM listvar TOUPPER REGEX "(r|t)a" OUTPUT_VARIABLE reference)
+set (output "$<LIST:TRANSFORM,alpha;bravo;charlie;delta,TOUPPER,REGEX,(r|t)a>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "returns bad value: ${output}")
+endif()
+
+
+check_errors("LIST:TRANSFORM,TOUPPER..." ${errors})
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-missing-arg-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-missing-arg-stderr.txt
new file mode 100644
index 0000000000..46e36c3bcc
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-missing-arg-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at missing-arg.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,ARG1,[A-Z]+(,ARG[0-9])?>
+
+ sub-command TRANSFORM, action [A-Z]+ expects (1|2) argument\(s\).
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments-stderr.txt
new file mode 100644
index 0000000000..69b4915e74
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-selector-AT-no-arguments.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,TOUPPER,AT>
+
+ sub-command TRANSFORM, selector AT expects at least one numeric value.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments.cmake
new file mode 100644
index 0000000000..2447511598
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-no-arguments.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,TOUPPER,AT>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument-stderr.txt
new file mode 100644
index 0000000000..40007a181c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-selector-AT-wrong-argument.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,TOUPPER,AT,0,1x,2>
+
+ sub-command TRANSFORM, selector AT: '1x': unexpected argument.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument.cmake
new file mode 100644
index 0000000000..49f4e908d8
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-argument.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,TOUPPER,AT,0,1x,2>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index-stderr.txt
new file mode 100644
index 0000000000..66085ab862
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-selector-AT-wrong-index.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b;c,TOUPPER,AT,0,3,2>
+
+ sub-command TRANSFORM, selector AT, index: 3 out of range \(-3, 2\).
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index.cmake
new file mode 100644
index 0000000000..fd6c3ed1ef
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-AT-wrong-index.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b;c,TOUPPER,AT,0,3,2>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range-stderr.txt
new file mode 100644
index 0000000000..77cffdc831
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TRANSFORM-selector-FOR-backwards-range.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,2,0>
+
+ sub-command TRANSFORM, selector FOR expects <start> to be no greater than
+ <stop> \(2 > 0\)
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range.cmake
new file mode 100644
index 0000000000..17f57f586e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-backwards-range.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,2,0>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments-stderr.txt
new file mode 100644
index 0000000000..a9de7f8070
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-selector-FOR-missing-arguments.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,TOUPPER,FOR,0>
+
+ sub-command TRANSFORM, selector FOR expects, at least, two arguments.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments.cmake
new file mode 100644
index 0000000000..5ae481aac2
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-missing-arguments.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,TOUPPER,FOR,0>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step-stderr.txt
new file mode 100644
index 0000000000..9c81de4bf6
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TRANSFORM-selector-FOR-negative-step.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,0,2,-1>
+
+ sub-command TRANSFORM, selector FOR expects positive numeric value for
+ <step>.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step.cmake
new file mode 100644
index 0000000000..b8e6433617
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-negative-step.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,0,2,-1>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments-stderr.txt
new file mode 100644
index 0000000000..d31f171bfc
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-selector-FOR-no-arguments.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,TOUPPER,FOR>
+
+ sub-command TRANSFORM, selector FOR expects, at least, two arguments.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments.cmake
new file mode 100644
index 0000000000..6545ff95e6
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-no-arguments.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,TOUPPER,FOR>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument-stderr.txt
new file mode 100644
index 0000000000..727be10714
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-selector-FOR-wrong-argument.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,0,1x,2>
+
+ sub-command TRANSFORM, selector FOR expects, at least, two numeric values.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument.cmake
new file mode 100644
index 0000000000..a50b62c1d8
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-argument.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,0,1x,2>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index-stderr.txt
new file mode 100644
index 0000000000..664e35a591
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-selector-FOR-wrong-index.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,0,4,2>
+
+ sub-command TRANSFORM, selector FOR, index: 4 out of range \(-3, 2\).
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index.cmake
new file mode 100644
index 0000000000..f35bfbf027
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-wrong-index.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,0,4,2>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step-stderr.txt
new file mode 100644
index 0000000000..e542fbfcdb
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TRANSFORM-selector-FOR-zero-step.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,0,2,0>
+
+ sub-command TRANSFORM, selector FOR expects positive numeric value for
+ <step>.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step.cmake
new file mode 100644
index 0000000000..2bfaab0907
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-FOR-zero-step.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b;c,TOUPPER,FOR,0,2,0>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments-stderr.txt
new file mode 100644
index 0000000000..079172b03d
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TRANSFORM-selector-REGEX-no-arguments.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,TOUPPER,REGEX>
+
+ sub-command TRANSFORM, selector REGEX expects 'regular expression'
+ argument.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments.cmake
new file mode 100644
index 0000000000..1f802b757e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-no-arguments.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,TOUPPER,REGEX>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex-stderr.txt
new file mode 100644
index 0000000000..3fe2b014a7
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TRANSFORM-selector-REGEX-wrong-regex.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b,TOUPPER,REGEX,\(a>
+
+ sub-command TRANSFORM, selector REGEX failed to compile regex "\(a".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex.cmake
new file mode 100644
index 0000000000..164809206c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-selector-REGEX-wrong-regex.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b,TOUPPER,REGEX,(a>")
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-unexpected-arg-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-unexpected-arg-stderr.txt
new file mode 100644
index 0000000000..04e9df1679
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-unexpected-arg-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at unexpected-arg.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,ARG1,[A-Z_]+(,[A-Z0-9]+)+>
+
+ sub-command TRANSFORM, '[A-Z0-9]+': unexpected argument\(s\).
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action-result.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action-stderr.txt b/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action-stderr.txt
new file mode 100644
index 0000000000..1c30c4f903
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error at TRANSFORM-wrong-action.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:TRANSFORM,a;b;c,WRONG_ACTION>
+ sub-command TRANSFORM, WRONG_ACTION invalid action.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action.cmake b/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action.cmake
new file mode 100644
index 0000000000..fba6c90f43
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/TRANSFORM-wrong-action.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:TRANSFORM,a;b;c,WRONG_ACTION>")
diff --git a/Tests/RunCMake/GenEx-LIST/bad-option-result.txt b/Tests/RunCMake/GenEx-LIST/bad-option-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/bad-option-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/bad-option-stderr.txt b/Tests/RunCMake/GenEx-LIST/bad-option-stderr.txt
new file mode 100644
index 0000000000..37048c5f0e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/bad-option-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at bad-option.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:BAD_OPTION,ARG>
+
+ BAD_OPTION: invalid option.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/bad-option.cmake b/Tests/RunCMake/GenEx-LIST/bad-option.cmake
new file mode 100644
index 0000000000..d1dc85f276
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/bad-option.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:BAD_OPTION,ARG>")
diff --git a/Tests/RunCMake/GenEx-LIST/check_errors.cmake b/Tests/RunCMake/GenEx-LIST/check_errors.cmake
new file mode 100644
index 0000000000..7e60fc725e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/check_errors.cmake
@@ -0,0 +1,13 @@
+
+function (CHECK_ERRORS command)
+ set (errors ${ARGN})
+ set (command "$<${command}>")
+ if (errors)
+ string (LENGTH "${command}" length)
+ math (EXPR count "${length} + 2")
+ string (REPEAT " " ${count} shift)
+ list (TRANSFORM errors PREPEND "${shift}")
+ list (JOIN errors "\n" msg)
+ message (FATAL_ERROR "${command}: ${msg}")
+ endif()
+endfunction()
diff --git a/Tests/RunCMake/GenEx-LIST/generate.cmake b/Tests/RunCMake/GenEx-LIST/generate.cmake
new file mode 100644
index 0000000000..92cdca2a5d
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/generate.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT "${LIST_TEST}.cmake" INPUT "${LIST_TEST}.cmake.in")
diff --git a/Tests/RunCMake/GenEx-LIST/missing-arg-result.txt b/Tests/RunCMake/GenEx-LIST/missing-arg-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/missing-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/missing-arg-stderr.txt b/Tests/RunCMake/GenEx-LIST/missing-arg-stderr.txt
new file mode 100644
index 0000000000..c7cbe4b13a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/missing-arg-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at missing-arg.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:[A-Z_]+,.+>
+
+ \$<LIST:[A-Z_]+> expression requires at least (two|three) parameters.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/missing-arg.cmake b/Tests/RunCMake/GenEx-LIST/missing-arg.cmake
new file mode 100644
index 0000000000..48b26e13af
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/missing-arg.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:${LIST_ARGUMENTS}>")
diff --git a/Tests/RunCMake/GenEx-LIST/no-arguments-result.txt b/Tests/RunCMake/GenEx-LIST/no-arguments-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/no-arguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/no-arguments-stderr.txt b/Tests/RunCMake/GenEx-LIST/no-arguments-stderr.txt
new file mode 100644
index 0000000000..ee782ecfde
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/no-arguments-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at no-arguments.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:>
+
+ \$<LIST> expression requires at least two parameters.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/no-arguments.cmake b/Tests/RunCMake/GenEx-LIST/no-arguments.cmake
new file mode 100644
index 0000000000..f704e2b76e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/no-arguments.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:>")
diff --git a/Tests/RunCMake/GenEx-LIST/unexpected-arg-result.txt b/Tests/RunCMake/GenEx-LIST/unexpected-arg-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/unexpected-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-LIST/unexpected-arg-stderr.txt b/Tests/RunCMake/GenEx-LIST/unexpected-arg-stderr.txt
new file mode 100644
index 0000000000..a7b1f25e1e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/unexpected-arg-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at unexpected-arg.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<LIST:[A-Z_]+,.+>
+
+ \$<LIST:[A-Z_]+(,[A-Z_]+)?> expression requires exactly (one|two|three) parameters?.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-LIST/unexpected-arg.cmake b/Tests/RunCMake/GenEx-LIST/unexpected-arg.cmake
new file mode 100644
index 0000000000..48b26e13af
--- /dev/null
+++ b/Tests/RunCMake/GenEx-LIST/unexpected-arg.cmake
@@ -0,0 +1,2 @@
+
+file(GENERATE OUTPUT result.txt CONTENT "$<LIST:${LIST_ARGUMENTS}>")
diff --git a/Tests/RunCMake/GenEx-PATH/ABSOLUTE_PATH.cmake.in b/Tests/RunCMake/GenEx-PATH/ABSOLUTE_PATH.cmake.in
index cc5ff54d14..d1cb61bc21 100644
--- a/Tests/RunCMake/GenEx-PATH/ABSOLUTE_PATH.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/ABSOLUTE_PATH.cmake.in
@@ -31,4 +31,28 @@ if (NOT output STREQUAL reference)
endif()
+######################################
+## tests with list of paths
+######################################
+unset (reference)
+foreach(item IN ITEMS "../../a/d" "/a/d/../e")
+ cmake_path(ABSOLUTE_PATH item BASE_DIRECTORY "/x/y/a/f")
+ list(APPEND reference "${item}")
+endforeach()
+set(output "$<PATH:ABSOLUTE_PATH,../../a/d;/a/d/../e,/x/y/a/f>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+unset (reference)
+foreach(item IN ITEMS "../../a/d" "/a/d/../e")
+ cmake_path(ABSOLUTE_PATH item BASE_DIRECTORY "/x/y/a/f" NORMALIZE)
+ list(APPEND reference "${item}")
+endforeach()
+set(output "$<PATH:ABSOLUTE_PATH,NORMALIZE,../../a/d;/a/d/../e,/x/y/a/f>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+
check_errors("PATH:ABSOLUTE_PATH" ${errors})
diff --git a/Tests/RunCMake/GenEx-PATH/APPEND.cmake.in b/Tests/RunCMake/GenEx-PATH/APPEND.cmake.in
index ab967a2a8a..1955480e77 100644
--- a/Tests/RunCMake/GenEx-PATH/APPEND.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/APPEND.cmake.in
@@ -65,4 +65,39 @@ if (WIN32)
endif()
endif()
+
+######################################
+## tests with list of paths
+######################################
+unset(reference)
+foreach(item IN ITEMS "/a/b" "/x/y")
+ cmake_path (APPEND result "${item}" "c")
+ list(APPEND reference "${result}")
+endforeach()
+set(output "$<PATH:APPEND,/a/b;/x/y,c>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+unset(reference)
+foreach(item IN ITEMS "a" "c")
+ cmake_path (APPEND item "")
+ list(APPEND reference "${item}")
+endforeach()
+set(output "$<PATH:APPEND,a;c,>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+unset(reference)
+foreach(item IN ITEMS "a/" "c/")
+ cmake_path (APPEND item "/b")
+ list(APPEND reference "${item}")
+endforeach()
+set(output "$<PATH:APPEND,a/;c/,/b>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+
check_errors ("PATH:APPEND" ${errors})
diff --git a/Tests/RunCMake/GenEx-PATH/CMAKE_PATH.cmake.in b/Tests/RunCMake/GenEx-PATH/CMAKE_PATH.cmake.in
index 41205fa674..29ebf165b1 100644
--- a/Tests/RunCMake/GenEx-PATH/CMAKE_PATH.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/CMAKE_PATH.cmake.in
@@ -50,4 +50,46 @@ if (WIN32)
endif()
+######################################
+## tests with list of paths
+######################################
+set(reference "/x/y/z/../../a/d;/x/y/z/../../b/e")
+set(output "$<PATH:CMAKE_PATH,/x/y/z/../../a/d;/x/y/z/../../b/e>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+unset(reference)
+foreach(path IN ITEMS "/x/y/z/../../a/d" "/x/y/z/../../b/e")
+ cmake_path(SET result NORMALIZE "${path}")
+ list(APPEND reference "${result}")
+endforeach()
+set(output "$<PATH:CMAKE_PATH,NORMALIZE,/x/y/z/../../a/d;/x/y/z/../../b/e>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+if (WIN32)
+ unset(reference)
+ foreach(path IN ITEMS "/x\\y/z\\..\\../a/d" "/x\\y/z\\..\\../b/e")
+ cmake_path(SET result "${path}")
+ list(APPEND reference "${result}")
+ endforeach()
+ set(output "$<PATH:CMAKE_PATH,/x\y/z\..\../a/d;/x\y/z\..\../b/e>")
+ if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+ endif()
+
+ unset(reference)
+ foreach(path IN ITEMS "/x\\y/z\\..\\../a/d" "/x\\y/z\\..\\../b/e")
+ cmake_path(SET result NORMALIZE "${path}")
+ list(APPEND reference "${result}")
+ endforeach()
+ set(output "$<PATH:CMAKE_PATH,NORMALIZE,/x\y/z\..\../a/d;/x\y/z\..\../b/e>")
+ if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+ endif()
+endif()
+
+
check_errors("PATH:CMAKE_PATH" ${errors})
diff --git a/Tests/RunCMake/GenEx-PATH/CMakeLists.txt b/Tests/RunCMake/GenEx-PATH/CMakeLists.txt
index f9748e968b..5161b995a9 100644
--- a/Tests/RunCMake/GenEx-PATH/CMakeLists.txt
+++ b/Tests/RunCMake/GenEx-PATH/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.18...3.24)
+cmake_minimum_required(VERSION 3.18...3.25)
project(${RunCMake_TEST} NONE)
diff --git a/Tests/RunCMake/GenEx-PATH/GET_ITEM.cmake.in b/Tests/RunCMake/GenEx-PATH/GET_ITEM.cmake.in
index b58998cdba..e2acde4ea6 100644
--- a/Tests/RunCMake/GenEx-PATH/GET_ITEM.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/GET_ITEM.cmake.in
@@ -1,3 +1,4 @@
+cmake_policy(SET CMP0140 NEW)
include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
unset (errors)
@@ -308,4 +309,126 @@ if (NOT output STREQUAL reference)
endif()
+######################################
+## third, tests with list of paths
+######################################
+if (WIN32)
+ set (paths "C:/aa/bb/cc.ext1.ext2" "D:/xx/yy/zz.ext3.ext4")
+else()
+ set (paths "/aa/bb/cc.ext1.ext2" "/xx/yy/zz.ext3.ext4")
+endif()
+
+function (compute_reference action)
+ unset(reference)
+ foreach (path IN LISTS paths)
+ cmake_path(GET path ${ARGV} result)
+ list(APPEND reference "${result}")
+ endforeach()
+ if (reference STREQUAL "")
+ # define the list as 2 empty elements
+ set(reference ";")
+ endif()
+
+ return(PROPAGATE reference)
+endfunction()
+
+compute_reference(ROOT_NAME)
+if (WIN32)
+ set(output "$<PATH:GET_ROOT_NAME,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_ROOT_NAME,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "ROOT_NAME returns bad data: ${output}")
+endif()
+
+compute_reference(ROOT_DIRECTORY)
+if (WIN32)
+ set(output "$<PATH:GET_ROOT_DIRECTORY,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_ROOT_DIRECTORY,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "ROOT_DIRECTORY returns bad data: ${output}")
+endif()
+
+compute_reference(ROOT_PATH)
+if (WIN32)
+ set(output "$<PATH:GET_ROOT_PATH,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_ROOT_PATH,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "ROOT_PATH returns bad data: ${output}")
+endif()
+
+compute_reference(FILENAME)
+if (WIN32)
+ set(output "$<PATH:GET_FILENAME,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_FILENAME,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "FILENAME returns bad data: ${output}")
+endif()
+
+compute_reference(EXTENSION)
+if (WIN32)
+ set(output "$<PATH:GET_EXTENSION,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_EXTENSION,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "EXTENSION returns bad data: ${output}")
+endif()
+compute_reference(EXTENSION LAST_ONLY)
+if (WIN32)
+ set(output "$<PATH:GET_EXTENSION,LAST_ONLY,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_EXTENSION,LAST_ONLY,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "EXTENSION LAST_ONLY returns bad data: ${output}")
+endif()
+
+compute_reference(STEM)
+if (WIN32)
+ set(output "$<PATH:GET_STEM,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_STEM,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "STEM returns bad data: ${output}")
+endif()
+compute_reference(STEM LAST_ONLY)
+if (WIN32)
+ set(output "$<PATH:GET_STEM,LAST_ONLY,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_STEM,LAST_ONLY,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "STEM LAST_ONLY returns bad data: ${reference}")
+endif()
+
+compute_reference(RELATIVE_PART)
+if (WIN32)
+ set(output "$<PATH:GET_RELATIVE_PART,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_RELATIVE_PART,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "RELATIVE_PART returns bad data: ${output}")
+endif()
+
+compute_reference(PARENT_PATH)
+if (WIN32)
+ set(output "$<PATH:GET_PARENT_PATH,C:/aa/bb/cc.ext1.ext2;D:/xx/yy/zz.ext3.ext4>")
+else()
+ set (output "$<PATH:GET_PARENT_PATH,/aa/bb/cc.ext1.ext2;/xx/yy/zz.ext3.ext4>")
+endif()
+if (NOT output STREQUAL reference)
+ list (APPEND errors "PARENT_PATH returns bad data: ${output}")
+endif()
+
+
check_errors("PATH:GET..." ${errors})
diff --git a/Tests/RunCMake/GenEx-PATH/NORMAL_PATH.cmake.in b/Tests/RunCMake/GenEx-PATH/NORMAL_PATH.cmake.in
index e6cc4a3868..81e4c0dd42 100644
--- a/Tests/RunCMake/GenEx-PATH/NORMAL_PATH.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/NORMAL_PATH.cmake.in
@@ -40,4 +40,18 @@ if (WIN32)
endif()
+######################################
+## tests with list of paths
+######################################
+unset (reference)
+foreach(item IN ITEMS "a/./b/.." "x/.//y/z//..")
+ cmake_path(NORMAL_PATH item)
+ list(APPEND reference "${item}")
+endforeach()
+set(output "$<PATH:NORMAL_PATH,a/./b/..;x/.//y/z//..>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+
check_errors("PATH:NORMAL_PATH" ${errors})
diff --git a/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in b/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in
index 11d73ad8f7..7670f4fd21 100644
--- a/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/RELATIVE_PATH.cmake.in
@@ -61,4 +61,18 @@ if (WIN32)
endif()
+######################################
+## tests with list of paths
+######################################
+unset (reference)
+foreach(item IN ITEMS "/a//d" "/a/b/e")
+ cmake_path(RELATIVE_PATH item BASE_DIRECTORY "/a/b/c")
+ list(APPEND reference "${item}")
+endforeach()
+set(output "$<PATH:RELATIVE_PATH,/a//d;/a/b/e,/a/b/c>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "'${output}' instead of '${reference}'")
+endif()
+
+
check_errors("PATH:RELATIVE_PATH" ${errors})
diff --git a/Tests/RunCMake/GenEx-PATH/REMOVE_ITEM.cmake.in b/Tests/RunCMake/GenEx-PATH/REMOVE_ITEM.cmake.in
index cce4143591..a365efe578 100644
--- a/Tests/RunCMake/GenEx-PATH/REMOVE_ITEM.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/REMOVE_ITEM.cmake.in
@@ -1,3 +1,4 @@
+cmake_policy(SET CMP0140 NEW)
include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
unset (errors)
@@ -62,4 +63,39 @@ if (NOT output STREQUAL reference)
endif()
+######################################
+## tests with list of paths
+######################################
+function (compute_reference action)
+ unset(reference)
+ foreach (path IN LISTS paths)
+ cmake_path(${action} path ${ARGN})
+ list(APPEND reference "${path}")
+ endforeach()
+
+ return(PROPAGATE reference)
+endfunction()
+
+set (paths "a/b/c.e.f" "g/h/i.j.k")
+compute_reference(REMOVE_FILENAME)
+set(output "$<PATH:REMOVE_FILENAME,a/b/c.e.f;g/h/i.j.k>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "FILENAME: '${output}' instead of '${reference}'")
+endif()
+
+set (paths "a/b/c.e.f" "g/h/i.j.k")
+compute_reference(REMOVE_EXTENSION)
+set(output "$<PATH:REMOVE_EXTENSION,a/b/c.e.f;g/h/i.j.k>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "EXTENSION: '${output}' instead of '${reference}'")
+endif()
+
+set (reference "a/b/c.e.f" "g/h/i.j.k")
+compute_reference(REMOVE_EXTENSION LAST_ONLY)
+set(output "$<PATH:REMOVE_EXTENSION,LAST_ONLY,a/b/c.e.f;g/h/i.j.k>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "EXTENSION: '${output}' instead of '${reference}'")
+endif()
+
+
check_errors("PATH:REMOVE..." ${errors})
diff --git a/Tests/RunCMake/GenEx-PATH/REPLACE_ITEM.cmake.in b/Tests/RunCMake/GenEx-PATH/REPLACE_ITEM.cmake.in
index 5bb04c3117..2d021528b7 100644
--- a/Tests/RunCMake/GenEx-PATH/REPLACE_ITEM.cmake.in
+++ b/Tests/RunCMake/GenEx-PATH/REPLACE_ITEM.cmake.in
@@ -1,3 +1,4 @@
+cmake_policy(SET CMP0140 NEW)
include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
unset (errors)
@@ -70,4 +71,39 @@ if (NOT output STREQUAL reference)
endif()
+######################################
+## tests with list of paths
+######################################
+function (compute_reference action new_value)
+ unset(reference)
+ foreach (path IN LISTS paths)
+ cmake_path(${action} path "${new_value}" ${ARGN})
+ list(APPEND reference "${path}")
+ endforeach()
+
+ return(PROPAGATE reference)
+endfunction()
+
+set (paths "a/b/c.e.f" "g/h/i.j.k")
+compute_reference(REPLACE_FILENAME "x.y")
+set(output "$<PATH:REPLACE_FILENAME,a/b/c.e.f;g/h/i.j.k,x.y>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "FILENAME: '${output}' instead of '${reference}'")
+endif()
+
+set (paths "a/b/c.e.f" "g/h/i.j.k")
+compute_reference(REPLACE_EXTENSION ".x")
+set(output "$<PATH:REPLACE_EXTENSION,a/b/c.e.f;g/h/i.j.k,.x>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "EXTENSION: '${output}' instead of '${reference}'")
+endif()
+
+set (paths "a/b/c.e.f" "g/h/i.j.k")
+compute_reference(REPLACE_EXTENSION ".x" LAST_ONLY)
+set(output "$<PATH:REPLACE_EXTENSION,LAST_ONLY,a/b/c.e.f;g/h/i.j.k,.x>")
+if (NOT output STREQUAL reference)
+ list (APPEND errors "EXTENSION: '${output}' instead of '${reference}'")
+endif()
+
+
check_errors("PATH:REPLACE..." ${errors})
diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt
index 4b3de84d94..93ee9dfd5f 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 7eec527c8f..187e7d614e 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 1963244fae..d550431e1e 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 cc9cd5a8f8..01926fe29d 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 edfb40c53b..a9a76bf549 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 3ee42a5c12..ddf38874d8 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 1fe75d9516..9c5d9322ed 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_IMPORT_FILE/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/CMakeLists.txt
new file mode 100644
index 0000000000..93ee9dfd5f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/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/GenEx-TARGET_IMPORT_FILE/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/RunCMakeTest.cmake
new file mode 100644
index 0000000000..04ff640942
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/RunCMakeTest.cmake
@@ -0,0 +1,21 @@
+include(RunCMake)
+
+cmake_policy(SET CMP0057 NEW)
+
+function(run_cmake_with_config test)
+ if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
+ endif()
+ run_cmake(${test})
+endfunction()
+
+run_cmake(TARGET_LINKER_IMPORT_FILE-non-valid-target)
+run_cmake(TARGET_LINKER_LIBRARY_FILE-non-valid-target)
+run_cmake_with_config(TARGET_IMPORT_FILE)
+run_cmake_with_config(TARGET_IMPORT_FILE_SUFFIX)
+
+set (Windows_platforms Windows CYGWIN MSYS)
+if (NOT CMAKE_HOST_SYSTEM_NAME IN_LIST Windows_platforms)
+ run_cmake(TARGET_SONAME_IMPORT_FILE-non-valid-target)
+ run_cmake_with_config(TARGET_SONAME_IMPORT_FILE)
+endif()
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE-check.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE-check.cmake
new file mode 100644
index 0000000000..9a101fc704
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE-check.cmake
@@ -0,0 +1 @@
+include ("${RunCMake_TEST_BINARY_DIR}/TARGET_IMPORT_FILE-Release-generated.cmake")
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE.cmake
new file mode 100644
index 0000000000..08765a68fe
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE.cmake
@@ -0,0 +1,47 @@
+enable_language(C)
+
+set (platforms_with_import Windows CYGWIN MSYS)
+
+set (GENERATE_CONTENT [[
+macro (CHECK_VALUE test_msg value expected)
+ if (NOT "${value}" STREQUAL "${expected}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: actual result:\n [${value}]\nbut expected:\n [${expected}]\n")
+ endif()
+endmacro()
+]])
+
+add_library (shared1 SHARED empty.c)
+add_library (static1 STATIC empty.c)
+add_executable (exec1 empty.c)
+
+
+string (APPEND GENERATE_CONTENT
+"\ncheck_value (\"TARGET_IMPORT_FILE shared library\" \"$<TARGET_IMPORT_FILE:shared1>\" \"$<IF:$<IN_LIST:$<PLATFORM_ID>,${platforms_with_import}>,$<TARGET_LINKER_IMPORT_FILE:shared1>,>\")
+check_value (\"TARGET_LINKER_FILE shared library\" \"$<TARGET_LINKER_FILE:shared1>\" \"$<IF:$<IN_LIST:$<PLATFORM_ID>,${platforms_with_import}>,$<TARGET_LINKER_IMPORT_FILE:shared1>,$<TARGET_LINKER_LIBRARY_FILE:shared1>>\")
+check_value (\"TARGET_IMPORT_FILE static library\" \"$<TARGET_IMPORT_FILE:static1>\" \"\")
+check_value (\"TARGET_IMPORT_FILE executable\" \"$<TARGET_IMPORT_FILE:exec1>\" \"\")\n")
+
+
+set(lib_with_import ${platforms_with_import})
+set(exec_with_import ${platforms_with_import})
+if (APPLE AND CMAKE_TAPI)
+ list(APPEND lib_with_import Darwin)
+endif()
+if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
+ list(APPEND exec_with_import "AIX")
+endif()
+set(CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS TRUE)
+set(CMAKE_EXECUTABLE_ENABLE_EXPORTS TRUE)
+
+add_library (shared2 SHARED empty.c)
+add_executable (exec2 empty.c)
+
+
+string (APPEND GENERATE_CONTENT
+"\ncheck_value (\"TARGET_IMPORT_FILE shared library\" \"$<TARGET_IMPORT_FILE:shared2>\" \"$<IF:$<IN_LIST:$<PLATFORM_ID>,${lib_with_import}>,$<TARGET_LINKER_IMPORT_FILE:shared2>,>\")
+check_value (\"TARGET_LINKER_FILE shared library\" \"$<TARGET_LINKER_FILE:shared2>\" \"$<IF:$<IN_LIST:$<PLATFORM_ID>,${lib_with_import}>,$<TARGET_LINKER_IMPORT_FILE:shared2>,$<TARGET_LINKER_LIBRARY_FILE:shared2>>\")
+check_value (\"TARGET_IMPORT_FILE executable\" \"$<TARGET_IMPORT_FILE:exec2>\" \"$<IF:$<IN_LIST:$<PLATFORM_ID>,${exec_with_import}>,$<TARGET_LINKER_IMPORT_FILE:exec2>,>\")\n")
+
+
+file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/TARGET_IMPORT_FILE-$<CONFIG>-generated.cmake"
+ CONTENT "${GENERATE_CONTENT}")
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE_SUFFIX-check.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE_SUFFIX-check.cmake
new file mode 100644
index 0000000000..2a1357aaa9
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE_SUFFIX-check.cmake
@@ -0,0 +1 @@
+include ("${RunCMake_TEST_BINARY_DIR}/TARGET_IMPORT_FILE_SUFFIX-Release-generated.cmake")
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE_SUFFIX.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE_SUFFIX.cmake
new file mode 100644
index 0000000000..933471b651
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_IMPORT_FILE_SUFFIX.cmake
@@ -0,0 +1,44 @@
+enable_language (C)
+
+set (platforms_with_import Windows CYGWIN MSYS)
+
+set (GENERATE_CONTENT [[
+macro (CHECK_VALUE test_msg value expected)
+ if (NOT "${value}" STREQUAL "${expected}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: actual result:\n [${value}]\nbut expected:\n [${expected}]\n")
+ endif()
+endmacro()
+]])
+
+add_library (shared1 SHARED empty.c)
+add_library (static1 STATIC empty.c)
+add_executable (exec1 empty.c)
+
+string (APPEND GENERATE_CONTENT
+"\ncheck_value (\"TARGET_IMPORT_FILE_SUFFIX executable default\" \"$<TARGET_IMPORT_FILE_SUFFIX:exec1>\" \"\")
+check_value (\"TARGET_IMPORT_FILE_SUFFIX shared default\" \"$<TARGET_IMPORT_FILE_SUFFIX:shared1>\" \"$<IF:$<IN_LIST:$<PLATFORM_ID>,${platforms_with_import}>,$<TARGET_LINKER_IMPORT_FILE_SUFFIX:shared1>,>\")
+check_value (\"TARGET_FILE_SUFFIX static default\" \"$<TARGET_IMPORT_FILE_SUFFIX:static1>\" \"\")
+check_value (\"TARGET_IMPORT_FILE_SUFFIX executable default\" \"$<TARGET_IMPORT_FILE_SUFFIX:exec1>\" \"\")\n")
+
+
+
+if (APPLE AND CMAKE_TAPI)
+ list(APPEND platforms_with_import Darwin)
+endif()
+if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
+ list(APPEND platforms_with_import AIX)
+endif()
+set(CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS TRUE)
+set(CMAKE_EXECUTABLE_ENABLE_EXPORTS TRUE)
+
+add_library (shared2 SHARED empty.c)
+add_executable (exec2 empty.c)
+
+string (APPEND GENERATE_CONTENT
+"\ncheck_value (\"TARGET_IMPORT_FILE_SUFFIX executable default\" \"$<TARGET_IMPORT_FILE_SUFFIX:exec2>\" \"$<IF:$<IN_LIST:$<PLATFORM_ID>,${platforms_with_import}>,$<TARGET_LINKER_IMPORT_FILE_SUFFIX:exec2>,>\")
+check_value (\"TARGET_IMPORT_FILE_SUFFIX shared default\" \"$<TARGET_IMPORT_FILE_SUFFIX:shared2>\" \"$<IF:$<IN_LIST:$<PLATFORM_ID>,${platforms_with_import}>,$<TARGET_LINKER_IMPORT_FILE_SUFFIX:shared2>,>\")\n")
+
+
+
+file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/TARGET_IMPORT_FILE_SUFFIX-$<CONFIG>-generated.cmake"
+ CONTENT "${GENERATE_CONTENT}")
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target-result.txt b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target-stderr.txt b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target-stderr.txt
new file mode 100644
index 0000000000..8ba2223dfa
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TARGET_LINKER_IMPORT_FILE-non-valid-target.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<TARGET_LINKER_IMPORT_FILE:exe1>
+
+ TARGET_LINKER_IMPORT_FILE is allowed only for libraries and executables
+ with ENABLE_EXPORTS.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target.cmake
new file mode 100644
index 0000000000..3f060cdc92
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_IMPORT_FILE-non-valid-target.cmake
@@ -0,0 +1,9 @@
+
+enable_language(C)
+
+add_executable(exe1 empty.c)
+
+file(GENERATE
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test.txt"
+ CONTENT "[$<TARGET_LINKER_IMPORT_FILE:exe1>]"
+)
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target-result.txt b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target-stderr.txt b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target-stderr.txt
new file mode 100644
index 0000000000..06e7b3ad77
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at TARGET_LINKER_LIBRARY_FILE-non-valid-target.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<TARGET_LINKER_LIBRARY_FILE:exe1>
+
+ TARGET_LINKER_LIBRARY_FILE is allowed only for libraries with
+ ENABLE_EXPORTS.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target.cmake
new file mode 100644
index 0000000000..bb95546633
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_LINKER_LIBRARY_FILE-non-valid-target.cmake
@@ -0,0 +1,9 @@
+
+enable_language(C)
+
+add_executable(exe1 empty.c)
+
+file(GENERATE
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test.txt"
+ CONTENT "[$<TARGET_LINKER_LIBRARY_FILE:exe1>]"
+)
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-check.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-check.cmake
new file mode 100644
index 0000000000..ab4443e10d
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-check.cmake
@@ -0,0 +1 @@
+include ("${RunCMake_TEST_BINARY_DIR}/TARGET_SONAME_IMPORT_FILE-Release-generated.cmake")
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target-result.txt b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target-stderr.txt b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target-stderr.txt
new file mode 100644
index 0000000000..0640088a86
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at TARGET_SONAME_IMPORT_FILE-non-valid-target.cmake:[0-9]+ \(file\):
+ Error evaluating generator expression:
+
+ \$<TARGET_SONAME_IMPORT_FILE:static1>
+
+ TARGET_SONAME_IMPORT_FILE is allowed only for SHARED libraries.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target.cmake
new file mode 100644
index 0000000000..cc79580292
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE-non-valid-target.cmake
@@ -0,0 +1,8 @@
+enable_language(C)
+
+add_library (static1 STATIC empty.c)
+set_property (TARGET static1 PROPERTY VERSION 2.5.0)
+set_property (TARGET static1 PROPERTY SOVERSION 2.0.0)
+
+file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test.txt"
+ CONTENT "[$<TARGET_SONAME_IMPORT_FILE:static1>]")
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE.cmake b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE.cmake
new file mode 100644
index 0000000000..02ba513759
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/TARGET_SONAME_IMPORT_FILE.cmake
@@ -0,0 +1,32 @@
+enable_language(C)
+
+set (GENERATE_CONTENT [[
+macro (CHECK_VALUE test_msg value expected)
+ if (NOT "${value}" STREQUAL "${expected}")
+ string (APPEND RunCMake_TEST_FAILED "${test_msg}: actual result:\n [${value}]\nbut expected:\n [${expected}]\n")
+ endif()
+endmacro()
+]])
+
+add_library (shared1 SHARED empty.c)
+set_property (TARGET shared1 PROPERTY VERSION 2.5.0)
+set_property (TARGET shared1 PROPERTY SOVERSION 2.0.0)
+
+
+string (APPEND GENERATE_CONTENT
+"\ncheck_value (\"TARGET_SONAME_IMPORT_FILE shared library\" \"$<TARGET_SONAME_IMPORT_FILE:shared1>\" \"\")\n")
+
+
+
+add_library (shared2 SHARED empty.c)
+set_property(TARGET shared2 PROPERTY ENABLE_EXPORTS ON)
+set_property (TARGET shared2 PROPERTY VERSION 2.5.0)
+set_property (TARGET shared2 PROPERTY SOVERSION 2.0.0)
+
+
+string (APPEND GENERATE_CONTENT
+"\ncheck_value (\"TARGET_SONAME_IMPORT_FILE shared library\" \"$<TARGET_SONAME_IMPORT_FILE:shared2>\" \"$<$<BOOL:${CMAKE_TAPI}>:$<PATH:REPLACE_EXTENSION,LAST_ONLY,$<TARGET_SONAME_FILE:shared2>,.tbd>>\")\n")
+
+
+file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/TARGET_SONAME_IMPORT_FILE-$<CONFIG>-generated.cmake"
+ CONTENT "${GENERATE_CONTENT}")
diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/empty.c b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/empty.c
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/empty.c
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake
index 212c03402c..eed194b3b9 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 26a73f974c..32d92d819d 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 e9855bed53..0f0c399c88 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 a4c8dcd1fb..fab2ce2d18 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/GenEx-TARGET_RUNTIME_DLLS/check.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/check.cmake
deleted file mode 100644
index e19598e144..0000000000
--- a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/check.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-function(check_genex expected actual)
- if(NOT expected STREQUAL actual)
- string(APPEND RunCMake_TEST_FAILED "Expected DLLs:\n")
- foreach(dll IN LISTS expected)
- string(APPEND RunCMake_TEST_FAILED " ${dll}\n")
- endforeach()
- string(APPEND RunCMake_TEST_FAILED "Actual DLLs:\n")
- foreach(dll IN LISTS actual)
- string(APPEND RunCMake_TEST_FAILED " ${dll}\n")
- endforeach()
- endif()
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
-endfunction()
-
-include("${RunCMake_TEST_BINARY_DIR}/dlls.cmake")
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared-check.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared-check.cmake
new file mode 100644
index 0000000000..6b05b4ede9
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared-check.cmake
@@ -0,0 +1,15 @@
+function(check_genex expected actual)
+ if(NOT expected STREQUAL actual)
+ string(APPEND RunCMake_TEST_FAILED "Expected items:\n")
+ foreach(item IN LISTS expected)
+ string(APPEND RunCMake_TEST_FAILED " ${item}\n")
+ endforeach()
+ string(APPEND RunCMake_TEST_FAILED "Actual items:\n")
+ foreach(item IN LISTS actual)
+ string(APPEND RunCMake_TEST_FAILED " ${item}\n")
+ endforeach()
+ endif()
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+endfunction()
+
+include("${RunCMake_TEST_BINARY_DIR}/dlls.cmake")
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake
index 806f0b60f2..c38fa39831 100644
--- a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake
@@ -4,6 +4,10 @@ add_executable(exe main.c)
add_library(lib1 SHARED lib1.c)
add_library(lib2 SHARED lib2.c)
add_library(lib3 SHARED lib3.c)
+if(WIN32 OR CYGWIN)
+ set_property(TARGET lib3 PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/SomeSubDir/")
+endif()
+
add_library(static STATIC static.c)
add_library(imported SHARED IMPORTED)
set_property(TARGET imported PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/imported.dll")
@@ -26,9 +30,16 @@ if(WIN32 OR CYGWIN)
"$<TARGET_FILE:lib3>"
"$<TARGET_FILE:lib2>"
)
+ set(expected_dll_dirs
+ "$<PATH:GET_PARENT_PATH,$<TARGET_FILE:lib2>>"
+ "$<PATH:GET_PARENT_PATH,$<TARGET_FILE:imported>>"
+ "$<PATH:GET_PARENT_PATH,$<TARGET_FILE:lib3>>"
+ )
endif()
-set(content "check_genex(\"${expected_dlls}\" \"$<TARGET_RUNTIME_DLLS:exe>\")\n")
+set(content "check_genex(\"${expected_dlls}\" \"$<TARGET_RUNTIME_DLLS:exe>\")
+check_genex(\"${expected_dll_dirs}\" \"$<TARGET_RUNTIME_DLL_DIRS:exe>\")\n")
+
set(condition)
get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(multi_config)
diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake
index bf9c302e05..3e35aa33fe 100644
--- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake
+++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake
@@ -100,7 +100,9 @@ if (WIN32 OR CYGWIN)
set(_platform Win32-Clang)
elseif(MSVC AND COMPILER_HAS_DEPRECATED)
set(_platform Win32)
- elseif((MINGW OR CYGWIN) AND COMPILER_HAS_DEPRECATED)
+ elseif(CYGWIN AND COMPILER_HAS_DEPRECATED)
+ set(_platform Cygwin)
+ elseif(MINGW AND COMPILER_HAS_DEPRECATED)
set(_platform MinGW)
else()
set(_platform WinEmpty)
diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libshared_export.h
new file mode 100644
index 0000000000..dac4fda655
--- /dev/null
+++ b/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libshared_export.h
@@ -0,0 +1,42 @@
+
+#ifndef LIBSHARED_EXPORT_H
+#define LIBSHARED_EXPORT_H
+
+#ifdef LIBSHARED_STATIC_DEFINE
+# define LIBSHARED_EXPORT
+# define LIBSHARED_NO_EXPORT
+#else
+# ifndef LIBSHARED_EXPORT
+# ifdef libshared_EXPORTS
+ /* We are building this library */
+# define LIBSHARED_EXPORT __declspec(dllexport)
+# else
+ /* We are using this library */
+# define LIBSHARED_EXPORT __declspec(dllimport)
+# endif
+# endif
+
+# ifndef LIBSHARED_NO_EXPORT
+# define LIBSHARED_NO_EXPORT
+# endif
+#endif
+
+#ifndef LIBSHARED_DEPRECATED
+# define LIBSHARED_DEPRECATED __attribute__ ((__deprecated__))
+#endif
+
+#ifndef LIBSHARED_DEPRECATED_EXPORT
+# define LIBSHARED_DEPRECATED_EXPORT LIBSHARED_EXPORT LIBSHARED_DEPRECATED
+#endif
+
+#ifndef LIBSHARED_DEPRECATED_NO_EXPORT
+# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED
+#endif
+
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSHARED_NO_DEPRECATED
+# define LIBSHARED_NO_DEPRECATED
+# endif
+#endif
+
+#endif /* LIBSHARED_EXPORT_H */
diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libstatic_export.h
new file mode 100644
index 0000000000..b6e2a4a880
--- /dev/null
+++ b/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libstatic_export.h
@@ -0,0 +1,42 @@
+
+#ifndef LIBSTATIC_EXPORT_H
+#define LIBSTATIC_EXPORT_H
+
+#ifdef LIBSTATIC_STATIC_DEFINE
+# define LIBSTATIC_EXPORT
+# define LIBSTATIC_NO_EXPORT
+#else
+# ifndef LIBSTATIC_EXPORT
+# ifdef libstatic_EXPORTS
+ /* We are building this library */
+# define LIBSTATIC_EXPORT
+# else
+ /* We are using this library */
+# define LIBSTATIC_EXPORT
+# endif
+# endif
+
+# ifndef LIBSTATIC_NO_EXPORT
+# define LIBSTATIC_NO_EXPORT
+# endif
+#endif
+
+#ifndef LIBSTATIC_DEPRECATED
+# define LIBSTATIC_DEPRECATED __attribute__ ((__deprecated__))
+#endif
+
+#ifndef LIBSTATIC_DEPRECATED_EXPORT
+# define LIBSTATIC_DEPRECATED_EXPORT LIBSTATIC_EXPORT LIBSTATIC_DEPRECATED
+#endif
+
+#ifndef LIBSTATIC_DEPRECATED_NO_EXPORT
+# define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED
+#endif
+
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSTATIC_NO_DEPRECATED
+# define LIBSTATIC_NO_DEPRECATED
+# endif
+#endif
+
+#endif /* LIBSTATIC_EXPORT_H */
diff --git a/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h
index dac4fda655..3ba2d2eaca 100644
--- a/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h
+++ b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h
@@ -22,7 +22,7 @@
#endif
#ifndef LIBSHARED_DEPRECATED
-# define LIBSHARED_DEPRECATED __attribute__ ((__deprecated__))
+# define LIBSHARED_DEPRECATED __declspec(deprecated)
#endif
#ifndef LIBSHARED_DEPRECATED_EXPORT
diff --git a/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h
index b6e2a4a880..3c7e093abf 100644
--- a/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h
+++ b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h
@@ -22,7 +22,7 @@
#endif
#ifndef LIBSTATIC_DEPRECATED
-# define LIBSTATIC_DEPRECATED __attribute__ ((__deprecated__))
+# define LIBSTATIC_DEPRECATED __declspec(deprecated)
#endif
#ifndef LIBSTATIC_DEPRECATED_EXPORT
diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h
index dac4fda655..3ba2d2eaca 100644
--- a/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h
+++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h
@@ -22,7 +22,7 @@
#endif
#ifndef LIBSHARED_DEPRECATED
-# define LIBSHARED_DEPRECATED __attribute__ ((__deprecated__))
+# define LIBSHARED_DEPRECATED __declspec(deprecated)
#endif
#ifndef LIBSHARED_DEPRECATED_EXPORT
diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h
index b6e2a4a880..3c7e093abf 100644
--- a/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h
+++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h
@@ -22,7 +22,7 @@
#endif
#ifndef LIBSTATIC_DEPRECATED
-# define LIBSTATIC_DEPRECATED __attribute__ ((__deprecated__))
+# define LIBSTATIC_DEPRECATED __declspec(deprecated)
#endif
#ifndef LIBSTATIC_DEPRECATED_EXPORT
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 2d545d9224..b139210d72 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/BadFieldNoComma-result.txt b/Tests/RunCMake/GeneratorPlatform/BadFieldNoComma-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadFieldNoComma-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorPlatform/BadFieldNoComma-stderr.txt b/Tests/RunCMake/GeneratorPlatform/BadFieldNoComma-stderr.txt
new file mode 100644
index 0000000000..b2098bd425
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadFieldNoComma-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Visual Studio [^
+]+
+
+ given platform specification
+
+ Test Platform,nocomma
+
+ that contains a field after the first ',' with no '='\.$
diff --git a/Tests/RunCMake/GeneratorPlatform/BadFieldNoComma.cmake b/Tests/RunCMake/GeneratorPlatform/BadFieldNoComma.cmake
new file mode 100644
index 0000000000..2fc38e5c59
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadFieldNoComma.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown-result.txt b/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown-stderr.txt b/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown-stderr.txt
new file mode 100644
index 0000000000..654f9201c8
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Visual Studio [^
+]+
+
+ given platform specification
+
+ Test Platform,unknown=
+
+ that contains invalid field 'unknown='\.$
diff --git a/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown.cmake b/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown.cmake
new file mode 100644
index 0000000000..2fc38e5c59
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadFieldUnknown.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty-result.txt b/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty-stderr.txt b/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty-stderr.txt
new file mode 100644
index 0000000000..1b7804da36
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Visual Studio [^
+]+
+
+ given platform specification with empty
+
+ version=
+
+ field\.$
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty.cmake b/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty.cmake
new file mode 100644
index 0000000000..2fc38e5c59
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionEmpty.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionMissing-result.txt b/Tests/RunCMake/GeneratorPlatform/BadVersionMissing-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionMissing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionMissing-stderr.txt b/Tests/RunCMake/GeneratorPlatform/BadVersionMissing-stderr.txt
new file mode 100644
index 0000000000..d82eb0bbac
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionMissing-stderr.txt
@@ -0,0 +1,11 @@
+^CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Visual Studio [^
+]+
+
+ given platform specification with
+
+ version=1\.2\.3\.4
+
+ field, but no Windows SDK with that version was found\.$
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionMissing.cmake b/Tests/RunCMake/GeneratorPlatform/BadVersionMissing.cmake
new file mode 100644
index 0000000000..2fc38e5c59
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionMissing.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform-result.txt b/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform-stderr.txt b/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform-stderr.txt
new file mode 100644
index 0000000000..d3c62e3629
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform-stderr.txt
@@ -0,0 +1,19 @@
+^CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Visual Studio [^
+]+
+
+ given platform specification (containing a
+
+ version=8\.1
+
+ field\. The version field is not supported when targeting
+
+ Windows 8\.1(
+
+ with the Windows 8\.1 SDK installed\.)?|with
+
+ version=8\.1
+
+ field, but no Windows SDK with that version was found\.)$
diff --git a/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform.cmake b/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform.cmake
new file mode 100644
index 0000000000..2fc38e5c59
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/BadVersionPlatform.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
index 74b3ff8de3..93ee9dfd5f 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/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
index a7519c373c..233eb0a2f0 100644
--- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
@@ -26,3 +26,86 @@ else()
run_cmake(BadPlatformToolchain)
unset(RunCMake_TEST_OPTIONS)
endif()
+
+if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio (1[4567])( 20[0-9][0-9])?$")
+ unset(ENV{WindowsSDKVersion})
+
+ set(RunCMake_GENERATOR_PLATFORM "Test Platform,nocomma")
+ run_cmake(BadFieldNoComma)
+ set(RunCMake_GENERATOR_PLATFORM "Test Platform,unknown=")
+ run_cmake(BadFieldUnknown)
+ set(RunCMake_GENERATOR_PLATFORM "version=")
+ run_cmake(BadVersionEmpty)
+ set(RunCMake_GENERATOR_PLATFORM "version=1.2.3.4")
+ run_cmake(BadVersionMissing)
+ set(RunCMake_GENERATOR_PLATFORM "version=8.1")
+ run_cmake_with_options(BadVersionPlatform -DCMAKE_SYSTEM_VERSION=8.1)
+
+ if(NOT RunCMake_GENERATOR MATCHES "^Visual Studio (1[45]) ")
+ set(expect_version "10.0")
+ set(RunCMake_GENERATOR_PLATFORM "version=${expect_version}")
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-${expect_version}")
+ run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=10.0)
+ unset(RunCMake_GENERATOR_PLATFORM)
+ endif()
+
+ set(kits "")
+ cmake_host_system_information(RESULT kitsRoot10
+ QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Microsoft/Windows Kits/Installed Roots"
+ VALUE "KitsRoot10"
+ VIEW 64_32
+ ERROR_VARIABLE kitsRoot10Error
+ )
+ if(NOT kitsRoot10Error AND IS_DIRECTORY "${kitsRoot10}/include")
+ cmake_path(SET kitsInclude "${kitsRoot10}/include")
+ file(GLOB kits RELATIVE "${kitsInclude}" "${kitsInclude}/*/um/windows.h")
+ list(TRANSFORM kits REPLACE "/.*" "")
+ endif()
+ if(kits)
+ message(STATUS "Available Kits: ${kits}")
+ if(RunCMake_GENERATOR MATCHES "^Visual Studio 14 ")
+ set(kitMax 10.0.14393.0)
+ else()
+ set(kitMax "")
+ endif()
+ if(kitMax)
+ set(kitsIn "${kits}")
+ set(kits "")
+ foreach(kit IN LISTS kitsIn)
+ if(kit VERSION_LESS_EQUAL "${kitMax}")
+ list(APPEND kits "${kit}")
+ else()
+ message(STATUS "Excluding Kit ${kit} > ${kitMax}")
+ endif()
+ endforeach()
+ endif()
+ elseif(NOT RunCMake_GENERATOR MATCHES "^Visual Studio 14 ")
+ message(FATAL_ERROR "Could not find any Windows SDKs to drive test cases.")
+ endif()
+
+ if(kits)
+ foreach(expect_version IN LISTS kits)
+ set(RunCMake_GENERATOR_PLATFORM "version=${expect_version}")
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-${expect_version}")
+ run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=10.0)
+ unset(RunCMake_GENERATOR_PLATFORM)
+ endforeach()
+ foreach(expect_version IN LISTS kits)
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-CMP0149-OLD-${expect_version}")
+ run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=${expect_version} -DCMAKE_POLICY_DEFAULT_CMP0149=OLD)
+ endforeach()
+ if(kits MATCHES "(^|;)([0-9.]+)$")
+ set(expect_version "${CMAKE_MATCH_2}")
+ foreach(test_version IN LISTS kits)
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-CMP0149-NEW-${test_version}")
+ run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=${test_version} -DCMAKE_POLICY_DEFAULT_CMP0149=NEW)
+ endforeach()
+ endif()
+ foreach(expect_version IN LISTS kits)
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-WindowsSDKVersion-${expect_version}")
+ set(ENV{WindowsSDKVersion} "${expect_version}\\")
+ run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_POLICY_DEFAULT_CMP0149=NEW)
+ unset(ENV{WindowsSDKVersion})
+ endforeach()
+ endif()
+endif()
diff --git a/Tests/RunCMake/GeneratorPlatform/VersionExists-check.cmake b/Tests/RunCMake/GeneratorPlatform/VersionExists-check.cmake
new file mode 100644
index 0000000000..6c3c8e542b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/VersionExists-check.cmake
@@ -0,0 +1,9 @@
+if(actual_stdout MATCHES "CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION='([^']+)'")
+ set(actual_version "${CMAKE_MATCH_1}")
+ if(NOT "${actual_version}" STREQUAL "${expect_version}")
+ set(RunCMake_TEST_FAILED "Actual SDK version '${actual_version}' did not match expected '${expect_version}'")
+ return()
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "No CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION found in output.")
+endif()
diff --git a/Tests/RunCMake/GeneratorPlatform/VersionExists.cmake b/Tests/RunCMake/GeneratorPlatform/VersionExists.cmake
new file mode 100644
index 0000000000..5c30e2b616
--- /dev/null
+++ b/Tests/RunCMake/GeneratorPlatform/VersionExists.cmake
@@ -0,0 +1,5 @@
+cmake_policy(GET CMP0149 cmp0149)
+message(STATUS "CMP0149='${cmp0149}'")
+message(STATUS "CMAKE_SYSTEM_VERSION='${CMAKE_SYSTEM_VERSION}'")
+message(STATUS "ENV{WindowsSDKVersion}='$ENV{WindowsSDKVersion}'")
+message(STATUS "CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION='${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}'")
diff --git a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
index 74b3ff8de3..93ee9dfd5f 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 37747a1e47..d0aef2c476 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 5cd4825e66..0d707f077e 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 37747a1e47..4db8209bae 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/C-error-Build-result.txt b/Tests/RunCMake/IncludeWhatYouUse/C-error-Build-result.txt
new file mode 100644
index 0000000000..d197c913c2
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/C-error-Build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/IncludeWhatYouUse/C-error-Build-stdout.txt b/Tests/RunCMake/IncludeWhatYouUse/C-error-Build-stdout.txt
new file mode 100644
index 0000000000..cb7467705e
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/C-error-Build-stdout.txt
@@ -0,0 +1,4 @@
+Warning: include-what-you-use reported diagnostics:
+should add these lines:
+*
+#include <\.\.\.>
diff --git a/Tests/RunCMake/IncludeWhatYouUse/C-error.cmake b/Tests/RunCMake/IncludeWhatYouUse/C-error.cmake
new file mode 100644
index 0000000000..d5230bbf8c
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/C-error.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+set(CMAKE_C_INCLUDE_WHAT_YOU_USE "${PSEUDO_IWYU}" -Xiwyu --error)
+add_executable(main main.c)
diff --git a/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt b/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt
index 18dfd2686f..93ee9dfd5f 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/IncludeWhatYouUse/CXX-error-Build-result.txt b/Tests/RunCMake/IncludeWhatYouUse/CXX-error-Build-result.txt
new file mode 100644
index 0000000000..d197c913c2
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/CXX-error-Build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/IncludeWhatYouUse/CXX-error-Build-stdout.txt b/Tests/RunCMake/IncludeWhatYouUse/CXX-error-Build-stdout.txt
new file mode 100644
index 0000000000..cb7467705e
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/CXX-error-Build-stdout.txt
@@ -0,0 +1,4 @@
+Warning: include-what-you-use reported diagnostics:
+should add these lines:
+*
+#include <\.\.\.>
diff --git a/Tests/RunCMake/IncludeWhatYouUse/CXX-error.cmake b/Tests/RunCMake/IncludeWhatYouUse/CXX-error.cmake
new file mode 100644
index 0000000000..1d10a550d4
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/CXX-error.cmake
@@ -0,0 +1,3 @@
+enable_language(CXX)
+set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "$<1:${PSEUDO_IWYU}>" -Xiwyu --error)
+add_executable(main main.cxx)
diff --git a/Tests/RunCMake/IncludeWhatYouUse/CXX.cmake b/Tests/RunCMake/IncludeWhatYouUse/CXX.cmake
index 896930c16b..8780bb693b 100644
--- a/Tests/RunCMake/IncludeWhatYouUse/CXX.cmake
+++ b/Tests/RunCMake/IncludeWhatYouUse/CXX.cmake
@@ -1,3 +1,3 @@
enable_language(CXX)
-set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${PSEUDO_IWYU}" -some -args)
+set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "$<1:${PSEUDO_IWYU}>" -some -args)
add_executable(main main.cxx)
diff --git a/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake b/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake
index 8f99eb1047..8ec24be5ca 100644
--- a/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake
+++ b/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake
@@ -16,6 +16,8 @@ endfunction()
run_iwyu(C)
run_iwyu(CXX)
+run_iwyu(C-error)
+run_iwyu(CXX-error)
if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
run_iwyu(C-launch)
run_iwyu(CXX-launch)
diff --git a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt
index 74b3ff8de3..93ee9dfd5f 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 0dbf029fea..344586430a 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/global-interface-stderr.txt b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt
index 38585ebdd1..352bb68a09 100644
--- a/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at global-interface.cmake:2 \(add_library\):
GLOBAL
- Tried extensions \.c \.C .*
-.*
-Call Stack \(most recent call first\):
+ Tried extensions ([^
+]+
+)+Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake
index 575fcc6e1f..4a8ca37ba1 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 ed81878cbe..eae8f57939 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 74b3ff8de3..93ee9dfd5f 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 b7a07559ff..55aa1bbe79 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 586a876a0a..f11d8f5767 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 185cd91c10..6e1f8a2102 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 74b3ff8de3..93ee9dfd5f 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 18dfd2686f..93ee9dfd5f 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 3313e31f63..544b65fceb 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 3313e31f63..544b65fceb 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 3313e31f63..082c7b575f 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 3313e31f63..082c7b575f 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 3313e31f63..d2efd3d539 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 3313e31f63..d2efd3d539 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 3313e31f63..0082ab2b4b 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 3313e31f63..0082ab2b4b 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 8f2bf63f4c..025f367844 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 0000000000..42742f73e4
--- /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 74b3ff8de3..93ee9dfd5f 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/MaxRecursionDepth/RunCMakeTest.cmake b/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake
index c5a859d877..fdf418f955 100644
--- a/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake
+++ b/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake
@@ -1,26 +1,42 @@
include(RunCMake)
include(RunCTest)
-function(run_cmake_recursive name)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name})
- run_cmake(${name}-default)
- unset(RunCMake_TEST_OPTIONS)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=10)
- run_cmake(${name}-var)
- unset(RunCMake_TEST_OPTIONS)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=a)
- run_cmake(${name}-invalid-var)
- unset(RunCMake_TEST_OPTIONS)
+# Isolate this test from the caller's environment.
+unset(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH})
+function(run_cmake_recursive name)
+ run_cmake_with_options(${name}-default "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name})
run_cmake_command(${name}-default-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt")
+
+ set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 5) # overridden, not used
+ run_cmake_with_options(${name}-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=10)
+ run_cmake_with_options(${name}-invalid-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=a)
run_cmake_command(${name}-var-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=10 -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt")
run_cmake_command(${name}-invalid-var-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=a -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt")
+
+ set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 10)
+ run_cmake_with_options(${name}-env "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name})
+ run_cmake_command(${name}-env-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt")
+
+ set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} a)
+ run_cmake_with_options(${name}-invalid-env "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name})
+ run_cmake_command(${name}-invalid-env-script ${CMAKE_COMMAND} "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -P "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt")
+
+ unset(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH})
endfunction()
function(run_ctest_recursive name)
run_ctest(${name}-default "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name})
run_ctest(${name}-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=10)
run_ctest(${name}-invalid-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name} -DCMAKE_MAXIMUM_RECURSION_DEPTH=a)
+
+ set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 10)
+ run_ctest(${name}-env "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name})
+
+ set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} a)
+ run_ctest(${name}-invalid-env "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=${name})
+
+ unset(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH})
endfunction()
run_cmake_recursive(function)
@@ -32,12 +48,8 @@ run_cmake_recursive(variable_watch)
# We run these tests separately and only with a small limit because they are
# taxing and slow. The "implicit" and "invalid" cases are already thoroughly
# covered by the other tests above.
-set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=add_subdirectory -DCMAKE_MAXIMUM_RECURSION_DEPTH=10)
-run_cmake(add_subdirectory-var)
-unset(RunCMake_TEST_OPTIONS)
-set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=try_compile -DCMAKE_MAXIMUM_RECURSION_DEPTH=10)
-run_cmake(try_compile-var)
-unset(RunCMake_TEST_OPTIONS)
+run_cmake_with_options(add_subdirectory-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=add_subdirectory -DCMAKE_MAXIMUM_RECURSION_DEPTH=10)
+run_cmake_with_options(try_compile-var "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" -DTEST_NAME=try_compile -DCMAKE_MAXIMUM_RECURSION_DEPTH=10)
run_ctest_recursive(ctest_read_custom_files)
diff --git a/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-result.txt
new file mode 100644
index 0000000000..b57e2deb77
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-stderr.txt
new file mode 100644
index 0000000000..b664fa04f9
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env-stderr.txt
@@ -0,0 +1,34 @@
+^2
+3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:1 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
+ .*/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-env/test\.cmake:10 \(ctest_read_custom_files\)
+
+
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake
+Problem reading custom configuration: .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake$
diff --git a/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-result.txt
new file mode 100644
index 0000000000..b57e2deb77
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-stderr.txt
new file mode 100644
index 0000000000..7dbbb3e72d
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/ctest_read_custom_files-invalid-env-stderr.txt
@@ -0,0 +1,5 @@
+[0-9]+
+CMake Error at .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:1 \(message\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ .*/Tests/RunCMake/MaxRecursionDepth/CTestCustom\.cmake:3 \(ctest_read_custom_files\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt
index b8557ab645..4e965e8eb6 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-default-script-stderr.txt
@@ -1,5 +1,7 @@
[0-9]+
-CMake Error at .*/FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt
index 5d31e295b0..0119953adb 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-default-stderr.txt
@@ -1,5 +1,5 @@
[0-9]+
-CMake Error at FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-stderr.txt
new file mode 100644
index 0000000000..53145515a5
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-env-script-stderr.txt
@@ -0,0 +1,21 @@
+^3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at .*/FindRecursivePackage\.cmake:1 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ .*/find_package\.cmake:2 \(find_package\)
+ .*/CMakeLists\.txt:5 \(include\)$
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-env-stderr.txt
new file mode 100644
index 0000000000..b47a13a175
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-env-stderr.txt
@@ -0,0 +1,21 @@
+^3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at FindRecursivePackage\.cmake:1 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage\.cmake:3 \(find_package\)
+ find_package\.cmake:2 \(find_package\)
+ CMakeLists\.txt:5 \(include\)$
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt
new file mode 100644
index 0000000000..4e965e8eb6
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-script-stderr.txt
@@ -0,0 +1,7 @@
+[0-9]+
+CMake Error at [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
+Call Stack \(most recent call first\):
+ [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt
new file mode 100644
index 0000000000..0119953adb
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-env-stderr.txt
@@ -0,0 +1,5 @@
+[0-9]+
+CMake Error at FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
+Call Stack \(most recent call first\):
+ FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt
index b8557ab645..4e965e8eb6 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-script-stderr.txt
@@ -1,5 +1,7 @@
[0-9]+
-CMake Error at .*/FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- .*/FindRecursivePackage\.cmake:3 \(find_package\)
+ [^
+]*/Tests/RunCMake/MaxRecursionDepth/FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt
index 5d31e295b0..0119953adb 100644
--- a/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt
+++ b/Tests/RunCMake/MaxRecursionDepth/find_package-invalid-var-stderr.txt
@@ -1,5 +1,5 @@
[0-9]+
-CMake Error at FindRecursivePackage\.cmake:1 \(message\):
- Maximum recursion depth of [0-9]+ exceeded
+CMake Error at FindRecursivePackage.cmake:[0-9]+ \(find_package\):
+ find_package maximum nesting depth of [0-9]+ exceeded.
Call Stack \(most recent call first\):
- FindRecursivePackage\.cmake:3 \(find_package\)
+ FindRecursivePackage.cmake:[0-9]+ \(find_package\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/function-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/function-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/function-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/function-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/function-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/function-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/function-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/function-env-script-stderr.txt
new file mode 100644
index 0000000000..61304b13f7
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/function-env-script-stderr.txt
@@ -0,0 +1,21 @@
+^3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at .*/function\.cmake:2 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ .*/function\.cmake:4 \(recursive\)
+ .*/function\.cmake:4 \(recursive\)
+ .*/function\.cmake:4 \(recursive\)
+ .*/function\.cmake:4 \(recursive\)
+ .*/function\.cmake:4 \(recursive\)
+ .*/function\.cmake:4 \(recursive\)
+ .*/function\.cmake:4 \(recursive\)
+ .*/function\.cmake:4 \(recursive\)
+ .*/function\.cmake:7 \(recursive\)
+ .*/CMakeLists\.txt:5 \(include\)$
diff --git a/Tests/RunCMake/MaxRecursionDepth/function-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/function-env-stderr.txt
new file mode 100644
index 0000000000..54e72aff4b
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/function-env-stderr.txt
@@ -0,0 +1,21 @@
+^3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at function\.cmake:2 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ function\.cmake:4 \(recursive\)
+ function\.cmake:4 \(recursive\)
+ function\.cmake:4 \(recursive\)
+ function\.cmake:4 \(recursive\)
+ function\.cmake:4 \(recursive\)
+ function\.cmake:4 \(recursive\)
+ function\.cmake:4 \(recursive\)
+ function\.cmake:4 \(recursive\)
+ function\.cmake:7 \(recursive\)
+ CMakeLists\.txt:5 \(include\)$
diff --git a/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-stderr.txt
new file mode 100644
index 0000000000..92de1fb3c7
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-script-stderr.txt
@@ -0,0 +1,5 @@
+[0-9]+
+CMake Error at .*/function\.cmake:2 \(message\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ .*/function\.cmake:4 \(recursive\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-stderr.txt
new file mode 100644
index 0000000000..5c25c4b129
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/function-invalid-env-stderr.txt
@@ -0,0 +1,5 @@
+[0-9]+
+CMake Error at function\.cmake:2 \(message\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ function\.cmake:4 \(recursive\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/include-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/include-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/include-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/include-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/include-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/include-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/include-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/include-env-script-stderr.txt
new file mode 100644
index 0000000000..f55f50536f
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/include-env-script-stderr.txt
@@ -0,0 +1,21 @@
+^3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at .*/include_recursive\.cmake:1 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ .*/include_recursive\.cmake:3 \(include\)
+ .*/include_recursive\.cmake:3 \(include\)
+ .*/include_recursive\.cmake:3 \(include\)
+ .*/include_recursive\.cmake:3 \(include\)
+ .*/include_recursive\.cmake:3 \(include\)
+ .*/include_recursive\.cmake:3 \(include\)
+ .*/include_recursive\.cmake:3 \(include\)
+ .*/include_recursive\.cmake:3 \(include\)
+ .*/include\.cmake:2 \(include\)
+ .*/CMakeLists\.txt:5 \(include\)$
diff --git a/Tests/RunCMake/MaxRecursionDepth/include-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/include-env-stderr.txt
new file mode 100644
index 0000000000..ff33985045
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/include-env-stderr.txt
@@ -0,0 +1,21 @@
+^3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at include_recursive\.cmake:1 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ include_recursive\.cmake:3 \(include\)
+ include_recursive\.cmake:3 \(include\)
+ include_recursive\.cmake:3 \(include\)
+ include_recursive\.cmake:3 \(include\)
+ include_recursive\.cmake:3 \(include\)
+ include_recursive\.cmake:3 \(include\)
+ include_recursive\.cmake:3 \(include\)
+ include_recursive\.cmake:3 \(include\)
+ include\.cmake:2 \(include\)
+ CMakeLists\.txt:5 \(include\)$
diff --git a/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-stderr.txt
new file mode 100644
index 0000000000..0510e7c373
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-script-stderr.txt
@@ -0,0 +1,5 @@
+[0-9]+
+CMake Error at .*/include_recursive\.cmake:1 \(message\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ .*/include_recursive\.cmake:3 \(include\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-stderr.txt
new file mode 100644
index 0000000000..b1494a8e11
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/include-invalid-env-stderr.txt
@@ -0,0 +1,5 @@
+[0-9]+
+CMake Error at include_recursive\.cmake:1 \(message\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ include_recursive\.cmake:3 \(include\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/macro-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/macro-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/macro-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/macro-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/macro-env-script-stderr.txt
new file mode 100644
index 0000000000..142e068a08
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/macro-env-script-stderr.txt
@@ -0,0 +1,21 @@
+^3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at .*/macro\.cmake:2 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ .*/macro\.cmake:4 \(recursive\)
+ .*/macro\.cmake:4 \(recursive\)
+ .*/macro\.cmake:4 \(recursive\)
+ .*/macro\.cmake:4 \(recursive\)
+ .*/macro\.cmake:4 \(recursive\)
+ .*/macro\.cmake:4 \(recursive\)
+ .*/macro\.cmake:4 \(recursive\)
+ .*/macro\.cmake:4 \(recursive\)
+ .*/macro\.cmake:7 \(recursive\)
+ .*/CMakeLists\.txt:5 \(include\)$
diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/macro-env-stderr.txt
new file mode 100644
index 0000000000..71de55376f
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/macro-env-stderr.txt
@@ -0,0 +1,21 @@
+^3
+4
+5
+6
+7
+8
+9
+10
+CMake Error at macro\.cmake:2 \(message\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ macro\.cmake:4 \(recursive\)
+ macro\.cmake:4 \(recursive\)
+ macro\.cmake:4 \(recursive\)
+ macro\.cmake:4 \(recursive\)
+ macro\.cmake:4 \(recursive\)
+ macro\.cmake:4 \(recursive\)
+ macro\.cmake:4 \(recursive\)
+ macro\.cmake:4 \(recursive\)
+ macro\.cmake:7 \(recursive\)
+ CMakeLists\.txt:5 \(include\)$
diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-stderr.txt
new file mode 100644
index 0000000000..c67be57d28
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-script-stderr.txt
@@ -0,0 +1,5 @@
+[0-9]+
+CMake Error at .*/macro\.cmake:2 \(message\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ .*/macro\.cmake:4 \(recursive\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-stderr.txt
new file mode 100644
index 0000000000..0b271627da
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/macro-invalid-env-stderr.txt
@@ -0,0 +1,5 @@
+[0-9]+
+CMake Error at macro\.cmake:2 \(message\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ macro\.cmake:4 \(recursive\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-stderr.txt
new file mode 100644
index 0000000000..52fedd314c
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-script-stderr.txt
@@ -0,0 +1,22 @@
+^4
+6
+8
+10
+CMake Error at .*/variable_watch\.cmake:[0-9]+ \(update_x\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ .*/variable_watch\.cmake:5 \(set\)
+ .*/variable_watch\.cmake:[0-9]+ \(update_x\)
+ .*/variable_watch\.cmake:5 \(set\)
+ .*/variable_watch\.cmake:[0-9]+ \(update_x\)
+ .*/variable_watch\.cmake:5 \(set\)
+ .*/variable_watch\.cmake:[0-9]+ \(update_x\)
+ .*/variable_watch\.cmake:5 \(set\)
+ .*/variable_watch\.cmake:[0-9]+ \(update_x\)
+ .*/variable_watch\.cmake:9 \(set\)
+ .*/CMakeLists\.txt:5 \(include\)
+
+
+CMake Error: Error in cmake code at
+Unknown:0:
+A command failed during the invocation of callback "update_x"\.$
diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-stderr.txt
new file mode 100644
index 0000000000..1427f1df99
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-env-stderr.txt
@@ -0,0 +1,22 @@
+^4
+6
+8
+10
+CMake Error at variable_watch\.cmake:[0-9]+ \(update_x\):
+ Maximum recursion depth of 10 exceeded
+Call Stack \(most recent call first\):
+ variable_watch\.cmake:5 \(set\)
+ variable_watch\.cmake:[0-9]+ \(update_x\)
+ variable_watch\.cmake:5 \(set\)
+ variable_watch\.cmake:[0-9]+ \(update_x\)
+ variable_watch\.cmake:5 \(set\)
+ variable_watch\.cmake:[0-9]+ \(update_x\)
+ variable_watch\.cmake:5 \(set\)
+ variable_watch\.cmake:[0-9]+ \(update_x\)
+ variable_watch\.cmake:9 \(set\)
+ CMakeLists\.txt:5 \(include\)
+
+
+CMake Error: Error in cmake code at
+Unknown:0:
+A command failed during the invocation of callback "update_x"\.$
diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-result.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-result.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-stderr.txt
new file mode 100644
index 0000000000..07deee2eaf
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-script-stderr.txt
@@ -0,0 +1,6 @@
+[0-9]+
+CMake Error at .*/variable_watch\.cmake:[0-9]+ \(update_x\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ .*/variable_watch\.cmake:5 \(set\)
+ .*/variable_watch\.cmake:[0-9]+ \(update_x\)
diff --git a/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-stderr.txt b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-stderr.txt
new file mode 100644
index 0000000000..b2395b30f3
--- /dev/null
+++ b/Tests/RunCMake/MaxRecursionDepth/variable_watch-invalid-env-stderr.txt
@@ -0,0 +1,6 @@
+[0-9]+
+CMake Error at variable_watch\.cmake:[0-9]+ \(update_x\):
+ Maximum recursion depth of [0-9]+ exceeded
+Call Stack \(most recent call first\):
+ variable_watch\.cmake:5 \(set\)
+ variable_watch\.cmake:[0-9]+ \(update_x\)
diff --git a/Tests/RunCMake/MultiLint/CXX.cmake b/Tests/RunCMake/MultiLint/CXX.cmake
index dc30146a6e..3e99e73754 100644
--- a/Tests/RunCMake/MultiLint/CXX.cmake
+++ b/Tests/RunCMake/MultiLint/CXX.cmake
@@ -1,6 +1,6 @@
enable_language(CXX)
-set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${PSEUDO_IWYU}" -some -args)
-set(CMAKE_CXX_CLANG_TIDY "${PSEUDO_TIDY}" -some -args)
-set(CMAKE_CXX_CPPLINT "${PSEUDO_CPPLINT}" --verbose=0 --linelength=80)
-set(CMAKE_CXX_CPPCHECK "${PSEUDO_CPPCHECK}")
+set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "$<1:${PSEUDO_IWYU}>" -some -args)
+set(CMAKE_CXX_CLANG_TIDY "$<1:${PSEUDO_TIDY}>" -some -args)
+set(CMAKE_CXX_CPPLINT "$<1:${PSEUDO_CPPLINT}>" --verbose=0 --linelength=80)
+set(CMAKE_CXX_CPPCHECK "$<1:${PSEUDO_CPPCHECK}>")
add_executable(main main.cxx)
diff --git a/Tests/RunCMake/Ninja/AssumedSources.cmake b/Tests/RunCMake/Ninja/AssumedSources.cmake
index d5364f0270..d68fca9997 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 9a606ee60a..6d340b0f11 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 92a3a0fb57..45e5aa3721 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 ba6e5da4e0..834c781354 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 0326e07662..388e0184c4 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 0000000000..2927f527b3
--- /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 6128167967..6f5484a051 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 439a2d9bfd..1ffb4169d0 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 7bc66ef284..714ae6443b 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 2a0591e74d..8eb57486ad 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 790cf9d255..7d6faf5d4b 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 0000000000..fefd86a1e3
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake
@@ -0,0 +1,36 @@
+cmake_minimum_required(VERSION 3.26)
+project(CustomCommandExplicitDepends C)
+
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command-option.h"
+ COMMAND "${CMAKE_COMMAND}" -E touch
+ "${CMAKE_CURRENT_BINARY_DIR}/command-option.h"
+ COMMENT "Creating command-option.h"
+ DEPENDS_EXPLICIT_ONLY
+)
+
+set(CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY ON)
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command-variable-on.h"
+ COMMAND "${CMAKE_COMMAND}" -E touch
+ "${CMAKE_CURRENT_BINARY_DIR}/command-variable-on.h"
+ COMMENT "Creating command-variable-on.h"
+)
+
+set(CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY OFF)
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command-variable-off.h"
+ COMMAND "${CMAKE_COMMAND}" -E touch
+ "${CMAKE_CURRENT_BINARY_DIR}/command-variable-off.h"
+ COMMENT "Creating command-variable-off.h"
+)
+
+add_library(dep SHARED dep.c)
+
+add_library(top SHARED
+ top.c
+ "${CMAKE_CURRENT_BINARY_DIR}/command-option.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/command-variable-on.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/command-variable-off.h"
+)
+target_link_libraries(top PRIVATE dep)
diff --git a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
index 8e01c8c657..e04ac21e5c 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 4e17d68898..2b6a61bf4e 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 360c7ba13c..90f824978a 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 505f750942..9615c5696f 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 da6f86a733..81eb731e76 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 520d9c7ee9..619e94a234 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -191,6 +191,38 @@ function (run_LooseObjectDepends)
endfunction ()
run_LooseObjectDepends()
+function (run_CustomCommandExplictDepends)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandExplicitDepends-build)
+ run_cmake(CustomCommandExplicitDepends)
+
+ set(DEP_LIB "${RunCMake_TEST_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}dep${CMAKE_SHARED_LIBRARY_SUFFIX}")
+
+ run_ninja("${RunCMake_TEST_BINARY_DIR}" "command-option.h")
+ if (EXISTS "${DEP_LIB}")
+ message(FATAL_ERROR
+ "The `dep` library was created when requesting a custom command to be "
+ "generated; this should no longer be necessary when passing "
+ "DEPENDS_EXPLICIT_ONLY option.")
+ endif ()
+
+ run_ninja("${RunCMake_TEST_BINARY_DIR}" "command-variable-on.h")
+ if (EXISTS "${DEP_LIB}")
+ message(FATAL_ERROR
+ "The `dep` library was created when requesting a custom command to be "
+ "generated; this should no longer be necessary when setting "
+ "CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY variable to ON.")
+ endif ()
+
+ run_ninja("${RunCMake_TEST_BINARY_DIR}" "command-variable-off.h")
+ if (NOT EXISTS "${DEP_LIB}")
+ message(FATAL_ERROR
+ "The `dep` library was not created when requesting a custom command to be "
+ "generated; this should be necessary when setting "
+ "CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY variable to OFF.")
+ 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 1a78390e32..c295c16ae9 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 0f815ae5e5..dab674281a 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 30ad1e6073..49d075fba7 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 666452f340..10ac5a6acc 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/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt
new file mode 100644
index 0000000000..f5bce43c15
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt
@@ -0,0 +1 @@
+tgt has been built
diff --git a/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix.cmake b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix.cmake
new file mode 100644
index 0000000000..c4e0587441
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix.cmake
@@ -0,0 +1 @@
+add_custom_target(tgt ALL COMMAND ${CMAKE_COMMAND} -E echo "tgt has been built")
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index c040e8f1ee..47f5eeed22 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -459,6 +459,15 @@ set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release;-DCMAKE_C
run_cmake(CompileCommands)
unset(RunCMake_TEST_OPTIONS)
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/OutputPathPrefix-build)
+run_cmake_with_options(OutputPathPrefix "-DCMAKE_NINJA_OUTPUT_PATH_PREFIX=OutputPathPrefix-build")
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR})
+set(RunCMake_TEST_NO_CLEAN 1)
+run_cmake_command(OutputPathPrefix-all-ninja "${RunCMake_MAKE_PROGRAM}" -f OutputPathPrefix-build/build.ninja OutputPathPrefix-build/all)
+run_cmake_command(OutputPathPrefix-clean-ninja "${RunCMake_MAKE_PROGRAM}" -f OutputPathPrefix-build/build.ninja OutputPathPrefix-build/clean)
+unset(RunCMake_TEST_NO_CLEAN)
+unset(RunCMake_TEST_BINARY_DIR)
+
# CudaSimple uses separable compilation, which is currently only supported on NVCC.
if(CMake_TEST_CUDA)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CudaSimple-build)
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
index 5c7882d688..05eb42d5ea 100644
--- a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at MissingSource.cmake:1 \(add_library\):
missing.c
- Tried extensions \.c \.C .*
-.*
-Call Stack \(most recent call first\):
+ Tried extensions ([^
+]+
+)+Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt b/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt
index 2897109554..3e470a29cb 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 75c26a7a17..6027f0339b 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 2897109554..3e470a29cb 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 df4ef1fcb4..fa7bf072d4 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 abd27f4cd8..da608b3729 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 c3922d623f..42b0577061 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/README.rst b/Tests/RunCMake/README.rst
index ebe40cf480..d8cae8bcc8 100644
--- a/Tests/RunCMake/README.rst
+++ b/Tests/RunCMake/README.rst
@@ -82,3 +82,10 @@ match the regular expression are not run. For example::
This will only run subtests in ``RunCMake.Example`` that start with
``example``.
+
+To speed up the process of creating a new ``RunCMake`` test, you can run a
+script that will automatically perform steps 1 through 4 for you::
+
+ cmake -DRunCMake_TEST_SUITE=<test suite name> -P Tests/RunCMake/AddRunCMakeTestSuite.cmake
+
+Be sure to run this from the top-level CMake source directory.
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index faff95767c..18dde944d7 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -11,8 +11,12 @@ foreach(
endforeach()
function(run_cmake test)
- if(DEFINED ENV{RunCMake_TEST_FILTER} AND NOT test MATCHES "$ENV{RunCMake_TEST_FILTER}")
- return()
+ if(DEFINED ENV{RunCMake_TEST_FILTER})
+ set(test_and_variant "${test}${RunCMake_TEST_VARIANT_DESCRIPTION}")
+ if(NOT test_and_variant MATCHES "$ENV{RunCMake_TEST_FILTER}")
+ return()
+ endif()
+ unset(test_and_variant)
endif()
set(top_src "${RunCMake_SOURCE_DIR}")
@@ -43,6 +47,8 @@ function(run_cmake test)
elseif(EXISTS ${top_src}/${test}-${o}.txt)
file(READ ${top_src}/${test}-${o}.txt expect_${o})
string(REGEX REPLACE "\n+$" "" expect_${o} "${expect_${o}}")
+ elseif(DEFINED RunCMake_TEST_EXPECT_${o})
+ string(REGEX REPLACE "\n+$" "" expect_${o} "${RunCMake_TEST_EXPECT_${o}}")
else()
unset(expect_${o})
endif()
@@ -94,7 +100,7 @@ function(run_cmake test)
if(APPLE)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
endif()
- if(NOT RunCMake_TEST_NO_CMP0129 AND CMAKE_C_COMPILER_ID STREQUAL "LCC")
+ if(RunCMake_TEST_LCC AND NOT RunCMake_TEST_NO_CMP0129)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0129=NEW)
endif()
if(RunCMake_MAKE_PROGRAM)
@@ -171,7 +177,7 @@ function(run_cmake test)
"|Your license to use PGI[^\n]*expired"
"|Please obtain a new version at"
"|contact PGI Sales at"
- "|icp?c: remark #10441: The Intel\\(R\\) C\\+\\+ Compiler Classic \\(ICC\\) is deprecated"
+ "|ic(p?c|l): remark #10441: The Intel\\(R\\) C\\+\\+ Compiler Classic \\(ICC\\) is deprecated"
"|[^\n]*install_name_tool: warning: changes being made to the file will invalidate the code signature in:"
"|[^\n]*xcodebuild[^\n]*DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default"
@@ -187,6 +193,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 74b3ff8de3..77030d63b2 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 874bdc73c2..16d2e21386 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 5fdb6888f9..b59bb62db8 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 e16faea539..919a1685ca 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 f0c287cdb9..f56ac64753 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 07e98dae04..382ea005bb 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 a94c9ffdb4..20ed3c119b 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 b309c3baf6..c7238df5b2 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 0da12902a9..09af0cea65 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 ffe0e2a9e0..3d88f36158 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 93fba3413e..8b40b19df9 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 b332d34b20..0d76251bf6 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 a650e5b728..30d4d4d46d 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/ArtifactOutputDirs/CMakeLists.txt b/Tests/RunCMake/TargetArtifacts/CMakeLists.txt
index ab1a20c7eb..ab1a20c7eb 100644
--- a/Tests/RunCMake/ArtifactOutputDirs/CMakeLists.txt
+++ b/Tests/RunCMake/TargetArtifacts/CMakeLists.txt
diff --git a/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION-build-stdout.txt b/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION-build-stdout.txt
new file mode 100644
index 0000000000..b375da6f4a
--- /dev/null
+++ b/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION-build-stdout.txt
@@ -0,0 +1,2 @@
+.*exA_name="(libexA\.so\.2|libexA\.2\.dylib|(lib|cyg|msys-|)exA-2\.dll)"
+.*exB_name="(libexB\.so\.2|libexB\.2\.dylib|(lib|cyg|msys-|)exB-2\.dll)"
diff --git a/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake b/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake
new file mode 100644
index 0000000000..82eca0b6f3
--- /dev/null
+++ b/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake
@@ -0,0 +1,18 @@
+enable_language(C)
+
+add_library(exA SHARED dll.c)
+set_target_properties(exA PROPERTIES
+ SOVERSION 2
+ DLL_NAME_WITH_SOVERSION 1
+ )
+
+set(CMAKE_DLL_NAME_WITH_SOVERSION 1)
+add_library(exB SHARED dll.c)
+set_property(TARGET exB PROPERTY SOVERSION 2)
+
+add_custom_target(checkNames ALL
+ COMMAND ${CMAKE_COMMAND} -E echo exA_name="$<TARGET_FILE_NAME:exA>"
+ COMMAND ${CMAKE_COMMAND} -E echo exB_name="$<TARGET_FILE_NAME:exB>"
+ VERBATIM
+ )
+add_dependencies(checkNames exA exB)
diff --git a/Tests/RunCMake/ArtifactOutputDirs/ArtifactOutputDirs.cmake b/Tests/RunCMake/TargetArtifacts/OutputDirs.cmake
index d0accd7dea..d0accd7dea 100644
--- a/Tests/RunCMake/ArtifactOutputDirs/ArtifactOutputDirs.cmake
+++ b/Tests/RunCMake/TargetArtifacts/OutputDirs.cmake
diff --git a/Tests/RunCMake/ArtifactOutputDirs/RunCMakeTest.cmake b/Tests/RunCMake/TargetArtifacts/RunCMakeTest.cmake
index 1bf84380d0..de69936ed7 100644
--- a/Tests/RunCMake/ArtifactOutputDirs/RunCMakeTest.cmake
+++ b/Tests/RunCMake/TargetArtifacts/RunCMakeTest.cmake
@@ -2,18 +2,18 @@ include(RunCMake)
function(run_cmake_and_verify_after_build case)
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${case}-build")
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
- set(RunCMake_TEST_NO_CLEAN 1)
if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug)
else()
set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
endif()
run_cmake(${case})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_command("${case}-build" ${CMAKE_COMMAND} --build .)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_BINARY_DIR)
endfunction()
-run_cmake_and_verify_after_build(ArtifactOutputDirs)
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "AIX")
+ run_cmake_and_verify_after_build(DLL-SOVERSION)
+endif()
+run_cmake_and_verify_after_build(OutputDirs)
diff --git a/Tests/RunCMake/ArtifactOutputDirs/check.cmake b/Tests/RunCMake/TargetArtifacts/check.cmake
index ca37eba531..ca37eba531 100644
--- a/Tests/RunCMake/ArtifactOutputDirs/check.cmake
+++ b/Tests/RunCMake/TargetArtifacts/check.cmake
diff --git a/Tests/RunCMake/TargetArtifacts/dll.c b/Tests/RunCMake/TargetArtifacts/dll.c
new file mode 100644
index 0000000000..31e1dbfdf2
--- /dev/null
+++ b/Tests/RunCMake/TargetArtifacts/dll.c
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void dll(void)
+{
+}
diff --git a/Tests/RunCMake/ArtifactOutputDirs/lib.c b/Tests/RunCMake/TargetArtifacts/lib.c
index 22373f1940..22373f1940 100644
--- a/Tests/RunCMake/ArtifactOutputDirs/lib.c
+++ b/Tests/RunCMake/TargetArtifacts/lib.c
diff --git a/Tests/RunCMake/ArtifactOutputDirs/main.c b/Tests/RunCMake/TargetArtifacts/main.c
index 8488f4e58f..8488f4e58f 100644
--- a/Tests/RunCMake/ArtifactOutputDirs/main.c
+++ b/Tests/RunCMake/TargetArtifacts/main.c
diff --git a/Tests/RunCMake/TargetProperties/CMakeLists.txt b/Tests/RunCMake/TargetProperties/CMakeLists.txt
index 44b5d30c03..26f536be57 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/ToolchainFile/RunCMakeTest.cmake b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
index 7744ee850c..b588ce03d1 100644
--- a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
@@ -14,6 +14,7 @@ run_cmake_toolchain(LinkFlagsInit)
run_cmake_toolchain(CMP0126-NEW)
run_cmake_toolchain(CMP0126-OLD)
run_cmake_toolchain(CMP0126-WARN)
+run_cmake_toolchain(SetCrossCompiling)
function(run_IncludeDirectories)
run_cmake_toolchain(IncludeDirectories)
diff --git a/Tests/RunCMake/ToolchainFile/SetCrossCompiling-stderr.txt b/Tests/RunCMake/ToolchainFile/SetCrossCompiling-stderr.txt
new file mode 100644
index 0000000000..6642cf6578
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/SetCrossCompiling-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Warning \(dev\) at [^
+]*/Modules/CMakeDetermineSystem.cmake:[0-9]+ \(message\):
+ CMAKE_CROSSCOMPILING has been set by the project, toolchain file, or user\.
+ CMake is resetting it to false because CMAKE_SYSTEM_NAME was not set\. To
+ indicate cross compilation, only CMAKE_SYSTEM_NAME needs to be set\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(project\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/ToolchainFile/SetCrossCompiling-toolchain.cmake b/Tests/RunCMake/ToolchainFile/SetCrossCompiling-toolchain.cmake
new file mode 100644
index 0000000000..170e26cab2
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/SetCrossCompiling-toolchain.cmake
@@ -0,0 +1 @@
+set(CMAKE_CROSSCOMPILING TRUE)
diff --git a/Tests/RunCMake/ToolchainFile/SetCrossCompiling.cmake b/Tests/RunCMake/ToolchainFile/SetCrossCompiling.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/SetCrossCompiling.cmake
diff --git a/Tests/RunCMake/TransformDepfile/deps-unix.d.txt b/Tests/RunCMake/TransformDepfile/deps-unix.d.txt
index fbdecc072b..2588181b8b 100644
--- a/Tests/RunCMake/TransformDepfile/deps-unix.d.txt
+++ b/Tests/RunCMake/TransformDepfile/deps-unix.d.txt
@@ -1,8 +1,8 @@
subdir/out1 \
/home/build/out2: \
- subdir/in1 \
- /home/build/in2
+ /home/build/in2 \
+ subdir/in1
subdir/out3 \
/home/build/out4: \
- subdir/in3 \
- /home/build/in4
+ /home/build/in4 \
+ subdir/in3
diff --git a/Tests/RunCMake/TransformDepfile/deps-windows.d.txt b/Tests/RunCMake/TransformDepfile/deps-windows.d.txt
index e09ae375a8..805a4c8362 100644
--- a/Tests/RunCMake/TransformDepfile/deps-windows.d.txt
+++ b/Tests/RunCMake/TransformDepfile/deps-windows.d.txt
@@ -1,8 +1,8 @@
subdir/out1 \
C:/build/out2: \
- subdir/in1 \
- C:/build/in2
+ C:/build/in2 \
+ subdir/in1
subdir/out3 \
C:/build/out4: \
- subdir/in3 \
- C:/build/in4
+ C:/build/in4 \
+ subdir/in3
diff --git a/Tests/RunCMake/VS10Project/CMakeInputs-check.cmake b/Tests/RunCMake/VS10Project/CMakeInputs-check.cmake
new file mode 100644
index 0000000000..a125574d8e
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CMakeInputs-check.cmake
@@ -0,0 +1,25 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/ZERO_CHECK.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_CMakeInputs 0)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "<([A-Za-z0-9_]+) +Include=.*CMakeInputs.cmake")
+ set(rule "${CMAKE_MATCH_1}")
+ if(NOT rule STREQUAL "None")
+ set(RunCMake_TEST_FAILED "CMakeInputs.cmake referenced as ${rule} instead of None")
+ return()
+ endif()
+ if(found_CMakeInputs)
+ set(RunCMake_TEST_FAILED "CMakeInputs.cmake referenced multiple times")
+ return()
+ endif()
+ set(found_CMakeInputs 1)
+ endif()
+endforeach()
+if(NOT found_CMakeInputs)
+ set(RunCMake_TEST_FAILED "CMakeInputs.cmake not referenced")
+endif()
diff --git a/Tests/RunCMake/VS10Project/CMakeInputs.cmake b/Tests/RunCMake/VS10Project/CMakeInputs.cmake
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CMakeInputs.cmake
diff --git a/Tests/RunCMake/VS10Project/CustomCommandParallel-check.cmake b/Tests/RunCMake/VS10Project/CustomCommandParallel-check.cmake
new file mode 100644
index 0000000000..4c8ad0007f
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CustomCommandParallel-check.cmake
@@ -0,0 +1,52 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_CustomBuild_cmp0147_new 0)
+set(found_CustomBuild_cmp0147_old 0)
+set(found_CustomBuild_CMakeLists 0)
+set(found_BuildInParallel_cmp0147_new 0)
+set(found_BuildInParallel_cmp0147_old 0)
+set(found_BuildInParallel_CMakeLists 0)
+set(in_CustomBuild "")
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES [[<CustomBuild Include=".*\\cmp0147-old\.txt\.rule">]])
+ set(found_CustomBuild_cmp0147_old 1)
+ set(in_CustomBuild "cmp0147_old")
+ endif()
+ if(line MATCHES [[<CustomBuild Include=".*\\cmp0147-new\.txt\.rule">]])
+ set(found_CustomBuild_cmp0147_new 1)
+ set(in_CustomBuild "cmp0147_new")
+ endif()
+ if(line MATCHES [[<CustomBuild Include=".*\\CMakeLists\.txt">]])
+ set(found_CustomBuild_CMakeLists 1)
+ set(in_CustomBuild "CMakeLists")
+ endif()
+ if(line MATCHES [[</CustomBuild>]])
+ set(in_CustomBuild "")
+ endif()
+ if(line MATCHES [[<BuildInParallel .*>true</BuildInParallel>]] AND in_CustomBuild)
+ set(found_BuildInParallel_${in_CustomBuild} 1)
+ endif()
+endforeach()
+if(NOT found_CustomBuild_cmp0147_new)
+ string(APPEND RunCMake_TEST_FAILED "CustomBuild for cmp0147-new.txt.rule not found in\n ${vcProjectFile}\n")
+endif()
+if(NOT found_CustomBuild_cmp0147_old)
+ string(APPEND RunCMake_TEST_FAILED "CustomBuild for cmp0147-old.txt.rule not found in\n ${vcProjectFile}\n")
+endif()
+if(NOT found_CustomBuild_CMakeLists)
+ string(APPEND RunCMake_TEST_FAILED "CustomBuild for CMakeLists.txt not found in\n ${vcProjectFile}\n")
+endif()
+if(NOT found_BuildInParallel_cmp0147_new)
+ string(APPEND RunCMake_TEST_FAILED "BuildInParallel for cmp0147-new.txt.rule not found in\n ${vcProjectFile}\n")
+endif()
+if(found_BuildInParallel_cmp0147_old)
+ string(APPEND RunCMake_TEST_FAILED "BuildInParallel for cmp0147-old.txt.rule incorrectly found in\n ${vcProjectFile}\n")
+endif()
+if(found_BuildInParallel_CMakeLists)
+ string(APPEND RunCMake_TEST_FAILED "BuildInParallel for CMakeLists.txt incorrectly found in\n ${vcProjectFile}\n")
+endif()
diff --git a/Tests/RunCMake/VS10Project/CustomCommandParallel.cmake b/Tests/RunCMake/VS10Project/CustomCommandParallel.cmake
new file mode 100644
index 0000000000..784fc685b5
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CustomCommandParallel.cmake
@@ -0,0 +1,5 @@
+cmake_policy(VERSION 3.26) # CMP0147 left unset
+add_custom_command(OUTPUT "cmp0147-old.txt" COMMAND echo)
+cmake_policy(SET CMP0147 NEW)
+add_custom_command(OUTPUT "cmp0147-new.txt" COMMAND echo)
+add_custom_target(foo DEPENDS "cmp0147-old.txt" "cmp0147-new.txt")
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index ed74896370..cb1a5d5403 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -7,7 +7,11 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREA
run_cmake(LanguageStandard)
endif()
+run_cmake(CMakeInputs)
run_cmake(CustomCommandGenex)
+if(NOT RunCMake_GENERATOR MATCHES "^Visual Studio 1[1-5] ")
+ run_cmake(CustomCommandParallel)
+endif()
run_cmake(VsCsharpSourceGroup)
run_cmake(VsCSharpCompilerOpts)
run_cmake(ExplicitCMakeLists)
diff --git a/Tests/RunCMake/VSSolution/CMakeLists.txt b/Tests/RunCMake/VSSolution/CMakeLists.txt
index 74b3ff8de3..93ee9dfd5f 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 7a000ee9ac..133dbe1641 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 bd914f821e..623ef2adde 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 872338d3c6..1d0bd703cf 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 1f3c19d0c9..68372a126e 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 74b3ff8de3..93ee9dfd5f 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 3d8fa17920..234ceef8b1 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 a9ea717df3..b42e933d67 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 e72bf4dc9c..ab64db7662 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 bc14874ad2..a9fafd22b7 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 8426148b8d..f8eccc76a7 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 7d14d195fa..e719428c0a 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 5177ec2c84..cb22e5184f 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 75da7b1c44..fccd4c6a84 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 a1064f45dc..b334b7ddd3 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 4840276ae8..8f540460a4 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 0ad942f28f..193860c230 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 3ca24af8db..5e66e827e9 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 44052f035b..80107cbbc1 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 2fe5a9f839..ff3419cfd0 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 267e3797aa..05a89763de 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 e83d7f3cd8..55dd1a75e3 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 58d26164f6..bd8995be9d 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 ef2163c298..93ee9dfd5f 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 65b72506e5..d8a5d86b57 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 ef2163c298..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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 f0e4069eda..547c1017ad 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 45b3974420..2f883af9e2 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 ef2163c298..93ee9dfd5f 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 ef2163c298..93ee9dfd5f 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 c77b43cd51..f7c551d19c 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 47d249cce0..b5d72625df 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 0000000000..46b32d1426
--- /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 0000000000..906f318d36
--- /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 0000000000..65818fae27
--- /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 0000000000..db88659dfb
--- /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 0000000000..42cc02aa1a
--- /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 0000000000..6a39db67ff
--- /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 0000000000..d5dcada0b4
--- /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 0000000000..69cd304b27
--- /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 0000000000..e601bfc814
--- /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 0000000000..618d2b19ed
--- /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 0000000000..ad67c08d61
--- /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 74b3ff8de3..93ee9dfd5f 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 01983e54f1..e2ebbfa05f 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 f1a83e8c4b..1319aecc3d 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 7d40dcb047..0000000000
--- 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 0000000000..79812352fa
--- /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 220e359d4d..220e359d4d 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 667561ea79..8eb57486ad 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 81d26d260d..3eb980a58b 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 3a959bb2f9..36c44cbc71 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 6dd8cdf551..93ee9dfd5f 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 70fd6f53f2..655115f58b 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 2897109554..93ee9dfd5f 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 ef2163c298..93ee9dfd5f 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 af70ac325b..f5d57e9b2a 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 4a067fa507..0a59940fe2 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 6f1b4b6f47..12525f2e4e 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 9f7fa13e07..f92568fcf1 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 0648e7c351..711a77fd49 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 2fb21d45d8..2860b5c46d 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 72d199acb0..5935809d97 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 1babd72d91..da7ec1a606 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 1788e6647c..f5a12236b0 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 68a0fcb8bc..1de338b4f2 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 eedf080b78..af995fc0e3 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 913239c295..e497a7d995 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 4063ece663..82acc19686 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 35cd16a980..0f4885f994 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 e61b556688..8eb422d10e 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 36b1dbdf03..16dde1c69e 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 ecf0e54eaa..f816fac07d 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 01aab26bb9..faaf9b489c 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 1fab71be5e..21e5273568 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 f13bdd11da..a546d38c4b 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 74b3ff8de3..93ee9dfd5f 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-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake
index 43b406bbaa..a68607e6b5 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake
@@ -9,6 +9,10 @@ function(run_install_test case)
run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config Debug)
# Check "all" components.
set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-all)
+ set(maybe_stderr "${case}-all-stderr-${CMAKE_C_COMPILER_ID}.txt")
+ if(EXISTS "${RunCMake_SOURCE_DIR}/${maybe_stderr}")
+ set(RunCMake-stderr-file "${maybe_stderr}")
+ endif()
run_cmake_command(${case}-all ${CMAKE_COMMAND} --install . --prefix ${CMAKE_INSTALL_PREFIX} --config Debug)
endfunction()
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake
index cb0e534a35..10b7b82bce 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake
@@ -1,19 +1,29 @@
+if(CMAKE_C_COMPILER_ID STREQUAL "Borland")
+ # Borland upper-cases dll names referenced in import libraries.
+ set(conflict_dll [[CONFLICT\.DLL]])
+ set(unresolved_dll [[UNRESOLVED\.DLL]])
+else()
+ set(conflict_dll [[conflict\.dll]])
+ set(unresolved_dll [[unresolved\.dll]])
+endif()
+
set(_check
[=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/\.conflict/\.\./(lib)?libdir\.dll]=]
[=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/\.search/(lib)?search\.dll]=]
+ [=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/(lib)?MixedCase\.dll]=]
[=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/(lib)?testlib\.dll]=]
)
check_contents(deps/deps1.txt "^${_check}$")
check_contents(deps/deps2.txt "^${_check}$")
check_contents(deps/deps3.txt "^${_check}$")
set(_check
- [=[(lib)?unresolved\.dll]=]
+ "(lib)?${unresolved_dll}"
)
check_contents(deps/udeps1.txt "^${_check}$")
check_contents(deps/udeps2.txt "^${_check}$")
check_contents(deps/udeps3.txt "^${_check}$")
set(_check
- "^(lib)?conflict\\.dll:[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/\\.conflict/(lib)?conflict\\.dll;[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/(lib)?conflict\\.dll\n$"
+ "^(lib)?${conflict_dll}:[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/\\.conflict/(lib)?conflict\\.dll;[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-build/root-all/bin/(lib)?conflict\\.dll\n$"
)
check_contents(deps/cdeps1.txt "${_check}")
check_contents(deps/cdeps2.txt "${_check}")
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-all-stderr-Borland.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-all-stderr-Borland.txt
new file mode 100644
index 0000000000..607e4b8e82
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-all-stderr-Borland.txt
@@ -0,0 +1,7 @@
+^CMake Error at cmake_install\.cmake:[0-9]+ \(file\):
+ file Multiple conflicting paths found for PATH\.DLL:
+
+ [^
+]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-build/root-all/lib/test1/path\.dll
+ [^
+]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-build/root-all/lib/test2/path\.dll$
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-unresolved-all-stderr-Borland.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-unresolved-all-stderr-Borland.txt
new file mode 100644
index 0000000000..fea1083a53
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-unresolved-all-stderr-Borland.txt
@@ -0,0 +1,4 @@
+^CMake Error at cmake_install\.cmake:[0-9]+ \(file\):
+ file Could not resolve runtime dependencies:
+
+ UNRESOLVED\.DLL$
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows.cmake
index 9160ce5f20..aad9077553 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows.cmake
@@ -8,6 +8,7 @@ set(testlib_names
search
unresolved
conflict
+ MixedCase
)
file(REMOVE "${CMAKE_BINARY_DIR}/testlib.c")
@@ -34,7 +35,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/testlib_noconflict.c" "__declspec(dllimport) ext
add_library(testlib_noconflict SHARED "${CMAKE_BINARY_DIR}/testlib_noconflict.c")
target_link_libraries(testlib_noconflict PRIVATE libdir)
-install(TARGETS testlib libdir_postexcluded libdir conflict testlib_noconflict DESTINATION bin)
+install(TARGETS testlib libdir_postexcluded libdir conflict MixedCase testlib_noconflict DESTINATION bin)
install(TARGETS libdir search_postexcluded search DESTINATION bin/.search) # Prefixing with "." ensures it is the first item after list(SORT)
install(TARGETS testlib_conflict conflict DESTINATION bin/.conflict)
@@ -61,6 +62,7 @@ install(CODE [[
"^(lib)?search\\.dll$"
"^(lib)?unresolved\\.dll$"
"^(lib)?conflict\\.dll$"
+ "^(lib)?mixedcase\\.dll$"
"^kernel32\\.dll$"
PRE_EXCLUDE_REGEXES ".*"
POST_INCLUDE_REGEXES
@@ -68,6 +70,7 @@ install(CODE [[
"^.*/(lib)?libdir\\.dll$"
"^.*/(lib)?search\\.dll$"
"^.*/(lib)?conflict\\.dll$"
+ "^.*/(lib)?mixedcase\\.dll$"
POST_EXCLUDE_REGEXES ".*"
DIRECTORIES
"${CMAKE_INSTALL_PREFIX}/bin/.search"
diff --git a/Tests/RunCMake/file/CMakeLists.txt b/Tests/RunCMake/file/CMakeLists.txt
index 2897109554..93ee9dfd5f 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/file/REAL_PATH.cmake b/Tests/RunCMake/file/REAL_PATH.cmake
index 0b5d3c0fd1..9c5d4ea0ee 100644
--- a/Tests/RunCMake/file/REAL_PATH.cmake
+++ b/Tests/RunCMake/file/REAL_PATH.cmake
@@ -34,3 +34,19 @@ file(REAL_PATH "~/test.txt" real_path EXPAND_TILDE)
if (NOT real_path STREQUAL "${HOME_DIR}/test.txt")
message(SEND_ERROR "real path is \"${real_path}\", should be \"${HOME_DIR}/test.txt\"")
endif()
+
+if (WIN32)
+ cmake_policy(SET CMP0139 NEW)
+
+ set(in "${CMAKE_CURRENT_BINARY_DIR}/AbC.TxT")
+
+ file(REMOVE "${in}")
+ file(TOUCH "${in}")
+
+ string(TOLOWER "${in}" low)
+ file(REAL_PATH "${low}" out)
+
+ if(NOT "${out}" PATH_EQUAL "${in}")
+ message(SEND_ERROR "real path is \"${out}\", should be \"${in}\"")
+ endif()
+endif()
diff --git a/Tests/RunCMake/find_dependency/CMakeLists.txt b/Tests/RunCMake/find_dependency/CMakeLists.txt
index 74b3ff8de3..93ee9dfd5f 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 ef2163c298..93ee9dfd5f 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 ef2163c298..93ee9dfd5f 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/CMP0144-NEW-CaseInsensitive-stderr.txt b/Tests/RunCMake/find_package/CMP0144-NEW-CaseInsensitive-stderr.txt
new file mode 100644
index 0000000000..3ccd101bda
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-NEW-CaseInsensitive-stderr.txt
@@ -0,0 +1,45 @@
+^----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/cmake_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/cmake_root/bin/foo.exe
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/cmake_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/cmake_root/bin/foo.exe
+
+----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/env_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/env_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/env_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/env_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/env_root/bin/foo.exe
+
+----------$
diff --git a/Tests/RunCMake/find_package/CMP0144-NEW-CaseInsensitive.cmake b/Tests/RunCMake/find_package/CMP0144-NEW-CaseInsensitive.cmake
new file mode 100644
index 0000000000..f0853eec4b
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-NEW-CaseInsensitive.cmake
@@ -0,0 +1,3 @@
+cmake_policy(VERSION 3.26)
+cmake_policy(SET CMP0144 NEW)
+include(CMP0144-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0144-NEW-CaseSensitive-stderr.txt b/Tests/RunCMake/find_package/CMP0144-NEW-CaseSensitive-stderr.txt
new file mode 100644
index 0000000000..3ccd101bda
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-NEW-CaseSensitive-stderr.txt
@@ -0,0 +1,45 @@
+^----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/cmake_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/cmake_root/bin/foo.exe
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/cmake_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/cmake_root/bin/foo.exe
+
+----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/env_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/env_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/env_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/env_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/env_root/bin/foo.exe
+
+----------$
diff --git a/Tests/RunCMake/find_package/CMP0144-NEW-CaseSensitive.cmake b/Tests/RunCMake/find_package/CMP0144-NEW-CaseSensitive.cmake
new file mode 100644
index 0000000000..f0853eec4b
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-NEW-CaseSensitive.cmake
@@ -0,0 +1,3 @@
+cmake_policy(VERSION 3.26)
+cmake_policy(SET CMP0144 NEW)
+include(CMP0144-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0144-OLD-CaseInsensitive-stderr.txt b/Tests/RunCMake/find_package/CMP0144-OLD-CaseInsensitive-stderr.txt
new file mode 100644
index 0000000000..3274b82b71
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-OLD-CaseInsensitive-stderr.txt
@@ -0,0 +1,45 @@
+^----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/env_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/env_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/env_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/env_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/env_root/bin/foo.exe
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/env_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/env_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/env_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/env_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/env_root/bin/foo.exe
+
+----------$
diff --git a/Tests/RunCMake/find_package/CMP0144-OLD-CaseInsensitive.cmake b/Tests/RunCMake/find_package/CMP0144-OLD-CaseInsensitive.cmake
new file mode 100644
index 0000000000..f1560a9126
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-OLD-CaseInsensitive.cmake
@@ -0,0 +1,3 @@
+cmake_policy(VERSION 3.26)
+cmake_policy(SET CMP0144 OLD)
+include(CMP0144-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0144-OLD-CaseSensitive-stderr.txt b/Tests/RunCMake/find_package/CMP0144-OLD-CaseSensitive-stderr.txt
new file mode 100644
index 0000000000..c02a797f32
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-OLD-CaseSensitive-stderr.txt
@@ -0,0 +1,45 @@
+^----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------$
diff --git a/Tests/RunCMake/find_package/CMP0144-OLD-CaseSensitive.cmake b/Tests/RunCMake/find_package/CMP0144-OLD-CaseSensitive.cmake
new file mode 100644
index 0000000000..f1560a9126
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-OLD-CaseSensitive.cmake
@@ -0,0 +1,3 @@
+cmake_policy(VERSION 3.26)
+cmake_policy(SET CMP0144 OLD)
+include(CMP0144-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0144-WARN-CaseInsensitive-stderr.txt b/Tests/RunCMake/find_package/CMP0144-WARN-CaseInsensitive-stderr.txt
new file mode 100644
index 0000000000..3540dc9165
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-WARN-CaseInsensitive-stderr.txt
@@ -0,0 +1,63 @@
+^----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: '<base>/foo/env_root'
++
+CMake Warning \(dev\) at CMP0144-common.cmake:[0-9]+ \(find_package\):
+ Policy CMP0144 is not set: find_package uses upper-case <PACKAGENAME>_ROOT
+ variables. Run "cmake --help-policy CMP0144" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ CMake variable FOO_ROOT is set to:
+
+ [^
+]*/Tests/RunCMake/find_package/PackageRoot/foo/cmake_root
+
+ For compatibility, find_package is ignoring the variable, but code in a
+ \.cmake module might still use it\.
+Call Stack \(most recent call first\):
+ CMP0144-common.cmake:[0-9]+ \(RunTestCase\)
+ CMP0144-WARN-CaseInsensitive.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/env_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/env_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/env_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/env_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/env_root/bin/foo.exe
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/env_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/env_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/env_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/env_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/env_root/bin/foo.exe
+
+----------$
diff --git a/Tests/RunCMake/find_package/CMP0144-WARN-CaseInsensitive.cmake b/Tests/RunCMake/find_package/CMP0144-WARN-CaseInsensitive.cmake
new file mode 100644
index 0000000000..10f6b66d45
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-WARN-CaseInsensitive.cmake
@@ -0,0 +1,3 @@
+cmake_policy(VERSION 3.26)
+# (do not set CMP0144)
+include(CMP0144-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-Mixed-stderr.txt b/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-Mixed-stderr.txt
new file mode 100644
index 0000000000..3ccd101bda
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-Mixed-stderr.txt
@@ -0,0 +1,45 @@
+^----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/cmake_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/cmake_root/bin/foo.exe
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/cmake_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/cmake_root/bin/foo.exe
+
+----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: <base>/foo/env_root/include/foo.h
+FOO_TEST_FILE_ZOT: <base>/foo/env_root/include/zot/zot.h
+FOO_TEST_PATH_FOO: <base>/foo/env_root/include
+FOO_TEST_PATH_ZOT: <base>/foo/env_root/include/zot
+FOO_TEST_PROG_FOO: <base>/foo/env_root/bin/foo.exe
+
+----------$
diff --git a/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-Mixed.cmake b/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-Mixed.cmake
new file mode 100644
index 0000000000..10f6b66d45
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-Mixed.cmake
@@ -0,0 +1,3 @@
+cmake_policy(VERSION 3.26)
+# (do not set CMP0144)
+include(CMP0144-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-stderr.txt b/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-stderr.txt
new file mode 100644
index 0000000000..b828f058f6
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive-stderr.txt
@@ -0,0 +1,68 @@
+^----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: '<base>/foo/env_root'
++
+CMake Warning \(dev\) at CMP0144-common.cmake:[0-9]+ \(find_package\):
+ Policy CMP0144 is not set: find_package uses upper-case <PACKAGENAME>_ROOT
+ variables. Run "cmake --help-policy CMP0144" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ CMake variable FOO_ROOT is set to:
+
+ [^
+]*/Tests/RunCMake/find_package/PackageRoot/foo/cmake_root
+
+ Environment variable FOO_ROOT is set to:
+
+ [^
+]*/Tests/RunCMake/find_package/PackageRoot/foo/env_root
+
+ For compatibility, find_package is ignoring the variable, but code in a
+ \.cmake module might still use it\.
+Call Stack \(most recent call first\):
+ CMP0144-common.cmake:[0-9]+ \(RunTestCase\)
+ CMP0144-WARN-CaseSensitive.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : '<base>/foo/cmake_root'
+ENV{FOO_ROOT}: ''
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------
+FOO_ROOT : ''
+ENV{FOO_ROOT}: '<base>/foo/env_root'
+
+find_package\(Foo\)
+FOO_TEST_FILE_FOO: FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT: FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO: FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT: FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO: FOO_TEST_PROG_FOO-NOTFOUND
+
+----------$
diff --git a/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive.cmake b/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive.cmake
new file mode 100644
index 0000000000..10f6b66d45
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-WARN-CaseSensitive.cmake
@@ -0,0 +1,3 @@
+cmake_policy(VERSION 3.26)
+# (do not set CMP0144)
+include(CMP0144-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0144-common.cmake b/Tests/RunCMake/find_package/CMP0144-common.cmake
new file mode 100644
index 0000000000..58eccca815
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0144-common.cmake
@@ -0,0 +1,78 @@
+# (includer selects CMP0144)
+list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
+set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
+
+function(PrintPath label path)
+ string(REPLACE "${PackageRoot_BASE}" "<base>" out "${path}")
+ message("${label} ${out}")
+endfunction()
+
+macro(RunTestCase)
+ message("----------")
+ PrintPath("FOO_ROOT :" "'${FOO_ROOT}'")
+ PrintPath("ENV{FOO_ROOT}:" "'$ENV{FOO_ROOT}'")
+ message("")
+
+ find_package(Foo)
+ message("find_package(Foo)")
+ PrintPath("FOO_TEST_FILE_FOO:" "${FOO_TEST_FILE_FOO}")
+ PrintPath("FOO_TEST_FILE_ZOT:" "${FOO_TEST_FILE_ZOT}")
+ PrintPath("FOO_TEST_PATH_FOO:" "${FOO_TEST_PATH_FOO}")
+ PrintPath("FOO_TEST_PATH_ZOT:" "${FOO_TEST_PATH_ZOT}")
+ PrintPath("FOO_TEST_PROG_FOO:" "${FOO_TEST_PROG_FOO}")
+ message("")
+
+ unset(FOO_ROOT)
+ unset(ENV{FOO_ROOT})
+ if(NOT CMAKE_HOST_WIN32)
+ unset(Foo_ROOT)
+ unset(ENV{Foo_ROOT})
+ endif()
+ unset(FOO_TEST_FILE_FOO)
+ unset(FOO_TEST_FILE_ZOT)
+ unset(FOO_TEST_PATH_FOO)
+ unset(FOO_TEST_PATH_ZOT)
+ unset(FOO_TEST_PROG_FOO)
+ unset(FOO_TEST_FILE_FOO CACHE)
+ unset(FOO_TEST_FILE_ZOT CACHE)
+ unset(FOO_TEST_PATH_FOO CACHE)
+ unset(FOO_TEST_PATH_ZOT CACHE)
+ unset(FOO_TEST_PROG_FOO CACHE)
+endmacro()
+
+RunTestCase()
+
+set(FOO_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{FOO_ROOT} ${PackageRoot_BASE}/foo/env_root)
+if(RunCMake_TEST MATCHES "CaseSensitive")
+ if(RunCMake_TEST STREQUAL "CMP0144-WARN-CaseSensitive-Mixed")
+ set(Foo_ROOT "${FOO_ROOT}")
+ set(ENV{Foo_ROOT} "$ENV{FOO_ROOT}")
+ else()
+ set(Foo_ROOT ${PackageRoot_BASE}/does_not_exist)
+ set(ENV{Foo_ROOT} ${PackageRoot_BASE}/does_not_exist)
+ endif()
+endif()
+RunTestCase()
+
+set(FOO_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+if(RunCMake_TEST MATCHES "CaseSensitive")
+ if(RunCMake_TEST STREQUAL "CMP0144-WARN-CaseSensitive-Mixed")
+ set(Foo_ROOT "${FOO_ROOT}")
+ else()
+ set(Foo_ROOT ${PackageRoot_BASE}/does_not_exist)
+ endif()
+endif()
+RunTestCase()
+
+set(ENV{FOO_ROOT} ${PackageRoot_BASE}/foo/env_root)
+if(RunCMake_TEST MATCHES "CaseSensitive")
+ if(RunCMake_TEST STREQUAL "CMP0144-WARN-CaseSensitive-Mixed")
+ set(ENV{Foo_ROOT} "$ENV{FOO_ROOT}")
+ else()
+ set(ENV{Foo_ROOT} ${PackageRoot_BASE}/does_not_exist)
+ endif()
+endif()
+RunTestCase()
+
+message("----------")
diff --git a/Tests/RunCMake/find_package/CMP0145-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0145-NEW-stderr.txt
new file mode 100644
index 0000000000..8249211c47
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0145-NEW-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Warning at CMP0145-NEW\.cmake:[0-9]+ \(find_package\):
+ No "FindDart\.cmake" found in CMAKE_MODULE_PATH\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/CMP0145-NEW.cmake b/Tests/RunCMake/find_package/CMP0145-NEW.cmake
new file mode 100644
index 0000000000..f3e7bef591
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0145-NEW.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0145 NEW)
+set(_FindDart_testing TRUE)
+find_package(Dart MODULE)
+
+if(_FindDart_included)
+ message(FATAL_ERROR "FindDart.cmake erroneously included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0145-OLD.cmake b/Tests/RunCMake/find_package/CMP0145-OLD.cmake
new file mode 100644
index 0000000000..9a73f687db
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0145-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0145 OLD)
+set(_FindDart_testing TRUE)
+find_package(Dart MODULE)
+
+if(NOT _FindDart_included)
+ message(FATAL_ERROR "FindDart.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0145-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0145-WARN-stderr.txt
new file mode 100644
index 0000000000..36c66ec177
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0145-WARN-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) at CMP0145-WARN\.cmake:[0-9]+ \(find_package\):
+ Policy CMP0145 is not set: The Dart and FindDart modules are removed\. Run
+ "cmake --help-policy CMP0145" for policy details\. Use the cmake_policy
+ command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/find_package/CMP0145-WARN.cmake b/Tests/RunCMake/find_package/CMP0145-WARN.cmake
new file mode 100644
index 0000000000..76da752e08
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0145-WARN.cmake
@@ -0,0 +1,6 @@
+set(_FindDart_testing TRUE)
+find_package(Dart MODULE)
+
+if(NOT _FindDart_included)
+ message(FATAL_ERROR "FindDart.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0146-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0146-NEW-stderr.txt
new file mode 100644
index 0000000000..01628526d8
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-NEW-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Warning at CMP0146-NEW\.cmake:[0-9]+ \(find_package\):
+ No "FindCUDA\.cmake" found in CMAKE_MODULE_PATH\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/CMP0146-NEW.cmake b/Tests/RunCMake/find_package/CMP0146-NEW.cmake
new file mode 100644
index 0000000000..b373227f49
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-NEW.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0146 NEW)
+set(_FindCUDA_testing TRUE)
+find_package(CUDA MODULE)
+
+if(_FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake erroneously included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0146-OLD.cmake b/Tests/RunCMake/find_package/CMP0146-OLD.cmake
new file mode 100644
index 0000000000..77cd1f528d
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0146 OLD)
+set(_FindCUDA_testing TRUE)
+find_package(CUDA MODULE)
+
+if(NOT _FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt
new file mode 100644
index 0000000000..2cd9c5fd28
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) at CMP0146-WARN\.cmake:[0-9]+ \(find_package\):
+ Policy CMP0146 is not set: The FindCUDA module is removed\. Run "cmake
+ --help-policy CMP0146" for policy details\. Use the cmake_policy command to
+ set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/find_package/CMP0146-WARN.cmake b/Tests/RunCMake/find_package/CMP0146-WARN.cmake
new file mode 100644
index 0000000000..276daf2c0f
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-WARN.cmake
@@ -0,0 +1,6 @@
+set(_FindCUDA_testing TRUE)
+find_package(CUDA MODULE)
+
+if(NOT _FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0147-NEW-result.txt b/Tests/RunCMake/find_package/CMP0147-NEW-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0147-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_package/CMP0147-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0147-NEW-stderr.txt
new file mode 100644
index 0000000000..1caf6c592e
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0147-NEW-stderr.txt
@@ -0,0 +1,7 @@
+^CMake Error at [^
+]*/Modules/FindCUDA.cmake:[0-9]+ \(message\):
+ The FindCUDA module does not work in Visual Studio with policy CMP0147\.
+Call Stack \(most recent call first\):
+ CMP0147-common\.cmake:[0-9]+ \(find_package\)
+ CMP0147-NEW\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/find_package/CMP0147-NEW.cmake b/Tests/RunCMake/find_package/CMP0147-NEW.cmake
new file mode 100644
index 0000000000..0ca5b6c999
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0147-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0147 NEW)
+include(CMP0147-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0147-OLD.cmake b/Tests/RunCMake/find_package/CMP0147-OLD.cmake
new file mode 100644
index 0000000000..61ecee5106
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0147-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0147 OLD)
+include(CMP0147-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0147-WARN.cmake b/Tests/RunCMake/find_package/CMP0147-WARN.cmake
new file mode 100644
index 0000000000..d5f3e91db1
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0147-WARN.cmake
@@ -0,0 +1,2 @@
+# leave CMP0147 unset
+include(CMP0147-common.cmake)
diff --git a/Tests/RunCMake/find_package/CMP0147-common.cmake b/Tests/RunCMake/find_package/CMP0147-common.cmake
new file mode 100644
index 0000000000..68a86eedab
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0147-common.cmake
@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0146 OLD)
+set(_FindCUDA_testing TRUE)
+find_package(CUDA MODULE)
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Interp-NEW-stderr.txt
new file mode 100644
index 0000000000..68b40f7f54
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-NEW-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Warning at CMP0148-Interp-NEW\.cmake:[0-9]+ \(find_package\):
+ No "FindPythonInterp\.cmake" found in CMAKE_MODULE_PATH\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-NEW.cmake b/Tests/RunCMake/find_package/CMP0148-Interp-NEW.cmake
new file mode 100644
index 0000000000..ccd04f55f2
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-NEW.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 NEW)
+set(_FindPythonInterp_testing TRUE)
+find_package(PythonInterp MODULE)
+
+if(_FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake erroneously included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-OLD.cmake b/Tests/RunCMake/find_package/CMP0148-Interp-OLD.cmake
new file mode 100644
index 0000000000..1879d19053
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 OLD)
+set(_FindPythonInterp_testing TRUE)
+find_package(PythonInterp MODULE)
+
+if(NOT _FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt
new file mode 100644
index 0000000000..2666c22cd1
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) at CMP0148-Interp-WARN\.cmake:[0-9]+ \(find_package\):
+ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
+ are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-WARN.cmake b/Tests/RunCMake/find_package/CMP0148-Interp-WARN.cmake
new file mode 100644
index 0000000000..53b60af26e
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-WARN.cmake
@@ -0,0 +1,6 @@
+set(_FindPythonInterp_testing TRUE)
+find_package(PythonInterp MODULE)
+
+if(NOT _FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Libs-NEW-stderr.txt
new file mode 100644
index 0000000000..d92b434247
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-NEW-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Warning at CMP0148-Libs-NEW\.cmake:[0-9]+ \(find_package\):
+ No "FindPythonLibs\.cmake" found in CMAKE_MODULE_PATH\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-NEW.cmake b/Tests/RunCMake/find_package/CMP0148-Libs-NEW.cmake
new file mode 100644
index 0000000000..2ef8c467c7
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-NEW.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 NEW)
+set(_FindPythonLibs_testing TRUE)
+find_package(PythonLibs MODULE)
+
+if(_FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake erroneously included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-OLD.cmake b/Tests/RunCMake/find_package/CMP0148-Libs-OLD.cmake
new file mode 100644
index 0000000000..06fd6a6d6b
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 OLD)
+set(_FindPythonLibs_testing TRUE)
+find_package(PythonLibs MODULE)
+
+if(NOT _FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt
new file mode 100644
index 0000000000..5210e514ad
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) at CMP0148-Libs-WARN\.cmake:[0-9]+ \(find_package\):
+ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
+ are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-WARN.cmake b/Tests/RunCMake/find_package/CMP0148-Libs-WARN.cmake
new file mode 100644
index 0000000000..9bbe066229
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-WARN.cmake
@@ -0,0 +1,6 @@
+set(_FindPythonLibs_testing TRUE)
+find_package(PythonLibs MODULE)
+
+if(NOT _FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMakeLists.txt b/Tests/RunCMake/find_package/CMakeLists.txt
index 74b3ff8de3..93ee9dfd5f 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_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index fa41fc1807..006757af12 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -36,6 +36,23 @@ run_cmake(WrongVersionConfig)
run_cmake(CMP0084-OLD)
run_cmake(CMP0084-WARN)
run_cmake(CMP0084-NEW)
+run_cmake(CMP0145-OLD)
+run_cmake(CMP0145-WARN)
+run_cmake(CMP0145-NEW)
+run_cmake(CMP0146-OLD)
+run_cmake(CMP0146-WARN)
+run_cmake(CMP0146-NEW)
+if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ run_cmake(CMP0147-OLD)
+ run_cmake(CMP0147-WARN)
+ run_cmake(CMP0147-NEW)
+endif()
+run_cmake(CMP0148-Interp-OLD)
+run_cmake(CMP0148-Interp-WARN)
+run_cmake(CMP0148-Interp-NEW)
+run_cmake(CMP0148-Libs-OLD)
+run_cmake(CMP0148-Libs-WARN)
+run_cmake(CMP0148-Libs-NEW)
run_cmake(WrongVersionRange)
run_cmake(EmptyVersionRange)
run_cmake(VersionRangeWithEXACT)
@@ -55,6 +72,17 @@ run_cmake(REGISTRY_VIEW-no-view)
run_cmake(REGISTRY_VIEW-wrong-view)
run_cmake(REGISTRY_VIEW-propagated)
+if(CMAKE_HOST_WIN32)
+ run_cmake(CMP0144-WARN-CaseInsensitive)
+ run_cmake(CMP0144-OLD-CaseInsensitive)
+ run_cmake(CMP0144-NEW-CaseInsensitive)
+else()
+ run_cmake(CMP0144-WARN-CaseSensitive)
+ run_cmake(CMP0144-WARN-CaseSensitive-Mixed)
+ run_cmake(CMP0144-OLD-CaseSensitive)
+ run_cmake(CMP0144-NEW-CaseSensitive)
+endif()
+
file(
GLOB SearchPaths_TEST_CASE_LIST
LIST_DIRECTORIES TRUE
diff --git a/Tests/RunCMake/find_path/CMakeLists.txt b/Tests/RunCMake/find_path/CMakeLists.txt
index ef2163c298..93ee9dfd5f 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 0000000000..fa767b925f
--- /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 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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/CMP0024-NEW-stderr.txt b/Tests/RunCMake/include/CMP0024-NEW-stderr.txt
index 0fdb3ca7f1..26ced801b1 100644
--- a/Tests/RunCMake/include/CMP0024-NEW-stderr.txt
+++ b/Tests/RunCMake/include/CMP0024-NEW-stderr.txt
@@ -1,8 +1,9 @@
-CMake Error at subdir2/CMakeLists.txt:2 \(include\):
+^CMake Error at subdir2/CMakeLists\.txt:2 \(include\):
The file
- .*/Tests/RunCMake/include/CMP0024-NEW-build/subdir1/theTargets.cmake
+ [^
+]*/Tests/RunCMake/include/CMP0024-NEW-build/subdir1/theTargets\.cmake
- was generated by the export\(\) command. It may not be used as the argument
- to the include\(\) command. Use ALIAS targets instead to refer to targets by
- alternative names.
+ was generated by the export\(\) command\. It may not be used as the argument
+ to the include\(\) command\. Use ALIAS targets instead to refer to targets by
+ alternative names\.
diff --git a/Tests/RunCMake/include/CMP0024-NEW.cmake b/Tests/RunCMake/include/CMP0024-NEW.cmake
index 0e03d2af85..783cf78e5d 100644
--- a/Tests/RunCMake/include/CMP0024-NEW.cmake
+++ b/Tests/RunCMake/include/CMP0024-NEW.cmake
@@ -1,8 +1,6 @@
enable_language(CXX)
-cmake_policy(SET CMP0024 NEW)
-
add_library(foo SHARED empty.cpp)
add_subdirectory(subdir1)
diff --git a/Tests/RunCMake/include/CMP0024-WARN-stderr.txt b/Tests/RunCMake/include/CMP0024-WARN-stderr.txt
index 9c79007058..8472f41e20 100644
--- a/Tests/RunCMake/include/CMP0024-WARN-stderr.txt
+++ b/Tests/RunCMake/include/CMP0024-WARN-stderr.txt
@@ -1,14 +1,24 @@
-CMake Warning \(dev\) at subdir2/CMakeLists.txt:2 \(include\):
+^CMake Deprecation Warning at CMP0024-WARN\.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\) at subdir2/CMakeLists\.txt:2 \(include\):
Policy CMP0024 is not set: Disallow include export result. Run "cmake
- --help-policy CMP0024" for policy details. Use the cmake_policy command to
- set the policy and suppress this warning.
+ --help-policy CMP0024" for policy details\. Use the cmake_policy command to
+ set the policy and suppress this warning\.
The file
- .*/Tests/RunCMake/include/CMP0024-WARN-build/subdir1/theTargets.cmake
+ [^
+]*/Tests/RunCMake/include/CMP0024-WARN-build/subdir1/theTargets\.cmake
- was generated by the export\(\) command. It should not be used as the
- argument to the include\(\) command. Use ALIAS targets instead to refer to
- targets by alternative names.
+ was generated by the export\(\) command\. It should not be used as the
+ argument to the include\(\) command\. Use ALIAS targets instead to refer to
+ targets by alternative names\.
-This warning is for project developers. Use -Wno-dev to suppress it.
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/include/CMP0024-WARN.cmake b/Tests/RunCMake/include/CMP0024-WARN.cmake
index 783cf78e5d..f267a5ab21 100644
--- a/Tests/RunCMake/include/CMP0024-WARN.cmake
+++ b/Tests/RunCMake/include/CMP0024-WARN.cmake
@@ -1,3 +1,4 @@
+cmake_policy(VERSION 2.8.12) # Leave CMP0024 unset.
enable_language(CXX)
diff --git a/Tests/RunCMake/include/CMP0146-NEW-name-result.txt b/Tests/RunCMake/include/CMP0146-NEW-name-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-name-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0146-NEW-name-stderr.txt b/Tests/RunCMake/include/CMP0146-NEW-name-stderr.txt
new file mode 100644
index 0000000000..7d9e7d8450
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-name-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at CMP0146-NEW-name\.cmake:[0-9]+ \(include\):
+ include could not find requested file:
+
+ FindCUDA
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0146-NEW-name.cmake b/Tests/RunCMake/include/CMP0146-NEW-name.cmake
new file mode 100644
index 0000000000..feedc6fa99
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-name.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0146 NEW)
+include(FindCUDA)
diff --git a/Tests/RunCMake/include/CMP0146-NEW-path-result.txt b/Tests/RunCMake/include/CMP0146-NEW-path-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0146-NEW-path-stderr.txt b/Tests/RunCMake/include/CMP0146-NEW-path-stderr.txt
new file mode 100644
index 0000000000..916672b4c7
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-path-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Modules/FindCUDA.cmake:[0-9]+ \(message\):
+ The FindCUDA module has been removed by policy CMP0146\.
+Call Stack \(most recent call first\):
+ CMP0146-NEW-path\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0146-NEW-path.cmake b/Tests/RunCMake/include/CMP0146-NEW-path.cmake
new file mode 100644
index 0000000000..6768d4dd8e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-path.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0146 NEW)
+include(${CMAKE_ROOT}/Modules/FindCUDA.cmake)
diff --git a/Tests/RunCMake/include/CMP0146-OLD.cmake b/Tests/RunCMake/include/CMP0146-OLD.cmake
new file mode 100644
index 0000000000..654cdf7b67
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0146 OLD)
+set(_FindCUDA_testing 1)
+include(FindCUDA)
+
+if(NOT _FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0146-WARN-stderr.txt b/Tests/RunCMake/include/CMP0146-WARN-stderr.txt
new file mode 100644
index 0000000000..aaaf1dcf0b
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-WARN-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Warning \(dev\) at CMP0146-WARN\.cmake:[0-9]+ \(include\):
+ Policy CMP0146 is not set: The FindCUDA module is removed\. Run "cmake
+ --help-policy CMP0146" for policy details\. Use the cmake_policy command to
+ set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/include/CMP0146-WARN.cmake b/Tests/RunCMake/include/CMP0146-WARN.cmake
new file mode 100644
index 0000000000..bce1ae8514
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-WARN.cmake
@@ -0,0 +1,7 @@
+# Do not set CMP0146.
+set(_FindCUDA_testing 1)
+include(FindCUDA)
+
+if(NOT _FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-name-result.txt b/Tests/RunCMake/include/CMP0148-Interp-NEW-name-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-name-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-name-stderr.txt b/Tests/RunCMake/include/CMP0148-Interp-NEW-name-stderr.txt
new file mode 100644
index 0000000000..8627c2e619
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-name-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at CMP0148-Interp-NEW-name\.cmake:[0-9]+ \(include\):
+ include could not find requested file:
+
+ FindPythonInterp
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-name.cmake b/Tests/RunCMake/include/CMP0148-Interp-NEW-name.cmake
new file mode 100644
index 0000000000..7d73dc4e8f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-name.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0148 NEW)
+include(FindPythonInterp)
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-path-result.txt b/Tests/RunCMake/include/CMP0148-Interp-NEW-path-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-path-stderr.txt b/Tests/RunCMake/include/CMP0148-Interp-NEW-path-stderr.txt
new file mode 100644
index 0000000000..0b0f29d5b9
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-path-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Modules/FindPythonInterp.cmake:[0-9]+ \(message\):
+ The FindPythonInterp module has been removed by policy CMP0148\.
+Call Stack \(most recent call first\):
+ CMP0148-Interp-NEW-path\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-path.cmake b/Tests/RunCMake/include/CMP0148-Interp-NEW-path.cmake
new file mode 100644
index 0000000000..1f8630e6ca
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-path.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0148 NEW)
+include(${CMAKE_ROOT}/Modules/FindPythonInterp.cmake)
diff --git a/Tests/RunCMake/include/CMP0148-Interp-OLD.cmake b/Tests/RunCMake/include/CMP0148-Interp-OLD.cmake
new file mode 100644
index 0000000000..8905221093
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 OLD)
+set(_FindPythonInterp_testing 1)
+include(FindPythonInterp)
+
+if(NOT _FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt b/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt
new file mode 100644
index 0000000000..5bd6935f6b
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Warning \(dev\) at CMP0148-Interp-WARN\.cmake:[0-9]+ \(include\):
+ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
+ are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/include/CMP0148-Interp-WARN.cmake b/Tests/RunCMake/include/CMP0148-Interp-WARN.cmake
new file mode 100644
index 0000000000..18f302ddbf
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-WARN.cmake
@@ -0,0 +1,7 @@
+# Do not set CMP0148.
+set(_FindPythonInterp_testing 1)
+include(FindPythonInterp)
+
+if(NOT _FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-name-result.txt b/Tests/RunCMake/include/CMP0148-Libs-NEW-name-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-name-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-name-stderr.txt b/Tests/RunCMake/include/CMP0148-Libs-NEW-name-stderr.txt
new file mode 100644
index 0000000000..4e1f97c2cf
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-name-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at CMP0148-Libs-NEW-name\.cmake:[0-9]+ \(include\):
+ include could not find requested file:
+
+ FindPythonLibs
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-name.cmake b/Tests/RunCMake/include/CMP0148-Libs-NEW-name.cmake
new file mode 100644
index 0000000000..c9877bc087
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-name.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0148 NEW)
+include(FindPythonLibs)
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-path-result.txt b/Tests/RunCMake/include/CMP0148-Libs-NEW-path-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-path-stderr.txt b/Tests/RunCMake/include/CMP0148-Libs-NEW-path-stderr.txt
new file mode 100644
index 0000000000..5f1037d4dd
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-path-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Modules/FindPythonLibs.cmake:[0-9]+ \(message\):
+ The FindPythonLibs module has been removed by policy CMP0148\.
+Call Stack \(most recent call first\):
+ CMP0148-Libs-NEW-path\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-path.cmake b/Tests/RunCMake/include/CMP0148-Libs-NEW-path.cmake
new file mode 100644
index 0000000000..29b315f53d
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-path.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0148 NEW)
+include(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
diff --git a/Tests/RunCMake/include/CMP0148-Libs-OLD.cmake b/Tests/RunCMake/include/CMP0148-Libs-OLD.cmake
new file mode 100644
index 0000000000..b69e160ddc
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 OLD)
+set(_FindPythonLibs_testing 1)
+include(FindPythonLibs)
+
+if(NOT _FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt b/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt
new file mode 100644
index 0000000000..c24abd495b
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Warning \(dev\) at CMP0148-Libs-WARN\.cmake:[0-9]+ \(include\):
+ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
+ are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/include/CMP0148-Libs-WARN.cmake b/Tests/RunCMake/include/CMP0148-Libs-WARN.cmake
new file mode 100644
index 0000000000..d8dc00c529
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-WARN.cmake
@@ -0,0 +1,7 @@
+# Do not set CMP0148.
+set(_FindPythonLibs_testing 1)
+include(FindPythonLibs)
+
+if(NOT _FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMakeLists.txt b/Tests/RunCMake/include/CMakeLists.txt
index 4b3de84d94..93ee9dfd5f 100644
--- a/Tests/RunCMake/include/CMakeLists.txt
+++ b/Tests/RunCMake/include/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/include/EmptyString-stderr.txt b/Tests/RunCMake/include/EmptyString-stderr.txt
index 006c647c66..dab16ea4df 100644
--- a/Tests/RunCMake/include/EmptyString-stderr.txt
+++ b/Tests/RunCMake/include/EmptyString-stderr.txt
@@ -1,5 +1,5 @@
-CMake Warning \(dev\) at EmptyString.cmake:1 \(include\):
+^CMake Warning \(dev\) at EmptyString\.cmake:1 \(include\):
include\(\) given empty file name \(ignored\).
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-This warning is for project developers. Use -Wno-dev to suppress it.
+ CMakeLists\.txt:3 \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/include/EmptyStringOptional-stderr.txt b/Tests/RunCMake/include/EmptyStringOptional-stderr.txt
index b61c679128..1b763f2c01 100644
--- a/Tests/RunCMake/include/EmptyStringOptional-stderr.txt
+++ b/Tests/RunCMake/include/EmptyStringOptional-stderr.txt
@@ -1,5 +1,5 @@
-CMake Warning \(dev\) at EmptyStringOptional.cmake:1 \(include\):
+^CMake Warning \(dev\) at EmptyStringOptional\.cmake:1 \(include\):
include\(\) given empty file name \(ignored\).
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-This warning is for project developers. Use -Wno-dev to suppress it.
+ CMakeLists\.txt:3 \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/include/ExportExportInclude-stderr.txt b/Tests/RunCMake/include/ExportExportInclude-stderr.txt
index 6d5c02f196..22bf7a1228 100644
--- a/Tests/RunCMake/include/ExportExportInclude-stderr.txt
+++ b/Tests/RunCMake/include/ExportExportInclude-stderr.txt
@@ -1,6 +1,7 @@
-CMake Error at ExportExportInclude.cmake:6 \(include\):
+^CMake Error at ExportExportInclude.cmake:6 \(include\):
include could not find requested file:
- .*/Tests/RunCMake/include/ExportExportInclude-build/theTargets.cmake
+ [^
+]*/Tests/RunCMake/include/ExportExportInclude-build/theTargets\.cmake
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists\.txt:3 \(include\)$
diff --git a/Tests/RunCMake/include/IncludeIsDirectory-stderr.txt b/Tests/RunCMake/include/IncludeIsDirectory-stderr.txt
index 5735c29136..6ce934d679 100644
--- a/Tests/RunCMake/include/IncludeIsDirectory-stderr.txt
+++ b/Tests/RunCMake/include/IncludeIsDirectory-stderr.txt
@@ -1,6 +1,7 @@
-CMake Error at IncludeIsDirectory.cmake:1 \(include\):
+^CMake Error at IncludeIsDirectory.cmake:1 \(include\):
include requested file is a directory:
- .*/Tests/RunCMake/include/IncludeIsDirectory-build
+ [^
+]*/Tests/RunCMake/include/IncludeIsDirectory-build
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists\.txt:3 \(include\)$
diff --git a/Tests/RunCMake/include/IncludeMalformed-stderr.txt b/Tests/RunCMake/include/IncludeMalformed-stderr.txt
index fc755495cf..e34e9bbcc3 100644
--- a/Tests/RunCMake/include/IncludeMalformed-stderr.txt
+++ b/Tests/RunCMake/include/IncludeMalformed-stderr.txt
@@ -1,13 +1,12 @@
-CMake Error at malformedInclude.cmake:1:
- Parse error. Function missing ending "\)". End of file reached.
+^CMake Error at malformedInclude\.cmake:1:
+ Parse error\. Function missing ending "\)"\. End of file reached\.
Call Stack \(most recent call first\):
- IncludeMalformed.cmake:1 \(include\)
- CMakeLists.txt:3 \(include\)
-
-
-CMake Error at IncludeMalformed.cmake:1 \(include\):
+ IncludeMalformed\.cmake:1 \(include\)
+ CMakeLists\.txt:3 \(include\)
++
+CMake Error at IncludeMalformed\.cmake:1 \(include\):
include could not load requested file:
- malformedInclude.cmake
+ malformedInclude\.cmake
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists\.txt:3 \(include\)$
diff --git a/Tests/RunCMake/include/RunCMakeTest.cmake b/Tests/RunCMake/include/RunCMakeTest.cmake
index 8fb7201384..685173ecdb 100644
--- a/Tests/RunCMake/include/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include/RunCMakeTest.cmake
@@ -7,3 +7,17 @@ run_cmake(CMP0024-NEW)
run_cmake(ExportExportInclude)
run_cmake(IncludeIsDirectory)
run_cmake(IncludeMalformed)
+
+run_cmake(CMP0146-OLD)
+run_cmake(CMP0146-WARN)
+run_cmake(CMP0146-NEW-name)
+run_cmake(CMP0146-NEW-path)
+
+run_cmake(CMP0148-Interp-OLD)
+run_cmake(CMP0148-Interp-WARN)
+run_cmake(CMP0148-Interp-NEW-name)
+run_cmake(CMP0148-Interp-NEW-path)
+run_cmake(CMP0148-Libs-OLD)
+run_cmake(CMP0148-Libs-WARN)
+run_cmake(CMP0148-Libs-NEW-name)
+run_cmake(CMP0148-Libs-NEW-path)
diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt
index 2897109554..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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 de0b70ffc3..6b4c4b0eb8 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 6dd8cdf551..93ee9dfd5f 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 477ffe06ca..efafdd1383 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
@@ -122,6 +121,10 @@ run_install_test(FILES-OPTIONAL)
run_install_test(DIRECTORY-OPTIONAL)
run_install_test(TARGETS-Defaults)
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ run_install_test(TARGETS-NAMELINK-No-Tweak)
+endif()
+
set(RunCMake_TEST_OPTIONS
"-DCMAKE_INSTALL_BINDIR:PATH=mybin"
"-DCMAKE_INSTALL_LIBDIR:PATH=mylib"
@@ -167,7 +170,6 @@ unset(RunCMake_TEST_OPTIONS)
run_install_test(Deprecated)
run_install_test(PRE_POST_INSTALL_SCRIPT)
-run_install_test(SCRIPT)
run_install_test(TARGETS-CONFIGURATIONS)
run_install_test(DIRECTORY-PATTERN)
run_install_test(TARGETS-Parts)
@@ -175,6 +177,10 @@ run_install_test(FILES-PERMISSIONS)
run_install_test(TARGETS-RPATH)
run_install_test(InstallRequiredSystemLibraries)
+set(RunCMake_TEST_OPTIONS "-DCMAKE_POLICY_DEFAULT_CMP0087:STRING=NEW")
+run_install_test(SCRIPT)
+unset(RunCMake_TEST_OPTIONS)
+
if(UNIX)
run_install_test(DIRECTORY-symlink-clobber)
endif()
diff --git a/Tests/RunCMake/install/SCRIPT-all-check.cmake b/Tests/RunCMake/install/SCRIPT-all-check.cmake
index 48d8e1aec6..b9c38e3d42 100644
--- a/Tests/RunCMake/install/SCRIPT-all-check.cmake
+++ b/Tests/RunCMake/install/SCRIPT-all-check.cmake
@@ -1 +1 @@
-check_installed([[^empty1.txt;empty2.txt$]])
+check_installed([[^empty1.txt;empty2.txt;empty3.cmake;empty3.txt;empty4.cmake;empty4.txt$]])
diff --git a/Tests/RunCMake/install/SCRIPT.cmake b/Tests/RunCMake/install/SCRIPT.cmake
index f857b54371..ee0c80ec96 100644
--- a/Tests/RunCMake/install/SCRIPT.cmake
+++ b/Tests/RunCMake/install/SCRIPT.cmake
@@ -1,4 +1,10 @@
install(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/empty3.cmake ${CMAKE_CURRENT_SOURCE_DIR}/empty4.cmake
+ DESTINATION .
+ )
+install(
SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/install_script.cmake"
CODE "write_empty_file(empty2.txt)"
+ SCRIPT "$<INSTALL_PREFIX>/empty3.cmake"
+ CODE [[include($<INSTALL_PREFIX>/empty4.cmake)]]
)
diff --git a/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt b/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt
index 138a69d09f..7d1477f923 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 5f5698676c..5600801713 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 cba04b2664..c72e405a0a 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 43ae787082..891b1ac974 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-NAMELINK-No-Tweak.cmake b/Tests/RunCMake/install/TARGETS-NAMELINK-No-Tweak.cmake
new file mode 100644
index 0000000000..879f4b8455
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-NAMELINK-No-Tweak.cmake
@@ -0,0 +1,20 @@
+enable_language(C)
+
+add_library(foo SHARED obj1.c)
+set_target_properties(foo PROPERTIES
+ VERSION 1.0
+ SOVERSION 1
+ INSTALL_RPATH "$ORIGIN"
+ )
+install(TARGETS foo DESTINATION lib)
+
+# Replace the .so "namelink" symlink with a linker script.
+# It is no longer a symlink, so any install tweaks would break.
+# This verifies that no install tweaks are added for the namelink.
+set(linker_script "INPUT($<TARGET_SONAME_FILE_NAME:foo>)")
+add_custom_command(TARGET foo POST_BUILD
+ COMMAND "${CMAKE_COMMAND}" -E remove "$<TARGET_LINKER_FILE:foo>"
+ COMMAND "${CMAKE_COMMAND}" -E echo "${linker_script}" > "$<TARGET_LINKER_FILE:foo>"
+ COMMENT "Generating linker script: '${linker_script}' as file $<TARGET_LINKER_FILE:foo>"
+ VERBATIM
+ )
diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt
index fe65fd3006..26dcd42bb2 100644
--- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt
+++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt
@@ -1,5 +1,6 @@
^CMake Error at TARGETS-NAMELINK_COMPONENT-bad-all\.cmake:5 \(install\):
- install TARGETS given NAMELINK_COMPONENT option not in LIBRARY group\. The
- NAMELINK_COMPONENT option may be specified only following LIBRARY\.
+ install TARGETS given NAMELINK_COMPONENT option not in LIBRARY or ARCHIVE
+ group\. The NAMELINK_COMPONENT option may be specified only following
+ LIBRARY or ARCHIVE\.
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt
index 60f52c4889..8aed62b6b9 100644
--- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt
+++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt
@@ -1,5 +1,6 @@
^CMake Error at TARGETS-NAMELINK_COMPONENT-bad-exc\.cmake:5 \(install\):
- install TARGETS given NAMELINK_COMPONENT option not in LIBRARY group\. The
- NAMELINK_COMPONENT option may be specified only following LIBRARY\.
+ install TARGETS given NAMELINK_COMPONENT option not in LIBRARY or ARCHIVE
+ group\. The NAMELINK_COMPONENT option may be specified only following
+ LIBRARY or ARCHIVE\.
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-RPATH.cmake b/Tests/RunCMake/install/TARGETS-RPATH.cmake
index b75deffff5..3e182f8cbf 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/install/empty3.cmake b/Tests/RunCMake/install/empty3.cmake
new file mode 100644
index 0000000000..18c2ac5f9e
--- /dev/null
+++ b/Tests/RunCMake/install/empty3.cmake
@@ -0,0 +1 @@
+write_empty_file(empty3.txt)
diff --git a/Tests/RunCMake/install/empty4.cmake b/Tests/RunCMake/install/empty4.cmake
new file mode 100644
index 0000000000..026a4d220e
--- /dev/null
+++ b/Tests/RunCMake/install/empty4.cmake
@@ -0,0 +1 @@
+write_empty_file(empty4.txt)
diff --git a/Tests/RunCMake/list/CMakeLists.txt b/Tests/RunCMake/list/CMakeLists.txt
index 4b3de84d94..93ee9dfd5f 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 9103bd2d41..5dd76f778a 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 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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 f82efb909b..f400079777 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 74b3ff8de3..93ee9dfd5f 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 0000000000..ad75f4386c
--- /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 695fb70e9b..376249b3fe 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 fdcaee9c86..a0ee6d7a0d 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 fc1a02b439..c72534fe1a 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 2897109554..93ee9dfd5f 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 4b3de84d94..93ee9dfd5f 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 2614533f4e..5649cb2fd1 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 a3e29f5b87..4d50561e68 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 18dfd2686f..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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 d5edaacd6e..4abe25ef85 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 80b6b3c7b4..788ba5edd3 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 2897109554..93ee9dfd5f 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 316b74b131..4a0f068605 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 22d3df7380..6610d401e8 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 9feccd0747..e2bd6691a6 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 6c72546418..a5bf2fbb55 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 dfdf70b274..d6f34a1d8d 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 667561ea79..8eb57486ad 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 189592d764..7c5d77d74f 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 2e07331120..20f1d5e349 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/CMakeLists.txt b/Tests/RunCMake/target_sources/CMakeLists.txt
index 727f93a925..296fdda5aa 100644
--- a/Tests/RunCMake/target_sources/CMakeLists.txt
+++ b/Tests/RunCMake/target_sources/CMakeLists.txt
@@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 3.11)
project(${RunCMake_TEST} LANGUAGES NONE)
-include(${RunCMake_TEST}.cmake)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/target_sources/FileSetDirect-result.txt b/Tests/RunCMake/target_sources/FileSetDirect-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetDirect-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_sources/FileSetDirect-stderr.txt b/Tests/RunCMake/target_sources/FileSetDirect-stderr.txt
new file mode 100644
index 0000000000..06458b9800
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetDirect-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at FileSetDirect.cmake:3 \(add_library\):
+ Cannot find source file:
+
+ FILE_SET
+
+ Tried extensions ([^
+]+
+)+
+ Hint: the FILE_SET keyword may only appear after a visibility specifier or
+ another FILE_SET within the target_sources\(\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/target_sources/FileSetDirect.cmake b/Tests/RunCMake/target_sources/FileSetDirect.cmake
new file mode 100644
index 0000000000..9f412c833b
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetDirect.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+
+add_library(lib1 STATIC empty.c FILE_SET h1.h TYPE HEADERS)
diff --git a/Tests/RunCMake/target_sources/FileSetFileNoExist-stderr.txt b/Tests/RunCMake/target_sources/FileSetFileNoExist-stderr.txt
index 9a2ca6ae59..2b5db43124 100644
--- a/Tests/RunCMake/target_sources/FileSetFileNoExist-stderr.txt
+++ b/Tests/RunCMake/target_sources/FileSetFileNoExist-stderr.txt
@@ -1,4 +1,4 @@
-^CMake Error at FileSetFileNoExist\.cmake:[0-9]+ \(add_library\):
+^CMake Error at FileSetFileNoExist\.cmake:[0-9]+ \(target_sources\):
Cannot find source file:
[^
diff --git a/Tests/RunCMake/target_sources/FileSetWrongSyntax-result.txt b/Tests/RunCMake/target_sources/FileSetWrongSyntax-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetWrongSyntax-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt b/Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt
new file mode 100644
index 0000000000..01db0022bf
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at FileSetWrongSyntax.cmake:4 \(target_sources\):
+ Cannot find source file:
+
+ FILE_SET
+
+ Tried extensions ([^
+]+
+)+
+ Hint: the FILE_SET keyword may only appear after a visibility specifier or
+ another FILE_SET within the target_sources\(\) command.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/target_sources/FileSetWrongSyntax.cmake b/Tests/RunCMake/target_sources/FileSetWrongSyntax.cmake
new file mode 100644
index 0000000000..709fb23b14
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetWrongSyntax.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+
+add_library(lib1 STATIC)
+target_sources(lib1 PRIVATE empty.c FILE_SET h1.h TYPE HEADERS)
diff --git a/Tests/RunCMake/target_sources/MissingSource-result.txt b/Tests/RunCMake/target_sources/MissingSource-result.txt
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/Tests/RunCMake/target_sources/MissingSource-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_sources/MissingSource-stderr.txt b/Tests/RunCMake/target_sources/MissingSource-stderr.txt
new file mode 100644
index 0000000000..b4c81c2e98
--- /dev/null
+++ b/Tests/RunCMake/target_sources/MissingSource-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at MissingSource\.cmake:[0-9]+ \(target_sources\):
+ Cannot find source file:
+
+ missing\.txt
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/target_sources/MissingSource.cmake b/Tests/RunCMake/target_sources/MissingSource.cmake
new file mode 100644
index 0000000000..2bb71e4935
--- /dev/null
+++ b/Tests/RunCMake/target_sources/MissingSource.cmake
@@ -0,0 +1,3 @@
+cmake_policy(SET CMP0115 NEW)
+add_custom_target(foo)
+target_sources(foo PRIVATE missing.txt)
diff --git a/Tests/RunCMake/target_sources/OriginDebug-stderr.txt b/Tests/RunCMake/target_sources/OriginDebug-stderr.txt
index 502d5f1536..fd797cf7de 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 d40a1d82a9..e2d847793e 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/target_sources/RunCMakeTest.cmake b/Tests/RunCMake/target_sources/RunCMakeTest.cmake
index 7c67c3f47b..90915cd759 100644
--- a/Tests/RunCMake/target_sources/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_sources/RunCMakeTest.cmake
@@ -9,6 +9,7 @@ run_cmake(OriginDebug)
run_cmake(CMP0026-LOCATION)
run_cmake(CMP0076-OLD)
run_cmake(CMP0076-WARN)
+run_cmake(MissingSource)
run_cmake(RelativePathInInterface)
run_cmake(RelativePathInSubdirGenEx)
run_cmake(RelativePathInSubdirInterface)
@@ -43,6 +44,8 @@ run_cmake(FileSetNoExistInstall)
run_cmake(FileSetDirectories)
run_cmake(FileSetCustomTarget)
run_cmake(FileSetBadName)
+run_cmake(FileSetWrongSyntax)
+run_cmake(FileSetDirect)
if(APPLE)
run_cmake(FileSetFramework)
endif()
diff --git a/Tests/RunCMake/try_compile/CMP0056.cmake b/Tests/RunCMake/try_compile/CMP0056.cmake
index 2ab79d5dde..634576e273 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 74b3ff8de3..93ee9dfd5f 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 e93f0b69e4..e6c41a5cbb 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 74b3ff8de3..93ee9dfd5f 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 74b3ff8de3..93ee9dfd5f 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/Tests/StagingPrefix/Consumer/CMakeLists.txt b/Tests/StagingPrefix/Consumer/CMakeLists.txt
index a230441e64..f7195b0ffe 100644
--- a/Tests/StagingPrefix/Consumer/CMakeLists.txt
+++ b/Tests/StagingPrefix/Consumer/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(Consumer)
diff --git a/Tests/StagingPrefix/Producer/CMakeLists.txt b/Tests/StagingPrefix/Producer/CMakeLists.txt
index eb3d98f2e6..c02d5de27b 100644
--- a/Tests/StagingPrefix/Producer/CMakeLists.txt
+++ b/Tests/StagingPrefix/Producer/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(Producer)
add_library(foo SHARED foo.cpp)
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt
index 068fae9947..6c0de9d7dc 100644
--- a/Tests/StringFileTest/CMakeLists.txt
+++ b/Tests/StringFileTest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(StringFileTest)
include_directories(${StringFileTest_BINARY_DIR})
diff --git a/Tests/SubDirSpaces/CMakeLists.txt b/Tests/SubDirSpaces/CMakeLists.txt
index ecd4353b76..26a7da98d3 100644
--- a/Tests/SubDirSpaces/CMakeLists.txt
+++ b/Tests/SubDirSpaces/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(SUBDIR)
# Some systems do not seem to support rpath with spaces.
diff --git a/Tests/TargetName/CMakeLists.txt b/Tests/TargetName/CMakeLists.txt
index 21752b7fd5..98640013b4 100644
--- a/Tests/TargetName/CMakeLists.txt
+++ b/Tests/TargetName/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(TargetName)
add_subdirectory(executables)
diff --git a/Tests/TestDriver/CMakeLists.txt b/Tests/TestDriver/CMakeLists.txt
index 3cc69c03e3..cd79372862 100644
--- a/Tests/TestDriver/CMakeLists.txt
+++ b/Tests/TestDriver/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(TestDriverTest)
set(Extra_SRCS testExtraStuff.cxx testExtraStuff2.cxx )
diff --git a/Tests/Testing/CMakeLists.txt b/Tests/Testing/CMakeLists.txt
index 8f69cbe442..44afd4e8c3 100644
--- a/Tests/Testing/CMakeLists.txt
+++ b/Tests/Testing/CMakeLists.txt
@@ -4,6 +4,8 @@
cmake_minimum_required (VERSION 2.7)
project (Testing)
+include (CTest)
+
#
# Lib and exe path
#
@@ -25,12 +27,6 @@ else ()
endif ()
#
-# Include Dart
-# (will also set NSLOOKUP, HOSTNAME, etc.)
-#
-include (${CMAKE_ROOT}/Modules/Dart.cmake)
-
-#
# Extra coverage
#
build_command(BUILD_COMMAND_VAR ${CMAKE_MAKE_PROGRAM})
diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt
index 2a0b015659..f77370cbeb 100644
--- a/Tests/TestsWorkingDirectory/CMakeLists.txt
+++ b/Tests/TestsWorkingDirectory/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(TestsWorkingDirectoryProj)
add_executable(WorkingDirectory main.c)
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index 3e46ed5010..ab2e007422 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
if(POLICY CMP0129)
cmake_policy(SET CMP0129 NEW)
endif()
diff --git a/Tests/TryCompile/Inner/CMakeLists.txt b/Tests/TryCompile/Inner/CMakeLists.txt
index 9f89af2843..262662dbe0 100644
--- a/Tests/TryCompile/Inner/CMakeLists.txt
+++ b/Tests/TryCompile/Inner/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(TryCompileInner C)
try_compile(SHOULD_PASS
diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt
index a3fd8d8ebe..a44988e24b 100644
--- a/Tests/VSExternalInclude/CMakeLists.txt
+++ b/Tests/VSExternalInclude/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.5)
project(VSExternalInclude)
if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[0124567]")
diff --git a/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt b/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt
index 950ec25d53..8918d98322 100644
--- a/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt
+++ b/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(FortranHello Fortran C)
# add a function to test for -lsunquad on sunpro sun systems.
diff --git a/Tests/VSMidl/CMakeLists.txt b/Tests/VSMidl/CMakeLists.txt
index 342b8fb678..f24640f9e5 100644
--- a/Tests/VSMidl/CMakeLists.txt
+++ b/Tests/VSMidl/CMakeLists.txt
@@ -12,7 +12,7 @@ endif()
message(STATUS "CMAKE_BUILDNAME='${CMAKE_BUILDNAME}'")
message(STATUS "THIS_TESTNAME='${THIS_TESTNAME}'")
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(${THIS_TESTNAME})
include(ExternalProject)
diff --git a/Tests/VSMidl/src/CMakeLists.txt b/Tests/VSMidl/src/CMakeLists.txt
index 7e838b459f..d8fd93435a 100644
--- a/Tests/VSMidl/src/CMakeLists.txt
+++ b/Tests/VSMidl/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(VSMidl)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/\$(IntDir)")
diff --git a/Tests/VSNASM/CMakeLists.txt b/Tests/VSNASM/CMakeLists.txt
index a038ddd882..6f824258bd 100644
--- a/Tests/VSNASM/CMakeLists.txt
+++ b/Tests/VSNASM/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(VSNASM C ASM_NASM)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)