aboutsummaryrefslogtreecommitdiff
path: root/fuzzer/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'fuzzer/CMakeLists.txt')
-rw-r--r--fuzzer/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/fuzzer/CMakeLists.txt b/fuzzer/CMakeLists.txt
new file mode 100644
index 0000000..c0d0205
--- /dev/null
+++ b/fuzzer/CMakeLists.txt
@@ -0,0 +1,18 @@
+if (EXISTS "${EFFCEE_FUZZED_DATA_PROVIDER_DIR}/FuzzedDataProvider.h")
+ message(STATUS "effcee: configuring effcee-fuzz")
+ add_executable(effcee-fuzz effcee_fuzz.cc)
+ effcee_default_compile_options(effcee-fuzz)
+ target_include_directories(effcee-fuzz PRIVATE "${EFFCEE_FUZZED_DATA_PROVIDER_DIR}")
+ target_link_libraries(effcee-fuzz PRIVATE effcee)
+
+ if(UNIX AND NOT MINGW)
+ set_target_properties(effcee-fuzz PROPERTIES LINK_FLAGS -pthread)
+ endif()
+ if (WIN32 AND NOT MSVC)
+ # For MinGW cross-compile, statically link to the C++ runtime
+ set_target_properties(effcee-fuzz PROPERTIES
+ LINK_FLAGS "-static -static-libgcc -static-libstdc++")
+ endif(WIN32 AND NOT MSVC)
+else()
+ message(STATUS "effcee: effcee-fuzz won't be built. Can't find FuzzedDataProvider.h")
+endif()