Skip to content

CMake: Fix Build & Install Option Names#1326

Merged
ax3l merged 3 commits intoopenPMD:devfrom
ax3l:cmake-fix-dir-options
Dec 9, 2022
Merged

CMake: Fix Build & Install Option Names#1326
ax3l merged 3 commits intoopenPMD:devfrom
ax3l:cmake-fix-dir-options

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented Nov 3, 2022

We should not overwrite CMAKE_ variables but instead set our own. This corrects this.

This also fixes that the cmake install path was unset in superbuilds failing the configure steps unless set by the calling project did set CMAKE_INSTALL_CMAKEDIR (or turned openPMD_INSTALL=OFF):

CMake Error at openpmd-src/CMakeLists.txt:1080 (install):
  install EXPORT given no DESTINATION!

CMake Error at openpmd-src/CMakeLists.txt:1085 (install):
  install FILES given no DESTINATION!

seen with fnalacceleratormodeling/synergia2#100

Follow-up to #1313

cc @DerNils-git @s-sajid-ali

@ax3l ax3l force-pushed the cmake-fix-dir-options branch from d9462b6 to cc7575e Compare November 3, 2022 21:12
Copy link
Contributor

@nischild nischild left a comment

Choose a reason for hiding this comment

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

I could not find any set(...) statements which could be mixed up with other variables in other projects besides CMAKE_CXX_FLAGS which is probably set to be used in subprojects.

@ax3l ax3l force-pushed the cmake-fix-dir-options branch from cc7575e to 0d51a7d Compare November 15, 2022 05:37
We should not overwrite `CMAKE_` variables but instead set our
own. This corrects this.

This also fixes that the cmake install path was unset in
superbuilds failing the configure steps unless set by
the calling project did set `CMAKE_INSTALL_CMAKEDIR`:
```
CMake Error at openpmd-src/CMakeLists.txt:1080 (install):
  install EXPORT given no DESTINATION!

CMake Error at openpmd-src/CMakeLists.txt:1085 (install):
  install FILES given no DESTINATION!
```
@ax3l ax3l force-pushed the cmake-fix-dir-options branch from 0d51a7d to 0a71572 Compare December 8, 2022 03:27
@ax3l ax3l force-pushed the cmake-fix-dir-options branch 2 times, most recently from 7810307 to b0fe226 Compare December 8, 2022 17:49
@ax3l ax3l force-pushed the cmake-fix-dir-options branch from b0fe226 to f5571bc Compare December 8, 2022 17:49
@ax3l
Copy link
Member Author

ax3l commented Dec 9, 2022

@franzpoeschel all green now :)

@ax3l ax3l modified the milestones: 0.14.6, 0.15.0 Dec 9, 2022
@ax3l ax3l merged commit b2edc4f into openPMD:dev Dec 9, 2022
@ax3l ax3l deleted the cmake-fix-dir-options branch December 9, 2022 19:31
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.

4 participants