Re: [CMake] Different flags for compiling and linking with Fortran

2017-06-15 Thread xavier lacoste
A solution was to append the options to COMPILE_FLAGS using set_file_source_property(). Le 15 juin 2017 15:29, "xavier lacoste" a écrit : > Hello Chuck, > > Indeed I had an old 2.8.12.2 version I upgraded to 3.8.2 and get correct > detection of xlc. > But still the same error with xlf linking w

Re: [CMake] Different flags for compiling and linking with Fortran

2017-06-15 Thread xavier lacoste
Hello Chuck, Indeed I had an old 2.8.12.2 version I upgraded to 3.8.2 and get correct detection of xlc. But still the same error with xlf linking with -fpp if I have FFLAGS="-fpp" : [lacoste@caimanp8 test]$ cmake --version cmake version 3.8.2 CMake suite maintained and supported by Kitware (kitw

Re: [CMake] Different flags for compiling and linking with Fortran

2017-06-15 Thread Chuck Atkins
Hi Xavier, CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) > ... > -- The C compiler identification is Clang 3.8.0 > -- The CXX compiler identification is Clang 3.8.0 > ... > -- The Fortran compiler identification is XL > What version of CMake are you using? Give that the C and C++ compilers are detected

Re: [CMake] Different flags for compiling and linking with Fortran

2017-06-15 Thread xavier lacoste
Dear Cmake Users, I could reproduce this with a minimal CMakeLists.txt : [lacoste@caimanp8 test]$ cat CMakeLists.txt ### # # # CMake proposal for SABL projects based on Python + libs in C/Fortran # # #

[CMake] Different flags for compiling and linking with Fortran

2017-06-15 Thread xavier lacoste
Dear cmake users, For some Fortran compiler we need to remove flags we added to CMAKE_Fortran_FLAGS_RELEASE to be able to link (options not recognized at link). Do you have any idea of how to do so ? A practical case is the xlf90 -cpp flag. I have several .f90 files that need preprocessing so I