-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support system libs #92
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,6 +325,30 @@ cmake -B build -S . -DBEMAN_EXEMPLAR_BUILD_TESTING=OFF | |
|
||
</details> | ||
|
||
<details> | ||
<summary> Disable `git clone` operations </summary> | ||
|
||
By default, while tests are enabled, this project will clone GoogleTest | ||
and build it from source. In many environments, it is better to use an | ||
already available GoogleTest instead. | ||
|
||
### Existing Source Code | ||
|
||
For instance, in Ubuntu, source code for GoogleTest is provided via a | ||
debian-style package under the directory `/usr/src/googletest`. To | ||
use those sources instead of cloning other sources from the internet, | ||
provide `-DFETCHCONTENT_SOURCE_DIR_GTEST=/usr/src/googletest` as a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't forget to add a check in CI that this works. There's no way to assert there's no actual fetching, but it would be nice to make sure this works with a well-formed setup. See: https://github.com/bemanproject/exemplar/blob/main/.github/workflows/ci_tests.yml#L142 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could technically config a void proxy for git and then test it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would involve interesting CI changes in each case, possibly on another PR?
Given we're dealing with an existing bug, I think it's OK to resolve the bug (once we can figure out why Windows is being weird) and circle back on a regression prevention test, though maybe @bemanproject/leads want to chime in. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fair, I thought it would be as easy as I usually do prefer having all CMake parameters tested (I don't think multi platform is that important here, the goal is to show the project could build under the parameters). When they break, they break silently, which is very annoying. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Fair. That's technically an exercise of the workflow for one of the two documented use cases. Though it's the functional equivalent of re-implementing a worse version of |
||
configuration argument when calling `cmake`. | ||
|
||
### Existing Binaries | ||
|
||
In another case, again in Ubuntu, GoogleTest can be installed prebuilt | ||
with CMake discovery support deployed in normal search paths. | ||
Setting `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS` when calling `cmake` | ||
will force the build of this project to locate that installed library. | ||
|
||
</details> | ||
|
||
## Integrate beman.exemplar into your project | ||
|
||
<details> | ||
|
@@ -379,6 +403,7 @@ Build systems that support interoperation via `pkg-config` should be able to det | |
|
||
</details> | ||
|
||
|
||
## Contributing | ||
|
||
Please do! Issues and pull requests are appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe
Disable pulling Google Test from GitHub
would be a more clear summary here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not specifically GitHub that is the issue -- it's the off-box I/O as such.
Is the confusion that it's not obvious that
git clone
is being invoked byFetchContent
? Possibly we need to update some comments in theCMakeLists.txt
to make that more clear.