diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index ba74e68ffb..9717e3dae5 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -171,7 +171,7 @@ Policies Introduced by CMake 3.20 CMP0120: The WriteCompilerDetectionHeader module is removed. CMP0119: LANGUAGE source file property explicitly compiles as language. - CMP0118: The GENERATED source file property is now visible in all directories. + CMP0118: GENERATED sources may be used across directories without manual marking. CMP0117: MSVC RTTI flag /GR is not added to CMAKE_CXX_FLAGS by default. CMP0116: Ninja generators transform DEPFILEs from add_custom_command(). CMP0115: Source file extensions must be explicit. diff --git a/Help/policy/CMP0118.rst b/Help/policy/CMP0118.rst index 00afadf146..593beac101 100644 --- a/Help/policy/CMP0118.rst +++ b/Help/policy/CMP0118.rst @@ -3,25 +3,30 @@ CMP0118 .. versionadded:: 3.20 -The :prop_sf:`GENERATED` source file property is now visible in all directories. +:prop_sf:`GENERATED` sources may be used across directories without manual marking. + +In CMake 3.19 and below, the :prop_sf:`GENERATED` source file property, +like other source file properties, was scoped in every directory separately. +If a source file was generated in one directory, projects had to manually +set the ``GENERATED`` property in another directory in order to use the file. Whether or not a source file is generated is an all-or-nothing global -property of the source. Consequently, the associated ``GENERATED`` -property is now visible from any directory scope, not only from the scope -for which it was set. - +property of the source: a source is either generated or it is not. +CMake 3.20 and above prefer to allow source files generated in one directory +to be used in other directories without manually marking them as ``GENERATED``. Additionally, the ``GENERATED`` property may now be set only to boolean -values, and may not be turned off once turned on. +values, and may not be turned off once turned on. This policy provides +compatibility for projects that have not been updated for this behavior. -The ``OLD`` behavior of this policy is to only allow ``GENERATED`` to be -visible from the directory scope for which it was set. The ``NEW`` -behavior on the other hand allows it to be visible from any scope. +The ``OLD`` behavior of this policy is to allow generated files to be used +only in directories in which their ``GENERATED`` property has been turned on. +The ``NEW`` behavior of this policy is to allow generated files to be used +in other directories without explicitly turning on the ``GENERATED`` property +for those directories. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20 .. |WARNS_OR_DOES_NOT_WARN| replace:: - does *not* warn with regard to visibility of the ``GENERATED`` - property, but does warn about setting the ``GENERATED`` property - to a non-boolean value, + warns about setting the ``GENERATED`` property to a non-boolean value .. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/prop_sf/GENERATED.rst b/Help/prop_sf/GENERATED.rst index 5ecc86cea8..d68ae4b05e 100644 --- a/Help/prop_sf/GENERATED.rst +++ b/Help/prop_sf/GENERATED.rst @@ -4,7 +4,11 @@ GENERATED Is this source file generated as part of the build or CMake process. .. versionchanged:: 3.20 - The GENERATED source file property is now visible in all directories. + Turning on the ``GENERATED`` source file property in one directory allows + the associated source file to be used across directories without the need + to manually setting that property for other directory scopes, too. + Additionally, it may now be set only to boolean values, and may not be + turned off once turned on. See policy :policy:`CMP0118`. Tells the internal CMake engine that a source file is generated by an outside process such as another build step, or the execution of CMake itself. @@ -38,11 +42,3 @@ be shown. For the special case of sources generated by CMake's :prop_tgt:`AUTOMO :prop_gbl:`AUTORCC_SOURCE_GROUP` and :prop_gbl:`AUTOUIC_SOURCE_GROUP` target properties may influence where the generated sources are grouped in the project's file lists. - -.. note:: - - Starting with CMake 3.20 the ``GENERATED`` source file property can be set - and retrieved from any directory scope. It is an all-or-nothing property. - It also can no longer be removed or unset if it was set to ``TRUE``. Policy - :policy:`CMP0118` was introduced to allow supporting the ``OLD`` behavior - for some time. diff --git a/Help/release/3.20.rst b/Help/release/3.20.rst index ebd0f91c2e..51e4594785 100644 --- a/Help/release/3.20.rst +++ b/Help/release/3.20.rst @@ -147,8 +147,9 @@ Properties for the associated :variable:`CMAKE_EXPORT_COMPILE_COMMANDS` variable to allow for configuration of exporting compile commands per target. -* The :prop_sf:`GENERATED` source-file property is now visible - from any directory scope, regardless of the scope in which it is set. +* Generated sources may be used across directories without manual marking. + Additionally, the :prop_sf:`GENERATED` source file property can no longer be + turned off once turned on, nor can it be set to other than boolean values. See policy :policy:`CMP0118`. * The :prop_tgt:`UNITY_BUILD_UNIQUE_ID` target property diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 6d86516732..43ea993ca4 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -349,10 +349,10 @@ class cmMakefile; SELECT(POLICY, CMP0117, \ "MSVC RTTI flag /GR is not added to CMAKE_CXX_FLAGS by default.", 3, \ 20, 0, cmPolicies::WARN) \ - SELECT( \ - POLICY, CMP0118, \ - "The GENERATED source file property is now visible in all directories.", \ - 3, 20, 0, cmPolicies::WARN) \ + SELECT(POLICY, CMP0118, \ + "GENERATED sources may be used across directories without manual " \ + "marking.", \ + 3, 20, 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0119, \ "LANGUAGE source file property explicitly compiles as specified " \ "language.", \ diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test16.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test16.cmake new file mode 100644 index 0000000000..909be6f64f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test16.cmake @@ -0,0 +1,38 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) + + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_command(TARGET custom2 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) + +add_subdirectory(subdir-Common-Test16) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test1b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test1b.cmake new file mode 100644 index 0000000000..622633f6c9 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test1b.cmake @@ -0,0 +1,9 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test2b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2b.cmake new file mode 100644 index 0000000000..53177816ac --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2b.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_source_files_properties( + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTIES GENERATED "1") +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test2c.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2c.cmake new file mode 100644 index 0000000000..2f2d3a2ceb --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2c.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_property(SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED "1") +get_source_file_property(prop + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test2d.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2d.cmake new file mode 100644 index 0000000000..67f9b8cb73 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test2d.cmake @@ -0,0 +1,12 @@ +add_custom_target(custom) +target_sources(custom PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" +) + +set_source_files_properties( + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTIES GENERATED "1") +get_property(prop SOURCE + "${CMAKE_CURRENT_BINARY_DIR}/GeneratedMain.txt" + PROPERTY GENERATED) +message(NOTICE "prop: `${prop}`") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake index 27516b7dc8..2880aec118 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3.cmake @@ -35,7 +35,7 @@ set_property(SOURCE "Generated_with_full_path2.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_path3.txt") @@ -61,6 +61,6 @@ set_property(SOURCE "Generated_with_full_source_path2.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake index 3e03a1f82b..64294d9991 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test3b.cmake @@ -9,7 +9,7 @@ set_property(SOURCE "Generated_with_full_path2.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_path3.txt") @@ -35,7 +35,7 @@ set_property(SOURCE "Generated_with_full_source_path2.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "1") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake index 953e26a36a..dbc603cf9c 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4.cmake @@ -35,7 +35,7 @@ set_property(SOURCE "Generated_with_full_path2.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_path3.txt") @@ -61,6 +61,6 @@ set_property(SOURCE "Generated_with_full_source_path2.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake index 025caa887d..833714ca93 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test4b.cmake @@ -9,7 +9,7 @@ set_property(SOURCE "Generated_with_full_path2.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_path3.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_path3.txt") @@ -35,7 +35,7 @@ set_property(SOURCE "Generated_with_full_source_path2.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "0") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake index 5349bffa08..549ce1ef55 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test5.cmake @@ -65,7 +65,7 @@ set_property(SOURCE "Generated_with_relative_path3.txt" get_and_print_GENERATED_property("Generated_with_relative_path3.txt") -set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Generated_with_full_source_path1.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path1.txt" PROPERTY GENERATED "tRue") get_and_print_GENERATED_property("Generated_with_full_source_path1.txt") @@ -73,6 +73,6 @@ set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path PROPERTY GENERATED "SomeVar-NOTFOUND") get_and_print_GENERATED_property("Generated_with_full_source_path2.txt") -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/"Generated_with_full_source_path3.txt" +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Generated_with_full_source_path3.txt" PROPERTY GENERATED "Junk-value") get_and_print_GENERATED_property("Generated_with_full_source_path3.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake index 5cc6e99e4f..e6b3ccebb8 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8.cmake @@ -27,6 +27,7 @@ target_sources(custom6 PRIVATE ) +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" CONTENT "int func();\nint main(){ return func(); }" diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test8b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8b.cmake new file mode 100644 index 0000000000..704300ab40 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test8b.cmake @@ -0,0 +1,51 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test8b) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake index b7d36ef5fc..e9abf36c0a 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9.cmake @@ -27,6 +27,7 @@ target_sources(custom6 PRIVATE ) +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" CONTENT "int func();\nint main(){ return func(); }" diff --git a/Tests/RunCMake/CMP0118/CMP0118-Common-Test9b.cmake b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9b.cmake new file mode 100644 index 0000000000..a452fdb666 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-Common-Test9b.cmake @@ -0,0 +1,51 @@ +include(${CMAKE_CURRENT_LIST_DIR}/CMP0118-Common-Helper.cmake) + + +add_custom_target(custom1) +target_sources(custom1 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" +) +add_custom_target(custom2) +target_sources(custom2 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" +) +add_custom_target(custom3) +target_sources(custom3 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" +) +add_custom_target(custom4) +target_sources(custom4 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" +) +add_custom_target(custom5) +target_sources(custom5 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" +) +add_custom_target(custom6) +target_sources(custom6 PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" +) + + +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source1.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source2.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source3.txt" + CONTENT "int func();\nint main(){ return func(); }" +) + +add_subdirectory(subdir-Common-Test9b) + +get_and_print_GENERATED_property("Generated_source1.txt") +get_and_print_GENERATED_property("Generated_source2.txt") +get_and_print_GENERATED_property("Generated_source3.txt") +get_and_print_GENERATED_property("Generated_source4.txt") +get_and_print_GENERATED_property("Generated_source5.txt") +get_and_print_GENERATED_property("Generated_source6.txt") diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-result.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-stderr.txt new file mode 100644 index 0000000000..a513b8396c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16.cmake new file mode 100644 index 0000000000..74b05c4bde --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test16.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test16.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-stderr.txt new file mode 100644 index 0000000000..419c571a92 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0118-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-NEW-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b.cmake new file mode 100644 index 0000000000..30cd6cdf5e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test1b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test1b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b-stderr.txt new file mode 100644 index 0000000000..403ce5a56b --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b.cmake new file mode 100644 index 0000000000..27f2a2db8c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test2b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c-stderr.txt new file mode 100644 index 0000000000..403ce5a56b --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c.cmake new file mode 100644 index 0000000000..ade66fd02e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2c.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test2c.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d-stderr.txt new file mode 100644 index 0000000000..403ce5a56b --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d.cmake new file mode 100644 index 0000000000..456760d9c0 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test2d.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test2d.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt index 929dafd6ea..4175587bf0 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3-stderr.txt @@ -12,10 +12,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -48,14 +48,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -63,7 +63,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -71,15 +71,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) -Call Stack \(most recent call first\): - CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-NEW-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt index 6a096b802b..e9a1ee26c1 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test3b-stderr.txt @@ -12,10 +12,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -48,14 +48,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -63,7 +63,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -71,15 +71,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) -Call Stack \(most recent call first\): - CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-NEW-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt index 0e27c1d336..686ba235fe 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test5-stderr.txt @@ -76,12 +76,12 @@ Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): Unsetting the 'GENERATED' property is not allowed under CMP0118! @@ -118,7 +118,7 @@ Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -126,7 +126,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -134,7 +134,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -142,7 +142,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -150,7 +150,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -158,15 +158,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) -Call Stack \(most recent call first\): - CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-NEW-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-NEW-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b-stderr.txt new file mode 100644 index 0000000000..f9ce9be29e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b-stderr.txt @@ -0,0 +1,36 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b.cmake new file mode 100644 index 0000000000..a39f89fe93 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test8b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test8b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-stderr.txt new file mode 100644 index 0000000000..093f1b84a4 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0` +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-NEW-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b.cmake b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b.cmake new file mode 100644 index 0000000000..36e30f41f6 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-NEW-Test9b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 NEW) +include(CMP0118-Common-Test9b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-stderr.txt new file mode 100644 index 0000000000..2ca118d4f5 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16-stderr.txt @@ -0,0 +1,38 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test16\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16.cmake new file mode 100644 index 0000000000..c0e40fce39 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test16.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test16.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-stderr.txt new file mode 100644 index 0000000000..ad3ea4314a --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-stderr.txt @@ -0,0 +1,21 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test1b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +prop: `NOTFOUND` +CMake Error at CMP0118-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b.cmake new file mode 100644 index 0000000000..ad1a211c2f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test1b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test1b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b-stderr.txt new file mode 100644 index 0000000000..41114ba80e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b-stderr.txt @@ -0,0 +1,12 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test2b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b.cmake new file mode 100644 index 0000000000..5bfe045407 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test2b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c-stderr.txt new file mode 100644 index 0000000000..ba36763019 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c-stderr.txt @@ -0,0 +1,12 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test2c\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c.cmake new file mode 100644 index 0000000000..e225de4a50 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2c.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test2c.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d-stderr.txt new file mode 100644 index 0000000000..0a9a8b73a2 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d-stderr.txt @@ -0,0 +1,12 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test2d\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d.cmake new file mode 100644 index 0000000000..ad1c640f78 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test2d.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test2d.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt index cce5b19490..28fe2f0d28 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt @@ -23,10 +23,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -59,14 +59,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -74,7 +74,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -82,15 +82,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) -Call Stack \(most recent call first\): - CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt index 47eee2e800..819b8c030b 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt @@ -23,10 +23,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -59,14 +59,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -74,7 +74,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -82,15 +82,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) -Call Stack \(most recent call first\): - CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-OLD-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt index 4a67fa7b6d..e20ffeed30 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt @@ -45,12 +45,12 @@ Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` Generated_with_full_source_path2\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 1b # GENERATED = `0` Generated_with_full_source_path2\.txt: # 2a # GENERATED = `0` @@ -66,7 +66,7 @@ Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -74,7 +74,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -82,7 +82,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -90,7 +90,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -98,7 +98,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -106,15 +106,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) -Call Stack \(most recent call first\): - CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-OLD-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-OLD-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-stderr.txt new file mode 100644 index 0000000000..285051cacd --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-stderr.txt @@ -0,0 +1,56 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test8b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0` +CMake Error at CMP0118-Common-Test8b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test8b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b.cmake new file mode 100644 index 0000000000..6676e7c50f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test8b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test8b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-stderr.txt new file mode 100644 index 0000000000..9b2fdada57 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-stderr.txt @@ -0,0 +1,72 @@ +^CMake Deprecation Warning at CMP0118-OLD-Test9b\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0118 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ +Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0` +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-OLD-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b.cmake b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b.cmake new file mode 100644 index 0000000000..34460635a7 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-OLD-Test9b.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0118 OLD) +include(CMP0118-Common-Test9b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt index 93d8b83d12..9395cd7ff8 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test11-stderr.txt @@ -1,6 +1,6 @@ ^((CMake Warning \(dev\) at subdir-Common-Test11/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -9,8 +9,8 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test11\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt index 6d59cb47e5..957cc69109 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test13-stderr.txt @@ -8,8 +8,8 @@ CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\ TARGET 'custom[4-6]' was not created in this directory\. + ((CMake Warning \(dev\) at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -18,8 +18,8 @@ CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test13\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt index 9e6a4a5656..eab051f21f 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test15-stderr.txt @@ -1,6 +1,6 @@ ^((CMake Warning \(dev\) at subdir-Common-Test15/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -9,8 +9,8 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test15\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-result.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-stderr.txt new file mode 100644 index 0000000000..a513b8396c --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16-stderr.txt @@ -0,0 +1,27 @@ +^CMake Error at subdir-Common-Test16/CMakeLists\.txt:[0-9]+ \(add_custom_command\): + TARGET 'custom4' was not created in this directory\. ++ +Generated_source1\.txt: # 1a # GENERATED = `1` +Generated_source1\.txt: # 1b # GENERATED = `1` +Generated_source1\.txt: # 2a # GENERATED = `1` +Generated_source1\.txt: # 2b # GENERATED = `1` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16.cmake new file mode 100644 index 0000000000..f50df7fdc4 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test16.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test16.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-stderr.txt new file mode 100644 index 0000000000..86b9327fd9 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-stderr.txt @@ -0,0 +1,10 @@ +^prop: `NOTFOUND` +CMake Error at CMP0118-Common-Test1b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b-build/GeneratedMain\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test1b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b.cmake new file mode 100644 index 0000000000..c05557093f --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test1b.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test1b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b-stderr.txt new file mode 100644 index 0000000000..403ce5a56b --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b.cmake new file mode 100644 index 0000000000..82a192cdc1 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2b.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test2b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c-stderr.txt new file mode 100644 index 0000000000..403ce5a56b --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c.cmake new file mode 100644 index 0000000000..ec47683b78 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2c.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test2c.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d-stderr.txt new file mode 100644 index 0000000000..403ce5a56b --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d-stderr.txt @@ -0,0 +1 @@ +^prop: `1`$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d.cmake new file mode 100644 index 0000000000..a5e3fd7912 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test2d.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test2d.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt index 58ba79328f..491eab01f7 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3-stderr.txt @@ -12,10 +12,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -48,14 +48,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -63,7 +63,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -71,15 +71,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) -Call Stack \(most recent call first\): - CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test3\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-2]\.txt|CMP0118-WARN-Test3-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt index cdb7cb4a78..e170849c7a 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test3b-stderr.txt @@ -12,10 +12,10 @@ Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_path3\.txt: # 3b # GENERATED = `1` Generated_with_relative_path1\.txt: # 1a # GENERATED = `1` Generated_with_relative_path1\.txt: # 1b # GENERATED = `1` Generated_with_relative_path1\.txt: # 2a # GENERATED = `1` @@ -48,14 +48,14 @@ Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1a # GENERATED = `0` Generated_with_full_source_path3\.txt: # 1b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 2b # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path3\.txt: # 2a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 2b # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path3\.txt: # 3b # GENERATED = `1` CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -63,7 +63,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -71,15 +71,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) -Call Stack \(most recent call first\): - CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test3b\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[12]\.txt|CMP0118-WARN-Test3b-build/Generated_with_full_path3\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test3b\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt index 4cd401c4ba..6340f91eb9 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4-stderr.txt @@ -1,6 +1,6 @@ ^CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -18,8 +18,8 @@ Generated_with_full_path1\.txt: # 2b # GENERATED = `0` Generated_with_full_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -37,8 +37,8 @@ Generated_with_full_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -56,8 +56,8 @@ Generated_with_full_path3\.txt: # 2b # GENERATED = `0` Generated_with_full_path3\.txt: # 3a # GENERATED = `0` Generated_with_full_path3\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -75,8 +75,8 @@ Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -94,8 +94,8 @@ Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -113,8 +113,8 @@ Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -132,8 +132,8 @@ Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -151,8 +151,8 @@ Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt index 6acd3df827..a213ae5bc3 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test4b-stderr.txt @@ -1,6 +1,6 @@ ^CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -18,8 +18,8 @@ Generated_with_full_path1\.txt: # 2b # GENERATED = `0` Generated_with_full_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -37,8 +37,8 @@ Generated_with_full_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -56,8 +56,8 @@ Generated_with_full_path3\.txt: # 2b # GENERATED = `0` Generated_with_full_path3\.txt: # 3a # GENERATED = `0` Generated_with_full_path3\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -75,8 +75,8 @@ Generated_with_relative_path1\.txt: # 2b # GENERATED = `0` Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -94,8 +94,8 @@ Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -113,8 +113,8 @@ Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -132,8 +132,8 @@ Generated_with_full_source_path1\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -151,8 +151,8 @@ Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test4b\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt index 2805cbfe23..2f7a390e3d 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test5-stderr.txt @@ -5,8 +5,8 @@ Generated_with_full_path1\.txt: # 2b # GENERATED = `1` Generated_with_full_path1\.txt: # 3a # GENERATED = `0` Generated_with_full_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -24,8 +24,8 @@ Generated_with_full_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -57,8 +57,8 @@ Generated_with_relative_path1\.txt: # 2b # GENERATED = `1` Generated_with_relative_path1\.txt: # 3a # GENERATED = `0` Generated_with_relative_path1\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -76,8 +76,8 @@ Generated_with_relative_path2\.txt: # 2b # GENERATED = `0` Generated_with_relative_path2\.txt: # 3a # GENERATED = `0` Generated_with_relative_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -102,15 +102,15 @@ Generated_with_relative_path3\.txt: # 2a # GENERATED = `0` Generated_with_relative_path3\.txt: # 2b # GENERATED = `0` Generated_with_relative_path3\.txt: # 3a # GENERATED = `0` Generated_with_relative_path3\.txt: # 3b # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 1a # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 1b # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 1a # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 1b # GENERATED = `0` Generated_with_full_source_path1\.txt: # 2a # GENERATED = `1` Generated_with_full_source_path1\.txt: # 2b # GENERATED = `1` -Generated_with_full_source_path1\.txt: # 3a # GENERATED = `0` -Generated_with_full_source_path1\.txt: # 3b # GENERATED = `0` +Generated_with_full_source_path1\.txt: # 3a # GENERATED = `1` +Generated_with_full_source_path1\.txt: # 3b # GENERATED = `1` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -128,8 +128,8 @@ Generated_with_full_source_path2\.txt: # 2b # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3a # GENERATED = `0` Generated_with_full_source_path2\.txt: # 3b # GENERATED = `0` CMake Warning \(dev\) at CMP0118-Common-Test5\.cmake:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -157,7 +157,7 @@ Generated_with_full_source_path3\.txt: # 3b # GENERATED = `0` CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -165,7 +165,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -173,7 +173,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -181,7 +181,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -189,7 +189,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) @@ -197,15 +197,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): Cannot find source file: -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) -Call Stack \(most recent call first\): - CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) - CMakeLists\.txt:[0-9]+ \(include\) -+ -CMake Error at CMP0118-Common-Test5\.cmake:[0-9]+ \(target_sources\): - Cannot find source file: - -[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[1-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) +[ \t]*.*Tests/RunCMake/CMP0118/(Generated_with_full_source_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_relative_path[2-3]\.txt|CMP0118-WARN-Test5-build/Generated_with_full_path[2-3]\.txt) Call Stack \(most recent call first\): CMP0118-WARN-Test5\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt index cde1164a94..1feef65cf1 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test7-stderr.txt @@ -1,6 +1,6 @@ ^((CMake Warning \(dev\) at subdir-Common-Test7/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -9,8 +9,8 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test7\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-stderr.txt new file mode 100644 index 0000000000..c063326120 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-stderr.txt @@ -0,0 +1,45 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0` +CMake Error at CMP0118-Common-Test8b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test8b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b.cmake new file mode 100644 index 0000000000..b44331ab6e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test8b.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test8b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt index 547e8207ad..cbce4ab986 100644 --- a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9-stderr.txt @@ -1,6 +1,6 @@ ^((CMake Warning \(dev\) at subdir-Common-Test9/CMakeLists\.txt:[0-9]+ \(set_property\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. @@ -9,8 +9,8 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. +)+ (CMake Warning \(dev\) at CMP0118-Common-Test9\.cmake:[0-9]+ \(add_subdirectory\): - Policy CMP0118 is not set: The GENERATED source file property is now - visible in all directories\. Run "cmake --help-policy CMP0118" for policy + Policy CMP0118 is not set: GENERATED sources may be used across directories + without manual marking\. Run "cmake --help-policy CMP0118" for policy details\. Use the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-result.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-stderr.txt b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-stderr.txt new file mode 100644 index 0000000000..878812d95b --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-stderr.txt @@ -0,0 +1,61 @@ +^Generated_source1\.txt: # 1a # GENERATED = `0` +Generated_source1\.txt: # 1b # GENERATED = `0` +Generated_source1\.txt: # 2a # GENERATED = `0` +Generated_source1\.txt: # 2b # GENERATED = `0` +Generated_source1\.txt: # 3a # GENERATED = `0` +Generated_source1\.txt: # 3b # GENERATED = `0` +Generated_source2\.txt: # 1a # GENERATED = `0` +Generated_source2\.txt: # 1b # GENERATED = `0` +Generated_source2\.txt: # 2a # GENERATED = `0` +Generated_source2\.txt: # 2b # GENERATED = `0` +Generated_source2\.txt: # 3a # GENERATED = `0` +Generated_source2\.txt: # 3b # GENERATED = `0` +Generated_source3\.txt: # 1a # GENERATED = `0` +Generated_source3\.txt: # 1b # GENERATED = `0` +Generated_source3\.txt: # 2a # GENERATED = `0` +Generated_source3\.txt: # 2b # GENERATED = `0` +Generated_source3\.txt: # 3a # GENERATED = `0` +Generated_source3\.txt: # 3b # GENERATED = `0` +Generated_source4\.txt: # 1a # GENERATED = `0` +Generated_source4\.txt: # 1b # GENERATED = `0` +Generated_source4\.txt: # 2a # GENERATED = `0` +Generated_source4\.txt: # 2b # GENERATED = `0` +Generated_source4\.txt: # 3a # GENERATED = `0` +Generated_source4\.txt: # 3b # GENERATED = `0` +Generated_source5\.txt: # 1a # GENERATED = `0` +Generated_source5\.txt: # 1b # GENERATED = `0` +Generated_source5\.txt: # 2a # GENERATED = `0` +Generated_source5\.txt: # 2b # GENERATED = `0` +Generated_source5\.txt: # 3a # GENERATED = `0` +Generated_source5\.txt: # 3b # GENERATED = `0` +Generated_source6\.txt: # 1a # GENERATED = `0` +Generated_source6\.txt: # 1b # GENERATED = `0` +Generated_source6\.txt: # 2a # GENERATED = `0` +Generated_source6\.txt: # 2b # GENERATED = `0` +Generated_source6\.txt: # 3a # GENERATED = `0` +Generated_source6\.txt: # 3b # GENERATED = `0` +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Error at CMP0118-Common-Test9b\.cmake:[0-9]+ \(target_sources\): + Cannot find source file: + +[ \t]*.*Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b-build/Generated_source[4-6]\.txt +Call Stack \(most recent call first\): + CMP0118-WARN-Test9b\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) ++ +CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b.cmake b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b.cmake new file mode 100644 index 0000000000..9726b30c11 --- /dev/null +++ b/Tests/RunCMake/CMP0118/CMP0118-WARN-Test9b.cmake @@ -0,0 +1 @@ +include(CMP0118-Common-Test9b.cmake) diff --git a/Tests/RunCMake/CMP0118/CMakeLists.txt b/Tests/RunCMake/CMP0118/CMakeLists.txt index 957fe03fad..8bf7896186 100644 --- a/Tests/RunCMake/CMP0118/CMakeLists.txt +++ b/Tests/RunCMake/CMP0118/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required(VERSION 3.19) -cmake_policy(SET CMP0115 NEW) +cmake_policy(SET CMP0115 NEW) # CMP0115 is correct here (for reducing error-output)! project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CMP0118/RunCMakeTest.cmake b/Tests/RunCMake/CMP0118/RunCMakeTest.cmake index f7f135e61e..207f3d7fce 100644 --- a/Tests/RunCMake/CMP0118/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0118/RunCMakeTest.cmake @@ -5,7 +5,11 @@ run_cmake(GenInSubdir-WARN) run_cmake(GenInSubdir-NEW) run_cmake(CMP0118-OLD-Test1) +run_cmake(CMP0118-OLD-Test1b) run_cmake(CMP0118-OLD-Test2) +run_cmake(CMP0118-OLD-Test2b) +run_cmake(CMP0118-OLD-Test2c) +run_cmake(CMP0118-OLD-Test2d) run_cmake(CMP0118-OLD-Test3) run_cmake(CMP0118-OLD-Test3b) run_cmake(CMP0118-OLD-Test4) @@ -14,16 +18,23 @@ run_cmake(CMP0118-OLD-Test5) run_cmake(CMP0118-OLD-Test6) run_cmake(CMP0118-OLD-Test7) run_cmake(CMP0118-OLD-Test8) +run_cmake(CMP0118-OLD-Test8b) run_cmake(CMP0118-OLD-Test9) +run_cmake(CMP0118-OLD-Test9b) run_cmake(CMP0118-OLD-Test10) run_cmake(CMP0118-OLD-Test11) run_cmake(CMP0118-OLD-Test12) run_cmake(CMP0118-OLD-Test13) run_cmake(CMP0118-OLD-Test14) run_cmake(CMP0118-OLD-Test15) +run_cmake(CMP0118-OLD-Test16) run_cmake(CMP0118-WARN-Test1) +run_cmake(CMP0118-WARN-Test1b) run_cmake(CMP0118-WARN-Test2) +run_cmake(CMP0118-WARN-Test2b) +run_cmake(CMP0118-WARN-Test2c) +run_cmake(CMP0118-WARN-Test2d) run_cmake(CMP0118-WARN-Test3) run_cmake(CMP0118-WARN-Test3b) run_cmake(CMP0118-WARN-Test4) @@ -32,16 +43,23 @@ run_cmake(CMP0118-WARN-Test5) run_cmake(CMP0118-WARN-Test6) run_cmake(CMP0118-WARN-Test7) run_cmake(CMP0118-WARN-Test8) +run_cmake(CMP0118-WARN-Test8b) run_cmake(CMP0118-WARN-Test9) +run_cmake(CMP0118-WARN-Test9b) run_cmake(CMP0118-WARN-Test10) run_cmake(CMP0118-WARN-Test11) run_cmake(CMP0118-WARN-Test12) run_cmake(CMP0118-WARN-Test13) run_cmake(CMP0118-WARN-Test14) run_cmake(CMP0118-WARN-Test15) +run_cmake(CMP0118-WARN-Test16) run_cmake(CMP0118-NEW-Test1) +run_cmake(CMP0118-NEW-Test1b) run_cmake(CMP0118-NEW-Test2) +run_cmake(CMP0118-NEW-Test2b) +run_cmake(CMP0118-NEW-Test2c) +run_cmake(CMP0118-NEW-Test2d) run_cmake(CMP0118-NEW-Test3) run_cmake(CMP0118-NEW-Test3b) run_cmake(CMP0118-NEW-Test4) @@ -50,10 +68,13 @@ run_cmake(CMP0118-NEW-Test5) run_cmake(CMP0118-NEW-Test6) run_cmake(CMP0118-NEW-Test7) run_cmake(CMP0118-NEW-Test8) +run_cmake(CMP0118-NEW-Test8b) run_cmake(CMP0118-NEW-Test9) +run_cmake(CMP0118-NEW-Test9b) run_cmake(CMP0118-NEW-Test10) run_cmake(CMP0118-NEW-Test11) run_cmake(CMP0118-NEW-Test12) run_cmake(CMP0118-NEW-Test13) run_cmake(CMP0118-NEW-Test14) run_cmake(CMP0118-NEW-Test15) +run_cmake(CMP0118-NEW-Test16) diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt index f2929aa331..7ad02df712 100644 --- a/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test13/CMakeLists.txt @@ -1,13 +1,16 @@ +# Note: Target "custom4" was not created in this directory, so setting this build-event will fail! add_custom_command(TARGET custom4 PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" ) +# Note: Target "custom5" was not created in this directory, so setting this build-event will fail! add_custom_command(TARGET custom5 PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" ) +# Note: Target "custom6" was not created in this directory, so setting this build-event will fail! add_custom_command(TARGET custom6 PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test16/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test16/CMakeLists.txt new file mode 100644 index 0000000000..877c82910e --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test16/CMakeLists.txt @@ -0,0 +1,10 @@ +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source3.txt" +) +add_custom_command(TARGET custom4 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Source.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + BYPRODUCT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" +) diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt index 55debd1a6b..eefe18c460 100644 --- a/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test8/CMakeLists.txt @@ -1,3 +1,4 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" CONTENT "int func();\nint main(){ return func(); }" diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test8b/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test8b/CMakeLists.txt new file mode 100644 index 0000000000..1e4cccdd73 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test8b/CMakeLists.txt @@ -0,0 +1,13 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source4.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source5.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../Generated_source6.txt" + CONTENT "int func();\nint main(){ return func(); }" +) diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt index cdb888403a..99f6d73e29 100644 --- a/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test9/CMakeLists.txt @@ -1,3 +1,4 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" CONTENT "int func();\nint main(){ return func(); }" diff --git a/Tests/RunCMake/CMP0118/subdir-Common-Test9b/CMakeLists.txt b/Tests/RunCMake/CMP0118/subdir-Common-Test9b/CMakeLists.txt new file mode 100644 index 0000000000..f94f36ffc4 --- /dev/null +++ b/Tests/RunCMake/CMP0118/subdir-Common-Test9b/CMakeLists.txt @@ -0,0 +1,13 @@ +# Note: Currently, `file(GENERATE)` does not set the `GENERATED` property! +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source4.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source5.txt" + CONTENT "int func();\nint main(){ return func(); }" +) +file(GENERATE + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Generated_source6.txt" + CONTENT "int func();\nint main(){ return func(); }" +)