diff options
author | Justin Bogner <mail@justinbogner.com> | 2017-08-31 00:36:33 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2017-08-31 00:36:33 +0000 |
commit | 33a778823ba743242b7332a8608ec084e4319d3f (patch) | |
tree | 8844f6f95a88bd426ab7b27188f14d9bce32f01d /tools/llvm-mc-disassemble-fuzzer | |
parent | cb4a5a0eb41d0a2e3273bdf699ec598f86b4c740 (diff) |
cmake: Invent add_llvm_fuzzer to set up fuzzer targets
This moves the cmake configuration for fuzzers in LLVM to a new macro,
add_llvm_fuzzer. This will make it easier to keep things consistent
while implementing llvm.org/pr34314.
I've also made a couple of minor functional changes here:
- the fuzzers now use add_llvm_executable rather than add_llvm_tool.
This means they won't create install targets and stuff like that,
because those made little sense for these fuzzers.
- I've grouped these under "Fuzzers" rather than in with "Tools" for
people who build with IDEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc-disassemble-fuzzer')
-rw-r--r-- | tools/llvm-mc-disassemble-fuzzer/CMakeLists.txt | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/tools/llvm-mc-disassemble-fuzzer/CMakeLists.txt b/tools/llvm-mc-disassemble-fuzzer/CMakeLists.txt index 4371cf68a73..60b08062d09 100644 --- a/tools/llvm-mc-disassemble-fuzzer/CMakeLists.txt +++ b/tools/llvm-mc-disassemble-fuzzer/CMakeLists.txt @@ -1,16 +1,11 @@ -if( LLVM_USE_SANITIZE_COVERAGE ) - - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer") - set(LLVM_LINK_COMPONENTS - AllTargetsAsmPrinters - AllTargetsDescs - AllTargetsDisassemblers - AllTargetsInfos - MC - MCDisassembler - MCParser - Support - ) - add_llvm_tool(llvm-mc-disassemble-fuzzer - llvm-mc-disassemble-fuzzer.cpp) -endif() +set(LLVM_LINK_COMPONENTS + AllTargetsAsmPrinters + AllTargetsDescs + AllTargetsDisassemblers + AllTargetsInfos + MC + MCDisassembler + MCParser + Support +) +add_llvm_fuzzer(llvm-mc-disassemble-fuzzer llvm-mc-disassemble-fuzzer.cpp) |