mirror of
https://github.com/opencv/opencv.git
synced 2025-06-10 19:24:07 +08:00
Merge pull request #16756 from alalek:cmake_opencv_test_extra_compile_options
This commit is contained in:
commit
3a99ebb446
@ -1111,6 +1111,8 @@ macro(__ocv_parse_test_sources tests_type)
|
|||||||
unset(__currentvar)
|
unset(__currentvar)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
ocv_check_environment_variables(OPENCV_TEST_EXTRA_CXX_FLAGS_Release)
|
||||||
|
|
||||||
# this is a command for adding OpenCV performance tests to the module
|
# this is a command for adding OpenCV performance tests to the module
|
||||||
# ocv_add_perf_tests(<extra_dependencies>)
|
# ocv_add_perf_tests(<extra_dependencies>)
|
||||||
function(ocv_add_perf_tests)
|
function(ocv_add_perf_tests)
|
||||||
@ -1257,6 +1259,10 @@ function(ocv_add_accuracy_tests)
|
|||||||
_ocv_add_precompiled_headers(${the_target})
|
_ocv_add_precompiled_headers(${the_target})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(OPENCV_TEST_EXTRA_CXX_FLAGS_Release)
|
||||||
|
target_compile_options(${the_target} PRIVATE "$<$<CONFIG:Release>:${OPENCV_TEST_EXTRA_CXX_FLAGS_Release}>")
|
||||||
|
endif()
|
||||||
|
|
||||||
ocv_add_test_from_target("${the_target}" "Accuracy" "${the_target}")
|
ocv_add_test_from_target("${the_target}" "Accuracy" "${the_target}")
|
||||||
else(OCV_DEPENDENCIES_FOUND)
|
else(OCV_DEPENDENCIES_FOUND)
|
||||||
# TODO: warn about unsatisfied dependencies
|
# TODO: warn about unsatisfied dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user