themeeditor: only add -Wsfinae-incomplete if compiler supports it
rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Sun, 19 Jul 2026 06:17:57 -0400
| Newsgroups | gmane.comp.systems.archos.rockbox.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 0ca801dffa41a1b5112338f1de37cce3c1171482 Author: Aidan MacDonald <[email protected]> Date: Sun Jul 19 09:23:36 2026 +0100 themeeditor: only add -Wsfinae-incomplete if compiler supports it This flag was added in GCC 16; older versions of GCC don't accept it and don't produce the warning, so they don't need any special handling. Change-Id: I13fcba07cafe0b4133de8b03ede681d2454249e4 diff --git a/utils/themeeditor/CMakeLists.txt b/utils/themeeditor/CMakeLists.txt index 5608ecf13e..8493793d71 100644 --- a/utils/themeeditor/CMakeLists.txt +++ b/utils/themeeditor/CMakeLists.txt @@ -122,7 +122,10 @@ target_compile_definitions(RockboxThemeEditor PRIVATE FINDREPLACE_NOLIB) # This is an issue with the code produced by QT's MOC if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") -target_compile_options(RockboxThemeEditor PRIVATE -Wsfinae-incomplete=0) + check_cxx_compiler_flag(-Wsfinae-incomplete=0 HAVE_SFINAE_INCOMPLETE) + if (HAVE_SFINAE_INCOMPLETE) + target_compile_options(RockboxThemeEditor PRIVATE -Wsfinae-incomplete=0) + endif() endif() if(APPLE) -- rockbox-cvs mailing list [email protected] https://lists.haxx.se/mailman/listinfo/rockbox-cvs