Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Set CMAKE VISIBILITY_PRESET to hidden #636

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ cmake_policy( SET CMP0042 NEW )
#---------------------------------------------------------------------
include( CTest )

# The following may make smaller and quicker loading libraries,
# that hides unnecessary symbols. Available from CMake 3.0.0.
#set( CMAKE_C_VISIBILITY_PRESET hidden )
#set( CMAKE_CXX_VISIBILITY_PRESET hidden )

# The following may make smaller and quicker loading libraries, that hides unnecessary symbols.
set( CMAKE_C_VISIBILITY_PRESET hidden )
set( CMAKE_CXX_VISIBILITY_PRESET hidden )

# Prevent MacOS/Clang ld: warning: direct access in function '...' from file '...cxx.o' to global
# weak symbol 'vtable for ...' from file '....a(...cxx.o)' means the weak symbol cannot be
# overridden at runtime. This was likely caused by different translation units being compiled with
# different visibility settings.
set(ITK_TEMPLATE_VISIBILITY_DEFAULT OFF)
#---------------------------------------------------------------------
option( ELASTIX_USE_OPENCL "Use OpenCL enabled GPU" OFF )
set(_GPU_depends "")
Expand Down