Allow me to bump this message. The question is very simple; can we export custom commands into compile_commands.json?
Feladó: Máté Ferenc Nagy-Egri via cmake-developers Elküldve: 2017. november 14., kedd 10:25 Címzett: CMake Developers Tárgy: [cmake-developers] FW: [CMake] custom_command andcompile_commands.json This thread on the CMake users mailing list has been silent for the past week. I wanted to bring it over to the dev list, because there might be more expertise here on the subject at hand. tl;dr: can custom_commands be exported into compile_commands.json? This is another projection of the problem: how to add new languages to CMake conveniently. If I need to make LaTeX a first-class language to make the export, it’s an awful lot of work only to make IDE extensions LaTeX aware (and I could go on with SYCL, GnuPlot, etc.). Cheers, Máté Feladó: Moreland, Kenneth Elküldve: 2017. november 6., hétfő 18:28 Címzett: Nagy-Egri Máté Ferenc Másolatot kap: cm...@cmake.org Tárgy: RE: [CMake] custom_command and compile_commands.json Máté, I don’t know anything about the CMAKE_EXPORT_COMPILE_COMMANDS feature, but I can attest that the UseLATEX commands are all created with add_custom_command (with some add_custom_target commands to set up the targets). Someone who knows the CMAKE_EXPORT_COMPILE_COMMANDS feature will have to answer whether it is possible to export custom commands. -Ken From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Nagy-Egri Máté Ferenc via CMake Sent: Sunday, November 5, 2017 11:07 AM To: Cmake Mailing List <cm...@cmake.org> Subject: [EXTERNAL] [CMake] custom_command and compile_commands.json Hi! I am trying to export a custom_command to the compile_commands.json database, but no luck up until now. The only similar question I found on the web is a Stackoverflow thread named „cmake clang-tidy (or other script) as custom target”. I am trying to bring together C/C++ compilation, GnuPlot and LaTeX into a single Cmake script (done), and have the relevant Visual Studio Code extensions hook into the compile_commands.json file to recognize CMakes machinery and that they themselves are not responsible for kicking off the compilation of their respective source files. Microsofts C++ extension is compile_commands.json aware, but the LaTeX-Workshop extensino is not. I wanted to do the research before jumping to feature requests: is it possible to export @kmorel Github users UseLATEX custom_commands into the compile_commands.json database? As far as I saw, setting CMAKE_EXPORT_COMPILE_COMMANDS to ON right before add_latex_document() is not enough. Does LATEX need to be a first-class CMake language in order for this machinery to kick off? Tanks in advance, Máté
-- 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-developers