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)
set(XdmfCoreSources
${XdmfCoreSources}
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()
if (XDMF_STATIC_AND_SHARED)
......@@ -196,6 +248,9 @@ else()
add_library(XdmfCore ${LIBTYPE} ${XdmfCoreSources})
endif()
set(XDMF_LIBRARY_DIRS ${XDMF_LIBRARY_DIRS} PARENT_SCOPE)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} PARENT_SCOPE)
link_directories(${XDMF_LIBRARY_DIRS})
target_link_libraries(XdmfCore ${XDMF_LIBRARIES})
......@@ -310,7 +365,6 @@ else ()
endif ()
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_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin)
......
......@@ -38,8 +38,13 @@
# define XDMFCORE_EXPORT __declspec(dllexport)
# define XDMFCORE_TEMPLATE
# else /* Xdmf_EXPORTS */
# define XDMFCORE_EXPORT __declspec(dllimport)
# define XDMFCORE_TEMPLATE extern
# ifdef XDMF_EXPORTS
# define XDMFCORE_EXPORT __declspec(dllexport)
# define XDMFCORE_TEMPLATE
# else
# define XDMFCORE_EXPORT __declspec(dllimport)
# define XDMFCORE_TEMPLATE extern
# endif
# endif /* Xdmf_EXPORTS */
# endif
......
......@@ -265,7 +265,7 @@ public:
itemProperties,
childItems);
if(newItem == NULL) {
if(newItem.get() == NULL) {
XdmfError::message(XdmfError::FATAL,
"mItemFactory failed to createItem in "
"XdmfCoreReader::XdmfCoreReaderImpl::readSingleNode");
......@@ -351,7 +351,7 @@ XdmfCoreReader::parse(const std::string & lightData) const
std::vector<shared_ptr<XdmfItem> > toReturn;
if(mImpl->mItemFactory->createItem((const char*)currNode->name,
std::map<std::string, std::string>(),
std::vector<shared_ptr<XdmfItem> >()) == NULL) {
std::vector<shared_ptr<XdmfItem> >()).get() == NULL) {
toReturn = mImpl->read(currNode->children);
}
else {
......
......@@ -86,6 +86,16 @@ set(XdmfDSMSources
XdmfDSMItemFactory
XdmfDSMDriver)
set(XdmfDSMSources
XdmfHDF5ControllerDSM
XdmfHDF5WriterDSM
XdmfDSMCommMPI
XdmfDSMBuffer
XdmfDSMDescription
XdmfDSMItemFactory
XdmfDSMDriver
PARENT_SCOPE)
if (XDMF_BUILD_DSM_THREADS)
add_definitions(-DXDMF_BUILD_DSM_THREADS)
endif ()
......@@ -132,6 +142,8 @@ endif (BUILD_SHARED_LIBS)
# OUTPUT_NAME "XdmfDSM")
# endif (UNIX)
#endif (BUILD_SHARED_LIBS)
set(XdmfDSMLinkLibraryDir ${XdmfDSMLinkLibraryDir} PARENT_SCOPE)
set(XdmfDSMLinkLibraries ${XdmfDSMLinkLibraries} PARENT_SCOPE)
link_directories(${XDMF_LIBRARY_DIRS} ${XdmfDSMLinkLibraryDir})
target_link_libraries(XdmfDSM ${XdmfDSMLinkLibraries})
if (BUILD_SHARED_LIBS)
......
......@@ -27,17 +27,20 @@
/* Keep all our Win32 Conversions here */
#ifdef _WIN32
/* 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
#define XDMFDSM_EXPORT __declspec(dllexport)
#define XDMFDSM_TEMPLATE
# define XDMFDSM_EXPORT __declspec(dllexport)
# define XDMFDSM_TEMPLATE
# undef XDMFCORE_EXPORT
# define XDMFCORE_EXPORT __declspec(dllexport)
# undef XDMFCORE_TEMPLATE
# define XDMFCORE_TEMPLATE
#else /* Xdmf_EXPORTS */
#define XDMFDSM_EXPORT __declspec(dllimport)
#define XDMFDSM_TEMPLATE extern
# define XDMFDSM_EXPORT __declspec(dllimport)
# define XDMFDSM_TEMPLATE extern
# undef XDMFCORE_EXPORT
# define XDMFCORE_EXPORT __declspec(dllimport)
# undef XDMFCORE_TEMPLATE
# define XDMFCORE_TEMPLATE extern
#endif /* Xdmf_EXPORTS */
/* 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