diff options
author | click <none@none> | 2010-06-30 14:39:21 +0200 |
---|---|---|
committer | click <none@none> | 2010-06-30 14:39:21 +0200 |
commit | d405f3fca5b36e0161c28d842c05e4c9b07b4599 (patch) | |
tree | ef73599784d4227c8818b0b92fa9be019989c1df | |
parent | d8bdc9d22fb3b49e127ab419a5283ebb054e943c (diff) |
Add CMake platform-check (32/64-bit) (includes new test-variable ${PLATFORM} that defines X86/X64 basesystem)
--HG--
branch : trunk
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | cmake/FindPlatform.cmake | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e7118a2faa7..0718af32aaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,7 @@ endif() # include(CheckIncludeFiles) +include(cmake/FindPlatform.cmake) include(cmake/FindPCHSupport.cmake) if(WIN32) diff --git a/cmake/FindPlatform.cmake b/cmake/FindPlatform.cmake new file mode 100644 index 00000000000..60ce00149b3 --- /dev/null +++ b/cmake/FindPlatform.cmake @@ -0,0 +1,16 @@ +# default to x86 platform. We'll check for X64 in a bit +SET(PLATFORM X86) + +# This definition is necessary to work around a bug with Intellisense described +# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper +# debugger functionality. + +IF(CMAKE_SIZEOF_VOID_P MATCHES 8) + MESSAGE(STATUS "Detected 64-bit platform.") + if(WIN32) + ADD_DEFINITIONS("-D_WIN64") + ENDIF() + SET (PLATFORM X64) +ELSE() + MESSAGE(STATUS "Detected 32-bit platform.") +ENDIF() |