mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 02:53:48 +00:00
feat(Cmake/Build): Use interface targets for inheriting flags and definitions (#2255)
Co-authored-by: Naios Naios@users.noreply.github.com
This commit is contained in:
@@ -1,18 +1,33 @@
|
||||
#
|
||||
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL3 v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
# Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
|
||||
#
|
||||
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
add_definitions(-D_BUILD_DIRECTIVE="'${CMAKE_BUILD_TYPE}'")
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
|
||||
if(PLATFORM EQUAL 32)
|
||||
add_definitions(-axSSE2)
|
||||
target_compile_options(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-axSSE2)
|
||||
else()
|
||||
add_definitions(-xSSE2)
|
||||
target_compile_options(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-xSSE2)
|
||||
endif()
|
||||
|
||||
if( WITH_WARNINGS )
|
||||
add_definitions(-w1)
|
||||
if(WITH_WARNINGS)
|
||||
target_compile_options(acore-warning-interface
|
||||
INTERFACE
|
||||
-w1)
|
||||
message(STATUS "ICC: All warnings enabled")
|
||||
endif()
|
||||
|
||||
if( WITH_COREDEBUG )
|
||||
add_definitions(-g)
|
||||
if(WITH_COREDEBUG)
|
||||
target_compile_options(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-g)
|
||||
message(STATUS "ICC: Debug-flag set (-g)")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user