summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAdam Reichold <adam.reichold@t-online.de>2018-09-01 11:53:03 +0200
committerAlbert Astals Cid <tsdgeos@yahoo.es>2018-10-25 09:10:42 +0000
commitf235a53673abdd6cf6c2f69ba63a64fccb258b36 (patch)
treeb5f758ef395542a579f1ab5ae8541aa9f7b2d78f /CMakeLists.txt
parentc5cdf0cc01e9e61e3e4553d3e388a47ec5b41281 (diff)
Add fuzzer target from oss-fuzz project and integrate it into the build system via FUZZER CMake variable.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ad655bf..9c4753e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,9 +24,15 @@ CHECK_FILE_OFFSET_BITS()
include(GNUInstallDirs)
+set(ENABLE_FUZZER FALSE)
+
find_package (ECM 1.6.0 QUIET NO_MODULE)
if (ECM_FOUND)
include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake")
+
+ if(ECM_ENABLE_SANITIZERS MATCHES fuzzer)
+ set(ENABLE_FUZZER TRUE)
+ endif()
endif()
set(POPPLER_MAJOR_VERSION "0")
@@ -303,12 +309,10 @@ else()
set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS} ${CMAKE_CXX_FLAGS}")
endif()
-
include(ConfigureChecks.cmake)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(poppler/poppler-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h)
-
set(poppler_SRCS
goo/gfile.cc
goo/GooTimer.cc
@@ -717,6 +721,7 @@ show_end_message_yesno("use curl" ENABLE_LIBCURL)
show_end_message_yesno("use libopenjpeg2" WITH_OPENJPEG)
show_end_message_yesno("use lcms2" USE_CMS)
show_end_message_yesno("command line utils" ENABLE_UTILS)
+show_end_message_yesno("fuzz target" ENABLE_FUZZER)
show_end_message("test data dir" ${TESTDATADIR})
if(NOT ENABLE_SPLASH AND NOT CAIRO_FOUND)