From f40233715edc4a06decf1f80a024fae7181a8ec0 Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Tue, 10 Oct 2023 10:28:01 +0300 Subject: [PATCH] Hide non-API functions unconditionally --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df2513d3..35b23e4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,10 +141,8 @@ if(SPDLOG_BUILD_PIC) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() -if((${CMAKE_POSITION_INDEPENDENT_CODE}) OR (${CMAKE_CXX_FLAGS} MATCHES "-fPIC")) - set(CMAKE_CXX_VISIBILITY_PRESET hidden) - set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) -endif() +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) find_package(Threads REQUIRED) message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})