Add an option to enable the debug postfix for executables.
This commit was SVN r24070.
Этот коммит содержится в:
родитель
4b14a6416f
Коммит
358b4a5cba
@ -34,10 +34,15 @@ ENDIF (NOT CMAKE_BUILD_TYPE)
|
||||
STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
|
||||
IF(${CMAKE_BUILD_TYPE} STREQUAL "debug")
|
||||
SET(OMPI_DEBUG_BUILD 1)
|
||||
# add debug-suffix to distinguish between debug and release version libraries.
|
||||
SET(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
OPTION(WANT_EXE_DEBUG_POSTFIX "Whether we want postfix for executables" OFF)
|
||||
IF(WANT_EXE_DEBUG_POSTFIX)
|
||||
SET(OMPI_EXE_DEBUG_POSTFIX "d")
|
||||
ENDIF(WANT_EXE_DEBUG_POSTFIX)
|
||||
ENDIF(${CMAKE_BUILD_TYPE} STREQUAL "debug")
|
||||
|
||||
# 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)
|
||||
@ -73,7 +78,7 @@ SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OpenMPI_BINARY_DIR})
|
||||
SET (CMAKE_SUPPRESS_REGENERATION true)
|
||||
|
||||
# Dynamic/shared build, the default is set to static(OFF)
|
||||
OPTION(BUILD_SHARED_LIBS "Wether we want to build shared libraries." ON)
|
||||
OPTION(BUILD_SHARED_LIBS "Whether we want to build shared libraries." ON)
|
||||
|
||||
IF(CMAKE_CL_64)
|
||||
SET(COMPILER_TYPE "x64")
|
||||
|
@ -31,12 +31,12 @@ MACRO(CONFIGURE_WRAPPER_DATA_FILE APP_NAME)
|
||||
FILE(WRITE ${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}-wrapper-data.txt.in "${OUTPUT}")
|
||||
|
||||
CONFIGURE_FILE(${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}-wrapper-data.txt.in
|
||||
${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}-wrapper-data.txt @ONLY)
|
||||
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}-wrapper-data.txt
|
||||
${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}${OMPI_EXE_DEBUG_POSTFIX}-wrapper-data.txt @ONLY)
|
||||
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}${OMPI_EXE_DEBUG_POSTFIX}-wrapper-data.txt
|
||||
DESTINATION share/openmpi)
|
||||
CONFIGURE_FILE(${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}-wrapper-data.txt.in
|
||||
${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}.exe-wrapper-data.txt @ONLY)
|
||||
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}.exe-wrapper-data.txt
|
||||
${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}${OMPI_EXE_DEBUG_POSTFIX}.exe-wrapper-data.txt @ONLY)
|
||||
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/${APP_NAME}${OMPI_EXE_DEBUG_POSTFIX}.exe-wrapper-data.txt
|
||||
DESTINATION share/openmpi)
|
||||
ENDMACRO()
|
||||
|
||||
|
@ -22,6 +22,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(ompi-server PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (ompi-server libmpi libopen-pal libopen-rte Ws2_32.lib shlwapi.lib)
|
||||
|
||||
INSTALL(TARGETS ompi-server
|
||||
|
@ -19,6 +19,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(ompi_info PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (ompi_info libmpi libopen-rte libopen-pal Ws2_32.lib shlwapi.lib)
|
||||
|
||||
INSTALL(TARGETS ompi_info
|
||||
|
@ -19,6 +19,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(opal-checkpoint PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (opal-checkpoint libopen-pal Ws2_32.lib shlwapi.lib)
|
||||
|
||||
INSTALL(TARGETS opal-checkpoint
|
||||
|
@ -19,6 +19,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(opal-restart PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (opal-restart libopen-pal Ws2_32.lib shlwapi.lib)
|
||||
|
||||
INSTALL(TARGETS opal-restart
|
||||
|
@ -19,28 +19,31 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(opal-wrapper PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (opal-wrapper libopen-pal Ws2_32.lib shlwapi.lib)
|
||||
|
||||
ADD_CUSTOM_COMMAND (TARGET opal-wrapper
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
|
||||
${PROJECT_BINARY_DIR}/mpicc.exe
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
${PROJECT_BINARY_DIR}/mpicc${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
COMMENT "Copying C compiler wrappers...")
|
||||
|
||||
IF(OMPI_WANT_CXX_BINDINGS)
|
||||
ADD_CUSTOM_COMMAND (TARGET opal-wrapper
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
|
||||
${PROJECT_BINARY_DIR}/mpic++.exe
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper${OMPI_EXE_DEBUG_POSTFIXX}.exe
|
||||
${PROJECT_BINARY_DIR}/mpic++${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
|
||||
${PROJECT_BINARY_DIR}/mpicxx.exe
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
${PROJECT_BINARY_DIR}/mpicxx${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
COMMENT "Copying C++ compiler wrappers...")
|
||||
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpic++.exe
|
||||
${PROJECT_BINARY_DIR}/mpicxx.exe
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpic++${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
${PROJECT_BINARY_DIR}/mpicxx${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
DESTINATION bin)
|
||||
ENDIF(OMPI_WANT_CXX_BINDINGS)
|
||||
|
||||
@ -48,11 +51,11 @@ IF(OMPI_WANT_F77_BINDINGS)
|
||||
ADD_CUSTOM_COMMAND(TARGET opal-wrapper
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
|
||||
${PROJECT_BINARY_DIR}/mpif77.exe
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
${PROJECT_BINARY_DIR}/mpif77${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
COMMENT "Copying F77 compiler wrappers...")
|
||||
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpif77.exe
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpif77${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
DESTINATION bin)
|
||||
ENDIF(OMPI_WANT_F77_BINDINGS)
|
||||
|
||||
@ -60,15 +63,15 @@ ADD_CUSTOM_COMMAND (TARGET opal-wrapper
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${PROJECT_SOURCE_DIR}/tools/wrappers/help-opal-wrapper.txt
|
||||
${PROJECT_BINARY_DIR}/help-opal-wrapper.exe.txt
|
||||
${PROJECT_BINARY_DIR}/help-opal-wrapper${OMPI_EXE_DEBUG_POSTFIX}.exe.txt
|
||||
COMMENT "Copying wrapper help files...")
|
||||
|
||||
INSTALL(TARGETS opal-wrapper
|
||||
DESTINATION bin)
|
||||
INSTALL(FILES help-opal-wrapper.txt
|
||||
${PROJECT_BINARY_DIR}/help-opal-wrapper.exe.txt
|
||||
${PROJECT_BINARY_DIR}/help-opal-wrapper${OMPI_EXE_DEBUG_POSTFIX}.exe.txt
|
||||
DESTINATION share/openmpi)
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpicc.exe
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpicc${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
DESTINATION bin)
|
||||
|
||||
IF(WANT_INSTALL_HEADERS)
|
||||
@ -76,16 +79,16 @@ IF(WANT_INSTALL_HEADERS)
|
||||
ADD_CUSTOM_COMMAND (TARGET opal-wrapper
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
|
||||
${PROJECT_BINARY_DIR}/opalcc.exe
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
${PROJECT_BINARY_DIR}/opalcc${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
COMMENT "Copying renamed executables...")
|
||||
|
||||
IF(OMPI_WANT_CXX_BINDINGS)
|
||||
ADD_CUSTOM_COMMAND (TARGET opal-wrapper
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper.exe
|
||||
${PROJECT_BINARY_DIR}/opalc++.exe
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/opal-wrapper${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
${PROJECT_BINARY_DIR}/opalc++${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
COMMENT "Copying renamed executables...")
|
||||
|
||||
CONFIGURE_FILE(${OPAL_SOURCE_DIR}/tools/wrappers/opalc++-wrapper-data.txt.in
|
||||
|
@ -19,6 +19,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(orte-checkpoint PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (orte-checkpoint libopen-pal libopen-rte Ws2_32.lib shlwapi.lib)
|
||||
|
||||
ADD_CUSTOM_COMMAND (TARGET orte-checkpoint
|
||||
|
@ -19,6 +19,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(orte-clean PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (orte-clean libopen-pal libopen-rte Ws2_32.lib shlwapi.lib)
|
||||
|
||||
ADD_CUSTOM_COMMAND (TARGET orte-clean
|
||||
|
@ -19,6 +19,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
COMPILE_FLAGS "-D_USRDLL -DOPAL_IMPORTS -DOMPI_IMPORTS -DORTE_IMPORTS /TP")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(orte-migrate PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (orte-migrate Ws2_32.lib shlwapi.lib)
|
||||
|
||||
ADD_DEPENDENCIES (orte-migrate libopen-pal libopen-rte)
|
||||
|
@ -19,6 +19,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(orte-ps PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (orte-ps libopen-pal libopen-rte Ws2_32.lib shlwapi.lib)
|
||||
|
||||
ADD_CUSTOM_COMMAND (TARGET orte-ps
|
||||
|
@ -18,4 +18,7 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(orte-restart PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (orte-restart libopen-pal libopen-rte)
|
||||
|
@ -19,6 +19,9 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(orted PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (orted libopen-pal libopen-rte Ws2_32.lib shlwapi.lib)
|
||||
|
||||
INSTALL(TARGETS orted
|
||||
|
@ -19,23 +19,26 @@ IF(BUILD_SHARED_LIBS)
|
||||
${OMPI_CXX_LAN_FLAG}")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
SET_TARGET_PROPERTIES(orterun PROPERTIES
|
||||
DEBUG_POSTFIX "${OMPI_EXE_DEBUG_POSTFIX}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (orterun libopen-pal libopen-rte Ws2_32.lib shlwapi.lib)
|
||||
|
||||
ADD_CUSTOM_COMMAND (TARGET orterun
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/orterun.exe
|
||||
${PROJECT_BINARY_DIR}/mpirun.exe
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/orterun${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
${PROJECT_BINARY_DIR}/mpirun${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/orterun.exe
|
||||
${PROJECT_BINARY_DIR}/mpiexec.exe
|
||||
${OpenMPI_BINARY_DIR}/${CMAKE_CFG_INTDIR}/orterun${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
${PROJECT_BINARY_DIR}/mpiexec${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
COMMENT "Copying renamed executables...")
|
||||
|
||||
INSTALL(TARGETS orterun
|
||||
DESTINATION bin)
|
||||
INSTALL(FILES help-orterun.txt DESTINATION share/openmpi)
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpirun.exe
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpirun${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
DESTINATION bin)
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpiexec.exe
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpiexec${OMPI_EXE_DEBUG_POSTFIX}.exe
|
||||
DESTINATION bin)
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user