From cec297f77bcc4278ba8cd8924d708cf0a08e3908 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Wed, 19 May 2010 19:35:42 +0200 Subject: [PATCH] Disabled to __forceinline warning - it creates too many spurious errors and we disabled it only for the unit test (see also the code comment). --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dbe8fad0..6adfd6429 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,8 +167,13 @@ endif(CMAKE_COMPILER_IS_GNUCXX) if(MSVC) # C4127 - conditional expression is constant - # C4505 - unreferenced local function has been removed - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /wd4127 /wd4505") + # C4714 - marked as __forceinline not inlined (I failed to deactivate it selectively) + # We can disable this warning in the unit tests since it is clear that it occurs + # because we are oftentimes returning objects that have a destructor or may + # throw exceptions - in particular in the unit tests we are throwing extra many + # exceptions to cover indexing errors. + # C4505 - unreferenced local function has been removed (impossible to deactive selectively) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /wd4127 /wd4505 /wd4714") string(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") option(EIGEN_TEST_SSE2 "Enable/Disable SSE2 in tests/examples" OFF) if(EIGEN_TEST_SSE2)