Add a new CMake module for finding Windows CCP libraries, so that we can remove the library files in the source tree.
This commit was SVN r21071.
Этот коммит содержится в:
родитель
d8f61695cd
Коммит
4067d739b4
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart,
|
# Copyright (c) 2007-2009 High Performance Computing Center Stuttgart,
|
||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
@ -43,6 +43,7 @@ INCLUDE(ompi_get_version)
|
|||||||
|
|
||||||
# Make the include path visible to all targets
|
# Make the include path visible to all targets
|
||||||
INCLUDE_DIRECTORIES (
|
INCLUDE_DIRECTORIES (
|
||||||
|
${OpenMPI_SOURCE_DIR}/contrib/platform/win32
|
||||||
${OpenMPI_SOURCE_DIR}/
|
${OpenMPI_SOURCE_DIR}/
|
||||||
${OpenMPI_SOURCE_DIR}/opal
|
${OpenMPI_SOURCE_DIR}/opal
|
||||||
${OpenMPI_SOURCE_DIR}/opal/include
|
${OpenMPI_SOURCE_DIR}/opal/include
|
||||||
@ -57,7 +58,6 @@ INCLUDE_DIRECTORIES (
|
|||||||
${OpenMPI_BINARY_DIR}/ompi/include
|
${OpenMPI_BINARY_DIR}/ompi/include
|
||||||
${OpenMPI_BINARY_DIR}/orte
|
${OpenMPI_BINARY_DIR}/orte
|
||||||
${OpenMPI_BINARY_DIR}/orte/include
|
${OpenMPI_BINARY_DIR}/orte/include
|
||||||
${OpenMPI_SOURCE_DIR}/contrib/platform/win32
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -77,7 +77,6 @@ INCLUDE(ompi_configure)
|
|||||||
ADD_SUBDIRECTORY(opal)
|
ADD_SUBDIRECTORY(opal)
|
||||||
ADD_SUBDIRECTORY(ompi)
|
ADD_SUBDIRECTORY(ompi)
|
||||||
ADD_SUBDIRECTORY(orte)
|
ADD_SUBDIRECTORY(orte)
|
||||||
ADD_SUBDIRECTORY(test)
|
|
||||||
|
|
||||||
INCLUDE(InstallRequiredSystemLibraries)
|
INCLUDE(InstallRequiredSystemLibraries)
|
||||||
|
|
||||||
|
@ -96,16 +96,38 @@ FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST})
|
|||||||
ELSEIF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT}/.windows")
|
ELSEIF(EXISTS "${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT}/.windows")
|
||||||
|
|
||||||
SET(COMPONENT_FILES "")
|
SET(COMPONENT_FILES "")
|
||||||
FILE(STRINGS ${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT}/.windows
|
SET(CURRENT_PATH ${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT})
|
||||||
|
FILE(GLOB COMPONENT_FILES "${CURRENT_PATH}/*.C" "${CURRENT_PATH}/*.h"
|
||||||
|
"${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp")
|
||||||
|
|
||||||
|
# by default, build this component.
|
||||||
|
SET(BUILD_COMPONENT TRUE)
|
||||||
|
|
||||||
|
# do we have to run a check module first?
|
||||||
|
SET(REQUIRED_CHECK "")
|
||||||
|
FILE(STRINGS ${CURRENT_PATH}/.windows REQUIRED_CHECK REGEX "^required_check=")
|
||||||
|
|
||||||
|
SET(EXTRA_INCLUDE_PATH "")
|
||||||
|
IF(NOT REQUIRED_CHECK STREQUAL "")
|
||||||
|
STRING(REPLACE "required_check=" "" REQUIRED_CHECK ${REQUIRED_CHECK})
|
||||||
|
INCLUDE(${REQUIRED_CHECK})
|
||||||
|
IF(RESULT)
|
||||||
|
SET(EXTRA_INCLUDE_PATH ${RESULT_INCLUDE_PATH})
|
||||||
|
ELSE(RESULT)
|
||||||
|
# Required check failed, don't build this component.
|
||||||
|
SET(BUILD_COMPONENT FALSE)
|
||||||
|
ENDIF(RESULT)
|
||||||
|
ENDIF(NOT REQUIRED_CHECK STREQUAL "")
|
||||||
|
|
||||||
|
IF(BUILD_COMPONENT)
|
||||||
|
|
||||||
|
# check the library build type
|
||||||
|
FILE(STRINGS ${CURRENT_PATH}/.windows
|
||||||
VALUE REGEX "^not_single_shared_lib=")
|
VALUE REGEX "^not_single_shared_lib=")
|
||||||
IF(NOT VALUE STREQUAL "")
|
IF(NOT VALUE STREQUAL "")
|
||||||
STRING(REPLACE "not_single_shared_lib=" "" NOT_SINGLE_SHARED_LIB ${VALUE})
|
STRING(REPLACE "not_single_shared_lib=" "" NOT_SINGLE_SHARED_LIB ${VALUE})
|
||||||
ENDIF(NOT VALUE STREQUAL "")
|
ENDIF(NOT VALUE STREQUAL "")
|
||||||
|
|
||||||
SET(CURRENT_PATH ${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT})
|
|
||||||
FILE(GLOB COMPONENT_FILES "${CURRENT_PATH}/*.C" "${CURRENT_PATH}/*.h"
|
|
||||||
"${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp")
|
|
||||||
|
|
||||||
# check out if we have to exlude some source files.
|
# check out if we have to exlude some source files.
|
||||||
SET(EXCLUDE_LIST "")
|
SET(EXCLUDE_LIST "")
|
||||||
FILE(STRINGS ${CURRENT_PATH}/.windows EXCLUDE_LIST REGEX "^exclude_list=")
|
FILE(STRINGS ${CURRENT_PATH}/.windows EXCLUDE_LIST REGEX "^exclude_list=")
|
||||||
@ -125,6 +147,8 @@ FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST})
|
|||||||
SET(MCA_FILES ${MCA_FILES} ${COMPONENT_FILES})
|
SET(MCA_FILES ${MCA_FILES} ${COMPONENT_FILES})
|
||||||
SOURCE_GROUP(mca\\${MCA_FRAMEWORK}\\${MCA_COMPONENT} FILES ${COMPONENT_FILES})
|
SOURCE_GROUP(mca\\${MCA_FRAMEWORK}\\${MCA_COMPONENT} FILES ${COMPONENT_FILES})
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(${EXTRA_INCLUDE_PATH})
|
||||||
|
|
||||||
IF(EXISTS "${CURRENT_PATH}/configure.params")
|
IF(EXISTS "${CURRENT_PATH}/configure.params")
|
||||||
FILE(STRINGS "${CURRENT_PATH}/configure.params"
|
FILE(STRINGS "${CURRENT_PATH}/configure.params"
|
||||||
CURRENT_COMPONENT_PRIORITY REGEX "PRIORITY")
|
CURRENT_COMPONENT_PRIORITY REGEX "PRIORITY")
|
||||||
@ -203,6 +227,8 @@ FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST})
|
|||||||
SET_SOURCE_FILES_PROPERTIES(\${COMPONENT_FILES}
|
SET_SOURCE_FILES_PROPERTIES(\${COMPONENT_FILES}
|
||||||
PROPERTIES LANGUAGE CXX)
|
PROPERTIES LANGUAGE CXX)
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(\${EXTRA_INCLUDE_PATH})
|
||||||
|
|
||||||
ADD_LIBRARY(${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} SHARED
|
ADD_LIBRARY(${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} SHARED
|
||||||
\${COMPONENT_FILES})
|
\${COMPONENT_FILES})
|
||||||
|
|
||||||
@ -223,7 +249,9 @@ INSTALL(TARGETS ${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} ${INSTAL
|
|||||||
INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/
|
INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/
|
||||||
FILES_MATCHING PATTERN "*.txt" PATTERN ".svn" EXCLUDE)
|
FILES_MATCHING PATTERN "*.txt" PATTERN ".svn" EXCLUDE)
|
||||||
|
|
||||||
|
ENDIF(BUILD_COMPONENT)
|
||||||
ENDIF(${MCA_COMPONENT} STREQUAL "base")
|
ENDIF(${MCA_COMPONENT} STREQUAL "base")
|
||||||
|
|
||||||
ENDFOREACH(MCA_COMPONENT)
|
ENDFOREACH(MCA_COMPONENT)
|
||||||
|
|
||||||
STRING(LENGTH "${FRAMEWORK_STRUCT_DEF}" STRUCT_STRING_LENTH)
|
STRING(LENGTH "${FRAMEWORK_STRUCT_DEF}" STRUCT_STRING_LENTH)
|
||||||
|
37
contrib/platform/win32/CMakeModules/find_ccp.cmake
Исполняемый файл
37
contrib/platform/win32/CMakeModules/find_ccp.cmake
Исполняемый файл
@ -0,0 +1,37 @@
|
|||||||
|
# Copyright (c) 2009 High Performance Computing Center Stuttgart,
|
||||||
|
# University of Stuttgart. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
# The CCP components need to import the type library ccpapi.tlb,
|
||||||
|
# if it's not installed, the CCP components won't be built.
|
||||||
|
|
||||||
|
SET(EXTRA_INCLUDE_PATH "")
|
||||||
|
|
||||||
|
IF(NOT CCPAPI_FOUND)
|
||||||
|
MESSAGE(STATUS "looking for ccp...")
|
||||||
|
|
||||||
|
IF(CMAKE_CL_64)
|
||||||
|
SET(CCP_LIB_PATH $ENV{CCP_LIB64})
|
||||||
|
ELSE(CMAKE_CL_64)
|
||||||
|
SET(CCP_LIB_PATH $ENV{CCP_LIB32})
|
||||||
|
ENDIF(CMAKE_CL_64)
|
||||||
|
|
||||||
|
FIND_FILE(CCPAPI_FOUND ccpapi.tlb PATHS ${CCP_LIB_PATH})
|
||||||
|
|
||||||
|
IF(CCPAPI_FOUND)
|
||||||
|
SET(RESULT TRUE)
|
||||||
|
SET(RESULT_INCLUDE_PATH ${CCP_LIB_PATH})
|
||||||
|
MESSAGE(STATUS "looking for ccp...found.")
|
||||||
|
ELSE(CCPAPI_FOUND)
|
||||||
|
SET(RESULT FALSE)
|
||||||
|
MESSAGE(STATUS "looking for ccp...not found.")
|
||||||
|
ENDIF(CCPAPI_FOUND)
|
||||||
|
|
||||||
|
ELSE(NOT CCPAPI_FOUND)
|
||||||
|
SET(RESULT_INCLUDE_PATH ${CCP_LIB_PATH})
|
||||||
|
ENDIF(NOT CCPAPI_FOUND)
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
|
# Copyright (c) 2009 High Performance Computing Center Stuttgart,
|
||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
@ -11,3 +11,4 @@
|
|||||||
# Specific to this module
|
# Specific to this module
|
||||||
|
|
||||||
mca_dependencies=libopen-rte
|
mca_dependencies=libopen-rte
|
||||||
|
required_check=find_ccp
|
||||||
|
Двоичные данные
orte/mca/plm/ccp/ccpapi.tlb
Двоичные данные
orte/mca/plm/ccp/ccpapi.tlb
Двоичный файл не отображается.
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
|
# Copyright (c) 2009 High Performance Computing Center Stuttgart,
|
||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
@ -11,3 +11,4 @@
|
|||||||
# Specific to this module
|
# Specific to this module
|
||||||
|
|
||||||
mca_dependencies=libopen-rte
|
mca_dependencies=libopen-rte
|
||||||
|
required_check=find_ccp
|
||||||
|
Двоичные данные
orte/mca/ras/ccp/ccpapi.tlb
Двоичные данные
orte/mca/ras/ccp/ccpapi.tlb
Двоичный файл не отображается.
Загрузка…
x
Ссылка в новой задаче
Block a user