[MOAB-dev] r1316 - in MOAB/trunk: . cmake tools/dagmc

dcthomp at mcs.anl.gov dcthomp at mcs.anl.gov
Fri Oct 19 19:02:19 CDT 2007


Author: dcthomp
Date: 2007-10-19 19:02:19 -0500 (Fri, 19 Oct 2007)
New Revision: 1316

Added:
   MOAB/trunk/CMakeLists.txt
   MOAB/trunk/cmake/
   MOAB/trunk/cmake/AutoconfHeader.cmake
   MOAB/trunk/cmake/FindCGM.cmake
   MOAB/trunk/cmake/FindHDF5.cmake
   MOAB/trunk/cmake/Findgraphviz.cmake
   MOAB/trunk/config.h.cmake
   MOAB/trunk/tools/dagmc/CMakeLists.txt
Log:
ENH: First cut at CMake configuration as an alternative to autoconf (the
     autoconf stuff is not going away). Since config.h.in isn't in the
     repository, I'm adding config.h.cmake based on config.h.in as
     generated on my system. The other ".h.in" files are used by CMake
     as-is. Only the MOAB library and optionally DagMC are built at this
     point. If you choose to build DagMC, you should set CGM_SOURCE_DIR
     and CGM_BINARY_DIR variables (they are marked as "advanced" in
     CMake). If you have any problems with CMake, please let me know. 


