Commit ff194c1f authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

Updates to reduce library files needed for linking

parent 05124fbf
...@@ -180,6 +180,58 @@ if (TIFF_FOUND) ...@@ -180,6 +180,58 @@ if (TIFF_FOUND)
set(XdmfCoreSources set(XdmfCoreSources
${XdmfCoreSources} ${XdmfCoreSources}
XdmfTIFFController) XdmfTIFFController)
set(XdmfCoreSources
core/XdmfArray
core/XdmfArrayReference
core/XdmfArrayType
core/XdmfBinaryController
core/XdmfCoreItemFactory
core/XdmfCoreReader
core/XdmfError
core/XdmfFunction
core/XdmfHDF5Controller
core/XdmfHDF5Writer
core/XdmfHeavyDataController
core/XdmfHeavyDataDescription
core/XdmfHeavyDataWriter
core/XdmfInformation
core/XdmfItem
core/XdmfItemProperty
core/XdmfPlaceholder
core/XdmfSparseMatrix
core/XdmfSubset
core/XdmfSystemUtils
core/XdmfTIFFController
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/XdmfVersion
core/XdmfVisitor
core/XdmfWriter
PARENT_SCOPE)
else ()
set(XdmfCoreSources
core/XdmfArray
core/XdmfArrayReference
core/XdmfArrayType
core/XdmfBinaryController
core/XdmfCoreItemFactory
core/XdmfCoreReader
core/XdmfError
core/XdmfFunction
core/XdmfHDF5Controller
core/XdmfHDF5Writer
core/XdmfHeavyDataController
core/XdmfHeavyDataDescription
core/XdmfHeavyDataWriter
core/XdmfInformation
core/XdmfItem
core/XdmfItemProperty
core/XdmfPlaceholder
core/XdmfSparseMatrix
core/XdmfSubset
core/XdmfSystemUtils
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/XdmfVersion
core/XdmfVisitor
core/XdmfWriter
PARENT_SCOPE)
endif() endif()
if (XDMF_STATIC_AND_SHARED) if (XDMF_STATIC_AND_SHARED)
...@@ -196,6 +248,9 @@ else() ...@@ -196,6 +248,9 @@ else()
add_library(XdmfCore ${LIBTYPE} ${XdmfCoreSources}) add_library(XdmfCore ${LIBTYPE} ${XdmfCoreSources})
endif() endif()
set(XDMF_LIBRARY_DIRS ${XDMF_LIBRARY_DIRS} PARENT_SCOPE)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} PARENT_SCOPE)
link_directories(${XDMF_LIBRARY_DIRS}) link_directories(${XDMF_LIBRARY_DIRS})
target_link_libraries(XdmfCore ${XDMF_LIBRARIES}) target_link_libraries(XdmfCore ${XDMF_LIBRARIES})
...@@ -310,7 +365,6 @@ else () ...@@ -310,7 +365,6 @@ else ()
endif () endif ()
set(XDMF_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include PARENT_SCOPE) set(XDMF_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include PARENT_SCOPE)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib)
set(XDMF_DIR ${CMAKE_INSTALL_PREFIX} PARENT_SCOPE) set(XDMF_DIR ${CMAKE_INSTALL_PREFIX} PARENT_SCOPE)
set(XDMF_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin) set(XDMF_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin)
......
...@@ -38,8 +38,13 @@ ...@@ -38,8 +38,13 @@
# define XDMFCORE_EXPORT __declspec(dllexport) # define XDMFCORE_EXPORT __declspec(dllexport)
# define XDMFCORE_TEMPLATE # define XDMFCORE_TEMPLATE
# else /* Xdmf_EXPORTS */ # else /* Xdmf_EXPORTS */
# define XDMFCORE_EXPORT __declspec(dllimport) # ifdef XDMF_EXPORTS
# define XDMFCORE_TEMPLATE extern # define XDMFCORE_EXPORT __declspec(dllexport)
# define XDMFCORE_TEMPLATE
# else
# define XDMFCORE_EXPORT __declspec(dllimport)
# define XDMFCORE_TEMPLATE extern
# endif
# endif /* Xdmf_EXPORTS */ # endif /* Xdmf_EXPORTS */
# endif # endif
......
...@@ -265,7 +265,7 @@ public: ...@@ -265,7 +265,7 @@ public:
itemProperties, itemProperties,
childItems); childItems);
if(newItem == NULL) { if(newItem.get() == NULL) {
XdmfError::message(XdmfError::FATAL, XdmfError::message(XdmfError::FATAL,
"mItemFactory failed to createItem in " "mItemFactory failed to createItem in "
"XdmfCoreReader::XdmfCoreReaderImpl::readSingleNode"); "XdmfCoreReader::XdmfCoreReaderImpl::readSingleNode");
...@@ -351,7 +351,7 @@ XdmfCoreReader::parse(const std::string & lightData) const ...@@ -351,7 +351,7 @@ XdmfCoreReader::parse(const std::string & lightData) const
std::vector<shared_ptr<XdmfItem> > toReturn; std::vector<shared_ptr<XdmfItem> > toReturn;
if(mImpl->mItemFactory->createItem((const char*)currNode->name, if(mImpl->mItemFactory->createItem((const char*)currNode->name,
std::map<std::string, std::string>(), std::map<std::string, std::string>(),
std::vector<shared_ptr<XdmfItem> >()) == NULL) { std::vector<shared_ptr<XdmfItem> >()).get() == NULL) {
toReturn = mImpl->read(currNode->children); toReturn = mImpl->read(currNode->children);
} }
else { else {
......
...@@ -86,6 +86,16 @@ set(XdmfDSMSources ...@@ -86,6 +86,16 @@ set(XdmfDSMSources
XdmfDSMItemFactory XdmfDSMItemFactory
XdmfDSMDriver) XdmfDSMDriver)
set(XdmfDSMSources
XdmfHDF5ControllerDSM
XdmfHDF5WriterDSM
XdmfDSMCommMPI
XdmfDSMBuffer
XdmfDSMDescription
XdmfDSMItemFactory
XdmfDSMDriver
PARENT_SCOPE)
if (XDMF_BUILD_DSM_THREADS) if (XDMF_BUILD_DSM_THREADS)
add_definitions(-DXDMF_BUILD_DSM_THREADS) add_definitions(-DXDMF_BUILD_DSM_THREADS)
endif () endif ()
...@@ -132,6 +142,8 @@ endif (BUILD_SHARED_LIBS) ...@@ -132,6 +142,8 @@ endif (BUILD_SHARED_LIBS)
# OUTPUT_NAME "XdmfDSM") # OUTPUT_NAME "XdmfDSM")
# endif (UNIX) # endif (UNIX)
#endif (BUILD_SHARED_LIBS) #endif (BUILD_SHARED_LIBS)
set(XdmfDSMLinkLibraryDir ${XdmfDSMLinkLibraryDir} PARENT_SCOPE)
set(XdmfDSMLinkLibraries ${XdmfDSMLinkLibraries} PARENT_SCOPE)
link_directories(${XDMF_LIBRARY_DIRS} ${XdmfDSMLinkLibraryDir}) link_directories(${XDMF_LIBRARY_DIRS} ${XdmfDSMLinkLibraryDir})
target_link_libraries(XdmfDSM ${XdmfDSMLinkLibraries}) target_link_libraries(XdmfDSM ${XdmfDSMLinkLibraries})
if (BUILD_SHARED_LIBS) if (BUILD_SHARED_LIBS)
......
...@@ -27,17 +27,20 @@ ...@@ -27,17 +27,20 @@
/* Keep all our Win32 Conversions here */ /* Keep all our Win32 Conversions here */
#ifdef _WIN32 #ifdef _WIN32
/* Used to export/import from the dlls */ /* Used to export/import from the dlls */
#undef XDMFCORE_EXPORT
#define XDMFCORE_EXPORT __declspec(dllimport)
#undef XDMFCORE_TEMPLATE
#define XDMFCORE_TEMPLATE extern
#ifdef XdmfDSM_EXPORTS #ifdef XdmfDSM_EXPORTS
#define XDMFDSM_EXPORT __declspec(dllexport) # define XDMFDSM_EXPORT __declspec(dllexport)
#define XDMFDSM_TEMPLATE # define XDMFDSM_TEMPLATE
# undef XDMFCORE_EXPORT
# define XDMFCORE_EXPORT __declspec(dllexport)
# undef XDMFCORE_TEMPLATE
# define XDMFCORE_TEMPLATE
#else /* Xdmf_EXPORTS */ #else /* Xdmf_EXPORTS */
#define XDMFDSM_EXPORT __declspec(dllimport) # define XDMFDSM_EXPORT __declspec(dllimport)
#define XDMFDSM_TEMPLATE extern # define XDMFDSM_TEMPLATE extern
# undef XDMFCORE_EXPORT
# define XDMFCORE_EXPORT __declspec(dllimport)
# undef XDMFCORE_TEMPLATE
# define XDMFCORE_TEMPLATE extern
#endif /* Xdmf_EXPORTS */ #endif /* Xdmf_EXPORTS */
/* Compiler Warnings */ /* Compiler Warnings */
......
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