Various compilation fixes for MSVC 9. All tests compile but some

still fail at runtime in ei_aligned_free() (even without vectorization).
This commit is contained in:
Gael Guennebaud
2008-08-19 11:06:40 +00:00
parent 9466e5f94e
commit a6d387a359
14 changed files with 50 additions and 49 deletions

View File

@@ -1,5 +1,6 @@
IF(BUILD_TESTS)
IF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_SYSTEM_NAME MATCHES Linux)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g2")
@@ -7,6 +8,9 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-inline-functions")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g2")
ENDIF(CMAKE_SYSTEM_NAME MATCHES Linux)
SET(EI_OFLAG "-O2")
ELSE(CMAKE_COMPILER_IS_GNUCXX)
SET(EI_OFLAG "")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
OPTION(EIGEN_NO_ASSERTION_CHECKING "Disable checking of assertions" OFF)
@@ -38,11 +42,7 @@ MACRO(EI_ADD_TEST testname)
SET(targetname test_${testname})
# IF(${ARGC} EQUAL 2)
# SET(filename ${ARGV1})
# ELSE(${ARGC} EQUAL 2)
SET(filename ${testname}.cpp)
# ENDIF(${ARGC} EQUAL 2)
SET(filename ${testname}.cpp)
ADD_EXECUTABLE(${targetname} ${filename})
IF(NOT EIGEN_NO_ASSERTION_CHECKING)
@@ -90,7 +90,7 @@ EI_ADD_TEST(basicstuff)
EI_ADD_TEST(linearstructure)
EI_ADD_TEST(cwiseop)
EI_ADD_TEST(product_small)
EI_ADD_TEST(product_large "-O2")
EI_ADD_TEST(product_large ${EI_OFLAG})
EI_ADD_TEST(adjoint)
EI_ADD_TEST(submatrices)
EI_ADD_TEST(miscmatrices)
@@ -99,7 +99,7 @@ EI_ADD_TEST(map)
EI_ADD_TEST(array)
EI_ADD_TEST(triangular)
EI_ADD_TEST(cholesky)
EI_ADD_TEST(lu "-O2")
EI_ADD_TEST(lu ${EI_OFLAG})
EI_ADD_TEST(determinant)
EI_ADD_TEST(inverse)
EI_ADD_TEST(qr)

View File

@@ -72,6 +72,7 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
VERIFY_IS_MUCH_SMALLER_THAN(vzero.norm(), static_cast<RealScalar>(1));
// check compatibility of dot and adjoint
// FIXME this line failed with MSVC and complex<double> in the ei_aligned_free()
VERIFY_IS_APPROX(v1.dot(square * v2), (square.adjoint() * v1).dot(v2));
// like in testBasicStuff, test operator() to check const-qualification