diff --git a/cmake/Modules/ConfigureBaseTargets.cmake b/cmake/Modules/ConfigureBaseTargets.cmake index 50589ccd1..ed86d35fc 100644 --- a/cmake/Modules/ConfigureBaseTargets.cmake +++ b/cmake/Modules/ConfigureBaseTargets.cmake @@ -16,11 +16,17 @@ else() cxx_std_11) endif() -# Interface to set warning levels on targets -# It gets populated in the compiler specific script +# Interface to set warning levels on targets. +# It gets populated in the compiler specific script. add_library(zm-warning-interface INTERFACE) -# An interface used by all other interfaces +# Interface which disables all warnings on the target. +add_library(zm-no-warning-interface INTERFACE) +target_compile_options(zm-no-warning-interface + INTERFACE + -w) + +# An interface used by all other interfaces. add_library(zm-default-interface INTERFACE) target_link_libraries(zm-default-interface INTERFACE @@ -34,3 +40,11 @@ target_link_libraries(zm-core-interface INTERFACE zm-default-interface zm-warning-interface) + +# An interface which provides the flags and definitions +# used by the external dependency targets. +add_library(zm-dependency-interface INTERFACE) +target_link_libraries(zm-dependency-interface + INTERFACE + zm-default-interface + zm-no-warning-interface)