mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 03:32:28 -04:00
Build system: Support new in cmake 3.17 Ninja Multi-Config generator
This commit is contained in:
@@ -40,7 +40,10 @@ list(APPEND CMAKE_MODULE_PATH
|
||||
"${CMAKE_SOURCE_DIR}/dep/cotire/CMake")
|
||||
|
||||
# build in Release-mode by default if not explicitly set
|
||||
if( NOT CMAKE_BUILD_TYPE )
|
||||
if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
|
||||
set(CMAKE_DEFAULT_BUILD_TYPE "RelWithDebInfo" CACHE INTERNAL "")
|
||||
endif()
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
|
||||
if(WITH_WARNINGS)
|
||||
target_compile_options(trinity-warning-interface
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
|
||||
set(GCC_EXPECTED_VERSION 6.3.0)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
|
||||
if(PLATFORM EQUAL 32)
|
||||
target_compile_options(trinity-compile-option-interface
|
||||
|
||||
@@ -4,7 +4,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
|
||||
if(PLATFORM EQUAL 32)
|
||||
# Required on 32-bit systems to enable SSE2 (standard on x64)
|
||||
|
||||
@@ -59,7 +59,7 @@ else()
|
||||
# while all make-like generators do (nmake, ninja)
|
||||
target_compile_definitions(trinity-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
-D_BUILD_DIRECTIVE="$<CONFIG>")
|
||||
endif()
|
||||
|
||||
# multithreaded compiling on VS
|
||||
|
||||
Reference in New Issue
Block a user