Roger Leigh wrote: > On Thu, Jan 23, 2014 at 10:40:54AM +0100, Stephen Kelly wrote: >> Andreas Schuh wrote: >> >> > On a side note, just today a co-worker asked me why the compiler cannot >> > find the header files when they were provided as additional arguments >> > to the add_executable command. Indeed this was a reasonable assumption, >> > I think. Why the need for an additional include_directories when I >> > already specified where the header files are located ? This is not >> > something BASIS is taking care of yet either, but would certainly be >> > one of the things I would consider adding. >> >> This is the kind of concrete feedback *about cmake* that I'm looking for >> in this discussion. It's self contained, refers to existing cmake >> functionality, it's easy to imagine the 'user story' and what the user >> code would look like etc. >> >> I don't have any comment about the viability of adding such functionality >> to cmake add_* commands though. > > I'm not sure this can ever be viable because it makes assumptions that are > guaranteed to break for different use cases. > > If I add a header, cmake can have no knowledge of how the sources use the > header. Is it an absolute or relative include? Does the relative include > also include a path?
Exactly. > I think the general sentiment that having add_executable remove a > redundant > include_directories statement is a good one. I'm just unconvinced that > this is doable in practice. My thoughts exactly. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
