Merge topic 'getprerequisites-pie-executables'
ac7a193
GetPrerequisites.cmake: detect executables built with the -pie linker flag.
This commit is contained in:
commit
cdc00f0f7e
|
@ -195,6 +195,14 @@ function(is_file_executable file result_var)
|
||||||
return()
|
return()
|
||||||
endif("${file_ov}" MATCHES "text")
|
endif("${file_ov}" MATCHES "text")
|
||||||
endif("${file_ov}" MATCHES "executable")
|
endif("${file_ov}" MATCHES "executable")
|
||||||
|
|
||||||
|
# Also detect position independent executables on Linux,
|
||||||
|
# where "file" gives "shared object ... (uses shared libraries)"
|
||||||
|
if("${file_ov}" MATCHES "shared object.*\(uses shared libs\)")
|
||||||
|
set(${result_var} 1 PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
else(file_cmd)
|
else(file_cmd)
|
||||||
message(STATUS "warning: No 'file' command, skipping execute_process...")
|
message(STATUS "warning: No 'file' command, skipping execute_process...")
|
||||||
endif(file_cmd)
|
endif(file_cmd)
|
||||||
|
|
Loading…
Reference in New Issue