Skip to content

Commit 7da1ad0

Browse files
committed
luabind: now can build with -fvisibility=hidden
1 parent ce3c000 commit 7da1ad0

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,15 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
6565
endif()
6666
endif()
6767

68-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17 -Wno-attributes -pipe -Wl,--no-undefined")
68+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17 -Wno-attributes -pipe -Wl,--no-undefined -fvisibility=hidden")
6969

7070
set(LUA_LIBRARIES luajit)
7171

7272
if(NOT CMAKE_BUILD_TYPE)
7373
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
7474
endif()
7575

76-
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
77-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
78-
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
76+
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
7977
add_definitions(-DDEBUG -DMIXED)
8078
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og")
8179
set(LUA_LIBRARIES luajit-debug)

Externals/luabind

0 commit comments

Comments
 (0)