<div dir="ltr">Presuming makefile target, would it help if after CMake you do "make VERBOSE=1" ? Verbose mode should show all compilation commands, maybe you could further parse them into the format you want.<div><br></div><div>Kind regards,</div><div>- Dmitry.</div></div><br><div class="gmail_quote"><div dir="ltr">пт, 19 окт. 2018 г. в 18:17, Urs <<a href="mailto:nab%2Bcmake@lampshade.ch">nab+cmake@lampshade.ch</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to get CMake to output a compilation database for my project <br>
using gcc and CUDA (nvcc). I'd use the compile_commands.json file for <br>
rtags navigation in emacs and clang-tidy inspection.<br>
<br>
To do that, I just added<br>
<br>
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)<br>
<br>
to my CMakeLists.txt<br>
<br>
But it looks like the output I get is only having the information for <br>
the *.cpp files. It looks like the *.cu files are all compiled as <br>
external objects taht have their own cmake code in subroutines and are <br>
not built by the Makefile generator.<br>
<br>
I'm not a cmake expert, is what I'm trying to do possible? Am I doing <br>
something wrong somewhere?<br>
<br>
Thanks,<br>
<br>
Urs<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>