summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-22 14:30:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-22 14:30:53 (GMT)
commitfbd20759bed28307cb374ec979fbb48370fff042 (patch)
treeec5281299860187b3dd44eed7007d65b3882f946 /Modules/FindMPI.cmake
parent3f601ebb0a683f837170327528180ba91ffbffd3 (diff)
parent8217a26d29f366e85eafb07711c1fbd449fe3588 (diff)
downloadCMake-fbd20759bed28307cb374ec979fbb48370fff042.zip
CMake-fbd20759bed28307cb374ec979fbb48370fff042.tar.gz
CMake-fbd20759bed28307cb374ec979fbb48370fff042.tar.bz2
Merge topic 'FindMPI-fix-return'
8217a26d29 FindMPI: Fix regression when compiling with MPI wrappers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4254
Diffstat (limited to 'Modules/FindMPI.cmake')
-rw-r--r--Modules/FindMPI.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index f79ee63..cb52056 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -1060,9 +1060,6 @@ macro(_MPI_assemble_libraries LANG)
endmacro()
macro(_MPI_split_include_dirs LANG)
- if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}")
- return()
- endif()
# Backwards compatibility: Search INCLUDE_PATH if given.
if(MPI_${LANG}_INCLUDE_PATH)
list(APPEND MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_INCLUDE_PATH}")
@@ -1475,7 +1472,9 @@ foreach(LANG IN ITEMS C CXX Fortran)
endif()
endif()
- _MPI_split_include_dirs(${LANG})
+ if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}")
+ _MPI_split_include_dirs(${LANG})
+ endif()
_MPI_assemble_libraries(${LANG})
_MPI_adjust_compile_definitions(${LANG})