Skip to content

Commit 3a07fcb

Browse files
committed
Fixed MinGW with shared libs
1 parent 632fcdc commit 3a07fcb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|IntelLLVM")
581581
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
582582
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
583583
target_compile_options(${t} PRIVATE "-Wno-ignored-attributes" "-Walloc-size-larger-than=4GB")
584+
585+
if(BUILD_SHARED_LIBS)
586+
target_compile_options(${t} PRIVATE "-Wno-attributes")
587+
endif()
584588
endforeach()
585589
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
586590
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14)

0 commit comments

Comments
 (0)