-
Notifications
You must be signed in to change notification settings - Fork 225
add MallocMC to PMacc using fetchContent #5569
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
add MallocMC to PMacc using fetchContent #5569
Conversation
The current pattern fails if there are multiple passes of configure and `mallocMC` was not initially installed. This happens because in the first pass `add_subdirectory` creates the package config and in later passes `findPackage` finds this and fails as `mallocMC` wasnt actually installed. Switched to simply using `FetchContent` with `FIND_PACKAGE_ARGS` which first checks with `findPackage` and then falls back to the source dir which is exactly what we want. https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html#fetchcontent-and-find-package-integration
PrometheusPi
left a comment
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.
looks good
|
Pertinent infrastructure from mallocMC:
There is an on-going discussion with @psychocoderHPC about pulling up the same approach to PIConGPU (namely |
|
Not sure but I think we can not use a pure fetch content because on clusters without internet we need at least the way to use an installed version of mallocMC. IMO this is not possible via fetch content. |
|
The fetch content here is using 'SOURCE_DIR' without a download method, so it doesnt need internet. It expects mallocMC to be at the pointed directory. This is exactly the same workflow as before. |
|
@psychocoderHPC and @ikbuibui What is your final verdict on the matter of download needed or not? |
|
We will further discuss our favoured approaches in the office and then decide on how to proceed. |
|
Discussed offline with @psychocoderHPC : |
a054793
into
ComputationalRadiationPhysics:dev
The current pattern fails if there are multiple passes of configure and
mallocMCwas not initially installed.This happens because in the first pass
add_subdirectorycreates the package config and in later passesfindPackagefinds this and fails asmallocMCwasnt actually installed.Switched to simply using
FetchContentwithFIND_PACKAGE_ARGSwhich first checks withfindPackageand then falls back to the source dir which is exactly what we want.https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html#fetchcontent-and-find-package-integration