[CMake] RE: CMake 2.4.1/VC71 Why the wierd <project>.dir subdirs?

Rob Mathews Rob.Mathews at varolii.com
Wed May 9 10:12:51 EDT 2007


If I had fred.cpp in both the foo and bar directories, 
then 
foo/Debug/fred.obj 
and
bar/Debug/fred.obj
are different files, and so that works fine. 

Hmm ... you must be talking about support for the case where the
intermediate directories are all off somewhere else? That's doesn't seem
to be the default for CMake.
 

-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: Wednesday, May 09, 2007 10:04 AM
To: Rob Mathews
Cc: cmake at cmake.org
Subject: Re: CMake 2.4.1/VC71 Why the wierd <project>.dir subdirs?

Rob Mathews wrote:
> CMake seems to be generating intermediate directories called
> <project-name>.dir and placing the obj files under them. 
>
> Ie, if my project is foo, then /foo/foo.dir/*.obj
>
> I look in the code and see that this derives from
> cmLocalVisual7Generator.cxx, which reads as follows. (The "#if 0" is
my
> addition)
>
> std::string cmLocalVisualStudio7Generator
> ::GetTargetDirectory(cmTarget& target)
> {
> #if 0
> why???? this replaces the old structure of <project>/Debug with
> <project>/<project>.dir/Debug. What's the point????!!!
> 	std::string dir;
>   dir += target.GetName();
>   dir += ".dir";
>   return dir;
> #endif
>   return ".";
> }
>
>
> As I say, what's the point? 
>
>
>   
So, you can have two object files with the same name in two different 
directories.  Each target's .obj files are isolated into a separate sub 
directory.

-Bill





More information about the CMake mailing list