1
1

Get rid of several shadow files for windows build, use the same input file as on Linux.

This commit was SVN r22145.
Этот коммит содержится в:
Shiqing Fan 2009-10-27 18:22:14 +00:00
родитель ac21b4f571
Коммит 63cdfc0ab1
8 изменённых файлов: 63 добавлений и 248 удалений

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

@ -1,4 +1,4 @@
# Copyright (c) 2008 High Performance Computing Center Stuttgart,
# Copyright (c) 2008-2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
#
# $COPYRIGHT$
@ -18,7 +18,7 @@ SET(CMAKE_GENERATOR_FC "")
include(CMakeDetermineFortranCompiler)
include(CMakeFortranInformation)
SET(F77 ${CMAKE_Fortran_COMPILER})
GET_FILENAME_COMPONENT(F77 ${CMAKE_Fortran_COMPILER} NAME)
INCLUDE(F77_find_ext_symbol_convention)
# make sure we know the linking convention

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

@ -1,128 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Los Alamos National Security, LLC.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file should be included by any file that needs the
* installation directories hard-coded into the object file. This
* should be avoided if at all possible, but there are some places
* (like the wrapper compilers) where it is infinitely easier to have
* the paths stored.
*
* If you have questions about which directory to use, we try as best
* we can to follow the GNU coding standards on this issue. The
* description of each directory can be found at the following URL:
*
* http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
*
* The line below is to shut AC 2.60 up about datarootdir. Don't remove.
* datarootdir=foo
*/
#ifndef OPAL_INST_DIRS_H
#define OPAL_INST_DIRS_H
#define OPAL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define OPAL_EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}"
/* The directory for installing executable programs that users can
run. */
#define OPAL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin"
/* The directory for installing executable programs that can be run
from the shell, but are only generally useful to system
administrators. */
#define OPAL_SBINDIR "${CMAKE_INSTALL_PREFIX}/sbin"
/* The directory for installing executable programs to be run by other
programs rather than by users.
The definition of libexecdir is the same for all packages, so
you should install your data in a subdirectory thereof. Most
packages install their data under $(libexecdir)/package-name/,
possibly within additional subdirectories thereof, such as
$(libexecdir)/package-name/machine/version. */
#define OPAL_LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/libexec"
/* The root of the directory tree for read-only
architecture-independent data files.
See not about OPAL_DATADIR. And you probably want that one, not
this one. This is one of those "building block" paths, that is
really only used for defining other paths. */
#define OPAL_DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share"
/* The directory for installing idiosyncratic read-only
architecture-independent data files for this program.
The definition of datadir is the same for all packages, so you
should install your data in a subdirectory thereof. Most packages
install their data under $(datadir)/package-name/. */
#define OPAL_DATADIR "${CMAKE_INSTALL_PREFIX}/share"
/* $(datadir)/package-name/. You probably want to use this instead of
OPAL_DATADIR */
#define OPAL_PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/openmpi"
/* The directory for installing read-only data files that pertain to a
single machinethat is to say, files for configuring a host. Mailer
and network configuration files, /etc/passwd, and so forth belong
here. All the files in this directory should be ordinary ASCII text
files.
Do not install executables here in this directory (they probably
belong in $(libexecdir) or $(sbindir)). Also do not install files
that are modified in the normal course of their use (programs whose
purpose is to change the configuration of the system
excluded). Those probably belong in $(localstatedir). */
#define OPAL_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
/* The directory for installing architecture-independent data files
which the programs modify while they run. */
#define OPAL_SHAREDSTATEDIR "${CMAKE_INSTALL_PREFIX}/com"
/* The directory for installing data files which the programs modify
while they run, and that pertain to one specific machine. Users
should never need to modify files in this directory to configure
the package's operation; put such configuration information in
separate files that go in $(datadir) or
$(sysconfdir). */
#define OPAL_LOCALSTATEDIR "${CMAKE_INSTALL_PREFIX}/var"
/* The directory for object files and libraries of object code. Do not
install executables here, they probably ought to go in
$(libexecdir) instead. */
#define OPAL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib"
/* $(libdir)/package-name/. This is where components should go */
#define OPAL_PKGLIBDIR "${CMAKE_INSTALL_PREFIX}/lib/openmpi"
/* The directory for installing header files to be included by user
programs with the C #include preprocessor directive. */
#define OPAL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include"
/* $(includedir)/package-name/. The devel headers go in here */
#define OPAL_PKGINCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include/openmpi"
/* The directory for installing the Info files for this package. */
#define OPAL_INFODIR "${CMAKE_INSTALL_PREFIX}/share/info"
/* The top-level directory for installing the man pages (if any) for
this package. */
#define OPAL_MANDIR "${CMAKE_INSTALL_PREFIX}/share/man"
#endif

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

