[Rock-dev] [rock] #384: Adding CMAKE_EXPORT_COMPILE_COMMANDS to rock_standard_layout()
rock
noreply at opendfki.de
Fri Nov 29 17:37:59 CET 2013
#384: Adding CMAKE_EXPORT_COMPILE_COMMANDS to rock_standard_layout()
-----------------------------+-----------------------------------
Reporter: martin.zenzes@… | Owner: rock-dev-mailing-list
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: base | Keywords: cmake,clang_complete
-----------------------------+-----------------------------------
Hi,
would be nice to have this cmake option set by default for all rock-cmake-
projects. The option would create a file
`${CMAKE_BINARY_DIR}/compile_commands.json`, containing the exact compile-
calls for all translation units of a project. Benefits:
- easier debugging of build process. Not always necessary to search
manually in the output of `make -B VERBOSE=1|less`
- allows using this file for code-completion tools like
[https://github.com/Rip-Rip/clang_complete clang_complete] or
[https://github.com/Valloric/YouCompleteMe YouCompleteMe]
Adding this line in the beginning of the macro-definition of
"rock_standard_library()" in Rock.cmake will do the trick for ordinary
rock-libraries:
{{{
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
}}}
I didn't find an appropriate place for orogen-projects. There, all cmake-
files are generated once? Adding the option manually in the beginning of
the top-level `CMakeLists.txt` seems to work, for example.
Adding it globally would help jumping to different sub-projects and using
code-completion without introducing private local changes.
--
Ticket URL: <http://rock.opendfki.de/ticket/384>
rock <http://rock.opendfki.de>
rock: the robot construction kit
More information about the Rock-dev
mailing list