CMake: Link simdjson-fuzzer to simdjson-source as before

simdjson target adds extra definitions which MSVC doesn't like
This commit is contained in:
Furkan Usta 2020-05-02 05:21:57 +03:00
parent 293c104cc4
commit 71e0148eb4
1 changed files with 4 additions and 1 deletions

View File

@ -34,10 +34,13 @@ if(ENABLE_FUZZING)
# Fuzzer build flags and libraries
add_library(simdjson-fuzzer INTERFACE)
target_link_libraries(simdjson-fuzzer INTERFACE simdjson)
if (SIMDJSON_FUZZ_LINKMAIN)
target_link_libraries(simdjson-fuzzer INTERFACE simdjson-source)
target_sources(simdjson-fuzzer INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/main.cpp)
else ()
target_link_libraries(simdjson-fuzzer INTERFACE simdjson)
endif ()
target_link_libraries(simdjson-fuzzer INTERFACE simdjson-flags simdjson-private-flags)
target_link_libraries(simdjson-fuzzer INTERFACE ${SIMDJSON_FUZZ_LDFLAGS})
# Define the fuzzers