@ -1,22 +0,0 @@
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated. This can be useful for multilib builds. See the
# multilib page at:
# https://svn.open-mpi.org/trac/ompi/wiki/compilerwrapper3264
# for more information.
project=Open MPI
project_short=OMPI
version=@OMPI_VERSION_STRING@
language=C++
compiler_env=CXX
compiler_flags_env=CXXFLAGS
compiler=@CXX@
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@ @OMPI_WRAPPER_EXTRA_LIBS@
required_file=@OMPI_WRAPPER_CXX_REQUIRED_FILE@
includedir=${includedir}
libdir=${libdir}

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

@ -1,22 +0,0 @@
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated. This can be useful for multilib builds. See the
# multilib page at:
# https://svn.open-mpi.org/trac/ompi/wiki/compilerwrapper3264
# for more information.
project=Open MPI
project_short=OMPI
version=@OMPI_VERSION_STRING@
language=C
compiler_env=CC
compiler_flags_env=CFLAGS
compiler=@CC@
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=@OMPI_WRAPPER_EXTRA_LIBS@
required_file=
includedir=${includedir}
libdir=${libdir}

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

@ -1,22 +0,0 @@
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated. This can be useful for multilib builds. See the
# multilib page at:
# https://svn.open-mpi.org/trac/ompi/wiki/compilerwrapper3264
# for more information.
project=Open MPI
project_short=OMPI
version=@OMPI_VERSION_STRING@
language=Fortran 77
compiler_env=F77
compiler_flags_env=FFLAGS
compiler=@F77@
extra_includes=
preprocessor_flags=
compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=libmpi.lib libopen-rte.lib libopen-pal.lib @OMPI_WRAPPER_EXTRA_LIBS@
required_file=@OMPI_WRAPPER_F77_REQUIRED_FILE@
includedir=${includedir}
libdir=${libdir}

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