Added: MOAB/trunk/CMakeLists.txt
===================================================================
--- MOAB/trunk/CMakeLists.txt	                        (rev 0)
+++ MOAB/trunk/CMakeLists.txt	2007-10-20 00:02:19 UTC (rev 1316)
@@ -0,0 +1,216 @@
+project( MOAB )
+
+  set ( MOAB_VERSION_MAJOR 3 )
+  set ( MOAB_VERSION_MINOR 0 )
+  # Define this for release versions. Undefine it for beta versions.
+  #set ( MOAB_VERSION_PATCH 0 )
+
+  set ( MOAB_VERSION_STRING "${MOAB_VERSION_MAJOR}" )
+  if ( DEFINED MOAB_VERSION_MINOR )
+    set ( MOAB_VERSION_STRING "${MOAB_VERSION_STRING}.${MOAB_VERSION_MINOR}" )
+    if ( DEFINED MOAB_VERSION_PATCH )
+      set ( MOAB_VERSION_STRING "${MOAB_VERSION_STRING}.${MOAB_VERSION_PATCH}" )
+    else ( DEFINED MOAB_VERSION_PATCH )
+      set ( MOAB_VERSION_STRING "${MOAB_VERSION_STRING} (Beta)" )
+    endif ( DEFINED MOAB_VERSION_PATCH )
+  endif ( DEFINED MOAB_VERSION_MINOR )
+
+  set ( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${MOAB_SOURCE_DIR}/cmake" )
+  set ( EXECUTABLE_OUTPUT_PATH ${MOAB_BINARY_DIR}/bin CACHE PATH "Path to executables" FORCE )
+  set ( LIBRARY_OUTPUT_PATH    ${MOAB_BINARY_DIR}/bin CACHE PATH "Path to libraries"   FORCE )
+  mark_as_advanced(
+    EXECUTABLE_OUTPUT_PATH
+    LIBRARY_OUTPUT_PATH
+  )
+
+  include ( CheckIncludeFile )
+  include ( CheckFunctionExists )
+  include ( CheckTypeSize )
+
+  # Shared libraries
+  option ( BUILD_SHARED_LIBS "Should shared or static libraries be created?" ON )
+
+  # HANDLE SIZE
+  option ( MOAB_FORCE_64_BIT_HANDLES "Force MBEntityHandle to be 64 bits (uint64_t)" OFF )
+  option ( MOAB_FORCE_32_BIT_HANDLES "Force MBEntityHandle to be 32 bits (uint32_t)" OFF )
+  mark_as_advanced(
+    MOAB_FORCE_64_BIT_HANDLES
+    MOAB_FORCE_32_BIT_HANDLES
+  )
+
+  if ( MOAB_FORCE_64_BIT_HANDLES AND MOAB_FORCE_32_BIT_HANDLES )
+    message( FATAL_ERROR
+      "You may not turn both MOAB_FORCE_64_BIT_HANDLES and MOAB_FORCE_32_BIT_HANDLES on. Turn one off to continue."
+    )
+  endif ( MOAB_FORCE_64_BIT_HANDLES AND MOAB_FORCE_32_BIT_HANDLES )
+
+  check_include_file( inttypes.h   MOAB_HAVE_INTTYPES_H )
+  check_include_file( stdint.h     MOAB_HAVE_STDINT_H )
+  check_include_file( stddef.h     MOAB_HAVE_STDDEF_H )
+  check_include_file( stdlib.h     MOAB_HAVE_STDLIB_H )
+  check_include_file( sys/types.h  MOAB_HAVE_SYS_TYPES_H )
+  set( HAVE_SYS_TYPES_H ${MOAB_HAVE_SYS_TYPES_H} )
+  set( HAVE_STDDEF_H    ${MOAB_HAVE_STDDEF_H} )
+  set( HAVE_STDINT_H    ${MOAB_HAVE_STDINT_H} )
+  set( HAVE_INTTYPES_H    ${MOAB_HAVE_INTTYPES_H} )
+  set( HAVE_STDLIB_H    ${MOAB_HAVE_STDLIB_H} )
+  check_include_file( memory.h     HAVE_MEMORY_H )
+
+  if ( NOT MOAB_FORCE_64_BIT_HANDLES AND NOT MOAB_FORCE_32_BIT_HANDLES )
+    if ( MOAB_HAVE_INTTYPES_H )
+      set ( CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};inttypes.h" )
+    endif ( MOAB_HAVE_INTTYPES_H )
+    if ( MOAB_HAVE_STDLIB_H )
+      set ( CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};stdlib.h" )
+      #set ( CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}\n#include <stdlib.h>\n" )
+    endif ( MOAB_HAVE_STDLIB_H )
+    check_type_size(  size_t       HAVE_SIZE_T )
+    check_type_size(  ptrdiff_t    HAVE_PTRDIFF_T )
+    set ( MOAB_HAVE_SIZE_T ${HAVE_SIZE_T} )
+    set ( MOAB_HAVE_PTRDIFF_T ${HAVE_PTRDIFF_T} )
+  endif ( NOT MOAB_FORCE_64_BIT_HANDLES AND NOT MOAB_FORCE_32_BIT_HANDLES )
+
+  # MPI
+  option ( MOAB_USE_MPI "Should MOAB be compiled with MPI support?" OFF )
+  if ( MOAB_USE_MPI )
+    find_package( MPI )
+  endif ( MOAB_USE_MPI )
+
+  # HDF5
+  find_package( HDF5 )
+  if ( HDF5_FOUND )
+    check_function_exists( H5Pset_fapl_mpio MOAB_HDF_HAVE_PARALLEL )
+  endif ( HDF5_FOUND )
+  # NetCDF
+  # Documentation
+  # Optional tools
+  option ( MOAB_BUILD_MBCONVERT    "Build the MOAB mesh converter tool?"  ON )
+  option ( MOAB_BUILD_HEXMODOPS    "Build the hexahedral modops tool?"    ON )
+  option ( MOAB_BUILD_MBCHACO      "Build MOAB Chaco interface?"          OFF )
+  option ( MOAB_BUILD_MBPERF       "Build the MOAB performance tool?"     ON )
+  option ( MOAB_BUILD_QVDUAL       "Build the qvdual application?"        OFF )
+  option ( MOAB_BUILD_MBSIZE       "Build the mbsize tool?"               ON )
+  option ( MOAB_BUILD_MBSKIN       "Build the mbskin tool?"               ON )
+  option ( MOAB_BUILD_MBTAGPROP    "Build the mbtagprop tool?"            ON )
+  option ( MOAB_BUILD_SPHEREDECOMP "Build the sphere decomposition tool?" ON )
+  option ( MOAB_BUILD_MBSURFPLOT   "Build the mbsurfplot application?"    ON )
+  option ( MOAB_BUILD_MBZOLTAN     "Build the mbzoltan partitioner?"      OFF )
+  option ( MOAB_BUILD_DAGMC        "Build the dagmc tool?"                ON )
+  # iMesh
+  option ( MOAB_BUILD_IMESH        "Build the iMesh interface?"           ON )
+
+  include( ${MOAB_SOURCE_DIR}/cmake/AutoconfHeader.cmake )
+  # Define some more variables so they will be substituted properly in the autoconf files.
+  set( MB_VERSION_MAJOR  ${MOAB_VERSION_MAJOR} )
+  set( MB_VERSION_MINOR  ${MOAB_VERSION_MINOR} )
+  set( MB_VERSION_PATCH  ${MOAB_VERSION_PATCH} )
+  set( MB_VERSION_STRING "\"${MOAB_VERSION_STRING}\"" )
+
+  # Best we can do for now since there's no config.h.in in the repository...
+  configure_file( ${MOAB_SOURCE_DIR}/config.h.cmake      ${MOAB_BINARY_DIR}/config.h )
+  # ... but the line below is what should *really* happen
+  #autoconf_header( ${MOAB_SOURCE_DIR}/config.h.in ${MOAB_BINARY_DIR}/config.h )
+
+  autoconf_header( ${MOAB_SOURCE_DIR}/MBVersion.h.in ${MOAB_BINARY_DIR}/MBVersion.h )
+  autoconf_header( ${MOAB_SOURCE_DIR}/MBEntityHandle.h.in ${MOAB_BINARY_DIR}/MBEntityHandle.h )
+
+  # MOAB Library
+  set ( MOAB_LIB_SRCS
+    AEntityFactory.cpp
+    DenseTagCollections.cpp
+    DualTool.cpp
+    EntitySequence.cpp
+    EntitySequenceManager.cpp
+    ExoIIUtil.cpp
+    FileOptions.cpp
+    FileTokenizer.cpp
+    GeomTopoTool.cpp
+    HigherOrderFactory.cpp
+    HomXform.cpp
+    MBAdaptiveKDTree.cpp
+    MBAffineXform.cpp
+    MBAlloc.cpp
+    MBAxisBox.cpp
+    MBBits.cpp
+    MBCN.cpp
+    MBCartVect.cpp
+    MBHandleUtils.cpp
+    MBMatrix3.cpp
+    MBCore.cpp
+    MBFactory.cpp
+    MBGeomUtil.cpp
+    MBMeshSet.cpp
+    MBOrientedBox.cpp
+    MBOrientedBoxTreeTool.cpp
+    MBRange.cpp
+    MBRangeSeqIntersectIter.cpp
+    MBReadUtil.cpp
+    MBReaderWriterSet.cpp
+    MBSkinner.cpp
+    MBUtil.cpp
+    MBWriteUtil.cpp
+    MeshSetSequence.cpp
+    MeshTopoUtil.cpp
+    PolyEntitySequence.cpp
+    ReadGmsh.cpp
+    ReadSTL.cpp
+    ReadVtk.cpp
+    ScdElementSeq.cpp
+    ScdVertexSeq.cpp
+    SparseTagCollections.cpp
+    TagServer.cpp
+    Tqdcfr.cpp
+    VtkUtil.cpp
+    WriteAns.cpp
+    WriteGMV.cpp
+    WriteGmsh.cpp
+    WriteSTL.cpp
+    WriteTemplate.cpp
+    WriteVtk.cpp
+  )
+  set_source_files_properties( ${MOAB_LIB_SRCS}
+    COMPILE_FLAGS "-DIS_BUILDING_MB"
+  )
+  include_directories(
+    ${MOAB_SOURCE_DIR}
+    ${MOAB_BINARY_DIR}
+  )
+  add_library( moab
+    ${MOAB_LIB_SRCS}
+  )
+
+  if ( MOAB_USE_HDF )
+    set ( MOAB_MHDF_LIB_SRCS
+      ReadHDF5.cpp
+      WriteHDF5.cpp
+    )
+    include_directories(
+      ${HDF5_INCLUDE_DIRECTORIES}
+      ${MOAB_SOURCE_DIR}/mhdf/include
+    )
+    add_library( mhdf
+      ${MOAB_MHDF_LIB_SRCS}
+    )
+    target_link_libraries( mdf
+      ${HDF5_LIBRARIES}
+    )
+  endif ( MOAB_USE_HDF )
+
+  ## Tools/libraries dependent on MOAB:
+
+  # Zoltan
+  # Chaco
+
+  # QVDual
+  if ( MOAB_BUILD_QVDUAL )
+    add_subdirectory( tools/qvdual )
+  endif ( MOAB_BUILD_QVDUAL )
+
+  # CGM
+  if ( MOAB_BUILD_DAGMC )
+    add_subdirectory( tools/dagmc )
+  endif ( MOAB_BUILD_DAGMC )
+
+  # iMesh Babel
+
+

Added: MOAB/trunk/cmake/AutoconfHeader.cmake
===================================================================
--- MOAB/trunk/cmake/AutoconfHeader.cmake	                        (rev 0)
+++ MOAB/trunk/cmake/AutoconfHeader.cmake	2007-10-20 00:02:19 UTC (rev 1316)
@@ -0,0 +1,22 @@
+macro ( autoconf_header INFILE OUTFILE )
+
+file( READ ${INFILE} autoconf_HEADER_IN )
+
+string( REGEX MATCHALL "#undef ([^\n]*)" autoconf_VARS "${autoconf_HEADER_IN}" )
+set( autoconf_HEADER "${autoconf_HEADER_IN}" )
+foreach ( VAR ${autoconf_VARS} )
+  string ( REGEX REPLACE "#undef (.*)" "\\1" VAR "${VAR}" )
+  # CMake variables should usually be left undefined if they are blank or 0...
+  if ( ${VAR} )
+    string( REGEX REPLACE "#undef ${VAR}\n" "#define ${VAR} ${${VAR}}\n" autoconf_HEADER "${autoconf_HEADER}" )
+  endif ( ${VAR} )
+  # ... but always define version numbers, even if they have "0" as a value
+  if ( \"${VAR}\" MATCHES ".*VERSION.*" )
+    string( REGEX REPLACE "#undef ${VAR}\n" "#define ${VAR} ${${VAR}}\n" autoconf_HEADER "${autoconf_HEADER}" )
+  endif ( \"${VAR}\" MATCHES ".*VERSION.*" )
+endforeach ( VAR )
+string( CONFIGURE "${autoconf_HEADER}"  autoconf_HEADER_OUT )
+
+file( WRITE ${OUTFILE} "${autoconf_HEADER_OUT}" )
+
+endmacro( autoconf_header )

Added: MOAB/trunk/cmake/FindCGM.cmake
===================================================================
--- MOAB/trunk/cmake/FindCGM.cmake	                        (rev 0)
+++ MOAB/trunk/cmake/FindCGM.cmake	2007-10-20 00:02:19 UTC (rev 1316)
@@ -0,0 +1,138 @@
+# Find the common geometry module libraries
+
+if ( NOT CGM_SOURCE_DIR )
+  find_path( CGM_SOURCE_DIR
+    NAMES geom/CubitGeomConfigure.h.in
+    PATHS
+      ${CGM_INCLUDE_DIRECTORIES}
+  )
+endif ( NOT CGM_SOURCE_DIR )
+
+if ( NOT CGM_BINARY_DIR )
+  if ( CGM_LIBRARIES )
+    set( CGM_BUILD_SEARCH "" )
+    foreach ( LIB ${CGM_LIBRARIES} )
+      get_filename_component( PATH DIR ${LIB} )
+      set( CGM_BUILD_SEARCH "${CGM_BUILD_SEARCH};${DIR}/.." )
+    endforeach ( DIR )
+    set( DIR )
+  endif ( CGM_LIBRARIES )
+  find_path( CGM_BINARY_DIR
+    NAMES geom/CubitGeomConfigure.h
+    PATHS
+      ${CGM_BUILD_SEARCH}
+  )
+endif ( NOT CGM_BINARY_DIR )
+
+if ( NOT CGM_LIBRARIES )
+  set( CGM_LIBSEARCH
+    ${CGM_BINARY_DIR}/init
+    ${CGM_BINARY_DIR}/geom/virtual
+    ${CGM_BINARY_DIR}/geom/facetbool
+    ${CGM_BINARY_DIR}/geom/facet
+    ${CGM_BINARY_DIR}/geom/Cholla
+    ${CGM_BINARY_DIR}/geom
+    ${CGM_BINARY_DIR}/util
+    /usr/local/lib64
+    /usr/local/bin64
+    /usr/lib64
+    /usr/bin64
+    /usr/local/lib
+    /usr/local/bin
+    /usr/lib
+    /usr/bin
+  )
+  find_library( CGM_UTIL_LIBRARY
+    NAMES cubit_util
+    PATHS ${CGM_LIBSEARCH}
+  )
+
+  find_library( CGM_GEOM_LIBRARY
+    NAMES cubit_geom
+    PATHS ${CGM_LIBSEARCH}
+  )
+
+  find_library( CGM_CHOLLA_LIBRARY
+    NAMES cholla
+    PATHS ${CGM_LIBSEARCH}
+  )
+
+  find_library( CGM_FACET_LIBRARY
+    NAMES cubit_facet
+    PATHS ${CGM_LIBSEARCH}
+  )
+
+  find_library( CGM_FACETBOOL_LIBRARY
+    NAMES cubit_facetboolstub
+    PATHS ${CGM_LIBSEARCH}
+  )
+
+  find_library( CGM_VIRTUAL_LIBRARY
+    NAMES cubit_virtual
+    PATHS ${CGM_LIBSEARCH}
+  )
+
+  find_library( CGM_INIT_LIBRARY
+    NAMES cgma_init
+    PATHS ${CGM_LIBSEARCH}
+  )
+endif ( NOT CGM_LIBRARIES )
+
+if ( CGM_SOURCE_DIR AND CGM_BINARY_DIR AND NOT CGM_INCLUDE_DIRECTORIES )
+  set( CGM_INCLUDE_DIRECTORIES
+    "${CGM_SOURCE_DIR}/util"
+    "${CGM_SOURCE_DIR}/geom"
+    "${cubit_geom_SOURCE_DIR}/ACIS"
+    "${cubit_geom_SOURCE_DIR}/Cholla"
+    "${cubit_geom_SOURCE_DIR}/facet"
+    "${cubit_geom_SOURCE_DIR}/facetbool"
+    "${cubit_geom_SOURCE_DIR}/OCC"
+    "${cubit_geom_SOURCE_DIR}/parallel"
+    "${cubit_geom_SOURCE_DIR}/SolidWorks"
+    "${cubit_geom_SOURCE_DIR}/virtual"
+    "${CGM_BINARY_DIR}/util"
+    "${CGM_BINARY_DIR}/geom"
+    CACHE PATH "Paths to util/CubitUtilConfigure.h.in, util/CubitUtilConfigure.h, geom/CubitGeomConfigure.h.in, AND geom/CubitGeomConfigure.h files." FORCE
+  )
+endif ( CGM_SOURCE_DIR AND CGM_BINARY_DIR AND NOT CGM_INCLUDE_DIRECTORIES )
+
+if ( CGM_UTIL_LIBRARY AND CGM_GEOM_LIBRARY AND CGM_INIT_LIBRARY AND NOT CGM_LIBRARIES )
+  # Link to libdl in case shared libraries are used.
+  set( CGM_LIBRARIES
+    "${CGM_INIT_LIBRARY}"
+    "${CGM_CHOLLA_LIBRARY}"
+    "${CGM_FACETBOOL_LIBRARY}"
+    "${CGM_FACET_LIBRARY}"
+    "${CGM_VIRTUAL_LIBRARY}"
+    "${CGM_GEOM_LIBRARY}"
+    "${CGM_UTIL_LIBRARY}"
+    dl
+    CACHE FILEPATH "Full paths to cubit_util AND cubit_geom libraries." FORCE
+  )
+endif ( CGM_UTIL_LIBRARY AND CGM_GEOM_LIBRARY AND CGM_INIT_LIBRARY AND NOT CGM_LIBRARIES )
+
+mark_as_advanced(
+  CGM_SOURCE_DIR
+  CGM_BINARY_DIR
+  CGM_INCLUDE_DIRECTORIES
+  CGM_LIBRARIES
+  CGM_UTIL_LIBRARY
+  CGM_GEOM_LIBRARY
+  CGM_INIT_LIBRARY
+  CGM_CHOLLA_LIBRARY
+  CGM_FACETBOOL_LIBRARY
+  CGM_FACET_LIBRARY
+  CGM_VIRTUAL_LIBRARY
+)
+
+if ( NOT CGM_INCLUDE_DIRECTORIES OR NOT CGM_LIBRARIES )
+  set( CGM_INCLUDE_DIRECTORIES "" CACHE PATH "Paths to util/CubitUtilConfigure.h.in, util/CubitUtilConfigure.h, geom/CubitGeomConfigure.h.in, AND geom/CubitGeomConfigure.h files." )
+  set( CGM_LIBRARIES           "" CACHE PATH "Paths to cubit_util AND cubit_geom libraries." )
+  set( CGM_FOUND 0 )
+  if ( CGM_FIND_REQUIRED )
+    message( FATAL_ERROR "CGM is required. Please set CGM_INCLUDE_DIRECTORIES and CGM_LIBRARIES or set CGM_SOURCE_DIR and CGM_BINARY_DIR" )
+  endif ( CGM_FIND_REQUIRED )
+else ( NOT CGM_INCLUDE_DIRECTORIES OR NOT CGM_LIBRARIES )
+  set( CGM_FOUND 1 )
+endif ( NOT CGM_INCLUDE_DIRECTORIES OR NOT CGM_LIBRARIES )
+

Added: MOAB/trunk/cmake/FindHDF5.cmake
===================================================================
--- MOAB/trunk/cmake/FindHDF5.cmake	                        (rev 0)
+++ MOAB/trunk/cmake/FindHDF5.cmake	2007-10-20 00:02:19 UTC (rev 1316)
@@ -0,0 +1,23 @@
+#
+# Find the native HDF5 includes and library
+#
+# HDF5_INCLUDE_DIR - where to find H5public.h, etc.
+# HDF5_LIBRARIES   - List of fully qualified libraries to link against when using hdf5.
+# HDF5_FOUND       - Do not attempt to use hdf5 if "no" or undefined.
+
+FIND_PATH(HDF5_INCLUDE_DIR H5public.h
+  /usr/local/include
+  /usr/include
+)
+
+FIND_LIBRARY(HDF5_LIBRARY hdf5
+  /usr/local/lib
+  /usr/lib
+)
+
+IF(HDF5_INCLUDE_DIR)
+  IF(HDF5_LIBRARY)
+    SET( HDF5_LIBRARIES ${HDF5_LIBRARY} )
+    SET( HDF5_FOUND "YES" )
+  ENDIF(HDF5_LIBRARY)
+ENDIF(HDF5_INCLUDE_DIR)

Added: MOAB/trunk/cmake/Findgraphviz.cmake
===================================================================
--- MOAB/trunk/cmake/Findgraphviz.cmake	                        (rev 0)
+++ MOAB/trunk/cmake/Findgraphviz.cmake	2007-10-20 00:02:19 UTC (rev 1316)
@@ -0,0 +1,79 @@
+
+if ( NOT WIN32 )
+
+  find_package(PkgConfig)
+  pkg_check_modules( graphviz ${REQUIRED} libgvc libagraph libcdt libgraph libpathplan )
+  if ( graphviz_FOUND )
+    set ( graphviz_INCLUDE_DIRECTORIES ${graphviz_INCLUDE_DIRS} )
+  endif ( graphviz_FOUND )
+
+endif ( NOT WIN32 )
+
+find_path( graphviz_INCLUDE_DIRECTORIES
+  NAMES gvc.h
+  PATHS
+    ${graphviz_INCLUDE_DIRS}
+    /usr/local/include
+    /usr/include
+)
+
+find_library( graphviz_AGRAPH_LIBRARY
+  NAMES agraph 
+  PATHS
+    ${graphviz_LIBRARY_DIRS}
+    /usr/local/lib64
+    /usr/lib64
+    /usr/local/lib
+    /usr/lib
+)
+find_library( graphviz_GVC_LIBRARY
+  NAMES gvc 
+  PATHS
+    ${graphviz_LIBRARY_DIRS}
+    /usr/local/lib64
+    /usr/lib64
+    /usr/local/lib
+    /usr/lib
+)
+find_library( graphviz_CDT_LIBRARY
+  NAMES cdt 
+  PATHS
+    ${graphviz_LIBRARY_DIRS}
+    /usr/local/lib64
+    /usr/lib64
+    /usr/local/lib
+    /usr/lib
+)
+find_library( graphviz_GRAPH_LIBRARY
+  NAMES graph 
+  PATHS
+    ${graphviz_LIBRARY_DIRS}
+    /usr/local/lib64
+    /usr/lib64
+    /usr/local/lib
+    /usr/lib
+)
+find_library( graphviz_PATHPLAN_LIBRARY
+  NAMES pathplan 
+  PATHS
+    ${graphviz_LIBRARY_DIRS}
+    /usr/local/lib64
+    /usr/lib64
+    /usr/local/lib
+    /usr/lib
+)
+if ( graphviz_INCLUDE_DIRECTORIES AND graphviz_AGRAPH_LIBRARY AND
+     graphviz_GVC_LIBRARY AND graphviz_CDT_LIBRARY AND
+     graphviz_GRAPH_LIBRARY AND graphviz_PATHPLAN_LIBRARY )
+  set ( graphviz_FOUND 1 )
+  set ( graphviz_LIBRARIES
+    "${graphviz_GVC_LIBRARY};${graphviz_AGRAPH_LIBRARY};${graphviz_GRAPH_LIBRARY};"
+    "${graphviz_CDT_LIBRARY};${graphviz_PATHPLAN_LIBRARY}"
+    CACHE FILEPATH "Libraries for graphviz" )
+else ( graphviz_INCLUDE_DIRECTORIES AND graphviz_AGRAPH_LIBRARY AND
+       graphviz_GVC_LIBRARY AND graphviz_CDT_LIBRARY AND
+       graphviz_GRAPH_LIBRARY AND graphviz_PATHPLAN_LIBRARY )
+  set ( graphviz_FOUND 0 )
+endif ( graphviz_INCLUDE_DIRECTORIES AND graphviz_AGRAPH_LIBRARY AND
+        graphviz_GVC_LIBRARY AND graphviz_CDT_LIBRARY AND
+        graphviz_GRAPH_LIBRARY AND graphviz_PATHPLAN_LIBRARY )

Added: MOAB/trunk/config.h.cmake
===================================================================
--- MOAB/trunk/config.h.cmake	                        (rev 0)
+++ MOAB/trunk/config.h.cmake	2007-10-20 00:02:19 UTC (rev 1316)
@@ -0,0 +1,159 @@
+/* config.h.cmake.  Generated from thin air by dcthomp.  */
+
+/* Define to dummy `main' function (if any) required to link to the Fortran
+   libraries. */
+#undef FC_DUMMY_MAIN
+
+/* Define if F77 and FC dummy `main' functions are identical. */
+#undef FC_DUMMY_MAIN_EQ_F77
+
+/* Define to a macro mangling the given C identifier (in lower and upper
+   case), which must not contain underscores, for linking with Fortran. */
+#undef FC_FUNC
+
+/* As FC_FUNC, but for C identifiers containing underscores. */
+#undef FC_FUNC_
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <gvc.h> header file. */
+#undef HAVE_GVC_H
+
+/* Define to 1 if you have the <hdf5.h> header file. */
+#cmakedefine HDF5_FOUND
+#ifdef HDF5_FOUND
+#  define HAVE_HDF5_H
+#endif /* HDF5_FOUND */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `chaco' library (-lchaco). */
+#cmakedefine HAVE_LIBCHACO
+
+/* Define to 1 if you have the `gvc' library (-lgvc). */
+#cmakedefine HAVE_LIBGVC
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H
+
+/* Define to 1 if you have the <netcdf.h> header file. */
+#cmakedefine HAVE_NETCDF_H
+
+/* Define to 1 if you have the <qapplication.h> header file. */
+#cmakedefine HAVE_QAPPLICATION_H
+
+/* Define to 1 if you have the <qevent.h> header file. */
+#cmakedefine HAVE_QEVENT_H
+
+/* Define to 1 if you have the <qlineedit.h> header file. */
+#cmakedefine HAVE_QLINEEDIT_H
+
+/* Define to 1 if you have the <qmetaobject.h> header file. */
+#cmakedefine HAVE_QMETAOBJECT_H
+
+/* Define to 1 if you have the <qobject.h> header file. */
+#cmakedefine HAVE_QOBJECT_H
+
+/* Define to 1 if you have the <qpixmap.h> header file. */
+#cmakedefine HAVE_QPIXMAP_H
+
+/* Define to 1 if you have the <qtimer.h> header file. */
+#cmakedefine HAVE_QTIMER_H
+
+/* Define to 1 if you have the <qwidgetplugin.h> header file. */
+#cmakedefine HAVE_QWIDGETPLUGIN_H
+
+/* Define to 1 if you have the <qwidget.h> header file. */
+#cmakedefine HAVE_QWIDGET_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H
+
+/* MOAB Version */
+#define MB_VERSION @MOAB_VERSION@
+
+/* MOAB Major Version */
+#define MB_VERSION_MAJOR @MOAB_VERSION_MAJOR@
+
+/* MOAB Minor Version */
+#define MB_VERSION_MINOR @MOAB_VERSION_MINOR@
+
+/* MOAB Patch Level */
+#define MB_VERSION_PATCH @MOAB_VERSION_PATCH@
+
+/* MOAB Version String */
+#define MB_VERSION_STRING "@MOAB_VERSION_STRING@"
+
+/* Use int32_t for handles */
+#cmakedefine MOAB_FORCE_32_BIT_HANDLES
+
+/* Use int64_t for handles */
+#cmakedefine MOAB_FORCE_64_BIT_HANDLES
+
+/* MOAB qualified HAVE_INTTYPES_H */
+#cmakedefine MOAB_HAVE_INTTYPES_H
+
+/* System provides ptrdiff_t typedef */
+#cmakedefine MOAB_HAVE_PTRDIFF_T
+
+/* System provides size_t typedef */
+#cmakedefine MOAB_HAVE_SIZE_T
+
+/* MOAB qualified HAVE_STDDEF_H */
+#cmakedefine MOAB_HAVE_STDDEF_H
+
+/* MOAB qualified HAVE_STDINT_H */
+#cmakedefine MOAB_HAVE_STDINT_H
+
+/* MOAB qualified HAVE_STDLIB_H */
+#cmakedefine MOAB_HAVE_STDLIB_H
+
+/* MOAB qualified HAVE_SYS_TYPES_H */
+#cmakedefine MOAB_HAVE_SYS_TYPES_H
+
+/* Name of package */
+#define PACKAGE "${PROJECT_NAME}"
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "${PROJECT_NAME}"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "${PROJECT_NAME} ${${PROJECT_NAME}_VERSION_STRING}"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "${PROJECT_NAME}"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "${${PROJECT_NAME}_VERSION_STRING}"
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING

Added: MOAB/trunk/tools/dagmc/CMakeLists.txt
===================================================================
--- MOAB/trunk/tools/dagmc/CMakeLists.txt	                        (rev 0)
+++ MOAB/trunk/tools/dagmc/CMakeLists.txt	2007-10-20 00:02:19 UTC (rev 1316)
@@ -0,0 +1,60 @@
+# Find CGM directory
+find_package( CGM )
+
+include_directories(
+  ${CMAKE_CURRENT_BINARY_DIR}
+  ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+set( MOAB_DAGMC_LIB_SRCS
+  DagMC.cpp
+)
+
+set( MOAB_TEST_GEOM_SRCS
+  test_geom.cc
+)
+
+if ( CGM_FOUND )
+  set( MOAB_DAGMC_LIB_SRCS
+    ${MOAB_DAGMC_LIB_SRCS}
+    cgm2moab.cc
+  )
+  set( MOAB_DAGMC_SRCS
+    main.cc
+    cubfile.c
+  )
+  include_directories(
+    ${CGM_INCLUDE_DIRECTORIES}
+  )
+endif ( CGM_FOUND )
+
+add_library( dagmc
+  ${MOAB_DAGMC_LIB_SRCS}
+)
+target_link_libraries( dagmc
+  moab
+)
+
+add_executable( test_geom
+  ${MOAB_TEST_GEOM_SRCS}
+)
+target_link_libraries( test_geom
+  dagmc
+  moab
+)
+
+if ( CGM_FOUND )
+  target_link_libraries( dagmc
+    ${CGM_LIBRARIES}
+  )
+  target_link_libraries( test_geom
+    ${CGM_LIBRARIES}
+  )
+  add_executable( cgm2moab
+    ${MOAB_DAGMC_SRCS}
+  )
+  target_link_libraries( cgm2moab
+    dagmc
+    ${CGM_LIBRARIES}
+  )
+endif ( CGM_FOUND )




More information about the moab-dev mailing list