From eb765210603caf02f892d3484fad2bdfc94ab112 Mon Sep 17 00:00:00 2001 From: AndreaRigoni Date: Wed, 4 Mar 2026 14:37:02 +0000 Subject: [PATCH] add clangd linting fix --- .clangd | 52 +++++++++++++++++++++++++++++++++++++++++++ .vscode/settings.json | 31 ++++++++++++++++++++++---- 2 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 .clangd diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..432ea6a --- /dev/null +++ b/.clangd @@ -0,0 +1,52 @@ +CompileFlags: + CompilationDatabase: build + Add: + - -I/home/rigoni/devel/cmt/ulib/src + - -isystem/home/share/micromamba/envs/mutom/include + - -isystem/home/share/micromamba/envs/mutom/include/eigen3 + - -isystem/home/share/micromamba/envs/mutom/targets/x86_64-linux/include + - -isystem/home/share/micromamba/envs/mutom/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++ + - -isystem/isystem/home/share/micromamba/envs/mutom/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/x86_64-conda-linux-gnu + - -isystem/home/share/micromamba/envs/mutom/x86_64-conda-linux-gnu/sysroot/usr/include + - "--gcc-toolchain=/home/share/micromamba/envs/mutom" + - -D_ULIB_DETAIL_SIGNAL_EMIT + - -DUSE_CUDA + - -std=c++17 + - "-D__host__=" + - "-D__device__=" + - "-D__global__=" + - "-D__constant__=" + - "-D__shared__=" + - "-D__align__(x)=" + - "-D__forceinline__=inline" + - "-D__launch_bounds__(x)=" + +Diagnostics: + UnusedIncludes: None + MissingIncludes: None + +--- +If: + PathExclude: [/home/rigoni/devel/cmt/ulib/src/.*] +Diagnostics: + Suppress: ["*"] + +--- +If: + PathMatch: [.*\.cu, .*/src/Math/testing/VoxRaytracerTest.cpp, .*/src/Math/VoxRaytracer.cpp, .*/src/Math/VoxImage.cpp] +CompileFlags: + Add: + - "-x" + - "cuda" + - "--cuda-path=/home/share/micromamba/envs/mutom" + - "--cuda-gpu-arch=sm_61" + - "--gcc-toolchain=/home/share/micromamba/envs/mutom" + - "-L/home/share/micromamba/envs/mutom/lib" + - "-lcudart" + - "-lcuda" + - "-U__host__" + - "-U__device__" + - "-U__global__" + - "-U__constant__" + - "-U__shared__" + - "-U__forceinline__" diff --git a/.vscode/settings.json b/.vscode/settings.json index 60a2f7a..ca906a4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,31 @@ { "clangd.fallbackFlags": [ - "-I${workspaceFolder}/src", - "-I/home/share/micromamba/envs/mutom/include", - "-I/home/rigoni/.conan2/p/eigen5481853932f72/p/include/eigen3" + "-I/home/rigoni/devel/cmt/ulib/src", + "-isystem/home/share/micromamba/envs/mutom/include", + "-isystem/home/share/micromamba/envs/mutom/include/eigen3", + "-isystem/home/share/micromamba/envs/mutom/targets/x86_64-linux/include", + "-isystem/home/share/micromamba/envs/mutom/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++", + "-isystem/home/share/micromamba/envs/mutom/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/x86_64-conda-linux-gnu", + "-isystem/home/share/micromamba/envs/mutom/x86_64-conda-linux-gnu/sysroot/usr/include", + "--gcc-toolchain=/home/share/micromamba/envs/mutom", + "-D__host__=", + "-D__device__=", + "-D__global__=", + "-D__constant__=", + "-D__shared__=", + "-DUSE_CUDA" ], - "clangd.semanticHighlighting.enable": true + "clangd.semanticHighlighting.enable": true, + "clangd.arguments": [ + "--compile-commands-dir=build", + "--query-driver=/home/share/micromamba/envs/mutom/bin/g++,/home/share/micromamba/envs/mutom/bin/gcc,/home/share/micromamba/envs/mutom/bin/nvcc", + "--suppress-system-warnings", + "--all-scopes-completion", + "--completion-style=detailed", + "--header-insertion=never", + "-j=4", + "--pch-storage=memory", + "--background-index", + "--log=verbose" + ] } \ No newline at end of file