cmake: Disable -Wtrailing-whitespace warnings for RCC-generated files

See: https://bugreports.qt.io/browse/QTBUG-141858.
This commit is contained in:
Hennadii Stepanov
2025-11-10 22:23:26 +00:00
committed by fanquake
parent aabc5ca6ed
commit d86650220a

View File

@@ -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.