diff options
Diffstat (limited to 'Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake')
-rw-r--r-- | Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake b/Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake index 1e0a2c9..61e1b6d 100644 --- a/Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake +++ b/Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake @@ -1,11 +1,17 @@ -if (CMAKE_CXX_LINK_OPTIONS_PIE) +cmake_policy(SET CMP0083 NEW) + +include (CheckPIESupported) + +check_pie_supported() + +if (CMAKE_CXX_LINK_PIE_SUPPORTED) file(WRITE "${PIE_SUPPORTED}" "\nset(PIE_SUPPORTED TRUE)\n") else() file(WRITE "${PIE_SUPPORTED}" "\nset(PIE_SUPPORTED FALSE)\n") endif() -if (CMAKE_CXX_LINK_OPTIONS_NO_PIE) +if (CMAKE_CXX_LINK_NO_PIE_SUPPORTED) file(APPEND "${PIE_SUPPORTED}" "\nset(NO_PIE_SUPPORTED TRUE)\n") else() file(APPEND "${PIE_SUPPORTED}" "\nset(NO_PIE_SUPPORTED FALSE)\n") |