From 7b2525469c2dc8550002330418f3e61d7b4de572 Mon Sep 17 00:00:00 2001 From: zhaowq32 Date: Tue, 12 Nov 2024 17:33:09 +0800 Subject: [PATCH] add hidden symbols options --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5bc7b88..f4b40ef6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,12 @@ endif() option(SPDLOG_BUILD_ALL "Build all artifacts" OFF) +option(SPDLOG_HIDDEN_SYMBOLS "Hidden symbols" OFF) + +if(SPDLOG_HIDDEN_SYMBOLS) + set(CMAKE_CXX_VISIBILITY_PRESET hidden) +endif() + # build shared option option(SPDLOG_BUILD_SHARED "Build shared library" OFF)