Skip to content

Commit 59207df

Browse files
author
Oleh Kulykov
committed
1722291085
1 parent a5d8d87 commit 59207df

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ endif()
118118
if (MINGW)
119119
add_definitions(-DLIBPLZMA_MINGW=1)
120120
message("MinGW")
121+
122+
# CXX ignore private external function attributes. Always link.
123+
check_cxx_compiler_flag("-Wno-attributes" WITH_WNO_ATTRIBUTES_CXX)
124+
if (WITH_WNO_ATTRIBUTES_CXX)
125+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
126+
endif()
127+
121128
endif()
122129

123130
if (MSVC)
@@ -184,14 +191,6 @@ else()
184191
endif()
185192
endif()
186193

187-
if (MINGW)
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()
193-
endif()
194-
195194
endif()
196195

197196
if (LIBPLZMA_OPT_TESTS)

0 commit comments

Comments
 (0)