From aa6988ba2a9c7d5889a5591c63f2ba4a1b5f9dcc Mon Sep 17 00:00:00 2001 From: Pietro Incardona <incardon@mpi-cbg.de> Date: Tue, 25 Dec 2018 23:22:13 +0100 Subject: [PATCH] Fixing detection of PETSC --- cmake_modules/FindPETSc.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake_modules/FindPETSc.cmake b/cmake_modules/FindPETSc.cmake index 41e02d979..f8ea15b67 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}") -- GitLab