[CMake] Common binary dir and failed local headers dependencies

Bill Hoffman bill.hoffman at kitware.com
Sat Mar 7 13:16:59 EST 2009


Wojciech Migda wrote:
> Hi again,
> 
> this workaround seems to do a trick:
> 
> in cmDependsC::WriteDependencies I've added a local variable to store
> path to the source file being scanned for dependencies:
> 
> std::string root_dir =
> cmSystemTools::GetFilenamePath(this->LocalGenerator->Convert(src,
>       cmLocalGenerator::HOME_OUTPUT,
>       cmLocalGenerator::MAKEFILE));
> 
> later in the function I've replaced
> 
>         if((*i) == ".")
>           {
>                 tempPathStr += current.FileName;
> 
> with
> 
>         if((*i) == ".")
>           {
>                 tempPathStr += root_dir + "/" + current.FileName;
> 
> Could anyone from the cmake dev team evaluate this proposal ?
> 

There are other things that will break because of this.  Things like 
percent done.  The build directories were designed with the thought that 
they should be unique.

Try LIBRARY_OUTPUT_PATH to place the libraries, that is how it should be 
done.

-Bill


More information about the CMake mailing list