On 12/19/2012 09:49 AM, Stephen Kelly wrote: > The problem is that in this code: > > include_directories(foo/bar) > add_library(the_lib ...) > > the INCLUDE_DIRECTORIES target property is seeded by the directory property > of the same name. The backtrace then leads to the add_library invokation > instead of the include_directories invokation. > > The fix is to modify the management of INCLUDE_DIRECTORIES in cmMakefile to > be based on std::vector<cmMakefile::IncludeDirectoriesEntry>, where: > > struct IncludeDirectoriesEntry > { > std::string Value; > cmListFileBacktrace Backtrace; > }; > > and then use *that* backtrace (and some new API on cmTarget) in > cmTarget::SetMakefile, instead of > > this->SetProperty("INCLUDE_DIRECTORIES", > this->Makefile->GetProperty("INCLUDE_DIRECTORIES")); > > Are you ok with that?
Yes, but this is where having some more smarts inside cmProperty could help. If the value itself knew where it came from then this information could be propagated when the value is copied into another property. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers