]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a small hack to allow custom overrides of feature configuration
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Feb 2013 17:47:22 +0000 (17:47 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Feb 2013 17:47:22 +0000 (17:47 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@28619 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_find_package.cmake [new file with mode: 0644]

diff --git a/deal.II/cmake/macros/macro_find_package.cmake b/deal.II/cmake/macros/macro_find_package.cmake
new file mode 100644 (file)
index 0000000..8aad849
--- /dev/null
@@ -0,0 +1,27 @@
+#####
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## <TODO: Full License information>
+## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
+## version of the LGPL license.
+##
+## Author: Matthias Maier <matthias.maier@iwr.uni-heidelberg.de>
+##
+#####
+
+#
+# A small wrapper around FIND_PACKAGE.
+# We guard the invocation of FIND_PACKAGE(package <...>) by
+# ${package}_FOUND to allow easy custom overrides
+#
+
+MACRO(FIND_PACKAGE _package_name)
+  STRING(TOUPPER ${_package_name} _package_name_uppercase)
+
+  IF(NOT ${_package_name_uppercase}_FOUND)
+    _FIND_PACKAGE (${_package_name} ${ARGN})
+  ENDIF()
+ENDMACRO()

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.