[CMake] RE: CMake 2.4.1/VC71 Why the wierd <project>.dir subdirs?
Brad King
brad.king at kitware.com
Wed May 9 11:32:05 EDT 2007
Rob Mathews wrote:
> Right, sorry, technically it is <library>.dir. Visual Studio just
> confuses things by calling a library a project.
>
> But my point still stands – the intermediate files in VisualStudio are
> already qualified by the library name, so adding another level is
> pointless in that case. The only case where I see it makes sense is if
> the intermediate files aren’t under the library, but are placed
> somewhere else where you need the library name to help qualify the
> directory name and make it unique.
>
> Read the code that adds the “.dir” here:
>
> std::string dir;
> dir += target.GetName();
> dir += ".dir";
> return dir;
>
> It’s not paying any attention to configuration, flags, or anything. It’s
> just tacking “<library>.dir” onto the result.
By building each target's object files into a different directory any
flag differences are automatically handled. It is also needed for
parallel builds in VS8 of the same source file in different targets.
What do you mean by "this replaces the old structure of <project>/Debug
with <project>/<project>.dir/Debug"? Where did the <project> part come
from before? There is no per-target qualification in VS.
-Brad
More information about the CMake
mailing list