diff options
author | Naios <naios-dev@live.de> | 2017-10-31 01:29:51 +0100 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2017-12-20 04:04:27 +0100 |
commit | ff35262a3ac804db7a941f29040e4b299a7cb7c4 (patch) | |
tree | fe05ea8b57ab71056a6e800a00213fbab8a066c7 /cmake/compiler/icc | |
parent | af7352118b6e7306a8d8a28934ee62f27886808e (diff) |
Build: Use interface targets for inheriting flags and definitions
* 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 e60c1f84a7e13577a82046b02b214f9466d20a7c)
Diffstat (limited to 'cmake/compiler/icc')
-rw-r--r-- | cmake/compiler/icc/settings.cmake | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/cmake/compiler/icc/settings.cmake b/cmake/compiler/icc/settings.cmake index 133bc15e59e..563b92d6b9b 100644 --- a/cmake/compiler/icc/settings.cmake +++ b/cmake/compiler/icc/settings.cmake @@ -1,18 +1,28 @@ -# Set build-directive (used in core to tell which buildtype we used) -add_definitions(-D_BUILD_DIRECTIVE="'${CMAKE_BUILD_TYPE}'") +target_compile_definitions(trinity-compile-option-interface + INTERFACE + -D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}") if(PLATFORM EQUAL 32) - add_definitions(-axSSE2) + target_compile_options(trinity-compile-option-interface + INTERFACE + -axSSE2) else() - add_definitions(-xSSE2) + target_compile_options(trinity-compile-option-interface + INTERFACE + -xSSE2) endif() if( WITH_WARNINGS ) - add_definitions(-w1) + target_compile_options(trinity-warning-interface + INTERFACE + -w1) + message(STATUS "ICC: All warnings enabled") endif() if( WITH_COREDEBUG ) - add_definitions(-g) + target_compile_options(trinity-compile-option-interface + INTERFACE + -g) message(STATUS "ICC: Debug-flag set (-g)") endif() |