Bare minimal CMake template for C projects without any external dependencies.
Automatically includes the required headers while compiling and linking the executable.
- Update
project_name
inCMakeLists.txt
andrun.sh
Includes scripts for cleaning and building the project.
# Clean
./clean.sh
# Build
./build.sh
# Run
./run.sh
![Screenshot 2023-11-16 at 5 01 23 AM](https://private-user-images.githubusercontent.com/1512264/283410339-ec7e1546-d6cf-43e7-a9af-5d974749b893.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzOTg2MjQsIm5iZiI6MTcyMDM5ODMyNCwicGF0aCI6Ii8xNTEyMjY0LzI4MzQxMDMzOS1lYzdlMTU0Ni1kNmNmLTQzZTctYTlhZi01ZDk3NDc0OWI4OTMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDhUMDAyNTI0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmYxNDg1MTI1YTFjMGIzOWFlMzJiYjA0NzZmZGJjOTFjZjY2M2U1YmYwZmU0M2QwODIxMGUxZTdiMzVlZDE3OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.0u9HjR-QeY2FvmqE3rQB0rL0eERSrgZhXhWxjXuYudk)
- Open a local folder
Project
>Generate cache for <project-name>
- Right click a source file in the
Solution Explorer
andSet as Startup Item
- Build with
Ctrl+B
- Debug with
F5