aboutsummaryrefslogtreecommitdiff
path: root/cmake/macros
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2017-12-17 22:53:45 +0100
committerNaios <naios-dev@live.de>2017-12-20 04:04:28 +0100
commitdb5d5a03be4829928bd20c7d40a6f576f0b86478 (patch)
treea513ef0b85ac65bac5897f57e85cd9ff2726bd34 /cmake/macros
parent891960edbe3768284a3892ae3edbe4afb6395e8f (diff)
Build: Export a default interface which doesn't hide symbols in unix automatically
Diffstat (limited to 'cmake/macros')
-rw-r--r--cmake/macros/ConfigureBaseTargets.cmake30
1 files changed, 22 insertions, 8 deletions
diff --git a/cmake/macros/ConfigureBaseTargets.cmake b/cmake/macros/ConfigureBaseTargets.cmake
index 1c85c512ad2..0166185b3be 100644
--- a/cmake/macros/ConfigureBaseTargets.cmake
+++ b/cmake/macros/ConfigureBaseTargets.cmake
@@ -37,29 +37,43 @@ target_compile_features(trinity-feature-interface
# This interface taget is set-up through the platform specific script
add_library(trinity-warning-interface INTERFACE)
-# An interface amalgamation which provides the flags and definitions
-# used by the dependency targets.
-add_library(trinity-dependency-interface INTERFACE)
-target_link_libraries(trinity-dependency-interface
+# An interface used for all other interfaces
+add_library(trinity-default-interface INTERFACE)
+target_link_libraries(trinity-default-interface
INTERFACE
trinity-compile-option-interface
trinity-feature-interface)
+# An interface used for silencing all warnings
+add_library(trinity-no-warning-interface INTERFACE)
+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
- target_compile_options(trinity-dependency-interface
+ target_compile_options(trinity-no-warning-interface
INTERFACE
/W0)
else()
- target_compile_options(trinity-dependency-interface
+ target_compile_options(trinity-no-warning-interface
INTERFACE
-w)
endif()
+# An interface library to change the default behaviour
+# to hide symbols automatically.
+add_library(trinity-hidden-symbols-interface INTERFACE)
+
+# An interface amalgamation which provides the flags and definitions
+# used by the dependency targets.
+add_library(trinity-dependency-interface INTERFACE)
+target_link_libraries(trinity-dependency-interface
+ INTERFACE
+ trinity-default-interface
+ trinity-no-warning-interface
+ trinity-hidden-symbols-interface)
+
# An interface amalgamation which provides the flags and definitions
# used by the core targets.
add_library(trinity-core-interface INTERFACE)
target_link_libraries(trinity-core-interface
INTERFACE
- trinity-compile-option-interface
- trinity-feature-interface
+ trinity-default-interface
trinity-warning-interface)