summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_link_options/LINKER_expansion-validation.cmake
blob: bebd6c736737a557ff69c7d29e7a596b79363953 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

if (actual_stdout MATCHES "(LINKER|SHELL):")
  set (RunCMake_TEST_FAILED "LINKER: prefix was not expanded.")
  return()
endif()

if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/LINKER.txt")
  set (RunCMake_TEST_FAILED "${RunCMake_TEST_BINARY_DIR}/LINKER.txt: Reference file not found.")
  return()
endif()
file(READ "${RunCMake_TEST_BINARY_DIR}/LINKER.txt" linker_flag)

if (NOT actual_stdout MATCHES "${linker_flag}")
  set (RunCMake_TEST_FAILED "LINKER: was not expanded correctly.")
endif()