Problem
mcp-cpp always looks for or generates the symbol index database in the build directory.
Expectation
Allow the use of a symbol index database from a custom directory.
Example
project
├── .cache
│ └── clangd
│ └── index <--- symbol index
│── compile_commands.json <--- copy from build directory
├── sources <--- clangd searches in all parent directories of the active file
└── xxx_build
├── CMakeLists.txt
└── build
mcp-cpp test-project
mcp-cpp and vscode generate index in different directories.
test-project
├── .cache <--- built by vscode
│ └── clangd
│ └── index
├── .gitignore
├── CMakeLists.txt
├── build
│ ├── .cache <--- built by mcpcpp
│ │ └── clangd
│ ├── CMakeCache.txt
│ ├── CMakeFiles
│ │ ├── 3.25.1
│ │ ├── CMakeDirectoryInformation.cmake
│ │ ├── CMakeError.log
│ │ ├── CMakeOutput.log
│ │ ├── CMakeScratch
│ │ ├── Makefile.cmake
│ │ ├── Makefile2
│ │ ├── TargetDirectories.txt
│ │ ├── TestLib.dir
│ │ ├── TestProject.dir
│ │ ├── cmake.check_cache
│ │ ├── pkgRedirects
│ │ └── progress.marks
│ ├── Makefile
│ ├── cmake_install.cmake
│ └── compile_commands.json
├── include
│ ├── Algorithms.hpp
│ ├── Container.hpp
│ ├── FileStorage.hpp
│ ├── IStorageBackend.hpp
│ ├── LogLevel.hpp
│ ├── Math.hpp
│ ├── MemoryStorage.hpp
│ ├── StorageBackend.hpp
│ ├── StorageType.hpp
│ └── StringUtils.hpp
└── src
├── Container.cpp
├── EnumOperators.cpp
├── FileStorage.cpp
├── Math.cpp
├── MemoryStorage.cpp
├── StringUtils.cpp
└── main.cpp
Problem
mcp-cpp always looks for or generates the symbol index database in the build directory.
Expectation
Allow the use of a symbol index database from a custom directory.
Example
project ├── .cache │ └── clangd │ └── index <--- symbol index │── compile_commands.json <--- copy from build directory ├── sources <--- clangd searches in all parent directories of the active file └── xxx_build ├── CMakeLists.txt └── buildmcp-cpp test-project
mcp-cpp and vscode generate index in different directories.
test-project ├── .cache <--- built by vscode │ └── clangd │ └── index ├── .gitignore ├── CMakeLists.txt ├── build │ ├── .cache <--- built by mcpcpp │ │ └── clangd │ ├── CMakeCache.txt │ ├── CMakeFiles │ │ ├── 3.25.1 │ │ ├── CMakeDirectoryInformation.cmake │ │ ├── CMakeError.log │ │ ├── CMakeOutput.log │ │ ├── CMakeScratch │ │ ├── Makefile.cmake │ │ ├── Makefile2 │ │ ├── TargetDirectories.txt │ │ ├── TestLib.dir │ │ ├── TestProject.dir │ │ ├── cmake.check_cache │ │ ├── pkgRedirects │ │ └── progress.marks │ ├── Makefile │ ├── cmake_install.cmake │ └── compile_commands.json ├── include │ ├── Algorithms.hpp │ ├── Container.hpp │ ├── FileStorage.hpp │ ├── IStorageBackend.hpp │ ├── LogLevel.hpp │ ├── Math.hpp │ ├── MemoryStorage.hpp │ ├── StorageBackend.hpp │ ├── StorageType.hpp │ └── StringUtils.hpp └── src ├── Container.cpp ├── EnumOperators.cpp ├── FileStorage.cpp ├── Math.cpp ├── MemoryStorage.cpp ├── StringUtils.cpp └── main.cpp