aboutsummaryrefslogtreecommitdiff
path: root/cmake/platform/unix
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/platform/unix
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/platform/unix')
-rw-r--r--cmake/platform/unix/settings.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/platform/unix/settings.cmake b/cmake/platform/unix/settings.cmake
index 79b426d7e03..0d38c6886a5 100644
--- a/cmake/platform/unix/settings.cmake
+++ b/cmake/platform/unix/settings.cmake
@@ -32,5 +32,7 @@ elseif(CMAKE_C_COMPILER MATCHES "icc")
elseif(CMAKE_C_COMPILER MATCHES "clang" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
include(${CMAKE_SOURCE_DIR}/cmake/compiler/clang/settings.cmake)
else()
- add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')
+ target_compile_definitions(trinity-compile-option-interface
+ INTERFACE
+ -D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
endif()