Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Buildsystem/CMake: Change policy CMP0005 to NEW and corect some build…

…variables 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
  • Loading branch information...
commit 7b49da48f9c3c21406fbe350de170757ea6e285f 1 parent 8183f70
@click click authored
View
6 CMakeLists.txt
@@ -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)
View
2  cmake/compiler/clang/settings.cmake
@@ -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")
View
2  cmake/compiler/gcc/settings.cmake
@@ -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)
View
2  cmake/compiler/msvc/settings.cmake
@@ -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")
Please sign in to comment.
Something went wrong with that request. Please try again.