[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1120-g5e9dfe5

Brad King brad.king at kitware.com
Fri Dec 5 09:20:20 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  5e9dfe5a8dfb20bea7f219edb7b740b6b9ee6864 (commit)
       via  7626c8dcf632a4589c2a9008f083f7777cee946a (commit)
       via  f5ede30006f61ef5bb78d6602ebd9083cd7f9869 (commit)
      from  677d66d06472560a5c9dedfec73e093ee40db2c6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e9dfe5a8dfb20bea7f219edb7b740b6b9ee6864
commit 5e9dfe5a8dfb20bea7f219edb7b740b6b9ee6864
Merge: 677d66d 7626c8d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 5 09:20:19 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 5 09:20:19 2014 -0500

    Merge topic 'FindMPI-Intel-5.0.1' into next
    
    7626c8dc FindMPI: Workaround Intel MPI 5.0.1 exit code problem (#15182)
    f5ede300 FindMPI: Factor out compiler wrapper execution into helper


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7626c8dcf632a4589c2a9008f083f7777cee946a
commit 7626c8dcf632a4589c2a9008f083f7777cee946a
Author:     Alin Marin Elena <alinm.elena at gmail.com>
AuthorDate: Thu Dec 4 13:54:00 2014 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 4 14:15:46 2014 -0500

    FindMPI: Workaround Intel MPI 5.0.1 exit code problem (#15182)
    
    This MPI compiler may return zero even in some error cases.  Check the
    output to catch such cases.
    
    Suggested-by: Kelly Thompson <kgt at lanl.gov>

diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index e135edb..6f6dcf3 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -194,6 +194,12 @@ function (_mpi_check_compiler compiler options cmdvar resvar)
     OUTPUT_VARIABLE  cmdline OUTPUT_STRIP_TRAILING_WHITESPACE
     ERROR_VARIABLE   cmdline ERROR_STRIP_TRAILING_WHITESPACE
     RESULT_VARIABLE  success)
+  # Intel MPI 5.0.1 will return a zero return code even when the
+  # argument to the MPI compiler wrapper is unknown.  Attempt to
+  # catch this case.
+  if("${cmdline}" MATCHES "undefined reference")
+    set(success 255 )
+  endif()
   set(${cmdvar} "${cmdline}" PARENT_SCOPE)
   set(${resvar} "${success}" PARENT_SCOPE)
 endfunction()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5ede30006f61ef5bb78d6602ebd9083cd7f9869
commit f5ede30006f61ef5bb78d6602ebd9083cd7f9869
Author:     Alin Marin Elena <alinm.elena at gmail.com>
AuthorDate: Thu Dec 4 13:51:00 2014 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 4 14:12:34 2014 -0500

    FindMPI: Factor out compiler wrapper execution into helper

diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index ba4ea5b..e135edb 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -188,6 +188,15 @@ foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH})
   endforeach()
 endforeach()
 
+function (_mpi_check_compiler compiler options cmdvar resvar)
+  execute_process(
+    COMMAND "${compiler}" ${options}
+    OUTPUT_VARIABLE  cmdline OUTPUT_STRIP_TRAILING_WHITESPACE
+    ERROR_VARIABLE   cmdline ERROR_STRIP_TRAILING_WHITESPACE
+    RESULT_VARIABLE  success)
+  set(${cmdvar} "${cmdline}" PARENT_SCOPE)
+  set(${resvar} "${success}" PARENT_SCOPE)
+endfunction()
 
 #
 # interrogate_mpi_compiler(lang try_libs)
@@ -220,12 +229,7 @@ function (interrogate_mpi_compiler lang try_libs)
     if (MPI_${lang}_COMPILER)
       # Check whether the -showme:compile option works. This indicates that we have either OpenMPI
       # or a newer version of LAM-MPI, and implies that -showme:link will also work.
-      execute_process(
-        COMMAND ${MPI_${lang}_COMPILER} -showme:compile
-        OUTPUT_VARIABLE  MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
-        ERROR_VARIABLE   MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
-        RESULT_VARIABLE  MPI_COMPILER_RETURN)
-
+      _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-showme:compile" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN)
       if (MPI_COMPILER_RETURN EQUAL 0)
         # If we appear to have -showme:compile, then we should
         # also have -showme:link. Try it.
@@ -257,20 +261,12 @@ function (interrogate_mpi_compiler lang try_libs)
 
       # Older versions of LAM-MPI have "-showme". Try to find that.
       if (NOT MPI_COMPILER_RETURN EQUAL 0)
-        execute_process(
-          COMMAND ${MPI_${lang}_COMPILER} -showme
-          OUTPUT_VARIABLE  MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
-          ERROR_VARIABLE   MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
-          RESULT_VARIABLE  MPI_COMPILER_RETURN)
+        _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-showme" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN)
       endif()
 
       # MVAPICH uses -compile-info and -link-info.  Try them.
       if (NOT MPI_COMPILER_RETURN EQUAL 0)
-        execute_process(
-          COMMAND ${MPI_${lang}_COMPILER} -compile-info
-          OUTPUT_VARIABLE  MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
-          ERROR_VARIABLE   MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
-          RESULT_VARIABLE  MPI_COMPILER_RETURN)
+        _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-compile-info" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN)
 
         # If we have compile-info, also have link-info.
         if (MPI_COMPILER_RETURN EQUAL 0)
@@ -290,11 +286,7 @@ function (interrogate_mpi_compiler lang try_libs)
 
       # MPICH just uses "-show". Try it.
       if (NOT MPI_COMPILER_RETURN EQUAL 0)
-        execute_process(
-          COMMAND ${MPI_${lang}_COMPILER} -show
-          OUTPUT_VARIABLE  MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
-          ERROR_VARIABLE   MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
-          RESULT_VARIABLE  MPI_COMPILER_RETURN)
+        _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-show" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN)
       endif()
 
       if (MPI_COMPILER_RETURN EQUAL 0)

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindMPI.cmake |   40 +++++++++++++++++++---------------------
 1 file changed, 19 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list