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

Remove caching cmake vars #1313

Merged
merged 5 commits into from
Sep 19, 2022
Merged

Conversation

DerNils-git
Copy link
Contributor

@DerNils-git DerNils-git commented Sep 15, 2022

If openPMD is included into a CMake project as a subproject it modifies variables in or adds variables to the CACHE.
This can lead to conflicts in the parent project since these variables are overwritten in or set for the parent project.

Not adding variables to the CACHE limits the scope of variables to the openPMD project which makes it safer for other developers to add openPMD as a subproject.

This is a less invasive approach to the pull request #1312 and it is more complete since in #1312 only CMAKE_RUNTIME_OUTPUT_DIRECTORY is substituted by a new openPMD specific variable.

List of variables handled in this pull request:

CMAKE_ARCHIVE_OUTPUT_DIRECTORY
CMAKE_LIBRARY_OUTPUT_DIRECTORY
CMAKE_RUNTIME_OUTPUT_DIRECTORY
CMAKE_INSTALL_CMAKEDIR
CMAKE_BUILD_TYPE

Close #1312

Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

Thank you very much for the fix!

I never noticed this, because I set all these vars conditionally also in my super projects. But this makes sense, thx!

@ax3l ax3l enabled auto-merge (squash) September 19, 2022 15:05
@ax3l
Copy link
Member

ax3l commented Sep 19, 2022

@DerNils-git do you mind adding your IPP affiliation to your GitHub profile? That just helps me to keep track of who is who :)
I sent you an invite to https://github.com/openPMD :)

@ax3l ax3l merged commit 5edf3ef into openPMD:dev Sep 19, 2022
@DerNils-git DerNils-git deleted the remove_caching_cmake_vars branch September 19, 2022 15:55
eschnett added a commit to eschnett/openPMD-api that referenced this pull request Nov 11, 2022
* dev: (70 commits)
  Docs: Recommend Static Build for Superbuilds (openPMD#1325)
  Python 3.11 (openPMD#1323)
  pybind11: v2.10.1+ (openPMD#1322)
  Add Attribute::getOptional<T>() and use to add some more dynamic datatype conversions at read time (openPMD#1278)
  Mapping between ADIOS steps and openPMD iterations (openPMD#949)
  Deprecate shareRaw (openPMD#1229)
  Fix append mode double attributes (openPMD#1302)
  Constant scalars: Don't flush double (openPMD#1315)
  Remove caching cmake vars (openPMD#1313)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1311)
  storeChunk: Add an overload for shared_ptr<T[]> (openPMD#1296)
  Fix `operationAsString` Export (openPMD#1309)
  ADIOS2: more fine-grained control for file endings (openPMD#1218)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1307)
  Fix file existence check in parallel tests (openPMD#1303)
  ADIOS2: Flush to disk within a step (openPMD#1207)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1304)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1295)
  Update catch2 to v2.13.9 (openPMD#1299)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1292)
  ...

# Conflicts:
#	.github/workflows/linux.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants