Skip to content

Commit e944002

Browse files
committed
build: ensure that we build with hidden visibility
Ensure that the package is built with hidden visibility for ELF/MachO targets.
1 parent 09284f4 commit e944002

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ cmake_minimum_required(VERSION 3.12.3)
44
project(SQLite
55
LANGUAGES C)
66

7+
# Generate PIC for ELF/MachO targets.
78
set(CMAKE_POSITION_INDEPENDENT_CODE YES)
89

10+
# Use hidden visibility for ELF/MachO targets.
11+
set(CMAKE_C_VISIBILITY_PRESET hidden)
12+
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
13+
914
add_library(SQLite3
1015
Sources/CSQLite/sqlite3.c)
1116
if(CMAKE_SYSTEM_NAME STREQUAL Windows AND BUILD_SHARED_LIBS)

0 commit comments

Comments
 (0)