34 lines
580 B
CMake
34 lines
580 B
CMake
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)
|
|
|