Don't modify CMAKE_RUNTIME_OUTPUT_DIRECTORY#1312
Don't modify CMAKE_RUNTIME_OUTPUT_DIRECTORY#1312franzpoeschel wants to merge 2 commits intoopenPMD:devfrom
Conversation
Define and use openPMD_RUNTIME_OUTPUT_DIRECTORY instead
|
Maybe the less invasive option to solve this would be not to define global CMake variables as use I did this for the following variables in the openPMD project and could build the project afterwards without problem as a subproject of my own CMake project: |
|
Ah, I didn't know that this would restrict the scope. We might also take the chance to use target properties instead of a global, but leaving the global here might actually make things more maintainable in the long run. |
|
If you remove them from |
|
@DerNils-git @franzpoeschel thank you so much for raising this. After quickly checking in Kitware-driven projects like ADIOS2 and ParaView, I think @DerNils-git suggestion is what we should go with (#1313). Otherwise we have to introduce equivalent project-level control variables also for library paths and other artifacts we produce. If the current approach still sets the variable for a downstream project in superbuilds, then this is all great 👍 |
Define and use openPMD_RUNTIME_OUTPUT_DIRECTORY instead. Instead, use the target property
RUNTIME_OUTPUT_DIRECTORYrather than the global variable. Might lead to duplicates if both are defined:For motivation, I'll copy Nils Schild's Slack message:
TODO