Open ConnorBaker opened 1 year ago
Updated to reflect comment from https://github.com/pytorch/cpuinfo/pull/153#discussion_r1254647992.
@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?
Similar to the work done in https://github.com/pytorch/pytorch/pull/37137, this adds the following CMake options:
USE_SYSTEM_LIBS
USE_SYSTEM_GOOGLEBENCHMARK
USE_SYSTEM_GOOGLETEST
USE_SYSTEM_FXDIV
This 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_package
to consume this library.