[Cmake-commits] [cmake-commits] dgregor committed FindMPI.cmake 1.18 1.19
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Apr 22 09:41:09 EDT 2008
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv16766
Modified Files:
FindMPI.cmake
Log Message:
BUG: Use -showme:incdirs and -showme:libdirs when we need them
Index: FindMPI.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindMPI.cmake,v
retrieving revision 1.18
retrieving revision 1.19
diff -C 2 -d -r1.18 -r1.19
*** FindMPI.cmake 10 Apr 2008 20:54:20 -0000 1.18
--- FindMPI.cmake 22 Apr 2008 13:41:07 -0000 1.19
***************
*** 89,92 ****
--- 89,96 ----
OUTPUT_VARIABLE MPI_LINK_CMDLINE
RETURN_VALUE MPI_COMPILER_RETURN)
+
+ # Note that we probably have -showme:incdirs and -showme:libdirs
+ # as well.
+ set(MPI_COMPILER_MAY_HAVE_INCLIBDIRS TRUE)
endif (MPI_COMPILER_RETURN EQUAL 0)
***************
*** 146,149 ****
--- 150,165 ----
endforeach(IPATH)
+ if (NOT MPI_INCLUDE_PATH_WORK)
+ if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
+ # The compile command line didn't have any include paths on it,
+ # but we may have -showme:incdirs. Use it.
+ exec_program(${MPI_COMPILER}
+ ARGS -showme:incdirs
+ OUTPUT_VARIABLE MPI_INCLUDE_PATH_WORK
+ RETURN_VALUE MPI_COMPILER_RETURN)
+ separate_arguments(MPI_INCLUDE_PATH_WORK)
+ endif (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
+ endif (NOT MPI_INCLUDE_PATH_WORK)
+
# Extract linker paths from the link command line
string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
***************
*** 155,158 ****
--- 171,186 ----
endforeach(LPATH)
+ if (NOT MPI_LINK_PATH)
+ if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
+ # The compile command line didn't have any linking paths on it,
+ # but we may have -showme:libdirs. Use it.
+ exec_program(${MPI_COMPILER}
+ ARGS -showme:libdirs
+ OUTPUT_VARIABLE MPI_LINK_PATH
+ RETURN_VALUE MPI_COMPILER_RETURN)
+ separate_arguments(MPI_LINK_PATH)
+ endif (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
+ endif (NOT MPI_LINK_PATH)
+
# Extract linker flags from the link command line
string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
More information about the Cmake-commits
mailing list