[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    [CMake] [Fortran][Intel][Windows] mixed up default flags
From:       Maik Beckmann <beckmann.maik () googlemail ! com>
Date:       2009-07-21 14:27:33
Message-ID: fba9561e0907210727p2e3f24c7m3fdbb79015917c48 () mail ! gmail ! com
[Download RAW message or body]

This is what ifort /help has to say
{{{
/O1       optimize for maximum speed, but disable some optimizations which
          increase code size for a small speed benefit
/O2       optimize for maximum speed (DEFAULT)
/O3       optimize for maximum speed and enable more aggressive optimizations
          that may not improve performance on some programs
/Ox       enable maximum optimizations (same as /O2)
/Os       enable speed optimizations, but disable some optimizations which
          increase code size for small speed benefit (overrides /Ot)
/Ot       enable speed optimizations (overrides /Os)
/Od       disable optimizations
}}}

and this is what cmake does:
{{{
SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp")
SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full")
SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O2 /D NDEBUG")
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/MD /O1 /D NDEBUG")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O1 /debug:full /D NDEBUG")
}}}

What we really want is
{{{
SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp")
SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/Od /debug:full")
SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/Os /D NDEBUG")
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/MD /O3 /D NDEBUG")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /debug:full /D NDEBUG")
}}}
or even better with the changes of
http://public.kitware.com/Bug/view.php?id=8744
{{{
SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads")
SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/Od /debug:full  /dbglibs")
SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/Os")
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O3 /D NDEBUG")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /debug:full")
}}}


@Bill Hoffman: I don't see any progress on the bug report mentioned
above as well as on http://public.kitware.com/Bug/view.php?id=9241.
In case your are to busy right now I like to volunteer as maintainer for
  - Platform/Windows-ifort.cmake
  - Platform/Linux-Intel-Fortran.cmake
  - Platform/Linux-SunPro-Fortran.cmake
  - Platform/Linux-GNU-Fortran.cmake
What do you think?

Best,
 -- Maik
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic