]> https://gitweb.dealii.org/ - dealii.git/commit
CMake: create a compile_commands.json symlink
authorMatthias Maier <tamiko@43-1.org>
Fri, 12 May 2023 16:05:22 +0000 (11:05 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 12 May 2023 22:27:23 +0000 (17:27 -0500)
commit4bc8e6890e61a30740562da0af87104efdb6e2e2
tree16c22628119b55a192e7e037efff094f3cd33ab6
parent4d4b5be54a8c1a0267fe3db82dda6f1435257a79
CMake: create a compile_commands.json symlink

Modern IDEs such as VSCode use a separate build directory for
configuring and compiling a project (such as our example steps).

Unfortunately, this sometimes confuses language servers such as clangd
that might fail to find the correct compile_commands.json in that build
directory. Let's work around this issue by simply creating a symlink
from the source directory pointing to the compile_commands.json file.

As a sanity check, if there is already a compile_commands.json file
present, or if the source and build directory are the same we simply do
nothing.
cmake/macros/macro_deal_ii_invoke_autopilot.cmake

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.