mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-30 13:41:13 +02:00
small readme and cmake cleanup (#6)
* small readme and cmake cleanup * wording
This commit is contained in:
parent
23abf01c55
commit
adf2801be6
2 changed files with 12 additions and 13 deletions
23
README.md
23
README.md
|
@ -1,9 +1,9 @@
|
|||
[](https://github.com/TheLartians/ModernCPPStarter/actions)
|
||||
[](https://github.com/TheLartians/ModernCPPStarter/actions)
|
||||
[](https://github.com/TheLartians/ModernCPPStarter/actions)
|
||||
[](https://github.com/TheLartians/ModernCPPStarter/actions)
|
||||
[](https://github.com/TheLartians/ModernCPPStarter/actions)
|
||||
[](https://codecov.io/gh/TheLartians/ModernCPPStarter)
|
||||
[](https://github.com/TheLartians/ModernCppStarter/actions)
|
||||
[](https://github.com/TheLartians/ModernCppStarter/actions)
|
||||
[](https://github.com/TheLartians/ModernCppStarter/actions)
|
||||
[](https://github.com/TheLartians/ModernCppStarter/actions)
|
||||
[](https://github.com/TheLartians/ModernCppStarter/actions)
|
||||
[](https://codecov.io/gh/TheLartians/ModernCppStarter)
|
||||
|
||||
# ModernCppStarter
|
||||
|
||||
|
@ -86,13 +86,12 @@ See [Format.cmake](https://github.com/TheLartians/Format.cmake) for more options
|
|||
Glob is considered bad because any changes to the source file structure [might not be automatically caught](https://cmake.org/cmake/help/latest/command/file.html#filesystem) by CMake's builders and you will need to manually invoke CMake on changes.
|
||||
I personally prefer the `GLOB` solution for its simplicity, but feel free to change it to explicitly listing sources.
|
||||
|
||||
- I'm adding external dependencies to my project using CPM. Will this force users to use CPM as well?
|
||||
- You recommend to add external dependencies using CPM.cmake. Will this force users of my library to use CPM as well?
|
||||
|
||||
CPM.cmake should be invisible for your library users as it's a self-contained CMake Script.
|
||||
If problems do arise, they can always opt-out by defining `CPM_USE_LOCAL_PACKAGES`, which will override all calls to `CPMAddPackage` with `find_package`.
|
||||
If you concerned about this, you should prefer using `CPMFindPackage` instead of `CPMAddPackage`, as then CPM will try to use `find_package` to add packages whenever possible.
|
||||
`CPMFindPackage` approach should also be compatible with any common C++ package manager without modifications, however at the cost of reproducible builds.
|
||||
For more information, see the [CPM.cmake documentation](https://github.com/TheLartians/CPM.cmake).
|
||||
[CPM.cmake](https://github.com/TheLartians/CPM.cmake) should be invisible to library users as it's a self-contained CMake Script.
|
||||
If problems do arise, users can always opt-out by defining `CPM_USE_LOCAL_PACKAGES`, which will override all calls to `CPMAddPackage` with `find_package`.
|
||||
Alternatively, you could use `CPMFindPackage` instead of `CPMAddPackage`, which will try to use `find_package` before calling `CPMAddPackage` as a fallback.
|
||||
Both approaches should be compatible with common C++ package managers without modifications, however come with the cost of reproducible builds.
|
||||
|
||||
- Can I configure and build my project offline?
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ ADD_TEST(GreeterTests GreeterTests)
|
|||
|
||||
# ---- code coverage ----
|
||||
|
||||
if (${ENABLE_TEST_COVERAGE})
|
||||
if (ENABLE_TEST_COVERAGE)
|
||||
set_target_properties(Greeter PROPERTIES CXX_STANDARD 17 COMPILE_FLAGS "-O0 -g -fprofile-arcs -ftest-coverage --coverage")
|
||||
target_link_options(Greeter PUBLIC "--coverage")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue