more MSVC cmake fixes

This commit is contained in:
Gael Guennebaud
2008-12-17 18:37:04 +00:00
parent 4cb63808d4
commit 6e138d0069
5 changed files with 38 additions and 12 deletions

View File

@@ -26,9 +26,9 @@ else(CHOLMOD_FOUND)
message("CHOLMOD not found, this optional backend won't be tested")
endif(CHOLMOD_FOUND)
if(NOT WIN32)
if(NOT MSVC)
enable_language(Fortran OPTIONAL)
endif(NOT WIN32)
endif(NOT MSVC)
find_package(Umfpack)
if(UMFPACK_FOUND)
@@ -102,7 +102,12 @@ macro(ei_add_test testname)
if(NOT EIGEN_NO_ASSERTION_CHECKING)
set_target_properties(${targetname} PROPERTIES COMPILE_FLAGS "-fexceptions")
if(MSVC)
set_target_properties(${targetname} PROPERTIES COMPILE_FLAGS "/EHsc")
else(MSVC)
set_target_properties(${targetname} PROPERTIES COMPILE_FLAGS "-fexceptions")
endif(MSVC)
option(EIGEN_DEBUG_ASSERTS "Enable debuging of assertions" OFF)
if(EIGEN_DEBUG_ASSERTS)
set_target_properties(${targetname} PROPERTIES COMPILE_DEFINITIONS "-DEIGEN_DEBUG_ASSERTS=1")

View File

@@ -47,7 +47,7 @@ namespace Eigen
#define EI_PP_CAT2(a,b) a ## b
#define EI_PP_CAT(a,b) EI_PP_CAT2(a,b)
#define EIGEN_NO_EXCEPTIONS // disabling throwing assertions on bad alloc -- somehow makes the tests crawl
//#define EIGEN_NO_EXCEPTIONS // disabling throwing assertions on bad alloc -- somehow makes the tests crawl
#ifndef EIGEN_NO_ASSERTION_CHECKING