]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: only export DEAL_II_GMSH_WITH_API if gmsh is configured 14551/head
authorMatthias Maier <tamiko@43-1.org>
Thu, 8 Dec 2022 01:25:46 +0000 (19:25 -0600)
committerMatthias Maier <tamiko@43-1.org>
Thu, 8 Dec 2022 01:50:06 +0000 (19:50 -0600)
If the gmsh library is installed but the gmsh executable is missing we
currently disable gmsh support. This implies that we will not link
against the gmsh library.

Unfortunately, on first configure pass the variable `GMSH_WITH_API` is
still populated with a `TRUE` value and the `DEAL_II_GMSH_WITH_API`
variable gets set by accident and final linkage fails.

This issue is hard to spot because a second invocation of cmake will
cure the configure mistake (and the debian/ubuntu packages do not run
any autodetection).

cmake/configure/configure_50_gmsh.cmake

index e4764802a3c937de62c31121c59c6b7046a3f13a..310384c806a6b1205a9850f8f8c7e47358a617e1 100644 (file)
@@ -17,5 +17,8 @@
 # Configuration for the gmsh executable:
 #
 
+MACRO(feature_gmsh_configure_external)
+  SET(DEAL_II_GMSH_WITH_API ${GMSH_WITH_API})
+ENDMACRO()
+
 CONFIGURE_FEATURE(GMSH)
-SET(DEAL_II_GMSH_WITH_API ${GMSH_WITH_API})

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.