[cmake-developers] VS2010 fortran composer
Biddiscombe, John A.
biddisco at cscs.ch
Fri Mar 18 09:18:43 EDT 2011
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.
More information about the cmake-developers
mailing list