Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit a9230be

Browse files
committed
Added condition to use -fvisibility=hidden when profiler is disabled
Signed-off-by: ahcorde <[email protected]>
1 parent ae9a89d commit a9230be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ filter_valid_compiler_flags(${WARN_LEVEL}
268268
# Check and add visibility hidden by default. Only in UNIX
269269
# Windows and MacosX does not handled properly the hidden compilation
270270
if (UNIX AND NOT APPLE)
271-
filter_valid_compiler_flags(-fvisibility-inlines-hidden)
271+
if (ENABLE_PROFILER)
272+
filter_valid_compiler_flags(-fvisibility-inlines-hidden)
273+
else()
274+
filter_valid_compiler_flags(-fvisibility=hidden -fvisibility-inlines-hidden)
275+
endif()
272276
endif()
273277

274278
if (MSVC)

0 commit comments

Comments
 (0)