apps: qcam: Fix clang build
While gcc ignores attempts to disable unknown warnings, clang does not
(`-Wunknown-warning-option`), thus compilation fails due to the recent
addition of `-Wno-sfinae-incomplete`. So only add it conditionally.
Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
Fixes: aa2a0812e6 ("apps: qcam: Disable -Wsfinae-incomplete")
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -40,7 +40,6 @@ qt6_cpp_args = [
|
||||
apps_cpp_args,
|
||||
'-DQT_NO_KEYWORDS',
|
||||
'-Wno-extra-semi',
|
||||
'-Wno-sfinae-incomplete',
|
||||
]
|
||||
|
||||
# gcc 12 and 13 output a false positive variable shadowing warning with Qt
|
||||
@@ -50,6 +49,10 @@ if qt6_dep.version().version_compare('>=6.9.0') and \
|
||||
qt6_cpp_args += ['-Wno-shadow']
|
||||
endif
|
||||
|
||||
if cxx.get_id() == 'gcc' and cxx.version().version_compare('>=16')
|
||||
qt6_cpp_args += ['-Wno-sfinae-incomplete']
|
||||
endif
|
||||
|
||||
resources = qt6.preprocess(moc_headers : qcam_moc_headers,
|
||||
qresources : qcam_resources,
|
||||
dependencies : qt6_dep)
|
||||
|
||||
Reference in New Issue
Block a user