| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A comprehensive, containerized C++ development environment designed for serious C++ development with modern toolchains, package managers, and debugging tools.
cppBench follows the layered workBenches model:
The .devcontainer/ directory in this repo is a legacy monolithic setup and is deprecated. The layered images are the source of truth going forward.
cppBench/ ├── .devcontainer/ # Legacy monolithic devcontainer (deprecated) │ ├── Dockerfile # Legacy container definition │ ├── devcontainer.json # VS Code devcontainer settings │ ├── docker-compose.yml # Multi-container orchestration │ ├── post-create.sh # Post-creation setup script │ ├── BUILD_FIXES.md # Troubleshooting guide │ ├── .env # Environment variables │ └── .env.example # Environment template ├── scripts/ │ ├── launch-devbench.sh # Quick VS Code launcher (Linux/macOS) │ ├── start-monster.ps1 # PowerShell launcher (Windows) │ └── start-monster.sh # Advanced shell launcher ├── .gitignore # Comprehensive C++ gitignore └── README.md # This file
# Clone and launch
git clone <your-repo-url>
cd cppBench
./scripts/launch-devbench.sh# Launch with direct shell access
./scripts/start-monster.sh --shell
# Or rebuild and launch
./scripts/start-monster.sh --rebuild --shell# Launch from PowerShell
.\scripts\start-monster.ps1
# Rebuild and launch
.\scripts\start-monster.ps1 -RebuildA complete sample project is included to demonstrate the environment:
# Navigate to sample project
cd /workspace/projects/sample-cpp
# Build and test
./build.sh
# Run the application
../builds/sample-cpp/sample_app
# Run tests
../builds/sample-cpp/sample_testsmkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . --parallel $(nproc)mkdir build && cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
ninja# With CTest
ctest --output-on-failure
# Direct execution
./your_test_executablesonarcloud-cpp-gcovr uses SONAR_TOKEN when already exported, or reads SONARQUBE_TOKEN from ~/.config/sonarqube/sonar.env and aliases it to SONAR_TOKEN. It builds/tests a CMake project with GCC coverage flags, writes coverage.xml in Sonar generic coverage format, and runs sonar-scanner.
sonarcloud-cpp-gcovrFor non-CMake projects, provide your own clean coverage build/test command:
SONAR_CPP_TEST_COMMAND="./scripts/coverage.sh" sonarcloud-cpp-gcovrThe shell alias cpp-sonar-coverage points to the same command.
gdb ./your_test_executable
(gdb) run# Search for packages
vcpkg search boost
# Install packages
vcpkg install boost-system boost-filesystem
# In CMakeLists.txt
find_package(Boost REQUIRED COMPONENTS system filesystem)# Create conanfile.txt
[requires]
boost/1.82.0
[generators]
CMakeDeps
# Install dependencies
conan install . --build=missinggdb ./your_program
(gdb) set args arg1 arg2
(gdb) break main
(gdb) run# Memory check
valgrind --tool=memcheck --leak-check=full ./your_program
# Performance profiling
valgrind --tool=callgrind ./your_program# Compile with ASan
cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g"
./your_program# Generate compile_commands.json
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# Run analysis
clang-tidy src/*.cppcppcheck --enable=all --std=c++20 src/# Switch to Clang
export CC=clang-19
export CXX=clang++-19
cmake .. -DCMAKE_BUILD_TYPE=Debug
# Switch back to GCC
export CC=gcc-14
export CXX=g++-14The environment supports development for multiple platforms with consistent tooling across Linux, macOS, and Windows hosts.
# Check compiler versions
gcc --version
clang --version
# Check CMake version
cmake --version
# Check available tools
which gdb valgrind clang-tidy cppcheck
# Check environment
echo $CC $CXX
printenv | grep -E "(VCPKG|CONAN)"This development environment is designed to be extensible. To add new tools or modify configurations:
This development environment configuration is provided as-is for development use.
Ready for heavy C++ development! 🛠️⚡🚀
| Back | FazBrowse Home | New Git URL |