[cgma-dev] r3463 - cgm/trunk/test

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Fri Jan 22 09:19:40 CST 2010


Author: kraftche
Date: 2010-01-22 09:19:40 -0600 (Fri, 22 Jan 2010)
New Revision: 3463

Modified:
   cgm/trunk/test/Makefile.am
   cgm/trunk/test/brick.cpp
Log:
build brick test for each configured engine, and remove some redundant LDFLAGS stuff from Makefile.am

Modified: cgm/trunk/test/Makefile.am
===================================================================
--- cgm/trunk/test/Makefile.am	2010-01-22 15:17:29 UTC (rev 3462)
+++ cgm/trunk/test/Makefile.am	2010-01-22 15:19:40 UTC (rev 3463)
@@ -14,21 +14,22 @@
 
 TESTS = init sheet brick
 if build_ACIS
-  TESTS += webcut hollow_acis
+  TESTS += webcut hollow_acis brick_acis
 else
 if WITH_CUBIT
-  TESTS += webcut
+  TESTS += webcut brick_acis
 endif
 endif
 if build_OCC
-  TESTS += modify makept r_w test_occ operation
+  TESTS += modify makept r_w test_occ operation brick_occ
 endif
 
 AM_CPPFLAGS =
 AM_CPPFLAGS += -DSRCDIR=@srcdir@ $(HAVE_ACIS_DEF) $(HAVE_OCC_DEF)
 check_PROGRAMS = $(TESTS)
 
-LINK_FLAGS = $(CGM_EXT_LDFLAGS) $(CGM_EXT_LTFLAGS)
+LDADD = ../libcgm.la
+LDFLAGS += $(CGM_EXT_LDFLAGS) $(CGM_EXT_LTFLAGS)
 
 webcut_SOURCES = webcut.cpp
 hollow_acis_SOURCES = hollow_acis.cpp
@@ -38,20 +39,16 @@
 r_w_SOURCES    = r_w.cpp
 test_occ_SOURCES = test_occ.cpp
 operation_SOURCES = operation.cpp
-LDADD = ../libcgm.la
-webcut_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
-hollow_acis_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
-makept_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
-modify_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
-sheet_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
-r_w_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
-test_occ_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
-operation_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
-brick_SOURCES = brick.cpp
-brick_LDFLAGS = $(LDFLAGS) $(LINK_FLAGS)
 init_SOURCES = init.cpp
 init_LDFLAGS= $(LDFLAGS) $(LINK_FLAGS)
 
+brick_sources = brick.cpp
+brick_acis_SOURCES = $(brick_sources)
+brick_acis_CPPFLAGS = $(CPPFLAGS) '-DTEST_ENGINE="ACIS"'
+brick_occ_SOURCES = $(brick_sources)
+brick_occ_CPPFLAGS = $(CPPFLAGS) '-DTEST_ENGINE="OCC"'
+brick_facet_SOURCES = $(brick_sources)
+brick_facet_CPPFLAGS = $(CPPFLAGS) '-DTEST_ENGINE="FACET"'
 
 # Files that are used as input to tests, and therefore
 # must be included in tarball for tests to run.

Modified: cgm/trunk/test/brick.cpp
===================================================================
--- cgm/trunk/test/brick.cpp	2010-01-22 15:17:29 UTC (rev 3462)
+++ cgm/trunk/test/brick.cpp	2010-01-22 15:19:40 UTC (rev 3463)
@@ -20,6 +20,10 @@
  */
 
 
+#ifndef TEST_ENGINE
+# define TEST_ENGINE 0
+#endif
+
 void check_valid_edge( RefEdge* edge );
 void check_valid_face( RefFace* face );
 void check_valid_loop( Loop* loop );
@@ -27,7 +31,7 @@
 int main( int argc, char* argv[] )
 {
     // Start up CGM
-  CubitStatus result = InitCGMA::initialize_cgma();
+  CubitStatus result = InitCGMA::initialize_cgma(TEST_ENGINE);
   if (CUBIT_SUCCESS != result) return 1;
 
     // Create a brick



More information about the cgma-dev mailing list