1
0
mirror of https://github.com/nlohmann/json synced 2024-11-30 15:40:07 +00:00
nlohmannjson/test/CMakeLists.txt

56 lines
1.7 KiB
CMake
Raw Normal View History

# The unit test executable.
set(JSON_UNITTEST_TARGET_NAME "json_unit")
add_executable(${JSON_UNITTEST_TARGET_NAME}
"src/catch.hpp"
"src/unit.cpp"
"src/unit-algorithms.cpp"
"src/unit-allocator.cpp"
"src/unit-capacity.cpp"
"src/unit-class_const_iterator.cpp"
"src/unit-class_iterator.cpp"
"src/unit-class_lexer.cpp"
"src/unit-class_parser.cpp"
"src/unit-comparison.cpp"
"src/unit-concepts.cpp"
2016-08-04 20:51:08 +00:00
"src/unit-constructor1.cpp"
"src/unit-constructor2.cpp"
"src/unit-convenience.cpp"
"src/unit-conversions.cpp"
"src/unit-deserialization.cpp"
2016-08-04 20:51:08 +00:00
"src/unit-element_access1.cpp"
"src/unit-element_access2.cpp"
"src/unit-inspection.cpp"
"src/unit-iterator_wrapper.cpp"
2016-08-04 20:51:08 +00:00
"src/unit-iterators1.cpp"
"src/unit-iterators2.cpp"
"src/unit-json_patch.cpp"
"src/unit-json_pointer.cpp"
"src/unit-modifiers.cpp"
"src/unit-pointer_access.cpp"
"src/unit-readme.cpp"
"src/unit-reference_access.cpp"
"src/unit-regression.cpp"
"src/unit-serialization.cpp"
"src/unit-testsuites.cpp"
"src/unit-unicode.cpp"
)
set_target_properties(${JSON_UNITTEST_TARGET_NAME} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
2016-08-17 19:38:19 +00:00
#COMPILE_DEFINITIONS "$<$<CXX_COMPILER_ID:MSVC>:_SCL_SECURE_NO_WARNINGS>"
2016-08-17 19:44:53 +00:00
COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:MSVC>:/EHsc;/Wall;$<$<CONFIG:Release>:/Od>>"
)
target_include_directories(${JSON_UNITTEST_TARGET_NAME} PRIVATE "src")
target_link_libraries(${JSON_UNITTEST_TARGET_NAME} ${JSON_TARGET_NAME})
add_test(NAME "${JSON_UNITTEST_TARGET_NAME}_default"
COMMAND ${JSON_UNITTEST_TARGET_NAME}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_test(NAME "${JSON_UNITTEST_TARGET_NAME}_all"
COMMAND ${JSON_UNITTEST_TARGET_NAME} "*"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)