Repository navigation
Conversation
|
I'm not sure about INCLUDE_TESTS, user can use include(ExternalProject)
ExternalProject_Add(cpu_features
GIT_REPOSITORY https://github.com/google/cpu_features.git
GIT_TAG main
SOURCE_DIR "${CMAKE_BINARY_DIR}/cpu_features-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/cpu_features-build"
CMAKE_ARGS
-DBUILD_TESTING=OFF
)About install, if I'm not mistake if you want to install only targets that are defined in the current project and not in external projects, you can use the @Mizux, what do you think? |
|
Well, I did try using 'external project' cmake module before, but actually this pulls out more problems, for example, it's not possible to use 'find_package' until cpu_features install target's done. |
|
My 2 cents:
side noteNow, Since variable are directory scoped you can add the |
Attached is the sample app which exactly reflects what we have in our project. This illustrates the problems I'm trying to solve with this pull request.
Excellent! I'll remove this from my PR and will wait for that PR to land.
Unfortunately, we can't currently use cmake 3.24, the latest version available to use is 3.13. |
|
Part of this PR has been submitted in:
|
Yes. That PR only partially solves the problem of embedding which we have to get solved. |
AFAIU:
I'll have a look at 2. tomorrow.
My apologies for this, this PR went out of my radar and I started reviewing the most recent PRs first. It's unfortunate that #317 went in before yours. |
|
Opened:
|
While following the recommended way to incorporate cpu_features into a cmake project some cpu_features lib build artefacts become included into the target project.
For example, list_cpu_features executable will be built and installed among project target binaries.
This pull request proposes to include some cmake options making cpu_features library embedding more flexible:
This option controls if list_cpu_features will be built and included into the install target. Default is ON.
This option allows to omit providing install targets, disabling installing cpu_features lib build artefacts into the main project install targets. Default in ON.
This option disables testing target for cpu_features at all. Since cpu_features uses standard cmake CTest BUILD_TESTING variable then it could interfere with the main project cmake settings. Having additional option solves this issue. Default is ON.