diff options
Diffstat (limited to 'Tests')
885 files changed, 4244 insertions, 1140 deletions
diff --git a/Tests/Architecture/CMakeLists.txt b/Tests/Architecture/CMakeLists.txt index 96def00..3d10ee0 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 da3bb4c..9ab87b2 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 cf7e2ce..069fb77 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 4a95e2f..b53d499 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 5f2e8ec..40dd887 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 a6b3ffe..96f553a 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 72b3502..0c1af9e 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 2e3760a..dd4fe02 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 3de9ef7..d5d4970 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 52080bd..b2365ca 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/testRST.expect b/Tests/CMakeLib/testRST.expect index 5e3cdb1..483e220 100644 --- a/Tests/CMakeLib/testRST.expect +++ b/Tests/CMakeLib/testRST.expect @@ -46,7 +46,8 @@ Bracket Comment Content Bracket Comment Content ] -.. cmake:command:: some_cmd +.. cmake:command:: + some_cmd Command some_cmd description. @@ -54,7 +55,8 @@ Bracket Comment Content Command other_cmd description. -.. cmake:envvar:: some_var +.. cmake:envvar:: + some_var Environment variable some_var description. @@ -62,7 +64,8 @@ Bracket Comment Content Environment variable other_var description. -.. cmake:genex:: SOME_GENEX +.. cmake:genex:: + SOME_GENEX Generator expression SOME_GENEX description. @@ -70,7 +73,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 4139801..c23b69a 100644 --- a/Tests/CMakeLib/testRST.rst +++ b/Tests/CMakeLib/testRST.rst @@ -49,7 +49,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 +58,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 +67,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 +76,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 754205e..0f0c025 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 c1bf3d4..3485bac 100644 --- a/Tests/CMakeLib/testVisualStudioSlnParser.cxx +++ b/Tests/CMakeLib/testVisualStudioSlnParser.cxx @@ -80,7 +80,6 @@ int testVisualStudioSlnParser(int, char*[]) "cmsysProcessFwd9x", "cmsysTestDynload", "cmsysTestProcess", - "cmsysTestSharedForward", "cmsysTestsC", "cmsysTestsCxx", "cmsys_c", diff --git a/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file b/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file index 395b953..1f148fc 100644 --- a/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file +++ b/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file @@ -21,7 +21,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxp {29D5FCAF-20D0-4DEF-8529-F035C249E996} = {29D5FCAF-20D0-4DEF-8529-F035C249E996} {A0421DCA-AC3E-42D0-94AC-379A21A1E591} = {A0421DCA-AC3E-42D0-94AC-379A21A1E591} {C6AF7E57-CE57-4462-AE1D-BF520701480E} = {C6AF7E57-CE57-4462-AE1D-BF520701480E} - {F2CAAAB3-9568-4284-B8E3-13955183A6D7} = {F2CAAAB3-9568-4284-B8E3-13955183A6D7} {D8294E4A-03C5-43D7-AE35-15603F502DC0} = {D8294E4A-03C5-43D7-AE35-15603F502DC0} {A4921D15-411F-436A-B6F3-F8381652A8E1} = {A4921D15-411F-436A-B6F3-F8381652A8E1} {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} @@ -220,12 +219,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestProcess", "Source\ {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestSharedForward", "Source\kwsys\cmsysTestSharedForward.vcxproj", "{F2CAAAB3-9568-4284-B8E3-13955183A6D7}" - ProjectSection(ProjectDependencies) = postProject - {90BC31D7-A3E8-4F04-8049-2236C239A044} = {90BC31D7-A3E8-4F04-8049-2236C239A044} - {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestsC", "Source\kwsys\cmsysTestsC.vcxproj", "{D8294E4A-03C5-43D7-AE35-15603F502DC0}" ProjectSection(ProjectDependencies) = postProject {90BC31D7-A3E8-4F04-8049-2236C239A044} = {90BC31D7-A3E8-4F04-8049-2236C239A044} @@ -528,14 +521,6 @@ Global {C6AF7E57-CE57-4462-AE1D-BF520701480E}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 {C6AF7E57-CE57-4462-AE1D-BF520701480E}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {C6AF7E57-CE57-4462-AE1D-BF520701480E}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Debug|x64.ActiveCfg = Debug|x64 - {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Debug|x64.Build.0 = Debug|x64 - {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Release|x64.ActiveCfg = Release|x64 - {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Release|x64.Build.0 = Release|x64 - {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {D8294E4A-03C5-43D7-AE35-15603F502DC0}.Debug|x64.ActiveCfg = Debug|x64 {D8294E4A-03C5-43D7-AE35-15603F502DC0}.Debug|x64.Build.0 = Debug|x64 {D8294E4A-03C5-43D7-AE35-15603F502DC0}.Release|x64.ActiveCfg = Release|x64 @@ -667,7 +652,6 @@ Global {29D5FCAF-20D0-4DEF-8529-F035C249E996} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54} {A0421DCA-AC3E-42D0-94AC-379A21A1E591} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54} {C6AF7E57-CE57-4462-AE1D-BF520701480E} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54} - {F2CAAAB3-9568-4284-B8E3-13955183A6D7} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54} {D8294E4A-03C5-43D7-AE35-15603F502DC0} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54} {A4921D15-411F-436A-B6F3-F8381652A8E1} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54} {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54} diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c22f704..446e400 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") @@ -1512,6 +1484,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 c7e3105..e6ed559 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 2784e3b..24a0a86 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 2e5d8d3..0c76158 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 4cbccd3..6ecd194 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 3d65b7a..b6ed9e9 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 8f13787..18a1ff6 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 8f41db0..76c1e4b 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 d66eb06..77dadcf 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 9f30c7d..6646825 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 faf2250..3bcbb00 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 b23d5e2..2d487e3 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 bf4e350..7cc08ad 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 e0d826d..bd89246 100644 --- a/Tests/CMakeTests/EndStuffTestScript.cmake +++ b/Tests/CMakeTests/EndStuffTestScript.cmake @@ -22,7 +22,7 @@ elseif(testname STREQUAL bad_endfunction) # fail do_end("endfunction()\n") elseif(testname STREQUAL bad_endif) # fail - do_end("cmake_minimum_required(VERSION 2.8.12)\nendif()\n") + do_end("cmake_minimum_required(VERSION 3.5)\nendif()\n") elseif(testname STREQUAL endif_low_min_version) # fail do_end("cmake_minimum_required(VERSION 1.2)\nendif()\n") diff --git a/Tests/COnly/CMakeLists.txt b/Tests/COnly/CMakeLists.txt index 1c24017..728ec5b 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 c1b348e..a886b3d 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/CPackTestAllGenerators/CMakeLists.txt b/Tests/CPackTestAllGenerators/CMakeLists.txt index 95daabf..e7fed3b 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 2249d70..33fdc5e 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 ce6fac4..79e968a 100644 --- a/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt +++ b/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(TestProject CXX) diff --git a/Tests/CTestCoverageCollectGCOV/test.cmake.in b/Tests/CTestCoverageCollectGCOV/test.cmake.in index 7c7a3e5..aaf3070 100644 --- a/Tests/CTestCoverageCollectGCOV/test.cmake.in +++ b/Tests/CTestCoverageCollectGCOV/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestCoverageCollectGCOV/TestProject") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestCoverageCollectGCOV/TestProject") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") diff --git a/Tests/CTestLimitDashJ/CMakeLists.txt b/Tests/CTestLimitDashJ/CMakeLists.txt index d04b3ad..5bb7369 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 06cbafd..d5b3b61 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 d5d4d2f..4f4f6cf 100644 --- a/Tests/CTestTest2/test.cmake.in +++ b/Tests/CTestTest2/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestBadExe/test.cmake.in b/Tests/CTestTestBadExe/test.cmake.in index dd180f0..e46f71b 100644 --- a/Tests/CTestTestBadExe/test.cmake.in +++ b/Tests/CTestTestBadExe/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestBadGenerator/test.cmake.in b/Tests/CTestTestBadGenerator/test.cmake.in index ae6d0b5..34003b4 100644 --- a/Tests/CTestTestBadGenerator/test.cmake.in +++ b/Tests/CTestTestBadGenerator/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in index 3bac0e0..916bbbb 100644 --- a/Tests/CTestTestChecksum/test.cmake.in +++ b/Tests/CTestTestChecksum/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestCostSerial/test.cmake.in b/Tests/CTestTestCostSerial/test.cmake.in index 1c46d4c..0df9f37 100644 --- a/Tests/CTestTestCostSerial/test.cmake.in +++ b/Tests/CTestTestCostSerial/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestCrash/CMakeLists.txt b/Tests/CTestTestCrash/CMakeLists.txt index 663d2e4..c7e5b91 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 916d4e9..34c9f3e 100644 --- a/Tests/CTestTestCrash/test.cmake.in +++ b/Tests/CTestTestCrash/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestCycle/CMakeLists.txt b/Tests/CTestTestCycle/CMakeLists.txt index 19f4dd7..4093111 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 507d46b..78b0ebb 100644 --- a/Tests/CTestTestCycle/test.cmake.in +++ b/Tests/CTestTestCycle/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestDepends/CMakeLists.txt b/Tests/CTestTestDepends/CMakeLists.txt index 462ad8c..5a011d0 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 11bc92a..ea01297 100644 --- a/Tests/CTestTestDepends/test.cmake.in +++ b/Tests/CTestTestDepends/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in b/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in index 8eb808f..3aed1ab 100644 --- a/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in +++ b/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) set(CTEST_RUN_CURRENT_SCRIPT 0) diff --git a/Tests/CTestTestFailure/CMakeLists.txt b/Tests/CTestTestFailure/CMakeLists.txt index db14b3d..b6c1e7a 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 47d254f..505916e 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 8496c80..e3d7742 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 bfe4459..73b2cfa 100644 --- a/Tests/CTestTestFdSetSize/test.cmake.in +++ b/Tests/CTestTestFdSetSize/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.10) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt index 7376a40..24da9ca 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 b31f587..72764ca 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 38980aa..7bf0362 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 2db1ddd..c3edfd5 100644 --- a/Tests/CTestTestLaunchers/test.cmake.in +++ b/Tests/CTestTestLaunchers/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) set(TEST_SUCCESS TRUE) diff --git a/Tests/CTestTestMissingDependsExe/CMakeLists.txt b/Tests/CTestTestMissingDependsExe/CMakeLists.txt index 9826da6..07df194 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 819fee4..7527202 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 517db72..d60d16f 100644 --- a/Tests/CTestTestParallel/test.cmake.in +++ b/Tests/CTestTestParallel/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestResourceLock/CMakeLists.txt b/Tests/CTestTestResourceLock/CMakeLists.txt index 4bc4366..683aba5 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 826226d..dab26fc 100644 --- a/Tests/CTestTestResourceLock/test.cmake.in +++ b/Tests/CTestTestResourceLock/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestScheduler/CMakeLists.txt b/Tests/CTestTestScheduler/CMakeLists.txt index a3f0f27..91d565d 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 5dcfb63..3b03a7c 100644 --- a/Tests/CTestTestScheduler/test.cmake.in +++ b/Tests/CTestTestScheduler/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestSerialInDepends/CMakeLists.txt b/Tests/CTestTestSerialInDepends/CMakeLists.txt index 90e50f9..03ad4b3 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 69c11fc..d46d80e 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 26c4178..1eeeec6 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 2988d2f..b45e4a6 100644 --- a/Tests/CTestTestSkipReturnCode/test.cmake.in +++ b/Tests/CTestTestSkipReturnCode/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestStopTime/CMakeLists.txt b/Tests/CTestTestStopTime/CMakeLists.txt index 08116e2..4f6e795 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 64a4fb9..f8e40fc 100644 --- a/Tests/CTestTestStopTime/GetDate.cmake +++ b/Tests/CTestTestStopTime/GetDate.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.5) macro(GET_DATE) # diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in index 3797d40..2d69f1d 100644 --- a/Tests/CTestTestStopTime/test.cmake.in +++ b/Tests/CTestTestStopTime/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestSubdir/CMakeLists.txt b/Tests/CTestTestSubdir/CMakeLists.txt index 87c4604..e6f3209 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 3b1fb5f..8b8d85e 100644 --- a/Tests/CTestTestSubdir/test.cmake.in +++ b/Tests/CTestTestSubdir/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestTimeout/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in index ce9c497..9d9e430 100644 --- a/Tests/CTestTestTimeout/test.cmake.in +++ b/Tests/CTestTestTimeout/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestUpload/CMakeLists.txt b/Tests/CTestTestUpload/CMakeLists.txt index 5e02b2f..5bf428d 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 74fd1ec..db428e9 100644 --- a/Tests/CTestTestUpload/test.cmake.in +++ b/Tests/CTestTestUpload/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestVerboseOutput/CMakeLists.txt b/Tests/CTestTestVerboseOutput/CMakeLists.txt index 3792385..d44e9fc 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 9c9a4dc..b47383a 100644 --- a/Tests/CTestTestVerboseOutput/test.cmake.in +++ b/Tests/CTestTestVerboseOutput/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestZeroTimeout/CMakeLists.txt b/Tests/CTestTestZeroTimeout/CMakeLists.txt index 2d404c8..51ef807 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 50dbba0..e0dbbc6 100644 --- a/Tests/CTestTestZeroTimeout/test.cmake.in +++ b/Tests/CTestTestZeroTimeout/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt index 69fa4b6..9259309 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 1e943a1..850406b 100644 --- a/Tests/CheckFortran.cmake +++ b/Tests/CheckFortran.cmake @@ -7,7 +7,7 @@ if(NOT DEFINED CMAKE_Fortran_COMPILER) message(STATUS ${_desc}) file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran/CMakeLists.txt" - "cmake_minimum_required(VERSION 2.8.12) + "cmake_minimum_required(VERSION 3.5) project(CheckFortran Fortran) file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\" \"set(CMAKE_Fortran_COMPILER \\\"\${CMAKE_Fortran_COMPILER}\\\")\\n\" diff --git a/Tests/CompileDefinitions/CMakeLists.txt b/Tests/CompileDefinitions/CMakeLists.txt index 8347d5a..cd0a0b0 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/Contracts/Trilinos/CMakeLists.txt b/Tests/Contracts/Trilinos/CMakeLists.txt index 6cc2d09..e23a643 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 0d36323..aee4dc6 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 db08076..aa25c4c 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 0000000..464714b --- /dev/null +++ b/Tests/CudaOnly/CUBIN/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.18) +project(CudaCUBIN LANGUAGES CUDA) + + +set(CMAKE_CUDA_ARCHITECTURES all-major) + +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 0000000..fbe0d26 --- /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 0000000..7478253 --- /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 0000000..5f8a0ce --- /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 0000000..da5249c --- /dev/null +++ b/Tests/CudaOnly/CUBIN/main.cu @@ -0,0 +1,56 @@ +#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; + } + } +} diff --git a/Tests/CudaOnly/Fatbin/CMakeLists.txt b/Tests/CudaOnly/Fatbin/CMakeLists.txt new file mode 100644 index 0000000..db0dc22 --- /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 0000000..903feee --- /dev/null +++ b/Tests/CudaOnly/Fatbin/main.cu @@ -0,0 +1,56 @@ +#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; + } + } +} diff --git a/Tests/CudaOnly/OptixIR/CMakeLists.txt b/Tests/CudaOnly/OptixIR/CMakeLists.txt new file mode 100644 index 0000000..afeabda --- /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 0000000..c79829b --- /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/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index fa06a94..25df300 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 feaa12e..81e072b 100644 --- a/Tests/CustomCommandByproducts/External/CMakeLists.txt +++ b/Tests/CustomCommandByproducts/External/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(External C) add_library(ExternalLibrary STATIC ExternalLibrary.c) diff --git a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt index 7697a9b..531690a 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 8c90339..c88641b 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 09689cb..6cd3a8e 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 58d3fb7..cae108e 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 272eff7..5ba0b49 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 7722d7d..a652efc 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 813cf06..bb390f9 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 81d31e7..d1ab7ac 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 c3f2614..b6785a6 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 57e8105..2dfc425 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 6f8a7b1..1b84ff3 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 14bf19f..9909d2e 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 e9cb618..136b3fd 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 f60ccfa..39fa532 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 7c14a59..3db1a4f 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 d7be327..7dd12e9 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 c2c1322..db80ccb 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 961e636..eb0291e 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 954ee10..de8d97d 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 b15d6ac..497b6c3 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 0392d88..b80c6fc 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 ec838de..cea87cd 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 3652ad6..42d371a 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 cde0f42..5d957ee 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 35ef337..2b8f533 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 ea1b05d..3524f06 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 72fc6f4..be1cceb 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 4835afa..b420f48 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 b639979..bae34ff 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 536fc67..8efde3d 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 25d5518..f0785dc 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 2bfb81e..9c686a6 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 11520f8..83d9546 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 5ecfd9b..d97585c 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 2c67619..2b5a56d 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 3375a55..179f5db 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 bd6b13a..e9d6b9d 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 157b9c2..bbb1f27 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 76966e7..801629c 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 0bb49e2..853a1dd 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 7051d35..f267d6c 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 9c1fff7..f09ea66 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 9c1eb5e..582cbaa 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 c5a9819..e17987d 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/FindICU/Test/CMakeLists.txt b/Tests/FindICU/Test/CMakeLists.txt index 1247ac7..066d173 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 6182260..4e4f14d 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 912c7a1..390b3a7 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 d1dc647..5f100ea 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 f5d5a73..ce9af98 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 c59dcdb..438938e 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 041cc13..9b866ab 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 e932661..32a157f 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/FindMatlab/basic_checks/CMakeLists.txt b/Tests/FindMatlab/basic_checks/CMakeLists.txt index c0c752a..e9b696c 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 f5d4880..efb99ae 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 4b092cd..45e48d7 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 bceeba1..58db0ec 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 c732be1..8b21888 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 4af7cc3..c709bbd 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 d015730..f203f4b 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 a20c0f7..1e3a239 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/FindOpenCL/Test/CMakeLists.txt b/Tests/FindOpenCL/Test/CMakeLists.txt index f8a6587..4a1f6bd 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 9004a98..7c805c0 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 0000000..52f5936 --- /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 0000000..875f73c --- /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 d8992d9..266a459 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 520d5d2..c443221 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 ad50011..66cdda1 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 541f5bd..65b778b 100644 --- a/Tests/FindPatch/CMakeLists.txt +++ b/Tests/FindPatch/CMakeLists.txt @@ -4,5 +4,6 @@ add_test(NAME FindPatch.Test COMMAND "${CMake_SOURCE_DIR}/Tests/FindPatch/Test" "${CMake_BINARY_DIR}/Tests/FindPatch/Test" ${build_generator_args} + --build-project TestFindPatch --build-options ${build_options} ) diff --git a/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt b/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt index 524be92..99823a6 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 a0d8eb2..283aeec 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 2164ac1..0fb3036 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 7476632..e3e7b36 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 60abb26..1bd94c4 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 592329b..8086c16 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 47ca022..fd3182e 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 fd9d947..b623972 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 5c85155..4845035 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 3e17f68..9920336 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 bedc627..9aa1bcf 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 4cf7c0a..dfc22d8 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 ebfc9ab..5b7ce30 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 bf7cd61..b702c99 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 9bec22f..85b1711 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 39577b2..95ed495 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 a1036ce..d9b2d22 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 989688f..7a6520d 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 c9d46ac..7334d7a 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 4f01197..ffbaa33 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 e40557d..42d31f2 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 c45bd8c..1d362be 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 cd46c88..5eca0cb 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 ccc1fdb..57c0ddf 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/Python3SABIModule/CMakeLists.txt b/Tests/FindPython/Python3SABIModule/CMakeLists.txt index 2a067d0..1a909ec 100644 --- a/Tests/FindPython/Python3SABIModule/CMakeLists.txt +++ b/Tests/FindPython/Python3SABIModule/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(TestPython3SABIModule LANGUAGES C) diff --git a/Tests/FindPython/RequiredArtifacts/CMakeLists.txt b/Tests/FindPython/RequiredArtifacts/CMakeLists.txt index 42d282d..cb9d4d3 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 bb4f67c..4d9c7c8 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 84f7362..60399d3 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 dae3282..e2e5bd2 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 23d208d..2f7c0db 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 61d4f4b..0dd1047 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 bcc6ebd..43cdd37 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 e235db3..54404d0 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 ee2a5f9..9bc50a4 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 3c6cc1e..11ae60c 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 dfcfc15..7198d22 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 18a73a3..e39ffb1 100644 --- a/Tests/FindX11/Test/CMakeLists.txt +++ b/Tests/FindX11/Test/CMakeLists.txt @@ -32,10 +32,13 @@ 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_cursor) test_x11_component(x11_components xcb_icccm) test_x11_component(x11_components xcb_randr) +test_x11_component(x11_components xcb_shape) test_x11_component(x11_components xcb_util) test_x11_component(x11_components xcb_xfixes) +test_x11_component(x11_components xcb_xrm) test_x11_component(x11_components xcb_xtest) test_x11_component(x11_components xcb_keysyms) test_x11_component(x11_components xcb_xkb) @@ -76,10 +79,13 @@ foreach(lib Xaw xcb X11_xcb + xcb_cursor xcb_icccm xcb_randr + xcb_shape xcb_util xcb_xfixes + xcb_xrm Xcomposite Xdamage Xdmcp diff --git a/Tests/FindX11/Test/main.c b/Tests/FindX11/Test/main.c index 653a2be..5240de0 100644 --- a/Tests/FindX11/Test/main.c +++ b/Tests/FindX11/Test/main.c @@ -336,6 +336,22 @@ static void test_xcb(void) xcb_disconnect(connection); } +# ifdef HAVE_xcb_cursor +# 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_t* screen = xcb_aux_get_screen(conn, screen_nbr); + xcb_cursor_context_t* ctx; + xcb_cursor_context_new(connection, screen, &ctx); + xcb_cursor_context_free(ctx); + xcb_disconnect(connection); +} + +# endif + # ifdef HAVE_xcb_randr # include <xcb/randr.h> @@ -350,6 +366,20 @@ static void test_xcb_randr(void) # endif +# ifdef HAVE_xcb_shape +# include <xcb/shape.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> @@ -376,6 +406,20 @@ static void test_xcb_xfixes(void) # endif +# ifdef HAVE_xcb_xrm +# 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> @@ -496,15 +540,24 @@ int main(int argc, char* argv[]) #ifdef HAVE_xcb test_xcb, #endif -#ifdef HAVE_xcb_util +#ifdef HAVE_xcb_cursor + test_xcb_cursor, +#endif +#ifdef HAVE_xcb_randr test_xcb_randr, #endif +#ifdef HAVE_xcb_shape + test_xcb_shape, +#endif #ifdef HAVE_xcb_util test_xcb_util, #endif #ifdef HAVE_xcb_xfixes test_xcb_xfixes, #endif +#ifdef HAVE_xcb_xrm + test_xcb_xrm, +#endif NULL, }; diff --git a/Tests/FindXalanC/Test/CMakeLists.txt b/Tests/FindXalanC/Test/CMakeLists.txt index a8c2a0a..eb45802 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 267c6a9..38ae6e4 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 0000000..b66f838 --- /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 0000000..ecc9c36 --- /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 0000000..0e576cf --- /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 0fede25..30ab16b 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -49,7 +49,7 @@ function(test_fortran_c_interface_module) FortranCInterface_VERIFY() FortranCInterface_VERIFY(CXX) if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) - if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|PathScale|Absoft|Fujitsu") + if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "SunPro|PathScale|Absoft|Fujitsu|LCC") set(module_expected 1) endif() if(FortranCInterface_MODULE_FOUND OR module_expected) diff --git a/Tests/FortranC/CMakeLists.txt b/Tests/FortranC/CMakeLists.txt index 1403aa0..f5e056b 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 fc71a18..ed2a440 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 287be94..629deeb 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 0660d0f..a5a8b11 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 3fb53d1..ef115e6 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 e1b1f93..7bb0d85 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 e4973b0..d4720be 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 3b994a2..6812267 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 a302c7c..d57eccc 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 b120640..adbdf9a 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 1d8d7ac..c1c6817 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 b56cc21..06fc06a 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 2471e01..8a2e460 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 d9a8ac8..2c2e488 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 e222929..431fd89 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 31ff9b5..c25c4b2 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 cafa99b..3313c57 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 e1c4998..c0dc247 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 dc029a4..74a1f55 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 fef4bb7..35dc0fe 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 d17b955..3f78a81 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 a600c63..bae3d2f 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 768d2a6..d22b8b6 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 3b4fccc..68c66fe 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 0d960ad..bbc70dc 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 c9d3f2c..7af746c 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 85598c4..e88433c 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 809d65b..b7b9602 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 b4f0033..f4fd8b0 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 483bd8b..49577a7 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 3e4b436..c822113 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 06167a8..05a35bb 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 fb0ebc0..f19d5a4 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 8544798..093aca6 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 8afe036..e7bc3ab 100644 --- a/Tests/OutDir/CMakeLists.txt +++ b/Tests/OutDir/CMakeLists.txt @@ -7,7 +7,7 @@ if(_isMultiConfig) string(TOUPPER "${config}" CONFIG) list(APPEND configs "${CONFIG}") endforeach() - set(CMAKE_BUILD_TYPE) + unset(CMAKE_BUILD_TYPE CACHE) elseif(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() diff --git a/Tests/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt index 5aa2459..81207bc 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 c2f43cd..a62e53f 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 f00122d..4100683 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 ff779d3..4f7e285 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 84ca5e8..63a7b5e 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 ad74961..12dc99b 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 3ddc345..83cd44f 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 65e2b64..d0e9617 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/QtAutomocNoQt/CMakeLists.txt b/Tests/QtAutomocNoQt/CMakeLists.txt index 655f12b..4e2ceeb 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 78e3fc1..03a0f7a 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 0000000..c0c3bba --- /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/AppleTextStubs/CMakeLists.txt b/Tests/RunCMake/AppleTextStubs/CMakeLists.txt new file mode 100644 index 0000000..93ee9df --- /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 0000000..f75c6d1 --- /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 0000000..e0001d0 --- /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 0000000..e8a5557 --- /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 0000000..f99eb5e --- /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 0000000..d2e09ea --- /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 0000000..9406aac --- /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 0000000..40ec0a6 --- /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 0000000..f61c8f2 --- /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 0000000..af73286 --- /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 0000000..28c175d --- /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 0000000..9ccd685 --- /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 0000000..94054fa --- /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 0000000..9f6318c --- /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 0000000..b038138 --- /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 0000000..7f39d71 --- /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 0000000..dc5ce3d --- /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 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/AutoExportDll/CMakeLists.txt +++ b/Tests/RunCMake/AutoExportDll/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/AutoExportDll/hello.cxx b/Tests/RunCMake/AutoExportDll/hello.cxx index 74e7a4e..35ccbb7 100644 --- a/Tests/RunCMake/AutoExportDll/hello.cxx +++ b/Tests/RunCMake/AutoExportDll/hello.cxx @@ -12,3 +12,12 @@ void hello() } void Hello::operator delete[](void*){}; void Hello::operator delete(void*){}; + +#ifdef HELLO_VFTABLE +HelloVFTable::HelloVFTable() +{ +} +HelloVFTable::~HelloVFTable() +{ +} +#endif diff --git a/Tests/RunCMake/AutoExportDll/hello.h b/Tests/RunCMake/AutoExportDll/hello.h index 7192f65..410ffab 100644 --- a/Tests/RunCMake/AutoExportDll/hello.h +++ b/Tests/RunCMake/AutoExportDll/hello.h @@ -16,3 +16,20 @@ public: static void operator delete[](void*); static void operator delete(void*); }; + +// In the MSVC ABI, a delegating constructor references the vftable. +#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) +# define HELLO_VFTABLE +#endif +#ifdef HELLO_VFTABLE +class HelloVFTable +{ +public: + HelloVFTable(); + HelloVFTable(int) + : HelloVFTable() + { + } + virtual ~HelloVFTable(); +}; +#endif diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx index 8fc768a..a9459a9 100644 --- a/Tests/RunCMake/AutoExportDll/say.cxx +++ b/Tests/RunCMake/AutoExportDll/say.cxx @@ -53,5 +53,8 @@ int main() #ifdef HAS_JUSTNOP justnop(); #endif +#ifdef HELLO_VFTABLE + HelloVFTable helloVFTable(1); +#endif return 0; } diff --git a/Tests/RunCMake/BuildDepends/CMakeLists.txt b/Tests/RunCMake/BuildDepends/CMakeLists.txt index 99f238b..8eb5748 100644 --- a/Tests/RunCMake/BuildDepends/CMakeLists.txt +++ b/Tests/RunCMake/BuildDepends/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/BundleUtilities/CMakeLists.txt b/Tests/RunCMake/BundleUtilities/CMakeLists.txt index 6dd8cdf..44025d3 100644 --- a/Tests/RunCMake/BundleUtilities/CMakeLists.txt +++ b/Tests/RunCMake/BundleUtilities/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.12) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake index df28102..a7b05d2 100644 --- a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake +++ b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.4) include(RunCMake) # TODO Migrate Tests/BundleUtilities here diff --git a/Tests/RunCMake/Byproducts/CleanByproducts.cmake b/Tests/RunCMake/Byproducts/CleanByproducts.cmake index 85d9582..961deb9 100644 --- a/Tests/RunCMake/Byproducts/CleanByproducts.cmake +++ b/Tests/RunCMake/Byproducts/CleanByproducts.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.10) -project(CleanByproducts) +enable_language(C) +enable_language(CXX) # Configurable parameters set(TEST_CLEAN_NO_CUSTOM FALSE CACHE BOOL "Value for the CLEAN_NO_CUSTOM PROPERTY") diff --git a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake index f42d8e4..3d861fb 100644 --- a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake +++ b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.4) - cmake_policy(SET CMP0004 NEW) add_library(foo SHARED empty.cpp) diff --git a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake index 3fa58b6..32c1474 100644 --- a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake +++ b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.4) - cmake_policy(SET CMP0004 OLD) add_library(foo SHARED empty.cpp) diff --git a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake index 2970476..b7cd7ff 100644 --- a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake +++ b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.4) - cmake_policy(SET CMP0004 NEW) add_library(foo SHARED empty.cpp) diff --git a/Tests/RunCMake/CMP0004/CMakeLists.txt b/Tests/RunCMake/CMP0004/CMakeLists.txt index 12cd3c7..93ee9df 100644 --- a/Tests/RunCMake/CMP0004/CMakeLists.txt +++ b/Tests/RunCMake/CMP0004/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt index a446211..dc03414 100644 --- a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt @@ -1,13 +1,6 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -+ -CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMP0019-OLD\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0019 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt index f7b9c0e..6eee437 100644 --- a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt @@ -1,11 +1,4 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -+ -CMake Warning \(dev\) in CMakeLists.txt: +^CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0019 is not set: Do not re-expand variables in include and link information. Run "cmake --help-policy CMP0019" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/CMP0019/RunCMakeTest.cmake b/Tests/RunCMake/CMP0019/RunCMakeTest.cmake index 119fc2b..fcd080f 100644 --- a/Tests/RunCMake/CMP0019/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0019/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0019-WARN) run_cmake(CMP0019-OLD) diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt index 87404d3..c84a289 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt @@ -1,11 +1,4 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -+ -CMake Warning \(dev\) in CMakeLists.txt: +^CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run "cmake --help-policy CMP0022" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt index 5d75720..39a9511 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt @@ -1,11 +1,4 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -+ -CMake Warning \(dev\) in CMakeLists.txt: +^CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run "cmake --help-policy CMP0022" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake index 4c10996..ea956fc 100644 --- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0022-WARN) run_cmake(CMP0022-WARN-tll) diff --git a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt new file mode 100644 index 0000000..259eabd --- /dev/null +++ b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0026-IMPORTED.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0111 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake index 047da28..6476176 100644 --- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0026-WARN) run_cmake(CMP0026-OLD) diff --git a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake index 5952279..558fba3 100644 --- a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) if(RunCMake_GENERATOR MATCHES "^Ninja") # Detect ninja version so we know what tests can be supported. diff --git a/Tests/RunCMake/CMP0038/RunCMakeTest.cmake b/Tests/RunCMake/CMP0038/RunCMakeTest.cmake index fc3500a..3e7b5f3 100644 --- a/Tests/RunCMake/CMP0038/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0038/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0038-WARN) run_cmake(CMP0038-NEW) diff --git a/Tests/RunCMake/CMP0039/RunCMakeTest.cmake b/Tests/RunCMake/CMP0039/RunCMakeTest.cmake index 58e8ea9..ce7541a 100644 --- a/Tests/RunCMake/CMP0039/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0039/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0039-WARN) run_cmake(CMP0039-NEW) diff --git a/Tests/RunCMake/CMP0040/RunCMakeTest.cmake b/Tests/RunCMake/CMP0040/RunCMakeTest.cmake index 13160e3..e5e6c37 100644 --- a/Tests/RunCMake/CMP0040/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0040/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0040-OLD-missing-target) run_cmake(CMP0040-NEW-missing-target) diff --git a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake index f47bb2e..93378c2 100644 --- a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) # Protect tests from running inside the default install prefix. set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefaultPrefix") diff --git a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake index 3b226d7..6b23145 100644 --- a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0042-OLD) run_cmake(CMP0042-NEW) diff --git a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake index 7f9572e..b940528 100644 --- a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) diff --git a/Tests/RunCMake/CMP0045/RunCMakeTest.cmake b/Tests/RunCMake/CMP0045/RunCMakeTest.cmake index 7c0e8a2..009d455 100644 --- a/Tests/RunCMake/CMP0045/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0045/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0045-OLD) run_cmake(CMP0045-NEW) diff --git a/Tests/RunCMake/CMP0046/RunCMakeTest.cmake b/Tests/RunCMake/CMP0046/RunCMakeTest.cmake index 0a39c76..86b749a 100644 --- a/Tests/RunCMake/CMP0046/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0046/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0046-OLD-missing-dependency) run_cmake(CMP0046-NEW-missing-dependency) diff --git a/Tests/RunCMake/CMP0049/RunCMakeTest.cmake b/Tests/RunCMake/CMP0049/RunCMakeTest.cmake index a8aa9d9..e71f31e 100644 --- a/Tests/RunCMake/CMP0049/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0049/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0049-OLD) run_cmake(CMP0049-NEW) diff --git a/Tests/RunCMake/CMP0050/RunCMakeTest.cmake b/Tests/RunCMake/CMP0050/RunCMakeTest.cmake index b7de284..526a9aa 100644 --- a/Tests/RunCMake/CMP0050/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0050/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0050-OLD) run_cmake(CMP0050-NEW) diff --git a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake index 621192d..955d898 100644 --- a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0051-OLD) run_cmake(CMP0051-NEW) diff --git a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake index 6521ac0..de58c25 100644 --- a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0053-OLD) run_cmake(CMP0053-NEW) diff --git a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake index 2f2fb76..fc031de 100644 --- a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0054-OLD) run_cmake(CMP0054-NEW) diff --git a/Tests/RunCMake/CMP0055/RunCMakeTest.cmake b/Tests/RunCMake/CMP0055/RunCMakeTest.cmake index efcfcab..33a5b4b 100644 --- a/Tests/RunCMake/CMP0055/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0055/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0055-OLD-Out-of-Scope) run_cmake(CMP0055-NEW-Out-of-Scope) diff --git a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake index 719e054..76eaca6 100644 --- a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0057-OLD) run_cmake(CMP0057-WARN) diff --git a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt index e2c280e..7230a07 100644 --- a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt +++ b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt @@ -12,5 +12,5 @@ will ask the linker to search for these by library name. Call Stack \(most recent call first\): CMP0060-WARN-ON.cmake:[0-9]+ \(include\) - CMakeLists.txt:4 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/CMP0060/CMakeLists.txt b/Tests/RunCMake/CMP0060/CMakeLists.txt index 291d34d..db6b701 100644 --- a/Tests/RunCMake/CMP0060/CMakeLists.txt +++ b/Tests/RunCMake/CMP0060/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.9) -cmake_policy(VERSION 3.2) +cmake_minimum_required(VERSION 3.2) project(${RunCMake_TEST} C) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0060/RunCMakeTest.cmake b/Tests/RunCMake/CMP0060/RunCMakeTest.cmake index 445156f..b7eae5a 100644 --- a/Tests/RunCMake/CMP0060/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0060/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) function(run_cmake_CMP0060 CASE) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0060-${CASE}-build) diff --git a/Tests/RunCMake/CMP0064/RunCMakeTest.cmake b/Tests/RunCMake/CMP0064/RunCMakeTest.cmake index 26e0a91..4c68510 100644 --- a/Tests/RunCMake/CMP0064/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0064/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0064-OLD) run_cmake(CMP0064-WARN) diff --git a/Tests/RunCMake/CMP0065/RunCMakeTest.cmake b/Tests/RunCMake/CMP0065/RunCMakeTest.cmake index e86b50e..1ca4605 100644 --- a/Tests/RunCMake/CMP0065/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0065/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(OLDBad1) if(NOT CMAKE_SYSTEM_NAME STREQUAL "AIX") diff --git a/Tests/RunCMake/CMP0081/CMakeLists.txt b/Tests/RunCMake/CMP0081/CMakeLists.txt index ef2163c..44025d3 100644 --- a/Tests/RunCMake/CMP0081/CMakeLists.txt +++ b/Tests/RunCMake/CMP0081/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.12) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0102/CMakeLists.txt b/Tests/RunCMake/CMP0102/CMakeLists.txt index ef2163c..2632ffa 100644 --- a/Tests/RunCMake/CMP0102/CMakeLists.txt +++ b/Tests/RunCMake/CMP0102/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.16) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0106/CMakeLists.txt b/Tests/RunCMake/CMP0106/CMakeLists.txt index eafa642..0a96a26 100644 --- a/Tests/RunCMake/CMP0106/CMakeLists.txt +++ b/Tests/RunCMake/CMP0106/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.17) if (RunCMake_TEST STREQUAL "CMP0106-WARN-VTK") project(VTK NONE) else () diff --git a/Tests/RunCMake/CMP0111/CMP0111-OLD-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-OLD-stderr.txt new file mode 100644 index 0000000..bf7fb08 --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMP0111-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0111-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0111 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt b/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt index 8b90311..67d00f7 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 7b100b6..e79ca97 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 ec777f7..acd145e 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 f7d9f6b..929dafd 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 a876390..6a096b8 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 b750ae7..e721876 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 580f04f..f358297 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 e268a7a..0e27c1d 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 08eb682..4de6e76 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 b7c496c..b7a170b 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 58144c8..2af72a4 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 1f1bc90..6109f65 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 5c15f12..e5e97de 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 12a913a..f5b3d1a 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 62db7ee..a30bc84 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 7f86d38..4f4fea3 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 4104fc0..3c80531 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 7a16d0b..9600fee 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 5a5c4ec..e638660 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 12fa617..18e6a8c 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 7199f04..a60545f 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 233fd8b..fd496cb 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 4aed2ed..3505242 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 cea8c22..63a9341 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 e2a2cf5..1d7cbde 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 bce7681..f4c7d00 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 00c47e9..93d8b83 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 5b7994c..fdde792 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 c975c23..9e6a4a5 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 142d8a0..58ba793 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 d4ef667..cdb7cb4 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 ceeb570..4cd401c 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 f8484d0..6acd3df 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 0556391..2805cbf 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 7d588a2..6f29170 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 8421061..cde1164 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 e0f17e6..91c4c4c 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 80f3edf..547e820 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 d3aa546..5e9cf6c 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 5eb8a34..2820ba3 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/CMP0139/CMakeLists.txt b/Tests/RunCMake/CMP0139/CMakeLists.txt index 18dfd26..5ff8d3e 100644 --- a/Tests/RunCMake/CMP0139/CMakeLists.txt +++ b/Tests/RunCMake/CMP0139/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.23) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 930122c..0ebb720 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -270,8 +270,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" @@ -323,6 +321,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,6 +355,7 @@ 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) @@ -392,6 +395,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 +515,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) diff --git a/Tests/RunCMake/CPack/CMakeLists.txt b/Tests/RunCMake/CPack/CMakeLists.txt index c81b34e..f210474 100644 --- a/Tests/RunCMake/CPack/CMakeLists.txt +++ b/Tests/RunCMake/CPack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) if(POLICY CMP0129) cmake_policy(SET CMP0129 NEW) diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index ef4cf5e..ca02b76 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) include(RunCMake) include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") diff --git a/Tests/RunCMake/CPackConfig/CMakeLists.txt b/Tests/RunCMake/CPackConfig/CMakeLists.txt index 1e071ec..2b3e1f9 100644 --- a/Tests/RunCMake/CPackConfig/CMakeLists.txt +++ b/Tests/RunCMake/CPackConfig/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST}) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt b/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt index 89ff7c4..404e162 100644 --- a/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt +++ b/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar Binary files differindex c24af48..7cfcb36 100644 --- a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar +++ b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar diff --git a/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt b/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt +++ b/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt b/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt +++ b/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CTest/CMP0145-Dart-NEW-result.txt b/Tests/RunCMake/CTest/CMP0145-Dart-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /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 0000000..06fce77 --- /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 0000000..5b14ecc --- /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 0000000..2f66c3f --- /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 0000000..5a751fc --- /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 0000000..1398dbe --- /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 0000000..d00491f --- /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 0000000..b045636 --- /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 0000000..c1227d6 --- /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 0000000..b9f3c76 --- /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 0000000..d076235 --- /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 0000000..59febdf --- /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 f1a83e8..1319aec 100644 --- a/Tests/RunCMake/CTest/CMakeLists.txt +++ b/Tests/RunCMake/CTest/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) if(NOT NoProject) project(${RunCMake_TEST} NONE) endif() diff --git a/Tests/RunCMake/CTest/RunCMakeTest.cmake b/Tests/RunCMake/CTest/RunCMakeTest.cmake index b81f319..4c2c107 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 2897109..93ee9df 100644 --- a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt +++ b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/test.cmake.in b/Tests/RunCMake/CTestCommandLine/test.cmake.in index b82968a..11bede7 100644 --- a/Tests/RunCMake/CTestCommandLine/test.cmake.in +++ b/Tests/RunCMake/CTestCommandLine/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in b/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in index e9592f6..cfcf56d 100644 --- a/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in +++ b/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(TimeoutAfterMatch NONE) include(CTest) add_test(NAME SleepFor1Second COMMAND "${CMAKE_COMMAND}" -P ${CMAKE_SOURCE_DIR}/SleepFor1Second.cmake) diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in b/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in index d049c9f..172d2c6 100644 --- a/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in +++ b/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/CacheNewline/CacheNewline.cmake b/Tests/RunCMake/CacheNewline/CacheNewline.cmake index 81851db..418a847 100644 --- a/Tests/RunCMake/CacheNewline/CacheNewline.cmake +++ b/Tests/RunCMake/CacheNewline/CacheNewline.cmake @@ -1,5 +1 @@ -cmake_minimum_required(VERSION 3.5) - -project(CacheNewlineTest NONE) - set(NEWLINE_VARIABLE "a\nb" CACHE STRING "Offending entry") diff --git a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt index 4a13d29..9f18d8d 100644 --- a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt +++ b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt @@ -1,7 +1,5 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.9) project(${RunCMake_TEST} NONE) -cmake_policy(SET CMP0069 NEW) - include(CheckIPOSupported) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt index 842c5cf..93ee9df 100644 --- a/Tests/RunCMake/CheckModules/CMakeLists.txt +++ b/Tests/RunCMake/CheckModules/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) -cmake_policy(SET CMP0054 NEW) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CommandLine/CMakeLists.txt b/Tests/RunCMake/CommandLine/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/CommandLine/CMakeLists.txt +++ b/Tests/RunCMake/CommandLine/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake index e69de29..e69de29 100644 --- a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt +++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt new file mode 100644 index 0000000..c3329a0 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt @@ -0,0 +1,5 @@ +^CMake Warning: + The "Visual Studio 9 2008" generator is deprecated and will be removed in a + future version of CMake. + + Add CMAKE_WARN_VS9=OFF to the cache to disable this warning.$ diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake diff --git a/Tests/RunCMake/CommandLine/E_time-stdout.txt b/Tests/RunCMake/CommandLine/E_time-stdout.txt index a51446a..1a5e134 100644 --- a/Tests/RunCMake/CommandLine/E_time-stdout.txt +++ b/Tests/RunCMake/CommandLine/E_time-stdout.txt @@ -1,3 +1,3 @@ ^hello world -Elapsed time: [^ +Elapsed time \(seconds\): [^ ]*$ diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 943be24..205949b 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) include(RunCMake) @@ -1101,6 +1101,13 @@ set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${P run_cmake(ProfilingTest) unset(RunCMake_TEST_OPTIONS) +if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 2008") + run_cmake_with_options(DeprecateVS9-WARN-ON -DCMAKE_WARN_VS9=ON) + unset(ENV{CMAKE_WARN_VS9}) + run_cmake(DeprecateVS9-WARN-ON) + run_cmake_with_options(DeprecateVS9-WARN-OFF -DCMAKE_WARN_VS9=OFF) +endif() + if(RunCMake_GENERATOR MATCHES "^Visual Studio 11 2012") run_cmake_with_options(DeprecateVS11-WARN-ON -DCMAKE_WARN_VS11=ON) unset(ENV{CMAKE_WARN_VS11}) diff --git a/Tests/RunCMake/CommandLine/trace-expand-stderr.txt b/Tests/RunCMake/CommandLine/trace-expand-stderr.txt index 4fee9bc..b900686 100644 --- a/Tests/RunCMake/CommandLine/trace-expand-stderr.txt +++ b/Tests/RunCMake/CommandLine/trace-expand-stderr.txt @@ -1,2 +1,2 @@ -^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \) +^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \) .*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(trace-expand NONE \) diff --git a/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt index 74429b6..88aad00 100644 --- a/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt +++ b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt @@ -1,2 +1,2 @@ -^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \) +^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \) .*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(trace-expand-warn-uninitialized NONE \) diff --git a/Tests/RunCMake/CommandLine/trace-stderr.txt b/Tests/RunCMake/CommandLine/trace-stderr.txt index 8e8ddfa..4bf3cff 100644 --- a/Tests/RunCMake/CommandLine/trace-stderr.txt +++ b/Tests/RunCMake/CommandLine/trace-stderr.txt @@ -1,2 +1,2 @@ -^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \) +^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \) .*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(\${RunCMake_TEST} NONE \) diff --git a/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake b/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake index 982cb89..4107aa4 100644 --- a/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake +++ b/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake @@ -1,2 +1,2 @@ -cmake_minimum_required(VERSION 3.24) -project(test C) +cmake_policy(VERSION 3.24) +enable_language(C) diff --git a/Tests/RunCMake/CommandLine/trace-try_compile.cmake b/Tests/RunCMake/CommandLine/trace-try_compile.cmake index 982cb89..4107aa4 100644 --- a/Tests/RunCMake/CommandLine/trace-try_compile.cmake +++ b/Tests/RunCMake/CommandLine/trace-try_compile.cmake @@ -1,2 +1,2 @@ -cmake_minimum_required(VERSION 3.24) -project(test C) +cmake_policy(VERSION 3.24) +enable_language(C) diff --git a/Tests/RunCMake/CommandLineTar/CMakeLists.txt b/Tests/RunCMake/CommandLineTar/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/CommandLineTar/CMakeLists.txt +++ b/Tests/RunCMake/CommandLineTar/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt index ebab7a3..12a7fd4 100644 --- a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt +++ b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake index 64b52d9..60a4246 100644 --- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake +++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake @@ -1,7 +1,4 @@ - -cmake_minimum_required(VERSION 3.3) - -project(CompatibleInterface) +enable_language(CXX) include(GenerateExportHeader) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/Tests/RunCMake/CompileDefinitions/CMakeLists.txt b/Tests/RunCMake/CompileDefinitions/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/CompileDefinitions/CMakeLists.txt +++ b/Tests/RunCMake/CompileDefinitions/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompileFeatures/CMakeLists.txt b/Tests/RunCMake/CompileFeatures/CMakeLists.txt index 3482e6b..12a7fd4 100644 --- a/Tests/RunCMake/CompileFeatures/CMakeLists.txt +++ b/Tests/RunCMake/CompileFeatures/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompilerArgs/CMakeLists.txt b/Tests/RunCMake/CompilerArgs/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/CompilerArgs/CMakeLists.txt +++ b/Tests/RunCMake/CompilerArgs/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompilerChange/CMakeLists.txt b/Tests/RunCMake/CompilerChange/CMakeLists.txt index 14c47ad..b41f3f3 100644 --- a/Tests/RunCMake/CompilerChange/CMakeLists.txt +++ b/Tests/RunCMake/CompilerChange/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) if(NOT RunCMake_TEST) set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted endif() diff --git a/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt index 3313e31..544b65f 100644 --- a/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.* diff --git a/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt index 3313e31..544b65f 100644 --- a/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.* diff --git a/Tests/RunCMake/CompilerLauncher/CMakeLists.txt b/Tests/RunCMake/CompilerLauncher/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/CompilerLauncher/CMakeLists.txt +++ b/Tests/RunCMake/CompilerLauncher/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt index 3313e31..a6e8b0a 100644 --- a/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CUDA.* diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt index 3313e31..a6e8b0a 100644 --- a/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CUDA.* diff --git a/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt index 3313e31..082c7b5 100644 --- a/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.* diff --git a/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt index 3313e31..082c7b5 100644 --- a/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.* diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt index 3313e31..9f8c754 100644 --- a/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=Fortran.* diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt index 3313e31..9f8c754 100644 --- a/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=Fortran.* diff --git a/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt index 3313e31..354e317 100644 --- a/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=HIP.* diff --git a/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt deleted file mode 100644 index 3313e31..0000000 --- a/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt new file mode 100644 index 0000000..354e317 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=HIP.* diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt index 3313e31..6b71839 100644 --- a/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=ISPC.* diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt index 3313e31..6b71839 100644 --- a/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=ISPC.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt index 3313e31..d2efd3d 100644 --- a/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt deleted file mode 100644 index 3313e31..0000000 --- a/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt new file mode 100644 index 0000000..d2efd3d --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt index 3313e31..0082ab2 100644 --- a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt deleted file mode 100644 index 3313e31..0000000 --- a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt new file mode 100644 index 0000000..0082ab2 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.* diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake index e6a2605..b051a19 100644 --- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake @@ -18,7 +18,7 @@ endfunction() function(run_compiler_launcher_env lang) string(REGEX REPLACE "-.*" "" core_lang "${lang}") # Use the noop genexp $<PATH:...> genexp to validate genexp support. - set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1") + set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1;TARGET_NAME=$<TARGET_PROPERTY:NAME>;LANGUAGE=$<COMPILE_LANGUAGE>") run_compiler_launcher(${lang}) unset(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER}) endfunction() diff --git a/Tests/RunCMake/Configure/CMakeLists.txt b/Tests/RunCMake/Configure/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/Configure/CMakeLists.txt +++ b/Tests/RunCMake/Configure/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt b/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt index 2d75985..12a7fd4 100644 --- a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt +++ b/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake index 208ea20..f3974ea 100644 --- a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake +++ b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) foreach(p CMP0029 diff --git a/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt +++ b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ExternalData/CMakeLists.txt b/Tests/RunCMake/ExternalData/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/ExternalData/CMakeLists.txt +++ b/Tests/RunCMake/ExternalData/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies-stderr.txt new file mode 100644 index 0000000..650be64 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies-stderr.txt @@ -0,0 +1,10 @@ +^(CMake Deprecation Warning at Add_StepDependencies.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0114 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\))?$ diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake index 364bf9e..02c7c8e 100644 --- a/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake +++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION ${CMAKE_VERSION}) +cmake_policy(VERSION ${CMAKE_VERSION}) if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12) cmake_policy(SET CMP0114 NEW) else() diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target-stderr.txt new file mode 100644 index 0000000..c142541 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target-stderr.txt @@ -0,0 +1,10 @@ +^(CMake Deprecation Warning at Add_StepDependencies_no_target.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0114 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\))?$ diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake index da823cd..31b7baf 100644 --- a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake +++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION ${CMAKE_VERSION}) +cmake_policy(VERSION ${CMAKE_VERSION}) if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12) cmake_policy(SET CMP0114 NEW) else() diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt index 2b0feb6..2428b8c 100644 --- a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt +++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-OLD-stderr.txt @@ -1,4 +1,15 @@ -^CMake Warning \(dev\) at [^ +^CMake Deprecation Warning at NO_DEPENDS-CMP0114-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0114 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Warning \(dev\) at [^ ]*/Modules/ExternalProject.cmake:[0-9]+ \(message\): Using NO_DEPENDS for "configure" step might break parallel builds Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-stderr.txt b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-stderr.txt new file mode 100644 index 0000000..6dd7cb0 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/Steps-CMP0114-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at Steps-CMP0114-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0114 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake b/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake index 2946c0b..351d70f 100644 --- a/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake +++ b/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.3) - # If we are using the Ninja generator, we can check and verify that the # USES_TERMINAL option actually works by examining the Ninja build file. # This is the only way, since CMake doesn't offer a way to examine the diff --git a/Tests/RunCMake/ExtraGenerators/CMakeLists.txt b/Tests/RunCMake/ExtraGenerators/CMakeLists.txt new file mode 100644 index 0000000..93ee9df --- /dev/null +++ b/Tests/RunCMake/ExtraGenerators/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.5) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake b/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake new file mode 100644 index 0000000..fbef79c --- /dev/null +++ b/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake @@ -0,0 +1,19 @@ +include(RunCMake) + +foreach( + extraGenerator + IN ITEMS + "CodeBlocks" + "CodeLite" + "Eclipse CDT4" + "Kate" + "Sublime Text 2" + ) + block() + set(RunCMake_GENERATOR "${extraGenerator} - ${RunCMake_GENERATOR}") + set(RunCMake_TEST_VARIANT_DESCRIPTION ": ${RunCMake_GENERATOR}") + string(REPLACE " " "" extraGeneratorNoSpaces "${extraGenerator}") + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Simple-${extraGeneratorNoSpaces}) + run_cmake(Simple) + endblock() +endforeach() diff --git a/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt b/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt new file mode 100644 index 0000000..e327a9f --- /dev/null +++ b/Tests/RunCMake/ExtraGenerators/Simple-stderr.txt @@ -0,0 +1,8 @@ +^CMake Deprecation Warning: + Support for "Extra Generators" like + + [^ +]+ + + is deprecated and will be removed from a future version of CMake\. IDEs may + use the cmake-file-api\(7\) to view CMake-generated project build trees\. diff --git a/Tests/RunCMake/ExtraGenerators/Simple.cmake b/Tests/RunCMake/ExtraGenerators/Simple.cmake new file mode 100644 index 0000000..d077046 --- /dev/null +++ b/Tests/RunCMake/ExtraGenerators/Simple.cmake @@ -0,0 +1,4 @@ +enable_language(C) +enable_language(CXX) + +add_subdirectory(../../Simple Simple) diff --git a/Tests/RunCMake/FPHSA/CMakeLists.txt b/Tests/RunCMake/FPHSA/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/FPHSA/CMakeLists.txt +++ b/Tests/RunCMake/FPHSA/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FeatureSummary/CMakeLists.txt b/Tests/RunCMake/FeatureSummary/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/FeatureSummary/CMakeLists.txt +++ b/Tests/RunCMake/FeatureSummary/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FetchContent/IgnoreToolchainFile.cmake b/Tests/RunCMake/FetchContent/IgnoreToolchainFile.cmake new file mode 100644 index 0000000..f8ee749 --- /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 bb27491..3781089 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/File_Archive/CMakeLists.txt b/Tests/RunCMake/File_Archive/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/File_Archive/CMakeLists.txt +++ b/Tests/RunCMake/File_Archive/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/File_Generate/CMakeLists.txt b/Tests/RunCMake/File_Generate/CMakeLists.txt index 3178de5..eec672f 100644 --- a/Tests/RunCMake/File_Generate/CMakeLists.txt +++ b/Tests/RunCMake/File_Generate/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) if(NOT TEST_FILE) set(TEST_FILE ${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt index 2c385c4..b47a137 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 d2b3e0c..16d5563 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 fcb53a7..39735d7 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 48eae1e..4f566b0 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 e0585ee..b20f824 100644 --- a/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake +++ b/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.7) -project(testFindGTK2 C) +enable_language(C) # First call find_package(GTK2 REQUIRED) diff --git a/Tests/RunCMake/FindLua/CMakeLists.txt b/Tests/RunCMake/FindLua/CMakeLists.txt index a2c4d98..e6c41a5 100644 --- a/Tests/RunCMake/FindLua/CMakeLists.txt +++ b/Tests/RunCMake/FindLua/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} C) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindMatlab/CMakeLists.txt b/Tests/RunCMake/FindMatlab/CMakeLists.txt index 1b9a957..93ee9df 100644 --- a/Tests/RunCMake/FindMatlab/CMakeLists.txt +++ b/Tests/RunCMake/FindMatlab/CMakeLists.txt @@ -1,3 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) +project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindMatlab/MatlabTest1.cmake b/Tests/RunCMake/FindMatlab/MatlabTest1.cmake index b4cc741..8eaf903 100644 --- a/Tests/RunCMake/FindMatlab/MatlabTest1.cmake +++ b/Tests/RunCMake/FindMatlab/MatlabTest1.cmake @@ -1,7 +1,6 @@ - -cmake_minimum_required (VERSION 2.8.12) +enable_language(C) +enable_language(CXX) enable_testing() -project(test_should_fail) if(NOT "${matlab_root}" STREQUAL "") set(Matlab_ROOT_DIR ${matlab_root}) diff --git a/Tests/RunCMake/FindMatlab/MatlabTest2.cmake b/Tests/RunCMake/FindMatlab/MatlabTest2.cmake index 4295d3c..95b1c22 100644 --- a/Tests/RunCMake/FindMatlab/MatlabTest2.cmake +++ b/Tests/RunCMake/FindMatlab/MatlabTest2.cmake @@ -1,6 +1,6 @@ -cmake_minimum_required (VERSION 2.8.12) +enable_language(C) +enable_language(CXX) enable_testing() -project(findmatlab_runcmake_test2) if(NOT DEFINED matlab_required) set(matlab_required REQUIRED) diff --git a/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake b/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake index deebf89..45dc799 100644 --- a/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake +++ b/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake @@ -1,7 +1,5 @@ - include(RunCMake) - if(NOT "${MCR_ROOT}" STREQUAL "") if(NOT EXISTS "${MCR_ROOT}") message(FATAL_ERROR "MCR does not exist ${MCR_ROOT}") diff --git a/Tests/RunCMake/FindOpenSSL/version-exact.cmake b/Tests/RunCMake/FindOpenSSL/version-exact.cmake index 29c2ce3..11826cf 100644 --- a/Tests/RunCMake/FindOpenSSL/version-exact.cmake +++ b/Tests/RunCMake/FindOpenSSL/version-exact.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.19...3.20) - find_package (OpenSSL REQUIRED COMPONENTS Crypto) # Store version without a possibly trailing letter. string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}") diff --git a/Tests/RunCMake/FindOpenSSL/version-range.cmake b/Tests/RunCMake/FindOpenSSL/version-range.cmake index 9390032..f9689b6 100644 --- a/Tests/RunCMake/FindOpenSSL/version-range.cmake +++ b/Tests/RunCMake/FindOpenSSL/version-range.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.19...3.20) - find_package (OpenSSL REQUIRED COMPONENTS Crypto) # Store version without a possibly trailing letter. string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}") diff --git a/Tests/RunCMake/FindOpenSSL/version.cmake b/Tests/RunCMake/FindOpenSSL/version.cmake index d06cd1f..3d151ab 100644 --- a/Tests/RunCMake/FindOpenSSL/version.cmake +++ b/Tests/RunCMake/FindOpenSSL/version.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.19...3.20) - find_package (OpenSSL REQUIRED COMPONENTS Crypto) # Store version without a possibly trailing letter. string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}") diff --git a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt +++ b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake index 69ab4da..457747f 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.12) - -project(FindPkgConfig_IMPORTED_TARGET C) +enable_language(C) find_package(PkgConfig REQUIRED) pkg_check_modules(NCURSES IMPORTED_TARGET QUIET ncurses) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake index f7a9815..95a2e32 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.12) - -project(FindPkgConfig_IMPORTED_TARGET C) +enable_language(C) find_package(PkgConfig REQUIRED) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake index d0046ca..15baa0d 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.3) - find_package(PkgConfig REQUIRED) pkg_check_modules(NCURSES QUIET ncurses) diff --git a/Tests/RunCMake/FindSWIG/version-exact.cmake b/Tests/RunCMake/FindSWIG/version-exact.cmake index ec3651f..98903ff 100644 --- a/Tests/RunCMake/FindSWIG/version-exact.cmake +++ b/Tests/RunCMake/FindSWIG/version-exact.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.18...3.19) - find_package (SWIG) if (NOT SWIG_FOUND) message (FATAL_ERROR "Failed to find SWIG") diff --git a/Tests/RunCMake/FindSWIG/version-range.cmake b/Tests/RunCMake/FindSWIG/version-range.cmake index 7ba1134..e776961 100644 --- a/Tests/RunCMake/FindSWIG/version-range.cmake +++ b/Tests/RunCMake/FindSWIG/version-range.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.18...3.19) - find_package (SWIG) if (NOT SWIG_FOUND) message (FATAL_ERROR "Failed to find SWIG") diff --git a/Tests/RunCMake/FindSWIG/version.cmake b/Tests/RunCMake/FindSWIG/version.cmake index a4f1c39..b5ed6a7 100644 --- a/Tests/RunCMake/FindSWIG/version.cmake +++ b/Tests/RunCMake/FindSWIG/version.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.18...3.19) - find_package (SWIG 1.0) if (NOT SWIG_FOUND) message (FATAL_ERROR "Failed to find SWIG with version 1.0") diff --git a/Tests/RunCMake/Framework/CMakeLists.txt b/Tests/RunCMake/Framework/CMakeLists.txt index 6dd8cdf..93ee9df 100644 --- a/Tests/RunCMake/Framework/CMakeLists.txt +++ b/Tests/RunCMake/Framework/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Framework/FrameworkConsumption.cmake b/Tests/RunCMake/Framework/FrameworkConsumption.cmake index 58b70a3..2180cf9 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 84012aa..d09e8a0 100644 --- a/Tests/RunCMake/Framework/FrameworkLayout.cmake +++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.4) enable_language(C) set(CMAKE_CONFIGURATION_TYPES "Debug" CACHE INTERNAL "Supported configuration types") diff --git a/Tests/RunCMake/Framework/consumer.c b/Tests/RunCMake/Framework/consumer.c new file mode 100644 index 0000000..a578976 --- /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 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt +++ b/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenEx-PATH/ABSOLUTE_PATH.cmake.in b/Tests/RunCMake/GenEx-PATH/ABSOLUTE_PATH.cmake.in index cc5ff54..d1cb61b 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 ab967a2..1955480 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 41205fa..29ebf16 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 f9748e9..5161b99 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 b58998c..e2acde4 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 e6cc4a3..81e4c0d 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 11d73ad..7670f4f 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 cce4143..a365efe 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 5bb04c3..2d02152 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 4b3de84..93ee9df 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt +++ b/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake index 7eec527..187e7d6 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (GENERATE_CONTENT [[ diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake index 1963244..d550431 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (GENERATE_CONTENT [[ diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake index cc9cd5a..01926fe 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (win_platforms Windows CYGWIN MSYS) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake index edfb40c..a9a76bf 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (win_platforms Windows CYGWIN MSYS) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake index 3ee42a5..ddf3887 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (win_platforms Windows CYGWIN MSYS) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake index 1fe75d9..9c5d932 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (win_platforms Windows CYGWIN MSYS) diff --git a/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_IMPORT_FILE/CMakeLists.txt new file mode 100644 index 0000000..93ee9df --- /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 0000000..04ff640 --- /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 0000000..9a101fc --- /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 0000000..08765a6 --- /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 0000000..2a1357a --- /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 0000000..933471b --- /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 0000000..d00491f --- /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 0000000..8ba2223 --- /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 0000000..3f060cd --- /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 0000000..d00491f --- /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 0000000..06e7b3a --- /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 0000000..bb95546 --- /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 0000000..ab4443e --- /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 0000000..d00491f --- /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 0000000..0640088 --- /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 0000000..cc79580 --- /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 0000000..02ba513 --- /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 0000000..e69de29 --- /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 212c034..eed194b 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.17) - add_library(lib-global SHARED IMPORTED GLOBAL) add_library(alias-lib-global ALIAS lib-global) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt index 26a73f9..32d92d8 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.10) if(RunCMake_TEST STREQUAL "LOCATION") cmake_minimum_required(VERSION 2.8.12) # Leave CMP0026 unset. endif() diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake index e9855be..0f0c399 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.14) enable_language(C) add_library(foo1 STATIC empty.c) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt index a4c8dcd..fab2ce2 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt @@ -1,3 +1,10 @@ +^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0026 is not set: Disallow use of the LOCATION target property. Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/check.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/check.cmake deleted file mode 100644 index e19598e..0000000 --- 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 0000000..6b05b4e --- /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 806f0b6..c38fa39 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 bf9c302..3e35aa3 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 0000000..dac4fda --- /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 0000000..b6e2a4a --- /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 dac4fda..3ba2d2e 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 b6e2a4a..3c7e093 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 dac4fda..3ba2d2e 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 b6e2a4a..3c7e093 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 2d545d9..b139210 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(BadIF) run_cmake(BadCONFIG) diff --git a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt +++ b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt +++ b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt index 37747a1..d0aef2c 100644 --- a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt +++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): +^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_minimum_required\): The OLD behavior for policy CMP0052 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/IfacePaths/CMakeLists.txt b/Tests/RunCMake/IfacePaths/CMakeLists.txt index 5cd4825..0d707f0 100644 --- a/Tests/RunCMake/IfacePaths/CMakeLists.txt +++ b/Tests/RunCMake/IfacePaths/CMakeLists.txt @@ -1,4 +1,8 @@ -cmake_minimum_required(VERSION 3.0) +if(RunCMake_TEST MATCHES "-CMP0052") + cmake_minimum_required(VERSION 3.0) +else() + cmake_minimum_required(VERSION 3.5) +endif() project(${RunCMake_TEST} NONE) if(NOT TEST_FILE) set(TEST_FILE ${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt index 37747a1..4db8209 100644 --- a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt +++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): +^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): The OLD behavior for policy CMP0052 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt b/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt +++ b/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt +++ b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/InterfaceLibrary/genex_link.cmake b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake index 0dbf029..3445864 100644 --- a/Tests/RunCMake/InterfaceLibrary/genex_link.cmake +++ b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake @@ -1,7 +1,4 @@ - -cmake_minimum_required(VERSION 2.8.12.20131125 FATAL_ERROR) - -project(genex_link) +enable_language(CXX) set(_main_cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp) file(WRITE ${_main_cpp} diff --git a/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt index 38585eb..352bb68 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 575fcc6..4a8ca37 100644 --- a/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake +++ b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_policy(SET CMP0037 OLD) add_library(if$ace INTERFACE) add_library(iface::target INTERFACE) diff --git a/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake index ed81878..eae8f57 100644 --- a/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake +++ b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake @@ -1,5 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.12.20131009) set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) add_library(foo INTERFACE) target_compile_definitions(foo INTERFACE FOO_DEFINE) diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/Languages/CMakeLists.txt +++ b/Tests/RunCMake/Languages/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt index b7a0755..55aa1bb 100644 --- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt +++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMP0028-OLD-iface.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMP0028-OLD-iface\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0028 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt index 586a876..f11d8f5 100644 --- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt +++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMP0028-OLD.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMP0028-OLD\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0028 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/LinkItemValidation/CMakeLists.txt b/Tests/RunCMake/LinkItemValidation/CMakeLists.txt index 185cd91..6e1f8a2 100644 --- a/Tests/RunCMake/LinkItemValidation/CMakeLists.txt +++ b/Tests/RunCMake/LinkItemValidation/CMakeLists.txt @@ -1,6 +1,6 @@ -cmake_minimum_required(VERSION 2.8.12) -if(NOT RunCMake_TEST MATCHES "^CMP0028") - cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.5) +if(RunCMake_TEST MATCHES "^CMP0028") + cmake_minimum_required(VERSION 2.8.12) endif() project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir diff --git a/Tests/RunCMake/LinkStatic/CMakeLists.txt b/Tests/RunCMake/LinkStatic/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/LinkStatic/CMakeLists.txt +++ b/Tests/RunCMake/LinkStatic/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt b/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt +++ b/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt index 3313e31..544b65f 100644 --- a/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt +++ b/Tests/RunCMake/LinkerLauncher/C-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.* diff --git a/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt index 3313e31..544b65f 100644 --- a/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/LinkerLauncher/C-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.* diff --git a/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt index 3313e31..082c7b5 100644 --- a/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt +++ b/Tests/RunCMake/LinkerLauncher/CXX-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.* diff --git a/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt index 3313e31..082c7b5 100644 --- a/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/LinkerLauncher/CXX-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.* diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt index 3313e31..d2efd3d 100644 --- a/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt +++ b/Tests/RunCMake/LinkerLauncher/OBJC-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.* diff --git a/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt index 3313e31..d2efd3d 100644 --- a/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/LinkerLauncher/OBJC-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.* diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt index 3313e31..0082ab2 100644 --- a/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt +++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.* diff --git a/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt index 3313e31..0082ab2 100644 --- a/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/LinkerLauncher/OBJCXX-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.* diff --git a/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake index 8f2bf63..025f367 100644 --- a/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake +++ b/Tests/RunCMake/LinkerLauncher/RunCMakeTest.cmake @@ -17,7 +17,8 @@ endfunction() function(run_linker_launcher_env lang) string(REGEX REPLACE "-.*" "" core_lang "${lang}") - set(ENV{CMAKE_${core_lang}_LINKER_LAUNCHER} "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1") + # Use the noop genexp $<PATH:...> genexp to validate genexp support. + set(ENV{CMAKE_${core_lang}_LINKER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1;TARGET_NAME=$<TARGET_PROPERTY:NAME>;LANGUAGE=$<LINK_LANGUAGE>") run_linker_launcher(${lang}) unset(ENV{CMAKE_${core_lang}_LINKER_LAUNCHER}) endfunction() diff --git a/Tests/RunCMake/Make/CMP0113-OLD-stderr.txt b/Tests/RunCMake/Make/CMP0113-OLD-stderr.txt new file mode 100644 index 0000000..42742f7 --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0113-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0113 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/Make/CMakeLists.txt b/Tests/RunCMake/Make/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/Make/CMakeLists.txt +++ b/Tests/RunCMake/Make/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake b/Tests/RunCMake/MaxRecursionDepth/RunCMakeTest.cmake index c5a859d..fdf418f 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 0000000..b57e2de --- /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 0000000..b664fa0 --- /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 0000000..b57e2de --- /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 0000000..7dbbb3e --- /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 b8557ab..4e965e8 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 5d31e29..0119953 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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..5314551 --- /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 0000000..b47a13a --- /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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..4e965e8 --- /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 0000000..0119953 --- /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 b8557ab..4e965e8 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 5d31e29..0119953 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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..61304b1 --- /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 0000000..54e72af --- /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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..92de1fb --- /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 0000000..5c25c4b --- /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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..f55f505 --- /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 0000000..ff33985 --- /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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..0510e7c --- /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 0000000..b1494a8 --- /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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..142e068 --- /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 0000000..71de553 --- /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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..c67be57 --- /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 0000000..0b27162 --- /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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..52fedd3 --- /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 0000000..1427f1d --- /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 0000000..d00491f --- /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 0000000..d00491f --- /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 0000000..07deee2 --- /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 0000000..b2395b3 --- /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/Ninja/AssumedSources.cmake b/Tests/RunCMake/Ninja/AssumedSources.cmake index d5364f0..d68fca9 100644 --- a/Tests/RunCMake/Ninja/AssumedSources.cmake +++ b/Tests/RunCMake/Ninja/AssumedSources.cmake @@ -1,6 +1,5 @@ -cmake_minimum_required(VERSION 3.8) cmake_policy(SET CMP0118 NEW) -project(AssumedSources) +enable_language(C) set_source_files_properties( "${CMAKE_CURRENT_BINARY_DIR}/target.c" diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt index 9a606ee..6d340b0 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt @@ -1,6 +1,15 @@ -^CMake Deprecation Warning at CMP0058-OLD-by.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[0-9] \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9] \(include\) ++ +CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0058 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake index 92a3a0f..45e5aa3 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake @@ -1,3 +1,4 @@ +cmake_policy(VERSION 3.2) cmake_policy(SET CMP0058 OLD) set(byproducts BYPRODUCTS byproduct1a byproduct1b) include(CMP0058-common.cmake) diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt index ba6e5da..834c781 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt @@ -1,6 +1,15 @@ -^CMake Deprecation Warning at CMP0058-OLD-no.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[0-9] \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9] \(include\) ++ +CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0058 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake index 0326e07..388e018 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake @@ -1,2 +1,3 @@ +cmake_policy(VERSION 3.2) cmake_policy(SET CMP0058 OLD) include(CMP0058-common.cmake) diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt new file mode 100644 index 0000000..2927f52 --- /dev/null +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt @@ -0,0 +1,8 @@ +^CMake Deprecation Warning at CMP0058-WARN-by\.cmake:[0-9] \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9] \(include\)$ diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake index 6128167..6f5484a 100644 --- a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake @@ -1,2 +1,3 @@ +cmake_policy(VERSION 3.2) set(byproducts BYPRODUCTS byproduct1a byproduct1b) include(CMP0058-common.cmake) diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt index 439a2d9..1ffb416 100644 --- a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt @@ -1,4 +1,13 @@ -^CMake Warning \(dev\): +^CMake Deprecation Warning at CMP0058-WARN-no\.cmake:[0-9] \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9] \(include\) ++ +CMake Warning \(dev\): Policy CMP0058 is not set: Ninja requires custom command byproducts to be explicit. Run "cmake --help-policy CMP0058" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake index 7bc66ef..714ae64 100644 --- a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake @@ -1 +1,2 @@ +cmake_policy(VERSION 3.2) include(CMP0058-common.cmake) diff --git a/Tests/RunCMake/Ninja/CMakeLists.txt b/Tests/RunCMake/Ninja/CMakeLists.txt index 2a0591e..8eb5748 100644 --- a/Tests/RunCMake/Ninja/CMakeLists.txt +++ b/Tests/RunCMake/Ninja/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/Ninja/CommandConcat.cmake b/Tests/RunCMake/Ninja/CommandConcat.cmake index 790cf9d..7d6faf5 100644 --- a/Tests/RunCMake/Ninja/CommandConcat.cmake +++ b/Tests/RunCMake/Ninja/CommandConcat.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.7) -project(concat_cmd NONE) set(output1 ${CMAKE_BINARY_DIR}/out1.txt) set(output2 ${CMAKE_BINARY_DIR}/out2.txt) file(REMOVE ${output1} ${output2}) diff --git a/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake b/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake new file mode 100644 index 0000000..fefd86a --- /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 8e01c8c..e04ac21 100644 --- a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake +++ b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.5) -project(hello NONE) - add_custom_command( OUTPUT hello.copy.c COMMAND "${CMAKE_COMMAND}" -E copy diff --git a/Tests/RunCMake/Ninja/Executable.cmake b/Tests/RunCMake/Ninja/Executable.cmake index 4e17d68..2b6a61b 100644 --- a/Tests/RunCMake/Ninja/Executable.cmake +++ b/Tests/RunCMake/Ninja/Executable.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) add_executable(hello hello.c) include(CheckOutput.cmake) include(CheckNoPrefixSubDir.cmake) diff --git a/Tests/RunCMake/Ninja/LooseObjectDepends.cmake b/Tests/RunCMake/Ninja/LooseObjectDepends.cmake index 360c7ba..90f8249 100644 --- a/Tests/RunCMake/Ninja/LooseObjectDepends.cmake +++ b/Tests/RunCMake/Ninja/LooseObjectDepends.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.8) -project(LooseObjectDepends C) +enable_language(C) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command.h" diff --git a/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake b/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake index 505f750..9615c56 100644 --- a/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake +++ b/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.12) -project(Test LANGUAGES C) +enable_language(C) configure_file(PreventConfigureFileDupBuildRule.cmake PreventTargetAliasesDupBuildRule.cmake @ONLY) add_subdirectory(SubDirConfigureFileDup) diff --git a/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake b/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake index da6f86a..81eb731 100644 --- a/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake +++ b/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.12) -project(Test LANGUAGES C) +enable_language(C) # fake launcher executable set(input_launcher_executable ${CMAKE_CURRENT_BINARY_DIR}/fake_launcher_executable) diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 9214e90..91c48c6 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -190,6 +190,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 1a78390..c295c16 100644 --- a/Tests/RunCMake/Ninja/SharedLib.cmake +++ b/Tests/RunCMake/Ninja/SharedLib.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) add_library(greeting SHARED greeting.c) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) add_executable(hello hello_with_greeting.c) diff --git a/Tests/RunCMake/Ninja/StaticLib.cmake b/Tests/RunCMake/Ninja/StaticLib.cmake index 0f815ae..dab6742 100644 --- a/Tests/RunCMake/Ninja/StaticLib.cmake +++ b/Tests/RunCMake/Ninja/StaticLib.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) add_definitions(-DGREETING_STATIC) add_library(greeting STATIC greeting.c) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Tests/RunCMake/Ninja/SubDirPrefix.cmake b/Tests/RunCMake/Ninja/SubDirPrefix.cmake index 30ad1e6..49d075f 100644 --- a/Tests/RunCMake/Ninja/SubDirPrefix.cmake +++ b/Tests/RunCMake/Ninja/SubDirPrefix.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") add_subdirectory(SubDirPrefix) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Tests/RunCMake/Ninja/TwoLibs.cmake b/Tests/RunCMake/Ninja/TwoLibs.cmake index 666452f..10ac5a6 100644 --- a/Tests/RunCMake/Ninja/TwoLibs.cmake +++ b/Tests/RunCMake/Ninja/TwoLibs.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib-static") diff --git a/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt new file mode 100644 index 0000000..f5bce43 --- /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 0000000..c4e0587 --- /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 c040e8f..47f5eee 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 5c7882d..05eb42d 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 2897109..3e470a2 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.14) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake index 75c26a7..6027f03 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.14) -project(Minimal NONE) - # # list of targets to test. to add a target: put its files in the data # subdirectory and add it to this list... we run each target's diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt b/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt index 2897109..3e470a2 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt +++ b/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.14) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake index df4ef1f..fa7bf07 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.14) -project(Minimal NONE) - # # list of targets to test. to add a target: put its files in the data # subdirectory and add it to this list... we run each target's diff --git a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake index abd27f4..da608b3 100644 --- a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake +++ b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(NotClosed) run_cmake(NotOpened) diff --git a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt index c3922d6..42b0577 100644 --- a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt +++ b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt @@ -1,5 +1,4 @@ - -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) # MSVC creates extra targets which pollute the stderr unless we set this. diff --git a/Tests/RunCMake/README.rst b/Tests/RunCMake/README.rst index ebe40cf..d8cae8b 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 54d7eb5..e1c923d 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -186,6 +186,18 @@ function(run_cmake test) "|[^\n]*Bullseye Testing Technology" ")[^\n]*\n)+" ) + if(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION) + string(REGEX REPLACE [[ +^CMake Deprecation Warning at [^ +]*CMakeLists.txt:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +]] "" actual_stderr "${actual_stderr}") + endif() foreach(o IN ITEMS stdout stderr config) string(REGEX REPLACE "\r\n" "\n" actual_${o} "${actual_${o}}") string(REGEX REPLACE "${ignore_line_regex}" "\\1" actual_${o} "${actual_${o}}") diff --git a/Tests/RunCMake/Swift/CMakeLists.txt b/Tests/RunCMake/Swift/CMakeLists.txt index 74b3ff8..77030d6 100644 --- a/Tests/RunCMake/Swift/CMakeLists.txt +++ b/Tests/RunCMake/Swift/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.15) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt b/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt index 874bdc7..16d2e21 100644 --- a/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt +++ b/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt @@ -1,4 +1,4 @@ -^CMake Error at SwiftMultiArch.cmake:3 \(project\): +^CMake Error at SwiftMultiArch.cmake:2 \(enable_language\): multiple values for CMAKE_OSX_ARCHITECTURES not supported with Swift Call Stack \(most recent call first\): CMakeLists.txt:3 diff --git a/Tests/RunCMake/Swift/SwiftMultiArch.cmake b/Tests/RunCMake/Swift/SwiftMultiArch.cmake index 5fdb688..b59bb62 100644 --- a/Tests/RunCMake/Swift/SwiftMultiArch.cmake +++ b/Tests/RunCMake/Swift/SwiftMultiArch.cmake @@ -1,4 +1,2 @@ -cmake_minimum_required(VERSION 3.15.1) set(CMAKE_OSX_ARCHITECTURES "armv7;arm64;i386;x86_64") -project(SwiftMultiArch - LANGUAGES Swift) +enable_language(Swift) diff --git a/Tests/RunCMake/SymlinkTrees/CMakeLists.txt b/Tests/RunCMake/SymlinkTrees/CMakeLists.txt index e16faea..919a168 100644 --- a/Tests/RunCMake/SymlinkTrees/CMakeLists.txt +++ b/Tests/RunCMake/SymlinkTrees/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) message(STATUS "source: '${CMAKE_SOURCE_DIR}'") diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index f0c287c..f56ac64 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(BOM-UTF-8) run_cmake(BOM-UTF-16-LE) diff --git a/Tests/RunCMake/Syntax/String1-stderr.txt b/Tests/RunCMake/Syntax/String1-stderr.txt index 07e98da..382ea00 100644 --- a/Tests/RunCMake/Syntax/String1-stderr.txt +++ b/Tests/RunCMake/Syntax/String1-stderr.txt @@ -1,3 +1,3 @@ -^ +^' 1 \${var} 4 - $ + '$ diff --git a/Tests/RunCMake/Syntax/String1.cmake b/Tests/RunCMake/Syntax/String1.cmake index a94c9ff..20ed3c1 100644 --- a/Tests/RunCMake/Syntax/String1.cmake +++ b/Tests/RunCMake/Syntax/String1.cmake @@ -1,3 +1,3 @@ -message(" +message("' 1 \${var} 4 - ") + '") diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt index b309c3b..c7238df 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt +++ b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt @@ -1,7 +1,7 @@ -CMake Error at UnterminatedBrace0.cmake:2 \(set\): +CMake Error at UnterminatedBrace0.cmake:1 \(set\): Syntax error in cmake code at - .*/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake:2 + .*/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake:1 when parsing string diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake index 0da1290..09af0ce 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake +++ b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake @@ -1,2 +1 @@ -cmake_minimum_required(VERSION 3.0) set(var "${") diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt index ffe0e2a..3d88f36 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt +++ b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt @@ -1,7 +1,7 @@ -CMake Warning \(dev\) at UnterminatedBrace1.cmake:3 \(set\): +CMake Warning \(dev\) at UnterminatedBrace1.cmake:2 \(set\): Syntax error in cmake code at - .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:3 + .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:2 when parsing string diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake index 93fba34..8b40b19 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake +++ b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake @@ -1,3 +1,2 @@ -cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0010 OLD) set(var "${") diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt index b332d34..0d76251 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt +++ b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt @@ -1,7 +1,7 @@ -CMake Error at UnterminatedBrace2.cmake:4 \(set\): +CMake Error at UnterminatedBrace2.cmake:3 \(set\): Syntax error in cmake code at - .*/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake:4 + .*/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake:3 when parsing string diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake index a650e5b..30d4d4d 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake +++ b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0010 OLD) cmake_policy(SET CMP0053 NEW) set(var "${") diff --git a/Tests/RunCMake/ArtifactOutputDirs/CMakeLists.txt b/Tests/RunCMake/TargetArtifacts/CMakeLists.txt index ab1a20c..ab1a20c 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 0000000..b375da6 --- /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 0000000..82eca0b --- /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 d0accd7..d0accd7 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 1bf8438..de69936 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 ca37eba..ca37eba 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 0000000..31e1dbf --- /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 22373f1..22373f1 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 8488f4e..8488f4e 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 44b5d30..26f536b 100644 --- a/Tests/RunCMake/TargetProperties/CMakeLists.txt +++ b/Tests/RunCMake/TargetProperties/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST}) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/VS10Project/CustomCommandParallel-check.cmake b/Tests/RunCMake/VS10Project/CustomCommandParallel-check.cmake new file mode 100644 index 0000000..87e2f70 --- /dev/null +++ b/Tests/RunCMake/VS10Project/CustomCommandParallel-check.cmake @@ -0,0 +1,40 @@ +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_BuildInParallel_cmp0147_new 0) +set(found_BuildInParallel_cmp0147_old 0) +set(in_CustomBuild_cmp0147 "") +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>]]) + set(in_CustomBuild_cmp0147 "") + endif() + if(line MATCHES [[<BuildInParallel .*>true</BuildInParallel>]] AND in_CustomBuild_cmp0147) + set(found_BuildInParallel_cmp0147_${in_CustomBuild_cmp0147} 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_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() diff --git a/Tests/RunCMake/VS10Project/CustomCommandParallel.cmake b/Tests/RunCMake/VS10Project/CustomCommandParallel.cmake new file mode 100644 index 0000000..784fc68 --- /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 ed74896..669049a 100644 --- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake +++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake @@ -8,6 +8,9 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREA endif() 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 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/VSSolution/CMakeLists.txt +++ b/Tests/RunCMake/VSSolution/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake index 7a000ee..133dbe1 100644 --- a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake +++ b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(PropertyTypo) run_cmake(CMP0063-OLD) diff --git a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake index bd914f8..623ef2a 100644 --- a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake +++ b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake @@ -1,7 +1,5 @@ -cmake_minimum_required(VERSION 3.22) - # a simple CSharp only test case -project (DotNetSdk CSharp) +enable_language(CSharp) set(CMAKE_DOTNET_TARGET_FRAMEWORK net472) set(CMAKE_DOTNET_SDK "Microsoft.NET.Sdk") diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt index 872338d..1d0bd70 100644 --- a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake index 1f3c19d..68372a1 100644 --- a/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake +++ b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.23) - -project(BundleLinkBundle CXX) +enable_language(CXX) add_subdirectory(lib_bundle) diff --git a/Tests/RunCMake/XcodeProject/CMakeLists.txt b/Tests/RunCMake/XcodeProject/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/XcodeProject/CMakeLists.txt +++ b/Tests/RunCMake/XcodeProject/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake index 3d8fa17..234ceef 100644 --- a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake +++ b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.10) -project(DeploymentTarget C) +enable_language(C) # using Xcode 7.1 SDK versions for deployment targets diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake index a9ea717..b42e933 100644 --- a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake +++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake @@ -45,7 +45,6 @@ endforeach() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/CMakeLists.txt [[ -cmake_minimum_required(VERSION 3.18) project(ExternalFrameworks) add_library(staticFrameworkExt STATIC func6.c) add_library(sharedFrameworkExt SHARED func7.c) diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake index e72bf4d..ab64db7 100644 --- a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake +++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.18...3.19) macro(returnOnError errorMsg) if(NOT "${errorMsg}" STREQUAL "") diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake index bc14874..a9fafd2 100644 --- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake @@ -1,6 +1,5 @@ # check if Xcode and CMake have the same understanding of Bundle layout -cmake_minimum_required(VERSION 3.3) enable_language(C) if(CMAKE_SYSTEM_NAME STREQUAL "iOS") diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake index 8426148..f8eccc7 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.3) - -project(IOSInstallCombined CXX) +enable_language(CXX) set(maybe_armv7 armv7) set(maybe_i386 i386) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake index 7d14d19..e719428 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.3) - -project(XcodeIOSInstallCombinedPrune CXX) +enable_language(CXX) if(XCODE_VERSION VERSION_GREATER_EQUAL 9) set(CMAKE_OSX_DEPLOYMENT_TARGET 10) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake index 5177ec2..cb22e51 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.3) - -project(XcodeIOSInstallCombinedSingleArch CXX) +enable_language(CXX) set(iphoneos_arch armv7) if(XCODE_VERSION VERSION_GREATER_EQUAL 14) diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake index 75da7b1..fccd4c6 100644 --- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.3) - -project(XcodeInstallIOS) +enable_language(CXX) set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") diff --git a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake index a1064f4..b334b7d 100644 --- a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.3) enable_language(CXX) set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME ON) diff --git a/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake b/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake index 4840276..8f54046 100644 --- a/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.15) -project(objctest LANGUAGES C OBJC) +enable_language(C) +enable_language(OBJC) include(CheckOBJCCompilerFlag) check_objc_compiler_flag(-fobjc-arc HAVE_OBJC_ARC) diff --git a/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake b/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake index 0ad942f..193860c 100644 --- a/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.15) -project(objcxxtest LANGUAGES CXX OBJCXX) +enable_language(CXX) +enable_language(OBJCXX) include(CheckOBJCXXCompilerFlag) check_objcxx_compiler_flag(-fobjc-arc HAVE_OBJC_ARC) diff --git a/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake b/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake index 3ca24af..5e66e82 100644 --- a/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake @@ -1,5 +1 @@ -cmake_minimum_required (VERSION 3.19) - -project (test_xcode_fail NONE) - add_subdirectory(subproject_two_object_libs) diff --git a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake index 44052f0..80107cb 100644 --- a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required (VERSION 3.14) if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]") set(USE_SWIFT 1) diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake index 2fe5a9f..ff3419c 100644 --- a/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.7) - -project(XcodeSchemaGeneration CXX) +enable_language(CXX) add_executable(foo main.cpp) diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake index 267e379..05a8976 100644 --- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake @@ -1,9 +1,7 @@ -cmake_minimum_required(VERSION 3.7) +enable_language(CXX) set(CMAKE_XCODE_GENERATE_SCHEME ON) -project(XcodeSchemaProperty CXX) - function(create_scheme_for_variable variable) set(CMAKE_XCODE_SCHEME_${variable} ON) add_executable(${variable} main.cpp) diff --git a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake b/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake index e83d7f3..55dd1a7 100644 --- a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake @@ -1,2 +1 @@ -cmake_minimum_required(VERSION 3.3) find_package(ZLIB REQUIRED) diff --git a/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake b/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake index 58d2616..bd8995b 100644 --- a/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.23) - -project(XcodeXCConfig C) +enable_language(C) set(CMAKE_XCODE_XCCONFIG "$<IF:$<CONFIG:Debug>,XcodeXCConfig.global.debug.xcconfig,XcodeXCConfig.global.release.xcconfig>") diff --git a/Tests/RunCMake/add_custom_command/CMakeLists.txt b/Tests/RunCMake/add_custom_command/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/add_custom_command/CMakeLists.txt +++ b/Tests/RunCMake/add_custom_command/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake b/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake index 65b7250..d8a5d86 100644 --- a/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake +++ b/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake @@ -2,7 +2,7 @@ add_custom_target(mkdir COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURR add_custom_command( OUTPUT out.txt COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/PrintDir.cmake - WORKING_DIRECTORY ${CMAKE_CFG_INTDIR} + WORKING_DIRECTORY $<CONFIG> ) set_property(SOURCE out.txt PROPERTY SYMBOLIC 1) add_custom_target(drive ALL DEPENDS out.txt) diff --git a/Tests/RunCMake/add_custom_target/CMakeLists.txt b/Tests/RunCMake/add_custom_target/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/add_custom_target/CMakeLists.txt +++ b/Tests/RunCMake/add_custom_target/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_dependencies/CMakeLists.txt b/Tests/RunCMake/add_dependencies/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/add_dependencies/CMakeLists.txt +++ b/Tests/RunCMake/add_dependencies/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake b/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake index f0e4069..547c101 100644 --- a/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake +++ b/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.7) -project(ReadOnlyProperty C) +enable_language(C) add_library(a a.c) diff --git a/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake b/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake index 45b3974..2f883af 100644 --- a/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake +++ b/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.7) -project(RetrieveDependencies C) +enable_language(C) add_library(a a.c) diff --git a/Tests/RunCMake/add_executable/CMakeLists.txt b/Tests/RunCMake/add_executable/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/add_executable/CMakeLists.txt +++ b/Tests/RunCMake/add_executable/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_library/CMakeLists.txt b/Tests/RunCMake/add_library/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/add_library/CMakeLists.txt +++ b/Tests/RunCMake/add_library/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake b/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake index c77b43c..f7c551d 100644 --- a/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake +++ b/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake @@ -11,7 +11,7 @@ string(REPLACE "${CMAKE_END_TEMP_FILE}" "" CMAKE_C_CREATE_SHARED_LIBRARY "${CMAK add_library(example SHARED LinkOptionsLib.c) # use LAUNCH facility to dump linker command -set_property(TARGET example PROPERTY RULE_LAUNCH_LINK "\"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/dump${CMAKE_EXECUTABLE_SUFFIX}\"") +set_property(TARGET example PROPERTY RULE_LAUNCH_LINK "\"$<TARGET_FILE:dump>\"") add_dependencies (example dump) diff --git a/Tests/RunCMake/add_subdirectory/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMakeLists.txt index 47d249c..b5d7262 100644 --- a/Tests/RunCMake/add_subdirectory/CMakeLists.txt +++ b/Tests/RunCMake/add_subdirectory/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) # Have to set policy here due to policy scope if(DEFINED CMP0082_VALUE) diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-stderr.txt new file mode 100644 index 0000000..46b32d1 --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-AlphaNumeric.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-stderr.txt new file mode 100644 index 0000000..906f318 --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-BracketArgument.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-stderr.txt new file mode 100644 index 0000000..65818fa --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-EscapedSpecialChars.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-stderr.txt new file mode 100644 index 0000000..db88659 --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-FormerInvalidSpecialChars.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-stderr.txt new file mode 100644 index 0000000..42cc02a --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-stderr.txt @@ -0,0 +1,11 @@ +^CMake Deprecation Warning at CMP0110-OLD-FormerInvalidSpecialChars.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-stderr.txt new file mode 100644 index 0000000..6a39db6 --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-LeadingAndTrailingWhitespace.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-stderr.txt new file mode 100644 index 0000000..d5dcada --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-OtherSpecialChars.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Quote-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Quote-stderr.txt new file mode 100644 index 0000000..69cd304 --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-Quote-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-Quote.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-stderr.txt new file mode 100644 index 0000000..e601bfc --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-Semicolon.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Space-stderr.txt new file mode 100644 index 0000000..618d2b1 --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-Space.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-stderr.txt new file mode 100644 index 0000000..ad67c08 --- /dev/null +++ b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0110-OLD-ValidSpecialChars.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0110 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/alias_targets/CMakeLists.txt b/Tests/RunCMake/alias_targets/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/alias_targets/CMakeLists.txt +++ b/Tests/RunCMake/alias_targets/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/alias_targets/invalid-name.cmake b/Tests/RunCMake/alias_targets/invalid-name.cmake index 01983e5..e2ebbfa 100644 --- a/Tests/RunCMake/alias_targets/invalid-name.cmake +++ b/Tests/RunCMake/alias_targets/invalid-name.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_policy(SET CMP0037 OLD) enable_language(CXX) add_library(foo empty.cpp) diff --git a/Tests/RunCMake/build_command/CMakeLists.txt b/Tests/RunCMake/build_command/CMakeLists.txt index f1a83e8..1319aec 100644 --- a/Tests/RunCMake/build_command/CMakeLists.txt +++ b/Tests/RunCMake/build_command/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) if(NOT NoProject) project(${RunCMake_TEST} NONE) endif() diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt deleted file mode 100644 index 7d40dcb..0000000 --- a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt +++ /dev/null @@ -1,26 +0,0 @@ -^CMake Deprecation Warning at Before2812.cmake:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -+ -CMake Deprecation Warning at Before2812.cmake:2 \(cmake_policy\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -+ -CMake Deprecation Warning at Before2812.cmake:6 \(cmake_policy\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt new file mode 100644 index 0000000..7981235 --- /dev/null +++ b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt @@ -0,0 +1,26 @@ +^CMake Deprecation Warning at Before3_5\.cmake:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at Before3_5\.cmake:2 \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at Before3_5\.cmake:6 \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake index 220e359..220e359 100644 --- a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake +++ b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake diff --git a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt index 667561e..8eb5748 100644 --- a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt +++ b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt index 81d26d2..3eb980a 100644 --- a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt +++ b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt @@ -1,9 +1,9 @@ -^CMake Deprecation Warning at CompatBefore24.cmake:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. +^CMake Deprecation Warning at CompatBefore24\.cmake:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + diff --git a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake index 3a959bb..36c44cb 100644 --- a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake @@ -4,7 +4,7 @@ run_cmake(Before24) run_cmake(CompatBefore24) run_cmake(Future) run_cmake(PolicyBefore24) -run_cmake(Before2812) +run_cmake(Before3_5) run_cmake(Range) run_cmake(RangeBad) run_cmake(Unknown) diff --git a/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt b/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt index 6dd8cdf..93ee9df 100644 --- a/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt +++ b/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/cmake_path/call-cmake_path.cmake b/Tests/RunCMake/cmake_path/call-cmake_path.cmake index 70fd6f5..655115f 100644 --- a/Tests/RunCMake/cmake_path/call-cmake_path.cmake +++ b/Tests/RunCMake/cmake_path/call-cmake_path.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.18...3.19) - # define input variable set (path "") diff --git a/Tests/RunCMake/configure_file/CMakeLists.txt b/Tests/RunCMake/configure_file/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/configure_file/CMakeLists.txt +++ b/Tests/RunCMake/configure_file/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/continue/CMakeLists.txt b/Tests/RunCMake/continue/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/continue/CMakeLists.txt +++ b/Tests/RunCMake/continue/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt index af70ac3..f5d57e9 100644 --- a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt +++ b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt @@ -1,2 +1,9 @@ -^(Error\(s\) when building project +^CMake Deprecation Warning at [^ +]*/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD/test\.cmake:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++(Error\(s\) when building project )?ctest_build returned zero$ diff --git a/Tests/RunCMake/ctest_build/CMakeLists.txt.in b/Tests/RunCMake/ctest_build/CMakeLists.txt.in index 4a067fa..0a59940 100644 --- a/Tests/RunCMake/ctest_build/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_build/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) @CASE_CMAKELISTS_PREFIX_CODE@ project(CTestBuild@CASE_NAME@ @LANG@) include(CTest) diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake index 6f1b4b6..12525f2 100644 --- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake @@ -35,7 +35,9 @@ endif() run_ctest(BuildFailure) if (RunCMake_GENERATOR MATCHES "Makefiles") - set(CASE_TEST_PREFIX_CODE "") + set(CASE_TEST_PREFIX_CODE [[ +cmake_policy(VERSION 3.2) +]]) run_ctest(BuildFailure-CMP0061-OLD) endif() endfunction() diff --git a/Tests/RunCMake/ctest_build/test.cmake.in b/Tests/RunCMake/ctest_build/test.cmake.in index 9f7fa13..f92568f 100644 --- a/Tests/RunCMake/ctest_build/test.cmake.in +++ b/Tests/RunCMake/ctest_build/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) @CASE_TEST_PREFIX_CODE@ set(CTEST_SITE "test-site") diff --git a/Tests/RunCMake/ctest_cmake_error/test.cmake.in b/Tests/RunCMake/ctest_cmake_error/test.cmake.in index 0648e7c..711a77f 100644 --- a/Tests/RunCMake/ctest_cmake_error/test.cmake.in +++ b/Tests/RunCMake/ctest_cmake_error/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_configure/CMakeLists.txt.in b/Tests/RunCMake/ctest_configure/CMakeLists.txt.in index 2fb21d4..2860b5c 100644 --- a/Tests/RunCMake/ctest_configure/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_configure/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestConfigure@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_configure/test.cmake.in b/Tests/RunCMake/ctest_configure/test.cmake.in index 72d199a..5935809 100644 --- a/Tests/RunCMake/ctest_configure/test.cmake.in +++ b/Tests/RunCMake/ctest_configure/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in b/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in index 1babd72..da7ec1a 100644 --- a/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestCoverage@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_coverage/test.cmake.in b/Tests/RunCMake/ctest_coverage/test.cmake.in index 1788e66..f5a1223 100644 --- a/Tests/RunCMake/ctest_coverage/test.cmake.in +++ b/Tests/RunCMake/ctest_coverage/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in index 68a0fcb..1de338b 100644 --- a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(CTestTestMemcheck@CASE_NAME@ NONE) include(CTest) diff --git a/Tests/RunCMake/ctest_memcheck/test.cmake.in b/Tests/RunCMake/ctest_memcheck/test.cmake.in index eedf080..af995fc 100644 --- a/Tests/RunCMake/ctest_memcheck/test.cmake.in +++ b/Tests/RunCMake/ctest_memcheck/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_SITE "@SITE@") diff --git a/Tests/RunCMake/ctest_start/CMakeLists.txt.in b/Tests/RunCMake/ctest_start/CMakeLists.txt.in index 913239c..e497a7d 100644 --- a/Tests/RunCMake/ctest_start/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_start/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestStart@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_start/test.cmake.in b/Tests/RunCMake/ctest_start/test.cmake.in index 4063ece..82acc19 100644 --- a/Tests/RunCMake/ctest_start/test.cmake.in +++ b/Tests/RunCMake/ctest_start/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_submit/test.cmake.in b/Tests/RunCMake/ctest_submit/test.cmake.in index 35cd16a..0f4885f 100644 --- a/Tests/RunCMake/ctest_submit/test.cmake.in +++ b/Tests/RunCMake/ctest_submit/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_test/CMakeLists.txt.in b/Tests/RunCMake/ctest_test/CMakeLists.txt.in index e61b556..8eb422d 100644 --- a/Tests/RunCMake/ctest_test/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_test/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestTest@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_test/test.cmake.in b/Tests/RunCMake/ctest_test/test.cmake.in index 36b1dbd..16dde1c 100644 --- a/Tests/RunCMake/ctest_test/test.cmake.in +++ b/Tests/RunCMake/ctest_test/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) @CASE_TEST_PREFIX_CODE@ set(CTEST_SITE "test-site") diff --git a/Tests/RunCMake/ctest_update/CMakeLists.txt.in b/Tests/RunCMake/ctest_update/CMakeLists.txt.in index ecf0e54..f816fac 100644 --- a/Tests/RunCMake/ctest_update/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_update/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestTest@CASE_NAME@ NONE) include(CTest) @CASE_CMAKELISTS_SUFFIX_CODE@ diff --git a/Tests/RunCMake/ctest_update/test.cmake.in b/Tests/RunCMake/ctest_update/test.cmake.in index 01aab26..faaf9b4 100644 --- a/Tests/RunCMake/ctest_update/test.cmake.in +++ b/Tests/RunCMake/ctest_update/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) @CASE_TEST_PREFIX_CODE@ set(CTEST_SITE "test-site") diff --git a/Tests/RunCMake/ctest_upload/CMakeLists.txt.in b/Tests/RunCMake/ctest_upload/CMakeLists.txt.in index 1fab71b..21e5273 100644 --- a/Tests/RunCMake/ctest_upload/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_upload/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestUpload@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_upload/test.cmake.in b/Tests/RunCMake/ctest_upload/test.cmake.in index f13bdd1..a546d38 100644 --- a/Tests/RunCMake/ctest_upload/test.cmake.in +++ b/Tests/RunCMake/ctest_upload/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/export/CMakeLists.txt b/Tests/RunCMake/export/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/export/CMakeLists.txt +++ b/Tests/RunCMake/export/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/file/CMakeLists.txt b/Tests/RunCMake/file/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/file/CMakeLists.txt +++ b/Tests/RunCMake/file/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_dependency/CMakeLists.txt b/Tests/RunCMake/find_dependency/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/find_dependency/CMakeLists.txt +++ b/Tests/RunCMake/find_dependency/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_file/CMakeLists.txt b/Tests/RunCMake/find_file/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/find_file/CMakeLists.txt +++ b/Tests/RunCMake/find_file/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_library/CMakeLists.txt b/Tests/RunCMake/find_library/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/find_library/CMakeLists.txt +++ b/Tests/RunCMake/find_library/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_package/CMP0144-NEW-CaseInsensitive-stderr.txt b/Tests/RunCMake/find_package/CMP0144-NEW-CaseInsensitive-stderr.txt new file mode 100644 index 0000000..3ccd101 --- /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 0000000..f0853ee --- /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 0000000..3ccd101 --- /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 0000000..f0853ee --- /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 0000000..3274b82 --- /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 0000000..f1560a9 --- /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 0000000..c02a797 --- /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 0000000..f1560a9 --- /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 0000000..3540dc9 --- /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 0000000..10f6b66 --- /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 0000000..3ccd101 --- /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 0000000..10f6b66 --- /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 0000000..b828f05 --- /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 0000000..10f6b66 --- /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 0000000..58eccca --- /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 0000000..8249211 --- /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 0000000..f3e7bef --- /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 0000000..9a73f68 --- /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 0000000..36c66ec --- /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 0000000..76da752 --- /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 0000000..0162852 --- /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 0000000..b373227 --- /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 0000000..77cd1f5 --- /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 0000000..2cd9c5f --- /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 0000000..276daf2 --- /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 0000000..d00491f --- /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 0000000..1caf6c5 --- /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 0000000..0ca5b6c --- /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 0000000..61ecee5 --- /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 0000000..d5f3e91 --- /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 0000000..68a86ee --- /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/CMakeLists.txt b/Tests/RunCMake/find_package/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/find_package/CMakeLists.txt +++ b/Tests/RunCMake/find_package/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake index fa41fc1..26eb908 100644 --- a/Tests/RunCMake/find_package/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake @@ -36,6 +36,17 @@ 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(WrongVersionRange) run_cmake(EmptyVersionRange) run_cmake(VersionRangeWithEXACT) @@ -55,6 +66,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 ef2163c..93ee9df 100644 --- a/Tests/RunCMake/find_path/CMakeLists.txt +++ b/Tests/RunCMake/find_path/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_program/CMP0109-OLD-stderr.txt b/Tests/RunCMake/find_program/CMP0109-OLD-stderr.txt new file mode 100644 index 0000000..fa767b9 --- /dev/null +++ b/Tests/RunCMake/find_program/CMP0109-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0109-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0109 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/find_program/CMakeLists.txt b/Tests/RunCMake/find_program/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/find_program/CMakeLists.txt +++ b/Tests/RunCMake/find_program/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/get_filename_component/CMakeLists.txt b/Tests/RunCMake/get_filename_component/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/get_filename_component/CMakeLists.txt +++ b/Tests/RunCMake/get_filename_component/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/get_property/CMakeLists.txt b/Tests/RunCMake/get_property/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/get_property/CMakeLists.txt +++ b/Tests/RunCMake/get_property/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/if/CMakeLists.txt b/Tests/RunCMake/if/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/if/CMakeLists.txt +++ b/Tests/RunCMake/if/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/include/CMP0024-NEW-stderr.txt b/Tests/RunCMake/include/CMP0024-NEW-stderr.txt index 0fdb3ca..26ced80 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 0e03d2a..783cf78 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 9c79007..8472f41 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 783cf78..f267a5a 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 0000000..d00491f --- /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 0000000..7d9e7d8 --- /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 0000000..feedc6f --- /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 0000000..d00491f --- /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 0000000..916672b --- /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 0000000..6768d4d --- /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 0000000..654cdf7 --- /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 0000000..aaaf1dc --- /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 0000000..bce1ae8 --- /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/CMakeLists.txt b/Tests/RunCMake/include/CMakeLists.txt index 4b3de84..93ee9df 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 006c647..dab16ea 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 b61c679..1b763f2 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 6d5c02f..22bf7a1 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 5735c29..6ce934d 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 fc75549..e34e9bb 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 8fb7201..b6fdb54 100644 --- a/Tests/RunCMake/include/RunCMakeTest.cmake +++ b/Tests/RunCMake/include/RunCMakeTest.cmake @@ -7,3 +7,8 @@ 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) diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/include_directories/CMakeLists.txt +++ b/Tests/RunCMake/include_directories/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/include_external_msproject/CMakeLists.txt b/Tests/RunCMake/include_external_msproject/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/include_external_msproject/CMakeLists.txt +++ b/Tests/RunCMake/include_external_msproject/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt index de0b70f..6b4c4b0 100644 --- a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt +++ b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt @@ -1,10 +1,19 @@ -^CMake Deprecation Warning at CMP0062-OLD.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMP0062-OLD\.cmake:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Deprecation Warning at CMP0062-OLD\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0062 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\)$ + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/install/CMakeLists.txt b/Tests/RunCMake/install/CMakeLists.txt index 6dd8cdf..93ee9df 100644 --- a/Tests/RunCMake/install/CMakeLists.txt +++ b/Tests/RunCMake/install/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 477ffe0..e5a0413 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 @@ -167,7 +166,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 +173,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 48d8e1a..b9c38e3 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 f857b54..ee0c80e 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 138a69d..7d1477f 100644 --- a/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt +++ b/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt @@ -1,11 +1,11 @@ ^CMake Warning \(dev\) at TARGETS-Defaults-Cache.cmake:[0-9]+ \(install\): Target lib3 has PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning \(dev\) at TARGETS-Defaults-Cache.cmake:[0-9]+ \(install\): Target lib4 has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt b/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt index 5f56986..5600801 100644 --- a/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt +++ b/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt @@ -1,11 +1,11 @@ ^CMake Warning \(dev\) at TARGETS-Defaults.cmake:[0-9]+ \(install\): Target lib3 has PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. + CMake Warning \(dev\) at TARGETS-Defaults.cmake:[0-9]+ \(install\): Target lib4 has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake index cba04b2..c72e405 100644 --- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake +++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.14) enable_language(C) # test matrix diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake index 43ae787..891b1ac 100644 --- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake +++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.14) enable_language(C) add_library(utils SHARED obj1.c) diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt index fe65fd3..26dcd42 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 60f52c4..8aed62b 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 b75deff..3e182f8 100644 --- a/Tests/RunCMake/install/TARGETS-RPATH.cmake +++ b/Tests/RunCMake/install/TARGETS-RPATH.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.9) - +cmake_policy(SET CMP0068 NEW) enable_language(C) set(CMAKE_BUILD_WITH_INSTALL_RPATH 1) diff --git a/Tests/RunCMake/install/empty3.cmake b/Tests/RunCMake/install/empty3.cmake new file mode 100644 index 0000000..18c2ac5 --- /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 0000000..026a4d2 --- /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 4b3de84..93ee9df 100644 --- a/Tests/RunCMake/list/CMakeLists.txt +++ b/Tests/RunCMake/list/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt index 9103bd2..5dd76f7 100644 --- a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt +++ b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt @@ -1,13 +1,13 @@ -^CMake Deprecation Warning at GET-CMP0007-WARN.cmake:1 \(cmake_policy\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. +^CMake Deprecation Warning at GET-CMP0007-WARN\.cmake:1 \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + -CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\): +CMake Warning \(dev\) at GET-CMP0007-WARN\.cmake:4 \(list\): Policy CMP0007 is not set: list command no longer ignores empty elements. Run "cmake --help-policy CMP0007" for policy details. Use the cmake_policy command to set the policy and suppress this warning. List has value = diff --git a/Tests/RunCMake/math/CMakeLists.txt b/Tests/RunCMake/math/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/math/CMakeLists.txt +++ b/Tests/RunCMake/math/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/message/CMakeLists.txt b/Tests/RunCMake/message/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/message/CMakeLists.txt +++ b/Tests/RunCMake/message/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/message/warnmessage-rootdir.cmake b/Tests/RunCMake/message/warnmessage-rootdir.cmake index f82efb9..f400079 100644 --- a/Tests/RunCMake/message/warnmessage-rootdir.cmake +++ b/Tests/RunCMake/message/warnmessage-rootdir.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.15) - # Generating the backtrace for this warning message used to trigger a # spurious assertion when the current directory is the root directory message(WARNING "We expect to see this warning message") diff --git a/Tests/RunCMake/no_install_prefix/CMakeLists.txt b/Tests/RunCMake/no_install_prefix/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/no_install_prefix/CMakeLists.txt +++ b/Tests/RunCMake/no_install_prefix/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/project/CMP0048-NEW-stderr.txt b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt new file mode 100644 index 0000000..ad75f43 --- /dev/null +++ b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt @@ -0,0 +1,6 @@ +^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\.$ diff --git a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt index 695fb70..376249b 100644 --- a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt +++ b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMP0048-OLD.cmake:1 \(cmake_policy\): +^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMP0048-OLD\.cmake:1 \(cmake_policy\): The OLD behavior for policy CMP0048 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/project/CMakeLists.txt b/Tests/RunCMake/project/CMakeLists.txt index fdcaee9..a0ee6d7 100644 --- a/Tests/RunCMake/project/CMakeLists.txt +++ b/Tests/RunCMake/project/CMakeLists.txt @@ -1,5 +1,9 @@ -if(NOT "x${RunCMake_TEST}" STREQUAL "xNoMinimumRequired") +if("x${RunCMake_TEST}" STREQUAL "xNoMinimumRequired") + # No cmake_minimum_required(VERSION) +elseif(RunCMake_TEST MATCHES "^CMP0048") cmake_minimum_required(VERSION 2.8.12) +else() + cmake_minimum_required(VERSION 3.5) endif() project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt index fc1a02b..c72534f 100644 --- a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt +++ b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt @@ -1,4 +1,4 @@ -^CMake Warning \(dev\) in CMakeLists.txt: +^CMake Warning \(dev\) in CMakeLists\.txt: No project\(\) command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project\(\) command. Add a line of code such as @@ -8,5 +8,12 @@ near the top of the file, but after cmake_minimum_required\(\). CMake is pretending there is a "project\(Project\)" command on the first - line. -This warning is for project developers. Use -Wno-dev to suppress it.$ + line\. +This warning is for project developers. Use -Wno-dev to suppress it\. ++ +CMake Deprecation Warning at CMakeLists\.txt:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\.$ diff --git a/Tests/RunCMake/separate_arguments/CMakeLists.txt b/Tests/RunCMake/separate_arguments/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/separate_arguments/CMakeLists.txt +++ b/Tests/RunCMake/separate_arguments/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/set/CMakeLists.txt b/Tests/RunCMake/set/CMakeLists.txt index 4b3de84..93ee9df 100644 --- a/Tests/RunCMake/set/CMakeLists.txt +++ b/Tests/RunCMake/set/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/set/ParentPulling.cmake b/Tests/RunCMake/set/ParentPulling.cmake index 2614533..5649cb2 100644 --- a/Tests/RunCMake/set/ParentPulling.cmake +++ b/Tests/RunCMake/set/ParentPulling.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.0) -project(Minimal NONE) - function(test_set) set(blah "value2") message("before PARENT_SCOPE blah=${blah}") diff --git a/Tests/RunCMake/set/ParentPullingRecursive.cmake b/Tests/RunCMake/set/ParentPullingRecursive.cmake index a3e29f5..4d50561 100644 --- a/Tests/RunCMake/set/ParentPullingRecursive.cmake +++ b/Tests/RunCMake/set/ParentPullingRecursive.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.0) -project(Minimal NONE) - function(report where) message("----------") message("variable values at ${where}:") diff --git a/Tests/RunCMake/set_property/CMakeLists.txt b/Tests/RunCMake/set_property/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/set_property/CMakeLists.txt +++ b/Tests/RunCMake/set_property/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/string/CMakeLists.txt b/Tests/RunCMake/string/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/string/CMakeLists.txt +++ b/Tests/RunCMake/string/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/string/RegexClear.cmake b/Tests/RunCMake/string/RegexClear.cmake index d5edaac..4abe25e 100644 --- a/Tests/RunCMake/string/RegexClear.cmake +++ b/Tests/RunCMake/string/RegexClear.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required (VERSION 3.0) -project (RegexClear C) - function (output_results msg) message("results from: ${msg}") message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--") diff --git a/Tests/RunCMake/string/RegexMultiMatchClear.cmake b/Tests/RunCMake/string/RegexMultiMatchClear.cmake index 80b6b3c..788ba5e 100644 --- a/Tests/RunCMake/string/RegexMultiMatchClear.cmake +++ b/Tests/RunCMake/string/RegexMultiMatchClear.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required (VERSION 3.0) -project (RegexClear NONE) - function (output_results msg) message("results from: ${msg}") message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--") diff --git a/Tests/RunCMake/target_compile_features/CMakeLists.txt b/Tests/RunCMake/target_compile_features/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/target_compile_features/CMakeLists.txt +++ b/Tests/RunCMake/target_compile_features/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake b/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake index 316b74b..4a0f068 100644 --- a/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake +++ b/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.16...3.17) - enable_language(C) add_library (func SHARED func.c) diff --git a/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake b/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake index 22d3df7..6610d40 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.16...3.17) - enable_language(C) enable_language(CXX) diff --git a/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake b/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake index 9feccd0..e2bd669 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.16...3.17) - enable_language(C) enable_language(CXX) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake index 6c72546..a5bf2fb 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_policy(VERSION 2.8.11) project(CMP0022-WARN) add_library(foo SHARED empty_vs6_1.cpp) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake index dfdf70b..d6f34a1 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_policy(VERSION 2.8.11) project(CMP0022-WARN) add_library(foo SHARED empty_vs6_1.cpp) diff --git a/Tests/RunCMake/target_link_libraries/CMakeLists.txt b/Tests/RunCMake/target_link_libraries/CMakeLists.txt index 667561e..8eb5748 100644 --- a/Tests/RunCMake/target_link_libraries/CMakeLists.txt +++ b/Tests/RunCMake/target_link_libraries/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake index 189592d..7c5d77d 100644 --- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) if(RunCMake_GENERATOR_IS_MULTI_CONFIG) set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug) diff --git a/Tests/RunCMake/target_sources/CMP0076-WARN.cmake b/Tests/RunCMake/target_sources/CMP0076-WARN.cmake index 2e07331..20f1d5e 100644 --- a/Tests/RunCMake/target_sources/CMP0076-WARN.cmake +++ b/Tests/RunCMake/target_sources/CMP0076-WARN.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - add_library(publiclib) add_subdirectory(CMP0076-WARN) diff --git a/Tests/RunCMake/target_sources/CMakeLists.txt b/Tests/RunCMake/target_sources/CMakeLists.txt index 727f93a..296fdda 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 0000000..d00491f --- /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 0000000..06458b9 --- /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 0000000..9f412c8 --- /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 9a2ca6a..2b5db43 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 0000000..d00491f --- /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 0000000..01db002 --- /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 0000000..709fb23 --- /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 0000000..d00491f --- /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 0000000..b4c81c2 --- /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 0000000..2bb71e4 --- /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 502d5f1..fd797cf 100644 --- a/Tests/RunCMake/target_sources/OriginDebug-stderr.txt +++ b/Tests/RunCMake/target_sources/OriginDebug-stderr.txt @@ -1,4 +1,4 @@ -CMake Debug Log at OriginDebug.cmake:13 \(add_library\): +CMake Debug Log at OriginDebug\.cmake:10 \(add_library\): Used sources for target OriginDebug: \* .*Tests/RunCMake/target_sources/empty_2.cpp @@ -6,7 +6,7 @@ CMake Debug Log at OriginDebug.cmake:13 \(add_library\): Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) .* -CMake Debug Log at OriginDebug.cmake:16 \(set_property\): +CMake Debug Log at OriginDebug\.cmake:13 \(set_property\): Used sources for target OriginDebug: \* .*Tests/RunCMake/target_sources/empty_3.cpp @@ -14,7 +14,7 @@ CMake Debug Log at OriginDebug.cmake:16 \(set_property\): Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) .* -CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): +CMake Debug Log at OriginDebug\.cmake:17 \(target_sources\): Used sources for target OriginDebug: \* .*Tests/RunCMake/target_sources/empty_4.cpp @@ -22,7 +22,7 @@ CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) .* -CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): +CMake Debug Log at OriginDebug\.cmake:11 \(target_link_libraries\): Used sources for target OriginDebug: \* .*Tests/RunCMake/target_sources/empty_1.cpp diff --git a/Tests/RunCMake/target_sources/OriginDebug.cmake b/Tests/RunCMake/target_sources/OriginDebug.cmake index d40a1d8..e2d8477 100644 --- a/Tests/RunCMake/target_sources/OriginDebug.cmake +++ b/Tests/RunCMake/target_sources/OriginDebug.cmake @@ -1,7 +1,4 @@ - -cmake_minimum_required(VERSION 3.0) - -project(OriginDebug) +enable_language(CXX) set(CMAKE_DEBUG_TARGET_PROPERTIES SOURCES) diff --git a/Tests/RunCMake/target_sources/RunCMakeTest.cmake b/Tests/RunCMake/target_sources/RunCMakeTest.cmake index 7c67c3f..90915cd 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 2ab79d5..634576e 100644 --- a/Tests/RunCMake/try_compile/CMP0056.cmake +++ b/Tests/RunCMake/try_compile/CMP0056.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_policy(VERSION 3.1) enable_language(C) set(obj "${CMAKE_C_OUTPUT_EXTENSION}") if(BORLAND) diff --git a/Tests/RunCMake/try_compile/CMakeLists.txt b/Tests/RunCMake/try_compile/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/try_compile/CMakeLists.txt +++ b/Tests/RunCMake/try_compile/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/try_run/CMakeLists.txt b/Tests/RunCMake/try_run/CMakeLists.txt index e93f0b6..e6c41a5 100644 --- a/Tests/RunCMake/try_run/CMakeLists.txt +++ b/Tests/RunCMake/try_run/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} C) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/variable_watch/CMakeLists.txt b/Tests/RunCMake/variable_watch/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/variable_watch/CMakeLists.txt +++ b/Tests/RunCMake/variable_watch/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/while/CMakeLists.txt b/Tests/RunCMake/while/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/while/CMakeLists.txt +++ b/Tests/RunCMake/while/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/StagingPrefix/Consumer/CMakeLists.txt b/Tests/StagingPrefix/Consumer/CMakeLists.txt index a230441..f7195b0 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 eb3d98f..c02d5de 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 068fae9..6c0de9d 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 ecd4353..26a7da9 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 21752b7..9864001 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 3cc69c0..cd79372 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 8f69cbe..44afd4e 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 2a0b015..f77370c 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 3e46ed5..ab2e007 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 9f89af2..262662d 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 a3fd8d8..a44988e 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 950ec25..8918d98 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 342b8fb..f24640f 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 7e838b4..d8fd934 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 a038ddd..6f82425 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) |