CMake: Make simdjson-internal-flags subsume simdjson-flags

This commit is contained in:
Furkan Usta 2020-05-03 02:48:29 +03:00
parent af968c5b44
commit 064eb0b24f
5 changed files with 6 additions and 4 deletions

View File

@ -40,7 +40,7 @@ if(ENABLE_FUZZING)
else () else ()
target_link_libraries(simdjson-fuzzer INTERFACE simdjson) target_link_libraries(simdjson-fuzzer INTERFACE simdjson)
endif () endif ()
target_link_libraries(simdjson-fuzzer INTERFACE simdjson-flags simdjson-internal-flags) target_link_libraries(simdjson-fuzzer INTERFACE simdjson-internal-flags)
target_link_libraries(simdjson-fuzzer INTERFACE ${SIMDJSON_FUZZ_LDFLAGS}) target_link_libraries(simdjson-fuzzer INTERFACE ${SIMDJSON_FUZZ_LDFLAGS})
# Define the fuzzers # Define the fuzzers

View File

@ -36,6 +36,8 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
# #
add_library(simdjson-flags INTERFACE) add_library(simdjson-flags INTERFACE)
add_library(simdjson-internal-flags INTERFACE) add_library(simdjson-internal-flags INTERFACE)
target_link_libraries(simdjson-internal-flags INTERFACE simdjson-flags)
if(MSVC) if(MSVC)
target_compile_options(simdjson-internal-flags INTERFACE /nologo /D_CRT_SECURE_NO_WARNINGS) target_compile_options(simdjson-internal-flags INTERFACE /nologo /D_CRT_SECURE_NO_WARNINGS)
target_compile_options(simdjson-internal-flags INTERFACE /WX /W3 /sdl) target_compile_options(simdjson-internal-flags INTERFACE /WX /W3 /sdl)

View File

@ -93,7 +93,7 @@ add_dependencies(simdjson-singleheader-source amalgamate)
# Test the generated simdjson.cpp/simdjson.h using the generated amalgamate_demo.cpp # Test the generated simdjson.cpp/simdjson.h using the generated amalgamate_demo.cpp
# #
add_executable(amalgamate_demo $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/amalgamate_demo.cpp>) add_executable(amalgamate_demo $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/amalgamate_demo.cpp>)
target_link_libraries(amalgamate_demo simdjson-singleheader-include-source simdjson-internal-flags simdjson-flags) target_link_libraries(amalgamate_demo simdjson-singleheader-include-source simdjson-internal-flags)
add_test(amalgamate_demo amalgamate_demo ${EXAMPLE_JSON} ${EXAMPLE_NDJSON}) add_test(amalgamate_demo amalgamate_demo ${EXAMPLE_JSON} ${EXAMPLE_NDJSON})
install(FILES simdjson.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(FILES simdjson.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

View File

@ -35,7 +35,7 @@ function(add_cpp_test TEST_NAME)
endif() endif()
endfunction() endfunction()
# Most tests need test data, and many need windows headers. # Most tests need test data, and many need windows headers.
link_libraries(simdjson-flags simdjson-internal-flags test-data simdjson-windows-headers) link_libraries(simdjson-internal-flags test-data simdjson-windows-headers)
include(${PROJECT_SOURCE_DIR}/tests/add_cpp_test.cmake) include(${PROJECT_SOURCE_DIR}/tests/add_cpp_test.cmake)

View File

@ -1,4 +1,4 @@
link_libraries(simdjson simdjson-flags simdjson-internal-flags simdjson-windows-headers) link_libraries(simdjson simdjson-internal-flags simdjson-windows-headers)
add_executable(json2json json2json.cpp) add_executable(json2json json2json.cpp)
add_executable(jsonstats jsonstats.cpp) add_executable(jsonstats jsonstats.cpp)