Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-27 Thread Marcel Loose
Hi Alan, Thanks for your elaborate reply. I had taken a look at the work-around scripts that were upload for issue #9220 by you and Greg. They look quite rigorous. I've come up with a much simplier but probably less robust work-around. # Work-around for CMake issue 0009220 if(DEFINED CMAKE_Fortra

Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-26 Thread Alan W. Irwin
On 2009-11-26 16:12+0100 Marcel Loose wrote: Hi Alex, On second thought: the problem I encountered is somewhat different than the one described in issue #9220. The problem there is that the compiler name "gcc whatever" is interpreted as compiler "gcc" with an argument "whatever". In my case I

Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-26 Thread Marcel Loose
Hi Alex, On second thought: the problem I encountered is somewhat different than the one described in issue #9220. The problem there is that the compiler name "gcc whatever" is interpreted as compiler "gcc" with an argument "whatever". In my case I do not set a compiler from the command line. I u

Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-25 Thread Marcel Loose
Done, see Note 0018597 Best regards, Marcel Loose. On Wed, 2009-11-25 at 19:16 +0100, Alexander Neundorf wrote: > On Wednesday 25 November 2009, Marcel Loose wrote: > > Hi Alex, > > > > Maybe I'm overlooking all kinds of side effects, but the problem is in > > line 6 of CMakeFortranInformation.c

Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-25 Thread Alexander Neundorf
On Wednesday 25 November 2009, Marcel Loose wrote: > Hi Alex, > > Maybe I'm overlooking all kinds of side effects, but the problem is in > line 6 of CMakeFortranInformation.cmake, where get_filename_component() > is called with an incorrect number of arguments. This happens because > ${CMAKE_Fortra

Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-25 Thread Marcel Loose
Hi Alex, Maybe I'm overlooking all kinds of side effects, but the problem is in line 6 of CMakeFortranInformation.cmake, where get_filename_component() is called with an incorrect number of arguments. This happens because ${CMAKE_Fortran_COMPILER} is empty. If I simply put quotes around ${CMAKE_Fo

Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-24 Thread Alexander Neundorf
On Tuesday 24 November 2009, Marcel Loose wrote: > Hi all, > > I've been experimenting a bit with enable_language() and stumbled upon > what I think is a bug. Yes: http://public.kitware.com/Bug/view.php?id=9220 It's not trivial to make it work. Alex __

[CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-24 Thread Marcel Loose
Hi all, I've been experimenting a bit with enable_language() and stumbled upon what I think is a bug. I have wanted to know how to properly handle a missing Fortran compiler. So, on a system without a working Fortran compiler I ran cmake twice. In the first cmake run, the Fortran compiler is se