From 7a356b2cdb61569d04fd557419740c69ac7f5549 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 21 Oct 2015 10:28:49 -0400 Subject: [PATCH] By default do not export all symbols in vtk-m. This is done to help manage the size of our libraries and executables. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a57a62ac..724aa3680 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,14 @@ endif () #----------------------------------------------------------------------------- # Add supplemental compiler warnings, and GCC visibility support. +# include export header modules so that we can easily control symbol exporting +# VTK-m is setup by default not to export symbols unless explicitly stated. +# We prefer to only export symbols of a small set of user facing classes, +# rather than exporting all symbols. In practice we will try to not export +# symbols for any third party library +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +include(GenerateExportHeader) include(CMake/VTKmCompilerExtras.cmake) #-----------------------------------------------------------------------------