Closed ibaned closed 1 year ago
@bartlettroscoe I might need your help with this too... as you point out it breaks normal Trilinos builds:
https://github.com/trilinos/Trilinos/pull/11175#discussion_r1001979683
Is there a way that the TriBITS MPI TPL can be set up to work both with the usual MPI compiler wrappers and with a specified include dir and library? Right now I'm running into this line which erases my TPL_MPI_INCLUDE_DIRS
setting:
actually... maybe that file is different in my copy of SEACAS and latest TriBITS...
Nope, even with the latest snapshot of TriBITS this doesn't work
The simple fix would be to change that line to:
# Library has no header files, no user override, so just set them to null by default
if ("${TPL_${TPL_NAME}_INCLUDE_DIRS}" STREQUAL "")
global_null_set(TPL_${TPL_NAME}_INCLUDE_DIRS "")
endif()
Can you try that and see if it fixes your use case?
It should be the case that if TPL_${TPL_NAME}_INCLUDE_DIRS
is set by the user, then it should be used no questions asked.
Thanks @bartlettroscoe ! I'm trying this now
Yes! This is working for my use case! Thank you!
I've found a solution for this issue that I will outline below, but I thought it was appropriate to describe here as its own GitHub issue. I use my own implementation of MPI for one rank with TriBITS-based projects: https://github.com/sandialabs/fbmpi.
When using TriBITS' MPI TPL, I couldn't specify my own
TPL_MPI_INCLUDE_DIRS
unless the call totribits_tpl_find_include_dirs_and_libraries
had aREQUIRED_HEADERS
argument. We can provide this withmpi.h
, because that is what all MPI codes include. Once that modification is made, I was able to specify the following at configuration time:This issue can form a useful anchor for related branches and pull requests with this change