[CMake] Can't set CMAKE_Fortran_FLAGS ?

David Cole david.cole at kitware.com
Thu May 1 13:07:18 EDT 2008


When you:
SET(CMAKE_Fortran_FLAGS "-fno-backslash")

it does not affect the cache... it is only a local override of the cache
value.

It should take effect in the generated project/make files, though.

If you want to see it in the cache editor, you have to use "FORCE" with SET.
(Although if you do that, you cannot change it from the cache editor.....)


HTH,
David


On Thu, May 1, 2008 at 1:04 PM, Convey Christian J NPRI <
ConveyCJ at npt.nuwc.navy.mil> wrote:

> I'm using cmake version 2.7-20080501, and I'm having trouble setting
> CMAKE_Fortran_FLAGS.  Any suggestions about what I'm doing wrong?
>
> Here's my CMakeLists.txt file:
>
> SET(CMAKE_Fortran_COMPILER "/usr/bin/f77")
> SET(CMAKE_Fortran_FLAGS "-fno-backslash")
> PROJECT(CASS-4.1 Fortran)
> ADD_SUBDIRECTORY(bistatic)
> ADD_SUBDIRECTORY(latex)
>
>
> When I run cmake, and then use ccmake to inspect the cache file, I find
> that:
> - I did successfully force the compiler to be f77 rahter than f95.
> - The variable CMAKE_Fortran_FLAGS is still blank.
>
> I get this behavior even after removing any extant CMakeCache.txt files
> and CMakeFiles directories.
>
> Thanks for any suggestions.
>
> - Christian
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080501/d7a8172f/attachment.htm>


More information about the CMake mailing list