diff options
| author | Naios <naios-dev@live.de> | 2017-12-17 22:53:45 +0100 |
|---|---|---|
| committer | Naios <naios-dev@live.de> | 2017-12-21 23:31:11 +0100 |
| commit | 9d0400211def5b56b33f966707ab764597470c83 (patch) | |
| tree | d80f2635714b18ccf6a5de42d87a31e71531c544 /cmake/macros | |
| parent | 9a515c29bab2dadec011f40e4f824bd9409528d4 (diff) | |
Build: Export a default interface which doesn't hide symbols in unix automatically
(cherry picked from commit db5d5a03be4829928bd20c7d40a6f576f0b86478)
Diffstat (limited to 'cmake/macros')
| -rw-r--r-- | cmake/macros/ConfigureBaseTargets.cmake | 30 |
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) |
