1
1

- 1/4 commit for Windows Visual Studio and CCP support:

CMakeLists and .windows files.
  In contribs preconfigured and precompiled parts.

This commit was SVN r20108.
Этот коммит содержится в:
Shiqing Fan 2008-12-10 20:59:20 +00:00
родитель 728a24c8ec
Коммит a5281f0434
106 изменённых файлов: 13799 добавлений и 0 удалений

153
CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,153 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Check the CMake version
IF(WIN32)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
ELSE(WIN32)
MESSAGE( FATAL_ERROR "Only support Windows. Aborting.")
ENDIF(WIN32)
# create top-level target(solution file)
PROJECT("OpenMPI" C CXX)
SET (OpenMPI_VERSION $(OpenMPI_MAJOR_VERSION).$(OpenMPI_MINOR_VERSION).$(OpenMPI_PATCH_VERSION))
SET (CMAKE_MODULE_PATH "${OpenMPI_SOURCE_DIR}/contrib/platform/win32/CMakeModules;${CMAKE_MODULE_PATH}")
# default to debug-builds
IF (NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: None, Debug, Release, RelWithDebInfo and MinSizeRel." FORCE)
ENDIF (NOT CMAKE_BUILD_TYPE)
# preset install dir
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/installed" CACHE PATH "CMAKE_INSTALL_PREFIX" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
INCLUDE(ompi_get_version)
# Make the include path visible to all targets
INCLUDE_DIRECTORIES (
${OpenMPI_SOURCE_DIR}/
${OpenMPI_SOURCE_DIR}/opal
${OpenMPI_SOURCE_DIR}/opal/include
${OpenMPI_SOURCE_DIR}/ompi
${OpenMPI_SOURCE_DIR}/ompi/include
${OpenMPI_SOURCE_DIR}/orte
${OpenMPI_SOURCE_DIR}/orte/include
${OpenMPI_BINARY_DIR}/
${OpenMPI_BINARY_DIR}/opal
${OpenMPI_BINARY_DIR}/opal/include
${OpenMPI_BINARY_DIR}/ompi
${OpenMPI_BINARY_DIR}/ompi/include
${OpenMPI_BINARY_DIR}/orte
${OpenMPI_BINARY_DIR}/orte/include
${OpenMPI_SOURCE_DIR}/contrib/platform/win32
)
# Output directroies for binaries and libraries.
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OpenMPI_BINARY_DIR})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OpenMPI_BINARY_DIR})
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OpenMPI_BINARY_DIR})
# get rid of VS-project file reloading after "cleanup" or "rebuild"
SET (CMAKE_SUPPRESS_REGENERATION true)
# Dynamic/shared build, the default is set to static(OFF)
OPTION(BUILD_SHARED_LIBS "Wether we want to build shared libraries." OFF)
INCLUDE(ompi_configure)
ADD_SUBDIRECTORY(opal)
ADD_SUBDIRECTORY(ompi)
ADD_SUBDIRECTORY(orte)
ADD_SUBDIRECTORY(test)
INCLUDE(InstallRequiredSystemLibraries)
# CPACK settings
#SET(CPACK_PACKAGE_NAME "Open MPI")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open MPI")
SET(CPACK_PACKAGE_VENDOR "Open MPI")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_PATCH "${RELEASE_VERSION}")
IF(${RELEASE_VERSION} EQUAL 0)
SET(OpenMPI_version "${MAJOR_VERSION}.${MINOR_VERSION}")
ELSE(${RELEASE_VERSION} EQUAL 0)
SET(OpenMPI_version "${MAJOR_VERSION}.${MINOR_VERSION}.${RELEASE_VERSION}")
ENDIF(${RELEASE_VERSION} EQUAL 0)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenMPI_v${OpenMPI_version}")
SET(CPACK_PACKAGE_FILE_NAME "OpenMPI-${OpenMPI_version}")
SET(CPACK_INSTALLED_DIRECTORIES "${CMAKE_INSTALL_PREFIX}" ".")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Open MPI")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "OpenMPI-${VERSION_STRING}")
#SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}")
#There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
# SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
# SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} OpenMPI")
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.open-mpi.org")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.open-mpi.org")
# SET(CPACK_NSIS_CONTACT "me@my-personal-home-page.com")
# SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")
SET(CPACK_NSIS_MODIFY_PATH OFF)
SET(CPACK_SOURCE_ZIP ON)
# setup the register entries when install
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS ${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} "
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_PREFIX\\\" \\\"$INSTDIR\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_EXEC_PREFIX\\\" \\\"$INSTDIR\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_BINDIR\\\" \\\"$INSTDIR\\\\bin\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_SBINDIR\\\" \\\"$INSTDIR\\\\sbin\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_LIBEXECDIR\\\" \\\"$INSTDIR\\\\libexec\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_DATAROOTDIR\\\" \\\"$INSTDIR\\\\share\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_DATADIR\\\" \\\"$INSTDIR\\\\share\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_SYSCONFDIR\\\" \\\"$INSTDIR\\\\etc\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_LOCALSTATEDIR\\\" \\\"$INSTDIR\\\\etc\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_LIBDIR\\\" \\\"$INSTDIR\\\\lib\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_INCLUDEDIR\\\" \\\"$INSTDIR\\\\include\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_INFODIR\\\" \\\"$INSTDIR\\\\share\\\\info\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_MANDIR\\\" \\\"$INSTDIR\\\\share\\\\man\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_PKGDATADIR\\\" \\\"$INSTDIR\\\\share\\\\openmpi\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_PKGLIBDIR\\\" \\\"$INSTDIR\\\\lib\\\\openmpi\\\"
WriteRegStr HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\" \\\"OPAL_PKGINCLUDEDIR\\\" \\\"$INSTDIR\\\\include\\\\openmpi\\\"
ReadRegStr $0 ${hklm_all_users} \\\"PATH\\\"
StrCpy $0 $0;$INSTDIR\\\\bin
WriteRegExpandStr ${hklm_all_users} \\\"PATH\\\"
")
# delete the register entries when uninstall
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS ${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} "
DeleteRegKey HKLM \\\"SOFTWARE\\\\${CPACK_PACKAGE_VENDOR}\\\"
")
# (un)install icons
#SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/contrib/platform/win32/open-mpi-logo.ico")
#SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/contrib/platform/win32/uninstall.ico")
INCLUDE(CPack)

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

