cmake: update cpm move third party cli11 xxhash to cpm.#1911
cmake: update cpm move third party cli11 xxhash to cpm.#1911bruno-at-bareos wants to merge 19 commits intobareos:masterfrom
Conversation
abd4986 to
2e6b53b
Compare
|
@sebsura I'm stuck with but when used with CPM it is missing and then failed |
|
We should also add / try CPMLicenses |
|
@tuxmaster5000 the introduction of this PR will removed the -DUSE_SYSTEM_XXX variable CPM will simply search local system package if present. As you were one of the writer of those cmake variable, would you mind to test this PR, and eventually share your feedback? |
7d45dd2 to
856658c
Compare
|
We will need help from @arogge to setup central cache and also the whole offline containers. |
cmake/BareosCpmPackages.cmake
Outdated
| set(XXHASH_ENABLE_DISPATCH | ||
| OFF | ||
| CACHE INTERNAL "" | ||
| ) |
There was a problem hiding this comment.
that's really bad as it will break xxHash performance.
There was a problem hiding this comment.
I was not sure about which flags and options you use when you introduce xxHash,
it is now up to us to bring them to this new tool. we have used the example given at cpm to integrate xxHash.
did you remember or have you some notes about the flags needed for xxHash ?
There was a problem hiding this comment.
So we have an additional question here: before we build xxHash as static lib, now do we don't just link to it ?
So the performance is not related to us, but the people build libxxhash ?
cmake/BareosCpmPackages.cmake
Outdated
| CPMFindPackage( | ||
| NAME CPMLicenses.cmake | ||
| GITHUB_REPOSITORY cpm-cmake/CPMLicenses.cmake | ||
| VERSION 0.0.5 | ||
| ) |
There was a problem hiding this comment.
While I like the idea of this, I'm not sure it won't work for us.
At least you will get different results depending on which packages were downloaded and which one were present locally.
There was a problem hiding this comment.
In term of workflow, what I can imagine, is that any new 3rd party that will enter the code, will be introduced by adding it here. So one time make write-licences will be done and the generated License file will be created, the author will then pick the licence and will add it to the main repo in global License file.
It is quite rare that a component change its license and we will miss that one.
So whatever local or download module present the generated content may change, it is still up to the author of the PR to bring the license. We may want a checkbox in case of new component introduction.
We can use dplcompat to test the workflow and see how it goes?
|
|
||
| message("Entering ${CMAKE_CURRENT_SOURCE_DIR}") | ||
|
|
There was a problem hiding this comment.
If that's the only thing left here, we can probably also remove the CMakeLists.txt and the directory.
f18e046 to
6569fb6
Compare
|
@bruno-at-bareos I have tested the last cpm stuff from the master which will use fmt as the first one. |
Sorry if I wasn't clear enough, only this branch is valid for tests with CPM, not the actual master branch. BTW fmt versioning is a beast :-) |
|
I think in my case it was an dirty build. (A total clean build will let build the master using the local fmt of Fedora 39) I have tried this path: |
1c74310 to
21e4196
Compare
|
@arogge I've some questions that appears when I switch back to CPMAddPackages. Such combination for the moment are failing the cmake, while the cache is filled. I developed a scenario to test the different cases start with a container which doesn't have cli11,fmt,xxhash system package installed, declare a cache location with
so far so good. Now we want to benefit from that cache and as such use But then the cmake produce error with find_package (almost expected) but finally still find the package as it is in the cache. I would have expected that if find_package doesn't find a local system, the addpackage find the cache (what it do) but not finish in errors. Changing I don't know how to handle the case in cmake : Failure, but we found a workaround :-) Maybe there's an issue with CPM ? Or I overlooked the usage of centralized cache, any though ? |
- remove from third-party - move USE_SYSTEM_CLI11 to BareosCpmPackages.cmake - remove set_target_properties IMPORTED_GLOBAL as TRUE by default with find/add_librairy - gtests: remove extra third \n in expected cli help output with CLI11 2.4.2 cli --help will output no more extra line Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- remove from third-party - move `USE_SYSTEM_XXHASH` to BareosCpmPackages - remove set_target_properties IMPORTED_GLOBAL as TRUE by default with find/add_library
- CPMFindPackage allow to use local/system package if present in the system. - Removed usage of cmake parameter USE_SYSTEM_FMT, USE_SYSTEM_CL11 USE_SYSTEM_FMT Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- CPMFindPackage allow to use local/system package if present in the system. - Removed usage of cmake parameter USE_SYSTEM_FMT, USE_SYSTEM_CL11 USE_SYSTEM_FMT Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- allow retrieval of the CPM third-party modules licenses
- use `make write-licenses` to create output bundle file in
"${CMAKE_CURRENT_BINARY_DIR}/LICENSES_third_party.txt"
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
-Dlicenses-only will allow to activate CPM modules and `make write-licenses` to create the third party licenses. Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
1c7f8f5 to
50f8e41
Compare
to be used as reference for pr-tools license update. Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
|
I'll close this one, as we probably go with the replacement PR #1963 |
Update CPM, move CLI11 and xxHASH to CPM with updates
Related to https://github.com/bareos/internal/issues/86
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests