Turn the main configure script into macros.
Add checks for a few IBverbs functions and symbols. This commit was SVN r23389.
Этот коммит содержится в:
родитель
e27f953fa4
Коммит
332be56b4c
@ -87,6 +87,7 @@ SET(LIB_OLD "$ENV{LIB}")
|
||||
SET(INCLUDE_OLD "$ENV{INCLUDE}")
|
||||
|
||||
INCLUDE(ompi_configure)
|
||||
BEGIN_CONFIGURE()
|
||||
|
||||
# find flex command
|
||||
INCLUDE (find_flex)
|
||||
@ -96,6 +97,8 @@ ADD_SUBDIRECTORY(opal)
|
||||
ADD_SUBDIRECTORY(ompi)
|
||||
ADD_SUBDIRECTORY(orte)
|
||||
|
||||
END_CONFIGURE()
|
||||
|
||||
#restore environment variables
|
||||
SET(ENV{PATH} "${PATH_OLD}")
|
||||
SET(ENV{LIB} "${LIB_OLD}")
|
||||
|
@ -36,7 +36,10 @@ INCLUDE(list_subdirs)
|
||||
# exclude_list: files that need to be excluded from the solution.
|
||||
#
|
||||
# required_check: a CMake module has to be run to check the libraries/headers
|
||||
# that needed by this component.
|
||||
# that needed by this component. The check might return two
|
||||
# variables: RESULT_INCLUDE_PATH and RESULT_LINK_LIBRARIES.
|
||||
# RESULT_INCLUDE_PATH is handled in this macro, and RESULT_LINK_LIBRARIES
|
||||
# is handled in upper layer.
|
||||
#
|
||||
# not_single_shared_lib: this component should not be built separately, it's not
|
||||
# a single mca shared library.
|
||||
|
@ -62,6 +62,17 @@ ELSE(NOT OMPI_WANT_OFED)
|
||||
SET(RESULT_LINK_LIBRARIES ${OFED_SDK_LIBIBVERBS} ${OFED_SDK_LIBRDMACM})
|
||||
SET(RESULT TRUE)
|
||||
MESSAGE(STATUS "looking for OFED SDK...found.")
|
||||
|
||||
UNSET(CMAKE_REQUIRED_INCLUDES)
|
||||
UNSET(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${OFED_SDK_PATH}/Inc/infiniband/verbs.h ${OFED_SDK_PATH}/Inc/infiniband/sa.h)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${OFED_SDK_PATH}/Lib/libibverbs.lib ${OFED_SDK_PATH}/Lib/librdmacm.lib)
|
||||
|
||||
OMPI_CHECK_FUNCTION_EXISTS(ibv_fork_init HAVE_IBV_FORK_INIT)
|
||||
OMPI_CHECK_FUNCTION_EXISTS(ibv_get_device_list HAVE_IBV_GET_DEVICE_LIST)
|
||||
OMPI_CHECK_FUNCTION_EXISTS(ibv_resize_cq HAVE_IBV_RESIZE_CQ)
|
||||
OMPI_CHECK_SYMBOL_EXISTS(IBV_EVENT_CLIENT_REREGISTER "" HAVE_DECL_IBV_EVENT_CLIENT_REREGISTER)
|
||||
ELSE(OFED_SDK_INCLUDE_PATH AND OFED_SDK_LIBIBVERBS)
|
||||
SET(OFED_SDK_FOUND FALSE CACHE INTERNAL "find result of OFED SDK.")
|
||||
MESSAGE(STATUS "looking for OFED SDK...failed.")
|
||||
@ -69,7 +80,7 @@ ELSE(NOT OMPI_WANT_OFED)
|
||||
|
||||
ELSE(NOT OFED_SDK_FOUND)
|
||||
SET(RESULT_INCLUDE_PATH ${OFED_SDK_INCLUDE_PATH}/..;${OpenMPI_SOURCE_DIR}/ompi/mca/btl/openib)
|
||||
SET(RESULT_LINK_LIBRARIES ${OFED_SDK_LIBIBVERBS})
|
||||
SET(RESULT_LINK_LIBRARIES ${OFED_SDK_LIBIBVERBS} ${OFED_SDK_LIBRDMACM})
|
||||
SET(RESULT TRUE)
|
||||
ENDIF(NOT OFED_SDK_FOUND)
|
||||
|
||||
|
@ -12,6 +12,9 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
MACRO(BEGIN_CONFIGURE)
|
||||
|
||||
INCLUDE (CheckIncludeFileCXX)
|
||||
INCLUDE (CheckIncludeFile)
|
||||
INCLUDE (CheckFunctionExists)
|
||||
@ -719,10 +722,6 @@ IF(WIN32)
|
||||
|
||||
CHECK_C_INLINE()
|
||||
|
||||
IF(OMPI_WANT_OFED)
|
||||
OMPI_DEF(HAVE_IBV_GET_DEVICE_LIST 1 "Whether the infiniband verbs have ibv_get_device_list function." 0 0)
|
||||
ENDIF(OMPI_WANT_OFED)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
@ -812,6 +811,12 @@ ELSE(NOT HAVE_INT64_T AND SIZEOF_INT EQUAL 8)
|
||||
ENDIF(NOT HAVE_INT64_T AND SIZEOF_INT EQUAL 8)
|
||||
|
||||
|
||||
ENDMACRO(BEGIN_CONFIGURE)
|
||||
|
||||
|
||||
|
||||
MACRO(END_CONFIGURE)
|
||||
|
||||
IF(NOT WRITE_CONFIG_DONE)
|
||||
FILE(APPEND ${OpenMPI_BINARY_DIR}/opal/include/opal_config.h.cmake
|
||||
"#include \"opal_config_bottom.h\"\n#endif /* OPAL_CONFIG_H */\n")
|
||||
@ -819,3 +824,5 @@ IF(NOT WRITE_CONFIG_DONE)
|
||||
ENDIF(NOT WRITE_CONFIG_DONE)
|
||||
|
||||
CONFIGURE_FILE(${OpenMPI_BINARY_DIR}/opal/include/opal_config.h.cmake ${OpenMPI_BINARY_DIR}/opal/include/opal_config.h)
|
||||
|
||||
ENDMACRO(END_CONFIGURE)
|
Загрузка…
x
Ссылка в новой задаче
Block a user