summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-30 17:45:14 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-30 17:45:14 (GMT)
commit56d1a1780d45d8f9f852e32162153d80721b4662 (patch)
tree7035af3c8c36da7cdf398c6fc522e10f459102b8 /Source/cmMakefile.cxx
parentf9c0e139758ed38975cce8d78420b5b5ba36bbbd (diff)
downloadCMake-56d1a1780d45d8f9f852e32162153d80721b4662.zip
CMake-56d1a1780d45d8f9f852e32162153d80721b4662.tar.gz
CMake-56d1a1780d45d8f9f852e32162153d80721b4662.tar.bz2
Create cmMakefile::PlatformIs64Bit helper method
This method centralizes tests for whether CMAKE_SIZEOF_VOID_P is 8.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e49ec3d..7aa1202 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2050,6 +2050,15 @@ bool cmMakefile::IsSet(const char* name) const
return true;
}
+bool cmMakefile::PlatformIs64Bit() const
+{
+ if(const char* sizeof_dptr = this->GetDefinition("CMAKE_SIZEOF_VOID_P"))
+ {
+ return atoi(sizeof_dptr) == 8;
+ }
+ return false;
+}
+
bool cmMakefile::CanIWriteThisFile(const char* fileName)
{
if ( !this->IsOn("CMAKE_DISABLE_SOURCE_CHANGES") )