tests/geometry now match the include/ breakup and are switched to CMake
authorDmitriy Morozov <morozov@cs.duke.edu>
Wed, 15 Aug 2007 11:52:17 -0400
changeset 55 7e71f5984931
parent 22 c42734397d62
child 56 f480ec018512
tests/geometry now match the include/ breakup and are switched to CMake
CMakeLists.txt
tests/CMakeLists.txt
tests/geometry/CMakeLists.txt
tests/geometry/Makefile
tests/geometry/euclidean.cpp
tests/geometry/polynomial.cpp
tests/geometry/test-eventqueue.cpp
tests/geometry/test-kinetic-sort.cpp
tests/geometry/test-linalg.cpp
--- a/CMakeLists.txt	Wed Aug 15 11:39:34 2007 -0400
+++ b/CMakeLists.txt	Wed Aug 15 11:52:17 2007 -0400
@@ -43,6 +43,13 @@
 														${gmpxx_LIBRARY} 
 														${m_LIBRARY})
 
+# SYNAPS
+add_definitions				(-DBOOST_UBLAS_TYPE_CHECK=0)
+find_library				(synaps_LIBRARY				NAMES synaps)
+set							(synaps_libraries			${synaps_LIBRARY}
+														${gmp_LIBRARY}
+														${gmpxx_LIBRARY})
+
 # Debugging
 if							(debug)
 	find_library			(cwd_LIBRARY				NAMES cwd)
--- a/tests/CMakeLists.txt	Wed Aug 15 11:39:34 2007 -0400
+++ b/tests/CMakeLists.txt	Wed Aug 15 11:52:17 2007 -0400
@@ -1,1 +1,2 @@
+add_subdirectory			(geometry)
 add_subdirectory			(utilities)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/geometry/CMakeLists.txt	Wed Aug 15 11:52:17 2007 -0400
@@ -0,0 +1,12 @@
+set							(targets
+							 euclidean
+							 polynomial
+							 test-eventqueue
+							 test-kinetic-sort
+							 test-linalg)
+
+foreach 					(t ${targets})
+	add_executable			(${t} ${t}.cpp)
+	target_link_libraries	(${t} ${synaps_libraries})
+endforeach 					(t ${targets})
+
--- a/tests/geometry/Makefile	Wed Aug 15 11:39:34 2007 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-SYNAPS_LIBS = -L/usr/lib -L/usr/lib -lsynaps -llapack -lblas -lgmpxx -lgmp -lmps -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.2 -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../.. -lgfortranbegin -lgfortran -lm -lgcc_s
-
-INCLUDE_PATH=-I../../include/geometry
-DEFINES=-DBOOST_UBLAS_TYPE_CHECK=0 -g
-LIBRARIES=-lsynaps -lgmp -lgmpxx #${SYNAPS_LIBS}
-#CPPFLAGS=-march=i686 -mtune=native -Wall
-#CPPFLAGS=-march=i686 -mtune=generic -Wall
-CPPFLAGS=-Wall
-GCC=g++
-
-all: test-linalg euclidean polynomial test-eventqueue test-kinetic-sort
-
-test-linalg: test-linalg.cpp
-	${GCC} test-linalg.cpp -o test-linalg ${INCLUDE_PATH} ${DEFINES} ${LIBRARIES} ${CPPFLAGS}
-
-euclidean: euclidean.cpp
-	${GCC} euclidean.cpp -o euclidean ${INCLUDE_PATH} ${DEFINES} ${CPPFLAGS}
-
-polynomial: polynomial.cpp
-	${GCC} polynomial.cpp -o polynomial ${INCLUDE_PATH} ${DEFINES} ${LIBRARIES} ${CPPFLAGS}
-
-test-eventqueue: test-eventqueue.cpp
-	${GCC} test-eventqueue.cpp -o test-eventqueue ${CPPFLAGS} ${DEFINES} ${INCLUDE_PATH}
-
-test-kinetic-sort: test-kinetic-sort.cpp
-	${GCC} test-kinetic-sort.cpp -o test-kinetic-sort ${INCLUDE_PATH} ${DEFINES} ${LIBRARIES} ${CPPFLAGS}
--- a/tests/geometry/euclidean.cpp	Wed Aug 15 11:39:34 2007 -0400
+++ b/tests/geometry/euclidean.cpp	Wed Aug 15 11:52:17 2007 -0400
@@ -1,4 +1,4 @@
-#include "euclidean.h"
+#include "geometry/euclidean.h"
 #include <vector>
 #include <iostream>
 #include <cmath>
--- a/tests/geometry/polynomial.cpp	Wed Aug 15 11:39:34 2007 -0400
+++ b/tests/geometry/polynomial.cpp	Wed Aug 15 11:52:17 2007 -0400
@@ -1,5 +1,5 @@
-#include <euclidean.h>
-#include <polynomial.h>
+#include <geometry/euclidean.h>
+#include <geometry/polynomial.h>
 
 #include <vector>
 #include <iostream>
--- a/tests/geometry/test-eventqueue.cpp	Wed Aug 15 11:39:34 2007 -0400
+++ b/tests/geometry/test-eventqueue.cpp	Wed Aug 15 11:52:17 2007 -0400
@@ -1,4 +1,4 @@
-#include <eventqueue.h>
+#include <utilities/eventqueue.h>
 #include <functional>
 #include <iostream>
 
--- a/tests/geometry/test-kinetic-sort.cpp	Wed Aug 15 11:39:34 2007 -0400
+++ b/tests/geometry/test-kinetic-sort.cpp	Wed Aug 15 11:52:17 2007 -0400
@@ -1,6 +1,6 @@
-#include <polynomial.h>
-#include <simulator.h>
-#include <kinetic-sort.h>
+#include <geometry/polynomial.h>
+#include <geometry/simulator.h>
+#include <geometry/kinetic-sort.h>
 #include <iostream>
 
 #include <boost/utility.hpp>
--- a/tests/geometry/test-linalg.cpp	Wed Aug 15 11:39:34 2007 -0400
+++ b/tests/geometry/test-linalg.cpp	Wed Aug 15 11:52:17 2007 -0400
@@ -1,9 +1,9 @@
-#include "linalg.h"
+#include "geometry/linalg.h"
 #include <iostream>
 
 #include <synaps/upol.h>
 #include <synaps/upol/gcd.h>
-#include "rational-function.h"
+#include "geometry/rational-function.h"
 
 
 typedef			UPolDse<double>					Polynomial;