1
1

Completely remove ltdl support for Windows build.

This commit was SVN r21170.
Этот коммит содержится в:
Shiqing Fan 2009-05-05 18:59:13 +00:00
родитель a827fd0f4e
Коммит cd565923d3
51 изменённых файлов: 38 добавлений и 302 удалений

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

@ -70,7 +70,7 @@ SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OpenMPI_BINARY_DIR})
SET (CMAKE_SUPPRESS_REGENERATION true) SET (CMAKE_SUPPRESS_REGENERATION true)
# Dynamic/shared build, the default is set to static(OFF) # Dynamic/shared build, the default is set to static(OFF)
OPTION(BUILD_SHARED_LIBS "Wether we want to build shared libraries." OFF) OPTION(BUILD_SHARED_LIBS "Wether we want to build shared libraries." ON)
INCLUDE(ompi_configure) INCLUDE(ompi_configure)

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

@ -121,13 +121,6 @@ FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST})
IF(BUILD_COMPONENT) IF(BUILD_COMPONENT)
# check the library build type
FILE(STRINGS ${CURRENT_PATH}/.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 "")
# 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=")
@ -141,8 +134,6 @@ FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST})
LIST(REMOVE_ITEM COMPONENT_FILES "${CURRENT_PATH}/${FILE}") LIST(REMOVE_ITEM COMPONENT_FILES "${CURRENT_PATH}/${FILE}")
ENDFOREACH(FILE) ENDFOREACH(FILE)
IF(NOT OMPI_WANT_LIBLTDL 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. # add sources for static build or for the shared build when this is not a stand along library.
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})
@ -172,78 +163,6 @@ FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST})
SET(FRAMEWORK_STRUCT_DEF ${FRAMEWORK_STRUCT_DEF} SET(FRAMEWORK_STRUCT_DEF ${FRAMEWORK_STRUCT_DEF}
"&mca_${MCA_FRAMEWORK}_${MCA_COMPONENT}_component,\n") "&mca_${MCA_FRAMEWORK}_${MCA_COMPONENT}_component,\n")
ENDIF(CURRENT_COMPONENT_PRIORITY GREATER BEST_COMPONENT_PRIORITY) ENDIF(CURRENT_COMPONENT_PRIORITY GREATER BEST_COMPONENT_PRIORITY)
ELSE(NOT OMPI_WANT_LIBLTDL OR NOT_SINGLE_SHARED_LIB STREQUAL "1")
# 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 "")
# the mca_common_* libraries should be installed into bin,
# this will avoid the runtime open module failure.
IF("${MCA_FRAMEWORK}" STREQUAL "common")
SET(LIB_NAME_PREFIX "lib")
SET(INSTALL_DEST "RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib")
ELSE("${MCA_FRAMEWORK}" STREQUAL "common")
SET(LIB_NAME_PREFIX "")
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(INSTALL_DEST "RUNTIME DESTINATION lib/openmpi/debug
LIBRARY DESTINATION lib/openmpi/debug
ARCHIVE DESTINATION lib/openmpi/debug")
ELSE(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(INSTALL_DEST "RUNTIME DESTINATION lib/openmpi
LIBRARY DESTINATION lib/openmpi
ARCHIVE DESTINATION lib/openmpi")
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
ENDIF("${MCA_FRAMEWORK}" STREQUAL "common")
# generate CMakeLists.txt for each component for DSO build.
FILE (WRITE "${PROJECT_BINARY_DIR}/mca/${MCA_FRAMEWORK}/${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
SET_SOURCE_FILES_PROPERTIES(\${COMPONENT_FILES}
PROPERTIES LANGUAGE CXX)
INCLUDE_DIRECTORIES(\${EXTRA_INCLUDE_PATH})
ADD_LIBRARY(${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} SHARED
\${COMPONENT_FILES})
SET_TARGET_PROPERTIES(${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT}
PROPERTIES COMPILE_FLAGS \"-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS\")
TARGET_LINK_LIBRARIES (${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} ${MCA_LINK_LIBRARIES})
ADD_DEPENDENCIES(${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} libopen-pal ${MCA_DEPENDENCIES})
INSTALL(TARGETS ${LIB_NAME_PREFIX}mca_${MCA_FRAMEWORK}_${MCA_COMPONENT} ${INSTALL_DEST})
")
ADD_SUBDIRECTORY (${PROJECT_BINARY_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT} mca/${MCA_FRAMEWORK}/${MCA_COMPONENT})
ENDIF(NOT OMPI_WANT_LIBLTDL OR NOT_SINGLE_SHARED_LIB STREQUAL "1")
# Install help files if they are here. # Install help files if they are here.
INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/ INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/

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

@ -1,38 +0,0 @@
#
# Copyright (c) 2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# LIBLTDL_PATH - path to ltdl.h
# LIBLTDL_FOUND - system has Libltdl
#
MACRO(FIND_LIBLTDL)
IF(NOT LIBLTDL_FOUND)
MESSAGE(STATUS "Looking for libltdl...")
FIND_PATH(LIBLTDL_PATH ltdl.h PATHS "$ENV{ProgramFiles}/GnuWin32/share/libtool/libltdl" ${LIBLTDL_PATH})
IF (WIN32)
IF(LIBLTDL_PATH)
MESSAGE(STATUS "Looking for libltdl...found")
SET(LIBLTDL_FOUND TRUE TRUE CACHE INTERNAL "found libltdl")
ELSE(LIBLTDL_PATH)
MESSAGE(STATUS "Looking for libltdl...not found. Skip.")
SET(LIBLTDL_FOUND FALSE)
ENDIF(LIBLTDL_PATH)
ELSE(WIN32)
# nothing to do here at moment.
ENDIF(WIN32)
ENDIF(NOT LIBLTDL_FOUND)
ENDMACRO(FIND_LIBLTDL)

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

@ -133,6 +133,16 @@ SET(OMPI_F90_ABSOLUTE "\"none\"")
SET(OMPI_F90_BUILD_SIZE "\"small\"") SET(OMPI_F90_BUILD_SIZE "\"small\"")
# we don't support libtool on Windows.
SET(OMPI_WANT_LIBLTDL 0)
# set the im/export decleration here.
# Don't bother with OMPI_IMPORTS
IF(BUILD_SHARED_LIBS)
SET(OMPI_DECLSPEC "__declspec(dllimport)")
ELSE(BUILD_SHARED_LIBS)
SET(OMPI_DECLSPEC "")
ENDIF(BUILD_SHARED_LIBS)
################################################################### ###################################################################
# Options # # Options #
@ -349,28 +359,6 @@ ELSE(NOT ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT)
SET (ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT 1) SET (ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT 1)
ENDIF(NOT ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT) ENDIF(NOT ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT)
OPTION(OMPI_ENABLE_DLOPEN_SUPPORT "Whether to include support for libltdl or not" OFF)
MARK_AS_ADVANCED(OMPI_ENABLE_DLOPEN_SUPPORT)
IF(OMPI_ENABLE_DLOPEN_SUPPORT)
SET(BUILD_SHARED_LIBS TRUE)
INCLUDE(FIND_LIBLTDL)
FIND_LIBLTDL()
IF(LIBLTDL_FOUND)
SET(OMPI_WANT_LIBLTDL 1)
ELSE(LIBLTDL_FOUND)
SET(OMPI_WANT_LIBLTDL 0)
ENDIF(LIBLTDL_FOUND)
ELSE(OMPI_ENABLE_DLOPEN_SUPPORT)
SET(OMPI_WANT_LIBLTDL 0)
ENDIF(OMPI_ENABLE_DLOPEN_SUPPORT)
# set the im/export decleration here.
# Don't bother with OMPI_IMPORTS
IF(BUILD_SHARED_LIBS)
SET(OMPI_DECLSPEC "__declspec(dllimport)")
ELSE(BUILD_SHARED_LIBS)
SET(OMPI_DECLSPEC "")
ENDIF(BUILD_SHARED_LIBS)
################################################################### ###################################################################

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte libmca_common_sm

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

@ -9,7 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte
mca_link_libraries=Ws2_32.lib

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte libmca_common_sm

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte libmca_common_sm

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libmpi libopen-rte

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

@ -91,25 +91,6 @@ IF(EXISTS ${PROJECT_SOURCE_DIR}/util/keyval/show_help_lex.c)
LIST(REMOVE_ITEM OPAL_SOURCE_FILES "${PROJECT_SOURCE_DIR}/util/keyval/show_help_lex.c") LIST(REMOVE_ITEM OPAL_SOURCE_FILES "${PROJECT_SOURCE_DIR}/util/keyval/show_help_lex.c")
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/util/keyval/show_help_lex.c) ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/util/keyval/show_help_lex.c)
# Add Libtool support
IF(OMPI_WANT_LIBLTDL)
# if we want libltdl, that means ltdl.h and ltdl.c has been found,
# just copy them into the source tree for compiling.
CONFIGURE_FILE("${LIBLTDL_PATH}/ltdl.c" ${CMAKE_CURRENT_BINARY_DIR}/libltdl/ltdl.c COPYONLY)
CONFIGURE_FILE("${LIBLTDL_PATH}/ltdl.h" ${CMAKE_CURRENT_BINARY_DIR}/libltdl/ltdl.h COPYONLY)
# insert "#include opal_config.h" into ltdl.c, otherwise, it won't compile.
FILE(READ ${CMAKE_CURRENT_BINARY_DIR}/libltdl/ltdl.c LTDL_C_PART1 LIMIT 1183)
FILE(READ ${CMAKE_CURRENT_BINARY_DIR}/libltdl/ltdl.c LTDL_C_PART2 OFFSET 1183)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/libltdl/ltdl.c
"${LTDL_C_PART1}" "\n#include \"opal_config.h\"\n" "${LTDL_C_PART2}")
SET (LIBLTDL_FILES libltdl/ltdl.c 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(OMPI_WANT_LIBLTDL)
# Add source files from mca subdirectories. # Add source files from mca subdirectories.
INCLUDE (check_mca_subdirs) INCLUDE (check_mca_subdirs)

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

@ -10,5 +10,3 @@
# Specific to this module # Specific to this module
not_single_shared_lib=1

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

@ -308,11 +308,6 @@ static void find_dyn_components(const char *path, const char *type_name,
file->filename[OMPI_PATH_MAX] = '\0'; file->filename[OMPI_PATH_MAX] = '\0';
file->status = UNVISITED; file->status = UNVISITED;
#if defined(__WINDOWS__) && defined(_DEBUG)
/* remove the debug suffix 'd', otherwise we will fail to
load the module in later phase. */
file->name[strlen(file->name)-1]='\0';
#endif
opal_list_append(&found_files, (opal_list_item_t *) opal_list_append(&found_files, (opal_list_item_t *)
file); file);
} }

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

@ -69,11 +69,7 @@ int mca_base_open(void)
#if OMPI_WANT_HOME_CONFIG_FILES #if OMPI_WANT_HOME_CONFIG_FILES
asprintf(&value, "%s%c%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"components", opal_install_dirs.pkglibdir, OPAL_ENV_SEP, opal_home_directory() ); asprintf(&value, "%s%c%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"components", opal_install_dirs.pkglibdir, OPAL_ENV_SEP, opal_home_directory() );
#else #else
# if defined(__WINDOWS__) && defined(_DEBUG)
asprintf(&value, "%s/debug", opal_install_dirs.pkglibdir);
# else
asprintf(&value, "%s", opal_install_dirs.pkglibdir); asprintf(&value, "%s", opal_install_dirs.pkglibdir);
# endif
#endif #endif
mca_base_param_component_path = mca_base_param_component_path =

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
not_single_shared_lib=1

2
opal/mca/installdirs/env/.windows поставляемый
Просмотреть файл

@ -10,5 +10,3 @@
# Specific to this module # Specific to this module
not_single_shared_lib=1

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

@ -10,5 +10,3 @@
# Specific to this module # Specific to this module
not_single_shared_lib=1

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

@ -7,5 +7,3 @@
# #
# $HEADER$ # $HEADER$
# #
not_single_shared_lib=1

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

2
orte/mca/ess/env/.windows поставляемый
Просмотреть файл

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte
mca_link_libraries=Ws2_32.lib

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

@ -10,5 +10,3 @@
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte
mca_link_libraries=Ws2_32.lib

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte
mca_link_libraries=Ws2_32.lib

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

@ -10,5 +10,4 @@
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte
required_check=find_ccp required_check=find_ccp

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -10,5 +10,4 @@
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte
required_check=find_ccp required_check=find_ccp

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,6 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte
mca_link_libraries=Ws2_32.lib

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte

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

@ -9,5 +9,3 @@
# #
# Specific to this module # Specific to this module
mca_dependencies=libopen-rte