https://github.com/seng3694/create_c_project
Creates a CMake project structure for a C project
https://github.com/seng3694/create_c_project
c cmake project-creation project-template python
Last synced: 24 days ago
JSON representation
Creates a CMake project structure for a C project
- Host: GitHub
- URL: https://github.com/seng3694/create_c_project
- Owner: Seng3694
- License: mit
- Created: 2019-10-03T15:42:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-03T16:26:03.000Z (over 6 years ago)
- Last Synced: 2025-01-26T14:50:05.561Z (over 1 year ago)
- Topics: c, cmake, project-creation, project-template, python
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Create a CMake C Project #
Creates a CMake project structure for a C project. A script i've been using for some projects of mine.
## Command Line Interface ##
| Argument | Short | Explanation |
|----------|-------|----------------------------------------------------------------------------|
| --name | -n | The name of the project. (e.g.: "my_project") |
| --cmake | -c | The CMake version to use. (e.g.: "2.8") |
| --lib | | Optional argument for building a library project instead of an exectuable. |
| --help | -h | Prints help text. |
## Example for a libary project ##
```bash
>py create_c_project.py --name"name" --cmake"3.2" --lib
```
This creates a the following structure where `name` is the project name:
```
name
+--name
| +--include
| | +--name
| | +--name.h
| |
| +--src
| | +--name.c
| |
| +--CMakeLists.txt
|
+--test
| +--include
| +--src
| | +--main.c
| |
| +--CMakeLists.txt
|
+--CMakeLists.txt
```
## Example for a executable project ##
```bash
>py create_c_project.py --name"name" --cmake"3.2"
```
This creates a the following structure where `name` is the project name:
```
name
+--include
+--src
| +--main.c
|
+--CMakeLists.txt
```
## License ##
MIT License: see [License][1] for more information.
[1]:LICENSE