updated cmake files to build also with petsc solver#71
Conversation
|
Deployed test documentation to https://exasim-project.com/FoamAdapter/Build_PR_71 |
|
|
||
| target_link_libraries(heatTransfer FoamAdapter) | ||
|
|
||
| if(NeoN_WITH_PETSC) |
There was a problem hiding this comment.
I suspect that this should actually be part of neons public API, i.e. if neon is build with PETSc support the neon_public_api target should introduce this dependency.
There was a problem hiding this comment.
That's actually strange. When I do not add this, the linker complains about undefined references even though neon is build with petsc. Actually the symbols should be defined in some NeoN libraries. I'll check again
There was a problem hiding this comment.
I would say that is an issue on the neon side.
There was a problem hiding this comment.
ok I solved the issue exasim-project/NeoN#327
There was a problem hiding this comment.
needed to add
if(NeoN_WITH_PETSC) add_definitions(${PETSc_DEFINITIONS}) target_link_libraries(NeoN_public_api INTERFACE ${PETSc_LIBRARIES}) target_link_libraries(NeoN_public_api INTERFACE ${PETSc_LIBRARIES} ${PETSc_LIBRARY_DIRS}/libkokkoscore.so mpi) target_include_directories(NeoN_public_api INTERFACE ${PETSc_INCLUDE_DIRS}) target_link_directories(NeoN_public_api INTERFACE ${PETSc_LIBRARY_DIRS}) link_directories(${PETSc_LIBRARY_DIRS}) target_compile_definitions(NeoN_public_api INTERFACE NF_WITH_PETSC=1) else()
in include/CMakeLists.txt
I updated the cmake files in order that the FoamAdapter can be build also with petsc