[CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-05 Thread marco restelli
Hi, I would like to reset CMAKE_Fortran_FLAGS for one specific file in a project. I have tried SET_SOURCE_FILES_PROPERTIES(my_file.f90 PROPERTIES COMPILE_FLAGS "-O0 -g") but it appends the new flags keeping the old ones. How can reset these flags? Specifically, I have some files for which I ne

Re: [CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-13 Thread Petr Kmoch
Hi Marco. Sane compilers allow later command-line options to override earlier ones, so what you're doing should be fine. Unfortunately, I know some Fortran compilers are not sane in this regard. If you really need to solve this by explicitly modifying the global list for a particular file, the on

Re: [CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-13 Thread marco restelli
Hi Petr, thanks, very informative! 2014-08-13 9:20 GMT+0200, Petr Kmoch : > Hi Marco. > > Sane compilers allow later command-line options to override earlier ones, > so what you're doing should be fine. Unfortunately, I know some Fortran > compilers are not sane in this regard. Here, I would r

Re: [CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-13 Thread Mark Abraham
On Wed, Aug 13, 2014 at 3:18 AM, marco restelli wrote: > Hi Petr, >thanks, very informative! > > 2014-08-13 9:20 GMT+0200, Petr Kmoch : > > Hi Marco. > > > > Sane compilers allow later command-line options to override earlier ones, > > so what you're doing should be fine. Unfortunately, I kno

Re: [CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-13 Thread marco restelli
2014-08-13 15:53 GMT+0200, Mark Abraham : > On Wed, Aug 13, 2014 at 3:18 AM, marco restelli > wrote: > >> Hi Petr, >>thanks, very informative! >> >> 2014-08-13 9:20 GMT+0200, Petr Kmoch : >> > Hi Marco. >> > >> > Sane compilers allow later command-line options to override earlier >> > ones, >>

Re: [CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-13 Thread Mark Abraham
On Wed, Aug 13, 2014 at 7:12 AM, marco restelli wrote: > 2014-08-13 15:53 GMT+0200, Mark Abraham : > > On Wed, Aug 13, 2014 at 3:18 AM, marco restelli > > wrote: > > > >> Hi Petr, > >>thanks, very informative! > >> > >> 2014-08-13 9:20 GMT+0200, Petr Kmoch : > >> > Hi Marco. > >> > > >> > Sa

Re: [CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-13 Thread marco restelli
2014-08-13 16:16 GMT+0200, Mark Abraham : > On Wed, Aug 13, 2014 at 7:12 AM, marco restelli > wrote: > >> 2014-08-13 15:53 GMT+0200, Mark Abraham : >> > On Wed, Aug 13, 2014 at 3:18 AM, marco restelli >> > wrote: >> > >> >> Hi Petr, >> >>thanks, very informative! >> >> >> >> 2014-08-13 9:20 G

Re: [CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-14 Thread Glenn Coombs
In my opinion this is a deficiency in how cmake currently works with object libraries. If one of the source files in an object library depends on a third library then it should be possible to specify that in the link interface of either the object library or the source file. It is wrong to have t