@ -13,6 +13,33 @@
ADD_SUBDIRECTORY(ompi_info)
ADD_SUBDIRECTORY(ompi-server)
MACRO(CONFIGURE_WRAPPER_DATA_FILE APP_NAME)
# mpic++ and mpicxx share the same input file
IF(${APP_NAME} STREQUAL "mpicxx")
SET(INPUT_PREFIX "mpic++")
ELSE(${APP_NAME} STREQUAL "mpicxx")
SET(INPUT_PREFIX ${APP_NAME})
ENDIF(${APP_NAME} STREQUAL "mpicxx")
FILE(READ ${OpenMPI_SOURCE_DIR}/ompi/tools/wrappers/${INPUT_PREFIX}-wrapper-data.txt.in FILE_STRING)
STRING(REGEX REPLACE "-l[-a-zA-Z0-9_]+ " "" OUTPUT ${FILE_STRING})
# create a temporary input file, for "write file" command only
# replace the variables in the first level. :(
FILE(WRITE ${CMAKE_FILES_DIRECTORY}/CMakeTmp/${APP_NAME}-wrapper-data.txt.in "${OUTPUT}")
CONFIGURE_FILE(${CMAKE_FILES_DIRECTORY}/CMakeTmp/${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
DESTINATION share/openmpi)
CONFIGURE_FILE(${CMAKE_FILES_DIRECTORY}/CMakeTmp/${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
DESTINATION share/openmpi)
ENDMACRO()
# select debug or release libraries at configure time
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(OMPI_WRAPPER_EXTRA_LIBS
@ -34,14 +61,7 @@ ELSE(BUILD_SHARED_LIBS)
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
ENDIF(BUILD_SHARED_LIBS)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpicc-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpicc-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpicc-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpicc-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpicc.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpicc.exe-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_WRAPPER_DATA_FILE(mpicc)
IF(OMPI_WANT_CXX_BINDINGS)
GET_FILENAME_COMPONENT(CXX "${CL_EXE}" NAME)
@ -55,47 +75,23 @@ IF(OMPI_WANT_CXX_BINDINGS)
# 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")
SET(OMPI_WRAPPER_CXX_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")
SET(OMPI_WRAPPER_CXX_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
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpic++-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpicxx-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpicxx-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpic++-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpic++.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpic++.exe-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpic++-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpicxx.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpicxx.exe-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_WRAPPER_DATA_FILE(mpic++)
CONFIGURE_WRAPPER_DATA_FILE(mpicxx)
ENDIF(OMPI_WANT_CXX_BINDINGS)
IF(OMPI_WANT_F77_BINDINGS)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpif77-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpif77-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif77-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpif77-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpif77.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif77.exe-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_WRAPPER_DATA_FILE(mpif77)
ENDIF(OMPI_WANT_F77_BINDINGS)
IF(OMPI_WANT_F90_BINDINGS)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpif90-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpif90-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif90-wrapper-data.txt
DESTINATION share/openmpi)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/mpif90-wrapper-data.txt.cmake
${OMPI_BINARY_DIR}/tools/wrappers/mpif90.exe-wrapper-data.txt @ONLY)
INSTALL(FILES ${OMPI_BINARY_DIR}/tools/wrappers/mpif90.exe-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(OMPI_WANT_F90_BINDINGS)
#IF(OMPI_WANT_F90_BINDINGS)
# CONFIGURE_WRAPPER_DATA_FILE(mpif90)
#ENDIF(OMPI_WANT_F90_BINDINGS)
IF(WANT_INSTALL_HEADERS)
CONFIGURE_WRAPPER_DATA_FILE(opal-wrapper)
ENDIF(WANT_INSTALL_HEADERS)

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

@ -117,7 +117,21 @@ ELSE (BUILD_SHARED_LIBS)
ENDIF(BUILD_SHARED_LIBS)
# Generate install_dirs.h
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/contrib/platform/win32/ConfigFiles/install_dirs.h.cmake
SET(prefix ${CMAKE_INSTALL_PREFIX})
SET(bindir ${prefix}/bin)
SET(sbindir ${prefix}/sbin)
SET(libexecdir ${prefix}/libexec)
SET(datarootdir ${prefix}/share)
SET(datadir ${prefix}/share)
SET(PACKAGE "openmpi")
SET(sysconfdir ${prefix}/etc)
SET(sharedstatedir ${prefix}/com)
SET(localstatedir ${prefix}/var)
SET(libdir ${prefix}/lib)
SET(includedir ${prefix}/include)
SET(infodir ${datarootdir}/info)
SET(mandir ${datarootdir}/man)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/opal/mca/installdirs/config/install_dirs.h.in
${OpenMPI_BINARY_DIR}/opal/mca/installdirs/config/install_dirs.h)
# Generate version file.

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

@ -28,7 +28,7 @@ ADD_CUSTOM_COMMAND (TARGET opal-wrapper
${PROJECT_BINARY_DIR}/mpiexec.exe
COMMENT "Copying C compiler wrappers...")
IF(WANT_CXX_BINDINGS)
IF(OMPI_WANT_CXX_BINDINGS)
ADD_CUSTOM_COMMAND (TARGET opal-wrapper
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
@ -42,9 +42,9 @@ IF(WANT_CXX_BINDINGS)
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpic++.exe
${PROJECT_BINARY_DIR}/mpicxx.exe
DESTINATION bin)
ENDIF(WANT_CXX_BINDINGS)
ENDIF(OMPI_WANT_CXX_BINDINGS)
IF(WANT_F77_BINDINGS)
IF(OMPI_WANT_F77_BINDINGS)
ADD_CUSTOM_COMMAND(TARGET opal-wrapper
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
@ -54,7 +54,7 @@ IF(WANT_F77_BINDINGS)
INSTALL(FILES ${PROJECT_BINARY_DIR}/mpif77.exe
DESTINATION bin)
ENDIF(WANT_F77_BINDINGS)
ENDIF(OMPI_WANT_F77_BINDINGS)
INSTALL(TARGETS opal-wrapper
DESTINATION bin)
@ -89,11 +89,10 @@ IF(WANT_INSTALL_HEADERS)
INSTALL(FILES ${OPAL_BINARY_DIR}/tools/wrappers/opalc++-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(OMPI_WANT_CXX_BINDINGS)
CONFIGURE_FILE(${OPAL_SOURCE_DIR}/tools/wrappers/opalcc-wrapper-data.txt.in
${OPAL_BINARY_DIR}/tools/wrappers/opalcc-wrapper-data.txt @ONLY)
INSTALL(FILES ${OPAL_BINARY_DIR}/tools/wrappers/opalcc-wrapper-data.txt
DESTINATION share/openmpi)
ENDIF(WANT_INSTALL_HEADERS)
ENDIF(WANT_INSTALL_HEADERS)