[CMake] Can't compile a quite simple Fortran static library
Renato N. Elias
rnelias at nacad.ufrj.br
Fri Aug 22 07:33:42 EDT 2008
Bill Hoffman wrote:
> Renato N. Elias wrote:
>
>>>
>> Yes, I've tried the Keyword="Static Library" and the problem
>> persisted. It seems that the "/c" definitely solve the problem. The
>> question now is: why is it missing in the project created by CMake?
>>
>> One suspicious that I can't test since I don't have the Intel Fortran
>> compiler version 10. My guess is that Intel Fortran 10 does not need
>> the /c to assume that we're compiling the file. In this case, CMake
>> would work in Fortran 10 and not in previous versions... just a
>> thought...
>>
>
> All versions need /c, it means compile the file and don't try to link.
> The 10 version with the same files work fine. It should be done
> automatically by the IDE. The /c does not show up in the hand .vfproj
> or the cmake generated .vfproj. So, it is some subtle difference in
> the .vfproj file that is causing the trouble... That is why I wanted
> to get it down to as small a file as possible. Basically, the way to
> fix this is to keep changing the cmake generated .vfproj by hand until
> it works. Each change should take it one step closer to the IDE
> generated .vfproj. At some point it will work, and you will know the
> problem. Unfortunately, I do not have access to a 9.1 compiler to do
> this. If you have some time, I would appreciate it if you could give
> it a try.
>
> If I was doing it, I would:
>
> 1. edit the cmake vfproj file and remove the cmake regeneration stuff,
> and Release and MinSizeRel build types. Get it down to just Debug,
> and make it as small as possible.
>
> 2. build that, and see if it has the problem.
>
> 3. Start making changes to it that bring it closer to looking exactly
> like the IDE generated .vfproj. At some point it has to work because
> the files will be the same...
>
> Thanks.
>
>
> -Bill
>
>
>
A managed to do something work (but not in the way that I'd like). In
CMake, when configuring my project, if a check the "Show Advanced
Values" and insert a "/c" in the CMAKE_Fortran_FLAGS the project works
fine.
Weird, since I'd expect CMake filling it up automatically (it's so
basic...).
Renato.
_
_
More information about the CMake
mailing list