rewrite add_test command for accuracy tests:
* use new syntax introduced in CMake 2.8.0 * set OPENCV_TEST_DATA_PATH enviroment property
This commit is contained in:
parent
07bd58a0e8
commit
0c57dc2e00
@ -812,11 +812,15 @@ function(ocv_add_accuracy_tests)
|
|||||||
set_target_properties(${the_target} PROPERTIES FOLDER "tests accuracy")
|
set_target_properties(${the_target} PROPERTIES FOLDER "tests accuracy")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
enable_testing()
|
|
||||||
get_target_property(LOC ${the_target} LOCATION)
|
|
||||||
add_test(${the_target} "${LOC}")
|
|
||||||
|
|
||||||
ocv_add_precompiled_headers(${the_target})
|
ocv_add_precompiled_headers(${the_target})
|
||||||
|
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER "2.8" AND OPENCV_TEST_DATA_PATH)
|
||||||
|
add_test(NAME ${the_target} COMMAND ${the_target})
|
||||||
|
|
||||||
|
set_tests_properties(${the_target} PROPERTIES
|
||||||
|
ENVIRONMENT "OPENCV_TEST_DATA_PATH=${OPENCV_TEST_DATA_PATH}")
|
||||||
|
endif()
|
||||||
|
|
||||||
else(OCV_DEPENDENCIES_FOUND)
|
else(OCV_DEPENDENCIES_FOUND)
|
||||||
# TODO: warn about unsatisfied dependencies
|
# TODO: warn about unsatisfied dependencies
|
||||||
endif(OCV_DEPENDENCIES_FOUND)
|
endif(OCV_DEPENDENCIES_FOUND)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user