Introduce structure to the test/ directory
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...
This commit is contained in:
parent
4e6aacda36
commit
af76508fe7
87 changed files with 103 additions and 98 deletions
|
|
@ -22,17 +22,7 @@ target_include_directories(${JSON_TARGET_NAME} INTERFACE
|
|||
|
||||
# create and configure the unit test target
|
||||
if (BuildTests)
|
||||
add_executable(json_unit
|
||||
"test/catch.hpp"
|
||||
"test/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 "test")
|
||||
target_link_libraries(json_unit ${JSON_TARGET_NAME})
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
# generate a config and config version file for the package
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue