aboutsummaryrefslogtreecommitdiff
path: root/cmake/macros/ConfigureBaseTargets.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/macros/ConfigureBaseTargets.cmake')
-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)