Skip to content

Commit 6c2c652

Browse files
committed
fixup
1 parent 4330300 commit 6c2c652

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/qt/CMakeLists.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,20 @@ add_custom_command(
8080
)
8181
unset(qm_files)
8282

83-
set_property(
84-
SOURCE
85-
${CMAKE_CURRENT_BINARY_DIR}/qrc_bitcoin.cpp
86-
${CMAKE_CURRENT_BINARY_DIR}/qrc_bitcoin_locale.cpp
87-
PROPERTY COMPILE_OPTIONS
88-
-Wno-trailing-whitespace
83+
include(TryAppendCXXFlags)
84+
try_append_cxx_flags("-Wtrailing-whitespace"
85+
RESULT_VAR cxx_supports_w_trailing_whitespace
86+
SKIP_LINK
8987
)
88+
if(cxx_supports_w_trailing_whitespace)
89+
set_property(
90+
SOURCE
91+
${CMAKE_CURRENT_BINARY_DIR}/qrc_bitcoin.cpp
92+
${CMAKE_CURRENT_BINARY_DIR}/qrc_bitcoin_locale.cpp
93+
PROPERTY COMPILE_OPTIONS
94+
-Wno-trailing-whitespace
95+
)
96+
endif()
9097

9198
# The bitcoinqt sources have to include headers in
9299
# order to parse them to collect translatable strings.

0 commit comments

Comments
 (0)