diff options
Diffstat (limited to 'share/cmake-3.22/Help/prop_sf/GENERATED.rst')
-rw-r--r-- | share/cmake-3.22/Help/prop_sf/GENERATED.rst | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/share/cmake-3.22/Help/prop_sf/GENERATED.rst b/share/cmake-3.22/Help/prop_sf/GENERATED.rst new file mode 100644 index 0000000..216dfe8 --- /dev/null +++ b/share/cmake-3.22/Help/prop_sf/GENERATED.rst @@ -0,0 +1,48 @@ +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. + +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 +validity checks. + +Any file that is + +- created by the execution of commands such as + :command:`add_custom_command` and :command:`file(GENERATE)` +- listed as one of the ``BYPRODUCTS`` of an :command:`add_custom_command` + or :command:`add_custom_target` command, or +- created by a CMake ``AUTOGEN`` operation such as :prop_tgt:`AUTOMOC`, + :prop_tgt:`AUTORCC`, or :prop_tgt:`AUTOUIC` + +will be marked with the ``GENERATED`` property. + +When a generated file created as the ``OUTPUT`` of an +:command:`add_custom_command` command is explicitly listed as a source file +for any target in the same directory scope (which usually means the same +``CMakeLists.txt`` file), CMake will automatically create a dependency to +make sure the file is generated before building that target. + +The :ref:`Makefile Generators` will remove ``GENERATED`` files during +``make clean``. + +Generated sources may be hidden in some IDE tools, while in others they might +be shown. For the special case of sources generated by CMake's :prop_tgt:`AUTOMOC`, +:prop_tgt:`AUTORCC` or :prop_tgt:`AUTOUIC` functionality, the +:prop_gbl:`AUTOGEN_SOURCE_GROUP`, :prop_gbl:`AUTOMOC_SOURCE_GROUP`, +: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. |