Home | History | Annotate | Download | only in test_lib_json
      1 
      2 IF(JSONCPP_LIB_BUILD_SHARED)
      3   ADD_DEFINITIONS( -DJSON_DLL )
      4 ENDIF(JSONCPP_LIB_BUILD_SHARED)
      5 
      6 ADD_EXECUTABLE( jsoncpp_test 
      7                 jsontest.cpp
      8                 jsontest.h
      9                 main.cpp
     10                 )
     11 
     12 TARGET_LINK_LIBRARIES(jsoncpp_test jsoncpp_lib)
     13 
     14 # Run unit tests in post-build
     15 # (default cmake workflow hides away the test result into a file, resulting in poor dev workflow?!?)
     16 IF(JSONCPP_WITH_POST_BUILD_UNITTEST)
     17     ADD_CUSTOM_COMMAND( TARGET jsoncpp_test
     18                         POST_BUILD
     19                         COMMAND $<TARGET_FILE:jsoncpp_test>)
     20 ENDIF(JSONCPP_WITH_POST_BUILD_UNITTEST)
     21 
     22 SET_TARGET_PROPERTIES(jsoncpp_test PROPERTIES OUTPUT_NAME jsoncpp_test) 
     23