Buildsystem/CMake: Change policy CMP0005 to NEW and corect some buildvariables accordingly

** Info from CMake:
**   The OLD behavior for this policy is to place definition values given to add_definitions directly in the generated build rules without attempting to escape anything.
**  The NEW behavior for this policy is to generate correct escapes for all native build tools automatically.

If this breaks build, let us know on irc : irc.rizon.net/#trinity
This commit is contained in:
click committed 2013-01-29 15:53:21 +01:00
1 parent 8183f70ae0
commit 7b49da48f9
4 files changed
+8 -4

No files matched your search

+5 -1
View File
@@ -13,7 +13,11 @@ project(TrinityCore)
# CMake policies (can not be handled elsewhere) # CMake policies (can not be handled elsewhere)
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0005 OLD) cmake_policy(SET CMP0005 NEW)
# add this options before PROJECT keyword
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
# Set RPATH-handing (CMake parameters) # Set RPATH-handing (CMake parameters)
set(CMAKE_SKIP_BUILD_RPATH 0) set(CMAKE_SKIP_BUILD_RPATH 0)
+1 -1
View File
@@ -1,5 +1,5 @@
# Set build-directive (used in core to tell which buildtype we used) # Set build-directive (used in core to tell which buildtype we used)
add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"') add_definitions(-D_BUILD_DIRECTIVE="$(CONFIGURATION)")
if(WITH_WARNINGS) if(WITH_WARNINGS)
set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors") set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors")
+1 -1
View File
@@ -1,5 +1,5 @@
# Set build-directive (used in core to tell which buildtype we used) # Set build-directive (used in core to tell which buildtype we used)
add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"') add_definitions(-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
if(PLATFORM EQUAL 32) if(PLATFORM EQUAL 32)
# Required on 32-bit systems to enable SSE2 (standard on x64) # Required on 32-bit systems to enable SSE2 (standard on x64)
+1 -1
View File
@@ -25,7 +25,7 @@ else()
endif() endif()
# Set build-directive (used in core to tell which buildtype we used) # Set build-directive (used in core to tell which buildtype we used)
add_definitions(-D_BUILD_DIRECTIVE=\\"$(ConfigurationName)\\") add_definitions(-D_BUILD_DIRECTIVE="$(ConfigurationName)")
# multithreaded compiling on VS # multithreaded compiling on VS
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")