Skip to content
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

CMake: More Robust git STRIP #603

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Sep 29, 2021

Sometimes a git executable can be found but is unusable.
Quoting the result for empty strings makes the build logic more robust in such scenarios.

Mitigates:

CMake Error at cmake/HiPACEFunctions.cmake:192 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  CMakeLists.txt:256 (get_source_version)

Provoked via: Mixing of brew and Spack (git from brew + Spack env with export DYLD_LIBRARY_PATH=/Users/axel/src/spack/var/spack/environments/warpx-dev/.spack-env/view/lib)

Same as ECP-WarpX/WarpX#2358

  • Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
  • Tested (describe the tests in the PR description)
  • Runs on GPU (basic: the code compiles and run well with the new module)
  • Contains an automated test (checksum and/or comparison with theory)
  • Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
  • Constified (All that can be const is const)
  • Code is clean (no unwanted comments, )
  • Style and code conventions are respected at the bottom of https://github.com/Hi-PACE/hipace
  • Proper label and GitHub project, if applicable

Sometimes a `git` executable can be found but is unusable.
Quoting the result for empty strings makes the build logic more
robust in such scenarios.

Mitigates:
```
CMake Error at cmake/HiPACEFunctions.cmake:192 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  CMakeLists.txt:256 (get_source_version)
```

Provoked via: Mixing of brew and Spack (git from brew + Spack env
with
`export DYLD_LIBRARY_PATH=/Users/axel/src/spack/var/spack/environments/warpx-dev/.spack-env/view/lib`)
@ax3l ax3l added bug Something isn't working build CMake, compilation, etc. labels Sep 29, 2021
Copy link
Member

@SeverinDiederichs SeverinDiederichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@SeverinDiederichs SeverinDiederichs merged commit 9ee0c9f into Hi-PACE:development Sep 29, 2021
@ax3l ax3l deleted the fix-moreRobustGitStrip branch September 29, 2021 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build CMake, compilation, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants