aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclick <none@none>2010-06-30 15:08:32 +0200
committerclick <none@none>2010-06-30 15:08:32 +0200
commitfc1ed4b1099b05137b6c72a09b058b56936c2225 (patch)
tree516be33fa0e850e22989633722463a75d3377e3a
parent1740bace3a8194a9ad669d3b52a482381679b461 (diff)
Make CMake-based building on Windows a little bit more silent + allow it to use more than 2GB memory on 32-bit platforms (shady solution)
--HG-- branch : trunk
-rw-r--r--CMakeLists.txt20
1 files changed, 19 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0718af32aaf..8b56a8906b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,10 +76,10 @@ option(DO_RA "With RA" 0)
option(DO_SCRIPTS "With trinityscripts" 1)
option(DO_SQL "Copy SQL files" 0)
option(DO_TOOLS "Build tools" 0)
-option(CENTOS "CENTOS" 0)
option(DO_WARN "Enable all compile warnings" 0)
if( UNIX )
+ option(CENTOS "CENTOS" 0)
if( CENTOS )
add_definitions(-DCENTOS)
find_termcap()
@@ -207,6 +207,15 @@ else()
if( UNIX )
add_definitions(--no-warnings) # makes build look nice, no warnings shown at all, only errors
elseif( WIN32 )
+ # Disable warnings in Visual Studio 8 and above
+ if(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /wd4996")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /wd4996")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996")
+ endif()
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
endif()
@@ -228,6 +237,14 @@ if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
add_definitions(-D__ASSERTMACROS__)
endif()
+# Some small tweaks for Visual Studio 7 and above.
+if( MSVC )
+ # Mark 32 bit executables large address aware so they can use > 2GB address space
+ if(CMAKE_SIZEOF_VOID_P MATCHES 4)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
+ endif()
+endif()
+
set(CMAKE_SKIP_BUILD_RPATH 0)
set(CMAKE_BUILD_WITH_INSTALL_RPATH 0)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
@@ -238,3 +255,4 @@ add_subdirectory(src)
if( DO_SQL )
add_subdirectory(sql)
endif()
+