| author | |
| committer | |
| log | 41dbd0d0da0989495a97e99fb9269a49ac302768 |
| tree | 18a043e574ada883a6d01738f387cc6f5486a0e3 |
| parent | 901f344be2fb822df2c431017833899450779c4d |
`check_pie_supported` only uses the `OUTPUT_VARIABLE` to to signify errors
if PIE is actually supported is signaled by `CMAKE_<lang>_LINK_PIE_SUPPORTED`.
Checking if `OUTPUT_VARIABLE` is empty is not enough either since the check
is bypassed if its results are cached but the output variable is not cached.1 files changed, 2 insertions(+), 2 deletions(-)
CMakeLists.txt+2-2| ... | ... | @@ -125,8 +125,8 @@ check_pie_supported( |
| 125 | 125 | OUTPUT_VARIABLE ZIG_PIE_SUPPORTED_BY_CMAKE |
| 126 | 126 | LANGUAGES C CXX |
| 127 | 127 | ) |
| 128 | if(ZIG_PIE AND NOT ZIG_PIE_SUPPORTED_BY_CMAKE) | |
| 129 | message(SEND_ERROR "ZIG_PIE was requested but CMake does not support it for \"zigcpp\" target") | |
| 128 | if(ZIG_PIE AND NOT CMAKE_CXX_LINK_PIE_SUPPORTED) | |
| 129 | message(SEND_ERROR "ZIG_PIE was requested but CMake does not support it for \"zigcpp\" target: ${ZIG_PIE_SUPPORTED_BY_CMAKE}") | |
| 130 | 130 | endif() |
| 131 | 131 | |
| 132 | 132 |