8
# Prepare binaries on which to operate.
9
set(in "@CMAKE_CURRENT_SOURCE_DIR@/ELF")
10
set(out "@CMAKE_CURRENT_BINARY_DIR@/ELF-Out")
11
file(REMOVE_RECURSE "${out}")
12
file(MAKE_DIRECTORY "${out}")
14
file(COPY ${in}/${f} DESTINATION ${out})
15
list(APPEND files "${out}/${f}")
19
# Check for the initial RPATH.
20
file(RPATH_CHECK FILE "${f}" RPATH "/sample/rpath")
22
message(FATAL_ERROR "RPATH_CHECK removed ${f}")
26
file(RPATH_CHANGE FILE "${f}"
27
OLD_RPATH "/sample/rpath"
28
NEW_RPATH "/rpath/sample")
30
file(STRINGS "${f}" rpath REGEX "/rpath/sample" LIMIT_COUNT 1)
32
message(FATAL_ERROR "RPATH not changed in ${f}")
36
file(RPATH_REMOVE FILE "${f}")
38
file(STRINGS "${f}" rpath REGEX "/rpath/sample" LIMIT_COUNT 1)
40
message(FATAL_ERROR "RPATH not removed from ${f}")
43
# Check again...this should remove the file.
44
file(RPATH_CHECK FILE "${f}" RPATH "/sample/rpath")
46
message(FATAL_ERROR "RPATH_CHECK did not remove ${f}")