[cgma-dev] r2213 - in cgm/trunk: . itaps

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Nov 5 12:25:52 CST 2008


Author: kraftche
Date: 2008-11-05 12:25:52 -0600 (Wed, 05 Nov 2008)
New Revision: 2213

Modified:
   cgm/trunk/configure.in
   cgm/trunk/itaps/Makefile.am
   cgm/trunk/itaps/testgeom.cc
Log:
Build testgeom with ACIS, build testgeom_occ with OCC

Modified: cgm/trunk/configure.in
===================================================================
--- cgm/trunk/configure.in	2008-11-05 18:24:06 UTC (rev 2212)
+++ cgm/trunk/configure.in	2008-11-05 18:25:52 UTC (rev 2213)
@@ -135,8 +135,8 @@
 AC_SUBST(CUBIT_CGM)
 
 AM_CONDITIONAL(BUILD_CGM,[test x"$CUBIT_DIR" == x"no"])
+AM_CONDITIONAL(WITH_CUBIT,[test x"$CUBIT_DIR" != x"no"])
 
-
 ################################################################################
 #                           ACIS OPTIONS
 ################################################################################

Modified: cgm/trunk/itaps/Makefile.am
===================================================================
--- cgm/trunk/itaps/Makefile.am	2008-11-05 18:24:06 UTC (rev 2212)
+++ cgm/trunk/itaps/Makefile.am	2008-11-05 18:25:52 UTC (rev 2213)
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = foreign
 
-DEFS = $(TEMPLATE_DEFS_INCLUDED) $(HAVE_ACIS_DEF) $(HAVE_OCC_DEF) 
+DEFS = $(TEMPLATE_DEFS_INCLUDED) $(HAVE_ACIS_DEF) $(HAVE_OCC_DEF)
 
 if USE_BABEL
   SIDL_DIR = SIDL
@@ -8,6 +8,19 @@
   SIDL_DIR = 
 endif 
 
+TESTS =
+if build_ACIS
+  TESTS += testgeom
+else
+  if WITH_CUBIT
+    TESTS += testgeom
+  endif
+endif
+if WITH_OCC
+  TESTS += testgeom_occ
+endif
+
+
 SUBDIRS = . $(SIDL_DIR)
 
 lib_LTLIBRARIES = libiGeom.la
@@ -19,7 +32,6 @@
 INCLUDES = -I$(top_srcdir)/util \
            -I$(top_srcdir)/geom \
 	   -I$(top_srcdir)/init \
-           -I$(top_srcdir)/geom/ACIS \
            -I.
 
 libiGeom_la_SOURCES = \
@@ -38,7 +50,6 @@
 	iBase_f.h \
 	iGeom_f.h
 
-TESTS = testgeom
 
 check_PROGRAMS = $(TESTS)
 
@@ -46,6 +57,10 @@
 testgeom_LDADD = libiGeom.la
 testgeom_CPPFLAGS = $(CPPFLAGS) -DSRCDIR=$(srcdir)
 testgeom_LDFLAGS = $(CGM_EXT_LTFLAGS)
+testgeom_occ_SOURCES = $(testgeom_SOURCES)
+testgeom_occ_LDADD = $(testgeom_LDADD)
+testgeom_occ_CPPFLAGS = $(testgeom_CPPFLAGS) -DFORCE_OCC
+testgeom_occ_LDFLAGS = $(testgeom_LDFLAGS)
 
 # Automake doesn't seem to have a directory defined for
 # platform-dependent data (or include) files. So put 

Modified: cgm/trunk/itaps/testgeom.cc
===================================================================
--- cgm/trunk/itaps/testgeom.cc	2008-11-05 18:24:06 UTC (rev 2212)
+++ cgm/trunk/itaps/testgeom.cc	2008-11-05 18:25:52 UTC (rev 2213)
@@ -116,7 +116,22 @@
 int main( int argc, char *argv[] )
 {
     // Check command line arg
-  std::string filename = STRINGIFY(SRCDIR) "/testgeom.sat";
+  #ifdef FORCE_OCC
+    #ifndef HAVE_OCC
+      #error "Cannot force use of OCC w/out OCC support"
+    #endif
+    std::string filename = STRINGIFY(SRCDIR) "/testgeom.brep";
+    std::string engine_opt = ";engine=OCC";
+  #elif defined(HAVE_ACIS)
+    std::string filename = STRINGIFY(SRCDIR) "/testgeom.sat";
+    std::string engine_opt = ";engine=ACIS";
+  #elif defined(USE_OCC)
+    std::string filename = STRINGIFY(SRCDIR) "/testgeom.brep";
+    std::string engine_opt = ";engine=OCC;
+  #else
+    std::string filename = STRINGIFY(SRCDIR) "/testgeom.sat";
+    std::string engine_opt;
+  #endif
   
   if (argc == 1) {
     std::cout << "Using default input file: " << filename << std::endl;
@@ -138,7 +153,7 @@
     // initialize the Mesh
   int err;
   iGeom_Instance geom;
-  iGeom_newGeom( 0, &geom, &err, 0 );
+  iGeom_newGeom( engine_opt.c_str(), &geom, &err, engine_opt.length() );
 
     // Print out Header information
   std::cout << "\n\nITAPS GEOMETRY INTERFACE TEST PROGRAM:\n\n";




More information about the cgma-dev mailing list