Commit 5c56f9fe authored by vijaysm's avatar vijaysm
Browse files

Enable MOAB integration with CGM source/build repository directly.

parent d6359d5c
......@@ -745,6 +745,7 @@ EXPORT_LDFLAGS="$ZOLTAN_LIB_FLAGS $EXPORT_LDFLAGS"
################################################################################
# CGM
################################################################################
USING_DEV_CGM=no
AC_ARG_WITH(cgm,
[AS_HELP_STRING([--with-cgm=DIR],[Specify directory containing CGM])],
[CGM_DIR=$withval
......@@ -767,7 +768,7 @@ case "x$CGM_DIR" in
AC_CHECK_FILE([${CGM_DIR}/lib/cgm.make],
[CGM_MAKE="${CGM_DIR}/lib/cgm.make"],
[AC_CHECK_FILE([${CGM_DIR}/cgm.make],
[CGM_MAKE="${CGM_DIR}/cgm.make"],
[CGM_MAKE="${CGM_DIR}/cgm.make"; USING_DEV_CGM=yes],
[AC_MSG_ERROR([$CGM_DIR : not a configured CGM]);
CGM_MISSING=yes])
])
......@@ -851,6 +852,7 @@ fi
AC_MSG_CHECKING([if iRel support is to be built])
AC_MSG_RESULT([$ENABLE_irel])
AM_CONDITIONAL([ENABLE_irel],[test "xyes" = "x$ENABLE_irel"])
if test "x$ENABLE_irel" = "xyes"; then
if (test "x$ENABLE_imesh" != "xyes" || test "x$CGM_MISSING" != "xno"); then
AC_MSG_ERROR([Cannot build iRel API. Enable both iGeom (CGM) and iMesh implementations.])
......@@ -861,9 +863,9 @@ if test "x$ENABLE_irel" = "xyes"; then
[IGEOM_CONFIG_OPTIONS="include ${CGM_DIR}/lib/iGeom-Defs.inc";
FATHOM_MAKE_INC_VAR([${CGM_DIR}/lib/iGeom-Defs.inc],[IGEOM_DEFINES], [IGEOM_DEFINES="$make_val"],
[IGEOM_DEFINES=]) ],
[AC_CHECK_FILE([${CGM_DIR}/iGeom-Defs.inc],
[IGEOM_CONFIG_OPTIONS="include ${CGM_DIR}/iGeom-Defs.inc"],
[AC_MSG_WARN([$CGM_DIR : not a configured iGeom])]
[AC_CHECK_FILE([${CGM_DIR}/itaps/iGeom-Defs.inc],
[IGEOM_CONFIG_OPTIONS="include ${CGM_DIR}/itaps/iGeom-Defs.inc"],
[AC_MSG_WARN([$CGM_DIR : iGeom is not configured correctly])]
)
])
AC_SUBST(IGEOM_DEFINES)
......@@ -879,6 +881,7 @@ test "x$ENABLE_irel" != "xyes" || HAVE_IREL="yes"
AC_SUBST(HAVE_IGEOM)
AC_SUBST(HAVE_IMESH)
AC_SUBST(HAVE_IREL)
AM_CONDITIONAL([USING_DEV_CGM],[test "xyes" = "x$USING_DEV_CGM"])
###############################################################################
# Optional Tools
......
......@@ -65,10 +65,16 @@ if HAVE_CGM
libiRel_la_SOURCES += \
GeomAssocPairSide.cpp \
GeomAssocPairSide.hpp
if USING_DEV_CGM
libiRel_la_LIBADD += \
${IGEOM_LTFLAGS} ${IGEOM_LDFLAGS} ${CGM_DIR}/itaps/libiGeom.la
TEST_DEPS += ${CGM_DIR}/itaps/libiGeom.la
else
libiRel_la_LIBADD += \
${IGEOM_LTFLAGS} ${IGEOM_LDFLAGS} ${CGM_DIR}/lib/libiGeom.la
LIBS += ${CGM_LIBS}
TEST_DEPS += ${CGM_DIR}/lib/libiGeom.la
endif
LIBS += ${CGM_LIBS}
endif
TEST_DEPS += ${MOAB_CXX_LINKFLAGS} ${MOAB_CXX_LIBS}
......
......@@ -97,7 +97,10 @@ else
endif
if HAVE_CGM
AM_CPPFLAGS += @CGM_CPPFLAGS@
AM_CPPFLAGS += @CGM_CPPFLAGS@
if USING_DEV_CGM
AM_CPPFLAGS += -I$(CGM_DIR)/src
endif
MOAB_CGM_SRCS = ReadCGM.cpp ReadCGM.hpp
libmoabio_la_LIBADD += @CGM_LIBS@
else
......
......@@ -12,8 +12,12 @@ endif
if HAVE_CGM
AM_CPPFLAGS += $(CGM_CPPFLAGS)
if USING_DEV_CGM
LDADD+= ${CGM_DIR}/src/libcgm.la
else
LDADD+= ${CGM_DIR}/lib/libcgm.la
endif
endif
endif
# For old (pre 1.10.x) versions of Automake
docdir = @docdir@
......
......@@ -34,7 +34,11 @@ CGM_LIBS = @CGM_LIBS@
LDADD = libdagmc.la $(top_builddir)/src/libMOAB.la
if HAVE_CGM
LDADD += $(CGM_DIR)/lib/libcgm.la
if USING_DEV_CGM
LDADD += $(CGM_DIR)/src/libcgm.la
else
LDADD += $(CGM_DIR)/lib/libcgm.la
endif
endif
TESTS =
......
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