build: Add base target for dependencies
The zm-dependency-interface target sets compiler flags in a way suitable for external dependencies. This means mainly to disable compile warnings since they concern upstream and not us.
This commit is contained in:
parent
9f16c5073f
commit
b0f0731b47
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue