mirror of
https://github.com/opencv/opencv.git
synced 2026-09-13 05:42:51 -05:00
cmake: disable checks for protobuf generated files
This commit is contained in:
@@ -565,6 +565,24 @@ macro(ocv_append_build_options var_prefix pkg_prefix)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
function(ocv_append_source_files_cxx_compiler_options files_var)
|
||||
set(__flags "${ARGN}")
|
||||
ocv_check_flag_support(CXX "${__flags}" __HAVE_COMPILER_OPTIONS_VAR "")
|
||||
if(${__HAVE_COMPILER_OPTIONS_VAR})
|
||||
foreach(source ${${files_var}})
|
||||
if("${source}" MATCHES "\\.(cpp|cc|cxx)$")
|
||||
get_source_file_property(flags "${source}" COMPILE_FLAGS)
|
||||
if(flags)
|
||||
set(flags "${flags} ${__flags}")
|
||||
else()
|
||||
set(flags "${__flags}")
|
||||
endif()
|
||||
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${flags}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Usage is similar to CMake 'pkg_check_modules' command
|
||||
# It additionally controls HAVE_${define} and ${define}_${modname}_FOUND variables
|
||||
macro(ocv_check_modules define)
|
||||
|
||||
Reference in New Issue
Block a user