-
Notifications
You must be signed in to change notification settings - Fork 55
CMake: Install toml11 and nlohmann_json for inclusion in downstream code #1757
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
Changes from all commits
068c80f
731e35d
cbb3caf
a20e5b8
3d06a20
083b6a2
fa59053
99bc222
c3d0e0d
83303f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1076,6 +1076,24 @@ if(openPMD_INSTALL) | |
| RUNTIME DESTINATION ${openPMD_INSTALL_BINDIR} | ||
| INCLUDES DESTINATION ${openPMD_INSTALL_INCLUDEDIR} | ||
| ) | ||
| if(TARGET fetchednlohmann_json-install) | ||
| install(CODE " | ||
| execute_process( | ||
| COMMAND ${CMAKE_COMMAND} \ | ||
| --build \"${CMAKE_BINARY_DIR}\" \ | ||
| --target fetchednlohmann_json-install | ||
| ) | ||
| ") | ||
|
Comment on lines
+1080
to
+1086
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Different question: Why would you hack together a manual installation here? Isn't it conceptually closer to what you want to express to link to json/toml11 publicly?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See Axel's comment above; this did not work because I was not aware about CMake options in nlohmann-json/toml11 which we set to suppress installations. |
||
| endif() | ||
| if(TARGET fetchedtoml11-install) | ||
| install(CODE " | ||
| execute_process( | ||
| COMMAND ${CMAKE_COMMAND} \ | ||
| --build \"${CMAKE_BINARY_DIR}\" \ | ||
| --target fetchedtoml11-install | ||
|
Comment on lines
+1089
to
+1093
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ) | ||
| ") | ||
| endif() | ||
| if(openPMD_HAVE_PYTHON) | ||
| install( | ||
| DIRECTORY ${openPMD_SOURCE_DIR}/src/binding/python/openpmd_api | ||
|
|
||
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.
So far, I have intentionally turned the install of sub-projects off. Instead of this code, we could set
JSON_Install ON:https://github.com/nlohmann/json/blob/v3.12.0/CMakeLists.txt#L48