STYLE: use FIND_PACKAGE_HANDLE_STANDARD_ARGS() also in FindMPI.cmake

-remove unnecessary ELSE() in FindThreads.cmake

Alex
This commit is contained in:
Alexander Neundorf 2007-08-06 11:02:58 -04:00
parent 70585819fb
commit b82b47e329
2 changed files with 6 additions and 1 deletions

View File

@ -34,4 +34,10 @@ IF("${MPI_LIBRARY}" MATCHES "mpich.rts")
SET(MPI_EXTRA_LIBRARY msglayer.rts devices.rts rts.rts devices.rts CACHE STRING "Additional MPI libs" FORCE) SET(MPI_EXTRA_LIBRARY msglayer.rts devices.rts rts.rts devices.rts CACHE STRING "Additional MPI libs" FORCE)
ENDIF("${MPI_LIBRARY}" MATCHES "mpich.rts") ENDIF("${MPI_LIBRARY}" MATCHES "mpich.rts")
INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPI DEFAULT_MSG MPI_LIBRARY MPI_INCLUDE_PATH)
MARK_AS_ADVANCED(MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIBRARY) MARK_AS_ADVANCED(MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIBRARY)

View File

@ -74,7 +74,6 @@ ELSE(CMAKE_HAVE_SPROC_H)
ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG") ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
IF(THREADS_HAVE_PTHREAD_ARG) IF(THREADS_HAVE_PTHREAD_ARG)
SET(CMAKE_THREAD_LIBS_INIT "-pthread") SET(CMAKE_THREAD_LIBS_INIT "-pthread")
ELSE(THREADS_HAVE_PTHREAD_ARG)
ENDIF(THREADS_HAVE_PTHREAD_ARG) ENDIF(THREADS_HAVE_PTHREAD_ARG)
ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY) ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY)
ENDIF(CMAKE_HAVE_PTHREAD_H) ENDIF(CMAKE_HAVE_PTHREAD_H)