aboutsummaryrefslogtreecommitdiff
path: root/cmake/compiler
diff options
context:
space:
mode:
authorclick <none@none>2010-08-31 20:14:16 +0200
committerclick <none@none>2010-08-31 20:14:16 +0200
commit174f2884b7e462aaafe58fa43868f7bd70776f3e (patch)
tree25a49a8bfec5768f22bb15644d855e17254db69d /cmake/compiler
parent258398ed3078f3bd506bdf56e0cbead754770bb6 (diff)
Buildsystem/MSVC: Only use /bigobj on x64 platforms - should solve x86 debug compilations (needs feedback)
--HG-- branch : trunk
Diffstat (limited to 'cmake/compiler')
-rw-r--r--cmake/compiler/msvc/settings.cmake15
1 files changed, 7 insertions, 8 deletions
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index c237c221fa7..b1ab7adb22d 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -17,13 +17,16 @@ if((NOT USE_COREPCH) AND (NOT USE_SCRIPTPCH))
message(STATUS "- MSVC: PCH not used - enabled multithreaded compiling")
endif()
-# 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(${PLATFORM} STREQUAL "X64")
+ # 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.
add_definitions("-D_WIN64")
message(STATUS "- MSVC: 64-bit platform, enforced -D_WIN64 parameter")
+
+ #Enable extended object support for debug compiles on X64 (not required on X86)
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} /bigobj")
+ message(STATUS "- MSVC: Enabled extended object-support for debug-compiles")
endif()
# Define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES - eliminates the warning by changing the strcpy call to strcpy_s, which prevents buffer overruns
@@ -38,10 +41,6 @@ message(STATUS "- MSVC: Disabled NON-SECURE warnings")
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
message(STATUS "- MSVC: Disabled POSIX warnings")
-#Enable extended object support for debug compiles
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} /bigobj")
-message(STATUS "- MSVC: Enabled extended object-support for debug-compiles")
-
# disable warnings in Visual Studio 8 and above if not wanted
if(NOT WITH_WARNINGS)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")