diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 2f66fb3cc42..58fa08b56ab 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -57,6 +57,12 @@ set(CMAKE_AUTORCC OFF) configure_file(bitcoin_locale.qrc bitcoin_locale.qrc USE_SOURCE_PERMISSIONS COPYONLY) qt6_add_resources(BITCOIN_QRC bitcoin.qrc) qt6_add_resources(BITCOIN_LOCALE_QRC ${CMAKE_CURRENT_BINARY_DIR}/bitcoin_locale.qrc) +# See: https://bugreports.qt.io/browse/QTBUG-141858. +get_target_property(warn_flags warn_interface INTERFACE_COMPILE_OPTIONS) +if("-Wtrailing-whitespace=any" IN_LIST warn_flags) + set_source_files_properties(${BITCOIN_QRC} ${BITCOIN_LOCALE_QRC} PROPERTIES COMPILE_OPTIONS -Wno-trailing-whitespace) +endif() +unset(warn_flags) # The bitcoinqt sources have to include headers in # order to parse them to collect translatable strings.