1
1

Only check the necessary headers and others on Windows, so that to speed up the configuration a lot.

Set up the integer kind family for f77 build.

This commit was SVN r22894.
Этот коммит содержится в:
Shiqing Fan 2010-03-26 16:01:36 +00:00
родитель e307df8a85
Коммит 9d3613c259
4 изменённых файлов: 173 добавлений и 167 удалений

Просмотреть файл

@ -11,7 +11,7 @@
# this file contains
# 1. several wrappers for CMake macros, so that they will
# do the job and write the configure temeplate file too.
# 2. a few macros that checks the
# 2. a macro that checks the data types
# check include file
MACRO(OMPI_CHECK_INCLUDE_FILE FILE_NAME VAR_NAME)

Просмотреть файл

@ -19,143 +19,190 @@
# OMPI_MICROSOFT_COMPILER()
#
######################################################################
MACRO(OMPI_MICROSOFT_COMPILER)
IF(NOT MICROSOFT_CHECK_DONE)
IF(NOT MICROSOFT_CHECK_DONE)
MESSAGE( STATUS "Start Microsoft specific detection....")
MESSAGE( STATUS "Start Microsoft specific detection....")
# search for Microsoft VC tools
IF(CMAKE_CL_64)
SET(CHECK_PATHS ${CHECK_PATHS}
"C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64"
"C:/Program Files/Microsoft Visual Studio 8/VC/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/amd64"
"C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/bin/amd64"
"$ENV{VS90COMNTOOLS}../../VC/bin/amd64"
"$ENV{VS80COMNTOOLS}../../VC/bin//amd64"
"$ENV{VS90COMNTOOLS}../../VC/bin/ia64"
"$ENV{VS80COMNTOOLS}../../VC/bin//ia64")
ELSE(CMAKE_CL_64)
SET(CHECK_PATHS ${CHECK_PATHS}
"C:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
"C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
"C:/Program Files/Microsoft Visual Studio 8/VC/bin"
"C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
"C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/bin"
"C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/bin"
"$ENV{VS90COMNTOOLS}../../VC/bin"
"$ENV{VS80COMNTOOLS}../../VC/bin")
ENDIF(CMAKE_CL_64)
# search for Microsoft VC tools
IF(CMAKE_CL_64)
SET(CHECK_PATHS ${CHECK_PATHS}
"C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64"
"C:/Program Files/Microsoft Visual Studio 8/VC/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/amd64"
"C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/bin/amd64"
"C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/bin/amd64"
"$ENV{VS90COMNTOOLS}../../VC/bin/amd64"
"$ENV{VS80COMNTOOLS}../../VC/bin//amd64"
"$ENV{VS90COMNTOOLS}../../VC/bin/ia64"
"$ENV{VS80COMNTOOLS}../../VC/bin//ia64")
ELSE(CMAKE_CL_64)
SET(CHECK_PATHS ${CHECK_PATHS}
"C:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
"C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
"C:/Program Files/Microsoft Visual Studio 8/VC/bin"
"C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
"C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/bin"
"C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/bin"
"$ENV{VS90COMNTOOLS}../../VC/bin"
"$ENV{VS80COMNTOOLS}../../VC/bin")
ENDIF(CMAKE_CL_64)
FIND_PROGRAM(CL_EXE cl PATHS ${CHECK_PATHS})
FIND_PROGRAM(CL_EXE cl PATHS ${CHECK_PATHS})
# Set up VS environments.
GET_FILENAME_COMPONENT(VC_BIN_PATH ${CL_EXE} PATH)
GET_FILENAME_COMPONENT(COMPILER_NAME ${CL_EXE} NAME)
SET(CC ${COMPILER_NAME} CACHE INTERNAL "C compiler executable")
SET(CXX ${COMPILER_NAME} CACHE INTERNAL "CXX compiler executable")
GET_FILENAME_COMPONENT(SDK_ROOT_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE)
IF(CMAKE_CL_64)
SET(VS_ROOT_DIR ${VC_BIN_PATH}/../../..)
SET(VC_LIB_DIR ${VS_ROOT_DIR}/VC/lib/amd64)
SET(SDK_LIB_DIR ${SDK_ROOT_PATH}/lib/x64)
ELSE(CMAKE_CL_64)
SET(VS_ROOT_DIR ${VC_BIN_PATH}/../..)
SET(VC_LIB_DIR ${VS_ROOT_DIR}/VC/lib)
SET(SDK_LIB_DIR ${SDK_ROOT_PATH}/lib)
ENDIF(CMAKE_CL_64)
SET(VS_COMMON_TOOLS_DIR ${VS_ROOT_DIR}/Common7/Tools)
SET(VS_IDE_DIR ${VS_ROOT_DIR}/Common7/IDE)
SET(VC_INCLUDE_DIR ${VS_ROOT_DIR}/VC/include)
# Set up VS environments.
GET_FILENAME_COMPONENT(VC_BIN_PATH ${CL_EXE} PATH)
GET_FILENAME_COMPONENT(COMPILER_NAME ${CL_EXE} NAME)
SET(CC ${COMPILER_NAME} CACHE INTERNAL "C compiler executable")
SET(CXX ${COMPILER_NAME} CACHE INTERNAL "CXX compiler executable")
GET_FILENAME_COMPONENT(SDK_ROOT_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE)
IF(CMAKE_CL_64)
SET(VS_ROOT_DIR ${VC_BIN_PATH}/../../..)
SET(VC_LIB_DIR ${VS_ROOT_DIR}/VC/lib/amd64)
SET(SDK_LIB_DIR ${SDK_ROOT_PATH}/lib/x64)
ELSE(CMAKE_CL_64)
SET(VS_ROOT_DIR ${VC_BIN_PATH}/../..)
SET(VC_LIB_DIR ${VS_ROOT_DIR}/VC/lib)
SET(SDK_LIB_DIR ${SDK_ROOT_PATH}/lib)
ENDIF(CMAKE_CL_64)
SET(VS_COMMON_TOOLS_DIR ${VS_ROOT_DIR}/Common7/Tools)
SET(VS_IDE_DIR ${VS_ROOT_DIR}/Common7/IDE)
SET(VC_INCLUDE_DIR ${VS_ROOT_DIR}/VC/include)
# Cache the compilers paths that could be used later.
SET(C_COMPILER_PATH ${VC_BIN_PATH} ${SDK_ROOT_PATH}/bin ${VS_IDE_DIR} CACHE INTERNAL "Compiler binary paths.")
SET(C_COMPILER_INCLUDE ${VC_INCLUDE_DIR} CACHE INTERNAL "Compiler include paths.")
SET(C_COMPILER_LIB ${VC_LIB_DIR} ${SDK_LIB_DIR} CACHE INTERNAL "Compiler libraries.")
SET(C_COMPILER_LIBPATH ${VC_LIB_DIR} ${SDK_LIB_DIR} CACHE INTERNAL "Compiler libraries path.")
# Cache the compilers paths that could be used later.
SET(C_COMPILER_PATH ${VC_BIN_PATH} ${SDK_ROOT_PATH}/bin ${VS_IDE_DIR} CACHE INTERNAL "Compiler binary paths.")
SET(C_COMPILER_INCLUDE ${VC_INCLUDE_DIR} CACHE INTERNAL "Compiler include paths.")
SET(C_COMPILER_LIB ${VC_LIB_DIR} ${SDK_LIB_DIR} CACHE INTERNAL "Compiler libraries.")
SET(C_COMPILER_LIBPATH ${VC_LIB_DIR} ${SDK_LIB_DIR} CACHE INTERNAL "Compiler libraries path.")
SET(ENV{PATH} "${C_COMPILER_PATH};$ENV{PATH}")
SET(ENV{INCLUDE} "${C_COMPILER_INCLUDE};$ENV{INCLUDE}")
SET(ENV{LIB} "${C_COMPILER_LIB};$ENV{LIB}")
SET(ENV{LIBPATH} "${C_COMPILER_LIBPATH};$ENV{LIBPATH}")
SET(ENV{PATH} "${C_COMPILER_PATH};$ENV{PATH}")
SET(ENV{INCLUDE} "${C_COMPILER_INCLUDE};$ENV{INCLUDE}")
SET(ENV{LIB} "${C_COMPILER_LIB};$ENV{LIB}")
SET(ENV{LIBPATH} "${C_COMPILER_LIBPATH};$ENV{LIBPATH}")
# Default compiler settings.
SET(OMPI_C_OPTION_COMPILE "/c" CACHE INTERNAL
"C compiler option for compiling without linking.")
SET(OMPI_C_OUTPUT_OBJ "/Fo" CACHE INTERNAL
"C compiler option for setting object file name.")
SET(OMPI_C_OUTPUT_EXE "/Fe" CACHE INTERNAL
"C compiler option for setting executable file name.")
# Default compiler settings.
SET(OMPI_C_OPTION_COMPILE "/c" CACHE INTERNAL
"C compiler option for compiling without linking.")
SET(OMPI_C_OUTPUT_OBJ "/Fo" CACHE INTERNAL
"C compiler option for setting object file name.")
SET(OMPI_C_OUTPUT_EXE "/Fe" CACHE INTERNAL
"C compiler option for setting executable file name.")
SET(DUMP_UTIL "${VC_BIN_PATH}/dumpbin.exe" CACHE INTERNAL "the dumpbin application.")
SET(DUMP_UTIL "${VC_BIN_PATH}/dumpbin.exe" CACHE INTERNAL "the dumpbin application.")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cl_test.c
"int main() {return 0;}")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cl_test.c
"int main() {return 0;}")
TRY_COMPILE(CL_EXE_OK ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cl_test.c)
TRY_COMPILE(CL_EXE_OK ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cl_test.c)
IF(CL_EXE_OK)
IF(CL_EXE_OK)
# The atomic functions are defined in a very unuasual manner.
# Some of them are intrinsic defined in windows.h others are
# exported by kernel32.dll. If we force the usage of TRY_RUN
# here we will check for both in same time: compilation and run.
# The atomic functions are defined in a very unuasual manner.
# Some of them are intrinsic defined in windows.h others are
# exported by kernel32.dll. If we force the usage of TRY_RUN
# here we will check for both in same time: compilation and run.
IF(${CMAKE_SYSTEM_VERSION} GREATER 5.1)
SET(FUNCTION_LIST Exchange ExchangeAcquire ExchangeRelease Exchange64)
ELSE(${CMAKE_SYSTEM_VERSION} GREATER 5.1)
SET(FUNCTION_LIST Exchange ExchangeAcquire ExchangeRelease)
ENDIF(${CMAKE_SYSTEM_VERSION} GREATER 5.1)
IF(${CMAKE_SYSTEM_VERSION} GREATER 5.1)
SET(FUNCTION_LIST Exchange ExchangeAcquire ExchangeRelease Exchange64)
ELSE(${CMAKE_SYSTEM_VERSION} GREATER 5.1)
SET(FUNCTION_LIST Exchange ExchangeAcquire ExchangeRelease)
ENDIF(${CMAKE_SYSTEM_VERSION} GREATER 5.1)
FOREACH(FUNCTION ${FUNCTION_LIST})
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...")
IF(FUNCTION STREQUAL "Exchange64")
SET(64BITS_TYPE "LONGLONG" CACHE INTERNAL "64bits type longlong")
ELSE(FUNCTION STREQUAL "Exchange64")
SET(64BITS_TYPE "LONG" CACHE INTERNAL "64bits type long")
ENDIF(FUNCTION STREQUAL "Exchange64")
FOREACH(FUNCTION ${FUNCTION_LIST})
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...")
IF(FUNCTION STREQUAL "Exchange64")
SET(64BITS_TYPE "LONGLONG" CACHE INTERNAL "64bits type longlong")
ELSE(FUNCTION STREQUAL "Exchange64")
SET(64BITS_TYPE "LONG" CACHE INTERNAL "64bits type long")
ENDIF(FUNCTION STREQUAL "Exchange64")
STRING(TOUPPER ${FUNCTION} FUNCTION_NAME)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/InterlockedCompare${FUNCTION}_test.c
"#include <windows.h>\n"
"int main() {\n"
" ${64BITS_TYPE} dest = 0, exchange = 1, comperand = 0;\n"
" SetErrorMode(SEM_FAILCRITICALERRORS);\n"
" InterlockedCompare${FUNCTION}( &dest, exchange, comperand );\n"
" return (int)dest;\n"
" }\n")
STRING(TOUPPER ${FUNCTION} FUNCTION_NAME)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/InterlockedCompare${FUNCTION}_test.c
"#include <windows.h>\n"
"int main() {\n"
" ${64BITS_TYPE} dest = 0, exchange = 1, comperand = 0;\n"
" SetErrorMode(SEM_FAILCRITICALERRORS);\n"
" InterlockedCompare${FUNCTION}( &dest, exchange, comperand );\n"
" return (int)dest;\n"
" }\n")
TRY_RUN (HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} COMPILE_RESULT
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/InterlockedCompare${FUNCTION}_test.c")
TRY_RUN (HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} COMPILE_RESULT
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/InterlockedCompare${FUNCTION}_test.c")
IF(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
SET (HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} 0 CACHE INTERNAL "HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME}")
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...failed")
ELSE(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...done")
ENDIF(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
IF(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
SET (HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} 0 CACHE INTERNAL "HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME}")
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...failed")
ELSE(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
MESSAGE( STATUS "Checking for InterlockedCompare${FUNCTION}...done")
ENDIF(HAVE_INTERLOCKEDCOMPARE${FUNCTION_NAME} STREQUAL "FAILED_TO_RUN" OR COMPILE_RESULT EQUAL FALSE)
ENDFOREACH(FUNCTION)
ENDFOREACH(FUNCTION)
ELSE(CL_EXE_OK)
MESSAGE(FATAL_ERROR "No working Microsoft compiler found. Please check if Visual Studio VC is correctly installed.")
ENDIF(CL_EXE_OK)
ELSE(CL_EXE_OK)
MESSAGE(FATAL_ERROR "No working Microsoft compiler found. Please check if Visual Studio VC is correctly installed.")
ENDIF(CL_EXE_OK)
SET(MICROSOFT_CHECK_DONE TRUE CACHE INTERNAL "Microsoft check finished.")
SET(MICROSOFT_CHECK_DONE TRUE CACHE INTERNAL "Microsoft check finished.")
ENDIF(NOT MICROSOFT_CHECK_DONE)
ENDIF(NOT MICROSOFT_CHECK_DONE)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGE "Whether we support 32 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGE64 "Whether we support 64 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGEACQUIRE "Whether we support 32 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGERELEASE "Whether we support 32 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGE "Whether we support 32 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGE64 "Whether we support 64 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGEACQUIRE "Whether we support 32 bits atomic operations on Windows" 0 0)
OMPI_DEF_VAR(HAVE_INTERLOCKEDCOMPAREEXCHANGERELEASE "Whether we support 32 bits atomic operations on Windows" 0 0)
ENDMACRO(OMPI_MICROSOFT_COMPILER)
OMPI_CHECK_INCLUDE_FILE (windows.h HAVE_WINDOWS_H)
OMPI_CHECK_INCLUDE_FILE (winsock2.h HAVE_WINSOCK2_H)
OMPI_CHECK_INCLUDE_FILE (wdm.h HAVE_WDM_H)
OMPI_CHECK_INCLUDE_FILE (malloc.h HAVE_MALLOC_H)
OMPI_CHECK_INCLUDE_FILE (memory.h HAVE_MEMORY_H)
OMPI_CHECK_INCLUDE_FILE (signal.h HAVE_SIGNAL_H)
OMPI_CHECK_INCLUDE_FILE (stdarg.h HAVE_STDARG_H)
OMPI_CHECK_INCLUDE_FILE (stdlib.h HAVE_STDLIB_H)
OMPI_CHECK_INCLUDE_FILE (string.h HAVE_STRING_H)
OMPI_CHECK_INCLUDE_FILE (sys/stat.h HAVE_SYS_STAT_H)
OMPI_CHECK_INCLUDE_FILE (sys/types.h HAVE_SYS_TYPES_H)
OMPI_CHECK_INCLUDE_FILE (time.h HAVE_TIME_H)
OMPI_CHECK_INCLUDE_FILE(stddef.h OPAL_STDC_HEADERS)
OMPI_CHECK_FUNCTION_EXISTS (ceil HAVE_CEIL)
OMPI_CHECK_FUNCTION_EXISTS (execve HAVE_EXECVE)
OMPI_CHECK_FUNCTION_EXISTS (isatty HAVE_ISATTY)
OMPI_CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
CHECK_C_TYPE_EXISTS(socklen_t SOCKLEN_T "winsock2.h;ws2tcpip.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_in" STRUCT_SOCKADDR_IN "winsock2.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_in6" STRUCT_SOCKADDR_IN6 "ws2tcpip.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_storage" STRUCT_SOCKADDR_STORAGE "winsock2.h;ws2tcpip.h")
OMPI_CHECK_SYMBOL_EXISTS (AF_UNSPEC winsock2.h HAVE_DECL_AF_UNSPEC)
OMPI_CHECK_SYMBOL_EXISTS (PF_UNSPEC winsock2.h HAVE_DECL_PF_UNSPEC)
OMPI_CHECK_SYMBOL_EXISTS (AF_INET6 winsock2.h HAVE_DECL_AF_INET6)
OMPI_CHECK_SYMBOL_EXISTS (PF_INET6 winsock2.h HAVE_DECL_PF_INET6)

Просмотреть файл

@ -97,10 +97,6 @@ OMPI_DEF(PACKAGE_VERSION ${OPAL_VERSION} "Define to the version of this package.
OMPI_DEF(PACKAGE_STRING "Open MPI ${PACKAGE_VERSION}" "Define to the full name and version of this package." 1 1)
IF(WIN32)
INCLUDE(ompi_check_Microsoft)
OMPI_MICROSOFT_COMPILER ()
ENDIF(WIN32)
# Get current time and date.
EXECUTE_PROCESS(COMMAND cmd /C time /t
@ -151,6 +147,7 @@ OMPI_DEF(OMPI_F90_BUILD_SIZE "small" "F90 build size." 1 1)
OMPI_DEF(OMPI_BTL_SM_HAVE_KNEM 0 "If btl sm has knem." 0 1)
IF(WIN32 AND MSVC)
INCLUDE(ompi_check_Microsoft)
OMPI_DEF(COMPILER_FAMILYNAME MICROSOFT "Compiler family name" 1 1)
OMPI_DEF(COMPILER_VERSION ${MSVC_VERSION} "Compiler version" 0 1)
OMPI_DEF(OPAL_BUILD_PLATFORM_COMPILER_FAMILYID 14 "Compiler family ID" 0 1)
@ -244,17 +241,12 @@ OMPI_DEF_OPT(OPAL_WANT_LIBLTDL "Whether we want to enable DSO build for Windows.
OMPI_DEF_OPT(OMPI_WANT_NETWORK_DIRECT "Whether we want to enable Network Direct support." ON)
IF (NOT MSVC)
###################################################################
# Check headers #
###################################################################
OMPI_CHECK_INCLUDE_FILE (windows.h HAVE_WINDOWS_H)
OMPI_CHECK_INCLUDE_FILE (winsock2.h HAVE_WINSOCK2_H)
OMPI_CHECK_INCLUDE_FILE(wdm.h HAVE_WDM_H)
OMPI_CHECK_INCLUDE_FILE (aio.h HAVE_AIO_H)
OMPI_CHECK_INCLUDE_FILE (alloca.h HAVE_ALLOCA_H)
@ -290,10 +282,6 @@ OMPI_CHECK_INCLUDE_FILE (mach/mach_time.h HAVE_MACH_MACH_TIME_H)
OMPI_CHECK_INCLUDE_FILE (mach/mach_vm.h HAVE_MACH_MACH_VM_H)
OMPI_CHECK_INCLUDE_FILE (malloc.h HAVE_MALLOC_H)
OMPI_CHECK_INCLUDE_FILE (memory.h HAVE_MEMORY_H)
OMPI_CHECK_INCLUDE_FILE (netdb.h HAVE_NETDB_H)
OMPI_CHECK_INCLUDE_FILE (netinet/in.h HAVE_NETINET_IN_H)
@ -316,19 +304,13 @@ OMPI_CHECK_INCLUDE_FILE (regex.h HAVE_REGEX_H)
OMPI_CHECK_INCLUDE_FILE (sched.h HAVE_SCHED_H)
OMPI_CHECK_INCLUDE_FILE (signal.h HAVE_SIGNAL_H)
OMPI_CHECK_INCLUDE_FILE (stdarg.h HAVE_STDARG_H)
OMPI_CHECK_INCLUDE_FILE (stdbool.h HAVE_STDBOOL_H)
OMPI_CHECK_INCLUDE_FILE (stdint.h HAVE_STDINT_H)
OMPI_CHECK_INCLUDE_FILE (stdlib.h HAVE_STDLIB_H)
OMPI_CHECK_INCLUDE_FILE (strings.h HAVE_STRINGS_H)
OMPI_CHECK_INCLUDE_FILE (string.h HAVE_STRING_H)
OMPI_CHECK_INCLUDE_FILE (stropts.h HAVE_STROPTS_H)
@ -366,15 +348,12 @@ OMPI_CHECK_INCLUDE_FILE (sys/sockio.h HAVE_SYS_SOCKIO_H)
OMPI_CHECK_INCLUDE_FILE (sys/statvfs.h HAVE_SYS_STATVFS_H)
OMPI_CHECK_INCLUDE_FILE (sys/stat.h HAVE_SYS_STAT_H)
OMPI_CHECK_INCLUDE_FILE (sys/sysctl.h HAVE_SYS_SYSCTL_H)
OMPI_CHECK_INCLUDE_FILE (sys/time.h HAVE_SYS_TIME_H)
OMPI_CHECK_INCLUDE_FILE (sys/tree.h HAVE_SYS_TREE_H)
OMPI_CHECK_INCLUDE_FILE (sys/types.h HAVE_SYS_TYPES_H)
OMPI_CHECK_INCLUDE_FILE (sys/uio.h HAVE_SYS_UIO_H)
@ -386,7 +365,6 @@ OMPI_CHECK_INCLUDE_FILE (termios.h HAVE_TERMIOS_H)
OMPI_CHECK_INCLUDE_FILE (sys/time.h HAVE_TIMERADD)
OMPI_CHECK_INCLUDE_FILE (time.h HAVE_TIME_H)
OMPI_CHECK_INCLUDE_FILE (ucontext.h HAVE_UCONTEXT_H)
@ -400,7 +378,6 @@ OMPI_CHECK_INCLUDE_FILE (utmp.h HAVE_UTMP_H)
OMPI_CHECK_INCLUDE_FILE (mx_extension.h MX_HAVE_EXTENSIONS_H)
OMPI_CHECK_INCLUDE_FILE(stddef.h OPAL_STDC_HEADERS)
###################################################################
# Check functions #
@ -409,8 +386,7 @@ OMPI_CHECK_INCLUDE_FILE(stddef.h OPAL_STDC_HEADERS)
OMPI_CHECK_FUNCTION_EXISTS (asprintf HAVE_ASPRINTF)
OMPI_CHECK_FUNCTION_EXISTS (backtrace HAVE_BACKTRACE)
OMPI_CHECK_FUNCTION_EXISTS (ceil HAVE_CEIL)
OMPI_CHECK_FUNCTION_EXISTS (cnos_pm_barrier HAVE_CNOS_PM_BARRIER)
@ -422,8 +398,6 @@ OMPI_CHECK_FUNCTION_EXISTS (epoll HAVE_EPOLL)
OMPI_CHECK_FUNCTION_EXISTS (epoll_ctl HAVE_EPOLL_CTL)
OMPI_CHECK_FUNCTION_EXISTS (execve HAVE_EXECVE)
OMPI_CHECK_FUNCTION_EXISTS (fcntl HAVE_FCNTL)
OMPI_CHECK_FUNCTION_EXISTS (fork HAVE_FORK)
@ -442,8 +416,6 @@ 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_FUNCTION_EXISTS (isatty HAVE_ISATTY)
OMPI_CHECK_FUNCTION_EXISTS (killrank HAVE_KILLRANK)
OMPI_CHECK_FUNCTION_EXISTS (kqueue KQUEUE)
@ -504,8 +476,6 @@ OMPI_CHECK_FUNCTION_EXISTS (vasprintf HAVE_VASPRINTF)
OMPI_CHECK_FUNCTION_EXISTS (vm_read_overwrite HAVE_VM_READ_OVERWRITE)
OMPI_CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
OMPI_CHECK_FUNCTION_EXISTS (waitpid HAVE_WAITPIN)
OMPI_CHECK_FUNCTION_EXISTS (_NSGetEnviron HAVE__NSGETENVIRON)
@ -514,28 +484,12 @@ OMPI_CHECK_FUNCTION_EXISTS (__mmap HAVE___MMAP)
OMPI_CHECK_FUNCTION_EXISTS (__munmap HAVE___MUNMAP)
CHECK_C_TYPE_EXISTS(socklen_t SOCKLEN_T "winsock2.h;ws2tcpip.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_in" STRUCT_SOCKADDR_IN "winsock2.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_in6" STRUCT_SOCKADDR_IN6 "ws2tcpip.h")
CHECK_C_TYPE_EXISTS("struct sockaddr_storage" STRUCT_SOCKADDR_STORAGE "winsock2.h;ws2tcpip.h")
OMPI_CHECK_SYMBOL_EXISTS (F_SETFD fcntl.h HAVE_SETFD)
OMPI_CHECK_SYMBOL_EXISTS (TAILQ_FOREACH "sys/queue.h" HAVE_TAILQFOREACH)
OMPI_CHECK_SYMBOL_EXISTS (IBV_EVENT_CLIENT_REREGISTER "" HAVE_DECL_IBV_EVENT_CLIENT_REREGISTER)
OMPI_CHECK_SYMBOL_EXISTS (AF_UNSPEC winsock2.h HAVE_DECL_AF_UNSPEC)
OMPI_CHECK_SYMBOL_EXISTS (PF_UNSPEC winsock2.h HAVE_DECL_PF_UNSPEC)
OMPI_CHECK_SYMBOL_EXISTS (AF_INET6 winsock2.h HAVE_DECL_AF_INET6)
OMPI_CHECK_SYMBOL_EXISTS (PF_INET6 winsock2.h HAVE_DECL_PF_INET6)
OMPI_CHECK_SYMBOL_EXISTS (RLIMIT_NPROC "" HAVE_DECL_RLIMIT_NPROC)
OMPI_CHECK_SYMBOL_EXISTS (sbrk "" HAVE_DECL_SBRK)
@ -550,6 +504,7 @@ OMPI_CHECK_STRUCT_HAS_MEMBER(siginfo_t si_fd sys/siginfo.h HAVE_SIGINFO_T_SI_FD)
OMPI_CHECK_STRUCT_HAS_MEMBER("struct dirent" d_type dirent.h HAVE_STRUCT_DIRENT_D_TYPE)
ENDIF (NOT MSVC)
###################################################################
# Check data type #

Просмотреть файл

@ -1,4 +1,4 @@
# Copyright (c) 2008-2009 High Performance Computing Center Stuttgart,
# Copyright (c) 2008-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
@ -19,6 +19,10 @@ include(CMakeFortranInformation)
IF(OMPI_WANT_F77_BINDINGS AND NOT F77_SETUP_DONE)
SET(OMPI_MPI_INTEGER_KIND 0 CACHE INTERNAL "MPI_INTEGER_KIND")
SET(OMPI_MPI_ADDRESS_KIND 0 CACHE INTERNAL "MPI_ADDRESS_KIND")
SET(OMPI_MPI_OFFSET_KIND 0 CACHE INTERNAL "MPI_OFFSET_KIND")
GET_FILENAME_COMPONENT(F77_NAME ${CMAKE_Fortran_COMPILER} NAME)
GET_FILENAME_COMPONENT(F77_PATH ${CMAKE_Fortran_COMPILER} PATH)