@ -0,0 +1,26 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
IF(NOT DEFINED COMPILER_SUPPORT_BOOL)
MESSAGE( STATUS "Check whether the compiler supports bool...")
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_bool.c"
"${INCLUDE_HEADERS}
int main(){ ${TYPE} test; return sizeof(${TYPE});}")
TRY_COMPILE(COMPILER_SUPPORT_BOOL "${CMAKE_BINARY_DIR}"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_bool.c")
IF(COMPILER_SUPPORT_BOOL)
MESSAGE ( STATUS "Our compiler supports \"bool\".")
ELSE(COMPILER_SUPPORT_BOOL)
MESSAGE ( STATUS "Our compiler doesn't support \"bool\".")
ENDIF(COMPILER_SUPPORT_BOOL)
ENDIF(NOT DEFINED COMPILER_SUPPORT_BOOL)

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

@ -0,0 +1,54 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
MACRO(CHECK_C_INLINE)
#
# Return the inline definition string.
#
IF(NOT HAVE_INLINE)
PROJECT(FOO C)
# path of foo test programs
SET (FOO_SOURCE_DIR ${OpenMPI_SOURCE_DIR}/CMakeTests)
MESSAGE( STATUS "Check inline definition...")
FOREACH(KEYWORD "inline" "__inline__" "__inline")
SET(HAVE_INLINE FALSE)
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test_inline.c"
"typedef int foo_t;
static inline foo_t static_foo(){return 0;}
foo_t foo(){return 0;}
int main(int argc, char *argv[]){return 0;}
")
TRY_COMPILE(C_HAS_${KEYWORD} "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test_inline.c"
COMPILE_DEFINITIONS "-Dinline=${KEYWORD}")
IF(C_HAS_${KEYWORD})
SET(HAVE_INLINE TRUE CACHE INTERNAL "have 'inline' definition")
SET(INLINE_STRING ${KEYWORD} CACHE INTERNAL "'inline' definition")
MESSAGE( STATUS "Checking inline definition...${INLINE_STRING}")
BREAK()
ENDIF(C_HAS_${KEYWORD})
ENDFOREACH(KEYWORD)
IF(NOT HAVE_INLINE)
MESSAGE(FATAL_ERROR "Check inline definition...failed. Cannot continue.")
ENDIF(NOT HAVE_INLINE)
ENDIF(NOT HAVE_INLINE)
ENDMACRO(CHECK_C_INLINE)

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

@ -0,0 +1,42 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# Try to compile and run a test program.
# If the type is defined, then return the size of the type.
#
# TYPE: the type to check
# TYPE_NAME: the uppercase of the type, with underlines if necessary.
# INCLUDE_HEADERS: the header files defines the type.
#
# HAVE_${TYPE_NAME}: if type is found, this value is define as TRUE.
# SIZEOF_${TYPE_NAME}: size of the type.
MACRO(CHECK_C_TYPE_EXISTS TYPE TYPE_NAME INCLUDE_HEADERS)
MESSAGE( STATUS "Checking for ${TYPE}...")
PROJECT(FOO)
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_${TYPE_NAME}.c"
"${INCLUDE_HEADERS}
int main(){ ${TYPE} test; return sizeof(${TYPE});}")
TRY_RUN(SIZEOF_${TYPE_NAME} COMPILE_RESULT "${CMAKE_BINARY_DIR}"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_${TYPE_NAME}.c")
IF(SIZEOF_${TYPE_NAME} GREATER 0)
SET(HAVE_${TYPE_NAME} TRUE CACHE INTERNAL "HAVE_${TYPE_NAME}")
MESSAGE( STATUS "Checking for ${TYPE}...done")
ELSE(SIZEOF_${TYPE_NAME} GREATER 0)
SET(HAVE_${TYPE_NAME} FALSE CACHE INTERNAL "HAVE_${TYPE_NAME}")
MESSAGE( STATUS "Checking for ${TYPE}...failed")
ENDIF(SIZEOF_${TYPE_NAME} GREATER 0)
ENDMACRO(CHECK_C_TYPE_EXISTS TYPE TYPE_NAME INCLUDE_HEADERS)

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

@ -0,0 +1,203 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# list the sub directories of current directories
# save the list of subdirs in OUTPUT_VARIABLE
MACRO(CHECK_MCA_SUBDIRS CURRENT_DIR OUTPUT_VARIABLE)
EXECUTE_PROCESS (COMMAND cmd /C dir /AD /B
WORKING_DIRECTORY ${CURRENT_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(NOT "${OUTPUT}" STREQUAL "")
STRING (REGEX MATCHALL "[a-zA-Z1-9_]+" ${OUTPUT_VARIABLE} ${OUTPUT})
ENDIF(NOT "${OUTPUT}" STREQUAL "")
ENDMACRO(CHECK_MCA_SUBDIRS CURRENT_DIR OUTPUT_VARIABLE)
CHECK_MCA_SUBDIRS("${PROJECT_SOURCE_DIR}/mca" "${PROJECT_NAME}_MCA_SUBDIRS")
FILE(GLOB ${PROJECT_NAME}_MCA_HEADER_FILES "mca/*.C" "mca/*.h")
SET(${PROJECT_NAME}_MCA_FILES ${${PROJECT_NAME}_MCA_FILES} ${${PROJECT_NAME}_MCA_HEADER_FILES})
SOURCE_GROUP(mca FILES ${${PROJECT_NAME}_MCA_HEADER_FILES})
# parse each mca subdir
FOREACH ("${PROJECT_NAME}_MCA_SUBDIR" ${${PROJECT_NAME}_MCA_SUBDIRS})
IF(NOT ${${PROJECT_NAME}_MCA_SUBDIR} STREQUAL "CMakeFiles" AND NOT ${${PROJECT_NAME}_MCA_SUBDIR} STREQUAL "svn")
SET(CURRENT_PATH "mca/${${PROJECT_NAME}_MCA_SUBDIR}")
FILE(GLOB ${${PROJECT_NAME}_MCA_SUBDIR}_FILES "${CURRENT_PATH}/*.C" "${CURRENT_PATH}/*.h"
"${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp")
SET(${PROJECT_NAME}_MCA_FILES ${${PROJECT_NAME}_MCA_FILES} ${${${PROJECT_NAME}_MCA_SUBDIR}_FILES})
SOURCE_GROUP(mca\\${${PROJECT_NAME}_MCA_SUBDIR} FILES ${${${PROJECT_NAME}_MCA_SUBDIR}_FILES})
IF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/base")
SET(CURRENT_PATH "${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/base")
FILE(GLOB ${${PROJECT_NAME}_MCA_SUBDIR}_BASE_FILES "${CURRENT_PATH}/*.c" "${CURRENT_PATH}/*.h"
"${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp")
SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/base/static-components.h
PROPERTIES GENERATED true)
SET(${${PROJECT_NAME}_MCA_SUBDIR}_BASE_FILES ${${${PROJECT_NAME}_MCA_SUBDIR}_BASE_FILES}
${PROJECT_BINARY_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/base/static-components.h)
SET(${PROJECT_NAME}_MCA_FILES ${${PROJECT_NAME}_MCA_FILES}
${${${PROJECT_NAME}_MCA_SUBDIR}_BASE_FILES})
SOURCE_GROUP(mca\\${${PROJECT_NAME}_MCA_SUBDIR}\\base FILES ${${${PROJECT_NAME}_MCA_SUBDIR}_BASE_FILES})
# Install help files if they are here.
INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/
FILES_MATCHING PATTERN "*.txt" PATTERN ".svn" EXCLUDE)
ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/base")
CHECK_MCA_SUBDIRS("${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}" "${PROJECT_NAME}_MCA_COMPONENT_SUBDIRS")
SET(CURRENT_COMPONENT_PRIORITY 0)
SET(BEST_COMPONENT_PRIORITY 0)
# parse each component subdir of current mca
FOREACH (${PROJECT_NAME}_MCA_COMPONENT ${${PROJECT_NAME}_MCA_COMPONENT_SUBDIRS})
IF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT}/.windows")
FILE(STRINGS ${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT}/.windows
VALUE REGEX "^not_single_shared_lib=")
IF(NOT VALUE STREQUAL "")
STRING(REPLACE "not_single_shared_lib=" "" NOT_SINGLE_SHARED_LIB ${VALUE})
ENDIF(NOT VALUE STREQUAL "")
IF(NOT BUILD_SHARED_LIBS OR NOT_SINGLE_SHARED_LIB STREQUAL "1")
SET(NOT_SINGLE_SHARED_LIB "")
# add sources for static build or for the shared build when this is not a stand along library.
SET(CURRENT_PATH "mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT}")
FILE(GLOB ${${PROJECT_NAME}_MCA_COMPONENT}_FILES "${CURRENT_PATH}/*.C" "${CURRENT_PATH}/*.h"
"${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp")
SET(${PROJECT_NAME}_MCA_FILES ${${PROJECT_NAME}_MCA_FILES}
${${${PROJECT_NAME}_MCA_COMPONENT}_FILES})
SOURCE_GROUP(mca\\${${PROJECT_NAME}_MCA_SUBDIR}\\${${PROJECT_NAME}_MCA_COMPONENT} FILES ${${${PROJECT_NAME}_MCA_COMPONENT}_FILES})
IF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT}/configure.params")
FILE(STRINGS "${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT}/configure.params"
CURRENT_COMPONENT_PRIORITY REGEX "PRIORITY")
IF(NOT CURRENT_COMPONENT_PRIORITY STREQUAL "")
STRING(REGEX REPLACE "[A-Z_]+=" "" CURRENT_COMPONENT_PRIORITY ${CURRENT_COMPONENT_PRIORITY})
ENDIF(NOT CURRENT_COMPONENT_PRIORITY STREQUAL "")
ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT}/configure.params")
IF(CURRENT_COMPONENT_PRIORITY GREATER BEST_COMPONENT_PRIORITY)
# I have a higher priority for this mca, put me at the very beginning.
SET (OUTFILE_EXTERN
"extern const mca_base_component_t mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}_component"
"\n${OUTFILE_EXTERN}")
SET(${${PROJECT_NAME}_MCA_SUBDIR}_STRUCT
"&mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}_component,\n"
${${${PROJECT_NAME}_MCA_SUBDIR}_STRUCT})
SET(BEST_COMPONENT_PRIORITY ${CURRENT_COMPONENT_PRIORITY})
ELSE(CURRENT_COMPONENT_PRIORITY GREATER BEST_COMPONENT_PRIORITY)
SET (OUTFILE_EXTERN ${OUTFILE_EXTERN}
"\nextern const mca_base_component_t mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}_component;")
SET(${${PROJECT_NAME}_MCA_SUBDIR}_STRUCT ${${${PROJECT_NAME}_MCA_SUBDIR}_STRUCT}
"&mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}_component,\n")
ENDIF(CURRENT_COMPONENT_PRIORITY GREATER BEST_COMPONENT_PRIORITY)
ELSE(NOT BUILD_SHARED_LIBS OR NOT_SINGLE_SHARED_LIB STREQUAL "1")
SET(CURRENT_PATH ${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT})
# get the dependencies for this component.
SET(MCA_DEPENDENCIES "")
FILE(STRINGS ${CURRENT_PATH}/.windows VALUE REGEX "^mca_dependencies=")
IF(NOT VALUE STREQUAL "")
STRING(REPLACE "mca_dependencies=" "" MCA_DEPENDENCIES ${VALUE})
ENDIF(NOT VALUE STREQUAL "")
# get the libraries required for this component.
SET(MCA_LINK_LIBRARIES "")
FILE(STRINGS ${CURRENT_PATH}/.windows VALUE REGEX "^mca_link_libraries=")
IF(NOT VALUE STREQUAL "")
STRING(REPLACE "mca_link_libraries=" "" MCA_LINK_LIBRARIES ${VALUE})
ENDIF(NOT VALUE STREQUAL "")
# generate CMakeLists.txt for each component for shared build.
FILE (WRITE "${PROJECT_BINARY_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT}/CMakeLists.txt"
"
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# make new project for shared build
PROJECT(\"mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}\")
FILE(GLOB ${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}_FILES
\"${CURRENT_PATH}/*.C\"
\"${CURRENT_PATH}/*.h\"
\"${CURRENT_PATH}/*.cc\"
\"${CURRENT_PATH}/*.cpp\")
SET_SOURCE_FILES_PROPERTIES(\${${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}_FILES}
PROPERTIES LANGUAGE CXX)
ADD_LIBRARY(mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT} SHARED
\${${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}_FILES})
SET_TARGET_PROPERTIES(mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT}
PROPERTIES COMPILE_FLAGS \"-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS\")
TARGET_LINK_LIBRARIES (mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT} ${MCA_LINK_LIBRARIES})
ADD_DEPENDENCIES(mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT} libopen-pal ${MCA_DEPENDENCIES})
INSTALL(TARGETS mca_${${PROJECT_NAME}_MCA_SUBDIR}_${${PROJECT_NAME}_MCA_COMPONENT} DESTINATION lib/openmpi)
")
ADD_SUBDIRECTORY (${PROJECT_BINARY_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT} mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT})
ENDIF(NOT BUILD_SHARED_LIBS OR NOT_SINGLE_SHARED_LIB STREQUAL "1")
# Install help files if they are here.
INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/
FILES_MATCHING PATTERN "*.txt" PATTERN ".svn" EXCLUDE)
ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/${${PROJECT_NAME}_MCA_COMPONENT}/.windows")
ENDFOREACH (${PROJECT_NAME}_MCA_COMPONENT)
STRING(LENGTH "${${${PROJECT_NAME}_MCA_SUBDIR}_STRUCT}" STRUCT_STRING_LENTH)
IF(STRUCT_STRING_LENTH GREATER 0)
STRING (REPLACE ";" "" OUTFILE_STRUCT ${${${PROJECT_NAME}_MCA_SUBDIR}_STRUCT})
ENDIF(STRUCT_STRING_LENTH GREATER 0)
# write out static-component.h for this mca.
FILE(WRITE "${PROJECT_BINARY_DIR}/mca/${${PROJECT_NAME}_MCA_SUBDIR}/base/static-components.h"
"/*
* $HEADER$
*/
#if defined(c_plusplus) || defined(__cplusplus)
extern \"C\" {
#endif
${OUTFILE_EXTERN}
const mca_base_component_t *mca_${${PROJECT_NAME}_MCA_SUBDIR}_base_static_components[] = {
${OUTFILE_STRUCT}
NULL
};
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
")
SET (OUTFILE_EXTERN "")
SET (OUTFILE_STRUCT "")
ENDIF(NOT ${${PROJECT_NAME}_MCA_SUBDIR} STREQUAL "CMakeFiles" AND NOT ${${PROJECT_NAME}_MCA_SUBDIR} STREQUAL "svn")
ENDFOREACH (${PROJECT_NAME}_MCA_SUBDIR)

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

@ -0,0 +1,43 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
MACRO(CHECK_SIZEOF_BOOL)
IF(NOT DEFINED SIZEOF_BOOL)
#
# Try to compile and run a foo grogram, store the result in SIZEOF_BOOL.
#
PROJECT(FOO)
MESSAGE( STATUS "Checking size of bool...")
FOREACH(LANG c cxx)
FILE (WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_sizeof_bool.${LANG}"
"#include <stdio.h>
int main() {return sizeof(bool);}
")
TRY_RUN(SIZEOF_BOOL COMPILE_RESULT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_sizeof_bool.${LANG}")
IF(SIZEOF_BOOL GREATER 0)
MESSAGE( STATUS "Checking size of bool...${SIZEOF_BOOL}")
BREAK()
ENDIF(SIZEOF_BOOL GREATER 0)
ENDFOREACH(LANG C CXX)
IF(SIZEOF_BOOL EQUAL 0)
MESSAGE( STATUS "Checking size of bool...failed")
ENDIF(SIZEOF_BOOL EQUAL 0)
ENDIF(NOT DEFINED SIZEOF_BOOL)
ENDMACRO(CHECK_SIZEOF_BOOL)

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

@ -0,0 +1,123 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_F77_CHECK(Fortran type, c type required,
# types to search, expected size)
#----------------------------------------------------------
# Check Fortran type, including:
# - whether compiler supports or not
# - size of type
# - equal to expected size
# - alignment
# - associated C type
#
# types to search is a list of values
MACRO(OMPI_F77_CHECK FORTRAN_TYPE C_TYPE TYPE_LIST EXPECTED_SIZE)
STRING(REPLACE "*" "" TYPE_NAME ${FORTRAN_TYPE})
STRING(REPLACE " " "_" TYPE_NAME ${TYPE_NAME})
SET(NEED_RECHECK TRUE)
# do we need to check all the features?
IF(DEFINED OMPI_HAVE_FORTRAN_${TYPE_NAME})
IF(${F77_SETUP_${TYPE_NAME}} STREQUAL ${OMPI_WANT_F77_BINDINGS})
SET(NEED_RECHECK FALSE)
ELSE(${F77_SETUP_${TYPE_NAME}} STREQUAL ${OMPI_WANT_F77_BINDINGS})
SET(NEED_RECHECK TRUE)
ENDIF(${F77_SETUP_${TYPE_NAME}} STREQUAL ${OMPI_WANT_F77_BINDINGS})
ENDIF(DEFINED OMPI_HAVE_FORTRAN_${TYPE_NAME})
# use this variable to check whether user changed F77 option.
# every time OMPI_WANT_F77_BINDINGS got changed, we need to re-check everything.
SET(F77_SETUP_${TYPE_NAME} ${OMPI_WANT_F77_BINDINGS} CACHE INTERNAL "requir re-check ${TYPE_NAME} or not")
IF(NEED_RECHECK)
INCLUDE(F77_check_type)
INCLUDE(F77_get_alignment)
INCLUDE(F77_get_sizeof)
INCLUDE(OMPI_find_type)
SET(ofc_expected_size ${EXPECTED_SIZE})
SET(ofc_have_type 0)
SET(ofc_type_size ${SIZEOF_INT})
SET(ofc_type_alignment ${SIZEOF_INT})
SET(ofc_c_type ${ompi_fortran_bogus_type_t})
# Only check if we actually want the F77 bindings / have a F77
# compiler. This allows us to call this macro, even if there is
# no F77 compiler. If we have no f77 compiler, then just set a
# bunch of defaults.
IF(OMPI_WANT_F77_BINDINGS)
OMPI_F77_CHECK_TYPE(${FORTRAN_TYPE} ofc_have_type)
ELSE(OMPI_WANT_F77_BINDINGS)
# skip checking, set with expected values
# MESSAGE(STATUS "Checking if Fortran 77 compiler supports ${FORTRAN_TYPE}...skipped.")
ENDIF(OMPI_WANT_F77_BINDINGS)
IF(ofc_have_type)
# What is the size of this type?
# NOTE: Some Fortran compilers actually will return that a
# type exists even if it doesn't support it -- the compiler
# will automatically convert the unsupported type to a type
# that it *does* support. For example, if you try to use
# INTEGER*16 and the compiler doesn't support it, it may well
# automatically convert it to INTEGER*8 for you (!). So we
# have to check the actual size of the type once we determine
# that the compiler doesn't error if we try to use it
# (i.e,. the compiler *might* support that type). If the size
# doesn't match the expected size, then the compiler doesn't
# really support it.
OMPI_F77_GET_SIZEOF(${FORTRAN_TYPE} ofc_type_size)
IF(NOT ${ofc_expected_size} STREQUAL "-1" AND NOT ${ofc_type_size} EQUAL "${ofc_expected_size}")
MESSAGE(STATUS "*** Fortran 77 ${FORTRAN_TYPE} does not have expected size!")
MESSAGE(STATUS "*** Expected ${ofc_expected_size}, got ${ofc_type_size}")
MESSAGE(STATUS "*** Disabling MPI support for Fortran 77 ${FORTRAN_TYPE}")
SET(ofc_have_type 0)
ELSE(NOT ${ofc_expected_size} STREQUAL "-1" AND NOT ${ofc_type_size} EQUAL "${ofc_expected_size}")
# Look for a corresponding C type (will abort by itself if the
# type isn't found and we need it)
SET(ofc_c_type "")
OMPI_FIND_TYPE(${FORTRAN_TYPE} "${TYPE_LIST}" ${C_TYPE} ${ofc_type_size} ofc_c_type)
IF("${ofc_c_type}" STREQUAL "")
SET(ofc_have_type 0)
ENDIF("${ofc_c_type}" STREQUAL "")
# Get the alignment of the type
IF(ofc_have_type)
OMPI_F77_GET_ALIGNMENT(${FORTRAN_TYPE} ofc_type_alignment)
ENDIF(ofc_have_type)
ENDIF(NOT ${ofc_expected_size} STREQUAL "-1" AND NOT ${ofc_type_size} EQUAL "${ofc_expected_size}")
ENDIF(ofc_have_type)
# We always need these defines -- even if we don't have a given type,
# there are some places in the code where we have to have *something*.
SET(OMPI_HAVE_FORTRAN_${TYPE_NAME} ${ofc_have_type} CACHE INTERNAL "OMPI_HAVE_FORTRAN_${TYPE_NAME}")
SET(OMPI_SIZEOF_FORTRAN_${TYPE_NAME} ${ofc_type_size} CACHE INTERNAL "OMPI_SIZEOF_FORTRAN_${TYPE_NAME}")
SET(OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME} ${ofc_type_alignment} CACHE INTERNAL "OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}")
IF(NOT "${TYPE_LIST}" STREQUAL "")
STRING(TOLOWER ${TYPE_NAME} TYPE_NAME_L)
SET(ompi_fortran_${TYPE_NAME_L}_t ${ofc_c_type} CACHE INTERNAL "ompi_fortran_${TYPE_NAME_L}_t")
ENDIF(NOT "${TYPE_LIST}" STREQUAL "")
#MESSAGE("OMPI_HAVE_FORTRAN_${TYPE_NAME}:${OMPI_HAVE_FORTRAN_${TYPE_NAME}}")
#MESSAGE("OMPI_SIZEOF_FORTRAN_${TYPE_NAME}:${OMPI_SIZEOF_FORTRAN_${TYPE_NAME}}")
#MESSAGE("OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}:${OMPI_ALIGNMENT_FORTRAN_${TYPE_NAME}}")
#MESSAGE("ompi_fortran_${TYPE_NAME_L}_t:${ompi_fortran_${TYPE_NAME_L}_t}")
ENDIF(NEED_RECHECK)
ENDMACRO(OMPI_F77_CHECK FORTRAN_TYPE C_TYPE TYPE_LIST EXPECTED_SIZE)

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

@ -0,0 +1,81 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_F77_CHECK_REAL16_C_EQUIV
# ----------------------------------------------------
MACRO(OMPI_F77_CHECK_REAL16_C_EQUIV)
SET(OMPI_REAL16_MATCHES_C 0)
#MESSAGE(STATUS "OMPI_HAVE_FORTRAN_REAL16:${OMPI_HAVE_FORTRAN_REAL16}")
IF(OMPI_WANT_F77_BINDINGS)
IF(OMPI_HAVE_FORTRAN_REAL16)
OMPI_F77_MAKE_C_FUNCTION(c ompi_ac_c_fn)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_c.c
"#include <stdio.h>"
"#include <stdlib.h>"
"#ifdef __cplusplus"
"extern \"C\" {"
"#endif"
"void ${ompi_ac_c_fn}($OMPI_FORTRAN_REAL16_C_TYPE *a) {"
" FILE *fp = fopen(\"conftestval\", \"w\");"
" if (NULL == fp) exit(1);"
" fprintf(fp, \"%s\n\", (1.1L == *a) ? \"yes\" : \"no\");"
" fclose(fp);"
"}"
"#ifdef __cplusplus"
"}"
"#endif")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_f.f
"\t program bogus"
"\t REAL*16 :: foo"
"\t foo = 1.1"
"\t call c(foo)"
"\t end program bogus")
EXECUTE_PROCESS(COMMAND ${CL_EXE} /c conftest_c.c /I${VC_INCLUDE_PATH}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND ${F77} conftest_f.f conftest_c.obj -o conftest
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
MESSAGE(FATAL_ERROR "Can not determine if REAL*16 bit-matches C.")
ELSE(RESULT)
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
# read out type size value from the file, and write back to the output variable
FILE(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval ${OUTPUT_VARIABLE})
MESSAGE(STATUS "Check if REAL*16 bit-matches C...${OUTPUT_VARIABLE}")
SET(OMPI_REAL16_MATCHES_C 1)
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
MESSAGE(STATUS "Check if REAL*16 bit-matches C...failed")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
ENDIF(RESULT)
ELSE(OMPI_HAVE_FORTRAN_REAL16)
MESSAGE(STATUS "Check if REAL*16 bit-matches C...skipped")
ENDIF(OMPI_HAVE_FORTRAN_REAL16)
ENDIF(OMPI_WANT_F77_BINDINGS)
ENDMACRO(OMPI_F77_CHECK_REAL16_C_EQUIV)

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

@ -0,0 +1,39 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_F77_CHECK_TYPE
# in: TYPE - fortran type to check.
# out: HAVE_TYPE - 0/1 whether we have that type.
# -----------------------------------------------------------------
MACRO(OMPI_F77_CHECK_TYPE TYPE HAVE_TYPE)
MESSAGE(STATUS "Check if Fortran 77 compiler supports ${TYPE}...")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_fortran_type.f
"\t program main \n"
"\t ${TYPE} bogus_variable \n"
"\t END \n")
EXECUTE_PROCESS(COMMAND ${F77} check_fortran_type.f
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
SET(${HAVE_TYPE} 0)
MESSAGE(STATUS "Check if Fortran 77 compiler supports ${TYPE}...failed")
ELSE(RESULT)
SET(${HAVE_TYPE} 1)
MESSAGE(STATUS "Check if Fortran 77 compiler supports ${TYPE}...done")
ENDIF(RESULT)
ENDMACRO(OMPI_F77_CHECK_TYPE TYPE HAVE_TYPE)

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

@ -0,0 +1,166 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
MACRO(OMPI_F77_FIND_EXT_SYMBOL_CONVENTION)
IF(OMPI_WANT_F77_BINDINGS)
SET(OMPI_F77_DOUBLE_UNDERSCORE 0
CACHE INTERNAL "external symbol convention - double underscore")
SET(OMPI_F77_SINGLE_UNDERSCORE 0
CACHE INTERNAL "external symbol convention - single underscore")
SET(OMPI_F77_CAPS 0
CACHE INTERNAL "external symbol convention - captital")
SET(OMPI_F77_PLAIN 0
CACHE INTERNAL "external symbol convention - plain")
# first check if we have already detected dumpbin.exe
IF(NOT DUMPBIN_EXE)
MESSAGE(FATAL_ERROR "could not find dumpbin, cannot continue...")
ENDIF(NOT DUMPBIN_EXE)
# make sure we know our linking convention...
MESSAGE(STATUS "Check ${CMAKE_Fortran_COMPILER} external symbol convention...")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.f
"\t subroutine FOO_bar(a) \n"
"\t integer a \n"
"\t a = 1 \n"
"\t return \n"
"\t end \n")
EXECUTE_PROCESS(COMMAND ${F77} -c conftest.f -o conftest.lib
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
SET(OUTPUT_OBJ_FILE "conftest.lib")
# now run dumpbin to generate an output file
EXECUTE_PROCESS(COMMAND ${DUMPBIN_EXE} ${OUTPUT_OBJ_FILE} /symbols /out:conftest_out
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
# find out the external symbol convention
FILE(STRINGS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_out
DOUBLE_UNDERSCORE REGEX "foo_bar__$")
FILE(STRINGS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_out
SINGLE_UNDERSCORE REGEX "foo_bar_$")
FILE(STRINGS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_out
MIXED_CASE REGEX "FOO_bar$")
FILE(STRINGS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_out
NO_UNDERSCORE REGEX "foo_bar$")
FILE(STRINGS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_out
UPPER_CASE REGEX "FOO_BAR$")
# set up the corresponding values
IF(NOT DOUBLE_UNDERSCORE STREQUAL "")
SET(OMPI_F77_DOUBLE_UNDERSCORE 1
CACHE INTERNAL "external symbol convention - double underscore")
SET(FUNC_NAME "foo_bar__")
SET(ompi_cv_f77_external_symbol "double underscore"
CACHE INTERNAL "F77 external symbol convention")
ELSEIF(NOT SINGLE_UNDERSCORE STREQUAL "")
SET(OMPI_F77_SINGLE_UNDERSCORE 1
CACHE INTERNAL "external symbol convention - single underscore")
SET(FUNC_NAME "foo_bar_")
SET(ompi_cv_f77_external_symbol "single underscore"
CACHE INTERNAL "F77 external symbol convention")
ELSEIF(NOT MIXED_CASE STREQUAL "")
SET(OMPI_F77_CAPS 1
CACHE INTERNAL "external symbol convention - captital")
SET(FUNC_NAME "FOO_bar")
SET(ompi_cv_f77_external_symbol "mixed case"
CACHE INTERNAL "F77 external symbol convention")
ELSEIF(NOT NO_UNDERSCORE STREQUAL "")
SET(OMPI_F77_PLAIN 1
CACHE INTERNAL "external symbol convention - plain")
SET(FUNC_NAME "foo_bar")
SET(ompi_cv_f77_external_symbol "no underscore"
CACHE INTERNAL "F77 external symbol convention")
ELSEIF(NOT UPPER_CASE STREQUAL "")
SET(OMPI_F77_CAPS 1
CACHE INTERNAL "external symbol convention - captital")
SET(FUNC_NAME "FOO_BAR")
SET(ompi_cv_f77_external_symbol "upper case"
CACHE INTERNAL "F77 external symbol convention")
ELSE(NOT UPPER_CASE STREQUAL "")
MESSAGE(FATAL_ERROR "unknow Fortran naming convertion.")
SET(ompi_cv_f77_external_symbol "unknow")
ENDIF(NOT DOUBLE_UNDERSCORE STREQUAL "")
MESSAGE(STATUS "Check ${CMAKE_Fortran_COMPILER} external symbol convention...${ompi_cv_f77_external_symbol}")
# now test if we can link the library with c program
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest_c.c
"int main(){${FUNC_NAME}();return(0);}")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt
"PROJECT(conftest_c C)\n"
"ADD_EXECUTABLE(conftest_c conftest_c.c)\n"
"TARGET_LINK_LIBRARIES(conftest_c ${OUTPUT_OBJ_FILE})\n")
TRY_COMPILE(
TEST_OK
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
conftest_c
OUTPUT_VARIABLE MY_OUTPUT)
#MESSAGE("MY_OUTPUT:${MY_OUTPUT}")
IF(NOT TEST_OK)
MESSAGE(FATAL_ERROR "C and Fortran 77 compilers are not link compatible. Can not continue.")
ENDIF(NOT TEST_OK)
ELSE(OMPI_WANT_F77_BINDINGS)
SET(OMPI_F77_DOUBLE_UNDERSCORE 0
CACHE INTERNAL "external symbol convention - double underscore")
SET(OMPI_F77_SINGLE_UNDERSCORE 0
CACHE INTERNAL "external symbol convention - single underscore")
SET(OMPI_F77_CAPS 0
CACHE INTERNAL "external symbol convention - captital")
SET(OMPI_F77_PLAIN 0
CACHE INTERNAL "external symbol convention - plain")
ENDIF(OMPI_WANT_F77_BINDINGS)
ENDMACRO(OMPI_F77_FIND_EXT_SYMBOL_CONVENTION)
# return the corresponding C function name
# OMPI_F77_MAKE_C_FUNCTION
# in: FUNCTION_NAME -Fortran function name
# out: OUTPUT_VARIABLE -C function name
MACRO(OMPI_F77_MAKE_C_FUNCTION OUTPUT_VARIABLE FUNCTION_NAME)
IF("${ompi_cv_f77_external_symbol}" STREQUAL "double underscore")
# so the general rule is that if there is an _ in the function
# name, then there are two trailing underscores. Otherwise,
# there is only one trailing underscore.
STRING(TOLOWER ${FUNCTION_NAME} ${OUTPUT_VARIABLE})
STRING(REGEX MATCH "_" RESULT ${FUNCTION_NAME})
IF("${RESULT}" STREQUAL "")
SET(${OUTPUT_VARIABLE} "${${OUTPUT_VARIABLE}}_")
ELSE("${RESULT}" STREQUAL "")
SET(${OUTPUT_VARIABLE} "${${OUTPUT_VARIABLE}}__")
ENDIF("${RESULT}" STREQUAL "")
ELSEIF("${ompi_cv_f77_external_symbol}" STREQUAL "single underscore")
STRING(TOLOWER ${FUNCTION_NAME} ${OUTPUT_VARIABLE})
SET(${OUTPUT_VARIABLE} "${OUTPUT_VARIABLE}_")
ELSEIF("${ompi_cv_f77_external_symbol}" STREQUAL "mixed case")
SET(${OUTPUT_VARIABLE} ${FUNCTION_NAME})
ELSEIF("${ompi_cv_f77_external_symbol}" STREQUAL "no underscore")
STRING(TOLOWER ${FUNCTION_NAME} ${OUTPUT_VARIABLE})
ELSEIF("${ompi_cv_f77_external_symbol}" STREQUAL "upper case")
STRING(TOUPPER ${FUNCTION_NAME} ${OUTPUT_VARIABLE})
ELSE("${ompi_cv_f77_external_symbol}" STREQUAL "double underscore")
MESSAGE(FATAL_ERROR "unknown naming convention: ${ompi_cv_f77_external_symbol}")
ENDIF("${ompi_cv_f77_external_symbol}" STREQUAL "double underscore")
ENDMACRO(OMPI_F77_MAKE_C_FUNCTION OUTPUT_VARIABLE FUNCTION_NAME)

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

@ -0,0 +1,99 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_F77_GET_ALIGNMENT
# in: TYPE - fortran type to check
# out: ALIGNMENT - alignment to return
# ----------------------------------------------------
INCLUDE(F77_find_ext_symbol_convention)
MACRO(OMPI_F77_GET_ALIGNMENT TYPE OUTPUT_VARIABLE)
MESSAGE(STATUS "Check alignment of Fortran ${TYPE}...")
OMPI_F77_MAKE_C_FUNCTION(ompi_ac_align_fn align)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.f
"\t program falign\n"
"\t external align\n"
"\t $1 w,x,y,z\n"
"\t CHARACTER a,b,c\n"
"\t common /foo/a,w,b,x,y,c,z\n"
"\t call align(w,x,y,z)\n"
"\t end \n")
IF(EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h")
SET(ompi_conftest_h "#include \"conftest.h\"")
ELSE(EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h")
SET(ompi_conftest_h "")
ENDIF(EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h")
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.c"
"\t #include <stdio.h> \n"
"\t #include <stdlib.h> \n"
"\t $conftest \n"
"\t \n"
"\t #ifdef __cplusplus \n"
"\t extern \"C\" { \n"
"\t #endif \n"
"\t void ${ompi_ac_align_fn}(char *w, char *x, char *y, char *z) \n"
"\t { unsigned long aw, ax, ay, az; \n"
"\t FILE *f=fopen(\"conftestval\", \"w\"); \n"
"\t if (!f) exit(1); \n"
"\t aw = (unsigned long) w; \n"
"\t ax = (unsigned long) x; \n"
"\t ay = (unsigned long) y; \n"
"\t az = (unsigned long) z; \n"
"\t if (! ((aw%16)||(ax%16)||(ay%16)||(az%16))) fprintf(f, \"%d\n\", 16); \n"
"\t else if (! ((aw%12)||(ax%12)||(ay%12)||(az%12))) fprintf(f, \"%d\n\", 12); \n"
"\t else if (! ((aw%8)||(ax%8)||(ay%8)||(az%8))) fprintf(f, \"%d\n\", 8); \n"
"\t else if (! ((aw%4)||(ax%4)||(ay%4)||(az%4))) fprintf(f, \"%d\n\", 4); \n"
"\t else if (! ((aw%2)||(ax%2)||(ay%2)||(az%2))) fprintf(f, \"%d\n\", 2); \n"
"\t else fprintf(f, \"%d\n\", 1); \n"
"\t fclose(f); \n"
"\t } \n"
"\t #ifdef __cplusplus \n"
"\t } \n"
"\t #endif \n"
)
EXECUTE_PROCESS(COMMAND ${CL_EXE} /c conftest.c /I${VC_INCLUDE_PATH}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND ${F77} conftest.f conftest.obj -o conftest
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
#MESSAGE("RESULT:${RESULT}")
IF(RESULT)
MESSAGE(FATAL_ERROR "Could not determine alignment of ${TYPE}.")
ELSE(RESULT)
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
# read out type size value from the file, and write back to the output variable
FILE(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval ${OUTPUT_VARIABLE})
MESSAGE(STATUS "Check alignment of Fortran ${TYPE}...${${OUTPUT_VARIABLE}}")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
MESSAGE(FATAL_ERROR "Could not determine alignment of ${TYPE}.")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
ENDIF(RESULT)
ENDMACRO(OMPI_F77_GET_ALIGNMENT TYPE OUTPUT_VARIABLE)

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

@ -0,0 +1,87 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_F77_GET_SIZEOF(type, variable to set)
# ------------------------------------------
INCLUDE(F77_find_ext_symbol_convention)
MACRO(OMPI_F77_GET_SIZEOF TYPE OUTPUT_VARIABLE)
MESSAGE(STATUS "Check size of Fortran 77 ${TYPE}...")
OMPI_F77_MAKE_C_FUNCTION(ompi_ac_size_fn size)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.f
"\t program fsize \n"
"\t external size \n "
"\t ${TYPE} x(2) \n"
"\t call size(x(1),x(2)) \n"
"\t end \n")
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h)
SET(ompi_conftest_h "#include \"conftest.h\"")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h)
SET(ompi_conftest_h "")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.h)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.c
"#include <stdio.h> \n"
"#include <stdlib.h> \n"
"${ompi_conftest_h} \n"
"#ifdef __cplusplus \n"
"extern \"C\" { \n"
"#endif \n"
""
"void ${ompi_ac_size_fn}(char *a, char *b) \n"
"{ \n"
" int diff = (int) (b - a); \n"
" FILE *f=fopen(\"conftestval\", \"w\"); \n"
" if (!f) exit(1); \n"
" fprintf(f, \"%d\\n\", diff); \n"
" fclose(f); \n"
"} \n"
"#ifdef __cplusplus \n"
"} \n"
"#endif \n")
EXECUTE_PROCESS(COMMAND ${CL_EXE} /c conftest.c /I${VC_INCLUDE_PATH}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND ${F77} conftest.f conftest.obj -o conftest
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
EXECUTE_PROCESS(COMMAND conftest.exe
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
# MESSAGE("RESULT:${RESULT}")
IF(RESULT)
MESSAGE(FATAL_ERROR "Could not determine size of ${TYPE}.")
ELSE(RESULT)
IF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
# read out type size value from the file, and write back to the output variable
FILE(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval ${OUTPUT_VARIABLE})
MESSAGE(STATUS "Check size of Fortran 77 ${TYPE}...${${OUTPUT_VARIABLE}}")
ELSE(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
MESSAGE(FATAL_ERROR "Could not determine size of ${TYPE}.")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftestval)
ENDIF(RESULT)
ENDMACRO(OMPI_F77_GET_SIZEOF TYPE OUTPUT_VARIABLE)

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

@ -0,0 +1,84 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# FLEX_FOUND - system has Flex
# FLEX_EXECUTABLE - path of the flex executable
# FLEX_VERSION - the version string, like "2.5.31"
#
MACRO(FIND_FLEX)
IF(NOT FLEX_FOUND)
MESSAGE(STATUS "Check for working flex...")
IF (WIN32)
SET(FLEX_EXECUTABLE "${CMAKE_SOURCE_DIR}/contrib/platform/win32/bin/flex.exe" CACHE FILEPATH "Flex")
ELSE(WIN32)
FIND_PROGRAM(FLEX_EXECUTABLE NAMES flex)
ENDIF(WIN32)
IF(FLEX_EXECUTABLE)
SET(FLEX_FOUND TRUE CACHE INTERNAL "found flex")
EXECUTE_PROCESS(COMMAND ${FLEX_EXECUTABLE} --version
OUTPUT_VARIABLE _FLEX_VERSION
)
STRING (REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" FLEX_VERSION "${_FLEX_VERSION}")
ENDIF(FLEX_EXECUTABLE)
IF(FLEX_FOUND)
IF(NOT Flex_FIND_QUIETLY)
MESSAGE(STATUS "Check for working flex...done")
ENDIF(NOT Flex_FIND_QUIETLY)
ELSE(FLEX_FOUND)
IF(Flex_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Check for working flex...failed")
ENDIF(Flex_FIND_REQUIRED)
ENDIF(FLEX_FOUND)
ENDIF(NOT FLEX_FOUND)
ENDMACRO(FIND_FLEX)
#
# Generate the corresponding C file from the lex file,
# and add it in to the source list for the target.
#
MACRO(ADD_FLEX_FILE _sourcelist _source _prefix _output_dir)
GET_FILENAME_COMPONENT(_in ${_source} ABSOLUTE)
GET_FILENAME_COMPONENT(_basename ${_source} NAME_WE)
MESSAGE(STATUS "parse ${_basename} with flex...")
STRING(LENGTH "${_prefix}" _prefix_length)
IF(NOT _prefix_length EQUAL 0)
SET(_out ${_output_dir}/${_basename}.c)
SET(_args -P${_prefix})
ELSE(NOT _prefix_length EQUAL 0)
SET(_out ${_output_dir}/${_basename}.c)
ENDIF(NOT _prefix_length EQUAL 0)
FILE(MAKE_DIRECTORY ${_output_dir})
EXECUTE_PROCESS(
COMMAND ${FLEX_EXECUTABLE} -o${_out} ${_args} ${_in}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR
)
IF (NOT ${RESULT} STREQUAL "1")
MESSAGE(STATUS "${ERROR}parse ${_basename} with flex...done")
ELSE (NOT ${RESULT} STREQUAL "1")
MESSAGE(FATAL_ERROR "${ERROR}parse ${_basename} with flex...failed")
ENDIF (NOT ${RESULT} STREQUAL "1")
SET(${_sourcelist} ${${_sourcelist}} ${_out} )
ENDMACRO(ADD_FLEX_FILE)

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

@ -0,0 +1,48 @@
IF(${WANT_SVN})
SET(${PROJECT_NAME}_WANT_SVN 1)
ENDIF(${WANT_SVN})
STRING(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE)
FILE (WRITE "${PROJECT_BINARY_DIR}/include/${PROJECT_NAME_LOWERCASE}/version.h"
"
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file should be included by any file that needs full
* version information for the ${PROJECT_NAME} project
*/
#ifndef ${PROJECT_NAME}_VERSIONS_H
#define ${PROJECT_NAME}_VERSIONS_H
#define ${PROJECT_NAME}_MAJOR_VERSION ${${PROJECT_NAME}_MAJOR_VERSION_STRING}
#define ${PROJECT_NAME}_MINOR_VERSION ${${PROJECT_NAME}_MINOR_VERSION_STRING}
#define ${PROJECT_NAME}_RELEASE_VERSION ${${PROJECT_NAME}_RELEASE_VERSION_STRING}
#define ${PROJECT_NAME}_GREEK_VERSION \"${${PROJECT_NAME}_GREEK_VERSION_STRING}\"
#define ${PROJECT_NAME}_WANT_SVN ${${PROJECT_NAME}_WANT_SVN}
#define ${PROJECT_NAME}_SVN_R \"${SVN_VERSION}\"
#ifdef ${PROJECT_NAME}_VERSION
/* If we included version.h, we want the real version, not the
stripped (no-r number) verstion */
#undef ${PROJECT_NAME}_VERSION
#endif
#define ${PROJECT_NAME}_VERSION \"${${PROJECT_NAME}_VERSION_STRING}\"
#endif
")

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

@ -0,0 +1,41 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
MACRO(C_GET_ALIGNMENT TYPE LANG NAME)
IF(NOT ${NAME}_ALIGNMENT)
#
# Try to compile and run a foo grogram.
# The alignment result will be stored in ${CHECK_TYPE}_ALIGNMENT
#
MESSAGE( STATUS "Check alignment of ${TYPE} in ${LANG}...")
FILE (WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/c_get_${NAME}_alignment.${LANG}"
"#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
int main(){
char diff;
struct foo {char a; ${TYPE} b;};
struct foo *p = (struct foo *) malloc(sizeof(struct foo));
diff = ((char *)&p->b) - ((char *)&p->a);
return diff;}
")
TRY_RUN(${NAME}_ALIGNMENT COMPILE_RESULT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/c_get_${NAME}_alignment.${LANG}")
MESSAGE( STATUS "Check alignment of ${TYPE} in ${LANG}...${${NAME}_ALIGNMENT}")
ENDIF(NOT ${NAME}_ALIGNMENT)
ENDMACRO(C_GET_ALIGNMENT TYPE TYPE_ALIGNMENT LANG )

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

@ -0,0 +1,140 @@
# -*- cmake-script -*-
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
######################################################################
#
# OMPI_MICROSOFT_COMPILER
#
# Keep all the Windows checks in one place.
#
# USAGE:
# OMPI_MICROSOFT_COMPILER()
#
######################################################################
MACRO(OMPI_MICROSOFT_COMPILER)
IF(NOT MICROSOFT_CHECK_DONE)
MESSAGE( STATUS "Start Microsoft specific detection....")
# search for Microsoft VC tools
SET(VC_BIN_PATH ${VC_BIN_PATH}
"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"
)
# If we are using one of the Microsoft compilers check that we are
# able to include windows.h. Most of the types that follow are defined
# in this file. If we check for it here it will get included in the
# default list of header files.
FIND_PROGRAM(CL_EXE cl PATHS ${VC_BIN_PATH})
# set the default include path for VC
GET_FILENAME_COMPONENT(CL_EXE_PATH "${CL_EXE}" PATH)
GET_FILENAME_COMPONENT(VC_INCLUDE_PATH "${CL_EXE_PATH}/../include" ABSOLUTE CACHE)
GET_FILENAME_COMPONENT(VC_LIB_PATH "${CL_EXE_PATH}/../lib" ABSOLUTE CACHE)
# the dumpbin path will be checked again when the f77 support is needed.
FIND_PROGRAM(DUMPBIN_EXE dumpbin PATHS ${VC_BIN_PATH})
# WHEN running dumpbin, it also needs the "Common7/IDE" directory in the
# PATH. It will already be in the PATH if being run from a Visual Studio
# command prompt. Add it to the PATH here in case we are running from a
# different command prompt.
GET_FILENAME_COMPONENT(DUMPBIN_EXE_DIR "${DUMPBIN_EXE}" PATH)
GET_FILENAME_COMPONENT(DUMPBIN_EXE_DLLS_DIR "${DUMPBIN_EXE_DIR}/../../Common7/IDE" ABSOLUTE)
IF(EXISTS "${DUMPBIN_EXE_DLLS_DIR}")
# only add to the path if it is not already in the path
IF(NOT "$ENV{PATH}" MATCHES "${DUMPBIN_EXE_DLLS_DIR}")
SET(ENV{PATH} "$ENV{PATH};${DUMPBIN_EXE_DLLS_DIR}")
ENDIF(NOT "$ENV{PATH}" MATCHES "${DUMPBIN_EXE_DLLS_DIR}")
ENDIF(EXISTS "${DUMPBIN_EXE_DLLS_DIR}")
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)
IF(CL_EXE_OK)
MESSAGE( STATUS "Found Microsoft compiler: ${CL_EXE}.")
CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
CHECK_INCLUDE_FILE(winsock2.h HAVE_WINSOCK2_H)
CHECK_INCLUDE_FILE(wdm.h HAVE_WDM_H)
# 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.
PROJECT(FOO)
# path of foo test programs
SET (FOO_SOURCE_DIR ${OpenMPI_SOURCE_DIR}/CMakeTests)
FOREACH(FUNCTION Exchange ExchangeAcquire ExchangeRelease Exchange64)
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")
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)
ENDFOREACH(${FUNCTION})
INCLUDE(check_c_type_exists)
CHECK_C_TYPE_EXISTS(socklen_t SOCKLEN_T
"#include <winsock2.h>\n"
"#include <ws2tcpip.h>\n")
CHECK_C_TYPE_EXISTS("struct sockaddr_in" STRUCT_SOCKADDR_IN
"#include <winsock2.h>\n"
"#include <ws2tcpip.h>\n")
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.")
ENDIF(NOT MICROSOFT_CHECK_DONE)
ENDMACRO(OMPI_MICROSOFT_COMPILER)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -0,0 +1,50 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_FIND_TYPE(type, [list of c types], abort if not found,
# target size, variable to set)
# -----------------------------------------------------------
MACRO(OMPI_FIND_TYPE TYPE TYPE_LIST ABORT TARGET_SIZE OUTPUT_VARIABLE)
SET(oft_abort_on_fail "${ABORT}")
SET(oft_target_size ${TARGET_SIZE})
MESSAGE(STATUS "Check corresponding C type of ${TYPE}...")
#MESSAGE(STATUS "REALSIZE:${SIZEOF_${oft_type_name}}.TARGET SIZE: ${oft_target_size}")
SET(oft_real_type "")
IF(NOT "${oft_target_size}" STREQUAL "")
FOREACH(oft_type ${TYPE_LIST})
IF("${oft_real_type}" STREQUAL "")
STRING(REGEX REPLACE "^a-zA-Z0-9_" "_" oft_type_name ${oft_type})
STRING(TOUPPER ${oft_type_name} oft_type_name)
IF(SIZEOF_${oft_type_name} EQUAL oft_target_size)
SET(oft_real_type ${oft_type})
ENDIF(SIZEOF_${oft_type_name} EQUAL oft_target_size)
ENDIF("${oft_real_type}" STREQUAL "")
ENDFOREACH(oft_type ${TYPE_LIST})
ENDIF(NOT "${oft_target_size}" STREQUAL "")
IF("${oft_real_type}" STREQUAL "0")
SET(OUTPUT_VARIABLE "")
MESSAGE(STATUS "*** Did not find corresponding C type of ${TYPE}")
IF("${oft_abort_on_fail}" STREQUAL EQUAL "yes")
MESSAGE(FATAL_ERROR "Cannot continue.")
ENDIF("${oft_abort_on_fail}" STREQUAL EQUAL "yes")
ELSE("${oft_real_type}" STREQUAL "0")
SET(${OUTPUT_VARIABLE} "${oft_real_type}")
MESSAGE(STATUS "Check corresponding C type of ${TYPE}... ${oft_real_type}")
ENDIF("${oft_real_type}" STREQUAL "0")
ENDMACRO(OMPI_FIND_TYPE TYPE TYPE_LIST ABORT TARGET_SIZE OUTPUT_VARIABLE)

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

@ -0,0 +1,134 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^major=")
STRING(REPLACE "major=" "" MAJOR_VERSION ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^minor=")
STRING(REPLACE "minor=" "" MINOR_VERSION ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^release=")
STRING(REPLACE "release=" "" RELEASE_VERSION ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^greek=")
STRING(REPLACE "greek=" "" GREEK_VERSION ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^want_svn=")
STRING(REPLACE "want_svn=" "" WANT_SVN ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^svn_r=")
STRING(REPLACE "svn_r=" "" SVN_R ${VALUE})
FILE(STRINGS ${OpenMPI_SOURCE_DIR}/VERSION VALUE REGEX "^date=")
STRING(REPLACE "date=" "" RELEASE_DATE ${VALUE})
IF(${RELEASE_VERSION} EQUAL 0)
SET(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}${GREEK_VERSION})
ELSE(${RELEASE_VERSION} EQUAL 0)
SET(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}.${RELEASE_VERSION}${GREEK_VERSION})
ENDIF(${RELEASE_VERSION} EQUAL 0)
# Get the svn version
IF("${WANT_SVN}" STREQUAL "1")
IF("${SVN_R}" STREQUAL "-1")
# for VS.NET2003 users working with web projects, we should also check "_svn"
IF(EXISTS ${OpenMPI_SOURCE_DIR}/.svn OR EXISTS ${OpenMPI_SOURCE_DIR}/_svn)
EXECUTE_PROCESS (COMMAND svnversion -n
WORKING_DIRECTORY ${OpenMPI_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(NOT RESULT STREQUAL "0")
# subversion might be not installed, let's try TortoiseSVN.
EXECUTE_PROCESS (COMMAND SubWCRev
. contrib/platform/win32/ConfigFiles/revision.in
${OpenMPI_BINARY_DIR}/revision
WORKING_DIRECTORY ${OpenMPI_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT STREQUAL "0")
FILE(STRINGS ${OpenMPI_BINARY_DIR}/revision OUTPUT REGEX "[0-9]*")
ENDIF(RESULT STREQUAL "0")
ENDIF(NOT RESULT STREQUAL "0")
ELSEIF(EXISTS ${OpenMPI_SOURCE_DIR}/.hg)
EXECUTE_PROCESS (COMMAND hg -v -R . tip
WORKING_DIRECTORY ${OpenMPI_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
STRING(REGEX REPLACE "changeset:[^:]*:" "" OUTPUT ${OUTPUT})
STRING(REGEX REPLACE "tag.*" "" OUTPUT ${OUTPUT})
STRING(REPLACE "\n" "" OUTPUT ${OUTPUT})
ENDIF(EXISTS ${OpenMPI_SOURCE_DIR}/.svn OR EXISTS ${OpenMPI_SOURCE_DIR}/_svn)
IF(NOT RESULT STREQUAL "0")
MESSAGE(STATUS "SVN ERROR:${RESULT} ${ERROR}")
ELSE(NOT RESULT STREQUAL "0")
IF(${RESULT} EQUAL 0 AND NOT "${OUTPUT}" STREQUAL "exported" )
SET(SVN_VERSION "r${OUTPUT}")
ENDIF(${RESULT} EQUAL 0 AND NOT "${OUTPUT}" STREQUAL "exported")
ENDIF(NOT RESULT STREQUAL "0")
ELSE("${SVN_R}" STREQUAL "-1")
SET(SVN_VERSION ${SVN_R})
ENDIF("${SVN_R}" STREQUAL "-1")
SET(VERSION_STRING ${VERSION_STRING}${SVN_VERSION})
ENDIF("${WANT_SVN}" STREQUAL "1")
# Set opal versions
SET(OPAL_GREEK_VERSION 1)
SET(OPAL_MAJOR_VERSION 1)
SET(OPAL_MINOR_VERSION 1)
SET(OPAL_RELEASE_VERSION 1)
SET(OPAL_VERSION 1)
SET(OPAL_GREEK_VERSION_STRING ${GREEK_VERSION})
SET(OPAL_MAJOR_VERSION_STRING ${MAJOR_VERSION})
SET(OPAL_MINOR_VERSION_STRING ${MINOR_VERSION})
SET(OPAL_RELEASE_VERSION_STRING ${RELEASE_VERSION})
SET(OPAL_VERSION_STRING ${VERSION_STRING})
SET(OPAL_IDENT_STRING 1)
SET(OPAL_IDENT_STRING_VALUE ${VERSION_STRING})
# Set OMPI versions
SET(OMPI_GREEK_VERSION 1)
SET(OMPI_MAJOR_VERSION 1)
SET(OMPI_MINOR_VERSION 1)
SET(OMPI_RELEASE_VERSION 1)
SET(OMPI_VERSION 1)
SET(OMPI_GREEK_VERSION_STRING ${GREEK_VERSION})
SET(OMPI_MAJOR_VERSION_STRING ${MAJOR_VERSION})
SET(OMPI_MINOR_VERSION_STRING ${MINOR_VERSION})
SET(OMPI_RELEASE_VERSION_STRING ${RELEASE_VERSION})
SET(OMPI_VERSION_STRING ${VERSION_STRING})
# Set ORTE versions
SET(ORTE_GREEK_VERSION 1)
SET(ORTE_MAJOR_VERSION 1)
SET(ORTE_MINOR_VERSION 1)
SET(ORTE_RELEASE_VERSION 1)
SET(ORTE_VERSION 1)
SET(ORTE_GREEK_VERSION_STRING ${GREEK_VERSION})
SET(ORTE_MAJOR_VERSION_STRING ${MAJOR_VERSION})
SET(ORTE_MINOR_VERSION_STRING ${MINOR_VERSION})
SET(ORTE_RELEASE_VERSION_STRING ${RELEASE_VERSION})
SET(ORTE_VERSION_STRING ${VERSION_STRING})

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

@ -0,0 +1,54 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# first try to find a f77 compiler, will be checked when f77 support is enabled.
# There might be a bug in CMake, the CMAKE_GENERATOR_FC is set to "ifort" by default,
# which causes CMake can't find the correct Fortran compiler.
# We have to set CMAKE_GENERATOR_FC empty.
SET(CMAKE_GENERATOR_FC "")
include(CMakeDetermineFortranCompiler)
include(CMakeFortranInformation)
SET(F77 ${CMAKE_Fortran_COMPILER})
INCLUDE(F77_find_ext_symbol_convention)
# make sure we know the linking convention
# this macro will also test linking with C code
OMPI_F77_FIND_EXT_SYMBOL_CONVENTION()
IF(OMPI_WANT_F77_BINDINGS AND NOT F77_SETUP_DONE)
# make sure the compiler actually works, if not cross-compiling
MESSAGE(STATUS "Checking for working Fortran compiler...")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
"\t PROGRAM TESTFortran \n"
"\t PRINT *, 'Hello' \n"
"\t END \n")
# lets use execute_process to run the compile test
EXECUTE_PROCESS(COMMAND ${CMAKE_Fortran_COMPILER} testFortranCompiler.f
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
IF(RESULT)
MESSAGE("Fortran compiler ${F77} can't compile a simple fortran program.")
MESSAGE(FATAL_ERROR "Cannot continue. Please check Fortran compiler installation, or disable Fortran 77 support.")
ELSE(RESULT)
MESSAGE(STATUS "Checking for working Fortran compiler...${F77}")
ENDIF(RESULT)
SET(F77_SETUP_DONE TRUE CACHE INTERNAL "f77 setup done.")
ENDIF(OMPI_WANT_F77_BINDINGS AND NOT F77_SETUP_DONE)

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

@ -0,0 +1,128 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Los Alamos National Security, LLC.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file should be included by any file that needs the
* installation directories hard-coded into the object file. This
* should be avoided if at all possible, but there are some places
* (like the wrapper compilers) where it is infinitely easier to have
* the paths stored.
*
* If you have questions about which directory to use, we try as best
* we can to follow the GNU coding standards on this issue. The
* description of each directory can be found at the following URL:
*
* http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
*
* The line below is to shut AC 2.60 up about datarootdir. Don't remove.
* datarootdir=foo
*/
#ifndef OPAL_INST_DIRS_H
#define OPAL_INST_DIRS_H
#define OPAL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define OPAL_EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}"
/* The directory for installing executable programs that users can
run. */
#define OPAL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin"
/* The directory for installing executable programs that can be run
from the shell, but are only generally useful to system
administrators. */
#define OPAL_SBINDIR "${CMAKE_INSTALL_PREFIX}/sbin"
/* The directory for installing executable programs to be run by other
programs rather than by users.
The definition of libexecdir is the same for all packages, so
you should install your data in a subdirectory thereof. Most
packages install their data under $(libexecdir)/package-name/,
possibly within additional subdirectories thereof, such as
$(libexecdir)/package-name/machine/version. */
#define OPAL_LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/libexec"
/* The root of the directory tree for read-only
architecture-independent data files.
See not about OPAL_DATADIR. And you probably want that one, not
this one. This is one of those "building block" paths, that is
really only used for defining other paths. */
#define OPAL_DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share"
/* The directory for installing idiosyncratic read-only
architecture-independent data files for this program.
The definition of datadir is the same for all packages, so you
should install your data in a subdirectory thereof. Most packages
install their data under $(datadir)/package-name/. */
#define OPAL_DATADIR "${CMAKE_INSTALL_PREFIX}/share"
/* $(datadir)/package-name/. You probably want to use this instead of
OPAL_DATADIR */
#define OPAL_PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/openmpi"
/* The directory for installing read-only data files that pertain to a
single machinethat is to say, files for configuring a host. Mailer
and network configuration files, /etc/passwd, and so forth belong
here. All the files in this directory should be ordinary ASCII text
files.
Do not install executables here in this directory (they probably
belong in $(libexecdir) or $(sbindir)). Also do not install files
that are modified in the normal course of their use (programs whose
purpose is to change the configuration of the system
excluded). Those probably belong in $(localstatedir). */
#define OPAL_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
/* The directory for installing architecture-independent data files
which the programs modify while they run. */
#define OPAL_SHAREDSTATEDIR "${CMAKE_INSTALL_PREFIX}/com"
/* The directory for installing data files which the programs modify
while they run, and that pertain to one specific machine. Users
should never need to modify files in this directory to configure
the package's operation; put such configuration information in
separate files that go in $(datadir) or
$(sysconfdir). */
#define OPAL_LOCALSTATEDIR "${CMAKE_INSTALL_PREFIX}/var"
/* The directory for object files and libraries of object code. Do not
install executables here, they probably ought to go in
$(libexecdir) instead. */
#define OPAL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib"
/* $(libdir)/package-name/. This is where components should go */
#define OPAL_PKGLIBDIR "${CMAKE_INSTALL_PREFIX}/lib/openmpi"
/* The directory for installing header files to be included by user
programs with the C #include preprocessor directive. */
#define OPAL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include"
/* $(includedir)/package-name/. The devel headers go in here */
#define OPAL_PKGINCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include/openmpi"
/* The directory for installing the Info files for this package. */
#define OPAL_INFODIR "${CMAKE_INSTALL_PREFIX}/share/info"
/* The top-level directory for installing the man pages (if any) for
this package. */
#define OPAL_MANDIR "${CMAKE_INSTALL_PREFIX}/share/man"
#endif

1868
contrib/platform/win32/ConfigFiles/mpi.h.cmake Обычный файл

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -0,0 +1,22 @@
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated. This can be useful for multilib builds. See the
# multilib page at:
# https://svn.open-mpi.org/trac/ompi/wiki/compilerwrapper3264
# for more information.
project=Open MPI
project_short=OMPI
version=@OMPI_VERSION_STRING@
language=C++
compiler_env=CXX
compiler_flags_env=CXXFLAGS
compiler=@CXX@
extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags=@OMPI_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=@OMPI_WRAPPER_CXX_LIB@ libmpi.lib libopen-rte.lib libopen-pal.lib @OMPI_WRAPPER_EXTRA_LIBS@
required_file=@OMPI_WRAPPER_CXX_REQUIRED_FILE@
includedir=${includedir}
libdir=${libdir}

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

@ -0,0 +1,22 @@
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated. This can be useful for multilib builds. See the
# multilib page at:
# https://svn.open-mpi.org/trac/ompi/wiki/compilerwrapper3264
# for more information.
project=Open MPI
project_short=OMPI
version=@OMPI_VERSION_STRING@
language=C
compiler_env=CC
compiler_flags_env=CFLAGS
compiler=@CC@
extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags=@OMPI_WRAPPER_EXTRA_CFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=libmpi.lib libopen-rte.lib libopen-pal.lib @OMPI_WRAPPER_EXTRA_LIBS@
required_file=
includedir=${includedir}
libdir=${libdir}

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

@ -0,0 +1,22 @@
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated. This can be useful for multilib builds. See the
# multilib page at:
# https://svn.open-mpi.org/trac/ompi/wiki/compilerwrapper3264
# for more information.
project=Open MPI
project_short=OMPI
version=@OMPI_VERSION_STRING@
language=Fortran 77
compiler_env=F77
compiler_flags_env=FFLAGS
compiler=@F77@
extra_includes=
preprocessor_flags=
compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=libmpi.lib libopen-rte.lib libopen-pal.lib @OMPI_WRAPPER_EXTRA_LIBS@
required_file=@OMPI_WRAPPER_F77_REQUIRED_FILE@
includedir=${includedir}
libdir=${libdir}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -0,0 +1 @@
$WCREV$

Двоичные данные
contrib/platform/win32/bin/flex.exe Обычный файл

Двоичный файл не отображается.

4551
contrib/platform/win32/opal/libltdl/ltdl.c Обычный файл

Разница между файлами не показана из-за своего большого размера Загрузить разницу

367
contrib/platform/win32/opal/libltdl/ltdl.h Обычный файл
Просмотреть файл

@ -0,0 +1,367 @@
/* ltdl.h -- generic dlopen functions
Copyright (C) 1998-2001, 2003, 2004, 2007 Free Software Foundation, Inc.
Originally by Thomas Tanner <tanner@ffii.org>
This file is part of GNU Libtool.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
As a special exception to the GNU Lesser General Public License,
if you distribute this file as part of a program or library that
is built using GNU libtool, you may include it under the same
distribution terms that you use for the rest of that program.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/* Only include this header file once. */
#ifndef LTDL_H
#define LTDL_H 1
#include <sys/types.h> /* for size_t declaration */
/* --- MACROS FOR PORTABILITY --- */
/* Saves on those hard to debug '\0' typos.... */
#define LT_EOS_CHAR '\0'
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
the end of C declarations. */
#ifdef __cplusplus
# define LT_BEGIN_C_DECLS extern "C" {
# define LT_END_C_DECLS }
#else
# define LT_BEGIN_C_DECLS /* empty */
# define LT_END_C_DECLS /* empty */
#endif
LT_BEGIN_C_DECLS
/* LT_PARAMS is a macro used to wrap function prototypes, so that compilers
that don't understand ANSI C prototypes still work, and ANSI C
compilers can issue warnings about type mismatches. */
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
# define LT_PARAMS(protos) protos
# define lt_ptr void*
#else
# define LT_PARAMS(protos) ()
# define lt_ptr char*
#endif
/* LT_STMT_START/END are used to create macros which expand to a
a single compound statement in a portable way. */
#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
# define LT_STMT_START (void)(
# define LT_STMT_END )
#else
# if (defined (sun) || defined (__sun__))
# define LT_STMT_START if (1)
# define LT_STMT_END else (void)0
# else
# define LT_STMT_START do
# define LT_STMT_END while (0)
# endif
#endif
/* LT_CONC creates a new concatenated symbol for the compiler
in a portable way. */
#if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER) || defined(_AIX)
# define LT_CONC(s,t) s##t
#else
# define LT_CONC(s,t) s/**/t
#endif
/* LT_STRLEN can be used safely on NULL pointers. */
#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
/* --- WINDOWS SUPPORT --- */
/* Canonicalise Windows and Cygwin recognition macros. */
#ifdef __CYGWIN32__
# ifndef __CYGWIN__
# define __CYGWIN__ __CYGWIN32__
# endif
#endif
#if defined(_WIN32) || defined(WIN32)
# ifndef __WINDOWS__
# ifdef _WIN32
# define __WINDOWS__ _WIN32
# else
# ifdef WIN32
# define __WINDOWS__ WIN32
# endif
# endif
# endif
#endif
#ifdef __WINDOWS__
# ifndef __CYGWIN__
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
separator when it is set. */
# define LT_DIRSEP_CHAR '\\'
# define LT_PATHSEP_CHAR ';'
# endif
#endif
#ifndef LT_PATHSEP_CHAR
# define LT_PATHSEP_CHAR ':'
#endif
/* DLL building support on win32 hosts; mostly to workaround their
ridiculous implementation of data symbol exporting. */
#ifndef LT_SCOPE
# if defined(__WINDOWS__) || defined(__CYGWIN__)
# ifdef DLL_EXPORT /* defined by libtool (if required) */
# define LT_SCOPE __declspec(dllexport)
# endif
# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
/* note: cygwin/mingw compilers can rely instead on auto-import */
# define LT_SCOPE extern __declspec(dllimport)
# endif
# endif
# ifndef LT_SCOPE /* static linking or !__WINDOWS__ */
# define LT_SCOPE extern
# endif
#endif
#if defined(_MSC_VER) /* Visual Studio */
# define R_OK 4
#endif
/* --- DYNAMIC MODULE LOADING API --- */
typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */
/* Initialisation and finalisation functions for libltdl. */
LT_SCOPE int lt_dlinit LT_PARAMS((void));
LT_SCOPE int lt_dlexit LT_PARAMS((void));
/* Module search path manipulation. */
LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir));
LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before,
const char *search_dir));
LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path));
LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void));
LT_SCOPE int lt_dlforeachfile LT_PARAMS((
const char *search_path,
int (*func) (const char *filename, lt_ptr data),
lt_ptr data));
/* Portable libltdl versions of the system dlopen() API. */
LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename));
LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename));
LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle,
const char *name));
LT_SCOPE const char *lt_dlerror LT_PARAMS((void));
LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle));
/* Module residency management. */
LT_SCOPE int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle));
LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle));
/* --- MUTEX LOCKING --- */
typedef void lt_dlmutex_lock LT_PARAMS((void));
typedef void lt_dlmutex_unlock LT_PARAMS((void));
typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg));
typedef const char *lt_dlmutex_geterror LT_PARAMS((void));
LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock,
lt_dlmutex_unlock *unlock,
lt_dlmutex_seterror *seterror,
lt_dlmutex_geterror *geterror));
/* --- MEMORY HANDLING --- */
/* By default, the realloc function pointer is set to our internal
realloc implementation which iself uses lt_dlmalloc and lt_dlfree.
libltdl relies on a featureful realloc, but if you are sure yours
has the right semantics then you can assign it directly. Generally,
it is safe to assign just a malloc() and a free() function. */
LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size));
LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size));
LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr));
/* --- PRELOADED MODULE SUPPORT --- */
/* A preopened symbol. Arrays of this type comprise the exported
symbols for a dlpreopened module. */
typedef struct {
const char *name;
lt_ptr address;
} lt_dlsymlist;
LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
LT_SCOPE int lt_dlpreload_default
LT_PARAMS((const lt_dlsymlist *preloaded));
#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
extern const lt_dlsymlist lt_preloaded_symbols[]; \
lt_dlpreload_default(lt_preloaded_symbols); \
}LT_STMT_END
/* --- MODULE INFORMATION --- */
/* Read only information pertaining to a loaded module. */
typedef struct {
char *filename; /* file name */
char *name; /* module name */
int ref_count; /* number of times lt_dlopened minus
number of times lt_dlclosed. */
} lt_dlinfo;
LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place));
LT_SCOPE int lt_dlforeach LT_PARAMS((
int (*func) (lt_dlhandle handle, lt_ptr data),
lt_ptr data));
/* Associating user data with loaded modules. */
typedef unsigned lt_dlcaller_id;
LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void));
LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key,
lt_dlhandle handle,
lt_ptr data));
LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key,
lt_dlhandle handle));
/* --- USER MODULE LOADER API --- */
typedef struct lt_dlloader lt_dlloader;
typedef lt_ptr lt_user_data;
typedef lt_ptr lt_module;
/* Function pointer types for creating user defined module loaders. */
typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data,
const char *filename));
typedef int lt_module_close LT_PARAMS((lt_user_data loader_data,
lt_module handle));
typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data,
lt_module handle,
const char *symbol));
typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data));
struct lt_user_dlloader {
const char *sym_prefix;
lt_module_open *module_open;
lt_module_close *module_close;
lt_find_sym *find_sym;
lt_dlloader_exit *dlloader_exit;
lt_user_data dlloader_data;
};
LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS((
const char *loader_name));
LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place));
LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place));
LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
const struct lt_user_dlloader *dlloader,
const char *loader_name));
LT_SCOPE int lt_dlloader_remove LT_PARAMS((
const char *loader_name));
/* --- ERROR MESSAGE HANDLING --- */
/* Defining error strings alongside their symbolic names in a macro in
this way allows us to expand the macro in different contexts with
confidence that the enumeration of symbolic names will map correctly
onto the table of error strings. */
#define lt_dlerror_table \
LT_ERROR(UNKNOWN, "unknown error") \
LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \
LT_ERROR(INVALID_LOADER, "invalid loader") \
LT_ERROR(INIT_LOADER, "loader initialization failed") \
LT_ERROR(REMOVE_LOADER, "loader removal failed") \
LT_ERROR(FILE_NOT_FOUND, "file not found") \
LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \
LT_ERROR(NO_SYMBOLS, "no symbols defined") \
LT_ERROR(CANNOT_OPEN, "can't open the module") \
LT_ERROR(CANNOT_CLOSE, "can't close the module") \
LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \
LT_ERROR(NO_MEMORY, "not enough memory") \
LT_ERROR(INVALID_HANDLE, "invalid module handle") \
LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \
LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \
LT_ERROR(SHUTDOWN, "library already shutdown") \
LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \
LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \
LT_ERROR(INVALID_POSITION, "invalid search path insert position")
/* Enumerate the symbolic error names. */
enum {
#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name),
lt_dlerror_table
#undef LT_ERROR
LT_ERROR_MAX
};
/* These functions are only useful from inside custom module loaders. */
LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic));
LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode));
/* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */
#ifdef LT_NON_POSIX_NAMESPACE
# define lt_ptr_t lt_ptr
# define lt_module_t lt_module
# define lt_module_open_t lt_module_open
# define lt_module_close_t lt_module_close
# define lt_find_sym_t lt_find_sym
# define lt_dlloader_exit_t lt_dlloader_exit
# define lt_dlloader_t lt_dlloader
# define lt_dlloader_data_t lt_user_data
#endif
LT_END_C_DECLS
#endif /* !LTDL_H */

