1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-09-03 07:30:53 +02:00

Modernize cmake project files

Fix install target

Update cmake-format config file

Format all cmake files.

Update CPM.cmake version.

Use FILE_SET HEADER to verify and install the header files.

Prevent build problems caused by CPM_USE_LOCAL_PACKAGES

Prevent problems with doctest if local found
This commit is contained in:
ClausKlein 2025-03-06 07:00:40 +01:00
parent 5115efe66a
commit a3bc933175
14 changed files with 441 additions and 32 deletions

View file

@ -44,7 +44,7 @@ This template is the result of learnings from many previous projects and should
Eventually, you can remove any unused files, such as the standalone directory or irrelevant github workflows for your project.
Feel free to replace the License with one suited for your project.
To cleanly separate the library and subproject code, the outer `CMakeList.txt` only defines the library itself while the tests and other subprojects are self-contained in their own directories.
To cleanly separate the library and subproject code, the outer `CMakeList.txt` only defines the library itself while the tests and other subprojects are self-contained in their own directories.
During development it is usually convenient to [build all subprojects at once](#build-everything-at-once).
### Build and run the standalone target
@ -66,7 +66,7 @@ cmake -S test -B build/test
cmake --build build/test
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build/test --target test
# or simply call the executable:
# or simply call the executable:
./build/test/GreeterTests
```
@ -91,7 +91,7 @@ See [Format.cmake](https://github.com/TheLartians/Format.cmake) for details.
These dependencies can be easily installed using pip.
```bash
pip install clang-format==14.0.6 cmake_format==0.6.11 pyyaml
pip install cmake clang-format cmake_format==0.6.11 pyyaml
```
### Build the documentation