summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake
blob: 1e0a2c98c014b17972910541e55a591e2d21d119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

if (CMAKE_CXX_LINK_OPTIONS_PIE)
  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)
  file(APPEND "${PIE_SUPPORTED}" "\nset(NO_PIE_SUPPORTED TRUE)\n")
else()
  file(APPEND "${PIE_SUPPORTED}" "\nset(NO_PIE_SUPPORTED FALSE)\n")
endif()