mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 02:01:33 +01:00 
			
		
		
		
	Merge a4cedc75ff into 12cf5de1a8
				
					
				
			This commit is contained in:
		
						commit
						03360c3b51
					
				
					 3 changed files with 64 additions and 0 deletions
				
			
		
							
								
								
									
										19
									
								
								.devcontainer/devcontainer.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.devcontainer/devcontainer.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | // .devcontainer/devcontainer.json | ||||||
|  | { | ||||||
|  |   "name": "ModernCppStarter", | ||||||
|  |   "context": "..", | ||||||
|  |   "dockerFile": "../Dockerfile", | ||||||
|  |   "customizations": { | ||||||
|  |     "vscode": { | ||||||
|  |       "settings": { | ||||||
|  |         "C_Cpp.default.compilerPath": "/usr/bin/clang++", | ||||||
|  |         "cmake.generator": "Ninja" | ||||||
|  |       }, | ||||||
|  |       "extensions": [ | ||||||
|  |         "ms-vscode.cmake-tools", | ||||||
|  |         "ms-vscode.cpptools", | ||||||
|  |         "twxs.cmake" | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										41
									
								
								Dockerfile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								Dockerfile
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,41 @@ | ||||||
|  | # Use official Ubuntu image | ||||||
|  | FROM ubuntu:24.04 | ||||||
|  | 
 | ||||||
|  | # Install dependencies | ||||||
|  | RUN apt-get update && \ | ||||||
|  |     DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||||||
|  |     build-essential \ | ||||||
|  |     cmake \ | ||||||
|  |     ninja-build \ | ||||||
|  |     git \ | ||||||
|  |     curl \ | ||||||
|  |     gdb \ | ||||||
|  |     lldb \ | ||||||
|  |     python3 \ | ||||||
|  |     python3-pip \ | ||||||
|  |     python3-venv \ | ||||||
|  |     clang \ | ||||||
|  |     clang-tidy \ | ||||||
|  |     lcov \ | ||||||
|  |     doxygen \ | ||||||
|  |     meson \ | ||||||
|  |     libpsl-dev \ | ||||||
|  |     sudo \ | ||||||
|  |     pkg-config \ | ||||||
|  |     ghostscript \ | ||||||
|  |     && apt-get clean | ||||||
|  | 
 | ||||||
|  | # Create and activate a virtual environment for Python tools | ||||||
|  | ENV VIRTUAL_ENV=/opt/venv | ||||||
|  | RUN python3 -m venv $VIRTUAL_ENV | ||||||
|  | ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||||||
|  | 
 | ||||||
|  | # Set CLANG_FORMAT_EXECUTABLE environment variable to use clang-format from the venv | ||||||
|  | RUN ln -s /opt/venv/bin/clang-format /usr/local/bin/clang-format | ||||||
|  | 
 | ||||||
|  | # Upgrade pip and install Python packages in venv | ||||||
|  | RUN pip install --upgrade pip && \ | ||||||
|  |     pip install clang-format==14.0.6 cmake_format==0.6.11 pyyaml jinja2 pygments | ||||||
|  | 
 | ||||||
|  | # Load shell | ||||||
|  | CMD ["/bin/bash"] | ||||||
|  | @ -146,6 +146,10 @@ Additional arguments can be passed to the analyzers by setting the `CLANG_TIDY_A | ||||||
| 
 | 
 | ||||||
| Ccache can be enabled by configuring with `-DUSE_CCACHE=<ON | OFF>`. | Ccache can be enabled by configuring with `-DUSE_CCACHE=<ON | OFF>`. | ||||||
| 
 | 
 | ||||||
|  | #### Devcontainer | ||||||
|  | 
 | ||||||
|  | The project includes a dockerfile along with a devcontainer file which allows for development in a docker container. Open the project folder in VS Code and you should be prompted to reopen the project in a container. | ||||||
|  | 
 | ||||||
| ## FAQ | ## FAQ | ||||||
| 
 | 
 | ||||||
| > Can I use this for header-only libraries? | > Can I use this for header-only libraries? | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue