if(cmTarget::LinkInterface const* iface = dt->GetLinkInterface("Debug"))
{
if (iface->Languages.size()>0 && iface->Languages[0]=="Fortran")
{
path += ".vfproj";
}
Seems to work.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Biddiscombe, John A.
Sent: 18 March 2011 14:19
Cc: [email protected]
Subject: Re: [cmake-developers] VS2010 fortran composer
I'm trying to get the entire hdf5 project compiling with the fortran stuff
enabled, but I've run into an issue
The solution has mixed fortran and c targets, and it adds dependency
information which includes the project file extension
cmVisualStudio10TargetGenerator::WriteProjectReferences ...
if (dt->GetProperty("Fortran_MODULE_DIRECTORY"))
{
path += ".vfproj";
}
else {
path += ".vcxproj";
}
I added the .vfproj clause to try to get the h5fortran_detect projects to be
classed as vfproj (otherwise the custom rules which generate .f90 files don't
run it seems - I'm still trying to work out exactly what's wrong, but this is
one guess)...
Anyway the dt->GetProperty("Fortran_MODULE_DIRECTORY") always returns true,
even if one of the C projects is the target - because it is globally for the
cmake project.
What I need is a if target_link_language == "fortran" (or if target is
fortrantarget) then use this extension, otherwise ...
How can I test if one of the individual targets is using fortran of not.
My best guess so far is to add a method to cmTarget to iterate over source
files and test their extensions individually, but I'm sure there must be a
correct way of doing it.
TIA
JB
Git fortrancomposerbranch pushed to
git://git.cscs.ch/cmake.git
it's only my test hack to get stuff working, I'll clean it up once I am
confident that I can build complex projects.
_______________________________________________
cmake-developers mailing list
[email protected]
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
_______________________________________________
cmake-developers mailing list
[email protected]
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers