Skip to content

cmake: add USE_SYSTEM_* options; support find_package(FXdiv)#5

Open
ConnorBaker wants to merge 1 commit intoMaratyszcza:masterfrom
ConnorBaker:feat/use-system-libs
Open

cmake: add USE_SYSTEM_* options; support find_package(FXdiv)#5
ConnorBaker wants to merge 1 commit intoMaratyszcza:masterfrom
ConnorBaker:feat/use-system-libs

Conversation

@ConnorBaker
Copy link

@ConnorBaker ConnorBaker commented Jul 3, 2023

Similar to the work done in pytorch/pytorch#37137, this adds the following CMake options:

  • USE_SYSTEM_LIBS
  • USE_SYSTEM_GOOGLEBENCHMARK
  • USE_SYSTEM_GOOGLETEST

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.

@ConnorBaker ConnorBaker force-pushed the feat/use-system-libs branch 8 times, most recently from 2c22a0d to 78694ed Compare July 3, 2023 01:20
@ConnorBaker ConnorBaker changed the title cmake: add USE_SYSTEM_* options cmake: add USE_SYSTEM_* options; support find_package(FXdiv) Jul 3, 2023
@ConnorBaker ConnorBaker force-pushed the feat/use-system-libs branch 2 times, most recently from 49c78c9 to 4cf8ddc Compare July 3, 2023 02:35
@ConnorBaker ConnorBaker force-pushed the feat/use-system-libs branch from 4cf8ddc to 1ab1650 Compare July 4, 2023 02:34
@ConnorBaker ConnorBaker marked this pull request as ready for review July 4, 2023 02:37
@ConnorBaker ConnorBaker force-pushed the feat/use-system-libs branch 3 times, most recently from 70893e2 to 9e916ec Compare July 9, 2023 17:46
@ConnorBaker
Copy link
Author

Updated to reflect comment from pytorch/cpuinfo#153 (comment).

@Maratyszcza if you have the time, would you mind reviewing this?

@ConnorBaker ConnorBaker force-pushed the feat/use-system-libs branch from 9e916ec to e894fbb Compare July 9, 2023 17:55
@petrhosek
Copy link

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?

@BwL1289
Copy link

BwL1289 commented Apr 15, 2025

Bumping this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants