Flesh out the repository with example and tests
This commit is contained in:
parent
546eaa5d4d
commit
05c45bbc81
8 changed files with 165 additions and 57 deletions
34
tests/CMakeLists.txt
Normal file
34
tests/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
Unity
|
||||
GIT_REPOSITORY https://github.com/ThrowTheSwitch/Unity.git
|
||||
GIT_TAG v2.6.1
|
||||
)
|
||||
FetchContent_MakeAvailable(Unity)
|
||||
|
||||
add_executable(
|
||||
json_test
|
||||
json_test.c
|
||||
)
|
||||
set_target_properties(
|
||||
json_test
|
||||
PROPERTIES
|
||||
C_STANDARD 23
|
||||
C_STANDARD_REQUIRED ON
|
||||
C_EXTENSIONS OFF
|
||||
)
|
||||
target_link_libraries(
|
||||
json_test
|
||||
PRIVATE
|
||||
json
|
||||
unity::framework
|
||||
)
|
||||
target_include_directories(
|
||||
json_test
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_test(NAME json_test COMMAND json_test)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue