[eigen] MSVC compiler switch /Ox versus /O2

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Gael,

In regard of the MSVC compiler, you skip the newly used /O2 flag because
"eventually MSVC does not like my /O2 flags (incompatibility with other option set by default)".

MSVC is unable  to use /O2 in DEBUG-Mode.
The attached patch (must have a revision, but) do the job for me, even with the more aggressive /Ox "complete Optimization".
See cdash http://my.cdash.org/buildSummary.php?buildid=9100

I am unable to inject my patch permanently into my instance of the cdash automate. Nearly every time my cdash files are reloaded from repository before compile and run the test. By this, all my tweaks are overridden and lost. Only by luck (and no changes in the revision number of the KDE-repository?) my tweaks go their way into the cdash table.

How that can be improved?
I do not fully image all the possibilities given with the cdash parameter.
Can the attached batch script be improved to achieve what I originally intended:
To inject compiler switches case by case into the cdash run:
E.g. something in the line of:
ctest -V -S testsuite.cmake,EIGEN_BUILD_STRING=Frank_test_realy_aggressive,ADD_CXX_FLAGS="/Ox, /fp:fast" ?

Cheers
Frank






Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 919324)
+++ CMakeLists.txt	(working copy)
@@ -74,6 +74,8 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
     message("Enabling SSE2 in tests/examples")
   endif(EIGEN_TEST_SSE2)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ox")
+  set(CMAKE_BUILD_TYPE Release)
 endif(MSVC)
 
 option(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION "Disable explicit vectorization in tests/examples" OFF)
@Echo on
call "c:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
REM get the last version of the script
svn cat svn://anonsvn.kde.org/home/kde/trunk/kdesupport/eigen2/test/testsuite.cmake > testsuite.cmake
set COMMON=ctest -V -S testsuite.cmake,EIGEN_BUILD_STRING=windows-vista-x86_64-MSVC-2008(9.0.30729.1),EIGEN_MODE=Experimental
%COMMON%,EIGEN_EXPLICIT_VECTORIZATION=SSE2
%COMMON%,EIGEN_EXPLICIT_VECTORIZATION=novec



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/