diff options
author | Steven Newbury <steve@snewbury.org.uk> | 2017-02-27 21:06:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-07 20:22:55 (GMT) |
commit | 462cf254270fbd56bffc73b00dc28882fdb0bdd6 (patch) | |
tree | ff0ebb25613ba68d21b9b50f60f1f53f2ea05d79 /Source/cmFindLibraryCommand.cxx | |
parent | 06ef23c3e0abf79f451cf69fbd3ac646b7e17c27 (diff) | |
download | CMake-462cf254270fbd56bffc73b00dc28882fdb0bdd6.zip CMake-462cf254270fbd56bffc73b00dc28882fdb0bdd6.tar.gz CMake-462cf254270fbd56bffc73b00dc28882fdb0bdd6.tar.bz2 |
Add support for x32-abi
Detect x32-abi through CMakeCompilerABI infrastruture and use this
information at runtime to determine the correct library paths with
`FIND_LIBRARY_USE_LIBX32_PATHS`.
Fixes: #15994
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 69f9078..e92d672 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -43,7 +43,8 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn, return true; } - // add custom lib<qual> paths instead of using fixed lib32 or lib64 + // add custom lib<qual> paths instead of using fixed lib32, lib64 or + // libx32 if (const char* customLib = this->Makefile->GetDefinition( "CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX")) { this->AddArchitecturePaths(customLib); @@ -60,6 +61,12 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn, "FIND_LIBRARY_USE_LIB64_PATHS")) { this->AddArchitecturePaths("64"); } + // add special 32 bit paths if this is an x32 compile. + else if (this->Makefile->PlatformIsx32() && + this->Makefile->GetState()->GetGlobalPropertyAsBool( + "FIND_LIBRARY_USE_LIBX32_PATHS")) { + this->AddArchitecturePaths("x32"); + } std::string library = this->FindLibrary(); if (library != "") { |