@@ -21,28 +21,17 @@ target_link_libraries(jsoncpp_test jsoncpp_lib)
21
21
# another way to solve issue #90
22
22
#set_target_properties(jsoncpp_test PROPERTIES COMPILE_FLAGS -ffloat-store)
23
23
24
+ ## Create tests for dashboard submission, allows easy review of CI results https://my.cdash.org/index.php?project=jsoncpp
25
+ add_test (NAME jsoncpp_test
26
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:jsoncpp_test>
27
+ )
28
+ set_target_properties (jsoncpp_test PROPERTIES OUTPUT_NAME jsoncpp_test)
29
+
24
30
# Run unit tests in post-build
25
31
# (default cmake workflow hides away the test result into a file, resulting in poor dev workflow?!?)
26
32
if (JSONCPP_WITH_POST_BUILD_UNITTEST)
27
- if (BUILD_SHARED_LIBS )
28
- # First, copy the shared lib, for Microsoft.
29
- # Then, run the test executable.
30
- add_custom_command (TARGET jsoncpp_test
31
- POST_BUILD
32
- COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:jsoncpp_lib> $<TARGET_FILE_DIR:jsoncpp_test>
33
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:jsoncpp_test>
34
- )
35
- else ()
36
- # Just run the test executable.
37
- add_custom_command (TARGET jsoncpp_test
38
- POST_BUILD
39
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:jsoncpp_test>
40
- )
41
- endif ()
42
- ## Create tests for dashboard submission, allows easy review of CI results https://my.cdash.org/index.php?project=jsoncpp
43
- add_test (NAME jsoncpp_test
33
+ add_custom_command (TARGET jsoncpp_test
34
+ POST_BUILD
44
35
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:jsoncpp_test>
45
36
)
46
37
endif ()
47
-
48
- set_target_properties (jsoncpp_test PROPERTIES OUTPUT_NAME jsoncpp_test)
0 commit comments