mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 01:53:19 +08:00
cmake: don't add tests dirs as include directories
- use relative paths for includes - fix PCH generation with GCC (dummy file has been used)
This commit is contained in:
parent
b4e2c99346
commit
3d7a3a51a7
@ -1148,7 +1148,7 @@ function(ocv_add_perf_tests)
|
||||
|
||||
source_group("Src" FILES "${${the_target}_pch}")
|
||||
ocv_add_executable(${the_target} ${OPENCV_PERF_${the_module}_SOURCES} ${${the_target}_pch})
|
||||
ocv_target_include_modules(${the_target} ${perf_deps} "${perf_path}")
|
||||
ocv_target_include_modules(${the_target} ${perf_deps})
|
||||
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${perf_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_PERF_${the_module}_DEPS})
|
||||
add_dependencies(opencv_perf_tests ${the_target})
|
||||
|
||||
@ -1239,7 +1239,7 @@ function(ocv_add_accuracy_tests)
|
||||
|
||||
source_group("Src" FILES "${${the_target}_pch}")
|
||||
ocv_add_executable(${the_target} ${OPENCV_TEST_${the_module}_SOURCES} ${${the_target}_pch})
|
||||
ocv_target_include_modules(${the_target} ${test_deps} "${test_path}")
|
||||
ocv_target_include_modules(${the_target} ${test_deps})
|
||||
if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/test")
|
||||
ocv_target_include_directories(${the_target} "${CMAKE_CURRENT_BINARY_DIR}/test")
|
||||
endif()
|
||||
|
@ -261,6 +261,7 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
|
||||
)
|
||||
|
||||
_PCH_GET_COMPILE_FLAGS(_compile_FLAGS)
|
||||
list(APPEND _compile_FLAGS "${_PCH_include_prefix}\"${_path}\"")
|
||||
|
||||
get_target_property(type ${_targetName} TYPE)
|
||||
if(type STREQUAL "SHARED_LIBRARY")
|
||||
|
Loading…
Reference in New Issue
Block a user