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)