[cmake-developers] Patch to only consider build dependencies between files in the source directory
Brad King
brad.king at kitware.com
Fri Mar 18 11:03:10 EDT 2016
On 03/17/2016 09:54 AM, Attila Krasznahorkay wrote:
> Attached is a new attempt. It seems to work correctly in my tests
> with the Makefile generator.
Thanks.
> + // If it's an absolute path, check if it starts with the source
> + // direcotory:
> + return ( ( path.find( SourceDir ) != 0 ) &&
> + ( path.find( BinaryDir ) != 0 ) );
Please look at using strncmp and a check that the following character
is a nul terminator or '/'. Otherwise an external location with
a common prefix may be mistaken for part of the project.
Also please add documentation in a
Help/variable/CMAKE_DEPENDS_IN_PROJECT_ONLY.rst
file and update Help/manual/cmake-variables.7.rst to reference it.
Thanks,
-Brad
More information about the cmake-developers
mailing list