add CTest support to build tree
This commit is contained in:
@@ -1008,6 +1008,12 @@ function(ocv_add_perf_tests)
|
||||
if(NOT BUILD_opencv_world)
|
||||
_ocv_add_precompiled_headers(${the_target})
|
||||
endif()
|
||||
|
||||
ocv_add_test_from_target("${the_target}" "Performance" "${the_target}")
|
||||
ocv_add_test_from_target("opencv_sanity_${name}" "Sanity" "${the_target}"
|
||||
"--perf_min_samples=1"
|
||||
"--perf_force_samples=1"
|
||||
"--perf_verify_sanity")
|
||||
else(OCV_DEPENDENCIES_FOUND)
|
||||
# TODO: warn about unsatisfied dependencies
|
||||
endif(OCV_DEPENDENCIES_FOUND)
|
||||
@@ -1068,21 +1074,11 @@ function(ocv_add_accuracy_tests)
|
||||
set_target_properties(${the_target} PROPERTIES FOLDER "tests accuracy")
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
get_target_property(LOC ${the_target} LOCATION)
|
||||
add_test(${the_target} "${LOC}")
|
||||
|
||||
if(WINRT)
|
||||
# removing APPCONTAINER from tests to run from console
|
||||
# look for detailed description inside of ocv_create_module macro above
|
||||
add_custom_command(TARGET "opencv_test_${name}"
|
||||
POST_BUILD
|
||||
COMMAND link.exe /edit /APPCONTAINER:NO $(TargetPath))
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_opencv_world)
|
||||
_ocv_add_precompiled_headers(${the_target})
|
||||
endif()
|
||||
|
||||
ocv_add_test_from_target("${the_target}" "Accuracy" "${the_target}")
|
||||
else(OCV_DEPENDENCIES_FOUND)
|
||||
# TODO: warn about unsatisfied dependencies
|
||||
endif(OCV_DEPENDENCIES_FOUND)
|
||||
|
Reference in New Issue
Block a user