diff --git a/contrib/platform/win32/CMakeModules/check_mca_subdirs.cmake b/contrib/platform/win32/CMakeModules/check_mca_subdirs.cmake index 861bd921f8..dadc54e5f9 100644 --- a/contrib/platform/win32/CMakeModules/check_mca_subdirs.cmake +++ b/contrib/platform/win32/CMakeModules/check_mca_subdirs.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2010 High Performance Computing Center Stuttgart, +# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # $COPYRIGHT$ # @@ -286,6 +286,8 @@ ENDIF (OMPI_DEBUG_BUILD) # Install help files if they are here. INSTALL(DIRECTORY ${CURRENT_PATH}/ DESTINATION share/openmpi/ FILES_MATCHING PATTERN "*.txt" + PATTERN "hwloc" EXCLUDE + PATTERN "libevent" EXCLUDE PATTERN ".svn" EXCLUDE PATTERN ".hg" EXCLUDE) diff --git a/contrib/platform/win32/CMakeModules/ompi_check_Microsoft.cmake b/contrib/platform/win32/CMakeModules/ompi_check_Microsoft.cmake index 1b1102817c..279e0d2a7b 100644 --- a/contrib/platform/win32/CMakeModules/ompi_check_Microsoft.cmake +++ b/contrib/platform/win32/CMakeModules/ompi_check_Microsoft.cmake @@ -76,13 +76,12 @@ IF(NOT MICROSOFT_CHECK_DONE) ENDIF(CMAKE_CL_64) FIND_PROGRAM(CL_EXE cl PATHS ${CHECK_PATHS}) - message("${CL_EXE}") # Set up VS environments. GET_FILENAME_COMPONENT(VC_BIN_PATH ${CL_EXE} PATH) GET_FILENAME_COMPONENT(COMPILER_NAME ${CL_EXE} NAME) - SET(CC ${CL_EXE} CACHE INTERNAL "C compiler executable") - SET(CXX ${CL_EXE} CACHE INTERNAL "CXX compiler executable") + SET(CC ${COMPILER_NAME} CACHE INTERNAL "C compiler executable") + SET(CXX ${COMPILER_NAME} CACHE INTERNAL "CXX compiler executable") GET_FILENAME_COMPONENT(SDK_ROOT_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE) IF(CMAKE_CL_64) diff --git a/contrib/platform/win32/CMakeModules/ompi_check_MinGW.cmake b/contrib/platform/win32/CMakeModules/ompi_check_MinGW.cmake index 741b9aaa7c..7d2d2955f5 100644 --- a/contrib/platform/win32/CMakeModules/ompi_check_MinGW.cmake +++ b/contrib/platform/win32/CMakeModules/ompi_check_MinGW.cmake @@ -47,8 +47,8 @@ IF(NOT MINGW_CHECK_DONE) MESSAGE( STATUS "Start MinGW specific detection....") - GET_FILENAME_COMPONENT(CC ${CC} ABSOLUTE) - GET_FILENAME_COMPONENT(CXX ${CXX} ABSOLUTE) + GET_FILENAME_COMPONENT(CC ${CC} NAME) + GET_FILENAME_COMPONENT(CXX ${CXX} NAME) # Default compiler settings. SET(OMPI_C_OPTION_COMPILE "-c" CACHE INTERNAL diff --git a/contrib/platform/win32/CMakeModules/ompi_configure.cmake b/contrib/platform/win32/CMakeModules/ompi_configure.cmake index cd3baa70f8..ff9e87a277 100644 --- a/contrib/platform/win32/CMakeModules/ompi_configure.cmake +++ b/contrib/platform/win32/CMakeModules/ompi_configure.cmake @@ -1,5 +1,5 @@ # -# Copyright (c) 2007-2011 High Performance Computing Center Stuttgart, +# Copyright (c) 2007-2012 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 @@ -200,7 +200,10 @@ OMPI_DEF_OPT(enable-mpi-cxx OMPI_BUILD_CXX_BINDINGS "Whether we want MPI cxx sup OMPI_DEF_OPT(enable-mpi-fortran OMPI_BUILD_FORTRAN_USEMPI_BINDINGS "Whether we want MPI FORTRAN support or not." OFF) -OMPI_DEF(OMPI_BUILD_FORTRAN_F08_SUBARRAYS 0 "fortran compiler has fortran08 subarrays" 0 1) +OMPI_DEF_OPT(enable-mpi-f08-subarray-prototype OMPI_BUILD_FORTRAN_F08_SUBARRAYS 0 + "Use the PROTOTYPE and SEVERLY FUNCTIONALITY-LIMITED Fortran 08 'use mpi_f08' +implementation that supports subarrrays (via Fortran descriptors). +This option will disable the normal 'use mpi_f08' implementation and *only* build the prototype implementation." 0 1) OMPI_DEF(OMPI_FORTRAN_HAVE_PRIVATE 0 "fortran compiler has private" 0 1) @@ -645,6 +648,17 @@ OMPI_CHECK_TYPES (uintptr_t UINTPTR_T none c) ################################################################### # Check Fortran 77 types # ################################################################### + +IF(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) + SET(OMPI_WANT_FORTRAN_BINDINGS 1 CACHE INTERNAL "Whether we want MPI FORTRAN support or not.") + SET(OMPI_WANT_FORTRAN_MPIFH_BINDINGS 1 CACHE INTERNAL "OMPI_WANT_FORTRAN_MPIFH_BINDINGS") + SET(OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS 1 CACHE INTERNAL "OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS") +ELSE(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) + SET(OMPI_WANT_FORTRAN_BINDINGS 0 CACHE INTERNAL "Whether we want MPI FORTRAN support or not.") + SET(OMPI_WANT_FORTRAN_MPIFH_BINDINGS 0 CACHE INTERNAL "OMPI_WANT_FORTRAN_MPIFH_BINDINGS") + SET(OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS 0 CACHE INTERNAL "OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS") +ENDIF(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) + INCLUDE(setup_fortran) INCLUDE(fortran_check) INCLUDE(fortran_check_real16_c_equiv) diff --git a/contrib/platform/win32/CMakeModules/opal_hwloc_config.cmake b/contrib/platform/win32/CMakeModules/opal_hwloc_config.cmake index f6ae082d61..7f047dfac5 100644 --- a/contrib/platform/win32/CMakeModules/opal_hwloc_config.cmake +++ b/contrib/platform/win32/CMakeModules/opal_hwloc_config.cmake @@ -18,7 +18,9 @@ INCLUDE_DIRECTORIES ("${CURRENT_PATH}/" SET(HWLOC_PATH ${CURRENT_PATH} CACHE INERNAL "path to hwloc dir") -SET(RESULT_COMPONENT_FILES +IF(WIN32) + + SET(RESULT_COMPONENT_FILES ${RESULT_COMPONENT_FILES} ${CURRENT_PATH}/${hwloc_dir}_component.c ${CURRENT_PATH}/hwloc/src/bind.c @@ -33,6 +35,50 @@ SET(RESULT_COMPONENT_FILES ${CURRENT_PATH}/hwloc/src/topology-xml.c ${CURRENT_PATH}/hwloc/src/topology.c ${CURRENT_PATH}/hwloc/src/traversal.c + ) + + IF(WINDOWS_VS) + SET(OBJ_PATH "${PROJECT_BINARY_DIR}/libopen-pal.dir/${CMAKE_CFG_INTDIR}") + # for generating the static library, as opal will not export event API any more. + SET(HWLOC_OBJ_FILES + ${OBJ_PATH}/${hwloc_dir}_component.obj + ${OBJ_PATH}/bind.obj + ${OBJ_PATH}/cpuset.obj + ${OBJ_PATH}/distances.obj + ${OBJ_PATH}/dolib.obj + ${OBJ_PATH}/misc.obj + ${OBJ_PATH}/topology-libpci.obj + ${OBJ_PATH}/topology-synthetic.obj + ${OBJ_PATH}/topology-windows.obj + ${OBJ_PATH}/topology-x86.obj + ${OBJ_PATH}/topology-xml.obj + ${OBJ_PATH}/topology.obj + ${OBJ_PATH}/traversal.obj + CACHE INTERNAL "hwloc obj files") + ELSEIF(WINDOWS_MINGW) + SET(OBJ_PATH "${PROJECT_BINARY_DIR}/libopen-pal.dir/${CMAKE_CFG_INTDIR}") + # for generating the static library, as opal will not export event API any more. + SET(HWLOC_OBJ_FILES + ${OBJ_PATH}/${hwloc_dir}_component.obj + ${OBJ_PATH}/bind.obj + ${OBJ_PATH}/cpuset.obj + ${OBJ_PATH}/distances.obj + ${OBJ_PATH}/dolib.obj + ${OBJ_PATH}/misc.obj + ${OBJ_PATH}/topology-libpci.obj + ${OBJ_PATH}/topology-synthetic.obj + ${OBJ_PATH}/topology-windows.obj + ${OBJ_PATH}/topology-x86.obj + ${OBJ_PATH}/topology-xml.obj + ${OBJ_PATH}/topology.obj + ${OBJ_PATH}/traversal.obj + CACHE INTERNAL "hwloc obj files") + ENDIF(WINDOWS_VS) + +ELSE(WIN32) + SET(RESULT_COMPONENT_FILES + ${RESULT_COMPONENT_FILES} ) +ENDIF(WIN32) SET(RESULT TRUE) \ No newline at end of file diff --git a/contrib/platform/win32/examples/chello.vcxproj b/contrib/platform/win32/examples/chello.vcxproj new file mode 100644 index 0000000000..3f8cc496af --- /dev/null +++ b/contrib/platform/win32/examples/chello.vcxproj @@ -0,0 +1,261 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + MinSizeRel + Win32 + + + RelWithDebInfo + Win32 + + + + {2D02214A-D960-4FED-95AA-A30F7784A0E3} + Win32Proj + Win32 + chello + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + <_ProjectFileVersion>10.0.20506.1 + chello.dir\Debug\ + chello + .exe + true + true + chello.dir\Release\ + chello + .exe + false + true + chello.dir\MinSizeRel\ + chello + .exe + false + true + chello.dir\RelWithDebInfo\ + chello + .exe + true + true + + + + /Zm1000 %(AdditionalOptions) + ..\..\include + EnableFastChecks + CompileAsC + ProgramDatabase + + + Disabled + Disabled + MultiThreadedDebugDLL + Level3 + WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) + Debug + $(IntDir) + + + WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) + ..\..\include + + + ..\..\include + $(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + /machine:X86 /debug %(AdditionalOptions) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;..\..\lib\libmpi.lib;..\..\lib\libopen-pal.lib;..\..\lib\libopen-rte.lib + + + true + true + 10000000 + Console + + + + + false + + + + + /Zm1000 %(AdditionalOptions) + ..\..\include + CompileAsC + + + AnySuitable + MaxSpeed + MultiThreadedDLL + Level3 + + + WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) + Release + $(IntDir) + + + WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) + ..\..\include + + + ..\..\include + $(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + /machine:X86 %(AdditionalOptions) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;..\..\lib\libmpi.lib;..\..\lib\libopen-pal.lib;..\..\lib\libopen-rte.lib + + + false + 10000000 + Console + + + + + false + + + + + /Zm1000 %(AdditionalOptions) + ..\..\include + CompileAsC + + + OnlyExplicitInline + MinSpace + MultiThreadedDLL + Level3 + + + WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="MinSizeRel";%(PreprocessorDefinitions) + MinSizeRel + $(IntDir) + + + WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"MinSizeRel\";%(PreprocessorDefinitions) + ..\..\include + + + ..\..\include + $(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + /machine:X86 %(AdditionalOptions) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;..\..\lib\libmpi.lib;..\..\lib\libopen-pal.lib;..\..\lib\libopen-rte.lib + + + false + 10000000 + Console + + + + + false + + + + + /Zm1000 %(AdditionalOptions) + ..\..\include + CompileAsC + ProgramDatabase + + + OnlyExplicitInline + MaxSpeed + MultiThreadedDLL + Level3 + WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions) + RelWithDebInfo + $(IntDir) + + + WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions) + ..\..\include + + + ..\..\include + $(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + /machine:X86 /debug %(AdditionalOptions) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;..\..\lib\libmpi.lib;..\..\lib\libopen-pal.lib;..\..\lib\libopen-rte.lib + + + true + true + 10000000 + Console + + + + + false + + + + + + + + + diff --git a/ompi/CMakeLists.txt b/ompi/CMakeLists.txt index c22d84b50b..94b90dd660 100644 --- a/ompi/CMakeLists.txt +++ b/ompi/CMakeLists.txt @@ -123,8 +123,17 @@ IF (BUILD_SHARED_LIBS) SET_TARGET_PROPERTIES(libmpi PROPERTIES COMPILE_DEFINITIONS "_USRDLL;HAVE_CONFIG_H;OMPI_EXPORTS;OPAL_IMPORTS;ORTE_IMPORTS" COMPILE_FLAGS "${OMPI_CXX_LAN_FLAG}" PREFIX "" IMPORT_PREFIX "") - TARGET_LINK_LIBRARIES (libmpi ${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event${CMAKE_DEBUG_POSTFIX}.lib - libopen-rte Ws2_32.lib shlwapi.lib ${EXTRA_LINK_LIBRARIES}) + + IF(WINDOWS_MINGW) + TARGET_LINK_LIBRARIES (libmpi ${OpenMPI_BINARY_DIR}/event${CMAKE_DEBUG_POSTFIX}.lib + ${OpenMPI_BINARY_DIR}/hwloc${CMAKE_DEBUG_POSTFIX}.lib + libopen-rte Ws2_32.lib shlwapi.lib ${EXTRA_LINK_LIBRARIES}) + ELSEIF(WINDOWS_VS) + TARGET_LINK_LIBRARIES (libmpi ${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event${CMAKE_DEBUG_POSTFIX}.lib + ${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/hwloc${CMAKE_DEBUG_POSTFIX}.lib + libopen-rte Ws2_32.lib shlwapi.lib ${EXTRA_LINK_LIBRARIES}) + ENDIF(WINDOWS_MINGW) + ELSE (BUILD_SHARED_LIBS) SET_TARGET_PROPERTIES(libmpi PROPERTIES COMPILE_DEFINITIONS "${OMPI_C_DEF_PRE}_LIB") ENDIF(BUILD_SHARED_LIBS) @@ -145,7 +154,7 @@ INSTALL(TARGETS libmpi RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -INSTALL(FILES ${PROJECT_BINARY_DIR}/include/mpi.h ${PROJECT_SOURCE_DIR}/include/mpi_portable_platform.h +INSTALL(FILES ${PROJECT_BINARY_DIR}/include/user/mpi.h ${PROJECT_SOURCE_DIR}/include/mpi_portable_platform.h DESTINATION include) INSTALL(FILES errhandler/help-mpi-errors.txt diff --git a/ompi/mpi/CMakeLists.txt b/ompi/mpi/CMakeLists.txt index 9021cd1367..45161e98af 100644 --- a/ompi/mpi/CMakeLists.txt +++ b/ompi/mpi/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart, +# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # $COPYRIGHT$ # @@ -13,10 +13,8 @@ ELSE(OMPI_BUILD_CXX_BINDINGS) MESSAGE(STATUS "Skipping MPI C++ interface") ENDIF(OMPI_BUILD_CXX_BINDINGS) -IF(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) - SET(OMPI_WANT_FORTRAN_BINDINGS 1 CACHE INTERNAL "Whether we want MPI FORTRAN support or not.") +IF(OMPI_WANT_FORTRAN_BINDINGS) ADD_SUBDIRECTORY(fortran/mpif-h) -ELSE(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) - SET(OMPI_WANT_FORTRAN_BINDINGS 0 CACHE INTERNAL "Whether we want MPI FORTRAN support or not.") +ELSE(OMPI_WANT_FORTRAN_BINDINGS) MESSAGE(STATUS "Skipping MPI FORTRAN interface") -ENDIF(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS) +ENDIF(OMPI_WANT_FORTRAN_BINDINGS) diff --git a/ompi/mpi/fortran/mpif-h/CMakeLists.txt b/ompi/mpi/fortran/mpif-h/CMakeLists.txt index bfc6410322..9e18bd4bd3 100644 --- a/ompi/mpi/fortran/mpif-h/CMakeLists.txt +++ b/ompi/mpi/fortran/mpif-h/CMakeLists.txt @@ -70,6 +70,6 @@ INSTALL(TARGETS libmpi_fortran ARCHIVE DESTINATION lib) IF (OMPI_DEBUG_BUILD AND WINDOWS_VS) - INSTALL(FILES ${OpenMPI_BINARY_DIR}/Debug/libmpi_mpifh{CMAKE_DEBUG_POSTFIX}.pdb + INSTALL(FILES ${OpenMPI_BINARY_DIR}/Debug/libmpi_fortran${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin) ENDIF (OMPI_DEBUG_BUILD AND WINDOWS_VS) diff --git a/ompi/tools/CMakeLists.txt b/ompi/tools/CMakeLists.txt index ddfc9a648b..c6f56766be 100644 --- a/ompi/tools/CMakeLists.txt +++ b/ompi/tools/CMakeLists.txt @@ -60,7 +60,7 @@ ENDIF(WINDOWS_VS) IF(BUILD_SHARED_LIBS) SET(OMPI_WRAPPER_EXTRA_CFLAGS - "${OMPI_C_LAN_FLAG} ${OMPI_C_DEF_PRE}OMPI_IMPORTS ${OMPI_C_DEF_PRE}OPAL_IMPORTS ${OMPI_C_DEF_PRE}ORTE_IMPORTS") + "${OMPI_C_LAN_FLAG}") ELSE(BUILD_SHARED_LIBS) IF(OMPI_DEBUG_BUILD) SET(OMPI_WRAPPER_EXTRA_CFLAGS "${OMPI_C_LAN_FLAG} ${OMPI_C_MD_DEBUG}") @@ -92,7 +92,7 @@ IF(OMPI_BUILD_CXX_BINDINGS) IF(BUILD_SHARED_LIBS) SET(OMPI_WRAPPER_EXTRA_CXXFLAGS - "${OMPI_CXX_LAN_FLAG} ${OMPI_CXX_EXCEPTION} ${OMPI_C_DEF_PRE}OMPI_IMPORTS ${OMPI_C_DEF_PRE}OPAL_IMPORTS ${OMPI_C_DEF_PRE}ORTE_IMPORTS") + "${OMPI_CXX_LAN_FLAG} ${OMPI_CXX_EXCEPTION}") ELSE(BUILD_SHARED_LIBS) IF(OMPI_DEBUG_BUILD) SET(OMPI_WRAPPER_EXTRA_CXXFLAGS "${OMPI_CXX_LAN_FLAG} ${OMPI_CXX_EXCEPTION} ${OMPI_C_MD_DEBUG}") diff --git a/opal/CMakeLists.txt b/opal/CMakeLists.txt index 8f78c818e6..0c7ba41a89 100644 --- a/opal/CMakeLists.txt +++ b/opal/CMakeLists.txt @@ -107,12 +107,22 @@ IF (BUILD_SHARED_LIBS) WORKING_DIRECTORY ${PROJECT_BINARY_DIR} COMMENT "Generating static event library." ) + ADD_CUSTOM_COMMAND(TARGET libopen-pal POST_BUILD + COMMAND ar -rcs ${OpenMPI_BINARY_DIR}/hwloc${CMAKE_DEBUG_POSTFIX}.lib ${HWLOC_OBJ_FILES} + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + COMMENT "Generating static hwloc library." + ) ELSEIF(WINDOWS_VS) ADD_CUSTOM_COMMAND(TARGET libopen-pal POST_BUILD COMMAND ${OMPI_LIB_CMD} ${OMPI_LIB_CMD_OUTPUT}${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event${CMAKE_DEBUG_POSTFIX}.lib ${EVENT_OBJ_FILES} WORKING_DIRECTORY ${PROJECT_BINARY_DIR} COMMENT "Generating static event library." ) + ADD_CUSTOM_COMMAND(TARGET libopen-pal POST_BUILD + COMMAND ${OMPI_LIB_CMD} ${OMPI_LIB_CMD_OUTPUT}${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/hwloc${CMAKE_DEBUG_POSTFIX}.lib ${HWLOC_OBJ_FILES} + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + COMMENT "Generating static hwloc library." + ) ENDIF(WINDOWS_MINGW) SET_TARGET_PROPERTIES(libopen-pal PROPERTIES COMPILE_DEFINITIONS "_USRDLL;OPAL_EXPORTS" diff --git a/opal/include/CMakeLists.txt b/opal/include/CMakeLists.txt index 269b1e1332..1ef2fd5877 100644 --- a/opal/include/CMakeLists.txt +++ b/opal/include/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (c) 2007-2010 High Performance Computing Center Stuttgart, +# Copyright (c) 2007-2012 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 @@ -30,6 +30,14 @@ FILE(WRITE ${OpenMPI_BINARY_DIR}/ompi/include/mpi.h.in "${MPI_H_OUT}") # generate mpi.h CONFIGURE_FILE(${OpenMPI_BINARY_DIR}/ompi/include/mpi.h.in ${OpenMPI_BINARY_DIR}/ompi/include/mpi.h) + +#define OMPI/ORTE/OPAL_IMPORTS in mpi.h, then we dont't need to define it in the command line or solution config. +#this mpi.h is used only for user programs +STRING(REPLACE "define OMPI_MPI_H" + "define OMPI_MPI_H\n\n#define OMPI_IMPORTS\n#define OPAL_IMPORTS\n#define ORTE_IMPORTS" MPI_H_OUT "${MPI_H_OUT}") +FILE(WRITE ${OpenMPI_BINARY_DIR}/ompi/include/user/mpi.h.in "${MPI_H_OUT}") +CONFIGURE_FILE(${OpenMPI_BINARY_DIR}/ompi/include/user/mpi.h.in ${OpenMPI_BINARY_DIR}/ompi/include/user/mpi.h) + IF(OMPI_WANT_FORTRAN_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-common.h.fin ${OpenMPI_BINARY_DIR}/ompi/include/mpif-common.h) diff --git a/orte/CMakeLists.txt b/orte/CMakeLists.txt index dfe3467b5a..3f23529deb 100644 --- a/orte/CMakeLists.txt +++ b/orte/CMakeLists.txt @@ -66,9 +66,11 @@ IF (BUILD_SHARED_LIBS) IF(WINDOWS_MINGW) TARGET_LINK_LIBRARIES(libopen-rte ${OpenMPI_BINARY_DIR}/event${CMAKE_DEBUG_POSTFIX}.lib + ${OpenMPI_BINARY_DIR}/hwloc${CMAKE_DEBUG_POSTFIX}.lib libopen-pal Ws2_32.lib shlwapi.lib) ELSEIF(WINDOWS_VS) TARGET_LINK_LIBRARIES(libopen-rte ${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event${CMAKE_DEBUG_POSTFIX}.lib + ${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/hwloc${CMAKE_DEBUG_POSTFIX}.lib libopen-pal Ws2_32.lib shlwapi.lib) ENDIF(WINDOWS_MINGW) ELSE (BUILD_SHARED_LIBS) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 05c2644727..d6a194e25a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2008 High Performance Computing Center Stuttgart, +# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # $COPYRIGHT$ # @@ -8,5 +8,18 @@ # +ADD_SUBDIRECTORY(mpi) -ADD_SUBDIRECTORY(mpi) \ No newline at end of file + +FILE(READ ${OpenMPI_SOURCE_DIR}/contrib/platform/win32/examples/chello.vcxproj EXAMPLE_SOLUTION) + +IF(CMAKE_CL_64) + STRING(REPLACE "Win32" "X64" EXAMPLE_SOLUTION "${EXAMPLE_SOLUTION}") + STRING(REPLACE "X86" "X64" EXAMPLE_SOLUTION "${EXAMPLE_SOLUTION}") +ENDIF(CMAKE_CL_64) + +FILE(WRITE ${OpenMPI_BINARY_DIR}/test/chello.vcxproj "${EXAMPLE_SOLUTION}") + +INSTALL(FILES ${OpenMPI_SOURCE_DIR}/test/mpi/environment/chello.c + ${OpenMPI_BINARY_DIR}/test/chello.vcxproj + DESTINATION share/examples) \ No newline at end of file diff --git a/test/mpi/environment/CMakeLists.txt b/test/mpi/environment/CMakeLists.txt index 4949b35c39..9f87335d4b 100644 --- a/test/mpi/environment/CMakeLists.txt +++ b/test/mpi/environment/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2010 High Performance Computing Center Stuttgart, +# Copyright (c) 2007-2012 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # $COPYRIGHT$ # @@ -15,8 +15,4 @@ SET(CHELLO_FILES ADD_EXECUTABLE (chello ${CHELLO_FILES}) -TARGET_LINK_LIBRARIES (chello libmpi) - -INSTALL(FILES ${OpenMPI_SOURCE_DIR}/test/mpi/environment/chello.c - ${OpenMPI_BINARY_DIR}/test/mpi/environment/chello.* - DESTINATION share/examples) \ No newline at end of file +TARGET_LINK_LIBRARIES (chello libmpi) \ No newline at end of file