A template repository for C/C++ projects with CMake and Conan. A GitHub Action
workflow is provided with the on workflow_dispatch event. This event has three input
parameters which are language, type, and namespace. language is the language
the project will be generated in. As the name of this template repo might suggest,
the only available options are C and C++. For type, one can choose from Executable,
Static Library, Shared Library, or Interface Library. The last parameter, namespace,
is optional and defaults to the name of the GitHub repository name.
language is the language the template will be generated in. As the name of this
template repository might suggest, the only available options are C and C++
type determines how the project will be generated. The supported types are
Executable, Static Library, Shared Library, and Interface Library.
.
├── src/
│ ├── CMakeLists.txt
│ └── <project_name>.c
├── test_package/
│ ├── src/
│ │ ├── CMakeLists.txt
│ │ └── main.c
│ ├── CMakeLists.txt
│ └── conanfile.py
├── tests/
│ ├── CMakeLists.txt
│ └── <project_name>_test.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── conanfile.py
├── LICENSE
└── README.md
.
├── src/
│ ├── CMakeLists.txt
│ └── <project_name>.cpp
├── test_package/
│ ├── src/
│ │ ├── CMakeLists.txt
│ │ └── main.cpp
│ ├── CMakeLists.txt
│ └── conanfile.py
├── tests/
│ ├── CMakeLists.txt
│ └── <project_name>_test.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── conanfile.py
├── LICENSE
└── README.md
.
├── include/
│ └── <project_namespace>/
│ ├── <project_name>.h
│ └── export.h
├── src/
│ ├── CMakeLists.txt
│ └── <project_name>.c
├── test_package/
│ ├── src/
│ │ ├── CMakeLists.txt
│ │ └── main.c
│ ├── CMakeLists.txt
│ └── conanfile.py
├── tests/
│ ├── CMakeLists.txt
│ └── <project_name>_test.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── conanfile.py
├── LICENSE
└── README.md
.
├── include/
│ └── <project_namespace>/
│ ├── <project_name>.hpp
│ └── export.hpp
├── src/
│ ├── CMakeLists.txt
│ └── <project_name>.cpp
├── test_package/
│ ├── src/
│ │ ├── CMakeLists.txt
│ │ └── main.cpp
│ ├── CMakeLists.txt
│ └── conanfile.py
├── tests/
│ ├── CMakeLists.txt
│ └── <project_name>_test.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── conanfile.py
├── LICENSE
└── README.md
.
├── include/
│ └── <project_namespace>/
│ ├── <project_name>.h
│ └── export.h
├── src/
│ ├── CMakeLists.txt
│ └── <project_name>.c
├── test_package/
│ ├── src/
│ │ ├── CMakeLists.txt
│ │ └── main.c
│ ├── CMakeLists.txt
│ └── conanfile.py
├── tests/
│ ├── CMakeLists.txt
│ └── <project_name>_test.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── conanfile.py
├── LICENSE
└── README.md
.
├── include/
│ └── <project_namespace>/
│ ├── <project_name>.hpp
│ └── export.hpp
├── src/
│ ├── CMakeLists.txt
│ └── <project_name>.cpp
├── test_package/
│ ├── src/
│ │ ├── CMakeLists.txt
│ │ └── main.cpp
│ ├── CMakeLists.txt
│ └── conanfile.py
├── tests/
│ ├── CMakeLists.txt
│ └── <project_name>_test.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── conanfile.py
├── LICENSE
└── README.md
.
├── include/
│ └── <project_namespace>/
│ └── <project_name>.h
├── test_package/
│ ├── src/
│ │ ├── CMakeLists.txt
│ │ └── main.c
│ ├── CMakeLists.txt
│ └── conanfile.py
├── tests/
│ ├── CMakeLists.txt
│ └── <project_name>_test.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── conanfile.py
├── LICENSE
└── README.md
.
├── include/
│ └── <project_namespace>/
│ └── <project_name>.hpp
├── test_package/
│ ├── src/
│ │ ├── CMakeLists.txt
│ │ └── main.cpp
│ ├── CMakeLists.txt
│ └── conanfile.py
├── tests/
│ ├── CMakeLists.txt
│ └── <project_name>_test.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── conanfile.py
├── LICENSE
└── README.md
The name that will be applied to CMake targets and is the name of the directory
that all header files will be under. For example, if the namespace is
my_namespace, then all CMake target will have the alias
my_namespace::<target_name> where <target_name> is the name of the CMake
target. Additionally, all header files will be stored in the directory
<project_root>/include/my_namespace.