"$<TARGET_FILE:${_target}>"
"${_prm_file}"
)
+ ELSEIF( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_test_name}.json")
+ # the same as above but for json files
+ SET(_json_file "${CMAKE_CURRENT_SOURCE_DIR}/${_test_name}.json")
+ IF(NOT "${TEST_TARGET_${_build}}" STREQUAL "")
+ SET(_target ${TEST_TARGET_${_build}})
+ ELSEIF(NOT "${TEST_TARGET}" STREQUAL "")
+ SET(_target ${TEST_TARGET})
+ ELSE()
+ MESSAGE(FATAL_ERROR
+ "\nFor ${_comparison_file}: \"${_test_name}.json\" provided, "
+ "but neither \"\${TEST_TARGET}\", nor \"\${TEST_TARGET_${_build}}"
+ "\" is defined.\n\n"
+ )
+ ENDIF()
+ SET(_run_args
+ "$<TARGET_FILE:${_target}>"
+ "${_json_file}"
+ )
ELSE()
MESSAGE(FATAL_ERROR
"\nFor ${_comparison_file}: Neither \"${_test_name}.cc\", "
variable) is invoked with the path of <code>my_test_2.prm</code> as
first argument. Again, its screen output is compared against
<code>my_test_2.output</code>
+ <pre>
+my_test_3.json
+my_test_3.output</pre>
+ Just like in the last case, an already built executable (that is defined by a CMake
+ variable) is invoked with the path of <code>my_test_3.json</code> as
+ first argument. Again, its screen output is compared against
+ <code>my_test_3.output</code>
</p>
<a name="examples"></a>