diff options
author | Johannes Schmitz <johannes.schmitz1@gmail.com> | 2019-04-26 21:52:23 +0200 |
---|---|---|
committer | Andrej Rode <mail@andrejro.de> | 2019-05-11 21:30:49 +0200 |
commit | c89f0d595b948488d72f00e3bcaa0503ec22b636 (patch) | |
tree | ee3592dee0a0483d8a97c1c695730e9ccf816a65 /gr-utils/python | |
parent | df4c7e2a461cb2e2ebe6f799f58dd1f6b8d11a46 (diff) |
cmake: Enable CMAKE_EXPORT_COMPILE_COMMANDS
When CMAKE_EXPORT_COMPILE_COMMANDS is ON, a file compile_commands.json
will be created in the build directory that enables code completion
engines to find all include directories and provide a very comprehensive
auto completion experience without any manual IDE configuration.
A nice example for this is the VS Code extension cpptools that is
developed by Microsoft. Of course this is not limited to VS Code and
works with other engines such as YouCompleteMe as well.
Diffstat (limited to 'gr-utils/python')
-rw-r--r-- | gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt b/gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt index ea8eb3fb8e..0f603b48bf 100644 --- a/gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt +++ b/gr-utils/python/modtool/templates/gr-newmod/CMakeLists.txt @@ -49,6 +49,9 @@ set(VERSION_INFO_MAINT_VERSION git) cmake_policy(SET CMP0011 NEW) +# Enable generation of compile_commands.json for code completion engines +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + ######################################################################## # Compiler specific setup ######################################################################## |