Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add code-workspace and update build dirs #6723

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion barretenberg/cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"displayName": "Debugging build with Clang-16",
"description": "Build with globally installed Clang-16 in debug mode",
"inherits": "clang16",
"binaryDir": "build",
"binaryDir": "build-debug",
"environment": {
"CMAKE_BUILD_TYPE": "Debug",
"CFLAGS": "-gdwarf-4",
Expand All @@ -88,6 +88,7 @@
"displayName": "Optimized debug build with Clang-16",
"description": "Build with globally installed Clang-16 in optimized debug mode",
"inherits": "clang16-dbg",
"binaryDir": "build-debug-fast",
"environment": {
"CMAKE_BUILD_TYPE": "Debug",
"CFLAGS": "-O2 -gdwarf",
Expand All @@ -97,6 +98,7 @@
},
{
"name": "clang16-assert",
"binaryDir": "build-assert",
"displayName": "Build with Clang-16 using RelWithAssert",
"description": "Build with globally installed Clang-16 in release with ASSERTs mode",
"inherits": "clang16",
Expand Down
150 changes: 150 additions & 0 deletions proving-systems.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
// Each "folder" can define a different project in the main repo,
// relative to `.code-workspace`.
"folders": [
{
"name": "aztec-packages",
"path": "./"
},
],
// List recommended extensions for the whole workspace.
"extensions": {
"recommendations": [
"GitHub.vscode-pull-request-github",
// Enables CMake integration and configuration
// for easier building
"ms-vscode.cmake-tools",
// Provides a nice UI for listing all Google Test
// tests, including launching a debug session
// for a specific test directly.
// Also provides buttons alongside test definitions.
"matepek.vscode-catch2-test-adapter",
// Integrates the `clangd` language server for
// - code formatting (clang-format)
// - static analysis (clang-tidy)
// - hints, tooltips, and more.
"llvm-vs-code-extensions.vscode-clangd",
// Better syntax highlighting for C++.
// Make sure to select one of the themes suggested
// (e.g. "Dark+")
"jeff-hykin.better-cpp-syntax",
// Handle CMakeLists.txt editing
"twxs.cmake",
// Integrates LLDB debugger
"vadimcn.vscode-lldb",
// Generate nicer Doxygen comments
"cschlosser.doxdocgen",
// Makes the CMake build output slightly
// prettier.
"IBM.output-colorizer",
"eamodio.gitlens",
"esbenp.prettier-vscode"
],
"unwantedRecommendations": [
// The following may have been installed
// and cause some confusion when running
// tests.
// The options provided by C++ TestMate
// should be good enough.
"ms-vscode.cpptools-themes",
"hbenl.vscode-test-explorer",
"ms-vscode.test-adapter-converter",
"fredericbonnet.cmake-test-adapter",
"ms-vscode.cpptools-extension-pack",
// Used to enable GDB debugging
// Most features are disabled in `settings.json`
// which confict with `clangd`
// Since we ignore GDB, we no longer need this extension
"ms-vscode.cpptools"
]
},
// Global settings which will apply to all subprojects.
// Each subproject may have their own `.vscode/settings.json`
// for configuring extensions which are specific to a certain project.
// Some settings can only be configured here.
"settings": {
"files.associations": {
"*.tcc": "cpp",
},
//
// Clangd. Note that this setting may be overridden by user settings
// to the default value "clangd".
//
"clangd.path": "clangd-16",
// We should disable automatic inclusion of headers unless we decif6de to follow "WhyIWYU".
"clangd.arguments": [
"-header-insertion=never"
],
//
// CMake
//
// Location of base CMakeLists file
"cmake.sourceDirectory": "${workspaceFolder}/barretenberg/cpp/",
//
// C/C++ (should be disabled)
//
// Make sure all C++ IntelliSense features are disabled
// and don't interfere with clangd
"C_Cpp.intelliSenseEngine": "disabled",
"C_Cpp.autocomplete": "disabled",
"C_Cpp.codeAnalysis.clangTidy.codeAction.formatFixes": false,
"C_Cpp.codeAnalysis.runAutomatically": false,
"C_Cpp.configurationWarnings": "disabled",
"C_Cpp.debugShortcut": false,
"C_Cpp.default.enableConfigurationSquiggles": false,
"C_Cpp.formatting": "disabled",
"C_Cpp.vcpkg.enabled": false,
//
// TestMate
//
// Ensures tests are run from the `build` directory
// which ensures SRS can be read
"testMate.cpp.test.workingDirectory": "${command:cmake.buildDirectory}",
// Filter all binaries that are not tests or benchmarks
"testMate.cpp.test.executables": "${command:cmake.buildDirectory}/bin/*{test,Test,TEST,bench}*",
//
// Other
//
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "googletest.failed",
"settings": {
"foreground": "#f00"
}
},
{
"scope": "googletest.passed",
"settings": {
"foreground": "#0f0"
}
},
{
"scope": "googletest.run",
"settings": {
"foreground": "#0f0"
}
}
]
},
"[cpp]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
},
"cmake.configureArgs": [
"-G Ninja"
],
"cmake.useCMakePresets": "always",
"editor.inlayHints.enabled": "offUnlessPressed",
"git.detectSubmodules": false,
"testMate.cpp.discovery.loadOnStartup": false,
"testMate.cpp.debug.configTemplate": {
"type": "lldb",
"MIMode": "lldb",
"program": "${exec}",
"args": "${argsArray}",
"cwd": "${command:cmake.buildDirectory}",
"internalConsoleOptions": "openOnSessionStart",
"console": "internalConsole",
}
},
}
Loading