Skip to content

Commit 842f69f

Browse files
committed
Disable visibility options on certain operating systems
1 parent aa26712 commit 842f69f

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,19 @@ target_sources(scratchcpp
8383
include(FetchContent)
8484

8585
# Compiler options
86-
target_compile_options(scratchcpp PRIVATE
87-
-fvisibility=hidden
88-
-fvisibility-inlines-hidden
89-
)
90-
91-
target_link_options(scratchcpp PRIVATE
92-
-Wl,--exclude-libs,ALL
93-
-Wl,-Bsymbolic
94-
)
86+
if(UNIX)
87+
target_compile_options(scratchcpp PRIVATE
88+
-fvisibility=hidden
89+
-fvisibility-inlines-hidden
90+
)
91+
92+
if(NOT APPLE)
93+
target_link_options(scratchcpp PRIVATE
94+
-Wl,--exclude-libs,ALL
95+
-Wl,-Bsymbolic
96+
)
97+
endif()
98+
endif()
9599

96100
# zip
97101
include(build/zip.cmake)

0 commit comments

Comments
 (0)