diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 1 | ||||
-rw-r--r-- | Help/policy/CMP0118.rst | 6 | ||||
-rw-r--r-- | Help/policy/CMP0163.rst | 37 | ||||
-rw-r--r-- | Help/prop_sf/GENERATED.rst | 5 | ||||
-rw-r--r-- | Help/prop_tgt/SOURCES.rst | 2 | ||||
-rw-r--r-- | Help/release/dev/prop-GENERATED-visibility.rst | 6 |
6 files changed, 56 insertions, 1 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 9717e3d..821a39a 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.30 .. toctree:: :maxdepth: 1 + CMP0163: The GENERATED source file property is now visible in all directories. </policy/CMP0163> CMP0162: Visual Studio generators add UseDebugLibraries indicators by default. </policy/CMP0162> Policies Introduced by CMake 3.29 diff --git a/Help/policy/CMP0118.rst b/Help/policy/CMP0118.rst index 593beac..5c04927 100644 --- a/Help/policy/CMP0118.rst +++ b/Help/policy/CMP0118.rst @@ -24,6 +24,12 @@ 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. +.. versionadded:: 3.30 + + Policy :policy:`CMP0163` additionally makes the :prop_sf:`GENERATED` source + file property visible to :command:`get_property` and + :command:`get_source_file_property` calls in other directories. + .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20 .. |WARNS_OR_DOES_NOT_WARN| replace:: warns about setting the ``GENERATED`` property to a non-boolean value diff --git a/Help/policy/CMP0163.rst b/Help/policy/CMP0163.rst new file mode 100644 index 0000000..40b3535 --- /dev/null +++ b/Help/policy/CMP0163.rst @@ -0,0 +1,37 @@ +CMP0163 +------- + +.. versionadded:: 3.30 + +The :prop_sf:`GENERATED` source file property is now visible in all directories. + +In CMake 3.29 and below, the :prop_sf:`GENERATED` source file property, +like other source file properties, was scoped in every directory separately. +Although policy :policy:`CMP0118` allowed sources marked ``GENERATED`` in one +directory to be used in other directories without manually marking them as +``GENERATED`` again, the ``GENERATED`` property was still not visible to +:command:`get_property` and :command:`get_source_file_property` calls. + +Whether or not a source file is generated is an all-or-nothing global +property of the source: a source is either generated or it is not. +CMake 3.30 and above prefer to treat the :prop_sf:`GENERATED` source file +property as globally scoped. Once it is set in one directory, it is +immediately visible to :command:`get_property` and +:command:`get_source_file_property` calls in other directories. +This policy provides compatibility for projects that have not been +updated for this behavior. + +The ``OLD`` behavior of this policy is for the ``GENERATED`` source file +property to be visible only in the directories in which it is set. The +``NEW`` behavior of this policy is to allow the ``GENERATED`` source file +property to be visible in all directories once set in any directory. +Furthermore, the ``NEW`` behavior of this policy implies the ``NEW`` +behavior of policy :policy:`CMP0118`: the ``GENERATED`` property may +be set only to boolean values, and may not be turned off once turned on. + +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.30 +.. |WARNS_OR_DOES_NOT_WARN| replace:: + does *not* warn +.. include:: STANDARD_ADVICE.txt + +.. include:: DEPRECATED.txt diff --git a/Help/prop_sf/GENERATED.rst b/Help/prop_sf/GENERATED.rst index d68ae4b..566b58a 100644 --- a/Help/prop_sf/GENERATED.rst +++ b/Help/prop_sf/GENERATED.rst @@ -10,6 +10,11 @@ Is this source file generated as part of the build or CMake process. Additionally, it may now be set only to boolean values, and may not be turned off once turned on. See policy :policy:`CMP0118`. +.. versionchanged:: 3.30 + Whether or not a source file is generated is an all-or-nothing global + property of the source. Consequently, the ``GENERATED`` source file + property is now visible in all directories. See policy :policy:`CMP0163`. + 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. This information is then used to exempt the file from any existence or diff --git a/Help/prop_tgt/SOURCES.rst b/Help/prop_tgt/SOURCES.rst index 1ebfa14..1688ef7 100644 --- a/Help/prop_tgt/SOURCES.rst +++ b/Help/prop_tgt/SOURCES.rst @@ -18,7 +18,7 @@ evaluate to an absolute path. Not doing so is considered undefined behavior. Paths that are for files generated by the build will be treated as relative to the build directory of the target, if the path is not already specified as an absolute path. Note that whether a file is seen as -generated may be affected by policy :policy:`CMP0118`. +generated may be affected by policies :policy:`CMP0118` and :policy:`CMP0163`. If a path does not start with a generator expression, is not an absolute path and is not a generated file, it will be treated as relative to diff --git a/Help/release/dev/prop-GENERATED-visibility.rst b/Help/release/dev/prop-GENERATED-visibility.rst new file mode 100644 index 0000000..33f28d9 --- /dev/null +++ b/Help/release/dev/prop-GENERATED-visibility.rst @@ -0,0 +1,6 @@ +prop-GENERATED-visibility +------------------------- + +* The :prop_sf:`GENERATED` source file property is now visible in all + directories. See policy :policy:`CMP0163`. Policy :policy:`CMP0118`'s + documentation has been revised to describe its actual effects. |