diff options
author | Brad King <brad.king@kitware.com> | 2011-06-08 12:46:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-06-08 14:04:44 (GMT) |
commit | b41ad3b399c591f8f35eaacf056ffd9016b9e0bc (patch) | |
tree | 5d44f207b90ac15c1ed6b34358cdfe62e7e9ca27 /Modules/CMakeCXXCompiler.cmake.in | |
parent | 0f939ee16478ad638bb380a75b4867b072a09306 (diff) | |
download | CMake-b41ad3b399c591f8f35eaacf056ffd9016b9e0bc.zip CMake-b41ad3b399c591f8f35eaacf056ffd9016b9e0bc.tar.gz CMake-b41ad3b399c591f8f35eaacf056ffd9016b9e0bc.tar.bz2 |
Teach find_(library|package) about Linux multiarch (#12037)
Implement support for multiarch as specified here:
http://wiki.debian.org/Multiarch
https://wiki.ubuntu.com/MultiarchSpec
Detect the <arch> part of <prefix>/lib/<arch> from the implicit library
search path from each compiler to set CMAKE_<lang>_LIBRARY_ARCHITECTURE.
Define CMAKE_LIBRARY_ARCHITECTURE using one of these values (they should
all be the same). Teach the find_library and find_package commands to
search <prefix>/lib/<arch> whenever they would search <prefix>/lib.
Diffstat (limited to 'Modules/CMakeCXXCompiler.cmake.in')
-rw-r--r-- | Modules/CMakeCXXCompiler.cmake.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index d7ae8d9..ea06526 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -29,6 +29,7 @@ SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) # Save compiler ABI information. SET(CMAKE_CXX_SIZEOF_DATA_PTR "@CMAKE_CXX_SIZEOF_DATA_PTR@") SET(CMAKE_CXX_COMPILER_ABI "@CMAKE_CXX_COMPILER_ABI@") +SET(CMAKE_CXX_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@") IF(CMAKE_CXX_SIZEOF_DATA_PTR) SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") @@ -38,6 +39,10 @@ IF(CMAKE_CXX_COMPILER_ABI) SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") ENDIF(CMAKE_CXX_COMPILER_ABI) +IF(CMAKE_CXX_LIBRARY_ARCHITECTURE) + SET(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@") +ENDIF() + SET(CMAKE_CXX_HAS_ISYSROOT "@CMAKE_CXX_HAS_ISYSROOT@") @CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG_CODE@ |