Conversation
|
Hi @hmenke , thank you for changing this to the recommended f2py setup. Commits looks good to me. One question: do you know if this workaround I added for the intel compiler: is no longer necessary for f2py? The Jenkins CI for intel ubuntu is passing so I assume it is fine. But maybe you know something more concrete? Best, |
|
Even if OpenMP is really desired for some reason, the correct way to use it with my proposed changes would be the below diff. This will then also work correctly on any compiler. --- a/python/triqs_dft_tools/converters/elktools/elkwrappers/CMakeLists.txt
+++ b/python/triqs_dft_tools/converters/elktools/elkwrappers/CMakeLists.txt
@@ -26,6 +26,9 @@ Python_add_library(getpmatelk MODULE
set_property(TARGET getpmatelk PROPERTY SUFFIX "${TRIQS_PYTHON_MODULE_EXT}")
target_link_libraries(getpmatelk PRIVATE fortranobject)
+find_package(OpenMP COMPONENTS Fortran)
+target_link_libraries(getpmatelk PRIVATE OpenMP::OpenMP_Fortran)
+
install(TARGETS getpmatelk DESTINATION ${TRIQS_PYTHON_LIB_DEST_ROOT}/${PROJECT_NAME}/converters/elktools/elkwrappers)
# user warning |
|
Okay I see. I am also not sure why I added this weird workaround back then. Let me merge it like this and if any problem comes up at any point I will remember now. Thanks! |
Performing the recommended CMake setup for f2py.1
Footnotes
https://github.com/scikit-build/scikit-build-core/blob/main/docs/examples/getting_started/fortran/CMakeLists.txt ↩