blob: 81e51d1a7cc2ae567975c3a9bcdbddabf7912349 [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
Kostya Serebryany016852c2015-02-19 18:45:37 +00006 FuzzerDriver.cpp
Aaron Ballmanef116982015-01-29 16:58:29 +00007 FuzzerIO.cpp
8 FuzzerLoop.cpp
Aaron Ballmanef116982015-01-29 16:58:29 +00009 FuzzerMutate.cpp
Kostya Serebryanydb4d6452015-02-06 19:52:07 +000010 FuzzerSanitizerOptions.cpp
Aaron Ballmanef116982015-01-29 16:58:29 +000011 FuzzerUtil.cpp
12 )
Kostya Serebryany71672552015-01-30 23:26:57 +000013 add_library(LLVMFuzzer STATIC
14 FuzzerMain.cpp
15 $<TARGET_OBJECTS:LLVMFuzzerNoMain>
16 )
Aaron Ballmanef116982015-01-29 16:58:29 +000017
18 if( LLVM_INCLUDE_TESTS )
19 add_subdirectory(test)
20 endif()
21endif()