summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-09 16:08:06 +0000
committerKitware Robot <kwrobot@kitware.com>2017-03-09 11:08:11 -0500
commitc4f9d104269938d8111030a05268b19a0f493098 (patch)
tree155bdfc09b1ee0312206fc30f72d21834b2d9c36 /Source/cmMakefile.cxx
parent31f3531856ab8ee0cdeaf427224b51abd7714ccc (diff)
parentd9bdcf34efa79dcdea4ded8e90b80a55db69fbf6 (diff)
downloadcmake-c4f9d104269938d8111030a05268b19a0f493098.tar.gz
Merge topic 'master'
d9bdcf34 Tests: Add x32 tests to test suite 5b6d354f Help: Add notes for topic 'x32-abi' bed9c73d Modules: Add x32-abi support to hard-coded paths 462cf254 Add support for x32-abi Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !532
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 204fd8f461..c4a488f67b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2150,6 +2150,12 @@ bool cmMakefile::IsSet(const std::string& name) const
bool cmMakefile::PlatformIs32Bit() const
{
+ if (const char* plat_abi =
+ this->GetDefinition("CMAKE_INTERNAL_PLATFORM_ABI")) {
+ if (strcmp(plat_abi, "ELF X32") == 0) {
+ return false;
+ }
+ }
if (const char* sizeof_dptr = this->GetDefinition("CMAKE_SIZEOF_VOID_P")) {
return atoi(sizeof_dptr) == 4;
}
@@ -2164,6 +2170,17 @@ bool cmMakefile::PlatformIs64Bit() const
return false;
}
+bool cmMakefile::PlatformIsx32() const
+{
+ if (const char* plat_abi =
+ this->GetDefinition("CMAKE_INTERNAL_PLATFORM_ABI")) {
+ if (strcmp(plat_abi, "ELF X32") == 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
bool cmMakefile::PlatformIsAppleIos() const
{
std::string sdkRoot;