Commit 387f4f81 authored by Jerry Clarke's avatar Jerry Clarke
Browse files

Modified to work with NDGM

parent c9bbbd0b
......@@ -2,7 +2,8 @@ PROJECT(Xdmf)
INCLUDE_DIRECTORIES(${Xdmf_SOURCE_DIR}/Ice/libsrc)
INCLUDE_DIRECTORIES(${Xdmf_SOURCE_DIR}/libsrc
${Xdmf_BINARY_DIR}/libsrc)
${Xdmf_BINARY_DIR}/libsrc
${Xdmf_BINARY_DIR}/Ice/libsrc)
SET (LIBRARY_OUTPUT_PATH ${Xdmf_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${Xdmf_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")
......@@ -10,6 +11,21 @@ SET (EXECUTABLE_OUTPUT_PATH ${Xdmf_BINARY_DIR}/bin/ CACHE PATH "Single output di
INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
# Build IceConfig.h
MESSAGE(STATUS "Configure IceConfig.h")
SUBDIRS(Ice/libsrc)
OPTION(XDMF_HAS_NDGM "XDMF has Network Distributed Global Memory (NDGM)" OFF)
IF(XDMF_HAS_NDGM)
FIND_PATH(NDGM_DIR BuildNDGM.cmake ${Xdmf_SOURCE_DIR}/../Ndgm "Root of Source for NDGM")
IF(NDGM_DIR)
MESSAGE(STATUS "Process NDGM")
# INCLUDE(${NDGM_DIR}/BuildNDGM.cmake)
SUBDIRS(NDGM)
ENDIF(NDGM_DIR)
ADD_DEFINITIONS(-DHAVE_NDGM)
ENDIF(XDMF_HAS_NDGM)
OPTION(XDMF_SYSTEM_HDF5 "Use sytstem HDF5" ON)
IF(XDMF_SYSTEM_HDF5)
......
......@@ -75,6 +75,7 @@ ENDIF(${ICE_SIZEOF_INT} MATCHES 4)
FIND_PATH(ICE_HAVE_FCNTL fcntl.h /usr/include /usr/include/sys)
FIND_PATH(ICE_HAVE_NETINET in.h /usr/include/netinet /usr/include /usr/include/sys)
FIND_PATH(ICE_HAVE_MMAN mman.h /usr/include/sys /usr/include)
MARK_AS_ADVANCED(ICE_HAVE_FCNTL ICE_HAVE_NETINET ICE_HAVE_MMAN)
#Create IceConfig.h
CONFIGURE_FILE(
......
INCLUDE(${NDGM_DIR}/BuildNDGM.cmake)
......@@ -62,10 +62,11 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
CONFIGURE_FILE(${Xdmf_SOURCE_DIR}/libsrc/XdmfConfig.h.in
${Xdmf_BINARY_DIR}/libsrc/XdmfConfig.h)
SET(XdmfSources ${XdmfFormatSource} ${XdmfModelSource})
IF(XDMF_HAVE_NDGM)
SET(XdmfSources XdmfSources ${XdmfNdgmSource})
ENDIF(XDMF_HAVE_NDGM)
IF(XDMF_HAS_NDGM)
SET(XdmfSources ${XdmfFormatSource} ${XdmfModelSource} ${XdmfNdgmSource})
ELSE(XDMF_HAS_NDGM)
SET(XdmfSources ${XdmfFormatSource} ${XdmfModelSource})
ENDIF(XDMF_HAS_NDGM)
IF(XDMF_BUILD_SHARED_LIBS)
ADD_LIBRARY(Xdmf SHARED ${XdmfSources})
......@@ -98,4 +99,4 @@ IF(XDMF_WRAP_TCL)
TARGET_LINK_LIBRARIES(XdmfTCL ${TCL_LIBRARY} ${HDF5_LIBRARY} ${EXPAT_LIBRARY})
ADD_EXECUTABLE(DummyTCL dummy.cxx)
TARGET_LINK_LIBRARIES(DummyTCL XdmfTCL)
ENDIF(XDMF_WRAP_TCL)
\ No newline at end of file
ENDIF(XDMF_WRAP_TCL)
......@@ -19,6 +19,13 @@ IF (VTK_FOUND)
TARGET_LINK_LIBRARIES(vtk${PROJECT_NAME}TCL vtkIOTCL Xdmf)
ENDIF(VTK_WRAP_TCL)
# Create Python wrappers if VTK is wrapped in Python.
IF(VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtk${PROJECT_NAME}Python XdmfPython_SRCS ${Xdmf_SRCS})
ADD_LIBRARY(vtk${PROJECT_NAME}Python SHARED ${XdmfPython_SRCS} ${Xdmf_SRCS})
TARGET_LINK_LIBRARIES(vtk${PROJECT_NAME}Python vtkIOPython Xdmf)
ENDIF(VTK_WRAP_PYTHON)
ADD_EXECUTABLE(VTKTest VTKTest.cxx)
TARGET_LINK_LIBRARIES(VTKTest vtkXdmfTCL)
ENDIF (VTK_FOUND)
\ No newline at end of file
ENDIF (VTK_FOUND)
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