180
ompi/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,180 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2008 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# The source code is compiled as C++ for dynamic build
# and compiled as C for static build
PROJECT (OMPI)
# These two files need to be compiled twice, one time with preprocessor CHECKSUM.
# Make one copy of them with another file name and add them into the project.
CONFIGURE_FILE(datatype/datatype_pack.c ${PROJECT_BINARY_DIR}/datatype/datatype_pack_checksum.c [COPYONLY])
CONFIGURE_FILE(datatype/datatype_unpack.c ${PROJECT_BINARY_DIR}/datatype/datatype_unpack_checksum.c [COPYONLY])
SET(DATATYPE_CHECKSUM_FILES ${PROJECT_BINARY_DIR}/datatype/datatype_pack_checksum.c
${PROJECT_BINARY_DIR}/datatype/datatype_unpack_checksum.c )
SET_SOURCE_FILES_PROPERTIES(${DATATYPE_CHECKSUM_FILES}
PROPERTIES COMPILE_DEFINITIONS CHECKSUM)
SET(OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${DATATYPE_CHECKSUM_FILES})
SOURCE_GROUP(datatype FILES ${DATATYPE_CHECKSUM_FILES})
# Recuresive search sub directories excluding mca, mpi and tools.
# Add sources in different source groups.
EXECUTE_PROCESS (COMMAND cmd /C dir /AD /B
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
STRING (REGEX MATCHALL "[a-zA-Z1-9_]+" OMPI_SUBDIRS ${OUTPUT})
FOREACH(OMPI_SUBDIR ${OMPI_SUBDIRS})
IF(NOT ${OMPI_SUBDIR} STREQUAL "mca" AND NOT ${OMPI_SUBDIR} STREQUAL "mpi" AND NOT ${OMPI_SUBDIR} STREQUAL "contrib"
AND NOT ${OMPI_SUBDIR} STREQUAL "debuggers" AND NOT ${OMPI_SUBDIR} STREQUAL "tools")
FILE(GLOB_RECURSE OMPI_${OMPI_SUBDIR}_FILES
"${OMPI_SUBDIR}/*.h" "${OMPI_SUBDIR}/*.c" "${OMPI_SUBDIR}/*.cc" "${OMPI_SUBDIR}/*.cpp")
SET (OMPI_SOURCE_FILES
${OMPI_SOURCE_FILES}
${OMPI_${OMPI_SUBDIR}_FILES}
)
SOURCE_GROUP("${OMPI_SUBDIR}" FILES ${OMPI_${OMPI_SUBDIR}_FILES})
ENDIF(NOT ${OMPI_SUBDIR} STREQUAL "mca" AND NOT ${OMPI_SUBDIR} STREQUAL "mpi" AND NOT ${OMPI_SUBDIR} STREQUAL "contrib"
AND NOT ${OMPI_SUBDIR} STREQUAL "debuggers" AND NOT ${OMPI_SUBDIR} STREQUAL "tools")
ENDFOREACH(OMPI_SUBDIR ${OMPI_SUBDIRS})
# Special care should be taken for the debugger directory
SET(OMPI_DEBUGGER_FILES "debuggers/ompi_debuggers.c" "debuggers/debuggers.h")
SOURCE_GROUP("debuggers" FILES ${OMPI_DEBUGGER_FILES})
SET(OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_DEBUGGER_FILES})
SET_SOURCE_FILES_PROPERTIES("debuggers/ompi_debuggers.c"
PROPERTIES COMPILE_DEFINITIONS "OMPI_MSGQ_DLL=\"\$(pkglibdir)/libompi_dbg_msgq.dll\";OMPI_MSGQ_DLL_PREFIX=\"libompi_dbg_msgq\";OMPI_MPIHANDLES_DLL_PREFIX=\"libompi_dbg_mpihandles\"")
# Add MPI C files
FILE(GLOB_RECURSE OMPI_MPI_C_FILES "mpi/c/*.h" "mpi/c/*.c")
# Remove all MPI_File related files if the option is not selected
IF (NOT OMPI_PROVIDE_MPI_FILE_INTERFACE)
MESSAGE( STATUS "Skipping the MPI I/O interface")
SET( TMP_SRC "" )
FOREACH ( FILENAME ${OMPI_MPI_C_FILES})
GET_FILENAME_COMPONENT(relname ${FILENAME} NAME)
IF (NOT ${relname} MATCHES "file.*[ch]$")
IF (NOT ${relname} STREQUAL "register_datarep.c")
LIST(APPEND TMP_SRC ${FILENAME})
ENDIF (NOT ${relname} STREQUAL "register_datarep.c")
ENDIF(NOT ${relname} MATCHES "file.*[ch]$")
ENDFOREACH(FILENAME)
SET( OMPI_MPI_C_FILES ${TMP_SRC})
ENDIF(NOT OMPI_PROVIDE_MPI_FILE_INTERFACE)
SET (OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_MPI_C_FILES})
SOURCE_GROUP(mpi "")
SOURCE_GROUP(mpi\\c FILES ${OMPI_MPI_C_FILES})
IF(OMPI_ENABLE_MPI_PROFILING)
# As weak symbols are not supported by MS compiler,
# we have to compile the C source files again for profiler,
# i.e. add the pre-processor "OMPI_PROFILING_DEFINES" explicitly.
# first get the file names.
FILE(GLOB_RECURSE OMPI_PROFILE_NAMES RELATIVE ${PROJECT_SOURCE_DIR}/mpi/c "mpi/c/*.c" )
# then copy them to the build directory with a prefix.
FOREACH(FILE_NAME ${OMPI_MPI_C_FILES})
GET_FILENAME_COMPONENT(relname ${FILE_NAME} NAME)
IF(NOT ${relname} STREQUAL "attr_fn.c")
CONFIGURE_FILE(${FILE_NAME}
${PROJECT_BINARY_DIR}/mpi/c/profile/p${relname} [COPYONLY])
ENDIF(NOT ${relname} STREQUAL "attr_fn.c")
ENDFOREACH(FILE_NAME ${OMPI_MPI_C_FILES})
FILE(GLOB_RECURSE OMPI_C_PROFILE_FILES "${PROJECT_BINARY_DIR}/mpi/c/profile/*.c" )
SET_SOURCE_FILES_PROPERTIES(${OMPI_C_PROFILE_FILES}
PROPERTIES COMPILE_DEFINITIONS OMPI_PROFILING_DEFINES)
SET(OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_C_PROFILE_FILES})
SOURCE_GROUP(mpi\\c\\profile FILES ${OMPI_C_PROFILE_FILES})
ELSE(OMPI_ENABLE_MPI_PROFILING)
MESSAGE( STATUS "Skipping the MPI profiling interface")
ENDIF(OMPI_ENABLE_MPI_PROFILING)
IF(OMPI_WANT_F77_BINDINGS)
# A handful of files in mpi/f77/base must be included in libmpi, in order to build the
# Fortran 77 glue into libmpi
FILE(GLOB OMPI_F77_BASE_FILES "mpi/f77/base/*.c")
SET_SOURCE_FILES_PROPERTIES(${OMPI_F77_BASE_FILES}
PROPERTIES COMPILE_FLAGS "-DOMPI_COMPILING_F77_WRAPPERS=1 -DOMPI_PROFILE_LAYER=0")
SET(OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_F77_BASE_FILES})
SOURCE_GROUP(mpi\\f77\\base FILES ${OMPI_F77_BASE_FILES})
ENDIF(OMPI_WANT_F77_BINDINGS)
INCLUDE (check_mca_subdirs)
SET (OMPI_SOURCE_FILES ${OMPI_SOURCE_FILES} ${OMPI_MCA_FILES})
ADD_LIBRARY (libmpi ${OMPI_SOURCE_FILES})
SET_TARGET_PROPERTIES(libmpi PROPERTIES COMPILE_FLAGS
"-DOMPI_MPIHANDLES_DLL_PREFIX=libompi_dbg_mpihandles
-DOMPI_MSGQ_DLL_PREFIX=libompi_dbg_msgq
-DOMPI_BUILDING
-DOMPI_BUILDING_CXX_BINDINGS_LIBRARY")
# Set compile flags for this target
IF (BUILD_SHARED_LIBS)
SET_SOURCE_FILES_PROPERTIES(${OMPI_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ADD_DEPENDENCIES (libmpi libopen-pal libopen-rte)
SET_TARGET_PROPERTIES(libmpi PROPERTIES COMPILE_FLAGS "-D_USRDLL -DHAVE_CONFIG_H
-DOMPI_EXPORTS")
TARGET_LINK_LIBRARIES (libmpi Ws2_32.lib shlwapi.lib)
ELSE (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(libmpi PROPERTIES COMPILE_FLAGS "-D_LIB")
ENDIF(BUILD_SHARED_LIBS)
# generate ompi_config.h
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/ompi/include/ompi_config.h.in ${OpenMPI_BINARY_DIR}/ompi/include/ompi_config.h)
INCLUDE(generate_version_file)
ADD_SUBDIRECTORY(mpi)
ADD_SUBDIRECTORY(tools)
# Install libraries headers, and shared files
INSTALL(TARGETS libmpi
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
INSTALL(FILES ${PROJECT_BINARY_DIR}/include/mpi.h DESTINATION include)
IF(OMPI_WANT_F77_BINDINGS)
INSTALL(FILES ${PROJECT_BINARY_DIR}/include/mpif.h
${PROJECT_BINARY_DIR}/include/mpif-config.h
${PROJECT_SOURCE_DIR}/include/mpif-common.h
${PROJECT_SOURCE_DIR}/include/mpif-mpi-io.h
DESTINATION include)
ENDIF(OMPI_WANT_F77_BINDINGS)
INSTALL(FILES ${PROJECT_SOURCE_DIR}/runtime/help-mpi-runtime.txt ${PROJECT_SOURCE_DIR}/mpi/help-mpi-api.txt
DESTINATION share/openmpi)
INSTALL(DIRECTORY mpi/cxx/ DESTINATION include/openmpi/ompi/mpi/cxx
FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE)

14
ompi/mca/allocator/basic/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi

0
ompi/mca/allocator/bucket/.windows Обычный файл
Просмотреть файл

14
ompi/mca/bml/r2/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte

14
ompi/mca/btl/self/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi

14
ompi/mca/btl/sm/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte mca_common_sm

15
ompi/mca/btl/tcp/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,15 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte
mca_link_libraries=Ws2_32.lib

14
ompi/mca/coll/basic/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi

14
ompi/mca/coll/hierarch/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi

14
ompi/mca/coll/self/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi

14
ompi/mca/coll/sm/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte mca_common_sm

12
ompi/mca/common/sm/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,12 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module

14
ompi/mca/dpm/orte/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte

14
ompi/mca/mpool/rdma/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte

14
ompi/mca/mpool/sm/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte mca_common_sm

14
ompi/mca/osc/pt2pt/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi

13
ompi/mca/osc/rdma/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi

13
ompi/mca/pml/cm/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi

13
ompi/mca/pml/dr/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte

13
ompi/mca/pml/ob1/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte

13
ompi/mca/pubsub/orte/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libmpi libopen-rte

0
ompi/mca/topo/unity/.windows Обычный файл
Просмотреть файл

20
ompi/mpi/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,20 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
IF(OMPI_WANT_CXX_BINDINGS)
ADD_SUBDIRECTORY(cxx)
ELSE(OMPI_WANT_CXX_BINDINGS)
MESSAGE(STATUS "Skipping MPI C++ interface")
ENDIF(OMPI_WANT_CXX_BINDINGS)
IF(OMPI_WANT_F77_BINDINGS)
ADD_SUBDIRECTORY(f77)
ELSE(OMPI_WANT_F77_BINDINGS)
MESSAGE(STATUS "Skipping MPI F77 interface")
ENDIF(OMPI_WANT_F77_BINDINGS)

51
ompi/mpi/cxx/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,51 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(MPI_CXX)
FILE(GLOB CXX_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
# skip the file interface sources if not wanted
IF(NOT OMPI_PROVIDE_MPI_FILE_INTERFACE)
SET( TMP_SRC "" )
FOREACH ( FILENAME ${CXX_SOURCE_FILES})
GET_FILENAME_COMPONENT(relname ${FILENAME} NAME)
IF (NOT ${relname} MATCHES "file.*[ch]$")
LIST(APPEND TMP_SRC ${FILENAME})
ENDIF (NOT ${relname} MATCHES "file.*[ch]$")
ENDFOREACH(FILENAME)
SET( CXX_SOURCE_FILES ${TMP_SRC})
ENDIF(NOT OMPI_PROVIDE_MPI_FILE_INTERFACE)
ADD_LIBRARY (libmpi_cxx ${CXX_SOURCE_FILES})
SET_TARGET_PROPERTIES (libmpi_cxx PROPERTIES LINKER_LANGUAGE CXX)
# Set compile flags for this target
IF (BUILD_SHARED_LIBS)
ADD_DEPENDENCIES(libmpi_cxx libmpi libopen-pal)
# Need OMPI_BUILDING_CXX_BINDINGS_LIBRARY so that we can get the path
# names correct inside the MPI C++ library. OMPI_SKIP_MPICXX is necessary
# so that mpi.h doesn't include mpicxx.h through the incorrect pathname
# in any of the C++ bindings .c files. Just use the define for this purpose
# from user code.
ADD_DEFINITIONS (-D_USRDLL -DOMPI_BUILDING
-DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1 -DOMPI_SKIP_MPICXX=1
-DOMPI_IMPORTS -DOPAL_IMPORTS)
ELSE (BUILD_SHARED_LIBS)
ADD_DEFINITIONS (-D_LIB -DOMPI_BUILDING
-DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1 -DOMPI_SKIP_MPICXX=1)
ENDIF(BUILD_SHARED_LIBS)
INSTALL(TARGETS libmpi_cxx
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

65
ompi/mpi/f77/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,65 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(MPI_F77)
FILE(GLOB OMPI_F77_FILES "*.c")
FILE(GLOB OMPI_F77_HEADER_FILES "*.h")
# Remove all MPI_File related files if the option is not selected
IF (NOT OMPI_PROVIDE_MPI_FILE_INTERFACE)
MESSAGE( STATUS "Skipping the MPI I/O interface")
SET( TMP_SRC "" )
FOREACH ( FILENAME ${OMPI_F77_FILES})
GET_FILENAME_COMPONENT(relname ${FILENAME} NAME)
IF (NOT ${relname} MATCHES "file.*[ch]$")
IF (NOT ${relname} STREQUAL "register_datarep.c")
LIST(APPEND TMP_SRC ${FILENAME})
ENDIF (NOT ${relname} STREQUAL "register_datarep.c")
ENDIF(NOT ${relname} MATCHES "file.*[ch]$")
ENDFOREACH(FILENAME ${OMPI_F77_FILES})
SET( OMPI_F77_FILES ${TMP_SRC})
ENDIF(NOT OMPI_PROVIDE_MPI_FILE_INTERFACE)
SET_SOURCE_FILES_PROPERTIES(${OMPI_F77_FILES} PROPERTIES
COMPILE_FLAGS "-DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_F77_WRAPPERS=1")
IF(OMPI_ENABLE_MPI_PROFILING)
# As weak symbols are not supported by MS compiler,
# we have to compile the C source files again for profiler,
# i.e. add the pre-processor "OMPI_PROFILING_DEFINES" explicitly.
# copy the files to the build directory with a prefix.
FOREACH(FILE_NAME ${OMPI_F77_FILES})
GET_FILENAME_COMPONENT(relname ${FILE_NAME} NAME)
CONFIGURE_FILE(${FILE_NAME}
${PROJECT_BINARY_DIR}/profile/p${relname} [COPYONLY])
ENDFOREACH(FILE_NAME ${OMPI_F77_FILES})
FILE(GLOB OMPI_F77_PROFILE_FILES "${PROJECT_BINARY_DIR}/profile/*.c" )
SET_SOURCE_FILES_PROPERTIES(${OMPI_F77_PROFILE_FILES} PROPERTIES
COMPILE_FLAGS "-DOMPI_PROFILE_LAYER=1 -DOMPI_COMPILING_F77_WRAPPERS=1")
SET(OMPI_F77_FILES ${OMPI_F77_FILES} ${OMPI_F77_PROFILE_FILES})
SOURCE_GROUP(profile FILES ${OMPI_F77_PROFILE_FILES})
ELSE(OMPI_ENABLE_MPI_PROFILING)
MESSAGE( STATUS "Skipping the MPI profiling interface")
ENDIF(OMPI_ENABLE_MPI_PROFILING)
ADD_LIBRARY(libmpi_f77 STATIC ${OMPI_F77_FILES} ${OMPI_F77_HEADER_FILES})
SET_TARGET_PROPERTIES(libmpi_f77 PROPERTIES LINKER_LANGUAGE CXX)
ADD_DEPENDENCIES(libmpi_f77 libmpi)
INSTALL(TARGETS libmpi_f77
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

72
ompi/tools/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,72 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2008 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
ADD_SUBDIRECTORY(ompi_info)
ADD_SUBDIRECTORY(ompi-server)
SET(OMPI_WRAPPER_EXTRA_LIBS "advapi32.lib Ws2_32.lib shlwapi.lib")
GET_FILENAME_COMPONENT(CC "${CL_EXE}" NAME)
SET(OMPI_WRAPPER_EXTRA_CFLAGS "/MDd /TC")
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpicc-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpicc-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpicc-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpicc-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpicc.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpicc.exe-wrapper-data.txt
DESTINATION share/openmpi)
IF(OMPI_WANT_CXX_BINDINGS)
GET_FILENAME_COMPONENT(CXX "${CL_EXE}" NAME)
SET(OMPI_WRAPPER_EXTRA_CXXFLAGS "/MDd /TP /EHsc")
SET(OMPI_WRAPPER_CXX_LIB "libmpi_cxx.lib")
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpic++-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpic++-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpic++-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpic++-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpicxx-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpicxx-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpic++-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpic++.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpic++.exe-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpic++-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpicxx.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpicxx.exe-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(OMPI_WANT_CXX_BINDINGS)
IF(OMPI_WANT_F77_BINDINGS)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpif77-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpif77-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif77-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpif77-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpif77.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif77.exe-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(OMPI_WANT_F77_BINDINGS)
IF(OMPI_WANT_F90_BINDINGS)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpif90-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpif90-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif90-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpif90-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpif90.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif90.exe-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(OMPI_WANT_F90_BINDINGS)

31
ompi/tools/ompi-server/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,31 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2008 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(OMPI_SERVER)
FILE(GLOB_RECURSE OMPI_SERVER_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
ADD_EXECUTABLE (ompi-server ${OMPI_SERVER_SOURCE_FILES})
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(ompi-server PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS")
SET_SOURCE_FILES_PROPERTIES(${OMPI_SERVER_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ENDIF(BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES (ompi-server Ws2_32.lib shlwapi.lib)
INSTALL(TARGETS ompi-server
DESTINATION bin)
INSTALL(FILES help-ompi-server.txt DESTINATION share/openmpi)
ADD_DEPENDENCIES (ompi-server libmpi libopen-pal libopen-rte )

30
ompi/tools/ompi_info/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,30 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(OMPI_INFO)
FILE(GLOB_RECURSE OMPI_INFO_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
ADD_EXECUTABLE (ompi_info ${OMPI_INFO_SOURCE_FILES})
ADD_DEFINITIONS(\"-DOMPI_CONFIGURE_DATE=\\\"${OMPI_CONFIGURE_DATE}\\\"\"
\"-DOMPI_BUILD_DATE=\\\"${OMPI_BUILD_DATE}\\\"\")
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(ompi_info PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS")
SET_SOURCE_FILES_PROPERTIES(${OMPI_INFO_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ENDIF(BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES (ompi_info Ws2_32.lib shlwapi.lib)
INSTALL(TARGETS ompi_info
DESTINATION bin)
INSTALL(FILES help-ompi_info.txt DESTINATION share/openmpi)
ADD_DEPENDENCIES (ompi_info libmpi libopen-rte libopen-pal)

143
opal/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,143 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# The source code is compiled as C++ for dynamic build
# and compiled as C for static build
PROJECT (OPAL)
# Add include sub directory to gernerate opal_config.h
ADD_SUBDIRECTORY (include)
# Add source files
# Windows event files
INCLUDE (event/CMakeLists.txt)
FOREACH (FILE ${EVENT_FILES})
SET (OPAL_EVENT_FILES ${OPAL_EVENT_FILES} ${PROJECT_SOURCE_DIR}/event/${FILE})
ENDFOREACH (FILE)
SOURCE_GROUP(event FILES ${OPAL_EVENT_FILES})
# Include headers.
FILE(GLOB OPAL_INCLUDE_FILES "include/*.h" "include/opal/*.h" "include/opal/sys/win32/*.h")
SOURCE_GROUP(include FILES ${OPAL_INCLUDE_FILES})
SET (OPAL_SOURCE_FILES
${OPAL_SOURCE_FILES}
${OPAL_EVENT_FILES}
${OPAL_INCLUDE_FILES}
)
# Recuresive search sub directories excluding mca, event, include and tools.
# Add sources in different source groups.
EXECUTE_PROCESS (COMMAND cmd /C dir /AD /B
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
STRING (REGEX MATCHALL "[a-zA-Z1-9_]+" OPAL_SUBDIRS ${OUTPUT})
FOREACH(OPAL_SUBDIR ${OPAL_SUBDIRS})
IF(NOT ${OPAL_SUBDIR} STREQUAL "mca" AND NOT ${OPAL_SUBDIR} STREQUAL "event"
AND NOT ${OPAL_SUBDIR} STREQUAL "include" AND NOT ${OPAL_SUBDIR} STREQUAL "tools")
IF(NOT ${OPAL_SUBDIR} STREQUAL "win32")
FILE(GLOB_RECURSE OPAL_${OPAL_SUBDIR}_FILES
"${OPAL_SUBDIR}/*.h" "${OPAL_SUBDIR}/*.c" "${OPAL_SUBDIR}/*.cc" "${OPAL_SUBDIR}/*.cpp")
ELSE(NOT ${OPAL_SUBDIR} STREQUAL "win32")
FILE(GLOB OPAL_${OPAL_SUBDIR}_FILES
"${OPAL_SUBDIR}/*.h" "${OPAL_SUBDIR}/*.c" "${OPAL_SUBDIR}/*.cc" "${OPAL_SUBDIR}/*.cpp")
ENDIF(NOT ${OPAL_SUBDIR} STREQUAL "win32")
SET (OPAL_SOURCE_FILES
${OPAL_SOURCE_FILES}
${OPAL_${OPAL_SUBDIR}_FILES}
)
SOURCE_GROUP("${OPAL_SUBDIR}" FILES ${OPAL_${OPAL_SUBDIR}_FILES})
ENDIF(NOT ${OPAL_SUBDIR} STREQUAL "mca" AND NOT ${OPAL_SUBDIR} STREQUAL "event"
AND NOT ${OPAL_SUBDIR} STREQUAL "include" AND NOT ${OPAL_SUBDIR} STREQUAL "tools")
ENDFOREACH(OPAL_SUBDIR ${OPAL_SUBDIRS})
# Generate flex files.
INCLUDE (find_flex)
FIND_FLEX()
ADD_FLEX_FILE(OPAL_SOURCE_FILES ./util/keyval/keyval_lex.l opal_util_keyval_yy "${PROJECT_BINARY_DIR}/util/keyval/")
ADD_FLEX_FILE(OPAL_SOURCE_FILES ./util/show_help_lex.l opal_show_help_yy "${PROJECT_BINARY_DIR}/util/")
# Add Libtool support
IF(BUILD_SHARED_LIBS)
SET (LIBLTDL_FILES
${CMAKE_SOURCE_DIR}/contrib/platform/win32/opal/libltdl/ltdl.c
${CMAKE_SOURCE_DIR}/contrib/platform/win32/opal/libltdl/ltdl.h)
SET_SOURCE_FILES_PROPERTIES(${LIBLTDL_FILES} PROPERTIES COMPILE_DEFINITIONS
"error_t=int;HAVE_ERRNO_H;LTDL_OBJDIR=\".\";LTDL_SHLIB_EXT=\".dll\"")
SET (OPAL_SOURCE_FILES ${OPAL_SOURCE_FILES} ${LIBLTDL_FILES})
SOURCE_GROUP(libltdl FILES ${LIBLTDL_FILES})
ENDIF(BUILD_SHARED_LIBS)
# Add source files from mca subdirectories.
INCLUDE (check_mca_subdirs)
SET (OPAL_SOURCE_FILES ${OPAL_SOURCE_FILES} ${OPAL_MCA_FILES})
# This has to be added for opal explicitly, as it's required for
# shared build and the .windows file is removed (so that for static build).
FILE(GLOB_RECURSE OPAL_TIMER_WINDOWS
"mca/timer/windows/*.h" "mca/timer/windows/*.c" "mca/timer/windows/*.cc" "mca/timer/windows/*.cpp")
SOURCE_GROUP(mca\\timer\\windows FILES ${OPAL_TIMER_WINDOWS})
SET (OPAL_SOURCE_FILES
${OPAL_SOURCE_FILES}
${OPAL_TIMER_WINDOWS}
)
ADD_LIBRARY (libopen-pal ${OPAL_SOURCE_FILES})
# Set compile flags for this target
IF (BUILD_SHARED_LIBS)
SET_SOURCE_FILES_PROPERTIES(${OPAL_SOURCE_FILES}
PROPERTIES LANGUAGE C)
# Flex is trying to include the unistd.h file. As there is no configure
# option on this, the flex generated files will try to include the file
# even on platforms without unistd.h (such as Windows). Therefore, if we
# know this file is not available, we can prevent flex from including it.
# Thus, define "YY_NO_UNISTD_H" as the target property (the same for ORTE).
SET_TARGET_PROPERTIES(libopen-pal PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_EXPORTS")
TARGET_LINK_LIBRARIES (libopen-pal Ws2_32.lib shlwapi.lib)
ELSE (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(libopen-pal PROPERTIES COMPILE_FLAGS "-D_LIB")
ENDIF(BUILD_SHARED_LIBS)
# Generate install_dirs.h
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/install_dirs.h.cmake
${OpenMPI_BINARY_DIR}/opal/mca/installdirs/config/install_dirs.h)
# Generate version file.
INCLUDE(generate_version_file)
ADD_SUBDIRECTORY(tools)
# Install libraries, shared files.
INSTALL(TARGETS libopen-pal
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
INSTALL(FILES runtime/help-opal-runtime.txt DESTINATION share/openmpi)

42
opal/event/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,42 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
INCLUDE (event/WIN32-Code/CMakeLists.txt) # or use INCLUDE (${OpenMPI_SOURCE_DIR}/opal/event/WIN32-Code/CMakeLists.txt)
FOREACH (FILE ${EVENT_WIN32_FILES})
SET (EVENT_FILES ${EVENT_FILES} WIN32-Code/${FILE})
ENDFOREACH (FILE)
INCLUDE (event/compat/sys/CMakeLists.txt)
FOREACH (FILE ${COMPAT_SYS_FILES})
SET (EVENT_FILES ${EVENT_FILES} compat/sys/${FILE})
ENDFOREACH (FILE)
IF(WIN32)
# include special path for these files
SET_SOURCE_FILES_PROPERTIES(event/event.c event/log.c event/signal.c event/select.c event/evutil.c event/WIN32-Code/win32.c
PROPERTIES COMPILE_FLAGS "/I \"${PROJECT_SOURCE_DIR}/event/compat\" /I \"${PROJECT_SOURCE_DIR}/event/WIN32-Code\"")
SET(EVENT_FILES
${EVENT_FILES}
event-internal.h
event.h
event.c
evsignal.h
evutil.h
evutil.c
log.h
log.c
select.c
signal.c
)
ELSE(WIN32)
SET(EVENT_FILES
${EVENT_FILES}
)
ENDIF(WIN32)

21
opal/event/WIN32-Code/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,21 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
IF(WIN32)
SET (EVENT_WIN32_FILES
${EVENT_WIN32_FILES}
config.h
misc.h
misc.h
tree.h
win32.c
)
ELSE(WIN32)
ENDIF(WIN32)

20
opal/event/compat/sys/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,20 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
IF(WIN32)
SET(COMPAT_SYS_FILES
${COMPAT_SYS_FILES}
queue.h
_time.h
_timeradd.h
)
ELSE(WIN32)
ENDIF(WIN32)

27
opal/include/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,27 @@
#
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2008 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/opal_config.h.cmake ${OpenMPI_BINARY_DIR}/opal/include/opal_config.h)
IF(HAVE_LONG_LONG)
SET(OMPI_HAVE_LONG_LONG 1)
ENDIF(HAVE_LONG_LONG)
# generate mpi.h and mpif.h
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpi.h.cmake ${OpenMPI_BINARY_DIR}/ompi/include/mpi.h)
IF(OMPI_WANT_F77_BINDINGS)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/ompi/include/mpif.h.in ${OpenMPI_BINARY_DIR}/ompi/include/mpif.h)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/ompi/include/mpif-config.h.in ${OpenMPI_BINARY_DIR}/ompi/include/mpif-config.h)
ENDIF(OMPI_WANT_F77_BINDINGS)

14
opal/mca/backtrace/none/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
not_single_shared_lib=1

0
opal/mca/carto/auto_detect/.windows Обычный файл
Просмотреть файл

0
opal/mca/crs/none/.windows Обычный файл
Просмотреть файл

14
opal/mca/installdirs/config/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
not_single_shared_lib=1

14
opal/mca/installdirs/env/.windows поставляемый Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
not_single_shared_lib=1

14
opal/mca/installdirs/windows/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
not_single_shared_lib=1

0
opal/mca/maffinity/first_use/.windows Обычный файл
Просмотреть файл

0
opal/mca/paffinity/windows/.windows Обычный файл
Просмотреть файл

16
opal/tools/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,16 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2008 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
IF(OPAL_ENABLE_FT)
ADD_SUBDIRECTORY(opal-restart)
ENDIF(OPAL_ENABLE_FT)
ADD_SUBDIRECTORY(wrappers)

27
opal/tools/opal-checkpoint/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,27 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(OPAL_CHECKPOINT)
FILE(GLOB_RECURSE OPAL_CHECKPOINT_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
ADD_EXECUTABLE (opal-checkpoint ${OPAL_CHECKPOINT_SOURCE_FILES})
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(opal-checkpoint PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS")
SET_SOURCE_FILES_PROPERTIES(${OPAL_CHECKPOINT_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ENDIF(BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES (opal-checkpoint Ws2_32.lib shlwapi.lib)
INSTALL(TARGETS opal-checkpoint
DESTINATION bin)
INSTALL(FILES help-opal-checkpoint.txt DESTINATION share/openmpi)
ADD_DEPENDENCIES (opal-checkpoint libopen-pal)

28
opal/tools/opal-restart/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,28 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(OPAL_RESTART)
FILE(GLOB_RECURSE OPAL_RESTART_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
ADD_EXECUTABLE (opal-restart ${OPAL_RESTART_SOURCE_FILES})
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(opal-restart PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS")
SET_SOURCE_FILES_PROPERTIES(${OPAL_RESTART_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ENDIF(BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES (opal-restart Ws2_32.lib shlwapi.lib)
INSTALL(TARGETS opal-restart
DESTINATION bin)
INSTALL(FILES help-opal-restart.txt DESTINATION share/openmpi)
ADD_DEPENDENCIES (opal-restart libopen-pal)

81
opal/tools/wrappers/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,81 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(OPAL_WRAPPER)
FILE(GLOB_RECURSE OPAL_WRAPPER_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
ADD_EXECUTABLE (opal-wrapper ${OPAL_WRAPPER_SOURCE_FILES})
TARGET_LINK_LIBRARIES (opal-wrapper Ws2_32.lib shlwapi.lib)
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(opal-wrapper PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS")
SET_SOURCE_FILES_PROPERTIES(${OPAL_WRAPPER_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ENDIF(BUILD_SHARED_LIBS)
ADD_CUSTOM_COMMAND (TARGET opal-wrapper
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
${PROJECT_BINARY_DIR}/mpicc.exe
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
${PROJECT_BINARY_DIR}/mpic++.exe
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
${PROJECT_BINARY_DIR}/mpicxx.exe
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
${PROJECT_BINARY_DIR}/mpiexec.exe
COMMENT "Copying renamed executables...")
INSTALL(TARGETS opal-wrapper
DESTINATION bin)
INSTALL(FILES help-opal-wrapper.txt
DESTINATION share/openmpi
RENAME help-opal-wrapper.exe.txt)
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpicc.exe
${PROJECT_BINARY_DIR}/mpic++.exe
${PROJECT_BINARY_DIR}/mpicxx.exe
${PROJECT_BINARY_DIR}/mpiexec.exe
DESTINATION bin)
ADD_DEPENDENCIES (opal-wrapper libopen-pal)
IF(WANT_INSTALL_HEADERS)
ADD_CUSTOM_COMMAND (TARGET opal-wrapper
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
${PROJECT_BINARY_DIR}/opalcc.exe
COMMENT "Copying renamed executables...")
IF(OMPI_WANT_CXX_BINDINGS)
ADD_CUSTOM_COMMAND (TARGET opal-wrapper
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
${PROJECT_BINARY_DIR}/opalc++.exe
COMMENT "Copying renamed executables...")
CONFIGURE_FILE(${OPAL_SOURCE_DIR}/tools/wrappers/opalc++-wrapper-data.txt.in
${OPAL_BINARY_DIR}/tools/wrappers/opalc++-wrapper-data.txt @ONLY)
INSTALL(FILES ${OPAL_BINARY_DIR}/tools/wrappers/opalc++-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(OMPI_WANT_CXX_BINDINGS)
CONFIGURE_FILE(${OPAL_SOURCE_DIR}/tools/wrappers/opalcc-wrapper-data.txt.in
${OPAL_BINARY_DIR}/tools/wrappers/opalcc-wrapper-data.txt @ONLY)
INSTALL(FILES ${OPAL_BINARY_DIR}/tools/wrappers/opalcc-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(WANT_INSTALL_HEADERS)

86
orte/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,86 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# The source code is compiled as C++ for dynamic build
# and compiled as C for static build
PROJECT (ORTE)
# Recuresive search sub directories excluding mca, event, include and tools.
# Add sources in different source groups.
EXECUTE_PROCESS (COMMAND cmd /C dir /AD /B
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
RESULT_VARIABLE RESULT
ERROR_VARIABLE ERROR)
STRING (REGEX MATCHALL "[a-zA-Z1-9_]+" ORTE_SUBDIRS ${OUTPUT})
FOREACH(ORTE_SUBDIR ${ORTE_SUBDIRS})
IF(NOT ${ORTE_SUBDIR} STREQUAL "mca" AND NOT ${ORTE_SUBDIR} STREQUAL "tools"
AND NOT ${ORTE_SUBDIR} STREQUAL "test")
FILE(GLOB_RECURSE ORTE_${ORTE_SUBDIR}_FILES
"${ORTE_SUBDIR}/*.h" "${ORTE_SUBDIR}/*.c" "${ORTE_SUBDIR}/*.cc" "${ORTE_SUBDIR}/*.cpp")
SET (ORTE_SOURCE_FILES
${ORTE_SOURCE_FILES}
${ORTE_${ORTE_SUBDIR}_FILES}
)
SOURCE_GROUP("${ORTE_SUBDIR}" FILES ${ORTE_${ORTE_SUBDIR}_FILES})
ENDIF(NOT ${ORTE_SUBDIR} STREQUAL "mca" AND NOT ${ORTE_SUBDIR} STREQUAL "tools"
AND NOT ${ORTE_SUBDIR} STREQUAL "test")
ENDFOREACH(ORTE_SUBDIR ${ORTE_SUBDIRS})
# Generate flex files.
INCLUDE (find_flex)
ADD_FLEX_FILE(ORTE_SOURCE_FILES "./util/hostfile/hostfile_lex.l" "orte_util_hostfile_"
"${PROJECT_BINARY_DIR}/util/hostfile/")
SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/util/hostfile/hostfile_lex.c
PROPERTIES COMPILE_DEFINITIONS YY_NO_UNISTD_H)
INCLUDE (check_mca_subdirs)
SET (ORTE_SOURCE_FILES ${ORTE_SOURCE_FILES} ${ORTE_MCA_FILES})
SET_SOURCE_FILES_PROPERTIES(${ORTE_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ADD_LIBRARY (libopen-rte ${ORTE_SOURCE_FILES})
ADD_DEPENDENCIES (libopen-rte libopen-pal)
# Set compile flags for this target
IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(libopen-rte PROPERTIES COMPILE_FLAGS "-D_USRDLL -DORTE_EXPORTS -DOPAL_IMPORTS")
TARGET_LINK_LIBRARIES (libopen-rte Ws2_32.lib shlwapi.lib)
ELSE (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(libopen-rte PROPERTIES COMPILE_FLAGS "-D_LIB")
ENDIF(BUILD_SHARED_LIBS)
# generate orte_config.h
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/orte/include/orte_config.h.in ${OpenMPI_BINARY_DIR}/orte/include/orte_config.h)
INCLUDE(generate_version_file)
ADD_SUBDIRECTORY(tools)
# Install libraries and shared files.
INSTALL(TARGETS libopen-rte
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
INSTALL(FILES orted/help-orted.txt runtime/help-orte-runtime.txt
util/hostfile/help-hostfile.txt util/dash_host/help-dash-host.txt
DESTINATION share/openmpi)

13
orte/mca/errmgr/default/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/ess/env/.windows поставляемый Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/ess/hnp/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/ess/singleton/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/grpcomm/basic/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

14
orte/mca/iof/hnp/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte
mca_link_libraries=Ws2_32.lib

14
orte/mca/iof/orted/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte
mca_link_libraries=Ws2_32.lib

13
orte/mca/iof/tool/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/odls/process/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

14
orte/mca/oob/tcp/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte
mca_link_libraries=Ws2_32.lib

13
orte/mca/plm/ccp/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/plm/process/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/ras/ccp/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/rmaps/round_robin/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/rmaps/seq/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/rmaps/topo/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/rml/ftrm/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

14
orte/mca/rml/oob/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte
mca_link_libraries=Ws2_32.lib

13
orte/mca/routed/binomial/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

13
orte/mca/routed/linear/.windows Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
#
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
mca_dependencies=libopen-rte

33
orte/tools/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,33 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2008 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
ADD_SUBDIRECTORY(orted)
ADD_SUBDIRECTORY(orterun)
ADD_SUBDIRECTORY(orte-clean)
ADD_SUBDIRECTORY(orte-ps)
IF(OPAL_ENABLE_FT)
ADD_SUBDIRECTORY(orte-checkpoint)
ENDIF(OPAL_ENABLE_FT)
IF(WANT_INSTALL_HEADERS)
CONFIGURE_FILE(${ORTE_SOURCE_DIR}/tools/wrappers/ortec++-wrapper-data.txt.in
${ORTE_BINARY_DIR}/tools/wrappers/ortec++-wrapper-data.txt @ONLY)
CONFIGURE_FILE(${ORTE_SOURCE_DIR}/tools/wrappers/ortecc-wrapper-data.txt.in
${ORTE_BINARY_DIR}/tools/wrappers/ortecc-wrapper-data.txt @ONLY)
INSTALL(FILES ${ORTE_BINARY_DIR}/tools/wrappers/ortec++-wrapper-data.txt
DESTINATION share/openmpi)
INSTALL(FILES ${ORTE_BINARY_DIR}/tools/wrappers/ortecc-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(WANT_INSTALL_HEADERS)

36
orte/tools/orte-checkpoint/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,36 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(ORTE_CHECKPOINT)
FILE(GLOB_RECURSE ORTE_CHECKPOINT_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
ADD_EXECUTABLE (orte-checkpoint ${ORTE_CHECKPOINT_SOURCE_FILES})
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(orte-checkpoint PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS")
SET_SOURCE_FILES_PROPERTIES(${ORTE_CHECKPOINT_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ENDIF(BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES (orte-checkpoint Ws2_32.lib shlwapi.lib)
ADD_DEPENDENCIES (orte-checkpoint libopen-pal libopen-rte)
ADD_CUSTOM_COMMAND (TARGET orte-checkpoint
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/orte-checkpoint.exe
${PROJECT_BINARY_DIR}/ompi-checkpoint.exe
COMMENT "Copying renamed executables...")
INSTALL(TARGETS orte-checkpoint
DESTINATION bin)
INSTALL(FILES help-orte-checkpoint.txt DESTINATION share/openmpi)
INSTALL(FILES ${PROJECT_BINARY_DIR}/ompi-checkpoint.exe
DESTINATION bin)

36
orte/tools/orte-clean/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,36 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(ORTE_CLEAN)
FILE(GLOB_RECURSE ORTE_CLEAN_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
ADD_EXECUTABLE (orte-clean ${ORTE_CLEAN_SOURCE_FILES})
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(orte-clean PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS")
SET_SOURCE_FILES_PROPERTIES(${ORTE_CLEAN_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ENDIF(BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES (orte-clean Ws2_32.lib shlwapi.lib)
ADD_DEPENDENCIES (orte-clean libopen-pal libopen-rte)
ADD_CUSTOM_COMMAND (TARGET orte-clean
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/orte-clean.exe
${PROJECT_BINARY_DIR}/ompi-clean.exe
COMMENT "Copying renamed executables...")
INSTALL(TARGETS orte-clean
DESTINATION bin)
INSTALL(FILES help-orte-clean.txt DESTINATION share/openmpi)
INSTALL(FILES ${PROJECT_BINARY_DIR}/ompi-clean.exe
DESTINATION bin)

36
orte/tools/orte-ps/CMakeLists.txt Обычный файл
Просмотреть файл

@ -0,0 +1,36 @@
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
PROJECT(ORTE_PS)
FILE(GLOB_RECURSE ORTE_PS_SOURCE_FILES "*.h" "*.c" "*.cc" "*.cpp")
ADD_EXECUTABLE (orte-ps ${ORTE_PS_SOURCE_FILES})
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(orte-ps PROPERTIES COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS")
SET_SOURCE_FILES_PROPERTIES(${ORTE_PS_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
ENDIF(BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES (orte-ps Ws2_32.lib shlwapi.lib)
ADD_CUSTOM_COMMAND (TARGET orte-ps
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/orte-ps.exe
${PROJECT_BINARY_DIR}/ompi-ps.exe
COMMENT "Copying renamed executables...")
INSTALL(TARGETS orte-ps
DESTINATION bin)
INSTALL(FILES help-orte-ps.txt DESTINATION share/openmpi)
INSTALL(FILES ${PROJECT_BINARY_DIR}/ompi-ps.exe
DESTINATION bin)
ADD_DEPENDENCIES (orte-ps libopen-pal libopen-rte)

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше