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

Fixes to RPath, Static builds for Utils, intel compiler logical processing

parent 6186257e
......@@ -65,10 +65,10 @@ include(XdmfFunctions)
get_filename_component(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
# RPath
#set(CMAKE_SKIP_BUILD_RPATH FALSE)
#set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
#set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# Should we build with documentation
option(XDMF_BUILD_DOCUMENTATION OFF)
......
......@@ -54,11 +54,13 @@ endif ()
mark_as_advanced(CLEAR HDF5_C_INCLUDE_DIR)
mark_as_advanced(CLEAR HDF5_hdf5_LIBRARY_DEBUG)
mark_as_advanced(CLEAR HDF5_hdf5_LIBRARY_RELEASE)
set(HDF5_LIBRARIES ${vtkhdf5_LIBRARIES})
set(HDF5_hdf5_LIBRARY_RELEASE ${vtkhdf5_LIBRARIES})
set(HDF5_INCLUDE_DIRS ${vtkhdf5_INCLUDE_DIRS})
set(HDF5_C_INCLUDE_DIR ${vtkhdf5_INCLUDE_DIRS})
set(HDF5_FOUND TRUE)
if (NOT ("${vtkhdf5_LIBRARIES}" STREQUAL ""))
set(HDF5_LIBRARIES ${vtkhdf5_LIBRARIES})
set(HDF5_hdf5_LIBRARY_RELEASE ${vtkhdf5_LIBRARIES})
set(HDF5_INCLUDE_DIRS ${vtkhdf5_INCLUDE_DIRS})
set(HDF5_C_INCLUDE_DIR ${vtkhdf5_INCLUDE_DIRS})
set(HDF5_FOUND TRUE)
endif ()
find_package(HDF5 REQUIRED)
if(HDF5_FOUND)
mark_as_advanced(FORCE HDF5_C_INCLUDE_DIR)
......
......@@ -376,9 +376,11 @@ XdmfWriter::visit(XdmfArray & array,
// Take care of writing to single heavy data file (Default behavior)
if(!array.isInitialized() && array.getHeavyDataController(0) &&
array.getHeavyDataController(0)->getFilePath().compare(mImpl->mHeavyDataWriter->getFilePath()) != 0 &&
mImpl->mMode == Default) {
array.read();
if (array.getHeavyDataController(0)->getFilePath().compare(mImpl->mHeavyDataWriter->getFilePath()) != 0)
{
array.read();
}
}
if(array.getHeavyDataController(0) ||
......
......@@ -92,15 +92,22 @@ if(XDMF_BUILD_PARTITIONER)
set(XdmfUtilsLinkLibraries ${XdmfUtilsLinkLibraries} ${METIS_LIBRARIES})
endif(XDMF_BUILD_PARTITIONER)
add_library(XdmfUtilsObjects OBJECT ${XdmfUtilsSources})
add_library(XdmfUtils $<TARGET_OBJECTS:XdmfUtilsObjects>)
if (BUILD_SHARED_LIBS)
add_library(XdmfUtils_Static STATIC $<TARGET_OBJECTS:XdmfUtilsObjects>)
if (UNIX)
set_target_properties(XdmfUtils_Static PROPERTIES
OUTPUT_NAME "XdmfUtils")
endif (UNIX)
endif (BUILD_SHARED_LIBS)
if (XDMF_STATIC_AND_SHARED)
add_library(XdmfUtilsObjects OBJECT ${XdmfUtilsSources})
set_target_properties(XdmfUtilsObjects PROPERTIES
POSITION_INDEPENDENT_CODE True)
add_library(XdmfUtils $<TARGET_OBJECTS:XdmfUtilsObjects>)
if (BUILD_SHARED_LIBS)
add_library(XdmfUtils_Static STATIC $<TARGET_OBJECTS:XdmfUtilsObjects>)
if (UNIX)
set_target_properties(XdmfUtils_Static PROPERTIES
OUTPUT_NAME "XdmfUtils")
endif (UNIX)
endif (BUILD_SHARED_LIBS)
else ()
add_library(XdmfUtils ${XdmfUtilsSources})
endif ()
target_link_libraries(XdmfUtils ${XdmfUtilsLinkLibraries})
if (BUILD_SHARED_LIBS)
target_link_libraries(XdmfUtils_Static ${XdmfUtilsLinkLibraries})
......
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