Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-13 Thread Verweij, Arjen
Hello Michael, Apparently, there may be - at least with GCC and shared libraries - a need to specify flags on the link line if they have been specified on the compile line before. Though, I don't know an example of a damaged binary due to different sets of flags for compiling and linking.

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-13 Thread Verweij, Arjen
Hi, AFAIK there is nothing that will be broken on AIX by removing FLAGS from the link rule for Fortran executables. OK, I will just redefine the Fortran linker to keep the cmake generator compatible then start scrubbing link flags based on compiler documentation, because: What flags are

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-13 Thread Brad King
On 07/12/2010 04:16 PM, Michael Hertling wrote: In GCC's documentation, one can read: -shared Produce a shared object which can then be linked with other objects to form an executable. Not all systems support this option. For predictable results, you must also specify the same

[CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Verweij, Arjen
Hi, It seems that in our project the contents of CMAKE_LANG_FLAGS is added to the link line. This causes problems for some of our platforms. Is there a mechanism to separate language specific compile and link flags out? It would be nice if you could define CMAKE_LANG_COMPILER_FLAGS and

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Verweij, Arjen
:13 To: cmake@cmake.org Subject: [CMake] CMAKE_LANG_FLAGS added to link rule Hi, It seems that in our project the contents of CMAKE_LANG_FLAGS is added to the link line. This causes problems for some of our platforms. Is there a mechanism to separate language specific compile and link flags out

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Brad King
On 07/12/2010 01:12 PM, Verweij, Arjen wrote: As a follow-up: redefining CMAKE_Fortran_LINK_EXECUTABLE to not include FLAGS gets rid of the CMAKE_Fortran_FLAGS.. but perhaps other (useful) stuff as well? As a sidetrack I’m starting to wonder what the purpose of CMAKE_LANG_FLAGS is. The book

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Verweij, Arjen
To: Verweij, Arjen Cc: cmake@cmake.org Subject: Re: [CMake] CMAKE_LANG_FLAGS added to link rule On 07/12/2010 01:12 PM, Verweij, Arjen wrote: As a follow-up: redefining CMAKE_Fortran_LINK_EXECUTABLE to not include FLAGS gets rid of the CMAKE_Fortran_FLAGS.. but perhaps other (useful) stuff as well

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Bill Hoffman
On 7/12/2010 1:20 PM, Brad King wrote: On 07/12/2010 01:12 PM, Verweij, Arjen wrote: As a follow-up: redefining CMAKE_Fortran_LINK_EXECUTABLE to not include FLAGS gets rid of the CMAKE_Fortran_FLAGS.. but perhaps other (useful) stuff as well? As a sidetrack I’m starting to wonder what the

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Brad King
On 07/12/2010 01:25 PM, Verweij, Arjen wrote: Can you comment on what other stuff ends up in FLAGS? Looking at the implementation I see it gets architecture flags on the Mac (-arch and -isysroot), which is consistent with the -m64 type flags I mentioned before. However it looks to me like

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Verweij, Arjen
Brad, That sounds fine, I'm already in the habit of specifying link flags per language anyway. In fact I will take a looksie and recompile cmake with your suggested fix. Regards, Arjen Looking at the implementation I see it gets architecture flags on the Mac (-arch and -isysroot), which is

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Verweij, Arjen
; Bill Hoffman Subject: Re: [CMake] CMAKE_LANG_FLAGS added to link rule Brad, That sounds fine, I'm already in the habit of specifying link flags per language anyway. In fact I will take a looksie and recompile cmake with your suggested fix. Regards, Arjen Looking at the implementation I see

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Brad King
On 07/12/2010 02:47 PM, Verweij, Arjen wrote: I will take a looksie and recompile cmake with your suggested fix. The patch was more of a starting point for discussion among developers. I think the same problem occurs for shared libraries too, but I see evidence that it was done on purpose:

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Brad King
On 07/12/2010 03:06 PM, Verweij, Arjen wrote: That bit of code is #IFDEF'ed for __APPLE__. I doubt it is causing the problem on AIX. That code is not the cause of the problem, just something that might be broken by your workaround to the problem. AFAIK there is nothing that will be broken on

Re: [CMake] CMAKE_LANG_FLAGS added to link rule

2010-07-12 Thread Michael Hertling
On 07/12/2010 07:12 PM, Verweij, Arjen wrote: As a follow-up: redefining CMAKE_Fortran_LINK_EXECUTABLE to not include FLAGS gets rid of the CMAKE_Fortran_FLAGS.. but perhaps other (useful) stuff as well? As a sidetrack I'm starting to wonder what the purpose of CMAKE_LANG_FLAGS is. The book