> On Nov 21, 2016, at 5:04 AM, Michael Jackson <mike.jack...@bluequartz.net> > wrote: > > Is there a command or variable or a code snippet from someone that > essentially has a list of all the "include_directories" that have been > used/created in a given project? Or can I get a list of all the > targets(created and imported) and then get the list of "include_directories" > from those targets? > > I am messing about with the "VSCode.app" on OS X and their code completion > extension. For this to work one needs to get a list of all the include > directories possible so that clang knows where to look for the headers. > > Wasn't there a cmake command that would dump all the compile commands to a > file or something? > > Thanks > >
The clang compilation database might give you what you need - it’s what several autocompletion tools already use. To generate this, just pass -DCMAKE_EXPORT_COMPILE_COMMANDS=ON when running cmake. You would have to extract the -I options from the command entries, I guess. -Mike -- 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://public.kitware.com/mailman/listinfo/cmake