OFF)
OPTION(DEAL_II_WITH_MPI
- "Build deal.II with support for openmpi."
+ "Build deal.II with support for mpi."
ON)
OPTION(DEAL_II_WITH_NETCDF
-# TODO :-]
+IF(DEAL_II_ALLOW_CONTRIB)
+ # TODO: Write a module to search for functionparser
+ELSE()
+ MESSAGE(FATAL_ERROR "FindFunctionparser.cmake not written, yet. :-[")
+ENDIF()
+
+IF(DEAL_II_FORCE_CONTRIB_FUNCTIONPARSER OR NOT Functionparser_FOUND)
+
+ INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}/contrib/functionparser/
+ )
+
+ ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/contrib/functionparser)
+
+ #
+ # Add functionparser directly to the object files of deal.II
+ #
+ LIST(APPEND deal_ii_additional_object_files
+ $<TARGET_OBJECTS:obj_functionparser>
+ )
+
+ELSE()
+
+ INCLUDE_DIRECTORIES(${Functionparser_INCLUDE_DIR})
+
+ LIST(APPEND deal_ii_external_libraries ${Functionparser_LIBRARY})
+ LIST(APPEND deal_ii_external_debug_libraries ${Functionparser_LIBRARY})
+
+ENDIF()
+
+SET(HAVE_FUNCTIONPARSER TRUE)
--- /dev/null
+ADD_LIBRARY(obj_functionparser OBJECT "fparser.cc")
+/*
+ * Configured in configure_functionparser.cmake:
+ */
+
+/* Defined to 1 if you have the `functionparser' library */
+#cmakedefine HAVE_FUNCTIONPARSER 1
+
+
+
+
/*
* Configured in configure_mpi.cmake:
*/
member functions. */
#cmakedefine DEAL_II_CONST_MEMBER_DEDUCTION_BUG
-/* disable the function parser in contrib */
-#cmakedefine DEAL_II_DISABLE_PARSER
-
/* Defined if the compiler does not honor the explicit keyword on template
constructors. */
#cmakedefine DEAL_II_EXPLICIT_CONSTRUCTOR_BUG
#include <deal.II/base/utilities.h>
#include <deal.II/lac/vector.h>
-#ifndef DEAL_II_DISABLE_PARSER
+#ifdef HAVE_FUNCTIONPARSER
# include <functionparser/fparser.h>
#else
}
-#ifndef DEAL_II_DISABLE_PARSER
+#ifdef HAVE_FUNCTIONPARSER
template <int dim>
void FunctionParser<dim>::initialize (const std::string &variables,
const std::vector<std::string> &expressions,