This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/add-fuzzing in repository https://gitbox.apache.org/repos/asf/celix.git
commit 888de357164fb43b19c5f53811c58f7634bc2dc7 Author: Pepijn Noltes <pnol...@apache.org> AuthorDate: Thu Aug 14 15:35:38 2025 +0200 Add enable fuzzing build option Also align enable benchmark option with other enable option and improve package id --- CMakeLists.txt | 3 +++ conanfile.py | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d72ce4d76..cfb0c8c93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,7 @@ endif () if(APPLE) set(CMAKE_MACOSX_RPATH 1) + set(CMAKE_CXX_FLAGS "-Wno-missing-template-arg-list-after-template-kw ${CMAKE_CXX_FLAGS}") endif() if(NOT APPLE) @@ -168,6 +169,8 @@ endif () option(ENABLE_CMAKE_WARNING_TESTS "Enable cmake warning tests to test warning prints" OFF) option(ENABLE_TESTING_ON_CI "Whether to enable testing on CI. This influence allowed timing errors during unit tests" OFF) option(ENABLE_DEPRECATED_WARNINGS "Enable compiler warnings for usage of deprecated functionality" OFF) +option(ENABLE_FUZZING "Enable fuzz testing, using LibFuzzer" OFF) #Note support for LibFuzzer is built-in for Clang +option(ENABLE_BENCHMARKING "Enable benchmarking, using Google Benchmark" OFF) if (NOT ENABLE_DEPRECATED_WARNINGS) set(CMAKE_C_FLAGS "-Wno-deprecated-declarations ${CMAKE_C_FLAGS}") diff --git a/conanfile.py b/conanfile.py index cfce0de63..577ee8c1c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -47,6 +47,8 @@ class CelixConan(ConanFile): "enable_address_sanitizer": False, "enable_undefined_sanitizer": False, "enable_thread_sanitizer": False, + "enable_fuzzing": False, + "enable_benchmarking": False, "install_find_modules": False, "build_all": False, "build_http_admin": False, @@ -145,6 +147,10 @@ class CelixConan(ConanFile): del self.info.options.enable_testing_on_ci del self.info.options.enable_ccache del self.info.options.enable_deprecated_warnings + del self.info.options.enable_testing + del self.info.options.enable_benchmarking + del self.info.options.enable_fuzzing + del self.info.options.enable_code_coverage def build_requirements(self): if self.options.enable_testing: @@ -308,6 +314,8 @@ class CelixConan(ConanFile): self.options['openssl'].shared = True if self.options.enable_testing: self.options['gtest'].shared = True + if self.options.enable_benchmarking: + self.options['benchmark'].shared = True if (self.options.build_rsa_discovery_common or (self.options.build_rsa_remote_service_admin_dfi and self.options.enable_testing)): self.options['libxml2'].shared = True @@ -355,6 +363,8 @@ class CelixConan(ConanFile): self.requires("zlib/1.2.13", override=True) if self.options.build_event_admin_remote_provider_mqtt: self.requires("mosquitto/[>=2.0.3 <3.0.0]") + if self.options.enable_benchmarking: + self.requires("benchmark/[>=1.6.2]") self.validate() def generate(self):