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 /Source/cmDocumentVariables.cxx | |
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 'Source/cmDocumentVariables.cxx')
-rw-r--r-- | Source/cmDocumentVariables.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index 994445d..ea25e60 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -822,6 +822,18 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "set to the output of uname -r. On other " "systems this is set to major-minor version numbers.",false, "Variables That Describe the System"); + cm->DefineProperty + ("CMAKE_LIBRARY_ARCHITECTURE", cmProperty::VARIABLE, + "Target architecture library directory name, if detected.", + "This is the value of CMAKE_<lang>_LIBRARY_ARCHITECTURE as " + "detected for one of the enabled languages.",false, + "Variables That Describe the System"); + cm->DefineProperty + ("CMAKE_LIBRARY_ARCHITECTURE_REGEX", cmProperty::VARIABLE, + "Regex matching possible target architecture library directory names.", + "This is used to detect CMAKE_<lang>_LIBRARY_ARCHITECTURE from the " + "implicit linker search path by matching the <arch> name.",false, + "Variables That Describe the System"); cm->DefineProperty ("CMAKE_HOST_SYSTEM", cmProperty::VARIABLE, @@ -1360,6 +1372,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Variables for Languages"); cm->DefineProperty + ("CMAKE_<LANG>_LIBRARY_ARCHITECTURE", cmProperty::VARIABLE, + "Target architecture library directory name detected for <lang>.", + "If the <lang> compiler passes to the linker an architecture-specific " + "system library search directory such as <prefix>/lib/<arch> this " + "variable contains the <arch> name if/as detected by CMake.",false, + "Variables for Languages"); + + cm->DefineProperty ("CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES", cmProperty::VARIABLE, "True if CMAKE_<LANG>_LINKER_PREFERENCE propagates across targets.", "This is used when CMake selects a linker language for a target. " |