2018-12-31 10:00:19 +08:00
|
|
|
if(MSVC)
|
2019-03-05 05:07:06 +08:00
|
|
|
target_include_directories(${SIMDJSON_LIB_NAME}
|
|
|
|
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/windows>
|
|
|
|
)
|
2018-12-31 10:00:19 +08:00
|
|
|
endif()
|
2018-12-29 02:04:38 +08:00
|
|
|
|
2019-05-09 10:33:11 +08:00
|
|
|
add_cpp_test(basictests)
|
2018-12-29 02:04:38 +08:00
|
|
|
add_cpp_test(jsoncheck)
|
2019-07-27 06:38:10 +08:00
|
|
|
add_cpp_test(pointercheck)
|
2019-02-28 10:04:06 +08:00
|
|
|
|
2019-07-05 05:19:05 +08:00
|
|
|
## This causes problems
|
|
|
|
# add_executable(singleheader ./singleheadertest.cpp ${PROJECT_SOURCE_DIR}/singleheader/simdjson.cpp)
|
|
|
|
# target_compile_definitions(singleheader PRIVATE JSON_TEST_PATH="${PROJECT_SOURCE_DIR}/jsonexamples/twitter.json")
|
|
|
|
# target_link_libraries(singleheader ${SIMDJSON_LIB_NAME})
|
2019-08-05 03:41:00 +08:00
|
|
|
# add_test(singleheader singleheader)
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
add_custom_command(TARGET basictests POST_BUILD # Adds a post-build event
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:simdjson>"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E echo "$<TARGET_FILE_DIR:basictests>"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake -E copy_if_different..."
|
|
|
|
"$<TARGET_FILE:simdjson>" # <--this is in-file
|
|
|
|
"$<TARGET_FILE_DIR:basictests>") # <--this is out-file path
|
|
|
|
endif()
|
|
|
|
|