follow-up: build with Qt6 support on Linux with Qt 6.1

1d3178a quieted the g++ build, but made the warnings even
worse with a clang build.

The addition of the -Wno-sfinae-incomplete caused an unrecognized
option warning using recent clang.

Recent clang build with Qt6.1 also caused several warnings
during the processing of the Qt6.1 header files related to
c++26-extensions.

This adds (under Linux) -Wnoc++-26-extensions to the clang++
command line to quiet those warnings and restricts the
-Wno-sfinae-incomplete command line option to the g++ build.
This commit is contained in:
nhmall
2026-08-06 10:05:27 -04:00
parent e0ecf0e5f2
commit 15cfe90d62
2 changed files with 8 additions and 4 deletions
+6 -3
View File
@@ -138,9 +138,6 @@ CCXXFLAGS+=-Wall -Wextra -Wno-missing-field-initializers \
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
CCXXFLAGS+=-pedantic
CCXXFLAGS+=-Wmissing-declarations
ifdef ADDITIONAL_NO_WARN
CCXXFLAGS+=$(ADDITIONAL_NO_WARN)
endif
#detection of clang++ vs g++
CXXISCLANG := $(shell echo `$(CXX) --version` | grep clang)
ifeq "$(CXXISCLANG)" ""
@@ -179,6 +176,9 @@ else # g++ version greater than or equal to 9? (no follows)
CCXX=g++ -std=c++17
endif # g++ version greater than or equal to 9
endif # CPLUSPLUS_NEED20
ifdef ADDITIONAL_NO_WARN_GPPCCX
CCXXFLAGS+=$(ADDITIONAL_NO_WARN_GPPCCX)
endif
else # g++ or clang++ ?
@@ -219,6 +219,9 @@ ifeq "$(CLANGPPGTEQ17)" "1"
CCXX=clang++ -std=c++20
endif # clang++ greater than or equal to 17
endif # CPLUSPLUS_NEED20
ifdef ADDITIONAL_NO_WARN_CLANGCCX
CCXXFLAGS+=$(ADDITIONAL_NO_WARN_CLANGCCX)
endif
endif # end of clang++-specific section
CXX=$(CCXX)
endif # CPLUSPLUS_NEEDED
+2 -1
View File
@@ -77,7 +77,8 @@ USE_NOSTATICFN = 1
#QT6 prior to compiler include
ifdef WANT_WIN_QT6
CPLUSPLUS_NEED20=1
ADDITIONAL_NO_WARN=-Wno-sfinae-incomplete
ADDITIONAL_NO_WARN_GPPCCX=-Wno-sfinae-incomplete
ADDITIONAL_NO_WARN_CLANGCCX=-Wno-c++26-extensions
endif # WANT_WIN_QT6
# compiler.500 contains compiler detection and adjustments common