Merge pull request #14222 from alalek:cmake_remove_test_include_dirs

pull/14234/head
Alexander Alekhin 6 years ago
commit 3ca6a72457
  1. 4
      cmake/OpenCVModule.cmake
  2. 1
      cmake/OpenCVPCHSupport.cmake

@ -1145,7 +1145,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})
@ -1227,7 +1227,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…
Cancel
Save