1
1

Make the compiler wrapper find the correct version of libraries, i.e. debug or release version based on build type.

This commit was SVN r20852.
Этот коммит содержится в:
Shiqing Fan 2009-03-24 10:42:37 +00:00
родитель aef296bee8
Коммит 8bb6bb97a4
3 изменённых файлов: 19 добавлений и 4 удалений

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

@ -16,7 +16,7 @@ extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags=@OMPI_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=@OMPI_WRAPPER_CXX_LIB@ libmpi.lib libopen-rte.lib libopen-pal.lib @OMPI_WRAPPER_EXTRA_LIBS@
libs=@OMPI_WRAPPER_CXX_LIB@ @OMPI_WRAPPER_EXTRA_LIBS@
required_file=@OMPI_WRAPPER_CXX_REQUIRED_FILE@
includedir=${includedir}
libdir=${libdir}

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

@ -16,7 +16,7 @@ extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@
preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@
compiler_flags=@OMPI_WRAPPER_EXTRA_CFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=libmpi.lib libopen-rte.lib libopen-pal.lib @OMPI_WRAPPER_EXTRA_LIBS@
libs=@OMPI_WRAPPER_EXTRA_LIBS@
required_file=
includedir=${includedir}
libdir=${libdir}

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

@ -13,7 +13,15 @@
ADD_SUBDIRECTORY(ompi_info)
ADD_SUBDIRECTORY(ompi-server)
SET(OMPI_WRAPPER_EXTRA_LIBS "advapi32.lib Ws2_32.lib shlwapi.lib")
# select debug or release libraries at configure time
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(OMPI_WRAPPER_EXTRA_LIBS
"libmpid.lib libopen-pald.lib libopen-rted.lib advapi32.lib Ws2_32.lib shlwapi.lib")
ELSE(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(OMPI_WRAPPER_EXTRA_LIBS
"libmpi.lib libopen-pal.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib")
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
GET_FILENAME_COMPONENT(CC "${CL_EXE}" NAME)
IF(BUILD_SHARED_LIBS)
SET(OMPI_WRAPPER_EXTRA_CFLAGS
@ -40,7 +48,14 @@ IF(OMPI_WANT_CXX_BINDINGS)
ELSE(BUILD_SHARED_LIBS)
SET(OMPI_WRAPPER_EXTRA_CXXFLAGS "/TP /EHsc")
ENDIF(BUILD_SHARED_LIBS)
SET(OMPI_WRAPPER_CXX_LIB "libmpi_cxx.lib")
# select debug or release libraries at configure time
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(OMPI_WRAPPER_CXX_LIB "libmpid.lib libopen-pald.lib libopen-rted.lib libmpi_cxxd.lib")
ELSE(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(OMPI_WRAPPER_CXX_LIB "libmpi.lib libopen-pal.lib libopen-rte.lib libmpi_cxx.lib")
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpic++-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpic++-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpic++-wrapper-data.txt