Added opencv_tests and opencv_perf_tests targets to simplify building tests only

This commit is contained in:
Andrey Kamaev 2012-03-02 08:48:33 +00:00
parent 2f4bb580fc
commit aa6c677bd8
2 changed files with 35 additions and 13 deletions

View File

@ -50,4 +50,24 @@ if(BUILD_PERF_TESTS AND PYTHON_EXECUTABLE)
DEPENDS "${OpenCV_SOURCE_DIR}/modules/ts/misc/run.py"
)
endif()
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(perf PROPERTIES FOLDER "tests performance")
endif()
endif()
#-----------------------------------
# spefial targets to build all tests
#-----------------------------------
if(BUILD_TESTS)
add_custom_target(opencv_tests)
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(opencv_tests PROPERTIES FOLDER "tests accuracy")
endif()
endif()
if(BUILD_PERF_TESTS)
add_custom_target(opencv_perf_tests)
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(opencv_perf_tests PROPERTIES FOLDER "tests performance")
endif()
endif()

View File

@ -541,6 +541,7 @@ macro(ocv_add_perf_tests)
add_executable(${the_target} ${OPENCV_PERF_${the_module}_SOURCES})
target_link_libraries(${the_target} ${OPENCV_MODULE_${the_module}_DEPS} ${perf_deps} ${OPENCV_LINKER_LIBS})
add_dependencies(opencv_perf_tests ${the_target})
# Additional target properties
set_target_properties(${the_target} PROPERTIES
@ -591,6 +592,7 @@ macro(ocv_add_accuracy_tests)
add_executable(${the_target} ${OPENCV_TEST_${the_module}_SOURCES})
target_link_libraries(${the_target} ${OPENCV_MODULE_${the_module}_DEPS} ${test_deps} ${OPENCV_LINKER_LIBS})
add_dependencies(opencv_tests ${the_target})
# Additional target properties
set_target_properties(${the_target} PROPERTIES