Silicon is a lightweight and fast command-line tool for setting up, building, running, and cleaning C/C++ projects on macOS with Apple Silicon (ARM64).
It was created with simplicity and developer speed in mind, aiming to make project management easy and efficient.
- Quickly initialize a new CMake project with a universal
CMakeLists.txt
template - Automatically configure and build projects optimized for Apple Silicon
- Run the compiled binary with a single command
- Clean build artifacts easily
- Colorful, user-friendly terminal output
- Designed specifically for macOS on Apple Silicon (M1, M2, M3 chips)
In order for this to work on your Mac, you should first have a .zshrc in your home directory. But no worries! You may run this magic script in your terminal, which will set up everything for you. No need to clone the repo, we got you covered!
curl -fsSL https://raw.githubusercontent.com/jorgenfinsveen/silicon/main/install/install.sh | zsh
- Clone this repo and store it in your user directory under the name .silicon:
git clone https://github.com/jorgenfinsveen/silicon.git ~/.silicon
- Run the following command in your terminal:
sh ~/.silicon/install/install.sh # sudo may be required
- Start making your life easier with Silicon!
- Clone this repo and store it in your user directory under the name .silicon:
git clone https://github.com/jorgenfinsveen/silicon.git ~/.silicon
- Make sure you have a .zshrc, .bashrc (or similar). If not, create one depending on wether you use zsh or bash (zsh is default on MacOS).
- Write the following at the bottom of the above file:
source ~/.silicon/silicon.sh
- Finally, run this command in the terminal to apply Silicon to your CLI:
source ~/[shell-profile-file] # Alternatives: .zshrc, .bashrc, etc.
silicon [command]
Available commands:
Command | Description |
---|---|
init |
Create a new CMakeLists.txt from template |
build |
Configure and build the project |
run |
Run the compiled binary (auto-detects target) |
clean |
Remove the build directory |
info |
Display information about Silicon |
Using Silicon is fairly easy! In order to start using it just do the following:
- Open an empty folder where you plan to write some C/C++ code.
- Start a terminal session in that directory.
- Run
silicon help
to see your options!
I created this due to problems I had with C/C++ and OpenMP. In order to get the most out of Silicon, I would recommend you to do the following:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
eval "$(/opt/homebrew/bin/brew shellenv)"
brew --version
brew install vcpkg
vcpkg version
xcode-select --install
clang --version
I added this here because the CMakeLists template you get from Silicon ads the OpenMP flag (I needed it when I first started this ridicoulous project). Just to ensure that you don't get any weird errors, spare you the trouble by downloading OpenMP as well.
Check if OpenMP is already installed
brew list | grep libomp
Installing OpenMP through Homebrew
brew install libomp
The Microsoft C/C++ language support extension has some errors when it comes to e.g., OpenMP, which makes it impossible for vscode to understand that you are using OpenMP correctly, leaving red squiggly lines all over the place! I would therefore recommend that you use clangd instead. Also, it could be a good idea to download Cmake Tools as well!
I will also recommend that you select the right configurations. Here is how my .vscode
setup looks like:
{
"clangd.path": "/opt/homebrew/opt/llvm/bin/clangd",
"cmake.sourceDirectory": "${workspaceFolder}",
"cmake.buildDirectory": "${workspaceFolder}/build",
"cmake.generator": "Unix Makefiles",
"cmake.configureOnOpen": true
}
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
],
"compilerPath": "/opt/homebrew/opt/llvm/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "macos-clang-arm64",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
- v1.0.0: First official release
- Colorful ASCII logo and CLI output
- Quick install via
curl
- Allow specifying target manually (e.g.,
silicon run myprogram
) - Add caching of target name for faster runs
- Add support for building multiple binaries
- Add
silicon update
command for future self-updating - Write full documentation with examples and troubleshooting
- Add parameter to init function to specify the language of the project
- Interactive CLI prompts (e.g., when initializing a project)
- Auto-detect common project structures
- Support for cross-platform (Linux ARM64)
- Support for automatic CMake inclusion of parallelism libraries (MPI, Metal, OpenCL, CUDA)
- Support for specifying compiler flags
If you have ideas or suggestions, feel free to open an issue!

This project is licensed under the MIT License. See the LICENSE for details.
Silicon was created by Jørgen Finsveen as a personal tool to streamline C/C++ development workflows on Apple Silicon machines. Feel free to contribute by submitting an issue or a pull request!