From 78c8d956050834dbbce78fb0e3f5f42dd2253fd9 Mon Sep 17 00:00:00 2001 From: Deniz Bahadir Date: Fri, 25 Sep 2020 18:50:55 +0200 Subject: GENERATED prop: Add some tests before introducing changes with CMP0118 These are tests which shall assure that the upcoming changes regarding the `GENERATED` source-file property and the associated new policy CMP0118 do not change (or only slightly change) the current, observable behavior when policy CMP0118 is set to `OLD`. --- Tests/RunCMake/CMP0118/CMP0118-Common-Helper.cmake | 14 +++ Tests/RunCMake/CMP0118/CMP0118-Common-Test1.cmake | 9 ++ Tests/RunCMake/CMP0118/CMP0118-Common-Test10.cmake | 65 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test11.cmake | 65 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test12.cmake | 65 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test13.cmake | 65 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test14.cmake | 65 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test15.cmake | 65 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test2.cmake | 12 +++ Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake | 66 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake | 66 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake | 66 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake | 66 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake | 78 ++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test6.cmake | 44 ++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test7.cmake | 44 ++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake | 50 +++++++++ Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake | 50 +++++++++ .../RunCMake/CMP0118/CMP0118-OLD-Test1-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt | 16 +++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test1.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test10-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt | 57 ++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test10.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test11-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt | 89 ++++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test11.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test12-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt | 51 +++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test12.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test13-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt | 51 +++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test13.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test14-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt | 57 ++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test14.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test15-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt | 89 ++++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test15.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt | 1 + Tests/RunCMake/CMP0118/CMP0118-OLD-Test2.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test3-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt | 93 ++++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test3.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test3b-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt | 93 ++++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test4-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt | 101 ++++++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test4.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test4b-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt | 101 ++++++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test5-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt | 117 +++++++++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test5.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test6-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt | 51 +++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test6.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test7-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt | 83 +++++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test7.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test8-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt | 51 +++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test8.cmake | 2 + .../RunCMake/CMP0118/CMP0118-OLD-Test9-result.txt | 1 + .../RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt | 67 ++++++++++++ Tests/RunCMake/CMP0118/CMP0118-OLD-Test9.cmake | 2 + Tests/RunCMake/CMP0118/CMakeLists.txt | 4 + Tests/RunCMake/CMP0118/RunCMakeTest.cmake | 19 ++++ Tests/RunCMake/CMP0118/source.cpp.in | 5 + .../CMP0118/subdir-Common-Test10/CMakeLists.txt | 33 ++++++ .../CMP0118/subdir-Common-Test11/CMakeLists.txt | 33 ++++++ .../CMP0118/subdir-Common-Test12/CMakeLists.txt | 33 ++++++ .../CMP0118/subdir-Common-Test13/CMakeLists.txt | 33 ++++++ .../CMP0118/subdir-Common-Test14/CMakeLists.txt | 33 ++++++ .../CMP0118/subdir-Common-Test15/CMakeLists.txt | 33 ++++++ .../CMP0118/subdir-Common-Test6/CMakeLists.txt | 16 +++ .../CMP0118/subdir-Common-Test7/CMakeLists.txt | 16 +++ .../CMP0118/subdir-Common-Test8/CMakeLists.txt | 30 ++++++ .../CMP0118/subdir-Common-Test9/CMakeLists.txt | 30 ++++++ Tests/RunCMake/CMakeLists.txt | 1 + 82 files changed, 2492 insertions(+) create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Helper.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test1.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test10.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test11.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test12.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test13.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test14.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test15.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test2.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test6.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test7.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test1.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test10.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test11.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test12.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test13.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test14.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test15.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test2.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test3.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test4.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test5.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test6.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test7.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test8.cmake create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-result.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt create mode 100644 Tests/RunCMake/CMP0118/CMP0118-OLD-Test9.cmake create mode 100644 Tests/RunCMake/CMP0118/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/CMP0118/source.cpp.in create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test10/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test11/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test12/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test14/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test15/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test6/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test7/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Helper.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Helper.cmake new file mode 100644 index 0000000..b237b7f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-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/CMP0118/CMP0118-Common-Test1.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test1.cmake new file mode 100644 index 0000000..fc4f5ec --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test1.cmake @@ -0,0 +1,9 @@ +add_executable(executable) +target_sources(executable PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.cpp" +) + +get_property(prop SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.cpp" + PROPERTY GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test10.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test10.cmake new file mode 100644 index 0000000..d0b2044 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test10.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +# The sources of executable0 will not be modified by set_property! +add_executable(executable0) +target_sources(executable0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +# The sources of executable[1-6] will (tried to) be modified by set_property! +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) + +add_subdirectory(subdir-Common-Test10) + +get_and_print_GENERATED_property("Generated_source0.cpp") +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test11.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test11.cmake new file mode 100644 index 0000000..f21a7b1 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test11.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +# The sources of executable0 will not be modified by set_property! +add_executable(executable0) +target_sources(executable0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +# The sources of executable[1-6] will (tried to) be modified by set_property! +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) + +add_subdirectory(subdir-Common-Test11) + +get_and_print_GENERATED_property("Generated_source0.cpp") +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test12.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test12.cmake new file mode 100644 index 0000000..280edca --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test12.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +# The sources of executable0 will not be modified by set_property! +add_executable(executable0) +target_sources(executable0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +# The sources of executable[1-6] will (tried to) be modified by set_property! +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +add_custom_command(TARGET executable0 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +add_custom_command(TARGET executable1 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_custom_command(TARGET executable2 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_custom_command(TARGET executable3 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) + +add_subdirectory(subdir-Common-Test12) + +get_and_print_GENERATED_property("Generated_source0.cpp") +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test13.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test13.cmake new file mode 100644 index 0000000..e1dfa11 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test13.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +# The sources of executable0 will not be modified by set_property! +add_executable(executable0) +target_sources(executable0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +# The sources of executable[1-6] will (tried to) be modified by set_property! +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +add_custom_command(TARGET executable0 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +add_custom_command(TARGET executable1 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_custom_command(TARGET executable2 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_custom_command(TARGET executable3 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) + +add_subdirectory(subdir-Common-Test13) + +get_and_print_GENERATED_property("Generated_source0.cpp") +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test14.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test14.cmake new file mode 100644 index 0000000..5222353 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test14.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +# The sources of executable0 will not be modified by set_property! +add_executable(executable0) +target_sources(executable0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +# The sources of executable[1-6] will (tried to) be modified by set_property! +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +add_custom_target(executable0_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +add_custom_target(executable1_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_custom_target(executable2_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_custom_target(executable3_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) + +add_subdirectory(subdir-Common-Test14) + +get_and_print_GENERATED_property("Generated_source0.cpp") +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test15.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test15.cmake new file mode 100644 index 0000000..c2c55af --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test15.cmake @@ -0,0 +1,65 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +# The sources of executable0 will not be modified by set_property! +add_executable(executable0) +target_sources(executable0 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +# The sources of executable[1-6] will (tried to) be modified by set_property! +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +add_custom_target(executable0_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source0.cpp" +) +add_custom_target(executable1_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_custom_target(executable2_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_custom_target(executable3_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) + +add_subdirectory(subdir-Common-Test15) + +get_and_print_GENERATED_property("Generated_source0.cpp") +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test2.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2.cmake new file mode 100644 index 0000000..feb66e3 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2.cmake @@ -0,0 +1,12 @@ +add_executable(executable) +target_sources(executable PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.cpp" +) + +set_property(SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.cpp" + PROPERTY GENERATED "1") +get_property(prop SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.cpp" + PROPERTY GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake new file mode 100644 index 0000000..b12834d --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake @@ -0,0 +1,66 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "Generated_with_relative_path1.cpp" + "Generated_with_relative_path2.cpp" + "Generated_with_relative_path3.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path1.cpp") + +set_property(SOURCE "Generated_with_full_path2.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_relative_path1.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path1.cpp") + +set_property(SOURCE "Generated_with_relative_path2.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path2.cpp") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_relative_path3.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path1.cpp") + +set_property(SOURCE "Generated_with_full_source_path2.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path3.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake new file mode 100644 index 0000000..3e4a280 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake @@ -0,0 +1,66 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path1.cpp") + +set_property(SOURCE "Generated_with_full_path2.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_relative_path1.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path1.cpp") + +set_property(SOURCE "Generated_with_relative_path2.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path2.cpp") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_relative_path3.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_relative_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path1.cpp") + +set_property(SOURCE "Generated_with_full_source_path2.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.cpp" + PROPERTY GENERATED "1") +get_and_print_GENERATED_property("Generated_with_full_source_path3.cpp") + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "Generated_with_relative_path1.cpp" + "Generated_with_relative_path2.cpp" + "Generated_with_relative_path3.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.cpp" +) diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake new file mode 100644 index 0000000..81f1254 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake @@ -0,0 +1,66 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "Generated_with_relative_path1.cpp" + "Generated_with_relative_path2.cpp" + "Generated_with_relative_path3.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path1.cpp") + +set_property(SOURCE "Generated_with_full_path2.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_relative_path1.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path1.cpp") + +set_property(SOURCE "Generated_with_relative_path2.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path2.cpp") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_relative_path3.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path1.cpp") + +set_property(SOURCE "Generated_with_full_source_path2.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path3.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake new file mode 100644 index 0000000..439f456 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake @@ -0,0 +1,66 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path1.cpp") + +set_property(SOURCE "Generated_with_full_path2.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_relative_path1.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path1.cpp") + +set_property(SOURCE "Generated_with_relative_path2.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path2.cpp") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_relative_path3.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_relative_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path1.cpp") + +set_property(SOURCE "Generated_with_full_source_path2.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.cpp" + PROPERTY GENERATED "0") +get_and_print_GENERATED_property("Generated_with_full_source_path3.cpp") + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "Generated_with_relative_path1.cpp" + "Generated_with_relative_path2.cpp" + "Generated_with_relative_path3.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.cpp" +) diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake new file mode 100644 index 0000000..1bf9aaa --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake @@ -0,0 +1,78 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "Generated_with_relative_path1.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "Generated_with_relative_path2.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "Generated_with_relative_path3.cpp" +) +add_executable(executable7) +target_sources(executable7 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.cpp" +) +add_executable(executable8) +target_sources(executable8 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.cpp" +) +add_executable(executable9) +target_sources(executable9 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path1.cpp" + PROPERTY GENERATED "tRue") +get_and_print_GENERATED_property("Generated_with_full_path1.cpp") + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path2.cpp" + PROPERTY GENERATED "SomeVar-NOTFOUND") +get_and_print_GENERATED_property("Generated_with_full_path2.cpp") + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_path3.cpp" + PROPERTY GENERATED "Junk-value") +get_and_print_GENERATED_property("Generated_with_full_path3.cpp") + + +set_property(SOURCE "Generated_with_relative_path1.cpp" + PROPERTY GENERATED "tRue") +get_and_print_GENERATED_property("Generated_with_relative_path1.cpp") + +set_property(SOURCE "Generated_with_relative_path2.cpp" + PROPERTY GENERATED "SomeVar-NOTFOUND") +get_and_print_GENERATED_property("Generated_with_relative_path2.cpp") + +set_property(SOURCE "Generated_with_relative_path3.cpp" + PROPERTY GENERATED "Junk-value") +get_and_print_GENERATED_property("Generated_with_relative_path3.cpp") + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.cpp" + PROPERTY GENERATED "tRue") +get_and_print_GENERATED_property("Generated_with_full_source_path1.cpp") + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path2.cpp" + PROPERTY GENERATED "SomeVar-NOTFOUND") +get_and_print_GENERATED_property("Generated_with_full_source_path2.cpp") + +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.cpp" + PROPERTY GENERATED "Junk-value") +get_and_print_GENERATED_property("Generated_with_full_source_path3.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test6.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test6.cmake new file mode 100644 index 0000000..7715e78 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test6.cmake @@ -0,0 +1,44 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + PROPERTY GENERATED "1") + +add_subdirectory(subdir-Common-Test6) + +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test7.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test7.cmake new file mode 100644 index 0000000..96bb590 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test7.cmake @@ -0,0 +1,44 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + PROPERTY GENERATED "1") + +add_subdirectory(subdir-Common-Test7) + +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake new file mode 100644 index 0000000..2c87b65 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake @@ -0,0 +1,50 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test8) + +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake new file mode 100644 index 0000000..e302f5c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake @@ -0,0 +1,50 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_executable(executable1) +target_sources(executable1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" +) +add_executable(executable2) +target_sources(executable2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" +) +add_executable(executable3) +target_sources(executable3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" +) +add_executable(executable4) +target_sources(executable4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" +) +add_executable(executable5) +target_sources(executable5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" +) +add_executable(executable6) +target_sources(executable6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" +) + + +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test9) + +get_and_print_GENERATED_property("Generated_source1.cpp") +get_and_print_GENERATED_property("Generated_source2.cpp") +get_and_print_GENERATED_property("Generated_source3.cpp") +get_and_print_GENERATED_property("Generated_source4.cpp") +get_and_print_GENERATED_property("Generated_source5.cpp") +get_and_print_GENERATED_property("Generated_source6.cpp") diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt new file mode 100644 index 0000000..1bf5e86 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt @@ -0,0 +1,16 @@ +^prop: `` +CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-build/GeneratedMain\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test1\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test1.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1.cmake new file mode 100644 index 0000000..c635c86 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test1.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt new file mode 100644 index 0000000..72880aa --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt @@ -0,0 +1,57 @@ +^Generated_source0\.cpp: # 1a # GENERATED = `1` +Generated_source0\.cpp: # 1b # GENERATED = `1` +Generated_source0\.cpp: # 2a # GENERATED = `1` +Generated_source0\.cpp: # 2b # GENERATED = `1` +Generated_source0\.cpp: # 3a # GENERATED = `` +Generated_source0\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 1a # GENERATED = `1` +Generated_source1\.cpp: # 1b # GENERATED = `1` +Generated_source1\.cpp: # 2a # GENERATED = `1` +Generated_source1\.cpp: # 2b # GENERATED = `1` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `1` +Generated_source2\.cpp: # 1b # GENERATED = `1` +Generated_source2\.cpp: # 2a # GENERATED = `1` +Generated_source2\.cpp: # 2b # GENERATED = `1` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `1` +Generated_source3\.cpp: # 1b # GENERATED = `1` +Generated_source3\.cpp: # 2a # GENERATED = `1` +Generated_source3\.cpp: # 2b # GENERATED = `1` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `1` +Generated_source5\.cpp: # 1b # GENERATED = `1` +Generated_source5\.cpp: # 2a # GENERATED = `1` +Generated_source5\.cpp: # 2b # GENERATED = `1` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `1` +Generated_source6\.cpp: # 1b # GENERATED = `1` +Generated_source6\.cpp: # 2a # GENERATED = `1` +Generated_source6\.cpp: # 2b # GENERATED = `1` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test10\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-build/Generated_source4\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test10\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test10\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable4 +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test10.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10.cmake new file mode 100644 index 0000000..903d418 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test10.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test10.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt new file mode 100644 index 0000000..ea278aa --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt @@ -0,0 +1,89 @@ +^Generated_source0\.cpp: # 1a # GENERATED = `1` +Generated_source0\.cpp: # 1b # GENERATED = `1` +Generated_source0\.cpp: # 2a # GENERATED = `1` +Generated_source0\.cpp: # 2b # GENERATED = `1` +Generated_source0\.cpp: # 3a # GENERATED = `` +Generated_source0\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 1a # GENERATED = `1` +Generated_source1\.cpp: # 1b # GENERATED = `1` +Generated_source1\.cpp: # 2a # GENERATED = `1` +Generated_source1\.cpp: # 2b # GENERATED = `1` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `0` +Generated_source2\.cpp: # 1b # GENERATED = `0` +Generated_source2\.cpp: # 2a # GENERATED = `0` +Generated_source2\.cpp: # 2b # GENERATED = `0` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `0` +Generated_source3\.cpp: # 1b # GENERATED = `0` +Generated_source3\.cpp: # 2a # GENERATED = `0` +Generated_source3\.cpp: # 2b # GENERATED = `0` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `0` +Generated_source5\.cpp: # 1b # GENERATED = `0` +Generated_source5\.cpp: # 2a # GENERATED = `0` +Generated_source5\.cpp: # 2b # GENERATED = `0` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `0` +Generated_source6\.cpp: # 1b # GENERATED = `0` +Generated_source6\.cpp: # 2a # GENERATED = `0` +Generated_source6\.cpp: # 2b # GENERATED = `0` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test11\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[2-6] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test11.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11.cmake new file mode 100644 index 0000000..14511f8 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test11.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test11.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt new file mode 100644 index 0000000..33b2c89 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt @@ -0,0 +1,51 @@ +^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'executable[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'executable[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'executable[4-6]' was not created in this directory\. ++ +Generated_source0\.cpp: # 1a # GENERATED = `1` +Generated_source0\.cpp: # 1b # GENERATED = `1` +Generated_source0\.cpp: # 2a # GENERATED = `1` +Generated_source0\.cpp: # 2b # GENERATED = `1` +Generated_source0\.cpp: # 3a # GENERATED = `` +Generated_source0\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 1a # GENERATED = `1` +Generated_source1\.cpp: # 1b # GENERATED = `1` +Generated_source1\.cpp: # 2a # GENERATED = `1` +Generated_source1\.cpp: # 2b # GENERATED = `1` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `1` +Generated_source2\.cpp: # 1b # GENERATED = `1` +Generated_source2\.cpp: # 2a # GENERATED = `1` +Generated_source2\.cpp: # 2b # GENERATED = `1` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `1` +Generated_source3\.cpp: # 1b # GENERATED = `1` +Generated_source3\.cpp: # 2a # GENERATED = `1` +Generated_source3\.cpp: # 2b # GENERATED = `1` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `1` +Generated_source5\.cpp: # 1b # GENERATED = `1` +Generated_source5\.cpp: # 2a # GENERATED = `1` +Generated_source5\.cpp: # 2b # GENERATED = `1` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `1` +Generated_source6\.cpp: # 1b # GENERATED = `1` +Generated_source6\.cpp: # 2a # GENERATED = `1` +Generated_source6\.cpp: # 2b # GENERATED = `1` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12.cmake new file mode 100644 index 0000000..a230e03 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test12.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test12.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt new file mode 100644 index 0000000..c8edad4 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt @@ -0,0 +1,51 @@ +^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'executable[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'executable[4-6]' was not created in this directory\. ++ +CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'executable[4-6]' was not created in this directory\. ++ +Generated_source0\.cpp: # 1a # GENERATED = `1` +Generated_source0\.cpp: # 1b # GENERATED = `1` +Generated_source0\.cpp: # 2a # GENERATED = `1` +Generated_source0\.cpp: # 2b # GENERATED = `1` +Generated_source0\.cpp: # 3a # GENERATED = `` +Generated_source0\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 1a # GENERATED = `1` +Generated_source1\.cpp: # 1b # GENERATED = `1` +Generated_source1\.cpp: # 2a # GENERATED = `1` +Generated_source1\.cpp: # 2b # GENERATED = `1` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `0` +Generated_source2\.cpp: # 1b # GENERATED = `0` +Generated_source2\.cpp: # 2a # GENERATED = `0` +Generated_source2\.cpp: # 2b # GENERATED = `0` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `0` +Generated_source3\.cpp: # 1b # GENERATED = `0` +Generated_source3\.cpp: # 2a # GENERATED = `0` +Generated_source3\.cpp: # 2b # GENERATED = `0` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `0` +Generated_source5\.cpp: # 1b # GENERATED = `0` +Generated_source5\.cpp: # 2a # GENERATED = `0` +Generated_source5\.cpp: # 2b # GENERATED = `0` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `0` +Generated_source6\.cpp: # 1b # GENERATED = `0` +Generated_source6\.cpp: # 2a # GENERATED = `0` +Generated_source6\.cpp: # 2b # GENERATED = `0` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13.cmake new file mode 100644 index 0000000..26c246e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test13.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test13.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt new file mode 100644 index 0000000..8fdee89 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt @@ -0,0 +1,57 @@ +^Generated_source0\.cpp: # 1a # GENERATED = `1` +Generated_source0\.cpp: # 1b # GENERATED = `1` +Generated_source0\.cpp: # 2a # GENERATED = `1` +Generated_source0\.cpp: # 2b # GENERATED = `1` +Generated_source0\.cpp: # 3a # GENERATED = `` +Generated_source0\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 1a # GENERATED = `1` +Generated_source1\.cpp: # 1b # GENERATED = `1` +Generated_source1\.cpp: # 2a # GENERATED = `1` +Generated_source1\.cpp: # 2b # GENERATED = `1` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `1` +Generated_source2\.cpp: # 1b # GENERATED = `1` +Generated_source2\.cpp: # 2a # GENERATED = `1` +Generated_source2\.cpp: # 2b # GENERATED = `1` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `1` +Generated_source3\.cpp: # 1b # GENERATED = `1` +Generated_source3\.cpp: # 2a # GENERATED = `1` +Generated_source3\.cpp: # 2b # GENERATED = `1` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `1` +Generated_source5\.cpp: # 1b # GENERATED = `1` +Generated_source5\.cpp: # 2a # GENERATED = `1` +Generated_source5\.cpp: # 2b # GENERATED = `1` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `1` +Generated_source6\.cpp: # 1b # GENERATED = `1` +Generated_source6\.cpp: # 2a # GENERATED = `1` +Generated_source6\.cpp: # 2b # GENERATED = `1` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test14\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-build/Generated_source4\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test14\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test14\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable4 +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test14.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14.cmake new file mode 100644 index 0000000..d131877 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test14.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test14.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt new file mode 100644 index 0000000..686678d --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt @@ -0,0 +1,89 @@ +^Generated_source0\.cpp: # 1a # GENERATED = `1` +Generated_source0\.cpp: # 1b # GENERATED = `1` +Generated_source0\.cpp: # 2a # GENERATED = `1` +Generated_source0\.cpp: # 2b # GENERATED = `1` +Generated_source0\.cpp: # 3a # GENERATED = `` +Generated_source0\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 1a # GENERATED = `1` +Generated_source1\.cpp: # 1b # GENERATED = `1` +Generated_source1\.cpp: # 2a # GENERATED = `1` +Generated_source1\.cpp: # 2b # GENERATED = `1` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `0` +Generated_source2\.cpp: # 1b # GENERATED = `0` +Generated_source2\.cpp: # 2a # GENERATED = `0` +Generated_source2\.cpp: # 2b # GENERATED = `0` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `0` +Generated_source3\.cpp: # 1b # GENERATED = `0` +Generated_source3\.cpp: # 2a # GENERATED = `0` +Generated_source3\.cpp: # 2b # GENERATED = `0` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `0` +Generated_source5\.cpp: # 1b # GENERATED = `0` +Generated_source5\.cpp: # 2a # GENERATED = `0` +Generated_source5\.cpp: # 2b # GENERATED = `0` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `0` +Generated_source6\.cpp: # 1b # GENERATED = `0` +Generated_source6\.cpp: # 2a # GENERATED = `0` +Generated_source6\.cpp: # 2b # GENERATED = `0` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test15\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[2-6] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test15.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15.cmake new file mode 100644 index 0000000..1559745 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test15.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test15.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt new file mode 100644 index 0000000..403ce5a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2.cmake new file mode 100644 index 0000000..5840399 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test2.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt new file mode 100644 index 0000000..367baf1 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt @@ -0,0 +1,93 @@ +^Generated_with_full_path1\.cpp: # 1a # GENERATED = `1` +Generated_with_full_path1\.cpp: # 1b # GENERATED = `1` +Generated_with_full_path1\.cpp: # 2a # GENERATED = `1` +Generated_with_full_path1\.cpp: # 2b # GENERATED = `1` +Generated_with_full_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path2\.cpp: # 1a # GENERATED = `1` +Generated_with_full_path2\.cpp: # 1b # GENERATED = `1` +Generated_with_full_path2\.cpp: # 2a # GENERATED = `1` +Generated_with_full_path2\.cpp: # 2b # GENERATED = `1` +Generated_with_full_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path1\.cpp: # 1a # GENERATED = `1` +Generated_with_relative_path1\.cpp: # 1b # GENERATED = `1` +Generated_with_relative_path1\.cpp: # 2a # GENERATED = `1` +Generated_with_relative_path1\.cpp: # 2b # GENERATED = `1` +Generated_with_relative_path1\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path2\.cpp: # 1a # GENERATED = `1` +Generated_with_relative_path2\.cpp: # 1b # GENERATED = `1` +Generated_with_relative_path2\.cpp: # 2a # GENERATED = `1` +Generated_with_relative_path2\.cpp: # 2b # GENERATED = `1` +Generated_with_relative_path2\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 1a # GENERATED = `` +Generated_with_relative_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 2a # GENERATED = `1` +Generated_with_relative_path3\.cpp: # 2b # GENERATED = `1` +Generated_with_relative_path3\.cpp: # 3a # GENERATED = `1` +Generated_with_relative_path3\.cpp: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path2\.cpp: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.cpp: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.cpp: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.cpp: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test3-build/Generated_with_full_path3\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test3-build/Generated_with_full_path3\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test3-build/Generated_with_full_path3\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test3-build/Generated_with_full_path3\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[13-5] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test3.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3.cmake new file mode 100644 index 0000000..12b692c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test3.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt new file mode 100644 index 0000000..66bc73e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt @@ -0,0 +1,93 @@ +^Generated_with_full_path1\.cpp: # 1a # GENERATED = `1` +Generated_with_full_path1\.cpp: # 1b # GENERATED = `1` +Generated_with_full_path1\.cpp: # 2a # GENERATED = `1` +Generated_with_full_path1\.cpp: # 2b # GENERATED = `1` +Generated_with_full_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path2\.cpp: # 1a # GENERATED = `1` +Generated_with_full_path2\.cpp: # 1b # GENERATED = `1` +Generated_with_full_path2\.cpp: # 2a # GENERATED = `1` +Generated_with_full_path2\.cpp: # 2b # GENERATED = `1` +Generated_with_full_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path1\.cpp: # 1a # GENERATED = `1` +Generated_with_relative_path1\.cpp: # 1b # GENERATED = `1` +Generated_with_relative_path1\.cpp: # 2a # GENERATED = `1` +Generated_with_relative_path1\.cpp: # 2b # GENERATED = `1` +Generated_with_relative_path1\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path2\.cpp: # 1a # GENERATED = `1` +Generated_with_relative_path2\.cpp: # 1b # GENERATED = `1` +Generated_with_relative_path2\.cpp: # 2a # GENERATED = `1` +Generated_with_relative_path2\.cpp: # 2b # GENERATED = `1` +Generated_with_relative_path2\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 1a # GENERATED = `` +Generated_with_relative_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 2a # GENERATED = `1` +Generated_with_relative_path3\.cpp: # 2b # GENERATED = `1` +Generated_with_relative_path3\.cpp: # 3a # GENERATED = `1` +Generated_with_relative_path3\.cpp: # 3b # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 1a # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 2a # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 2b # GENERATED = `1` +Generated_with_full_source_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path2\.cpp: # 1a # GENERATED = `1` +Generated_with_full_source_path2\.cpp: # 1b # GENERATED = `1` +Generated_with_full_source_path2\.cpp: # 2a # GENERATED = `1` +Generated_with_full_source_path2\.cpp: # 2b # GENERATED = `1` +Generated_with_full_source_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[13-5] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test3b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b.cmake new file mode 100644 index 0000000..d43fd6a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test3b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt new file mode 100644 index 0000000..c00f05c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt @@ -0,0 +1,101 @@ +^Generated_with_full_path1\.cpp: # 1a # GENERATED = `0` +Generated_with_full_path1\.cpp: # 1b # GENERATED = `0` +Generated_with_full_path1\.cpp: # 2a # GENERATED = `0` +Generated_with_full_path1\.cpp: # 2b # GENERATED = `0` +Generated_with_full_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path2\.cpp: # 1a # GENERATED = `0` +Generated_with_full_path2\.cpp: # 1b # GENERATED = `0` +Generated_with_full_path2\.cpp: # 2a # GENERATED = `0` +Generated_with_full_path2\.cpp: # 2b # GENERATED = `0` +Generated_with_full_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path1\.cpp: # 1a # GENERATED = `0` +Generated_with_relative_path1\.cpp: # 1b # GENERATED = `0` +Generated_with_relative_path1\.cpp: # 2a # GENERATED = `0` +Generated_with_relative_path1\.cpp: # 2b # GENERATED = `0` +Generated_with_relative_path1\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path2\.cpp: # 1a # GENERATED = `0` +Generated_with_relative_path2\.cpp: # 1b # GENERATED = `0` +Generated_with_relative_path2\.cpp: # 2a # GENERATED = `0` +Generated_with_relative_path2\.cpp: # 2b # GENERATED = `0` +Generated_with_relative_path2\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 1a # GENERATED = `` +Generated_with_relative_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 2a # GENERATED = `0` +Generated_with_relative_path3\.cpp: # 2b # GENERATED = `0` +Generated_with_relative_path3\.cpp: # 3a # GENERATED = `0` +Generated_with_relative_path3\.cpp: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path2\.cpp: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.cpp: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.cpp: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.cpp: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test4\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[1-5] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test4.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4.cmake new file mode 100644 index 0000000..cd9edae --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test4.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt new file mode 100644 index 0000000..de7d966 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt @@ -0,0 +1,101 @@ +^Generated_with_full_path1\.cpp: # 1a # GENERATED = `0` +Generated_with_full_path1\.cpp: # 1b # GENERATED = `0` +Generated_with_full_path1\.cpp: # 2a # GENERATED = `0` +Generated_with_full_path1\.cpp: # 2b # GENERATED = `0` +Generated_with_full_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path2\.cpp: # 1a # GENERATED = `0` +Generated_with_full_path2\.cpp: # 1b # GENERATED = `0` +Generated_with_full_path2\.cpp: # 2a # GENERATED = `0` +Generated_with_full_path2\.cpp: # 2b # GENERATED = `0` +Generated_with_full_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path1\.cpp: # 1a # GENERATED = `0` +Generated_with_relative_path1\.cpp: # 1b # GENERATED = `0` +Generated_with_relative_path1\.cpp: # 2a # GENERATED = `0` +Generated_with_relative_path1\.cpp: # 2b # GENERATED = `0` +Generated_with_relative_path1\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path2\.cpp: # 1a # GENERATED = `0` +Generated_with_relative_path2\.cpp: # 1b # GENERATED = `0` +Generated_with_relative_path2\.cpp: # 2a # GENERATED = `0` +Generated_with_relative_path2\.cpp: # 2b # GENERATED = `0` +Generated_with_relative_path2\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 1a # GENERATED = `` +Generated_with_relative_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 2a # GENERATED = `0` +Generated_with_relative_path3\.cpp: # 2b # GENERATED = `0` +Generated_with_relative_path3\.cpp: # 3a # GENERATED = `0` +Generated_with_relative_path3\.cpp: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 1b # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 2a # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 2b # GENERATED = `0` +Generated_with_full_source_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path2\.cpp: # 1a # GENERATED = `0` +Generated_with_full_source_path2\.cpp: # 1b # GENERATED = `0` +Generated_with_full_source_path2\.cpp: # 2a # GENERATED = `0` +Generated_with_full_source_path2\.cpp: # 2b # GENERATED = `0` +Generated_with_full_source_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test4b-build/Generated_with_full_path1\.cpp|CMP0118-OLD-Test4b-build/Generated_with_relative_path1\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test4b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test4b\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[1-5] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test4b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b.cmake new file mode 100644 index 0000000..d8fe6f4 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test4b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt new file mode 100644 index 0000000..0cc80ea --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt @@ -0,0 +1,117 @@ +^Generated_with_full_path1\.cpp: # 1a # GENERATED = `tRue` +Generated_with_full_path1\.cpp: # 1b # GENERATED = `tRue` +Generated_with_full_path1\.cpp: # 2a # GENERATED = `tRue` +Generated_with_full_path1\.cpp: # 2b # GENERATED = `tRue` +Generated_with_full_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path2\.cpp: # 1a # GENERATED = `SomeVar-NOTFOUND` +Generated_with_full_path2\.cpp: # 1b # GENERATED = `SomeVar-NOTFOUND` +Generated_with_full_path2\.cpp: # 2a # GENERATED = `SomeVar-NOTFOUND` +Generated_with_full_path2\.cpp: # 2b # GENERATED = `SomeVar-NOTFOUND` +Generated_with_full_path2\.cpp: # 3a # GENERATED = `` +Generated_with_full_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_path3\.cpp: # 1a # GENERATED = `Junk-value` +Generated_with_full_path3\.cpp: # 1b # GENERATED = `Junk-value` +Generated_with_full_path3\.cpp: # 2a # GENERATED = `Junk-value` +Generated_with_full_path3\.cpp: # 2b # GENERATED = `Junk-value` +Generated_with_full_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path1\.cpp: # 1a # GENERATED = `tRue` +Generated_with_relative_path1\.cpp: # 1b # GENERATED = `tRue` +Generated_with_relative_path1\.cpp: # 2a # GENERATED = `tRue` +Generated_with_relative_path1\.cpp: # 2b # GENERATED = `tRue` +Generated_with_relative_path1\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path2\.cpp: # 1a # GENERATED = `SomeVar-NOTFOUND` +Generated_with_relative_path2\.cpp: # 1b # GENERATED = `SomeVar-NOTFOUND` +Generated_with_relative_path2\.cpp: # 2a # GENERATED = `SomeVar-NOTFOUND` +Generated_with_relative_path2\.cpp: # 2b # GENERATED = `SomeVar-NOTFOUND` +Generated_with_relative_path2\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_relative_path3\.cpp: # 1a # GENERATED = `Junk-value` +Generated_with_relative_path3\.cpp: # 1b # GENERATED = `Junk-value` +Generated_with_relative_path3\.cpp: # 2a # GENERATED = `Junk-value` +Generated_with_relative_path3\.cpp: # 2b # GENERATED = `Junk-value` +Generated_with_relative_path3\.cpp: # 3a # GENERATED = `` +Generated_with_relative_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path1\.cpp: # 1a # GENERATED = `tRue` +Generated_with_full_source_path1\.cpp: # 1b # GENERATED = `tRue` +Generated_with_full_source_path1\.cpp: # 2a # GENERATED = `tRue` +Generated_with_full_source_path1\.cpp: # 2b # GENERATED = `tRue` +Generated_with_full_source_path1\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_with_full_source_path2\.cpp: # 1a # GENERATED = `` +Generated_with_full_source_path2\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_source_path2\.cpp: # 2a # GENERATED = `SomeVar-NOTFOUND` +Generated_with_full_source_path2\.cpp: # 2b # GENERATED = `SomeVar-NOTFOUND` +Generated_with_full_source_path2\.cpp: # 3a # GENERATED = `SomeVar-NOTFOUND` +Generated_with_full_source_path2\.cpp: # 3b # GENERATED = `SomeVar-NOTFOUND` +Generated_with_full_source_path3\.cpp: # 1a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 2a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_with_full_source_path3\.cpp: # 3a # GENERATED = `` +Generated_with_full_source_path3\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.cpp|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.cpp) +Call Stack \(most recent call first\): + CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[235-9] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test5.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5.cmake new file mode 100644 index 0000000..ee1bac6 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test5.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt new file mode 100644 index 0000000..b2a0da0 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt @@ -0,0 +1,51 @@ +^Generated_source1\.cpp: # 1a # GENERATED = `1` +Generated_source1\.cpp: # 1b # GENERATED = `1` +Generated_source1\.cpp: # 2a # GENERATED = `1` +Generated_source1\.cpp: # 2b # GENERATED = `1` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `1` +Generated_source2\.cpp: # 1b # GENERATED = `1` +Generated_source2\.cpp: # 2a # GENERATED = `1` +Generated_source2\.cpp: # 2b # GENERATED = `1` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `1` +Generated_source3\.cpp: # 1b # GENERATED = `1` +Generated_source3\.cpp: # 2a # GENERATED = `1` +Generated_source3\.cpp: # 2b # GENERATED = `1` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `1` +Generated_source5\.cpp: # 1b # GENERATED = `1` +Generated_source5\.cpp: # 2a # GENERATED = `1` +Generated_source5\.cpp: # 2b # GENERATED = `1` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `1` +Generated_source6\.cpp: # 1b # GENERATED = `1` +Generated_source6\.cpp: # 2a # GENERATED = `1` +Generated_source6\.cpp: # 2b # GENERATED = `1` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test6\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-build/Generated_source4\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test6\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test6\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable4 +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test6.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6.cmake new file mode 100644 index 0000000..07665d8 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test6.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test6.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt new file mode 100644 index 0000000..f62713e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt @@ -0,0 +1,83 @@ +^Generated_source1\.cpp: # 1a # GENERATED = `1` +Generated_source1\.cpp: # 1b # GENERATED = `1` +Generated_source1\.cpp: # 2a # GENERATED = `1` +Generated_source1\.cpp: # 2b # GENERATED = `1` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `0` +Generated_source2\.cpp: # 1b # GENERATED = `0` +Generated_source2\.cpp: # 2a # GENERATED = `0` +Generated_source2\.cpp: # 2b # GENERATED = `0` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `0` +Generated_source3\.cpp: # 1b # GENERATED = `0` +Generated_source3\.cpp: # 2a # GENERATED = `0` +Generated_source3\.cpp: # 2b # GENERATED = `0` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `0` +Generated_source5\.cpp: # 1b # GENERATED = `0` +Generated_source5\.cpp: # 2a # GENERATED = `0` +Generated_source5\.cpp: # 2b # GENERATED = `0` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `0` +Generated_source6\.cpp: # 1b # GENERATED = `0` +Generated_source6\.cpp: # 2a # GENERATED = `0` +Generated_source6\.cpp: # 2b # GENERATED = `0` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-build/Generated_source[2-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test7\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[2-6] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test7.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7.cmake new file mode 100644 index 0000000..a85e3ca --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test7.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test7.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt new file mode 100644 index 0000000..59b3868 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt @@ -0,0 +1,51 @@ +^Generated_source1\.cpp: # 1a # GENERATED = `` +Generated_source1\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 2a # GENERATED = `` +Generated_source1\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `1` +Generated_source2\.cpp: # 1b # GENERATED = `1` +Generated_source2\.cpp: # 2a # GENERATED = `1` +Generated_source2\.cpp: # 2b # GENERATED = `1` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `1` +Generated_source3\.cpp: # 1b # GENERATED = `1` +Generated_source3\.cpp: # 2a # GENERATED = `1` +Generated_source3\.cpp: # 2b # GENERATED = `1` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `1` +Generated_source5\.cpp: # 1b # GENERATED = `1` +Generated_source5\.cpp: # 2a # GENERATED = `1` +Generated_source5\.cpp: # 2b # GENERATED = `1` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `1` +Generated_source6\.cpp: # 1b # GENERATED = `1` +Generated_source6\.cpp: # 2a # GENERATED = `1` +Generated_source6\.cpp: # 2b # GENERATED = `1` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test8\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-build/Generated_source4\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test8\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test8\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable4 +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test8.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8.cmake new file mode 100644 index 0000000..c82e18f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test8.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt new file mode 100644 index 0000000..c00b55b --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt @@ -0,0 +1,67 @@ +^Generated_source1\.cpp: # 1a # GENERATED = `` +Generated_source1\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 2a # GENERATED = `` +Generated_source1\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source1\.cpp: # 3a # GENERATED = `` +Generated_source1\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source2\.cpp: # 1a # GENERATED = `0` +Generated_source2\.cpp: # 1b # GENERATED = `0` +Generated_source2\.cpp: # 2a # GENERATED = `0` +Generated_source2\.cpp: # 2b # GENERATED = `0` +Generated_source2\.cpp: # 3a # GENERATED = `` +Generated_source2\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source3\.cpp: # 1a # GENERATED = `0` +Generated_source3\.cpp: # 1b # GENERATED = `0` +Generated_source3\.cpp: # 2a # GENERATED = `0` +Generated_source3\.cpp: # 2b # GENERATED = `0` +Generated_source3\.cpp: # 3a # GENERATED = `` +Generated_source3\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 1a # GENERATED = `` +Generated_source4\.cpp: # 1b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 2a # GENERATED = `` +Generated_source4\.cpp: # 2b # GENERATED = `NOTFOUND` +Generated_source4\.cpp: # 3a # GENERATED = `` +Generated_source4\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source5\.cpp: # 1a # GENERATED = `0` +Generated_source5\.cpp: # 1b # GENERATED = `0` +Generated_source5\.cpp: # 2a # GENERATED = `0` +Generated_source5\.cpp: # 2b # GENERATED = `0` +Generated_source5\.cpp: # 3a # GENERATED = `` +Generated_source5\.cpp: # 3b # GENERATED = `NOTFOUND` +Generated_source6\.cpp: # 1a # GENERATED = `0` +Generated_source6\.cpp: # 1b # GENERATED = `0` +Generated_source6\.cpp: # 2a # GENERATED = `0` +Generated_source6\.cpp: # 2b # GENERATED = `0` +Generated_source6\.cpp: # 3a # GENERATED = `` +Generated_source6\.cpp: # 3b # GENERATED = `NOTFOUND` +CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-build/Generated_source[4-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-build/Generated_source[4-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_executable\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-build/Generated_source[4-6]\.cpp +Call Stack \(most recent call first\): + CMP0118-OLD-Test9\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +(CMake Error at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_executable\): + No SOURCES given to target: executable[4-6] +Call Stack \(most recent call first\): + CMP0118-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/CMP0118/CMP0118-OLD-Test9.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9.cmake new file mode 100644 index 0000000..b31188f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9.cmake @@ -0,0 +1,2 @@ +#cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test9.cmake) diff --git a/Tests/RunCMake/CMP0118/CMakeLists.txt b/Tests/RunCMake/CMP0118/CMakeLists.txt new file mode 100644 index 0000000..3e06bbc --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.19) +cmake_policy(SET CMP0115 NEW) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0118/RunCMakeTest.cmake b/Tests/RunCMake/CMP0118/RunCMakeTest.cmake new file mode 100644 index 0000000..2321e39 --- /dev/null +++ b/Tests/RunCMake/CMP0118/RunCMakeTest.cmake @@ -0,0 +1,19 @@ +include(RunCMake) + +run_cmake(CMP0118-OLD-Test1) +run_cmake(CMP0118-OLD-Test2) +run_cmake(CMP0118-OLD-Test3) +run_cmake(CMP0118-OLD-Test3b) +run_cmake(CMP0118-OLD-Test4) +run_cmake(CMP0118-OLD-Test4b) +run_cmake(CMP0118-OLD-Test5) +run_cmake(CMP0118-OLD-Test6) +run_cmake(CMP0118-OLD-Test7) +run_cmake(CMP0118-OLD-Test8) +run_cmake(CMP0118-OLD-Test9) +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) diff --git a/Tests/RunCMake/CMP0118/source.cpp.in b/Tests/RunCMake/CMP0118/source.cpp.in new file mode 100644 index 0000000..678cd7a --- /dev/null +++ b/Tests/RunCMake/CMP0118/source.cpp.in @@ -0,0 +1,5 @@ +int func(); +int main() +{ + return func(); +} diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test10/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test10/CMakeLists.txt new file mode 100644 index 0000000..fbd42ac --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test10/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test11/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test11/CMakeLists.txt new file mode 100644 index 0000000..fc72dd7 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test11/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" +) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test12/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test12/CMakeLists.txt new file mode 100644 index 0000000..034f69c --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test12/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_command(TARGET executable4 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" +) +add_custom_command(TARGET executable5 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" +) +add_custom_command(TARGET executable6 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt new file mode 100644 index 0000000..a0a0808 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_command(TARGET executable4 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" +) +add_custom_command(TARGET executable5 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" +) +add_custom_command(TARGET executable6 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test14/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test14/CMakeLists.txt new file mode 100644 index 0000000..5d47115 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test14/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_target(executable4_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" +) +add_custom_target(executable5_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" +) +add_custom_target(executable6_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test15/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test15/CMakeLists.txt new file mode 100644 index 0000000..0ad62f7 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test15/CMakeLists.txt @@ -0,0 +1,33 @@ +add_custom_target(executable4_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" +) +add_custom_target(executable5_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" +) +add_custom_target(executable6_source_generator ALL + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test6/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test6/CMakeLists.txt new file mode 100644 index 0000000..d35a030 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test6/CMakeLists.txt @@ -0,0 +1,16 @@ +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test7/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test7/CMakeLists.txt new file mode 100644 index 0000000..2f28178 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test7/CMakeLists.txt @@ -0,0 +1,16 @@ +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt new file mode 100644 index 0000000..bcc1ebe --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt @@ -0,0 +1,30 @@ +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "1") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "1") diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt new file mode 100644 index 0000000..a50d02a --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt @@ -0,0 +1,30 @@ +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.cpp" + CONTENT "int func();\nint main(){ return func(); }" +) + + +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source1.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source2.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.cpp" + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.cpp" + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + PROPERTY GENERATED "0") +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.cpp" + TARGET_DIRECTORY executable1 + PROPERTY GENERATED "0") diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 79f0d77..57acfab 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -129,6 +129,7 @@ add_RunCMake_test(CMP0115) if(CMAKE_GENERATOR MATCHES "Ninja") add_RunCMake_test(CMP0116) endif() +add_RunCMake_test(CMP0118) # The test for Policy 65 requires the use of the # CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode -- cgit v0.12