More cleanup, add CMakeLists for the testsuite. Now need to port it

to QTestLib :/
This commit is contained in:
Benoit Jacob 2007-05-31 10:09:44 +00:00
parent 8f202dc67f
commit eab54b49ea
6 changed files with 62 additions and 28 deletions

View File

@ -1,4 +1,4 @@
project(eigen2)
project(Eigen)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

View File

@ -1 +1,2 @@
add_subdirectory(include)
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(testsuite)

View File

@ -7,13 +7,6 @@ INCLUDE (CheckSysvMath)
INCLUDE (CheckLongDouble)
INCLUDE (CheckLongLong)
# the following are directories where stuff will be installed to
set(INCLUDE_INSTALL_DIR
"${CMAKE_INSTALL_PREFIX}/include/tvmet"
CACHE PATH
"The subdirectory to the header prefix"
FORCE)
FILE(GLOB tvmet_header_SRCS "*.h")
CHECK_INCLUDE_FILES (sys/time.h TVMET_HAVE_SYS_TIME_H)
@ -26,6 +19,13 @@ CHECK_SYSV_MATH (TVMET_HAVE_SYSV_MATH)
CHECK_LONG_DOUBLE (TVMET_HAVE_LONG_DOUBLE)
CHECK_LONG_DOUBLE (TVMET_HAVE_LONG_LONG)
# the following are directories where stuff will be installed to
set(INCLUDE_INSTALL_DIR
"${CMAKE_INSTALL_PREFIX}/include/tvmet"
CACHE PATH
"The subdirectory to the header prefix"
FORCE)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
${INCLUDE_INSTALL_DIR}/config.h)

View File

@ -28,5 +28,7 @@
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine TVMET_HAVE_UNISTD_H 1
#define _tvmet_restrict __restrict__
/* _INCLUDE_TVMET_CONFIG_H */
#endif

View File

@ -51,25 +51,6 @@
# include <tvmet/config/config-vc71.h>
#endif
// give up for these cases
#if !defined(TVMET_HAVE_MUTABLE)
# error "Your compiler doesn't support the mutable keyword! Giving up."
#endif
#if !defined(TVMET_HAVE_TYPENAME)
# error "Your compiler doesn't support the typename keyword! Giving up."
#endif
#if !defined(TVMET_HAVE_NAMESPACES)
# error "Your compiler doesn't support the namespace concept! Giving up."
#endif
#if !defined(TVMET_HAVE_PARTIAL_SPECIALIZATION)
# error "Your compiler doesn't support partial specialization! Giving up."
#endif
/*
* other compiler specific stuff
*/

View File

@ -0,0 +1,50 @@
INCLUDE(CheckIncludeFiles)
IF(BUILD_TESTS)
ENABLE_TESTING()
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
SET(testsuite_SOURCES
main.cc
SelfTest.h SelfTest.cc
TestNumericTraits.h TestNumericTraits.cc
TestNumericTraitsComplex.h TestNumericTraitsComplex.cc
TestConstruction.h TestConstruction.cc
TestComplexMatrix.h TestComplexMatrix.cc
TestComplexVector.h TestComplexVector.cc
TestDimension.h TestDimension.cc
TestMathOps.h TestMathOps.cc
TestMatrixEval.h TestMatrixEval.cc
TestMatrixFunctions.h TestMatrixFunctions.cc
TestMatrixOperators.h TestMatrixOperators.cc
TestSTL.h TestSTL.cc
TestUnFunc.h TestUnFunc.cc
TestVectorEval.h TestVectorEval.cc
TestVectorFunctions.h TestVectorFunctions.cc
TestVectorOperators.h TestVectorOperators.cc
TestXpr.h TestXpr.cc
TestXprMatrixFunctions.h TestXprMatrixFunctions.cc
TestXprMatrixOperators.h TestXprMatrixOperators.cc
TestXprVectorFunctions.h TestXprVectorFunctions.cc
TestXprVectorOperators.h TestXprVectorOperators.cc
TestUnloops.h TestUnloops.cc
TestMatrixElementwise.h TestMatrixElementwise.cc
)
QT4_AUTOMOC(${testsuite_SOURCES})
INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/tvmet-1.7.1/include
${CMAKE_INSTALL_PREFIX}/include)
ADD_EXECUTABLE(testsuite ${testsuite_SOURCES})
TARGET_LINK_LIBRARIES(testsuite ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY})
ADD_TEST(Eigen testsuite)
ENDIF(BUILD_TESTS)