aboutsummaryrefslogtreecommitdiff
path: root/cmake/compiler/icc/settings.cmake
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2017-10-31 01:29:51 +0100
committerNaios <naios-dev@live.de>2017-12-17 20:22:33 +0100
commite60c1f84a7e13577a82046b02b214f9466d20a7c (patch)
tree4413801132daff4fd180cd6569ffde230b5ba50b /cmake/compiler/icc/settings.cmake
parent5a9ccae3e1115d6fb1dcc287b1cb2d45779fd39b (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
Diffstat (limited to 'cmake/compiler/icc/settings.cmake')
-rw-r--r--cmake/compiler/icc/settings.cmake22
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()