[CMake] cmake 2.6.2 RC 5
Bill Hoffman
bill.hoffman at kitware.com
Mon Sep 22 20:12:13 EDT 2008
Alan W. Irwin wrote:
>>
>> enable_language(Fortran OPTIONAL)
>> project(myproject C CXX)
>>
>> It would always test for fortran, and enable it if they have it. If
>> they do not have it, then you can just turn off that binding. It
>> won't be an error not to have it. If they do have it you can offer
>> the binding option for Fortran.
>
> In fact, I have been considering moving to that approach since it should
> give a smoother user experience.
>
> However, that consideration doesn't affect the principal issue which is
> that
> our current approach and the above approach still must use ENABLE_LANGUAGE
> for optional languages like Fortran. This means the ENABLE_LANGUAGE bug
> kicks in for Fortran, the Fortran compiler flags are not set properly in
> the
> cache for PLplot, and build types do not work properly for the Fortran
> binding of PLplot (on the Linux platform).
>
Did you try what I suggested?
I am thinking if you have the enable_language BEFORE the project command
it will get around the bug, and work as you want it to. I have not
tested, but I think if it comes before project it should work.
-Bill
More information about the CMake
mailing list