[CMake] check_fortrant_compiler_flag?

2014-06-20 Thread Jack Stalnaker
I see that there are standard modules for checking C and C++ compiler
flags, but there is no equivalent for fortran. Gfortran and ifort, for
instance, have different flags for changing/supporting source code format
and line length restrictions, so it would be very useful to be able to
check which of a list of flags works (if any). Is there a workaround, or is
it easy to do myself?

--Jack
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] check_fortrant_compiler_flag?

2014-06-20 Thread Nils Gladitz

On 20.06.2014 15:57, Jack Stalnaker wrote:
I see that there are standard modules for checking C and C++ compiler 
flags, but there is no equivalent for fortran. Gfortran and ifort, for 
instance, have different flags for changing/supporting source code 
format and line length restrictions, so it would be very useful to be 
able to check which of a list of flags works (if any). Is there a 
workaround, or is it easy to do myself?


I don't know about checking specific flags for Fortran but perhaps you 
can set your flags depending on the value of CMAKE_Fortran_COMPILER_ID.

It should be GNU for gfortran and Intel for ifort.

Nils
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake