[cmake-developers] VS2010 fortran composer

Bill Hoffman bill.hoffman at kitware.com
Fri Mar 11 17:39:20 EST 2011


On 3/11/2011 4:55 PM, Biddiscombe, John A. wrote:
> If I create a cpp project with the IDE it goes into x64/Debug/blah,
adding fortran makes no difference and they both go into x64/Debug/blah
>
> If I create a cpp project using cmake, it goes into debug/blah,
> adding
a fortran one puts the fortran one in x64/debug/blah, but the cpp one
stays behind. I didn't try linking them. If I remove the overridden
OUTDIR=/debug/blah from the cmake generated project, then the cpp goes
into x64/debug/blah as expected.

So, why can't your fortran projects set OUTDIR just like the cpp ones do?

>
> How do I change cmake_intdir. I will be happy to just use x64/etc
> for
everything

this->AddDefinition("CMAKE_CFG_INTDIR",
                       this->LocalGenerator->GetGlobalGenerator()
                       ->GetCMakeCFGInitDirectory());

It gets set here:
  virtual const char* GetCMakeCFGInitDirectory()
     { return "$(Configuration)";}


It is all a bit complicated... :)

It would be much better if we could get Debug, Release, etc to work like 
we are doing for cpp.  I am sure it will break lots of folks 
expectations if we change it when Fortran is on.  And, I don't think we 
want to change it all around...

> JB
>
> -----Original Message-----
> From: Bill Hoffman [mailto:bill.hoffman at kitware.com]
> Sent: 10 March 2011 23:03
> To: Biddiscombe, John A.
> Cc: cmake-developers at cmake.org
> Subject: Re: VS2010 fortran composer
>
> On 3/10/2011 4:36 PM, Biddiscombe, John A. wrote:
>> If you create a new cpp project, by default it is win32 and visual studio puts everything in debug/...
>> If you change platform to x64, then it goes into x64/debug/... even without any fortran stuff added.
>>
>> Adding fortran doesn't change anything.
>>
>
> No, if you create a visual studio x64 CMake project it does not do that.
>    You have to use the  "Visual Studio 9 2008 Win64" generator to start with.
>
>
>> JB
>>
>> -----Original Message-----
>> From: Bill Hoffman [mailto:bill.hoffman at kitware.com]
>> Sent: 10 March 2011 21:53
>> To: Biddiscombe, John A.
>> Cc: cmake-developers at cmake.org
>> Subject: Re: VS2010 fortran composer
>>
>> On 3/10/2011 3:09 PM, Biddiscombe, John A. wrote:
>>> Contrary to what I might have previously said ...(not sure if I did, but) ...
>>>
>>> AFAICT if the cpp and fortran projects are all x64 configuration then everything goes into x64/Debug or x64/Release.
>>> (Mixing win32 and win64 causes trouble, but we don't care about that)
>>
>> So, mixing win32 and win64 is not something we support.
>>
>> I find it odd that by adding the fortran libs into the mix it changes
>> existing C libraries.  What if you do this:
>>
>> 1. create a c/C++ project with CMake  (no x64).
>> 2. Load that project into the IDE
>> 3. Add a fortran library
>>
>> What happens?  Did it change the C/C++ locations or the fortran one?
>>
>>>
>>> So changing CMAKE_INTDIR to x64/etc ought to be allowed yes? If so, where does it happen - or rather where can I do it?
>>>
>>> JB
>>>
>>> -----Original Message-----
>>> From: Bill Hoffman [mailto:bill.hoffman at kitware.com]
>>> Sent: 10 March 2011 20:03
>>> To: Biddiscombe, John A.
>>> Cc: cmake-developers at cmake.org
>>> Subject: Re: VS2010 fortran composer
>>>
>>> On 3/10/2011 1:48 PM, Biddiscombe, John A. wrote:
>>>>> It also has to match CMAKE_INTDIR, or tons of stuff will not work.
>>>>
>>>> Can I change CMAKE_INTDIR from the generator since the fortran stuff uses its own location (mostly)?
>>>>
>>>>
>>> It has to be consistent with the C/C++ for mixed language projects.
>>> What happens if you create a project in the IDE and have a C/C++
>>> library, and a fortran library?  Does it put the libraries in different
>>> directories?  Can you have an executable that links to both the C and
>>> fortran, how does that work?
>>>
>>>
>>>>> Are you doing this in a public git repo somewhere?
>>>>
>>>> Not yet, but when I'm back from vacation, I'll setup on that you can access.
>>>>
>>> OK, sounds good, if you could investigate the above that would be good.
>>>>
>>>> JB
>>>>
>>>
>>>
>>
>>
>
>


-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573



More information about the cmake-developers mailing list