diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:05 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:05 +0300 |
| commit | 0b24459ac12b6cf9fd5a401d647796ca254a8fa8 (patch) | |
| tree | f2fd66e2476976a51e2a51330fd95dc6e87b24c1 /tomlplusplus/fuzzing/CMakeLists.txt | |
| parent | b85e90fc3480da0e6a48da73201a0b22488cc650 (diff) | |
| parent | 1c8b7466e4946fcc3bf20484c0e1d001202cca5a (diff) | |
| download | Project-Tick-0b24459ac12b6cf9fd5a401d647796ca254a8fa8.tar.gz Project-Tick-0b24459ac12b6cf9fd5a401d647796ca254a8fa8.zip | |
Add 'tomlplusplus/' from commit '1c8b7466e4946fcc3bf20484c0e1d001202cca5a'
git-subtree-dir: tomlplusplus
git-subtree-mainline: b85e90fc3480da0e6a48da73201a0b22488cc650
git-subtree-split: 1c8b7466e4946fcc3bf20484c0e1d001202cca5a
Diffstat (limited to 'tomlplusplus/fuzzing/CMakeLists.txt')
| -rw-r--r-- | tomlplusplus/fuzzing/CMakeLists.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tomlplusplus/fuzzing/CMakeLists.txt b/tomlplusplus/fuzzing/CMakeLists.txt new file mode 100644 index 0000000000..1e62a54a13 --- /dev/null +++ b/tomlplusplus/fuzzing/CMakeLists.txt @@ -0,0 +1,31 @@ +# Utilized by OSSFuzz to build the harness(es) for continuous fuzz-testing +# OSSFuzz defines the following environment variables, that this target relies upon: +# CXX, CFLAGS, LIB_FUZZING_ENGINE, OUT +cmake_minimum_required(VERSION 3.14) + +project(Fuzzer LANGUAGES CXX) + +include(../cmake/project-is-top-level.cmake) + +add_definitions(-DNDEBUG) # Do not want assertions + +if (DEFINED ENV{CFLAGS}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} $ENV{CFLAGS}") +endif () +if (DEFINED ENV{CXXFLAGS}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{CXXFLAGS}") +endif () + +if(PROJECT_IS_TOP_LEVEL) + find_package(tomlplusplus REQUIRED) +endif() + +add_executable(toml_fuzzer toml_fuzzer.cpp) +target_link_libraries(toml_fuzzer PRIVATE tomlplusplus::tomlplusplus $ENV{LIB_FUZZING_ENGINE}) +target_compile_features(toml_fuzzer PRIVATE cxx_std_17) + +if (DEFINED ENV{OUT}) + install(TARGETS toml_fuzzer DESTINATION $ENV{OUT}) +else () + message(WARNING "Cannot install if $OUT is not defined!") +endif ()
\ No newline at end of file |
