diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 1 | ||||
-rw-r--r-- | Help/manual/cmake-qt.7.rst | 1 | ||||
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 4 | ||||
-rw-r--r-- | Help/policy/CMP0083.rst | 24 | ||||
-rw-r--r-- | Help/prop_tgt/AUTOMOC.rst | 4 | ||||
-rw-r--r-- | Help/prop_tgt/AUTORCC.rst | 4 | ||||
-rw-r--r-- | Help/prop_tgt/AUTOUIC.rst | 4 | ||||
-rw-r--r-- | Help/prop_tgt/INTERFACE_POSITION_INDEPENDENT_CODE.rst | 6 | ||||
-rw-r--r-- | Help/release/dev/INTERFACE_POSITION_INDEPENDENT_CODE.rst | 5 | ||||
-rw-r--r-- | Help/release/dev/autogen_global_target.rst | 8 | ||||
-rw-r--r-- | Help/release/dev/link-option-PIE.rst | 6 | ||||
-rw-r--r-- | Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst | 18 | ||||
-rw-r--r-- | Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET_NAME.rst | 13 | ||||
-rw-r--r-- | Help/variable/CMAKE_GLOBAL_AUTORCC_TARGET.rst | 18 | ||||
-rw-r--r-- | Help/variable/CMAKE_GLOBAL_AUTORCC_TARGET_NAME.rst | 13 |
15 files changed, 129 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 0587429..98279ef 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.14 .. toctree:: :maxdepth: 1 + CMP0083: Add PIE options when linking executable. </policy/CMP0083> CMP0082: Install rules from add_subdirectory() are interleaved with those in caller. </policy/CMP0082> Policies Introduced by CMake 3.13 diff --git a/Help/manual/cmake-qt.7.rst b/Help/manual/cmake-qt.7.rst index 0382794..d8d6172 100644 --- a/Help/manual/cmake-qt.7.rst +++ b/Help/manual/cmake-qt.7.rst @@ -236,6 +236,7 @@ when either :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC`, :prop_sf:`SKIP_AUTOGEN` or :policy:`CMP0071` - :prop_tgt:`AUTOGEN_TARGET_DEPENDS` lists a source file +- :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is enabled qtmain.lib on Windows ===================== diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 7a7f0b8..d808b1c 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -345,6 +345,10 @@ Variables that Control the Build /variable/CMAKE_FOLDER /variable/CMAKE_Fortran_FORMAT /variable/CMAKE_Fortran_MODULE_DIRECTORY + /variable/CMAKE_GLOBAL_AUTOGEN_TARGET + /variable/CMAKE_GLOBAL_AUTOGEN_TARGET_NAME + /variable/CMAKE_GLOBAL_AUTORCC_TARGET + /variable/CMAKE_GLOBAL_AUTORCC_TARGET_NAME /variable/CMAKE_GNUtoMS /variable/CMAKE_INCLUDE_CURRENT_DIR /variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE diff --git a/Help/policy/CMP0083.rst b/Help/policy/CMP0083.rst new file mode 100644 index 0000000..7b467b0 --- /dev/null +++ b/Help/policy/CMP0083.rst @@ -0,0 +1,24 @@ +CMP0083 +------- + +To control generation of Position Independent Executable (``PIE``) or not, some +flags are required at link time. + +CMake 3.13 and lower did not add these link flags when +:prop_tgt:`POSITION_INDEPENDENT_CODE` is set. + +The ``OLD`` behavior for this policy is to not manage ``PIE`` link flags. The +``NEW`` behavior is to add link flags if :prop_tgt:`POSITION_INDEPENDENT_CODE` +is set: + +* Set to ``TRUE``: flags to produce a position independent executable are + passed to the linker step. For example ``-pie`` for ``GCC``. +* Set to ``FALSE``: flags not to produce a position independent executable are + passed to the linker step. For example ``-no-pie`` for ``GCC``. +* Not set: no flags are passed to the linker step. + +This policy was introduced in CMake version 3.14. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. Use +the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/prop_tgt/AUTOMOC.rst b/Help/prop_tgt/AUTOMOC.rst index 70d89f2..7a3fd48 100644 --- a/Help/prop_tgt/AUTOMOC.rst +++ b/Help/prop_tgt/AUTOMOC.rst @@ -86,5 +86,9 @@ enabling :prop_sf:`SKIP_AUTOMOC` or the broader :prop_sf:`SKIP_AUTOGEN`. The number of parallel ``moc`` processes to start can be modified by setting :prop_tgt:`AUTOGEN_PARALLEL`. +A global ``autogen`` target that depends on all :prop_tgt:`AUTOMOC` generated +``<ORIGIN>_autogen`` targets in the project can be generated by enabling +:variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. diff --git a/Help/prop_tgt/AUTORCC.rst b/Help/prop_tgt/AUTORCC.rst index 99c2b0e..27fb149 100644 --- a/Help/prop_tgt/AUTORCC.rst +++ b/Help/prop_tgt/AUTORCC.rst @@ -35,5 +35,9 @@ generate unspecified unique names for ``rcc``. Therefore if Source files can be excluded from :prop_tgt:`AUTORCC` processing by enabling :prop_sf:`SKIP_AUTORCC` or the broader :prop_sf:`SKIP_AUTOGEN`. +A global ``autorcc`` target that depends on all :prop_tgt:`AUTORCC` targets +in the project can be generated by enabling +:variable:`CMAKE_GLOBAL_AUTORCC_TARGET`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. diff --git a/Help/prop_tgt/AUTOUIC.rst b/Help/prop_tgt/AUTOUIC.rst index 8cae0a7..4f58b35 100644 --- a/Help/prop_tgt/AUTOUIC.rst +++ b/Help/prop_tgt/AUTOUIC.rst @@ -36,5 +36,9 @@ enabling :prop_sf:`SKIP_AUTOUIC` or the broader :prop_sf:`SKIP_AUTOGEN`. The number of parallel ``uic`` processes to start can be modified by setting :prop_tgt:`AUTOGEN_PARALLEL`. +A global ``autogen`` target that depends on all :prop_tgt:`AUTOUIC` generated +``<ORIGIN>_autogen`` targets in the project can be generated by enabling +:variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. diff --git a/Help/prop_tgt/INTERFACE_POSITION_INDEPENDENT_CODE.rst b/Help/prop_tgt/INTERFACE_POSITION_INDEPENDENT_CODE.rst index ea700df..4336d71 100644 --- a/Help/prop_tgt/INTERFACE_POSITION_INDEPENDENT_CODE.rst +++ b/Help/prop_tgt/INTERFACE_POSITION_INDEPENDENT_CODE.rst @@ -14,3 +14,9 @@ undefined, then consumers will determine their :prop_tgt:`POSITION_INDEPENDENT_CODE` property by other means. Consumers must ensure that the targets that they link to have a consistent requirement for their ``INTERFACE_POSITION_INDEPENDENT_CODE`` property. + +Contents of ``INTERFACE_POSITION_INDEPENDENT_CODE`` may use +"generator expressions" with the syntax ``$<...>``. See the +:manual:`cmake-generator-expressions(7)` manual for available expressions. +See the :manual:`cmake-buildsystem(7)` manual for more on defining buildsystem +properties. diff --git a/Help/release/dev/INTERFACE_POSITION_INDEPENDENT_CODE.rst b/Help/release/dev/INTERFACE_POSITION_INDEPENDENT_CODE.rst new file mode 100644 index 0000000..7732ff6 --- /dev/null +++ b/Help/release/dev/INTERFACE_POSITION_INDEPENDENT_CODE.rst @@ -0,0 +1,5 @@ +INTERFACE_POSITION_INDEPENDENT_CODE +----------------------------------- + +* :prop_tgt:`INTERFACE_POSITION_INDEPENDENT_CODE` target property gains the + support of :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/release/dev/autogen_global_target.rst b/Help/release/dev/autogen_global_target.rst new file mode 100644 index 0000000..d555395 --- /dev/null +++ b/Help/release/dev/autogen_global_target.rst @@ -0,0 +1,8 @@ +autogen_global_target +--------------------- + +* The new variables :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`, + :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME`, + :variable:`CMAKE_GLOBAL_AUTORCC_TARGET` and + :variable:`CMAKE_GLOBAL_AUTORCC_TARGET_NAME` control the generation + of global ``autogen`` and ``autorcc`` targets. diff --git a/Help/release/dev/link-option-PIE.rst b/Help/release/dev/link-option-PIE.rst new file mode 100644 index 0000000..824ab2c --- /dev/null +++ b/Help/release/dev/link-option-PIE.rst @@ -0,0 +1,6 @@ +link-option-PIE +--------------- + +* Required link options to manage Position Independent Executable are now + added when :prop_tgt:`POSITION_INDEPENDENT_CODE` is set. These flags are + controlled by policy :policy:`CMP0083`. diff --git a/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst b/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst new file mode 100644 index 0000000..75903ab --- /dev/null +++ b/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst @@ -0,0 +1,18 @@ +CMAKE_GLOBAL_AUTOGEN_TARGET +--------------------------- + +Switch to enable generation of a global ``autogen`` target. + +When :variable:`CMAKE_GLOBAL_AUTORCC_TARGET` is enabled, a custom target +``autogen`` is generated. This target depends on all :prop_tgt:`AUTOMOC` and +:prop_tgt:`AUTOUIC` generated ``<ORIGIN>_autogen`` targets in the project. +By building the global ``autogen`` target, all :prop_tgt:`AUTOMOC` and +:prop_tgt:`AUTOUIC` files in the project will be generated. + +The name of the global ``autogen`` target can be changed by setting +:variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME`. + +By default :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is unset. + +See the :manual:`cmake-qt(7)` manual for more information on using CMake +with Qt. diff --git a/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET_NAME.rst b/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET_NAME.rst new file mode 100644 index 0000000..c86a5d0 --- /dev/null +++ b/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET_NAME.rst @@ -0,0 +1,13 @@ +CMAKE_GLOBAL_AUTOGEN_TARGET_NAME +-------------------------------- + +Change the name of the global ``autogen`` target. + +When :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is enabled, a global custom target +named ``autogen`` is created. :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME` +allows to set a different name for that target. + +By default :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME` is unset. + +See the :manual:`cmake-qt(7)` manual for more information on using CMake +with Qt. diff --git a/Help/variable/CMAKE_GLOBAL_AUTORCC_TARGET.rst b/Help/variable/CMAKE_GLOBAL_AUTORCC_TARGET.rst new file mode 100644 index 0000000..f92128c --- /dev/null +++ b/Help/variable/CMAKE_GLOBAL_AUTORCC_TARGET.rst @@ -0,0 +1,18 @@ +CMAKE_GLOBAL_AUTORCC_TARGET +--------------------------- + +Switch to enable generation of a global ``autorcc`` target. + +When :variable:`CMAKE_GLOBAL_AUTORCC_TARGET` is enabled, a custom target +``autorcc`` is generated. This target depends on all :prop_tgt:`AUTORCC` +generated ``<ORIGIN>_arcc_<QRC>`` targets in the project. +By building the global ``autorcc`` target, all :prop_tgt:`AUTORCC` +files in the project will be generated. + +The name of the global ``autorcc`` target can be changed by setting +:variable:`CMAKE_GLOBAL_AUTORCC_TARGET_NAME`. + +By default :variable:`CMAKE_GLOBAL_AUTORCC_TARGET` is unset. + +See the :manual:`cmake-qt(7)` manual for more information on using CMake +with Qt. diff --git a/Help/variable/CMAKE_GLOBAL_AUTORCC_TARGET_NAME.rst b/Help/variable/CMAKE_GLOBAL_AUTORCC_TARGET_NAME.rst new file mode 100644 index 0000000..c6e05de --- /dev/null +++ b/Help/variable/CMAKE_GLOBAL_AUTORCC_TARGET_NAME.rst @@ -0,0 +1,13 @@ +CMAKE_GLOBAL_AUTORCC_TARGET_NAME +-------------------------------- + +Change the name of the global ``autorcc`` target. + +When :variable:`CMAKE_GLOBAL_AUTORCC_TARGET` is enabled, a global custom target +named ``autorcc`` is created. :variable:`CMAKE_GLOBAL_AUTORCC_TARGET_NAME` +allows to set a different name for that target. + +By default :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME` is unset. + +See the :manual:`cmake-qt(7)` manual for more information on using CMake +with Qt. |