diff --git a/src/test_lib_json/CMakeLists.txt b/src/test_lib_json/CMakeLists.txt index 060208c..c2636f6 100644 --- a/src/test_lib_json/CMakeLists.txt +++ b/src/test_lib_json/CMakeLists.txt @@ -1,6 +1,6 @@ # vim: et ts=4 sts=4 sw=4 tw=0 -ADD_EXECUTABLE(jsoncpp_test +add_executable(jsoncpp_test jsontest.cpp jsontest.h fuzz.cpp @@ -8,22 +8,22 @@ ADD_EXECUTABLE(jsoncpp_test main.cpp ) -TARGET_LINK_LIBRARIES(jsoncpp_test PRIVATE jsoncpp::framework) +target_link_libraries(jsoncpp_test PRIVATE jsoncpp::framework) # another way to solve issue #90 #set_target_properties(jsoncpp_test PROPERTIES COMPILE_FLAGS -ffloat-store) ## Create tests for dashboard submission, allows easy review of CI results https://my.cdash.org/index.php?project=jsoncpp -ADD_TEST(NAME jsoncpp_test +add_test(NAME jsoncpp_test COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ) -SET_TARGET_PROPERTIES(jsoncpp_test PROPERTIES OUTPUT_NAME jsoncpp_test) +set_target_properties(jsoncpp_test PROPERTIES OUTPUT_NAME jsoncpp_test) # Run unit tests in post-build # (default cmake workflow hides away the test result into a file, resulting in poor dev workflow?!?) -IF (JSONCPP_WITH_POST_BUILD_UNITTEST) - ADD_CUSTOM_COMMAND(TARGET jsoncpp_test +if (JSONCPP_WITH_POST_BUILD_UNITTEST) + add_custom_command(TARGET jsoncpp_test POST_BUILD COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ) -ENDIF () +endif ()