[oe] [meta-oe][PATCH] opencv: Fix build with gcc 6.0

Ricardo Ribalda Delgado ricardo.ribalda at gmail.com
Fri Aug 5 16:54:19 UTC 2016


Hi Raj

On Fri, Aug 5, 2016 at 6:44 PM, Khem Raj <raj.khem at gmail.com> wrote:
>
>> +
>> +diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
>> +index 3a23cd73633d..1fea1578b1d9 100644
>> +--- a/cmake/OpenCVUtils.cmake
>> ++++ b/cmake/OpenCVUtils.cmake
>> +@@ -76,7 +76,11 @@ function(ocv_include_directories)
>> +     if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}")
>> +       list(APPEND __add_before "${dir}")
>> +     else()
>> +-      include_directories(AFTER SYSTEM "${dir}")
>> ++        if (gcc_compiler_version VERSION_LESS "6.0.0")
>> ++                include_directories(AFTER SYSTEM "${dir}")
>> ++        else()
>> ++                include_directories(AFTER "${dir}")
>> ++        endif()
>
> I would rather prefer to see if need for -isystem can be completely removed.

I googled a bit, and they use -isystem to avoid that warnings from
system files scalate into build errors :S.
I prefer only modify the build with the compilers that crashes and for
the others keep the upstream behaviour.


Regards!



More information about the Openembedded-devel mailing list