diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 243f64698f..5399561f53 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -101,6 +101,7 @@ EXTRA_DIST = \ platform/win32/CMakeModules/ompi_check_Microsoft.cmake \ platform/win32/CMakeModules/ompi_configure.cmake \ platform/win32/CMakeModules/ompi_find_type.cmake \ + platform/win32/CMakeModules/opal_event_config.cmake \ platform/win32/CMakeModules/opal_get_version.cmake \ platform/win32/CMakeModules/opal_functions.cmake \ platform/win32/CMakeModules/setup_f77.cmake \ diff --git a/contrib/platform/win32/CMakeModules/check_mca_subdirs.cmake b/contrib/platform/win32/CMakeModules/check_mca_subdirs.cmake index 4614ef8013..974d9fa805 100644 --- a/contrib/platform/win32/CMakeModules/check_mca_subdirs.cmake +++ b/contrib/platform/win32/CMakeModules/check_mca_subdirs.cmake @@ -37,7 +37,7 @@ INCLUDE(list_subdirs) # # required_check: a CMake module has to be run to check the libraries/headers # that needed by this component. The check might return two -# variables: RESULT_INCLUDE_PATH and RESULT_LINK_LIBRARIES. +# variables: RESULT_INCLUDE_PATH, RESULT_LINK_LIBRARIES and RESULT_SOURCE_FILES. # RESULT_INCLUDE_PATH is handled in this macro, and RESULT_LINK_LIBRARIES # is handled in upper layer. # @@ -122,21 +122,6 @@ FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST}) SET(COMPONENT_FILES "") SET(CURRENT_PATH ${PROJECT_SOURCE_DIR}/mca/${MCA_FRAMEWORK}/${MCA_COMPONENT}) - FILE(GLOB_RECURSE COMPONENT_FILES "${CURRENT_PATH}/*.C" "${CURRENT_PATH}/*.h" - "${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp") - - #check exclude list - SET(EXCLUDE_LIST "") - FILE(STRINGS ${CURRENT_PATH}/.windows EXCLUDE_LIST REGEX "^exclude_list=") - - IF(NOT EXCLUDE_LIST STREQUAL "") - STRING(REPLACE "exclude_list=" "" EXCLUDE_LIST ${EXCLUDE_LIST}) - ENDIF(NOT EXCLUDE_LIST STREQUAL "") - - # remove the files in the exclude list - FOREACH(FILE ${EXCLUDE_LIST}) - LIST(REMOVE_ITEM COMPONENT_FILES "${CURRENT_PATH}/${FILE}") - ENDFOREACH(FILE) # by default, build this component. SET(BUILD_COMPONENT TRUE) @@ -164,6 +149,24 @@ FOREACH (MCA_FRAMEWORK ${MCA_FRAMEWORK_LIST}) IF(BUILD_COMPONENT) + IF(COMPONENT_FILES STREQUAL "") + FILE(GLOB_RECURSE COMPONENT_FILES "${CURRENT_PATH}/*.C" "${CURRENT_PATH}/*.h" + "${CURRENT_PATH}/*.cc" "${CURRENT_PATH}/*.cpp") + + #check exclude list + SET(EXCLUDE_LIST "") + FILE(STRINGS ${CURRENT_PATH}/.windows EXCLUDE_LIST REGEX "^exclude_list=") + + IF(NOT EXCLUDE_LIST STREQUAL "") + STRING(REPLACE "exclude_list=" "" EXCLUDE_LIST ${EXCLUDE_LIST}) + ENDIF(NOT EXCLUDE_LIST STREQUAL "") + + # remove the files in the exclude list + FOREACH(FILE ${EXCLUDE_LIST}) + LIST(REMOVE_ITEM COMPONENT_FILES "${CURRENT_PATH}/${FILE}") + ENDFOREACH(FILE) + ENDIF(COMPONENT_FILES STREQUAL "") + # check the library build type FILE(STRINGS ${CURRENT_PATH}/.windows VALUE REGEX "^not_single_shared_lib=") diff --git a/contrib/platform/win32/CMakeModules/list_subdirs.cmake b/contrib/platform/win32/CMakeModules/list_subdirs.cmake index bcf7c42c71..39220352e9 100644 --- a/contrib/platform/win32/CMakeModules/list_subdirs.cmake +++ b/contrib/platform/win32/CMakeModules/list_subdirs.cmake @@ -1,6 +1,6 @@ # -# Copyright (c) 2009 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. +# Copyright (c) 2009-2010 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -24,7 +24,7 @@ MACRO(CHECK_SUBDIRS CURRENT_DIR OUTPUT_VARIABLE) ERROR_VARIABLE ERROR) IF(NOT "${OUTPUT}" STREQUAL "") - STRING (REGEX MATCHALL "[a-zA-Z1-9_]+" ${OUTPUT_VARIABLE} ${OUTPUT}) + STRING (REGEX MATCHALL "[a-zA-Z0-9_]+" ${OUTPUT_VARIABLE} ${OUTPUT}) ENDIF(NOT "${OUTPUT}" STREQUAL "") ENDMACRO(CHECK_SUBDIRS CURRENT_DIR OUTPUT_VARIABLE) diff --git a/contrib/platform/win32/CMakeModules/ompi_configure.cmake b/contrib/platform/win32/CMakeModules/ompi_configure.cmake index a7fec535f6..583a3b7610 100644 --- a/contrib/platform/win32/CMakeModules/ompi_configure.cmake +++ b/contrib/platform/win32/CMakeModules/ompi_configure.cmake @@ -202,7 +202,9 @@ OMPI_DEF_OPT(OMPI_ENABLE_MPI_PROFILING "Whether we want MPI profiling or not." O OMPI_DEF_OPT(OMPI_ENABLE_THREAD_MULTIPLE "Enable MPI Thread Multiple." OFF) -OMPI_DEF(OPAL_ENABLE_PROGRESS_THREADS 0 "Hardcode the OPAL progress thread to be off." 0 1) +OMPI_DEF(OMPI_ENABLE_PROGRESS_THREADS 0 "Hardcode the OMPI progress thread to be off." 0 1) + +OMPI_DEF(ORTE_ENABLE_PROGRESS_THREADS 0 "Hardcode the ORTE progress thread to be off." 0 1) OMPI_DEF_OPT(OPAL_ENABLE_MULTI_THREADS "Whether we should enable support for multiple user threads" OFF) diff --git a/contrib/platform/win32/CMakeModules/opal_event_config.cmake b/contrib/platform/win32/CMakeModules/opal_event_config.cmake new file mode 100644 index 0000000000..40c505f74d --- /dev/null +++ b/contrib/platform/win32/CMakeModules/opal_event_config.cmake @@ -0,0 +1,60 @@ +# Copyright (c) 2010 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +MESSAGE(STATUS "configure libevent.") + +# set up event include directories. +INCLUDE_DIRECTORIES ("${CURRENT_PATH}/libevent/compat" + "${CURRENT_PATH}/libevent/WIN32-Code/" + "${CURRENT_PATH}/libevent/include/" + "${CURRENT_PATH}/libevent" + "${PROJECT_BINARY_DIR}/mca/event/libevent207/libevent/include/") + +IF(WIN32) + +# generating config.h +# windows doesn't need this file, just make an empty one +FILE(WRITE ${PROJECT_BINARY_DIR}/mca/event/libevent207/libevent/include/config.h + " /* config.h. Generated automatically by CMake. */ ") + + SET(RESULT_SOURCE_FILES + ${RESULT_SOURCE_FILES} + ${CURRENT_PATH}/libevent207_component.c + ${CURRENT_PATH}/libevent207_module.c + #system sources + ${CURRENT_PATH}/libevent/win32select.c + ${CURRENT_PATH}/libevent/evthread_win32.c + ${CURRENT_PATH}/libevent/buffer_iocp.c + ${CURRENT_PATH}/libevent/event_iocp.c + ${CURRENT_PATH}/libevent/bufferevent_async.c + #core sources + ${CURRENT_PATH}/libevent/event.c + ${CURRENT_PATH}/libevent/evthread.c + ${CURRENT_PATH}/libevent/buffer.c + ${CURRENT_PATH}/libevent/bufferevent.c + ${CURRENT_PATH}/libevent/bufferevent_sock.c + ${CURRENT_PATH}/libevent/bufferevent_filter.c + ${CURRENT_PATH}/libevent/bufferevent_pair.c + ${CURRENT_PATH}/libevent/listener.c + ${CURRENT_PATH}/libevent/bufferevent_ratelim.c + ${CURRENT_PATH}/libevent/evmap.c + ${CURRENT_PATH}/libevent/log.c + ${CURRENT_PATH}/libevent/evutil.c + ${CURRENT_PATH}/libevent/evutil_rand.c + ${CURRENT_PATH}/libevent/strlcpy.c + ${CURRENT_PATH}/libevent/signal.c + ${CURRENT_PATH}/libevent/event_tagging.c + ) +ELSE(WIN32) + SET(RESULT_SOURCE_FILES + ${RESULT_SOURCE_FILES} + ) +ENDIF(WIN32) + +SET(RESULT TRUE) \ No newline at end of file diff --git a/opal/CMakeLists.txt b/opal/CMakeLists.txt index ab1ef7ada1..11a990f64f 100644 --- a/opal/CMakeLists.txt +++ b/opal/CMakeLists.txt @@ -32,14 +32,6 @@ IF(OPAL_WANT_LIBLTDL) INCLUDE(find_libltdl) ENDIF(OPAL_WANT_LIBLTDL) -# 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") diff --git a/opal/mca/event/libevent207/.windows b/opal/mca/event/libevent207/.windows new file mode 100644 index 0000000000..61fba52e8f --- /dev/null +++ b/opal/mca/event/libevent207/.windows @@ -0,0 +1,13 @@ +# +# Copyright (c) 2010 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +not_single_shared_lib=1 + +required_check=opal_event_config \ No newline at end of file diff --git a/opal/mca/event/libevent207/Makefile.am b/opal/mca/event/libevent207/Makefile.am index 17fb59330b..7e1382f1d7 100644 --- a/opal/mca/event/libevent207/Makefile.am +++ b/opal/mca/event/libevent207/Makefile.am @@ -7,6 +7,8 @@ # $HEADER$ # +EXTRA_DIST = .windows + AM_CPPFLAGS = -I$(srcdir)/libevent -I$(srcdir)/libevent/include -I$(builddir)/libevent/include SUBDIRS = libevent