diff options
author | David Cole <david.cole@kitware.com> | 2012-03-02 16:47:59 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-03-02 16:47:59 (GMT) |
commit | 0eb520f47c0e6192819964e13487e0ea27cdb719 (patch) | |
tree | 4a1babdb862ed2aea9a429f4ec56cd7c82aa2663 /Modules | |
parent | 881dc355798cde77869f6eb3b1f09b2139265e3f (diff) | |
parent | 0b8638821eccd09a50dfb26cfe7a82549c8254c5 (diff) | |
download | CMake-0eb520f47c0e6192819964e13487e0ea27cdb719.zip CMake-0eb520f47c0e6192819964e13487e0ea27cdb719.tar.gz CMake-0eb520f47c0e6192819964e13487e0ea27cdb719.tar.bz2 |
Merge topic 'fix-FindPackageMode-symlink'
0b86388 CMakeFindPackageMode: fix 32/64bit detection if 'file' is a symlink
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindPackageMode.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CMakeFindPackageMode.cmake b/Modules/CMakeFindPackageMode.cmake index 4296577..59c7ba5 100644 --- a/Modules/CMakeFindPackageMode.cmake +++ b/Modules/CMakeFindPackageMode.cmake @@ -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() |