From 9206994415458ecf519bdb638861cccad8caa5ea Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Fri, 27 May 2022 17:25:53 -0600 Subject: [PATCH] Have TPL MPI produce MPI::all_libs and MPIConfig.cmake (#299) This avoids needing to check `if (TARGET ::all_libs)` all over the place. This makes the failing test: TriBITS_TribitsOldSimpleExampleApp_STATIC_MPI_USE_DEPRECATED_TARGETS from the previous commit pass. Next, we can take out all of these silly checks. --- tribits/core/std_tpls/FindTPLMPI.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tribits/core/std_tpls/FindTPLMPI.cmake b/tribits/core/std_tpls/FindTPLMPI.cmake index b3a5bf464..f4917fd6a 100644 --- a/tribits/core/std_tpls/FindTPLMPI.cmake +++ b/tribits/core/std_tpls/FindTPLMPI.cmake @@ -50,3 +50,7 @@ if(WIN32 AND TPL_ENABLE_MPI) global_set(TPL_MPI_LIBRARIES ${MPI_LIBRARIES}) endif() +tribits_tpl_find_include_dirs_and_libraries(MPI) + +# NOTE: Above, we need to generate the MPI::all_libs target and the +# MPIConfig.cmake file that will also provide the MPI::all_libs target.