mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Add link dependency to fix tests link error when ENABLE_CJSON_UTILS is ON
This commit is contained in:
parent
62bc2e3432
commit
19ff92da79
@ -102,6 +102,9 @@ if(ENABLE_CJSON_TEST)
|
|||||||
foreach (cjson_utils_test ${cjson_utils_tests})
|
foreach (cjson_utils_test ${cjson_utils_tests})
|
||||||
add_executable("${cjson_utils_test}" "${cjson_utils_test}.c")
|
add_executable("${cjson_utils_test}" "${cjson_utils_test}.c")
|
||||||
target_link_libraries("${cjson_utils_test}" "${CJSON_LIB}" "${CJSON_UTILS_LIB}" unity)
|
target_link_libraries("${cjson_utils_test}" "${CJSON_LIB}" "${CJSON_UTILS_LIB}" unity)
|
||||||
|
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
target_sources(${cjson_utils_test} PRIVATE unity_setup.c)
|
||||||
|
endif()
|
||||||
if(MEMORYCHECK_COMMAND)
|
if(MEMORYCHECK_COMMAND)
|
||||||
add_test(NAME "${cjson_utils_test}"
|
add_test(NAME "${cjson_utils_test}"
|
||||||
COMMAND "${MEMORYCHECK_COMMAND}" ${MEMORYCHECK_COMMAND_OPTIONS} "${CMAKE_CURRENT_BINARY_DIR}/${cjson_utils_test}")
|
COMMAND "${MEMORYCHECK_COMMAND}" ${MEMORYCHECK_COMMAND_OPTIONS} "${CMAKE_CURRENT_BINARY_DIR}/${cjson_utils_test}")
|
||||||
|
Loading…
Reference in New Issue
Block a user