cmake: add USE_SYSTEM_* options; support find_package(pthreadpool)#27
cmake: add USE_SYSTEM_* options; support find_package(pthreadpool)#27ConnorBaker wants to merge 1 commit intoMaratyszcza:masterfrom
Conversation
c3cb073 to
a531c1b
Compare
d7c1425 to
8fc7c96
Compare
8fc7c96 to
f320027
Compare
|
Updated to reflect comment from pytorch/cpuinfo#153 (comment). @Maratyszcza if you have the time, would you mind reviewing this? |
|
I'd be interested in seeing this merged as well since we need this change for the https://github.com/google/ml-compiler-opt project. @Maratyszcza would it be possible to take a look? |
| @@ -0,0 +1,5 @@ | |||
| @PACKAGE_INIT@ | |||
There was a problem hiding this comment.
I believe this also needs the following prior to this line to make sure FXdiv is present:
| @PACKAGE_INIT@ | |
| include(CMakeFindDependencyMacro) | |
| find_dependency(FXdiv) | |
| @PACKAGE_INIT@ |
|
Looks like this is stale, but would like to see |
|
@Maratyszcza any chance we can merge this? @ConnorBaker sorry for all of the noise. I forked master and manually added your changes here: https://github.com/eugo-inc/pthreadpool-use-system-libs/commits/master/cmake so this is up to date |
Similar to the work done in pytorch/pytorch#37137, this adds the following CMake options:
USE_SYSTEM_LIBSUSE_SYSTEM_GOOGLEBENCHMARKUSE_SYSTEM_GOOGLETESTUSE_SYSTEM_FXDIVThis is particularly useful in the context of Nix, where we can build these libraries once and then re-use them elsewhere to avoid rebuilding vendors dependencies.
Additionally, adds a CMake configuration file to make it possible for CMake-based projects to use
find_packageto consume this library.