cJSON

mirror of Dave's cJSON
git clone git://git.thc420.xyz/cJSON
Log | Files | Refs | README | LICENSE

commit 465352fb9987d3a4713963c61f6dc0b566abf1cd
parent 62bc2e3432d097d87872df5e88e17143f264629a
Author: Max Bruckner <max@maxbruckner.de>
Date:   Sat, 11 May 2019 12:06:26 +0200

Merge pull request #352 from tan-wei/master

Add link dependency to fix tests link error when ENABLE_CJSON_UTILS is ON
Diffstat:
Mtests/CMakeLists.txt | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt @@ -102,6 +102,9 @@ if(ENABLE_CJSON_TEST) foreach (cjson_utils_test ${cjson_utils_tests}) add_executable("${cjson_utils_test}" "${cjson_utils_test}.c") 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) add_test(NAME "${cjson_utils_test}" COMMAND "${MEMORYCHECK_COMMAND}" ${MEMORYCHECK_COMMAND_OPTIONS} "${CMAKE_CURRENT_BINARY_DIR}/${cjson_utils_test}")