aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindPlatform.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindPlatform.cmake')
-rw-r--r--cmake/FindPlatform.cmake16
1 files changed, 16 insertions, 0 deletions
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()