Commit e8d0e5ea authored by Radu Popescu's avatar Radu Popescu
Browse files

Updating for new build system

parent c7aac277
......@@ -30,6 +30,8 @@
SET(LifeV_VERSION 3.0.0)
SET(LifeV_MAJOR_VERSION 3)
SET(LifeV_MINOR_VERSION 0)
SET(LifeV_MICRO_VERSION 0)
SET(LifeV_MAJOR_MINOR_VERSION 030000)
SET(LifeV_VERSION_STRING "3.0.0")
SET(LifeV_ENABLE_DEVELOPMENT_MODE_DEFAULT ON) # Change to 'OFF' for a release
......
INCLUDE(TribitsPackageMacros)
INCLUDE(TribitsAddOptionAndDefine)
INCLUDE(TribitsLibraryMacros)
#
# A) Define the package
#
TRIBITS_PACKAGE(Core)
#
# B) Set up package-specific options
#
TRIBITS_ADD_SHOW_DEPRECATED_WARNINGS_OPTION()
TRIBITS_ADD_OPTION_AND_DEFINE(LifeV_${PACKAGE_NAME}_ENABLE_SPIRIT_PARSER
ENABLE_SPIRIT_PARSER
"Enable Boost Spirit Parser"
OFF )
FOREACH(TPL_NAME in ${Trilinos_TPL_LIST})
IF(${TPL_NAME} STREQUAL "HDF5")
SET(HAVE_HDF5 TRUE)
ENDIF()
ENDFOREACH()
IF(TPL_Boost_ENABLED)
SET(HAVE_BOOST TRUE)
ENDIF()
IF(TOUPPER(${CMAKE_BUILD_TYPE}) STREQUAL "DEBUG")
SET(HAVE_LIFEV_DEBUG TRUE)
ENDIF()
IF(TPL_QHull_ENABLED)
SET(HAVE_QHULL TRUE)
ENDIF()
FOREACH(TRILINOS_PACKAGE_NAME in ${Trilinos_PACKAGE_LIST})
IF(${TRILINOS_PACKAGE_NAME} STREQUAL "RYTHMOS")
SET(HAVE_TRILINOS_RYTHMOS TRUE)
ENDIF()
ENDFOREACH()
FOREACH(Tpack ${NOX_LIBRARIES})
IF(${Tpack} STREQUAL "noxthyra")
SET(HAVE_NOX_THYRA TRUE)
ENDIF()
ENDFOREACH()
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_USING_HDF5
HAVE_EPETRAEXT_HDF5
"Enable EpetraExt interface support for HDF5. This interface requires an already installed HDF5 library\; the include, the library path and the library name must be specified as well."
${${PACKAGE_NAME}_ENABLE_HDF5_DEFAULT} )
#Adding a define for when PyTrilinos is enabled.
#This replaces an option that was reusing an existing name.
SET(HAVE_PYTRILINOS "${${PROJECT_NAME}_ENABLE_PyTrilinos}")
#
# C) Add the libraries, tests, and examples
#
ADD_SUBDIRECTORY(src)
TRIBITS_ADD_TEST_DIRECTORIES(test)
#
# Exclude files for source package.
#
TRIBITS_EXCLUDE_AUTOTOOLS_FILES()
TRIBITS_EXCLUDE_FILES(
doc/UserGuide
doc/inout
doc/matlab.README
example/MapColoring/sample_map
example/MapColoring/sample_matrix
example/inout/build
example/model_evaluator/GLpApp/Parallel2DMeshGeneratorFormat.pdf
example/model_evaluator/GLpApp/README
example/model_evaluator/GLpApp/data/square/generate-serial-meshes-1-2.sh
example/model_evaluator/GLpApp/data/square/generate-serial-meshes-1-2.sh.out
example/model_evaluator/GLpApp/data/square/square.1.2
example/model_evaluator/GLpApp/data/square/square.1.2.000
example/model_evaluator/GLpApp/data/square/square.1.2.001
example/model_evaluator/GLpApp/data/square/square.1.2.edge
example/model_evaluator/GLpApp/data/square/square.1.2.ele
example/model_evaluator/GLpApp/data/square/square.1.2.epart.2
example/model_evaluator/GLpApp/data/square/square.1.2.node
example/model_evaluator/GLpApp/data/square/square.1.2.npart.2
example/model_evaluator/GLpApp/data/square/square.1.2.poly
example/model_evaluator/GLpApp/data/square/square.1.edge
example/model_evaluator/GLpApp/data/square/square.1.ele
example/model_evaluator/GLpApp/data/square/square.1.node
example/model_evaluator/GLpApp/data/square/square.1.poly
example/model_evaluator/GLpApp/data/square/square.2.edge
example/model_evaluator/GLpApp/data/square/square.2.ele
example/model_evaluator/GLpApp/data/square/square.2.node
example/model_evaluator/GLpApp/data/square/square.2.poly
example/model_evaluator/GLpApp/data/square/square.poly
example/model_evaluator/GLpApp/from-triangle-to-serial-input-mesh.pl
src/btf/pothen/btf_notes
src/btf/pothen/main.f
src/distdir
src/transform/EpetraExt_Dirichlet_.*
src/transform/EpetraExt_StaticCondensation_LinearProblem..*
src/transform/EpetraExt_SubCopy_CrsMatrix..*
src/zoltan/EpetraExt_ZoltanMpi.*
test/Copy
test/Makefile.template
test/Zoltan/Dummy
test/inout/build
test/testAll.*
)
#
# D) Do standard postprocessing
#
TRIBITS_PACKAGE_POSTPROCESS()
......@@ -650,13 +650,7 @@ template <typename DataType>
MatrixEpetra<DataType>&
MatrixEpetra<DataType>::operator += ( const MatrixEpetra& matrix )
{
#ifdef HAVE_TRILINOS_EPETRAEXT_31 // trilinos6
EpetraExt::MatrixMatrix::Add( *matrix.matrixPtr(), false, 1., *this->matrixPtr(), 1., false );
#elif defined HAVE_TRILINOS_EPETRAEXT // trilinos8
EpetraExt::MatrixMatrix::Add( *matrix.matrixPtr(), false, 1., *this->matrixPtr(), 1. );
#else
#error error: do not have nor EpetraExt 6 nor 7 or 8
#endif
return *this;
}
......@@ -718,13 +712,8 @@ void MatrixEpetra<DataType>::openCrsMatrix()
matrix_ptrtype tmp( M_epetraCrs );
M_epetraCrs.reset( new matrix_type( Copy, M_epetraCrs->RowMap(), meanNumEntries ) );
#ifdef HAVE_TRILINOS_EPETRAEXT_31 // trilinos6
EpetraExt::MatrixMatrix::Add( *tmp, false, 1., *M_epetraCrs, 1., false );
#elif defined HAVE_TRILINOS_EPETRAEXT // trilinos8
EpetraExt::MatrixMatrix::Add( *tmp, false, 1., *M_epetraCrs, 1. );
#else
#error error: do not have nor EpetraExt 6 nor 7 or 8
#endif
M_domainMap.reset();
M_rangeMap.reset();
......@@ -857,11 +846,7 @@ void MatrixEpetra<DataType>::addDyadicProduct( const vector_type& uniqueVector1,
template <typename DataType>
void MatrixEpetra<DataType>::add ( const DataType scalar, const MatrixEpetra& matrix )
{
#if defined HAVE_TRILINOS_EPETRAEXT // trilinos8
EpetraExt::MatrixMatrix::Add( *matrix.matrixPtr(), false, scalar, *this->matrixPtr(), 1. );
#else
#error error: do not have nor EpetraExt 8+
#endif
}
template <typename DataType>
......
......@@ -119,7 +119,7 @@ void initDebugAreas ()
// read entries in sdebug.areas
std::ostringstream path;
path << LIFE_PREFIX << "/share/" << PACKAGE << "/debug.areas";
path << LIFEV_PREFIX << "/share/lifev/debug.areas";
std::ifstream fin ( path.str().c_str() );
if ( fin.fail () )
......
/* Name of package */
#define PACKAGE_NAME "@PROJECT_NAME@"
/* I think this should be deprecated */
#define PACKAGE "@PROJECT_NAME@"
/* extra version information: date, cvs, ... */
#define LIFEV_VERSION_EXTRA
/* major version number */
#define LIFEV_VERSION_MAJOR @LifeV_VERSION_MAJOR@
/* minor version number */
#define LIFEV_VERSION_MINOR @LifeV_VERSION_MINOR@
/* micro version number */
#define LIFEV_VERSION_MICRO @LifeV_VERSION_PATCH@
#define LIFEV_VERSION_MAJOR @LifeV_MAJOR_VERSION@
/* minor version number */
#define LIFEV_VERSION_MINOR @LifeV_MINOR_VERSION@
/* micro version number */
#define LIFEV_VERSION_MICRO @LifeV_PATCH_VERSION@
/* LifeV version string */
#define LIFEV_VERSION_STRING "@LifeV_VERSION_MAJOR@.@LifeV_VERSION_MINOR@.@LifeV_VERSION_PATCH@"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "@PROJECT_SHORT_NAME@"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "@PROJECT_SHORT_NAME@ @LifeV_VERSION_MAJOR@.@LifeV_VERSION_MINOR@.@LifeV_VERSION_PATCH@"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "@PROJECT_BUGREPORT@"
/* Define to the home page for this package. */
#define PACKAGE_URL "@PROJECT_HOMEPAGE@"
#define LIFEV_VERSION_STRING @LifeV_VERSION_STRING
/* define prefix dir for life installation */
#define LIFE_PREFIX "@CMAKE_INSTALL_PREFIX@"
/* Version number of package */
#define VERSION "@LifeV_VERSION_MAJOR@.@LifeV_VERSION_MINOR@.@LifeV_VERSION_PATCH@"
#define PACKAGE_VERSION "@LifeV_VERSION_MAJOR@.@LifeV_VERSION_MINOR@.@LifeV_VERSION_PATCH@"
/****************************
Real checks start here
****************************/
/* Define if the UMFPACK is linked. */
#cmakedefine HAVE_UMFPACK
/* Define to 1 if you have the <umfpack.h> header file. */
#cmakedefine HAVE_UMFPACK_H
/* Define to 1 if you have the <amd.h> header file. */
#cmakedefine HAVE_AMD_H
#define LIFEV_PREFIX "@CMAKE_INSTALL_PREFIX@"
/* Define if the HDF5 library is used. */
#cmakedefine HAVE_HDF5
/* Define to disable the Boost Spirit code */
#cmakedefine DISABLE_SPIRIT_PARSER
#cmakedefine ENABLE_SPIRIT_PARSER
/* have boost */
#cmakedefine HAVE_BOOST
......@@ -72,133 +34,11 @@
/* define lifev debug */
#cmakedefine HAVE_LIFEV_DEBUG
/* define lifev optO3 */
#cmakedefine HAVE_LIFEV_OPTO3
/* Define if the QHULL library is used. */
#cmakedefine HAVE_QHULL
/* Define if the Trilinos Amesos library is used. */
#cmakedefine HAVE_TRILINOS_AMESOS
/* Define if the Trilinos Anasazi library is used. */
#cmakedefine HAVE_TRILINOS_ANASAZI
/* Define if the Trilinos AztecOO library is used. */
#cmakedefine HAVE_TRILINOS_AZTECOO
/* Define if the Trilinos Belos library is used. */
#cmakedefine HAVE_TRILINOS_BELOS
/* Define if the Trilinos Epetra library is used. */
#cmakedefine HAVE_TRILINOS_EPETRA
/* Define if the Trilinos EpetraExt library is used. */
#cmakedefine HAVE_TRILINOS_EPETRAEXT
/* Define if the Trilinos Galeri library is used. */
#cmakedefine HAVE_TRILINOS_GALERI
/* Define if the Trilinos Ifpack library is used. */
#cmakedefine HAVE_TRILINOS_IFPACK
/* Define if the Trilinos Isorropia library is used. */
#cmakedefine HAVE_TRILINOS_ISORROPIA
/* Define if the Trilinos Loca library is used. */
#cmakedefine HAVE_TRILINOS_LOCA
/* Define if the Trilinos ML library is used. */
#cmakedefine HAVE_TRILINOS_ML
/* Define if the Trilinos Nox library is used. */
#cmakedefine HAVE_TRILINOS_NOX
/* Define if the Trilinos RTOp library is used. */
#cmakedefine HAVE_TRILINOS_RTOP
/* Define if the Trilinos Rythmos library is used. */
#cmakedefine HAVE_TRILINOS_RYTHMOS
/* Define if the Trilinos Sacado library is used. */
#cmakedefine HAVE_TRILINOS_SACADO
/* Define if the Trilinos Stratimikos library is used. */
#cmakedefine HAVE_TRILINOS_STRATIMIKOS
/* Define if the Trilinos Teko library is used. */
#cmakedefine HAVE_TRILINOS_TEKO
/* Define if the Trilinos Teuchos library is used. */
#cmakedefine HAVE_TRILINOS_TEUCHOS
/* Define if the Trilinos Thyra library is used. */
#cmakedefine HAVE_TRILINOS_THYRA
/* Define if the Trilinos TriUtils library is used. */
#cmakedefine HAVE_TRILINOS_TRIUTILS
/* Define if the Trilinos Zoltan library is used. */
#cmakedefine HAVE_TRILINOS_ZOLTAN
/* Define if the Trilinos Nox-thyra library is used. */
#cmakedefine HAVE_NOX_THYRA
/*******************************************************************
The following cannot yet be defined due to limitations in the
CMake scripts. Useless defines should be removed
*******************************************************************/
/* define boost spirit classic */
#undef HAVE_BOOST_SPIRIT_CLASSIC
/* define boost spirit classic temp */
#undef HAVE_BOOST_SPIRIT_CLASSIC_TEMP
/* define lifev optO1 */
#undef HAVE_LIFEV_OPTO1
/* define lifev optO2 */
#undef HAVE_LIFEV_OPTO2
/* Define if the Trilinos Loca-epetra library is used. */
#undef HAVE_LOCA_EPETRA
/* Define if the Trilinos Loca-thyra library is used. */
#undef HAVE_LOCA_THYRA
/* Define if the Trilinos Nox-epetra library is used. */
#undef HAVE_NOX_EPETRA
/* Define if the Trilinos Stratimikos-amesos library is used. */
#undef HAVE_STRATIMIKOS_AMESOS
/* Define if the Trilinos Stratimikos-aztecoo library is used. */
#undef HAVE_STRATIMIKOS_AZTECOO
/* Define if the Trilinos Stratimikos-belos library is used. */
#undef HAVE_STRATIMIKOS_BELOS
/* Define if the Trilinos Stratimikos-ifpack library is used. */
#undef HAVE_STRATIMIKOS_IFPACK
/* Define if the Trilinos Stratimikos-ml library is used. */
#undef HAVE_STRATIMIKOS_ML
/* Define if the Trilinos Thyra-epetra library is used. */
#undef HAVE_THYRA_EPETRA
/* Define if the Trilinos Thyra-epetraext library is used. */
#undef HAVE_THYRA_EPETRAEXT
/* Define if the Trilinos EpetraExt library version is 3.1. */
#undef HAVE_TRILINOS_EPETRAEXT_31
/* Define if the y12m library is used. */
#undef HAVE_y12m
/* sizeof(size_t)==sizeof(unsigned int) */
#undef LIFEV_SIZET_SAME_AS_UINT
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment