--- /dev/null
+#####
+##
+## Copyright (C) 2012 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>
+##
+#####
+
+#
+# This file implements the DEAL_II_INVOKE_AUTOPILOT macro, which is
+# part of the deal.II library.
+#
+# Usage:
+# DEAL_II_INVOKE_AUTOPILOT()
+#
+# where it is assumed that the following variables are defined:
+#
+# TARGET - a string used for the project and target name
+# TARGET_SRC - a list of source file to compile for target
+# ${TARGET}
+# CLEAN_UP_FILES - a list of files (globs) that will be removed with
+# runclean and distclean
+#
+
+MACRO(DEAL_II_INVOKE_AUTOPILOT)
+
+ MESSAGE(STATUS "Autopilot invoked")
+
+ # Define and setup a compilation target:
+ ADD_EXECUTABLE(${TARGET} ${TARGET_SRC})
+ DEAL_II_SETUP_TARGET(${TARGET})
+
+ # Define a custom target to easily run the program:
+ ADD_CUSTOM_TARGET(run
+ COMMAND ${TARGET}
+ COMMENT "Run ${TARGET} compiled with ${CMAKE_BUILD_TYPE} configuration in ${CMAKE_SOURCE_DIR}"
+ )
+
+ # Define custom targets to easily switch the build type:
+ ADD_CUSTOM_TARGET(debug
+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
+ COMMENT "Switch CMAKE_BUILD_TYPE to Debug"
+ )
+ ADD_CUSTOM_TARGET(release
+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
+ COMMENT "Switch CMAKE_BUILD_TYPE to Release"
+ )
+
+ # And another custom target to clean up all files generated by the program:
+ ADD_CUSTOM_TARGET(runclean
+ COMMAND ${CMAKE_COMMAND} -E remove ${CLEAN_UP_FILES}
+ COMMENT "runclean invoked"
+ )
+
+ # Define a distclean target to remove every generated file:
+ ADD_CUSTOM_TARGET(distclean
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target runclean
+ COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles
+ COMMAND ${CMAKE_COMMAND} -E remove
+ cmake_install.cmake CMakeCache.txt Makefile
+ COMMENT "distclean invoked"
+ )
+
+ # Print out some usage information:
+ MESSAGE(
+"###
+#
+# Successfully set up project ${TARGET} with ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} found at
+# ${DEAL_II_PATH}
+#
+# CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}
+# TARGET_SRC: ${TARGET_SRC}
+#
+# You can now run
+# $ make - to compile and link the program
+# $ make run - to (compile, link and) run the program
+#
+# $ make debug - to switch the build type to \"Debug\"
+# $ make release - to switch the build type to \"Release\"
+# $ make edit_cache - to change (cached) configuration variables
+# and rerun the configure and generate phases of CMake
+#
+# $ make clean - to remove the generated executable as well as
+# all intermediate compilation files
+# $ make runclean - to remove all output generated by the program
+# $ make distclean - to clean the directory from _all_ generated
+# files (includes clean, runclean and the removal
+# of the generated build system)
+#
+# Have a nice day!
+#
+###"
+ )
+
+ENDMACRO()
+
INSTALL(FILES
${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
+ ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_setup_target.cmake
DESTINATION ${DEAL_II_CMAKE_MACROS_RELDIR}
COMPONENT library
-##########################################################################
-# #
-# An autopilot CMakeLists.txt example for a small project #
-# using the deal.II library #
-# #
-##########################################################################
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+#
# Set the name of the project and target:
#
SET(TARGET "step-1")
+#
# Declare all source files the target consists of:
#
SET(TARGET_SRC
# You can specify additional files here!
)
-# Build and run the program in debug or optimized mode:
#
-SET(DEBUG_MODE TRUE)
-
-# Specify file names that will be deleted when calling 'make distclean':
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
#
SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
-# If the deal.II library cannot be found because it is not installed at a
-# default location (or your project resides under an uncommon place), you
-# may specify additional hints for search paths here. They take precedence
-# over the hard coded installation paths.
-#
-# SET(DEAL_II_DIRS
-# "$ENV{HOME}/deal.II"
-# "$ENV{HOME}/workspace/deal.II"
-# )
-
-##########################################################################
-# #
-# Usually, you will not need to modify anything beyond this point... #
-# #
-##########################################################################
+# Usually, you will not need to modify anything beyond this point...
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
../ ../../ ../../../ ../../../../../
# Also look for hints from environment:
$ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
)
-DEAL_II_INITIALIZE_CACHED_VARIABLES()
-
-# Hide some configuration options:
-MARK_AS_ADVANCED(CMAKE_BUILD_TYPE deal.II_DIR)
-
-# Set build type:
-IF(DEBUG_MODE)
- SET(CMAKE_BUILD_TYPE "Debug" CACHE FORCE
- "Please set DEBUG_MODE in CMakeLists.txt")
-ELSE()
- SET(CMAKE_BUILD_TYPE "Release" CACHE FORCE
- "Please set DEBUG_MODE in CMakeLists.txt")
-ENDIF()
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET})
-
-# Define and setup a compilation target:
-ADD_EXECUTABLE(${TARGET} ${TARGET_SRC})
-DEAL_II_SETUP_TARGET(${TARGET})
-
-# Define a custom target to easily run the program:
-ADD_CUSTOM_TARGET(run
- COMMAND ${TARGET}
- COMMENT "Run ${TARGET} compiled with ${CMAKE_BUILD_TYPE} configuration in ${CMAKE_SOURCE_DIR}"
- )
-
-# And another custom target to clean up all files generated by the program:
-ADD_CUSTOM_TARGET(runclean
- COMMAND ${CMAKE_COMMAND} -E remove ${CLEAN_UP_FILES}
- )
-
-# Define a distclean target to remove every generated file:
-ADD_CUSTOM_TARGET(distclean
- COMMAND ${CMAKE_COMMAND} --build ${CMAKE_SOURCE_DIR} --target clean
- COMMAND ${CMAKE_COMMAND} --build ${CMAKE_SOURCE_DIR} --target runclean
- COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles
- COMMAND ${CMAKE_COMMAND} -E remove
- cmake_install.cmake CMakeCache.txt Makefile
- )
-
-# Print out some usage information:
-MESSAGE("
-###
-#
-# Successfully set up project ${TARGET} with ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} found at
-# ${DEAL_II_PATH}
-#
-# CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}
-# TARGET_SRC: ${TARGET_SRC}
-#
-# You can now run:
-# $ make - to compile and link the program
-# $ make run - to (compile, link and) run the program
-#
-# $ make clean - to remove the generated executable as well as
-# all intermediate compilation files
-# $ make runclean - to remove all output generated by the program
-# $ make distclean - to run purge the directory from _all_ generated
-# files (includes clean, runclean and the removal
-# of the generated build system)
-#
-# To change the configuration, please edit the CMakeLists.txt file.
-#
-# Have a nice day!
-#
-###"
-)
+DEAL_II_INVOKE_AUTOPILOT()
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-10")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-10
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-11")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-11
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-12")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-12
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-13")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-13
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-14")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-14
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-15")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# Makefile,v 1.7 2002/11/11 21:29:46 wolf Exp
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-15
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-16")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-16
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-17")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_PETSC OR DEAL_II_WITH_TBB)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_PETSC = ON
+ DEAL_II_WITH_TBB = OFF
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-18")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_PETSC OR DEAL_II_WITH_TBB)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_PETSC = ON
+ DEAL_II_WITH_TBB = OFF
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-18
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-################################################################
-# This example program will only work if PETSc is installed. If this
-# is not the case, then simply redefine the main targets to do nothing
-#
-# The same holds true if we use threads: PETSc and threads doesn't
-# seem to work well together...
-ifneq ($(USE_CONTRIB_PETSC)$(enable-threads),yesno)
- ifneq ($(USE_CONTRIB_PETSC),yes)
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= This program cannot be compiled without PETSc. Make ="
- @echo "= sure you have PETSc installed and detected during ="
- @echo "= configuration of deal.II ="
- @echo "==========================================================="
- @echo
- else
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= PETSc can not be used when running programs on ="
- @echo "= multiple threads. Make sure you have specified the ="
- @echo "= --disable-threads flag upon configuration of deal.II ="
- @echo "==========================================================="
- @echo
- endif
-else
-#
-################################################################
-
-
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
-endif # CONTRIB_USE_PETSC
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-19")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-19
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
#
-# A minimalistic CMakeLists.txt example for a small project using the
-# deal.II library:
+# Set the name of the project and target:
#
+SET(TARGET "step-2")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+# Search for the deal.II library:
FIND_PACKAGE(deal.II 8.0 REQUIRED
HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
$ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
)
-DEAL_II_INITIALIZE_CACHED_VARIABLES()
-
-PROJECT(step-2)
-ADD_EXECUTABLE(step-2 step-2.cc)
-DEAL_II_SETUP_TARGET(step-2)
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-20")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-20
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-21")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-21
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-22")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_UMFPACK)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_UMFPACK = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-22
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-23")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-23
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-24")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-24
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-25")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-25
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-26")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-26
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-27")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-27
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-28")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-28
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-29")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_UMFPACK)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_UMFPACK = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-29
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-3")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+# Search for the deal.II library:
FIND_PACKAGE(deal.II 8.0 REQUIRED
HINTS
- "../../"
- "../../../../../"
- $ENV{DEAL_DIR}
- $ENV{DEAL_II_DIR}
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
)
-DEAL_II_INITIALIZE_CACHED_VARIABLES()
-
-PROJECT(step-3)
-ADD_EXECUTABLE(step-3 step-3.cc)
-DEAL_II_SETUP_TARGET(step-3)
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
-ADD_CUSTOM_TARGET(run
- COMMAND step-3
- )
-ADD_CUSTOM_TARGET(distclean
- COMMAND make clean
- COMMAND rm -f *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
- )
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-30")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-30
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-31")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_TRILINOS)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_TRILINOS = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-31
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-################################################################
-# This example program will only work if Trilinos is installed. If this
-# is not the case, then simply redefine the main targets to do nothing
-ifneq ($(USE_CONTRIB_TRILINOS),yes)
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= This program cannot be compiled without Trilinos. Make="
- @echo "= sure you have Trilinos installed and detected during ="
- @echo "= configuration of deal.II ="
- @echo "==========================================================="
- @echo
-
-else
-#
-################################################################
-
-
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
-endif # USE_CONTRIB_TRILINOS
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-32")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_P4EST OR NOT DEAL_II_WITH_TRILINOS)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_P4EST = ON
+ DEAL_II_WITH_TRILINOS = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-33")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_TRILINOS)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_TRILINOS = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-33
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The fourth field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-# The last field specifies the name of the input file that passes the
-# parameters to the program.
-run-parameters = input.prm
-
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-################################################################
-# This example program will only work if Trilinos is installed. If this
-# is not the case, then simply redefine the main targets to do nothing
-ifneq ($(USE_CONTRIB_TRILINOS),yes)
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= This program cannot be compiled without Trilinos. Make="
- @echo "= sure you have Trilinos installed and detected during ="
- @echo "= configuration of deal.II ="
- @echo "==========================================================="
- @echo
-
-else
-#
-################################################################
-
-
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT) $(run-parameters)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
-endif # CONTRIB_USE_TRILINOS
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-34")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-34
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-35")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_UMFPACK)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_UMFPACK = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-35
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-36")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_PETSC OR NOT DEAL_II_WITH_SLEPC OR DEAL_II_WITH_TBB)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_PETSC = ON
+ DEAL_II_WITH_SLEPC = ON
+ DEAL_II_WITH_TBB = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-37")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_LAPACK)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_LAPACK = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-37
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-################################################################
-# This example program will only work if Trilinos is installed. If this
-# # is not the case, then simply redefine the main targets to do nothing
-ifneq ($(USE_CONTRIB_LAPACK),yes)
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= This program can only be run with LAPACK enabled. ="
- @echo "==========================================================="
- @echo
-else
-#
-#################################################################
-
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-endif # USE_CONTRIB_LAPACK
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-38")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-38
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-39")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+FIND_PACKAGE(Perl REQUIRED)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+ADD_CUSTOM_TARGET(postprocess
+ COMMAND ${PERL_EXECUTABLE} postprocess.pl deallog > output.dat
+ COMMENT "Postprocessing deallog"
+ )
+ADD_DEPENDENCIES(postprocess run)
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-39
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
- @echo ============================ Postprocessing to step-39.dat
- @$(PERL) postprocess.pl deallog > output.dat
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-4")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+# Search for the deal.II library:
FIND_PACKAGE(deal.II 8.0 REQUIRED
HINTS
- "../../"
- "../../../../../"
- $ENV{DEAL_DIR}
- $ENV{DEAL_II_DIR}
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
)
-DEAL_II_INITIALIZE_CACHED_VARIABLES()
-
-PROJECT(step-4)
-ADD_EXECUTABLE(step-4 step-4.cc)
-DEAL_II_SETUP_TARGET(step-4)
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
-ADD_CUSTOM_TARGET(run
- COMMAND step-4
- )
-ADD_CUSTOM_TARGET(distclean
- COMMAND make clean
- COMMAND rm -f *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
- )
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-40")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF( NOT DEAL_II_WITH_PETSC OR
+ NOT DEAL_II_WITH_P4EST OR
+ DEAL_II_WITH_TBB )
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_PETSC = ON
+ DEAL_II_WITH_P4EST = ON
+ DEAL_II_WITH_TBB = OFF
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-40
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *vtu *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-################################################################
-# This example program will only work if PETSc is installed. If this
-# is not the case, then simply redefine the main targets to do nothing
-#
-# The same holds true if we use threads: PETSc and threads doesn't
-# seem to work well together...
-ifneq ($(USE_CONTRIB_PETSC)$(enable-threads)$(USE_CONTRIB_P4EST),yesnoyes)
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= This program can only be run with the following ="
- @echo "= configuration: ="
- @echo "= - with PETSc ="
- @echo "= - without threads ="
- @echo "= - with P4EST ="
- @echo "= At least one of these conditions is not satisfied. ="
- @echo "==========================================================="
- @echo
-else
-#
-################################################################
-
-
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
-endif # USE_CONTRIB_PETSC
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-41")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_TRILINOS)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_TRILINOS = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-41
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-################################################################
-# This example program will only work if Trilinos is installed. If this
-# is not the case, then simply redefine the main targets to do nothing
-ifneq ($(USE_CONTRIB_TRILINOS),yes)
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= This program cannot be compiled without Trilinos. Make="
- @echo "= sure you have Trilinos installed and detected during ="
- @echo "= configuration of deal.II ="
- @echo "==========================================================="
- @echo
-
-else
-#
-################################################################
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-endif # CONTRIB_USE_TRILINOS
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-42")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF( NOT DEAL_II_WITH_P4EST OR
+ NOT DEAL_II_WITH_TRILINOS )
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_P4EST = ON
+ DEAL_II_WITH_TRILINOS = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-42
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *vtu *visit *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-################################################################
-# This example program will only work if Trilinos is installed. If this
-# is not the case, then simply redefine the main targets to do nothing
-ifneq ($(USE_CONTRIB_TRILINOS)$(USE_CONTRIB_P4EST),yesyes)
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= This program can only be run with the following ="
- @echo "= configuration: ="
- @echo "= - with Trilinos ="
- @echo "= - with P4EST ="
- @echo "= At least one of these conditions is not satisfied. ="
- @echo "==========================================================="
- @echo
-else
-#
-################################################################
-
-
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
-endif # USE_CONTRIB_TRILINOS
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-43")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_TRILINOS)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_TRILINOS = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-43
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-################################################################
-# This example program will only work if Trilinos is installed. If this
-# is not the case, then simply redefine the main targets to do nothing
-ifneq ($(USE_CONTRIB_TRILINOS),yes)
-default run clean:
- @echo
- @echo "==========================================================="
- @echo "= This program cannot be compiled without Trilinos. Make="
- @echo "= sure you have Trilinos installed and detected during ="
- @echo "= configuration of deal.II ="
- @echo "==========================================================="
- @echo
-
-else
-#
-################################################################
-
-
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
-endif # USE_CONTRIB_TRILINOS
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-44")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-44
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-45")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-45
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-46")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+#
+# Are all dependencies fullfilled?
+#
+IF(NOT DEAL_II_WITH_UMFPACK)
+ MESSAGE(FATAL_ERROR "
+Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_UMFPACK = ON
+which is required for this tutorial step."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-46
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-47")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-47
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) -w $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-48")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = $(basename $(shell echo step-*.cc))
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *vtu *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) -w $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-5")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+# Search for the deal.II library:
FIND_PACKAGE(deal.II 8.0 REQUIRED
HINTS
- "../../"
- "../../../../../"
- $ENV{DEAL_DIR}
- $ENV{DEAL_II_DIR}
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
)
-DEAL_II_INITIALIZE_CACHED_VARIABLES()
-
-PROJECT(step-5)
-ADD_EXECUTABLE(step-5 step-5.cc)
-DEAL_II_SETUP_TARGET(step-5)
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
-ADD_CUSTOM_TARGET(run
- COMMAND step-5
- )
-ADD_CUSTOM_TARGET(distclean
- COMMAND make clean
- COMMAND rm -f *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
- )
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-6")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-6
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-7")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-7
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-8")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
--- /dev/null
+##
+# An autopilot CMakeLists.txt example for a small project
+# using the deal.II library
+##
+
+#
+# Set the name of the project and target:
+#
+SET(TARGET "step-9")
+
+#
+# Declare all source files the target consists of:
+#
+SET(TARGET_SRC
+ ${TARGET}.cc
+ # You can specify additional files here!
+ )
+
+#
+# Specify files that will be deleted when calling 'make runclean' or
+# 'make distclean':
+#
+SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2)
+
+
+# Usually, you will not need to modify anything beyond this point...
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+# Search for the deal.II library:
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+ HINTS
+ ${DEAL_II_DIRS}
+ # Additional hints for possible library locations:
+ ../ ../../ ../../../ ../../../../../
+ # Also look for hints from environment:
+ $ENV{DEAL_II_DIR} $ENV{DEAL_DIR}
+ #
+ # If the deal.II library cannot be found (because it is not installed at a
+ # default location or your project resides at an uncommon place), you
+ # can specify additional hints for search paths here, e.g.
+ # "$ENV{HOME}/workspace/deal.II"
+ )
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(${TARGET})
+DEAL_II_INVOKE_AUTOPILOT()
+
+++ /dev/null
-# $Id$
-
-
-# For the small projects Makefile, you basically need to fill in only
-# four fields.
-#
-# The first is the name of the application. It is assumed that the
-# application name is the same as the base file name of the single C++
-# file from which the application is generated.
-target = step-9
-
-# The second field determines whether you want to run your program in
-# debug or optimized mode. The latter is significantly faster, but no
-# run-time checking of parameters and internal states is performed, so
-# you should set this value to `on' while you develop your program,
-# and to `off' when running production computations.
-debug-mode = on
-
-
-# As third field, we need to give the path to the top-level deal.II
-# directory. You need to adjust this to your needs. Since this path is
-# probably the most often needed one in the Makefile internals, it is
-# designated by a single-character variable, since that can be
-# reference using $D only, i.e. without the parentheses that are
-# required for most other parameters, as e.g. in $(target).
-D = ../../
-
-
-# The last field specifies the names of data and other files that
-# shall be deleted when calling `make clean'. Object and backup files,
-# executables and the like are removed anyway. Here, we give a list of
-# files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
-
-
-
-
-#
-#
-# Usually, you will not need to change anything beyond this point.
-#
-#
-# The next statement tells the `make' program where to find the
-# deal.II top level directory and to include the file with the global
-# settings
-include $D/common/Make.global_options
-
-
-# Since the whole project consists of only one file, we need not
-# consider difficult dependencies. We only have to declare the
-# libraries which we want to link to the object file. deal.II has two
-# libraries: one for the debug mode version of the
-# application and one for optimized mode.
-libs.g := $(lib-deal2.g)
-libs.o := $(lib-deal2.o)
-
-
-# We now use the variable defined above to switch between debug and
-# optimized mode to select the set of libraries to link with. Included
-# in the list of libraries is the name of the object file which we
-# will produce from the single C++ file. Note that by default we use
-# the extension .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever local default on your
-# system is instead of .o)
-ifeq ($(debug-mode),on)
- libraries = $(target).g.$(OBJEXT) $(libs.g)
-else
- libraries = $(target).$(OBJEXT) $(libs.o)
-endif
-
-
-# Now comes the first production rule: how to link the single object
-# file produced from the single C++ file into the executable. Since
-# this is the first rule in the Makefile, it is the one `make' selects
-# if you call it without arguments.
-all: $(target)$(EXEEXT)
-$(target)$(EXEEXT) : $(libraries)
- @echo ============================ Linking $@
- @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
-
-
-# To make running the application somewhat independent of the actual
-# program name, we usually declare a rule `run' which simply runs the
-# program. You can then run it by typing `make run'. This is also
-# useful if you want to call the executable with arguments which do
-# not change frequently. You may then want to add them to the
-# following rule:
-run: $(target)$(EXEEXT)
- @echo ============================ Running $<
- @./$(target)$(EXEEXT)
-
-
-# As a last rule to the `make' program, we define what to do when
-# cleaning up a directory. This usually involves deleting object files
-# and other automatically created files such as the executable itself,
-# backup files, and data files. Since the latter are not usually quite
-# diverse, you needed to declare them at the top of this file.
-clean:
- -rm -f *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-files)
-
-
-# Since we have not yet stated how to make an object file from a C++
-# file, we should do so now. Since the many flags passed to the
-# compiler are usually not of much interest, we suppress the actual
-# command line using the `at' sign in the first column of the rules
-# and write the string indicating what we do instead.
-./%.g.$(OBJEXT) :
- @echo "==============debug========= $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-./%.$(OBJEXT) :
- @echo "==============optimized===== $(<F) -> $@"
- @$(CXX) $(CXXFLAGS.o) -c $< -o $@
-
-
-# The following statement tells make that the rules `run' and `clean'
-# are not expected to produce files of the same name as Makefile rules
-# usually do.
-.PHONY: all run clean
-
-
-# Finally there is a rule which you normally need not care much about:
-# since the executable depends on some include files from the library,
-# besides the C++ application file of course, it is necessary to
-# re-generate the executable when one of the files it depends on has
-# changed. The following rule creates a dependency file
-# `Makefile.dep', which `make' uses to determine when to regenerate
-# the executable. This file is automagically remade whenever needed,
-# i.e. whenever one of the cc-/h-files changed. Make detects whether
-# to remake this file upon inclusion at the bottom of this file.
-#
-# If the creation of Makefile.dep fails, blow it away and fail
-Makefile.dep: $(target).cc Makefile \
- $(shell echo $D/include/deal.II/*/*.h)
- @echo ============================ Remaking $@
- @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \
- > $@ \
- || (rm -f $@ ; false)
- @if test -s $@ ; then true ; else rm $@ ; false ; false ; fi
-
-# To make the dependencies known to `make', we finally have to include
-# them:
-include Makefile.dep
-
-