mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
* Remove the usage of global flags and definitions
set through the CMAKE_CXX_FLAGS variable.
* Use cmake target compile features for setting the
CXX standard automatically.
* Make C++14 globally available in the project
* Closes #21033
(cherry picked from commit e60c1f84a7)
29 lines
638 B
CMake
29 lines
638 B
CMake
target_compile_definitions(trinity-compile-option-interface
|
|
INTERFACE
|
|
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
|
|
|
if(PLATFORM EQUAL 32)
|
|
target_compile_options(trinity-compile-option-interface
|
|
INTERFACE
|
|
-axSSE2)
|
|
else()
|
|
target_compile_options(trinity-compile-option-interface
|
|
INTERFACE
|
|
-xSSE2)
|
|
endif()
|
|
|
|
if( WITH_WARNINGS )
|
|
target_compile_options(trinity-warning-interface
|
|
INTERFACE
|
|
-w1)
|
|
|
|
message(STATUS "ICC: All warnings enabled")
|
|
endif()
|
|
|
|
if( WITH_COREDEBUG )
|
|
target_compile_options(trinity-compile-option-interface
|
|
INTERFACE
|
|
-g)
|
|
message(STATUS "ICC: Debug-flag set (-g)")
|
|
endif()
|