Enable two variables for CPack, for packaging binary tarball and adding a page in the installer.
Enable the debug library suffix, which is extremely necessary on Windows. If users want to debug their own programs in Visual Studio, but linking the programs to the release version libraries of Open MPI, i.e. mixing debug and release version DLLs, that will definitely cause some errors. What we have to do is providing both debug and release versions libraries, distinguished with suffix 'd', e.g. libmpid.dll for debug version. This commit was SVN r20828.
Этот коммит содержится в:
родитель
22b5c536af
Коммит
0065d7f0c9
@ -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
|
||||
")
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user