From: "Yury G. Kudryashov" <[email protected]>

---
 Modules/CMakeFindPackageMode.cmake |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Modules/CMakeFindPackageMode.cmake 
b/Modules/CMakeFindPackageMode.cmake
index 4296577..bcf3014 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 
CACHE)
+        execute_process(COMMAND "${FILE_ABSPATH}" "${FILE_ABSPATH}" 
OUTPUT_VARIABLE fileOutput ERROR_QUIET)
         if("${fileOutput}" MATCHES "64-bit")
           set(CMAKE_SIZEOF_VOID_P 8)
         endif()
-- 
1.7.8

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to