diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:34:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:34:54 +0000 |
commit | 0915b3ef56dfac3113cce55a59a5765dc94976be (patch) | |
tree | a8fea11d50b4f083e1bf0f90025ece7f0824784a /lib/config/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | icinga2-upstream.tar.xz icinga2-upstream.zip |
Adding upstream version 2.13.6.upstream/2.13.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/config/CMakeLists.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/config/CMakeLists.txt b/lib/config/CMakeLists.txt new file mode 100644 index 0000000..80b8c2c --- /dev/null +++ b/lib/config/CMakeLists.txt @@ -0,0 +1,47 @@ +# Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ + +find_package(BISON 2.3.0 REQUIRED) +find_package(FLEX 2.5.31 REQUIRED) + +bison_target(config_parser config_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc) +set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc PROPERTY EXCLUDE_UNITY_BUILD TRUE) + +flex_target(config_lexer config_lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/config_lexer.cc) +set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_lexer.cc PROPERTY EXCLUDE_UNITY_BUILD TRUE) + +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc PROPERTY COMPILE_FLAGS "-Wno-deprecated-register -Wno-parentheses-equality -Wno-unused-function") + set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_lexer.cc PROPERTY COMPILE_FLAGS "-Wno-deprecated-register -Wno-null-conversion") +endif() + +add_flex_bison_dependency(config_lexer config_parser) + +include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + +set(config_SOURCES + i2-config.hpp + activationcontext.cpp activationcontext.hpp + applyrule.cpp applyrule-targeted.cpp applyrule.hpp + configcompiler.cpp configcompiler.hpp + configcompilercontext.cpp configcompilercontext.hpp + configfragment.hpp + configitem.cpp configitem.hpp + configitembuilder.cpp configitembuilder.hpp + expression.cpp expression.hpp + objectrule.cpp objectrule.hpp + vmops.hpp + ${FLEX_config_lexer_OUTPUTS} ${BISON_config_parser_OUTPUTS} +) + +if(ICINGA2_UNITY_BUILD) + mkunity_target(config config config_SOURCES) +endif() + +add_library(config OBJECT ${config_SOURCES}) + +add_dependencies(config base) + +set_target_properties ( + config PROPERTIES + FOLDER Lib +) |