diff --git a/ompi/tools/CMakeLists.txt b/ompi/tools/CMakeLists.txt index a553bee31e..1839e871b9 100644 --- a/ompi/tools/CMakeLists.txt +++ b/ompi/tools/CMakeLists.txt @@ -27,7 +27,11 @@ IF(BUILD_SHARED_LIBS) SET(OMPI_WRAPPER_EXTRA_CFLAGS "/TC /D \"OMPI_IMPORTS\" /D \"OPAL_IMPORTS\" /D \"ORTE_IMPORTS\"") ELSE(BUILD_SHARED_LIBS) - SET(OMPI_WRAPPER_EXTRA_CFLAGS "/TC") + IF(CMAKE_BUILD_TYPE STREQUAL "Debug") + SET(OMPI_WRAPPER_EXTRA_CFLAGS "/TC /MDd") + ELSE(CMAKE_BUILD_TYPE STREQUAL "Debug") + SET(OMPI_WRAPPER_EXTRA_CFLAGS "/TC /MD") + ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug") ENDIF(BUILD_SHARED_LIBS) CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpicc-wrapper-data.txt.cmake @@ -95,4 +99,3 @@ IF(OMPI_WANT_F90_BINDINGS) INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif90.exe-wrapper-data.txt DESTINATION share/openmpi) ENDIF(OMPI_WANT_F90_BINDINGS) -