mirror of
https://github.com/nlohmann/json.git
synced 2024-07-16 11:23:07 +02:00
This introduces a clear separation between test data and test binaries. Test data is moved into test/data, and the test binaries move into test/src. A new CMake script specific to building the tests is introduced in /test to slightly clean up the toplevel one. As well as tidying things up, this makes the next step trivial...
16 lines
452 B
CMake
16 lines
452 B
CMake
# The unit test executable.
|
|
add_executable(json_unit
|
|
"src/catch.hpp"
|
|
"src/unit.cpp"
|
|
)
|
|
|
|
set_target_properties(json_unit PROPERTIES
|
|
CXX_STANDARD 11
|
|
CXX_STANDARD_REQUIRED ON
|
|
COMPILE_DEFINITIONS "$<$<CXX_COMPILER_ID:MSVC>:_SCL_SECURE_NO_WARNINGS>"
|
|
COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>"
|
|
)
|
|
|
|
target_include_directories(json_unit PRIVATE "src")
|
|
target_link_libraries(json_unit ${JSON_TARGET_NAME})
|