diff options
author | Brad King <brad.king@kitware.com> | 2009-09-30 17:45:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-30 17:45:14 (GMT) |
commit | 56d1a1780d45d8f9f852e32162153d80721b4662 (patch) | |
tree | 7035af3c8c36da7cdf398c6fc522e10f459102b8 /Source/cmMakefile.cxx | |
parent | f9c0e139758ed38975cce8d78420b5b5ba36bbbd (diff) | |
download | CMake-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.cxx | 9 |
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") ) |