]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Read version number for Paralution.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 13 Dec 2013 21:33:31 +0000 (21:33 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 13 Dec 2013 21:33:31 +0000 (21:33 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_paralution@31996 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/modules/FindPARALUTION.cmake

index c650ab98680fd94118bc5bc6840c91f5845d1457..7a1a5fb0ecc6580c3264a053c4c0321545a231d5 100644 (file)
@@ -21,6 +21,9 @@
 #
 #   PARALUTION_INCLUDE_DIRS
 #   PARALUTION_LIBRARIES
+#   PARALUTION_VERSION
+#   PARALUTION_VERSION_MAJOR
+#   PARALUTION_VERSION_MINOR
 #
 
 SET_IF_EMPTY(PARALUTION_DIR "$ENV{PARALUTION_DIR}")
@@ -61,6 +64,27 @@ IF(PARALUTION_FOUND)
   SET(PARALUTION_LIBRARIES
     ${PARALUTION_LIBRARY}
     )
+  FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_MAJOR_STRING
+    REGEX "#define.*PARALUTION_VER_MAJOR")
+  STRING(REGEX REPLACE "^.*PARALUTION_VER_MAJOR ([0-9]+).*" "\\1"
+    PARALUTION_VERSION_MAJOR "${PARALUTION_VERSION_MAJOR_STRING}"
+    )
+
+  FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_MINOR_STRING
+    REGEX "#define.*PARALUTION_VER_MINOR")
+  STRING(REGEX REPLACE "^.*PARALUTION_VER_MINOR ([0-9]+).*" "\\1"
+    PARALUTION_VERSION_MINOR "${PARALUTION_VERSION_MINOR_STRING}"
+    )
+
+  FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_REVISION_STRING
+    REGEX "#define.*PARALUTION_VER_REV")
+  STRING(REGEX REPLACE "^.*PARALUTION_VER_REV .([0-9]+).*" "\\1"
+    PARALUTION_VERSION_REVISION "${PARALUTION_VERSION_REVISION_STRING}"
+    )
+
+  SET(PARALUTION_VERSION
+    "${PARALUTION_VERSION_MAJOR}.${PARALUTION_VERSION_MINOR}.${PARALUTION_VERSION_REVISION}"
+    )
 
   MARK_AS_ADVANCED(PARALUTION_DIR)
 ELSE()

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.