Skip to content

Commit 5dc11be

Browse files
committed
cmake: set default visibility to "hidden"
Currently autotools build uses -fvisibility=hidden, but cmake does not. This creates a huge ABI difference between the libzmq.so when compiled with cmake vs autotools. With this patch the difference between the exported functions is minimum.
1 parent 196267c commit 5dc11be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ else()
66
cmake_minimum_required(VERSION 2.8.12...3.31)
77
endif()
88

9+
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
10+
911
project(ZeroMQ)
1012

1113
include(CheckIncludeFiles)

0 commit comments

Comments
 (0)