diff options
Diffstat (limited to 'Tests')
1249 files changed, 17961 insertions, 1149 deletions
diff --git a/Tests/Architecture/CMakeLists.txt b/Tests/Architecture/CMakeLists.txt index 3d10ee0..8b3d0af 100644 --- a/Tests/Architecture/CMakeLists.txt +++ b/Tests/Architecture/CMakeLists.txt @@ -1,30 +1,21 @@ cmake_minimum_required(VERSION 3.5) project(Architecture C) -function(test_for_xcode4 result_var) - set(${result_var} 0 PARENT_SCOPE) - if(APPLE) - execute_process(COMMAND xcodebuild -version - OUTPUT_VARIABLE ov RESULT_VARIABLE rv - ) - if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.") - if(NOT CMAKE_MATCH_1 VERSION_LESS 4) - set(${result_var} 1 PARENT_SCOPE) - endif() - endif() - endif() -endfunction() - -test_for_xcode4(is_xcode4) - -set(arch0 i386) -set(arch1 ppc) - -if(is_xcode4) - # Xcode 4, use modern architectures as defaults - # Arch 'ppc' no longer works: tools no longer available starting with Xcode 4 +if (CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 12) + # Since Xcode 12 we have two architectures again: arm64 and x86_64. + set(arch0 x86_64) + set(arch1 arm64) +elseif(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 10) + # Xcode 10 / 11 do not have two supported architectures for the host. + message(STATUS "Skip test x86_64 only") + return() +elseif(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 4) + # Xcode 4 no longer supports ppc, but does support x86_64. set(arch0 i386) set(arch1 x86_64) +else() + set(arch0 i386) + set(arch1 ppc) endif() add_library(foo foo.c) @@ -43,7 +34,6 @@ if(CMAKE_OSX_ARCHITECTURES) endif() endif() -message("is_xcode4='${is_xcode4}'") message("archs='${archs}'") message("arch0='${arch0}'") message("arch1='${arch1}'") diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index 5ddae83..2fa2bc5 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -12,6 +12,15 @@ project(BuildDepends) # project is built. set(CMAKE_SUPPRESS_REGENERATION 1) +if(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_VS_PLATFORM_TOOLSET MATCHES "^(v90|v100|v110|v120|v140)$") + # These toolsets update 'link_depends_no_shared_lib.lib' during rebuild in Release mode. + set(config Debug) +else() + # Some toolsets update 'link_depends_no_shared_lib.pdb' during rebuild in Debug mode. + set(config Release) +endif() +set(CMAKE_TRY_COMPILE_CONFIGURATION "${config}") + # Xcode needs some help with the fancy dependencies in this test. if(XCODE AND XCODE_VERSION VERSION_LESS 5) set(HELP_XCODE 1) @@ -42,11 +51,15 @@ list(APPEND _cmake_options "-DTEST_LINK_DEPENDS=${TEST_LINK_DEPENDS}") list(APPEND _cmake_options "-DCMAKE_FORCE_DEPFILES=1") -if(NOT CMAKE_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") +if(NOT CMAKE_GENERATOR MATCHES "Visual Studio") set(TEST_MULTI3 1) list(APPEND _cmake_options "-DTEST_MULTI3=1") endif() +if (APPLE) + list(APPEND _cmake_options "-DCMake_TEST_XCODE_VERSION=${CMake_TEST_XCODE_VERSION}") +endif() + file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project) message("Creating Project/foo.cxx") write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx @@ -113,10 +126,10 @@ endif() # find and save the ninjadep executable set(ninjadep ${BuildDepends_BINARY_DIR}/Project/ninjadep${CMAKE_EXECUTABLE_SUFFIX}) if(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/ninjadep${CMAKE_EXECUTABLE_SUFFIX}" ) - message("found debug") + "${BuildDepends_BINARY_DIR}/Project/${config}/ninjadep${CMAKE_EXECUTABLE_SUFFIX}" ) + message("found ${config}/ninjadep${CMAKE_EXECUTABLE_SUFFIX}") set(ninjadep - "${BuildDepends_BINARY_DIR}/Project/Debug/ninjadep${CMAKE_EXECUTABLE_SUFFIX}") + "${BuildDepends_BINARY_DIR}/Project/${config}/ninjadep${CMAKE_EXECUTABLE_SUFFIX}") endif() message("Running ${ninjadep} ") execute_process(COMMAND ${ninjadep} OUTPUT_VARIABLE out RESULT_VARIABLE runResult) @@ -132,17 +145,17 @@ endif() set(bar ${BuildDepends_BINARY_DIR}/Project/bar${CMAKE_EXECUTABLE_SUFFIX}) if(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" ) - message("found debug") + "${BuildDepends_BINARY_DIR}/Project/${config}/bar${CMAKE_EXECUTABLE_SUFFIX}" ) + message("found ${config}/bar${CMAKE_EXECUTABLE_SUFFIX}") set(bar - "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}") + "${BuildDepends_BINARY_DIR}/Project/${config}/bar${CMAKE_EXECUTABLE_SUFFIX}") endif() set(zot ${BuildDepends_BINARY_DIR}/Project/zot${CMAKE_EXECUTABLE_SUFFIX}) if(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}" ) - message("found debug") + "${BuildDepends_BINARY_DIR}/Project/${config}/zot${CMAKE_EXECUTABLE_SUFFIX}" ) + message("found ${config}/zot${CMAKE_EXECUTABLE_SUFFIX}") set(zot - "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}") + "${BuildDepends_BINARY_DIR}/Project/${config}/zot${CMAKE_EXECUTABLE_SUFFIX}") endif() message("Running ${bar} ") @@ -301,12 +314,12 @@ if(NOT RESULT) message(SEND_ERROR "Could not build test project (2)!") endif() if(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" ) - message("found debug") + "${BuildDepends_BINARY_DIR}/Project/${config}/bar${CMAKE_EXECUTABLE_SUFFIX}" ) + message("found ${config}/bar${CMAKE_EXECUTABLE_SUFFIX}") endif() if(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}" ) - message("found debug") + "${BuildDepends_BINARY_DIR}/Project/${config}/zot${CMAKE_EXECUTABLE_SUFFIX}" ) + message("found ${config}/zot${CMAKE_EXECUTABLE_SUFFIX}") endif() message("Running ${ninjadep} ") diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt index a320d53..2abda2e 100644 --- a/Tests/BuildDepends/Project/CMakeLists.txt +++ b/Tests/BuildDepends/Project/CMakeLists.txt @@ -1,19 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(testRebuild) -if(APPLE) - set(CMake_TEST_XCODE_VERSION 0) - if(XCODE_VERSION) - set(CMake_TEST_XCODE_VERSION "${XCODE_VERSION}") - else() - execute_process( - COMMAND xcodebuild -version - OUTPUT_VARIABLE _version ERROR_VARIABLE _version_err - ) - if(_version MATCHES "^Xcode ([0-9]+(\\.[0-9]+)*)") - set(CMake_TEST_XCODE_VERSION "${CMAKE_MATCH_1}") - endif() - endif() +if(APPLE AND CMake_TEST_XCODE_VERSION) # only use multi-arch if the sysroot exists on this machine # Ninja needs -M which could not be used with multiple -arch flags if(EXISTS "${CMAKE_OSX_SYSROOT}" AND NOT "${CMAKE_GENERATOR}" MATCHES "Ninja") diff --git a/Tests/CMakeGUI/CMakeLists.txt b/Tests/CMakeGUI/CMakeLists.txt index 4e8609b..c9f44e9 100644 --- a/Tests/CMakeGUI/CMakeLists.txt +++ b/Tests/CMakeGUI/CMakeLists.txt @@ -2,6 +2,11 @@ include(CMakeParseArguments) find_package(Qt5Test REQUIRED) +if(MSVC) + # QTBUG-118993: Qt uses deprecated stdext::checked_array_iterator + add_compile_definitions(_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING) +endif() + include_directories( ${CMake_SOURCE_DIR}/Source ${CMake_SOURCE_DIR}/Source/QtDialog diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index 2c1d22b..4d43e08 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -53,6 +53,7 @@ endif() add_executable(testUVProcessChainHelper testUVProcessChainHelper.cxx) target_link_libraries(testUVProcessChainHelper CMakeLib) +target_compile_definitions(testUVProcessChainHelper PRIVATE WIN32_LEAN_AND_MEAN) set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR}) set(testUVProcessChain_ARGS $<TARGET_FILE:testUVProcessChainHelper>) diff --git a/Tests/CMakeLib/testDebuggerNamedPipe.cxx b/Tests/CMakeLib/testDebuggerNamedPipe.cxx index 1ae3f64..67e1372 100644 --- a/Tests/CMakeLib/testDebuggerNamedPipe.cxx +++ b/Tests/CMakeLib/testDebuggerNamedPipe.cxx @@ -194,7 +194,7 @@ int runTest(int argc, char* argv[]) R"("command" *: *"disconnect".*"success" *: *true.*"type" *: *"response")" }; - for (auto& regexString : expectedResponses) { + for (const auto& regexString : expectedResponses) { cmsys::RegularExpression regex(regexString); if (!regex.find(debuggerResponse)) { std::cout << "Expected response not found: " << regexString << std::endl; diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 72b55e0..730a7b4 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1,5 +1,13 @@ -# a macro for tests that have a simple format where the name matches the -# directory and project +# Creates a test named <NAME> that runs ctest --build-and-test on the +# subdirectory of this one named by replacing "." with "/" in +# <NAME>. Any arguments following NAME are passed to ctest as a +# --test-command. See the implementation for additional details. +# +# The subdirectory is added to TEST_BUILD_DIRS in the caller's scope. +# +# Requires: the name of the project in the subdirectory is the part of +# <NAME> following the last dot ("."), or all of <NAME> if there is no +# "." in <NAME>. macro(ADD_TEST_MACRO NAME) if(${ARGC} GREATER 1) set(_test_command --test-command ${ARGN}) @@ -40,9 +48,7 @@ set(ENV{HOME} \"${TEST_HOME}\") endif() # Suppress generator deprecation warnings in test suite. -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 12 2013") +if(CMAKE_GENERATOR MATCHES "^Visual Studio 12 2013") set(TEST_WARN_VS_CODE "set(ENV{CMAKE_WARN_VS12} OFF)") else() set(TEST_WARN_VS_CODE "") @@ -74,9 +80,6 @@ if(BUILD_TESTING) set(CMake_TEST_DEVENV "") if(CMAKE_VS_DEVENV_COMMAND) set(CMake_TEST_DEVENV "${CMAKE_VS_DEVENV_COMMAND}") - elseif(CMAKE_GENERATOR MATCHES "Visual Studio 9 " AND - NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]") - set(CMake_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}") endif() if(CMAKE_GENERATOR MATCHES "Visual Studio|Xcode") @@ -172,10 +175,7 @@ if(BUILD_TESTING) set(CPACK_BINARY_DEB OFF) endif() - # Look for NuGet to use for tests. - find_program(NUGET_EXECUTABLE NAMES NuGet nuget) - - if(NUGET_EXECUTABLE) + if(CMake_TEST_CPACK_NUGET) set(CPACK_BINARY_NUGET ON) else() set(CPACK_BINARY_NUGET OFF) @@ -299,25 +299,21 @@ if(BUILD_TESTING) "Should the tests that use '--build-target package' be run?" ON) mark_as_advanced(CTEST_TEST_CPACK) - set(CTEST_TEST_OSX_ARCH 0) set(CMake_TEST_XCODE_VERSION 0) if(APPLE) - set(CTEST_TEST_OSX_ARCH 1) if(XCODE_VERSION) set(CMake_TEST_XCODE_VERSION "${XCODE_VERSION}") else() execute_process( COMMAND xcodebuild -version - OUTPUT_VARIABLE _version ERROR_VARIABLE _version_err + OUTPUT_VARIABLE _version + ERROR_VARIABLE _stderr + RESULT_VARIABLE _failed ) - if(_version MATCHES "^Xcode ([0-9]+(\\.[0-9]+)*)") + if(NOT _failed AND _version MATCHES "^Xcode ([0-9]+(\\.[0-9]+)*)") set(CMake_TEST_XCODE_VERSION "${CMAKE_MATCH_1}") endif() endif() - if(NOT CMake_TEST_XCODE_VERSION VERSION_LESS 10) - # Since Xcode 10 we do not have two supported architectures for the host. - set(CTEST_TEST_OSX_ARCH 0) - endif() if(CMAKE_OSX_SYSROOT) execute_process( COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version ProductName @@ -392,7 +388,22 @@ if(BUILD_TESTING) ADD_TEST_MACRO(TryCompile TryCompile) ADD_TEST_MACRO(SystemInformation SystemInformation) ADD_TEST_MACRO(MathTest MathTest) + + string(REPLACE ";" "$<SEMICOLON>" TEST_STDS_C "${CMake_TEST_C_STANDARDS}") + string(REPLACE ";" "$<SEMICOLON>" TEST_STDS_CXX "${CMake_TEST_CXX_STANDARDS}") + string(REPLACE ";" "$<SEMICOLON>" TEST_STDS_CUDA "${CMake_TEST_CUDA_STANDARDS}") + string(REPLACE ";" "$<SEMICOLON>" TEST_STDS_HIP "${CMake_TEST_HIP_STANDARDS}") + set(CompileFeatures_BUILD_OPTIONS + -DCMake_TEST_C_STANDARDS=${TEST_STDS_C} + -DCMake_TEST_CXX_STANDARDS=${TEST_STDS_CXX} + -DCMake_TEST_CUDA=${CMake_TEST_CUDA} + -DCMake_TEST_CUDA_STANDARDS=${TEST_STDS_CUDA} + -DCMake_TEST_HIP=${CMake_TEST_HIP} + -DCMake_TEST_HIP_STANDARDS=${TEST_STDS_HIP} + ) ADD_TEST_MACRO(CompileFeatures CompileFeatures) + set_property(TEST CompileFeatures APPEND PROPERTY LABELS "CUDA" "HIP") + ADD_TEST_MACRO(CMakeCommands.target_compile_features) if(CMake_TEST_RESOURCES) @@ -465,7 +476,7 @@ if(BUILD_TESTING) add_subdirectory(ObjCXX) endif() - if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])") + if(${CMAKE_GENERATOR} MATCHES "Visual Studio") ADD_TEST_MACRO(CSharpOnly CSharpOnly) if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") ADD_TEST_MACRO(CSharpLinkToCxx CSharpLinkToCxx) @@ -498,6 +509,10 @@ if(BUILD_TESTING) ADD_TEST_MACRO(ReturnTest ReturnTest) ADD_TEST_MACRO(Properties Properties) ADD_TEST_MACRO(Assembler HelloAsm) + # relies on Linux syscall interface + if(CMake_TEST_ASM_NASM AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + ADD_TEST_MACRO(NasmOnly NasmOnly) + endif() ADD_TEST_MACRO(SourceGroups SourceGroups) ADD_TEST_MACRO(Preprocess Preprocess) set(ExportImport_BUILD_OPTIONS -DCMake_TEST_NESTED_MAKE_PROGRAM:FILEPATH=${CMake_TEST_EXPLICIT_MAKE_PROGRAM} @@ -524,6 +539,7 @@ if(BUILD_TESTING) set_property(TEST CompileOptions APPEND PROPERTY LABELS "Fortran") ADD_TEST_MACRO(CompatibleInterface CompatibleInterface) + ADD_TEST_MACRO(CustomTransitiveProperties CustomTransitiveProperties) ADD_TEST_MACRO(AliasTarget AliasTarget) ADD_TEST_MACRO(StagingPrefix StagingPrefix) ADD_TEST_MACRO(ImportedSameName ImportedSameName) @@ -562,10 +578,13 @@ if(BUILD_TESTING) if("${CMAKE_GENERATOR}" MATCHES "Make") ADD_TEST_MACRO(Policy0002 Policy0002) endif() - if(CTEST_TEST_OSX_ARCH) + if(CMake_TEST_XCODE_VERSION) + set(Architecture_BUILD_OPTIONS -DCMake_TEST_XCODE_VERSION=${CMake_TEST_XCODE_VERSION}) ADD_TEST_MACRO(Architecture Architecture) set_tests_properties(Architecture PROPERTIES PASS_REGULAR_EXPRESSION "(file is not of required architecture|does not match cputype|not the architecture being linked|but attempting to link with file built for)") + set_property(TEST Architecture APPEND PROPERTY + PASS_REGULAR_EXPRESSION "Skip test x86_64 only|found architecture '.*', required architecture '.*'") endif() list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX}) @@ -933,6 +952,8 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/BuildDepends" ${build_generator_args} --build-project BuildDepends + --build-options + "-DCMake_TEST_XCODE_VERSION=${CMake_TEST_XCODE_VERSION}" ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BuildDepends") @@ -974,36 +995,6 @@ if(BUILD_TESTING) endif() endif() - # On Windows run the CPackWiXGenerator test - # if the WiX Toolset seems to be available - if(WIN32) - file(TO_CMAKE_PATH "$ENV{WIX}" WIX_ROOT) - - find_program(WIX_LIGHT_EXECUTABLE light - PATHS "${WIX_ROOT}/bin" - DOC "WiX Toolset light.exe location") - - if(WIX_LIGHT_EXECUTABLE) - add_test(CPackWiXGenerator ${CMAKE_CTEST_COMMAND} - -C \${CTEST_CONFIGURATION_TYPE} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator" - "${CMake_BINARY_DIR}/Tests/CPackWiXGenerator" - ${build_generator_args} - --build-project CPackWiXGenerator - --build-options - --test-command ${CMAKE_CMAKE_COMMAND} - "-DCPackWiXGenerator_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackWiXGenerator" - "-Dno_verify:BOOL=${CMake_TEST_WIX_NO_VERIFY}" - "-Dconfig=\${CTEST_CONFIGURATION_TYPE}" - -P "${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake") - - set_property(TEST CPackWiXGenerator PROPERTY - ATTACHED_FILES_ON_FAIL - "${CMake_BINARY_DIR}/Tests/CPackWiXGenerator/_CPack_Packages/win32/WIX/wix.log") - endif() - endif() - # On Windows run the CPackInnoSetupGenerator test if(WIN32 AND CMake_TEST_CPACK_INNOSETUP) add_test(CPackInnoSetupGenerator ${CMAKE_CTEST_COMMAND} @@ -1134,9 +1125,7 @@ if(BUILD_TESTING) if(CPACK_BINARY_DEB) list(APPEND ACTIVE_CPACK_GENERATORS DEB) endif() - # Check whether if NuGet command is found - # before adding NuGet tests - if(CPACK_BINARY_NUGET) + if(CMake_TEST_CPACK_NUGET) list(APPEND ACTIVE_CPACK_GENERATORS NUGET) set(CPACK_GENERATOR_STRING_NUGET NuGet) endif() @@ -1211,13 +1200,17 @@ if(BUILD_TESTING) else() unset(SHLIBDEPS_EXECUTABLE_VERSION) endif() + # Check if distro has symbols or shlibs data + file(GLOB SHLIBS_FILES_EXIST "/var/lib/dpkg/info/*.shlibs" "/var/lib/dpkg/info/*.symbols") if(NOT SHLIBDEPS_EXECUTABLE_VERSION VERSION_LESS 1.19 OR (NOT SHLIBDEPS_EXECUTABLE_VERSION VERSION_LESS 1.17 AND NOT CMAKE_BINARY_DIR MATCHES ".*[ ].*")) list(APPEND DEB_CONFIGURATIONS_TO_TEST "shlibdeps-with-private-lib-failure" - "shlibdeps-with-private-lib-success") + "shlibdeps-with-private-lib-success" + "shlibdeps-with-ORIGIN-RPATH-failure") + if(SHLIBS_FILES_EXIST) + list(APPEND DEB_CONFIGURATIONS_TO_TEST "shlibdeps-with-ORIGIN-RPATH-success") + endif() endif() - # Check if distro has symbols or shlibs data - file(GLOB SHLIBS_FILES_EXIST "/var/lib/dpkg/info/*.shlibs" "/var/lib/dpkg/info/*.symbols") if(SHLIBS_FILES_EXIST) list(APPEND DEB_CONFIGURATIONS_TO_TEST "components-depend2") endif() @@ -1473,6 +1466,7 @@ if(BUILD_TESTING) _mod IN ITEMS ALSA + Backtrace BLAS Boost BZip2 @@ -1559,7 +1553,7 @@ if(BUILD_TESTING) set(CMake_TEST_FindPython2 TRUE) set(CMake_TEST_FindPython3 TRUE) endif() - if(CMake_TEST_FindPython_SABIMOdule) + if(CMake_TEST_FindPython_SABIModule) set(CMake_TEST_FindPython2_SABIModule TRUE) set(CMake_TEST_FindPython3_SABIModule TRUE) endif() @@ -2222,8 +2216,6 @@ if(BUILD_TESTING) endif() if(MSVC AND NOT MSVC_VERSION LESS 1310 - AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 " - OR CMAKE_SIZEOF_VOID_P EQUAL 4) AND (NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64") ) ADD_TEST_MACRO(VSMASM VSMASM) @@ -2234,8 +2226,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(SBCS SBCS) endif() - if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio 9 " - AND NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v90" + if(NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v90" AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx) ADD_TEST_MACRO(VSManagedCustomCommand) @@ -2386,7 +2377,7 @@ if(BUILD_TESTING) endif() endif() - if(CMAKE_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])" AND nasm) + if(CMAKE_GENERATOR MATCHES "Visual Studio" AND nasm) ADD_TEST_MACRO(VSNASM VSNASM) endif() diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt index ea06464..727c7fc 100644 --- a/Tests/CMakeOnly/CMakeLists.txt +++ b/Tests/CMakeOnly/CMakeLists.txt @@ -54,7 +54,7 @@ if(CMAKE_Fortran_COMPILER) add_CMakeOnly_test(CompilerIdFortran) set_property(TEST CMakeOnly.CompilerIdFortran APPEND PROPERTY LABELS "Fortran") endif() -if(CMAKE_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") +if(CMAKE_GENERATOR MATCHES "Visual Studio") add_CMakeOnly_test(CompilerIdCSharp) endif() diff --git a/Tests/CMakeTests/FileTest.cmake.in b/Tests/CMakeTests/FileTest.cmake.in index 71cb3db..7b76700 100644 --- a/Tests/CMakeTests/FileTest.cmake.in +++ b/Tests/CMakeTests/FileTest.cmake.in @@ -13,13 +13,13 @@ set(Copy-NoDest-STDERR "given no DESTINATION") set(Copy-NoFile-RESULT 1) set(Copy-NoFile-STDERR "COPY cannot find.*/does_not_exist\\.txt") set(Glob-NoArg-RESULT 1) -set(Glob-NoArg-STDERR "file must be called with at least two arguments") +set(Glob-NoArg-STDERR "file GLOB must be called with at least one additional argument\\.") set(Make_Directory-NoArg-RESULT 1) set(Make-Directory-NoArg-STDERR "file must be called with at least two arguments") set(MD5-NoFile-RESULT 1) set(MD5-NoFile-STDERR "file MD5 failed to read file") set(MD5-BadArg1-RESULT 1) -set(MD5-BadArg1-STDERR "file must be called with at least two arguments") +set(MD5-BadArg1-STDERR "file MD5 requires a file name and output variable") set(MD5-BadArg2-RESULT 1) set(MD5-BadArg2-STDERR "file MD5 requires a file name and output variable") set(MD5-BadArg4-RESULT 1) diff --git a/Tests/CPackComponentsDEB/CMakeLists.txt b/Tests/CPackComponentsDEB/CMakeLists.txt index b2e2106..a3eb337 100644 --- a/Tests/CPackComponentsDEB/CMakeLists.txt +++ b/Tests/CPackComponentsDEB/CMakeLists.txt @@ -5,6 +5,10 @@ # which supports CPack components. cmake_minimum_required(VERSION 3.10 FATAL_ERROR) +# Make sure to properly escape RPATH/RUNPATH entries. +if (POLICY CMP0095) + cmake_policy(SET CMP0095 NEW) +endif() project(CPackComponentsDEB VERSION 1.0.3) # Use GNUInstallDirs in order to enforce lib64 if needed @@ -29,6 +33,14 @@ if (CPackDEBConfiguration MATCHES "shlibdeps-with-private-lib") target_link_libraries(mylibapp3 myprivatelib) endif() +if (CPackDEBConfiguration MATCHES "shlibdeps-with-ORIGIN-RPATH") + add_subdirectory("subdir") + add_executable(mylibapp4 mylibapp.cpp) + target_compile_definitions(mylibapp4 PRIVATE -DSHLIBDEPS_OTHER) + target_link_libraries(mylibapp4 PUBLIC myotherlib) + set_target_properties(mylibapp4 PROPERTIES INSTALL_RPATH "\${ORIGIN};$ORIGIN/../lib") +endif() + # Create installation targets. Note that we put each kind of file # into a different component via COMPONENT. These components will # be used to create the installation components. @@ -39,17 +51,28 @@ install(TARGETS mylib install(TARGETS mylibapp RUNTIME - DESTINATION bin + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications) install(FILES mylib.h - DESTINATION include - COMPONENT headers) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT headers) if (CPackDEBConfiguration MATCHES "shlibdeps-with-private-lib") install(TARGETS mylibapp3 RUNTIME - DESTINATION bin + DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT applications) +endif() + +if (CPackDEBConfiguration MATCHES "shlibdeps-with-ORIGIN-RPATH") + install(TARGETS myotherlib + LIBRARY + DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT libraries) + install(TARGETS mylibapp4 + RUNTIME + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications) endif() diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-shlibdeps-with-ORIGIN-RPATH-failure.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-shlibdeps-with-ORIGIN-RPATH-failure.cmake.in new file mode 100644 index 0000000..0794fbd --- /dev/null +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-shlibdeps-with-ORIGIN-RPATH-failure.cmake.in @@ -0,0 +1,23 @@ +# +# Activate component packaging +# + +if(CPACK_GENERATOR MATCHES "DEB") + set(CPACK_DEB_COMPONENT_INSTALL "ON") + set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS "ON") +endif() + +# +# Choose grouping way +# +#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE) +#set(CPACK_COMPONENTS_GROUPING) +set(CPACK_COMPONENTS_IGNORE_GROUPS 1) +#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) + +# we set shlibdeps to on +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + +# setting dependencies +# Note: We explicitly do NOT declare dependency to "libraries" component! +#set(CPACK_COMPONENT_APPLICATIONS_DEPENDS "libraries") diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-shlibdeps-with-ORIGIN-RPATH-success.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-shlibdeps-with-ORIGIN-RPATH-success.cmake.in new file mode 100644 index 0000000..81d6c7b --- /dev/null +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-shlibdeps-with-ORIGIN-RPATH-success.cmake.in @@ -0,0 +1,22 @@ +# +# Activate component packaging +# + +if(CPACK_GENERATOR MATCHES "DEB") + set(CPACK_DEB_COMPONENT_INSTALL "ON") + set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS "ON") +endif() + +# +# Choose grouping way +# +#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE) +#set(CPACK_COMPONENTS_GROUPING) +set(CPACK_COMPONENTS_IGNORE_GROUPS 1) +#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) + +# we set shlibdeps to on +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + +# setting dependencies +set(CPACK_COMPONENT_APPLICATIONS_DEPENDS "libraries") diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-shlibdeps-with-ORIGIN-RPATH-failure.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-shlibdeps-with-ORIGIN-RPATH-failure.cmake new file mode 100644 index 0000000..dddcb4a --- /dev/null +++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-shlibdeps-with-ORIGIN-RPATH-failure.cmake @@ -0,0 +1,19 @@ +if(NOT CPackComponentsDEB_SOURCE_DIR) + message(FATAL_ERROR "CPackComponentsDEB_SOURCE_DIR not set") +endif() + +include(${CPackComponentsDEB_SOURCE_DIR}/RunCPackVerifyResult.cmake) + + +set(actual_output) +run_cpack(actual_output + CPack_output + CPack_error + EXPECT_FAILURE + CONFIG_ARGS ${config_args} + CONFIG_VERBOSE ${config_verbose}) + +string(REGEX MATCH "dpkg-shlibdeps: error: (cannot|couldn't) find[ \n\t]+library[ \n\t]+libmyotherlib.so.1[ \n\t]+needed[ \n\t]+by[ \n\t]+./usr/bin/mylibapp4" expected_error ${CPack_error}) +if(NOT expected_error) + message(FATAL_ERROR "Did not get the expected error-message!") +endif() diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-shlibdeps-with-ORIGIN-RPATH-success.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-shlibdeps-with-ORIGIN-RPATH-success.cmake new file mode 100644 index 0000000..6eff3db --- /dev/null +++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-shlibdeps-with-ORIGIN-RPATH-success.cmake @@ -0,0 +1,75 @@ +if(NOT CPackComponentsDEB_SOURCE_DIR) + message(FATAL_ERROR "CPackComponentsDEB_SOURCE_DIR not set") +endif() + +include(${CPackComponentsDEB_SOURCE_DIR}/RunCPackVerifyResult.cmake) + + + +# requirements + +# debian now produces lower case names +set(expected_file_mask "${CPackComponentsDEB_BINARY_DIR}/mylib-*_1.0.3_*.deb") +set(expected_count 3) + + +set(actual_output) +run_cpack(actual_output + CPack_output + CPack_error + EXPECTED_FILE_MASK "${expected_file_mask}" + CONFIG_ARGS ${config_args} + CONFIG_VERBOSE ${config_verbose}) + +message(STATUS "expected_count='${expected_count}'") +message(STATUS "expected_file_mask='${expected_file_mask}'") +message(STATUS "actual_output_files='${actual_output}'") + +if(NOT actual_output) + message(FATAL_ERROR "error: expected_files do not exist: CPackComponentsDEB test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error}") +endif() + +list(LENGTH actual_output actual_count) +message(STATUS "actual_count='${actual_count}'") +if(NOT actual_count EQUAL expected_count) + message(FATAL_ERROR "error: expected_count=${expected_count} does not match actual_count=${actual_count}: CPackComponents test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error})") +endif() + + +# dpkg-deb checks for the summary of the packages +find_program(DPKGDEB_EXECUTABLE dpkg-deb) +if(DPKGDEB_EXECUTABLE) + set(dpkgdeb_output_errors_all "") + foreach(_f IN LISTS actual_output) + + # extracts the metadata from the package + run_dpkgdeb(dpkg_output + FILENAME ${_f} + ) + + dpkgdeb_return_specific_metaentry(dpkg_package_name + DPKGDEB_OUTPUT "${dpkg_output}" + METAENTRY "Package:") + + message(STATUS "package='${dpkg_package_name}'") + + if(dpkg_package_name STREQUAL "mylib-applications") + # pass + elseif(dpkg_package_name STREQUAL "mylib-headers") + # pass + elseif(dpkg_package_name STREQUAL "mylib-libraries") + # pass + else() + set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} + "dpkg-deb: ${_f}: component name not found: ${dpkg_package_name}\n") + endif() + + endforeach() + + + if(NOT dpkgdeb_output_errors_all STREQUAL "") + message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}") + endif() +else() + message("dpkg-deb executable not found - skipping dpkg-deb test") +endif() diff --git a/Tests/CPackComponentsDEB/mylibapp.cpp b/Tests/CPackComponentsDEB/mylibapp.cpp index bb45831..6d63803 100644 --- a/Tests/CPackComponentsDEB/mylibapp.cpp +++ b/Tests/CPackComponentsDEB/mylibapp.cpp @@ -1,13 +1,13 @@ -#ifndef SHLIBDEPS_PRIVATE +#if defined SHLIBDEPS_OTHER -# include "mylib.h" +# include "subdir/myotherlib.h" int main() { - mylib_function(); + myotherlib_function(); } -#else +#elif defined SHLIBDEPS_PRIVATE # include "shlibdeps-with-private-lib/myprivatelib.h" @@ -16,4 +16,13 @@ int main() myprivatelib_function(); } +#else + +# include "mylib.h" + +int main() +{ + mylib_function(); +} + #endif diff --git a/Tests/CPackComponentsDEB/subdir/CMakeLists.txt b/Tests/CPackComponentsDEB/subdir/CMakeLists.txt new file mode 100644 index 0000000..71b3fdd --- /dev/null +++ b/Tests/CPackComponentsDEB/subdir/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(myotherlib SHARED myotherlib.cpp) +set_target_properties( myotherlib PROPERTIES + VERSION 1.2.3 + SOVERSION 1 +) diff --git a/Tests/CPackComponentsDEB/subdir/myotherlib.cpp b/Tests/CPackComponentsDEB/subdir/myotherlib.cpp new file mode 100644 index 0000000..eec270c --- /dev/null +++ b/Tests/CPackComponentsDEB/subdir/myotherlib.cpp @@ -0,0 +1,8 @@ +#include "myotherlib.h" + +#include "stdio.h" + +void myotherlib_function() +{ + printf("This is myotherlib"); +} diff --git a/Tests/CPackComponentsDEB/subdir/myotherlib.h b/Tests/CPackComponentsDEB/subdir/myotherlib.h new file mode 100644 index 0000000..71848a0 --- /dev/null +++ b/Tests/CPackComponentsDEB/subdir/myotherlib.h @@ -0,0 +1 @@ +void myotherlib_function(); diff --git a/Tests/CPackNSISGenerator/CMakeLists.txt b/Tests/CPackNSISGenerator/CMakeLists.txt index 5d6320b..cb0b13d 100644 --- a/Tests/CPackNSISGenerator/CMakeLists.txt +++ b/Tests/CPackNSISGenerator/CMakeLists.txt @@ -10,6 +10,26 @@ install(TARGETS hello LIBRARY DESTINATION . BUNDLE DESTINATION .) +# Component that is a reserved name on Windows. +# See https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file +install( + DIRECTORY . + DESTINATION txt + COMPONENT CON + FILES_MATCHING PATTERN *.txt) +# Component name that is similar to a reserved name on Windows. +install( + DIRECTORY . + DESTINATION txt + COMPONENT Console + FILES_MATCHING PATTERN *.txt) +# Component name that is strongly discouraged on Windows. +install( + DIRECTORY . + DESTINATION txt + COMPONENT EndsWithDot. + FILES_MATCHING PATTERN *.txt) + set(CPACK_NSIS_MUI_HEADERIMAGE "${PROJECT_SOURCE_DIR}\\\\header-image.bmp") set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}\\\\header-icon.bmp") set(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}\\\\install.ico") diff --git a/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake b/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake index 31a2560..3e4d7b4 100644 --- a/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake +++ b/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake @@ -69,3 +69,24 @@ if("${output_index}" EQUAL "-1") else() message(FATAL_ERROR "License found in the project") endif() + +file(STRINGS "${project_file}" line REGEX [[\\_CON\\]]) +string(FIND "${line}" [[\_CON\]] output_index) +message(STATUS "Found CON component reserved directory name as _CON") +if("${output_index}" EQUAL "-1") + message(FATAL_ERROR "CON component reserved directory name not found as _CON in the project") +endif() + +file(STRINGS "${project_file}" line REGEX [[\\Console\\]]) +string(FIND "${line}" [[\Console\]] output_index) +message(STATUS "Found Console component directory name as Console") +if("${output_index}" EQUAL "-1") + message(FATAL_ERROR "Console component directory name not found as Console in the project") +endif() + +file(STRINGS "${project_file}" line REGEX [[\\EndsWithDot._\\]]) +string(FIND "${line}" [[\EndsWithDot._\]] output_index) +message(STATUS "Found EndsWithDot. component directory name as EndsWithDot._") +if("${output_index}" EQUAL "-1") + message(FATAL_ERROR "EndsWithDot. component directory name not found as EndsWithDot._ in the project") +endif() diff --git a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake deleted file mode 100644 index c549e61..0000000 --- a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake +++ /dev/null @@ -1,79 +0,0 @@ -message(STATUS "=============================================================") -message(STATUS "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)") -message(STATUS "") - -if(NOT CPackWiXGenerator_BINARY_DIR) - message(FATAL_ERROR "CPackWiXGenerator_BINARY_DIR not set") -endif() - -message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}") -message(STATUS "CMAKE_CPACK_COMMAND: ${CMAKE_CPACK_COMMAND}") -message(STATUS "CPackWiXGenerator_BINARY_DIR: ${CPackWiXGenerator_BINARY_DIR}") - -if(config) - set(_C_config -C ${config}) -endif() - -execute_process(COMMAND "${CMAKE_CPACK_COMMAND}" - ${_C_config} - RESULT_VARIABLE CPack_result - OUTPUT_VARIABLE CPack_output - ERROR_VARIABLE CPack_error - WORKING_DIRECTORY "${CPackWiXGenerator_BINARY_DIR}") - -if(CPack_result) - message(FATAL_ERROR "CPack execution went wrong!, CPack_output=${CPack_output}, CPack_error=${CPack_error}") -else () - message(STATUS "CPack_output=${CPack_output}") -endif() - -set(expected_file_mask "*.msi") -file(GLOB installer_file "${expected_file_mask}") - -message(STATUS "installer_file='${installer_file}'") -message(STATUS "expected_file_mask='${expected_file_mask}'") - -if(NOT installer_file) - message(FATAL_ERROR "installer_file does not exist.") -endif() - -function(run_wix_command command) - file(TO_CMAKE_PATH "$ENV{WIX}" WIX_ROOT) - set(WIX_PROGRAM "${WIX_ROOT}/bin/${command}.exe") - - if(NOT EXISTS "${WIX_PROGRAM}") - message(FATAL_ERROR "Failed to find WiX Tool: ${WIX_PROGRAM}") - endif() - - message(STATUS "Running WiX Tool: ${command} ${ARGN}") - - execute_process(COMMAND "${WIX_PROGRAM}" ${ARGN} - RESULT_VARIABLE WIX_result - OUTPUT_VARIABLE WIX_output - ERROR_VARIABLE WIX_output - WORKING_DIRECTORY "${CPackWiXGenerator_BINARY_DIR}") - - message(STATUS "${command} Output: \n${WIX_output}") - - if(WIX_result) - message(FATAL_ERROR "WiX ${command} failed: ${WIX_result}") - endif() -endfunction() - -file(GLOB WXS_SOURCE_FILES - "${CPackWiXGenerator_BINARY_DIR}/_CPack_Packages/*/WIX/*.wxs") - -if(NOT WXS_SOURCE_FILES) - message(FATAL_ERROR "Failed finding WiX source files to validate.") -endif() - -foreach(WXS_SOURCE_FILE IN LISTS WXS_SOURCE_FILES) - run_wix_command(wixcop "${WXS_SOURCE_FILE}") -endforeach() - -# error SMOK1076 : ICE61: This product should remove only older -# versions of itself. The Maximum version is not less -# than the current product. (1.0.0 1.0.0) -if (NOT no_verify) - run_wix_command(smoke -nologo -wx -sw1076 "${installer_file}") -endif () diff --git a/Tests/CompatibleInterface/CMakeLists.txt b/Tests/CompatibleInterface/CMakeLists.txt index 668a97b..5d57ce4 100644 --- a/Tests/CompatibleInterface/CMakeLists.txt +++ b/Tests/CompatibleInterface/CMakeLists.txt @@ -13,12 +13,14 @@ set_property(TARGET iface1 APPEND PROPERTY BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 + BOOL_PROP5 ) set_property(TARGET iface1 APPEND PROPERTY COMPATIBLE_INTERFACE_STRING STRING_PROP1 STRING_PROP2 STRING_PROP3 + STRING_PROP4 ) set_property(TARGET iface1 APPEND PROPERTY COMPATIBLE_INTERFACE_NUMBER_MIN @@ -26,30 +28,40 @@ set_property(TARGET iface1 APPEND PROPERTY NUMBER_MIN_PROP2 NUMBER_MIN_PROP3 NUMBER_MIN_PROP4 + NUMBER_MIN_PROP5 + NUMBER_MIN_PROP6 ) set_property(TARGET iface1 APPEND PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX NUMBER_MAX_PROP1 NUMBER_MAX_PROP2 + NUMBER_MAX_PROP3 + NUMBER_MAX_PROP4 ) set(CMAKE_DEBUG_TARGET_PROPERTIES - BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 - STRING_PROP1 STRING_PROP2 STRING_PROP3 - NUMBER_MIN_PROP1 NUMBER_MIN_PROP2 NUMBER_MIN_PROP3 NUMBER_MIN_PROP4 - NUMBER_MAX_PROP1 NUMBER_MAX_PROP2 + BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 BOOL_PROP5 + STRING_PROP1 STRING_PROP2 STRING_PROP3 STRING_PROP4 + NUMBER_MIN_PROP1 NUMBER_MIN_PROP2 NUMBER_MIN_PROP3 NUMBER_MIN_PROP4 NUMBER_MIN_PROP5 NUMBER_MIN_PROP6 + NUMBER_MAX_PROP1 NUMBER_MAX_PROP2 NUMBER_MAX_PROP3 NUMBER_MAX_PROP4 ) set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP1 ON) set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP2 ON) +set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP5 ON) set_property(TARGET iface1 PROPERTY INTERFACE_STRING_PROP1 prop1) set_property(TARGET iface1 PROPERTY INTERFACE_STRING_PROP2 prop2) +set_property(TARGET iface1 PROPERTY INTERFACE_STRING_PROP4 prop4) set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MIN_PROP1 100) set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MIN_PROP2 200) set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MIN_PROP3 0x10) set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MIN_PROP4 0x10) +set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MIN_PROP5 5) +set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MIN_PROP6 6) set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MAX_PROP1 100) set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MAX_PROP2 200) +set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MAX_PROP3 3) +set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MAX_PROP4 4) add_executable(CompatibleInterface main.cpp) target_link_libraries(CompatibleInterface iface1) @@ -86,8 +98,48 @@ target_compile_definitions(CompatibleInterface $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MIN_PROP2>,200>:NUMBER_MIN_PROP2=200> $<$<EQUAL:$<TARGET_PROPERTY:NUMBER_MIN_PROP3>,0xA>:NUMBER_MIN_PROP3=0xA> $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MIN_PROP4>,0x10>:NUMBER_MIN_PROP4=0x10> + $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MIN_PROP5>,5>:NUMBER_MIN_PROP5=5> $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MAX_PROP1>,100>:NUMBER_MAX_PROP1=100> $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MAX_PROP2>,250>:NUMBER_MAX_PROP2=250> + $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MAX_PROP3>,3>:NUMBER_MAX_PROP3=3> + + # Static libraries compute COMPATIBLE_INTERFACE_ properties transitively. + $<$<BOOL:$<TARGET_PROPERTY:static1,BOOL_PROP1>>:STATIC1_BOOL_PROP1> + $<$<STREQUAL:$<TARGET_PROPERTY:static1,STRING_PROP1>,prop1>:STATIC1_STRING_PROP1> + $<$<EQUAL:$<TARGET_PROPERTY:static1,NUMBER_MAX_PROP3>,3>:STATIC1_NUMBER_MAX_PROP3> + $<$<EQUAL:$<TARGET_PROPERTY:static1,NUMBER_MIN_PROP5>,5>:STATIC1_NUMBER_MIN_PROP5> + + # Object libraries do not compute COMPATIBLE_INTERFACE_ properties transitively. + $<$<NOT:$<STREQUAL:$<TARGET_PROPERTY:object1,BOOL_PROP1>,>>:OBJECT1_BOOL_PROP1> + $<$<NOT:$<STREQUAL:$<TARGET_PROPERTY:object1,STRING_PROP1>,>>:OBJECT1_STRING_PROP1> + $<$<NOT:$<STREQUAL:$<TARGET_PROPERTY:object1,NUMBER_MAX_PROP3>,>>:OBJECT1_NUMBER_MAX_PROP3> + $<$<NOT:$<STREQUAL:$<TARGET_PROPERTY:object1,NUMBER_MIN_PROP5>,>>:OBJECT1_NUMBER_MIN_PROP5> + + # Interface libraries do not compute COMPATIBLE_INTERFACE_ properties transitively. + $<$<NOT:$<STREQUAL:$<TARGET_PROPERTY:iface3,BOOL_PROP1>,>>:IFACE3_BOOL_PROP1> + $<$<NOT:$<STREQUAL:$<TARGET_PROPERTY:iface3,STRING_PROP1>,>>:IFACE3_STRING_PROP1> + $<$<NOT:$<STREQUAL:$<TARGET_PROPERTY:iface3,NUMBER_MAX_PROP3>,>>:IFACE3_NUMBER_MAX_PROP3> + $<$<NOT:$<STREQUAL:$<TARGET_PROPERTY:iface3,NUMBER_MIN_PROP5>,>>:IFACE3_NUMBER_MIN_PROP5> + + # Static libraries compute COMPATIBLE_INTERFACE_ properties transitively. + $<$<BOOL:$<TARGET_PROPERTY:static1,BOOL_PROP5>>:STATIC1_BOOL_PROP5> + $<$<STREQUAL:$<TARGET_PROPERTY:static1,STRING_PROP4>,prop4>:STATIC1_STRING_PROP4> + $<$<EQUAL:$<TARGET_PROPERTY:static1,NUMBER_MIN_PROP6>,6>:STATIC1_NUMBER_MIN_PROP6> + $<$<EQUAL:$<TARGET_PROPERTY:static1,NUMBER_MAX_PROP4>,4>:STATIC1_NUMBER_MAX_PROP4> + + # Object libraries do not compute COMPATIBLE_INTERFACE_ properties transitively, + # but can have properties set on them. + $<$<BOOL:$<TARGET_PROPERTY:object1,BOOL_PROP5>>:OBJECT1_BOOL_PROP5> + $<$<STREQUAL:$<TARGET_PROPERTY:object1,STRING_PROP4>,prop4>:OBJECT1_STRING_PROP4> + $<$<EQUAL:$<TARGET_PROPERTY:object1,NUMBER_MIN_PROP6>,7>:OBJECT1_NUMBER_MIN_PROP6> + $<$<EQUAL:$<TARGET_PROPERTY:object1,NUMBER_MAX_PROP4>,1>:OBJECT1_NUMBER_MAX_PROP4> + + # Interface libraries do not compute COMPATIBLE_INTERFACE_ properties transitively, + # but can have properties set on them. + $<$<BOOL:$<TARGET_PROPERTY:iface3,BOOL_PROP5>>:IFACE3_BOOL_PROP5> + $<$<STREQUAL:$<TARGET_PROPERTY:iface3,STRING_PROP4>,prop4>:IFACE3_STRING_PROP4> + $<$<EQUAL:$<TARGET_PROPERTY:iface3,NUMBER_MIN_PROP6>,7>:IFACE3_NUMBER_MIN_PROP6> + $<$<EQUAL:$<TARGET_PROPERTY:iface3,NUMBER_MAX_PROP4>,1>:IFACE3_NUMBER_MAX_PROP4> ) @@ -128,3 +180,64 @@ set_property(TARGET CompatibleInterface APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL NON_RELEVANT_PROP ) + +add_library(static1 STATIC foo.cpp) +set_property(TARGET static1 PROPERTY BOOL_PROP5 ON) +set_property(TARGET static1 PROPERTY STRING_PROP4 prop4) +set_property(TARGET static1 PROPERTY NUMBER_MIN_PROP6 7) +set_property(TARGET static1 PROPERTY NUMBER_MAX_PROP4 1) +target_link_libraries(static1 PUBLIC iface1) + +add_library(object1 OBJECT foo.cpp) +set_property(TARGET object1 PROPERTY BOOL_PROP5 ON) +set_property(TARGET object1 PROPERTY STRING_PROP4 prop4) +set_property(TARGET object1 PROPERTY NUMBER_MIN_PROP6 7) +set_property(TARGET object1 PROPERTY NUMBER_MAX_PROP4 1) +target_link_libraries(object1 PUBLIC iface1) + +add_library(iface3 INTERFACE) +set_property(TARGET iface3 PROPERTY BOOL_PROP5 ON) +set_property(TARGET iface3 PROPERTY STRING_PROP4 prop4) +set_property(TARGET iface3 PROPERTY NUMBER_MIN_PROP6 7) +set_property(TARGET iface3 PROPERTY NUMBER_MAX_PROP4 1) +target_link_libraries(iface3 INTERFACE iface1) + +# Test COMPATIBLE_INTERFACE_* property evaluation outside of usage requirements. +add_custom_target(check ALL VERBATIM + COMMAND CompatibleInterface + # expect actual + "1" "$<TARGET_PROPERTY:CompatibleInterface,BOOL_PROP1>" + "prop1" "$<TARGET_PROPERTY:CompatibleInterface,STRING_PROP1>" + "3" "$<TARGET_PROPERTY:CompatibleInterface,NUMBER_MAX_PROP3>" + "5" "$<TARGET_PROPERTY:CompatibleInterface,NUMBER_MIN_PROP5>" + + "1" "$<TARGET_PROPERTY:static1,BOOL_PROP1>" + "prop1" "$<TARGET_PROPERTY:static1,STRING_PROP1>" + "3" "$<TARGET_PROPERTY:static1,NUMBER_MAX_PROP3>" + "5" "$<TARGET_PROPERTY:static1,NUMBER_MIN_PROP5>" + + "" "$<TARGET_PROPERTY:object1,BOOL_PROP1>" + "" "$<TARGET_PROPERTY:object1,STRING_PROP1>" + "" "$<TARGET_PROPERTY:object1,NUMBER_MAX_PROP3>" + "" "$<TARGET_PROPERTY:object1,NUMBER_MIN_PROP5>" + + "" "$<TARGET_PROPERTY:iface3,BOOL_PROP1>" + "" "$<TARGET_PROPERTY:iface3,STRING_PROP1>" + "" "$<TARGET_PROPERTY:iface3,NUMBER_MAX_PROP3>" + "" "$<TARGET_PROPERTY:iface3,NUMBER_MIN_PROP5>" + + "ON" "$<TARGET_PROPERTY:static1,BOOL_PROP5>" + "prop4" "$<TARGET_PROPERTY:static1,STRING_PROP4>" + "6" "$<TARGET_PROPERTY:static1,NUMBER_MIN_PROP6>" + "4" "$<TARGET_PROPERTY:static1,NUMBER_MAX_PROP4>" + + "ON" "$<TARGET_PROPERTY:object1,BOOL_PROP5>" + "prop4" "$<TARGET_PROPERTY:object1,STRING_PROP4>" + "7" "$<TARGET_PROPERTY:object1,NUMBER_MIN_PROP6>" + "1" "$<TARGET_PROPERTY:object1,NUMBER_MAX_PROP4>" + + "ON" "$<TARGET_PROPERTY:iface3,BOOL_PROP5>" + "prop4" "$<TARGET_PROPERTY:iface3,STRING_PROP4>" + "7" "$<TARGET_PROPERTY:iface3,NUMBER_MIN_PROP6>" + "1" "$<TARGET_PROPERTY:iface3,NUMBER_MAX_PROP4>" + ) diff --git a/Tests/CompatibleInterface/main.cpp b/Tests/CompatibleInterface/main.cpp index 0bccb82..1205cca 100644 --- a/Tests/CompatibleInterface/main.cpp +++ b/Tests/CompatibleInterface/main.cpp @@ -1,3 +1,5 @@ +#include <stdio.h> +#include <string.h> #ifndef BOOL_PROP1 # error Expected BOOL_PROP1 @@ -23,6 +25,102 @@ # error Expected STRING_PROP3 #endif +#ifndef STATIC1_BOOL_PROP1 +# error Expected STATIC1_BOOL_PROP1 +#endif + +#ifndef STATIC1_STRING_PROP1 +# error Expected STATIC1_STRING_PROP1 +#endif + +#ifndef STATIC1_NUMBER_MAX_PROP3 +# error Expected STATIC1_NUMBER_MAX_PROP3 +#endif + +#ifndef STATIC1_NUMBER_MIN_PROP5 +# error Expected STATIC1_NUMBER_MIN_PROP5 +#endif + +#ifdef OBJECT1_BOOL_PROP1 +# error Unexpected OBJECT1_BOOL_PROP1 +#endif + +#ifdef OBJECT1_STRING_PROP1 +# error Unexpected OBJECT1_STRING_PROP1 +#endif + +#ifdef OBJECT1_NUMBER_MAX_PROP3 +# error Unexpected OBJECT1_NUMBER_MAX_PROP3 +#endif + +#ifdef OBJECT1_NUMBER_MIN_PROP5 +# error Unexpected OBJECT1_NUMBER_MIN_PROP5 +#endif + +#ifdef IFACE3_BOOL_PROP1 +# error Unexpected IFACE3_BOOL_PROP1 +#endif + +#ifdef IFACE3_STRING_PROP1 +# error Unexpected IFACE3_STRING_PROP1 +#endif + +#ifdef IFACE3_NUMBER_MAX_PROP3 +# error Unexpected IFACE3_NUMBER_MAX_PROP3 +#endif + +#ifdef IFACE3_NUMBER_MIN_PROP5 +# error Unexpected IFACE3_NUMBER_MIN_PROP5 +#endif + +#ifndef STATIC1_BOOL_PROP5 +# error Expected STATIC1_BOOL_PROP5 +#endif + +#ifndef STATIC1_STRING_PROP4 +# error Expected STATIC1_STRING_PROP4 +#endif + +#ifndef STATIC1_NUMBER_MIN_PROP6 +# error Expected STATIC1_NUMBER_MIN_PROP6 +#endif + +#ifndef STATIC1_NUMBER_MAX_PROP4 +# error Expected STATIC1_NUMBER_MAX_PROP4 +#endif + +#ifndef OBJECT1_BOOL_PROP5 +# error Expected OBJECT1_BOOL_PROP5 +#endif + +#ifndef OBJECT1_STRING_PROP4 +# error Expected OBJECT1_STRING_PROP4 +#endif + +#ifndef OBJECT1_NUMBER_MIN_PROP6 +# error Expected OBJECT1_NUMBER_MIN_PROP6 +#endif + +#ifndef OBJECT1_NUMBER_MAX_PROP4 +# error Expected OBJECT1_NUMBER_MAX_PROP4 +#endif + +#ifndef IFACE3_BOOL_PROP5 +# error Expected IFACE3_BOOL_PROP5 +#endif + +#ifndef IFACE3_STRING_PROP4 +# error Expected IFACE3_STRING_PROP4 +#endif + +#ifndef IFACE3_NUMBER_MIN_PROP6 +# error Expected IFACE3_NUMBER_MIN_PROP6 +#endif + +#ifndef IFACE3_NUMBER_MAX_PROP4 +# error Expected IFACE3_NUMBER_MAX_PROP4 +#endif + template <bool test> struct CMakeStaticAssert; @@ -35,10 +133,12 @@ enum { NumericMaxTest1 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP1 == 100>), NumericMaxTest2 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP2 == 250>), + NumericMaxTest3 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP3 == 3>), NumericMinTest1 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP1 == 50>), NumericMinTest2 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP2 == 200>), NumericMinTest3 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP3 == 0xA>), - NumericMinTest4 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP4 == 0x10>) + NumericMinTest4 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP4 == 0x10>), + NumericMinTest5 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP5 == 5>) }; #include "iface2.h" @@ -51,6 +151,14 @@ __declspec(dllimport) int main(int argc, char** argv) { + int result = 0; + for (int i = 2; i < argc; i += 2) { + if (strcmp(argv[i - 1], argv[i]) != 0) { + fprintf(stderr, "Argument %d expected '%s' but got '%s'.\n", i, + argv[i - 1], argv[i]); + result = 1; + } + } Iface2 if2; - return if2.foo() + foo() + bar(); + return result + if2.foo() + foo() + bar(); } diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index d9bb447..614b721 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -6,6 +6,31 @@ project(CompileFeatures) set(ext_C c) set(ext_CXX cpp) +set(std_C 90 99 11 17 23) +set(std_CXX 98 11 14 17 20 23 26) + +if(CMake_TEST_CUDA) + enable_language(CUDA) + set(ext_CUDA cu) + set(std_CUDA 03 11 14 17 20 23 26) +endif() + +if(CMake_TEST_HIP) + enable_language(HIP) + set(ext_HIP hip) + set(std_HIP 98 11 14 17 20 23 26) +endif() + +foreach(lang C CXX CUDA HIP) + foreach(std IN LISTS std_${lang}) + string(TOLOWER "${lang}_std_${std}" feature) + if("${std}" IN_LIST CMake_TEST_${lang}_STANDARDS + OR CMAKE_${lang}${std}_STANDARD_COMPILE_OPTION) + add_library(test_${feature} OBJECT ${feature}.${ext_${lang}}) + target_compile_features(test_${feature} PRIVATE ${feature}) + endif() + endforeach() +endforeach() macro(run_test feature lang) if (${feature} IN_LIST CMAKE_${lang}_COMPILE_FEATURES) @@ -273,6 +298,7 @@ if (CMAKE_CXX_COMPILE_FEATURES) if (std_flag_idx EQUAL -1) add_executable(default_dialect default_dialect.cpp) target_compile_definitions(default_dialect PRIVATE + DEFAULT_CXX26=$<EQUAL:${CMAKE_CXX_STANDARD_DEFAULT},26> DEFAULT_CXX23=$<EQUAL:${CMAKE_CXX_STANDARD_DEFAULT},23> DEFAULT_CXX20=$<EQUAL:${CMAKE_CXX_STANDARD_DEFAULT},20> DEFAULT_CXX17=$<EQUAL:${CMAKE_CXX_STANDARD_DEFAULT},17> @@ -284,6 +310,22 @@ if (CMAKE_CXX_COMPILE_FEATURES) endif() endif () +if (CMake_TEST_CUDA + AND CMAKE_CUDA_COMPILE_FEATURES + AND CMAKE_CUDA_STANDARD_DEFAULT + AND NOT CMAKE_CUDA_FLAGS MATCHES "-std=") + add_executable(default_dialect_cuda default_dialect.cu) + target_compile_definitions(default_dialect_cuda PRIVATE + DEFAULT_CXX26=$<EQUAL:${CMAKE_CUDA_STANDARD_DEFAULT},26> + DEFAULT_CXX23=$<EQUAL:${CMAKE_CUDA_STANDARD_DEFAULT},23> + DEFAULT_CXX20=$<EQUAL:${CMAKE_CUDA_STANDARD_DEFAULT},20> + DEFAULT_CXX17=$<EQUAL:${CMAKE_CUDA_STANDARD_DEFAULT},17> + DEFAULT_CXX14=$<EQUAL:${CMAKE_CUDA_STANDARD_DEFAULT},14> + DEFAULT_CXX11=$<EQUAL:${CMAKE_CUDA_STANDARD_DEFAULT},11> + DEFAULT_CXX98=$<EQUAL:${CMAKE_CUDA_STANDARD_DEFAULT},03> + ) +endif () + # always add a target "CompileFeatures" if ((NOT CXX_expected_features) OR (NOT cxx_auto_type IN_LIST CXX_expected_features)) diff --git a/Tests/CompileFeatures/c_std.h b/Tests/CompileFeatures/c_std.h new file mode 100644 index 0000000..afe0308 --- /dev/null +++ b/Tests/CompileFeatures/c_std.h @@ -0,0 +1,8 @@ +#define C_STD_99 199901L +#define C_STD_11 201112L +#define C_STD_17 201710L +#define C_STD_23 202311L + +#ifdef __STDC_VERSION__ +# define C_STD __STDC_VERSION__ +#endif diff --git a/Tests/CompileFeatures/c_std_11.c b/Tests/CompileFeatures/c_std_11.c new file mode 100644 index 0000000..2938c17 --- /dev/null +++ b/Tests/CompileFeatures/c_std_11.c @@ -0,0 +1,5 @@ +#include "c_std.h" +#if defined(C_STD) && C_STD <= C_STD_99 && \ + !(defined(__SUNPRO_C) && __SUNPRO_C < 0x5140 && C_STD == C_STD_99) +# error "c_std_11 not honored" +#endif diff --git a/Tests/CompileFeatures/c_std_17.c b/Tests/CompileFeatures/c_std_17.c new file mode 100644 index 0000000..938cba4 --- /dev/null +++ b/Tests/CompileFeatures/c_std_17.c @@ -0,0 +1,4 @@ +#include "c_std.h" +#if defined(C_STD) && C_STD <= C_STD_11 +# error "c_std_17 not honored" +#endif diff --git a/Tests/CompileFeatures/c_std_23.c b/Tests/CompileFeatures/c_std_23.c new file mode 100644 index 0000000..a60a16e --- /dev/null +++ b/Tests/CompileFeatures/c_std_23.c @@ -0,0 +1,5 @@ +#include "c_std.h" +#if defined(C_STD) && C_STD <= C_STD_17 && \ + !(C_STD == C_STD_17 && defined(__clang_major__) && __clang_major__ < 14) +# error "c_std_23 not honored" +#endif diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake b/Tests/CompileFeatures/c_std_90.c index e69de29..e69de29 100644 --- a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON.cmake +++ b/Tests/CompileFeatures/c_std_90.c diff --git a/Tests/CompileFeatures/c_std_99.c b/Tests/CompileFeatures/c_std_99.c new file mode 100644 index 0000000..20b6372 --- /dev/null +++ b/Tests/CompileFeatures/c_std_99.c @@ -0,0 +1,4 @@ +#include "c_std.h" +#if defined(C_STD) && C_STD < C_STD_99 +# error "c_std_99 not honored" +#endif diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake b/Tests/CompileFeatures/cuda_std_03.cu index e69de29..e69de29 100644 --- a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-OFF.cmake +++ b/Tests/CompileFeatures/cuda_std_03.cu diff --git a/Tests/CompileFeatures/cuda_std_11.cu b/Tests/CompileFeatures/cuda_std_11.cu new file mode 100644 index 0000000..76813fd --- /dev/null +++ b/Tests/CompileFeatures/cuda_std_11.cu @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD < CXX_STD_11 +# error "cuda_std_11 not honored" +#endif diff --git a/Tests/CompileFeatures/cuda_std_14.cu b/Tests/CompileFeatures/cuda_std_14.cu new file mode 100644 index 0000000..53e23c8 --- /dev/null +++ b/Tests/CompileFeatures/cuda_std_14.cu @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_11 +# error "cuda_std_14 not honored" +#endif diff --git a/Tests/CompileFeatures/cuda_std_17.cu b/Tests/CompileFeatures/cuda_std_17.cu new file mode 100644 index 0000000..502defb --- /dev/null +++ b/Tests/CompileFeatures/cuda_std_17.cu @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_14 +# error "cuda_std_17 not honored" +#endif diff --git a/Tests/CompileFeatures/cuda_std_20.cu b/Tests/CompileFeatures/cuda_std_20.cu new file mode 100644 index 0000000..afdd3ba --- /dev/null +++ b/Tests/CompileFeatures/cuda_std_20.cu @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_17 +# error "cuda_std_20 not honored" +#endif diff --git a/Tests/CompileFeatures/cuda_std_23.cu b/Tests/CompileFeatures/cuda_std_23.cu new file mode 100644 index 0000000..6bdaeb9 --- /dev/null +++ b/Tests/CompileFeatures/cuda_std_23.cu @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_20 +# error "cuda_std_23 not honored" +#endif diff --git a/Tests/CompileFeatures/cuda_std_26.cu b/Tests/CompileFeatures/cuda_std_26.cu new file mode 100644 index 0000000..efeca8d --- /dev/null +++ b/Tests/CompileFeatures/cuda_std_26.cu @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_23 +# error "cuda_std_26 not honored" +#endif diff --git a/Tests/CompileFeatures/cxx_std.h b/Tests/CompileFeatures/cxx_std.h new file mode 100644 index 0000000..f17b683 --- /dev/null +++ b/Tests/CompileFeatures/cxx_std.h @@ -0,0 +1,54 @@ +#define CXX_STD_98 199711L +#define CXX_STD_11 201103L +#define CXX_STD_14 201402L +#define CXX_STD_17 201703L +#define CXX_STD_20 202002L +#define CXX_STD_23 202302L + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) +# if _MSVC_LANG > CXX_STD_17 +# define CXX_STD _MSVC_LANG +# elif _MSVC_LANG == CXX_STD_17 && defined(__cpp_aggregate_paren_init) +# define CXX_STD CXX_STD_20 +# elif _MSVC_LANG > CXX_STD_14 && __cplusplus > CXX_STD_17 +# define CXX_STD CXX_STD_20 +# elif _MSVC_LANG > CXX_STD_14 +# define CXX_STD CXX_STD_17 +# elif defined(__INTEL_CXX11_MODE__) && defined(__cpp_aggregate_nsdmi) +# define CXX_STD CXX_STD_14 +# elif defined(__INTEL_CXX11_MODE__) +# define CXX_STD CXX_STD_11 +# else +# define CXX_STD CXX_STD_98 +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# if _MSVC_LANG > __cplusplus +# define CXX_STD _MSVC_LANG +# else +# define CXX_STD __cplusplus +# endif +#elif defined(__NVCOMPILER) +# if __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init) +# define CXX_STD CXX_STD_20 +# else +# define CXX_STD __cplusplus +# endif +#elif defined(__INTEL_COMPILER) || defined(__PGI) +# if __cplusplus == CXX_STD_11 && defined(__cpp_namespace_attributes) +# define CXX_STD CXX_STD_17 +# elif __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi) +# define CXX_STD CXX_STD_14 +# else +# define CXX_STD __cplusplus +# endif +#elif (defined(__IBMCPP__) || defined(__ibmxl__)) && defined(__linux__) +# if __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi) +# define CXX_STD CXX_STD_14 +# else +# define CXX_STD __cplusplus +# endif +#elif __cplusplus == 1 && defined(__GXX_EXPERIMENTAL_CXX0X__) +# define CXX_STD CXX_STD_11 +#else +# define CXX_STD __cplusplus +#endif diff --git a/Tests/CompileFeatures/cxx_std_11.cpp b/Tests/CompileFeatures/cxx_std_11.cpp new file mode 100644 index 0000000..aa85cdb --- /dev/null +++ b/Tests/CompileFeatures/cxx_std_11.cpp @@ -0,0 +1,6 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD < CXX_STD_11 && \ + !(CXX_STD == CXX_STD_98 && \ + (defined(__IBMCPP__) && defined(_AIX) && __IBMCPP__ == 1610)) +# error "cxx_std_11 not honored" +#endif diff --git a/Tests/CompileFeatures/cxx_std_14.cpp b/Tests/CompileFeatures/cxx_std_14.cpp new file mode 100644 index 0000000..dabd2ee --- /dev/null +++ b/Tests/CompileFeatures/cxx_std_14.cpp @@ -0,0 +1,9 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_11 && \ + !(CXX_STD == CXX_STD_11 && \ + ((defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 4 && \ + __GNUC_MINOR__ <= 8 && !defined(__clang__) && \ + !defined(__INTEL_COMPILER) && !defined(__PGI)) || \ + (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5150))) +# error "cxx_std_14 not honored" +#endif diff --git a/Tests/CompileFeatures/cxx_std_17.cpp b/Tests/CompileFeatures/cxx_std_17.cpp new file mode 100644 index 0000000..3ca6bbe --- /dev/null +++ b/Tests/CompileFeatures/cxx_std_17.cpp @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_14 +# error "cxx_std_17 not honored" +#endif diff --git a/Tests/CompileFeatures/cxx_std_20.cpp b/Tests/CompileFeatures/cxx_std_20.cpp new file mode 100644 index 0000000..35f5ac1 --- /dev/null +++ b/Tests/CompileFeatures/cxx_std_20.cpp @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_17 +# error "cxx_std_20 not honored" +#endif diff --git a/Tests/CompileFeatures/cxx_std_23.cpp b/Tests/CompileFeatures/cxx_std_23.cpp new file mode 100644 index 0000000..020578d --- /dev/null +++ b/Tests/CompileFeatures/cxx_std_23.cpp @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_20 +# error "cxx_std_23 not honored" +#endif diff --git a/Tests/CompileFeatures/cxx_std_26.cpp b/Tests/CompileFeatures/cxx_std_26.cpp new file mode 100644 index 0000000..db3f6bc --- /dev/null +++ b/Tests/CompileFeatures/cxx_std_26.cpp @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_23 +# error "cxx_std_26 not honored" +#endif diff --git a/Tests/CPackWiXGenerator/file with spaces.h b/Tests/CompileFeatures/cxx_std_98.cpp index e69de29..e69de29 100644 --- a/Tests/CPackWiXGenerator/file with spaces.h +++ b/Tests/CompileFeatures/cxx_std_98.cpp diff --git a/Tests/CompileFeatures/default_dialect.c b/Tests/CompileFeatures/default_dialect.c index cae107b..4cd4ca0 100644 --- a/Tests/CompileFeatures/default_dialect.c +++ b/Tests/CompileFeatures/default_dialect.c @@ -1,18 +1,19 @@ +#include "c_std.h" #if DEFAULT_C23 -# if __STDC_VERSION__ <= 201710L +# if C_STD <= C_STD_17 # error Unexpected value for __STDC_VERSION__. # endif #elif DEFAULT_C17 -# if __STDC_VERSION__ < 201710L +# if C_STD <= C_STD_11 # error Unexpected value for __STDC_VERSION__. # endif #elif DEFAULT_C11 -# if __STDC_VERSION__ < 201112L +# if C_STD <= C_STD_99 # error Unexpected value for __STDC_VERSION__. # endif #elif DEFAULT_C99 -# if __STDC_VERSION__ != 199901L +# if C_STD != C_STD_99 # error Unexpected value for __STDC_VERSION__. # endif #else diff --git a/Tests/CompileFeatures/default_dialect.cpp b/Tests/CompileFeatures/default_dialect.cpp index bd504ff..b873b14 100644 --- a/Tests/CompileFeatures/default_dialect.cpp +++ b/Tests/CompileFeatures/default_dialect.cpp @@ -1,48 +1,37 @@ +#include "cxx_std.h" template <long l> struct Outputter; -#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L -# if defined(__INTEL_CXX11_MODE__) -# if defined(__cpp_aggregate_nsdmi) -# define CXX_STD 201402L -# else -# define CXX_STD 201103L -# endif -# else -# define CXX_STD 199711L -# endif -#elif defined(_MSC_VER) && defined(_MSVC_LANG) -# define CXX_STD _MSVC_LANG -#else -# define CXX_STD __cplusplus -#endif - -#if DEFAULT_CXX23 -# if CXX_STD <= 202002L +#if DEFAULT_CXX26 +# if CXX_STD <= CXX_STD_23 +Outputter<CXX_STD> o; +# endif +#elif DEFAULT_CXX23 +# if CXX_STD <= CXX_STD_20 Outputter<CXX_STD> o; # endif #elif DEFAULT_CXX20 -# if CXX_STD <= 201703L +# if CXX_STD <= CXX_STD_17 Outputter<CXX_STD> o; # endif #elif DEFAULT_CXX17 -# if CXX_STD <= 201402L +# if CXX_STD <= CXX_STD_14 Outputter<CXX_STD> o; # endif #elif DEFAULT_CXX14 -# if CXX_STD != 201402L +# if CXX_STD <= CXX_STD_11 Outputter<CXX_STD> o; # endif #elif DEFAULT_CXX11 -# if CXX_STD != 201103L +# if CXX_STD != CXX_STD_11 Outputter<CXX_STD> o; # endif #else # if !DEFAULT_CXX98 # error Buildsystem error # endif -# if CXX_STD != 199711L && CXX_STD != 1 && \ +# if CXX_STD != CXX_STD_98 && CXX_STD != 1 && \ !defined(__GXX_EXPERIMENTAL_CXX0X__) Outputter<CXX_STD> o; # endif diff --git a/Tests/CompileFeatures/default_dialect.cu b/Tests/CompileFeatures/default_dialect.cu new file mode 100644 index 0000000..a549a5c --- /dev/null +++ b/Tests/CompileFeatures/default_dialect.cu @@ -0,0 +1 @@ +#include "default_dialect.cpp" diff --git a/Tests/CompileFeatures/hip_std_11.hip b/Tests/CompileFeatures/hip_std_11.hip new file mode 100644 index 0000000..835aebd --- /dev/null +++ b/Tests/CompileFeatures/hip_std_11.hip @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD < CXX_STD_11 +# error "hip_std_11 not honored" +#endif diff --git a/Tests/CompileFeatures/hip_std_14.hip b/Tests/CompileFeatures/hip_std_14.hip new file mode 100644 index 0000000..9a605d1 --- /dev/null +++ b/Tests/CompileFeatures/hip_std_14.hip @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_11 +# error "hip_std_14 not honored" +#endif diff --git a/Tests/CompileFeatures/hip_std_17.hip b/Tests/CompileFeatures/hip_std_17.hip new file mode 100644 index 0000000..b7f3c84 --- /dev/null +++ b/Tests/CompileFeatures/hip_std_17.hip @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_14 +# error "hip_std_17 not honored" +#endif diff --git a/Tests/CompileFeatures/hip_std_20.hip b/Tests/CompileFeatures/hip_std_20.hip new file mode 100644 index 0000000..7dfbe75 --- /dev/null +++ b/Tests/CompileFeatures/hip_std_20.hip @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_17 +# error "hip_std_20 not honored" +#endif diff --git a/Tests/CompileFeatures/hip_std_23.hip b/Tests/CompileFeatures/hip_std_23.hip new file mode 100644 index 0000000..aa1af72 --- /dev/null +++ b/Tests/CompileFeatures/hip_std_23.hip @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_20 +# error "hip_std_23 not honored" +#endif diff --git a/Tests/CompileFeatures/hip_std_26.hip b/Tests/CompileFeatures/hip_std_26.hip new file mode 100644 index 0000000..3c7a2f5 --- /dev/null +++ b/Tests/CompileFeatures/hip_std_26.hip @@ -0,0 +1,4 @@ +#include "cxx_std.h" +#if defined(CXX_STD) && CXX_STD <= CXX_STD_23 +# error "hip_std_26 not honored" +#endif diff --git a/Tests/CompileFeatures/hip_std_98.hip b/Tests/CompileFeatures/hip_std_98.hip new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CompileFeatures/hip_std_98.hip diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt index 0fbfb83..e3d3ee7 100644 --- a/Tests/CompileOptions/CMakeLists.txt +++ b/Tests/CompileOptions/CMakeLists.txt @@ -22,6 +22,8 @@ add_executable(CompileOptions main.cpp) macro(get_compiler_test_genex lst lang) list(APPEND ${lst} -DTEST_${lang}_COMPILER_VERSION="$<${lang}_COMPILER_VERSION>") list(APPEND ${lst} -DTEST_${lang}_COMPILER_VERSION_EQUALITY=$<${lang}_COMPILER_VERSION:${CMAKE_${lang}_COMPILER_VERSION}>) + list(APPEND ${lst} -DTEST_${lang}_COMPILER_FRONTEND_VARIANT="$<${lang}_COMPILER_FRONTEND_VARIANT>") + list(APPEND ${lst} -DTEST_${lang}_COMPILER_FRONTEND_VARIANT_EQUALITY=$<${lang}_COMPILER_FRONTEND_VARIANT:${CMAKE_${lang}_COMPILER_FRONTEND_VARIANT}>) endmacro() get_compiler_test_genex(c_tests C) @@ -74,10 +76,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|AppleClang|MSVC)$") endif() set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS "-DFLAG_B=2" "-DFLAG_C=2" "-DFLAG_D=1") set_property(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_D=2") - if(NOT CMAKE_GENERATOR MATCHES "^Visual Studio 9") - set_property(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_E=1") - set_property(SOURCE main.cpp PROPERTY COMPILE_OPTIONS "-DFLAG_E=2") - endif() + set_property(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_E=1") + set_property(SOURCE main.cpp PROPERTY COMPILE_OPTIONS "-DFLAG_E=2") endif() target_link_libraries(CompileOptions testlib) @@ -93,6 +93,8 @@ target_compile_definitions(CompileOptions PRIVATE "EXPECTED_C_COMPILER_VERSION=\"${CMAKE_C_COMPILER_VERSION}\"" "EXPECTED_CXX_COMPILER_VERSION=\"${CMAKE_CXX_COMPILER_VERSION}\"" + "EXPECTED_C_COMPILER_FRONTEND_VARIANT=\"${CMAKE_C_COMPILER_FRONTEND_VARIANT}\"" + "EXPECTED_CXX_COMPILER_FRONTEND_VARIANT=\"${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}\"" ) if(TEST_FORTRAN) @@ -101,5 +103,6 @@ if(TEST_FORTRAN) PRIVATE "TEST_FORTRAN" "EXPECTED_Fortran_COMPILER_VERSION=\"${CMAKE_Fortran_COMPILER_VERSION}\"" + "EXPECTED_Fortran_COMPILER_FRONTEND_VARIANT=\"${CMAKE_Fortran_COMPILER_FRONTEND_VARIANT}\"" ) endif() diff --git a/Tests/CompileOptions/main.cpp b/Tests/CompileOptions/main.cpp index 23ce197..a7ce783 100644 --- a/Tests/CompileOptions/main.cpp +++ b/Tests/CompileOptions/main.cpp @@ -68,15 +68,25 @@ int main() #endif && strcmp(EXPECTED_C_COMPILER_VERSION, TEST_C_COMPILER_VERSION) == 0 && - strcmp(EXPECTED_CXX_COMPILER_VERSION, TEST_CXX_COMPILER_VERSION) == 0 + strcmp(EXPECTED_CXX_COMPILER_VERSION, TEST_CXX_COMPILER_VERSION) == + 0 && + strcmp(EXPECTED_C_COMPILER_FRONTEND_VARIANT, + TEST_C_COMPILER_FRONTEND_VARIANT) == 0 && + strcmp(EXPECTED_CXX_COMPILER_FRONTEND_VARIANT, + TEST_CXX_COMPILER_FRONTEND_VARIANT) == 0 #ifdef TEST_FORTRAN && strcmp(EXPECTED_Fortran_COMPILER_VERSION, - TEST_Fortran_COMPILER_VERSION) == 0 + TEST_Fortran_COMPILER_VERSION) == 0 && + strcmp(EXPECTED_Fortran_COMPILER_FRONTEND_VARIANT, + TEST_Fortran_COMPILER_FRONTEND_VARIANT) == 0 #endif && TEST_C_COMPILER_VERSION_EQUALITY == 1 && - TEST_CXX_COMPILER_VERSION_EQUALITY == 1 + TEST_CXX_COMPILER_VERSION_EQUALITY == 1 && + TEST_C_COMPILER_FRONTEND_VARIANT_EQUALITY == 1 && + TEST_CXX_COMPILER_FRONTEND_VARIANT_EQUALITY == 1 #ifdef TEST_FORTRAN - && TEST_Fortran_COMPILER_VERSION_EQUALITY == 1 + && TEST_Fortran_COMPILER_VERSION_EQUALITY == 1 && + TEST_Fortran_COMPILER_FRONTEND_VARIANT_EQUALITY == 1 #endif ) ? 0 diff --git a/Tests/Cuda/CMakeLists.txt b/Tests/Cuda/CMakeLists.txt index 04ef86d..c1952c5 100644 --- a/Tests/Cuda/CMakeLists.txt +++ b/Tests/Cuda/CMakeLists.txt @@ -27,6 +27,7 @@ add_cuda_test_macro(Cuda.ProperLinkFlags ProperLinkFlags) if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang") # Clang lacks __CUDACC_VER*__ defines. add_cuda_test_macro(Cuda.ProperDeviceLibraries ProperDeviceLibraries) + add_cuda_test_macro(Cuda.ToolkitBeforeLang ToolkitBeforeLang) endif() add_cuda_test_macro(Cuda.WithC CudaWithC) diff --git a/Tests/Cuda/ToolkitBeforeLang/CMakeLists.txt b/Tests/Cuda/ToolkitBeforeLang/CMakeLists.txt new file mode 100644 index 0000000..6b97a21 --- /dev/null +++ b/Tests/Cuda/ToolkitBeforeLang/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.15) +project(ToolkitBeforeLang CXX) + +#Goal for this example: +# Validate that we use the same CUDA Toolkit as `enable_language(CUDA)` would find +find_package(CUDAToolkit REQUIRED) + +if(NOT DEFINED CUDAToolkit_VERSION) + message(FATAL_ERROR "expected CUDAToolkit variable CUDAToolkit_VERSION not found") +endif() + +enable_language(CUDA) + +message(STATUS "CUDAToolkit_NVCC_EXECUTABLE ${CUDAToolkit_NVCC_EXECUTABLE}") +message(STATUS "CMAKE_CUDA_COMPILER ${CMAKE_CUDA_COMPILER}") + +if( NOT CUDAToolkit_NVCC_EXECUTABLE STREQUAL CMAKE_CUDA_COMPILER) + message(FATAL_ERROR "CUDAToolkit_NVCC_EXECUTABLE ${CUDAToolkit_NVCC_EXECUTABLE} doesn't match CMAKE_CUDA_COMPILER ${CMAKE_CUDA_COMPILER}") +endif() + +add_executable(ToolkitBeforeLang main.cpp) +target_link_libraries(ToolkitBeforeLang PRIVATE CUDA::toolkit) diff --git a/Tests/Cuda/ToolkitBeforeLang/main.cpp b/Tests/Cuda/ToolkitBeforeLang/main.cpp new file mode 100644 index 0000000..c8d5c6b --- /dev/null +++ b/Tests/Cuda/ToolkitBeforeLang/main.cpp @@ -0,0 +1,8 @@ +// Only thing we care about is that these headers are found +#include <cuda.h> +#include <cuda_runtime_api.h> + +int main() +{ + return 0; +} diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index d46ee08..c145907 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -588,3 +588,12 @@ add_custom_target(drive_mac_fw ALL DEPENDS mac_fw.txt) # Test empty COMMANDs are omitted add_executable(empty_command empty_command.cxx) add_custom_command(TARGET empty_command POST_BUILD COMMAND $<0:date>) + +# Test OUTPUT allows filenames containing "#" on generators that support this +if(NOT CMAKE_GENERATOR MATCHES "Borland Makefiles") + add_custom_target(file_with_hash ALL DEPENDS "${PROJECT_BINARY_DIR}/hash#in#name.txt") + add_custom_command( + OUTPUT "${PROJECT_BINARY_DIR}/hash#in#name.txt" + COMMAND ${CMAKE_COMMAND} -E touch "${PROJECT_BINARY_DIR}/hash#in#name.txt" + ) +endif() diff --git a/Tests/CustomTransitiveProperties/CMakeLists.txt b/Tests/CustomTransitiveProperties/CMakeLists.txt new file mode 100644 index 0000000..83ceff5 --- /dev/null +++ b/Tests/CustomTransitiveProperties/CMakeLists.txt @@ -0,0 +1,146 @@ +cmake_minimum_required(VERSION 3.29) +cmake_policy(SET CMP0166 NEW) +project(CustomTransitiveProperties C) + +add_library(iface1 INTERFACE) +set_target_properties(iface1 PROPERTIES + TRANSITIVE_COMPILE_PROPERTIES "CUSTOM_A" # LINK_ONLY not pierced + TRANSITIVE_LINK_PROPERTIES "CUSTOM_U" # LINK_ONLY pierced + + INTERFACE_CUSTOM_A "CUSTOM_A_IFACE1;CUSTOM_A_TARGET_NAME_$<UPPER_CASE:$<TARGET_PROPERTY:NAME>>" + INTERFACE_CUSTOM_B "CUSTOM_B_IFACE1" + INTERFACE_CUSTOM_C "CUSTOM_C_IFACE1" + INTERFACE_CUSTOM_U "CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_$<UPPER_CASE:$<TARGET_PROPERTY:NAME>>" + INTERFACE_CUSTOM_V "CUSTOM_V_IFACE1" + INTERFACE_CUSTOM_W "CUSTOM_W_IFACE1" + ) + +add_library(iface2 INTERFACE) +set_target_properties(iface2 PROPERTIES + INTERFACE_CUSTOM_A "CUSTOM_A_IFACE2;CUSTOM_A_TARGET_TYPE_$<TARGET_PROPERTY:TYPE>" + INTERFACE_CUSTOM_U "CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_$<TARGET_PROPERTY:TYPE>" + ) +target_link_libraries(iface2 INTERFACE iface1) + +# Test that the INTERFACE prefix is removed. +set(unnecessary_INTERFACE_ "INTERFACE_") + +add_library(static1 STATIC static1.c) +target_link_libraries(static1 PRIVATE iface2) +set_target_properties(static1 PROPERTIES + TRANSITIVE_COMPILE_PROPERTIES "${unnecessary_INTERFACE_}CUSTOM_B" # LINK_ONLY not pierced + TRANSITIVE_LINK_PROPERTIES "${unnecessary_INTERFACE_}CUSTOM_V" # LINK_ONLY pierced + + CUSTOM_A "CUSTOM_A_STATIC1" + CUSTOM_B "CUSTOM_B_STATIC1" + CUSTOM_U "CUSTOM_U_STATIC1" + CUSTOM_V "CUSTOM_V_STATIC1" + INTERFACE_CUSTOM_A "CUSTOM_A_STATIC1_IFACE" + INTERFACE_CUSTOM_B "CUSTOM_B_STATIC1_IFACE" + INTERFACE_CUSTOM_U "CUSTOM_U_STATIC1_IFACE" + INTERFACE_CUSTOM_V "CUSTOM_V_STATIC1_IFACE" + ) +target_compile_definitions(static1 PRIVATE + $<TARGET_PROPERTY:CUSTOM_A> + $<TARGET_PROPERTY:CUSTOM_B> + $<TARGET_PROPERTY:CUSTOM_U> + $<TARGET_PROPERTY:CUSTOM_V> + ) + +add_library(object1 OBJECT object1.c) +target_link_libraries(object1 PRIVATE iface2) +set_target_properties(object1 PROPERTIES + TRANSITIVE_COMPILE_PROPERTIES "${unnecessary_INTERFACE_}CUSTOM_C" # LINK_ONLY not pierced + TRANSITIVE_LINK_PROPERTIES "${unnecessary_INTERFACE_}CUSTOM_W" # LINK_ONLY pierced + + CUSTOM_A "CUSTOM_A_OBJECT1" + CUSTOM_C "CUSTOM_C_OBJECT1" + CUSTOM_U "CUSTOM_U_OBJECT1" + CUSTOM_W "CUSTOM_W_OBJECT1" + INTERFACE_CUSTOM_A "CUSTOM_A_OBJECT1_IFACE" + INTERFACE_CUSTOM_C "CUSTOM_C_OBJECT1_IFACE" + INTERFACE_CUSTOM_U "CUSTOM_U_OBJECT1_IFACE" + INTERFACE_CUSTOM_W "CUSTOM_W_OBJECT1_IFACE" + ) +target_compile_definitions(object1 PRIVATE + $<TARGET_PROPERTY:CUSTOM_A> + $<TARGET_PROPERTY:CUSTOM_C> + $<TARGET_PROPERTY:CUSTOM_U> + $<TARGET_PROPERTY:CUSTOM_W> + ) + +add_executable(CustomTransitiveProperties main.c) +target_link_libraries(CustomTransitiveProperties PRIVATE static1 object1) +set_target_properties(CustomTransitiveProperties PROPERTIES + CUSTOM_A "CUSTOM_A_MAIN" + CUSTOM_B "CUSTOM_B_MAIN" + CUSTOM_C "CUSTOM_C_MAIN" + CUSTOM_U "CUSTOM_U_MAIN" + CUSTOM_V "CUSTOM_V_MAIN" + CUSTOM_W "CUSTOM_W_MAIN" + ) + +# Test TRANSITIVE_*_PROPERTY evaluation within usage requirements. +target_compile_definitions(CustomTransitiveProperties PRIVATE + $<TARGET_PROPERTY:CUSTOM_A> + $<TARGET_PROPERTY:CUSTOM_B> + $<TARGET_PROPERTY:CUSTOM_C> + $<TARGET_PROPERTY:CUSTOM_U> + $<TARGET_PROPERTY:CUSTOM_V> + $<TARGET_PROPERTY:CUSTOM_W> + ) + +# Test TRANSITIVE_*_PROPERTY evaluation outside of usage requirements. +set(out "${CMAKE_CURRENT_BINARY_DIR}/out-$<CONFIG>.txt") +file(GENERATE OUTPUT "${out}" CONTENT "# file(GENERATE) produced: +iface1 CUSTOM_A: '$<TARGET_PROPERTY:iface1,CUSTOM_A>' +iface1 INTERFACE_CUSTOM_A: '$<TARGET_PROPERTY:iface1,INTERFACE_CUSTOM_A>' +iface2 CUSTOM_A: '$<TARGET_PROPERTY:iface2,CUSTOM_A>' +iface2 INTERFACE_CUSTOM_A: '$<TARGET_PROPERTY:iface2,INTERFACE_CUSTOM_A>' +static1 CUSTOM_A: '$<TARGET_PROPERTY:static1,CUSTOM_A>' +static1 INTERFACE_CUSTOM_A: '$<TARGET_PROPERTY:static1,INTERFACE_CUSTOM_A>' +static1 CUSTOM_B: '$<TARGET_PROPERTY:static1,CUSTOM_B>' +static1 INTERFACE_CUSTOM_B: '$<TARGET_PROPERTY:static1,INTERFACE_CUSTOM_B>' +static1 CUSTOM_U: '$<TARGET_PROPERTY:static1,CUSTOM_U>' +static1 INTERFACE_CUSTOM_U: '$<TARGET_PROPERTY:static1,INTERFACE_CUSTOM_U>' +static1 CUSTOM_V: '$<TARGET_PROPERTY:static1,CUSTOM_V>' +static1 INTERFACE_CUSTOM_V: '$<TARGET_PROPERTY:static1,INTERFACE_CUSTOM_V>' +object1 CUSTOM_A: '$<TARGET_PROPERTY:object1,CUSTOM_A>' +object1 INTERFACE_CUSTOM_A: '$<TARGET_PROPERTY:object1,INTERFACE_CUSTOM_A>' +object1 CUSTOM_C: '$<TARGET_PROPERTY:object1,CUSTOM_C>' +object1 INTERFACE_CUSTOM_C: '$<TARGET_PROPERTY:object1,INTERFACE_CUSTOM_C>' +object1 CUSTOM_U: '$<TARGET_PROPERTY:object1,CUSTOM_U>' +object1 INTERFACE_CUSTOM_U: '$<TARGET_PROPERTY:object1,INTERFACE_CUSTOM_U>' +object1 CUSTOM_W: '$<TARGET_PROPERTY:object1,CUSTOM_W>' +object1 INTERFACE_CUSTOM_W: '$<TARGET_PROPERTY:object1,INTERFACE_CUSTOM_W>' +main CUSTOM_A: '$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_A>' +main INTERFACE_CUSTOM_A: '$<TARGET_PROPERTY:CustomTransitiveProperties,INTERFACE_CUSTOM_A>' +main CUSTOM_B: '$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_B>' +main INTERFACE_CUSTOM_B: '$<TARGET_PROPERTY:CustomTransitiveProperties,INTERFACE_CUSTOM_B>' +main CUSTOM_C: '$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_C>' +main INTERFACE_CUSTOM_C: '$<TARGET_PROPERTY:CustomTransitiveProperties,INTERFACE_CUSTOM_C>' +main CUSTOM_U: '$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_U>' +main INTERFACE_CUSTOM_U: '$<TARGET_PROPERTY:CustomTransitiveProperties,INTERFACE_CUSTOM_U>' +main CUSTOM_V: '$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_V>' +main INTERFACE_CUSTOM_V: '$<TARGET_PROPERTY:CustomTransitiveProperties,INTERFACE_CUSTOM_V>' +main CUSTOM_W: '$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_W>' +main INTERFACE_CUSTOM_W: '$<TARGET_PROPERTY:CustomTransitiveProperties,INTERFACE_CUSTOM_W>' +") +add_custom_target(check ALL VERBATIM + COMMAND ${CMAKE_COMMAND} -Dconfig=$<CONFIG> -Dout=${out} -P${CMAKE_CURRENT_SOURCE_DIR}/check.cmake + COMMAND CustomTransitiveProperties + "$<TARGET_PROPERTY:static1,CUSTOM_A>" "CUSTOM_A_STATIC1;CUSTOM_A_IFACE2;CUSTOM_A_TARGET_TYPE_STATIC_LIBRARY;CUSTOM_A_IFACE1;CUSTOM_A_TARGET_NAME_STATIC1" + "$<TARGET_PROPERTY:static1,CUSTOM_B>" "CUSTOM_B_STATIC1;CUSTOM_B_IFACE1" + "$<TARGET_PROPERTY:static1,CUSTOM_U>" "CUSTOM_U_STATIC1;CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_STATIC_LIBRARY;CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_STATIC1" + "$<TARGET_PROPERTY:static1,CUSTOM_V>" "CUSTOM_V_STATIC1;CUSTOM_V_IFACE1" + "$<TARGET_PROPERTY:object1,CUSTOM_A>" "CUSTOM_A_OBJECT1;CUSTOM_A_IFACE2;CUSTOM_A_TARGET_TYPE_OBJECT_LIBRARY;CUSTOM_A_IFACE1;CUSTOM_A_TARGET_NAME_OBJECT1" + "$<TARGET_PROPERTY:object1,CUSTOM_C>" "CUSTOM_C_OBJECT1;CUSTOM_C_IFACE1" + "$<TARGET_PROPERTY:object1,CUSTOM_U>" "CUSTOM_U_OBJECT1;CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_OBJECT_LIBRARY;CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_OBJECT1" + "$<TARGET_PROPERTY:object1,CUSTOM_W>" "CUSTOM_W_OBJECT1;CUSTOM_W_IFACE1" + "$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_A>" "CUSTOM_A_MAIN" + "$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_B>" "CUSTOM_B_MAIN;CUSTOM_B_STATIC1_IFACE" + "$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_C>" "CUSTOM_C_MAIN;CUSTOM_C_OBJECT1_IFACE" + "$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_U>" "CUSTOM_U_MAIN;CUSTOM_U_STATIC1_IFACE;CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_EXECUTABLE;CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_CUSTOMTRANSITIVEPROPERTIES;CUSTOM_U_OBJECT1_IFACE" + "$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_V>" "CUSTOM_V_MAIN;CUSTOM_V_STATIC1_IFACE;CUSTOM_V_IFACE1" + "$<TARGET_PROPERTY:CustomTransitiveProperties,CUSTOM_W>" "CUSTOM_W_MAIN;CUSTOM_W_IFACE1;CUSTOM_W_OBJECT1_IFACE" + ) diff --git a/Tests/CustomTransitiveProperties/check.cmake b/Tests/CustomTransitiveProperties/check.cmake new file mode 100644 index 0000000..d7130c8 --- /dev/null +++ b/Tests/CustomTransitiveProperties/check.cmake @@ -0,0 +1,47 @@ +set(expect [[ +# file\(GENERATE\) produced: +iface1 CUSTOM_A: '' +iface1 INTERFACE_CUSTOM_A: 'CUSTOM_A_IFACE1;CUSTOM_A_TARGET_NAME_IFACE1' +iface2 CUSTOM_A: '' +iface2 INTERFACE_CUSTOM_A: 'CUSTOM_A_IFACE2;CUSTOM_A_TARGET_TYPE_INTERFACE_LIBRARY;CUSTOM_A_IFACE1;CUSTOM_A_TARGET_NAME_IFACE2' +static1 CUSTOM_A: 'CUSTOM_A_STATIC1;CUSTOM_A_IFACE2;CUSTOM_A_TARGET_TYPE_STATIC_LIBRARY;CUSTOM_A_IFACE1;CUSTOM_A_TARGET_NAME_STATIC1' +static1 INTERFACE_CUSTOM_A: 'CUSTOM_A_STATIC1_IFACE' +static1 CUSTOM_B: 'CUSTOM_B_STATIC1;CUSTOM_B_IFACE1' +static1 INTERFACE_CUSTOM_B: 'CUSTOM_B_STATIC1_IFACE' +static1 CUSTOM_U: 'CUSTOM_U_STATIC1;CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_STATIC_LIBRARY;CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_STATIC1' +static1 INTERFACE_CUSTOM_U: 'CUSTOM_U_STATIC1_IFACE;CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_STATIC_LIBRARY;CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_STATIC1' +static1 CUSTOM_V: 'CUSTOM_V_STATIC1;CUSTOM_V_IFACE1' +static1 INTERFACE_CUSTOM_V: 'CUSTOM_V_STATIC1_IFACE;CUSTOM_V_IFACE1' +object1 CUSTOM_A: 'CUSTOM_A_OBJECT1;CUSTOM_A_IFACE2;CUSTOM_A_TARGET_TYPE_OBJECT_LIBRARY;CUSTOM_A_IFACE1;CUSTOM_A_TARGET_NAME_OBJECT1' +object1 INTERFACE_CUSTOM_A: 'CUSTOM_A_OBJECT1_IFACE' +object1 CUSTOM_C: 'CUSTOM_C_OBJECT1;CUSTOM_C_IFACE1' +object1 INTERFACE_CUSTOM_C: 'CUSTOM_C_OBJECT1_IFACE' +object1 CUSTOM_U: 'CUSTOM_U_OBJECT1;CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_OBJECT_LIBRARY;CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_OBJECT1' +object1 INTERFACE_CUSTOM_U: 'CUSTOM_U_OBJECT1_IFACE;CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_OBJECT_LIBRARY;CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_OBJECT1' +object1 CUSTOM_W: 'CUSTOM_W_OBJECT1;CUSTOM_W_IFACE1' +object1 INTERFACE_CUSTOM_W: 'CUSTOM_W_OBJECT1_IFACE;CUSTOM_W_IFACE1' +main CUSTOM_A: 'CUSTOM_A_MAIN' +main INTERFACE_CUSTOM_A: '' +main CUSTOM_B: 'CUSTOM_B_MAIN;CUSTOM_B_STATIC1_IFACE' +main INTERFACE_CUSTOM_B: '' +main CUSTOM_C: 'CUSTOM_C_MAIN;CUSTOM_C_OBJECT1_IFACE' +main INTERFACE_CUSTOM_C: '' +main CUSTOM_U: 'CUSTOM_U_MAIN;CUSTOM_U_STATIC1_IFACE;CUSTOM_U_IFACE2;CUSTOM_U_TARGET_TYPE_EXECUTABLE;CUSTOM_U_IFACE1;CUSTOM_U_TARGET_NAME_CUSTOMTRANSITIVEPROPERTIES;CUSTOM_U_OBJECT1_IFACE' +main INTERFACE_CUSTOM_U: '' +main CUSTOM_V: 'CUSTOM_V_MAIN;CUSTOM_V_STATIC1_IFACE;CUSTOM_V_IFACE1' +main INTERFACE_CUSTOM_V: '' +main CUSTOM_W: 'CUSTOM_W_MAIN;CUSTOM_W_IFACE1;CUSTOM_W_OBJECT1_IFACE' +main INTERFACE_CUSTOM_W: '' +]]) +string(REGEX REPLACE "\r\n" "\n" expect "${expect}") +string(REGEX REPLACE "\n+$" "" expect "${expect}") + +file(READ "${out}" actual) +string(REGEX REPLACE "\r\n" "\n" actual "${actual}") +string(REGEX REPLACE "\n+$" "" actual "${actual}") + +if(NOT actual MATCHES "^${expect}$") + string(REPLACE "\n" "\n expect> " expect " expect> ${expect}") + string(REPLACE "\n" "\n actual> " actual " actual> ${actual}") + message(FATAL_ERROR "Expected file(GENERATE) output:\n${expect}\ndoes not match actual output:\n${actual}") +endif() diff --git a/Tests/CustomTransitiveProperties/main.c b/Tests/CustomTransitiveProperties/main.c new file mode 100644 index 0000000..ab70eb0 --- /dev/null +++ b/Tests/CustomTransitiveProperties/main.c @@ -0,0 +1,137 @@ +#include <stdio.h> +#include <string.h> + +#ifdef CUSTOM_A_IFACE1 +# error "CUSTOM_A_IFACE1 incorrectly defined" +#endif + +#ifdef CUSTOM_A_IFACE2 +# error "CUSTOM_A_IFACE2 incorrectly defined" +#endif + +#ifdef CUSTOM_A_STATIC1_IFACE +# error "CUSTOM_A_STATIC1_IFACE incorrectly defined" +#endif + +#ifdef CUSTOM_A_OBJECT1_IFACE +# error "CUSTOM_A_OBJECT1_IFACE incorrectly defined" +#endif + +#ifndef CUSTOM_A_MAIN +# error "CUSTOM_A_MAIN incorrectly not defined" +#endif + +#ifdef CUSTOM_B_IFACE1 +# error "CUSTOM_B_IFACE1 incorrectly defined" +#endif + +#ifndef CUSTOM_B_STATIC1_IFACE +# error "CUSTOM_B_STATIC1_IFACE incorrectly not defined" +#endif + +#ifndef CUSTOM_B_MAIN +# error "CUSTOM_B_MAIN incorrectly not defined" +#endif + +#ifdef CUSTOM_C_IFACE1 +# error "CUSTOM_C_IFACE1 incorrectly defined" +#endif + +#ifndef CUSTOM_C_OBJECT1_IFACE +# error "CUSTOM_C_OBJECT1_IFACE incorrectly not defined" +#endif + +#ifndef CUSTOM_C_MAIN +# error "CUSTOM_C_MAIN incorrectly not defined" +#endif + +#ifndef CUSTOM_U_IFACE1 +# error "CUSTOM_U_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_IFACE2 +# error "CUSTOM_U_IFACE2 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_MAIN +# error "CUSTOM_U_MAIN incorrectly not defined" +#endif + +#ifdef CUSTOM_U_STATIC1 +# error "CUSTOM_U_STATIC1 incorrectly defined" +#endif + +#ifndef CUSTOM_U_STATIC1_IFACE +# error "CUSTOM_U_STATIC1_IFACE incorrectly not defined" +#endif + +#ifdef CUSTOM_U_OBJECT1 +# error "CUSTOM_U_OBJECT1 incorrectly defined" +#endif + +#ifndef CUSTOM_U_OBJECT1_IFACE +# error "CUSTOM_U_OBJECT1_IFACE incorrectly not defined" +#endif + +#ifndef CUSTOM_U_TARGET_NAME_CUSTOMTRANSITIVEPROPERTIES +# error \ + "CUSTOM_U_TARGET_NAME_CUSTOMTRANSITIVEPROPERTIES incorrectly not defined" +#endif + +#ifndef CUSTOM_U_TARGET_TYPE_EXECUTABLE +# error "CUSTOM_U_TARGET_TYPE_EXECUTABLE incorrectly not defined" +#endif + +#ifndef CUSTOM_V_IFACE1 +# error "CUSTOM_V_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_V_MAIN +# error "CUSTOM_V_MAIN incorrectly not defined" +#endif + +#ifdef CUSTOM_V_STATIC1 +# error "CUSTOM_V_STATIC1 incorrectly defined" +#endif + +#ifndef CUSTOM_V_STATIC1_IFACE +# error "CUSTOM_V_STATIC1_IFACE incorrectly not defined" +#endif + +#ifndef CUSTOM_W_IFACE1 +# error "CUSTOM_W_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_W_MAIN +# error "CUSTOM_W_MAIN incorrectly not defined" +#endif + +#ifdef CUSTOM_W_OBJECT1 +# error "CUSTOM_W_OBJECT1 incorrectly defined" +#endif + +#ifndef CUSTOM_W_OBJECT1_IFACE +# error "CUSTOM_W_OBJECT1_IFACE incorrectly not defined" +#endif + +extern int static1(void); +extern int object1(void); + +int check_args(int argc, char** argv) +{ + int result = 0; + int i; + for (i = 2; i < argc; i += 2) { + if (strcmp(argv[i - 1], argv[i]) != 0) { + fprintf(stderr, "Argument %d expected '%s' but got '%s'.\n", i, argv[i], + argv[i - 1]); + result = 1; + } + } + return result; +} + +int main(int argc, char** argv) +{ + return static1() + object1() + check_args(argc, argv); +} diff --git a/Tests/CustomTransitiveProperties/object1.c b/Tests/CustomTransitiveProperties/object1.c new file mode 100644 index 0000000..4454118 --- /dev/null +++ b/Tests/CustomTransitiveProperties/object1.c @@ -0,0 +1,64 @@ +#ifndef CUSTOM_A_IFACE1 +# error "CUSTOM_A_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_A_IFACE2 +# error "CUSTOM_A_IFACE2 incorrectly not defined" +#endif + +#ifndef CUSTOM_A_OBJECT1 +# error "CUSTOM_A_OBJECT1 incorrectly not defined" +#endif + +#ifndef CUSTOM_A_TARGET_NAME_OBJECT1 +# error "CUSTOM_A_TARGET_NAME_OBJECT1 incorrectly not defined" +#endif + +#ifndef CUSTOM_A_TARGET_TYPE_OBJECT_LIBRARY +# error "CUSTOM_A_TARGET_TYPE_OBJECT_LIBRARY incorrectly not defined" +#endif + +#ifndef CUSTOM_C_IFACE1 +# error "CUSTOM_C_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_C_OBJECT1 +# error "CUSTOM_C_OBJECT1 incorrectly not defined" +#endif + +#ifdef CUSTOM_C_OBJECT1_IFACE +# error "CUSTOM_C_OBJECT1_IFACE incorrectly defined" +#endif + +#ifndef CUSTOM_U_IFACE1 +# error "CUSTOM_U_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_IFACE2 +# error "CUSTOM_U_IFACE2 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_OBJECT1 +# error "CUSTOM_U_OBJECT1 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_TARGET_NAME_OBJECT1 +# error "CUSTOM_U_TARGET_NAME_OBJECT1 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_TARGET_TYPE_OBJECT_LIBRARY +# error "CUSTOM_U_TARGET_TYPE_OBJECT_LIBRARY incorrectly not defined" +#endif + +#ifndef CUSTOM_W_IFACE1 +# error "CUSTOM_W_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_W_OBJECT1 +# error "CUSTOM_W_OBJECT1 incorrectly not defined" +#endif + +int object1(void) +{ + return 0; +} diff --git a/Tests/CustomTransitiveProperties/static1.c b/Tests/CustomTransitiveProperties/static1.c new file mode 100644 index 0000000..45e9507 --- /dev/null +++ b/Tests/CustomTransitiveProperties/static1.c @@ -0,0 +1,64 @@ +#ifndef CUSTOM_A_IFACE1 +# error "CUSTOM_A_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_A_IFACE2 +# error "CUSTOM_A_IFACE2 incorrectly not defined" +#endif + +#ifndef CUSTOM_A_STATIC1 +# error "CUSTOM_A_STATIC1 incorrectly not defined" +#endif + +#ifndef CUSTOM_A_TARGET_NAME_STATIC1 +# error "CUSTOM_A_TARGET_NAME_STATIC1 incorrectly not defined" +#endif + +#ifndef CUSTOM_A_TARGET_TYPE_STATIC_LIBRARY +# error "CUSTOM_A_TARGET_TYPE_STATIC_LIBRARY incorrectly not defined" +#endif + +#ifndef CUSTOM_B_IFACE1 +# error "CUSTOM_B_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_B_STATIC1 +# error "CUSTOM_B_STATIC1 incorrectly not defined" +#endif + +#ifdef CUSTOM_B_STATIC1_IFACE +# error "CUSTOM_B_STATIC1_IFACE incorrectly defined" +#endif + +#ifndef CUSTOM_U_IFACE1 +# error "CUSTOM_U_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_IFACE2 +# error "CUSTOM_U_IFACE2 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_STATIC1 +# error "CUSTOM_U_STATIC1 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_TARGET_NAME_STATIC1 +# error "CUSTOM_U_TARGET_NAME_STATIC1 incorrectly not defined" +#endif + +#ifndef CUSTOM_U_TARGET_TYPE_STATIC_LIBRARY +# error "CUSTOM_U_TARGET_TYPE_STATIC_LIBRARY incorrectly not defined" +#endif + +#ifndef CUSTOM_V_IFACE1 +# error "CUSTOM_V_IFACE1 incorrectly not defined" +#endif + +#ifndef CUSTOM_V_STATIC1 +# error "CUSTOM_V_STATIC1 incorrectly not defined" +#endif + +int static1(void) +{ + return 0; +} diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 0b7f739..28118ba 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -29,6 +29,9 @@ add_library(compileOnly INTERFACE) target_compile_definitions(compileOnly INTERFACE FROM_compileOnly) target_link_options(compileOnly INTERFACE -fthis-flag-does-not-exist) +add_library(noUses INTERFACE) +target_link_libraries(noUses INTERFACE this::target_does_not_exist) + add_library(testLib1 STATIC testLib1.c) add_library(testLib2 STATIC testLib2.c) target_link_libraries(testLib2 testLib1) @@ -116,6 +119,37 @@ target_link_libraries(testLib9 INTERFACE testLib9ObjIface PUBLIC testLib9ObjPub target_link_libraries(testLib9 PUBLIC Foo::Foo) cmake_policy(POP) +block() + cmake_policy(SET CMP0022 NEW) + add_library(testLib10 STATIC testLib10.c) + set_target_properties(testLib10 PROPERTIES + TRANSITIVE_COMPILE_PROPERTIES "CUSTOM_C" + TRANSITIVE_LINK_PROPERTIES "CUSTOM_L" + INTERFACE_CUSTOM_C "TESTLIB10_INTERFACE_CUSTOM_C" + INTERFACE_CUSTOM_L "TESTLIB10_INTERFACE_CUSTOM_L" + ) + target_compile_definitions(testLib10 INTERFACE + "$<TARGET_PROPERTY:CUSTOM_C>" + "$<TARGET_PROPERTY:CUSTOM_L>" + ) + add_library(testLib11 STATIC testLib11.c) + target_link_libraries(testLib11 PRIVATE testLib10) + set_target_properties(testLib11 PROPERTIES + INTERFACE_CUSTOM_C "TESTLIB11_INTERFACE_CUSTOM_C" + INTERFACE_CUSTOM_L "TESTLIB11_INTERFACE_CUSTOM_L" + TRANSITIVE_COMPILE_PROPERTIES "CUSTOM_D" + TRANSITIVE_LINK_PROPERTIES "CUSTOM_M" + INTERFACE_CUSTOM_D "TESTLIB11_INTERFACE_CUSTOM_D" + INTERFACE_CUSTOM_M "TESTLIB11_INTERFACE_CUSTOM_M" + ) + target_compile_definitions(testLib11 INTERFACE + "$<TARGET_PROPERTY:CUSTOM_C>" + "$<TARGET_PROPERTY:CUSTOM_D>" + "$<TARGET_PROPERTY:CUSTOM_L>" + "$<TARGET_PROPERTY:CUSTOM_M>" + ) +endblock() + # Test using the target_link_libraries command to set the # LINK_INTERFACE_LIBRARIES* properties. We construct two libraries # providing the same two symbols. In each library one of the symbols @@ -570,10 +604,12 @@ install(FILES install( TARGETS compileOnly + noUses testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3 testExe4 testExe2lib testLib4lib testLib4libdbg testLib4libopt testLib6 testLib7 testLib8 testLib9 + testLib10 testLib11 testLibDeprecation testLibCycleA testLibCycleB testLibNoSONAME @@ -644,7 +680,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3 testSharedLibDepends renamed_on_export cmp0022NEW cmp0022OLD TopDirLib SubDirLinkA - systemlib + systemlib noUses testInterfaceIncludeUser testInterfaceIncludeUser2 NAMESPACE bld_ @@ -653,6 +689,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3 export(TARGETS testExe2 testLib4 testLib5 testLib6 testLib7 testExe3 testExe4 testExe2lib testLib8 testLib9 testLib9ObjPub testLib9ObjPriv testLib9ObjIface + testLib10 testLib11 testLibDeprecation testLib4lib testLib4libdbg testLib4libopt testLibCycleA testLibCycleB diff --git a/Tests/ExportImport/Export/testLib10.c b/Tests/ExportImport/Export/testLib10.c new file mode 100644 index 0000000..d5ecb7f --- /dev/null +++ b/Tests/ExportImport/Export/testLib10.c @@ -0,0 +1,4 @@ +int testLib10(void) +{ + return 0; +} diff --git a/Tests/ExportImport/Export/testLib11.c b/Tests/ExportImport/Export/testLib11.c new file mode 100644 index 0000000..b288b29 --- /dev/null +++ b/Tests/ExportImport/Export/testLib11.c @@ -0,0 +1,6 @@ +int testLib10(void); + +int testLib11(void) +{ + return testLib10(); +} diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt index 2a57633..632825d 100644 --- a/Tests/ExportImport/Import/A/CMakeLists.txt +++ b/Tests/ExportImport/Import/A/CMakeLists.txt @@ -328,6 +328,16 @@ foreach(vis Pub Priv Iface) endif() endforeach() +# Create executables to verify custom transitive properties. +add_executable(imp_testLib10 imp_testLib10.c) +target_link_libraries(imp_testLib10 PRIVATE exp_testLib10) +add_executable(imp_testLib10b imp_testLib10.c) +target_link_libraries(imp_testLib10b PRIVATE bld_testLib10) +add_executable(imp_testLib11 imp_testLib11.c) +target_link_libraries(imp_testLib11 PRIVATE exp_testLib11) +add_executable(imp_testLib11b imp_testLib11.c) +target_link_libraries(imp_testLib11b PRIVATE bld_testLib11) + #----------------------------------------------------------------------------- # Test that handling imported targets, including transitive dependencies, # works in CheckFunctionExists (...and hopefully all other try_compile() checks diff --git a/Tests/ExportImport/Import/A/imp_testLib10.c b/Tests/ExportImport/Import/A/imp_testLib10.c new file mode 100644 index 0000000..5d6e823 --- /dev/null +++ b/Tests/ExportImport/Import/A/imp_testLib10.c @@ -0,0 +1,14 @@ +#ifndef TESTLIB10_INTERFACE_CUSTOM_C +# error "TESTLIB10_INTERFACE_CUSTOM_C incorrectly not defined!" +#endif + +#ifndef TESTLIB10_INTERFACE_CUSTOM_L +# error "TESTLIB10_INTERFACE_CUSTOM_L incorrectly not defined!" +#endif + +int testLib10(void); + +int main(void) +{ + return testLib10(); +} diff --git a/Tests/ExportImport/Import/A/imp_testLib11.c b/Tests/ExportImport/Import/A/imp_testLib11.c new file mode 100644 index 0000000..e8e10e6 --- /dev/null +++ b/Tests/ExportImport/Import/A/imp_testLib11.c @@ -0,0 +1,30 @@ +#ifdef TESTLIB10_INTERFACE_CUSTOM_C +# error "TESTLIB10_INTERFACE_CUSTOM_C incorrectly defined!" +#endif + +#ifdef TESTLIB11_INTERFACE_CUSTOM_C +# error "TESTLIB11_INTERFACE_CUSTOM_C incorrectly defined!" +#endif + +#ifndef TESTLIB11_INTERFACE_CUSTOM_D +# error "TESTLIB11_INTERFACE_CUSTOM_D incorrectly not defined!" +#endif + +#ifndef TESTLIB10_INTERFACE_CUSTOM_L +# error "TESTLIB10_INTERFACE_CUSTOM_L incorrectly not defined!" +#endif + +#ifndef TESTLIB11_INTERFACE_CUSTOM_L +# error "TESTLIB11_INTERFACE_CUSTOM_L incorrectly not defined!" +#endif + +#ifndef TESTLIB11_INTERFACE_CUSTOM_M +# error "TESTLIB11_INTERFACE_CUSTOM_M incorrectly not defined!" +#endif + +int testLib11(void); + +int main(void) +{ + return testLib11(); +} diff --git a/Tests/FindBacktrace/CMakeLists.txt b/Tests/FindBacktrace/CMakeLists.txt new file mode 100644 index 0000000..8ee2a4d --- /dev/null +++ b/Tests/FindBacktrace/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindBacktrace.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindBacktrace/Test" + "${CMake_BINARY_DIR}/Tests/FindBacktrace/Test" + ${build_generator_args} + --build-project TestFindBacktrace + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) diff --git a/Tests/FindBacktrace/Test/CMakeLists.txt b/Tests/FindBacktrace/Test/CMakeLists.txt new file mode 100644 index 0000000..7f5d8ec --- /dev/null +++ b/Tests/FindBacktrace/Test/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.29) +project(TestFindBLAS C) +include(CTest) + +find_package(Backtrace REQUIRED) + +add_executable(test_tgt backtrace.c) +target_link_libraries(test_tgt Backtrace::Backtrace) +target_compile_options(test_tgt PUBLIC -rdynamic -fno-omit-frame-pointer) +target_link_options(test_tgt PUBLIC -rdynamic -fno-omit-frame-pointer) +add_test(NAME test_tgt COMMAND test_tgt) diff --git a/Tests/FindBacktrace/Test/backtrace.c b/Tests/FindBacktrace/Test/backtrace.c new file mode 100644 index 0000000..e143bc7 --- /dev/null +++ b/Tests/FindBacktrace/Test/backtrace.c @@ -0,0 +1,56 @@ +/* This is the code from `man backtrace_symbols`, reformatted, and without + * requiring a command-line argument */ + +#include <execinfo.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +#define BT_BUF_SIZE 100 + +void myfunc3(void) +{ + int nptrs; + void* buffer[BT_BUF_SIZE]; + char** strings; + size_t j; + + nptrs = backtrace(buffer, BT_BUF_SIZE); + printf("backtrace() returned %d addresses\n", nptrs); + + /* The call backtrace_symbols_fd(buffer, nptrs, STDOUT_FILENO) + would produce similar output to the following: */ + + strings = backtrace_symbols(buffer, nptrs); + if (strings == NULL) { + perror("backtrace_symbols"); + exit(EXIT_FAILURE); + } + + for (j = 0; j < nptrs; j++) { + printf("%s\n", strings[j]); + } + + free(strings); +} + +static void /* "static" means don't export the symbol... */ +myfunc2(void) +{ + myfunc3(); +} + +void myfunc(int ncalls) +{ + if (ncalls > 1) { + myfunc(ncalls - 1); + } else { + myfunc2(); + } +} + +int main(int argc, char* argv[]) +{ + myfunc(5); + exit(EXIT_SUCCESS); +} diff --git a/Tests/FindGTK2/gdk/main.c b/Tests/FindGTK2/gdk/main.c index 71f523b..2d03fbe 100644 --- a/Tests/FindGTK2/gdk/main.c +++ b/Tests/FindGTK2/gdk/main.c @@ -2,6 +2,6 @@ int main(int argc, char* argv[]) { - gdk_init(argc, argv); + gdk_init(&argc, &argv); return 0; } diff --git a/Tests/FindJasper/Test/CMakeLists.txt b/Tests/FindJasper/Test/CMakeLists.txt index 1e9467d..93873bf 100644 --- a/Tests/FindJasper/Test/CMakeLists.txt +++ b/Tests/FindJasper/Test/CMakeLists.txt @@ -4,7 +4,7 @@ include(CTest) find_package(Jasper) -add_definitions(-DCMAKE_EXPECTED_JASPER_VERSION=${JASPER_VERSION_STRING}) +add_definitions(-DCMAKE_EXPECTED_JASPER_VERSION="${JASPER_VERSION_STRING}") add_executable(test_jasper_tgt main.c) target_link_libraries(test_jasper_tgt Jasper::Jasper) diff --git a/Tests/FindJasper/Test/main.c b/Tests/FindJasper/Test/main.c index 242ff7d..b9dbe1e 100644 --- a/Tests/FindJasper/Test/main.c +++ b/Tests/FindJasper/Test/main.c @@ -1,17 +1,11 @@ -#include <assert.h> -// clang-format off -#include <stdio.h> #include <jasper/jasper.h> -// clang-format on +#include <string.h> int main(void) { - /* Without any JPEG file to open, test that the call fails as - expected. This tests that linking worked. */ - jas_init(); - jas_image_t* img = jas_image_create0(); - jas_image_destroy(img); - jas_cleanup(); - - return (JAS_VERSION != CMAKE_EXPECTED_JASPER_VERSION); + jas_conf_clear(); + jas_conf_set_max_mem_usage(0x100000); + jas_init_library(); + jas_cleanup_library(); + return strcmp(JAS_VERSION, CMAKE_EXPECTED_JASPER_VERSION); } diff --git a/Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt b/Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt index 58db0ec..7e1bbae 100644 --- a/Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt +++ b/Tests/FindMatlab/no_implicit_link_checks/CMakeLists.txt @@ -58,7 +58,7 @@ endif() # Link separately with Matlab::mx and Matlab::mex to ensure that compilation # and run of the test is successful -target_link_libraries(cmake_matlab_test_wrapper1 PRIVATE Matlab::mx Matlab::mex) +target_link_libraries(cmake_matlab_test_wrapper1 Matlab::mx Matlab::mex) if(RUN_UNIT_TESTS) matlab_add_unit_test( diff --git a/Tests/FindMatlab/versions_checks/CMakeLists.txt b/Tests/FindMatlab/versions_checks/CMakeLists.txt index f203f4b..9a9e9a3 100644 --- a/Tests/FindMatlab/versions_checks/CMakeLists.txt +++ b/Tests/FindMatlab/versions_checks/CMakeLists.txt @@ -40,6 +40,9 @@ if(NOT release_name STREQUAL "dummy") message(FATAL_ERROR "version 14.9 does not give release dummy : '${release_name}' != dummy") endif() +# matlab_get_release_name_from_version does not describe what it does with release_name +# if the version requested does not exists, so make sure that release_name it is empty +set(release_name "") matlab_get_release_name_from_version("14.10" release_name) if(NOT release_name STREQUAL "") message(FATAL_ERROR "version 14.10 does not give empty release: '${release_name}' != ''") diff --git a/Tests/FindOpenACC/CMakeLists.txt b/Tests/FindOpenACC/CMakeLists.txt index ef7de65..1b6bcf2 100644 --- a/Tests/FindOpenACC/CMakeLists.txt +++ b/Tests/FindOpenACC/CMakeLists.txt @@ -1,11 +1,5 @@ - -set(langs C CXX) -if(NOT CMAKE_GENERATOR STREQUAL "Ninja") - list(APPEND langs Fortran) -endif() - -foreach(lang IN LISTS langs) - if(CMAKE_${lang}_COMPILER) +foreach(lang IN ITEMS C CXX Fortran) + if(CMake_TEST_FindOpenACC_${lang}) add_test(NAME FindOpenACC.Test${lang} COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --build-and-test diff --git a/Tests/FindOpenMP/Test/CMakeLists.txt b/Tests/FindOpenMP/Test/CMakeLists.txt index ebdb6b8..7ead835 100644 --- a/Tests/FindOpenMP/Test/CMakeLists.txt +++ b/Tests/FindOpenMP/Test/CMakeLists.txt @@ -26,8 +26,21 @@ foreach(c C CXX Fortran) endif() endforeach() +if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" + AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.30 + AND NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64") + set(test_msvc_runtime 1) + set(OpenMP_RUNTIME_MSVC "llvm") +endif() + find_package(OpenMP REQUIRED) +if(test_msvc_runtime) + if(NOT OpenMP_C_FLAGS STREQUAL "-openmp:llvm") + message(FATAL_ERROR "OpenMP_RUNTIME_MSVC='${OpenMP_RUNTIME_MSVC}' not honored: '${OpenMP_C_FLAGS}'") + endif() +endif() + foreach(c C CXX Fortran) if(NOT "${OpenMP_TEST_${c}}") continue() diff --git a/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt b/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt index 18f8fda..f92db5f 100644 --- a/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt +++ b/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestArtifactsInteractive LANGUAGES C) diff --git a/Tests/FindPython/CustomFailureMessage/CMakeLists.txt b/Tests/FindPython/CustomFailureMessage/CMakeLists.txt index e0148f3..e9d14f5 100644 --- a/Tests/FindPython/CustomFailureMessage/CMakeLists.txt +++ b/Tests/FindPython/CustomFailureMessage/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestCustomFailureMessage LANGUAGES NONE) diff --git a/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt b/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt index 0fb3036..d72d258 100644 --- a/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt +++ b/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestCustomFailureMessage.Check LANGUAGES NONE) diff --git a/Tests/FindPython/DifferentComponents/CMakeLists.txt b/Tests/FindPython/DifferentComponents/CMakeLists.txt index e3e7b36..e72b4bf 100644 --- a/Tests/FindPython/DifferentComponents/CMakeLists.txt +++ b/Tests/FindPython/DifferentComponents/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestDifferentComponents LANGUAGES C) diff --git a/Tests/FindPython/ExactVersion/CMakeLists.txt b/Tests/FindPython/ExactVersion/CMakeLists.txt index 1bd94c4..e3bb43b 100644 --- a/Tests/FindPython/ExactVersion/CMakeLists.txt +++ b/Tests/FindPython/ExactVersion/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestExactVersion LANGUAGES C) diff --git a/Tests/FindPython/FindPythonScript.cmake b/Tests/FindPython/FindPythonScript.cmake index 808496e..fa51f59 100644 --- a/Tests/FindPython/FindPythonScript.cmake +++ b/Tests/FindPython/FindPythonScript.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.15) if (PYTHON_MUST_NOT_BE_FOUND) find_package(${PYTHON_PACKAGE_NAME} QUIET) if (${PYTHON_PACKAGE_NAME}_FOUND) diff --git a/Tests/FindPython/Implementation/CMakeLists.txt b/Tests/FindPython/Implementation/CMakeLists.txt index 8086c16..da33034 100644 --- a/Tests/FindPython/Implementation/CMakeLists.txt +++ b/Tests/FindPython/Implementation/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestImplementation${Python_REQUESTED_IMPLEMENTATION} LANGUAGES NONE) diff --git a/Tests/FindPython/IronPython/CMakeLists.txt b/Tests/FindPython/IronPython/CMakeLists.txt index fd3182e..3c28527 100644 --- a/Tests/FindPython/IronPython/CMakeLists.txt +++ b/Tests/FindPython/IronPython/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestIronPython LANGUAGES NONE) diff --git a/Tests/FindPython/IronPython2/CMakeLists.txt b/Tests/FindPython/IronPython2/CMakeLists.txt index b623972..0a4dcb4 100644 --- a/Tests/FindPython/IronPython2/CMakeLists.txt +++ b/Tests/FindPython/IronPython2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestIronPython2 LANGUAGES NONE) diff --git a/Tests/FindPython/IronPython3/CMakeLists.txt b/Tests/FindPython/IronPython3/CMakeLists.txt index b09097a..f39b84d 100644 --- a/Tests/FindPython/IronPython3/CMakeLists.txt +++ b/Tests/FindPython/IronPython3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestIronPython3 LANGUAGES NONE) diff --git a/Tests/FindPython/MultiplePackages/CMakeLists.txt b/Tests/FindPython/MultiplePackages/CMakeLists.txt index 352a2f6f..6536e46 100644 --- a/Tests/FindPython/MultiplePackages/CMakeLists.txt +++ b/Tests/FindPython/MultiplePackages/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestMultiplePackages C) @@ -20,7 +20,7 @@ if (CMake_TEST_FindPython2) add_test (NAME python2_spam2 COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam3>" - "${Python2_EXECUTABLE}" -c "import spam2; spam2.system(\"cd\")") + "${Python2_INTERPRETER}" -c "import spam2; spam2.system(\"cd\")") endif() @@ -40,6 +40,6 @@ if (CMake_TEST_FindPython3) add_test (NAME python3_spam3 COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam3>" - "${Python3_EXECUTABLE}" -c "import spam3; spam3.system(\"cd\")") + "${Python3_INTERPRETER}" -c "import spam3; spam3.system(\"cd\")") endif() diff --git a/Tests/FindPython/NumPy/CMakeLists.txt b/Tests/FindPython/NumPy/CMakeLists.txt index 336bb83..c5552d8 100644 --- a/Tests/FindPython/NumPy/CMakeLists.txt +++ b/Tests/FindPython/NumPy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestNumPy LANGUAGES C) @@ -12,7 +12,7 @@ if(CMake_TEST_FindPython2_NumPy) add_test (NAME python2_arraytest COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:arraytest2>" - "${Python2_EXECUTABLE}" -c "import numpy; import arraytest2; arraytest2.vecsq(numpy.array([1, 2, 3]));") + "${Python2_INTERPRETER}" -c "import numpy; import arraytest2; arraytest2.vecsq(numpy.array([1, 2, 3]));") endif() @@ -26,6 +26,6 @@ if(CMake_TEST_FindPython3_NumPy) add_test (NAME python3_arraytest COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:arraytest3>" - "${Python3_EXECUTABLE}" -c "import numpy; import arraytest3; arraytest3.vecsq(numpy.array([1, 2, 3]));") + "${Python3_INTERPRETER}" -c "import numpy; import arraytest3; arraytest3.vecsq(numpy.array([1, 2, 3]));") endif() diff --git a/Tests/FindPython/NumPyOnly/CMakeLists.txt b/Tests/FindPython/NumPyOnly/CMakeLists.txt index 115cf2b..db7e68e 100644 --- a/Tests/FindPython/NumPyOnly/CMakeLists.txt +++ b/Tests/FindPython/NumPyOnly/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestNumPyOnly LANGUAGES C) diff --git a/Tests/FindPython/PyPy/CMakeLists.txt b/Tests/FindPython/PyPy/CMakeLists.txt index dfc22d8..2e8bc58 100644 --- a/Tests/FindPython/PyPy/CMakeLists.txt +++ b/Tests/FindPython/PyPy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPyPy LANGUAGES C) diff --git a/Tests/FindPython/PyPy2/CMakeLists.txt b/Tests/FindPython/PyPy2/CMakeLists.txt index 5b7ce30..2d89531 100644 --- a/Tests/FindPython/PyPy2/CMakeLists.txt +++ b/Tests/FindPython/PyPy2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPyPy2 LANGUAGES C) diff --git a/Tests/FindPython/PyPy3/CMakeLists.txt b/Tests/FindPython/PyPy3/CMakeLists.txt index b702c99..93388a0 100644 --- a/Tests/FindPython/PyPy3/CMakeLists.txt +++ b/Tests/FindPython/PyPy3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPyPy3 LANGUAGES C) diff --git a/Tests/FindPython/Python/CMakeLists.txt b/Tests/FindPython/Python/CMakeLists.txt index 85b1711..7074649 100644 --- a/Tests/FindPython/Python/CMakeLists.txt +++ b/Tests/FindPython/Python/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython LANGUAGES C) @@ -32,7 +32,7 @@ if (Python_REQUESTED_VERSION) add_test (NAME python_spam${Python_REQUESTED_VERSION} COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam${Python_REQUESTED_VERSION}>" - "${Python_EXECUTABLE}" -c "import spam${Python_REQUESTED_VERSION}; spam${Python_REQUESTED_VERSION}.system(\"cd\")") + "${Python_INTERPRETER}" -c "import spam${Python_REQUESTED_VERSION}; spam${Python_REQUESTED_VERSION}.system(\"cd\")") else() add_test(NAME findpython_script COMMAND "${CMAKE_COMMAND}" -DPYTHON_PACKAGE_NAME=Python diff --git a/Tests/FindPython/Python2/CMakeLists.txt b/Tests/FindPython/Python2/CMakeLists.txt index 95ed495..f858574 100644 --- a/Tests/FindPython/Python2/CMakeLists.txt +++ b/Tests/FindPython/Python2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython2 LANGUAGES C) @@ -39,7 +39,7 @@ target_compile_definitions (spam2 PRIVATE PYTHON2) add_test (NAME python2_spam2 COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam2>" - "${Python2_EXECUTABLE}" -c "import spam2; spam2.system(\"cd\")") + "${Python2_INTERPRETER}" -c "import spam2; spam2.system(\"cd\")") add_test(NAME findpython2_script COMMAND "${CMAKE_COMMAND}" -DPYTHON_PACKAGE_NAME=Python2 diff --git a/Tests/FindPython/Python2Embedded/CMakeLists.txt b/Tests/FindPython/Python2Embedded/CMakeLists.txt index d9b2d22..0a04f70 100644 --- a/Tests/FindPython/Python2Embedded/CMakeLists.txt +++ b/Tests/FindPython/Python2Embedded/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython2Embedded LANGUAGES C) diff --git a/Tests/FindPython/Python2Fail/CMakeLists.txt b/Tests/FindPython/Python2Fail/CMakeLists.txt index 7a6520d..7f7b906 100644 --- a/Tests/FindPython/Python2Fail/CMakeLists.txt +++ b/Tests/FindPython/Python2Fail/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython2Fail C) diff --git a/Tests/FindPython/Python2Module/CMakeLists.txt b/Tests/FindPython/Python2Module/CMakeLists.txt index 7334d7a..6fffad4 100644 --- a/Tests/FindPython/Python2Module/CMakeLists.txt +++ b/Tests/FindPython/Python2Module/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython2Module LANGUAGES C) @@ -34,4 +34,4 @@ target_compile_definitions (spam2 PRIVATE PYTHON2) add_test (NAME python2_spam2 COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam2>" - "${Python2_EXECUTABLE}" -c "import spam2; spam2.system(\"cd\")") + "${Python2_INTERPRETER}" -c "import spam2; spam2.system(\"cd\")") diff --git a/Tests/FindPython/Python2SABIModule/CMakeLists.txt b/Tests/FindPython/Python2SABIModule/CMakeLists.txt index ffbaa33..c43dedc 100644 --- a/Tests/FindPython/Python2SABIModule/CMakeLists.txt +++ b/Tests/FindPython/Python2SABIModule/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython2SABIModule LANGUAGES C) diff --git a/Tests/FindPython/Python3/CMakeLists.txt b/Tests/FindPython/Python3/CMakeLists.txt index 42d31f2..28f68e1 100644 --- a/Tests/FindPython/Python3/CMakeLists.txt +++ b/Tests/FindPython/Python3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython3 LANGUAGES C) @@ -39,7 +39,7 @@ target_compile_definitions (spam3 PRIVATE PYTHON3) add_test (NAME python3_spam3 COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam3>" - "${Python3_EXECUTABLE}" -c "import spam3; spam3.system(\"cd\")") + "${Python3_INTERPRETER}" -c "import spam3; spam3.system(\"cd\")") add_test(NAME findpython3_script COMMAND "${CMAKE_COMMAND}" -DPYTHON_PACKAGE_NAME=Python3 @@ -76,6 +76,11 @@ if (abi MATCHES "u") else() list (APPEND Python3_VALID_ABI "OFF") endif() +if (abi MATCHES "t") + list (APPEND Python3_VALID_ABI "ON") +else() + list (APPEND Python3_VALID_ABI "OFF") +endif() # build an invalid pattern for ABI set (Python3_INVALID_ABI) foreach (abi IN LISTS Python3_VALID_ABI) diff --git a/Tests/FindPython/Python3Embedded/CMakeLists.txt b/Tests/FindPython/Python3Embedded/CMakeLists.txt index 1d362be..46f7042 100644 --- a/Tests/FindPython/Python3Embedded/CMakeLists.txt +++ b/Tests/FindPython/Python3Embedded/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython3Embedded LANGUAGES C) diff --git a/Tests/FindPython/Python3Fail/CMakeLists.txt b/Tests/FindPython/Python3Fail/CMakeLists.txt index 5eca0cb..810375b 100644 --- a/Tests/FindPython/Python3Fail/CMakeLists.txt +++ b/Tests/FindPython/Python3Fail/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython3Fail C) diff --git a/Tests/FindPython/Python3Module/CMakeLists.txt b/Tests/FindPython/Python3Module/CMakeLists.txt index 57c0ddf..e47a76a 100644 --- a/Tests/FindPython/Python3Module/CMakeLists.txt +++ b/Tests/FindPython/Python3Module/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestPython3Module LANGUAGES C) @@ -43,4 +43,4 @@ target_compile_definitions (spam3 PRIVATE PYTHON3) add_test (NAME python3_spam3 COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam3>" - "${Python3_EXECUTABLE}" -c "import spam3; spam3.system(\"cd\")") + "${Python3_INTERPRETER}" -c "import spam3; spam3.system(\"cd\")") diff --git a/Tests/FindPython/Python3SABIModule/CMakeLists.txt b/Tests/FindPython/Python3SABIModule/CMakeLists.txt index e045b69..77d3abc 100644 --- a/Tests/FindPython/Python3SABIModule/CMakeLists.txt +++ b/Tests/FindPython/Python3SABIModule/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.15) project(TestPython3SABIModule LANGUAGES C) @@ -52,4 +52,4 @@ endif() add_test (NAME python3_spam3 COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam3>" - "${Python3_EXECUTABLE}" -c "import spam3; spam3.system(\"cd\")") + "${Python3_INTERPRETER}" -c "import spam3; spam3.system(\"cd\")") diff --git a/Tests/FindPython/RequiredArtifacts/CMakeLists.txt b/Tests/FindPython/RequiredArtifacts/CMakeLists.txt index eec28a5..5df01c6 100644 --- a/Tests/FindPython/RequiredArtifacts/CMakeLists.txt +++ b/Tests/FindPython/RequiredArtifacts/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestRequiredArtifacts LANGUAGES C) diff --git a/Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt b/Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt index 4d9c7c8..25bdcf3 100644 --- a/Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt +++ b/Tests/FindPython/RequiredArtifacts/Check/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestRequiredArtifacts.Check LANGUAGES C) diff --git a/Tests/FindPython/SOABI/CMakeLists.txt b/Tests/FindPython/SOABI/CMakeLists.txt index 6c0e9a9..362df7f 100644 --- a/Tests/FindPython/SOABI/CMakeLists.txt +++ b/Tests/FindPython/SOABI/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestSOABI LANGUAGES C) diff --git a/Tests/FindPython/VirtualEnv/CMakeLists.txt b/Tests/FindPython/VirtualEnv/CMakeLists.txt index ea742ea..7837916 100644 --- a/Tests/FindPython/VirtualEnv/CMakeLists.txt +++ b/Tests/FindPython/VirtualEnv/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestVirtualEnv LANGUAGES NONE) diff --git a/Tests/FindPython/VirtualEnv/VirtualEnvDefault.cmake b/Tests/FindPython/VirtualEnv/VirtualEnvDefault.cmake index 020ecac..8f56d00 100644 --- a/Tests/FindPython/VirtualEnv/VirtualEnvDefault.cmake +++ b/Tests/FindPython/VirtualEnv/VirtualEnvDefault.cmake @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.15) find_package (Python3 REQUIRED) diff --git a/Tests/FindPython/VirtualEnv/VirtualEnvOnly.cmake b/Tests/FindPython/VirtualEnv/VirtualEnvOnly.cmake index 29a4924..9ae4975 100644 --- a/Tests/FindPython/VirtualEnv/VirtualEnvOnly.cmake +++ b/Tests/FindPython/VirtualEnv/VirtualEnvOnly.cmake @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.15) # # Virtual environment is defined for python3 diff --git a/Tests/FindPython/VirtualEnv/VirtualEnvStandard.cmake b/Tests/FindPython/VirtualEnv/VirtualEnvStandard.cmake index 89f27d8..353a91b 100644 --- a/Tests/FindPython/VirtualEnv/VirtualEnvStandard.cmake +++ b/Tests/FindPython/VirtualEnv/VirtualEnvStandard.cmake @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.15) set (Python3_FIND_VIRTUALENV STANDARD) find_package (Python3 REQUIRED) diff --git a/Tests/FindPython/VirtualEnvConda/CMakeLists.txt b/Tests/FindPython/VirtualEnvConda/CMakeLists.txt index 3a64c31..6482793 100644 --- a/Tests/FindPython/VirtualEnvConda/CMakeLists.txt +++ b/Tests/FindPython/VirtualEnvConda/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(TestVirtualEnvConda LANGUAGES NONE) diff --git a/Tests/FindPython/VirtualEnvConda/VirtualEnvDefault.cmake b/Tests/FindPython/VirtualEnvConda/VirtualEnvDefault.cmake index 020ecac..8f56d00 100644 --- a/Tests/FindPython/VirtualEnvConda/VirtualEnvDefault.cmake +++ b/Tests/FindPython/VirtualEnvConda/VirtualEnvDefault.cmake @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.15) find_package (Python3 REQUIRED) diff --git a/Tests/FindPython/VirtualEnvConda/VirtualEnvOnly.cmake b/Tests/FindPython/VirtualEnvConda/VirtualEnvOnly.cmake index 29a4924..9ae4975 100644 --- a/Tests/FindPython/VirtualEnvConda/VirtualEnvOnly.cmake +++ b/Tests/FindPython/VirtualEnvConda/VirtualEnvOnly.cmake @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.15) # # Virtual environment is defined for python3 diff --git a/Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake b/Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake index 89f27d8..353a91b 100644 --- a/Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake +++ b/Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.15) set (Python3_FIND_VIRTUALENV STANDARD) find_package (Python3 REQUIRED) diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index df7cda0..be750e1 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -70,6 +70,7 @@ add_custom_target(check-part1 ALL -Dtest_strequal_comma=$<STREQUAL:$<COMMA>,$<COMMA>> -Dtest_strequal_semicolon=$<STREQUAL:$<SEMICOLON>,$<SEMICOLON>> -Dtest_strequal_angle_r_comma=$<STREQUAL:$<ANGLE-R>,$<COMMA>> + -Dtest_strequal_quote=$<STREQUAL:$<QUOTE>,$<QUOTE>> -Dtest_strequal_both_empty=$<STREQUAL:,> -Dtest_strequal_one_empty=$<STREQUAL:something,> -Dtest_inlist_true=$<IN_LIST:a,a$<SEMICOLON>b> diff --git a/Tests/GeneratorExpression/check-part1.cmake b/Tests/GeneratorExpression/check-part1.cmake index 41bcd6d..ddf2507 100644 --- a/Tests/GeneratorExpression/check-part1.cmake +++ b/Tests/GeneratorExpression/check-part1.cmake @@ -47,6 +47,7 @@ check(test_strequal_angle_r "1") check(test_strequal_comma "1") check(test_strequal_semicolon "1") check(test_strequal_angle_r_comma "0") +check(test_strequal_quote "1") check(test_strequal_both_empty "1") check(test_strequal_one_empty "0") check(test_inlist_true "1") diff --git a/Tests/GoogleTest/Test/CMakeLists.txt b/Tests/GoogleTest/Test/CMakeLists.txt index baf00d5..201c39e 100644 --- a/Tests/GoogleTest/Test/CMakeLists.txt +++ b/Tests/GoogleTest/Test/CMakeLists.txt @@ -81,10 +81,30 @@ gtest_add_tests(test_gtest3 "" AUTO) if(NOT TEST GoogleTest.Foo) message(FATAL_ERROR "Test case GoogleTest.Foo not defined") endif() +# Check if test has property DEF_SOURCE_LINE +get_test_property(GoogleTest.Foo DEF_SOURCE_LINE testSourceLineFoo) +if(NOT testSourceLineFoo) + message(FATAL_ERROR "Test GoogleTest.Foo should have DEF_SOURCE_LINE property") +endif() +# If check property ends with correct value +string(FIND "${testSourceLineFoo}" "main3.cxx:3" testSourceLineFooFound) +if(${testSourceLineFooFound} EQUAL -1) + message(FATAL_ERROR "Test GoogleTest.Foo should have DEF_SOURCE_LINE property with value main3.cxx:3") +endif() + if(NOT TEST GoogleTest.Bar) message(FATAL_ERROR "Test case GoogleTest.Bar not defined") endif() - +# Check if test has property DEF_SOURCE_LINE +get_test_property(GoogleTest.Bar DEF_SOURCE_LINE testSourceLineBar) +if(NOT testSourceLineBar) + message(FATAL_ERROR "Test GoogleTest.Bar should have DEF_SOURCE_LINE property") +endif() +# If check property ends with correct value +string(FIND "${testSourceLineBar}" "main3.cxx:8" testSourceLineBarFound) +if(${testSourceLineBarFound} EQUAL -1) + message(FATAL_ERROR "Test GoogleTest.Bar should have DEF_SOURCE_LINE property with value main3.cxx:8") +endif() # Non-keyword form, explicitly specified sources. Allows a non-target to be # given for the executable. diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index e82cea2..99cad41 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -98,8 +98,8 @@ if(NOT CMAKE_GENERATOR MATCHES "(Borland|NMake) Makefiles") # NMake and Borland seem to have no way to encode a single '^'. string(APPEND special_chars "^") endif() -if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 2008|Watcom WMake") - # The vcproj format separates values with ','. +if(NOT CMAKE_GENERATOR MATCHES "Watcom WMake") + # The wmake format does not support ','. string(APPEND special_chars ",") endif() if(NOT WIN32 AND NOT CYGWIN) diff --git a/Tests/MSVCRuntimeLibrary/CMakeLists.txt b/Tests/MSVCRuntimeLibrary/CMakeLists.txt index f7d9fec..f1ed9b4 100644 --- a/Tests/MSVCRuntimeLibrary/CMakeLists.txt +++ b/Tests/MSVCRuntimeLibrary/CMakeLists.txt @@ -57,10 +57,6 @@ function(verify lang src) # VS 2005 and above default to multi-threaded. target_compile_definitions(empty-${lang} PRIVATE VERIFY_MT) endif() - if(CMAKE_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") - # VS 2010 and above have a different default runtime library for projects than 'cl'. - target_compile_definitions(empty-${lang} PRIVATE VERIFY_DLL) - endif() endif() endfunction() diff --git a/Tests/NasmOnly/CMakeLists.txt b/Tests/NasmOnly/CMakeLists.txt new file mode 100644 index 0000000..e4190c2 --- /dev/null +++ b/Tests/NasmOnly/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.28) + +project(NasmOnly LANGUAGES ASM_NASM) + +add_library(testnasm1 STATIC libnasm1.nasm) +add_executable(NasmOnly nasmonly.nasm) +target_link_libraries(NasmOnly testnasm1) diff --git a/Tests/NasmOnly/libnasm1.nasm b/Tests/NasmOnly/libnasm1.nasm new file mode 100644 index 0000000..c72a1ad --- /dev/null +++ b/Tests/NasmOnly/libnasm1.nasm @@ -0,0 +1,6 @@ +global LibNasm1Func + +section .text +LibNasm1Func: + mov rax, 1 + ret diff --git a/Tests/NasmOnly/nasmonly.nasm b/Tests/NasmOnly/nasmonly.nasm new file mode 100644 index 0000000..db9b655 --- /dev/null +++ b/Tests/NasmOnly/nasmonly.nasm @@ -0,0 +1,19 @@ +global _start + +extern LibNasm1Func + +section .text +_start: + xor rax, rax + call LibNasm1Func + cmp rax, 1 + jne err + + mov rax, 60 + xor rdi, rdi + syscall + +err: + mov rax, 60 + mov rdi, 1 + syscall diff --git a/Tests/README.rst b/Tests/README.rst index 3e98938..2810fec 100644 --- a/Tests/README.rst +++ b/Tests/README.rst @@ -29,3 +29,7 @@ are organized as follows. Tests that run CMake and/or other tools while precisely checking their return code and stdout/stderr content. Useful for testing error cases and diagnostic output. + + See `RunCMake/README.rst`_. + +.. _`RunCMake/README.rst`: RunCMake/README.rst diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake index fada37a..a5f9622 100644 --- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake +++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake @@ -180,8 +180,7 @@ if (RunCMake_GENERATOR MATCHES "Makefiles") unset(RunCMake_TEST_NO_CLEAN) endif() -if(RunCMake_GENERATOR MATCHES "Make|Ninja|Visual Studio|Xcode" AND - NOT RunCMake_GENERATOR MATCHES "Visual Studio (9|10)( |$)") +if(RunCMake_GENERATOR MATCHES "Make|Ninja|Visual Studio|Xcode") unset(run_BuildDepends_skip_step_3) run_BuildDepends(CustomCommandDepfile) set(run_BuildDepends_skip_step_3 1) @@ -191,8 +190,7 @@ if(RunCMake_GENERATOR MATCHES "Make") run_BuildDepends(MakeDependencies) endif() -if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 " OR - (RunCMake_GENERATOR MATCHES "Ninja" AND ninja_version VERSION_LESS 1.7)) +if(RunCMake_GENERATOR MATCHES "Ninja" AND ninja_version VERSION_LESS 1.7) # This build tool misses the dependency. set(run_BuildDepends_skip_step_2 1) endif() diff --git a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-stderr.txt b/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-stderr.txt deleted file mode 100644 index 1159ec0..0000000 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Error at CMP0069-NEW-generator\.cmake:[0-9]+ \(add_executable\): - CMake doesn't support IPO for current generator -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/CMP0069/CMP0069-NEW-generator.cmake b/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake deleted file mode 100644 index 80d4e15..0000000 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake +++ /dev/null @@ -1,7 +0,0 @@ -cmake_policy(SET CMP0069 NEW) - -set(_CMAKE_CXX_IPO_SUPPORTED_BY_CMAKE YES) -set(_CMAKE_CXX_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) - -add_executable(foo main.cpp) -set_target_properties(foo PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) diff --git a/Tests/RunCMake/CMP0069/RunCMakeTest.cmake b/Tests/RunCMake/CMP0069/RunCMakeTest.cmake index 456e6a6..6128325 100644 --- a/Tests/RunCMake/CMP0069/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0069/RunCMakeTest.cmake @@ -4,7 +4,3 @@ run_cmake(CMP0069-OLD) run_cmake(CMP0069-NEW-cmake) run_cmake(CMP0069-NEW-compiler) run_cmake(CMP0069-WARN) - -if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") - run_cmake(CMP0069-NEW-generator) -endif() diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test16.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test16.cmake new file mode 100644 index 0000000..909be6f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test16.cmake @@ -0,0 +1,38 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) + + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_command(TARGET custom2 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) + +add_subdirectory(subdir-Common-Test16) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test1b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test1b.cmake new file mode 100644 index 0000000..622633f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test1b.cmake @@ -0,0 +1,9 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test2b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2b.cmake new file mode 100644 index 0000000..5317781 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2b.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_source_files_properties( + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTIES GENERATED "1") +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test2c.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2c.cmake new file mode 100644 index 0000000..2f2d3a2 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2c.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_property(SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED "1") +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test2d.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2d.cmake new file mode 100644 index 0000000..67f9b8c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2d.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_source_files_properties( + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTIES GENERATED "1") +get_property(prop SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake index 27516b7..2880aec 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake @@ -35,7 +35,7 @@ set_property(SOURCE "Generated_with_full_path2.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_path3.txt") @@ -61,6 +61,6 @@ set_property(SOURCE "Generated_with_full_source_path2.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake index 3e03a1f..64294d9 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake @@ -9,7 +9,7 @@ set_property(SOURCE "Generated_with_full_path2.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_path3.txt") @@ -35,7 +35,7 @@ set_property(SOURCE "Generated_with_full_source_path2.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake index 953e26a..dbc603c 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake @@ -35,7 +35,7 @@ set_property(SOURCE "Generated_with_full_path2.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_path3.txt") @@ -61,6 +61,6 @@ set_property(SOURCE "Generated_with_full_source_path2.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake index 025caa8..833714c 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake @@ -9,7 +9,7 @@ set_property(SOURCE "Generated_with_full_path2.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_path3.txt") @@ -35,7 +35,7 @@ set_property(SOURCE "Generated_with_full_source_path2.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake index 5349bff..549ce1e 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake @@ -65,7 +65,7 @@ set_property(SOURCE "Generated_with_relative_path3.txt" get_and_print_GENERATED_property("Generated_with_relative_path3.txt") -set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.txt" PROPERTY GENERATED "tRue") get_and_print_GENERATED_property("Generated_with_full_source_path1.txt") @@ -73,6 +73,6 @@ set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path PROPERTY GENERATED "SomeVar-NOTFOUND") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "Junk-value") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake index 5cc6e99..e6b3cce 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake @@ -27,6 +27,7 @@ target_sources(custom6 PRIVATE ) +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" CONTENT "int func();\nint main(){ return func(); }" diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test8b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8b.cmake new file mode 100644 index 0000000..704300a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8b.cmake @@ -0,0 +1,51 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test8b) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake index b7d36ef..e9abf36 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake @@ -27,6 +27,7 @@ target_sources(custom6 PRIVATE ) +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" CONTENT "int func();\nint main(){ return func(); }" diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test9b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9b.cmake new file mode 100644 index 0000000..a452fdb --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9b.cmake @@ -0,0 +1,51 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test9b) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/file/TOUCH-result.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/file/TOUCH-result.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-result.txt diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-stderr.txt new file mode 100644 index 0000000..a513b83 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16.cmake new file mode 100644 index 0000000..74b05c4 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test16.cmake) diff --git a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-result.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-result.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-result.txt diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-stderr.txt new file mode 100644 index 0000000..419c571 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0118-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-NEW-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b.cmake new file mode 100644 index 0000000..30cd6cd --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test1b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b.cmake new file mode 100644 index 0000000..27f2a2d --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test2b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c.cmake new file mode 100644 index 0000000..ade66fd --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test2c.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d.cmake new file mode 100644 index 0000000..456760d --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test2d.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt index 929dafd..4175587 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt @@ -12,10 +12,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -48,14 +48,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -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` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -63,7 +63,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -71,15 +71,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt index 6a096b8..e9a1ee2 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt @@ -12,10 +12,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -48,14 +48,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -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` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -63,7 +63,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -71,15 +71,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt index 0e27c1d..686ba23 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt @@ -76,12 +76,12 @@ Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): Unsetting the 'GENERATED' property is not allowed under CMP0118! @@ -118,7 +118,7 @@ Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -126,7 +126,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -134,7 +134,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -142,7 +142,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -150,7 +150,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -158,15 +158,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b-stderr.txt new file mode 100644 index 0000000..f9ce9be --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b.cmake new file mode 100644 index 0000000..a39f89f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test8b.cmake) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-result.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-result.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-result.txt diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-stderr.txt new file mode 100644 index 0000000..093f1b8 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b.cmake new file mode 100644 index 0000000..36e30f4 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test9b.cmake) diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-result.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-result.txt diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-stderr.txt new file mode 100644 index 0000000..2ca118d --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-stderr.txt @@ -0,0 +1,38 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test16\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16.cmake new file mode 100644 index 0000000..c0e40fc --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test16.cmake) diff --git a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator-result.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-result.txt diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-stderr.txt new file mode 100644 index 0000000..ad3ea43 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-stderr.txt @@ -0,0 +1,21 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test1b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 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\) ++ +prop: `NOTFOUND` +CMake Error at CMP0118-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b.cmake new file mode 100644 index 0000000..ad1a211 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test1b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b-stderr.txt new file mode 100644 index 0000000..41114ba --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b-stderr.txt @@ -0,0 +1,12 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test2b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 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\) ++ +prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b.cmake new file mode 100644 index 0000000..5bfe045 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test2b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c-stderr.txt new file mode 100644 index 0000000..ba36763 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c-stderr.txt @@ -0,0 +1,12 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test2c\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 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\) ++ +prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c.cmake new file mode 100644 index 0000000..e225de4 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test2c.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d-stderr.txt new file mode 100644 index 0000000..0a9a8b7 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d-stderr.txt @@ -0,0 +1,12 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test2d\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 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\) ++ +prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d.cmake new file mode 100644 index 0000000..ad1c640 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test2d.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt index cce5b19..28fe2f0 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt @@ -23,10 +23,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -59,14 +59,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -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` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -74,7 +74,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -82,15 +82,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt index 47eee2e..819b8c0 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt @@ -23,10 +23,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -59,14 +59,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -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` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -74,7 +74,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -82,15 +82,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt index 4a67fa7..e20ffee 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt @@ -45,12 +45,12 @@ Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` @@ -66,7 +66,7 @@ Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -74,7 +74,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -82,7 +82,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -90,7 +90,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -98,7 +98,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -106,15 +106,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-stderr.txt new file mode 100644 index 0000000..285051c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-stderr.txt @@ -0,0 +1,56 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test8b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 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\) ++ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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-Test8b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test8b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b.cmake new file mode 100644 index 0000000..6676e7c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test8b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-stderr.txt new file mode 100644 index 0000000..9b2fdad --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-stderr.txt @@ -0,0 +1,72 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test9b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 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\) ++ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b.cmake new file mode 100644 index 0000000..3446063 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test9b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt index 93d8b83..9395cd7 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt @@ -1,6 +1,6 @@ ^((CMake Warning \(dev\) at subdir-Common-Test11/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -9,8 +9,8 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt index 6d59cb4..957cc69 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt @@ -8,8 +8,8 @@ CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\ TARGET 'custom[4-6]' was not created in this directory\. + ((CMake Warning \(dev\) at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -18,8 +18,8 @@ CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test13\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt index 9e6a4a5..eab051f 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt @@ -1,6 +1,6 @@ ^((CMake Warning \(dev\) at subdir-Common-Test15/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -9,8 +9,8 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-result.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-stderr.txt new file mode 100644 index 0000000..a513b83 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16.cmake new file mode 100644 index 0000000..f50df7f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test16.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-stderr.txt new file mode 100644 index 0000000..86b9327 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0118-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b.cmake new file mode 100644 index 0000000..c055570 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test1b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b.cmake new file mode 100644 index 0000000..82a192c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test2b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c.cmake new file mode 100644 index 0000000..ec47683 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test2c.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d.cmake new file mode 100644 index 0000000..a5e3fd7 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test2d.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt index 58ba793..491eab0 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt @@ -12,10 +12,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -48,14 +48,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -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` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -63,7 +63,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -71,15 +71,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt index cdb7cb4..e170849 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt @@ -12,10 +12,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -48,14 +48,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -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` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -63,7 +63,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -71,15 +71,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt index 4cd401c..6340f91 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt @@ -1,6 +1,6 @@ ^CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -18,8 +18,8 @@ Generated_with_full_path1\.txt: # 2b # GENERATED = `0` Generated_with_full_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -37,8 +37,8 @@ Generated_with_full_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -56,8 +56,8 @@ Generated_with_full_path3\.txt: # 2b # GENERATED = `0` Generated_with_full_path3\.txt: # 3a # GENERATED = `0` Generated_with_full_path3\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -75,8 +75,8 @@ Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -94,8 +94,8 @@ Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -113,8 +113,8 @@ Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -132,8 +132,8 @@ Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -151,8 +151,8 @@ Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt index 6acd3df..a213ae5 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt @@ -1,6 +1,6 @@ ^CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -18,8 +18,8 @@ Generated_with_full_path1\.txt: # 2b # GENERATED = `0` Generated_with_full_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -37,8 +37,8 @@ Generated_with_full_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -56,8 +56,8 @@ Generated_with_full_path3\.txt: # 2b # GENERATED = `0` Generated_with_full_path3\.txt: # 3a # GENERATED = `0` Generated_with_full_path3\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -75,8 +75,8 @@ Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -94,8 +94,8 @@ Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -113,8 +113,8 @@ Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -132,8 +132,8 @@ Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -151,8 +151,8 @@ Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt index 2805cbf..2f7a390 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt @@ -5,8 +5,8 @@ Generated_with_full_path1\.txt: # 2b # GENERATED = `1` Generated_with_full_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -24,8 +24,8 @@ Generated_with_full_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -57,8 +57,8 @@ Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -76,8 +76,8 @@ Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -102,15 +102,15 @@ Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -128,8 +128,8 @@ Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -157,7 +157,7 @@ Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -165,7 +165,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -173,7 +173,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -181,7 +181,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -189,7 +189,7 @@ Call Stack \(most recent call first\): 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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -197,15 +197,7 @@ Call Stack \(most recent call first\): 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) -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]+ \(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) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt index cde1164..1feef65 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt @@ -1,6 +1,6 @@ ^((CMake Warning \(dev\) at subdir-Common-Test7/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -9,8 +9,8 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-stderr.txt new file mode 100644 index 0000000..c063326 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-stderr.txt @@ -0,0 +1,45 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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-Test8b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test8b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b.cmake new file mode 100644 index 0000000..b44331a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test8b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt index 547e820..cbce4ab 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt @@ -1,6 +1,6 @@ ^((CMake Warning \(dev\) at subdir-Common-Test9/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -9,8 +9,8 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-stderr.txt new file mode 100644 index 0000000..878812d --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b.cmake new file mode 100644 index 0000000..9726b30 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test9b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMakeLists.txt b/Tests/RunCMake/CMP0118/CMakeLists.txt index 957fe03..8bf7896 100644 --- a/Tests/RunCMake/CMP0118/CMakeLists.txt +++ b/Tests/RunCMake/CMP0118/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required(VERSION 3.19) -cmake_policy(SET CMP0115 NEW) +cmake_policy(SET CMP0115 NEW) # CMP0115 is correct here (for reducing error-output)! project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CMP0118/RunCMakeTest.cmake b/Tests/RunCMake/CMP0118/RunCMakeTest.cmake index f7f135e..207f3d7 100644 --- a/Tests/RunCMake/CMP0118/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0118/RunCMakeTest.cmake @@ -5,7 +5,11 @@ run_cmake(GenInSubdir-WARN) run_cmake(GenInSubdir-NEW) run_cmake(CMP0118-OLD-Test1) +run_cmake(CMP0118-OLD-Test1b) run_cmake(CMP0118-OLD-Test2) +run_cmake(CMP0118-OLD-Test2b) +run_cmake(CMP0118-OLD-Test2c) +run_cmake(CMP0118-OLD-Test2d) run_cmake(CMP0118-OLD-Test3) run_cmake(CMP0118-OLD-Test3b) run_cmake(CMP0118-OLD-Test4) @@ -14,16 +18,23 @@ run_cmake(CMP0118-OLD-Test5) run_cmake(CMP0118-OLD-Test6) run_cmake(CMP0118-OLD-Test7) run_cmake(CMP0118-OLD-Test8) +run_cmake(CMP0118-OLD-Test8b) run_cmake(CMP0118-OLD-Test9) +run_cmake(CMP0118-OLD-Test9b) run_cmake(CMP0118-OLD-Test10) run_cmake(CMP0118-OLD-Test11) run_cmake(CMP0118-OLD-Test12) run_cmake(CMP0118-OLD-Test13) run_cmake(CMP0118-OLD-Test14) run_cmake(CMP0118-OLD-Test15) +run_cmake(CMP0118-OLD-Test16) run_cmake(CMP0118-WARN-Test1) +run_cmake(CMP0118-WARN-Test1b) run_cmake(CMP0118-WARN-Test2) +run_cmake(CMP0118-WARN-Test2b) +run_cmake(CMP0118-WARN-Test2c) +run_cmake(CMP0118-WARN-Test2d) run_cmake(CMP0118-WARN-Test3) run_cmake(CMP0118-WARN-Test3b) run_cmake(CMP0118-WARN-Test4) @@ -32,16 +43,23 @@ run_cmake(CMP0118-WARN-Test5) run_cmake(CMP0118-WARN-Test6) run_cmake(CMP0118-WARN-Test7) run_cmake(CMP0118-WARN-Test8) +run_cmake(CMP0118-WARN-Test8b) run_cmake(CMP0118-WARN-Test9) +run_cmake(CMP0118-WARN-Test9b) run_cmake(CMP0118-WARN-Test10) run_cmake(CMP0118-WARN-Test11) run_cmake(CMP0118-WARN-Test12) run_cmake(CMP0118-WARN-Test13) run_cmake(CMP0118-WARN-Test14) run_cmake(CMP0118-WARN-Test15) +run_cmake(CMP0118-WARN-Test16) run_cmake(CMP0118-NEW-Test1) +run_cmake(CMP0118-NEW-Test1b) run_cmake(CMP0118-NEW-Test2) +run_cmake(CMP0118-NEW-Test2b) +run_cmake(CMP0118-NEW-Test2c) +run_cmake(CMP0118-NEW-Test2d) run_cmake(CMP0118-NEW-Test3) run_cmake(CMP0118-NEW-Test3b) run_cmake(CMP0118-NEW-Test4) @@ -50,10 +68,13 @@ run_cmake(CMP0118-NEW-Test5) run_cmake(CMP0118-NEW-Test6) run_cmake(CMP0118-NEW-Test7) run_cmake(CMP0118-NEW-Test8) +run_cmake(CMP0118-NEW-Test8b) run_cmake(CMP0118-NEW-Test9) +run_cmake(CMP0118-NEW-Test9b) run_cmake(CMP0118-NEW-Test10) run_cmake(CMP0118-NEW-Test11) run_cmake(CMP0118-NEW-Test12) run_cmake(CMP0118-NEW-Test13) run_cmake(CMP0118-NEW-Test14) run_cmake(CMP0118-NEW-Test15) +run_cmake(CMP0118-NEW-Test16) diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt index f2929aa..7ad02df 100644 --- a/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt @@ -1,13 +1,16 @@ +# Note: Target "custom4" was not created in this directory, so setting this build-event will fail! add_custom_command(TARGET custom4 PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" ) +# Note: Target "custom5" was not created in this directory, so setting this build-event will fail! add_custom_command(TARGET custom5 PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" ) +# Note: Target "custom6" was not created in this directory, so setting this build-event will fail! add_custom_command(TARGET custom6 PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test16/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test16/CMakeLists.txt new file mode 100644 index 0000000..877c829 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test16/CMakeLists.txt @@ -0,0 +1,10 @@ +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" +) +add_custom_command(TARGET custom4 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt index 55debd1..eefe18c 100644 --- a/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt @@ -1,3 +1,4 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" CONTENT "int func();\nint main(){ return func(); }" diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test8b/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test8b/CMakeLists.txt new file mode 100644 index 0000000..1e4cccd --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test8b/CMakeLists.txt @@ -0,0 +1,13 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + CONTENT "int func();\nint main(){ return func(); }" +) diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt index cdb8884..99f6d73 100644 --- a/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt @@ -1,3 +1,4 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" CONTENT "int func();\nint main(){ return func(); }" diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test9b/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test9b/CMakeLists.txt new file mode 100644 index 0000000..f94f36f --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test9b/CMakeLists.txt @@ -0,0 +1,13 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" + CONTENT "int func();\nint main(){ return func(); }" +) diff --git a/Tests/RunCMake/CMP0135/CMP0135-WARN-stderr.txt b/Tests/RunCMake/CMP0135/CMP0135-WARN-stderr.txt index 6bf944e..1632d63 100644 --- a/Tests/RunCMake/CMP0135/CMP0135-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0135/CMP0135-WARN-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): +CMake Warning \(dev\) at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is not set\. The policy's OLD behavior will be used\. When using a URL download, the timestamps of extracted files should preferably be that of @@ -9,7 +9,7 @@ CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this robustness issue\. .* -CMake Warning \(dev\) at .*/Modules/FetchContent.cmake:[0-9]+ \(message\): +CMake Warning \(dev\) at .*/Modules/FetchContent\.cmake:[0-9]+ \(message\): The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is not set\. The policy's OLD behavior will be used\. When using a URL download, the timestamps of extracted files should preferably be that of diff --git a/Tests/RunCMake/CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt b/Tests/RunCMake/CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt index b4afc27..ea3b5c1 100644 --- a/Tests/RunCMake/CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt +++ b/Tests/RunCMake/CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt @@ -1,3 +1,3 @@ ld: warning: ignoring duplicate libraries: '.*liblib1.a', '.*liblib2.a' ld: fatal warning\(s\) induced error \(-fatal_warnings\) -clang: error: linker command failed with exit code 1 \(use -v to see invocation\) +(cc|clang): error: linker command failed with exit code 1 \(use -v to see invocation\) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1-stderr.txt new file mode 100644 index 0000000..a8b3503 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1-stderr.txt @@ -0,0 +1,10 @@ +^prop: `0` +CMake Error at CMP0163-Common-Test1\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test1\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test10-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test10-stderr.txt new file mode 100644 index 0000000..680a830 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test10-stderr.txt @@ -0,0 +1,42 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test10.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test10.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test10.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test11-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test11-stderr.txt new file mode 100644 index 0000000..7cdc233 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test11-stderr.txt @@ -0,0 +1,55 @@ +^(CMake Warning \(dev\) at subdir-Common-Test11/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test11\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test11.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test11.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test11.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12-stderr.txt new file mode 100644 index 0000000..6133a35 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12-stderr.txt @@ -0,0 +1,51 @@ +^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test12.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13-stderr.txt new file mode 100644 index 0000000..e65140a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13-stderr.txt @@ -0,0 +1,64 @@ +^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +(CMake Warning \(dev\) at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test13\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test13\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test13.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test14-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test14-stderr.txt new file mode 100644 index 0000000..680a830 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test14-stderr.txt @@ -0,0 +1,42 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test14.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test14.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test14.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test15-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test15-stderr.txt new file mode 100644 index 0000000..979481f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test15-stderr.txt @@ -0,0 +1,55 @@ +^(CMake Warning \(dev\) at subdir-Common-Test15/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test15\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test15.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test15.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test15.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16-stderr.txt new file mode 100644 index 0000000..c18109c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test16.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b-stderr.txt new file mode 100644 index 0000000..fae8bc7 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0163-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b.cmake new file mode 100644 index 0000000..e1b9d22 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test1b.cmake @@ -0,0 +1,6 @@ +cmake_policy(SET CMP0118 NEW) +# Extract from the current file the name of the test-case and value for CMP0163 and call the test-case. +cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM testcase) +string(REGEX MATCH "NEW|OLD|WARN" value_for_CMP0163 "${testcase}") +string(REGEX REPLACE "${value_for_CMP0163}" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2a.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2a.cmake new file mode 100644 index 0000000..b1e932c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2a.cmake @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0118 NEW) +cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM CMP0163_TESTCASE) +include(${CMAKE_CURRENT_LIST_DIR}/../Test-with-CMP0163-NEW.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2c-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2c-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2c.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2c.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2c.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2d-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2d-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2d.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2d.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test2d.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3-stderr.txt new file mode 100644 index 0000000..2f90661 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-NEW-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-NEW-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-NEW-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b-stderr.txt new file mode 100644 index 0000000..db40354 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-NEW-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-NEW-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-NEW-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test3b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4-stderr.txt new file mode 100644 index 0000000..9d75891 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4-stderr.txt @@ -0,0 +1,167 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b-stderr.txt new file mode 100644 index 0000000..c3f35a2 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b-stderr.txt @@ -0,0 +1,135 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-NEW-Test4b-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-NEW-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++)+ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test4b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5-stderr.txt new file mode 100644 index 0000000..779d708 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5-stderr.txt @@ -0,0 +1,126 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0163 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0163 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0163 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*(Generated_with_relative_path[2-3]\.txt|.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++)+ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test5.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test6-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test6-stderr.txt new file mode 100644 index 0000000..ee30636 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test6-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test6.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test6.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test6.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-stderr.txt new file mode 100644 index 0000000..9ab3d50 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-stderr.txt @@ -0,0 +1,74 @@ +^(CMake Warning \(dev\) at subdir-Common-Test7/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test7\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test7.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8-stderr.txt new file mode 100644 index 0000000..ee30636 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8b-stderr.txt new file mode 100644 index 0000000..f9ce9be --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8b-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8b.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test8b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-stderr.txt new file mode 100644 index 0000000..02d9bd3 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-stderr.txt @@ -0,0 +1,74 @@ +^(CMake Warning \(dev\) at subdir-Common-Test9/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test9\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-stderr.txt new file mode 100644 index 0000000..672d3b4 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b.cmake new file mode 100644 index 0000000..2faf482 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-NEW-Test9b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1-stderr.txt new file mode 100644 index 0000000..be3e906 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1-stderr.txt @@ -0,0 +1,10 @@ +^prop: `0` +CMake Error at CMP0163-Common-Test1\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test1\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test10-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test10-stderr.txt new file mode 100644 index 0000000..2bd1cba --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test10-stderr.txt @@ -0,0 +1,42 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test10.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test10.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test10.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test11-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test11-stderr.txt new file mode 100644 index 0000000..02ecd50 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test11-stderr.txt @@ -0,0 +1,55 @@ +^((CMake Warning \(dev\) at subdir-Common-Test11/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test11\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test11.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test11.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test11.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12-stderr.txt new file mode 100644 index 0000000..e6c429c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12-stderr.txt @@ -0,0 +1,51 @@ +^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test12.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13-stderr.txt new file mode 100644 index 0000000..fe1ccc3 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13-stderr.txt @@ -0,0 +1,64 @@ +^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +(CMake Warning \(dev\) at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test13\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test13\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test13.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test14-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test14-stderr.txt new file mode 100644 index 0000000..2bd1cba --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test14-stderr.txt @@ -0,0 +1,42 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test14.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test14.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test14.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test15-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test15-stderr.txt new file mode 100644 index 0000000..b37461a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test15-stderr.txt @@ -0,0 +1,55 @@ +^((CMake Warning \(dev\) at subdir-Common-Test15/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test15\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test15.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test15.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test15.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16-stderr.txt new file mode 100644 index 0000000..a513b83 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test16.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b-stderr.txt new file mode 100644 index 0000000..9232a57 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0163-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b.cmake new file mode 100644 index 0000000..e1b9d22 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test1b.cmake @@ -0,0 +1,6 @@ +cmake_policy(SET CMP0118 NEW) +# Extract from the current file the name of the test-case and value for CMP0163 and call the test-case. +cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM testcase) +string(REGEX MATCH "NEW|OLD|WARN" value_for_CMP0163 "${testcase}") +string(REGEX REPLACE "${value_for_CMP0163}" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2a.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2a.cmake new file mode 100644 index 0000000..60f065c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2a.cmake @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0118 NEW) +cmake_path(GET CMAKE_CURRENT_LIST_FILE FILENAME test_file) +include(${CMAKE_CURRENT_LIST_DIR}/../${test_file}) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2b-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2b.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2c-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2c-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2c.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2c.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2c.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2d-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2d-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2d.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2d.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test2d.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3-stderr.txt new file mode 100644 index 0000000..085f091 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-OLD-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-OLD-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-OLD-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b-stderr.txt new file mode 100644 index 0000000..1c5a178 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-OLD-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-OLD-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-OLD-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test3b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4-stderr.txt new file mode 100644 index 0000000..22ae491 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4-stderr.txt @@ -0,0 +1,167 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b-stderr.txt new file mode 100644 index 0000000..23dc427 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b-stderr.txt @@ -0,0 +1,135 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++)+ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test4b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5-stderr.txt new file mode 100644 index 0000000..ee3ee76 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5-stderr.txt @@ -0,0 +1,126 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/(Generated_with_relative_path[2-3]\.txt|Generated_with_full_path[2-3]\.txt)) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++)+ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test5.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test6-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test6-stderr.txt new file mode 100644 index 0000000..0c84cfe --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test6-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test6.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test6.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test6.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-stderr.txt new file mode 100644 index 0000000..ced4fcf --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-stderr.txt @@ -0,0 +1,74 @@ +^(CMake Warning \(dev\) at subdir-Common-Test7/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test7\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test7.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8-stderr.txt new file mode 100644 index 0000000..f723875 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8b-stderr.txt new file mode 100644 index 0000000..f9ce9be --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8b-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8b.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test8b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-stderr.txt new file mode 100644 index 0000000..e855458 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-stderr.txt @@ -0,0 +1,74 @@ +^(CMake Warning \(dev\) at subdir-Common-Test9/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test9\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-stderr.txt new file mode 100644 index 0000000..769a3f5 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b.cmake new file mode 100644 index 0000000..9e979e8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-OLD-Test9b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1-stderr.txt new file mode 100644 index 0000000..4e5f4ac --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1-stderr.txt @@ -0,0 +1,10 @@ +^prop: `0` +CMake Error at CMP0163-Common-Test1\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test1\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test10-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test10-stderr.txt new file mode 100644 index 0000000..2bd1cba --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test10-stderr.txt @@ -0,0 +1,42 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test10.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test10.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test10.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test11-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test11-stderr.txt new file mode 100644 index 0000000..bd98012 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test11-stderr.txt @@ -0,0 +1,55 @@ +^((CMake Warning \(dev\) at subdir-Common-Test11/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test11\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test11.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test11.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test11.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12-stderr.txt new file mode 100644 index 0000000..e6c429c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12-stderr.txt @@ -0,0 +1,51 @@ +^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test12.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13-stderr.txt new file mode 100644 index 0000000..6422e36 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13-stderr.txt @@ -0,0 +1,64 @@ +^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +(CMake Warning \(dev\) at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test13\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test13\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test13.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test14-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test14-stderr.txt new file mode 100644 index 0000000..2bd1cba --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test14-stderr.txt @@ -0,0 +1,42 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test14.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test14.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test14.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test15-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test15-stderr.txt new file mode 100644 index 0000000..c34acb2 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test15-stderr.txt @@ -0,0 +1,55 @@ +^((CMake Warning \(dev\) at subdir-Common-Test15/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test15\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test15.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test15.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test15.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16-stderr.txt new file mode 100644 index 0000000..a513b83 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test16.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b-stderr.txt new file mode 100644 index 0000000..9037f5d --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0163-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b.cmake new file mode 100644 index 0000000..e1b9d22 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b.cmake @@ -0,0 +1,6 @@ +cmake_policy(SET CMP0118 NEW) +# Extract from the current file the name of the test-case and value for CMP0163 and call the test-case. +cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM testcase) +string(REGEX MATCH "NEW|OLD|WARN" value_for_CMP0163 "${testcase}") +string(REGEX REPLACE "${value_for_CMP0163}" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2a.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2a.cmake new file mode 100644 index 0000000..60f065c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2a.cmake @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0118 NEW) +cmake_path(GET CMAKE_CURRENT_LIST_FILE FILENAME test_file) +include(${CMAKE_CURRENT_LIST_DIR}/../${test_file}) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2b-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2b.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2c-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2c-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2c.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2c.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2c.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2d-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2d-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2d.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2d.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test2d.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3-stderr.txt new file mode 100644 index 0000000..212398e --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-WARN-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-WARN-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-WARN-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b-stderr.txt new file mode 100644 index 0000000..d36919b --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-WARN-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-WARN-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW/CMP0163-WARN-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test3b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4-stderr.txt new file mode 100644 index 0000000..0b71575 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4-stderr.txt @@ -0,0 +1,167 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b-stderr.txt new file mode 100644 index 0000000..0640b89 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b-stderr.txt @@ -0,0 +1,135 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW/CMP0163-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-NEW/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++)+ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test4b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5-stderr.txt new file mode 100644 index 0000000..f882081 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5-stderr.txt @@ -0,0 +1,126 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/(Generated_with_relative_path[2-3]\.txt|Generated_with_full_path[2-3]\.txt)) +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++)+ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test5.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test6-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test6-stderr.txt new file mode 100644 index 0000000..0c84cfe --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test6-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test6.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test6.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test6.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-stderr.txt new file mode 100644 index 0000000..4b7b12e --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-stderr.txt @@ -0,0 +1,74 @@ +^(CMake Warning \(dev\) at subdir-Common-Test7/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test7\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test7.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8-stderr.txt new file mode 100644 index 0000000..f723875 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8b-stderr.txt new file mode 100644 index 0000000..f9ce9be --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8b-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8b.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test8b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-stderr.txt new file mode 100644 index 0000000..f8795b9 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-stderr.txt @@ -0,0 +1,74 @@ +^(CMake Warning \(dev\) at subdir-Common-Test9/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test9\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0118! + +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-stderr.txt new file mode 100644 index 0000000..e8c28d3 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW/CMP0163-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b.cmake b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b.cmake new file mode 100644 index 0000000..f3ec67a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test9b.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0118 NEW) +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1-stderr.txt new file mode 100644 index 0000000..ca58b9a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1-stderr.txt @@ -0,0 +1,10 @@ +^prop: `0` +CMake Error at CMP0163-Common-Test1\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test1\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test10-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test10-stderr.txt new file mode 100644 index 0000000..680a830 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test10-stderr.txt @@ -0,0 +1,42 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test10.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test10.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test10.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test11-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test11-stderr.txt new file mode 100644 index 0000000..182a43c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test11-stderr.txt @@ -0,0 +1,55 @@ +^(CMake Warning \(dev\) at subdir-Common-Test11/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test11\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test11.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test11.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test11.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12-stderr.txt new file mode 100644 index 0000000..6133a35 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12-stderr.txt @@ -0,0 +1,51 @@ +^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test12.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13-stderr.txt new file mode 100644 index 0000000..59d81ec --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13-stderr.txt @@ -0,0 +1,64 @@ +^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +(CMake Warning \(dev\) at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test13\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test13\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test13.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test14-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test14-stderr.txt new file mode 100644 index 0000000..680a830 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test14-stderr.txt @@ -0,0 +1,42 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test14.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test14.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test14.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test15-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test15-stderr.txt new file mode 100644 index 0000000..4c3be67 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test15-stderr.txt @@ -0,0 +1,55 @@ +^(CMake Warning \(dev\) at subdir-Common-Test15/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test15\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test15.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test15.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test15.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16-stderr.txt new file mode 100644 index 0000000..c18109c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test16.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b-stderr.txt new file mode 100644 index 0000000..b2d0e65 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0163-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b.cmake new file mode 100644 index 0000000..8dc6b3d --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test1b.cmake @@ -0,0 +1,6 @@ +# Leave CMP0118 unset! +# Extract from the current file the name of the test-case and value for CMP0163 and call the test-case. +cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM testcase) +string(REGEX MATCH "NEW|OLD|WARN" value_for_CMP0163 "${testcase}") +string(REGEX REPLACE "${value_for_CMP0163}" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2a.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2a.cmake new file mode 100644 index 0000000..b1e932c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2a.cmake @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0118 NEW) +cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM CMP0163_TESTCASE) +include(${CMAKE_CURRENT_LIST_DIR}/../Test-with-CMP0163-NEW.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2b-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2b.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2c-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2c-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2c.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2c.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2c.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2d-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2d-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2d.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2d.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test2d.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3-stderr.txt new file mode 100644 index 0000000..3298fca --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-NEW-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-NEW-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-NEW-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b-stderr.txt new file mode 100644 index 0000000..0f351ea --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-NEW-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-NEW-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-NEW-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test3b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4-stderr.txt new file mode 100644 index 0000000..ffc7224 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4-stderr.txt @@ -0,0 +1,126 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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` diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b-stderr.txt new file mode 100644 index 0000000..4634ba9 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b-stderr.txt @@ -0,0 +1,135 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-NEW-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-NEW-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++)+ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test4b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5-stderr.txt new file mode 100644 index 0000000..4b0961d --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5-stderr.txt @@ -0,0 +1,126 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0163 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0163 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0163 is set to NEW and the following non-boolean value given for + property 'GENERATED' is therefore not allowed: + + Junk-value + + Replace it with a boolean value! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*(Generated_with_relative_path[2-3]\.txt|.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-NEW-Test5-build/Generated_with_full_path[2-3]\.txt)) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++)+ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test5.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test6-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test6-stderr.txt new file mode 100644 index 0000000..ee30636 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test6-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test6.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test6.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test6.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-stderr.txt new file mode 100644 index 0000000..1e3bc32 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-stderr.txt @@ -0,0 +1,74 @@ +^(CMake Warning \(dev\) at subdir-Common-Test7/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test7\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test7.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8-stderr.txt new file mode 100644 index 0000000..ee30636 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `1` +Generated_source4\.txt: # 1b # GENERATED = `1` +Generated_source4\.txt: # 2a # GENERATED = `1` +Generated_source4\.txt: # 2b # GENERATED = `1` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8b-stderr.txt new file mode 100644 index 0000000..f9ce9be --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8b-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8b.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test8b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-stderr.txt new file mode 100644 index 0000000..cb63bf3 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-stderr.txt @@ -0,0 +1,74 @@ +^(CMake Warning \(dev\) at subdir-Common-Test9/CMakeLists\.txt:[0-9]+ \(set_property\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test9\.cmake:[0-9]+ \(add_subdirectory\): + Unsetting the 'GENERATED' property is not allowed under CMP0163! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-stderr.txt new file mode 100644 index 0000000..2eb755a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b.cmake new file mode 100644 index 0000000..62e4dc6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-NEW-Test9b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 NEW) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "NEW" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1-stderr.txt new file mode 100644 index 0000000..98b8b6a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1-stderr.txt @@ -0,0 +1,10 @@ +^prop: `0` +CMake Error at CMP0163-Common-Test1\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test1\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10-stderr.txt new file mode 100644 index 0000000..f51de9b --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10-stderr.txt @@ -0,0 +1,51 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +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 CMP0163-Common-Test10\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10-build/Generated_source4\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test10\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test10.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-stderr.txt new file mode 100644 index 0000000..63be2a7 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-stderr.txt @@ -0,0 +1,90 @@ +^((CMake Warning \(dev\) at subdir-Common-Test11/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test11\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test11\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test11\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test11\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test11.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12-stderr.txt new file mode 100644 index 0000000..e6c429c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12-stderr.txt @@ -0,0 +1,51 @@ +^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test12.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-stderr.txt new file mode 100644 index 0000000..3068eb3 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13-stderr.txt @@ -0,0 +1,74 @@ +^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +(CMake Warning \(dev\) at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test13\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test13\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0` diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test13.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14-stderr.txt new file mode 100644 index 0000000..c6ffe0c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14-stderr.txt @@ -0,0 +1,51 @@ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +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 CMP0163-Common-Test14\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14-build/Generated_source4\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test14\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test14.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-stderr.txt new file mode 100644 index 0000000..7ce1d4e --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-stderr.txt @@ -0,0 +1,90 @@ +^((CMake Warning \(dev\) at subdir-Common-Test15/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test15\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test15\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test15\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test15\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test15.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16-stderr.txt new file mode 100644 index 0000000..a513b83 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test16.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b-stderr.txt new file mode 100644 index 0000000..798641d --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0163-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b.cmake new file mode 100644 index 0000000..8dc6b3d --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test1b.cmake @@ -0,0 +1,6 @@ +# Leave CMP0118 unset! +# Extract from the current file the name of the test-case and value for CMP0163 and call the test-case. +cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM testcase) +string(REGEX MATCH "NEW|OLD|WARN" value_for_CMP0163 "${testcase}") +string(REGEX REPLACE "${value_for_CMP0163}" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2a.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2a.cmake new file mode 100644 index 0000000..0729939 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2a.cmake @@ -0,0 +1,2 @@ +cmake_path(GET CMAKE_CURRENT_LIST_FILE FILENAME test_file) +include(${CMAKE_CURRENT_LIST_DIR}/../${test_file}) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2b-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2b.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2c-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2c-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2c.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2c.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2c.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2d-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2d-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2d.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2d.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test2d.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3-stderr.txt new file mode 100644 index 0000000..9f7d5de --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-OLD-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-OLD-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-OLD-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b-stderr.txt new file mode 100644 index 0000000..81687a3 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-OLD-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-OLD-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-OLD-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test3b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-stderr.txt new file mode 100644 index 0000000..9098ddd --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4-stderr.txt @@ -0,0 +1,212 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-stderr.txt new file mode 100644 index 0000000..6893cc9 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b-stderr.txt @@ -0,0 +1,212 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-OLD-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test4b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-stderr.txt new file mode 100644 index 0000000..7fa3ffe --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5-stderr.txt @@ -0,0 +1,205 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Attempt to set property 'GENERATED' with the following non-boolean value + \(which will be interpreted as "0"\): + + Junk-value + + That exact value will not be retrievable\. A value of "0" will be returned + instead\. + + This will be an error under policy CMP0118\. + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Attempt to set property 'GENERATED' with the following non-boolean value + \(which will be interpreted as "0"\): + + Junk-value + + That exact value will not be retrievable\. A value of "0" will be returned + instead\. + + This will be an error under policy CMP0118\. + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Attempt to set property 'GENERATED' with the following non-boolean value + \(which will be interpreted as "0"\): + + Junk-value + + That exact value will not be retrievable\. A value of "0" will be returned + instead\. + + This will be an error under policy CMP0118\. + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test5.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6-stderr.txt new file mode 100644 index 0000000..da10641 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6-stderr.txt @@ -0,0 +1,45 @@ +^Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +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 CMP0163-Common-Test6\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6-build/Generated_source4\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test6\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test6.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-stderr.txt new file mode 100644 index 0000000..c4ae929 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-stderr.txt @@ -0,0 +1,100 @@ +^((CMake Warning \(dev\) at subdir-Common-Test7/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test7\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test7.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8-stderr.txt new file mode 100644 index 0000000..5c4014f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8-stderr.txt @@ -0,0 +1,45 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +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 CMP0163-Common-Test8\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8-build/Generated_source4\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test8\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b-stderr.txt new file mode 100644 index 0000000..81458aa --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b-stderr.txt @@ -0,0 +1,45 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test8b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test8b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test8b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-stderr.txt new file mode 100644 index 0000000..7dbd729 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-stderr.txt @@ -0,0 +1,84 @@ +^((CMake Warning \(dev\) at subdir-Common-Test9/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test9\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-stderr.txt new file mode 100644 index 0000000..a03cce0 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b.cmake new file mode 100644 index 0000000..5069712 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-OLD-Test9b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +cmake_policy(SET CMP0163 OLD) + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "OLD" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1-stderr.txt new file mode 100644 index 0000000..327067d --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1-stderr.txt @@ -0,0 +1,10 @@ +^prop: `0` +CMake Error at CMP0163-Common-Test1\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test1\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10-stderr.txt new file mode 100644 index 0000000..0a5d4b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10-stderr.txt @@ -0,0 +1,51 @@ +^Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +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 CMP0163-Common-Test10\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10-build/Generated_source4\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test10\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test10.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-stderr.txt new file mode 100644 index 0000000..bffefb6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-stderr.txt @@ -0,0 +1,90 @@ +^((CMake Warning \(dev\) at subdir-Common-Test11/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test11\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test11\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test11\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test11\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test11.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12-stderr.txt new file mode 100644 index 0000000..e6c429c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12-stderr.txt @@ -0,0 +1,51 @@ +^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +Generated_source6\.txt: # 2a # GENERATED = `1` +Generated_source6\.txt: # 2b # GENERATED = `1` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test12.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-stderr.txt new file mode 100644 index 0000000..d9ea88e --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13-stderr.txt @@ -0,0 +1,74 @@ +^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom[4-6]' was not created in this directory\. ++ +(CMake Warning \(dev\) at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +(CMake Warning \(dev\) at CMP0163-Common-Test13\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test13\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0` diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test13.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14-stderr.txt new file mode 100644 index 0000000..451c413 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14-stderr.txt @@ -0,0 +1,51 @@ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +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 CMP0163-Common-Test14\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14-build/Generated_source4\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test14\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test14.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-stderr.txt new file mode 100644 index 0000000..ac80737 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-stderr.txt @@ -0,0 +1,90 @@ +^((CMake Warning \(dev\) at subdir-Common-Test15/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test15\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source0\.txt: # 1a # GENERATED = `1` +Generated_source0\.txt: # 1b # GENERATED = `1` +Generated_source0\.txt: # 2a # GENERATED = `1` +Generated_source0\.txt: # 2b # GENERATED = `1` +Generated_source0\.txt: # 3a # GENERATED = `0` +Generated_source0\.txt: # 3b # GENERATED = `0` +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test15\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test15\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test15\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test15.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16-stderr.txt new file mode 100644 index 0000000..a513b83 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test16.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b-stderr.txt new file mode 100644 index 0000000..f7e6846 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0163-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b.cmake new file mode 100644 index 0000000..8dc6b3d --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test1b.cmake @@ -0,0 +1,6 @@ +# Leave CMP0118 unset! +# Extract from the current file the name of the test-case and value for CMP0163 and call the test-case. +cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM testcase) +string(REGEX MATCH "NEW|OLD|WARN" value_for_CMP0163 "${testcase}") +string(REGEX REPLACE "${value_for_CMP0163}" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2a.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2a.cmake new file mode 100644 index 0000000..0729939 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2a.cmake @@ -0,0 +1,2 @@ +cmake_path(GET CMAKE_CURRENT_LIST_FILE FILENAME test_file) +include(${CMAKE_CURRENT_LIST_DIR}/../${test_file}) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2b-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2b.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2c-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2c-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2c.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2c.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2c.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2d-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2d-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2d.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2d.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test2d.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3-stderr.txt new file mode 100644 index 0000000..1a41192 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-WARN-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-WARN-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-WARN-Test3-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b-stderr.txt new file mode 100644 index 0000000..005f005 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b-stderr.txt @@ -0,0 +1,79 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `1` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-WARN-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-WARN-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test3b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN/CMP0163-WARN-Test3b-build/Generated_with_full_path3\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test3b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-stderr.txt new file mode 100644 index 0000000..fbdf1da --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4-stderr.txt @@ -0,0 +1,212 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-stderr.txt new file mode 100644 index 0000000..caf555c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b-stderr.txt @@ -0,0 +1,212 @@ +^CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path1\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test4b\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test4b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_full_path1\.txt|CMP0118-WARN/CMP0163-WARN-Test4b-build/Generated_with_relative_path1\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test4b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-stderr.txt new file mode 100644 index 0000000..83556e6 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5-stderr.txt @@ -0,0 +1,205 @@ +^Generated_with_full_path1\.txt: # 1a # GENERATED = `1` +Generated_with_full_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_path1\.txt: # 3a # GENERATED = `0` +Generated_with_full_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Attempt to set property 'GENERATED' with the following non-boolean value + \(which will be interpreted as "0"\): + + Junk-value + + That exact value will not be retrievable\. A value of "0" will be returned + instead\. + + This will be an error under policy CMP0118\. + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_path3\.txt: # 1b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `0` +Generated_with_full_path3\.txt: # 2b # GENERATED = `0` +Generated_with_full_path3\.txt: # 3a # GENERATED = `0` +Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` +Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` +Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path2\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Attempt to set property 'GENERATED' with the following non-boolean value + \(which will be interpreted as "0"\): + + Junk-value + + That exact value will not be retrievable\. A value of "0" will be returned + instead\. + + This will be an error under policy CMP0118\. + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_relative_path3\.txt: # 1a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 1b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` +Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` +Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` +CMake Warning \(dev\) at CMP0163-Common-Test5\.cmake:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Attempt to set property 'GENERATED' with the following non-boolean value + \(which will be interpreted as "0"\): + + Junk-value + + That exact value will not be retrievable\. A value of "0" will be returned + instead\. + + This will be an error under policy CMP0118\. + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++ +Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test5\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN/CMP0163-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test5.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6-stderr.txt new file mode 100644 index 0000000..08711ab --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6-stderr.txt @@ -0,0 +1,45 @@ +^Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +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 CMP0163-Common-Test6\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6-build/Generated_source4\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test6\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test6.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-stderr.txt new file mode 100644 index 0000000..9d8af4f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-stderr.txt @@ -0,0 +1,100 @@ +^((CMake Warning \(dev\) at subdir-Common-Test7/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test7\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test7\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7-build/Generated_source[2-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test7.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8-stderr.txt new file mode 100644 index 0000000..4928234 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8-stderr.txt @@ -0,0 +1,45 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `1` +Generated_source2\.txt: # 1b # GENERATED = `1` +Generated_source2\.txt: # 2a # GENERATED = `1` +Generated_source2\.txt: # 2b # GENERATED = `1` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `1` +Generated_source3\.txt: # 1b # GENERATED = `1` +Generated_source3\.txt: # 2a # GENERATED = `1` +Generated_source3\.txt: # 2b # GENERATED = `1` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `1` +Generated_source5\.txt: # 1b # GENERATED = `1` +Generated_source5\.txt: # 2a # GENERATED = `1` +Generated_source5\.txt: # 2b # GENERATED = `1` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `1` +Generated_source6\.txt: # 1b # GENERATED = `1` +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 CMP0163-Common-Test8\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8-build/Generated_source4\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test8\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b-stderr.txt new file mode 100644 index 0000000..200a180 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b-stderr.txt @@ -0,0 +1,45 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test8b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test8b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test8b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-stderr.txt new file mode 100644 index 0000000..4d35ef0 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-stderr.txt @@ -0,0 +1,84 @@ +^((CMake Warning \(dev\) at subdir-Common-Test9/CMakeLists\.txt:[0-9]+ \(set_property\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+ +(CMake Warning \(dev\) at CMP0163-Common-Test9\.cmake:[0-9]+ \(add_subdirectory\): + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. + + Unsetting property 'GENERATED' will not be allowed under policy CMP0118! + +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. ++)+)+ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-result.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-stderr.txt b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-stderr.txt new file mode 100644 index 0000000..ed65a7c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +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 CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0163-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN/CMP0163-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b.cmake b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b.cmake new file mode 100644 index 0000000..c0327b8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0118-WARN/CMP0163-WARN-Test9b.cmake @@ -0,0 +1,7 @@ +# Leave CMP0118 unset! +# Leave CMP0163 unset! + +# Call the associated test. +cmake_path(GET RunCMake_TEST STEM testcase) +string(REGEX REPLACE "WARN" "Common" testcase "${testcase}") +include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake) diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Helper.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Helper.cmake new file mode 100644 index 0000000..b237b7f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Helper.cmake @@ -0,0 +1,14 @@ +macro(get_and_print_GENERATED_property filename) + get_property(prop SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${filename}" PROPERTY GENERATED) + message(NOTICE "${filename}: # 1a # GENERATED = `${prop}`") + get_source_file_property(prop "${CMAKE_CURRENT_BINARY_DIR}/${filename}" GENERATED) + message(NOTICE "${filename}: # 1b # GENERATED = `${prop}`") + get_property(prop SOURCE "${filename}" PROPERTY GENERATED) + message(NOTICE "${filename}: # 2a # GENERATED = `${prop}`") + get_source_file_property(prop "${filename}" GENERATED) + message(NOTICE "${filename}: # 2b # GENERATED = `${prop}`") + get_property(prop SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${filename}" PROPERTY GENERATED) + message(NOTICE "${filename}: # 3a # GENERATED = `${prop}`") + get_source_file_property(prop "${CMAKE_CURRENT_SOURCE_DIR}/${filename}" GENERATED) + message(NOTICE "${filename}: # 3b # GENERATED = `${prop}`") +endmacro() diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test1.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test1.cmake new file mode 100644 index 0000000..2b66515 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test1.cmake @@ -0,0 +1,9 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +get_property(prop SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test10.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test10.cmake new file mode 100644 index 0000000..97984d8 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test10.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +# The sources of custom0 will not be modified by set_property! +add_custom_target(custom0) +target_sources(custom0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +# The sources of custom[1-6] will (tried to) be modified by set_property! +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) + +add_subdirectory(subdir-Common-Test10) + +get_and_print_GENERATED_property("Generated_source0.txt") +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test11.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test11.cmake new file mode 100644 index 0000000..59d92f4 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test11.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +# The sources of custom0 will not be modified by set_property! +add_custom_target(custom0) +target_sources(custom0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +# The sources of custom[1-6] will (tried to) be modified by set_property! +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) + +add_subdirectory(subdir-Common-Test11) + +get_and_print_GENERATED_property("Generated_source0.txt") +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test12.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test12.cmake new file mode 100644 index 0000000..9d514f0 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test12.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +# The sources of custom0 will not be modified by set_property! +add_custom_target(custom0) +target_sources(custom0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +# The sources of custom[1-6] will (tried to) be modified by set_property! +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +add_custom_command(TARGET custom0 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +add_custom_command(TARGET custom1 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_command(TARGET custom2 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_command(TARGET custom3 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) + +add_subdirectory(subdir-Common-Test12) + +get_and_print_GENERATED_property("Generated_source0.txt") +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test13.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test13.cmake new file mode 100644 index 0000000..b79f369 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test13.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +# The sources of custom0 will not be modified by set_property! +add_custom_target(custom0) +target_sources(custom0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +# The sources of custom[1-6] will (tried to) be modified by set_property! +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +add_custom_command(TARGET custom0 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +add_custom_command(TARGET custom1 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_command(TARGET custom2 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_command(TARGET custom3 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) + +add_subdirectory(subdir-Common-Test13) + +get_and_print_GENERATED_property("Generated_source0.txt") +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test14.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test14.cmake new file mode 100644 index 0000000..203b114 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test14.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +# The sources of custom0 will not be modified by set_property! +add_custom_target(custom0) +target_sources(custom0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +# The sources of custom[1-6] will (tried to) be modified by set_property! +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +add_custom_target(custom0_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +add_custom_target(custom1_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) + +add_subdirectory(subdir-Common-Test14) + +get_and_print_GENERATED_property("Generated_source0.txt") +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test15.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test15.cmake new file mode 100644 index 0000000..f66011a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test15.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +# The sources of custom0 will not be modified by set_property! +add_custom_target(custom0) +target_sources(custom0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +# The sources of custom[1-6] will (tried to) be modified by set_property! +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +add_custom_target(custom0_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.txt" +) +add_custom_target(custom1_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) + +add_subdirectory(subdir-Common-Test15) + +get_and_print_GENERATED_property("Generated_source0.txt") +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test16.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test16.cmake new file mode 100644 index 0000000..3c63277 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test16.cmake @@ -0,0 +1,38 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) + + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_command(TARGET custom2 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) + +add_subdirectory(subdir-Common-Test16) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test1b.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test1b.cmake new file mode 100644 index 0000000..622633f --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test1b.cmake @@ -0,0 +1,9 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test2.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test2.cmake new file mode 100644 index 0000000..1180b6b --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test2.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_property(SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED "1") +get_property(prop SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test2b.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test2b.cmake new file mode 100644 index 0000000..5317781 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test2b.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_source_files_properties( + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTIES GENERATED "1") +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test2c.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test2c.cmake new file mode 100644 index 0000000..2f2d3a2 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test2c.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_property(SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED "1") +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test2d.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test2d.cmake new file mode 100644 index 0000000..67f9b8c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test2d.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_source_files_properties( + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTIES GENERATED "1") +get_property(prop SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test3.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test3.cmake new file mode 100644 index 0000000..ce47460 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test3.cmake @@ -0,0 +1,66 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.txt" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "Generated_with_relative_path1.txt" + "Generated_with_relative_path2.txt" + "Generated_with_relative_path3.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path1.txt") + +set_property(SOURCE "Generated_with_full_path2.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_relative_path1.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path1.txt") + +set_property(SOURCE "Generated_with_relative_path2.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_relative_path3.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path1.txt") + +set_property(SOURCE "Generated_with_full_source_path2.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test3b.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test3b.cmake new file mode 100644 index 0000000..8dda231 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test3b.cmake @@ -0,0 +1,66 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path1.txt") + +set_property(SOURCE "Generated_with_full_path2.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_relative_path1.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path1.txt") + +set_property(SOURCE "Generated_with_relative_path2.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_relative_path3.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path1.txt") + +set_property(SOURCE "Generated_with_full_source_path2.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.txt" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "Generated_with_relative_path1.txt" + "Generated_with_relative_path2.txt" + "Generated_with_relative_path3.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" +) diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test4.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test4.cmake new file mode 100644 index 0000000..8de4f04 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test4.cmake @@ -0,0 +1,66 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.txt" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "Generated_with_relative_path1.txt" + "Generated_with_relative_path2.txt" + "Generated_with_relative_path3.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path1.txt") + +set_property(SOURCE "Generated_with_full_path2.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_relative_path1.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path1.txt") + +set_property(SOURCE "Generated_with_relative_path2.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_relative_path3.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path1.txt") + +set_property(SOURCE "Generated_with_full_source_path2.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test4b.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test4b.cmake new file mode 100644 index 0000000..d218f5d --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test4b.cmake @@ -0,0 +1,66 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path1.txt") + +set_property(SOURCE "Generated_with_full_path2.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_relative_path1.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path1.txt") + +set_property(SOURCE "Generated_with_relative_path2.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_relative_path3.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path1.txt") + +set_property(SOURCE "Generated_with_full_source_path2.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.txt" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "Generated_with_relative_path1.txt" + "Generated_with_relative_path2.txt" + "Generated_with_relative_path3.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" +) diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test5.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test5.cmake new file mode 100644 index 0000000..235e5e5 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test5.cmake @@ -0,0 +1,78 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "Generated_with_relative_path1.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "Generated_with_relative_path2.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "Generated_with_relative_path3.txt" +) +add_custom_target(custom7) +target_sources(custom7 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.txt" +) +add_custom_target(custom8) +target_sources(custom8 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.txt" +) +add_custom_target(custom9) +target_sources(custom9 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.txt" + PROPERTY GENERATED "tRue") +get_and_print_GENERATED_property("Generated_with_full_path1.txt") + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.txt" + PROPERTY GENERATED "SomeVar-NOTFOUND") +get_and_print_GENERATED_property("Generated_with_full_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.txt" + PROPERTY GENERATED "Junk-value") +get_and_print_GENERATED_property("Generated_with_full_path3.txt") + + +set_property(SOURCE "Generated_with_relative_path1.txt" + PROPERTY GENERATED "tRue") +get_and_print_GENERATED_property("Generated_with_relative_path1.txt") + +set_property(SOURCE "Generated_with_relative_path2.txt" + PROPERTY GENERATED "SomeVar-NOTFOUND") +get_and_print_GENERATED_property("Generated_with_relative_path2.txt") + +set_property(SOURCE "Generated_with_relative_path3.txt" + PROPERTY GENERATED "Junk-value") +get_and_print_GENERATED_property("Generated_with_relative_path3.txt") + + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.txt" + PROPERTY GENERATED "tRue") +get_and_print_GENERATED_property("Generated_with_full_source_path1.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.txt" + PROPERTY GENERATED "SomeVar-NOTFOUND") +get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" + PROPERTY GENERATED "Junk-value") +get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test6.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test6.cmake new file mode 100644 index 0000000..b89af65 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test6.cmake @@ -0,0 +1,44 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + PROPERTY GENERATED "1") + +add_subdirectory(subdir-Common-Test6) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test7.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test7.cmake new file mode 100644 index 0000000..d1586f5 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test7.cmake @@ -0,0 +1,44 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + PROPERTY GENERATED "1") + +add_subdirectory(subdir-Common-Test7) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test8.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test8.cmake new file mode 100644 index 0000000..c2bfd03 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test8.cmake @@ -0,0 +1,51 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test8) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test8b.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test8b.cmake new file mode 100644 index 0000000..cba4817 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test8b.cmake @@ -0,0 +1,51 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test8b) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test9.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test9.cmake new file mode 100644 index 0000000..dd2e128 --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test9.cmake @@ -0,0 +1,51 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test9) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMP0163-Common-Test9b.cmake b/Tests/RunCMake/CMP0163/CMP0163-Common-Test9b.cmake new file mode 100644 index 0000000..c7d494c --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMP0163-Common-Test9b.cmake @@ -0,0 +1,51 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0163-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test9b) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0163/CMakeLists.txt b/Tests/RunCMake/CMP0163/CMakeLists.txt new file mode 100644 index 0000000..4ae248a --- /dev/null +++ b/Tests/RunCMake/CMP0163/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.19) # Must be older than 3.20 in order to also not set CMP0118! +cmake_policy(SET CMP0115 NEW) # CMP0115 is correct here (for reducing error-output)! +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CMP0163/RunCMakeTest.cmake b/Tests/RunCMake/CMP0163/RunCMakeTest.cmake new file mode 100644 index 0000000..edfe130 --- /dev/null +++ b/Tests/RunCMake/CMP0163/RunCMakeTest.cmake @@ -0,0 +1,147 @@ +include(RunCMake) + +run_cmake(CMP0118-WARN/CMP0163-OLD-Test1) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test1b) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test2) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test2b) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test2c) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test2d) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test3) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test3b) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test4) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test4b) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test5) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test6) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test7) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test8) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test8b) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test9) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test9b) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test10) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test11) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test12) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test13) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test14) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test15) +run_cmake(CMP0118-WARN/CMP0163-OLD-Test16) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test1) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test1b) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test2) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test2b) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test2c) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test2d) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test3) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test3b) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test4) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test4b) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test5) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test6) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test7) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test8) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test8b) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test9) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test9b) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test10) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test11) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test12) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test13) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test14) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test15) +run_cmake(CMP0118-WARN/CMP0163-WARN-Test16) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test1) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test1b) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test2) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test2b) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test2c) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test2d) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test3) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test3b) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test4) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test4b) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test5) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test6) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test7) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test8) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test8b) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test9) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test9b) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test10) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test11) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test12) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test13) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test14) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test15) +run_cmake(CMP0118-WARN/CMP0163-NEW-Test16) + +run_cmake(CMP0118-NEW/CMP0163-OLD-Test1) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test1b) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test2) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test2b) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test2c) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test2d) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test3) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test3b) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test4) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test4b) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test5) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test6) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test7) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test8) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test8b) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test9) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test9b) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test10) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test11) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test12) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test13) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test14) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test15) +run_cmake(CMP0118-NEW/CMP0163-OLD-Test16) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test1) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test1b) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test2) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test2b) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test2c) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test2d) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test3) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test3b) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test4) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test4b) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test5) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test6) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test7) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test8) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test8b) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test9) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test9b) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test10) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test11) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test12) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test13) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test14) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test15) +run_cmake(CMP0118-NEW/CMP0163-WARN-Test16) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test1) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test1b) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test2) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test2b) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test2c) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test2d) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test3) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test3b) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test4) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test4b) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test5) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test6) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test7) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test8) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test8b) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test9) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test9b) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test10) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test11) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test12) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test13) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test14) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test15) +run_cmake(CMP0118-NEW/CMP0163-NEW-Test16) diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test10/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test10/CMakeLists.txt new file mode 100644 index 0000000..6bc99cb --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test10/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test11/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test11/CMakeLists.txt new file mode 100644 index 0000000..fbd7e6f --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test11/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test12/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test12/CMakeLists.txt new file mode 100644 index 0000000..916725c --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test12/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_command(TARGET custom4 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) +add_custom_command(TARGET custom5 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" +) +add_custom_command(TARGET custom6 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test13/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test13/CMakeLists.txt new file mode 100644 index 0000000..7ad02df --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test13/CMakeLists.txt @@ -0,0 +1,36 @@ +# Note: Target "custom4" was not created in this directory, so setting this build-event will fail! +add_custom_command(TARGET custom4 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) +# Note: Target "custom5" was not created in this directory, so setting this build-event will fail! +add_custom_command(TARGET custom5 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" +) +# Note: Target "custom6" was not created in this directory, so setting this build-event will fail! +add_custom_command(TARGET custom6 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test14/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test14/CMakeLists.txt new file mode 100644 index 0000000..7397db9 --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test14/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_target(custom4_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) +add_custom_target(custom5_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" +) +add_custom_target(custom6_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test15/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test15/CMakeLists.txt new file mode 100644 index 0000000..314e427 --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test15/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_target(custom4_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) +add_custom_target(custom5_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" +) +add_custom_target(custom6_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test16/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test16/CMakeLists.txt new file mode 100644 index 0000000..877c829 --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test16/CMakeLists.txt @@ -0,0 +1,10 @@ +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" +) +add_custom_command(TARGET custom4 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test6/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test6/CMakeLists.txt new file mode 100644 index 0000000..fa307d1 --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test6/CMakeLists.txt @@ -0,0 +1,16 @@ +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test7/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test7/CMakeLists.txt new file mode 100644 index 0000000..6362f78 --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test7/CMakeLists.txt @@ -0,0 +1,16 @@ +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test8/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test8/CMakeLists.txt new file mode 100644 index 0000000..eefe18c --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test8/CMakeLists.txt @@ -0,0 +1,31 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test8b/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test8b/CMakeLists.txt new file mode 100644 index 0000000..1e4cccd --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test8b/CMakeLists.txt @@ -0,0 +1,13 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + CONTENT "int func();\nint main(){ return func(); }" +) diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test9/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test9/CMakeLists.txt new file mode 100644 index 0000000..99f6d73 --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test9/CMakeLists.txt @@ -0,0 +1,31 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + TARGET_DIRECTORY custom1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0163/subdir-Common-Test9b/CMakeLists.txt b/Tests/RunCMake/CMP0163/subdir-Common-Test9b/CMakeLists.txt new file mode 100644 index 0000000..f94f36f --- /dev/null +++ b/Tests/RunCMake/CMP0163/subdir-Common-Test9b/CMakeLists.txt @@ -0,0 +1,13 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" + CONTENT "int func();\nint main(){ return func(); }" +) diff --git a/Tests/RunCMake/CMP0165/CMP0165-NEW-result.txt b/Tests/RunCMake/CMP0165/CMP0165-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0165/CMP0165-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0165/CMP0165-NEW-stderr.txt b/Tests/RunCMake/CMP0165/CMP0165-NEW-stderr.txt new file mode 100644 index 0000000..662d8ad --- /dev/null +++ b/Tests/RunCMake/CMP0165/CMP0165-NEW-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at CMP0165-NEW\.cmake:[0-9]+ \(enable_language\): + project\(\) must be called prior to this enable_language\(\) call\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0165/CMP0165-NEW.cmake b/Tests/RunCMake/CMP0165/CMP0165-NEW.cmake new file mode 100644 index 0000000..8bcb3fd --- /dev/null +++ b/Tests/RunCMake/CMP0165/CMP0165-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0165 NEW) +enable_language(C) diff --git a/Tests/RunCMake/CMP0165/CMP0165-OLD.cmake b/Tests/RunCMake/CMP0165/CMP0165-OLD.cmake new file mode 100644 index 0000000..c80ba76 --- /dev/null +++ b/Tests/RunCMake/CMP0165/CMP0165-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0165 OLD) +enable_language(C) diff --git a/Tests/RunCMake/CMP0165/CMP0165-WARN-stderr.txt b/Tests/RunCMake/CMP0165/CMP0165-WARN-stderr.txt new file mode 100644 index 0000000..32a79df --- /dev/null +++ b/Tests/RunCMake/CMP0165/CMP0165-WARN-stderr.txt @@ -0,0 +1,5 @@ +CMake Warning \(dev\) at CMP0165-WARN\.cmake:[0-9]+ \(enable_language\): + project\(\) should be called prior to this enable_language\(\) call\. +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/CMP0165/CMP0165-WARN.cmake b/Tests/RunCMake/CMP0165/CMP0165-WARN.cmake new file mode 100644 index 0000000..75149dd --- /dev/null +++ b/Tests/RunCMake/CMP0165/CMP0165-WARN.cmake @@ -0,0 +1,2 @@ +# Don't touch the policy, it should warn by default +enable_language(C) diff --git a/Tests/RunCMake/CMP0165/CMakeLists.txt b/Tests/RunCMake/CMP0165/CMakeLists.txt new file mode 100644 index 0000000..2fa8c4e --- /dev/null +++ b/Tests/RunCMake/CMP0165/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.29) + +# This is different to the usual RunCMake test pattern. We are specifically +# testing the scenario where enable_language() is called before project(). +include(${RunCMake_TEST}.cmake) + +project(${RunCMake_TEST} NONE) diff --git a/Tests/RunCMake/CMP0165/RunCMakeTest.cmake b/Tests/RunCMake/CMP0165/RunCMakeTest.cmake new file mode 100644 index 0000000..f5f167c --- /dev/null +++ b/Tests/RunCMake/CMP0165/RunCMakeTest.cmake @@ -0,0 +1,5 @@ +include(RunCMake) + +run_cmake(CMP0165-WARN) +run_cmake(CMP0165-OLD) +run_cmake(CMP0165-NEW) diff --git a/Tests/RunCMake/CMP0169/CMP0169-NEW-result.txt b/Tests/RunCMake/CMP0169/CMP0169-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0169/CMP0169-NEW-stderr.txt b/Tests/RunCMake/CMP0169/CMP0169-NEW-stderr.txt new file mode 100644 index 0000000..95418fb --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at .*/Modules/FetchContent\.cmake:[0-9]+ \(message\): + Calling FetchContent_Populate\(t2\) is deprecated, call + FetchContent_MakeAvailable\(t2\) instead\. Policy CMP0169 can be set to OLD + to allow FetchContent_Populate\(t2\) to be called directly for now, but the + ability to call it with declared details will be removed completely in a + future version\. +Call Stack \(most recent call first\): + CMP0169\.cmake:[0-9]+ \(FetchContent_Populate\) + CMP0169-NEW\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0169/CMP0169-NEW-stdout.txt b/Tests/RunCMake/CMP0169/CMP0169-NEW-stdout.txt new file mode 100644 index 0000000..b74fa26 --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-NEW-stdout.txt @@ -0,0 +1,2 @@ +Direct download +-- Configuring incomplete, errors occurred! diff --git a/Tests/RunCMake/CMP0169/CMP0169-NEW.cmake b/Tests/RunCMake/CMP0169/CMP0169-NEW.cmake new file mode 100644 index 0000000..32328b6 --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0169 NEW) +include(CMP0169.cmake) diff --git a/Tests/RunCMake/CMP0169/CMP0169-OLD-stdout.txt b/Tests/RunCMake/CMP0169/CMP0169-OLD-stdout.txt new file mode 100644 index 0000000..ea56073 --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-OLD-stdout.txt @@ -0,0 +1,4 @@ +Direct download +Declared download +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) diff --git a/Tests/RunCMake/CMP0169/CMP0169-OLD.cmake b/Tests/RunCMake/CMP0169/CMP0169-OLD.cmake new file mode 100644 index 0000000..217f137 --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0169 OLD) +include(CMP0169.cmake) diff --git a/Tests/RunCMake/CMP0169/CMP0169-WARN-stderr.txt b/Tests/RunCMake/CMP0169/CMP0169-WARN-stderr.txt new file mode 100644 index 0000000..7a06200 --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-WARN-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) at .*/Modules/FetchContent\.cmake:[0-9]+ \(message\): + Calling FetchContent_Populate\(t2\) is deprecated, call + FetchContent_MakeAvailable\(t2\) instead\. Policy CMP0169 can be set to OLD + to allow FetchContent_Populate\(t2\) to be called directly for now, but the + ability to call it with declared details will be removed completely in a + future version\. +Call Stack \(most recent call first\): + CMP0169\.cmake:[0-9]+ \(FetchContent_Populate\) + CMP0169-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/CMP0169/CMP0169-WARN-stdout.txt b/Tests/RunCMake/CMP0169/CMP0169-WARN-stdout.txt new file mode 100644 index 0000000..ea56073 --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-WARN-stdout.txt @@ -0,0 +1,4 @@ +Direct download +Declared download +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) diff --git a/Tests/RunCMake/CMP0169/CMP0169-WARN.cmake b/Tests/RunCMake/CMP0169/CMP0169-WARN.cmake new file mode 100644 index 0000000..63a9ecc --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169-WARN.cmake @@ -0,0 +1 @@ +include(CMP0169.cmake) diff --git a/Tests/RunCMake/CMP0169/CMP0169.cmake b/Tests/RunCMake/CMP0169/CMP0169.cmake new file mode 100644 index 0000000..e7a900d --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMP0169.cmake @@ -0,0 +1,14 @@ +cmake_policy(SET CMP0168 NEW) # Faster, don't need to test with sub-build + +include(FetchContent) + +FetchContent_Populate(t1 + DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Direct download" + UPDATE_COMMAND "" +) + +FetchContent_Declare(t2 + DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Declared download" + UPDATE_COMMAND "" +) +FetchContent_Populate(t2) diff --git a/Tests/RunCMake/CMP0169/CMakeLists.txt b/Tests/RunCMake/CMP0169/CMakeLists.txt new file mode 100644 index 0000000..94e43ba --- /dev/null +++ b/Tests/RunCMake/CMP0169/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.29) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0169/RunCMakeTest.cmake b/Tests/RunCMake/CMP0169/RunCMakeTest.cmake new file mode 100644 index 0000000..92d7fcd --- /dev/null +++ b/Tests/RunCMake/CMP0169/RunCMakeTest.cmake @@ -0,0 +1,5 @@ +include(RunCMake) + +run_cmake(CMP0169-WARN) +run_cmake(CMP0169-OLD) +run_cmake(CMP0169-NEW) diff --git a/Tests/RunCMake/CMP0170/CMP0170-NEW-result.txt b/Tests/RunCMake/CMP0170/CMP0170-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0170/CMP0170-NEW-stderr.txt b/Tests/RunCMake/CMP0170/CMP0170-NEW-stderr.txt new file mode 100644 index 0000000..f786bd6 --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-NEW-stderr.txt @@ -0,0 +1,14 @@ +CMake Error at .*/Modules/FetchContent\.cmake:[0-9]+ \(message\): + FETCHCONTENT_FULLY_DISCONNECTED is set to true, which requires the source + directory for dependency t1 to already be populated\. This generally means + it must not be set to true the first time CMake is run in a build + directory\. The following source directory should already be populated, but + it doesn't exist:[ +]+ .*/Tests/RunCMake/CMP0170/IdoNotExist[ +]+ Policy CMP0170 controls enforcement of this requirement\. +Call Stack \(most recent call first\): + .*/Modules/FetchContent\.cmake:[0-9]+:EVAL:1 \(__FetchContent_Populate\) + .*/Modules/FetchContent\.cmake:[0-9]+ \(cmake_language\) + CMP0170\.cmake:[0-9]+ \(FetchContent_Populate\) + CMP0170-NEW\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0170/CMP0170-NEW-stdout.txt b/Tests/RunCMake/CMP0170/CMP0170-NEW-stdout.txt new file mode 100644 index 0000000..2dc34a6 --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-NEW-stdout.txt @@ -0,0 +1,2 @@ +-- Starting population +-- Configuring incomplete, errors occurred! diff --git a/Tests/RunCMake/CMP0170/CMP0170-NEW.cmake b/Tests/RunCMake/CMP0170/CMP0170-NEW.cmake new file mode 100644 index 0000000..60b386a --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0170 NEW) +include(CMP0170.cmake) diff --git a/Tests/RunCMake/CMP0170/CMP0170-OLD-stdout.txt b/Tests/RunCMake/CMP0170/CMP0170-OLD-stdout.txt new file mode 100644 index 0000000..82c260b --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-OLD-stdout.txt @@ -0,0 +1,3 @@ +-- Starting population +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) diff --git a/Tests/RunCMake/CMP0170/CMP0170-OLD.cmake b/Tests/RunCMake/CMP0170/CMP0170-OLD.cmake new file mode 100644 index 0000000..812cca0 --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0170 OLD) +include(CMP0170.cmake) diff --git a/Tests/RunCMake/CMP0170/CMP0170-WARN-stderr.txt b/Tests/RunCMake/CMP0170/CMP0170-WARN-stderr.txt new file mode 100644 index 0000000..1253abd --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-WARN-stderr.txt @@ -0,0 +1,28 @@ +CMake Warning at .*/Modules/FetchContent\.cmake:[0-9]+ \(message\): + FETCHCONTENT_FULLY_DISCONNECTED is set to true, which requires the source + directory for dependency t1 to already be populated\. This generally means + it must not be set to true the first time CMake is run in a build + directory\. The following source directory should already be populated, but + it doesn't exist:[ +]+ .*/Tests/RunCMake/CMP0170/IdoNotExist[ +]+ Policy CMP0170 controls enforcement of this requirement\. +Call Stack \(most recent call first\): + .*/Modules/FetchContent\.cmake:[0-9]+:EVAL:1 \(__FetchContent_Populate\) + .*/Modules/FetchContent\.cmake:[0-9]+ \(cmake_language\) + CMP0170\.cmake:[0-9]+ \(FetchContent_Populate\) + CMP0170-WARN\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +[ +]+CMake Warning at .*/Modules/FetchContent\.cmake:[0-9]+ \(message\): + FETCHCONTENT_FULLY_DISCONNECTED is set to true, which requires the source + directory for dependency t2 to already be populated\. This generally means + it must not be set to true the first time CMake is run in a build + directory\. The following source directory should already be populated, but + it doesn't exist:[ +]+ .*/Tests/RunCMake/CMP0170/IdoNotExist[ +]+ Policy CMP0170 controls enforcement of this requirement\. +Call Stack \(most recent call first\): + .*/Modules/FetchContent\.cmake:[0-9]+ \(__FetchContent_Populate\) + CMP0170\.cmake:[0-9]+ \(FetchContent_MakeAvailable\) + CMP0170-WARN\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0170/CMP0170-WARN-stdout.txt b/Tests/RunCMake/CMP0170/CMP0170-WARN-stdout.txt new file mode 100644 index 0000000..82c260b --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-WARN-stdout.txt @@ -0,0 +1,3 @@ +-- Starting population +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) diff --git a/Tests/RunCMake/CMP0170/CMP0170-WARN.cmake b/Tests/RunCMake/CMP0170/CMP0170-WARN.cmake new file mode 100644 index 0000000..1754c24 --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170-WARN.cmake @@ -0,0 +1 @@ +include(CMP0170.cmake) diff --git a/Tests/RunCMake/CMP0170/CMP0170.cmake b/Tests/RunCMake/CMP0170/CMP0170.cmake new file mode 100644 index 0000000..4e63e25 --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMP0170.cmake @@ -0,0 +1,18 @@ +cmake_policy(SET CMP0168 NEW) # Faster, don't need to test with sub-build +cmake_policy(SET CMP0169 OLD) # So we can test FetchContent_Populate() directly + +set(FETCHCONTENT_FULLY_DISCONNECTED TRUE) + +include(FetchContent) + +message(STATUS "Starting population") + +FetchContent_Declare(t1 + SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/IdoNotExist" +) +FetchContent_Populate(t1) + +FetchContent_Declare(t2 + SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/IdoNotExist" +) +FetchContent_MakeAvailable(t2) diff --git a/Tests/RunCMake/CMP0170/CMakeLists.txt b/Tests/RunCMake/CMP0170/CMakeLists.txt new file mode 100644 index 0000000..94e43ba --- /dev/null +++ b/Tests/RunCMake/CMP0170/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.29) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0170/RunCMakeTest.cmake b/Tests/RunCMake/CMP0170/RunCMakeTest.cmake new file mode 100644 index 0000000..0ba64e3 --- /dev/null +++ b/Tests/RunCMake/CMP0170/RunCMakeTest.cmake @@ -0,0 +1,5 @@ +include(RunCMake) + +run_cmake(CMP0170-WARN) +run_cmake(CMP0170-OLD) +run_cmake(CMP0170-NEW) diff --git a/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stderr.txt b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stderr.txt new file mode 100644 index 0000000..1953091 --- /dev/null +++ b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stderr.txt @@ -0,0 +1,9 @@ +^CMake Deprecation Warning at [^ +]*/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0127 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\.$ diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index a9fe571..e205d9f 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -173,6 +173,10 @@ add_RunCMake_test(CMP0153) add_RunCMake_test(CMP0156 -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION}) add_RunCMake_test(CMP0160) +add_RunCMake_test(CMP0163) +add_RunCMake_test(CMP0165) +add_RunCMake_test(CMP0169) +add_RunCMake_test(CMP0170) # The test for Policy 65 requires the use of the # CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode @@ -250,6 +254,7 @@ if(CMAKE_GENERATOR MATCHES "Ninja") add_RunCMake_test(NinjaPrivateDeps -DCMAKE_C_OUTPUT_EXTENSION=${CMAKE_C_OUTPUT_EXTENSION} -DRunCMake_GENERATOR_IS_MULTI_CONFIG=${_isMultiConfig}) + add_RunCMake_test(InstallParallel) endif() add_RunCMake_test(CTest) @@ -438,6 +443,16 @@ add_RunCMake_test(GoogleTest # Note: does not actually depend on Google Test ) add_RunCMake_test(Graphviz) add_RunCMake_test(Languages) + +add_RunCMake_test(LanguageStandards + -DCMake_NO_C_STANDARD=${CMake_NO_C_STANDARD} + -DCMake_NO_CXX_STANDARD=${CMake_NO_CXX_STANDARD} + -DCMake_TEST_CUDA=${CMake_TEST_CUDA} + -DCMake_TEST_HIP=${CMake_TEST_HIP} + -DCMake_TEST_OBJC=${CMake_TEST_OBJC} +) +set_property(TEST RunCMake.LanguageStandards APPEND PROPERTY LABELS "CUDA" "HIP") + add_RunCMake_test(LinkItemValidation) add_RunCMake_test(LinkStatic) if(CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|Fujitsu|FujitsuClang)$") @@ -504,10 +519,15 @@ set_property(TEST RunCMake.add_subdirectory APPEND PROPERTY LABELS "Fortran") add_RunCMake_test(add_test -DPSEUDO_EMULATOR=$<TARGET_FILE:pseudo_emulator>) add_RunCMake_test(build_command) add_executable(exit_code exit_code.c) +if(NOT CMAKE_C_COMPILER_ID MATCHES "OrangeC|Watcom" + AND NOT CMAKE_C_FLAGS MATCHES "-fsanitize=") + add_executable(exit_crash exit_crash.c) + set(EXIT_CRASH_EXE $<TARGET_FILE:exit_crash>) +endif() set(execute_process_ARGS -DEXIT_CODE_EXE=$<TARGET_FILE:exit_code> + -DEXIT_CRASH_EXE=${EXIT_CRASH_EXE} -DPRINT_STDIN_EXE=$<TARGET_FILE:print_stdin> - -DPython_EXECUTABLE=${Python_EXECUTABLE} -DCYGWIN=${CYGWIN} ) if(NOT CMake_TEST_EXTERNAL_CMAKE) @@ -557,13 +577,18 @@ add_RunCMake_test(file-CHMOD -DMSYS=${MSYS}) foreach(var CMake_TEST_NO_NETWORK CMake_TEST_TLS_VERIFY_URL + CMake_TEST_TLS_VERIFY_URL_BAD + CMake_TEST_TLS_VERSION ) if(DEFINED ${var}) list(APPEND file-DOWNLOAD_ARGS -D${var}=${${var}}) endif() endforeach() add_RunCMake_test(file-DOWNLOAD) -add_RunCMake_test(file-RPATH -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}) +add_RunCMake_test(file-RPATH + -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} + -DCMake_TEST_ELF_LARGE=${CMake_TEST_ELF_LARGE} +) add_RunCMake_test(file-STRINGS) add_RunCMake_test(find_file -DMINGW=${MINGW}) add_RunCMake_test(find_library -DMINGW=${MINGW} -DCYGWIN=${CYGWIN} -DMSYS=${MSYS} -DMSVC=${MSVC}) @@ -724,23 +749,19 @@ endif() if("${CMAKE_GENERATOR}" MATCHES "Visual Studio") add_RunCMake_test(CMAKE_MSVCIDE_RUN_PATH) add_RunCMake_test(include_external_msproject -DVS_PLATFORM_NAME=${CMAKE_VS_PLATFORM_NAME}) - if("${CMAKE_GENERATOR}" MATCHES "Visual Studio (9|10)" AND NOT CMAKE_VS_DEVENV_COMMAND) - set(NO_USE_FOLDERS 1) - endif() - add_RunCMake_test(VSSolution -DNO_USE_FOLDERS=${NO_USE_FOLDERS}) -endif() - -if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([^9]|9[0-9])") + add_RunCMake_test(VSSolution) add_RunCMake_test(VS10Project -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION} ) + add_RunCMake_test(VS10ProjectUseDebugLibraries) if( vs12 AND wince ) add_RunCMake_test( VS10ProjectWinCE "-DRunCMake_GENERATOR_PLATFORM=${wince_sdk}") endif() endif() -if(CMAKE_GENERATOR MATCHES "^Visual Studio (1[6-9]|[2-9][0-9])") +if(CMAKE_GENERATOR MATCHES "^Visual Studio (1[6-9]|[2-9][0-9])" + AND NOT CMAKE_GENERATOR_TOOLSET MATCHES "^(v80|v90|v100|v110|v120)$") add_RunCMake_test(VsDotnetSdk) add_RunCMake_test(VsNugetPackageRestore) endif() @@ -1034,6 +1055,7 @@ set(cpack_tests DEB.DEB_PACKAGE_VERSION_BACK_COMPATIBILITY DEB.DEB_DESCRIPTION DEB.PROJECT_META + DEB.COMPONENT_WITH_SPECIAL_CHARS RPM.AUTO_SUFFIXES RPM.CUSTOM_BINARY_SPEC_FILE @@ -1056,6 +1078,7 @@ set(cpack_tests RPM.SYMLINKS RPM.USER_FILELIST RPM.PROJECT_META + RPM.COMPONENT_WITH_SPECIAL_CHARS 7Z TBZ2 @@ -1084,11 +1107,22 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k" AND NOT DEFINED CMake_TEST_E2K_BROKEN_L DEB.CUSTOM_NAMES DEB.DEB_PACKAGE_VERSION_BACK_COMPATIBILITY DEB.PROJECT_META DEB.DEPENDENCIES + DEB.EXTRA + DEB.GENERATE_SHLIBS_LDCONFIG + DEB.LONG_FILENAMES + DEB.MD5SUMS + DEB.EMPTY_DIR + DEB.DEFAULT_PERMISSIONS + DEB.VERSION + DEB.TIMESTAMPS RPM.PARTIALLY_RELOCATABLE_WARNING RPM.PER_COMPONENT_FIELDS RPM.USER_FILELIST RPM.DIST RPM.AUTO_SUFFIXES + 7Z + TXZ + TBZ2 TGZ ZIP STGZ @@ -1099,6 +1133,18 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k" AND NOT DEFINED CMake_TEST_E2K_BROKEN_L endif() add_RunCMake_test_group(CPack "${cpack_tests}") + +if(CMake_TEST_CPACK_WIX3 OR CMake_TEST_CPACK_WIX4) + add_RunCMake_test(CPack_WIX + -DCMake_TEST_CPACK_WIX3=${CMake_TEST_CPACK_WIX3} + -DCMake_TEST_CPACK_WIX4=${CMake_TEST_CPACK_WIX4} + ) +endif() + +if(CMake_TEST_CPACK_NUGET) + add_RunCMake_test(CPack_NuGet) +endif() + # add a test to make sure symbols are exported from a shared library # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used add_RunCMake_test(AutoExportDll @@ -1129,7 +1175,7 @@ if(CMake_TEST_ANDROID_NDK OR CMake_TEST_ANDROID_STANDALONE_TOOLCHAIN) set_property(TEST RunCMake.Android PROPERTY TIMEOUT ${CMake_TEST_ANDROID_TIMEOUT}) endif() -if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|9[0-9])") +if(${CMAKE_GENERATOR} MATCHES "Visual Studio") add_RunCMake_test(CSharpCustomCommand) if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64") add_RunCMake_test(CSharpReferenceImport) diff --git a/Tests/RunCMake/CMakePackage/NestedConfigFile-stdout.txt b/Tests/RunCMake/CMakePackage/NestedConfigFile-stdout.txt new file mode 100644 index 0000000..cdb3384 --- /dev/null +++ b/Tests/RunCMake/CMakePackage/NestedConfigFile-stdout.txt @@ -0,0 +1,6 @@ +(-- )?Before find_dependency: PACKAGE_PREFIX_DIR = .*/Tests/RunCMake/CMakePackage/NestedConfigFile-build/install_pkg_b +(-- )?Hello from pkg_a +(-- )?Leaving pkg_a-config\.cmake with PACKAGE_PREFIX_DIR = .*/Tests/RunCMake/CMakePackage/NestedConfigFile-build/install_pkg_a +(-- )?After find_dependency: PACKAGE_PREFIX_DIR = .*/Tests/RunCMake/CMakePackage/NestedConfigFile-build/install_pkg_b +(-- )?Hello from pkg_b +(-- )?Leaving pkg_b-config\.cmake with PACKAGE_PREFIX_DIR = .*/Tests/RunCMake/CMakePackage/NestedConfigFile-build/install_pkg_b diff --git a/Tests/RunCMake/CMakePackage/NestedConfigFile.cmake b/Tests/RunCMake/CMakePackage/NestedConfigFile.cmake new file mode 100644 index 0000000..2eeaebb --- /dev/null +++ b/Tests/RunCMake/CMakePackage/NestedConfigFile.cmake @@ -0,0 +1,43 @@ +set(CMAKE_INSTALL_DATADIR share) + +include(CMakePackageConfigHelpers) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/pkg_a-config.cmake.in [[ +@PACKAGE_INIT@ +include("@PACKAGE_CMAKE_INSTALL_DATADIR@/pkg_a_included.cmake") +message(STATUS "Leaving pkg_a-config.cmake with PACKAGE_PREFIX_DIR = ${PACKAGE_PREFIX_DIR}") +]]) +configure_package_config_file( + ${CMAKE_CURRENT_BINARY_DIR}/pkg_a-config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/install_pkg_a/pkg_a-config.cmake + INSTALL_DESTINATION . + PATH_VARS CMAKE_INSTALL_DATADIR +) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/install_pkg_a/share/pkg_a_included.cmake + [[message(STATUS "Hello from pkg_a")]] +) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/pkg_b-config.cmake.in [[ +@PACKAGE_INIT@ +include(CMakeFindDependencyMacro) +message(STATUS "Before find_dependency: PACKAGE_PREFIX_DIR = ${PACKAGE_PREFIX_DIR}") +find_dependency(pkg_a NO_DEFAULT_PATH + PATHS "@CMAKE_CURRENT_BINARY_DIR@/install_pkg_a" +) +message(STATUS "After find_dependency: PACKAGE_PREFIX_DIR = ${PACKAGE_PREFIX_DIR}") +include("@PACKAGE_CMAKE_INSTALL_DATADIR@/pkg_b_included.cmake") +message(STATUS "Leaving pkg_b-config.cmake with PACKAGE_PREFIX_DIR = ${PACKAGE_PREFIX_DIR}") +]]) +configure_package_config_file( + ${CMAKE_CURRENT_BINARY_DIR}/pkg_b-config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/install_pkg_b/pkg_b-config.cmake + INSTALL_DESTINATION . + PATH_VARS CMAKE_INSTALL_DATADIR +) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/install_pkg_b/share/pkg_b_included.cmake + [[message(STATUS "Hello from pkg_b")]] +) + +find_package(pkg_b REQUIRED NO_DEFAULT_PATH + PATHS ${CMAKE_CURRENT_BINARY_DIR}/install_pkg_b +) diff --git a/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake b/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake index 3b4bef5..c4a05e3 100644 --- a/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake @@ -4,6 +4,8 @@ if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) set(maybe_CMAKE_BUILD_TYPE -DCMAKE_BUILD_TYPE=Release) endif() +run_cmake_with_options(NestedConfigFile ${maybe_CMAKE_BUILD_TYPE}) + function(apple_export platform system_name archs sysroot) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/apple-export-${platform}-build) string(REPLACE ";" "\\;" archs "${archs}") diff --git a/Tests/RunCMake/CMakePresets/IncludeExpansionOtherMacros-stdout.txt b/Tests/RunCMake/CMakePresets/IncludeExpansionOtherMacros-stdout.txt new file mode 100644 index 0000000..d3f1afc --- /dev/null +++ b/Tests/RunCMake/CMakePresets/IncludeExpansionOtherMacros-stdout.txt @@ -0,0 +1,5 @@ +^Not searching for unused variables given on the command line\. +Available configure presets: + + "Include" + "IncludeCommon"$ diff --git a/Tests/RunCMake/CMakePresets/IncludeExpansionOtherMacros.json.in b/Tests/RunCMake/CMakePresets/IncludeExpansionOtherMacros.json.in new file mode 100644 index 0000000..c5693b5 --- /dev/null +++ b/Tests/RunCMake/CMakePresets/IncludeExpansionOtherMacros.json.in @@ -0,0 +1,10 @@ +{ + "version": 9, + "include": ["${sourceDir}/IncludeCommon.json"], + "configurePresets": [ + { + "name": "Include", + "inherits": ["IncludeCommon"] + } + ] +} diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake index 88027fb..2ec0a43 100644 --- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake @@ -262,15 +262,13 @@ if(RunCMake_GENERATOR MATCHES "^Visual Studio ") run_cmake_presets(VisualStudioWin32) run_cmake_presets(VisualStudioWin64) run_cmake_presets(VisualStudioWin32Override -A x64) - if(NOT RunCMake_GENERATOR STREQUAL "Visual Studio 9 2008") - run_cmake_presets(VisualStudioToolset) - run_cmake_presets(VisualStudioToolsetOverride -T "Test Toolset") - run_cmake_presets(VisualStudioInheritanceParent) - run_cmake_presets(VisualStudioInheritanceChild) - run_cmake_presets(VisualStudioInheritanceOverride) - run_cmake_presets(VisualStudioInheritanceMulti) - run_cmake_presets(VisualStudioInheritanceMultiSecond) - endif() + run_cmake_presets(VisualStudioToolset) + run_cmake_presets(VisualStudioToolsetOverride -T "Test Toolset") + run_cmake_presets(VisualStudioInheritanceParent) + run_cmake_presets(VisualStudioInheritanceChild) + run_cmake_presets(VisualStudioInheritanceOverride) + run_cmake_presets(VisualStudioInheritanceMulti) + run_cmake_presets(VisualStudioInheritanceMultiSecond) else() run_cmake_presets(ArchToolsetStrategyNone) run_cmake_presets(ArchToolsetStrategyDefault) @@ -407,6 +405,7 @@ set(CMakePresets_EXTRA_FILES set(ENV{TEST_ENV_INCLUDE_DIR} ${RunCMake_BINARY_DIR}/IncludeExpansion) run_cmake_presets(IncludeExpansion --list-presets) unset(ENV{TEST_ENV_INCLUDE_DIR}) +run_cmake_presets(IncludeExpansionOtherMacros --list-presets) unset(CMakePresets_EXTRA_FILES) run_cmake_presets(IncludeNotFound) run_cmake_presets(IncludeCycle) diff --git a/Tests/RunCMake/CPack/DEB/packaging_GROUP_default.cmake b/Tests/RunCMake/CPack/DEB/packaging_GROUP_default.cmake new file mode 100644 index 0000000..8821ab9 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/packaging_GROUP_default.cmake @@ -0,0 +1 @@ +set(CPACK_PACKAGE_CONTACT "someone") diff --git a/Tests/RunCMake/CPack/External/Prerequirements.cmake b/Tests/RunCMake/CPack/External/Prerequirements.cmake index e69de29..dbaf682 100644 --- a/Tests/RunCMake/CPack/External/Prerequirements.cmake +++ b/Tests/RunCMake/CPack/External/Prerequirements.cmake @@ -0,0 +1,4 @@ +function(get_test_prerequirements found_var config_file) + file(WRITE "${config_file}" "") + set(${found_var} true PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 258f6a6..5d32404 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -71,3 +71,5 @@ run_cpack_test_subtests( run_cpack_test(PROJECT_META "RPM.PROJECT_META;DEB.PROJECT_META" false "MONOLITHIC;COMPONENT") run_cpack_test_package_target(PRE_POST_SCRIPTS "ZIP" false "MONOLITHIC;COMPONENT") run_cpack_test_subtests(DUPLICATE_FILE "success;conflict_file;conflict_symlink" "TGZ" false "COMPONENT;GROUP") +run_cpack_test(COMPONENT_WITH_SPECIAL_CHARS "RPM.COMPONENT_WITH_SPECIAL_CHARS;DEB.COMPONENT_WITH_SPECIAL_CHARS;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ" false "MONOLITHIC;COMPONENT;GROUP") +run_cpack_test_package_target(COMPONENT_WITH_SPECIAL_CHARS "RPM.COMPONENT_WITH_SPECIAL_CHARS;DEB.COMPONENT_WITH_SPECIAL_CHARS;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ" false "MONOLITHIC;COMPONENT;GROUP") diff --git a/Tests/RunCMake/CPack/tests/COMPONENT_WITH_SPECIAL_CHARS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/COMPONENT_WITH_SPECIAL_CHARS/ExpectedFiles.cmake new file mode 100644 index 0000000..0eb250d --- /dev/null +++ b/Tests/RunCMake/CPack/tests/COMPONENT_WITH_SPECIAL_CHARS/ExpectedFiles.cmake @@ -0,0 +1,42 @@ +if(PACKAGING_TYPE STREQUAL "MONOLITHIC") + set(EXPECTED_FILES_COUNT "1") + set(EXPECTED_FILE_CONTENT_1_LIST + "/foo1" + "/foo1/CMakeLists.txt" + "/foo2" + "/foo2/CMakeLists.txt" + "/foo3" + "/foo3/CMakeLists.txt" + ) +elseif(PACKAGING_TYPE STREQUAL "COMPONENT") + set(EXPECTED_FILES_COUNT "3") + set(EXPECTED_FILE_1 "*-comp1.test1.*") + set(EXPECTED_FILE_CONTENT_1_LIST + "/foo1" + "/foo1/CMakeLists.txt" + ) + set(EXPECTED_FILE_2 "*-component2.*") + set(EXPECTED_FILE_CONTENT_2_LIST + "/foo2" + "/foo2/CMakeLists.txt" + ) + set(EXPECTED_FILE_3 "*-component3.*") + set(EXPECTED_FILE_CONTENT_3_LIST + "/foo3" + "/foo3/CMakeLists.txt" + ) +elseif(PACKAGING_TYPE STREQUAL "GROUP") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1 "*-group1.*") + set(EXPECTED_FILE_CONTENT_1_LIST + "/foo1" + "/foo1/CMakeLists.txt" + "/foo2" + "/foo2/CMakeLists.txt" + ) + set(EXPECTED_FILE_2 "*-group2.*") + set(EXPECTED_FILE_CONTENT_2_LIST + "/foo3" + "/foo3/CMakeLists.txt" + ) +endif() diff --git a/Tests/RunCMake/CPack/tests/COMPONENT_WITH_SPECIAL_CHARS/test.cmake b/Tests/RunCMake/CPack/tests/COMPONENT_WITH_SPECIAL_CHARS/test.cmake new file mode 100644 index 0000000..b905cc3 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/COMPONENT_WITH_SPECIAL_CHARS/test.cmake @@ -0,0 +1,34 @@ +install(FILES CMakeLists.txt DESTINATION foo1 COMPONENT comp1.test1) +install(FILES CMakeLists.txt DESTINATION foo2 COMPONENT comp2::test2) +install(FILES CMakeLists.txt DESTINATION foo3 COMPONENT comp3/test3) + +if(PACKAGING_TYPE STREQUAL "COMPONENT") + foreach(gen IN ITEMS ARCHIVE DEBIAN RPM) + set(CPACK_${gen}_COMP2::TEST2_FILE_NAME "component_with_special_chars-0.1.1-${CMAKE_SYSTEM_NAME}-component2") + set(CPACK_${gen}_COMP3/TEST3_FILE_NAME "component_with_special_chars-0.1.1-${CMAKE_SYSTEM_NAME}-component3") + endforeach() +elseif(PACKAGING_TYPE STREQUAL "GROUP") + set(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP) + foreach(gen IN ITEMS ARCHIVE DEB RPM) + set(CPACK_${gen}_COMPONENT_INSTALL ON) + endforeach() + include(CPackComponent) + + cpack_add_component_group(group1 DISPLAY_NAME "Group 1") + cpack_add_component_group(group2 DISPLAY_NAME "Group 2") + cpack_add_component(comp1.test1 + DISPLAY_NAME "Group 1" + DESCRIPTION "Component for Group 1" + GROUP group1 + ) + cpack_add_component(comp2::test2 + DISPLAY_NAME "Group 1" + DESCRIPTION "Component for Group 1" + GROUP group1 + ) + cpack_add_component(comp3/test3 + DISPLAY_NAME "Group 2" + DESCRIPTION "Component for Group 2" + GROUP group2 + ) +endif() diff --git a/Tests/RunCMake/CPack_NuGet/.gitattributes b/Tests/RunCMake/CPack_NuGet/.gitattributes new file mode 100644 index 0000000..4a8bbd0 --- /dev/null +++ b/Tests/RunCMake/CPack_NuGet/.gitattributes @@ -0,0 +1,3 @@ +# Do not check whitespace in the nuspec file for comparison. It needs to +# look identical to the file generated in the test. +expected.nuspec -whitespace diff --git a/Tests/RunCMake/CPack_NuGet/NuGetLib-cpack-NuGet-check.cmake b/Tests/RunCMake/CPack_NuGet/NuGetLib-cpack-NuGet-check.cmake new file mode 100644 index 0000000..e83f007 --- /dev/null +++ b/Tests/RunCMake/CPack_NuGet/NuGetLib-cpack-NuGet-check.cmake @@ -0,0 +1,23 @@ +file(GLOB generated_nuspec "${RunCMake_TEST_BINARY_DIR}/_CPack_Packages/*/NuGet/GeneratorTest-1.2.3-*/CPack.NuGet.nuspec") +if(NOT generated_nuspec) + set(RunCMake_TEST_FAILED "No nuspec file generated under ${RunCMake_TEST_BINARY_DIR}") +else() + # Read in the generated nuspec file content + file(READ "${generated_nuspec}" actual_nuspec) + # Read in the expected file content + file(READ "${CMAKE_CURRENT_LIST_DIR}/expected.nuspec" expected_nuspec) + + # Compare the file contents + string(COMPARE EQUAL "${actual_nuspec}" "${expected_nuspec}" nuspec_matches) + + if(NOT nuspec_matches) + set(RunCMake_TEST_FAILED "generated nuspec file incorrect") + set(failure_msg "") + # This would be nicer with a `diff` output, but it needs to be portable + string(APPEND failure_msg "\nExpected file:\n") + string(APPEND failure_msg "${expected_nuspec}") + string(APPEND failure_msg "Actual file:\n") + string(APPEND failure_msg "${actual_nuspec}") + set(RunCMake_TEST_FAILURE_MESSAGE "${failure_msg}") + endif() +endif() diff --git a/Tests/RunCMake/CPack_NuGet/RunCMakeTest.cmake b/Tests/RunCMake/CPack_NuGet/RunCMakeTest.cmake new file mode 100644 index 0000000..af8ad31 --- /dev/null +++ b/Tests/RunCMake/CPack_NuGet/RunCMakeTest.cmake @@ -0,0 +1,7 @@ +include(RunCPack) + +set(env_PATH "$ENV{PATH}") + +set(RunCPack_GENERATORS NuGet) + +run_cpack(NuGetLib) diff --git a/Tests/RunCMake/CPack_NuGet/expected.nuspec b/Tests/RunCMake/CPack_NuGet/expected.nuspec new file mode 100644 index 0000000..d5c6c45 --- /dev/null +++ b/Tests/RunCMake/CPack_NuGet/expected.nuspec @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> + <metadata> + <!-- Required elements--> + <id>GeneratorTest</id> + <version>1.2.3</version> + <description><![CDATA[A NuGet package for testing CMake's CPack NuGet generator]]></description> + <authors><![CDATA[ACME Inc]]></authors> + + <!-- Optional elements --> + + <owners><![CDATA[ACME Inc]]></owners> + <projectUrl><![CDATA[https://www.example.com]]></projectUrl> + + <license type="expression"><![CDATA[MIT]]></license> + + + + + <summary><![CDATA[A test NuGet package]]></summary> + + + + + <repository type="git" url="https://github.com/example/nugetlib.git" /> + <dependencies> + <group> + <dependency id="Baz" version="9.8.6" /> + </group> + <group targetFramework=".NETFramework4"> + <dependency id="Foo" version="1.23" /> + <dependency id="Bar" version="4.3.2" /> + </group> + <group targetFramework="net6.0" /> + </dependencies> + </metadata> + +</package> diff --git a/Tests/RunCMake/CPack_WIX/3-AppWiX-cpack-WIX-check.cmake b/Tests/RunCMake/CPack_WIX/3-AppWiX-cpack-WIX-check.cmake new file mode 100644 index 0000000..a7a28ae --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/3-AppWiX-cpack-WIX-check.cmake @@ -0,0 +1 @@ +include(${RunCMake_SOURCE_DIR}/cpack-check-common.cmake) diff --git a/Tests/RunCMake/CPack_WIX/3-AppWiX-cpack-WIX-stdout.txt b/Tests/RunCMake/CPack_WIX/3-AppWiX-cpack-WIX-stdout.txt new file mode 100644 index 0000000..2998440 --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/3-AppWiX-cpack-WIX-stdout.txt @@ -0,0 +1,11 @@ +CPack: Create package using WIX +CPack: Install projects +CPack: - Install project: CPackWiXGenerator \[Release\] +CPack: - Install component: applications +CPack: - Install component: applications2 +CPack: - Install component: extras +CPack: - Install component: headers +CPack: - Install component: libraries +CPack: Create package +CPack: - package: [^ +]*/Tests/RunCMake/CPack_WIX/3-AppWiX-build/MyLib-1\.0\.0-(win64|windows-arm64)\.msi generated\. diff --git a/Tests/RunCMake/CPack_WIX/3-AppWiX-verify-stdout.txt b/Tests/RunCMake/CPack_WIX/3-AppWiX-verify-stdout.txt new file mode 100644 index 0000000..4713447 --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/3-AppWiX-verify-stdout.txt @@ -0,0 +1,33 @@ +-- MyLib-1\.0\.0-(win64|windows-arm64)\.msi +Component: 'CM_CP_applications.bin.my_libapp.exe' 'CM_DP_applications.bin' +Component: 'CM_SHORTCUT_applications' 'PROGRAM_MENU_FOLDER' +Component: 'CM_SHORTCUT_DESKTOP_applications' 'DesktopFolder' +Component: 'CM_CP_applications2.bin.my_other_app.exe' 'CM_DP_applications2.bin' +Component: 'CM_SHORTCUT_applications2' 'PROGRAM_MENU_FOLDER' +Component: 'CM_SHORTCUT_DESKTOP_applications2' 'DesktopFolder' +Component: 'CM_C_EMPTY_CM_DP_extras.extras.empty' 'CM_DP_extras.extras.empty' +Component: 'CM_CP_headers.include.file_with_spaces.h' 'CM_DP_headers.include' +Component: 'CM_CP_headers.include.mylib.h' 'CM_DP_headers.include' +Component: 'CM_CP_libraries.lib.mylib.lib' 'CM_DP_libraries.lib' +Directory: 'INSTALL_ROOT' 'ProgramFiles64Folder' '[^']*\|CPack Component Example' +Directory: 'CM_DP_applications.bin' 'INSTALL_ROOT' 'bin' +Directory: 'PROGRAM_MENU_FOLDER' 'ProgramMenuFolder' 'MyLib' +Directory: 'DesktopFolder' 'TARGETDIR' 'Desktop' +Directory: 'CM_DP_applications2.bin' 'INSTALL_ROOT' 'bin' +Directory: 'CM_DP_extras.extras.empty' 'CM_DP_extras.extras' 'empty' +Directory: 'CM_DP_headers.include' 'INSTALL_ROOT' 'include' +Directory: 'CM_DP_libraries.lib' 'INSTALL_ROOT' 'lib' +Directory: 'CM_DP_extras.extras' 'INSTALL_ROOT' 'extras' +Directory: 'ProgramFiles64Folder' 'TARGETDIR' '.' +Directory: 'TARGETDIR' '' 'SourceDir' +Directory: 'ProgramMenuFolder' 'TARGETDIR' '.' +File: 'CM_FP_applications.bin.my_libapp.exe' 'CM_CP_applications.bin.my_libapp.exe' '[^']*\|my-libapp.exe' +File: 'CM_FP_applications2.bin.my_other_app.exe' 'CM_CP_applications2.bin.my_other_app.exe' '[^']*\|my-other-app.exe' +File: 'CM_FP_headers.include.file_with_spaces.h' 'CM_CP_headers.include.file_with_spaces.h' '[^']*\|file with spaces.h' +File: 'CM_FP_headers.include.mylib.h' 'CM_CP_headers.include.mylib.h' 'mylib.h' +File: 'CM_FP_libraries.lib.mylib.lib' 'CM_CP_libraries.lib.mylib.lib' 'mylib.lib' +Shortcut: 'CM_SP_applications.bin.my_libapp.exe' 'PROGRAM_MENU_FOLDER' '[^']*\|CPack WiX Test' 'CM_SHORTCUT_applications' +Shortcut: 'CM_DSP_applications.bin.my_libapp.exe' 'DesktopFolder' '[^']*\|CPack WiX Test' 'CM_SHORTCUT_DESKTOP_applications' +Shortcut: 'CM_SP_applications2.bin.my_other_app.exe' 'PROGRAM_MENU_FOLDER' '[^']*\|Second CPack WiX Test' 'CM_SHORTCUT_applications2' +Shortcut: 'CM_DSP_applications2.bin.my_other_app.exe' 'DesktopFolder' '[^']*\|Second CPack WiX Test' 'CM_SHORTCUT_DESKTOP_applications2' +-- diff --git a/Tests/RunCMake/CPack_WIX/4-AppWiX-cpack-WIX-check.cmake b/Tests/RunCMake/CPack_WIX/4-AppWiX-cpack-WIX-check.cmake new file mode 100644 index 0000000..a7a28ae --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/4-AppWiX-cpack-WIX-check.cmake @@ -0,0 +1 @@ +include(${RunCMake_SOURCE_DIR}/cpack-check-common.cmake) diff --git a/Tests/RunCMake/CPack_WIX/4-AppWiX-cpack-WIX-stdout.txt b/Tests/RunCMake/CPack_WIX/4-AppWiX-cpack-WIX-stdout.txt new file mode 100644 index 0000000..51f06ca --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/4-AppWiX-cpack-WIX-stdout.txt @@ -0,0 +1,11 @@ +CPack: Create package using WIX +CPack: Install projects +CPack: - Install project: CPackWiXGenerator \[Release\] +CPack: - Install component: applications +CPack: - Install component: applications2 +CPack: - Install component: extras +CPack: - Install component: headers +CPack: - Install component: libraries +CPack: Create package +CPack: - package: [^ +]*/Tests/RunCMake/CPack_WIX/4-AppWiX-build/MyLib-1\.0\.0-(win64|windows-arm64)\.msi generated\. diff --git a/Tests/RunCMake/CPack_WIX/4-AppWiX-verify-stdout.txt b/Tests/RunCMake/CPack_WIX/4-AppWiX-verify-stdout.txt new file mode 100644 index 0000000..a379859 --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/4-AppWiX-verify-stdout.txt @@ -0,0 +1,34 @@ +-- MyLib-1\.0\.0-(win64|windows-arm64)\.msi +Component: 'CM_CP_applications.bin.my_libapp.exe' 'CM_DP_applications.bin' +Component: 'CM_SHORTCUT_applications' 'PROGRAM_MENU_FOLDER' +Component: 'CM_SHORTCUT_DESKTOP_applications' 'DesktopFolder' +Component: 'CM_CP_applications2.bin.my_other_app.exe' 'CM_DP_applications2.bin' +Component: 'CM_SHORTCUT_applications2' 'PROGRAM_MENU_FOLDER' +Component: 'CM_SHORTCUT_DESKTOP_applications2' 'DesktopFolder' +Component: 'CM_C_EMPTY_CM_DP_extras.extras.empty' 'CM_DP_extras.extras.empty' +Component: 'CM_CP_headers.include.file_with_spaces.h' 'CM_DP_headers.include' +Component: 'CM_CP_headers.include.mylib.h' 'CM_DP_headers.include' +Component: 'CM_CP_libraries.lib.mylib.lib' 'CM_DP_libraries.lib' +Directory: 'INSTALL_ROOT' 'ProgramFiles6432Folder' '[^']*\|CPack Component Example' +Directory: 'CM_DP_applications.bin' 'INSTALL_ROOT' 'bin' +Directory: 'CM_DP_applications2.bin' 'INSTALL_ROOT' 'bin' +Directory: 'CM_DP_extras.extras.empty' 'CM_DP_extras.extras' 'empty' +Directory: 'CM_DP_extras.extras' 'INSTALL_ROOT' 'extras' +Directory: 'CM_DP_headers.include' 'INSTALL_ROOT' 'include' +Directory: 'CM_DP_libraries.lib' 'INSTALL_ROOT' 'lib' +Directory: 'ProgramFiles6432Folder' 'ProgramFiles64Folder' '.' +Directory: 'PROGRAM_MENU_FOLDER' 'ProgramMenuFolder' 'MyLib' +Directory: 'ProgramMenuFolder' 'TARGETDIR' 'PMenu' +Directory: 'ProgramFiles64Folder' 'TARGETDIR' 'PFiles64' +Directory: 'TARGETDIR' '' 'SourceDir' +Directory: 'DesktopFolder' 'TARGETDIR' 'Desktop' +File: 'CM_FP_applications.bin.my_libapp.exe' 'CM_CP_applications.bin.my_libapp.exe' '[^']*\|my-libapp.exe' +File: 'CM_FP_applications2.bin.my_other_app.exe' 'CM_CP_applications2.bin.my_other_app.exe' '[^']*\|my-other-app.exe' +File: 'CM_FP_headers.include.file_with_spaces.h' 'CM_CP_headers.include.file_with_spaces.h' '[^']*\|file with spaces.h' +File: 'CM_FP_headers.include.mylib.h' 'CM_CP_headers.include.mylib.h' 'mylib.h' +File: 'CM_FP_libraries.lib.mylib.lib' 'CM_CP_libraries.lib.mylib.lib' 'mylib.lib' +Shortcut: 'CM_SP_applications.bin.my_libapp.exe' 'PROGRAM_MENU_FOLDER' '[^']*\|CPack WiX Test' 'CM_SHORTCUT_applications' +Shortcut: 'CM_DSP_applications.bin.my_libapp.exe' 'DesktopFolder' '[^']*\|CPack WiX Test' 'CM_SHORTCUT_DESKTOP_applications' +Shortcut: 'CM_SP_applications2.bin.my_other_app.exe' 'PROGRAM_MENU_FOLDER' '[^']*\|Second CPack WiX Test' 'CM_SHORTCUT_applications2' +Shortcut: 'CM_DSP_applications2.bin.my_other_app.exe' 'DesktopFolder' '[^']*\|Second CPack WiX Test' 'CM_SHORTCUT_DESKTOP_applications2' +-- diff --git a/Tests/RunCMake/CPack_WIX/RunCMakeTest.cmake b/Tests/RunCMake/CPack_WIX/RunCMakeTest.cmake new file mode 100644 index 0000000..816d949 --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/RunCMakeTest.cmake @@ -0,0 +1,24 @@ +include(RunCPack) + +set(env_PATH "$ENV{PATH}") + +set(RunCPack_GENERATORS WIX) +set(RunCPack_GLOB *.msi) +set(RunCPack_VERIFY powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/print-msi.ps1) + +function(run_cpack_wix v) + set(RunCMake_TEST_OPTIONS -DCPACK_WIX_VERSION=${v}) + run_cpack(${v}-AppWiX SAMPLE AppWiX BUILD) +endfunction() + +if(CMake_TEST_CPACK_WIX3) + set(ENV{PATH} "${CMake_TEST_CPACK_WIX3};${env_PATH}") + run_cpack_wix(3) +endif() + +if(CMake_TEST_CPACK_WIX4) + set(ENV{PATH} "${CMake_TEST_CPACK_WIX4};${env_PATH}") + set(ENV{WIX_EXTENSIONS} "${CMake_TEST_CPACK_WIX4}") + run_cpack_wix(4) + unset(ENV{WIX_EXTENSIONS}) +endif() diff --git a/Tests/RunCMake/CPack_WIX/cpack-check-common.cmake b/Tests/RunCMake/CPack_WIX/cpack-check-common.cmake new file mode 100644 index 0000000..2f16d71 --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/cpack-check-common.cmake @@ -0,0 +1,6 @@ +file(GLOB wix_log_file RELATIVE "${RunCMake_TEST_BINARY_DIR}" "${RunCMake_TEST_BINARY_DIR}/_CPack_Packages/*/WIX/wix.log") +if(wix_log_file) + file(READ "${RunCMake_TEST_BINARY_DIR}/${wix_log_file}" wix_log) + string(REPLACE "\n" "\n wix-log> " wix_log " wix-log> ${wix_log}") + set(RunCMake_TEST_FAILURE_MESSAGE "${wix_log_file}:\n${wix_log}") +endif() diff --git a/Tests/RunCMake/CPack_WIX/print-msi.ps1 b/Tests/RunCMake/CPack_WIX/print-msi.ps1 new file mode 100644 index 0000000..01fdbc8 --- /dev/null +++ b/Tests/RunCMake/CPack_WIX/print-msi.ps1 @@ -0,0 +1,29 @@ +# https://learn.microsoft.com/en-us/windows/win32/msi/database-tables + +param ( + $file + ) + +function printTable { + param ( + $msi, + [string]$name, + [int[]]$columns = (1) + ) + + try { + $view = $msi.OpenView("select * from " + $name) + $view.Execute() + while ($record = $view.Fetch()) { + Write-Host ($name + ": " + ($columns | ForEach-Object {"'" + $record.StringData($_) + "'"})) + } + } catch {} +} + +$installer = New-Object -ComObject WindowsInstaller.Installer +$msi = $installer.OpenDatabase($file, 0) + +printTable -msi $msi -name "Component" -columns 1,3 +printTable -msi $msi -name "Directory" -columns 1,2,3 +printTable -msi $msi -name "File" -columns 1,2,3 +printTable -msi $msi -name "Shortcut" -columns 1,2,3,4 diff --git a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt.in b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt.in index 5437800..e4a6f5f 100644 --- a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt.in +++ b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestCommandLine@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-stdout.txt new file mode 100644 index 0000000..be5d335 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSL_VERIFYPEER to off diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-cmake.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stdout.txt new file mode 100644 index 0000000..be5d335 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSL_VERIFYPEER to off diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-stdout.txt new file mode 100644 index 0000000..be5d335 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSL_VERIFYPEER to off diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-env.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-stdout.txt new file mode 100644 index 0000000..fa95148 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSL_VERIFYPEER to on diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-cmake.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stdout.txt new file mode 100644 index 0000000..fa95148 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSL_VERIFYPEER to on diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-stdout.txt new file mode 100644 index 0000000..fa95148 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSL_VERIFYPEER to on diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-env.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-stdout.txt new file mode 100644 index 0000000..e83d934 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSLVERSION to CURL_SSLVERSION_TLSv1_1 diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-cmake.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-stdout.txt new file mode 100644 index 0000000..e83d934 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSLVERSION to CURL_SSLVERSION_TLSv1_1 diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-stdout.txt new file mode 100644 index 0000000..e83d934 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSLVERSION to CURL_SSLVERSION_TLSv1_1 diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1-env.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVersion-1.1.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-common.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-common.cmake new file mode 100644 index 0000000..134d26d --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-common.cmake @@ -0,0 +1,3 @@ +set(SUBMIT_URL "https://badhostname.invalid") +set(CTEST_SUBMIT_RETRY_COUNT 0 CACHE STRING "") +include(CTest) diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index a9f392b..190c6c1 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -1,6 +1,10 @@ include(RunCMake) include(RunCTest) +# Do not use any proxy for lookup of an invalid site. +# DNS failure by proxy looks different than DNS failure without proxy. +set(ENV{no_proxy} "$ENV{no_proxy},badhostname.invalid") + set(RunCMake_TEST_TIMEOUT 60) run_cmake_command(repeat-opt-bad1 @@ -433,6 +437,8 @@ function(run_ShowOnly) RESOURCE_GROUPS \"2,threads:2,gpus:4;gpus:2,threads:4\" REQUIRED_FILES RequiredFileDoesNotExist _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\" + USER_DEFINED_A \"User defined property A value\" + USER_DEFINED_B \"User defined property B value\" ) add_test(ShowOnlyNotAvailable NOT_AVAILABLE) ") @@ -482,6 +488,32 @@ run_NoTests() # Check the configuration type variable is passed run_ctest(check-configuration-type) +function(run_FailDrop case) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/FailDrop-${case}-build) + run_cmake_with_options(FailDrop-${case} ${ARGN}) + unset(ENV{CMAKE_TLS_VERIFY}) # Test that env variable is saved in ctest config file. + unset(ENV{CMAKE_TLS_VERSION}) # Test that env variable is saved in ctest config file. + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(FailDrop-${case}-ctest + ${CMAKE_CTEST_COMMAND} -M Experimental -T Submit -VV + ) +endfunction() +run_FailDrop(TLSVersion-1.1 -DCTEST_TLS_VERSION=1.1) +run_FailDrop(TLSVersion-1.1-cmake -DCMAKE_TLS_VERSION=1.1) # Test fallback to CMake variable. +set(ENV{CMAKE_TLS_VERSION} 1.1) # Test fallback to env variable. +run_FailDrop(TLSVersion-1.1-env) +unset(ENV{CMAKE_TLS_VERSION}) +run_FailDrop(TLSVerify-ON -DCTEST_TLS_VERIFY=ON) +run_FailDrop(TLSVerify-ON-cmake -DCMAKE_TLS_VERIFY=ON) # Test fallback to CMake variable. +set(ENV{CMAKE_TLS_VERIFY} 1) # Test fallback to env variable. +run_FailDrop(TLSVerify-ON-env) +unset(ENV{CMAKE_TLS_VERIFY}) +run_FailDrop(TLSVerify-OFF -DCTEST_TLS_VERIFY=OFF) +run_FailDrop(TLSVerify-OFF-cmake -DCMAKE_TLS_VERIFY=OFF) # Test fallback to CMake variable. +set(ENV{CMAKE_TLS_VERIFY} 0) # Test fallback to env variable. +run_FailDrop(TLSVerify-OFF-env) +unset(ENV{CMAKE_TLS_VERIFY}) + run_cmake_command(EmptyDirCoverage-ctest ${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T Coverage ) @@ -510,7 +542,7 @@ run_MemCheckSan(UndefinedBehavior "simulate_sanitizer=1") run_cmake_command(test-dir-invalid-arg ${CMAKE_CTEST_COMMAND} --test-dir) run_cmake_command(test-dir-non-existing-dir ${CMAKE_CTEST_COMMAND} --test-dir non-existing-dir) -function(run_testDir) +function(run_testDir testName testPreset) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/testDir) set(RunCMake_TEST_NO_CLEAN 1) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") @@ -520,9 +552,16 @@ function(run_testDir) add_test(Test1 \"${CMAKE_COMMAND}\" -E true) add_test(Test2 \"${CMAKE_COMMAND}\" -E true) ") - run_cmake_command(testDir ${CMAKE_CTEST_COMMAND} --test-dir "${RunCMake_TEST_BINARY_DIR}/sub") + if (testPreset) + set(presetCommandLine --preset=default) + configure_file( + ${RunCMake_SOURCE_DIR}/testDir-presets.json.in + ${RunCMake_TEST_BINARY_DIR}/CMakePresets.json) + endif() + run_cmake_command(${testName} ${CMAKE_CTEST_COMMAND} --test-dir "${RunCMake_TEST_BINARY_DIR}/sub" ${presetCommandLine}) endfunction() -run_testDir() +run_testDir(testDir 0) +run_testDir(testDir-preset 1) # Test --output-junit function(run_output_junit) @@ -543,6 +582,8 @@ set_tests_properties(test5 PROPERTIES SKIP_REGULAR_EXPRESSION \"please skip\") endfunction() run_output_junit() +run_cmake_command(invalid-ctest-argument ${CMAKE_CTEST_COMMAND} --not-a-valid-ctest-argument) + if(WIN32) block() set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TimeoutSignalWindows) diff --git a/Tests/RunCMake/CTestCommandLine/TestOutputSize-check.cmake b/Tests/RunCMake/CTestCommandLine/TestOutputSize-check.cmake index 918d242..53aa318 100644 --- a/Tests/RunCMake/CTestCommandLine/TestOutputSize-check.cmake +++ b/Tests/RunCMake/CTestCommandLine/TestOutputSize-check.cmake @@ -1,6 +1,6 @@ file(GLOB test_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Test.xml") if(test_xml_file) - file(READ "${test_xml_file}" test_xml LIMIT 4096) + file(READ "${test_xml_file}" test_xml LIMIT 8192) if("${test_xml}" MATCHES [[(<Test Status="passed">.*</Test>).*(<Test Status="failed">.*</Test>)]]) set(test_passed "${CMAKE_MATCH_1}") set(test_failed "${CMAKE_MATCH_2}") diff --git a/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-result.txt b/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-stderr.txt b/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-stderr.txt new file mode 100644 index 0000000..3304a26 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-stderr.txt @@ -0,0 +1,2 @@ +CMake Error: Unknown argument: --not-a-valid-ctest-argument +CMake Error: Run 'ctest --help' for all supported options. diff --git a/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py index b818650..f9667ae 100644 --- a/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py +++ b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py @@ -144,13 +144,23 @@ def check_workingdir_property(p): assert p["name"] == "WORKING_DIRECTORY" assert p["value"].endswith("Tests/RunCMake/CTestCommandLine/ShowOnly") +def check_defined_properties(p_list): + for property_id, p in zip(["A", "B"], p_list): + assert is_dict(p) + assert sorted(p.keys()) == ["name", "value"] + assert is_string(p["name"]) + assert is_string(p["value"]) + assert p["name"] == "USER_DEFINED_" + property_id + assert p["value"] == "User defined property " + property_id + " value" + def check_properties(p): assert is_list(p) - assert len(p) == 4 + assert len(p) == 6 check_resource_groups_property(p[0]) check_reqfiles_property(p[1]) check_willfail_property(p[2]) check_workingdir_property(p[3]) + check_defined_properties(p[4:5]) def check_tests(t): assert is_list(t) diff --git a/Tests/RunCMake/CTestCommandLine/testDir-presets.json.in b/Tests/RunCMake/CTestCommandLine/testDir-presets.json.in new file mode 100644 index 0000000..46391f8 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/testDir-presets.json.in @@ -0,0 +1,20 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 22, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "binaryDir": "presetBinaryDir" + } + ], + "testPresets": [ + { + "name": "default", + "configurePreset": "default" + } + ] +} diff --git a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake index 42e13fc..3c3e88f 100644 --- a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake @@ -167,6 +167,16 @@ function(verify_ctest_resources) endif() endfunction() +set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/invalid-build") +set(RunCMake_TEST_NO_CLEAN 1) +file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") +file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") +file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "add_test(true \"${CMAKE_COMMAND}\" -E true)\n") +run_cmake_command(invalid-nofile-ctest ${CMAKE_CTEST_COMMAND} --resource-spec-file "${RunCMake_BINARY_DIR}/noexist.json") +run_cmake_command(invalid-not-json-ctest ${CMAKE_CTEST_COMMAND} --resource-spec-file "${RunCMake_SOURCE_DIR}/invalid.json") +unset(RunCMake_TEST_NO_CLEAN) +unset(RunCMake_TEST_BINARY_DIR) + run_ctest_resource(lotsoftests 10 1 0) run_ctest_resource(checkfree1 2 0 1) run_ctest_resource(checkfree2 1 0 0) diff --git a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-ctest-s-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-ctest-s-stderr.txt index 397ca38..0a927e7 100644 --- a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-ctest-s-stderr.txt +++ b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-ctest-s-stderr.txt @@ -1,3 +1,5 @@ ^Error: a cycle exists in the test dependency graph for the test "GenerateSpecFile"\. -Please fix the cycle and run ctest again. -No tests were found!!!$ +Please fix the cycle and run ctest again\. +CMake Error at [^ +]*/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-ctest-s/test\.cmake:[0-9]+ \(message\): + Tests did not pass$ diff --git a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-no-required-fixtures-ctest-s-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-no-required-fixtures-ctest-s-stderr.txt index 06ea90f..533b07c 100644 --- a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-no-required-fixtures-ctest-s-stderr.txt +++ b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-no-required-fixtures-ctest-s-stderr.txt @@ -1,2 +1,4 @@ ^All tests that have RESOURCE_GROUPS must include the resource spec generator fixture in their FIXTURES_REQUIRED -No tests were found!!!$ +CMake Error at [^ +]*/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-circular-no-required-fixtures-ctest-s/test\.cmake:[0-9]+ \(message\): + Tests did not pass$ diff --git a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-conflicting-spec-ctest-s-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-conflicting-spec-ctest-s-stderr.txt index 4e4c01c..d91d6dc 100644 --- a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-conflicting-spec-ctest-s-stderr.txt +++ b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-conflicting-spec-ctest-s-stderr.txt @@ -1,2 +1,4 @@ ^GENERATED_RESOURCE_SPEC_FILE test property cannot be used in conjunction with ResourceSpecFile option -No tests were found!!!$ +CMake Error at [^ +]*/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-conflicting-spec-ctest-s/test\.cmake:[0-9]+ \(message\): + Tests did not pass$ diff --git a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-generators-ctest-s-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-generators-ctest-s-stderr.txt index 273cb80..def7a8b 100644 --- a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-generators-ctest-s-stderr.txt +++ b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-generators-ctest-s-stderr.txt @@ -1,2 +1,4 @@ ^Only one test may define the GENERATED_RESOURCE_SPEC_FILE property -No tests were found!!!$ +CMake Error at [^ +]*/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-generators-ctest-s/test\.cmake:[0-9]+ \(message\): + Tests did not pass$ diff --git a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-setup-fixtures-ctest-s-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-setup-fixtures-ctest-s-stderr.txt index 39ee275..3301318 100644 --- a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-setup-fixtures-ctest-s-stderr.txt +++ b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-setup-fixtures-ctest-s-stderr.txt @@ -1,2 +1,4 @@ ^Test that defines GENERATED_RESOURCE_SPEC_FILE must have exactly one FIXTURES_SETUP -No tests were found!!!$ +CMake Error at [^ +]*/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-multiple-setup-fixtures-ctest-s/test\.cmake:[0-9]+ \(message\): + Tests did not pass$ diff --git a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-required-fixture-ctest-s-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-required-fixture-ctest-s-stderr.txt index 06ea90f..a3c4d20 100644 --- a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-required-fixture-ctest-s-stderr.txt +++ b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-required-fixture-ctest-s-stderr.txt @@ -1,2 +1,4 @@ ^All tests that have RESOURCE_GROUPS must include the resource spec generator fixture in their FIXTURES_REQUIRED -No tests were found!!!$ +CMake Error at [^ +]*/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-required-fixture-ctest-s/test\.cmake:[0-9]+ \(message\): + Tests did not pass$ diff --git a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-setup-fixture-ctest-s-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-setup-fixture-ctest-s-stderr.txt index 39ee275..92a93bb 100644 --- a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-setup-fixture-ctest-s-stderr.txt +++ b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-setup-fixture-ctest-s-stderr.txt @@ -1,2 +1,4 @@ ^Test that defines GENERATED_RESOURCE_SPEC_FILE must have exactly one FIXTURES_SETUP -No tests were found!!!$ +CMake Error at [^ +]*/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-no-setup-fixture-ctest-s/test\.cmake:[0-9]+ \(message\): + Tests did not pass$ diff --git a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-relative-path-ctest-s-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-relative-path-ctest-s-stderr.txt index 2c4dff8..6829ffe 100644 --- a/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-relative-path-ctest-s-stderr.txt +++ b/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-relative-path-ctest-s-stderr.txt @@ -1,2 +1,4 @@ ^GENERATED_RESOURCE_SPEC_FILE must be an absolute path -No tests were found!!!$ +CMake Error at [^ +]*/Tests/RunCMake/CTestResourceAllocation/dynamic-resource-relative-path-ctest-s/test\.cmake:[0-9]+ \(message\): + Tests did not pass$ diff --git a/Tests/RunCMake/CTestResourceAllocation/invalid-nofile-ctest-result.txt b/Tests/RunCMake/CTestResourceAllocation/invalid-nofile-ctest-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/CTestResourceAllocation/invalid-nofile-ctest-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/CTestResourceAllocation/invalid-nofile-ctest-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/invalid-nofile-ctest-stderr.txt new file mode 100644 index 0000000..df1135e --- /dev/null +++ b/Tests/RunCMake/CTestResourceAllocation/invalid-nofile-ctest-stderr.txt @@ -0,0 +1,8 @@ +^Could not read/parse resource spec file [^ +]*/Tests/RunCMake/CTestResourceAllocation/noexist\.json:[ ] +File not found: [^ +]*/Tests/RunCMake/CTestResourceAllocation/noexist.json +Errors while running CTest +Output from these tests are in: [^ +]*/Tests/RunCMake/CTestResourceAllocation/invalid-build/Testing/Temporary/LastTest\.log +Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely\.$ diff --git a/Tests/RunCMake/CTestResourceAllocation/invalid-not-json-ctest-result.txt b/Tests/RunCMake/CTestResourceAllocation/invalid-not-json-ctest-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/CTestResourceAllocation/invalid-not-json-ctest-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/CTestResourceAllocation/invalid-not-json-ctest-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/invalid-not-json-ctest-stderr.txt new file mode 100644 index 0000000..5bd9d97 --- /dev/null +++ b/Tests/RunCMake/CTestResourceAllocation/invalid-not-json-ctest-stderr.txt @@ -0,0 +1,15 @@ +^Could not read/parse resource spec file [^ +]*/Tests/RunCMake/CTestResourceAllocation/invalid\.json:[ ] +JSON Parse Error: [^ +]*/Tests/RunCMake/CTestResourceAllocation/invalid\.json: +\* Line 1, Column 1 + Syntax error: value, object or array expected\. +(\* Line 1, Column 2 + Extra non-whitespace after JSON value\. +|\* Line 1, Column 1 + A valid JSON document must be either an array or an object value\. +) +Errors while running CTest +Output from these tests are in: [^ +]*/Tests/RunCMake/CTestResourceAllocation/invalid-build/Testing/Temporary/LastTest\.log +Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely\.$ diff --git a/Tests/RunCMake/CTestResourceAllocation/invalid.json b/Tests/RunCMake/CTestResourceAllocation/invalid.json new file mode 100644 index 0000000..4c861f8 --- /dev/null +++ b/Tests/RunCMake/CTestResourceAllocation/invalid.json @@ -0,0 +1 @@ +This is not a valid JSON file! diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake b/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake index d68775a..c754930 100644 --- a/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake +++ b/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake @@ -1,3 +1,6 @@ +# Block making C++ `import std` targets. +add_library(__CMAKE::CXX23 IMPORTED INTERFACE) + enable_language(CXX) unset(CMAKE_CXX_SCANDEP_SOURCE) diff --git a/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake b/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake index 201598e..a994266 100644 --- a/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake +++ b/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake @@ -1,3 +1,6 @@ +# Block making C++ `import std` targets. +add_library(__CMAKE::CXX23 IMPORTED INTERFACE) + enable_language(CXX) unset(CMAKE_CXX_SCANDEP_SOURCE) diff --git a/Tests/RunCMake/CXXModules/CXXImportStdConfig-result.txt b/Tests/RunCMake/CXXModules/CXXImportStdConfig-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdConfig-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CXXModules/CXXImportStdConfig-stderr.txt b/Tests/RunCMake/CXXModules/CXXImportStdConfig-stderr.txt new file mode 100644 index 0000000..268099f --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdConfig-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + The "CXX_MODULE_STD" property on the target "nocxx23target" contains a + context-sensitive condition that is not supported. diff --git a/Tests/RunCMake/CXXModules/CXXImportStdConfig.cmake b/Tests/RunCMake/CXXModules/CXXImportStdConfig.cmake new file mode 100644 index 0000000..0867082 --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdConfig.cmake @@ -0,0 +1,10 @@ +enable_language(CXX) + +set(CMAKE_CXX_MODULE_STD "$<CONFIG:Release>") + +add_library(nocxx23target) +target_sources(nocxx23target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx23target PRIVATE cxx_std_23) diff --git a/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget-result.txt b/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget-stderr.txt b/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget-stderr.txt new file mode 100644 index 0000000..a2cdb63 --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget-stderr.txt @@ -0,0 +1,9 @@ +CMake Error: + Error evaluating generator expression: + + \$<TARGET_PROPERTY:use_std_in_consumed> + + \$<TARGET_PROPERTY:prop> may only be used with binary targets. It may not + be used with add_custom_command or add_custom_target. Specify the target + to read a property from using the \$<TARGET_PROPERTY:tgt,prop> signature + instead. diff --git a/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget.cmake b/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget.cmake new file mode 100644 index 0000000..3eb2c68 --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdHeadTarget.cmake @@ -0,0 +1,10 @@ +enable_language(CXX) + +set(CMAKE_CXX_MODULE_STD "$<TARGET_PROPERTY:use_std_in_consumed>") + +add_library(nocxx23target) +target_sources(nocxx23target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx23target PRIVATE cxx_std_23) diff --git a/Tests/RunCMake/CXXModules/CXXImportStdInvalidGenex.cmake b/Tests/RunCMake/CXXModules/CXXImportStdInvalidGenex.cmake new file mode 100644 index 0000000..86230a4 --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdInvalidGenex.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +set(CMAKE_CXX_SCANDEP_SOURCE "echo") + +set(CMAKE_CXX_MODULE_STD "$<STREQUAL:") + +add_library(nocxx23target) +target_sources(nocxx23target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx23target PRIVATE cxx_std_23) diff --git a/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage-result.txt b/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage-stderr.txt b/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage-stderr.txt new file mode 100644 index 0000000..21148a2 --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage-stderr.txt @@ -0,0 +1,7 @@ +CMake Error: + Error evaluating generator expression: + + \$<LINK_LANGUAGE:CXX> + + \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link + libraries, link directories, link options and link depends. diff --git a/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage.cmake b/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage.cmake new file mode 100644 index 0000000..e9b20c7 --- /dev/null +++ b/Tests/RunCMake/CXXModules/CXXImportStdLinkLanguage.cmake @@ -0,0 +1,10 @@ +enable_language(CXX) + +set(CMAKE_CXX_MODULE_STD "$<LINK_LANGUAGE:CXX>") + +add_library(nocxx23target) +target_sources(nocxx23target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx23target PRIVATE cxx_std_23) diff --git a/Tests/RunCMake/CXXModules/ImplicitCXX20.cmake b/Tests/RunCMake/CXXModules/ImplicitCXX20.cmake index cac1777..64d69f3 100644 --- a/Tests/RunCMake/CXXModules/ImplicitCXX20.cmake +++ b/Tests/RunCMake/CXXModules/ImplicitCXX20.cmake @@ -1,6 +1,9 @@ # Enable scanning by default for targets that explicitly use C++ 20. cmake_policy(SET CMP0155 NEW) +# Block making C++ `import std` targets. +add_library(__CMAKE::CXX23 IMPORTED INTERFACE) + # Force CMAKE_CXX_STANDARD_DEFAULT to be C++ 20. set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} ${CMAKE_CXX20_STANDARD_COMPILE_OPTION}") enable_language(CXX) diff --git a/Tests/RunCMake/CXXModules/Inspect.cmake b/Tests/RunCMake/CXXModules/Inspect.cmake index 612b01b..e648e8c 100644 --- a/Tests/RunCMake/CXXModules/Inspect.cmake +++ b/Tests/RunCMake/CXXModules/Inspect.cmake @@ -15,11 +15,28 @@ if (CMAKE_CXX_FLAGS MATCHES "-std=") set(forced_cxx_standard 1) endif () +macro (cxx_check_import_std version) + set(have_cxx${version}_import_std 0) + if ("${version}" IN_LIST CMAKE_CXX_COMPILER_IMPORT_STD) + set(have_cxx${version}_import_std 1) + endif () + + if (TARGET "__CMAKE:CXX${version}" AND NOT have_cxx${version}_import_std) + message(FATAL_ERROR + "The toolchain's C++${version} target exists, but the user variable does " + "not indicate it.") + endif () +endmacro () + +cxx_check_import_std(23) +cxx_check_import_std(26) + # Forward information about the C++ compile features. string(APPEND info "\ set(CMAKE_CXX_COMPILE_FEATURES \"${CMAKE_CXX_COMPILE_FEATURES}\") set(CMAKE_MAKE_PROGRAM \"${CMAKE_MAKE_PROGRAM}\") set(forced_cxx_standard \"${forced_cxx_standard}\") +set(have_cxx23_import_std \"${have_cxx23_import_std}\") set(CMAKE_CXX_COMPILER_VERSION \"${CMAKE_CXX_COMPILER_VERSION}\") set(CMAKE_CXX_OUTPUT_EXTENSION \"${CMAKE_CXX_OUTPUT_EXTENSION}\") set(CXXModules_default_build_type \"${CMAKE_BUILD_TYPE}\") diff --git a/Tests/RunCMake/CXXModules/NoCXX20.cmake b/Tests/RunCMake/CXXModules/NoCXX20.cmake index b7372e8..9710728 100644 --- a/Tests/RunCMake/CXXModules/NoCXX20.cmake +++ b/Tests/RunCMake/CXXModules/NoCXX20.cmake @@ -1,3 +1,6 @@ +# Block making C++ `import std` targets. +add_library(__CMAKE::CXX23 IMPORTED INTERFACE) + enable_language(CXX) add_library(nocxx20) diff --git a/Tests/RunCMake/CXXModules/NoCXX23TargetNotRequired.cmake b/Tests/RunCMake/CXXModules/NoCXX23TargetNotRequired.cmake new file mode 100644 index 0000000..2d9bffa --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX23TargetNotRequired.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +set(CMAKE_CXX_SCANDEP_SOURCE "echo") + +set(CMAKE_CXX_MODULE_STD 0) + +add_library(nocxx23target) +target_sources(nocxx23target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx23target PRIVATE cxx_std_23) diff --git a/Tests/RunCMake/CXXModules/NoCXX23TargetRequired-result.txt b/Tests/RunCMake/CXXModules/NoCXX23TargetRequired-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX23TargetRequired-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CXXModules/NoCXX23TargetRequired-stderr.txt b/Tests/RunCMake/CXXModules/NoCXX23TargetRequired-stderr.txt new file mode 100644 index 0000000..866fa55 --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX23TargetRequired-stderr.txt @@ -0,0 +1,9 @@ +CMake Error in CMakeLists.txt: + The "CXX_MODULE_STD" property on the target "nocxx23target" requires that + the "__CMAKE::CXX23" target exist, but it was not provided by the + toolchain. Reason: + + (Toolchain does not support discovering `import std` support|Experimental `import std` support not enabled when detecting toolchain; it must be set before `CXX` is enabled \(usually a `project\(\)` call\)|Unsupported generator: [^\n]*) + + +CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/NoCXX23TargetRequired.cmake b/Tests/RunCMake/CXXModules/NoCXX23TargetRequired.cmake new file mode 100644 index 0000000..fac05e2 --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX23TargetRequired.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +set(CMAKE_CXX_SCANDEP_SOURCE "echo") + +set(CMAKE_CXX_MODULE_STD 1) + +add_library(nocxx23target) +target_sources(nocxx23target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx23target PRIVATE cxx_std_23) diff --git a/Tests/RunCMake/CXXModules/NoCXX23TargetUnset.cmake b/Tests/RunCMake/CXXModules/NoCXX23TargetUnset.cmake new file mode 100644 index 0000000..8f6a656 --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX23TargetUnset.cmake @@ -0,0 +1,13 @@ +enable_language(CXX) +set(CMAKE_CXX_SCANDEP_SOURCE "echo") + +# TODO(cxxmodules): Add instances of this test which test the policy +# of the property's unset behavior. +# set(CMAKE_CXX_MODULE_STD …) + +add_library(nocxx23target) +target_sources(nocxx23target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx23target PRIVATE cxx_std_23) diff --git a/Tests/RunCMake/CXXModules/NoCXX26TargetNotRequired.cmake b/Tests/RunCMake/CXXModules/NoCXX26TargetNotRequired.cmake new file mode 100644 index 0000000..b91fa9b --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX26TargetNotRequired.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +set(CMAKE_CXX_SCANDEP_SOURCE "echo") + +set(CMAKE_CXX_MODULE_STD 0) + +add_library(nocxx26target) +target_sources(nocxx26target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx26target PRIVATE cxx_std_26) diff --git a/Tests/RunCMake/CXXModules/NoCXX26TargetRequired-result.txt b/Tests/RunCMake/CXXModules/NoCXX26TargetRequired-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX26TargetRequired-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CXXModules/NoCXX26TargetRequired-stderr.txt b/Tests/RunCMake/CXXModules/NoCXX26TargetRequired-stderr.txt new file mode 100644 index 0000000..6e14f1e --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX26TargetRequired-stderr.txt @@ -0,0 +1,9 @@ +CMake Error in CMakeLists.txt: + The "CXX_MODULE_STD" property on the target "nocxx26target" requires that + the "__CMAKE::CXX26" target exist, but it was not provided by the + toolchain. Reason: + + (Toolchain does not support discovering `import std` support|Experimental `import std` support not enabled when detecting toolchain; it must be set before `CXX` is enabled \(usually a `project\(\)` call\)|Unsupported generator: [^\n]*) + + +CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/NoCXX26TargetRequired.cmake b/Tests/RunCMake/CXXModules/NoCXX26TargetRequired.cmake new file mode 100644 index 0000000..79dcb79 --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX26TargetRequired.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +set(CMAKE_CXX_SCANDEP_SOURCE "echo") + +set(CMAKE_CXX_MODULE_STD 1) + +add_library(nocxx26target) +target_sources(nocxx26target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx26target PRIVATE cxx_std_26) diff --git a/Tests/RunCMake/CXXModules/NoCXX26TargetUnset.cmake b/Tests/RunCMake/CXXModules/NoCXX26TargetUnset.cmake new file mode 100644 index 0000000..85108ff --- /dev/null +++ b/Tests/RunCMake/CXXModules/NoCXX26TargetUnset.cmake @@ -0,0 +1,13 @@ +enable_language(CXX) +set(CMAKE_CXX_SCANDEP_SOURCE "echo") + +# TODO(cxxmodules): Add instances of this test which test the policy +# of the property's unset behavior. +# set(CMAKE_CXX_MODULE_STD …) + +add_library(nocxx26target) +target_sources(nocxx26target + PRIVATE + FILE_SET fs TYPE CXX_MODULES FILES + sources/module.cxx) +target_compile_features(nocxx26target PRIVATE cxx_std_26) diff --git a/Tests/RunCMake/CXXModules/NoScanningVariable.cmake b/Tests/RunCMake/CXXModules/NoScanningVariable.cmake index 4bb6a70..950f1f3 100644 --- a/Tests/RunCMake/CXXModules/NoScanningVariable.cmake +++ b/Tests/RunCMake/CXXModules/NoScanningVariable.cmake @@ -1,6 +1,9 @@ # Enable scanning by default for targets that explicitly use C++ 20. cmake_policy(SET CMP0155 NEW) +# Block making C++ `import std` targets. +add_library(__CMAKE::CXX23 IMPORTED INTERFACE) + enable_language(CXX) # Hide any real scanning rule that may be available. diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake index 23c32c0..8b7bc86 100644 --- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake @@ -83,6 +83,27 @@ foreach (fileset_type IN LISTS fileset_types) run_cmake("NotCXXSource${fileset_type}") endforeach () +if ("cxx_std_23" IN_LIST CMAKE_CXX_COMPILE_FEATURES) + run_cmake(CXXImportStdConfig) + run_cmake(CXXImportStdHeadTarget) + run_cmake(CXXImportStdLinkLanguage) + run_cmake(CXXImportStdInvalidGenex) +endif () + +if ("cxx_std_23" IN_LIST CMAKE_CXX_COMPILE_FEATURES AND + NOT have_cxx23_import_std) + run_cmake(NoCXX23TargetUnset) + run_cmake(NoCXX23TargetNotRequired) + run_cmake(NoCXX23TargetRequired) +endif () + +if ("cxx_std_26" IN_LIST CMAKE_CXX_COMPILE_FEATURES AND + NOT have_cxx26_import_std) + run_cmake(NoCXX26TargetUnset) + run_cmake(NoCXX26TargetNotRequired) + run_cmake(NoCXX26TargetRequired) +endif () + run_cmake(InstallBMI) run_cmake(InstallBMIGenericArgs) run_cmake(InstallBMIIgnore) @@ -176,6 +197,7 @@ endfunction () # - `partitions`: module partitions are supported # - `internal_partitions`: internal module partitions are supported # - `bmionly`: the compiler supports BMI-only builds +# - `import_std23`: the compiler supports `import std` for C++23 # # Generator-based: # - `compile_commands`: the generator supports `compile_commands.json` @@ -222,6 +244,31 @@ if ("named" IN_LIST CMake_TEST_MODULE_COMPILATION) run_cxx_module_test(same-src-name) run_cxx_module_test(scan_properties) run_cxx_module_test(target-objects) + + if ("cxx_std_23" IN_LIST CMAKE_CXX_COMPILE_FEATURES AND + "import_std23" IN_LIST CMake_TEST_MODULE_COMPILATION) + run_cxx_module_test(import-std) + set(RunCMake_CXXModules_NO_TEST 1) + run_cxx_module_test(import-std-no-std-property) + unset(RunCMake_CXXModules_NO_TEST) + run_cxx_module_test(import-std-export-no-std-build) + set(RunCMake_CXXModules_INSTALL 1) + run_cxx_module_test(import-std-export-no-std-install) + unset(RunCMake_CXXModules_INSTALL) + + if ("collation" IN_LIST CMake_TEST_MODULE_COMPILATION) + run_cxx_module_test(import-std-not-in-export-build) + run_cxx_module_test(import-std-transitive import-std-transitive-not-in-export-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/import-std-not-in-export-build-build") + + set(RunCMake_CXXModules_INSTALL 1) + run_cxx_module_test(import-std-not-in-export-install) + unset(RunCMake_CXXModules_INSTALL) + run_cxx_module_test(import-std-transitive import-std-transitive-not-in-export-install "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/import-std-not-in-export-install-install") + + run_cxx_module_test(import-std-transitive import-std-transitive-export-no-std-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/import-std-export-no-std-build-build" -DEXPORT_NO_STD=1) + run_cxx_module_test(import-std-transitive import-std-transitive-export-no-std-install "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/examples/import-std-export-no-std-install-install" -DEXPORT_NO_STD=1) + endif () + endif () endif () # Tests which require compile commands support. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build-stderr.txt new file mode 100644 index 0000000..3589448 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at .*/Modules/Compiler/CMakeCommonCompilerMacros.cmake:[0-9]* \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Modules/CMakeDetermineCompilerSupport.cmake:[0-9]* \(cmake_create_cxx_import_std\) + .*/Modules/CMakeTestCXXCompiler.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) + CMakeLists.txt:[0-9]* \(project\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/CMakeLists.txt new file mode 100644 index 0000000..89350ef --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/CMakeLists.txt @@ -0,0 +1,59 @@ +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") + +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_import_std_export_no_std CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +set(CMAKE_NO_STD 1) + +add_library(import_std_export_no_std) +target_sources(import_std_export_no_std + PRIVATE + uses-std.cxx + PUBLIC + FILE_SET use_std TYPE CXX_MODULES FILES + impl-uses-std.cxx) +target_compile_features(import_std_export_no_std PUBLIC cxx_std_23) +set_property(TARGET import_std_export_no_std + PROPERTY + CXX_MODULE_STD "$<BOOL:$<BUILD_LOCAL_INTERFACE:1>>") + +add_executable(main + main.cxx) +target_link_libraries(main PRIVATE import_std_export_no_std) + +install(TARGETS import_std_export_no_std + EXPORT export + ARCHIVE DESTINATION "lib" + FILE_SET use_std DESTINATION "lib/cxx/miu") +export(EXPORT export + NAMESPACE CXXModules:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/import_std_export_no_std-targets.cmake") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/import_std_export_no_std-config.cmake" + "include(\"\${CMAKE_CURRENT_LIST_DIR}/import_std_export_no_std-targets.cmake\") +set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND 1) +") + +add_test(NAME main COMMAND main) + +set(generator + -G "${CMAKE_GENERATOR}") +if (CMAKE_GENERATOR_TOOLSET) + list(APPEND generator + -T "${CMAKE_GENERATOR_TOOLSET}") +endif () +if (CMAKE_GENERATOR_PLATFORM) + list(APPEND generator + -A "${CMAKE_GENERATOR_PLATFORM}") +endif () + +add_test(NAME import_std_export_no_std_build + COMMAND + "${CMAKE_COMMAND}" + "-Dexpected_dir=${CMAKE_CURRENT_SOURCE_DIR}" + "-Dimport_std_export_no_std_DIR=${CMAKE_CURRENT_BINARY_DIR}" + ${generator} + -S "${CMAKE_CURRENT_SOURCE_DIR}/test" + -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/impl-uses-std.cxx b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/impl-uses-std.cxx new file mode 100644 index 0000000..ee19332 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/impl-uses-std.cxx @@ -0,0 +1,3 @@ +export module uses_std; + +export int f(); diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/main.cxx b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/main.cxx new file mode 100644 index 0000000..a6dd8d8 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/main.cxx @@ -0,0 +1,6 @@ +import uses_std; + +int main(int argc, char* argv[]) +{ + return f(); +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/test/CMakeLists.txt new file mode 100644 index 0000000..e37f174 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/test/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_library NONE) + +find_package(import_std_export_no_std REQUIRED) + +if (NOT TARGET CXXModules::import_std_export_no_std) + message(FATAL_ERROR + "Missing imported target") +endif () + +function (check_property expected property) + get_property(actual TARGET CXXModules::import_std_export_no_std + PROPERTY "${property}") + if (NOT DEFINED actual) + if (NOT expected STREQUAL "<UNDEF>") + message(SEND_ERROR + "Mismatch for ${property}:\n expected: ${expected}\n actual: NOT-DEFINED") + endif () + elseif (NOT actual STREQUAL expected) + message(SEND_ERROR + "Mismatch for ${property}:\n expected: ${expected}\n actual: ${actual}") + endif () +endfunction () + +check_property("<UNDEF>" "IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES") +check_property("<UNDEF>" "IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS") +check_property("cxx_std_23" "IMPORTED_CXX_MODULES_COMPILE_FEATURES") +check_property("" "IMPORTED_CXX_MODULES_LINK_LIBRARIES") +check_property("<UNDEF>" "INTERFACE_LINK_LIBRARIES") +check_property("$<BOOL:>" "CXX_MODULE_STD") + +# Extract the export-dependent targets from the export file. +file(STRINGS "${import_std_export_no_std_DIR}/import_std_export_no_std-targets.cmake" usage_dependent_targets + REGEX "foreach._target ") +# Rudimentary argument splitting. +string(REPLACE " " ";" usage_dependent_targets "${usage_dependent_targets}") +# Remove exported "target" names. +list(FILTER usage_dependent_targets EXCLUDE REGEX "CXXModules::") +# Strip quotes. +string(REPLACE "\"" "" usage_dependent_targets "${usage_dependent_targets}") + +if ("__CMAKE::CXX23" IN_LIST usage_dependent_targets) + message(SEND_ERROR + "The main export requires the '__CMAKE::CXX23' target") +endif () diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/uses-std.cxx b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/uses-std.cxx new file mode 100644 index 0000000..bd91093 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-build/uses-std.cxx @@ -0,0 +1,8 @@ +module uses_std; + +import std; + +int f() +{ + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install-stderr.txt new file mode 100644 index 0000000..3589448 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at .*/Modules/Compiler/CMakeCommonCompilerMacros.cmake:[0-9]* \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Modules/CMakeDetermineCompilerSupport.cmake:[0-9]* \(cmake_create_cxx_import_std\) + .*/Modules/CMakeTestCXXCompiler.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) + CMakeLists.txt:[0-9]* \(project\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/CMakeLists.txt new file mode 100644 index 0000000..62d9d91 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/CMakeLists.txt @@ -0,0 +1,61 @@ +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") + +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_import_std_export_no_std CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +add_library(import_std_export_no_std) +target_sources(import_std_export_no_std + PRIVATE + uses-std.cxx + PUBLIC + FILE_SET use_std TYPE CXX_MODULES FILES + impl-uses-std.cxx) +target_compile_features(import_std_export_no_std PUBLIC cxx_std_23) +set_property(TARGET import_std_export_no_std + PROPERTY + CXX_MODULE_STD "$<BOOL:$<BUILD_LOCAL_INTERFACE:1>>") + +add_executable(main + main.cxx) +target_link_libraries(main PRIVATE import_std_export_no_std) + +install(TARGETS import_std_export_no_std + EXPORT export + ARCHIVE DESTINATION "lib" + FILE_SET use_std DESTINATION "lib/cxx/miu") +install( + EXPORT export + NAMESPACE CXXModules:: + DESTINATION "lib/cmake/import_std_export_no_std" + FILE "import_std_export_no_std-targets.cmake") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/import_std_export_no_std-config.cmake" + "include(\"\${CMAKE_CURRENT_LIST_DIR}/import_std_export_no_std-targets.cmake\") +set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND 1) +") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/import_std_export_no_std-config.cmake" + DESTINATION "lib/cmake/import_std_export_no_std") + +add_test(NAME main COMMAND main) + +set(generator + -G "${CMAKE_GENERATOR}") +if (CMAKE_GENERATOR_TOOLSET) + list(APPEND generator + -T "${CMAKE_GENERATOR_TOOLSET}") +endif () +if (CMAKE_GENERATOR_PLATFORM) + list(APPEND generator + -A "${CMAKE_GENERATOR_PLATFORM}") +endif () + +add_test(NAME import_std_export_no_std_build + COMMAND + "${CMAKE_COMMAND}" + "-Dexpected_dir=${CMAKE_INSTALL_PREFIX}/lib/cxx/miu" + "-Dimport_std_export_no_std_DIR=${CMAKE_INSTALL_PREFIX}/lib/cmake/import_std_export_no_std" + ${generator} + -S "${CMAKE_CURRENT_SOURCE_DIR}/test" + -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/impl-uses-std.cxx b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/impl-uses-std.cxx new file mode 100644 index 0000000..ee19332 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/impl-uses-std.cxx @@ -0,0 +1,3 @@ +export module uses_std; + +export int f(); diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/main.cxx b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/main.cxx new file mode 100644 index 0000000..a6dd8d8 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/main.cxx @@ -0,0 +1,6 @@ +import uses_std; + +int main(int argc, char* argv[]) +{ + return f(); +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/test/CMakeLists.txt new file mode 100644 index 0000000..e37f174 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/test/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_library NONE) + +find_package(import_std_export_no_std REQUIRED) + +if (NOT TARGET CXXModules::import_std_export_no_std) + message(FATAL_ERROR + "Missing imported target") +endif () + +function (check_property expected property) + get_property(actual TARGET CXXModules::import_std_export_no_std + PROPERTY "${property}") + if (NOT DEFINED actual) + if (NOT expected STREQUAL "<UNDEF>") + message(SEND_ERROR + "Mismatch for ${property}:\n expected: ${expected}\n actual: NOT-DEFINED") + endif () + elseif (NOT actual STREQUAL expected) + message(SEND_ERROR + "Mismatch for ${property}:\n expected: ${expected}\n actual: ${actual}") + endif () +endfunction () + +check_property("<UNDEF>" "IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES") +check_property("<UNDEF>" "IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS") +check_property("cxx_std_23" "IMPORTED_CXX_MODULES_COMPILE_FEATURES") +check_property("" "IMPORTED_CXX_MODULES_LINK_LIBRARIES") +check_property("<UNDEF>" "INTERFACE_LINK_LIBRARIES") +check_property("$<BOOL:>" "CXX_MODULE_STD") + +# Extract the export-dependent targets from the export file. +file(STRINGS "${import_std_export_no_std_DIR}/import_std_export_no_std-targets.cmake" usage_dependent_targets + REGEX "foreach._target ") +# Rudimentary argument splitting. +string(REPLACE " " ";" usage_dependent_targets "${usage_dependent_targets}") +# Remove exported "target" names. +list(FILTER usage_dependent_targets EXCLUDE REGEX "CXXModules::") +# Strip quotes. +string(REPLACE "\"" "" usage_dependent_targets "${usage_dependent_targets}") + +if ("__CMAKE::CXX23" IN_LIST usage_dependent_targets) + message(SEND_ERROR + "The main export requires the '__CMAKE::CXX23' target") +endif () diff --git a/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/uses-std.cxx b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/uses-std.cxx new file mode 100644 index 0000000..6b7e814 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-export-no-std-install/uses-std.cxx @@ -0,0 +1,9 @@ +module uses_std; +import std; + +int f() +{ + std::string str = "hello!"; + std::cout << "program: " << str << std::endl; + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-build-result.txt b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-build-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-build-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-build-stdout.txt b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-build-stdout.txt new file mode 100644 index 0000000..d473333 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-build-stdout.txt @@ -0,0 +1 @@ +((Clang)?module 'std' not found|(MSVC)?could not find module 'std') diff --git a/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-stderr.txt new file mode 100644 index 0000000..3589448 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at .*/Modules/Compiler/CMakeCommonCompilerMacros.cmake:[0-9]* \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Modules/CMakeDetermineCompilerSupport.cmake:[0-9]* \(cmake_create_cxx_import_std\) + .*/Modules/CMakeTestCXXCompiler.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) + CMakeLists.txt:[0-9]* \(project\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-no-std-property/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property/CMakeLists.txt new file mode 100644 index 0000000..a605e95 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property/CMakeLists.txt @@ -0,0 +1,13 @@ +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") + +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_import_std_no_std_property CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +set(CMAKE_CXX_MODULE_STD 0) + +add_executable(main + main.cxx) +target_compile_features(main PRIVATE cxx_std_23) diff --git a/Tests/RunCMake/CXXModules/examples/import-std-no-std-property/main.cxx b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property/main.cxx new file mode 100644 index 0000000..fee84f1 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-no-std-property/main.cxx @@ -0,0 +1,6 @@ +import std; + +int main(int argc, char* argv[]) +{ + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build-stderr.txt new file mode 100644 index 0000000..3589448 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at .*/Modules/Compiler/CMakeCommonCompilerMacros.cmake:[0-9]* \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Modules/CMakeDetermineCompilerSupport.cmake:[0-9]* \(cmake_create_cxx_import_std\) + .*/Modules/CMakeTestCXXCompiler.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) + CMakeLists.txt:[0-9]* \(project\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/CMakeLists.txt new file mode 100644 index 0000000..3112002 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/CMakeLists.txt @@ -0,0 +1,54 @@ +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") + +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_import_std_not_in_export CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +set(CMAKE_CXX_MODULE_STD 1) + +add_library(import_std_not_in_export) +target_sources(import_std_not_in_export + PUBLIC + FILE_SET use_std TYPE CXX_MODULES FILES + uses-std.cxx) +target_compile_features(import_std_not_in_export PUBLIC cxx_std_23) + +add_executable(main + main.cxx) +target_link_libraries(main PRIVATE import_std_not_in_export) + +install(TARGETS import_std_not_in_export + EXPORT export + ARCHIVE DESTINATION "lib" + FILE_SET use_std DESTINATION "lib/cxx/miu") +export(EXPORT export + NAMESPACE CXXModules:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/import_std_not_in_export-targets.cmake") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/import_std_not_in_export-config.cmake" + "include(\"\${CMAKE_CURRENT_LIST_DIR}/import_std_not_in_export-targets.cmake\") +set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND 1) +") + +add_test(NAME main COMMAND main) + +set(generator + -G "${CMAKE_GENERATOR}") +if (CMAKE_GENERATOR_TOOLSET) + list(APPEND generator + -T "${CMAKE_GENERATOR_TOOLSET}") +endif () +if (CMAKE_GENERATOR_PLATFORM) + list(APPEND generator + -A "${CMAKE_GENERATOR_PLATFORM}") +endif () + +add_test(NAME import_std_not_in_export_build + COMMAND + "${CMAKE_COMMAND}" + "-Dexpected_dir=${CMAKE_CURRENT_SOURCE_DIR}" + "-Dimport_std_not_in_export_DIR=${CMAKE_CURRENT_BINARY_DIR}" + ${generator} + -S "${CMAKE_CURRENT_SOURCE_DIR}/test" + -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/main.cxx b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/main.cxx new file mode 100644 index 0000000..a6dd8d8 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/main.cxx @@ -0,0 +1,6 @@ +import uses_std; + +int main(int argc, char* argv[]) +{ + return f(); +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/test/CMakeLists.txt new file mode 100644 index 0000000..4e994d2 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/test/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_library NONE) + +find_package(import_std_not_in_export REQUIRED) + +if (NOT TARGET CXXModules::import_std_not_in_export) + message(FATAL_ERROR + "Missing imported target") +endif () + +function (check_property expected property) + get_property(actual TARGET CXXModules::import_std_not_in_export + PROPERTY "${property}") + if (NOT DEFINED actual) + if (NOT expected STREQUAL "<UNDEF>") + message(SEND_ERROR + "Mismatch for ${property}:\n expected: ${expected}\n actual: NOT-DEFINED") + endif () + elseif (NOT actual STREQUAL expected) + message(SEND_ERROR + "Mismatch for ${property}:\n expected: ${expected}\n actual: ${actual}") + endif () +endfunction () + +check_property("<UNDEF>" "IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES") +check_property("<UNDEF>" "IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS") +check_property("cxx_std_23" "IMPORTED_CXX_MODULES_COMPILE_FEATURES") +check_property("" "IMPORTED_CXX_MODULES_LINK_LIBRARIES") +check_property("<UNDEF>" "INTERFACE_LINK_LIBRARIES") +check_property("1" "CXX_MODULE_STD") + +# Extract the export-dependent targets from the export file. +file(STRINGS "${import_std_not_in_export_DIR}/import_std_not_in_export-targets.cmake" usage_dependent_targets + REGEX "foreach._target ") +# Rudimentary argument splitting. +string(REPLACE " " ";" usage_dependent_targets "${usage_dependent_targets}") +# Remove exported "target" names. +list(FILTER usage_dependent_targets EXCLUDE REGEX "CXXModules::") +# Strip quotes. +string(REPLACE "\"" "" usage_dependent_targets "${usage_dependent_targets}") + +if ("__CMAKE::CXX23" IN_LIST usage_dependent_targets) + message(SEND_ERROR + "The main export requires the '__CMAKE::CXX23' target") +endif () diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/uses-std.cxx b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/uses-std.cxx new file mode 100644 index 0000000..aa45dd1 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-build/uses-std.cxx @@ -0,0 +1,7 @@ +export module uses_std; +import std; + +export int f() +{ + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install-stderr.txt new file mode 100644 index 0000000..3589448 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at .*/Modules/Compiler/CMakeCommonCompilerMacros.cmake:[0-9]* \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Modules/CMakeDetermineCompilerSupport.cmake:[0-9]* \(cmake_create_cxx_import_std\) + .*/Modules/CMakeTestCXXCompiler.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) + CMakeLists.txt:[0-9]* \(project\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/CMakeLists.txt new file mode 100644 index 0000000..788ea84 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/CMakeLists.txt @@ -0,0 +1,58 @@ +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") + +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_import_std_not_in_export CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +set(CMAKE_CXX_MODULE_STD 1) + +add_library(import_std_not_in_export) +target_sources(import_std_not_in_export + PUBLIC + FILE_SET use_std TYPE CXX_MODULES FILES + uses-std.cxx) +target_compile_features(import_std_not_in_export PUBLIC cxx_std_23) + +add_executable(main + main.cxx) +target_link_libraries(main PRIVATE import_std_not_in_export) + +install(TARGETS import_std_not_in_export + EXPORT export + ARCHIVE DESTINATION "lib" + FILE_SET use_std DESTINATION "lib/cxx/miu") +install( + EXPORT export + NAMESPACE CXXModules:: + DESTINATION "lib/cmake/import_std_not_in_export" + FILE "import_std_not_in_export-targets.cmake") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/import_std_not_in_export-config.cmake" + "include(\"\${CMAKE_CURRENT_LIST_DIR}/import_std_not_in_export-targets.cmake\") +set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND 1) +") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/import_std_not_in_export-config.cmake" + DESTINATION "lib/cmake/import_std_not_in_export") + +add_test(NAME main COMMAND main) + +set(generator + -G "${CMAKE_GENERATOR}") +if (CMAKE_GENERATOR_TOOLSET) + list(APPEND generator + -T "${CMAKE_GENERATOR_TOOLSET}") +endif () +if (CMAKE_GENERATOR_PLATFORM) + list(APPEND generator + -A "${CMAKE_GENERATOR_PLATFORM}") +endif () + +add_test(NAME import_std_not_in_export_build + COMMAND + "${CMAKE_COMMAND}" + "-Dexpected_dir=${CMAKE_INSTALL_PREFIX}/lib/cxx/miu" + "-Dimport_std_not_in_export_DIR=${CMAKE_INSTALL_PREFIX}/lib/cmake/import_std_not_in_export" + ${generator} + -S "${CMAKE_CURRENT_SOURCE_DIR}/test" + -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/main.cxx b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/main.cxx new file mode 100644 index 0000000..a6dd8d8 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/main.cxx @@ -0,0 +1,6 @@ +import uses_std; + +int main(int argc, char* argv[]) +{ + return f(); +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/test/CMakeLists.txt new file mode 100644 index 0000000..4e994d2 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/test/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_library NONE) + +find_package(import_std_not_in_export REQUIRED) + +if (NOT TARGET CXXModules::import_std_not_in_export) + message(FATAL_ERROR + "Missing imported target") +endif () + +function (check_property expected property) + get_property(actual TARGET CXXModules::import_std_not_in_export + PROPERTY "${property}") + if (NOT DEFINED actual) + if (NOT expected STREQUAL "<UNDEF>") + message(SEND_ERROR + "Mismatch for ${property}:\n expected: ${expected}\n actual: NOT-DEFINED") + endif () + elseif (NOT actual STREQUAL expected) + message(SEND_ERROR + "Mismatch for ${property}:\n expected: ${expected}\n actual: ${actual}") + endif () +endfunction () + +check_property("<UNDEF>" "IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES") +check_property("<UNDEF>" "IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS") +check_property("cxx_std_23" "IMPORTED_CXX_MODULES_COMPILE_FEATURES") +check_property("" "IMPORTED_CXX_MODULES_LINK_LIBRARIES") +check_property("<UNDEF>" "INTERFACE_LINK_LIBRARIES") +check_property("1" "CXX_MODULE_STD") + +# Extract the export-dependent targets from the export file. +file(STRINGS "${import_std_not_in_export_DIR}/import_std_not_in_export-targets.cmake" usage_dependent_targets + REGEX "foreach._target ") +# Rudimentary argument splitting. +string(REPLACE " " ";" usage_dependent_targets "${usage_dependent_targets}") +# Remove exported "target" names. +list(FILTER usage_dependent_targets EXCLUDE REGEX "CXXModules::") +# Strip quotes. +string(REPLACE "\"" "" usage_dependent_targets "${usage_dependent_targets}") + +if ("__CMAKE::CXX23" IN_LIST usage_dependent_targets) + message(SEND_ERROR + "The main export requires the '__CMAKE::CXX23' target") +endif () diff --git a/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/uses-std.cxx b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/uses-std.cxx new file mode 100644 index 0000000..aa45dd1 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-not-in-export-install/uses-std.cxx @@ -0,0 +1,7 @@ +export module uses_std; +import std; + +export int f() +{ + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-std-stderr.txt new file mode 100644 index 0000000..3589448 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at .*/Modules/Compiler/CMakeCommonCompilerMacros.cmake:[0-9]* \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Modules/CMakeDetermineCompilerSupport.cmake:[0-9]* \(cmake_create_cxx_import_std\) + .*/Modules/CMakeTestCXXCompiler.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) + CMakeLists.txt:[0-9]* \(project\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-transitive-not-in-export-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-std-transitive-not-in-export-build-stderr.txt new file mode 100644 index 0000000..3589448 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-transitive-not-in-export-build-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at .*/Modules/Compiler/CMakeCommonCompilerMacros.cmake:[0-9]* \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Modules/CMakeDetermineCompilerSupport.cmake:[0-9]* \(cmake_create_cxx_import_std\) + .*/Modules/CMakeTestCXXCompiler.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) + CMakeLists.txt:[0-9]* \(project\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-transitive-not-in-export-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-std-transitive-not-in-export-install-stderr.txt new file mode 100644 index 0000000..3589448 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-transitive-not-in-export-install-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at .*/Modules/Compiler/CMakeCommonCompilerMacros.cmake:[0-9]* \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Modules/CMakeDetermineCompilerSupport.cmake:[0-9]* \(cmake_create_cxx_import_std\) + .*/Modules/CMakeTestCXXCompiler.cmake:[0-9]* \(CMAKE_DETERMINE_COMPILER_SUPPORT\) + CMakeLists.txt:[0-9]* \(project\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-std-transitive/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std-transitive/CMakeLists.txt new file mode 100644 index 0000000..2894d67 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-transitive/CMakeLists.txt @@ -0,0 +1,28 @@ +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") + +cmake_minimum_required(VERSION 3.29) + +if (EXPORT_NO_STD) + # Block making C++ `import std` targets. + add_library(__CMAKE::CXX23 IMPORTED INTERFACE) +endif () + +project(cxx_modules_import_std_transitive CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +if (EXPORT_NO_STD) + set(package "import_std_export_no_std") +else () + set(package "import_std_not_in_export") +endif () +find_package("${package}" REQUIRED) + +set(CMAKE_CXX_MODULE_STD 0) + +add_executable(main + main.cxx) +target_link_libraries(main PRIVATE "CXXModules::${package}") + +add_test(NAME main COMMAND main) diff --git a/Tests/RunCMake/CXXModules/examples/import-std-transitive/main.cxx b/Tests/RunCMake/CXXModules/examples/import-std-transitive/main.cxx new file mode 100644 index 0000000..a6dd8d8 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std-transitive/main.cxx @@ -0,0 +1,6 @@ +import uses_std; + +int main(int argc, char* argv[]) +{ + return f(); +} diff --git a/Tests/RunCMake/CXXModules/examples/import-std/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-std/CMakeLists.txt new file mode 100644 index 0000000..bffcd66 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std/CMakeLists.txt @@ -0,0 +1,15 @@ +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") + +cmake_minimum_required(VERSION 3.29) +project(cxx_modules_import_std CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +set(CMAKE_CXX_MODULE_STD 1) + +add_executable(main + main.cxx) +target_compile_features(main PRIVATE cxx_std_23) + +add_test(NAME main COMMAND main) diff --git a/Tests/RunCMake/CXXModules/examples/import-std/main.cxx b/Tests/RunCMake/CXXModules/examples/import-std/main.cxx new file mode 100644 index 0000000..6dafd01 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-std/main.cxx @@ -0,0 +1,10 @@ +import std; + +int main(int argc, char* argv[]) +{ + if (argc > 0 && argv[0]) { + std::string argv0 = argv[0]; + std::cout << "program: " << argv0 << std::endl; + } + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/vs-without-flags/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/vs-without-flags/CMakeLists.txt index 0d18a66..c5958df 100644 --- a/Tests/RunCMake/CXXModules/examples/vs-without-flags/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/vs-without-flags/CMakeLists.txt @@ -3,7 +3,7 @@ project(cxx_modules_vs_without_flags CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") -set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_SCAN_FOR_MODULES ON) diff --git a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake index 2fb159e..1dcf0ef 100644 --- a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake @@ -12,13 +12,8 @@ run_cmake(save-to-result) run_cmake(cmp0069-is-old) if(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE - AND _CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER - AND NOT RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") + AND _CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER) run_cmake(CMP0138-WARN) run_cmake(CMP0138-OLD) run_cmake(CMP0138-NEW) endif() - -if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") - run_cmake(not-supported-by-generator) -endif() diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt deleted file mode 100644 index a2aa58c..0000000 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\): - IPO is not supported \(CMake doesn't support IPO for current generator\)\. -Call Stack \(most recent call first\): - .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(_ipo_not_supported\) - not-supported-by-generator\.cmake:[0-9]+ \(check_ipo_supported\) - CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake deleted file mode 100644 index c32af6e..0000000 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake +++ /dev/null @@ -1,6 +0,0 @@ -project(${RunCMake_TEST} LANGUAGES C) - -set(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE YES) -set(_CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) - -check_ipo_supported() diff --git a/Tests/RunCMake/CommandLine/C_target-commands-result.txt b/Tests/RunCMake/CommandLine/C_target-commands-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_target-commands-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/C_target-commands-stderr.txt b/Tests/RunCMake/CommandLine/C_target-commands-stderr.txt new file mode 100644 index 0000000..8e811a6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_target-commands-stderr.txt @@ -0,0 +1,44 @@ +^CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_sources\): + Cannot specify sources for target "DoesNotExist" which is not built by this + project\. ++ +CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_compile_definitions\): + Cannot specify compile definitions for target "DoesNotExist" which is not + built by this project\. ++ +CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_compile_features\): + Cannot specify compile features for target "DoesNotExist" which is not + built by this project\. ++ +CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_compile_options\): + Cannot specify compile options for target "DoesNotExist" which is not built + by this project\. ++ +CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_include_directories\): + Cannot specify include directories for target "DoesNotExist" which is not + built by this project\. ++ +CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_precompile_headers\): + Cannot specify precompile headers for target "DoesNotExist" which is not + built by this project\. ++ +CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_link_directories\): + Cannot specify link directories for target "DoesNotExist" which is not + built by this project\. ++ +CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_link_options\): + Cannot specify link options for target "DoesNotExist" which is not built by + this project\. ++ +CMake Error at [^ +]*C_target-commands_initial-cache\.cmake:[0-9]+ \(target_link_libraries\): + Cannot specify link libraries for target "DoesNotExist" which is not built + by this project\.$ diff --git a/Tests/RunCMake/CommandLine/C_target-commands-stdout.txt b/Tests/RunCMake/CommandLine/C_target-commands-stdout.txt new file mode 100644 index 0000000..beaa2c6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_target-commands-stdout.txt @@ -0,0 +1 @@ +loading initial cache file \.\./C_target-commands_initial-cache\.cmake diff --git a/Tests/RunCMake/CommandLine/C_target-commands.cmake b/Tests/RunCMake/CommandLine/C_target-commands.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_target-commands.cmake diff --git a/Tests/RunCMake/CommandLine/C_target-commands_initial-cache.cmake b/Tests/RunCMake/CommandLine/C_target-commands_initial-cache.cmake new file mode 100644 index 0000000..a453334 --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_target-commands_initial-cache.cmake @@ -0,0 +1,9 @@ +target_sources(DoesNotExist PRIVATE) +target_compile_definitions(DoesNotExist PRIVATE) +target_compile_features(DoesNotExist PRIVATE) +target_compile_options(DoesNotExist PRIVATE) +target_include_directories(DoesNotExist PRIVATE) +target_precompile_headers(DoesNotExist PRIVATE) +target_link_directories(DoesNotExist PRIVATE) +target_link_options(DoesNotExist PRIVATE) +target_link_libraries(DoesNotExist PRIVATE) diff --git a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt deleted file mode 100644 index c3329a0..0000000 --- a/Tests/RunCMake/CommandLine/DeprecateVS9-WARN-ON-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -^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/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt index 2bbe1c8..0c2a951 100644 --- a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt +++ b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt @@ -1 +1 @@ -^{"debugger":(true|false),"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":7}]},{"kind":"configureLog","version":\[{"major":1,"minor":0}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"tls":(true|false),"version":{.*}}$ +^{"debugger":(true|false),"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":7}]},{"kind":"configureLog","version":\[{"major":1,"minor":0}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":1}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"tls":(true|false),"version":{.*}}$ diff --git a/Tests/RunCMake/CommandLine/Envgen-A-platform-stderr-vs9.txt b/Tests/RunCMake/CommandLine/Envgen-A-platform-stderr-vs9.txt deleted file mode 100644 index 4eae6aa..0000000 --- a/Tests/RunCMake/CommandLine/Envgen-A-platform-stderr-vs9.txt +++ /dev/null @@ -1,2 +0,0 @@ -^CMake Error at CMakeLists.+ - No CMAKE_C_COMPILER could be found. diff --git a/Tests/RunCMake/CommandLine/Envgen-platform-invalid-stderr-vs9.txt b/Tests/RunCMake/CommandLine/Envgen-platform-invalid-stderr-vs9.txt deleted file mode 100644 index 4eae6aa..0000000 --- a/Tests/RunCMake/CommandLine/Envgen-platform-invalid-stderr-vs9.txt +++ /dev/null @@ -1,2 +0,0 @@ -^CMake Error at CMakeLists.+ - No CMAKE_C_COMPILER could be found. diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 7b34773..7a5a334 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -393,16 +393,10 @@ function(run_EnvironmentGenerator) # Envvar shouldn't affect existing build tree run_cmake_command(Envgen-platform-existing ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build Envgen-build) - if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") - set(RunCMake-stderr-file "Envgen-platform-invalid-stderr-vs9.txt") - endif() run_cmake_command(Envgen-platform-invalid ${CMAKE_COMMAND} ${source_dir}) unset(RunCMake-stderr-file) # Command line -G implies -A"" run_cmake_command(Envgen-G-implicit-platform ${CMAKE_COMMAND} -G "${RunCMake_GENERATOR}" ${source_dir}) - if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 ") - set(RunCMake-stderr-file "Envgen-A-platform-stderr-vs9.txt") - endif() run_cmake_command(Envgen-A-platform ${CMAKE_COMMAND} -A "fromcli" ${source_dir}) unset(RunCMake-stderr-file) unset(ENV{CMAKE_GENERATOR_PLATFORM}) @@ -903,6 +897,8 @@ run_cmake_command(P_working-dir ${CMAKE_COMMAND} -DEXPECTED_WORKING_DIR=${RunCMa file(COPY ${RunCMake_SOURCE_DIR}/C_basic_initial-cache.txt DESTINATION ${RunCMake_BINARY_DIR}) run_cmake_with_options(C_basic -C ../C_basic_initial-cache.txt) run_cmake_with_options(C_basic_fullpath -C ${RunCMake_BINARY_DIR}/C_basic_initial-cache.txt) +file(COPY ${RunCMake_SOURCE_DIR}/C_target-commands_initial-cache.cmake DESTINATION ${RunCMake_BINARY_DIR}) +run_cmake_command(C_target-commands ${CMAKE_COMMAND} -S ${RunCMake_SOURCE_DIR} -DRunCMake_TEST=C_target-commands -C ../C_target-commands_initial-cache.cmake) set(RunCMake_TEST_OPTIONS "-DFOO=-DBAR:BOOL=BAZ") @@ -1124,13 +1120,6 @@ 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 12 2013") run_cmake_with_options(DeprecateVS12-WARN-ON -DCMAKE_WARN_VS12=ON) unset(ENV{CMAKE_WARN_VS12}) diff --git a/Tests/RunCMake/CompileFeatures/CMP0128WarnMatch-stderr.txt b/Tests/RunCMake/CompileFeatures/CMP0128WarnMatch-stderr.txt index 320c2ba..4b3774f 100644 --- a/Tests/RunCMake/CompileFeatures/CMP0128WarnMatch-stderr.txt +++ b/Tests/RunCMake/CompileFeatures/CMP0128WarnMatch-stderr.txt @@ -1,3 +1,14 @@ +^CMake Deprecation Warning at CMP0128WarnMatch-(C|CXX)\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0128 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\) in CMakeLists\.txt: Policy CMP0128 is not set: Selection of language standard and extension flags improved\. Run "cmake --help-policy CMP0128" for policy details\. Use diff --git a/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt b/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt index 068cba9..37a0767 100644 --- a/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt +++ b/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt @@ -1,3 +1,14 @@ +^CMake Deprecation Warning at CMP0128WarnUnset-(C|CXX)\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0128 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\) in CMakeLists\.txt: Policy CMP0128 is not set: Selection of language standard and extension flags improved\. Run "cmake --help-policy CMP0128" for policy details\. Use diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake index 731a303..487284b 100644 --- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake @@ -53,6 +53,7 @@ function(test_build) set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${test}-build") run_cmake(${test}) set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OUTPUT_MERGE 1) run_cmake_command(${test}-build ${CMAKE_COMMAND} --build . ${ARGN}) endfunction() diff --git a/Tests/RunCMake/CompileFeatures/compiler_introspection.cmake b/Tests/RunCMake/CompileFeatures/compiler_introspection.cmake index f3360c7..1cfa27e 100644 --- a/Tests/RunCMake/CompileFeatures/compiler_introspection.cmake +++ b/Tests/RunCMake/CompileFeatures/compiler_introspection.cmake @@ -40,6 +40,6 @@ set(${lang}${standard}_EXT_FLAG ${CMAKE_${lang}${standard}_EXTENSION_COMPILE_OPT endforeach() endmacro() -info(C 90 99 11 17 23) -info(CXX 98 11 14 17 20 23) +info(C 90 99 11 17 23 26) +info(CXX 98 11 14 17 20 23 26) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/info.cmake" "${info}") diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake index 842a005..00d3272 100644 --- a/Tests/RunCMake/Configure/RunCMakeTest.cmake +++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake @@ -4,51 +4,50 @@ run_cmake(ContinueAfterError) run_cmake(CopyFileABI) run_cmake(CustomTargetAfterError) -# Use a single build tree for a few tests without cleaning. -set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RerunCMake-build) -set(RunCMake_TEST_NO_CLEAN 1) -file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") -file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") -set(input "${RunCMake_TEST_BINARY_DIR}/CustomCMakeInput.txt") -set(stamp "${RunCMake_TEST_BINARY_DIR}/CustomCMakeStamp.txt") -set(depend "${RunCMake_TEST_BINARY_DIR}/CustomCMakeDepend.txt") -set(output "${RunCMake_TEST_BINARY_DIR}/CustomCMakeOutput.txt") -set(error "${RunCMake_TEST_BINARY_DIR}/CustomCMakeError.txt") -file(WRITE "${input}" "1") -file(WRITE "${depend}" "1") -run_cmake(RerunCMake) -execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) # handle 1s resolution -file(WRITE "${input}" "2") -run_cmake_command(RerunCMake-build1 ${CMAKE_COMMAND} --build .) -file(WRITE "${depend}" "2") -run_cmake_command(RerunCMake-build2 ${CMAKE_COMMAND} --build .) -execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) # handle 1s resolution -file(WRITE "${depend}" "3") -file(WRITE "${error}" "3") -set(RunCMake_TEST_OUTPUT_MERGE 1) -run_cmake_command(RerunCMake-build3 ${CMAKE_COMMAND} --build .) -if(MSVC_IDE) - # Make sure that for Visual Studio the error occurs from within the build - # system. - file(REMOVE "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/generate.stamp.list") - file(WRITE "${error}" "4") - # With Visual Studio the error must be on stdout, otherwise the error was not - # emitted by ZERO_CHECK. - set(RunCMake_TEST_OUTPUT_MERGE 0) - run_cmake_command(RerunCMake-build4 ${CMAKE_COMMAND} --build .) -endif() -unset(RunCMake_TEST_OUTPUT_MERGE) -unset(RunCMake_TEST_BINARY_DIR) -unset(RunCMake_TEST_NO_CLEAN) +block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RerunCMake-build) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + set(input "${RunCMake_TEST_BINARY_DIR}/CustomCMakeInput.txt") + set(stamp "${RunCMake_TEST_BINARY_DIR}/CustomCMakeStamp.txt") + set(depend "${RunCMake_TEST_BINARY_DIR}/CustomCMakeDepend.txt") + set(output "${RunCMake_TEST_BINARY_DIR}/CustomCMakeOutput.txt") + set(error "${RunCMake_TEST_BINARY_DIR}/CustomCMakeError.txt") + file(WRITE "${input}" "1") + file(WRITE "${depend}" "1") + run_cmake(RerunCMake) + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) # handle 1s resolution + file(WRITE "${input}" "2") + run_cmake_command(RerunCMake-build1 ${CMAKE_COMMAND} --build .) + file(WRITE "${depend}" "2") + run_cmake_command(RerunCMake-build2 ${CMAKE_COMMAND} --build .) + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) # handle 1s resolution + file(WRITE "${depend}" "3") + file(WRITE "${error}" "3") + set(RunCMake_TEST_OUTPUT_MERGE 1) + run_cmake_command(RerunCMake-build3 ${CMAKE_COMMAND} --build .) + if(MSVC_IDE) + # Make sure that for Visual Studio the error occurs from within the build + # system. + file(REMOVE "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/generate.stamp.list") + file(WRITE "${error}" "4") + # With Visual Studio the error must be on stdout, otherwise the error was not + # emitted by ZERO_CHECK. + set(RunCMake_TEST_OUTPUT_MERGE 0) + run_cmake_command(RerunCMake-build4 ${CMAKE_COMMAND} --build .) + endif() +endblock() -# Use a single build tree for a few tests without cleaning. -set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RemoveCache-build) -set(RunCMake_TEST_NO_CLEAN 1) -file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") -file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") -run_cmake(RemoveCache) -file(REMOVE "${RunCMake_TEST_BINARY_DIR}/CMakeCache.txt") -run_cmake(RemoveCache) +block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RemoveCache-build) + set(RunCMake_TEST_VARIANT_DESCRIPTION "-step1") + run_cmake(RemoveCache) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE "${RunCMake_TEST_BINARY_DIR}/CMakeCache.txt") + set(RunCMake_TEST_VARIANT_DESCRIPTION "-step2") + run_cmake(RemoveCache) +endblock() if(NOT RunCMake_GENERATOR MATCHES "^Ninja Multi-Config$") run_cmake(NoCMAKE_CROSS_CONFIGS) diff --git a/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt index 2fc7d29..72c4b81 100644 --- a/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt +++ b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt @@ -1,4 +1,4 @@ -^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): +^CMake Error at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): No download info given for 'MyProj' and its source directory: .*/Tests/RunCMake/ExternalProject/NoOptions-build/MyProj-prefix/src/MyProj diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake index ffaa46c..98e3996 100644 --- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake @@ -18,6 +18,7 @@ run_cmake(BadIndependentStep2) run_cmake(NoOptions) run_cmake(SourceEmpty) run_cmake(SourceMissing) +run_cmake(SourceDirExisting) run_cmake(CMAKE_CACHE_ARGS) run_cmake(CMAKE_CACHE_DEFAULT_ARGS) run_cmake(CMAKE_CACHE_mix) @@ -210,7 +211,7 @@ function(__ep_test_BUILD_ALWAYS) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-configure.cmake" [[message(FATAL_ERROR "once: configure should not run again")]]) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-build.cmake" [[message(FATAL_ERROR "once: build should not run again")]]) file(WRITE "${RunCMake_TEST_BINARY_DIR}/once-install.cmake" [[message(FATAL_ERROR "once: install should not run again")]]) - if(NOT RunCMake_GENERATOR MATCHES "^(Xcode|Visual Studio 9 )") + if(NOT RunCMake_GENERATOR STREQUAL "Xcode") # The Xcode and VS 9 build systems decide to run this every time. file(WRITE "${RunCMake_TEST_BINARY_DIR}/always-configure.cmake" [[message(FATAL_ERROR "always: configure should not run again")]]) endif() @@ -244,9 +245,7 @@ function(__ep_test_CONFIGURE_HANDLED_BY_BUILD) run_cmake_command(CONFIGURE_HANDLED_BY_BUILD-rebuild ${CMAKE_COMMAND} --build . ${BUILD_CONFIG}) endfunction() -if(NOT RunCMake_GENERATOR MATCHES "Visual Studio 9 ") - __ep_test_CONFIGURE_HANDLED_BY_BUILD() -endif() +__ep_test_CONFIGURE_HANDLED_BY_BUILD() find_package(Git QUIET) if(GIT_EXECUTABLE) @@ -254,5 +253,9 @@ if(GIT_EXECUTABLE) # on some platforms. It may go to stdout or stderr, so force it to be merged. set(RunCMake_TEST_OUTPUT_MERGE TRUE) run_cmake(FetchGitRefs) - set(RunCMake_TEST_OUTPUT_MERGE FALSE) + unset(RunCMake_TEST_OUTPUT_MERGE) + + run_cmake(TLSVersionBadArg) + run_cmake(TLSVersionBadVar) + run_cmake(TLSVersionBadEnv) endif() diff --git a/Tests/RunCMake/ExternalProject/SourceDirExisting.cmake b/Tests/RunCMake/ExternalProject/SourceDirExisting.cmake new file mode 100644 index 0000000..761bb8e --- /dev/null +++ b/Tests/RunCMake/ExternalProject/SourceDirExisting.cmake @@ -0,0 +1,16 @@ +# We're providing a pre-existing source directory. Make sure we don't trigger +# an error if the undocumented but used-in-the-wild CMAKE_DISABLE_SOURCE_CHANGES +# variable is set. +set(CMAKE_DISABLE_SOURCE_CHANGES TRUE) + +include(ExternalProject) + +ExternalProject_Add(source_dir_existing + SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/Foo" + DOWNLOAD_COMMAND "${CMAKE_COMMAND}" -E echo "Download command executed" + UPDATE_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + TEST_COMMAND "" + INSTALL_COMMAND "" +) diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt index 07c6e87..8789dde 100644 --- a/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt +++ b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt @@ -1,4 +1,4 @@ -^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): +^CMake Error at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): No download info given for 'MyProj' and its source directory: .*/Tests/RunCMake/ExternalProject/SourceEmpty-build/SourceEmpty diff --git a/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt index 373f6e3..9ff2681 100644 --- a/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt +++ b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt @@ -1,4 +1,4 @@ -^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): +^CMake Error at .*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): No download info given for 'MyProj' and its source directory: .*/Tests/RunCMake/ExternalProject/SourceMissing-build/SourceMissing diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadArg-result.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadArg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadArg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadArg-stderr.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadArg-stderr.txt new file mode 100644 index 0000000..f0973ba --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadArg-stderr.txt @@ -0,0 +1,10 @@ +^CMake Error at [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): + TLS_VERSION 'bad-arg' not known +Call Stack \(most recent call first\): + [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(_ep_get_tls_version\) + [^ +]*/Modules/ExternalProject\.cmake:[0-9]+ \(_ep_add_download_command\) + TLSVersionBadArg\.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadArg.cmake b/Tests/RunCMake/ExternalProject/TLSVersionBadArg.cmake new file mode 100644 index 0000000..d212982 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadArg.cmake @@ -0,0 +1,4 @@ +include(ExternalProject) +set(ENV{CMAKE_TLS_VERSION} bad-env) +set(CMAKE_TLS_VERSION bad-var) +ExternalProject_Add(MyProj GIT_REPOSITORY "fake" TLS_VERSION bad-arg) diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-result.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-stderr.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-stderr.txt new file mode 100644 index 0000000..4069159 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv-stderr.txt @@ -0,0 +1,10 @@ +^CMake Error at [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): + ENV{CMAKE_TLS_VERSION} 'bad-env' not known +Call Stack \(most recent call first\): + [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(_ep_get_tls_version\) + [^ +]*/Modules/ExternalProject\.cmake:[0-9]+ \(_ep_add_download_command\) + TLSVersionBadEnv\.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadEnv.cmake b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv.cmake new file mode 100644 index 0000000..8018642 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadEnv.cmake @@ -0,0 +1,3 @@ +include(ExternalProject) +set(ENV{CMAKE_TLS_VERSION} bad-env) +ExternalProject_Add(MyProj GIT_REPOSITORY "fake") diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadVar-result.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadVar-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadVar-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadVar-stderr.txt b/Tests/RunCMake/ExternalProject/TLSVersionBadVar-stderr.txt new file mode 100644 index 0000000..a5f7d64 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadVar-stderr.txt @@ -0,0 +1,10 @@ +^CMake Error at [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(message\): + CMAKE_TLS_VERSION 'bad-var' not known +Call Stack \(most recent call first\): + [^ +]*/Modules/ExternalProject/shared_internal_commands\.cmake:[0-9]+ \(_ep_get_tls_version\) + [^ +]*/Modules/ExternalProject\.cmake:[0-9]+ \(_ep_add_download_command\) + TLSVersionBadVar\.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/TLSVersionBadVar.cmake b/Tests/RunCMake/ExternalProject/TLSVersionBadVar.cmake new file mode 100644 index 0000000..f52dd2e --- /dev/null +++ b/Tests/RunCMake/ExternalProject/TLSVersionBadVar.cmake @@ -0,0 +1,4 @@ +include(ExternalProject) +set(ENV{CMAKE_TLS_VERSION} bad-env) +set(CMAKE_TLS_VERSION bad-var) +ExternalProject_Add(MyProj GIT_REPOSITORY "fake") diff --git a/Tests/RunCMake/FPHSA/BadFoundVar-stderr.txt b/Tests/RunCMake/FPHSA/BadFoundVar-stderr.txt index 4c739d8..3ae1ba7 100644 --- a/Tests/RunCMake/FPHSA/BadFoundVar-stderr.txt +++ b/Tests/RunCMake/FPHSA/BadFoundVar-stderr.txt @@ -2,6 +2,6 @@ CMake Error at .*/Modules/FindPackageHandleStandardArgs.cmake:[0-9]+ \(message\) The argument for FOUND_VAR is "badfoundvar_FOUND", but only "BadFoundVar_FOUND" and "BADFOUNDVAR_FOUND" are valid names. Call Stack \(most recent call first\): - FindBadFoundVar.cmake:5 \(find_package_handle_standard_args\) - BadFoundVar.cmake:3 \(find_package\) - CMakeLists.txt:3 \(include\) + FindBadFoundVar.cmake:[0-9]+ \(find_package_handle_standard_args\) + BadFoundVar.cmake:[0-9]+ \(find_package\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/FPHSA/BeforeProject-Error-result.txt b/Tests/RunCMake/FPHSA/BeforeProject-Error-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/BeforeProject-Error-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/BeforeProject-Error-stderr.txt b/Tests/RunCMake/FPHSA/BeforeProject-Error-stderr.txt new file mode 100644 index 0000000..c8e53fc --- /dev/null +++ b/Tests/RunCMake/FPHSA/BeforeProject-Error-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at [^ +]*/Modules/FindPackageHandleStandardArgs\.cmake:[0-9]+ \(message\): + Could NOT find BeforeProject \(missing: SOME_VAR\) + + Hint: The project\(\) command has not yet been called\. It sets up + system-specific search paths\. +Call Stack \(most recent call first\): + [^ +]*/Modules/FindPackageHandleStandardArgs\.cmake:[0-9]+ \(_FPHSA_FAILURE_MESSAGE\) + FindBeforeProject\.cmake:[0-9]+ \(find_package_handle_standard_args\) + BeforeProject-Error\.cmake:[0-9]+ \(find_package\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/FPHSA/BeforeProject-Error.cmake b/Tests/RunCMake/FPHSA/BeforeProject-Error.cmake new file mode 100644 index 0000000..53a8073 --- /dev/null +++ b/Tests/RunCMake/FPHSA/BeforeProject-Error.cmake @@ -0,0 +1,2 @@ +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}") +find_package(BeforeProject REQUIRED) diff --git a/Tests/RunCMake/FPHSA/BeforeProject-Missing-stdout.txt b/Tests/RunCMake/FPHSA/BeforeProject-Missing-stdout.txt new file mode 100644 index 0000000..05df0b0 --- /dev/null +++ b/Tests/RunCMake/FPHSA/BeforeProject-Missing-stdout.txt @@ -0,0 +1,2 @@ +-- Could NOT find BeforeProject \(missing: SOME_VAR\)[ ]* +Hint: The project\(\) command has not yet been called\. It sets up system-specific search paths\. diff --git a/Tests/RunCMake/FPHSA/BeforeProject-Missing.cmake b/Tests/RunCMake/FPHSA/BeforeProject-Missing.cmake new file mode 100644 index 0000000..8d44ca9 --- /dev/null +++ b/Tests/RunCMake/FPHSA/BeforeProject-Missing.cmake @@ -0,0 +1,2 @@ +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}") +find_package(BeforeProject) diff --git a/Tests/RunCMake/FPHSA/CMakeLists.txt b/Tests/RunCMake/FPHSA/CMakeLists.txt index 93ee9df..dc34259 100644 --- a/Tests/RunCMake/FPHSA/CMakeLists.txt +++ b/Tests/RunCMake/FPHSA/CMakeLists.txt @@ -1,3 +1,8 @@ cmake_minimum_required(VERSION 3.5) +if(RunCMake_TEST MATCHES "^BeforeProject") + include(${RunCMake_TEST}.cmake) + project(${RunCMake_TEST} NONE) + return() +endif() project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FPHSA/FindBeforeProject.cmake b/Tests/RunCMake/FPHSA/FindBeforeProject.cmake new file mode 100644 index 0000000..6bf49f1 --- /dev/null +++ b/Tests/RunCMake/FPHSA/FindBeforeProject.cmake @@ -0,0 +1,3 @@ +set(SOME_VAR FALSE) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(BeforeProject REQUIRED_VARS SOME_VAR) diff --git a/Tests/RunCMake/FPHSA/NameMismatch-stderr.txt b/Tests/RunCMake/FPHSA/NameMismatch-stderr.txt index 722b50b..8ee6ec1 100644 --- a/Tests/RunCMake/FPHSA/NameMismatch-stderr.txt +++ b/Tests/RunCMake/FPHSA/NameMismatch-stderr.txt @@ -5,9 +5,9 @@ CMake Warning \(dev\) at .*/Modules/FindPackageHandleStandardArgs.cmake:[0-9]+ \ `find_package` result variables \(e.g., `_FOUND`\) to follow a certain pattern. Call Stack \(most recent call first\): - FindNameMismatch.cmake:3 \(find_package_handle_standard_args\) - NameMismatch.cmake:3 \(find_package\) - CMakeLists.txt:3 \(include\) + FindNameMismatch.cmake:[0-9]+ \(find_package_handle_standard_args\) + NameMismatch.cmake:[0-9]+ \(find_package\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning \(dev\) at .*/Modules/FindPackageHandleStandardArgs.cmake:[0-9]+ \(message\): @@ -17,7 +17,7 @@ CMake Warning \(dev\) at .*/Modules/FindPackageHandleStandardArgs.cmake:[0-9]+ \ `find_package` result variables \(e.g., `_FOUND`\) to follow a certain pattern. Call Stack \(most recent call first\): - FindNameMismatchOld.cmake:3 \(find_package_handle_standard_args\) - NameMismatch.cmake:4 \(find_package\) - CMakeLists.txt:3 \(include\) + FindNameMismatchOld.cmake:[0-9]+ \(find_package_handle_standard_args\) + NameMismatch.cmake:[0-9]+ \(find_package\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index 3b095a6..be9b127 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -1,6 +1,8 @@ include(RunCMake) run_cmake(BadFoundVar) +run_cmake(BeforeProject-Error) +run_cmake(BeforeProject-Missing) run_cmake(NameMismatch) # The pseudo module will "find" a package with the given version. Check if the diff --git a/Tests/RunCMake/FetchContent/CMakeLists.txt b/Tests/RunCMake/FetchContent/CMakeLists.txt index 3cc2e43..4f2de6c 100644 --- a/Tests/RunCMake/FetchContent/CMakeLists.txt +++ b/Tests/RunCMake/FetchContent/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.9) project(${RunCMake_TEST} NONE) -# Tests assume no previous downloads in the output directory -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/_deps) - +if(CMP0168 STREQUAL "NEW") + cmake_policy(SET CMP0168 NEW) +else() + cmake_policy(SET CMP0168 OLD) +endif() include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FetchContent/DirOverrides.cmake b/Tests/RunCMake/FetchContent/DirOverrides.cmake index ad61a00..db407cf 100644 --- a/Tests/RunCMake/FetchContent/DirOverrides.cmake +++ b/Tests/RunCMake/FetchContent/DirOverrides.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) # Test using saved details diff --git a/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake b/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake index 768a82e..2e9d7ed 100644 --- a/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake +++ b/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) # Test using saved details. We are re-using a SOURCE_DIR from a previous test diff --git a/Tests/RunCMake/FetchContent/DirectIgnoresDetails.cmake b/Tests/RunCMake/FetchContent/DirectIgnoresDetails.cmake index 0731b43..1728d11 100644 --- a/Tests/RunCMake/FetchContent/DirectIgnoresDetails.cmake +++ b/Tests/RunCMake/FetchContent/DirectIgnoresDetails.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) FetchContent_Declare( diff --git a/Tests/RunCMake/FetchContent/DisableSourceChanges.cmake b/Tests/RunCMake/FetchContent/DisableSourceChanges.cmake new file mode 100644 index 0000000..a144005 --- /dev/null +++ b/Tests/RunCMake/FetchContent/DisableSourceChanges.cmake @@ -0,0 +1,18 @@ +cmake_policy(SET CMP0168 NEW) + +# Undocumented variable used to catch attempts to write to anywhere under the +# source directory that isn't under the build directory. In order for this +# code path to be checked for direct population mode, we need a non-empty +# download, update, or patch command so that the population code path is used. +# Custom commands might not write to the source directory and instead just +# print messages or other non-modifying tasks, like is done here. +set(CMAKE_DISABLE_SOURCE_CHANGES TRUE) + +include(FetchContent) + +FetchContent_Declare( + WithProject + SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/WithProject # This exists + DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Download command executed" +) +FetchContent_MakeAvailable(WithProject) diff --git a/Tests/RunCMake/FetchContent/DownloadFile.cmake b/Tests/RunCMake/FetchContent/DownloadFile.cmake index 741b6d3..b55daae 100644 --- a/Tests/RunCMake/FetchContent/DownloadFile.cmake +++ b/Tests/RunCMake/FetchContent/DownloadFile.cmake @@ -1,8 +1,14 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) +# The file hash depends on the line endings used by git +file(MD5 ${CMAKE_CURRENT_LIST_DIR}/dummyFile.txt md5_hash) + FetchContent_Declare( t1 URL ${CMAKE_CURRENT_LIST_DIR}/dummyFile.txt + URL_HASH MD5=${md5_hash} DOWNLOAD_NO_EXTRACT YES ) diff --git a/Tests/RunCMake/FetchContent/DownloadTwice-direct-result.txt b/Tests/RunCMake/FetchContent/DownloadTwice-direct-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FetchContent/DownloadTwice-direct-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FetchContent/DownloadTwice-direct-stderr.txt b/Tests/RunCMake/FetchContent/DownloadTwice-direct-stderr.txt new file mode 100644 index 0000000..e793902 --- /dev/null +++ b/Tests/RunCMake/FetchContent/DownloadTwice-direct-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at .*/Modules/FetchContent\.cmake:[0-9]+ \(message\): + Content t1 already populated in diff --git a/Tests/RunCMake/FetchContent/DownloadTwice.cmake b/Tests/RunCMake/FetchContent/DownloadTwice.cmake index 6863c30..2fa08c4 100644 --- a/Tests/RunCMake/FetchContent/DownloadTwice.cmake +++ b/Tests/RunCMake/FetchContent/DownloadTwice.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) FetchContent_Declare( diff --git a/Tests/RunCMake/FetchContent/FirstDetailsWin.cmake b/Tests/RunCMake/FetchContent/FirstDetailsWin.cmake index 208b12d..723d63e 100644 --- a/Tests/RunCMake/FetchContent/FirstDetailsWin.cmake +++ b/Tests/RunCMake/FetchContent/FirstDetailsWin.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) # Need to see the download command output diff --git a/Tests/RunCMake/FetchContent/GetProperties.cmake b/Tests/RunCMake/FetchContent/GetProperties.cmake index 61c99fe..a51d6ce 100644 --- a/Tests/RunCMake/FetchContent/GetProperties.cmake +++ b/Tests/RunCMake/FetchContent/GetProperties.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) # First confirm properties are empty even before declare diff --git a/Tests/RunCMake/FetchContent/MakeAvailableUndeclared-direct-result.txt b/Tests/RunCMake/FetchContent/MakeAvailableUndeclared-direct-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FetchContent/MakeAvailableUndeclared-direct-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FetchContent/MakeAvailableUndeclared-direct-stderr.txt b/Tests/RunCMake/FetchContent/MakeAvailableUndeclared-direct-stderr.txt new file mode 100644 index 0000000..9c3fc27 --- /dev/null +++ b/Tests/RunCMake/FetchContent/MakeAvailableUndeclared-direct-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at .*/Modules/FetchContent\.cmake:[0-9]+ \(message\): + No content details recorded for NoDetails diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-direct-result.txt b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-direct-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-direct-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-direct-stderr.txt b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-direct-stderr.txt new file mode 100644 index 0000000..7ecb06b --- /dev/null +++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing-direct-stderr.txt @@ -0,0 +1,2 @@ + *Manually specified source directory is missing: ++ *FETCHCONTENT_SOURCE_DIR_WITHPROJECT --> .*/ADirThatDoesNotExist diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing.cmake b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing.cmake index 0e24c1a..82e5c46 100644 --- a/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing.cmake +++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryMissing.cmake @@ -1,3 +1,4 @@ +message(STATUS "FETCHCONTENT_SOURCE_DIR_WITHPROJECT = ${FETCHCONTENT_SOURCE_DIR_WITHPROJECT}") include(FetchContent) FetchContent_Declare( diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative-direct-stderr.txt b/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative-direct-stderr.txt new file mode 100644 index 0000000..3defcb4 --- /dev/null +++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative-direct-stderr.txt @@ -0,0 +1,3 @@ + *Relative source directory specified. This is not safe, as it depends on + *the calling directory scope. ++ *FETCHCONTENT_SOURCE_DIR_WITHPROJECT --> WithProject diff --git a/Tests/RunCMake/FetchContent/MissingDetails.cmake b/Tests/RunCMake/FetchContent/MissingDetails.cmake index ba8d121..998f251 100644 --- a/Tests/RunCMake/FetchContent/MissingDetails.cmake +++ b/Tests/RunCMake/FetchContent/MissingDetails.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) FetchContent_Populate(t1) diff --git a/Tests/RunCMake/FetchContent/PreserveEmptyArgs.cmake b/Tests/RunCMake/FetchContent/PreserveEmptyArgs.cmake index 4f35448..6da6c42 100644 --- a/Tests/RunCMake/FetchContent/PreserveEmptyArgs.cmake +++ b/Tests/RunCMake/FetchContent/PreserveEmptyArgs.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) # Need to see the download command output diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake index 0f443a7..9eb40b9 100644 --- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake +++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake @@ -2,81 +2,116 @@ include(RunCMake) unset(RunCMake_TEST_NO_CLEAN) -run_cmake(MissingDetails) -run_cmake(DirectIgnoresDetails) -run_cmake(FirstDetailsWin) -run_cmake(DownloadTwice) -run_cmake(DownloadFile) -run_cmake(IgnoreToolchainFile) -run_cmake(SameGenerator) -run_cmake(System) -run_cmake(VarDefinitions) -run_cmake(VarPassthroughs) -run_cmake(GetProperties) -run_cmake(UsesTerminalOverride) -run_cmake(MakeAvailable) -run_cmake(MakeAvailableTwice) -run_cmake(MakeAvailableUndeclared) -run_cmake(VerifyHeaderSet) - -run_cmake_with_options(FindDependencyExport +function(run_cmake_with_cmp0168 name) + run_cmake_with_options("${name}" -D CMP0168=OLD ${ARGN}) + set(RunCMake_TEST_VARIANT_DESCRIPTION "-direct") + run_cmake_with_options("${name}" -D CMP0168=NEW ${ARGN}) +endfunction() + +# Won't get to the part where CMP0168 matters +run_cmake_with_options(MissingDetails -D CMP0168=NEW) + +# These are testing specific aspects of the sub-build +run_cmake_with_options(SameGenerator -D CMP0168=OLD) +run_cmake_with_options(VarPassthroughs -D CMP0168=OLD) + +run_cmake_with_cmp0168(DirectIgnoresDetails) +run_cmake_with_cmp0168(FirstDetailsWin) +block(SCOPE_FOR VARIABLES) + # Reuse this test to also verify that "cmake --fresh" re-executes the steps + # when using the direct mode + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/FirstDetailsWin-direct-build) + set(RunCMake_TEST_VARIANT_DESCRIPTION "-direct-fresh") + run_cmake_with_options(FirstDetailsWin -D CMP0168=NEW --fresh) +endblock() +run_cmake_with_cmp0168(DownloadTwice) +run_cmake_with_cmp0168(DownloadFile) +run_cmake_with_cmp0168(IgnoreToolchainFile) +run_cmake_with_cmp0168(System) +run_cmake_with_cmp0168(VarDefinitions) +run_cmake_with_cmp0168(GetProperties) +run_cmake_with_cmp0168(UsesTerminalOverride) +run_cmake_with_cmp0168(MakeAvailable) +run_cmake_with_cmp0168(MakeAvailableTwice) +run_cmake_with_cmp0168(MakeAvailableUndeclared) +run_cmake_with_cmp0168(VerifyHeaderSet) + +run_cmake_with_cmp0168(FindDependencyExport -D "CMAKE_PROJECT_TOP_LEVEL_INCLUDES=${CMAKE_CURRENT_LIST_DIR}/FindDependencyExportDP.cmake" ) -run_cmake_with_options(ManualSourceDirectory +run_cmake_with_cmp0168(ManualSourceDirectory -D "FETCHCONTENT_SOURCE_DIR_WITHPROJECT=${CMAKE_CURRENT_LIST_DIR}/WithProject" ) -run_cmake_with_options(ManualSourceDirectoryMissing +run_cmake_with_cmp0168(ManualSourceDirectoryMissing -D "FETCHCONTENT_SOURCE_DIR_WITHPROJECT=${CMAKE_CURRENT_LIST_DIR}/ADirThatDoesNotExist" ) # Need to use :STRING to prevent CMake from automatically converting it to an # absolute path -run_cmake_with_options(ManualSourceDirectoryRelative +run_cmake_with_cmp0168(ManualSourceDirectoryRelative -D "FETCHCONTENT_SOURCE_DIR_WITHPROJECT:STRING=WithProject" ) -function(run_FetchContent_DirOverrides) - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/DirOverrides-build) +function(run_FetchContent_DirOverrides cmp0168) + if(cmp0168 STREQUAL "NEW") + set(RunCMake_TEST_VARIANT_DESCRIPTION "-direct") + endif() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/DirOverrides${RunCMake_TEST_VARIANT_DESCRIPTION}-build) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") - run_cmake(DirOverrides) + run_cmake_with_options(DirOverrides -D CMP0168=${cmp0168}) set(RunCMake_TEST_NO_CLEAN 1) run_cmake_with_options(DirOverridesDisconnected + -D CMP0168=${cmp0168} -D FETCHCONTENT_FULLY_DISCONNECTED=YES ) endfunction() -run_FetchContent_DirOverrides() +run_FetchContent_DirOverrides(OLD) +run_FetchContent_DirOverrides(NEW) set(RunCMake_TEST_OUTPUT_MERGE 1) -run_cmake(PreserveEmptyArgs) +run_cmake_with_cmp0168(PreserveEmptyArgs) set(RunCMake_TEST_OUTPUT_MERGE 0) -# We need to pass through CMAKE_GENERATOR and CMAKE_MAKE_PROGRAM -# to ensure the test can run on machines where the build tool -# isn't on the PATH. Some build slaves explicitly test with such -# an arrangement (e.g. to test with spaces in the path). We also -# pass through the platform and toolset for completeness, even -# though we don't build anything, just in case this somehow affects -# the way the build tool is invoked. -run_cmake_command(ScriptMode - ${CMAKE_COMMAND} - -DCMAKE_GENERATOR=${RunCMake_GENERATOR} - -DCMAKE_GENERATOR_PLATFORM=${RunCMake_GENERATOR_PLATFORM} - -DCMAKE_GENERATOR_TOOLSET=${RunCMake_GENERATOR_TOOLSET} - -DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM} - -P ${CMAKE_CURRENT_LIST_DIR}/ScriptMode.cmake -) - function(run_FetchContent_ExcludeFromAll) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll-build) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") - run_cmake(ExcludeFromAll) + # We're testing FetchContent_MakeAvailable()'s add_subdirectory() behavior, + # so it doesn't matter if we use OLD or NEW for CMP0168, but NEW is faster. + run_cmake(ExcludeFromAll -D CMP0168=NEW) set(RunCMake_TEST_NO_CLEAN 1) run_cmake_command(ExcludeFromAll-build ${CMAKE_COMMAND} --build .) endfunction() run_FetchContent_ExcludeFromAll() + +# Script mode testing requires more care for CMP0168 set to OLD. +# We need to pass through CMAKE_GENERATOR and CMAKE_MAKE_PROGRAM +# to ensure the test can run on machines where the build tool +# isn't on the PATH. Some build machines explicitly test with such +# an arrangement (e.g. to test with spaces in the path). We also +# pass through the platform and toolset for completeness, even +# though we don't build anything, just in case this somehow affects +# the way the build tool is invoked. +run_cmake_command(ScriptMode + ${CMAKE_COMMAND} + -DCMP0168=OLD + -DCMAKE_GENERATOR=${RunCMake_GENERATOR} + -DCMAKE_GENERATOR_PLATFORM=${RunCMake_GENERATOR_PLATFORM} + -DCMAKE_GENERATOR_TOOLSET=${RunCMake_GENERATOR_TOOLSET} + -DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM} + -P ${CMAKE_CURRENT_LIST_DIR}/ScriptMode.cmake +) +# CMP0168 NEW doesn't need a build tool or generator, so don't set them. +run_cmake_command(ScriptMode-direct + ${CMAKE_COMMAND} + -DCMP0168=NEW + -P ${CMAKE_CURRENT_LIST_DIR}/ScriptMode.cmake +) + +run_cmake(DisableSourceChanges) diff --git a/Tests/RunCMake/FetchContent/SameGenerator.cmake b/Tests/RunCMake/FetchContent/SameGenerator.cmake index 58204ef..d4588a0 100644 --- a/Tests/RunCMake/FetchContent/SameGenerator.cmake +++ b/Tests/RunCMake/FetchContent/SameGenerator.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) FetchContent_Declare( diff --git a/Tests/RunCMake/FetchContent/ScriptMode.cmake b/Tests/RunCMake/FetchContent/ScriptMode.cmake index 0a93d62..41b624a 100644 --- a/Tests/RunCMake/FetchContent/ScriptMode.cmake +++ b/Tests/RunCMake/FetchContent/ScriptMode.cmake @@ -1,3 +1,6 @@ +cmake_minimum_required(VERSION 3.29) +cmake_policy(SET CMP0168 ${CMP0168}) + include(FetchContent) file(WRITE tmpFile.txt "Generated contents, not important") @@ -11,6 +14,11 @@ FetchContent_Populate( if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/t1-src/done1.txt) message(FATAL_ERROR "Default SOURCE_DIR doesn't contain done1.txt") endif() +if(CMP0168 STREQUAL "NEW" AND EXISTS ${CMAKE_CURRENT_BINARY_DIR}/t1-subbuild) + message(FATAL_ERROR "t1 sub-build used when expected direct population") +elseif(CMP0168 STREQUAL "OLD" AND NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/t1-subbuild) + message(FATAL_ERROR "t1 used direct population when a sub-build was expected") +endif() FetchContent_Populate( t2 @@ -22,6 +30,11 @@ FetchContent_Populate( if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/mysrc/done2.txt) message(FATAL_ERROR "Specified SOURCE_DIR doesn't contain done2.txt") endif() +if(CMP0168 STREQUAL "NEW" AND EXISTS ${CMAKE_CURRENT_BINARY_DIR}/t2-subbuild) + message(FATAL_ERROR "t2 sub-build used when expected direct population") +elseif(CMP0168 STREQUAL "OLD" AND NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/t2-subbuild) + message(FATAL_ERROR "t2 used direct population when a sub-build was expected") +endif() FetchContent_Populate( t3 @@ -33,3 +46,8 @@ FetchContent_Populate( if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/myrelsrc/done3.txt) message(FATAL_ERROR "Relative SOURCE_DIR doesn't contain done3.txt") endif() +if(CMP0168 STREQUAL "NEW" AND EXISTS ${CMAKE_CURRENT_BINARY_DIR}/t3-subbuild) + message(FATAL_ERROR "t3 sub-build used when expected direct population") +elseif(CMP0168 STREQUAL "OLD" AND NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/t3-subbuild) + message(FATAL_ERROR "t3 used direct population when a sub-build was expected") +endif() diff --git a/Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake b/Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake index 99d9719..14839b4 100644 --- a/Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake +++ b/Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) set(FETCHCONTENT_QUIET NO) diff --git a/Tests/RunCMake/FetchContent/VarDefinitions.cmake b/Tests/RunCMake/FetchContent/VarDefinitions.cmake index 4d2a929..0c304a2 100644 --- a/Tests/RunCMake/FetchContent/VarDefinitions.cmake +++ b/Tests/RunCMake/FetchContent/VarDefinitions.cmake @@ -3,6 +3,8 @@ unset(FETCHCONTENT_UPDATES_DISCONNECTED CACHE) unset(FETCHCONTENT_QUIET CACHE) unset(FETCHCONTENT_BASE_DIR CACHE) +cmake_policy(SET CMP0169 OLD) + include(FetchContent) # Each of the cache entries should be defined and have the diff --git a/Tests/RunCMake/FetchContent/VarPassthroughs.cmake b/Tests/RunCMake/FetchContent/VarPassthroughs.cmake index ad743d8..284f5b8 100644 --- a/Tests/RunCMake/FetchContent/VarPassthroughs.cmake +++ b/Tests/RunCMake/FetchContent/VarPassthroughs.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) set(CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY AAAA) @@ -5,6 +7,7 @@ set(CMAKE_TLS_VERIFY BBBB) set(CMAKE_TLS_CAINFO CCCC) set(CMAKE_NETRC DDDD) set(CMAKE_NETRC_FILE EEEE) +set(CMAKE_TLS_VERSION FFFF) FetchContent_Declare(PassThrough DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Download command executed" @@ -21,6 +24,10 @@ if(NOT contents MATCHES "CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY \\[==\\[AAAA\\]==\\ message(FATAL_ERROR "Missing CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY") endif() +if(NOT contents MATCHES "CMAKE_TLS_VERSION \\[==\\[FFFF\\]==\\]") + message(FATAL_ERROR "Missing CMAKE_TLS_VERSION") +endif() + if(NOT contents MATCHES "CMAKE_TLS_VERIFY \\[==\\[BBBB\\]==\\]") message(FATAL_ERROR "Missing CMAKE_TLS_VERIFY") endif() diff --git a/Tests/RunCMake/FetchContent_find_package/MissingDetails.cmake b/Tests/RunCMake/FetchContent_find_package/MissingDetails.cmake index ba8d121..998f251 100644 --- a/Tests/RunCMake/FetchContent_find_package/MissingDetails.cmake +++ b/Tests/RunCMake/FetchContent_find_package/MissingDetails.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) FetchContent_Populate(t1) diff --git a/Tests/RunCMake/FetchContent_find_package/PreserveEmptyArgs.cmake b/Tests/RunCMake/FetchContent_find_package/PreserveEmptyArgs.cmake index 4f35448..6da6c42 100644 --- a/Tests/RunCMake/FetchContent_find_package/PreserveEmptyArgs.cmake +++ b/Tests/RunCMake/FetchContent_find_package/PreserveEmptyArgs.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0169 OLD) + include(FetchContent) # Need to see the download command output diff --git a/Tests/RunCMake/FileAPI/cmakeFiles-v1-check.py b/Tests/RunCMake/FileAPI/cmakeFiles-v1-check.py index 49dfe87..9410c7e 100644 --- a/Tests/RunCMake/FileAPI/cmakeFiles-v1-check.py +++ b/Tests/RunCMake/FileAPI/cmakeFiles-v1-check.py @@ -3,7 +3,7 @@ from check_index import * def check_objects(o): assert is_list(o) assert len(o) == 1 - check_index_object(o[0], "cmakeFiles", 1, 0, check_object_cmakeFiles) + check_index_object(o[0], "cmakeFiles", 1, 1, check_object_cmakeFiles) def check_input(actual, expected): assert is_dict(actual) @@ -23,8 +23,27 @@ def check_input(actual, expected): assert sorted(actual.keys()) == sorted(expected_keys) +def check_glob_dependent(actual, expected): + assert is_dict(actual) + + if "followSymlinks" in expected: + assert is_bool(actual["followSymlinks"], expected["followSymlinks"]) + + if "listDirectories" in expected: + assert is_bool(actual["listDirectories"], expected["listDirectories"]) + + if "recurse" in expected: + assert is_bool(actual["recurse"], expected["recurse"]) + + if "relative" in expected: + assert matches(actual["relative"], expected["relative"]) + + check_list_match(lambda a, e: matches(a, e), actual["paths"], expected["paths"], allow_extra=True) + + assert sorted(actual.keys()) == sorted(expected.keys()) + def check_object_cmakeFiles(o): - assert sorted(o.keys()) == ["inputs", "kind", "paths", "version"] + assert sorted(o.keys()) == ["globsDependent", "inputs", "kind", "paths", "version"] # The "kind" and "version" members are handled by check_index_object. assert is_dict(o["paths"]) assert sorted(o["paths"].keys()) == ["build", "source"] @@ -82,12 +101,33 @@ def check_object_cmakeFiles(o): }, ] + expected_globs = [ + { + "expression": "^.*/Tests/RunCMake/FileAPI/dir/\\*$", + "paths": [ + "^.*/Tests/RunCMake/FileAPI/dir/dir$", + "^.*/Tests/RunCMake/FileAPI/dir/dirtest\\.cmake$" + ], + "listDirectories": True, + }, + { + "expression": "^.*/Tests/RunCMake/FileAPI/dir/\\*\\.cmake$", + "paths": [ + "^dir/dirtest\\.cmake$" + ], + "followSymlinks": True, + "recurse": True, + "relative": "^.*/Tests/RunCMake/FileAPI$" + } + ] + inSource = os.path.dirname(o["paths"]["build"]) == o["paths"]["source"] if inSource: for e in expected: e["path"] = e["path"].replace("^.*/Tests/RunCMake/FileAPI/", "^", 1) check_list_match(lambda a, e: matches(a["path"], e["path"]), o["inputs"], expected, check=check_input, allow_extra=True) + check_list_match(lambda a, e: matches(a["expression"], e["expression"]), o["globsDependent"], expected_globs, check=check_glob_dependent, allow_extra=True) assert is_dict(index) assert sorted(index.keys()) == ["cmake", "objects", "reply"] diff --git a/Tests/RunCMake/FileAPI/cmakeFiles-v1.cmake b/Tests/RunCMake/FileAPI/cmakeFiles-v1.cmake index 4d4d757..b98a283 100644 --- a/Tests/RunCMake/FileAPI/cmakeFiles-v1.cmake +++ b/Tests/RunCMake/FileAPI/cmakeFiles-v1.cmake @@ -5,4 +5,14 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/generated.cmake" "") include("${CMAKE_CURRENT_BINARY_DIR}/generated.cmake") include("${CMAKE_CURRENT_LIST_DIR}/../FileAPIDummyFile.cmake") +file(GLOB var + CONFIGURE_DEPENDS + "${CMAKE_CURRENT_SOURCE_DIR}/dir/*") + +file(GLOB_RECURSE var + FOLLOW_SYMLINKS + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + CONFIGURE_DEPENDS + "${CMAKE_CURRENT_SOURCE_DIR}/dir/*.cmake") + add_subdirectory(dir) diff --git a/Tests/RunCMake/FindBoost/CMakeLists.txt b/Tests/RunCMake/FindBoost/CMakeLists.txt index d3137f6..fe9e3ef 100644 --- a/Tests/RunCMake/FindBoost/CMakeLists.txt +++ b/Tests/RunCMake/FindBoost/CMakeLists.txt @@ -1,3 +1,4 @@ cmake_minimum_required(VERSION 3.9) +cmake_policy(SET CMP0167 OLD) # This test covers FindBoost project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE-stdout.txt b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE-stdout.txt index 5f211eb..670bdda 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE-stdout.txt +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE-stdout.txt @@ -1 +1,2 @@ --- g_ir_scanner: .*/g-ir-scanner +-- g_ir_scanner: [^ +]*g-ir-scanner diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE_MULTIPLE_VALUES.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE_MULTIPLE_VALUES.cmake new file mode 100644 index 0000000..19ee908 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_VARIABLE_MULTIPLE_VALUES.cmake @@ -0,0 +1,31 @@ +# Prepare environment and variables +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) +if(WIN32) + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}\\pc-bletch") +else() + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bletch") +endif() + +find_package(PkgConfig REQUIRED) +pkg_check_modules(BLETCH QUIET bletch) + +if (NOT BLETCH_FOUND) + message(FATAL_ERROR "Failed to find embedded package bletch via CMAKE_PREFIX_PATH") +endif () + +set(expected_value "item1;item2;item3;item with spaces") +pkg_get_variable(bletchvar1 bletch multiple_values1) +pkg_get_variable(bletchvar2 bletch multiple_values2) + +string(FIND "${bletchvar1}" ";" IS_VARIABLE_A_LIST1) +string(FIND "${bletchvar2}" ";" IS_VARIABLE_A_LIST2) + +if (IS_VARIABLE_A_LIST1 EQUAL -1 OR IS_VARIABLE_A_LIST2 EQUAL -1) + message(FATAL_ERROR "Failed to fetch variable multiple_values from embedded package bletch as a list") +endif() + +if (NOT (bletchvar1 STREQUAL expected_value AND bletchvar2 STREQUAL expected_value)) + message(NOTICE "multiple_values1=${bletchvar1} and expected_value=${expected_value}") + message(NOTICE "multiple_values2=${bletchvar2} and expected_value=${expected_value}") + message(FATAL_ERROR "Failed to fetch variable multiple_values from embedded package bletch with escaped spaces") +endif() diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake index 7af425a..3466636 100644 --- a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake @@ -54,6 +54,7 @@ Libs: -L\${libdir} run_cmake(FindPkgConfig_GET_VARIABLE_DEFINE_VARIABLES) run_cmake(FindPkgConfig_GET_VARIABLE_PREFIX_PATH) run_cmake(FindPkgConfig_GET_VARIABLE_PKGCONFIG_PATH) + run_cmake(FindPkgConfig_GET_VARIABLE_MULTIPLE_VALUES) run_cmake(FindPkgConfig_cache_variables) run_cmake(FindPkgConfig_IMPORTED_TARGET) run_cmake(FindPkgConfig_VERSION_OPERATORS) diff --git a/Tests/RunCMake/FindPkgConfig/pc-bletch/lib/pkgconfig/bletch.pc b/Tests/RunCMake/FindPkgConfig/pc-bletch/lib/pkgconfig/bletch.pc index 04d2c1b..87c3613 100644 --- a/Tests/RunCMake/FindPkgConfig/pc-bletch/lib/pkgconfig/bletch.pc +++ b/Tests/RunCMake/FindPkgConfig/pc-bletch/lib/pkgconfig/bletch.pc @@ -4,9 +4,11 @@ libdir=${exec_prefix}/lib includedir=${prefix}/include jackpot=bletch-lives +multiple_values1="item1 item2 item3 item\ with\ spaces" +multiple_values2='item1 item2 item3 item\ with\ spaces' Name: Bletch -Description: Dummy packaget to test variable support +Description: Dummy package to test variable support Version: 1.0 Libs: -L${libdir} -lbletch Cflags: -Dbletch_version=1 diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake index 2ad45ba..fdad38d 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake @@ -35,3 +35,13 @@ run_cmake(override-features2) run_cmake(override-features3) run_cmake(override-features4) run_cmake(override-features5) + +# testing feature attributes specification +run_cmake(bad-feature-attributes1) +run_cmake(bad-feature-attributes2) +run_cmake(bad-feature-attributes3) +run_cmake(bad-feature-attributes4) +run_cmake(bad-feature-attributes5) +run_cmake(unsupported-library_type) +run_cmake(cyclic-override) +run_cmake(multiple-override) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-stderr.txt new file mode 100644 index 0000000..5923654 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1-stderr.txt @@ -0,0 +1,4 @@ +CMake Error: + Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES': + + BAD_ATTRIBUTE=XXX diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1.cmake new file mode 100644 index 0000000..dc743a8 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes1.cmake @@ -0,0 +1,10 @@ +enable_language(C) + +set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES BAD_ATTRIBUTE=XXX) + +add_library(dep SHARED empty.c) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature,dep>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-stderr.txt new file mode 100644 index 0000000..5923654 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2-stderr.txt @@ -0,0 +1,4 @@ +CMake Error: + Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES': + + BAD_ATTRIBUTE=XXX diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2.cmake new file mode 100644 index 0000000..3012308 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes2.cmake @@ -0,0 +1,10 @@ +enable_language(C) + +set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES LIBRARY_TYPE=STATIC BAD_ATTRIBUTE=XXX DEDUPLICATION=YES) + +add_library(dep SHARED empty.c) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature,dep>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-stderr.txt new file mode 100644 index 0000000..a0b0a75 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3-stderr.txt @@ -0,0 +1,4 @@ +CMake Error: + Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES': + + LIBRARY_TYPE=STATIC,BAD_TYPE diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3.cmake new file mode 100644 index 0000000..8887934 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes3.cmake @@ -0,0 +1,10 @@ +enable_language(C) + +set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES LIBRARY_TYPE=STATIC,BAD_TYPE) + +add_library(dep SHARED empty.c) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature,dep>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-stderr.txt new file mode 100644 index 0000000..a0b0a75 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4-stderr.txt @@ -0,0 +1,4 @@ +CMake Error: + Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES': + + LIBRARY_TYPE=STATIC,BAD_TYPE diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4.cmake new file mode 100644 index 0000000..3edf268 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes4.cmake @@ -0,0 +1,10 @@ +enable_language(C) + +set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES DEDUPLICATION=YES LIBRARY_TYPE=STATIC,BAD_TYPE) + +add_library(dep SHARED empty.c) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature,dep>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-stderr.txt new file mode 100644 index 0000000..34c1143 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5-stderr.txt @@ -0,0 +1,4 @@ +CMake Error: + Erroneous option\(s\) for 'CMAKE_LINK_LIBRARY_feature_ATTRIBUTES': + + DEDUPLICATION=YES,NO diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5.cmake new file mode 100644 index 0000000..5af99cd --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/bad-feature-attributes5.cmake @@ -0,0 +1,10 @@ +enable_language(C) + +set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES DEDUPLICATION=YES,NO) + +add_library(dep SHARED empty.c) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature,dep>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-result.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-stderr.txt new file mode 100644 index 0000000..4476271 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at cyclic-override.cmake:[0-9]+ \(add_library\): + Impossible to link target 'lib' because the link item 'dep' is specified + with the features 'feature2' and 'feature1', and both have an 'OVERRIDE' + attribute that overrides the other. Such cycles are not allowed. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override.cmake new file mode 100644 index 0000000..69b670b --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/cyclic-override.cmake @@ -0,0 +1,14 @@ +enable_language(C) + +set(CMAKE_LINK_LIBRARY_USING_feature1 "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature1_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature1_ATTRIBUTES OVERRIDE=feature2) + +set(CMAKE_LINK_LIBRARY_USING_feature2 "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature2_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature2_ATTRIBUTES OVERRIDE=feature1) + +add_library(dep SHARED empty.c) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature1,dep>" "$<LINK_LIBRARY:feature2,dep>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored-stderr.txt index f9a99af..8f43a7f 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored-stderr.txt +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored-stderr.txt @@ -1,6 +1,6 @@ CMake Warning \(dev\) at library-ignored.cmake:[0-9]+ \(add_library\): The feature 'feat', specified as part of a generator-expression - '\$<LINK_LIBRARY:feat>', will not be applied to the INTERFACE library + '\$<LINK_LIBRARY:feat>', will not be applied to the INTERFACE_LIBRARY 'front'. Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) @@ -8,7 +8,14 @@ This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning \(dev\) at library-ignored.cmake:[0-9]+ \(add_library\): The feature 'feat', specified as part of a generator-expression - '\$<LINK_LIBRARY:feat>', will not be applied to the OBJECT library 'dep'. + '\$<LINK_LIBRARY:feat>', will not be applied to the OBJECT_LIBRARY 'dep'. +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 library-ignored.cmake:[0-9]+ \(add_library\): + The feature 'feat', specified as part of a generator-expression + '\$<LINK_LIBRARY:feat>', will not be applied to the SHARED_LIBRARY 'lib'. 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/GenEx-LINK_LIBRARY/library-ignored.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake index a888bb8..b5e52b5 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/library-ignored.cmake @@ -2,13 +2,14 @@ enable_language(C) set(CMAKE_C_LINK_LIBRARY_USING_feat_SUPPORTED TRUE) set(CMAKE_C_LINK_LIBRARY_USING_feat "<LIBRARY>") +set(CMAKE_C_LINK_LIBRARY_feat_ATTRIBUTES "LIBRARY_TYPE=STATIC") add_library(dep OBJECT empty.c) add_library(lib SHARED empty.c) add_library(front INTERFACE) -target_link_libraries(front INTERFACE lib) +target_link_libraries(front INTERFACE "$<LINK_LIBRARY:feat,lib>") add_library(lib2 SHARED empty.c) diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/multiple-override.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/multiple-override.cmake new file mode 100644 index 0000000..97d85d0 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/multiple-override.cmake @@ -0,0 +1,14 @@ +enable_language(C) + +set(CMAKE_LINK_LIBRARY_USING_feature1 "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature1_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature1_ATTRIBUTES OVERRIDE=feature2) + +set(CMAKE_LINK_LIBRARY_USING_feature2 "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature2_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature2_ATTRIBUTES OVERRIDE=feature3) + +add_library(dep SHARED empty.c) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature1,dep>" "$<LINK_LIBRARY:feature2,dep>") diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type-stderr.txt b/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type-stderr.txt new file mode 100644 index 0000000..a95648b --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type-stderr.txt @@ -0,0 +1,6 @@ +CMake Warning \(dev\) at unsupported-library_type.cmake:[0-9]+ \(add_library\): + The feature 'feature', specified as part of a generator-expression + '\$<LINK_LIBRARY:feature>', will not be applied to the SHARED_LIBRARY 'dep'. +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/GenEx-LINK_LIBRARY/unsupported-library_type.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type.cmake new file mode 100644 index 0000000..29aba56 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/unsupported-library_type.cmake @@ -0,0 +1,10 @@ +enable_language(C) + +set(CMAKE_LINK_LIBRARY_USING_feature "<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_feature_SUPPORTED TRUE) +set(CMAKE_LINK_LIBRARY_feature_ATTRIBUTES LIBRARY_TYPE=STATIC) + +add_library(dep SHARED empty.c) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:feature,dep>") diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt index 32d92d8..5791993 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt @@ -1,6 +1,6 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.17) if(RunCMake_TEST STREQUAL "LOCATION") cmake_minimum_required(VERSION 2.8.12) # Leave CMP0026 unset. endif() project(${RunCMake_TEST} NONE) -include(${RunCMake_TEST}.cmake) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/RunCMakeTest.cmake index b613ad1..c278831 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/RunCMakeTest.cmake @@ -13,6 +13,10 @@ run_cmake(LinkImplementationCycle5) run_cmake(LinkImplementationCycle6) run_cmake(LOCATION) run_cmake(SOURCES) +run_cmake(TransitiveBuild) +run_cmake(TransitiveLink-CMP0166-OLD) +run_cmake(TransitiveLink-CMP0166-NEW) +run_cmake(Unset) block() run_cmake(Scope) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveBuild-check.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveBuild-check.cmake new file mode 100644 index 0000000..65adfaf --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveBuild-check.cmake @@ -0,0 +1,25 @@ +set(expect [[ +# file\(GENERATE\) produced: +main INCLUDE_DIRECTORIES: '[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/dirM;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/dir1' +main SYSTEM_INCLUDE_DIRECTORIES: '[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/sys1' +main COMPILE_DEFINITIONS: 'DEFM;DEF1' +main COMPILE_FEATURES: 'cxx_std_20;cxx_std_11' +main COMPILE_OPTIONS: '-optM;-opt1' +main PRECOMPILE_HEADERS: '[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty.h;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty1.h' +main SOURCES: 'main.c;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty1.c' +main AUTOMOC_MACRO_NAMES: 'MOCM;MOC1' +main AUTOUIC_OPTIONS: '-uicM;-uic1' +]]) + +string(REGEX REPLACE "\r\n" "\n" expect "${expect}") +string(REGEX REPLACE "\n+$" "" expect "${expect}") + +file(READ "${RunCMake_TEST_BINARY_DIR}/out.txt" actual) +string(REGEX REPLACE "\r\n" "\n" actual "${actual}") +string(REGEX REPLACE "\n+$" "" actual "${actual}") + +if(NOT actual MATCHES "^${expect}$") + string(REPLACE "\n" "\n expect> " expect " expect> ${expect}") + string(REPLACE "\n" "\n actual> " actual " actual> ${actual}") + message(FATAL_ERROR "Expected file(GENERATE) output:\n${expect}\ndoes not match actual output:\n${actual}") +endif() diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveBuild.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveBuild.cmake new file mode 100644 index 0000000..8f8eb96 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveBuild.cmake @@ -0,0 +1,66 @@ +enable_language(C) +set(CMAKE_PCH_EXTENSION "") # suppress cmake_pch from SOURCES + +add_library(foo1 STATIC empty.c) +target_link_libraries(foo1 PRIVATE foo2 foo3) +target_include_directories(foo1 INTERFACE dir1) +target_compile_definitions(foo1 INTERFACE DEF1) +target_compile_features(foo1 INTERFACE cxx_std_11) +target_compile_options(foo1 INTERFACE -opt1) +target_precompile_headers(foo1 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/empty1.h") +target_sources(foo1 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/empty1.c") +set_target_properties(foo1 PROPERTIES + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/sys1" + INTERFACE_AUTOMOC_MACRO_NAMES "MOC1" + INTERFACE_AUTOUIC_OPTIONS "-uic1" + ) + +add_library(foo2 STATIC empty.c) +target_include_directories(foo2 INTERFACE dir2) +target_compile_definitions(foo2 INTERFACE DEF2) +target_compile_features(foo2 INTERFACE cxx_std_14) +target_compile_options(foo2 INTERFACE -opt2) +target_precompile_headers(foo2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/empty2.h") +target_sources(foo2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/empty2.c") +set_target_properties(foo2 PROPERTIES + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/sys2" + INTERFACE_AUTOMOC_MACRO_NAMES "MOC2" + INTERFACE_AUTOUIC_OPTIONS "-uic2" + ) + +add_library(foo3 STATIC empty.c) +target_include_directories(foo3 PRIVATE dir3) +target_compile_definitions(foo3 PRIVATE DEF3) +target_compile_features(foo3 PRIVATE cxx_std_17) +target_compile_options(foo3 PRIVATE -opt3) +target_precompile_headers(foo3 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/empty3.h") +target_sources(foo3 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/empty3.c") +set_target_properties(foo3 PROPERTIES + SYSTEM_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/sys3" + AUTOMOC_MACRO_NAMES "MOC3" + AUTOUIC_OPTIONS "-uic3" + ) + +add_executable(main main.c) +target_link_libraries(main PRIVATE foo1) +target_include_directories(main PRIVATE dirM) +target_compile_definitions(main PRIVATE DEFM) +target_compile_features(main PRIVATE cxx_std_20) +target_compile_options(main PRIVATE -optM) +target_precompile_headers(main PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/empty.h") +set_target_properties(main PROPERTIES + AUTOMOC_MACRO_NAMES "MOCM" + AUTOUIC_OPTIONS "-uicM" + ) + +file(GENERATE OUTPUT out.txt CONTENT "# file(GENERATE) produced: +main INCLUDE_DIRECTORIES: '$<TARGET_PROPERTY:main,INCLUDE_DIRECTORIES>' +main SYSTEM_INCLUDE_DIRECTORIES: '$<TARGET_PROPERTY:main,SYSTEM_INCLUDE_DIRECTORIES>' +main COMPILE_DEFINITIONS: '$<TARGET_PROPERTY:main,COMPILE_DEFINITIONS>' +main COMPILE_FEATURES: '$<TARGET_PROPERTY:main,COMPILE_FEATURES>' +main COMPILE_OPTIONS: '$<TARGET_PROPERTY:main,COMPILE_OPTIONS>' +main PRECOMPILE_HEADERS: '$<TARGET_PROPERTY:main,PRECOMPILE_HEADERS>' +main SOURCES: '$<TARGET_PROPERTY:main,SOURCES>' +main AUTOMOC_MACRO_NAMES: '$<TARGET_PROPERTY:main,AUTOMOC_MACRO_NAMES>' +main AUTOUIC_OPTIONS: '$<TARGET_PROPERTY:main,AUTOUIC_OPTIONS>' +") diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW-check.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW-check.cmake new file mode 100644 index 0000000..7ea95b8 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW-check.cmake @@ -0,0 +1,8 @@ +set(expect [[ +# file\(GENERATE\) produced: +main LINK_LIBRARIES: 'foo1' # not transitive +main LINK_DIRECTORIES: '[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/dirM;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/dir1;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/dir2' +main LINK_OPTIONS: '-optM;-opt1;-opt2' +main LINK_DEPENDS: '[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW-build/depM;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW-build/dep1;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW-build/dep2' +]]) +include(${CMAKE_CURRENT_LIST_DIR}/TransitiveLink-check-common.cmake) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW.cmake new file mode 100644 index 0000000..658dd84 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0166 NEW) +include(TransitiveLink-common.cmake) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-OLD-check.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-OLD-check.cmake new file mode 100644 index 0000000..2d430c2 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-OLD-check.cmake @@ -0,0 +1,8 @@ +set(expect [[ +# file\(GENERATE\) produced: +main LINK_LIBRARIES: 'foo1' # not transitive +main LINK_DIRECTORIES: '[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/dirM;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/dir1' +main LINK_OPTIONS: '-optM;-opt1' +main LINK_DEPENDS: '[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-OLD-build/depM;[^';]*/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-OLD-build/dep1' +]]) +include(${CMAKE_CURRENT_LIST_DIR}/TransitiveLink-check-common.cmake) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-OLD.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-OLD.cmake new file mode 100644 index 0000000..a4a4599 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-CMP0166-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0166 OLD) +include(TransitiveLink-common.cmake) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-check-common.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-check-common.cmake new file mode 100644 index 0000000..42e63bc --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-check-common.cmake @@ -0,0 +1,12 @@ +string(REGEX REPLACE "\r\n" "\n" expect "${expect}") +string(REGEX REPLACE "\n+$" "" expect "${expect}") + +file(READ "${RunCMake_TEST_BINARY_DIR}/out.txt" actual) +string(REGEX REPLACE "\r\n" "\n" actual "${actual}") +string(REGEX REPLACE "\n+$" "" actual "${actual}") + +if(NOT actual MATCHES "^${expect}$") + string(REPLACE "\n" "\n expect> " expect " expect> ${expect}") + string(REPLACE "\n" "\n actual> " actual " actual> ${actual}") + message(FATAL_ERROR "Expected file(GENERATE) output:\n${expect}\ndoes not match actual output:\n${actual}") +endif() diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-common.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-common.cmake new file mode 100644 index 0000000..c120366 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/TransitiveLink-common.cmake @@ -0,0 +1,42 @@ +enable_language(C) + +add_library(foo1 STATIC empty.c) +target_link_libraries(foo1 PRIVATE foo2 foo3) +target_link_directories(foo1 INTERFACE dir1) +target_link_options(foo1 INTERFACE -opt1) +set_target_properties(foo1 PROPERTIES + INTERFACE_LINK_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/dep1" + ) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dep1" "") + +add_library(foo2 STATIC empty.c) +target_link_directories(foo2 INTERFACE dir2) +target_link_options(foo2 INTERFACE -opt2) +set_target_properties(foo2 PROPERTIES + INTERFACE_LINK_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/dep2" + ) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dep2" "") + +add_library(foo3 STATIC empty.c) +target_link_directories(foo3 PRIVATE dir3) +target_link_options(foo3 PRIVATE -opt3) +set_target_properties(foo3 PROPERTIES + LINK_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/dep3" + ) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dep3" "") + +add_executable(main main.c) +target_link_libraries(main PRIVATE foo1) +target_link_directories(main PRIVATE dirM) +target_link_options(main PRIVATE -optM) +set_target_properties(main PROPERTIES + LINK_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/depM" + ) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/depM" "") + +file(GENERATE OUTPUT out.txt CONTENT "# file(GENERATE) produced: +main LINK_LIBRARIES: '$<TARGET_PROPERTY:main,LINK_LIBRARIES>' # not transitive +main LINK_DIRECTORIES: '$<TARGET_PROPERTY:main,LINK_DIRECTORIES>' +main LINK_OPTIONS: '$<TARGET_PROPERTY:main,LINK_OPTIONS>' +main LINK_DEPENDS: '$<TARGET_PROPERTY:main,LINK_DEPENDS>' +") diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/Unset-check.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/Unset-check.cmake new file mode 100644 index 0000000..59910f1 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/Unset-check.cmake @@ -0,0 +1,4 @@ +file(READ ${RunCMake_TEST_BINARY_DIR}/out.txt out) +if(NOT out STREQUAL "'' ''") + set(RunCMake_TEST_FAILED "PROPERTY_THAT_IS_NOT_SET did not evaluate as empty:\n ${out}") +endif() diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/Unset.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/Unset.cmake new file mode 100644 index 0000000..dfe24a2 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/Unset.cmake @@ -0,0 +1,3 @@ +add_library(iface INTERFACE) +file(GENERATE OUTPUT out.txt CONTENT + "'$<TARGET_PROPERTY:iface,PROPERTY_THAT_IS_NOT_SET>' '$<TARGET_PROPERTY:PROPERTY_THAT_IS_NOT_SET>'" TARGET iface) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty.h b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty.h diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty1.c b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty1.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty1.c diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty1.h b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty1.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty1.h diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty2.h b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty2.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty2.h diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty3.h b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty3.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty3.h diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/main.c b/Tests/RunCMake/GenEx-TARGET_PROPERTY/main.c new file mode 100644 index 0000000..8488f4e --- /dev/null +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/main.c @@ -0,0 +1,4 @@ +int main(void) +{ + return 0; +} diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libshared_export.h index dac4fda..e0e423d 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libshared_export.h @@ -33,6 +33,7 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSHARED_NO_DEPRECATED # define LIBSHARED_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libstatic_export.h index b6e2a4a..cfc1187 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Cygwin/libstatic_export.h @@ -33,6 +33,7 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSTATIC_NO_DEPRECATED # define LIBSTATIC_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h index 0b1dcba..e2c132d 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h @@ -33,6 +33,7 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSHARED_NO_DEPRECATED # define LIBSHARED_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h index 5e3ac9f..b54eef5 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h @@ -33,6 +33,7 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSTATIC_NO_DEPRECATED # define LIBSTATIC_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h index 3ba2d2e..6013dcd 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h @@ -33,6 +33,7 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSHARED_NO_DEPRECATED # define LIBSHARED_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h index 3c7e093..7a5a573 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h @@ -33,6 +33,7 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSTATIC_NO_DEPRECATED # define LIBSTATIC_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h index 11f8042..388dbc9 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h @@ -33,6 +33,7 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSHARED_NO_DEPRECATED # define LIBSHARED_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h index b6e2a4a..cfc1187 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h @@ -33,6 +33,7 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSTATIC_NO_DEPRECATED # define LIBSTATIC_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h index 1481acd..97b988d 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h @@ -33,6 +33,7 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSHARED_NO_DEPRECATED # define LIBSHARED_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h index b6e2a4a..cfc1187 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h @@ -33,6 +33,7 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSTATIC_NO_DEPRECATED # define LIBSTATIC_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h index 3ba2d2e..6013dcd 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h @@ -33,6 +33,7 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSHARED_NO_DEPRECATED # define LIBSHARED_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h index 3c7e093..7a5a573 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h @@ -33,6 +33,7 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSTATIC_NO_DEPRECATED # define LIBSTATIC_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h index 3ba2d2e..6013dcd 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h @@ -33,6 +33,7 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSHARED_NO_DEPRECATED # define LIBSHARED_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h index 3c7e093..7a5a573 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h @@ -33,6 +33,7 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSTATIC_NO_DEPRECATED # define LIBSTATIC_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h index bf9163e..e64c45f 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h @@ -33,6 +33,7 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSHARED_NO_DEPRECATED # define LIBSHARED_NO_DEPRECATED diff --git a/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h index 5e3ac9f..b54eef5 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h @@ -33,6 +33,7 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef LIBSTATIC_NO_DEPRECATED # define LIBSTATIC_NO_DEPRECATED diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT-stderr.txt new file mode 100644 index 0000000..4cf5945 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT.cmake:1 \(add_custom_command\): + Error evaluating generator expression: + + \$<CXX_COMPILER_FRONTEND_VARIANT> + + \$<CXX_COMPILER_FRONTEND_VARIANT> may only be used with binary targets. It + may not be used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT.cmake new file mode 100644 index 0000000..08ce956 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT.cmake @@ -0,0 +1,4 @@ +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<CXX_COMPILER_FRONTEND_VARIANT>.cpp" +) +add_custom_target(drive DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT-stderr.txt new file mode 100644 index 0000000..c7e43a3 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget-C_COMPILER_FRONTEND_VARIANT.cmake:1 \(add_custom_command\): + Error evaluating generator expression: + + \$<C_COMPILER_FRONTEND_VARIANT> + + \$<C_COMPILER_FRONTEND_VARIANT> may only be used with binary targets. It + may not be used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT.cmake new file mode 100644 index 0000000..c90f960 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_FRONTEND_VARIANT.cmake @@ -0,0 +1,4 @@ +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<C_COMPILER_FRONTEND_VARIANT>.cpp" +) +add_custom_target(drive DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT-stderr.txt new file mode 100644 index 0000000..8641de9 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT.cmake:1 \(add_custom_command\): + Error evaluating generator expression: + + \$<Fortran_COMPILER_FRONTEND_VARIANT> + + \$<Fortran_COMPILER_FRONTEND_VARIANT> may only be used with binary targets. + It may not be used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT.cmake new file mode 100644 index 0000000..4312af4 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT.cmake @@ -0,0 +1,4 @@ +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<Fortran_COMPILER_FRONTEND_VARIANT>.cpp" +) +add_custom_target(drive DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 2a0c893..8ba70aa 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -20,6 +20,9 @@ run_cmake(NonValidTarget-Fortran_COMPILER_ID) run_cmake(NonValidTarget-C_COMPILER_VERSION) run_cmake(NonValidTarget-CXX_COMPILER_VERSION) run_cmake(NonValidTarget-Fortran_COMPILER_VERSION) +run_cmake(NonValidTarget-C_COMPILER_FRONTEND_VARIANT) +run_cmake(NonValidTarget-CXX_COMPILER_FRONTEND_VARIANT) +run_cmake(NonValidTarget-Fortran_COMPILER_FRONTEND_VARIANT) run_cmake(NonValidTarget-TARGET_PROPERTY) run_cmake(NonValidTarget-TARGET_POLICY) run_cmake(COMPILE_ONLY-not-compiling) diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake index d8965f7..b1c758a 100644 --- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake @@ -3,7 +3,7 @@ include(RunCMake) set(RunCMake_GENERATOR_PLATFORM "") run_cmake(NoPlatform) -if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124567])( 20[0-9][0-9])?$") +if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio [0-9]+( 20[0-9][0-9])?$") set(RunCMake_GENERATOR_PLATFORM "x64") run_cmake(x64Platform) else() @@ -17,7 +17,7 @@ set(RunCMake_TEST_OPTIONS -A "Test Platform" -A "Extra Platform") run_cmake(TwoPlatforms) unset(RunCMake_TEST_OPTIONS) -if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124567])( 20[0-9][0-9])?$") +if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio [0-9]+( 20[0-9][0-9])?$") set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestPlatform-toolchain.cmake) run_cmake(TestPlatformToolchain) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake index 6e064a7..08cc274 100644 --- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake +++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake @@ -134,7 +134,7 @@ function(run_GoogleTestLauncher DISCOVERY_MODE) ${CMAKE_CTEST_COMMAND} -C Debug -V - --no-label-sumary + --no-label-summary ) endfunction() @@ -197,7 +197,7 @@ function(run_GoogleTest_discovery_timeout DISCOVERY_MODE) ${CMAKE_CTEST_COMMAND} -C Debug -R discovery_timeout_test - --no-label-sumary + --no-label-summary ) endfunction() @@ -362,10 +362,7 @@ foreach(DISCOVERY_MODE POST_BUILD PRE_TEST) run_GoogleTestXML(${DISCOVERY_MODE}) message("Testing ${DISCOVERY_MODE} discovery mode via DISCOVERY_MODE option...") run_GoogleTest_discovery_timeout(${DISCOVERY_MODE}) - if(# VS 9 does not rebuild if POST_BUILD command changes. - NOT "${DISCOVERY_MODE};${RunCMake_GENERATOR}" MATCHES "^POST_BUILD;Visual Studio 9") - run_GoogleTest_discovery_arg_change(${DISCOVERY_MODE}) - endif() + run_GoogleTest_discovery_arg_change(${DISCOVERY_MODE}) run_GoogleTest_discovery_test_list(${DISCOVERY_MODE}) run_GoogleTest_discovery_test_list_scoped(${DISCOVERY_MODE}) run_GoogleTest_discovery_flush_script(${DISCOVERY_MODE}) diff --git a/Tests/RunCMake/IAR/RunCMakeTest.cmake b/Tests/RunCMake/IAR/RunCMakeTest.cmake index 2049740..2fefa6a 100644 --- a/Tests/RunCMake/IAR/RunCMakeTest.cmake +++ b/Tests/RunCMake/IAR/RunCMakeTest.cmake @@ -8,6 +8,13 @@ if(RunCMake_GENERATOR MATCHES "Makefile|Ninja") endif() endif() +function(run_toolchain case) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build) + run_cmake_with_options(${case} ${ARGN}) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(${case}-build ${CMAKE_COMMAND} --build .) +endfunction() + foreach(_iar_toolchain IN LISTS _iar_toolchains) message(STATUS "Found IAR toolchain: ${_iar_toolchain}") cmake_path(GET _iar_toolchain PARENT_PATH BIN_DIR) @@ -15,16 +22,22 @@ foreach(_iar_toolchain IN LISTS _iar_toolchains) cmake_path(GET TOOLKIT_DIR FILENAME ARCH) # Sets the minimal requirements for linking each target architecture - if(ARCH STREQUAL rl78) - set(LINK_OPTS -"--config_def _STACK_SIZE=256 \ ---config_def _NEAR_HEAP_SIZE=0x400 \ ---config_def _FAR_HEAP_SIZE=4096 \ ---config_def _HUGE_HEAP_SIZE=0 \ ---config_def _NEAR_CONST_LOCATION_START=0x2000 \ ---config_def _NEAR_CONST_LOCATION_SIZE=0x6F00 \ ---define_symbol _NEAR_CONST_LOCATION=0 \ ---config ${TOOLKIT_DIR}/config/lnkrl78_s3.icf" ) + if(ARCH STREQUAL "avr") + string(CONCAT LINK_OPTS + "-I${TOOLKIT_DIR}/lib " + "-f ${TOOLKIT_DIR}/src/template/lnk3s.xcl " + ) + elseif(ARCH STREQUAL "rl78") + string(CONCAT LINK_OPTS + "--config_def _STACK_SIZE=256 " + "--config_def _NEAR_HEAP_SIZE=0x400 " + "--config_def _FAR_HEAP_SIZE=4096 " + "--config_def _HUGE_HEAP_SIZE=0 " + "--config_def _NEAR_CONST_LOCATION_START=0x2000 " + "--config_def _NEAR_CONST_LOCATION_SIZE=0x6F00 " + "--define_symbol _NEAR_CONST_LOCATION=0 " + "--config ${TOOLKIT_DIR}/config/lnkrl78_s3.icf " + ) else() set(LINK_OPTS "") endif() @@ -35,30 +48,26 @@ foreach(_iar_toolchain IN LISTS _iar_toolchains) PATHS ${BIN_DIR} REQUIRED ) - set(RunCMake_TEST_OPTIONS + run_toolchain(iar-c -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_C_COMPILER=${_iar_toolchain} -DCMAKE_EXE_LINKER_FLAGS=${LINK_OPTS} ) - run_cmake(iar-c) - set(RunCMake_TEST_OPTIONS + run_toolchain(iar-cxx -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_CXX_COMPILER=${_iar_toolchain} -DCMAKE_EXE_LINKER_FLAGS=${LINK_OPTS} ) - run_cmake(iar-cxx) - set(RunCMake_TEST_OPTIONS + run_toolchain(iar-asm -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_ASM_COMPILER=${IAR_ASSEMBLER} - ) - run_cmake(iar-asm) + ) - set(RunCMake_TEST_OPTIONS + run_toolchain(iar-lib -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_C_COMPILER=${_iar_toolchain} -DCMAKE_EXE_LINKER_FLAGS=${LINK_OPTS} - ) - run_cmake(iar-lib) + ) endforeach() diff --git a/Tests/RunCMake/IAR/iar-asm.cmake b/Tests/RunCMake/IAR/iar-asm.cmake index 7ff64f6..1c19182 100644 --- a/Tests/RunCMake/IAR/iar-asm.cmake +++ b/Tests/RunCMake/IAR/iar-asm.cmake @@ -1,5 +1,4 @@ enable_language(ASM) -add_executable(exec-asm) -target_sources(exec-asm PRIVATE module.asm) +add_executable(exec-asm module.asm) target_link_options(exec-asm PRIVATE ${LINKER_OPTS}) diff --git a/Tests/RunCMake/IAR/iar-c.cmake b/Tests/RunCMake/IAR/iar-c.cmake index a36f096..5e7e740 100644 --- a/Tests/RunCMake/IAR/iar-c.cmake +++ b/Tests/RunCMake/IAR/iar-c.cmake @@ -1,5 +1,5 @@ enable_language(C) -add_executable(exec-c) -target_sources(exec-c PRIVATE module.c) +add_executable(exec-c module.c) +target_compile_options(exec-c PRIVATE -e) target_link_options(exec-c PRIVATE ${LINKER_OPTS}) diff --git a/Tests/RunCMake/IAR/iar-cxx.cmake b/Tests/RunCMake/IAR/iar-cxx.cmake index 6b005b5..6056d32 100644 --- a/Tests/RunCMake/IAR/iar-cxx.cmake +++ b/Tests/RunCMake/IAR/iar-cxx.cmake @@ -1,5 +1,5 @@ enable_language(CXX) -add_executable(exec-cxx) -target_sources(exec-cxx PRIVATE module.cxx) +add_executable(exec-cxx module.cxx) +target_compile_options(exec-cxx PRIVATE -e) target_link_options(exec-cxx PRIVATE ${LINKER_OPTS}) diff --git a/Tests/RunCMake/IAR/iar-lib.cmake b/Tests/RunCMake/IAR/iar-lib.cmake index 78b3136..17e6c95 100644 --- a/Tests/RunCMake/IAR/iar-lib.cmake +++ b/Tests/RunCMake/IAR/iar-lib.cmake @@ -1,10 +1,9 @@ enable_language(C) -add_library(iar-test-lib) -target_sources(iar-test-lib PRIVATE libmod.c) +add_library(iar-test-lib libmod.c) -add_executable(exec-lib-c) -target_sources(exec-lib-c PRIVATE module.c) +add_executable(exec-lib-c module.c) +target_compile_options(exec-lib-c PRIVATE -e) target_compile_definitions(exec-lib-c PRIVATE __USE_LIBFUN) -target_link_libraries(exec-lib-c LINK_PUBLIC iar-test-lib) +target_link_libraries(exec-lib-c PRIVATE iar-test-lib) target_link_options(exec-lib-c PRIVATE ${LINKER_OPTS}) diff --git a/Tests/RunCMake/InstallParallel/CMakeLists.txt b/Tests/RunCMake/InstallParallel/CMakeLists.txt new file mode 100644 index 0000000..94e43ba --- /dev/null +++ b/Tests/RunCMake/InstallParallel/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.29) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/InstallParallel/RunCMakeTest.cmake b/Tests/RunCMake/InstallParallel/RunCMakeTest.cmake new file mode 100644 index 0000000..ae3f112 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/RunCMakeTest.cmake @@ -0,0 +1,17 @@ +include(RunCMake) + +function(install_test test parallel install_target check_script) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-install) + set(RunCMake_TEST_OPTIONS -DINSTALL_PARALLEL=${parallel}) + if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) + list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + endif() + run_cmake(install) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(${test}-install ${CMAKE_COMMAND} --build . --config Debug -t ${install_target}) + set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY ${RunCMake_SOURCE_DIR}) + run_cmake_command(verify-parallel ${CMAKE_COMMAND} -P ${check_script} ${RunCMake_TEST_BINARY_DIR}/.ninja_log) +endfunction() + +install_test(parallel 1 install/parallel check-parallel.cmake) +install_test(no-parallel 0 install check-single.cmake) diff --git a/Tests/RunCMake/InstallParallel/check-parallel.cmake b/Tests/RunCMake/InstallParallel/check-parallel.cmake new file mode 100644 index 0000000..4e4cf52 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/check-parallel.cmake @@ -0,0 +1,15 @@ +include(read-ninja-install.cmake) + +foreach(line ${lines}) + string(REPLACE "\t" ";" line ${line}) + list(GET line 0 start) + list(GET line 1 end) + list(APPEND start_times ${start}) + list(APPEND end_times ${end}) +endforeach() +list(GET start_times 1 start_2) +list(GET end_times 0 end_1) + +if (NOT start_2 LESS end_1) + message(FATAL_ERROR "Install is not parallel") +endif() diff --git a/Tests/RunCMake/InstallParallel/check-single.cmake b/Tests/RunCMake/InstallParallel/check-single.cmake new file mode 100644 index 0000000..79c4d5c --- /dev/null +++ b/Tests/RunCMake/InstallParallel/check-single.cmake @@ -0,0 +1,5 @@ +include(read-ninja-install.cmake) +list(LENGTH lines len) +if (NOT ${len} STREQUAL "1") + message(FATAL_ERROR "Expected single installation call") +endif() diff --git a/Tests/RunCMake/InstallParallel/install.cmake b/Tests/RunCMake/InstallParallel/install.cmake new file mode 100644 index 0000000..54b5078 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/install.cmake @@ -0,0 +1,6 @@ +install(CODE "message(installing:${CMAKE_CURRENT_SOURCE_DIR})") +if (INSTALL_PARALLEL) + set_property(GLOBAL PROPERTY INSTALL_PARALLEL ON) +endif() +add_subdirectory(subdir-1) +add_subdirectory(subdir-2) diff --git a/Tests/RunCMake/InstallParallel/no-parallel-install-stderr.txt b/Tests/RunCMake/InstallParallel/no-parallel-install-stderr.txt new file mode 100644 index 0000000..8f69a04 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/no-parallel-install-stderr.txt @@ -0,0 +1,5 @@ +installing:.* +installing:.* +installing:.* +installing:.* +installing:.* diff --git a/Tests/RunCMake/InstallParallel/parallel-install-stdout.txt b/Tests/RunCMake/InstallParallel/parallel-install-stdout.txt new file mode 100644 index 0000000..e0d2a56 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/parallel-install-stdout.txt @@ -0,0 +1,15 @@ +\[1\/5\] Installing only the local directory... +\-\- Install configuration: \"Debug\" +installing:.* +\[2\/5\] Installing only the local directory... +\-\- Install configuration: \"Debug\" +installing:.* +\[3\/5\] Installing only the local directory... +\-\- Install configuration: \"Debug\" +installing:.* +\[4\/5\] Installing only the local directory... +\-\- Install configuration: \"Debug\" +installing:.* +\[5\/5\] Installing only the local directory... +\-\- Install configuration: \"Debug\" +installing:.* diff --git a/Tests/RunCMake/InstallParallel/read-ninja-install.cmake b/Tests/RunCMake/InstallParallel/read-ninja-install.cmake new file mode 100644 index 0000000..731c5eb --- /dev/null +++ b/Tests/RunCMake/InstallParallel/read-ninja-install.cmake @@ -0,0 +1,4 @@ +set(ninja_log ${CMAKE_ARGV3}) +file(STRINGS ${ninja_log} lines) +list(POP_FRONT lines) +list(FILTER lines INCLUDE REGEX ".*install.*util") diff --git a/Tests/RunCMake/InstallParallel/subdir-1/CMakeLists.txt b/Tests/RunCMake/InstallParallel/subdir-1/CMakeLists.txt new file mode 100644 index 0000000..6b235c4 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/subdir-1/CMakeLists.txt @@ -0,0 +1,3 @@ +install(CODE "message(installing:${CMAKE_CURRENT_SOURCE_DIR})") +add_subdirectory(subdir-3) +add_subdirectory(subdir-4) diff --git a/Tests/RunCMake/InstallParallel/subdir-1/subdir-3/CMakeLists.txt b/Tests/RunCMake/InstallParallel/subdir-1/subdir-3/CMakeLists.txt new file mode 100644 index 0000000..dd7eac3 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/subdir-1/subdir-3/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(installing:${CMAKE_CURRENT_SOURCE_DIR})") diff --git a/Tests/RunCMake/InstallParallel/subdir-1/subdir-4/CMakeLists.txt b/Tests/RunCMake/InstallParallel/subdir-1/subdir-4/CMakeLists.txt new file mode 100644 index 0000000..dd7eac3 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/subdir-1/subdir-4/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(installing:${CMAKE_CURRENT_SOURCE_DIR})") diff --git a/Tests/RunCMake/InstallParallel/subdir-2/CMakeLists.txt b/Tests/RunCMake/InstallParallel/subdir-2/CMakeLists.txt new file mode 100644 index 0000000..dd7eac3 --- /dev/null +++ b/Tests/RunCMake/InstallParallel/subdir-2/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(installing:${CMAKE_CURRENT_SOURCE_DIR})") diff --git a/Tests/RunCMake/LanguageStandards/CMakeLists.txt b/Tests/RunCMake/LanguageStandards/CMakeLists.txt new file mode 100644 index 0000000..94e43ba --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.29) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/LanguageStandards/Inspect.cmake b/Tests/RunCMake/LanguageStandards/Inspect.cmake new file mode 100644 index 0000000..b0f2e60 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/Inspect.cmake @@ -0,0 +1,14 @@ +enable_language(C) +enable_language(CXX) + +set(info "") +foreach(var + CMAKE_C_STANDARD_DEFAULT + CMAKE_CXX_STANDARD_DEFAULT + ) + if(DEFINED ${var}) + string(APPEND info "set(${var} \"${${var}}\")\n") + endif() +endforeach() + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/info.cmake" "${info}") diff --git a/Tests/RunCMake/LanguageStandards/RunCMakeTest.cmake b/Tests/RunCMake/LanguageStandards/RunCMakeTest.cmake new file mode 100644 index 0000000..bc9dfd4 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/RunCMakeTest.cmake @@ -0,0 +1,32 @@ +include(RunCMake) + +# Detect information from the toolchain: +# - CMAKE_C_STANDARD_DEFAULT +# - CMAKE_CXX_STANDARD_DEFAULT +run_cmake(Inspect) +include("${RunCMake_BINARY_DIR}/Inspect-build/info.cmake") + +function(run_StdLatest lang) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/StdLatest-${lang}-build) + run_cmake(StdLatest-${lang}) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OUTPUT_MERGE 1) + run_cmake_command(StdLatest-${lang}-build ${CMAKE_COMMAND} --build . --config Debug) +endfunction() + +if(NOT CMake_NO_C_STANDARD AND DEFINED CMAKE_C_STANDARD_DEFAULT) + run_StdLatest(C) +endif() +if(NOT CMake_NO_CXX_STANDARD AND DEFINED CMAKE_CXX_STANDARD_DEFAULT) + run_StdLatest(CXX) +endif() +if(CMake_TEST_CUDA) + run_StdLatest(CUDA) +endif() +if(CMake_TEST_HIP) + run_StdLatest(HIP) +endif() +if(CMake_TEST_OBJC) + run_StdLatest(OBJC) + run_StdLatest(OBJCXX) +endif() diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-C-stdout.txt b/Tests/RunCMake/LanguageStandards/StdLatest-C-stdout.txt new file mode 100644 index 0000000..57aad4d --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-C-stdout.txt @@ -0,0 +1 @@ +-- CMAKE_C_STANDARD_LATEST='[0-9][0-9]' diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-C.c b/Tests/RunCMake/LanguageStandards/StdLatest-C.c new file mode 100644 index 0000000..8488f4e --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-C.c @@ -0,0 +1,4 @@ +int main(void) +{ + return 0; +} diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-C.cmake b/Tests/RunCMake/LanguageStandards/StdLatest-C.cmake new file mode 100644 index 0000000..54f5a19 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-C.cmake @@ -0,0 +1,4 @@ +enable_language(C) +message(STATUS "CMAKE_C_STANDARD_LATEST='${CMAKE_C_STANDARD_LATEST}'") +add_executable(StdLatest StdLatest-C.c) +target_compile_features(StdLatest PRIVATE c_std_${CMAKE_C_STANDARD_LATEST}) diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-CUDA-stdout.txt b/Tests/RunCMake/LanguageStandards/StdLatest-CUDA-stdout.txt new file mode 100644 index 0000000..207541a --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-CUDA-stdout.txt @@ -0,0 +1 @@ +-- CMAKE_CUDA_STANDARD_LATEST='[0-9][0-9]' diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-CUDA.cmake b/Tests/RunCMake/LanguageStandards/StdLatest-CUDA.cmake new file mode 100644 index 0000000..496abb0 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-CUDA.cmake @@ -0,0 +1,4 @@ +enable_language(CUDA) +message(STATUS "CMAKE_CUDA_STANDARD_LATEST='${CMAKE_CUDA_STANDARD_LATEST}'") +add_executable(StdLatest StdLatest-CUDA.cu) +target_compile_features(StdLatest PRIVATE cuda_std_${CMAKE_CUDA_STANDARD_LATEST}) diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-CUDA.cu b/Tests/RunCMake/LanguageStandards/StdLatest-CUDA.cu new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-CUDA.cu @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-CXX-stdout.txt b/Tests/RunCMake/LanguageStandards/StdLatest-CXX-stdout.txt new file mode 100644 index 0000000..db83723 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-CXX-stdout.txt @@ -0,0 +1 @@ +-- CMAKE_CXX_STANDARD_LATEST='[0-9][0-9]' diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-CXX.cmake b/Tests/RunCMake/LanguageStandards/StdLatest-CXX.cmake new file mode 100644 index 0000000..34aba55 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-CXX.cmake @@ -0,0 +1,5 @@ +enable_language(CXX) +set(CMAKE_CXX_SCAN_FOR_MODULES OFF) # In case C++20 or higher is the latest. +message(STATUS "CMAKE_CXX_STANDARD_LATEST='${CMAKE_CXX_STANDARD_LATEST}'") +add_executable(StdLatest StdLatest-CXX.cxx) +target_compile_features(StdLatest PRIVATE cxx_std_${CMAKE_CXX_STANDARD_LATEST}) diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-CXX.cxx b/Tests/RunCMake/LanguageStandards/StdLatest-CXX.cxx new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-CXX.cxx @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-HIP-stdout.txt b/Tests/RunCMake/LanguageStandards/StdLatest-HIP-stdout.txt new file mode 100644 index 0000000..681ea9e --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-HIP-stdout.txt @@ -0,0 +1 @@ +-- CMAKE_HIP_STANDARD_LATEST='[0-9][0-9]' diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-HIP.cmake b/Tests/RunCMake/LanguageStandards/StdLatest-HIP.cmake new file mode 100644 index 0000000..4eaa56c --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-HIP.cmake @@ -0,0 +1,4 @@ +enable_language(HIP) +message(STATUS "CMAKE_HIP_STANDARD_LATEST='${CMAKE_HIP_STANDARD_LATEST}'") +add_executable(StdLatest StdLatest-HIP.hip) +target_compile_features(StdLatest PRIVATE hip_std_${CMAKE_HIP_STANDARD_LATEST}) diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-HIP.hip b/Tests/RunCMake/LanguageStandards/StdLatest-HIP.hip new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-HIP.hip @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-OBJC-stdout.txt b/Tests/RunCMake/LanguageStandards/StdLatest-OBJC-stdout.txt new file mode 100644 index 0000000..577c126 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-OBJC-stdout.txt @@ -0,0 +1 @@ +-- CMAKE_OBJC_STANDARD_LATEST='[0-9][0-9]' diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-OBJC.cmake b/Tests/RunCMake/LanguageStandards/StdLatest-OBJC.cmake new file mode 100644 index 0000000..6d05ab6 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-OBJC.cmake @@ -0,0 +1,4 @@ +enable_language(OBJC) +message(STATUS "CMAKE_OBJC_STANDARD_LATEST='${CMAKE_OBJC_STANDARD_LATEST}'") +add_executable(StdLatest StdLatest-OBJC.m) +set_property(TARGET StdLatest PROPERTY OBJC_STANDARD "${CMAKE_OBJC_STANDARD_LATEST}") diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-OBJC.m b/Tests/RunCMake/LanguageStandards/StdLatest-OBJC.m new file mode 100644 index 0000000..8488f4e --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-OBJC.m @@ -0,0 +1,4 @@ +int main(void) +{ + return 0; +} diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX-stdout.txt b/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX-stdout.txt new file mode 100644 index 0000000..0c5567b --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX-stdout.txt @@ -0,0 +1 @@ +-- CMAKE_OBJCXX_STANDARD_LATEST='[0-9][0-9]' diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX.cmake b/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX.cmake new file mode 100644 index 0000000..c7418d0 --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX.cmake @@ -0,0 +1,4 @@ +enable_language(OBJCXX) +message(STATUS "CMAKE_OBJCXX_STANDARD_LATEST='${CMAKE_OBJCXX_STANDARD_LATEST}'") +add_executable(StdLatest StdLatest-OBJCXX.mm) +set_property(TARGET StdLatest PROPERTY OBJCXX_STANDARD "${CMAKE_OBJCXX_STANDARD_LATEST}") diff --git a/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX.mm b/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX.mm new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/RunCMake/LanguageStandards/StdLatest-OBJCXX.mm @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake index e79eb45..ac5f7f1 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration1.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER= UNICITY=ALL) +set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER= DEDUPLICATION=ALL) add_library(lib STATIC lib.c) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake index c9da734..63edfd3 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration2.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_LIBRARIES_PROCESSING UNICITY=ALL ORDER) +set(CMAKE_C_LINK_LIBRARIES_PROCESSING DEDUPLICATION=ALL ORDER) add_library(lib STATIC lib.c) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake index a1311fe..0bd7c5f 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration3.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE UNICITY=ALL) +set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE DEDUPLICATION=ALL) add_library(lib STATIC lib.c) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt index 46d5513..256fd4e 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4-stderr.txt @@ -2,7 +2,7 @@ CMake Error at InvalidConfiguration4.cmake:[0-9]+ \(add_executable\): Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING': WRONG=REVERSE - UNICITY=WRONG + DEDUPLICATION=WRONG Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake index 9d48f4f..ccb4dae 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake +++ b/Tests/RunCMake/LinkLibrariesProcessing/InvalidConfiguration4.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE UNICITY=WRONG) +set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE DEDUPLICATION=WRONG) add_library(lib STATIC lib.c) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-result.txt b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-stderr.txt b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-stderr.txt index 4d759b7..1138a31 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY-stderr.txt +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION-stderr.txt @@ -1,7 +1,7 @@ -CMake Error at Invalid_UNICITY.cmake:[0-9]+ \(add_executable\): +CMake Error at Invalid_DEDUPLICATION.cmake:[0-9]+ \(add_executable\): Erroneous option\(s\) for 'CMAKE_C_LINK_LIBRARIES_PROCESSING': - UNICITY=WRONG + DEDUPLICATION=WRONG Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY.cmake b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION.cmake index f423eef..e5ff622 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_UNICITY.cmake +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_DEDUPLICATION.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=REVERSE UNICITY=WRONG) +set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=WRONG) add_library(lib STATIC lib.c) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake index 72a7e02..f0c7ee3 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake +++ b/Tests/RunCMake/LinkLibrariesProcessing/Invalid_ORDER.cmake @@ -1,7 +1,7 @@ enable_language(C) -set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=WRONG UNICITY=ALL) +set(CMAKE_C_LINK_LIBRARIES_PROCESSING ORDER=WRONG DEDUPLICATION=ALL) add_library(lib STATIC lib.c) diff --git a/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake b/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake index 763f48b..d4105b4 100644 --- a/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake +++ b/Tests/RunCMake/LinkLibrariesProcessing/RunCMakeTest.cmake @@ -1,7 +1,7 @@ include(RunCMake) run_cmake(Invalid_ORDER) -run_cmake(Invalid_UNICITY) +run_cmake(Invalid_DEDUPLICATION) run_cmake(InvalidConfiguration1) run_cmake(InvalidConfiguration2) run_cmake(InvalidConfiguration3) diff --git a/Tests/RunCMake/LinkerSelection/RunCMakeTest.cmake b/Tests/RunCMake/LinkerSelection/RunCMakeTest.cmake index 0a3f01c..77ab874 100644 --- a/Tests/RunCMake/LinkerSelection/RunCMakeTest.cmake +++ b/Tests/RunCMake/LinkerSelection/RunCMakeTest.cmake @@ -1,10 +1,5 @@ include(RunCMake) -if (RunCMake_GENERATOR MATCHES "Visual Studio 9 2008") - run_cmake(UnsupportedLinkerType) - return() -endif() - run_cmake(InvalidLinkerType1) run_cmake(InvalidLinkerType2) @@ -22,8 +17,9 @@ macro(run_cmake_and_build test) -DCMake_TEST_Swift=${CMake_TEST_Swift}) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build) set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OUTPUT_MERGE 1) run_cmake_command(${test}-build ${CMAKE_COMMAND} --build . --config Release --verbose ${ARGN}) - + unset(RunCMake_TEST_OUTPUT_MERGE) unset(RunCMake_TEST_BINARY_DIR) unset(RunCMake_TEST_NO_CLEAN) endmacro() diff --git a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-stderr.txt b/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-stderr.txt deleted file mode 100644 index 6473451..0000000 --- a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType-stderr.txt +++ /dev/null @@ -1,3 +0,0 @@ -CMake Error at UnsupportedLinkerType.cmake:[0-9]+ \(add_executable\): - 'LINKER_TYPE' property, specified on target 'main', is not supported by - this generator. diff --git a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType.cmake b/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType.cmake deleted file mode 100644 index 1b0703c..0000000 --- a/Tests/RunCMake/LinkerSelection/UnsupportedLinkerType.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -enable_language(C) - -set(CMAKE_LINKER_TYPE LDD) -add_executable(main main.c) diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake index 9514c97..d50d403 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake @@ -26,8 +26,7 @@ endif() if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows|AIX|SunOS)$|BSD" AND NOT CMAKE_C_COMPILER_ID MATCHES "^(Borland|Embarcadero|OpenWatcom|OrangeC|Watcom)$" AND NOT (CMAKE_C_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$" AND CMAKE_SYSTEM_NAME STREQUAL "Windows") - AND NOT CMAKE_C_COMPILER_LINKER MATCHES "Visual Studio 9\\.0" - AND NOT RunCMake_GENERATOR MATCHES "Visual Studio 9 " + AND NOT CMAKE_C_COMPILER_LINKER MATCHES "Microsoft Visual Studio 9\\.0/VC/bin" ) if(NOT CMAKE_C_COMPILER_LINKER OR NOT CMAKE_C_COMPILER_LINKER_ID OR NOT CMAKE_C_COMPILER_LINKER_VERSION) message(SEND_ERROR "C compiler's linker not identified:\n" diff --git a/Tests/RunCMake/README.rst b/Tests/RunCMake/README.rst index d8cae8b..ea6db54 100644 --- a/Tests/RunCMake/README.rst +++ b/Tests/RunCMake/README.rst @@ -1,37 +1,63 @@ -This directory contains tests that run CMake to configure a project -but do not actually build anything. To add a test: +CMake Tests/RunCMake Directory +****************************** + +This directory contains tests that run CMake and/or other tools while +precisely checking their return code and stdout/stderr content. +The RunCMake infrastructure is useful for testing error cases and +diagnostic output. + +See also `../README.rst`_ and the `CMake Source Code Guide`_. + +.. _`../README.rst`: ../README.rst +.. _`CMake Source Code Guide`: ../../Help/dev/source.rst +.. _`CMakeLists.txt`: CMakeLists.txt + +Adding a Test +============= + +To add a test: 1. Add a subdirectory named for the test, say ``<Test>/``. -2. In ``./CMakeLists.txt`` call ``add_RunCMake_test`` and pass the +2. In `CMakeLists.txt`_ call ``add_RunCMake_test`` and pass the test directory name ``<Test>``. 3. Create script ``<Test>/RunCMakeTest.cmake`` in the directory containing:: include(RunCMake) - run_cmake(SubTest1) + run_cmake(Case1) ... - run_cmake(SubTestN) + run_cmake(CaseN) - where ``SubTest1`` through ``SubTestN`` are sub-test names each - corresponding to an independent CMake run and project configuration. + where ``Case1`` through ``CaseN`` are case names each corresponding to + an independent CMake run and project configuration. One may also add calls of the form:: - run_cmake_command(SubTestI ${CMAKE_COMMAND} ...) + run_cmake_command(CaseI ${CMAKE_COMMAND} ...) to fully customize the test case command-line. Alternatively, if the test is to cover running ``ctest -S`` then use:: include(RunCTest) - run_ctest(SubTest1) + run_ctest(Case1) ... - run_ctest(SubTestN) + run_ctest(CaseN) and create ``test.cmake.in``, ``CTestConfig.cmake.in``, and ``CMakeLists.txt.in`` files to be configured for each case. + Alternatively, if the test is to cover running ``cpack -G`` then use:: + + include(RunCPack) + run_cpack(Sample1) + ... + run_cpack(SampleN) + + where ``Sample1`` through ``SampleN`` are sample project directories + in the ``RunCPack/`` directory adjacent to this file. + 4. Create file ``<Test>/CMakeLists.txt`` in the directory containing:: cmake_minimum_required(...) @@ -40,37 +66,194 @@ but do not actually build anything. To add a test: where ``${RunCMake_TEST}`` is literal. A value for ``RunCMake_TEST`` will be passed to CMake by the ``run_cmake`` macro when running each - sub-test. + case. -5. Create a ``<Test>/<SubTest>.cmake`` file for each sub-test named +5. Create a ``<Test>/<case>.cmake`` file for each case named above containing the actual test code. Optionally create files containing expected test results: - ``<SubTest>-result.txt`` + ``<case>-result.txt`` Regex matching expected process result, if not ``0`` - ``<SubTest>-stdout.txt`` + ``<case>-stdout.txt`` Regex matching expected stdout content - ``<SubTest>-stderr.txt`` + ``<case>-stderr.txt`` Regex matching expected stderr content, if not ``^$`` - ``<SubTest>-check.cmake`` + ``<case>-check.cmake`` Custom result check. - Note that when a specific platform expects differing stdout or stderr that - can be done by adding a platform specific output file. These follow the - naming convention of: - ``<SubTest>-stdout-<platform_lower_case>.txt`` - ``<SubTest>-stderr-<platform_lower_case>.txt`` + To specify platform-specific matches, create files of the form + ``<case>-{stdout,stderr}-<platform_lower_case>.txt``. Note that trailing newlines will be stripped from actual and expected test output before matching against the stdout and stderr expressions. - The code in ``<SubTest>-check.cmake`` may use variables + The code in ``<case>-check.cmake`` may use the `RunCMake Variables`_. + On failure the script must store a message in ``RunCMake_TEST_FAILED``. + The check script may optionally set ``RunCMake_TEST_FAILURE_MESSAGE`` + with additional text to be included in the message if the test fails. + +RunCMake Commands +================= + +A ``RunCMakeTest.cmake`` script, after ``include(RunCMake)``, may use +the following commands. + +``run_cmake(<case>)`` + Run CMake or another command and check expected results described by + ``<case>-{result,stdout,stderr}.txt`` and ``<case>-check.cmake``. + The command is executed by a call of the form:: + + execute_process( + COMMAND ${RunCMake_TEST_COMMAND} ${RunCMake_TEST_OPTIONS} + WORKING_DIRECTORY "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}" + [TIMEOUT "${RunCMake_TEST_TIMEOUT}"] + ... + ) + + Behavior may be customized by setting `RunCMake Variables`_ before + the call. + +``run_cmake_command(<case> <command> <args>...)`` + Sets ``RunCMake_TEST_COMMAND`` to ``<command>;<args>...`` + and calls ``run_cmake(<case>)``. + + This is useful to run an arbitrary command. + +``run_cmake_script(<case> <args>...)`` + Sets ``RunCMake_TEST_COMMAND`` to + ``${CMAKE_COMMAND};<args>...;-P;${RunCMake_SOURCE_DIR}/<case>.cmake`` + and calls ``run_cmake(<case>)``. + + This is useful to run CMake in script mode without configuring a project. + +``run_cmake_with_options(<case> <opts>...)`` + Sets ``RunCMake_TEST_OPTIONS`` to ``<opts>...`` + and calls ``run_cmake(<case>)``. + +``run_cmake_with_raw_args(<case> "<args>")`` + Calls ``run_cmake(<case>)`` with the underlying ``execute_process()`` + call extended with the content of ``<args>`` treated as literal source + code of CMake language command arguments:: + + execute_process( + COMMAND ${RunCMake_TEST_COMMAND} ${RunCMake_TEST_OPTIONS} <args> + ... + ) + + This is useful to pass arguments to the test command that cannot be + encoded in CMake language ``;``-separated lists. + +RunCMake Variables +================== + +The behavior of `RunCMake Commands`_ such as ``run_cmake()`` may be +customized by setting the following variables before a call. + +``RunCMake_GENERATOR`` + CMake generator to use when configuring projects. + This provided to ``RunCMakeTest.cmake`` scripts automatically + when they are executed, based on the CMake generator used to + configure the test suite. + + For some generators, additional variables are also provided: + + ``RunCMake_GENERATOR_PLATFORM`` + Specifies the ``CMAKE_GENERATOR_PLATFORM``. + + ``RunCMake_GENERATOR_TOOLSET`` + Specifies the ``CMAKE_GENERATOR_TOOLSET``. + + ``RunCMake_GENERATOR_INSTANCE`` + Specifies the ``CMAKE_GENERATOR_INSTANCE``. + +``RunCMake_GENERATOR_IS_MULTI_CONFIG`` + Boolean value indicating whether ``${RunCMake_GENERATOR}`` is a + multi-config generator. + This provided to ``RunCMakeTest.cmake`` scripts automatically + when they are executed, based on the CMake generator used to + configure the test suite. + +``RunCMake_SOURCE_DIR`` + Absolute path to the ``Tests/RunCMake/<Test>`` directory in + the CMake source tree. This provided to ``RunCMakeTest.cmake`` + scripts automatically when they are executed. + +``RunCMake_BINARY_DIR`` + Absolute path to the ``Tests/RunCMake/<Test>`` directory in + the CMake binary tree. This provided to ``RunCMakeTest.cmake`` + scripts automatically when they are executed. + +``RunCMake_TEST_SOURCE_DIR`` + Absolute path to the individual test case's source tree. + If not set, defaults to ``${RunCMake_SOURCE_DIR}``. + +``RunCMake_TEST_BINARY_DIR`` + Absolute path to the individual test case's binary tree. + If not set, defaults to ``${RunCMake_BINARY_DIR}/<case>-build``. + +``RunCMake_TEST_NO_CLEAN`` + Boolean value indicating whether ``run_cmake(<case>)`` should remove the + ``${RunCMake_TEST_BINARY_DIR}`` directory before running the test case. + If not set, or if set to a false value, the directory is removed. + + This is useful to run `Multi-Step Test Cases`_. + +``RunCMake_TEST_COMMAND`` + The command for ``run_cmake(<case>)`` to execute. + If not set, defaults to running CMake to generate a project:: + + ${CMAKE_COMMAND} ${RunCMake_TEST_SOURCE_DIR} \ + -G ${RunCMake_GENERATOR} ... -DRunCMake_TEST=<case> + +``RunCMake_TEST_COMMAND_WORKING_DIRECTORY`` + The working directory in which ``run_cmake(<case>)`` to execute its command. + If not set, defaults to ``${RunCMake_TEST_BINARY_DIR}``. + +``RunCMake_TEST_OPTIONS`` + Additional command-line options for ``run_cmake(<case>)`` to pass to + CMake when configuring a project with a default ``RunCMake_TEST_COMMAND``. + If not set, defaults to empty. + If ``RunCMake_TEST_COMMAND`` is set, ``RunCMake_TEST_OPTIONS`` is forced + to empty. + +``RunCMake_TEST_OUTPUT_MERGE`` + Boolean value indicating whether ``run_cmake(<case>)`` should redirect + the test process's ``stderr`` into its ``stdout``. + +``RunCMake_TEST_TIMEOUT`` + Specify a timeout, in seconds, for ``run_cmake(<case>)`` to pass to its + underlying ``execute_process()`` call using the ``TIMEOUT`` option. + +Multi-Step Test Cases +===================== + +Normally each ``run_cmake(<case>)`` call corresponds to one standalone +test case with its own build tree. However, some test cases may require +multiple steps to be performed in a single build tree. This can be +achieved as follows:: + + block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/example-build) + run_cmake(example) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OUTPUT_MERGE 1) + run_cmake_command(example-build ${CMAKE_COMMAND} --build . --config Debug) + endblock() + +In this example, ``block() ... endblock()`` is used to isolate the +variable settings from later cases. A single build tree is used for +all cases inside the block. The first step cleans the build tree and +runs CMake to configure the case's project. The second step runs +``cmake --build`` to drive the generated build system and merges the +build tool's ``stderr`` into its ``stdout``. Note that each call uses +a unique case name so that expected results can be expressed individually. + +Running a Test +============== - ``RunCMake_TEST_SOURCE_DIR`` - Top of test source tree - ``RunCMake_TEST_BINARY_DIR`` - Top of test binary tree +Each call to ``add_RunCMake_test(Example)`` in `CMakeLists.txt`_ creates +a test named ``RunCMake.Example`` that may be run with ``ctest``:: - and an failure must store a message in ``RunCMake_TEST_FAILED``. + $ ctest -R "^RunCMake\.Example$" To speed up local testing, you can choose to run only a subset of ``run_cmake()`` tests in a ``RunCMakeTest.cmake`` script by using the @@ -80,7 +263,7 @@ match the regular expression are not run. For example:: $ RunCMake_TEST_FILTER="^example" ctest -R '^RunCMake\.Example$' -This will only run subtests in ``RunCMake.Example`` that start with +This will only run cases in ``RunCMake.Example`` that start with ``example``. To speed up the process of creating a new ``RunCMake`` test, you can run a diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 9bc510b..ea3099f 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -217,6 +217,7 @@ function(run_cmake test) "|[^\n]*offset in archive not a multiple of 8" "|[^\n]*from Time Machine by path" "|[^\n]*Bullseye Testing Technology" + ${RunCMake_TEST_EXTRA_IGNORE_LINE_REGEX} ")[^\n]*\n)+" ) if(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION) @@ -247,6 +248,7 @@ function(run_cmake test) endif() endforeach() unset(RunCMake_TEST_FAILED) + unset(RunCMake_TEST_FAILURE_MESSAGE) if(RunCMake-check-file AND EXISTS ${top_src}/${RunCMake-check-file}) include(${top_src}/${RunCMake-check-file}) else() @@ -277,6 +279,9 @@ function(run_cmake test) string(APPEND msg "Actual ${o}:\n${actual_${o}}\n") endif() endforeach() + if(RunCMake_TEST_FAILURE_MESSAGE) + string(APPEND msg "${RunCMake_TEST_FAILURE_MESSAGE}") + endif() message(SEND_ERROR "${test}${RunCMake_TEST_VARIANT_DESCRIPTION} - FAILED:\n${msg}") else() message(STATUS "${test}${RunCMake_TEST_VARIANT_DESCRIPTION} - PASSED") diff --git a/Tests/RunCMake/RunCPack.cmake b/Tests/RunCMake/RunCPack.cmake new file mode 100644 index 0000000..b21eb26 --- /dev/null +++ b/Tests/RunCMake/RunCPack.cmake @@ -0,0 +1,112 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +include(RunCMake) + +#[[ +set(RunPack_GENERATORS ...) +run_cpack(<case> + # general options + [CONFIG <config>] # Build/package given configuration (default "Release"). + [GENERATORS <gen>...] # Tell cpack to use the given generator(s). + [SAMPLE <sample>] # Use RunCPack/<sample> project (default <case>). + + # build step + [BUILD] # Build the test project before packaging. + + # package,cpack-<gen> steps + [PACKAGE] # Run cpack via buildsystem "package" target. + [NO_CPACK] # Do not run cpack directly. + + # verify step + [NO_VERIFY] # Do not run verify step. + [GLOB <glob>...] # Match expected package files with globbing patterns. + [VERIFY <command>...] # Run custom verification command on each package file. + ) +#]] +function(run_cpack case) + cmake_parse_arguments(PARSE_ARGV 1 run_cpack + # Zero-value + "BUILD;PACKAGE;NO_CPACK;NO_VERIFY" + # One-value + "CONFIG;SAMPLE" + # Multi-value + "GENERATORS;GLOB;VERIFY" + ) + + if(DEFINED RunCPack_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown arguments:\n ${RunCPack_UNPARSED_ARGUMENTS}") + endif() + if(DEFINED RunCPack_KEYWORDS_MISSING_VALUES) + message(FATAL_ERROR "Keywords missing values:\n ${RunCPack_KEYWORDS_MISSING_VALUES}") + endif() + + if(run_cpack_GENERATORS) + set(RunCPack_GENERATORS "${run_cpack_GENERATORS}") + elseif(NOT RunCPack_GENERATORS) + message(FATAL_ERROR "RunCPack_GENERATORS not defined by caller!") + endif() + + if(run_cpack_CONFIG) + set(RunCPack_CONFIG "${run_cpack_CONFIG}") + elseif(NOT RunCPack_CONFIG) + set(RunCPack_CONFIG "Release") + endif() + + if(run_cpack_SAMPLE) + set(RunCPack_SAMPLE "${run_cpack_SAMPLE}") + else() + set(RunCPack_SAMPLE "${case}") + endif() + + if(run_cpack_GLOB) + set(RunCPack_GLOB "${run_cpack_GLOB}") + endif() + + if(run_cpack_VERIFY) + set(RunCPack_VERIFY ${run_cpack_VERIFY}) + endif() + + # Configure the sample project. + set(RunCMake_TEST_SOURCE_DIR ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/RunCPack/${RunCPack_SAMPLE}) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build) + string(APPEND RunCMake_TEST_RAW_ARGS " \"-DCPACK_GENERATOR=${RunCPack_GENERATORS}\"") + if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) + list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=${RunCPack_CONFIG}) + endif() + run_cmake(${case}-cmake) + unset(RunCMake_TEST_RAW_ARGS) + set(RunCMake_TEST_NO_CLEAN 1) + + # Optionally build the project. + if(run_cpack_BUILD) + set(RunCMake_TEST_OUTPUT_MERGE 1) + run_cmake_command(${case}-build + "${CMAKE_COMMAND}" --build . --config "${RunCPack_CONFIG}") + unset(RunCMake_TEST_OUTPUT_MERGE) + endif() + + # Optionally package through the build system. + if(run_cpack_PACKAGE) + set(RunCMake_TEST_OUTPUT_MERGE 1) + run_cmake_command(${case}-package + "${CMAKE_COMMAND}" --build . --config "${RunCPack_CONFIG}" --target package) + unset(RunCMake_TEST_OUTPUT_MERGE) + endif() + + # Run cpack with each generator. + if(NOT run_cpack_NO_CPACK) + foreach(RunCPack_GENERATOR IN LISTS RunCPack_GENERATORS) + run_cmake_command(${case}-cpack-${RunCPack_GENERATOR} + "${CMAKE_CPACK_COMMAND}" -C "${RunCPack_CONFIG}" -G "${RunCPack_GENERATOR}") + endforeach() + endif() + + # Verify the resulting package files. + if(NOT run_cpack_NO_VERIFY) + set(RunCMake_TEST_RAW_ARGS " \"-Dglob=${RunCPack_GLOB}\" \"-Dverify=${RunCPack_VERIFY}\" -P \"${CMAKE_CURRENT_FUNCTION_LIST_DIR}/RunCPack/verify.cmake\"") + run_cmake_command(${case}-verify + "${CMAKE_COMMAND}" -Ddir=${RunCMake_TEST_BINARY_DIR}) + unset(RunCMake_TEST_RAW_ARGS) + endif() +endfunction() diff --git a/Tests/CPackWiXGenerator/CMakeLists.txt b/Tests/RunCMake/RunCPack/AppWiX/CMakeLists.txt index 33fdc5e..affd4d4 100644 --- a/Tests/CPackWiXGenerator/CMakeLists.txt +++ b/Tests/RunCMake/RunCPack/AppWiX/CMakeLists.txt @@ -46,6 +46,11 @@ set(CPACK_PACKAGE_VERSION_MINOR "0") set(CPACK_PACKAGE_VERSION_PATCH "0") set(CPACK_PACKAGE_INSTALL_DIRECTORY "CPack Component Example") +if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64") + set(CPACK_WIX_ARCHITECTURE arm64) + set(CPACK_SYSTEM_NAME windows-arm64) +endif() + set(CPACK_WIX_UPGRADE_GUID "BF20CE5E-7F7C-401D-8F7C-AB45E8D170E6") set(CPACK_WIX_UNINSTALL "1") diff --git a/Tests/RunCMake/RunCPack/AppWiX/file with spaces.h b/Tests/RunCMake/RunCPack/AppWiX/file with spaces.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/RunCPack/AppWiX/file with spaces.h diff --git a/Tests/CPackWiXGenerator/license.txt b/Tests/RunCMake/RunCPack/AppWiX/license.txt index 7942783..7942783 100644 --- a/Tests/CPackWiXGenerator/license.txt +++ b/Tests/RunCMake/RunCPack/AppWiX/license.txt diff --git a/Tests/CPackWiXGenerator/mylib.cpp b/Tests/RunCMake/RunCPack/AppWiX/mylib.cpp index 8d63071..8d63071 100644 --- a/Tests/CPackWiXGenerator/mylib.cpp +++ b/Tests/RunCMake/RunCPack/AppWiX/mylib.cpp diff --git a/Tests/CPackWiXGenerator/mylib.h b/Tests/RunCMake/RunCPack/AppWiX/mylib.h index 5d0a822..5d0a822 100644 --- a/Tests/CPackWiXGenerator/mylib.h +++ b/Tests/RunCMake/RunCPack/AppWiX/mylib.h diff --git a/Tests/CPackWiXGenerator/mylibapp.cpp b/Tests/RunCMake/RunCPack/AppWiX/mylibapp.cpp index a438ac7..a438ac7 100644 --- a/Tests/CPackWiXGenerator/mylibapp.cpp +++ b/Tests/RunCMake/RunCPack/AppWiX/mylibapp.cpp diff --git a/Tests/CPackWiXGenerator/myotherapp.cpp b/Tests/RunCMake/RunCPack/AppWiX/myotherapp.cpp index 5047a34..5047a34 100644 --- a/Tests/CPackWiXGenerator/myotherapp.cpp +++ b/Tests/RunCMake/RunCPack/AppWiX/myotherapp.cpp diff --git a/Tests/CPackWiXGenerator/patch.xml b/Tests/RunCMake/RunCPack/AppWiX/patch.xml index 13c392d..13c392d 100644 --- a/Tests/CPackWiXGenerator/patch.xml +++ b/Tests/RunCMake/RunCPack/AppWiX/patch.xml diff --git a/Tests/RunCMake/RunCPack/NuGetLib/CMakeLists.txt b/Tests/RunCMake/RunCPack/NuGetLib/CMakeLists.txt new file mode 100644 index 0000000..55ab638 --- /dev/null +++ b/Tests/RunCMake/RunCPack/NuGetLib/CMakeLists.txt @@ -0,0 +1,34 @@ +# Support for framework-specific dependencies were introduced in 3.30 +# TODO: update this version req to 3.30 +cmake_minimum_required(VERSION 3.29.20240531) +project(CPackNugetGenerator) + +install(FILES notactuallyalib.dll DESTINATION lib/net4) +install(FILES alsonotalib.dll DESTINATION lib/net6.0) + +# Create NuGet package +set(CPACK_GENERATOR NuGet) +set(CPACK_PACKAGE_NAME GeneratorTest) +set(CPACK_PACKAGE_VERSION "1.2.3") +set(CPACK_PACKAGE_VENDOR "ACME Inc") +set(CPACK_NUGET_PACKAGE_OWNERS "ACME Inc") +set(CPACK_PACKAGE_DESCRIPTION "A NuGet package for testing CMake's CPack NuGet generator") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A test NuGet package") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://www.example.com") +set(CPACK_NUGET_PACKAGE_REPOSITORY_URL "https://github.com/example/nugetlib.git") +set(CPACK_NUGET_PACKAGE_REPOSITORY_TYPE git) +set(CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION "MIT") + +# Set up dependencies +set(CPACK_NUGET_PACKAGE_TFMS "net4;net6.0") +set(CPACK_NUGET_PACKAGE_DEPENDENCIES_net4 "Foo;Bar") +# NB: If a version number is omitted, the dependency will not be created +set(CPACK_NUGET_PACKAGE_DEPENDENCIES_net4_Foo_VERSION "1.23") +set(CPACK_NUGET_PACKAGE_DEPENDENCIES_net4_Bar_VERSION "4.3.2") +# NB: General dependencies (not framework-specific) go in this variable +set(CPACK_NUGET_PACKAGE_DEPENDENCIES "Baz") +set(CPACK_NUGET_PACKAGE_DEPENDENCIES_Baz_VERSION "9.8.6") +# NB: Since "net6.0" was listed but no dependencies have been specified, an empty group +# will be added to the nuspec file for this framework. This can be used to address `NU5128`_. + +include(CPack) diff --git a/Tests/RunCMake/RunCPack/NuGetLib/alsonotalib.dll b/Tests/RunCMake/RunCPack/NuGetLib/alsonotalib.dll new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/RunCPack/NuGetLib/alsonotalib.dll diff --git a/Tests/RunCMake/RunCPack/NuGetLib/notactuallyalib.dll b/Tests/RunCMake/RunCPack/NuGetLib/notactuallyalib.dll new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/RunCPack/NuGetLib/notactuallyalib.dll diff --git a/Tests/RunCMake/RunCPack/verify.cmake b/Tests/RunCMake/RunCPack/verify.cmake new file mode 100644 index 0000000..26a52bc --- /dev/null +++ b/Tests/RunCMake/RunCPack/verify.cmake @@ -0,0 +1,14 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +if(glob) + list(TRANSFORM glob PREPEND "${dir}/") + file(GLOB files RELATIVE "${dir}" ${glob}) + foreach(file IN LISTS files) + message(STATUS "${file}") + if(verify) + execute_process(COMMAND ${verify} ${file} COMMAND_ERROR_IS_FATAL ANY) + endif() + endforeach() + message(STATUS "") +endif() diff --git a/Tests/RunCMake/Swift/CMP0157-OLD-build-stdout.txt b/Tests/RunCMake/Swift/CMP0157-OLD-build-stdout.txt index d593b92..4fb69be 100644 --- a/Tests/RunCMake/Swift/CMP0157-OLD-build-stdout.txt +++ b/Tests/RunCMake/Swift/CMP0157-OLD-build-stdout.txt @@ -1 +1 @@ -swiftc(.exe)? .* -output-file-map CMakeFiles(/|\\)greetings_default.dir(//|\\\\)output-file-map.json .* +swiftc(.exe)? .* -output-file-map CMakeFiles(/|\\)greetings_default.dir(/|\\)(Debug)?(/|\\)output-file-map.json .* diff --git a/Tests/RunCMake/Swift/CompileCommands-check.cmake b/Tests/RunCMake/Swift/CompileCommands-check.cmake index 6450745..e33a027 100644 --- a/Tests/RunCMake/Swift/CompileCommands-check.cmake +++ b/Tests/RunCMake/Swift/CompileCommands-check.cmake @@ -11,13 +11,13 @@ set(expected_compile_commands "directory": ".*(/Tests/RunCMake/Swift/CompileCommands-build|\\\\Tests\\\\RunCMake\\\\Swift\\\\CompileCommands-build)", "command": ".*swiftc .* (\\")?.*(/Tests/RunCMake/Swift/E.swift|\\\\Tests\\\\RunCMake\\\\Swift\\\\E.swift)(\\")? (\\")?.*(/Tests/RunCMake/Swift/L.swift|\\\\Tests\\\\RunCMake\\\\Swift\\\\L.swift)(\\")?", "file": ".*(/Tests/RunCMake/Swift/E.swift|\\\\Tests\\\\RunCMake\\\\Swift\\\\E.swift)", - "output": "CMakeFiles/CompileCommandLib.dir/E.swift.o|CMakeFiles\\\\CompileCommandLib.dir\\\\E.swift.obj" + "output": "CMakeFiles/CompileCommandLib.dir/(Debug(/|\\))?E.swift.o|CMakeFiles\\\\CompileCommandLib.dir\\\\E.swift.obj" }, { "directory": ".*(/Tests/RunCMake/Swift/CompileCommands-build|\\\\Tests\\\\RunCMake\\\\Swift\\\\CompileCommands-build)", "command": ".*swiftc .* (\\")?.*(/Tests/RunCMake/Swift/E.swift|\\\\Tests\\\\RunCMake\\\\Swift\\\\E.swift)(\\")? (\\")?.*(/Tests/RunCMake/Swift/L.swift|\\\\Tests\\\\RunCMake\\\\Swift\\\\L.swift)(\\")?", "file": ".*/Tests/RunCMake/Swift/L.swift", - "output": "CMakeFiles/CompileCommandLib.dir/L.swift.o|CMakeFiles\\\\CompileCommandLib.dir\\\\L.swift.obj" + "output": "CMakeFiles/CompileCommandLib.dir/(Debug(/|\\))?L.swift.o|CMakeFiles\\\\CompileCommandLib.dir\\\\L.swift.obj" } ]$]==] ) diff --git a/Tests/RunCMake/Swift/EnableSwift.cmake b/Tests/RunCMake/Swift/EnableSwift.cmake new file mode 100644 index 0000000..19f297a --- /dev/null +++ b/Tests/RunCMake/Swift/EnableSwift.cmake @@ -0,0 +1 @@ +enable_language(Swift) diff --git a/Tests/RunCMake/Swift/ForceResponseFile-check-stdout.txt b/Tests/RunCMake/Swift/ForceResponseFile-check-stdout.txt index ec396d7..adea1f1 100644 --- a/Tests/RunCMake/Swift/ForceResponseFile-check-stdout.txt +++ b/Tests/RunCMake/Swift/ForceResponseFile-check-stdout.txt @@ -1,2 +1,2 @@ -swiftc(.exe)? -j [0-9]+ -num-threads [0-9]+ -c @CMakeFiles(/|\\)L.dir(/|\\)L.o(bj)?.swift.rsp -.*swiftc(.exe)? -emit-library -static -o (libL.a|L.lib) @CMakeFiles(/|\\)L.rsp +swiftc(.exe)? -j [0-9]+ -num-threads [0-9]+ -c @CMakeFiles(/|\\)L.dir(/|\\)(Debug(/|\\))?L.o(bj)?.swift.rsp +.*swiftc(.exe)? -emit-library -static -o (Debug(/|\\))?(libL.a|L.lib) @CMakeFiles(/|\\)L.(Debug\.)?rsp diff --git a/Tests/RunCMake/Swift/ForceResponseFile.cmake b/Tests/RunCMake/Swift/ForceResponseFile.cmake index 7fd4636..880ff72 100644 --- a/Tests/RunCMake/Swift/ForceResponseFile.cmake +++ b/Tests/RunCMake/Swift/ForceResponseFile.cmake @@ -2,8 +2,8 @@ if(POLICY CMP0157) cmake_policy(SET CMP0157 NEW) endif() -if(NOT CMAKE_GENERATOR STREQUAL "Ninja") - message(SEND_ERROR "this test must use Ninja generator, found ${CMAKE_GENERATOR} ") +if(NOT CMAKE_GENERATOR MATCHES "Ninja") + message(SEND_ERROR "this test must use a Ninja generator, found ${CMAKE_GENERATOR} ") endif() set(CMAKE_NINJA_FORCE_RESPONSE_FILE TRUE) diff --git a/Tests/RunCMake/Swift/IncrementalSwift-second-stderr.txt b/Tests/RunCMake/Swift/IncrementalSwift-second-stderr.txt index efa3336..0131378 100644 --- a/Tests/RunCMake/Swift/IncrementalSwift-second-stderr.txt +++ b/Tests/RunCMake/Swift/IncrementalSwift-second-stderr.txt @@ -1,2 +1 @@ -ninja explain: A.swiftmodule is dirty -ninja explain: (libB.a|B.lib) is dirty +ninja explain: (Debug(/|\\))?A.swiftmodule is dirty diff --git a/Tests/RunCMake/Swift/IncrementalSwift-second-stdout.txt b/Tests/RunCMake/Swift/IncrementalSwift-second-stdout.txt index 8e5b97c..7bc8c75 100644 --- a/Tests/RunCMake/Swift/IncrementalSwift-second-stdout.txt +++ b/Tests/RunCMake/Swift/IncrementalSwift-second-stdout.txt @@ -1,3 +1,3 @@ -.*Building Swift object A.swiftmodule CMakeFiles(/|\\)A.dir(/|\\)a.swift.o(bj)? -.*Building Swift object B.swiftmodule CMakeFiles(/|\\)B.dir(/|\\)b.swift.o(bj)? -FAILED: B.swiftmodule CMakeFiles(/|\\)B.dir(/|\\)b.swift.o(bj)? +.*Building Swift Module 'A' with 1 source +.*Building Swift Module 'B' with 1 source +FAILED: (Debug(/|\\))?B.swiftmodule CMakeFiles(/|\\)B.dir(/|\\)(Debug(/|\\))?b.swift.o(bj)? diff --git a/Tests/RunCMake/Swift/RunCMakeTest.cmake b/Tests/RunCMake/Swift/RunCMakeTest.cmake index 3711efb..716075e 100644 --- a/Tests/RunCMake/Swift/RunCMakeTest.cmake +++ b/Tests/RunCMake/Swift/RunCMakeTest.cmake @@ -1,108 +1,138 @@ include(RunCMake) -if(RunCMake_GENERATOR STREQUAL Xcode) - if(XCODE_VERSION VERSION_LESS 6.1) - run_cmake(XcodeTooOld) - elseif(CMake_TEST_Swift) - run_cmake(CMP0157-NEW) - run_cmake(CMP0157-OLD) - run_cmake(CMP0157-WARN) +# Early bailouts. +if(RunCMake_GENERATOR STREQUAL "Xcode" AND XCODE_VERSION VERSION_LESS 6.1) + run_cmake(XcodeTooOld) + return() +elseif(NOT CMake_TEST_Swift) + return() +elseif(NOT RunCMake_GENERATOR MATCHES "^Ninja|^Xcode$") + run_cmake(NotSupported) + return() +endif() + +if(RunCMake_GENERATOR_IS_MULTI_CONFIG) + set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release") +endif() + +block() + run_cmake(CMP0157-NEW) + run_cmake(CMP0157-WARN) + + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0157-OLD-build) + + run_cmake(CMP0157-OLD) + + if(RunCMake_GENERATOR MATCHES "Ninja.*") + set(RunCMake_TEST_NO_CLEAN 1) + # -n: dry-run to avoid actually compiling, -v: verbose to capture executed command + run_cmake_command(CMP0157-OLD-build ${CMAKE_COMMAND} --build . -- -n -v) + endif() +endblock() + +block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SwiftSimple-build) + run_cmake(SwiftSimple) + if(RunCMake_GENERATOR_IS_MULTI_CONFIG AND + # Older Xcode versions didn't support Swift static libraries. + NOT (RunCMake_GENERATOR STREQUAL "Xcode" AND XCODE_VERSION VERSION_LESS 9.0)) + # Check that .swiftmodule files get their own directories + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(SwiftSimple-build-Debug ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(SwiftSimple-build-Release ${CMAKE_COMMAND} --build . --config Release) + + # Will fail if either path doesn't exist. Passing -r because Xcode + # generates .swiftmodule directories. + run_cmake_command(SwiftSimple-verify ${CMAKE_COMMAND} -E + rm -r Debug/L.swiftmodule Release/L.swiftmodule) endif() -elseif(RunCMake_GENERATOR STREQUAL Ninja) - if(CMake_TEST_Swift) +endblock() + +if(RunCMake_GENERATOR MATCHES "Ninja") + block() if (CMAKE_SYSTEM_NAME MATCHES "Windows") run_cmake_with_options(Win32ExecutableDisallowed) else() run_cmake_with_options(Win32ExecutableIgnored) - set(RunCMake_TEST_OPTIONS -DCMAKE_SYSTEM_NAME=Darwin) + list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_SYSTEM_NAME=Darwin) run_cmake(SwiftMultiArch) - unset(RunCMake_TEST_OPTIONS) endif() + endblock() - # Test that a second build with no changes does nothing. - block() - run_cmake(NoWorkToDo) - set(RunCMake_TEST_NO_CLEAN 1) - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/NoWorkToDo-build) - set(RunCMake_TEST_OUTPUT_MERGE 1) - run_cmake_command(NoWorkToDo-build ${CMAKE_COMMAND} --build .) - run_cmake_command(NoWorkToDo-nowork ${CMAKE_COMMAND} --build . -- -d explain) - file(WRITE ${RunCMake_TEST_BINARY_DIR}/hello.swift "//No-op change\n") - run_cmake_command(NoWorkToDo-norelink ${CMAKE_COMMAND} --build . -- -d explain) - run_cmake_command(NoWorkToDo-nowork ${CMAKE_COMMAND} --build . -- -d explain) - endblock() - - # Test that intermediate static libraries are rebuilt when the public - # interface of their dependency changes - block() - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/IncrementalSwift-build) - # Since files are modified during test, the files are created in the cmake - # file into the build directory - run_cmake(IncrementalSwift) - set(RunCMake_TEST_NO_CLEAN 1) - run_cmake_command(IncrementalSwift-first ${CMAKE_COMMAND} --build .) + # Test that a second build with no changes does nothing. + block() + run_cmake(NoWorkToDo) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/NoWorkToDo-build) + set(RunCMake_TEST_OUTPUT_MERGE 1) + run_cmake_command(NoWorkToDo-build ${CMAKE_COMMAND} --build .) + run_cmake_command(NoWorkToDo-nowork ${CMAKE_COMMAND} --build . -- -d explain) + file(WRITE ${RunCMake_TEST_BINARY_DIR}/hello.swift "//No-op change\n") + run_cmake_command(NoWorkToDo-norelink ${CMAKE_COMMAND} --build . -- -d explain) + run_cmake_command(NoWorkToDo-nowork ${CMAKE_COMMAND} --build . -- -d explain) + endblock() - # Modify public interface of libA requiring rebuild of libB - file(WRITE ${RunCMake_TEST_BINARY_DIR}/a.swift - "public func callA() -> Float { return 32.0 }\n") + # Test that intermediate static libraries are rebuilt when the public + # interface of their dependency changes + block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/IncrementalSwift-build) + # Since files are modified during test, the files are created in the cmake + # file into the build directory + run_cmake(IncrementalSwift) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(IncrementalSwift-first ${CMAKE_COMMAND} --build .) - # Note: We still expect this to fail, but instead of failure at link time, - # it should fail while re-compiling libB because the function changed - run_cmake_command(IncrementalSwift-second ${CMAKE_COMMAND} --build . -- -d explain) - endblock() + # Modify public interface of libA requiring rebuild of libB + file(WRITE ${RunCMake_TEST_BINARY_DIR}/a.swift + "public func callA() -> Float { return 32.0 }\n") - block() - run_cmake(CMP0157-NEW) - run_cmake(CMP0157-WARN) + # Note: We still expect this to fail, but instead of failure at link time, + # it should fail while re-compiling libB because the function changed + run_cmake_command(IncrementalSwift-second ${CMAKE_COMMAND} --build . -- -d explain) + endblock() - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0157-OLD-build) - run_cmake(CMP0157-OLD) - set(RunCMake_TEST_NO_CLEAN 1) - # -n: dry-run to avoid actually compiling, -v: verbose to capture executed command - run_cmake_command(CMP0157-OLD-build ${CMAKE_COMMAND} --build . -- -n -v) - endblock() + block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CompileCommands-build) + run_cmake(CompileCommands) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(CompileCommands-check ${CMAKE_COMMAND} --build .) + endblock() - block() - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CompileCommands-build) - run_cmake(CompileCommands) - set(RunCMake_TEST_NO_CLEAN 1) - run_cmake_command(CompileCommands-check ${CMAKE_COMMAND} --build .) - endblock() + block() + # Try enabling Swift with a static-library try-compile + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/StaticLibTryCompile-build) + list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY) + run_cmake(EnableSwift) + endblock() - block() - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ForceResponseFile-build) - run_cmake(ForceResponseFile) - set(RunCMake_TEST_NO_CLEAN 1) - # -v: verbose to capture executed commands -n: dry-run to avoid actually compiling - run_cmake_command(ForceResponseFile-check ${CMAKE_COMMAND} --build . -- -vn) - endblock() - - block() - if(CMAKE_SYSTEM_NAME MATCHES Windows) - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ImportLibraryFlags-build) - run_cmake(ImportLibraryFlags) - set(RunCMake_TEST_NO_CLEAN 1) - run_cmake_command(ImportLibraryFlags-check ${CMAKE_COMMAND} --build . -- -n -v) - endif() - endblock() - - block() - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SwiftLibraryModuleCommand-build) - run_cmake(SwiftLibraryModuleCommand) + block() + # Try enabling Swift with an executable try-compile + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExecutableTryCompile-build) + list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_TRY_COMPILE_TARGET_TYPE=EXECUTABLE) + run_cmake(EnableSwift) + endblock() + + block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ForceResponseFile-build) + run_cmake(ForceResponseFile) + set(RunCMake_TEST_NO_CLEAN 1) + # -v: verbose to capture executed commands -n: dry-run to avoid actually compiling + run_cmake_command(ForceResponseFile-check ${CMAKE_COMMAND} --build . -- -vn) + endblock() + + block() + if(CMAKE_SYSTEM_NAME MATCHES Windows) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ImportLibraryFlags-build) + run_cmake(ImportLibraryFlags) set(RunCMake_TEST_NO_CLEAN 1) - run_cmake_command(SwiftLibraryModuleCommand-check ${CMAKE_COMMAND} --build . -- -n -v) - endblock() - endif() -elseif(RunCMake_GENERATOR STREQUAL "Ninja Multi-Config") - if(CMake_TEST_Swift) - set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release") - run_cmake(SwiftSimple) - - run_cmake(CMP0157-NEW) - run_cmake(CMP0157-OLD) - run_cmake(CMP0157-WARN) - unset(RunCMake_TEST_OPTIONS) - endif() -else() - run_cmake(NotSupported) + run_cmake_command(ImportLibraryFlags-check ${CMAKE_COMMAND} --build . -- -n -v) + endif() + endblock() + + block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SwiftLibraryModuleCommand-build) + run_cmake(SwiftLibraryModuleCommand) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(SwiftLibraryModuleCommand-check ${CMAKE_COMMAND} --build . -- -n -v) + endblock() endif() diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt index 6b462d0..415f404 100644 --- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt +++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt @@ -42,6 +42,7 @@ \* CMP0156 \* CMP0157 \* CMP0160 + \* CMP0162 Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake b/Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake index 689b35f..b5b195a 100644 --- a/Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake +++ b/Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake @@ -9,7 +9,7 @@ macro(RuntimeLibrary_check tgt rtl_expect) file(STRINGS "${vcProjectFile}" lines) foreach(line IN LISTS lines) - if(line MATCHES "^ *<RuntimeLibrary>([^<>]+)</RuntimeLibrary>") + if(line MATCHES "^ *<RuntimeLibrary>([^<>]*)</RuntimeLibrary>") set(rtl_actual "${CMAKE_MATCH_1}") if(NOT "${rtl_actual}" STREQUAL "${rtl_expect}") set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj has RuntimeLibrary '${rtl_actual}', not '${rtl_expect}'.") diff --git a/Tests/RunCMake/VS10Project/VsCustomProps-check.cmake b/Tests/RunCMake/VS10Project/VsCustomProps-check.cmake index 22a3df0..ad585d5 100644 --- a/Tests/RunCMake/VS10Project/VsCustomProps-check.cmake +++ b/Tests/RunCMake/VS10Project/VsCustomProps-check.cmake @@ -1,25 +1,30 @@ -set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj") -if(NOT EXISTS "${vcProjectFile}") - set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.") - return() -endif() +macro(check_custom_prop suffix) + set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj${suffix}") + if(NOT EXISTS "${vcProjectFile}") + set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.") + return() + endif() -set(importFound FALSE) + set(importFound FALSE) -set(props_file "${RunCMake_SOURCE_DIR}/my.props") -file(TO_NATIVE_PATH "${props_file}" check_file) -file(STRINGS "${vcProjectFile}" lines) -foreach(line IN LISTS lines) - if(line MATCHES "^ *<Import Project=\"([^\"]+)\".*Label=\"([^\"]+)\".*$") - if("${CMAKE_MATCH_1}" STREQUAL "${check_file}" AND - "${CMAKE_MATCH_2}" STREQUAL "LocalAppDataPlatform") - message(STATUS "foo.vcxproj is importing ${check_file}") - set(importFound TRUE) + set(props_file "${RunCMake_SOURCE_DIR}/my.props") + file(TO_NATIVE_PATH "${props_file}" check_file) + file(STRINGS "${vcProjectFile}" lines) + foreach(line IN LISTS lines) + if(line MATCHES "^ *<Import Project=\"([^\"]+)\".*Label=\"([^\"]+)\".*$") + if("${CMAKE_MATCH_1}" STREQUAL "${check_file}" AND + "${CMAKE_MATCH_2}" STREQUAL "LocalAppDataPlatform") + message(STATUS "foo.vcxproj${suffix} is importing ${check_file}") + set(importFound TRUE) + endif() endif() + endforeach() + + if(NOT importFound) + set(RunCMake_TEST_FAILED "Import of custom .props file not found.") + return() endif() -endforeach() +endmacro() -if(NOT importFound) - set(RunCMake_TEST_FAILED "Import of custom .props file not found.") - return() -endif() +check_custom_prop("") +check_custom_prop(".filters") diff --git a/Tests/RunCMake/VS10Project/VsCustomProps.cmake b/Tests/RunCMake/VS10Project/VsCustomProps.cmake index fbbcfcf..d6c905f 100644 --- a/Tests/RunCMake/VS10Project/VsCustomProps.cmake +++ b/Tests/RunCMake/VS10Project/VsCustomProps.cmake @@ -4,4 +4,5 @@ add_library(foo foo.cpp) set(props_file "${CMAKE_CURRENT_SOURCE_DIR}/my.props") set_target_properties(foo PROPERTIES - VS_USER_PROPS "${props_file}") + VS_USER_PROPS "${props_file}" + VS_FILTER_PROPS "${props_file}") diff --git a/Tests/RunCMake/VS10Project/VsJustMyCode-check.cmake b/Tests/RunCMake/VS10Project/VsJustMyCode-check.cmake index 7119976..e76d931 100644 --- a/Tests/RunCMake/VS10Project/VsJustMyCode-check.cmake +++ b/Tests/RunCMake/VS10Project/VsJustMyCode-check.cmake @@ -9,7 +9,7 @@ macro(VsJustMyCode_check tgt jmc_expect) file(STRINGS "${vcProjectFile}" lines) foreach(line IN LISTS lines) - if(line MATCHES "^ *<SupportJustMyCode>([^<>]+)</SupportJustMyCode>") + if(line MATCHES "^ *<SupportJustMyCode>([^<>]*)</SupportJustMyCode>") set(jmc_actual "${CMAKE_MATCH_1}") if(NOT "${jmc_actual}" STREQUAL "${jmc_expect}") set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj has <SupportJustMyCode> '${jmc_actual}', not '${jmc_expect}'.") diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMP0091-OLD-check.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMP0091-OLD-check.cmake new file mode 100644 index 0000000..2ab8960 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMP0091-OLD-check.cmake @@ -0,0 +1,8 @@ +include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake) + +UseDebugLibraries_check(default "true" "false") +UseDebugLibraries_check(defaultCLR "true" "false") +UseDebugLibraries_check(defaultUtil "true" "false") +UseDebugLibraries_check(defaultRTL "true" "false") +UseDebugLibraries_check(ALL_BUILD "true" "false") +UseDebugLibraries_check(ZERO_CHECK "true" "false") diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMP0091-OLD-stderr.txt b/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMP0091-OLD-stderr.txt new file mode 100644 index 0000000..9d1b69e --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMP0091-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0091-OLD\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0091 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/VS10ProjectUseDebugLibraries/CMP0091-OLD.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMP0091-OLD.cmake new file mode 100644 index 0000000..d8142ee --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMP0091-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0091 OLD) +include(Default-CMP0162-NEW.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMakeLists.txt b/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMakeLists.txt new file mode 100644 index 0000000..392312d --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.29) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-NEW-check.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-NEW-check.cmake new file mode 100644 index 0000000..b5e6fae --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-NEW-check.cmake @@ -0,0 +1,8 @@ +include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake) + +UseDebugLibraries_check(default "true" "false") +UseDebugLibraries_check(defaultCLR "true" "false") +UseDebugLibraries_check(defaultUtil "true" "false") +UseDebugLibraries_check(defaultRTL "false" "false") +UseDebugLibraries_check(ALL_BUILD "true" "false") +UseDebugLibraries_check(ZERO_CHECK "true" "false") diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-NEW.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-NEW.cmake new file mode 100644 index 0000000..be6869d --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0162 NEW) +include(Default-common.cmake) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-WARN-check.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-WARN-check.cmake new file mode 100644 index 0000000..673144e --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-WARN-check.cmake @@ -0,0 +1,8 @@ +include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake) + +UseDebugLibraries_check(default "" "") +UseDebugLibraries_check(defaultCLR "" "") +UseDebugLibraries_check(defaultUtil "" "") +UseDebugLibraries_check(defaultRTL "" "") +UseDebugLibraries_check(ALL_BUILD "" "") +UseDebugLibraries_check(ZERO_CHECK "" "") diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-WARN.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-WARN.cmake new file mode 100644 index 0000000..7696944 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-CMP0162-WARN.cmake @@ -0,0 +1,2 @@ +# Leave CMP0162 unset. +include(Default-common.cmake) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-common.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-common.cmake new file mode 100644 index 0000000..6afcfb6 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Default-common.cmake @@ -0,0 +1,10 @@ +set(CMAKE_CONFIGURATION_TYPES Debug Release) +enable_language(CXX) + +# Test several generator code paths covering different target types. +add_library(default empty.cxx) +add_library(defaultCLR empty.cxx) +set_property(TARGET defaultCLR PROPERTY COMMON_LANGUAGE_RUNTIME "") +add_library(defaultRTL empty.cxx) +set_property(TARGET defaultRTL PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") +add_custom_target(defaultUtil) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-NEW-check.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-NEW-check.cmake new file mode 100644 index 0000000..832a7f3 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-NEW-check.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/Explicit-check-common.cmake) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-NEW.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-NEW.cmake new file mode 100644 index 0000000..a5f8d4a --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0162 NEW) +include(Explicit-common.cmake) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-OLD-check.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-OLD-check.cmake new file mode 100644 index 0000000..832a7f3 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-OLD-check.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/Explicit-check-common.cmake) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-OLD.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-OLD.cmake new file mode 100644 index 0000000..1e60c52 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-CMP0162-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0162 OLD) +include(Explicit-common.cmake) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-check-common.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-check-common.cmake new file mode 100644 index 0000000..385b798 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-check-common.cmake @@ -0,0 +1,10 @@ +include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake) + +UseDebugLibraries_check(empty "" "") +UseDebugLibraries_check(emptyCLR "" "") +UseDebugLibraries_check(emptyUtil "" "") +UseDebugLibraries_check(genex "true" "false") +UseDebugLibraries_check(genexCLR "true" "false") +UseDebugLibraries_check(genexUtil "true" "false") +UseDebugLibraries_check(ALL_BUILD "false" "false") +UseDebugLibraries_check(ZERO_CHECK "false" "false") diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-common.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-common.cmake new file mode 100644 index 0000000..3433745 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/Explicit-common.cmake @@ -0,0 +1,20 @@ +set(CMAKE_CONFIGURATION_TYPES Debug Release) +enable_language(CXX) + +# An empty string suppresses generation of the setting. +set(CMAKE_VS_USE_DEBUG_LIBRARIES "") +add_library(empty empty.cxx) +add_library(emptyCLR empty.cxx) +set_property(TARGET emptyCLR PROPERTY COMMON_LANGUAGE_RUNTIME "") +add_custom_target(emptyUtil) + +# A generator expression can encode per-config values. +set(CMAKE_VS_USE_DEBUG_LIBRARIES "$<CONFIG:Debug>") +add_library(genex empty.cxx) +add_library(genexCLR empty.cxx) +set_property(TARGET genexCLR PROPERTY COMMON_LANGUAGE_RUNTIME "") +add_custom_target(genexUtil) + +# The last setting in the top-level directcory affects +# the builtin targets like ALL_BUILD and ZERO_CHECK. +set(CMAKE_VS_USE_DEBUG_LIBRARIES 0) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/RunCMakeTest.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/RunCMakeTest.cmake new file mode 100644 index 0000000..57402eb --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/RunCMakeTest.cmake @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.29) +include(RunCMake) + +run_cmake(CMP0091-OLD) +run_cmake(Default-CMP0162-NEW) +run_cmake(Default-CMP0162-WARN) +run_cmake(Explicit-CMP0162-NEW) +run_cmake(Explicit-CMP0162-OLD) diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/check-common.cmake b/Tests/RunCMake/VS10ProjectUseDebugLibraries/check-common.cmake new file mode 100644 index 0000000..311c8a7 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/check-common.cmake @@ -0,0 +1,42 @@ +cmake_policy(SET CMP0140 NEW) +function(UseDebugLibraries_check tgt udl_expect_debug udl_expect_release) + set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/${tgt}.vcxproj") + if(NOT EXISTS "${vcProjectFile}") + set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not exist.") + return() + endif() + + set(have_udl_debug 0) + set(have_udl_release 0) + set(inConfig "") + + file(STRINGS "${vcProjectFile}" lines) + foreach(line IN LISTS lines) + if(line MATCHES [[^ *<PropertyGroup Condition="'\$\(Configuration\)\|\$\(Platform\)'=='([^"|]+)\|[^"]+" Label="Configuration">.*$]]) + string(TOLOWER "${CMAKE_MATCH_1}" inConfig) + elseif(inConfig) + if(line MATCHES "^ *</PropertyGroup>.*$") + set(inConfig "") + elseif(line MATCHES "^ *<UseDebugLibraries>([^<>]+)</UseDebugLibraries>") + set(udl_actual "${CMAKE_MATCH_1}") + set(have_udl_${inConfig} 1) + if (NOT "${udl_expect_${inConfig}}" STREQUAL "") + if(NOT "${udl_actual}" STREQUAL "${udl_expect_${inConfig}}") + string(APPEND RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj has ${inConfig} UseDebugLibraries '${udl_actual}', not '${udl_expect_${inConfig}}'.\n") + endif() + else() + string(APPEND RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj has ${inConfig} UseDebugLibraries '${udl_actual}', but should not have one.\n") + endif() + unset(udl_actual) + endif() + endif() + endforeach() + + if(NOT have_udl_debug AND NOT "${udl_expect_debug}" STREQUAL "") + string(APPEND RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not have a debug UseDebugLibraries field, but should have one.\n") + endif() + if(NOT have_udl_release AND NOT "${udl_expect_release}" STREQUAL "") + string(APPEND RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not have a release UseDebugLibraries field, but should have one.\n") + endif() + return(PROPAGATE RunCMake_TEST_FAILED) +endfunction() diff --git a/Tests/RunCMake/VS10ProjectUseDebugLibraries/empty.cxx b/Tests/RunCMake/VS10ProjectUseDebugLibraries/empty.cxx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectUseDebugLibraries/empty.cxx diff --git a/Tests/RunCMake/VSSolution/RunCMakeTest.cmake b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake index 134821d..8737c9a 100644 --- a/Tests/RunCMake/VSSolution/RunCMakeTest.cmake +++ b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake @@ -13,9 +13,7 @@ run_cmake(StartupProject) run_cmake(StartupProjectMissing) run_cmake(AddPackageToDefault) -if(NOT NO_USE_FOLDERS) - run_cmake(StartupProjectUseFolders) - run_cmake(CMP0143-WARN) - run_cmake_with_options(CMP0143-OLD "-DCMAKE_POLICY_DEFAULT_CMP0143=OLD") - run_cmake_with_options(CMP0143-NEW "-DCMAKE_POLICY_DEFAULT_CMP0143=NEW") -endif() +run_cmake(StartupProjectUseFolders) +run_cmake(CMP0143-WARN) +run_cmake_with_options(CMP0143-OLD "-DCMAKE_POLICY_DEFAULT_CMP0143=OLD") +run_cmake_with_options(CMP0143-NEW "-DCMAKE_POLICY_DEFAULT_CMP0143=NEW") diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-check.cmake b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-check.cmake index 4d5508d..081e09a 100644 --- a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-check.cmake +++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-check.cmake @@ -9,7 +9,7 @@ function(check_file target filename) if(filename MATCHES "^(.*)(\\.[a-z]+)$") set(header_filename "${CMAKE_MATCH_1}") endif() - set(expected_contents "#include <${header_filename}> // IWYU pragma: associated\n") + set(expected_contents "/* NOLINTNEXTLINE(misc-header-include-cycle,misc-include-cleaner) */\n#include <${header_filename}> /* IWYU pragma: associated */\n") file(READ "${full_filename}" actual_contents) if(NOT actual_contents STREQUAL expected_contents) diff --git a/Tests/RunCMake/XcodeProject/ArchsStandard-stdout.txt b/Tests/RunCMake/XcodeProject/ArchsStandard-stdout.txt new file mode 100644 index 0000000..460b33c --- /dev/null +++ b/Tests/RunCMake/XcodeProject/ArchsStandard-stdout.txt @@ -0,0 +1 @@ +-- Detecting C compiler ABI info - done diff --git a/Tests/RunCMake/XcodeProject/ArchsStandard.cmake b/Tests/RunCMake/XcodeProject/ArchsStandard.cmake new file mode 100644 index 0000000..56d9e64 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/ArchsStandard.cmake @@ -0,0 +1,4 @@ +if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "$(ARCHS_STANDARD)") + message(FATAL_ERROR "CMAKE_OSX_ARCHITECTURES is not $(ARCHS_STANDARD)") +endif() +enable_language(C) diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index c124950..5e22666 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -9,6 +9,8 @@ function(RunClean) endfunction() RunClean() +run_cmake_with_options(ArchsStandard "-DCMAKE_OSX_ARCHITECTURES=$(ARCHS_STANDARD)") + run_cmake(ExplicitCMakeLists) run_cmake(ImplicitCMakeLists) run_cmake(InterfaceLibSources) diff --git a/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake b/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake index 1847bc9..48b4680 100644 --- a/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake @@ -1,4 +1,4 @@ -set(expect-default "explicitFileType = sourcecode") +set(expect-default "explicitFileType = default") set(expect-explicit "explicitFileType = sourcecode.c.h") set(expect-lastKnown "lastKnownFileType = sourcecode.c.h") foreach(src default explicit lastKnown) diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration-check.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration-check.cmake new file mode 100644 index 0000000..4e139d4 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration-check.cmake @@ -0,0 +1,19 @@ + +set(schema "${RunCMake_TEST_BINARY_DIR}/XcodeSchemaGeneration.xcodeproj/xcshareddata/xcschemes/foo.xcscheme") + +if(NOT EXISTS "${schema}") + set(RunCMake_TEST_FAILED "Generated schema ${schema} does not exist.") + return() +endif() + +execute_process(COMMAND + /usr/bin/xmllint --xpath "//Scheme/ProfileAction/BuildableProductRunnable" ${schema} + OUTPUT_VARIABLE stdout + ERROR_VARIABLE stderr + RESULT_VARIABLE exit_code + ERROR_STRIP_TRAILING_WHITESPACE +) +if(exit_code) + set(RunCMake_TEST_FAILED "Failed to find BuildableProductRunnable for profile action: ${stderr}") + return() +endif() diff --git a/Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt b/Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt index 547fb1c..5741ae5 100644 --- a/Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt +++ b/Tests/RunCMake/add_custom_command/BadByproduct-stderr.txt @@ -1,9 +1,3 @@ -CMake Error at BadByproduct.cmake:2 \(add_custom_command\): - BYPRODUCTS containing a "#" is not allowed. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) - - CMake Error at BadByproduct.cmake:3 \(add_custom_command\): BYPRODUCTS containing a "<" is not allowed. Call Stack \(most recent call first\): @@ -17,7 +11,7 @@ Call Stack \(most recent call first\): ( CMake Error at BadByproduct.cmake:5 \(add_custom_command\): - BYPRODUCTS containing a "#" is not allowed. + BYPRODUCTS containing a ">" is not allowed. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_command/BadByproduct.cmake b/Tests/RunCMake/add_custom_command/BadByproduct.cmake index cf00f5b..4fe0b82 100644 --- a/Tests/RunCMake/add_custom_command/BadByproduct.cmake +++ b/Tests/RunCMake/add_custom_command/BadByproduct.cmake @@ -1,8 +1,8 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON) -add_custom_command(OUTPUT a BYPRODUCTS "a#") + add_custom_command(OUTPUT b BYPRODUCTS "a<") add_custom_command(OUTPUT c BYPRODUCTS "a>") -add_custom_command(OUTPUT d BYPRODUCTS "$<CONFIG>/#") +add_custom_command(OUTPUT d BYPRODUCTS "$<CONFIG>/$<ANGLE-R>") add_custom_command(OUTPUT e BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/f) add_custom_command(OUTPUT f BYPRODUCTS "$<TARGET_PROPERTY:prop>") add_custom_command(OUTPUT h BYPRODUCTS "$<OUTPUT_CONFIG:h>") diff --git a/Tests/RunCMake/add_custom_command/BadOutput-stderr.txt b/Tests/RunCMake/add_custom_command/BadOutput-stderr.txt index 2e43568..9d25949 100644 --- a/Tests/RunCMake/add_custom_command/BadOutput-stderr.txt +++ b/Tests/RunCMake/add_custom_command/BadOutput-stderr.txt @@ -1,9 +1,3 @@ -CMake Error at BadOutput.cmake:2 \(add_custom_command\): - OUTPUT containing a "#" is not allowed. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) - - CMake Error at BadOutput.cmake:3 \(add_custom_command\): OUTPUT containing a "<" is not allowed. Call Stack \(most recent call first\): @@ -17,7 +11,7 @@ Call Stack \(most recent call first\): ( CMake Error at BadOutput.cmake:5 \(add_custom_command\): - OUTPUT containing a "#" is not allowed. + OUTPUT containing a ">" is not allowed. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_command/BadOutput.cmake b/Tests/RunCMake/add_custom_command/BadOutput.cmake index f04bdd1..0f6bd07 100644 --- a/Tests/RunCMake/add_custom_command/BadOutput.cmake +++ b/Tests/RunCMake/add_custom_command/BadOutput.cmake @@ -1,8 +1,8 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON) -add_custom_command(OUTPUT "a#" COMMAND a) + add_custom_command(OUTPUT "a<" COMMAND b) add_custom_command(OUTPUT "a>" COMMAND c) -add_custom_command(OUTPUT "$<CONFIG>/#" COMMAND d) +add_custom_command(OUTPUT "$<CONFIG>/$<ANGLE-R>" COMMAND d) add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/e COMMAND f) add_custom_command(OUTPUT "$<TARGET_PROPERTY:prop>" COMMAND g) add_custom_command(OUTPUT "$<OUTPUT_CONFIG:h>" COMMAND h) diff --git a/Tests/RunCMake/add_custom_command/CommentGenex-build-stdout.txt b/Tests/RunCMake/add_custom_command/CommentGenex-build-stdout.txt index bf49657..76708c4 100644 --- a/Tests/RunCMake/add_custom_command/CommentGenex-build-stdout.txt +++ b/Tests/RunCMake/add_custom_command/CommentGenex-build-stdout.txt @@ -1 +1 @@ -lorem ipsum, 01 +"lorem ipsum, 01" diff --git a/Tests/RunCMake/add_custom_command/CommentGenex.cmake b/Tests/RunCMake/add_custom_command/CommentGenex.cmake index f517392..b3931f4 100644 --- a/Tests/RunCMake/add_custom_command/CommentGenex.cmake +++ b/Tests/RunCMake/add_custom_command/CommentGenex.cmake @@ -3,7 +3,7 @@ set_property(TARGET helper PROPERTY MY_TEXT "lorem ipsum") add_custom_command( OUTPUT out.txt COMMAND ${CMAKE_COMMAND} -E echo true - COMMENT "$<TARGET_PROPERTY:helper,MY_TEXT>$<COMMA> $<STREQUAL:foo,bar>$<EQUAL:42,42>" + COMMENT "$<QUOTE>$<TARGET_PROPERTY:helper,MY_TEXT>$<COMMA> $<STREQUAL:foo,bar>$<EQUAL:42,42>$<QUOTE>" ) set_property(SOURCE out.txt PROPERTY SYMBOLIC 1) add_custom_target(main ALL DEPENDS out.txt) diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake index 713b269..46e7bae 100644 --- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake @@ -19,7 +19,7 @@ run_cmake(TargetImported) run_cmake(TargetLiteralQuotes) run_cmake(TargetNotInDir) -if(${RunCMake_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])") +if(RunCMake_GENERATOR MATCHES "Visual Studio") run_cmake(RemoveEmptyCommands) endif() diff --git a/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt b/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt index da9af49..b734ddd 100644 --- a/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt +++ b/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt @@ -1,9 +1,3 @@ -CMake Error at BadByproduct.cmake:2 \(add_custom_target\): - BYPRODUCTS containing a "#" is not allowed. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) - - CMake Error at BadByproduct.cmake:3 \(add_custom_target\): BYPRODUCTS containing a "<" is not allowed. Call Stack \(most recent call first\): @@ -17,7 +11,7 @@ Call Stack \(most recent call first\): ( CMake Error at BadByproduct.cmake:5 \(add_custom_target\): - BYPRODUCTS containing a "#" is not allowed. + BYPRODUCTS containing a ">" is not allowed. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_target/BadByproduct.cmake b/Tests/RunCMake/add_custom_target/BadByproduct.cmake index c317b83..d29c02f 100644 --- a/Tests/RunCMake/add_custom_target/BadByproduct.cmake +++ b/Tests/RunCMake/add_custom_target/BadByproduct.cmake @@ -1,8 +1,8 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON) -add_custom_target(a BYPRODUCTS "a#" COMMAND b) + add_custom_target(c BYPRODUCTS "a<" COMMAND d) add_custom_target(e BYPRODUCTS "a>" COMMAND f) -add_custom_target(g BYPRODUCTS "$<CONFIG>/#" COMMAND h) +add_custom_target(g BYPRODUCTS "$<CONFIG>/$<ANGLE-R>" COMMAND h) add_custom_target(i BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/j COMMAND k) add_custom_target(l BYPRODUCTS "$<TARGET_PROPERTY:prop>" COMMAND m) add_custom_target(n BYPRODUCTS "$<OUTPUT_CONFIG:n>" COMMAND o) diff --git a/Tests/RunCMake/add_library/RunCMakeTest.cmake b/Tests/RunCMake/add_library/RunCMakeTest.cmake index 3283625..26b94f8 100644 --- a/Tests/RunCMake/add_library/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_library/RunCMakeTest.cmake @@ -22,3 +22,7 @@ run_cmake(STATICwithNoSourcesButLinkObjects) run_cmake(SHAREDwithNoSourcesButLinkObjects) run_cmake(MODULEwithNoSourcesButLinkObjects) run_cmake(UNKNOWNwithNoSourcesButLinkObjects) + +run_cmake(TARGET_SUPPORTS_SHARED_LIBS_CMP0164_OLD) +run_cmake(TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW) +run_cmake(TARGET_SUPPORTS_SHARED_LIBS_CMP0164_WARN) diff --git a/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW-result.txt b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW-stderr.txt b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW-stderr.txt new file mode 100644 index 0000000..2a13236 --- /dev/null +++ b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW.cmake:[0-9]+ \(add_library\): + ADD_LIBRARY called with SHARED option but the target platform does not + support dynamic linking. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW.cmake b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW.cmake new file mode 100644 index 0000000..0f4d34b --- /dev/null +++ b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_NEW.cmake @@ -0,0 +1,4 @@ +enable_language(CXX) +cmake_policy(SET CMP0164 NEW) +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) +add_library(someLib SHARED test.cpp) diff --git a/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_OLD.cmake b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_OLD.cmake new file mode 100644 index 0000000..3c90403 --- /dev/null +++ b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_OLD.cmake @@ -0,0 +1,9 @@ +enable_language(CXX) +cmake_policy(SET CMP0164 OLD) +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) + +add_library(someLib SHARED test.cpp) +get_target_property(someLibType someLib TYPE) +if(NOT someLibType STREQUAL "STATIC_LIBRARY") + message(FATAL_ERROR "expected type does not match") +endif() diff --git a/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_WARN-stderr.txt b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_WARN-stderr.txt new file mode 100644 index 0000000..89a61c0 --- /dev/null +++ b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_WARN-stderr.txt @@ -0,0 +1,7 @@ +^CMake Warning \(dev\) at TARGET_SUPPORTS_SHARED_LIBS_CMP0164_WARN.cmake:[0-9]+ \(add_library\): + ADD_LIBRARY called with SHARED option but the target platform does not + support dynamic linking. Building a STATIC library instead. This may lead + to problems. +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/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_WARN.cmake b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_WARN.cmake new file mode 100644 index 0000000..1f5cc84 --- /dev/null +++ b/Tests/RunCMake/add_library/TARGET_SUPPORTS_SHARED_LIBS_CMP0164_WARN.cmake @@ -0,0 +1,3 @@ +enable_language(CXX) +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) +add_library(someLib SHARED test.cpp) diff --git a/Tests/RunCMake/add_subdirectory/ChangeConfigMulti.cmake b/Tests/RunCMake/add_subdirectory/ChangeConfigMulti.cmake new file mode 100644 index 0000000..449c5c8 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/ChangeConfigMulti.cmake @@ -0,0 +1 @@ +add_subdirectory(ChangeConfigMulti) diff --git a/Tests/RunCMake/add_subdirectory/ChangeConfigMulti/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/ChangeConfigMulti/CMakeLists.txt new file mode 100644 index 0000000..3ea7fc5 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/ChangeConfigMulti/CMakeLists.txt @@ -0,0 +1 @@ +set(CMAKE_CONFIGURATION_TYPES NotDebug NotRelease) diff --git a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake index 3c70d07..801abae 100644 --- a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake @@ -7,6 +7,10 @@ set(RunCMake_TEST_OPTIONS -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}) run_cmake(System) unset(RunCMake_TEST_OPTIONS) +if(RunCMake_GENERATOR_IS_MULTI_CONFIG) + run_cmake_with_options(ChangeConfigMulti "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release") +endif() + macro(run_cmake_install case) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build) set(RunCMake_TEST_NO_CLEAN 1) diff --git a/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake b/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake index 0b3576d..76dff4f 100644 --- a/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_host_system_information/RunCMakeTest.cmake @@ -16,7 +16,7 @@ run_cmake(Debian6) run_cmake(UserFallbackScript) -if(RunCMake_GENERATOR MATCHES "^Visual Studio " AND NOT RunCMake_GENERATOR STREQUAL "Visual Studio 9 2008") +if(RunCMake_GENERATOR MATCHES "Visual Studio") run_cmake(VsMSBuild) else() run_cmake(VsMSBuildMissing) diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set-stderr.txt b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set-stderr.txt new file mode 100644 index 0000000..bddd3ab --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set-stderr.txt @@ -0,0 +1,6 @@ +CMake Warning \(dev\) at Experimental/CxxImportStd-set.cmake:4 \(cmake_language\): + CMake's support for `import std;` in C\+\+23 and newer is experimental. It + is meant only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set.cmake b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set.cmake new file mode 100644 index 0000000..a002297 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-set.cmake @@ -0,0 +1,11 @@ +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") + +cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED + "CxxImportStd" + feature_present) + +if (NOT feature_present STREQUAL "TRUE") + message(FATAL_ERROR + "Expected the `CxxImportStd` feature to be enabled.") +endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-unset.cmake b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-unset.cmake new file mode 100644 index 0000000..be758c2 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/CxxImportStd-unset.cmake @@ -0,0 +1,8 @@ +cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED + "CxxImportStd" + feature_present) + +if (NOT feature_present STREQUAL "FALSE") + message(FATAL_ERROR + "Expected the `CxxImportStd` feature to be disabled.") +endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-set-stderr.txt b/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-set-stderr.txt new file mode 100644 index 0000000..0207835 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-set-stderr.txt @@ -0,0 +1,6 @@ +CMake Warning \(dev\) at Experimental/ExportPackageDependencies-set.cmake:4 \(cmake_language\): + CMake's EXPORT_PACKAGE_DEPENDENCIES support is experimental. It is meant + only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-set.cmake b/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-set.cmake new file mode 100644 index 0000000..74b3f93 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-set.cmake @@ -0,0 +1,11 @@ +set(CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_DEPENDENCIES + "1942b4fa-b2c5-4546-9385-83f254070067") + +cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED + "ExportPackageDependencies" + feature_present) + +if (NOT feature_present STREQUAL "TRUE") + message(FATAL_ERROR + "Expected the `ExportPackageDependencies` feature to be enabled.") +endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-unset.cmake b/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-unset.cmake new file mode 100644 index 0000000..c60595f --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/ExportPackageDependencies-unset.cmake @@ -0,0 +1,8 @@ +cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED + "ExportPackageDependencies" + feature_present) + +if (NOT feature_present STREQUAL "FALSE") + message(FATAL_ERROR + "Expected the `ExportPackageDependencies` feature to be disabled.") +endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/Unknown-result.txt b/Tests/RunCMake/cmake_language/Experimental/Unknown-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/Unknown-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/Experimental/Unknown-stderr.txt b/Tests/RunCMake/cmake_language/Experimental/Unknown-stderr.txt new file mode 100644 index 0000000..ca7c058 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/Unknown-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at Experimental/Unknown.cmake:1 \(cmake_language\): + cmake_language Experimental feature name "Unknown" does not exist. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_language/Experimental/Unknown.cmake b/Tests/RunCMake/cmake_language/Experimental/Unknown.cmake new file mode 100644 index 0000000..d5e3047 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/Unknown.cmake @@ -0,0 +1,8 @@ +cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED + "Unknown" + feature_present) + +if (NOT feature_present STREQUAL "") + message(FATAL_ERROR + "Got a result for the `Unknown` experimental feature.") +endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-set-stderr.txt b/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-set-stderr.txt new file mode 100644 index 0000000..d6f8788 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-set-stderr.txt @@ -0,0 +1,6 @@ +CMake Warning \(dev\) at Experimental/WindowsKernelModeDriver-set.cmake:4 \(cmake_language\): + CMake's Windows kernel-mode driver support is experimental. It is meant + only for experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-set.cmake b/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-set.cmake new file mode 100644 index 0000000..f942d95 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-set.cmake @@ -0,0 +1,11 @@ +set(CMAKE_EXPERIMENTAL_WINDOWS_KERNEL_MODE_DRIVER + "5c2d848d-4efa-4529-a768-efd57171bf68") + +cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED + "WindowsKernelModeDriver" + feature_present) + +if (NOT feature_present STREQUAL "TRUE") + message(FATAL_ERROR + "Expected the `WindowsKernelModeDriver` feature to be enabled.") +endif () diff --git a/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-unset.cmake b/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-unset.cmake new file mode 100644 index 0000000..7aee0d3 --- /dev/null +++ b/Tests/RunCMake/cmake_language/Experimental/WindowsKernelModeDriver-unset.cmake @@ -0,0 +1,8 @@ +cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED + "WindowsKernelModeDriver" + feature_present) + +if (NOT feature_present STREQUAL "FALSE") + message(FATAL_ERROR + "Expected the `WindowsKernelModeDriver` feature to be disabled.") +endif () diff --git a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake index 5fb2de6..fe3da79 100644 --- a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake @@ -156,3 +156,11 @@ run_cmake_command( -DCMAKE_MESSAGE_LOG_LEVEL=TRACE -P ${RunCMake_SOURCE_DIR}/get_message_log_level.cmake ) + +run_cmake(Experimental/CxxImportStd-set) +run_cmake(Experimental/CxxImportStd-unset) +run_cmake(Experimental/ExportPackageDependencies-set) +run_cmake(Experimental/ExportPackageDependencies-unset) +run_cmake(Experimental/WindowsKernelModeDriver-set) +run_cmake(Experimental/WindowsKernelModeDriver-unset) +run_cmake(Experimental/Unknown) diff --git a/Tests/RunCMake/ctest_cmake_error/CMakeLists.txt.in b/Tests/RunCMake/ctest_cmake_error/CMakeLists.txt.in index 1babd72..da7ec1a 100644 --- a/Tests/RunCMake/ctest_cmake_error/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_cmake_error/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_fixtures/cyclicCleanup-stderr.txt b/Tests/RunCMake/ctest_fixtures/cyclicCleanup-stderr.txt index 1a45994..1973b2a 100644 --- a/Tests/RunCMake/ctest_fixtures/cyclicCleanup-stderr.txt +++ b/Tests/RunCMake/ctest_fixtures/cyclicCleanup-stderr.txt @@ -1,3 +1,2 @@ -Error: a cycle exists in the test dependency graph for the test "cyclicCleanup". -Please fix the cycle and run ctest again. -No tests were found!!! +^Error: a cycle exists in the test dependency graph for the test "cyclicCleanup"\. +Please fix the cycle and run ctest again\.$ diff --git a/Tests/RunCMake/ctest_fixtures/cyclicSetup-stderr.txt b/Tests/RunCMake/ctest_fixtures/cyclicSetup-stderr.txt index 2aba6c9..aee735a 100644 --- a/Tests/RunCMake/ctest_fixtures/cyclicSetup-stderr.txt +++ b/Tests/RunCMake/ctest_fixtures/cyclicSetup-stderr.txt @@ -1,3 +1,2 @@ -Error: a cycle exists in the test dependency graph for the test "cyclicSetup". -Please fix the cycle and run ctest again. -No tests were found!!!$ +^Error: a cycle exists in the test dependency graph for the test "cyclicSetup"\. +Please fix the cycle and run ctest again\.$ diff --git a/Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt b/Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt index a8f10b5..74f37c0 100644 --- a/Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt +++ b/Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt @@ -1 +1 @@ - *Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) + *Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?.*|The requested URL returned error:.*) diff --git a/Tests/RunCMake/ctest_submit/CDashSubmitQuiet-stderr.txt b/Tests/RunCMake/ctest_submit/CDashSubmitQuiet-stderr.txt index 4825d7a..ad6dcf4 100644 --- a/Tests/RunCMake/ctest_submit/CDashSubmitQuiet-stderr.txt +++ b/Tests/RunCMake/ctest_submit/CDashSubmitQuiet-stderr.txt @@ -1,3 +1,3 @@ *Error when uploading file: .*/Configure.xml - *Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) + *Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?.*|The requested URL returned error:.*) *Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/CDashSubmitVerbose-stderr.txt b/Tests/RunCMake/ctest_submit/CDashSubmitVerbose-stderr.txt index a8f10b5..74f37c0 100644 --- a/Tests/RunCMake/ctest_submit/CDashSubmitVerbose-stderr.txt +++ b/Tests/RunCMake/ctest_submit/CDashSubmitVerbose-stderr.txt @@ -1 +1 @@ - *Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) + *Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?.*|The requested URL returned error:.*) diff --git a/Tests/RunCMake/ctest_submit/CDashSubmitVerbose-stdout.txt b/Tests/RunCMake/ctest_submit/CDashSubmitVerbose-stdout.txt index 11a4edf..d0c4e1a 100644 --- a/Tests/RunCMake/ctest_submit/CDashSubmitVerbose-stdout.txt +++ b/Tests/RunCMake/ctest_submit/CDashSubmitVerbose-stdout.txt @@ -1 +1 @@ -Upload file: .* to http:\/\/-no-site-\?FileName=test-site___test-build-name___.*-Experimental___XML___Configure.xml&build=test-build-name&site=test-site&stamp=.*-Experimental&subproject=mysubproj&MD5=.* Size: .* +Upload file: .* to http:\/\/badhostname.invalid\?FileName=test-site___test-build-name___.*-Experimental___XML___Configure.xml&build=test-build-name&site=test-site&stamp=.*-Experimental&subproject=mysubproj&MD5=.* Size: .* diff --git a/Tests/RunCMake/ctest_submit/CMakeLists.txt.in b/Tests/RunCMake/ctest_submit/CMakeLists.txt.in index 96e6c13..5ee64be 100644 --- a/Tests/RunCMake/ctest_submit/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_submit/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestSubmit@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in b/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in index c35397c..140e4be 100644 --- a/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in +++ b/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in @@ -3,7 +3,3 @@ # so that any ctest_submit calls fail with an error message. set(CTEST_DROP_METHOD "@CASE_DROP_METHOD@") set(CTEST_DROP_SITE "@CASE_DROP_SITE@") - -# do not use proxy for lookup of invalid site (DNS failure by proxy looks -# different than DNS failure without proxy) -set(ENV{no_proxy} "$ENV{no_proxy},@CASE_DROP_SITE@") diff --git a/Tests/RunCMake/ctest_submit/FILESNoBuildId-stderr.txt b/Tests/RunCMake/ctest_submit/FILESNoBuildId-stderr.txt index a8f10b5..74f37c0 100644 --- a/Tests/RunCMake/ctest_submit/FILESNoBuildId-stderr.txt +++ b/Tests/RunCMake/ctest_submit/FILESNoBuildId-stderr.txt @@ -1 +1 @@ - *Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) + *Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?.*|The requested URL returned error:.*) diff --git a/Tests/RunCMake/ctest_submit/FILESNoBuildId-stdout.txt b/Tests/RunCMake/ctest_submit/FILESNoBuildId-stdout.txt index 929b254..a8f4759 100644 --- a/Tests/RunCMake/ctest_submit/FILESNoBuildId-stdout.txt +++ b/Tests/RunCMake/ctest_submit/FILESNoBuildId-stdout.txt @@ -1 +1 @@ -Upload file: .* to http:\/\/-no-site-\?FileName=test-site___test-build-name___.*-Experimental___XML___RunCMakeTest.cmake&MD5=.* Size: .* +Upload file: .* to http:\/\/badhostname.invalid\?FileName=test-site___test-build-name___.*-Experimental___XML___RunCMakeTest.cmake&MD5=.* Size: .* diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-stdout.txt new file mode 100644 index 0000000..4f5120e --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-cmake-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfiguration from CMAKE_TLS_VERIFY:TLSVerify:OFF +SetCTestConfiguration:TLSVerify:OFF +.* + Set CURLOPT_SSL_VERIFYPEER to off diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-stdout.txt new file mode 100644 index 0000000..582030a --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-env-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfiguration from ENV{CMAKE_TLS_VERIFY}:TLSVerify:OFF +SetCTestConfiguration:TLSVerify:OFF +.* + Set CURLOPT_SSL_VERIFYPEER to off diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stdout.txt new file mode 100644 index 0000000..9053f6c --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfigurationFromCMakeVariable:TLSVerify:CTEST_TLS_VERIFY +SetCTestConfiguration:TLSVerify:OFF +.* + Set CURLOPT_SSL_VERIFYPEER to off diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-stdout.txt new file mode 100644 index 0000000..015728c --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-cmake-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfiguration from CMAKE_TLS_VERIFY:TLSVerify:ON +SetCTestConfiguration:TLSVerify:ON +.* + Set CURLOPT_SSL_VERIFYPEER to on diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-stdout.txt new file mode 100644 index 0000000..add2b4c --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-env-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfiguration from ENV{CMAKE_TLS_VERIFY}:TLSVerify:ON +SetCTestConfiguration:TLSVerify:ON +.* + Set CURLOPT_SSL_VERIFYPEER to on diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stdout.txt new file mode 100644 index 0000000..c2764c3 --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfigurationFromCMakeVariable:TLSVerify:CTEST_TLS_VERIFY +SetCTestConfiguration:TLSVerify:ON +.* + Set CURLOPT_SSL_VERIFYPEER to on diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-stdout.txt new file mode 100644 index 0000000..ed3677a --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-cmake-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfiguration from CMAKE_TLS_VERSION:TLSVersion:1\.1 +SetCTestConfiguration:TLSVersion:1\.1 +.* + Set CURLOPT_SSLVERSION to CURL_SSLVERSION_TLSv1_1 diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-stdout.txt new file mode 100644 index 0000000..c31b4bc --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-env-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfiguration from ENV{CMAKE_TLS_VERSION}:TLSVersion:1\.1 +SetCTestConfiguration:TLSVersion:1\.1 +.* + Set CURLOPT_SSLVERSION to CURL_SSLVERSION_TLSv1_1 diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-stdout.txt new file mode 100644 index 0000000..be83798 --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVersion-1.1-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfigurationFromCMakeVariable:TLSVersion:CTEST_TLS_VERSION +SetCTestConfiguration:TLSVersion:1\.1 +.* + Set CURLOPT_SSLVERSION to CURL_SSLVERSION_TLSv1_1 diff --git a/Tests/RunCMake/ctest_submit/FailDrop-http-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-http-stderr.txt index f52d2d8..b83da8d 100644 --- a/Tests/RunCMake/ctest_submit/FailDrop-http-stderr.txt +++ b/Tests/RunCMake/ctest_submit/FailDrop-http-stderr.txt @@ -1,2 +1,2 @@ -Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?.*|The requested URL returned error:.*) Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-http-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-http-stdout.txt index c9111b0..bd7d6b6 100644 --- a/Tests/RunCMake/ctest_submit/FailDrop-http-stdout.txt +++ b/Tests/RunCMake/ctest_submit/FailDrop-http-stdout.txt @@ -1,2 +1,2 @@ Submit files - SubmitURL: http://-no-site- + SubmitURL: http://badhostname.invalid diff --git a/Tests/RunCMake/ctest_submit/FailDrop-https-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-https-stderr.txt index 259f7d0..e3df62f 100644 --- a/Tests/RunCMake/ctest_submit/FailDrop-https-stderr.txt +++ b/Tests/RunCMake/ctest_submit/FailDrop-https-stderr.txt @@ -1,2 +1,2 @@ -Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-https-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-https-stdout.txt index 2c67eb9..f97f63c 100644 --- a/Tests/RunCMake/ctest_submit/FailDrop-https-stdout.txt +++ b/Tests/RunCMake/ctest_submit/FailDrop-https-stdout.txt @@ -1,2 +1,2 @@ Submit files - SubmitURL: https://-no-site- + SubmitURL: https://badhostname.invalid diff --git a/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt b/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt index 0020a0f..86cd817 100644 --- a/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt +++ b/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt @@ -1,3 +1,3 @@ *Error when uploading file: .*/Done.xml - *Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) + *Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?.*|The requested URL returned error:.*) *Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index 78856b4..3c77ddb 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -2,9 +2,13 @@ include(RunCTest) # Default case parameters. set(CASE_DROP_METHOD "http") -set(CASE_DROP_SITE "-no-site-") +set(CASE_DROP_SITE "badhostname.invalid") set(CASE_CTEST_SUBMIT_ARGS "") +set(CASE_TEST_PREFIX_CODE "") +# Do not use any proxy for lookup of an invalid site. +# DNS failure by proxy looks different than DNS failure without proxy. +set(ENV{no_proxy} "$ENV{no_proxy},badhostname.invalid") function(run_ctest_submit CASE_NAME) set(CASE_CTEST_SUBMIT_ARGS "${ARGN}") @@ -51,3 +55,30 @@ endfunction() run_ctest_submit_FailDrop(http) run_ctest_submit_FailDrop(https) +block() + set(CASE_DROP_METHOD "https") + set(CASE_TEST_PREFIX_CODE "set(CTEST_TLS_VERSION 1.1)") + run_ctest(FailDrop-TLSVersion-1.1 -VV) + set(CASE_TEST_PREFIX_CODE "set(CMAKE_TLS_VERSION 1.1)") # Test fallback to CMake variable. + run_ctest(FailDrop-TLSVersion-1.1-cmake -VV) + set(ENV{CMAKE_TLS_VERSION} 1.1) # Test fallback to env variable. + set(CASE_TEST_PREFIX_CODE "") + run_ctest(FailDrop-TLSVersion-1.1-env -VV) + unset(ENV{CMAKE_TLS_VERSION}) + set(CASE_TEST_PREFIX_CODE "set(CTEST_TLS_VERIFY ON)") + run_ctest(FailDrop-TLSVerify-ON -VV) + set(CASE_TEST_PREFIX_CODE "set(CMAKE_TLS_VERIFY ON)") # Test fallback to CMake variable. + run_ctest(FailDrop-TLSVerify-ON-cmake -VV) + set(ENV{CMAKE_TLS_VERIFY} ON) # Test fallback to env variable. + set(CASE_TEST_PREFIX_CODE "") + run_ctest(FailDrop-TLSVerify-ON-env -VV) + unset(ENV{CMAKE_TLS_VERIFY}) + set(CASE_TEST_PREFIX_CODE "set(CTEST_TLS_VERIFY OFF)") + run_ctest(FailDrop-TLSVerify-OFF -VV) + set(CASE_TEST_PREFIX_CODE "set(CMAKE_TLS_VERIFY OFF)") # Test fallback to CMake variable. + run_ctest(FailDrop-TLSVerify-OFF-cmake -VV) + set(ENV{CMAKE_TLS_VERIFY} OFF) # Test fallback to env variable. + set(CASE_TEST_PREFIX_CODE "") + run_ctest(FailDrop-TLSVerify-OFF-env -VV) + unset(ENV{CMAKE_TLS_VERIFY}) +endblock() diff --git a/Tests/RunCMake/ctest_submit/test.cmake.in b/Tests/RunCMake/ctest_submit/test.cmake.in index 0f4885f..6026c35 100644 --- a/Tests/RunCMake/ctest_submit/test.cmake.in +++ b/Tests/RunCMake/ctest_submit/test.cmake.in @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.5) +@CASE_TEST_PREFIX_CODE@ set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_upload/UploadQuiet-check.cmake b/Tests/RunCMake/ctest_upload/UploadQuiet-check.cmake new file mode 100644 index 0000000..e45aa73 --- /dev/null +++ b/Tests/RunCMake/ctest_upload/UploadQuiet-check.cmake @@ -0,0 +1,12 @@ +file(GLOB upload_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Upload.xml") +if(upload_xml_file) + file(READ "${upload_xml_file}" upload_xml LIMIT 4096) + if(NOT upload_xml MATCHES "<Time>") + string(REPLACE "\n" "\n " upload_xml " ${upload_xml}") + set(RunCMake_TEST_FAILED + "Upload.xml does not contain a <Time> attribute:\n${upload_xml}" + ) + endif() +else() + set(RunCMake_TEST_FAILED "Upload.xml not found") +endif() diff --git a/Tests/RunCMake/detect_jobserver.c b/Tests/RunCMake/detect_jobserver.c index 8cbfe2e..67cc7db 100644 --- a/Tests/RunCMake/detect_jobserver.c +++ b/Tests/RunCMake/detect_jobserver.c @@ -118,7 +118,6 @@ int posix(const char* jobserver, char* message) { int read_fd; int write_fd; - const char* path; // First try to parse as "R,W" file descriptors if (sscanf(jobserver, "%d,%d", &read_fd, &write_fd) == 2) { @@ -127,7 +126,7 @@ int posix(const char* jobserver, char* message) // Then try to parse as "fifo:PATH" if (strncmp(jobserver, "fifo:", 5) == 0) { - path = jobserver + 5; + const char* path = jobserver + 5; read_fd = open(path, O_RDONLY); write_fd = open(path, O_WRONLY); return test_fd(read_fd, write_fd, message); diff --git a/Tests/RunCMake/execute_process/AnyCommandAbnormalExit-stderr.txt b/Tests/RunCMake/execute_process/AnyCommandAbnormalExit-stderr.txt index 9627872..b1b0642 100644 --- a/Tests/RunCMake/execute_process/AnyCommandAbnormalExit-stderr.txt +++ b/Tests/RunCMake/execute_process/AnyCommandAbnormalExit-stderr.txt @@ -1,4 +1,4 @@ CMake Error at .*AnyCommandAbnormalExit.cmake:[0-9]+ \(execute_process\): execute_process failed command indexes: - 1: "Abnormal exit with child return code: Segmentation fault + 1: "Abnormal exit with child return code: diff --git a/Tests/RunCMake/execute_process/AnyCommandAbnormalExit.cmake b/Tests/RunCMake/execute_process/AnyCommandAbnormalExit.cmake index 1017e0f..ef63778 100644 --- a/Tests/RunCMake/execute_process/AnyCommandAbnormalExit.cmake +++ b/Tests/RunCMake/execute_process/AnyCommandAbnormalExit.cmake @@ -1,5 +1,4 @@ -execute_process(COMMAND "${Python_EXECUTABLE}" -c - "import os; os.kill(os.getpid(),11)" +execute_process(COMMAND "${EXIT_CRASH_EXE}" COMMAND ${CMAKE_COMMAND} -E true COMMAND_ERROR_IS_FATAL ANY ) diff --git a/Tests/RunCMake/execute_process/LastCommandAbnormalExit-1.cmake b/Tests/RunCMake/execute_process/LastCommandAbnormalExit-1.cmake index e4a125d..1786d53 100644 --- a/Tests/RunCMake/execute_process/LastCommandAbnormalExit-1.cmake +++ b/Tests/RunCMake/execute_process/LastCommandAbnormalExit-1.cmake @@ -1,12 +1,10 @@ -execute_process(COMMAND "${Python_EXECUTABLE}" -c - "import os; os.kill(os.getpid(),11)" +execute_process(COMMAND "${EXIT_CRASH_EXE}" COMMAND ${CMAKE_COMMAND} -E true RESULT_VARIABLE result ) if(result EQUAL "0") - execute_process(COMMAND "${Python_EXECUTABLE}" -c - "import os; os.kill(os.getpid(),11)" + execute_process(COMMAND "${EXIT_CRASH_EXE}" COMMAND ${CMAKE_COMMAND} -E true COMMAND_ERROR_IS_FATAL LAST ) diff --git a/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2-stderr.txt b/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2-stderr.txt index c915e58..6db023b 100644 --- a/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2-stderr.txt +++ b/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2-stderr.txt @@ -1,2 +1,2 @@ CMake Error at .*LastCommandAbnormalExit-2.cmake:[0-9]+ \(execute_process\): - execute_process Abnormal exit: Segmentation fault + execute_process Abnormal exit: diff --git a/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2.cmake b/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2.cmake index 6c3fbf8..a0c3aaf 100644 --- a/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2.cmake +++ b/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2.cmake @@ -1,13 +1,11 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E true - COMMAND "${Python_EXECUTABLE}" -c - "import os; os.kill(os.getpid(),11)" + COMMAND "${EXIT_CRASH_EXE}" RESULT_VARIABLE result ) if(NOT result EQUAL "0") execute_process(COMMAND ${CMAKE_COMMAND} -E true - COMMAND "${Python_EXECUTABLE}" -c - "import os; os.kill(os.getpid(),11)" + COMMAND "${EXIT_CRASH_EXE}" COMMAND_ERROR_IS_FATAL LAST ) endif() diff --git a/Tests/RunCMake/execute_process/RunCMakeTest.cmake b/Tests/RunCMake/execute_process/RunCMakeTest.cmake index cd5e41b..7ee75af 100644 --- a/Tests/RunCMake/execute_process/RunCMakeTest.cmake +++ b/Tests/RunCMake/execute_process/RunCMakeTest.cmake @@ -41,10 +41,10 @@ run_cmake_command(StderrNoexist ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/Stder run_cmake_command(StdoutStderrNoexist ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/StderrNoexist.cmake) run_cmake_command(InOutErrDirectory ${CMAKE_COMMAND} -DPRINT_STDIN_EXE=${PRINT_STDIN_EXE} -P ${RunCMake_SOURCE_DIR}/InOutErrDirectory.cmake) -if(UNIX AND Python_EXECUTABLE) - run_cmake_command(AnyCommandAbnormalExit ${CMAKE_COMMAND} -DPython_EXECUTABLE=${Python_EXECUTABLE} -P ${RunCMake_SOURCE_DIR}/AnyCommandAbnormalExit.cmake) - run_cmake_command(LastCommandAbnormalExit-1 ${CMAKE_COMMAND} -DPython_EXECUTABLE=${Python_EXECUTABLE} -P ${RunCMake_SOURCE_DIR}/LastCommandAbnormalExit-1.cmake) - run_cmake_command(LastCommandAbnormalExit-2 ${CMAKE_COMMAND} -DPython_EXECUTABLE=${Python_EXECUTABLE} -P ${RunCMake_SOURCE_DIR}/LastCommandAbnormalExit-2.cmake) +if(EXIT_CRASH_EXE) + run_cmake_command(AnyCommandAbnormalExit ${CMAKE_COMMAND} -DEXIT_CRASH_EXE=${EXIT_CRASH_EXE} -P ${RunCMake_SOURCE_DIR}/AnyCommandAbnormalExit.cmake) + run_cmake_command(LastCommandAbnormalExit-1 ${CMAKE_COMMAND} -DEXIT_CRASH_EXE=${EXIT_CRASH_EXE} -P ${RunCMake_SOURCE_DIR}/LastCommandAbnormalExit-1.cmake) + run_cmake_command(LastCommandAbnormalExit-2 ${CMAKE_COMMAND} -DEXIT_CRASH_EXE=${EXIT_CRASH_EXE} -P ${RunCMake_SOURCE_DIR}/LastCommandAbnormalExit-2.cmake) endif() if(WIN32 OR CYGWIN) diff --git a/Tests/RunCMake/exit_crash.c b/Tests/RunCMake/exit_crash.c new file mode 100644 index 0000000..324ffad --- /dev/null +++ b/Tests/RunCMake/exit_crash.c @@ -0,0 +1,14 @@ +int main(int argc, const char* argv[]) +{ +#ifndef __clang_analyzer__ /* Suppress clang-analyzer warnings */ + /* Construct an invalid address that cannot be predicted by the + compiler/optimizer, and that is not NULL (which is undefined + behavior to dereference). */ + volatile int* invalidAddress = 0; + invalidAddress += argc ? 1 : 2; + (void)argv; + /* Write to the invalid address to cause SIGSEGV or similar. */ + *invalidAddress = 0; +#endif + return 0; +} diff --git a/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake b/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake index d757eea..5e0310b 100644 --- a/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake +++ b/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake @@ -11,6 +11,7 @@ run_cmake(httpheader-not-set) run_cmake(netrc-bad) run_cmake(tls-cainfo-not-set) run_cmake(tls-verify-not-set) +run_cmake(TLS_VERSION-missing) run_cmake(pass-not-set) run_cmake(no-save-hash) @@ -25,7 +26,14 @@ if(NOT CMake_TEST_NO_NETWORK) run_cmake(bad-hostname) endif() +run_cmake_with_options(TLS_VERSION-bad) +if(CMake_TEST_TLS_VERIFY_URL_BAD) + run_cmake_with_options(TLS_VERIFY-bad -Durl=${CMake_TEST_TLS_VERIFY_URL_BAD}) +endif() + if(CMake_TEST_TLS_VERIFY_URL) - run_cmake(TLS_VERIFY-bad) run_cmake_with_options(TLS_VERIFY-good -Durl=${CMake_TEST_TLS_VERIFY_URL}) + if(CMake_TEST_TLS_VERSION) + run_cmake_with_options(TLS_VERSION-good -Durl=${CMake_TEST_TLS_VERIFY_URL} -Dtls_version=${CMake_TEST_TLS_VERSION}) + endif() endif() diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt index 8f5d437..fbff3b9 100644 --- a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt @@ -1 +1,7 @@ --- (60;"SSL peer certificate or SSH remote key was not OK"|35;"SSL connect error") +-- def-0: 0;"No error" +-- env-0: 0;"No error" +-- env-1: (60;"SSL peer certificate or SSH remote key was not OK"|35;"SSL connect error") +-- var-0: 0;"No error" +-- var-1: (60;"SSL peer certificate or SSH remote key was not OK"|35;"SSL connect error") +-- opt-0: 0;"No error" +-- opt-1: (60;"SSL peer certificate or SSH remote key was not OK"|35;"SSL connect error") diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake index 333f990..7d50ece 100644 --- a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake @@ -1,6 +1,35 @@ -file(DOWNLOAD https://expired.badssl.com TLS_VERIFY 1 STATUS status LOG log) -message(STATUS "${status}") -list(GET status 0 code) -if(NOT code MATCHES "^(35|60)$") - message("${log}") -endif() +function(download case) + # URL with semantics like https://expired.badssl.com is provided by caller + file(DOWNLOAD ${url} ${ARGN} STATUS status LOG log) + message(STATUS "${case}: ${status}") + if(case MATCHES "1$" AND NOT status MATCHES "^(35|60);") + message("${log}") + endif() +endfunction() + +# The default is OFF. +unset(ENV{CMAKE_TLS_VERIFY}) +unset(CMAKE_TLS_VERIFY) +download(def-0) + +# The environment variable overrides the default. +set(ENV{CMAKE_TLS_VERIFY} 0) +download(env-0) +set(ENV{CMAKE_TLS_VERIFY} 1) +download(env-1) + +# The cmake variable overrides the environment variable. +set(ENV{CMAKE_TLS_VERIFY} 1) +set(CMAKE_TLS_VERIFY 0) +download(var-0) +set(ENV{CMAKE_TLS_VERIFY} 0) +set(CMAKE_TLS_VERIFY 1) +download(var-1) + +# The explicit argument overrides the cmake variable and the environment variable. +set(ENV{CMAKE_TLS_VERIFY} 1) +set(CMAKE_TLS_VERIFY 1) +download(opt-0 TLS_VERIFY 0) +set(ENV{CMAKE_TLS_VERIFY} 0) +set(CMAKE_TLS_VERIFY 0) +download(opt-1 TLS_VERIFY 1) diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad-result.txt b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad-stderr.txt b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad-stderr.txt new file mode 100644 index 0000000..421c8cf --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad-stderr.txt @@ -0,0 +1,14 @@ +^CMake Error at TLS_VERSION-bad\.cmake:[0-9]+ \(file\): + file DOWNLOAD given unknown TLS/SSL version bad-env +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at TLS_VERSION-bad\.cmake:[0-9]+ \(file\): + file DOWNLOAD given unknown TLS/SSL version bad-var +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at TLS_VERSION-bad\.cmake:[0-9]+ \(file\): + file DOWNLOAD given unknown TLS/SSL version bad-arg +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad.cmake b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad.cmake new file mode 100644 index 0000000..51ae4a2 --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-bad.cmake @@ -0,0 +1,10 @@ +# The environment variable provides a default. +set(ENV{CMAKE_TLS_VERSION} bad-env) +file(DOWNLOAD "" TLS_VERIFY 1 STATUS status LOG log) + +# The cmake variable overrides the environment variable. +set(CMAKE_TLS_VERSION bad-var) +file(DOWNLOAD "" TLS_VERIFY 1 STATUS status LOG log) + +# The explicit argument overrides the cmake variable. +file(DOWNLOAD "" TLS_VERSION bad-arg TLS_VERIFY 1 STATUS status LOG log) diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-good.cmake b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-good.cmake new file mode 100644 index 0000000..fcbf650 --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-good.cmake @@ -0,0 +1,6 @@ +file(DOWNLOAD ${url} TLS_VERSION "${tls_version}" TLS_VERIFY 1 STATUS status LOG log) +message(STATUS "${status}") +list(GET status 0 code) +if(NOT code EQUAL 0) + message("${log}") +endif() diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing-result.txt b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing-stderr.txt b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing-stderr.txt new file mode 100644 index 0000000..05d9d90 --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at TLS_VERSION-missing\.cmake:[0-9]+ \(file\): + file DOWNLOAD missing value for TLS_VERSION\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing.cmake b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing.cmake new file mode 100644 index 0000000..29fcd96 --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERSION-missing.cmake @@ -0,0 +1 @@ +file(DOWNLOAD "" "" TLS_VERSION) diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake index a68607e..f7ede51 100644 --- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake @@ -42,6 +42,7 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") run_install_test(macos-unresolved) run_install_test(macos-conflict) run_install_test(macos-notfile) + run_install_test(macos-parent-rpath-propagation) run_install_test(file-filter) endif() run_cmake(project) diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-parent-rpath-propagation.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-parent-rpath-propagation.cmake new file mode 100644 index 0000000..43df621 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-parent-rpath-propagation.cmake @@ -0,0 +1,44 @@ +enable_language(C) + +# bin/exe (RPATH = "lib1:lib2:lib3") +# ^ +# | +# lib1/libone.dylib (RPATH erased) +# ^ +# | +# lib2/libtwo.dylib (RPATH erased) +# ^ +# | +# lib3/libthree.dylib (RPATH erased) +# GET_RUNTIME_DEPENDENCIES(bin/exe) should resolve all three libraries + +set(TEST_SOURCE_DIR "macos/parent-rpath-propagation") + +add_library(three SHARED "${TEST_SOURCE_DIR}/three.c") + +add_library(two SHARED "${TEST_SOURCE_DIR}/two.c") +target_link_libraries(two PRIVATE three) + +add_library(one SHARED "${TEST_SOURCE_DIR}/one.c") +target_link_libraries(one PRIVATE two) + +add_executable(exe "${TEST_SOURCE_DIR}/main.c") +target_link_libraries(exe PUBLIC one) + +set_property(TARGET exe PROPERTY INSTALL_RPATH + @loader_path/../lib1 + @loader_path/../lib2 + @loader_path/../lib3 +) + +install(TARGETS exe DESTINATION bin) +install(TARGETS one DESTINATION lib1) +install(TARGETS two DESTINATION lib2) +install(TARGETS three DESTINATION lib3) + +install(CODE [[ + file(GET_RUNTIME_DEPENDENCIES + EXECUTABLES + "${CMAKE_INSTALL_PREFIX}/bin/$<TARGET_FILE_NAME:exe>" + ) + ]]) diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/main.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/main.c new file mode 100644 index 0000000..fc02afa --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/main.c @@ -0,0 +1,8 @@ +extern void one(void); + +int main(void) +{ + one(); + + return 0; +} diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/one.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/one.c new file mode 100644 index 0000000..0c480cc --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/one.c @@ -0,0 +1,6 @@ +extern void two(void); + +void one(void) +{ + two(); +} diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/three.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/three.c new file mode 100644 index 0000000..0be5f47 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/three.c @@ -0,0 +1,3 @@ +void three(void) +{ +} diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/two.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/two.c new file mode 100644 index 0000000..370baf7 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos/parent-rpath-propagation/two.c @@ -0,0 +1,6 @@ +extern void three(void); + +void two(void) +{ + three(); +} diff --git a/Tests/RunCMake/file-RPATH/CMakeLists.txt b/Tests/RunCMake/file-RPATH/CMakeLists.txt new file mode 100644 index 0000000..94e43ba --- /dev/null +++ b/Tests/RunCMake/file-RPATH/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.29) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/file-RPATH/LargeELF.c b/Tests/RunCMake/file-RPATH/LargeELF.c new file mode 100644 index 0000000..263c2f3 --- /dev/null +++ b/Tests/RunCMake/file-RPATH/LargeELF.c @@ -0,0 +1,26 @@ +/* Create more than 65536 ELF sections. */ + +/* clang-format off */ +#define C0(i) int v##i __attribute__((section("s" #i))) +#define C1(i) C0(i##0); C0(i##1); C0(i##2); C0(i##3); C0(i##4); \ + C0(i##5); C0(i##6); C0(i##7); C0(i##8); C0(i##9) +#define C2(i) C1(i##0); C1(i##1); C1(i##2); C1(i##3); C1(i##4); \ + C1(i##5); C1(i##6); C1(i##7); C1(i##8); C1(i##9) +#define C3(i) C2(i##0); C2(i##1); C2(i##2); C2(i##3); C2(i##4); \ + C2(i##5); C2(i##6); C2(i##7); C2(i##8); C2(i##9) +#define C4(i) C3(i##0); C3(i##1); C3(i##2); C3(i##3); C3(i##4); \ + C3(i##5); C3(i##6); C3(i##7); C3(i##8); C3(i##9) +/* clang-format on */ + +C4(1); +C4(2); +C4(3); +C4(4); +C4(5); +C4(6); +C4(7); + +int main(void) +{ + return 0; +} diff --git a/Tests/RunCMake/file-RPATH/LargeELF.cmake b/Tests/RunCMake/file-RPATH/LargeELF.cmake new file mode 100644 index 0000000..2eb813e --- /dev/null +++ b/Tests/RunCMake/file-RPATH/LargeELF.cmake @@ -0,0 +1,5 @@ +enable_language(C) + +add_executable(LargeELF LargeELF.c) +set_property(TARGET LargeELF PROPERTY INSTALL_RPATH "/test") +install(TARGETS LargeELF) diff --git a/Tests/RunCMake/file-RPATH/RunCMakeTest.cmake b/Tests/RunCMake/file-RPATH/RunCMakeTest.cmake index 525df09..028fa11 100644 --- a/Tests/RunCMake/file-RPATH/RunCMakeTest.cmake +++ b/Tests/RunCMake/file-RPATH/RunCMakeTest.cmake @@ -16,3 +16,15 @@ run_cmake_command(TextSet ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/TextSet.cma run_cmake_command(TextSetEmpty ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/TextSetEmpty.cmake) run_cmake_command(TextRemove ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/TextRemove.cmake) + +# Test install RPATH for ELF files with more than 65536 sections. +# This is supported only by certain platforms/toolchains, so run +# this case only if explicitly enabled. +if(CMake_TEST_ELF_LARGE) + block() + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/LargeELF-build) + run_cmake_with_options(LargeELF -DCMAKE_INSTALL_PREFIX=${RunCMake_TEST_BINARY_DIR}/root) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(LargeELF-build ${CMAKE_COMMAND} --build . --target install) + endblock() +endif() diff --git a/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt index 2247aa6..6d70016 100644 --- a/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt +++ b/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt @@ -1,4 +1,4 @@ CMake Error at LOCK-error-no-path.cmake:[0-9]+ \(file\): - file must be called with at least two arguments. + sub-command LOCK requires at least two arguments\. Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index c75e062..be8ee7c 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -12,6 +12,7 @@ run_cmake(UPLOAD-httpheader-not-set) run_cmake(UPLOAD-netrc-bad) run_cmake(UPLOAD-tls-cainfo-not-set) run_cmake(UPLOAD-tls-verify-not-set) +run_cmake(UPLOAD-TLS_VERSION-missing) run_cmake(UPLOAD-pass-not-set) run_cmake(INSTALL-DIRECTORY) run_cmake(INSTALL-FILES_FROM_DIR) diff --git a/Tests/RunCMake/file/TOUCH-stderr.txt b/Tests/RunCMake/file/TOUCH-stderr.txt deleted file mode 100644 index 9f31676..0000000 --- a/Tests/RunCMake/file/TOUCH-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -^CMake Error at TOUCH\.cmake:[0-9]+ \(file\): - file must be called with at least two arguments\. -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at TOUCH\.cmake:[0-9]+ \(file\): - file must be called with at least two arguments\. -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/TOUCH.cmake b/Tests/RunCMake/file/TOUCH.cmake index 8931eb5..c92a962 100644 --- a/Tests/RunCMake/file/TOUCH.cmake +++ b/Tests/RunCMake/file/TOUCH.cmake @@ -12,5 +12,6 @@ if(NOT EXISTS "${file}") endif() file(REMOVE "${file}") +# Empty arguments used to be an error, but this is valid since CMake 3.30 file(TOUCH) file(TOUCH_NOCREATE) diff --git a/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing-result.txt b/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing-stderr.txt b/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing-stderr.txt new file mode 100644 index 0000000..d61aba7 --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at UPLOAD-TLS_VERSION-missing\.cmake:[0-9]+ \(file\): + file UPLOAD missing value for TLS_VERSION\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing.cmake b/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing.cmake new file mode 100644 index 0000000..dff9a9c --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-TLS_VERSION-missing.cmake @@ -0,0 +1 @@ +file(UPLOAD "" "" TLS_VERSION) diff --git a/Tests/RunCMake/find_package/CMP0167-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0167-NEW-stderr.txt new file mode 100644 index 0000000..be9b26c --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0167-NEW-stderr.txt @@ -0,0 +1,4 @@ +^CMake Warning at CMP0167-NEW\.cmake:[0-9]+ \(find_package\): + No "FindBoost\.cmake" found in CMAKE_MODULE_PATH\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/find_package/CMP0167-NEW.cmake b/Tests/RunCMake/find_package/CMP0167-NEW.cmake new file mode 100644 index 0000000..4924a34 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0167-NEW.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0167 NEW) +set(_FindBoost_testing TRUE) +find_package(Boost MODULE) + +if(_FindBoost_included) + message(FATAL_ERROR "FindBoost.cmake erroneously included") +endif() diff --git a/Tests/RunCMake/find_package/CMP0167-OLD.cmake b/Tests/RunCMake/find_package/CMP0167-OLD.cmake new file mode 100644 index 0000000..bc607f8 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0167-OLD.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0167 OLD) +set(_FindBoost_testing TRUE) +find_package(Boost MODULE) + +if(NOT _FindBoost_included) + message(FATAL_ERROR "FindBoost.cmake not included") +endif() diff --git a/Tests/RunCMake/find_package/CMP0167-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0167-WARN-stderr.txt new file mode 100644 index 0000000..72b5225 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0167-WARN-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at CMP0167-WARN\.cmake:[0-9]+ \(find_package\): + Policy CMP0167 is not set: The FindBoost module is removed\. Run "cmake + --help-policy CMP0167" 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/CMP0167-WARN.cmake b/Tests/RunCMake/find_package/CMP0167-WARN.cmake new file mode 100644 index 0000000..5853a56 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0167-WARN.cmake @@ -0,0 +1,6 @@ +set(_FindBoost_testing TRUE) +find_package(Boost MODULE) + +if(NOT _FindBoost_included) + message(FATAL_ERROR "FindBoost.cmake not included") +endif() diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake index a93b811..8cda4c1 100644 --- a/Tests/RunCMake/find_package/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake @@ -53,6 +53,9 @@ run_cmake(CMP0148-Interp-NEW) run_cmake(CMP0148-Libs-OLD) run_cmake(CMP0148-Libs-WARN) run_cmake(CMP0148-Libs-NEW) +run_cmake(CMP0167-OLD) +run_cmake(CMP0167-WARN) +run_cmake(CMP0167-NEW) run_cmake(WrongVersionRange) run_cmake(EmptyVersionRange) run_cmake(VersionRangeWithEXACT) diff --git a/Tests/RunCMake/include/CMP0167-NEW-name-result.txt b/Tests/RunCMake/include/CMP0167-NEW-name-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-NEW-name-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include/CMP0167-NEW-name-stderr.txt b/Tests/RunCMake/include/CMP0167-NEW-name-stderr.txt new file mode 100644 index 0000000..797b45b --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-NEW-name-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at CMP0167-NEW-name\.cmake:[0-9]+ \(include\): + include could not find requested file: + + FindBoost +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/include/CMP0167-NEW-name.cmake b/Tests/RunCMake/include/CMP0167-NEW-name.cmake new file mode 100644 index 0000000..60eec25 --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-NEW-name.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0167 NEW) +include(FindBoost) diff --git a/Tests/RunCMake/include/CMP0167-NEW-path-result.txt b/Tests/RunCMake/include/CMP0167-NEW-path-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-NEW-path-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include/CMP0167-NEW-path-stderr.txt b/Tests/RunCMake/include/CMP0167-NEW-path-stderr.txt new file mode 100644 index 0000000..0b91cac --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-NEW-path-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at [^ +]*/Modules/FindBoost.cmake:[0-9]+ \(message\): + The FindBoost module has been removed by policy CMP0167\. +Call Stack \(most recent call first\): + CMP0167-NEW-path\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/include/CMP0167-NEW-path.cmake b/Tests/RunCMake/include/CMP0167-NEW-path.cmake new file mode 100644 index 0000000..e0fb5e0 --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-NEW-path.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0167 NEW) +include(${CMAKE_ROOT}/Modules/FindBoost.cmake) diff --git a/Tests/RunCMake/include/CMP0167-OLD.cmake b/Tests/RunCMake/include/CMP0167-OLD.cmake new file mode 100644 index 0000000..09630cb --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-OLD.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0167 OLD) +set(_FindBoost_testing 1) +include(FindBoost) + +if(NOT _FindBoost_included) + message(FATAL_ERROR "FindBoost.cmake not included") +endif() diff --git a/Tests/RunCMake/include/CMP0167-WARN-stderr.txt b/Tests/RunCMake/include/CMP0167-WARN-stderr.txt new file mode 100644 index 0000000..41de30d --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-WARN-stderr.txt @@ -0,0 +1,8 @@ +^CMake Warning \(dev\) at CMP0167-WARN\.cmake:[0-9]+ \(include\): + Policy CMP0167 is not set: The FindBoost module is removed\. Run "cmake + --help-policy CMP0167" 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/CMP0167-WARN.cmake b/Tests/RunCMake/include/CMP0167-WARN.cmake new file mode 100644 index 0000000..85472d5 --- /dev/null +++ b/Tests/RunCMake/include/CMP0167-WARN.cmake @@ -0,0 +1,7 @@ +# Do not set CMP0167. +set(_FindBoost_testing 1) +include(FindBoost) + +if(NOT _FindBoost_included) + message(FATAL_ERROR "FindBoost.cmake not included") +endif() diff --git a/Tests/RunCMake/include/RunCMakeTest.cmake b/Tests/RunCMake/include/RunCMakeTest.cmake index 685173e..f3b58c9 100644 --- a/Tests/RunCMake/include/RunCMakeTest.cmake +++ b/Tests/RunCMake/include/RunCMakeTest.cmake @@ -21,3 +21,8 @@ run_cmake(CMP0148-Libs-OLD) run_cmake(CMP0148-Libs-WARN) run_cmake(CMP0148-Libs-NEW-name) run_cmake(CMP0148-Libs-NEW-path) + +run_cmake(CMP0167-OLD) +run_cmake(CMP0167-WARN) +run_cmake(CMP0167-NEW-name) +run_cmake(CMP0167-NEW-path) diff --git a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake index 4fbf147..11be360 100644 --- a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake +++ b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake @@ -6,12 +6,13 @@ run_cmake(CustomTypePlatform) run_cmake(CustomGuidTypePlatform) run_cmake(CustomConfig) -if(RunCMake_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") +if(RunCMake_GENERATOR MATCHES "Visual Studio") run_cmake(SkipGetTargetFrameworkProperties) run_cmake(VSCSharpReference) endif() -if(RunCMake_GENERATOR MATCHES "^Visual Studio (1[6-9]|[2-9][0-9])") +if(RunCMake_GENERATOR MATCHES "^Visual Studio (1[6-9]|[2-9][0-9])" + AND NOT RunCMake_GENERATOR_TOOLSET MATCHES "^(v80|v90|v100|v110|v120)$") function(run_VSCSharpOnlyProject) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/VSCSharpOnlyProject-build) run_cmake(VSCSharpOnlyProject) diff --git a/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake b/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake new file mode 100644 index 0000000..14442bc --- /dev/null +++ b/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake @@ -0,0 +1,4 @@ +add_library(foo INTERFACE) +target_link_libraries(foo INTERFACE nonexistent::bar) +install(TARGETS foo DESTINATION lib EXPORT foo-targets) +install(EXPORT foo-targets FILE foo-targets.cmake DESTINATION lib) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 0439b42..295922c 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -8,7 +8,9 @@ function(run_install_test case) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") run_cmake(${case}) + set(RunCMake_TEST_OUTPUT_MERGE 1) run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config Debug) + unset(RunCMake_TEST_OUTPUT_MERGE) # Check "all" components. set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-all) run_cmake_command(${case}-all ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -P cmake_install.cmake) @@ -83,6 +85,7 @@ run_cmake(EXPORT-UnknownExport) run_cmake(EXPORT-NamelinkOnly) run_cmake(EXPORT-SeparateNamelink) run_cmake(EXPORT-TargetTwice) +run_cmake(EXPORT-InterfaceLinkNoexist) run_cmake(CMP0062-OLD) run_cmake(CMP0062-NEW) run_cmake(CMP0062-WARN) diff --git a/Tests/RunCMake/project/ProjectCMP0126.cmake b/Tests/RunCMake/project/ProjectCMP0126.cmake new file mode 100644 index 0000000..65e3982 --- /dev/null +++ b/Tests/RunCMake/project/ProjectCMP0126.cmake @@ -0,0 +1,11 @@ +cmake_policy(SET CMP0126 NEW) +set(example_SOURCE_DIR "bad/path") +set(example_BINARY_DIR "bad/path") +project(example LANGUAGES) + +if(NOT "${example_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}") + message(FATAL_ERROR "example_SOURCE_DIR not set to expected value") +endif() +if(NOT "${example_BINARY_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") + message(FATAL_ERROR "example_BINARY_DIR not set to expected value") +endif() diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake index 16f10be..ed4b8ba 100644 --- a/Tests/RunCMake/project/RunCMakeTest.cmake +++ b/Tests/RunCMake/project/RunCMakeTest.cmake @@ -33,6 +33,7 @@ run_cmake(LanguagesUnordered) if(RunCMake_GENERATOR MATCHES "Make|Ninja") run_cmake(LanguagesUsedButNotEnabled) endif() +run_cmake(ProjectCMP0126) run_cmake(ProjectDescription) run_cmake(ProjectDescription2) run_cmake(ProjectDescriptionNoArg) @@ -61,4 +62,10 @@ run_cmake(CMP0096-WARN) run_cmake(CMP0096-OLD) run_cmake(CMP0096-NEW) +# We deliberately run these twice to verify behavior of the second CMake run +run_cmake(SameProjectVarsSubdir) +set(RunCMake_TEST_NO_CLEAN 1) +run_cmake(SameProjectVarsSubdir) +set(RunCMake_TEST_NO_CLEAN 0) + run_cmake(NoMinimumRequired) diff --git a/Tests/RunCMake/project/SameProjectVarsSubdir-stdout.txt b/Tests/RunCMake/project/SameProjectVarsSubdir-stdout.txt new file mode 100644 index 0000000..73dadfd --- /dev/null +++ b/Tests/RunCMake/project/SameProjectVarsSubdir-stdout.txt @@ -0,0 +1,9 @@ +(-- )? SameProjectVarsSubdir_SOURCE_DIR = [^ +]+/subdir1 + SameProjectVarsSubdir_BINARY_DIR = [^ +]+/subdir1 + SameProjectVarsSubdir_IS_TOP_LEVEL = OFF +(-- )? sub2proj_SOURCE_DIR = [^ +]+/subdir2 + sub2proj_BINARY_DIR = [^ +]+/subdir2 diff --git a/Tests/RunCMake/project/SameProjectVarsSubdir.cmake b/Tests/RunCMake/project/SameProjectVarsSubdir.cmake new file mode 100644 index 0000000..36a7960 --- /dev/null +++ b/Tests/RunCMake/project/SameProjectVarsSubdir.cmake @@ -0,0 +1,17 @@ +add_subdirectory(subdir1) + +# Simulate a situation that FetchContent_MakeAvailable() used to be able to +# create, but that should no longer be possible. If depname_SOURCE_DIR and +# depname_BINARY_DIR variables are defined as non-cache variables before the +# project(depname) call, those non-cache variables used to prevent project() +# from setting those variables itself due to CMP0126 (if set to NEW). This only +# showed up if the project(depname) call was not in the dependency's top level +# CMakeLists.txt file, but rather in a subdirectory (googletest is one example +# that used to do this). Since CMake 3.30.3, the dependency's project() call +# should set non-cache variables that will make the variable values visible +# and avoid any masking from variables set before the project() call. We want +# to verify this 3.30.3+ behavior here and in subdir2. +set(sub2proj_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +set(sub2proj_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) + +add_subdirectory(subdir2) diff --git a/Tests/RunCMake/project/subdir1/CMakeLists.txt b/Tests/RunCMake/project/subdir1/CMakeLists.txt new file mode 100644 index 0000000..d6be229 --- /dev/null +++ b/Tests/RunCMake/project/subdir1/CMakeLists.txt @@ -0,0 +1 @@ +project(${RunCMake_TEST} LANGUAGES NONE) diff --git a/Tests/RunCMake/project/subdir2/CMakeLists.txt b/Tests/RunCMake/project/subdir2/CMakeLists.txt new file mode 100644 index 0000000..c28e0c9 --- /dev/null +++ b/Tests/RunCMake/project/subdir2/CMakeLists.txt @@ -0,0 +1,12 @@ +message(STATUS + " ${RunCMake_TEST}_SOURCE_DIR = ${${RunCMake_TEST}_SOURCE_DIR}\n" + " ${RunCMake_TEST}_BINARY_DIR = ${${RunCMake_TEST}_BINARY_DIR}\n" + " ${RunCMake_TEST}_IS_TOP_LEVEL = ${${RunCMake_TEST}_IS_TOP_LEVEL}" +) + +project(sub2proj LANGUAGES NONE) + +message(STATUS + " sub2proj_SOURCE_DIR = ${sub2proj_SOURCE_DIR}\n" + " sub2proj_BINARY_DIR = ${sub2proj_BINARY_DIR}" +) diff --git a/Tests/RunCMake/property_init/CompileSources.cmake b/Tests/RunCMake/property_init/CompileSources.cmake index e8c5554..22b8f3f 100644 --- a/Tests/RunCMake/property_init/CompileSources.cmake +++ b/Tests/RunCMake/property_init/CompileSources.cmake @@ -100,6 +100,7 @@ set(properties "C_LINKER_LAUNCHER" "ccache" "<SAME>" ### C++ "CXX_LINKER_LAUNCHER" "ccache" "<SAME>" + "CXX_MODULE_STD" "ON" "<SAME>" ### CUDA "CUDA_RESOLVE_DEVICE_SYMBOLS" "ON" "<SAME>" "CUDA_RUNTIME_LIBRARY" "Static" "<SAME>" diff --git a/Tests/RunCMake/separate_arguments/ProgramCommand.cmake b/Tests/RunCMake/separate_arguments/ProgramCommand.cmake index bdf5810..cbd44bf 100644 --- a/Tests/RunCMake/separate_arguments/ProgramCommand.cmake +++ b/Tests/RunCMake/separate_arguments/ProgramCommand.cmake @@ -4,12 +4,11 @@ if (out) message (SEND_ERROR "unexpected result with nonexistent program") endif() -set (TEST_EXE_DIR "${CMAKE_CURRENT_BINARY_DIR}/TestExe") -file(MAKE_DIRECTORY "${TEST_EXE_DIR}") -file(COPY "${CMAKE_COMMAND}" DESTINATION "${TEST_EXE_DIR}") -cmake_path (GET CMAKE_COMMAND FILENAME cmake_exe) +get_filename_component(cmake_command "${CMAKE_COMMAND}" ABSOLUTE) +cmake_path (GET cmake_command FILENAME cmake_exe) +cmake_path (GET cmake_command PARENT_PATH cmake_dir) -set (ENV{PATH} "${TEST_EXE_DIR}") +set (ENV{PATH} "${cmake_dir}") separate_arguments (out UNIX_COMMAND PROGRAM "${cmake_exe}") @@ -22,8 +21,8 @@ if (NOT length EQUAL 2) endif() list(GET out 0 cmake) list(GET out 1 args) -if (NOT cmake STREQUAL "${TEST_EXE_DIR}/${cmake_exe}") - message (SEND_ERROR "bad path for program: '${cmake}' instead of '${TEST_EXE_DIR}/${cmake_exe}'") +if (NOT cmake STREQUAL "${cmake_dir}/${cmake_exe}") + message (SEND_ERROR "bad path for program: '${cmake}' instead of '${cmake_dir}/${cmake_exe}'") endif() if (NOT args STREQUAL "") message (SEND_ERROR "bad value for args: '${args}' instead of ''") @@ -40,8 +39,8 @@ if (NOT length EQUAL 2) endif() list(GET out 0 cmake) list(GET out 1 args) -if (NOT cmake STREQUAL "${TEST_EXE_DIR}/${cmake_exe}") - message (SEND_ERROR "bad path for program: '${cmake}' instead of '${TEST_EXE_DIR}/${cmake_exe}'") +if (NOT cmake STREQUAL "${cmake_dir}/${cmake_exe}") + message (SEND_ERROR "bad path for program: '${cmake}' instead of '${cmake_dir}/${cmake_exe}'") endif() if (NOT args STREQUAL " a b c") message (SEND_ERROR "bad value for args: '${args}' instead of ' a b c'") diff --git a/Tests/RunCMake/separate_arguments/ProgramCommandWithSeparateArgs.cmake b/Tests/RunCMake/separate_arguments/ProgramCommandWithSeparateArgs.cmake index 2826cc9..b93b42c 100644 --- a/Tests/RunCMake/separate_arguments/ProgramCommandWithSeparateArgs.cmake +++ b/Tests/RunCMake/separate_arguments/ProgramCommandWithSeparateArgs.cmake @@ -4,12 +4,11 @@ if (out) message (SEND_ERROR "unexpected result with nonexistent program") endif() -set (TEST_EXE_DIR "${CMAKE_CURRENT_BINARY_DIR}/TestExe") -file(MAKE_DIRECTORY "${TEST_EXE_DIR}") -file(COPY "${CMAKE_COMMAND}" DESTINATION "${TEST_EXE_DIR}") -cmake_path (GET CMAKE_COMMAND FILENAME cmake_exe) +get_filename_component(cmake_command "${CMAKE_COMMAND}" ABSOLUTE) +cmake_path (GET cmake_command FILENAME cmake_exe) +cmake_path (GET cmake_command PARENT_PATH cmake_dir) -set (ENV{PATH} "${TEST_EXE_DIR}") +set (ENV{PATH} "${cmake_dir}") separate_arguments (out UNIX_COMMAND PROGRAM SEPARATE_ARGS "${cmake_exe} a b c") list (LENGTH out length) @@ -20,8 +19,8 @@ if (NOT length EQUAL 4) message(FATAL_ERROR "unexpected arguments") endif() list(POP_FRONT out cmake) -if (NOT cmake STREQUAL "${TEST_EXE_DIR}/${cmake_exe}") - message (SEND_ERROR "bad path for program: '${cmake}' instead of '${TEST_EXE_DIR}/${cmake_exe}'") +if (NOT cmake STREQUAL "${cmake_dir}/${cmake_exe}") + message (SEND_ERROR "bad path for program: '${cmake}' instead of '${cmake_dir}/${cmake_exe}'") endif() if (NOT out STREQUAL "a;b;c") message (SEND_ERROR "bad path for args: '${out}' instead of 'a;b;c'") diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/RunCMakeTest.cmake index 88a7e63..97a96b4 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/RunCMakeTest.cmake @@ -135,4 +135,5 @@ if ((CMAKE_SYSTEM_NAME STREQUAL "Windows" AND OR CMAKE_SYSTEM_NAME MATCHES "Darwin|iOS|tvOS|visionOS|watchOS|Linux|BSD|MSYS|CYGWIN") run_cmake(feature-WHOLE_ARCHIVE) run_cmake_target(feature-WHOLE_ARCHIVE link-exe main) + run_cmake_target(feature-WHOLE_ARCHIVE circular-exe main_circular) endif() diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/circular1.c b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/circular1.c new file mode 100644 index 0000000..80ee413 --- /dev/null +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/circular1.c @@ -0,0 +1,6 @@ +void circular2(void); + +void circular1(void) +{ + circular2(); +} diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/circular2.c b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/circular2.c new file mode 100644 index 0000000..751bab5 --- /dev/null +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/circular2.c @@ -0,0 +1,7 @@ + +void circular1(void); + +void circular2(void) +{ + circular1(); +} diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/feature-WHOLE_ARCHIVE-circular-exe-stderr-darwin.txt b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/feature-WHOLE_ARCHIVE-circular-exe-stderr-darwin.txt new file mode 100644 index 0000000..fb4871c --- /dev/null +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/feature-WHOLE_ARCHIVE-circular-exe-stderr-darwin.txt @@ -0,0 +1 @@ +(ld: warning: ignoring duplicate libraries:)? diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/feature-WHOLE_ARCHIVE.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/feature-WHOLE_ARCHIVE.cmake index e525325..5c599c9 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/feature-WHOLE_ARCHIVE.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/feature-WHOLE_ARCHIVE.cmake @@ -9,3 +9,13 @@ target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,base>") add_executable(main main.c) target_link_libraries(main PRIVATE lib) + + +add_library(circular1 STATIC circular1.c) +add_library(circular2 STATIC circular2.c) + +target_link_libraries(circular1 PRIVATE circular2) +target_link_libraries(circular2 PRIVATE circular1) + +add_executable(main_circular main_circular.c) +target_link_libraries(main_circular PRIVATE $<LINK_LIBRARY:WHOLE_ARCHIVE,circular1>) diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/main_circular.c b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/main_circular.c new file mode 100644 index 0000000..16ebee6 --- /dev/null +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/main_circular.c @@ -0,0 +1,9 @@ + +void circular1(void); + +int main(void) +{ + circular1(); + + return 0; +} diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index 229c102..124034a 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -16,6 +16,7 @@ run_cmake_with_options(Inspect include("${RunCMake_BINARY_DIR}/Inspect-build/info.cmake") run_cmake(ConfigureLog) +run_cmake(TopIncludes) run_cmake(NoArgs) run_cmake(OneArg) run_cmake(TwoArgs) diff --git a/Tests/RunCMake/try_compile/TopIncludes-config.txt b/Tests/RunCMake/try_compile/TopIncludes-config.txt new file mode 100644 index 0000000..6bd9c90 --- /dev/null +++ b/Tests/RunCMake/try_compile/TopIncludes-config.txt @@ -0,0 +1,85 @@ +^ +--- +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ + - + kind: "try_compile-v1" + backtrace: + - "[^"]*/Modules/CMakeDetermineCompilerABI.cmake:[0-9]+ \(try_compile\)" + - "[^"]*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(CMAKE_DETERMINE_COMPILER_ABI\)" + - "TopIncludes.cmake:[0-9]+ \(enable_language\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Detecting C compiler ABI info" + directories: + source: "[^"]*/Tests/RunCMake/try_compile/TopIncludes-build/CMakeFiles/CMakeScratch/TryCompile-[^/"]+" + binary: "[^"]*/Tests/RunCMake/try_compile/TopIncludes-build/CMakeFiles/CMakeScratch/TryCompile-[^/"]+" + cmakeVariables:( + CMAKE_[^ +]*)+ + buildResult: + variable: "CMAKE_C_ABI_COMPILED" + cached: true + stdout: \|.* + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)* + - + kind: "try_compile-v1" + backtrace: + - "TopIncludes.cmake:[0-9]+ \(try_compile\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + description: "Project without property set\." + directories: + source: "[^"]*/Tests/RunCMake/try_compile/proj" + binary: "[^"]*/Tests/RunCMake/try_compile/TopIncludes-build/CMakeFiles/CMakeScratch/TryCompile-[^/"]+" + buildResult: + variable: "result" + cached: true + stdout: \|.* + exitCode: 0 + - + kind: "try_compile-v1" + backtrace: + - "TopIncludes.cmake:[0-9]+ \(try_compile\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + description: "Project with property set\." + directories: + source: "[^"]*/Tests/RunCMake/try_compile/proj" + binary: "[^"]*/Tests/RunCMake/try_compile/TopIncludes-build/CMakeFiles/CMakeScratch/TryCompile-[^/"]+" + cmakeVariables: + CMAKE_PROJECT_TOP_LEVEL_INCLUDES: "[^"]*/Tests/RunCMake/try_compile/include_pass1.cmake;[^"]*/Tests/RunCMake/try_compile/include_pass2.cmake" + buildResult: + variable: "result" + cached: true + stdout: \|.* + exitCode: 0 + - + kind: "try_compile-v1" + backtrace: + - "TopIncludes.cmake:[0-9]+ \(try_compile\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + description: "Source file with property set\." + directories: + source: "[^"]*/Tests/RunCMake/try_compile/TopIncludes-build/CMakeFiles/CMakeScratch/TryCompile-[^/"]+" + binary: "[^"]*/Tests/RunCMake/try_compile/TopIncludes-build/CMakeFiles/CMakeScratch/TryCompile-[^/"]+" + cmakeVariables:( + CMAKE_[^ +]*)+ + buildResult: + variable: "result" + cached: true + stdout: \|.* + exitCode: 0 +\.\.\.$ diff --git a/Tests/RunCMake/try_compile/TopIncludes.cmake b/Tests/RunCMake/try_compile/TopIncludes.cmake new file mode 100644 index 0000000..2a70cc7 --- /dev/null +++ b/Tests/RunCMake/try_compile/TopIncludes.cmake @@ -0,0 +1,34 @@ +enable_language(C) + +# Normally CMAKE_PROJECT_TOP_LEVEL_INCLUDES must be set before the first +# project() call. We don't care about the variable's usual effects here, we +# only care whether the variable is propagated to try_compile() project calls. +set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES + ${CMAKE_CURRENT_LIST_DIR}/include_error.cmake +) + +try_compile(result + PROJECT TestProject + SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/proj + LOG_DESCRIPTION "Project without property set." +) + +set_property(GLOBAL PROPERTY PROPAGATE_TOP_LEVEL_INCLUDES_TO_TRY_COMPILE YES) +set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES + ${CMAKE_CURRENT_LIST_DIR}/include_pass1.cmake + ${CMAKE_CURRENT_LIST_DIR}/include_pass2.cmake +) +try_compile(result + PROJECT TestProject + SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/proj + LOG_DESCRIPTION "Project with property set." +) + +# Confirm the property only affects whole project signature +set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES + ${CMAKE_CURRENT_LIST_DIR}/include_error.cmake +) +try_compile(result + SOURCES ${CMAKE_CURRENT_LIST_DIR}/src.c + LOG_DESCRIPTION "Source file with property set." +) diff --git a/Tests/RunCMake/try_compile/include_error.cmake b/Tests/RunCMake/try_compile/include_error.cmake new file mode 100644 index 0000000..7c73ab6 --- /dev/null +++ b/Tests/RunCMake/try_compile/include_error.cmake @@ -0,0 +1 @@ +message(FATAL_ERROR "Unexpectedly read top level include file") diff --git a/Tests/RunCMake/try_compile/include_pass1.cmake b/Tests/RunCMake/try_compile/include_pass1.cmake new file mode 100644 index 0000000..e831ca3 --- /dev/null +++ b/Tests/RunCMake/try_compile/include_pass1.cmake @@ -0,0 +1 @@ +message(STATUS "Top level include file was read - pass 1") diff --git a/Tests/RunCMake/try_compile/include_pass2.cmake b/Tests/RunCMake/try_compile/include_pass2.cmake new file mode 100644 index 0000000..31336aa --- /dev/null +++ b/Tests/RunCMake/try_compile/include_pass2.cmake @@ -0,0 +1 @@ +message(STATUS "Top level include file was read - pass 2") diff --git a/Tests/RunCMake/try_compile/proj/CMakeLists.txt b/Tests/RunCMake/try_compile/proj/CMakeLists.txt index 652f5b6..09feca4 100644 --- a/Tests/RunCMake/try_compile/proj/CMakeLists.txt +++ b/Tests/RunCMake/try_compile/proj/CMakeLists.txt @@ -1,2 +1,2 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(TestProject NONE) diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt index c5a4b83..e933ea1 100644 --- a/Tests/SwiftOnly/CMakeLists.txt +++ b/Tests/SwiftOnly/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) if(POLICY CMP0126) cmake_policy(SET CMP0126 NEW) endif() @@ -28,6 +28,10 @@ endif() add_subdirectory(SubA) add_subdirectory(SubB) +add_subdirectory(SubC) +add_subdirectory(SubD) +add_subdirectory(SubE) + set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift) add_executable(SwiftOnly main.swift) @@ -43,6 +47,17 @@ add_library(N N.swift) target_link_libraries(N PUBLIC M) +# FIXME(#25989): The Xcode generator doesn't respect CMAKE_Swift_MODULE_DIRECTORY. +if(NOT CMAKE_GENERATOR STREQUAL "Xcode") + add_custom_command(TARGET M + POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E compare_files + "${CMAKE_Swift_MODULE_DIRECTORY}/M.swiftmodule" + "${CMAKE_Swift_MODULE_DIRECTORY}/M.swiftmodule" + COMMENT "check that .swiftmodule files are generated in CMAKE_Swift_MODULE_DIRECTORY" + VERBATIM) +endif() + if(NOT XCODE_VERSION OR XCODE_VERSION VERSION_GREATER_EQUAL 9.0) # TODO: Add a wholemodule object-library test once that is working add_library(O OBJECT O.swift L.swift) @@ -57,16 +72,7 @@ add_dependencies(P SwiftOnly) add_library(SwiftIface INTERFACE) target_link_libraries(SwiftOnly PRIVATE SwiftIface) -# @_alwaysEmitIntoClient ensures that the function body is inserted into the -# swiftmodule instead of as a symbol in the binary itself. I'm doing this to -# avoid having to link the executable. There are some flags required in order to -# link an executable into a library that I didn't see CMake emitting for Swift -# on macOS. AEIC is the easiest workaround that still tests this functionality. -# Unfortunately, AEIC was only added recently (~Swift 5.2), so we need to check -# that it is available before using it. -if(CMAKE_Swift_COMPILER_VERSION VERSION_GREATER_EQUAL 5.2) - add_subdirectory("SwiftPlugin") -endif() +add_subdirectory("SwiftPlugin") function(test_cmp0157_default mode) if(POLICY CMP0157) diff --git a/Tests/SwiftOnly/SubC/CMakeLists.txt b/Tests/SwiftOnly/SubC/CMakeLists.txt new file mode 100644 index 0000000..4fdb3d3 --- /dev/null +++ b/Tests/SwiftOnly/SubC/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(SubC SubC.swift) +target_link_libraries(SubC PUBLIC SubD) diff --git a/Tests/SwiftOnly/SubC/SubC.swift b/Tests/SwiftOnly/SubC/SubC.swift new file mode 100644 index 0000000..1ca44f4 --- /dev/null +++ b/Tests/SwiftOnly/SubC/SubC.swift @@ -0,0 +1 @@ +import SubD diff --git a/Tests/SwiftOnly/SubD/CMakeLists.txt b/Tests/SwiftOnly/SubD/CMakeLists.txt new file mode 100644 index 0000000..01b38d3 --- /dev/null +++ b/Tests/SwiftOnly/SubD/CMakeLists.txt @@ -0,0 +1 @@ +add_library(SubD SubD.swift) diff --git a/Tests/SwiftOnly/SubD/SubD.swift b/Tests/SwiftOnly/SubD/SubD.swift new file mode 100644 index 0000000..857d3f4 --- /dev/null +++ b/Tests/SwiftOnly/SubD/SubD.swift @@ -0,0 +1 @@ +public let x = 42 diff --git a/Tests/SwiftOnly/SubE/CMakeLists.txt b/Tests/SwiftOnly/SubE/CMakeLists.txt new file mode 100644 index 0000000..099a81c --- /dev/null +++ b/Tests/SwiftOnly/SubE/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(SubE main.swift) +target_link_libraries(SubE PUBLIC SubD) diff --git a/Tests/SwiftOnly/SubE/main.swift b/Tests/SwiftOnly/SubE/main.swift new file mode 100644 index 0000000..1ca44f4 --- /dev/null +++ b/Tests/SwiftOnly/SubE/main.swift @@ -0,0 +1 @@ +import SubD diff --git a/Tests/SwiftOnly/SwiftPlugin/CMakeLists.txt b/Tests/SwiftOnly/SwiftPlugin/CMakeLists.txt index 4069f16..2bfbc8a 100644 --- a/Tests/SwiftOnly/SwiftPlugin/CMakeLists.txt +++ b/Tests/SwiftOnly/SwiftPlugin/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(main main.swift) set_target_properties(main PROPERTIES ENABLE_EXPORTS TRUE) -add_library(plugin plugin.swift) +add_library(plugin MODULE plugin.swift) target_link_libraries(plugin PRIVATE main) diff --git a/Tests/SwiftOnly/SwiftPlugin/main.swift b/Tests/SwiftOnly/SwiftPlugin/main.swift index f5aac51..caba1fb 100644 --- a/Tests/SwiftOnly/SwiftPlugin/main.swift +++ b/Tests/SwiftOnly/SwiftPlugin/main.swift @@ -1,4 +1,3 @@ -@_alwaysEmitIntoClient -public func exported() -> Int { 32 } +public func exported() -> Int { return 32 } print(exported()) diff --git a/Tests/SwiftOnly/SwiftPlugin/plugin.swift b/Tests/SwiftOnly/SwiftPlugin/plugin.swift index e84f248..d00ca33 100644 --- a/Tests/SwiftOnly/SwiftPlugin/plugin.swift +++ b/Tests/SwiftOnly/SwiftPlugin/plugin.swift @@ -1,3 +1,3 @@ import main -public func importing() -> Int { main.exported() + 1 } +public func importing() -> Int { return main.exported() + 1 } diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt index f77370c..c7b58a9 100644 --- a/Tests/TestsWorkingDirectory/CMakeLists.txt +++ b/Tests/TestsWorkingDirectory/CMakeLists.txt @@ -7,30 +7,32 @@ enable_testing() set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") -add_test(NAME WorkingDirectory0 COMMAND WorkingDirectory "${CMAKE_BINARY_DIR}") +file(REAL_PATH "${CMAKE_BINARY_DIR}" _real_binary_dir) -add_test(NAME WorkingDirectory1 COMMAND WorkingDirectory "${CMAKE_BINARY_DIR}") +add_test(NAME WorkingDirectory0 COMMAND WorkingDirectory "${_real_binary_dir}") + +add_test(NAME WorkingDirectory1 COMMAND WorkingDirectory "${_real_binary_dir}") set_tests_properties(WorkingDirectory1 PROPERTIES WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" ) -string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}") +string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${_real_binary_dir}") add_test(NAME WorkingDirectory2 COMMAND WorkingDirectory "${_parent_dir}") set_tests_properties(WorkingDirectory2 PROPERTIES WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/.." ) -set(_default_cwd "${CMAKE_BINARY_DIR}") +set(_default_cwd "${_real_binary_dir}") # FIXME: How to deal with /debug, /release, etc. with VS or Xcode? if(${CMAKE_GENERATOR} MATCHES "Makefiles") add_test(WorkingDirectory3 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory ${_default_cwd}) endif() -add_test(NAME WorkingDirectory4 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND WorkingDirectory ${CMAKE_BINARY_DIR}) +add_test(NAME WorkingDirectory4 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND WorkingDirectory ${_real_binary_dir}) -string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}") +string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${_real_binary_dir}") add_test(NAME WorkingDirectory5 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/.. COMMAND WorkingDirectory ${_parent_dir}) diff --git a/Tests/TestsWorkingDirectory/subdir/CMakeLists.txt b/Tests/TestsWorkingDirectory/subdir/CMakeLists.txt index c16b1db..a7f32b8 100644 --- a/Tests/TestsWorkingDirectory/subdir/CMakeLists.txt +++ b/Tests/TestsWorkingDirectory/subdir/CMakeLists.txt @@ -1,27 +1,29 @@ -add_test(NAME WorkingDirectory-Subdir0 COMMAND WorkingDirectory "${CMAKE_CURRENT_BINARY_DIR}") +file(REAL_PATH "${CMAKE_CURRENT_BINARY_DIR}" _real_current_binary_dir) -add_test(NAME WorkingDirectory-Subdir1 COMMAND WorkingDirectory "${CMAKE_CURRENT_BINARY_DIR}") +add_test(NAME WorkingDirectory-Subdir0 COMMAND WorkingDirectory "${_real_current_binary_dir}") + +add_test(NAME WorkingDirectory-Subdir1 COMMAND WorkingDirectory "${_real_current_binary_dir}") set_tests_properties(WorkingDirectory-Subdir1 PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) -string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_CURRENT_BINARY_DIR}") +string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${_real_current_binary_dir}") add_test(NAME WorkingDirectory-Subdir2 COMMAND WorkingDirectory "${_parent_dir}") set_tests_properties(WorkingDirectory-Subdir2 PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." ) -set(_default_cwd "${CMAKE_CURRENT_BINARY_DIR}") +set(_default_cwd "${_real_current_binary_dir}") # FIXME: How to deal with /debug, /release, etc. with VS or Xcode? if(${CMAKE_GENERATOR} MATCHES "Makefiles") add_test(WorkingDirectory-Subdir3 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory ${_default_cwd}) endif() -add_test(NAME WorkingDirectory-Subdir4 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND WorkingDirectory ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME WorkingDirectory-Subdir4 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND WorkingDirectory ${_real_current_binary_dir}) -string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_CURRENT_BINARY_DIR}") +string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${_real_current_binary_dir}") add_test(NAME WorkingDirectory-Subdir5 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.. COMMAND WorkingDirectory ${_parent_dir}) diff --git a/Tests/VSAndroid/CMakeLists.txt b/Tests/VSAndroid/CMakeLists.txt index 73b1e07..774ffc0 100644 --- a/Tests/VSAndroid/CMakeLists.txt +++ b/Tests/VSAndroid/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.3) project(VSAndroid C CXX) set(CMAKE_ANDROID_ARCH armv7-a) -set(CMAKE_ANDROID_STL_TYPE stlport_shared) +set(CMAKE_ANDROID_STL_TYPE c++_shared) set(CMAKE_ANDROID_API_MIN 9) set(CMAKE_ANDROID_API 15) set(CMAKE_ANDROID_GUI 1) |