mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -13,7 +13,11 @@ project(TrinityCore)
|
||||
|
||||
# CMake policies (can not be handled elsewhere)
|
||||
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(CMAKE_SKIP_BUILD_RPATH 0)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 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)
|
||||
set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 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)
|
||||
# Required on 32-bit systems to enable SSE2 (standard on x64)
|
||||
|
||||
@@ -25,7 +25,7 @@ else()
|
||||
endif()
|
||||
|
||||
# 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
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
|
||||
Reference in New Issue
Block a user