diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e0d237d346..ba78a07834 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -103,8 +103,8 @@ endforeach () # on clang/msvc and isn't supported with GCC. If you need to use these fuzzers # with a GCC based project you should consider looking into the LIB_FUZZING_ENGINE # env variable defined in `test/fuzz/CMakeLists.txt`. -set(CMAKE_REQUIRED_LINK_OPTIONS "-fsanitize=fuzzer,address") -set(CMAKE_REQUIRED_FLAGS "-fsanitize=fuzzer-no-link,address") +set(CMAKE_REQUIRED_LINK_OPTIONS "-fsanitize=fuzzer") +set(CMAKE_REQUIRED_FLAGS "-fsanitize=fuzzer-no-link") check_cxx_source_compiles([[ #include extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, std::size_t Size) { @@ -118,8 +118,8 @@ cmake_dependent_option( ) if (WITH_TEST_FUZZ) - message(VERBOSE "Building fuzz tests enabled") + message(STATUS "Building fuzz tests enabled") add_subdirectory(fuzz) else () - message(VERBOSE "Building fuzz tests disabled") + message(STATUS "Building fuzz tests disabled") endif () \ No newline at end of file diff --git a/tests/fuzz/oss-fuzz-build.sh b/tests/fuzz/oss-fuzz-build.sh new file mode 100644 index 0000000000..68fc5c5d86 --- /dev/null +++ b/tests/fuzz/oss-fuzz-build.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set euxo pipefail + +conan install . --build=missing --update -s build_type=Release -o curaengine:enable_testing=True +cmake --preset release -DWITH_TEST_FUZZ=ON +cmake --build --preset release -j$(nproc) + +find . -name FuzzGcodeExport +#cp build/Release/tests/fuzz/Fuzz* $OUT \ No newline at end of file