Commit f7284af5 authored by David E. DeMarle's avatar David E. DeMarle

fix shared lib config

rather than force -fPIC into CMakeLists.txt we now explicitly turn
on position independent compilation for each of the three internal
object libs. Do it this way because fpic is not valid on all
compilers.
parent ffa86133
......@@ -319,6 +319,8 @@ if(NOT XDMF_BUILD_CORE_ONLY)
XdmfUnstructuredGrid)
add_library(XdmfObjects OBJECT ${XdmfSources})
set_target_properties(XdmfObjects PROPERTIES
POSITION_INDEPENDENT_CODE True)
add_library(${XDMF_LIBNAME} $<TARGET_OBJECTS:XdmfObjects>)
if (BUILD_SHARED_LIBS)
add_library(Xdmf_Static STATIC $<TARGET_OBJECTS:XdmfObjects>)
......
......@@ -151,6 +151,8 @@ if (TIFF_FOUND)
endif()
add_library(XdmfCoreObjects OBJECT ${XdmfCoreSources})
set_target_properties(XdmfCoreObjects PROPERTIES
POSITION_INDEPENDENT_CODE True)
add_library(XdmfCore ${LIBTYPE} $<TARGET_OBJECTS:XdmfCoreObjects>)
if (BUILD_SHARED_LIBS)
add_library(XdmfCore_Static STATIC $<TARGET_OBJECTS:XdmfCoreObjects>)
......
......@@ -90,6 +90,8 @@ if (XDMF_DSM_IS_CRAY)
endif (XDMF_DSM_IS_CRAY)
add_library(XdmfDSMObjects OBJECT ${XdmfDSMSources})
set_target_properties(XdmfDSMObjects PROPERTIES
POSITION_INDEPENDENT_CODE True)
add_library(XdmfDSM $<TARGET_OBJECTS:XdmfDSMObjects>)
if (BUILD_SHARED_LIBS)
add_library(XdmfDSM_Static STATIC $<TARGET_OBJECTS:XdmfDSMObjects>)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment