summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-12 12:18:01 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-04-12 12:18:09 (GMT)
commit8fd65bef7d803b8c42ded151383442fd6592b5d9 (patch)
treef938edcb45ccf61dd07c5aa50426e6a6880b846b /Modules
parentb77fd6da49135acb489d10117214d6c5b4133e7b (diff)
parent91c859d1e510bd1ce60fe8a105fe8d4a84392c1e (diff)
downloadCMake-8fd65bef7d803b8c42ded151383442fd6592b5d9.zip
CMake-8fd65bef7d803b8c42ded151383442fd6592b5d9.tar.gz
CMake-8fd65bef7d803b8c42ded151383442fd6592b5d9.tar.bz2
Merge topic 'doc-CheckPIESupported' into release-3.23
91c859d1e5 CheckPIESupported: Prevent separate output lines running together ab5455aa79 Help: Correct/add missing details for CheckPIESupported Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7157
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckPIESupported.cmake11
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/CheckPIESupported.cmake b/Modules/CheckPIESupported.cmake
index 6424472..452348b 100644
--- a/Modules/CheckPIESupported.cmake
+++ b/Modules/CheckPIESupported.cmake
@@ -22,10 +22,13 @@ property for executables will be honored at link time.
Options are:
``OUTPUT_VARIABLE <output>``
- Set ``<output>`` variable with details about any error.
+ Set ``<output>`` variable with details about any error. If the check is
+ bypassed because it uses cached results from a previous call, the output
+ will be empty even if errors were present in the previous call.
``LANGUAGES <lang>...``
Check the linkers used for each of the specified languages.
+ If this option is not provided, the command checks all enabled languages.
``C``, ``CXX``, ``Fortran`` are supported.
@@ -43,9 +46,9 @@ Variables
For each language checked, two boolean cache variables are defined.
``CMAKE_<lang>_LINK_PIE_SUPPORTED``
- Set to ``YES`` if ``PIE`` is supported by the linker and ``NO`` otherwise.
+ Set to true if ``PIE`` is supported by the linker and false otherwise.
``CMAKE_<lang>_LINK_NO_PIE_SUPPORTED``
- Set to ``YES`` if ``NO_PIE`` is supported by the linker and ``NO`` otherwise.
+ Set to true if ``NO_PIE`` is supported by the linker and false otherwise.
Examples
^^^^^^^^
@@ -139,7 +142,7 @@ function (check_pie_supported)
# no support at link time. Set cache variables to NO
set(CMAKE_${lang}_LINK_PIE_SUPPORTED NO CACHE INTERNAL "PIE (${lang})")
set(CMAKE_${lang}_LINK_NO_PIE_SUPPORTED NO CACHE INTERNAL "NO_PIE (${lang})")
- string (APPEND outputs "PIE and NO_PIE are not supported by linker for ${lang}")
+ string (APPEND outputs "PIE and NO_PIE are not supported by linker for ${lang}\n")
endif()
endforeach()