[CMake] Common binary dir and failed local headers dependencies

Wojciech Migda wojtek.golf at interia.pl
Sat Mar 7 11:45:08 EST 2009


some follow-up to my previous post:

I don't see an easy way to fix the presented problem within cmake
scripting mechanisms other than adding own script called at the setup
time for dependencies check and adding those dependencies to objects
using SET_PROPERTIES* directives.

However, as far as I could look into cmake code myself, the change I'd
see being made was an interpretation of the "." directory added using
the INCLUDE_DIRECTORIES directive. CMake inserts "." to the list of
include dirs stored in CMakeDirectoryInformation.cmake but then when it
comes to dependency resolution in the cmDependsC::WriteDependencies
method the "." directory is interpreted literally, that is the path to
the header being checked for existence is simply its filename, assuming
the current directory for its location. Thus, if the dependencies are
checked using the "cmake -E cmake_depends" (as in any build.make file)
the current directory is the topmost project folder. Instead "." shall
be translated to the current target source folder, taken as one of the
arguments of "cmake -E cmake_depends" arguments: start-src-dir.

Any thoughts on that ?

Wojtek Migda




----------------------------------------------------------------------
8 marca - wyslij kwiaty bliskim Ci kobietom! >>> http://link.interia.pl/f208f



More information about the CMake mailing list