From: Guido Kanschat Date: Wed, 30 Jun 2010 17:27:38 +0000 (+0000) Subject: Determine version numbers and features in a C++ program instead of gessing in Makefil... X-Git-Tag: v8.0.0~5883 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4f502f31cbc7154e96f37bfd9cc458867a321b2;p=dealii.git Determine version numbers and features in a C++ program instead of gessing in Makefile; fix some output git-svn-id: https://svn.dealii.org/trunk@21417 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index 057b934062..d52a69a4cb 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -365,8 +365,7 @@ endif -ifeq ($(BUILDTEST),yes) - print-summary: +print-summary: @echo "dealii-feature: revision=`svn info .. | grep Revision | sed 's/Revision: //'`" @echo "dealii-feature: user=$(USER)" @echo "dealii-feature: host=`hostname`" @@ -382,8 +381,4 @@ ifeq ($(BUILDTEST),yes) @echo "dealii-feature: Trilinos=$(subst ..,,$(DEAL_II_TRILINOS_VERSION_MAJOR).$(DEAL_II_TRILINOS_VERSION_MINOR).$(DEAL_II_TRILINOS_VERSION_SUBMINOR))" @echo "dealii-feature: MUMPS=$(subst no,,$(USE_CONTRIB_MUMPS))" @echo "dealii-feature: METIS=$(subst no,,$(USE_CONTRIB_METIS))" - @echo "dealii-feature: UMFPACK=$(USE_CONTRIB_UMFPACK)" - @echo "dealii-feature: HSL=$(subst no,,$(USE_CONTRIB_METIS))" - @echo "dealii-feature: BLAS=@DEAL_II_USE_BLAS@" - @echo "dealii-feature: LAPACK=@DEAL_II_USE_BLAS@" -endif + @cd scripts ; make report_features && ./report_features diff --git a/deal.II/common/scripts/Makefile b/deal.II/common/scripts/Makefile index fa07d48bca..96e2913115 100644 --- a/deal.II/common/scripts/Makefile +++ b/deal.II/common/scripts/Makefile @@ -24,6 +24,10 @@ expand_instantiations : expand_instantiations.cc $D/common/Make.global_options @echo ============================ Compiling $@ @$(CXX) $(CXXFLAGS.o) $(LDFLAGS) $< -o $@ +report_features: report_features.cc $D/common/Make.global_options + @echo ============================ Compiling $@ + @$(CXX) $(CXXFLAGS.o) $(LDFLAGS) $< -o $@ + clean: -rm -f make_dependencies -rm -f make_dependencies.o diff --git a/deal.II/common/scripts/report_features.cc b/deal.II/common/scripts/report_features.cc new file mode 100644 index 0000000000..8abd015753 --- /dev/null +++ b/deal.II/common/scripts/report_features.cc @@ -0,0 +1,57 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2010 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + +#include + +#include + +#ifdef HAVE_LIBUMFPACK +extern "C" { +#include +} +#endif + +#ifdef DEAL_II_USE_MUMPS +# include +# include +#endif + + +int main() +{ +#ifdef HAVE_LIBBLAS + std::cout << "dealii-feature: BLAS=yes" << std::endl; +#endif + +#ifdef HAVE_LIBLAPACK + std::cout << "dealii-feature: LAPACK=yes" << std::endl; +#endif + +#ifdef HAVE_LIBUMFPACK + std::cout << "dealii-feature: UMFPACK=" + << UMFPACK_MAIN_VERSION << '.' + << UMFPACK_SUB_VERSION << '.' + << UMFPACK_SUBSUB_VERSION << std::endl; +#endif + +#if defined(HAVE_HSL_MA27) || defined(HAVE_HSL_MA47) + std::cout << "dealii-feature: HSL="; +#ifdef HAVE_HSL_MA27 + std::cout << "MA27"; +#endif +#ifdef HAVE_HSL_MA47 + std::cout << "MA47"; +#endif + std::cout << std::endl; +#endif +}