diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-11-25 15:45:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-11-25 16:06:15 (GMT) |
commit | 72f6b4bfbe84a369fbdf4c9671470ba8c3ce14cc (patch) | |
tree | 692c9030a9a5503281310aa960b9fd8020aec5ac /Modules/CheckPIESupported.cmake | |
parent | 9e83e77129880885d0490d6519e30c1559c5a47c (diff) | |
download | CMake-72f6b4bfbe84a369fbdf4c9671470ba8c3ce14cc.zip CMake-72f6b4bfbe84a369fbdf4c9671470ba8c3ce14cc.tar.gz CMake-72f6b4bfbe84a369fbdf4c9671470ba8c3ce14cc.tar.bz2 |
Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}Flag
Rename the `CheckPIESupported` helper functions so that they
don't clobber other internal functions. Also rename them to
document they can't be unified with `CheckCompilerFlag`.
Fixes: #21497
Diffstat (limited to 'Modules/CheckPIESupported.cmake')
-rw-r--r-- | Modules/CheckPIESupported.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/CheckPIESupported.cmake b/Modules/CheckPIESupported.cmake index a99d8c4..fb87822 100644 --- a/Modules/CheckPIESupported.cmake +++ b/Modules/CheckPIESupported.cmake @@ -62,7 +62,7 @@ Examples #]=======================================================================] -include (Internal/CMakeCheckCompilerFlag) +include (Internal/CMakeTryCompilerOrLinkerFlag) function (check_pie_supported) cmake_policy(GET CMP0083 cmp0083) @@ -109,14 +109,16 @@ function (check_pie_supported) foreach(lang IN LISTS CHECK_PIE_LANGUAGES) if(_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER) - cmake_check_compiler_flag(${lang} "${CMAKE_${lang}_LINK_OPTIONS_PIE}" + cmake_try_compiler_or_linker_flag(${lang} + "${CMAKE_${lang}_LINK_OPTIONS_PIE}" CMAKE_${lang}_LINK_PIE_SUPPORTED OUTPUT_VARIABLE output) if (NOT CMAKE_${lang}_LINK_PIE_SUPPORTED) string (APPEND outputs "PIE (${lang}): ${output}\n") endif() - cmake_check_compiler_flag(${lang} "${CMAKE_${lang}_LINK_OPTIONS_NO_PIE}" + cmake_try_compiler_or_linker_flag(${lang} + "${CMAKE_${lang}_LINK_OPTIONS_NO_PIE}" CMAKE_${lang}_LINK_NO_PIE_SUPPORTED OUTPUT_VARIABLE output) if (NOT CMAKE_${lang}_LINK_NO_PIE_SUPPORTED) |