diff --git a/cmake_modules/FindPETSc.cmake b/cmake_modules/FindPETSc.cmake index 41e02d9798c47f32ae57e7ecff2f544eb5256c1d..f8ea15b67fbb5a237169411fe37fa5227e6b7aee 100644 --- a/cmake_modules/FindPETSc.cmake +++ b/cmake_modules/FindPETSc.cmake @@ -175,6 +175,9 @@ show : # We are done with the temporary Makefile, calling PETSC_GET_VARIABLE after this point is invalid! file (REMOVE ${petsc_config_makefile}) + execute_process(COMMAND ${MPI_C_COMPILER} --showme:compile OUTPUT_VARIABLE mpi_compile_options ERROR_VARIABLE mpi_compile_error) + set(petsc_cpp_line ${petsc_cpp_line} ${mpi_compile_options}) + include (ResolveCompilerPaths) # Extract include paths and libraries from compile command line resolve_includes (petsc_includes_all "${petsc_cpp_line}")