5845f1a41d
This symbol is defined as a static member object inside of a boost detail header. When boost headers are used in a project that uses Boost in both the main binary as well as dlopen()'d shlibs, the top_ symbol gets duplicated and the metadata gets partitioned. We use the Boost shlib to unify both the main binary and the shlibs to use the same memory address for top_. This involves marking the templated object call_stack::top_ as "extern" and then declaring to Boost that we intend to use the shlibs.
59 lines
1.3 KiB
CMake
59 lines
1.3 KiB
CMake
# Include Flex/Bison generation rules
|
|
include(${CMAKE_SOURCE_DIR}/cmake/flexYacc.cmake)
|
|
|
|
# Consolidated smocore library with all source files
|
|
add_library(smocore STATIC
|
|
# Core files
|
|
mind.cpp
|
|
opts.cpp
|
|
componentThread.cpp
|
|
component.cpp
|
|
qutex.cpp
|
|
lockerAndInvokerBase.cpp
|
|
|
|
# Body
|
|
body/body.cpp
|
|
|
|
# Director
|
|
director/director.cpp
|
|
|
|
# Marionette
|
|
marionette/main.cpp
|
|
marionette/salmanoff.cpp
|
|
marionette/lifetime.cpp
|
|
marionette/qualeEvent.cpp
|
|
marionette/negtrinEvent.cpp
|
|
|
|
# DeviceManager
|
|
deviceManager/deviceManager.cpp
|
|
deviceManager/deviceReattacher.cpp
|
|
deviceManager/deviceAttachmentPipeSpecParser.cpp
|
|
${LEX_OUTPUT}
|
|
${YACC_OUTPUT}
|
|
|
|
# SenseApis
|
|
stimBuffApis/stimBuffApiManager.cpp
|
|
|
|
# MindManager
|
|
mindManager/mindManager.cpp
|
|
)
|
|
|
|
# Conditionally add qutexAcquisitionHistoryTracker.cpp only when debug locks are enabled
|
|
if(ENABLE_DEBUG_LOCKS)
|
|
target_sources(smocore PRIVATE qutexAcquisitionHistoryTracker.cpp)
|
|
endif()
|
|
|
|
target_include_directories(smocore PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${Boost_INCLUDE_DIRS}
|
|
)
|
|
|
|
# Link against pthread for CPU affinity functions
|
|
find_package(Threads REQUIRED)
|
|
target_link_libraries(smocore PRIVATE
|
|
Threads::Threads
|
|
Boost::system
|
|
Boost::log
|
|
)
|