summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PositionIndependentCode/CMP0083-cmp0083_old-check.cmake
blob: b66b67286dd767ef95116fbbdd493b9118a8566a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

include ("${RunCMake_TEST_BINARY_DIR}/${RunCMake_TEST_CONFIG}/CMP0083_config.cmake")


# retrieve default type of executable
check_executable ("${cmp0083_ref}" ref)

# POSITION_INDEPENDENT_CODE must not have influence on executable
# pie and no_pie executable must have same type as reference
check_executable ("${cmp0083_old_pie}" old_pie)
if (NOT old_pie STREQUAL ref)
  set (RunCMake_TEST_FAILED "CMP0083(OLD) do not produce expected executable.")
  return()
endif()

check_executable ("${cmp0083_old_no_pie}" old_no_pie)
if (NOT old_no_pie STREQUAL ref)
  set (RunCMake_TEST_FAILED "CMP0083(OLD) do not produce expected executable.")
  return()
endif()