]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Determine version numbers and features in a C++ program instead of gessing in Makefil...
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 30 Jun 2010 17:27:38 +0000 (17:27 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 30 Jun 2010 17:27:38 +0000 (17:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@21417 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/Make.global_options.in
deal.II/common/scripts/Makefile
deal.II/common/scripts/report_features.cc [new file with mode: 0644]

index 057b93406281a7a2c2def70f502fbe6e7183b7c9..d52a69a4cbbab8db0f3cf340ad3d06b5dd81babd 100644 (file)
@@ -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
index fa07d48bca20e426b7ce08168c27ca0ae0e72054..96e2913115bcb308ea5d357f0e30ca89176f248d 100644 (file)
@@ -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 (file)
index 0000000..8abd015
--- /dev/null
@@ -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 <base/config.h>
+
+#include <iostream>
+
+#ifdef HAVE_LIBUMFPACK
+extern "C" {
+#include <umfpack.h>
+}
+#endif
+
+#ifdef DEAL_II_USE_MUMPS
+#  include <base/utilities.h>
+#  include <dmumps_c.h>
+#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
+}

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.