Skip to content

Commit a5d8d87

Browse files
author
Oleh Kulykov
committed
1722290935
1 parent 9d51759 commit a5d8d87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ else()
185185
endif()
186186

187187
if (MINGW)
188-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
188+
# CXX ignore private external function attributes. Always link.
189+
check_cxx_compiler_flag("-Wno-attributes" WITH_WNO_ATTRIBUTES_CXX)
190+
if (WITH_WNO_ATTRIBUTES_CXX)
191+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
192+
endif()
189193
endif()
190194

191195
endif()

0 commit comments

Comments
 (0)