blob: 02370c966aff7742eab168d5ab47693de6261e5c [file] [log] [blame]
Kostya Serebryany2c1b33b2015-01-29 23:01:07 +00001# Disable the coverage instrumentation for the fuzzer itself.
2set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fsanitize-coverage=0")
Aaron Ballmanef116982015-01-29 16:58:29 +00003if( LLVM_USE_SANITIZE_COVERAGE )
Kostya Serebryany71672552015-01-30 23:26:57 +00004 add_library(LLVMFuzzerNoMain OBJECT
Aaron Ballmanef116982015-01-29 16:58:29 +00005 FuzzerCrossOver.cpp
6 FuzzerIO.cpp
7 FuzzerLoop.cpp
Aaron Ballmanef116982015-01-29 16:58:29 +00008 FuzzerMutate.cpp
Kostya Serebryanydb4d6452015-02-06 19:52:07 +00009 FuzzerSanitizerOptions.cpp
Aaron Ballmanef116982015-01-29 16:58:29 +000010 FuzzerUtil.cpp
11 )
Kostya Serebryany71672552015-01-30 23:26:57 +000012 add_library(LLVMFuzzer STATIC
13 FuzzerMain.cpp
14 $<TARGET_OBJECTS:LLVMFuzzerNoMain>
15 )
Aaron Ballmanef116982015-01-29 16:58:29 +000016
17 if( LLVM_INCLUDE_TESTS )
18 add_subdirectory(test)
19 endif()
20endif()