diff --git a/CMakeLists.txt b/CMakeLists.txt index 92ead56cf7..2a4e7f5d01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,9 @@ IF (NOT CMAKE_BUILD_TYPE) "Choose the type of build, options are: None, Debug, Release, RelWithDebInfo and MinSizeRel." FORCE) ENDIF (NOT CMAKE_BUILD_TYPE) +# add debug-suffix to distinguish between debug and release version libraries. +SET(CMAKE_DEBUG_POSTFIX "d") + # preset install dir IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/installed" CACHE PATH "CMAKE_INSTALL_PREFIX" FORCE) @@ -113,8 +116,9 @@ SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.open-mpi.org") # SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable") -SET(CPACK_NSIS_MODIFY_PATH OFF) +SET(CPACK_NSIS_MODIFY_PATH ON) SET(CPACK_SOURCE_ZIP ON) +SET(CPACK_BINARY_ZIP ON) # setup the register entries when install SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS ${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} " @@ -134,9 +138,6 @@ SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS ${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} " 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 \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\" \\\"PATH\\\" - StrCpy $0 $0;$INSTDIR\\\\bin - WriteRegExpandStr HKLM \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\" \\\"PATH\\\" $0 ") diff --git a/opal/mca/base/mca_base_component_find.c b/opal/mca/base/mca_base_component_find.c index f2c569b4a1..964f4aed6b 100644 --- a/opal/mca/base/mca_base_component_find.c +++ b/opal/mca/base/mca_base_component_find.c @@ -307,6 +307,12 @@ static void find_dyn_components(const char *path, const char *type_name, strncpy(file->filename, found_filenames[i], OMPI_PATH_MAX); file->filename[OMPI_PATH_MAX] = '\0'; 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 *) file); }