Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion cmake/utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,15 @@ function(add_gambit_executable executablename LIBRARIES)
cmake_parse_arguments(ARG "" "" "SOURCES;HEADERS;" ${ARGN})

add_executable(${executablename} ${ARG_SOURCES} ${ARG_HEADERS})
set_target_properties(${executablename} PROPERTIES EXCLUDE_FROM_ALL 1)
# ENABLE_EXPORTS adds -rdynamic/-export_dynamic to the linker so that dlopen'd backends
# and scanner plugins can resolve symbols from statically linked contrib libraries (e.g.
# yaml-cpp exception typeinfo). Setting this via a target property rather than
# CMAKE_CXX_FLAGS keeps GAMBIT's own code compiled with -fvisibility=hidden, so only
# contrib symbols built with default visibility are exported, not GAMBIT internals.
set_target_properties(${executablename} PROPERTIES
EXCLUDE_FROM_ALL 1
ENABLE_EXPORTS TRUE
)

if(${CMAKE_VERSION} VERSION_GREATER 2.8.10)
foreach (dir ${GAMBIT_INCDIRS})
Expand Down
2 changes: 2 additions & 0 deletions contrib/yaml-cpp-0.6.2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ endif()

set_target_properties(yaml-cpp PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
CXX_VISIBILITY_PRESET default
VISIBILITY_INLINES_HIDDEN FALSE
)
Loading