Commit 0eb520f4 authored by David Cole's avatar David Cole Committed by Kitware Robot

Merge topic 'fix-FindPackageMode-symlink'

0b863882 CMakeFindPackageMode: fix 32/64bit detection if 'file' is a symlink
parents 881dc355 0b863882
......@@ -71,7 +71,8 @@ if(UNIX)
# use the file utility to check whether itself is 64 bit:
find_program(FILE_EXECUTABLE file)
if(FILE_EXECUTABLE)
execute_process(COMMAND "${FILE_EXECUTABLE}" "${FILE_EXECUTABLE}" OUTPUT_VARIABLE fileOutput ERROR_QUIET)
get_filename_component(FILE_ABSPATH "${FILE_EXECUTABLE}" ABSOLUTE)
execute_process(COMMAND "${FILE_ABSPATH}" "${FILE_ABSPATH}" OUTPUT_VARIABLE fileOutput ERROR_QUIET)
if("${fileOutput}" MATCHES "64-bit")
set(CMAKE_SIZEOF_VOID_P 8)
endif()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment