Set OMPI_DECLSPEC in CMake files, so that applications that using Open MPI libraries don't need to define OMPI_IMPORTS explicitly.
This commit was SVN r20829.
Этот коммит содержится в:
родитель
0065d7f0c9
Коммит
55161a15cc
@ -133,6 +133,13 @@ SET(OMPI_F90_ABSOLUTE "\"none\"")
|
||||
|
||||
SET(OMPI_F90_BUILD_SIZE "\"small\"")
|
||||
|
||||
# set the im/export decleration here.
|
||||
# Don't bother with OMPI_IMPORTS
|
||||
IF(BUILD_SHARED_LIBS)
|
||||
SET(OMPI_DECLSPEC "__declspec(dllimport)")
|
||||
ELSE(BUILD_SHARED_LIBS)
|
||||
SET(OMPI_DECLSPEC "")
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
###################################################################
|
||||
# Options #
|
||||
@ -255,7 +262,7 @@ ENDIF(OMPI_PROVIDE_MPI_FILE_INTERFACE)
|
||||
|
||||
|
||||
OPTION(OMPI_WANT_CXX_BINDINGS
|
||||
"Whether we want MPI cxx support or not." OFF)
|
||||
"Whether we want MPI cxx support or not." ON)
|
||||
MARK_AS_ADVANCED(OMPI_WANT_CXX_BINDINGS)
|
||||
IF(OMPI_WANT_CXX_BINDINGS)
|
||||
SET(OMPI_WANT_CXX_BINDINGS 1)
|
||||
|
@ -136,6 +136,9 @@
|
||||
/* Whether OMPI should provide MPI File interface */
|
||||
#cmakedefine OMPI_PROVIDE_MPI_FILE_INTERFACE ${OMPI_PROVIDE_MPI_FILE_INTERFACE}
|
||||
|
||||
/* Define OMPI_DECLSPEC based on build type (static/shared). */
|
||||
#define OMPI_DECLSPEC ${OMPI_DECLSPEC}
|
||||
|
||||
#ifndef OMPI_DECLSPEC
|
||||
# if defined(WIN32) || defined(_WIN32)
|
||||
# if defined(OMPI_IMPORTS)
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user