2015-01-29 23:01:07 +00:00
|
|
|
# Disable the coverage instrumentation for the fuzzer itself.
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fsanitize-coverage=0")
|
2015-01-29 16:58:29 +00:00
|
|
|
if( LLVM_USE_SANITIZE_COVERAGE )
|
2015-01-30 23:26:57 +00:00
|
|
|
add_library(LLVMFuzzerNoMain OBJECT
|
2015-01-29 16:58:29 +00:00
|
|
|
FuzzerCrossOver.cpp
|
|
|
|
FuzzerIO.cpp
|
|
|
|
FuzzerLoop.cpp
|
|
|
|
FuzzerMutate.cpp
|
2015-02-06 19:52:07 +00:00
|
|
|
FuzzerSanitizerOptions.cpp
|
2015-01-29 16:58:29 +00:00
|
|
|
FuzzerUtil.cpp
|
|
|
|
)
|
2015-01-30 23:26:57 +00:00
|
|
|
add_library(LLVMFuzzer STATIC
|
|
|
|
FuzzerMain.cpp
|
|
|
|
$<TARGET_OBJECTS:LLVMFuzzerNoMain>
|
|
|
|
)
|
2015-01-29 16:58:29 +00:00
|
|
|
|
|
|
|
if( LLVM_INCLUDE_TESTS )
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
|
|
|
endif()
|