Skip to content

Commit 85764cf

Browse files
committed
Add -fno-gnu-unique to compile options for gcc
Unique symbols prevent the library from being dlclosed.
1 parent b313227 commit 85764cf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ if(NOT MSVC)
118118
else()
119119
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
120120
endif()
121+
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
122+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-gnu-unique")
123+
endif()
121124
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)
122125
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wnon-virtual-dtor")
123126
endif()

0 commit comments

Comments
 (0)