Skip to content
Snippets Groups Projects
Commit dbf8d5bb authored by Attila Krasznahorkay's avatar Attila Krasznahorkay
Browse files

Made it possible to use VS Code with the WorkDir project.

In order for VS Code to parse our code correctly, it has to be told
explicitly how each source file needs to be compiled. (Otherwise it would
not find the headers from LCG/TDAQ/Gaudi to interpret our code.) This
update makes sure that when the user sets up the build of the
WorkDir project in the "usual layout", in a directory called build/
just beside the athena/ directory, VS Code would automatically find
the correct compile_commands.json file that it needs, when the user
opens the athena/ directory for editing.
parent 4daea0bd
No related branches found
No related tags found
No related merge requests found
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "${env:CXX}",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64",
"compileCommands": "${workspaceFolder}/../build/compile_commands.json"
}
],
"version": 4
}
......@@ -53,6 +53,11 @@ endif()
# Set up CTest:
atlas_ctest_setup()
# Generate a compile_commands.json file, which VS Code can use to interpret
# our code correctly.
set( CMAKE_EXPORT_COMPILE_COMMANDS TRUE CACHE BOOL
"Create compile_commands.json" FORCE )
# Set up a work directory project:
set( _useFortran )
if( ATLAS_USE_FORTRAN )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment