]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Extract opencascade version in a more robust manner
authorMatthias Maier <tamiko@43-1.org>
Tue, 21 Mar 2017 19:00:04 +0000 (14:00 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 21 Mar 2017 19:00:04 +0000 (14:00 -0500)
cmake/modules/FindOPENCASCADE.cmake

index 0d064a8d478222f46473b596520f39f533b01cbe..c4ac8ed3dfb9813b72733e44ff4b78915fe14e6d 100644 (file)
@@ -43,7 +43,11 @@ DEAL_II_FIND_PATH(OPENCASCADE_INCLUDE_DIR Standard_Version.hxx
 
 IF(EXISTS ${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx)
   FILE(STRINGS "${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx" OPENCASCADE_VERSION
-    REGEX "#define OCC_VERSION _T"
+    REGEX "#define OCC_VERSION_COMPLETE "
+    )
+  STRING(REGEX REPLACE
+    "#define OCC_VERSION_COMPLETE.*\"(.*)\"" "\\1"
+    OPENCASCADE_VERSION "${OPENCASCADE_VERSION}"
     )
 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.