[cgma-dev] r5767 - in cgm/trunk/geom: . testing

janehu at mcs.anl.gov janehu at mcs.anl.gov
Fri Oct 5 10:55:06 CDT 2012


Author: janehu
Date: 2012-10-05 10:55:06 -0500 (Fri, 05 Oct 2012)
New Revision: 5767

Added:
   cgm/trunk/geom/testing/
   cgm/trunk/geom/testing/CMakeLists.txt
Removed:
   cgm/trunk/geom/testing/
Log:
Moves all tests to cgm/test directory, except CMakeLists.txt.

Added: cgm/trunk/geom/testing/CMakeLists.txt
===================================================================
--- cgm/trunk/geom/testing/CMakeLists.txt	                        (rev 0)
+++ cgm/trunk/geom/testing/CMakeLists.txt	2012-10-05 15:55:06 UTC (rev 5767)
@@ -0,0 +1,82 @@
+
+# test suite to test cgm apis
+# this test suite attempts to work for all cgm ports
+PROJECT(CGM_TESTS)
+
+
+# a list of tests
+# each testname has a testname.cpp file that implements 
+# a "int testname(int, char**)" as its entry point
+# testname(int, char**) returns 0 on success
+# when testname(int, char**) is called, cgm has already been initialized
+# and is ready to use with active ports already set
+SET(CGM_TESTS
+    AngleCalc
+    CreateGeometry
+    ReadIgesFile
+    GraphicsData
+   )
+
+ 
+# CGM_PORTS contains an identifier for the port to use
+# these identifiers are recognized in cgm_test.cpp
+IF(CGM_ACIS)
+  SET(CGM_PORTS ${CGM_PORTS} "acis")
+  INCLUDE(${cubit_acis_SOURCE_DIR}/UseACIS.cmake)
+  ADD_DEFINITIONS(-DCGM_ACIS)
+  INCLUDE_DIRECTORIES(${cubit_acis_SOURCE_DIR} ${ACIS_INCLUDE_DIR})
+  SET(PORT_LIBS ${PORT_LIBS} cubit_ACIS gtcAttrib)
+  IF(NOT WIN32 AND BUILD_64)
+    SET(SKIP_ReadIgesFile-acis 1)
+  ENDIF(NOT WIN32 AND BUILD_64)
+ENDIF(CGM_ACIS)
+IF(CGM_SMLIB)
+  SET(CGM_PORTS ${CGM_PORTS} "smlib")
+  INCLUDE(${cubit_smlib_SOURCE_DIR}/UseSMLib.cmake)
+  INCLUDE_DIRECTORIES(${cubit_smlib_SOURCE_DIR} ${SMLIB_INCLUDE_DIR})
+  ADD_DEFINITIONS(-DCGM_SMLIB)
+  SET(PORT_LIBS ${PORT_LIBS} cubit_smlib)
+ENDIF(CGM_SMLIB)
+
+
+# functions that'll start/end cgm
+# CREATE_TEST_SOURCELIST will insert the function calls into the test driver
+SET(CMAKE_TESTDRIVER_BEFORE_TESTMAIN "  start_cgm(ac,av);")
+SET(CMAKE_TESTDRIVER_AFTER_TESTMAIN "  end_cgm(ac,av);")
+CREATE_TEST_SOURCELIST(TEST_SRCS cgm_test_driver.cpp ${CGM_TESTS} 


More information about the cgma-dev mailing list