[med-svn] [lambda-align] 03/15: Imported Upstream version 0.9.3+ds

Sascha Steinbiss satta at debian.org
Fri Aug 19 16:10:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

satta pushed a commit to branch master
in repository lambda-align.

commit 3f42e6b3f3199fcff216fbe43eed8cf501639df5
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Sun Mar 13 14:09:43 2016 +0000

    Imported Upstream version 0.9.3+ds
---
 include/seqan/.travis.yml                          |  30 +
 include/seqan/LICENSE                              |  27 +
 include/seqan/util/cmake/CMakeFindJavaCommon.cmake |  40 ++
 .../util/cmake/CMakeMacroParseArguments.cmake      | 138 ++++
 include/seqan/util/cmake/CTestConfig.cmake         |  13 +
 include/seqan/util/cmake/FeatureSummary.cmake      | 117 ++++
 include/seqan/util/cmake/FindBZip2.cmake           |  61 ++
 include/seqan/util/cmake/FindCXX11.cmake           |  39 ++
 include/seqan/util/cmake/FindCXX14.cmake           |  29 +
 include/seqan/util/cmake/FindGitInfo.cmake         |  64 ++
 include/seqan/util/cmake/FindJava.cmake            | 228 +++++++
 include/seqan/util/cmake/FindOpenCL.cmake          |  79 +++
 include/seqan/util/cmake/FindOpenMP.cmake          | 137 ++++
 .../util/cmake/FindPackageHandleStandardArgs.cmake | 261 ++++++++
 include/seqan/util/cmake/FindSeqAn.cmake           | 480 ++++++++++++++
 include/seqan/util/cmake/FindSphinx.cmake          | 145 ++++
 include/seqan/util/cmake/FindTBB/FindTBB.cmake     | 208 ++++++
 include/seqan/util/cmake/FindTBB/README            |   6 +
 include/seqan/util/cmake/FindZLIB.cmake            | 107 +++
 include/seqan/util/cmake/GetCurrentDate.cmake      |  57 ++
 include/seqan/util/cmake/GetCurrentDate.cpp        |  52 ++
 include/seqan/util/cmake/LibFindMacros.cmake       |  99 +++
 include/seqan/util/cmake/README                    |  84 +++
 include/seqan/util/cmake/SeqAnBuildSystem.cmake    | 731 +++++++++++++++++++++
 include/seqan/util/cmake/SeqAnContribs.cmake       | 117 ++++
 include/seqan/util/cmake/SeqAnCtdSetup.cmake       | 242 +++++++
 .../seqan/util/cmake/SeqAnUsabilityAnalyzer.cmake  |  98 +++
 include/seqan/util/cmake/SeqAnVersion.cpp          |  48 ++
 include/seqan/util/cmake/SetCPackSystemName.cmake  |  51 ++
 include/seqan/util/cmake/ctd/COPYRIGHT             |   2 +
 include/seqan/util/cmake/ctd/DESCRIPTION           |   7 +
 include/seqan/util/cmake/ctd/LICENSE               |  31 +
 .../cmake/ctd/configure_profile_properties.cmake   |  13 +
 include/seqan/util/cmake/ctd/icons/app.png         | Bin 0 -> 3931 bytes
 include/seqan/util/cmake/ctd/icons/category.png    | Bin 0 -> 2978 bytes
 include/seqan/util/cmake/ctd/icons/splash.png      | Bin 0 -> 9838 bytes
 include/seqan/util/cmake/ctd/mime.types            |  37 ++
 include/seqan/util/cmake/ctd/mimetypes.xml         |  23 +
 include/seqan/util/cmake/ctd/plugin.properties.in  |  15 +
 include/seqan/util/cmake/package.cmake             |  96 +++
 include/seqan/util/colornvcc                       | 259 ++++++++
 include/seqan/util/ctd2galaxy.py                   | 192 ++++++
 include/seqan/util/linux_binary_tests.sh           | 171 +++++
 include/seqan/util/makefile_project/Makefile       |  15 +
 include/seqan/util/makefile_project/Makefile.rules |  17 +
 include/seqan/util/makefile_project/README         |   1 +
 include/seqan/util/makefile_project/debug/Makefile |   3 +
 .../seqan/util/makefile_project/release/Makefile   |   3 +
 include/seqan/util/makefile_project/src/main.cpp   |  11 +
 .../seqan/util/raw_cmake_project/CMakeLists.txt    |  11 +
 include/seqan/util/raw_cmake_project/README        |   2 +
 .../util/raw_cmake_project/src/CMakeLists.txt      |  12 +
 include/seqan/util/raw_cmake_project/src/main.cpp  |  12 +
 53 files changed, 4721 insertions(+)

diff --git a/include/seqan/.travis.yml b/include/seqan/.travis.yml
new file mode 100644
index 0000000..c823cdb
--- /dev/null
+++ b/include/seqan/.travis.yml
@@ -0,0 +1,30 @@
+sudo: false
+language: cpp
+compiler:
+  - gcc-4.8
+  - clang
+cache:
+  apt: true
+install:
+  - if [ "$CC" == "gcc" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
+addons:
+  apt:
+    sources:
+      - ubuntu-toolchain-r-test
+    packages:
+      - cmake
+      - gcc-4.8
+      - g++-4.8
+      - clang
+      - zlib1g-dev
+      - libbz2-dev
+      - libboost-dev
+      - python
+      - python-nose
+      - python-jinja2
+      - python-pip
+before_script:
+  - export PATH=$HOME/.local/bin:$PATH
+  - pip install -r manual/requirements.txt --user `whoami`
+script:
+  ./util/travis/linux-cibuild.sh
diff --git a/include/seqan/LICENSE b/include/seqan/LICENSE
new file mode 100644
index 0000000..7362ed0
--- /dev/null
+++ b/include/seqan/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Knut Reinert or the FU Berlin nor the names of
+      its contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
diff --git a/include/seqan/util/cmake/CMakeFindJavaCommon.cmake b/include/seqan/util/cmake/CMakeFindJavaCommon.cmake
new file mode 100644
index 0000000..291d3c1
--- /dev/null
+++ b/include/seqan/util/cmake/CMakeFindJavaCommon.cmake
@@ -0,0 +1,40 @@
+#=============================================================================
+# Copyright 2013-2014 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+# Do not include this module directly from code outside CMake!
+set(_JAVA_HOME "")
+if(JAVA_HOME AND IS_DIRECTORY "${JAVA_HOME}")
+  set(_JAVA_HOME "${JAVA_HOME}")
+  set(_JAVA_HOME_EXPLICIT 1)
+else()
+  set(_ENV_JAVA_HOME "")
+  if(DEFINED ENV{JAVA_HOME})
+    file(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _ENV_JAVA_HOME)
+  endif()
+  if(_ENV_JAVA_HOME AND IS_DIRECTORY "${_ENV_JAVA_HOME}")
+    set(_JAVA_HOME "${_ENV_JAVA_HOME}")
+    set(_JAVA_HOME_EXPLICIT 1)
+  else()
+    set(_CMD_JAVA_HOME "")
+    if(APPLE AND EXISTS /usr/libexec/java_home)
+      execute_process(COMMAND /usr/libexec/java_home
+        OUTPUT_VARIABLE _CMD_JAVA_HOME OUTPUT_STRIP_TRAILING_WHITESPACE)
+    endif()
+    if(_CMD_JAVA_HOME AND IS_DIRECTORY "${_CMD_JAVA_HOME}")
+      set(_JAVA_HOME "${_CMD_JAVA_HOME}")
+      set(_JAVA_HOME_EXPLICIT 0)
+    endif()
+    unset(_CMD_JAVA_HOME)
+  endif()
+  unset(_ENV_JAVA_HOME)
+endif()
diff --git a/include/seqan/util/cmake/CMakeMacroParseArguments.cmake b/include/seqan/util/cmake/CMakeMacroParseArguments.cmake
new file mode 100644
index 0000000..7ce4c49
--- /dev/null
+++ b/include/seqan/util/cmake/CMakeMacroParseArguments.cmake
@@ -0,0 +1,138 @@
+# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
+#
+# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for
+# parsing the arguments given to that macro or function.
+# It processes the arguments and defines a set of variables which hold the
+# values of the respective options.
+#
+# The <options> argument contains all options for the respective macro,
+# i.e. keywords which can be used when calling the macro without any value
+# following, like e.g. the OPTIONAL keyword of the install() command.
+#
+# The <one_value_keywords> argument contains all keywords for this macro
+# which are followed by one value, like e.g. DESTINATION keyword of the
+# install() command.
+#
+# The <multi_value_keywords> argument contains all keywords for this macro
+# which can be followed by more than one value, like e.g. the TARGETS or
+# FILES keywords of the install() command.
+#
+# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
+# keywords listed in <options>, <one_value_keywords> and
+# <multi_value_keywords> a variable composed of the given <prefix>
+# followed by "_" and the name of the respective keyword.
+# These variables will then hold the respective value from the argument list.
+# For the <options> keywords this will be TRUE or FALSE.
+#
+# All remaining arguments are collected in a variable
+# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether
+# your macro was called with unrecognized parameters.
+#
+# As an example here a my_install() macro, which takes similar arguments as the
+# real install() command:
+#
+#   function(MY_INSTALL)
+#     set(options OPTIONAL FAST)
+#     set(oneValueArgs DESTINATION RENAME)
+#     set(multiValueArgs TARGETS CONFIGURATIONS)
+#     cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
+#     ...
+#
+# Assume my_install() has been called like this:
+#   my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
+#
+# After the cmake_parse_arguments() call the macro will have set the following
+# variables:
+#   MY_INSTALL_OPTIONAL = TRUE
+#   MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
+#   MY_INSTALL_DESTINATION = "bin"
+#   MY_INSTALL_RENAME = "" (was not used)
+#   MY_INSTALL_TARGETS = "foo;bar"
+#   MY_INSTALL_CONFIGURATIONS = "" (was not used)
+#   MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
+#
+# You can the continue and process these variables.
+#
+# Keywords terminate lists of values, e.g. if directly after a one_value_keyword
+# another recognized keyword follows, this is interpreted as the beginning of
+# the new option.
+# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in
+# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would
+# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
+
+#=============================================================================
+# Copyright 2010 Alexander Neundorf <neundorf at kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+
+if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
+  return()
+endif()
+set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
+
+
+function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
+  # first set all result variables to empty/FALSE
+  foreach(arg_name ${_singleArgNames} ${_multiArgNames})
+    set(${prefix}_${arg_name})
+  endforeach(arg_name)
+
+  foreach(option ${_optionNames})
+    set(${prefix}_${option} FALSE)
+  endforeach(option)
+
+  set(${prefix}_UNPARSED_ARGUMENTS)
+
+  set(insideValues FALSE)
+  set(currentArgName)
+
+  # now iterate over all arguments and fill the result variables
+  foreach(currentArg ${ARGN})
+    list(FIND _optionNames "${currentArg}" optionIndex)  # ... then this marks the end of the arguments belonging to this keyword
+    list(FIND _singleArgNames "${currentArg}" singleArgIndex)  # ... then this marks the end of the arguments belonging to this keyword
+    list(FIND _multiArgNames "${currentArg}" multiArgIndex)  # ... then this marks the end of the arguments belonging to this keyword
+
+    if(${optionIndex} EQUAL -1  AND  ${singleArgIndex} EQUAL -1  AND  ${multiArgIndex} EQUAL -1)
+      if(insideValues)
+        if("${insideValues}" STREQUAL "SINGLE")
+          set(${prefix}_${currentArgName} ${currentArg})
+          set(insideValues FALSE)
+        elseif("${insideValues}" STREQUAL "MULTI")
+          list(APPEND ${prefix}_${currentArgName} ${currentArg})
+        endif()
+      else(insideValues)
+        list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
+      endif(insideValues)
+    else()
+      if(NOT ${optionIndex} EQUAL -1)
+        set(${prefix}_${currentArg} TRUE)
+        set(insideValues FALSE)
+      elseif(NOT ${singleArgIndex} EQUAL -1)
+        set(currentArgName ${currentArg})
+        set(${prefix}_${currentArgName})
+        set(insideValues "SINGLE")
+      elseif(NOT ${multiArgIndex} EQUAL -1)
+        set(currentArgName ${currentArg})
+        set(${prefix}_${currentArgName})
+        set(insideValues "MULTI")
+      endif()
+    endif()
+
+  endforeach(currentArg)
+
+  # propagate the result variables to the caller:
+  foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
+    set(${prefix}_${arg_name}  ${${prefix}_${arg_name}} PARENT_SCOPE)
+  endforeach(arg_name)
+  set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
+
+endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)
diff --git a/include/seqan/util/cmake/CTestConfig.cmake b/include/seqan/util/cmake/CTestConfig.cmake
new file mode 100644
index 0000000..20b7d8d
--- /dev/null
+++ b/include/seqan/util/cmake/CTestConfig.cmake
@@ -0,0 +1,13 @@
+## This file should be placed in the root directory of your project.
+## Then modify the CMakeLists.txt file in the root directory of your
+## project to incorporate the testing dashboard.
+## # The following are required to uses Dart and the Cdash dashboard
+##   ENABLE_TESTING()
+##   INCLUDE(CTest)
+set(CTEST_PROJECT_NAME "SeqAn")
+set(CTEST_NIGHTLY_START_TIME "23:00:00 UTC")
+
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "cdash.seqan.de")
+set(CTEST_DROP_LOCATION "/submit.php?project=SeqAn")
+set(CTEST_DROP_SITE_CDASH TRUE)
diff --git a/include/seqan/util/cmake/FeatureSummary.cmake b/include/seqan/util/cmake/FeatureSummary.cmake
new file mode 100644
index 0000000..9e650d6
--- /dev/null
+++ b/include/seqan/util/cmake/FeatureSummary.cmake
@@ -0,0 +1,117 @@
+# Print missing optional dependencies and consequently missing SeqAn features.
+#
+# We have two main cases.  First, if all libraries were found, we print a
+# message indicating that.  In the second case, we print a more highlighted
+# message to warn the user.
+
+message("")
+message("==============================================================================")
+message("                            SeqAn Features")
+message("==============================================================================")
+message("")
+if (ZLIB_FOUND AND BZIP2_FOUND AND Boost_FOUND AND OPENMP_FOUND)
+    message("ALL dependencies were found and the SeqAn build system has SUCCESSFULLY")
+    message("configured your build files or IDE project files.  ALL functionality has")
+    message("been enabled.")
+else ()
+    message("The SeqAn build system has SUCCESSFULLY configured your build files or IDE")
+    message("project files.  Most features of SeqAn depend only on core C/C++ features and")
+    message("are available on any platform.  However, some functionality is only enabled")
+    message("with external libraries installed.  The following report shows you which of")
+    message("these OPTIONAL features are disabled on your system.  Also, it gives you")
+    message("some hints on what to do to enable the features.")
+endif ()
+message("")
+if (ZLIB_FOUND)
+    message("ZLIB       - FOUND")
+else (ZLIB_FOUND)
+    message("ZLIB       - NOT FOUND")
+    message("")
+    message("  zlib is a library for file compression (powering the ubiquitous .gz files,")
+    message("  for example.  Reading/writing zlib-compressed streams depends on zlib,")
+    message("  especially does support for BAM files.  For Linux systems, zlib is available")
+    message("  in all distribution's package repositoryies, make sure to also install the")
+    message("  developer files.  For Mac Os X, zlib should be installed together with the")
+    message("  XCode Tools.  For Windows, we have prepared a ZIP archive with common")
+    message("  binaries, available together with installation instructions here:")
+    message("")
+    message("    http://trac.seqan.de/wiki/HowTo/InstallContribsWindows")
+    message("")
+    message("  The following functionality has been disabled:")
+    message("")
+    message("    * Reading/writing of gzip and BGZF files (Stream<GZFile>, Stream<BGZF>).")
+    message("    * Reading/writing of BAM files.")
+    message("")
+endif (ZLIB_FOUND)
+if (BZIP2_FOUND)
+    message("BZIP2      - FOUND")
+else (BZIP2_FOUND)
+    message("BZIP2      - NOT FOUND")
+    message("")
+    message("  bzlib is a library for compression (powering .bz2 files).  The compression")
+    message("  ratio is better than with zlib/gzip but compression and decompression are")
+    message("  slower.  For Linux, libbz2 is available in all distribution's package")
+    message("  repositories, make sure to also install the developer files.  For Mac Os X,")
+    message("  bzlib should be installed together with the XCode Tools.  For Windows, we")
+    message("  have prepared a ZIP archive with common binaries, including bzlib, available")
+    message("  together with installation instructions here:")
+    message("")
+    message("    http://trac.seqan.de/wiki/HowTo/InstallContribsWindows")
+    message("")
+    message("  The following functionality has been disabled:")
+    message("")
+    message("   * Reading/writing of bz2 files (Stream<BZ2Stream>).")
+    message("")
+endif (BZIP2_FOUND)
+if (OPENMP_FOUND)
+    message("OPENMP     - FOUND")
+else (OPENMP_FOUND)
+    message("OPENMP     - NOT FOUND")
+    message("")
+    message("  OpenMP is a C/C++ language extension for parallel programming.  It provides")
+    message("  C pragmas that allow parallelization-related annotations of the program code")
+    message("  and a run time library.  No functionality is disabled but the parallel")
+    message("  versions of algorithms will not be available.  Also, some applications will")
+    message("  not be built with OpenMP missing (see messages above).")
+    message("")
+    message("  OpenMP is available in the GCC C++/MinGW and Microsoft Visual C++ compilers.")
+    message("  LLVM/Clang currently does not have support for OpenMP.")
+    message("")
+endif (OPENMP_FOUND)
+if (Boost_FOUND)
+    message("BOOST      - FOUND")
+else (Boost_FOUND)
+    message("BOOST      - NOT FOUND")
+    message("")
+    message("  Boost the largest C++ template library.  Because of its size, we chose not")
+    message("  to depend on Boost for core library functionality.  However, some")
+    message("  applications depend on Boost, e.g. for the math/statistics Boost libraries.")
+    message("  These applications will appear in your build and project files (as indicated")
+    message("  above).")
+    message("")
+endif (Boost_FOUND)
+message("")
+message("Build Type - ${CMAKE_BUILD_TYPE}")
+message("")
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+message("             Programs will be built in DEBUG mode.  Debug symbols and")
+message("             assertions will be enabled.  The code is compiled with DISABLED")
+message("             OPTIMIZATIONS")
+message("")
+message("                  /!\\ DEBUG mode will result in BAD PERFORMANCE /!\\")
+message("")
+message("             For PRODUCTION USAGE, you should compile in Release mode. To")
+message("             enable the release mode, pass -DCMAKE_BUILD_TYPE=Release to the")
+message("             cmake call.")
+elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+message("             Programs will be built in RELEASE WITH DEBUG SYMBOLS mode.")
+message("             Debug symbols and optimizations are enabled, assertions are only")
+message("             enabled for the tests.")
+elseif (CMAKE_BUILD_TYPE STREQUAL "Release")
+message("             Programs will be built in RELEASE mode. Optimizations are")
+message("             enabled, debug symbols are disabled, and assertions are only")
+message("             enabled for the tests.")
+endif ()
+message("")
+message("==============================================================================")
+message("")
diff --git a/include/seqan/util/cmake/FindBZip2.cmake b/include/seqan/util/cmake/FindBZip2.cmake
new file mode 100644
index 0000000..d42771d
--- /dev/null
+++ b/include/seqan/util/cmake/FindBZip2.cmake
@@ -0,0 +1,61 @@
+# - Try to find BZip2
+# Once done this will define
+#
+#  BZIP2_FOUND - system has BZip2
+#  BZIP2_INCLUDE_DIR - the BZip2 include directory
+#  BZIP2_LIBRARIES - Link these to use BZip2
+#  BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_
+
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf at kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+# This is based on the original FindZLIB.cmake file from the CMake
+# distribution.  However, we also look for zlib_d.lib etc. such
+# that we can have both debug and release builds.  Furthermore,
+# we also look for libbz2.lib since that's the name of the bz2 library
+# on windows and the lib is not automatically inferred as on Unices.
+
+FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h)
+
+if (MSVC)
+	FIND_LIBRARY(BZIP2_LIBRARY   NAMES libbz2 bz2 bzip2)
+	FIND_LIBRARY(BZIP2_LIBRARY_D NAMES libbz2_d bz2_d bzip2_d)
+else (MSVC)
+    FIND_LIBRARY(BZIP2_LIBRARY   NAMES libbz2 bz2 bzip2 PATH_SUFFIXES "" lib lib32)
+    FIND_LIBRARY(BZIP2_LIBRARY_D NAMES libbz2_d bz2_d bzip2_d PATH_SUFFIXES "" lib lib32)
+endif (MSVC)
+
+mark_as_advanced(BZIP_LIBRARY BZIP_LIBRARY_D)
+
+# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 DEFAULT_MSG BZIP2_LIBRARY BZIP2_INCLUDE_DIR)
+
+IF (BZIP2_FOUND)
+    #message(STATUS "BZip2 libraries found at ${BZIP2_LIBRARY} ${BZIP2_LIBRARY_D}")
+    INCLUDE(CheckLibraryExists)
+    CHECK_LIBRARY_EXISTS(${BZIP2_LIBRARY} BZ2_bzCompressInit "" BZIP2_NEED_PREFIX)
+	IF (MSVC)
+		SET(BZIP2_LIBRARIES debug ${BZIP2_LIBRARY_D} optimized ${BZIP2_LIBRARY})
+	ELSE (MSVC)
+		SET(BZIP2_LIBRARIES ${BZIP2_LIBRARY})
+	ENDIF (MSVC)
+ELSE (BZIP2_FOUND)
+	message(STATUS "BZip2 libraries could not be found!")
+ENDIF (BZIP2_FOUND)
+
+
+MARK_AS_ADVANCED(BZIP2_INCLUDE_DIR BZIP2_LIBRARIES)
+
diff --git a/include/seqan/util/cmake/FindCXX11.cmake b/include/seqan/util/cmake/FindCXX11.cmake
new file mode 100644
index 0000000..b0b0b95
--- /dev/null
+++ b/include/seqan/util/cmake/FindCXX11.cmake
@@ -0,0 +1,39 @@
+if(__FIND_CXX11_CMAKE__)
+  return()
+endif()
+set(__FIND_CXX11_CMAKE__ TRUE)
+
+# Visual Studio 2008 (vs9) doesn't seem to support C++11 directly (only as TR1)
+if (MSVC AND MSVC_VERSION GREATER 1500)
+  set(CXX11_FOUND 1)
+  # Visual Studio 2010 (vs10) doesn't support C++11 STL.
+  if (MSVC_VERSION GREATER 1600)
+    set(CXX11_STL_FOUND 1)
+  endif (MSVC_VERSION GREATER 1600)
+  return ()
+endif (MSVC AND MSVC_VERSION GREATER 1500)
+
+include(CheckCXXCompilerFlag)
+enable_language(CXX)
+
+check_cxx_compiler_flag("-std=c++11" CXX11_FOUND)
+if (CXX11_FOUND)
+  set (CXX11_CXX_FLAGS "-std=c++11")
+
+  # Tested on Mac OS X 10.8.2 with XCode 4.6 Command Line Tools
+  # Clang requires this to find the correct c++11 headers
+  if (CMAKE_HOST_APPLE AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
+     set (CXX11_CXX_FLAGS "${CXX11_CXX_FLAGS} -stdlib=libc++ -Qunused-arguments")
+  endif (CMAKE_HOST_APPLE AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
+
+else (CXX11_FOUND)
+
+  check_cxx_compiler_flag("-std=c++0x" CXX11_FOUND)
+  if (CXX11_FOUND)
+    set (CXX11_CXX_FLAGS "-std=c++0x")
+  endif (CXX11_FOUND)
+
+endif (CXX11_FOUND)
+
+# By default, C++11 compiler support implies the C++11 STL.
+set(CXX11_STL_FOUND ${CXX11_FOUND})
diff --git a/include/seqan/util/cmake/FindCXX14.cmake b/include/seqan/util/cmake/FindCXX14.cmake
new file mode 100644
index 0000000..bd9221a
--- /dev/null
+++ b/include/seqan/util/cmake/FindCXX14.cmake
@@ -0,0 +1,29 @@
+if(__FIND_CXX14_CMAKE__)
+    return()
+endif()
+set(__FIND_CXX14_CMAKE__ TRUE)
+
+# make sure that c++11 detection happens first, so that the c++11-flag
+# doesn't overwrite the c++14 flag
+find_package(CXX11)
+
+# Visual Studio is still far away from C++14 (maybe add 2015 or 2015+1 later)
+# so no checks for this now
+
+include(CheckCXXCompilerFlag)
+enable_language(CXX)
+
+check_cxx_compiler_flag("-std=c++14" CXX14_FOUND)
+if (CXX14_FOUND)
+    set (CXX11_CXX_FLAGS "-std=c++14")
+else (CXX14_FOUND)
+    check_cxx_compiler_flag("-std=c++1y" CXX14_FOUND)
+    if (CXX14_FOUND)
+        set (CXX11_CXX_FLAGS "-std=c++1y")
+    endif (CXX14_FOUND)
+endif (CXX14_FOUND)
+
+# c++14 implies c++11
+if (CXX14_FOUND)
+    set (CXX11_FOUND TRUE)
+endif (CXX14_FOUND)
diff --git a/include/seqan/util/cmake/FindGitInfo.cmake b/include/seqan/util/cmake/FindGitInfo.cmake
new file mode 100644
index 0000000..0b61253
--- /dev/null
+++ b/include/seqan/util/cmake/FindGitInfo.cmake
@@ -0,0 +1,64 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2013, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+#
+# This CMake module will try to find git information. You can use  it the same
+# way you would use any other CMake module.
+#
+#   find_package(GitInfo [REQUIRED] ...)
+#
+# If the Git package is found, the macro
+#  GIT_WC_INFO(<dir> <var-prefix>)
+# is defined to extract information of a git working copy at a given location.
+#
+# The macro defines the following variables:
+#  <var-prefix>_WC_REVISION - Hash of last commit
+#  <var-prefix>_WC_LAST_CHANGED_DATE - Date of last commit
+#
+# ============================================================================
+
+find_package (Git QUIET)
+
+if (GIT_FOUND)
+
+  macro(GIT_WC_INFO dir prefix)
+    execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --verify -q --short=7 HEAD
+      WORKING_DIRECTORY ${dir}
+      ERROR_QUIET
+      OUTPUT_VARIABLE ${prefix}_WC_REVISION
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --simplify-by-decoration --pretty=%ai
+      WORKING_DIRECTORY ${dir}
+      ERROR_QUIET
+      OUTPUT_VARIABLE ${prefix}_WC_LAST_CHANGED_DATE
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+  endmacro(GIT_WC_INFO)
+
+endif()
diff --git a/include/seqan/util/cmake/FindJava.cmake b/include/seqan/util/cmake/FindJava.cmake
new file mode 100644
index 0000000..ae5a69c
--- /dev/null
+++ b/include/seqan/util/cmake/FindJava.cmake
@@ -0,0 +1,228 @@
+#.rst:
+# FindJava
+# --------
+#
+# Find Java
+#
+# This module finds if Java is installed and determines where the
+# include files and libraries are.  The caller may set variable JAVA_HOME
+# to specify a Java installation prefix explicitly.
+#
+# This module sets the following result variables:
+#
+# ::
+#
+#   Java_JAVA_EXECUTABLE    = the full path to the Java runtime
+#   Java_JAVAC_EXECUTABLE   = the full path to the Java compiler
+#   Java_JAVAH_EXECUTABLE   = the full path to the Java header generator
+#   Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
+#   Java_JAR_EXECUTABLE     = the full path to the Java archiver
+#   Java_VERSION_STRING     = Version of java found, eg. 1.6.0_12
+#   Java_VERSION_MAJOR      = The major version of the package found.
+#   Java_VERSION_MINOR      = The minor version of the package found.
+#   Java_VERSION_PATCH      = The patch version of the package found.
+#   Java_VERSION_TWEAK      = The tweak version of the package found (after '_')
+#   Java_VERSION            = This is set to: $major.$minor.$patch(.$tweak)
+#
+#
+#
+# The minimum required version of Java can be specified using the
+# standard CMake syntax, e.g.  find_package(Java 1.5)
+#
+# NOTE: ${Java_VERSION} and ${Java_VERSION_STRING} are not guaranteed to
+# be identical.  For example some java version may return:
+# Java_VERSION_STRING = 1.5.0_17 and Java_VERSION = 1.5.0.17
+#
+# another example is the Java OEM, with: Java_VERSION_STRING = 1.6.0-oem
+# and Java_VERSION = 1.6.0
+#
+# For these components the following variables are set:
+#
+# ::
+#
+#   Java_FOUND                    - TRUE if all components are found.
+#   Java_INCLUDE_DIRS             - Full paths to all include dirs.
+#   Java_LIBRARIES                - Full paths to all libraries.
+#   Java_<component>_FOUND        - TRUE if <component> is found.
+#
+#
+#
+# Example Usages:
+#
+# ::
+#
+#   find_package(Java)
+#   find_package(Java COMPONENTS Runtime)
+#   find_package(Java COMPONENTS Development)
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+# Copyright 2009-2011 Mathieu Malaterre <mathieu.malaterre at gmail.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindJavaCommon.cmake)
+
+# The HINTS option should only be used for values computed from the system.
+set(_JAVA_HINTS)
+if(_JAVA_HOME)
+  list(APPEND _JAVA_HINTS ${_JAVA_HOME}/bin)
+endif()
+list(APPEND _JAVA_HINTS
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.9;JavaHome]/bin"
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin"
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.7;JavaHome]/bin"
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.6;JavaHome]/bin"
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin"
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin"
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin"
+  )
+# Hard-coded guesses should still go in PATHS. This ensures that the user
+# environment can always override hard guesses.
+set(_JAVA_PATHS
+  /usr/lib/java/bin
+  /usr/share/java/bin
+  /usr/local/java/bin
+  /usr/local/java/share/bin
+  /usr/java/j2sdk1.4.2_04
+  /usr/lib/j2sdk1.4-sun/bin
+  /usr/java/j2sdk1.4.2_09/bin
+  /usr/lib/j2sdk1.5-sun/bin
+  /opt/sun-jdk-1.5.0.04/bin
+  /usr/local/jdk-1.7.0/bin
+  /usr/local/jdk-1.6.0/bin
+  )
+find_program(Java_JAVA_EXECUTABLE
+  NAMES java
+  HINTS ${_JAVA_HINTS}
+  PATHS ${_JAVA_PATHS}
+)
+
+if(Java_JAVA_EXECUTABLE)
+    execute_process(COMMAND ${Java_JAVA_EXECUTABLE} -version
+      RESULT_VARIABLE res
+      OUTPUT_VARIABLE var
+      ERROR_VARIABLE var # sun-java output to stderr
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      ERROR_STRIP_TRAILING_WHITESPACE)
+    if( res )
+      if(var MATCHES "No Java runtime present, requesting install")
+        set_property(CACHE Java_JAVA_EXECUTABLE
+          PROPERTY VALUE "Java_JAVA_EXECUTABLE-NOTFOUND")
+      elseif(${Java_FIND_REQUIRED})
+        message( FATAL_ERROR "Error executing java -version" )
+      else()
+        message( STATUS "Warning, could not run java -version")
+      endif()
+    else()
+      # extract major/minor version and patch level from "java -version" output
+      # Tested on linux using
+      # 1. Sun / Sun OEM
+      # 2. OpenJDK 1.6
+      # 3. GCJ 1.5
+      # 4. Kaffe 1.4.2
+      # 5. OpenJDK 1.7.x on OpenBSD
+      if(var MATCHES "java version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\"")
+        # This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
+        set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
+      elseif(var MATCHES "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+)\"")
+        # Kaffe style
+        set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
+      elseif(var MATCHES "openjdk version \"([0-9]+\\.[0-9]+\\.[0-9_]+.*)\"")
+        # OpenJDK ver 1.7.x on OpenBSD
+        set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
+      else()
+        if(NOT Java_FIND_QUIETLY)
+          message(WARNING "regex not supported: ${var}. Please report")
+        endif()
+      endif()
+      string( REGEX REPLACE "([0-9]+).*" "\\1" Java_VERSION_MAJOR "${Java_VERSION_STRING}" )
+      string( REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_MINOR "${Java_VERSION_STRING}" )
+      string( REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_PATCH "${Java_VERSION_STRING}" )
+      # warning tweak version can be empty:
+      string( REGEX REPLACE "[0-9]+\\.[0-9]+\\.[0-9]+[_\\.]?([0-9]*).*$" "\\1" Java_VERSION_TWEAK "${Java_VERSION_STRING}" )
+      if( Java_VERSION_TWEAK STREQUAL "" ) # check case where tweak is not defined
+        set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH})
+      else()
+        set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}.${Java_VERSION_TWEAK})
+      endif()
+    endif()
+
+endif()
+
+
+find_program(Java_JAR_EXECUTABLE
+  NAMES jar
+  HINTS ${_JAVA_HINTS}
+  PATHS ${_JAVA_PATHS}
+)
+
+find_program(Java_JAVAC_EXECUTABLE
+  NAMES javac
+  HINTS ${_JAVA_HINTS}
+  PATHS ${_JAVA_PATHS}
+)
+
+find_program(Java_JAVAH_EXECUTABLE
+  NAMES javah
+  HINTS ${_JAVA_HINTS}
+  PATHS ${_JAVA_PATHS}
+)
+
+find_program(Java_JAVADOC_EXECUTABLE
+  NAMES javadoc
+  HINTS ${_JAVA_HINTS}
+  PATHS ${_JAVA_PATHS}
+)
+
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+if(Java_FIND_COMPONENTS)
+  foreach(component ${Java_FIND_COMPONENTS})
+    # User just want to execute some Java byte-compiled
+    if(component STREQUAL "Runtime")
+      find_package_handle_standard_args(Java
+        REQUIRED_VARS Java_JAVA_EXECUTABLE
+        VERSION_VAR Java_VERSION
+        )
+    elseif(component STREQUAL "Development")
+      find_package_handle_standard_args(Java
+        REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
+                      Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE
+        VERSION_VAR Java_VERSION
+        )
+    else()
+      message(FATAL_ERROR "Comp: ${component} is not handled")
+    endif()
+    set(Java_${component}_FOUND TRUE)
+  endforeach()
+else()
+  # Check for everything
+  find_package_handle_standard_args(Java
+    REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
+                  Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE
+    VERSION_VAR Java_VERSION
+    )
+endif()
+
+
+mark_as_advanced(
+  Java_JAVA_EXECUTABLE
+  Java_JAR_EXECUTABLE
+  Java_JAVAC_EXECUTABLE
+  Java_JAVAH_EXECUTABLE
+  Java_JAVADOC_EXECUTABLE
+  )
+
+# LEGACY
+set(JAVA_RUNTIME ${Java_JAVA_EXECUTABLE})
+set(JAVA_ARCHIVE ${Java_JAR_EXECUTABLE})
+set(JAVA_COMPILE ${Java_JAVAC_EXECUTABLE})
diff --git a/include/seqan/util/cmake/FindOpenCL.cmake b/include/seqan/util/cmake/FindOpenCL.cmake
new file mode 100755
index 0000000..f7f7c19
--- /dev/null
+++ b/include/seqan/util/cmake/FindOpenCL.cmake
@@ -0,0 +1,79 @@
+# - Try to find OpenCL
+# This module tries to find an OpenCL implementation on your system. It supports
+# AMD / ATI, Apple and NVIDIA implementations, but shoudl work, too.
+#
+# Once done this will define
+#  OPENCL_FOUND        - system has OpenCL
+#  OPENCL_INCLUDE_DIRS  - the OpenCL include directory
+#  OPENCL_LIBRARIES    - link these to use OpenCL
+#
+# WIN32 should work, but is untested
+
+FIND_PACKAGE( PackageHandleStandardArgs )
+
+SET (OPENCL_VERSION_STRING "0.1.0")
+SET (OPENCL_VERSION_MAJOR 0)
+SET (OPENCL_VERSION_MINOR 1)
+SET (OPENCL_VERSION_PATCH 0)
+
+IF (APPLE)
+
+  FIND_LIBRARY(OPENCL_LIBRARIES OpenCL DOC "OpenCL lib for OSX")
+  FIND_PATH(OPENCL_INCLUDE_DIRS OpenCL/cl.h DOC "Include for OpenCL on OSX")
+  FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS OpenCL/cl.hpp DOC "Include for OpenCL CPP bindings on OSX")
+
+ELSE (APPLE)
+
+	IF (WIN32)
+	
+	    FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h)
+	    FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp)
+	
+	    # The AMD SDK currently installs both x86 and x86_64 libraries
+	    # This is only a hack to find out architecture
+	    IF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64" )
+	    	SET(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86_64")
+	    ELSE (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
+	    	SET(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86")
+	    ENDIF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64" )
+	    FIND_LIBRARY(OPENCL_LIBRARIES OpenCL.lib ${OPENCL_LIB_DIR})
+	    
+	    GET_FILENAME_COMPONENT(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
+	    
+	    # On Win32 search relative to the library
+	    FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS "${_OPENCL_INC_CAND}")
+	    FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS "${_OPENCL_INC_CAND}")
+	
+	ELSE (WIN32)
+
+            # Unix style platforms
+            FIND_LIBRARY(OPENCL_LIBRARIES OpenCL
+              ENV LD_LIBRARY_PATH
+            )
+
+            GET_FILENAME_COMPONENT(OPENCL_LIB_DIR ${OPENCL_LIBRARIES} PATH)
+            GET_FILENAME_COMPONENT(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
+
+            # The AMD SDK currently does not place its headers
+            # in /usr/include, therefore also search relative
+            # to the library
+            FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS ${_OPENCL_INC_CAND})
+            FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS ${_OPENCL_INC_CAND})
+
+	ENDIF (WIN32)
+
+ENDIF (APPLE)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS( OpenCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS )
+
+IF( _OPENCL_CPP_INCLUDE_DIRS )
+	SET( OPENCL_HAS_CPP_BINDINGS TRUE )
+	LIST( APPEND OPENCL_INCLUDE_DIRS ${_OPENCL_CPP_INCLUDE_DIRS} )
+	# This is often the same, so clean up
+	LIST( REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS )
+ENDIF( _OPENCL_CPP_INCLUDE_DIRS )
+
+MARK_AS_ADVANCED(
+  OPENCL_INCLUDE_DIRS
+)
+
diff --git a/include/seqan/util/cmake/FindOpenMP.cmake b/include/seqan/util/cmake/FindOpenMP.cmake
new file mode 100644
index 0000000..3c0e8e2
--- /dev/null
+++ b/include/seqan/util/cmake/FindOpenMP.cmake
@@ -0,0 +1,137 @@
+# Updated FindOpenMP file such that the failure of finding OpenMP is cached.
+
+# - Finds OpenMP support
+# This module can be used to detect OpenMP support in a compiler.
+# If the compiler supports OpenMP, the flags required to compile with
+# openmp support are set.  
+#
+# The following variables are set:
+#   OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support
+#   OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support
+#   OPENMP_FOUND - true if openmp is detected
+#
+# Supported compilers can be found at http://openmp.org/wp/openmp-compilers/
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2008-2009 André Rigland Brodtkorb <Andre.Brodtkorb at ifi.uio.no>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+if (NOT CMAKE_CURRENT_LIST_DIR)  # CMAKE_CURRENT_LIST_DIR only from cmake 2.8.3.
+  get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+endif (NOT CMAKE_CURRENT_LIST_DIR)
+
+# Do not try to find OpenMP if we know that it cannot be found.
+if (_OPENMP_NOT_FOUND)
+    return ()
+endif ()
+
+# Clang-3.7.0 deactivated because of compiler bugs triggered by SeqAn
+if (COMPILER_IS_CLANG AND (_GCC_VERSION EQUAL 370))
+    set(_OPENMP_NOT_FOUND TRUE)
+    message (STATUS "OpenMP cannot be used becase Clang-3.7.0 has a bug. Please update your clang!")
+    return ()
+endif ()
+
+include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+
+set(OpenMP_C_FLAG_CANDIDATES
+  #Gnu & LLVM
+  "-fopenmp"
+  #Microsoft Visual Studio
+  "/openmp"
+  #Intel windows
+  "-Qopenmp" 
+  #Intel
+  "-openmp" 
+  #Empty, if compiler automatically accepts openmp
+  " "
+  #Sun
+  "-xopenmp"
+  #HP
+  "+Oopenmp"
+  #IBM XL C/c++
+  "-qsmp"
+  #Portland Group
+  "-mp"
+)
+set(OpenMP_CXX_FLAG_CANDIDATES ${OpenMP_C_FLAG_CANDIDATES})
+
+# sample openmp source code to test
+set(OpenMP_C_TEST_SOURCE 
+"
+#include <omp.h>
+int main() { 
+#ifdef _OPENMP
+  return 0; 
+#else
+  breaks_on_purpose
+#endif
+}
+")
+# use the same source for CXX as C for now
+set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
+# if these are set then do not try to find them again,
+# by avoiding any try_compiles for the flags
+if(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
+  set(OpenMP_C_FLAG_CANDIDATES)
+  set(OpenMP_CXX_FLAG_CANDIDATES)
+endif(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
+
+# check c compiler
+foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
+  set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
+  set(CMAKE_REQUIRED_FLAGS "${FLAG}")
+  unset(OpenMP_FLAG_DETECTED CACHE)
+  message(STATUS "Try OpenMP C flag = [${FLAG}]")
+  check_c_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
+  set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
+  if(OpenMP_FLAG_DETECTED)
+    set(OpenMP_C_FLAGS_INTERNAL "${FLAG}")
+    break()
+  endif(OpenMP_FLAG_DETECTED) 
+endforeach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
+
+# check cxx compiler
+foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
+  set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
+  set(CMAKE_REQUIRED_FLAGS "${FLAG}")
+  unset(OpenMP_FLAG_DETECTED CACHE)
+  message(STATUS "Try OpenMP CXX flag = [${FLAG}]")
+  check_cxx_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
+  set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
+  if(OpenMP_FLAG_DETECTED)
+    set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}")
+    break()
+  endif(OpenMP_FLAG_DETECTED)
+endforeach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
+
+set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS_INTERNAL}"
+  CACHE STRING "C compiler flags for OpenMP parallization")
+
+set(OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS_INTERNAL}"
+  CACHE STRING "C++ compiler flags for OpenMP parallization")
+# handle the standard arguments for find_package
+find_package_handle_standard_args(OpenMP DEFAULT_MSG 
+  OpenMP_C_FLAGS OpenMP_CXX_FLAGS )
+
+mark_as_advanced(
+  OpenMP_C_FLAGS
+  OpenMP_CXX_FLAGS
+)
+
+if (NOT OPENMP_FOUND)
+    set (OPENMP_NOT_FOUND TRUE CACHE INTERNAL
+        "Set such that OpenMP is not searched for more than once.")
+endif ()
diff --git a/include/seqan/util/cmake/FindPackageHandleStandardArgs.cmake b/include/seqan/util/cmake/FindPackageHandleStandardArgs.cmake
new file mode 100644
index 0000000..229df4e
--- /dev/null
+++ b/include/seqan/util/cmake/FindPackageHandleStandardArgs.cmake
@@ -0,0 +1,261 @@
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
+#
+# This function is intended to be used in FindXXX.cmake modules files.
+# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
+# It also sets the <UPPERCASED_NAME>_FOUND variable.
+# The package is considered found if all variables <var1>... listed contain
+# valid results, e.g. valid filepaths.
+#
+# There are two modes of this function. The first argument in both modes is
+# the name of the Find-module where it is called (in original casing).
+#
+# The first simple mode looks like this:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
+# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# If DEFAULT_MSG is given as second argument, then the function will generate
+# itself useful success and error messages. You can also supply a custom error message
+# for the failure case. This is not recommended.
+#
+# The second mode is more powerful and also supports version checking:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
+#                                           [VERSION_VAR   <versionvar>
+#                                           [CONFIG_MODE]
+#                                           [FAIL_MESSAGE "Custom failure message"] )
+#
+# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# After REQUIRED_VARS the variables which are required for this package are listed.
+# Following VERSION_VAR the name of the variable can be specified which holds
+# the version of the package which has been found. If this is done, this version
+# will be checked against the (potentially) specified required version used
+# in the find_package() call. The EXACT keyword is also handled. The default
+# messages include information about the required version and the version
+# which has been actually found, both if the version is ok or not.
+# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
+# a find_package(... NO_MODULE) call, in this case all the information
+# provided by the config-mode of find_package() will be evaluated
+# automatically.
+# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
+# used, the default message will be displayed.
+#
+# Example for mode 1:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
+#
+# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
+# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
+# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
+# independent whether QUIET was used or not.
+# If it is found, success will be reported, including the content of <var1>.
+# On repeated Cmake runs, the same message won't be printed again.
+#
+# Example for mode 2:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
+#                                             VERSION_VAR BISON_VERSION)
+# In this case, BISON is considered to be found if the variable(s) listed
+# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
+# Also the version of BISON will be checked by using the version contained
+# in BISON_VERSION.
+# Since no FAIL_MESSAGE is given, the default messages will be printed.
+#
+# Another example for mode 2:
+#
+#    FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
+# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
+# and adds an additional search directory for automoc4.
+# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
+# success/error message.
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+INCLUDE(FindPackageMessage)
+#INCLUDE(CMakeParseArguments)
+INCLUDE(CMakeMacroParseArguments)
+
+# internal helper macro
+MACRO(_FPHSA_FAILURE_MESSAGE _msg)
+  IF (${_NAME}_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "${_msg}")
+  ELSE (${_NAME}_FIND_REQUIRED)
+    IF (NOT ${_NAME}_FIND_QUIETLY)
+      MESSAGE(STATUS "${_msg}")
+    ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+  ENDIF (${_NAME}_FIND_REQUIRED)
+ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
+
+
+# internal helper macro to generate the failure message when used in CONFIG_MODE:
+MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+  # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
+  IF(${_NAME}_CONFIG)
+    _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
+  ELSE(${_NAME}_CONFIG)
+    # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
+    # List them all in the error message:
+    IF(${_NAME}_CONSIDERED_CONFIGS)
+      SET(configsText "")
+      LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
+      MATH(EXPR configsCount "${configsCount} - 1")
+      FOREACH(currentConfigIndex RANGE ${configsCount})
+        LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
+        LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
+        SET(configsText "${configsText}    ${filename} (version ${version})\n")
+      ENDFOREACH(currentConfigIndex)
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
+
+    ELSE(${_NAME}_CONSIDERED_CONFIGS)
+      # Simple case: No Config-file was found at all:
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
+    ENDIF(${_NAME}_CONSIDERED_CONFIGS)
+  ENDIF(${_NAME}_CONFIG)
+ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+
+
+FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
+
+# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
+# new extended or in the "old" mode:
+  SET(options CONFIG_MODE)
+  SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
+  SET(multiValueArgs REQUIRED_VARS)
+  SET(_KEYWORDS_FOR_EXTENDED_MODE  ${options} ${oneValueArgs} ${multiValueArgs} )
+  LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
+
+  IF(${INDEX} EQUAL -1)
+    SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
+    SET(FPHSA_REQUIRED_VARS ${ARGN})
+    SET(FPHSA_VERSION_VAR)
+  ELSE(${INDEX} EQUAL -1)
+
+    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${ARGN})
+
+    IF(FPHSA_UNPARSED_ARGUMENTS)
+      MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
+    ENDIF(FPHSA_UNPARSED_ARGUMENTS)
+
+    IF(NOT FPHSA_FAIL_MESSAGE)
+      SET(FPHSA_FAIL_MESSAGE  "DEFAULT_MSG")
+    ENDIF(NOT FPHSA_FAIL_MESSAGE)
+  ENDIF(${INDEX} EQUAL -1)
+
+# now that we collected all arguments, process them
+
+  IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+    SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
+  ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+
+  # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
+  # when it successfully found the config-file, including version checking:
+  IF(FPHSA_CONFIG_MODE)
+    LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
+    LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
+    SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
+  ENDIF(FPHSA_CONFIG_MODE)
+
+  IF(NOT FPHSA_REQUIRED_VARS)
+    MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
+  ENDIF(NOT FPHSA_REQUIRED_VARS)
+
+  LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
+
+  STRING(TOUPPER ${_NAME} _NAME_UPPER)
+  STRING(TOLOWER ${_NAME} _NAME_LOWER)
+
+  # collect all variables which were not found, so they can be printed, so the
+  # user knows better what went wrong (#6375)
+  SET(MISSING_VARS "")
+  SET(DETAILS "")
+  SET(${_NAME_UPPER}_FOUND TRUE)
+  # check if all passed variables are valid
+  FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
+    IF(NOT ${_CURRENT_VAR})
+      SET(${_NAME_UPPER}_FOUND FALSE)
+      SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
+    ELSE(NOT ${_CURRENT_VAR})
+      SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
+    ENDIF(NOT ${_CURRENT_VAR})
+  ENDFOREACH(_CURRENT_VAR)
+
+
+  # version handling:
+  SET(VERSION_MSG "")
+  SET(VERSION_OK TRUE)
+  SET(VERSION ${${FPHSA_VERSION_VAR}} )
+  IF (${_NAME}_FIND_VERSION)
+
+    IF(VERSION)
+
+      IF(${_NAME}_FIND_VERSION_EXACT)       # exact version required
+        IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+        ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+
+      ELSE(${_NAME}_FIND_VERSION_EXACT)     # minimum version specified:
+        IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
+        ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ELSE(VERSION)
+
+      # if the package was not found, but a version was given, add that to the output:
+      IF(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
+      ELSE(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ENDIF(VERSION)
+  ELSE (${_NAME}_FIND_VERSION)
+    IF(VERSION)
+      SET(VERSION_MSG "(found version \"${VERSION}\")")
+    ENDIF(VERSION)
+  ENDIF (${_NAME}_FIND_VERSION)
+
+  IF(VERSION_OK)
+    SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
+  ELSE(VERSION_OK)
+    SET(${_NAME_UPPER}_FOUND FALSE)
+  ENDIF(VERSION_OK)
+
+
+  # print the result:
+  IF (${_NAME_UPPER}_FOUND)
+    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}")
+  ELSE (${_NAME_UPPER}_FOUND)
+
+    IF(FPHSA_CONFIG_MODE)
+      _FPHSA_HANDLE_FAILURE_CONFIG_MODE()
+    ELSE(FPHSA_CONFIG_MODE)
+      IF(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
+      ELSE(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
+      ENDIF(NOT VERSION_OK)
+    ENDIF(FPHSA_CONFIG_MODE)
+
+  ENDIF (${_NAME_UPPER}_FOUND)
+
+  SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
+
+ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
diff --git a/include/seqan/util/cmake/FindSeqAn.cmake b/include/seqan/util/cmake/FindSeqAn.cmake
new file mode 100644
index 0000000..7302d64
--- /dev/null
+++ b/include/seqan/util/cmake/FindSeqAn.cmake
@@ -0,0 +1,480 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2012, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+#
+# This CMake module will try to find SeqAn and its dependencies.  You can use
+# it the same way you would use any other CMake module.
+#
+#   find_package(SeqAn [REQUIRED] ...)
+#
+# You can control the exact behaviour by setting the following variables.  The
+# defaults are given after the variable name.
+#
+#   SEQAN_FIND_DEPENDENCIES   -- DEFAULT
+#   SEQAN_FIND_ENABLE_TESTING -- TRUE if ${CMAKE_BUILD_TYPE} == "Debug", FALSE
+#                                otherwise.
+#
+# For example:
+#
+#   set (SEQAN_FIND_DEPENDENCIES ZLIB BZip2)
+#   find_package (SeqAn)
+#
+# The first variable is either "ALL", "DEFAULT" or a list of dependency names
+# and gives the names of the dependencies to search for.  The other two
+# variables can be used to forcibly enabling/disabling the debug and testing
+# mode.
+#
+# Valid dependencies are:
+#
+#   ALL     -- Forcibly enable all dependencies.
+#   DEFAULT -- Enable default dependencies (zlib, OpenMP if available)
+#   NONE    -- Disable all dependencies.
+#
+#   ZLIB    -- zlib compression library
+#   BZip2   -- libbz2 compression library
+#   OpenMP  -- OpenMP language extensions to C/C++
+#   CUDA    -- CUDA language extensions to C/C++
+#
+#
+# Once the search has been performed, the following variables will be set.
+#
+#  SEQAN_FOUND           -- Indicate whether SeqAn was found.
+#
+# These variables are flags that indicate whether the various dependencies
+# of the SeqAn library were found.
+#
+#  SEQAN_HAS_ZLIB
+#  SEQAN_HAS_BZIP2
+#  SEQAN_HAS_OPENMP
+#  SEQAN_HAS_CUDA
+#
+# These variables give lists that are to be passed to the
+# include_directories(), target_link_libraries(), and add_definitions()
+# functions.
+#
+#  SEQAN_INCLUDE_DIRS
+#  SEQAN_LIBRARIES
+#  SEQAN_DEFINITIONS
+#
+# Additionally, the following two variables are set.  The first contains
+# the include paths for SeqAn, the second for dependencies.  This allows to
+# include the dependency headers using include_directories (SYSTEM ...),
+# such that warnings from these headers do not appear in the nightly builds.
+#
+#  SEQAN_INCLUDE_DIRS_MAIN
+#  SEQAN_INCLUDE_DIRS_DEPS
+#
+# The C++ compiler flags to set.
+#
+#  SEQAN_CXX_FLAGS
+#
+# The following variables give the version of the SeqAn library, its
+# major, minor, and the patch version part of the version string.
+#
+#  SEQAN_VERSION_STRING
+#  SEQAN_VERSION_MAJOR
+#  SEQAN_VERSION_MINOR
+#  SEQAN_VERSION_PATCH
+#
+# ============================================================================
+
+include(FindPackageMessage)
+include(CheckIncludeFiles)
+
+# ----------------------------------------------------------------------------
+# Define Constants.
+# ----------------------------------------------------------------------------
+
+set(_SEQAN_DEFAULT_LIBRARIES ZLIB OpenMP)
+set(_SEQAN_ALL_LIBRARIES     ZLIB BZip2 OpenMP CUDA)
+
+# ----------------------------------------------------------------------------
+# Set variables SEQAN_FIND_* to their default unless they have been set.
+# ----------------------------------------------------------------------------
+
+# SEQAN_FIND_DEPENDENCIES
+if (NOT SEQAN_FIND_DEPENDENCIES)
+  set(SEQAN_FIND_DEPENDENCIES "DEFAULT")
+endif ()
+if (SEQAN_FIND_DEPENDENCIES STREQUAL "DEFAULT")
+  set(SEQAN_FIND_DEPENDENCIES ${_SEQAN_DEFAULT_LIBRARIES})
+elseif (SEQAN_FIND_DEPENDENCIES STREQUAL "ALL")
+  set(SEQAN_FIND_DEPENDENCIES ${_SEQAN_ALL_LIBRARIES})
+elseif (SEQAN_FIND_DEPENDENCIES STREQUAL "NONE")
+  set(SEQAN_FIND_DEPENDENCIES)
+endif ()
+
+# SEQAN_FIND_ENABLE_TESTING
+if (NOT SEQAN_FIND_ENABLE_TESTING)
+  set(SEQAN_FIND_ENABLE_TESTING "FALSE")
+endif ()
+
+# ----------------------------------------------------------------------------
+# Compile-specific settings and workarounds around missing CMake features.
+# ----------------------------------------------------------------------------
+
+# Recognize Clang compiler.
+
+set (COMPILER_IS_CLANG FALSE)
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+  set (COMPILER_IS_CLANG TRUE)
+endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+
+# Fix CMAKE_COMPILER_IS_GNUCXX for MinGW.
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+  set (CMAKE_COMPILER_IS_GNUCXX TRUE)
+endif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+
+# Intel
+set (COMPILER_IS_INTEL FALSE)
+if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+  set (COMPILER_IS_INTEL TRUE)
+endif (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+
+# GCC Setup
+
+if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL)
+  # Tune warnings for GCC.
+  set (CMAKE_CXX_WARNING_LEVEL 4)
+  # NOTE: First location to set SEQAN_CXX_FLAGS at the moment.  If you write
+  # to the variable for the first time earlier, update this line to append to
+  # the variable instead of overwriting.
+  set (SEQAN_CXX_FLAGS "-W -Wall -Wno-long-long -fstrict-aliasing -Wstrict-aliasing")
+  set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64)
+
+  # Determine GCC version.
+  EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
+               ARGS --version
+               OUTPUT_VARIABLE __GCC_VERSION)
+  # Remove all but first line.
+  STRING(REGEX REPLACE "([^\n]+).*" "\\1" __GCC_VERSION ${__GCC_VERSION})
+  # Find out version (3 or 2 components).
+  STRING(REGEX REPLACE ".*([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3"
+         __GCC_VERSION ${__GCC_VERSION})
+  STRING(REGEX REPLACE ".*([0-9])\\.([0-9]).*" "\\1\\20"
+         _GCC_VERSION ${__GCC_VERSION})
+
+  # Add -Wno-longlong if the GCC version is < 4.0.0.  Add -pedantic flag but
+  # disable warnings for variadic macros with GCC >= 4.0.0.  Earlier versions
+  # warn because of anonymous variadic macros in pedantic mode but do not have
+  # a flag to disable these warnings.
+  if (400 GREATER _GCC_VERSION)
+    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -Wno-long-long")
+  else (400 GREATER _GCC_VERSION)
+    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -pedantic -Wno-variadic-macros")
+  endif (400 GREATER _GCC_VERSION)
+  
+  # Force GCC to keep the frame pointer when debugging is enabled.  This is
+  # mainly important for 64 bit but does not get into the way on 32 bit either
+  # at minimal performance impact.
+  if (CMAKE_BUILD_TYPE STREQUAL Debug)
+    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")
+  elseif (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
+    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_CXX_FLAGS_RELEASE} -g -fno-omit-frame-pointer")
+  endif ()
+
+  # disable some warnings on ICC
+  if (COMPILER_IS_INTEL)
+    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -wd3373,2102")
+  endif (COMPILER_IS_INTEL)
+endif ()
+
+# Windows Setup
+
+if (WIN32)
+  # Always set NOMINMAX such that <Windows.h> does not define min/max as
+  # macros.
+  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -DNOMINMAX")
+endif (WIN32)
+
+# Visual Studio Setup
+if (MSVC)
+  # Enable intrinics (e.g. _interlockedIncrease)
+  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /EHsc /Oi")
+  # Warning level 3 for MSVC is disabled for now to see how much really bad warnings there are.
+  #set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /W3)
+
+  # TODO(holtgrew): This rather belongs into the SeqAn build system and notso much into FindSeqAn.cmake.
+
+  # Force to always compile with W2.
+  # Use the /W2 warning level for visual studio.
+  SET(CMAKE_CXX_WARNING_LEVEL 2)
+  if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+    STRING (REGEX REPLACE "/W[0-4]"
+            "/W2" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+  else (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /W2")
+  endif (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+
+  # Disable warnings about unsecure (although standard) functions.
+  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /D_SCL_SECURE_NO_WARNINGS")
+endif (MSVC)
+
+# ----------------------------------------------------------------------------
+# Search for directory seqan.
+# ----------------------------------------------------------------------------
+
+option (SEQAN_USE_SEQAN_BUILD_SYSTEM "Whether or not to expect the SeqAn build system." OFF)
+
+if (SEQAN_USE_SEQAN_BUILD_SYSTEM)
+  # When using the SeqAn build system, we scan all entries in
+  # CMAKE_INCLUDE_PATH for a subdirectory seqan and add all paths to the
+  # variable SEQAN_INCLUDE_DIRS_MAIN.
+  set (_SEQAN_INCLUDE_DIRS "")
+  foreach (_SEQAN_BASEDIR ${CMAKE_INCLUDE_PATH})
+    if (EXISTS ${_SEQAN_BASEDIR}/seqan)
+      get_filename_component(_SEQAN_BASEDIR "${_SEQAN_BASEDIR}" ABSOLUTE)
+      set(_SEQAN_INCLUDE_DIRS ${_SEQAN_INCLUDE_DIRS} ${_SEQAN_BASEDIR})
+    endif (EXISTS ${_SEQAN_BASEDIR}/seqan)
+  endforeach (_SEQAN_BASEDIR ${CMAKE_INCLUDE_PATH})
+
+  if (_SEQAN_INCLUDE_DIRS)
+    set(SEQAN_FOUND        TRUE)
+    set(SEQAN_INCLUDE_DIRS_MAIN ${SEQAN_INCLUDE_DIRS_MAIN} ${_SEQAN_INCLUDE_DIRS})
+  else (_SEQAN_INCLUDE_DIRS)
+    set(SEQAN_FOUND        FALSE)
+  endif (_SEQAN_INCLUDE_DIRS)
+else (SEQAN_USE_SEQAN_BUILD_SYSTEM)
+  # When NOT using the SeqAn build system then we only look for one directory
+  # with subdirectory seqan and thus only one library.
+  find_path(_SEQAN_BASEDIR "seqan"
+            PATHS ${SEQAN_INCLUDE_PATH} ENV SEQAN_INCLUDE_PATH
+            NO_DEFAULT_PATH)
+
+  if (NOT _SEQAN_BASEDIR)
+    find_path(_SEQAN_BASEDIR "seqan")
+  endif()
+
+  mark_as_advanced(_SEQAN_BASEDIR)
+
+  if (_SEQAN_BASEDIR)
+    set(SEQAN_FOUND        TRUE)
+    set(SEQAN_INCLUDE_DIRS_MAIN ${SEQAN_INCLUDE_DIRS_MAIN} ${_SEQAN_BASEDIR})
+  else ()
+    set(SEQAN_FOUND        FALSE)
+  endif ()
+endif (SEQAN_USE_SEQAN_BUILD_SYSTEM)
+
+# ----------------------------------------------------------------------------
+# Set defines for debug and testing.
+# ----------------------------------------------------------------------------
+
+if (SEQAN_FIND_ENABLE_TESTING)
+  set(SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} -DSEQAN_ENABLE_TESTING=1)
+else ()
+  set(SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} -DSEQAN_ENABLE_TESTING=0)
+endif ()
+
+# ----------------------------------------------------------------------------
+# Search for dependencies.
+# ----------------------------------------------------------------------------
+
+# librt, libpthread -- implicit, on Linux only
+
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+  set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} rt pthread)
+elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+  set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} pthread)
+  set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-D_GLIBCXX_USE_C99=1")
+endif ()
+
+# libexecinfo -- implicit
+
+check_include_files(execinfo.h _SEQAN_HAVE_EXECINFO)
+mark_as_advanced(_SEQAN_HAVE_EXECINFO)
+if (_SEQAN_HAVE_EXECINFO)
+  set(SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-DSEQAN_HAS_EXECINFO=1")
+  if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+    set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} execinfo elf)
+  endif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+endif (_SEQAN_HAVE_EXECINFO)
+
+
+# libstdc++ -- implicit, Mac only (clang seems not to do this automatically)
+
+if (APPLE)
+  set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} stdc++)
+endif (APPLE)
+
+# always use libc++ with clang
+# if (COMPILER_IS_CLANG)
+#     set(SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-stdlib=libc++")
+# endif()
+
+# ZLIB
+
+list(FIND SEQAN_FIND_DEPENDENCIES "ZLIB" _SEQAN_FIND_ZLIB)
+mark_as_advanced(_SEQAN_FIND_ZLIB)
+
+set (SEQAN_HAS_ZLIB FALSE)
+if (NOT _SEQAN_FIND_ZLIB EQUAL -1)
+  find_package(ZLIB QUIET)
+  if (ZLIB_FOUND)
+    set (SEQAN_HAS_ZLIB     TRUE)
+    set (SEQAN_LIBRARIES         ${SEQAN_LIBRARIES}         ${ZLIB_LIBRARIES})
+    set (SEQAN_INCLUDE_DIRS_DEPS ${SEQAN_INCLUDE_DIRS_DEPS} ${ZLIB_INCLUDE_DIRS})
+    set (SEQAN_DEFINITIONS       ${SEQAN_DEFINITIONS}       "-DSEQAN_HAS_ZLIB=1")
+  endif ()
+endif ()
+
+# BZip2
+
+list(FIND SEQAN_FIND_DEPENDENCIES "BZip2" _SEQAN_FIND_BZIP2)
+mark_as_advanced(_SEQAN_FIND_BZIP2)
+
+set (SEQAN_HAS_BZIP2 FALSE)
+if (NOT _SEQAN_FIND_BZIP2 EQUAL -1)
+  find_package(BZip2 QUIET)
+  if (BZIP2_FOUND)
+    set (SEQAN_HAS_BZIP2    TRUE)
+    set (SEQAN_LIBRARIES         ${SEQAN_LIBRARIES}         ${BZIP2_LIBRARIES})
+    set (SEQAN_INCLUDE_DIRS_DEPS ${SEQAN_INCLUDE_DIRS_DEPS} ${BZIP2_INCLUDE_DIRS})
+    set (SEQAN_DEFINITIONS       ${SEQAN_DEFINITIONS}       "-DSEQAN_HAS_BZIP2=1")
+  endif ()
+endif()
+
+# OpenMP
+
+list(FIND SEQAN_FIND_DEPENDENCIES "OpenMP" _SEQAN_FIND_OPENMP)
+mark_as_advanced(_SEQAN_FIND_OPENMP)
+
+set (SEQAN_HAS_OPENMP FALSE)
+if (NOT _SEQAN_FIND_OPENMP EQUAL -1)
+  find_package(OpenMP QUIET)
+  # Note that in the following, we do not check for OPENMP_FOUND since this is
+  # only true if both C and C++ compiler support OpenMP.  This is not the case
+  # if the user has a compiler without OpenMP support by default and overrides
+  # only the C++ compiler (e.g. on winter 2013's Mac Os X).
+  if (OpenMP_CXX_FLAGS)
+    set (SEQAN_HAS_OPENMP   TRUE)
+    set (SEQAN_LIBRARIES         ${SEQAN_LIBRARIES}         ${OpenMP_LIBRARIES})
+    set (SEQAN_INCLUDE_DIRS_DEPS ${SEQAN_INCLUDE_DIRS_DEPS} ${OpenMP_INCLUDE_DIRS})
+    set (SEQAN_DEFINITIONS       ${SEQAN_DEFINITIONS}       "-DSEQAN_HAS_OPENMP=1")
+    set (SEQAN_CXX_FLAGS        "${SEQAN_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+  endif ()
+endif ()
+
+# CUDA
+
+list(FIND SEQAN_FIND_DEPENDENCIES "CUDA" _SEQAN_FIND_CUDA)
+mark_as_advanced(_SEQAN_FIND_CUDA)
+
+set (SEQAN_HAS_CUDA FALSE)
+if (SEQAN_ENABLE_CUDA AND NOT _SEQAN_FIND_CUDA EQUAL -1)
+  find_package(CUDA QUIET)
+  if (CUDA_FOUND)
+    set (SEQAN_HAS_CUDA TRUE)
+  endif ()
+endif (SEQAN_ENABLE_CUDA AND NOT _SEQAN_FIND_CUDA EQUAL -1)
+
+# Build SEQAN_INCLUDE_DIRS from SEQAN_INCLUDE_DIRS_MAIN and SEQAN_INCLUDE_DIRS_DEPS
+
+set (SEQAN_INCLUDE_DIRS ${SEQAN_INCLUDE_DIRS_MAIN} ${SEQAN_INCLUDE_DIRS_DEPS})
+
+# ----------------------------------------------------------------------------
+# Determine and set SEQAN_VERSION_* variables.
+# ----------------------------------------------------------------------------
+
+if (NOT DEFINED SEQAN_VERSION_STRING)
+  if (NOT CMAKE_CURRENT_LIST_DIR)  # CMAKE_CURRENT_LIST_DIR only from cmake 2.8.3.
+    get_filename_component (CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+  endif (NOT CMAKE_CURRENT_LIST_DIR)
+
+  try_run (_SEQAN_RUN_RESULT
+           _SEQAN_COMPILE_RESULT
+           ${CMAKE_BINARY_DIR}/CMakeFiles/SeqAnVersion
+           ${CMAKE_CURRENT_LIST_DIR}/SeqAnVersion.cpp
+           CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${SEQAN_INCLUDE_DIRS_MAIN}"
+           COMPILE_OUTPUT_VARIABLE _COMPILE_OUTPUT
+           RUN_OUTPUT_VARIABLE _RUN_OUTPUT)
+  if (NOT _RUN_OUTPUT)
+    message ("")
+    message ("ERROR: Could not determine SeqAn version.")
+    message ("COMPILE OUTPUT:")
+    message (${_COMPILE_OUTPUT})
+  endif (NOT _RUN_OUTPUT)
+
+  string (REGEX REPLACE ".*SEQAN_VERSION_MAJOR:([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_MAJOR ${_RUN_OUTPUT})
+  string (REGEX REPLACE ".*SEQAN_VERSION_MINOR:([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_MINOR ${_RUN_OUTPUT})
+  string (REGEX REPLACE ".*SEQAN_VERSION_PATCH:([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_PATCH ${_RUN_OUTPUT})
+  string (REGEX REPLACE ".*SEQAN_VERSION_PRE_RELEASE:([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_PRE_RELEASE ${_RUN_OUTPUT})
+
+  if (SEQAN_VERSION_PRE_RELEASE EQUAL 1)
+    set (_SEQAN_VERSION_DEVELOPMENT "TRUE")
+  else ()
+    set (_SEQAN_VERSION_DEVELOPMENT "FALSE")
+  endif ()
+
+  set (_SEQAN_VERSION_STRING "${_SEQAN_VERSION_MAJOR}.${_SEQAN_VERSION_MINOR}.${_SEQAN_VERSION_PATCH}")
+  if (_SEQAN_VERSION_DEVELOPMENT)
+    set (_SEQAN_VERSION_STRING "${_SEQAN_VERSION_STRING}_dev")
+  endif ()
+
+  # Cache results.
+  set (SEQAN_VERSION_MAJOR "${_SEQAN_VERSION_MAJOR}" CACHE INTERNAL "SeqAn major version.")
+  set (SEQAN_VERSION_MINOR "${_SEQAN_VERSION_MINOR}" CACHE INTERNAL "SeqAn minor version.")
+  set (SEQAN_VERSION_PATCH "${_SEQAN_VERSION_PATCH}" CACHE INTERNAL "SeqAn patch version.")
+  set (SEQAN_VERSION_PRE_RELEASE "${_SEQAN_VERSION_PRE_RELEASE}" CACHE INTERNAL "Whether version is a pre-release version version.")
+  set (SEQAN_VERSION_STRING "${_SEQAN_VERSION_STRING}" CACHE INTERNAL "SeqAn version string.")
+
+  message (STATUS "  Determined version is ${SEQAN_VERSION_STRING}")
+endif (NOT DEFINED SEQAN_VERSION_STRING)
+
+# ----------------------------------------------------------------------------
+# Print Variables
+# ----------------------------------------------------------------------------
+
+if (SEQAN_FIND_DEBUG)
+  message("Result for ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt")
+  message("")
+  message("  CMAKE_BUILD_TYPE           ${CMAKE_BUILD_TYPE}")
+  message("  CMAKE_SOURCE_DIR           ${CMAKE_SOURCE_DIR}")
+  message("  CMAKE_INCLUDE_PATH         ${CMAKE_INCLUDE_PATH}")
+  message("  _SEQAN_BASEDIR             ${_SEQAN_BASEDIR}")
+  message("")
+  message("  SEQAN_FOUND                ${SEQAN_FOUND}")
+  message("  SEQAN_HAS_ZLIB             ${SEQAN_HAS_ZLIB}")
+  message("  SEQAN_HAS_BZIP2            ${SEQAN_HAS_BZIP2}")
+  message("  SEQAN_HAS_OPENMP           ${SEQAN_HAS_OPENMP}")
+  message("  SEQAN_HAS_CUDA             ${SEQAN_HAS_CUDA}")
+  message("")
+  message("  SEQAN_INCLUDE_DIRS         ${SEQAN_INCLUDE_DIRS}")
+  message("  SEQAN_INCLUDE_DIRS_DEPS    ${SEQAN_INCLUDE_DIRS_DEPS}")
+  message("  SEQAN_INCLUDE_DIRS_MAIN    ${SEQAN_INCLUDE_DIRS_MAIN}")
+  message("  SEQAN_LIBRARIES            ${SEQAN_LIBRARIES}")
+  message("  SEQAN_DEFINITIONS          ${SEQAN_DEFINITIONS}")
+  message("  SEQAN_CXX_FLAGS            ${SEQAN_CXX_FLAGS}")
+  message("")
+  message("  SEQAN_VERSION_STRING       ${SEQAN_VERSION_STRING}")
+  message("  SEQAN_VERSION_MAJOR        ${SEQAN_VERSION_MAJOR}")
+  message("  SEQAN_VERSION_MINORG       ${SEQAN_VERSION_MINOR}")
+  message("  SEQAN_VERSION_PATCH        ${SEQAN_VERSION_PATCH}")
+endif ()
diff --git a/include/seqan/util/cmake/FindSphinx.cmake b/include/seqan/util/cmake/FindSphinx.cmake
new file mode 100644
index 0000000..4607f78
--- /dev/null
+++ b/include/seqan/util/cmake/FindSphinx.cmake
@@ -0,0 +1,145 @@
+# - This module looks for Sphinx
+# Find the Sphinx documentation generator
+#
+# This modules defines
+#  SPHINX_EXECUTABLE
+#  SPHINX_FOUND
+
+find_program(SPHINX_EXECUTABLE
+  NAMES sphinx-build
+  PATHS
+    /usr/bin
+    /usr/local/bin
+    /opt/local/bin
+  DOC "Sphinx documentation generator"
+)
+
+if( NOT SPHINX_EXECUTABLE )
+  set(_Python_VERSIONS
+    2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5
+  )
+
+  foreach( _version ${_Python_VERSIONS} )
+    set( _sphinx_NAMES sphinx-build-${_version} )
+
+    find_program( SPHINX_EXECUTABLE
+      NAMES ${_sphinx_NAMES}
+      PATHS
+        /usr/bin
+        /usr/local/bin
+        /opt/loca/bin
+      DOC "Sphinx documentation generator"
+    )
+  endforeach()
+endif()
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(Sphinx DEFAULT_MSG
+  SPHINX_EXECUTABLE
+)
+
+
+option( SPHINX_HTML_OUTPUT "Build a single HTML with the whole content." ON )
+option( SPHINX_DIRHTML_OUTPUT "Build HTML pages, but with a single directory per document." OFF )
+option( SPHINX_HTMLHELP_OUTPUT "Build HTML pages with additional information for building a documentation collection in htmlhelp." OFF )
+option( SPHINX_QTHELP_OUTPUT "Build HTML pages with additional information for building a documentation collection in qthelp." OFF )
+option( SPHINX_DEVHELP_OUTPUT "Build HTML pages with additional information for building a documentation collection in devhelp." OFF )
+option( SPHINX_EPUB_OUTPUT "Build HTML pages with additional information for building a documentation collection in epub." OFF )
+option( SPHINX_LATEX_OUTPUT "Build LaTeX sources that can be compiled to a PDF document using pdflatex." OFF )
+option( SPHINX_MAN_OUTPUT "Build manual pages in groff format for UNIX systems." OFF )
+option( SPHINX_TEXT_OUTPUT "Build plain text files." OFF )
+
+
+mark_as_advanced(
+  SPHINX_EXECUTABLE
+  SPHINX_HTML_OUTPUT
+  SPHINX_DIRHTML_OUTPUT
+  SPHINX_HTMLHELP_OUTPUT
+  SPHINX_QTHELP_OUTPUT
+  SPHINX_DEVHELP_OUTPUT
+  SPHINX_EPUB_OUTPUT
+  SPHINX_LATEX_OUTPUT
+  SPHINX_MAN_OUTPUT
+  SPHINX_TEXT_OUTPUT
+)
+
+function( Sphinx_add_target target_name builder conf source destination )
+  add_custom_target( ${target_name} ALL
+    COMMAND ${SPHINX_EXECUTABLE} -b ${builder}
+    -c ${conf}
+    ${source}
+    ${destination}
+    COMMENT "Generating sphinx documentation: ${builder}"
+    )
+
+  set_property(
+    DIRECTORY APPEND PROPERTY
+    ADDITIONAL_MAKE_CLEAN_FILES
+    ${destination}
+    )
+endfunction()
+
+# Target dependencies can be optionally listed at the end.
+function( Sphinx_add_targets target_base_name conf source base_destination )
+
+  set( _dependencies )
+
+  foreach( arg IN LISTS ARGN )
+    set( _dependencies ${_dependencies} ${arg} )
+  endforeach()
+
+  if( ${SPHINX_HTML_OUTPUT} )
+    Sphinx_add_target( ${target_base_name}_html html ${conf} ${source} ${base_destination}/html )
+
+    add_dependencies( ${target_base_name}_html ${_dependencies} )
+  endif()
+
+  if( ${SPHINX_DIRHTML_OUTPUT} )
+    Sphinx_add_target( ${target_base_name}_dirhtml dirhtml ${conf} ${source} ${base_destination}/dirhtml )
+
+    add_dependencies( ${target_base_name}_dirhtml ${_dependencies} )
+  endif()
+
+  if( ${SPHINX_QTHELP_OUTPUT} )
+    Sphinx_add_target( ${target_base_name}_qthelp qthelp ${conf} ${source} ${base_destination}/qthelp )
+
+    add_dependencies( ${target_base_name}_qthelp ${_dependencies} )
+  endif()
+
+  if( ${SPHINX_DEVHELP_OUTPUT} )
+    Sphinx_add_target( ${target_base_name}_devhelp devhelp ${conf} ${source} ${base_destination}/devhelp )
+
+    add_dependencies( ${target_base_name}_devhelp ${_dependencies} )
+  endif()
+
+  if( ${SPHINX_EPUB_OUTPUT} )
+    Sphinx_add_target( ${target_base_name}_epub epub ${conf} ${source} ${base_destination}/epub )
+
+    add_dependencies( ${target_base_name}_epub ${_dependencies} )
+  endif()
+
+  if( ${SPHINX_LATEX_OUTPUT} )
+    Sphinx_add_target( ${target_base_name}_latex latex ${conf} ${source} ${base_destination}/latex )
+
+    add_dependencies( ${target_base_name}_latex ${_dependencies} )
+  endif()
+
+  if( ${SPHINX_MAN_OUTPUT} )
+    Sphinx_add_target( ${target_base_name}_man man ${conf} ${source} ${base_destination}/man )
+
+    add_dependencies( ${target_base_name}_man ${_dependencies} )
+  endif()
+
+  if( ${SPHINX_TEXT_OUTPUT} )
+    Sphinx_add_target( ${target_base_name}_text text ${conf} ${source} ${base_destination}/text )
+
+    add_dependencies( ${target_base_name}_text ${_dependencies} )
+  endif()
+
+  if( ${BUILD_TESTING} )
+    sphinx_add_target( ${target_base_name}_linkcheck linkcheck ${conf} ${source} ${base_destination}/linkcheck )
+
+    add_dependencies( ${target_base_name}_linkcheck ${_dependencies} )
+  endif()
+endfunction()
diff --git a/include/seqan/util/cmake/FindTBB/FindTBB.cmake b/include/seqan/util/cmake/FindTBB/FindTBB.cmake
new file mode 100644
index 0000000..336b054
--- /dev/null
+++ b/include/seqan/util/cmake/FindTBB/FindTBB.cmake
@@ -0,0 +1,208 @@
+# Locate Intel Threading Building Blocks include paths and libraries
+# TBB can be found at http://www.threadingbuildingblocks.org/ 
+# Written by Hannes Hofmann, hannes.hofmann _at_ informatik.uni-erlangen.de
+# Adapted by Gino van den Bergen gino _at_ dtecta.com
+
+# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
+#   e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
+#   TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
+#   in the TBB installation directory (TBB_INSTALL_DIR).
+#
+# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
+# TBB_ARCHITECTURE     [ ia32 | em64t | itanium ]
+#   which architecture to use
+# TBB_COMPILER         e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
+#   which compiler to use (detected automatically on Windows)
+
+# This module respects
+# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
+
+# This module defines
+# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
+# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
+# TBB_INSTALL_DIR, the base TBB install directory
+# TBB_LIBRARIES, the libraries to link against to use TBB.
+# TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
+# TBB_FOUND, If false, don't try to use TBB.
+
+
+if (WIN32)
+    # has em64t/vc8   em64t/vc9
+    # has ia32/vc7.1  ia32/vc8   ia32/vc9
+    set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
+    set(_TBB_LIB_NAME "tbb")
+    set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
+    set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
+    set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
+    if (MSVC71)
+        set (_TBB_COMPILER "vc7.1")
+    endif(MSVC71)
+    if (MSVC80)
+        set(_TBB_COMPILER "vc8")
+    endif(MSVC80)
+    if (MSVC90)
+        set(_TBB_COMPILER "vc9")
+    endif(MSVC90)
+    if (NOT _TBB_COMPILER)
+        message("ERROR: TBB supports only VC 7.1, 8 and 9 compilers on Windows platforms.")
+    endif (NOT _TBB_COMPILER)
+    set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
+endif (WIN32)
+
+if (UNIX)
+    if (APPLE)
+        # MAC
+        set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
+        # libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
+        set(_TBB_LIB_NAME "tbb")
+        set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
+        set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
+        set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
+        # has only one flavor: ia32/cc4.0.1_os10.4.9
+        set(_TBB_COMPILER "cc4.0.1_os10.4.9")
+        set(_TBB_ARCHITECTURE "ia32")
+    else (APPLE)
+        # LINUX
+        set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
+        set(_TBB_LIB_NAME "tbb")
+        set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
+        set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
+        set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
+        # has em64t/cc3.2.3_libc2.3.2_kernel2.4.21  em64t/cc3.3.3_libc2.3.3_kernel2.6.5  em64t/cc3.4.3_libc2.3.4_kernel2.6.9  em64t/cc4.1.0_libc2.4_kernel2.6.16.21
+        # has ia32/*
+        # has itanium/*
+        set(_TBB_COMPILER ${TBB_COMPILER})
+        set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
+    endif (APPLE)
+endif (UNIX)
+
+if (CMAKE_SYSTEM MATCHES "SunOS.*")
+# SUN
+# not yet supported
+# has em64t/cc3.4.3_kernel5.10
+# has ia32/*
+endif (CMAKE_SYSTEM MATCHES "SunOS.*")
+
+
+#-- Clear the public variables
+set (TBB_FOUND "NO")
+
+
+#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
+# first: use CMake variable TBB_INSTALL_DIR
+if (TBB_INSTALL_DIR)
+    set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
+endif (TBB_INSTALL_DIR)
+# second: use environment variable
+if (NOT _TBB_INSTALL_DIR)
+    if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
+    endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
+    # Intel recommends setting TBB21_INSTALL_DIR
+    if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
+    endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
+    if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
+    endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
+    if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
+        set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
+    endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
+endif (NOT _TBB_INSTALL_DIR)
+# third: try to find path automatically
+if (NOT _TBB_INSTALL_DIR)
+    if (_TBB_DEFAULT_INSTALL_DIR)
+        set (_TBB_INSTALL_DIR $ENV{_TBB_DEFAULT_INSTALL_DIR})
+    endif (_TBB_DEFAULT_INSTALL_DIR)
+endif (NOT _TBB_INSTALL_DIR)
+# sanity check
+if (NOT _TBB_INSTALL_DIR)
+    message ("ERROR: TBB_INSTALL_DIR not found. ${_TBB_INSTALL_DIR}")
+else (NOT _TBB_INSTALL_DIR)
+# finally: set the cached CMake variable TBB_INSTALL_DIR
+if (NOT TBB_INSTALL_DIR)
+    set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
+    mark_as_advanced(TBB_INSTALL_DIR)
+endif (NOT TBB_INSTALL_DIR)
+
+
+#-- A macro to rewrite the paths of the library. This is necessary, because 
+#   find_library() always found the em64t/vc9 version of the TBB libs
+macro(TBB_CORRECT_LIB_DIR var_name)
+#    if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
+        string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
+#    endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
+    string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
+    string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+    string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+    string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+endmacro(TBB_CORRECT_LIB_DIR var_content)
+
+
+#-- Look for include directory and set ${TBB_INCLUDE_DIR}
+set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
+find_path(TBB_INCLUDE_DIR
+    tbb/task_scheduler_init.h
+    PATHS ${TBB_INC_SEARCH_DIR}
+    NO_DEFAULT_PATH
+)
+mark_as_advanced(TBB_INCLUDE_DIR)
+
+
+#-- Look for libraries
+# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
+if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
+    set (_TBB_LIBRARY_DIR 
+         ${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
+         ${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
+        )
+else (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
+    # HH: deprecated
+    message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set $ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
+    set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib")
+endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
+
+# GvdB: Mac OS X distribution places libraries directly in lib directory.
+list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
+
+
+find_library(TBB_LIBRARY        ${_TBB_LIB_NAME}        ${_TBB_LIBRARY_DIR} NO_DEFAULT_PATH)
+find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} ${_TBB_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+#Extract path from TBB_LIBRARY name
+get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
+
+#TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
+#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
+mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
+
+#-- Look for debug libraries
+find_library(TBB_LIBRARY_DEBUG        ${_TBB_LIB_DEBUG_NAME}        ${_TBB_LIBRARY_DIR} NO_DEFAULT_PATH)
+find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} ${_TBB_LIBRARY_DIR} NO_DEFAULT_PATH)
+#TBB_CORRECT_LIB_DIR(TBB_LIBRARY_DEBUG)
+#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY_DEBUG)
+mark_as_advanced(TBB_LIBRARY_DEBUG TBB_MALLOC_LIBRARY_DEBUG)
+
+
+if (TBB_INCLUDE_DIR)
+    if (TBB_LIBRARY)
+        set (TBB_FOUND "YES")
+        set (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_LIBRARIES})
+        set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARY_DEBUG} ${TBB_MALLOC_LIBRARY_DEBUG} ${TBB_DEBUG_LIBRARIES})
+        set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
+        set (TBB_LIBRARY_DIRS ${TBB_LIBRARY_DIR} CACHE PATH "TBB library directory" FORCE)
+        mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARY_DIRS TBB_LIBRARIES TBB_DEBUG_LIBRARIES)
+        message(STATUS "Found Intel TBB")
+    endif (TBB_LIBRARY)
+endif (TBB_INCLUDE_DIR)
+
+if (NOT TBB_FOUND)
+    message("ERROR: Intel TBB NOT found!")
+    message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
+    # do only throw fatal, if this pkg is REQUIRED
+    if (TBB_FIND_REQUIRED)
+        message(FATAL_ERROR "Could NOT find TBB library.")
+    endif (TBB_FIND_REQUIRED)
+endif (NOT TBB_FOUND)
+
+endif (NOT _TBB_INSTALL_DIR)
diff --git a/include/seqan/util/cmake/FindTBB/README b/include/seqan/util/cmake/FindTBB/README
new file mode 100644
index 0000000..19309d9
--- /dev/null
+++ b/include/seqan/util/cmake/FindTBB/README
@@ -0,0 +1,6 @@
+CMake TBB Finder
+================
+
+Source: http://findtbb.googlecode.com/svn/trunk/CMake/FindTBB/
+Revision: 16
+Docs: http://code.google.com/p/findtbb/wiki/HowTo
\ No newline at end of file
diff --git a/include/seqan/util/cmake/FindZLIB.cmake b/include/seqan/util/cmake/FindZLIB.cmake
new file mode 100644
index 0000000..21ad489
--- /dev/null
+++ b/include/seqan/util/cmake/FindZLIB.cmake
@@ -0,0 +1,107 @@
+# - Find zlib
+# Find the native ZLIB includes and library.
+# Once done this will define
+#
+#  ZLIB_INCLUDE_DIRS   - where to find zlib.h, etc.
+#  ZLIB_LIBRARIES      - List of libraries when using zlib.
+#  ZLIB_FOUND          - True if zlib found.
+#
+#  ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
+#  ZLIB_VERSION_MAJOR  - The major version of zlib
+#  ZLIB_VERSION_MINOR  - The minor version of zlib
+#  ZLIB_VERSION_PATCH  - The patch version of zlib
+#  ZLIB_VERSION_TWEAK  - The tweak version of zlib
+#
+# The following variable are provided for backward compatibility
+#
+#  ZLIB_MAJOR_VERSION  - The major version of zlib
+#  ZLIB_MINOR_VERSION  - The minor version of zlib
+#  ZLIB_PATCH_VERSION  - The patch version of zlib
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+# This is based on the original FinZLIB.cmake file from the CMake
+# distribution.  However, we also look for zlib_d.lib etc. such
+# that we can have both debug and release builds.
+
+FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/include"
+)
+
+SET(ZLIB_NAMES z zlib zlib1 zlibd zlibd1)
+if (MSVC)
+	SET(ZLIB_NAMES_D z_d zlib_d zlib1_d zlibd_d zlibd1_d)
+endif (MSVC)
+
+FIND_LIBRARY(ZLIB_LIBRARY
+    NAMES
+        ${ZLIB_NAMES}
+    PATHS
+        "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/lib"
+    PATH_SUFFIXES
+        "" lib lib32
+)
+
+if (MSVC)
+	FIND_LIBRARY(ZLIB_LIBRARY_D
+		NAMES
+			${ZLIB_NAMES_D}
+		PATHS
+			"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/lib"
+	)
+endif (MSVC)
+
+MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
+
+IF(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
+    FILE(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
+
+    STRING(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
+    STRING(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR  "${ZLIB_H}")
+    STRING(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
+    SET(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
+
+    # only append a TWEAK version if it exists:
+    SET(ZLIB_VERSION_TWEAK "")
+    IF( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
+        SET(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
+        SET(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
+    ENDIF( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
+
+    SET(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
+    SET(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
+    SET(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
+ENDIF()
+
+# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if 
+# all listed variables are TRUE
+if (NOT CMAKE_CURRENT_LIST_DIR)  # CMAKE_CURRENT_LIST_DIR only from cmake 2.8.3.
+    get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+endif (NOT CMAKE_CURRENT_LIST_DIR)
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
+                                       VERSION_VAR ZLIB_VERSION_STRING)
+
+IF(ZLIB_FOUND)
+	#message(STATUS "Zlib found at ${ZLIB_LIBRARY} ${ZLIB_LIBRARY_D}")
+    SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+	if (MSVC)
+		SET(ZLIB_LIBRARIES debug ${ZLIB_LIBRARY_D} optimized ${ZLIB_LIBRARY})
+	else (MSVC)
+		SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
+	endif (MSVC)
+ELSE()
+	message(STATUS "Zlib could not be found!")
+ENDIF()
+
diff --git a/include/seqan/util/cmake/GetCurrentDate.cmake b/include/seqan/util/cmake/GetCurrentDate.cmake
new file mode 100644
index 0000000..dcdfce2
--- /dev/null
+++ b/include/seqan/util/cmake/GetCurrentDate.cmake
@@ -0,0 +1,57 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2012, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+# Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+# ============================================================================
+# Get current date from compiled C++ program.
+#
+# The C++ program GetCurrentDate.cpp belongs together with this module.
+#
+# The resulting date will be written to the variables CURRENT_YEAR,
+# CURRENT_MONTH, and CURRENT_DAY.
+# ============================================================================
+
+if (NOT CMAKE_CURRENT_LIST_DIR)  # CMAKE_CURRENT_LIST_DIR only from cmake 2.8.3.
+  get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+endif (NOT CMAKE_CURRENT_LIST_DIR)
+
+try_run(_GET_CURRENT_DATE_RUN_RESULT
+        _GET_CURRENT_DATE_COMPILE_RESULT
+        ${CMAKE_BINARY_DIR}/CMakeFiles/GetCurrentDate
+        ${CMAKE_CURRENT_LIST_DIR}/GetCurrentDate.cpp
+        COMPILE_OUTPUT_VARIABLE _GET_CURRENT_DATE_COMPILE_OUTPUT
+        RUN_OUTPUT_VARIABLE _GET_CURRENT_DATE_RUN_OUTPUT)
+if (NOT _GET_CURRENT_DATE_RUN_OUTPUT)
+  message(FATAL_ERROR "Could not determine current date!.")
+endif ()
+
+string(REGEX REPLACE ".*YEAR ([0-9a-zA-Z]+).*" "\\1" CURRENT_YEAR ${_GET_CURRENT_DATE_RUN_OUTPUT})
+string(REGEX REPLACE ".*MONTH ([0-9a-zA-Z]+).*" "\\1" CURRENT_MONTH ${_GET_CURRENT_DATE_RUN_OUTPUT})
+string(REGEX REPLACE ".*DAY ([0-9a-zA-Z]+).*" "\\1" CURRENT_DAY ${_GET_CURRENT_DATE_RUN_OUTPUT})
diff --git a/include/seqan/util/cmake/GetCurrentDate.cpp b/include/seqan/util/cmake/GetCurrentDate.cpp
new file mode 100644
index 0000000..e5cce2b
--- /dev/null
+++ b/include/seqan/util/cmake/GetCurrentDate.cpp
@@ -0,0 +1,52 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// This C++ file prints the current date in a machine-readable format.  It
+// is used by the CMake module GetCurrentDate.cmake to get the current date
+// into the CMake build system.
+// ==========================================================================
+
+#include <ctime>
+#include <iostream>
+
+int main()
+{
+    char date[100];
+    time_t t = time(0);
+    struct tm *tm;
+
+    tm = gmtime(&t);
+    strftime(date, sizeof(date), "YEAR %Y\nMONTH %m\nDAY %d", tm);
+    std::cout << date << '\n';
+    return 0;
+}
diff --git a/include/seqan/util/cmake/LibFindMacros.cmake b/include/seqan/util/cmake/LibFindMacros.cmake
new file mode 100644
index 0000000..69975c5
--- /dev/null
+++ b/include/seqan/util/cmake/LibFindMacros.cmake
@@ -0,0 +1,99 @@
+# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments
+# used for the current package. For this to work, the first parameter must be the
+# prefix of the current package, then the prefix of the new package etc, which are
+# passed to find_package.
+macro (libfind_package PREFIX)
+  set (LIBFIND_PACKAGE_ARGS ${ARGN})
+  if (${PREFIX}_FIND_QUIETLY)
+    set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET)
+  endif (${PREFIX}_FIND_QUIETLY)
+  if (${PREFIX}_FIND_REQUIRED)
+    set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED)
+  endif (${PREFIX}_FIND_REQUIRED)
+  find_package(${LIBFIND_PACKAGE_ARGS})
+endmacro (libfind_package)
+
+# CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
+# where they added pkg_check_modules. Consequently I need to support both in my scripts
+# to avoid those deprecated warnings. Here's a helper that does just that.
+# Works identically to pkg_check_modules, except that no checks are needed prior to use.
+macro (libfind_pkg_check_modules PREFIX PKGNAME)
+  if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+    include(UsePkgConfig)
+    pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS)
+  else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+    find_package(PkgConfig)
+    if (PKG_CONFIG_FOUND)
+      pkg_check_modules(${PREFIX} ${PKGNAME})
+    endif (PKG_CONFIG_FOUND)
+  endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+endmacro (libfind_pkg_check_modules)
+
+# Do the final processing once the paths have been detected.
+# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain
+# all the variables, each of which contain one include directory.
+# Ditto for ${PREFIX}_PROCESS_LIBS and library files.
+# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES.
+# Also handles errors in case library detection was required, etc.
+macro (libfind_process PREFIX)
+  # Skip processing if already processed during this run
+  if (NOT ${PREFIX}_FOUND)
+    # Start with the assumption that the library was found
+    set (${PREFIX}_FOUND TRUE)
+
+    # Process all includes and set _FOUND to false if any are missing
+    foreach (i ${${PREFIX}_PROCESS_INCLUDES})
+      if (${i})
+        set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}})
+        mark_as_advanced(${i})
+      else (${i})
+        set (${PREFIX}_FOUND FALSE)
+      endif (${i})
+    endforeach (i)
+
+    # Process all libraries and set _FOUND to false if any are missing
+    foreach (i ${${PREFIX}_PROCESS_LIBS})
+      if (${i})
+        set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}})
+        mark_as_advanced(${i})
+      else (${i})
+        set (${PREFIX}_FOUND FALSE)
+      endif (${i})
+    endforeach (i)
+
+    # Print message and/or exit on fatal error
+    if (${PREFIX}_FOUND)
+      if (NOT ${PREFIX}_FIND_QUIETLY)
+        message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
+      endif (NOT ${PREFIX}_FIND_QUIETLY)
+    else (${PREFIX}_FOUND)
+      if (${PREFIX}_FIND_REQUIRED)
+        foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS})
+          message("${i}=${${i}}")
+        endforeach (i)
+        message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.")
+      endif (${PREFIX}_FIND_REQUIRED)
+    endif (${PREFIX}_FOUND)
+  endif (NOT ${PREFIX}_FOUND)
+endmacro (libfind_process)
+
+macro(libfind_library PREFIX basename)
+  set(TMP "")
+  if(MSVC80)
+    set(TMP -vc80)
+  endif(MSVC80)
+  if(MSVC90)
+    set(TMP -vc90)
+  endif(MSVC90)
+  set(${PREFIX}_LIBNAMES ${basename}${TMP})
+  if(${ARGC} GREATER 2)
+    set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2})
+    string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES})
+    set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP})
+  endif(${ARGC} GREATER 2)
+  find_library(${PREFIX}_LIBRARY
+    NAMES ${${PREFIX}_LIBNAMES}
+    PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}
+  )
+endmacro(libfind_library)
+
diff --git a/include/seqan/util/cmake/README b/include/seqan/util/cmake/README
new file mode 100644
index 0000000..404cb20
--- /dev/null
+++ b/include/seqan/util/cmake/README
@@ -0,0 +1,84 @@
+                  ** SeqAn Build System and Support Files **
+
+Description
+===========
+
+This directory contains the SeqAn CMake build system and supporting files.  We
+will give a rough overview of the most important files and mechanisms used in
+the build system.  It should be fairly easy to understand the system from the
+documentation embedded in the CMake files.
+
+Files
+=====
+
+  FindTBB
+
+    Copy from http://code.google.com/p/findtbb/ of the TBB finder.
+
+  CMakeMacroParseArguments.cmake
+
+   Makes writing CMake find modules easier.  Copied from CMake project, not
+   available in older CMake versions.
+
+  CTestConfig.cmake
+
+    This file is copied into the project root in nightly builds for
+    configuration.
+
+  FeatureSummary.cmake
+
+    Print a summary of the features enabled in the SeqAn library.
+
+  FindBZip2.cmake
+
+    Contains the functionality from FindZLIB.cmake for libbz2.
+
+  FindPackageHandleStandardArgs.cmake
+
+    See CMakeMacroParseArguments.cmake.
+
+  GetCurrentDate.cmake
+
+    Get the current date into ${CURRENT_YEAR}, ${CURRENT_MONTH}, and
+    ${CURRENT_DAY}.
+
+  package.cmake
+
+    CPack configuration for the SeqAn library/all-apps builds.
+
+  SeqAnBuildSystem.cmake
+
+    This CMake file defines various functions and macros to be used in the
+    SeqAn file hierarchy.  They form the SeqAn build system.
+
+  SeqAnContribs.cmake
+
+    Included from the root CMakeLists.txt, looks for the SeqAn contribs on
+    windows in their default install locations.
+
+  SeqAnLegacyBuildSystem.cmake
+
+   This CMake file defines functions from the previous build system.  They are
+   translated to the functions from SeqAnBuildSystem.cmake for backward
+   compatibility and a smoother upgrade path.
+
+  SeqAnUsabilityAnalyzer.cmake
+
+   CMake functions that allow for the integration of the SeqAn Usability
+   Analyzer (SUA) into the build process.
+
+  FindZLIB.cmake
+
+    A CMake module for finding the ZLIB.  This is a copy of the original
+    FindZLIB.cmake from the CMake project.  The main difference is that the
+    libraries are searched for in an optimized version (no suffix) and a debug
+    version (suffix "_d").
+
+    This is relevant on Windows where you can only link against libraries
+    build in the same optimization configuration.
+
+    Note that you can such compiled libraries from the SeqAn Contribs.
+
+  SetCPackSystemName.cmake
+
+    Include to set the system name into CPACK_SYSTEM_NAME.
\ No newline at end of file
diff --git a/include/seqan/util/cmake/SeqAnBuildSystem.cmake b/include/seqan/util/cmake/SeqAnBuildSystem.cmake
new file mode 100644
index 0000000..9450259
--- /dev/null
+++ b/include/seqan/util/cmake/SeqAnBuildSystem.cmake
@@ -0,0 +1,731 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2012, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+# Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+# ============================================================================
+# This CMake file defines the necessary macros for the SeqAn build system.
+#
+# Note that while the SeqAn build system uses the FindSeqAn.cmake module,
+# the FindSeqAn.cmake module itself can be used independently from the SeqAn
+# build system.
+# ============================================================================
+
+# Valid values for SEQAN_BUILD_SYSTEM:
+#
+# DEVELOP
+# SEQAN_RELEASE
+# SEQAN_RELEASE_LIBRARY
+# APP:${app_name}
+
+include (SeqAnUsabilityAnalyzer)
+
+# ---------------------------------------------------------------------------
+# Normalize CMAKE_CXX_FLAGS to be a string.
+#
+# If we do not do this then setting the environment variable CXXFLAGS will
+# cause CMAKE_CXX_FLAGS to become a list and this will generate compiler
+# command lines including the list item separator semicolon ";".  This makes
+# the compiler command fail.
+# ---------------------------------------------------------------------------
+
+#if (CMAKE_CXX_FLAGS)
+#  foreach (_FLAG ${CMAKE_CXX_FLAGS})
+#    set (_FLAGS "${_FLAGS} ${_FLAG}")
+#  endforeach (_FLAG ${CMAKE_CXX_FLAGS})
+#  set (CMAKE_CXX_FLAGS "${_FLAGS}")
+#endif (CMAKE_CXX_FLAGS)
+
+# ---------------------------------------------------------------------------
+# Enable /bigobj flag on Windows.
+# ---------------------------------------------------------------------------
+
+# We need the /bigobj switch on windows (for 64 bit builds only actually).
+# Set target system to be Windows Vista and later.
+if (MSVC)
+  add_definitions (/bigobj /D_WIN32_WINNT=0x0600 /DWINVER=0x0600)
+elseif (MINGW)
+  add_definitions (-D_WIN32_WINNT=0x0600 -DWINVER=0x0600)
+endif (MSVC)
+
+# ---------------------------------------------------------------------------
+# Set architecture for MinGW.
+#
+# If we do not set i586 as the architecture for MinGW then generating atomic
+# expressions will fail.
+# ---------------------------------------------------------------------------
+
+if (MINGW)
+	if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+	    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i586")
+	endif ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+endif (MINGW)
+
+# ---------------------------------------------------------------------------
+# Disable false positive terminal detection in Xcode
+# ---------------------------------------------------------------------------
+
+if (CMAKE_GENERATOR STREQUAL Xcode)
+  add_definitions (-DSEQAN_NO_TERMINAL)
+endif (CMAKE_GENERATOR STREQUAL Xcode)
+
+# ---------------------------------------------------------------------------
+# Function add_executable (name [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]
+#                          source1 source2 ... sourceN)
+#
+# Add an executable with the given name and sources.
+#
+# We overwrite the built-in function add_executable to automatically add
+# behaviour that is required in the SeqAn build system.  This includes:
+#
+# * Adding dependencies to the SeqAn library headers.
+# * Enabling the SeqAn Usability Analyzer (SUA).
+#
+# Note that it is not possible to overwrite the same function two times.
+# ---------------------------------------------------------------------------
+
+function (add_executable NAME)
+    # Call overwritten _add_executable.
+    _add_executable(${ARGV})
+
+    # Add dependencies on the SeqAn library.
+    add_dependencies(${NAME} seqan_library)
+
+    # Add dependency on the SUA target.
+    seqan_add_sua_dependency (${NAME})
+endfunction (add_executable)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_add_app_subdirectory (APP_NAME)
+# ---------------------------------------------------------------------------
+
+macro (seqan_add_app_subdirectory APP_NAME)
+    if (("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE") OR
+         "${SEQAN_BUILD_SYSTEM}" STREQUAL "APP:${APP_NAME}")
+        add_subdirectory (${APP_NAME})
+    endif ()
+endmacro (seqan_add_app_subdirectory)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_register_apps ()
+#
+# Register all apps by adding their subdirectories if they are to be built
+# (SEQAN_RELEASE and APP:${app} modes).
+# ---------------------------------------------------------------------------
+
+macro (seqan_register_apps)
+    # Set SeqAn flags.
+    set (SEQAN_FIND_ENABLE_TESTING 0)
+    set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DSEQAN_ENABLE_DEBUG=0")
+    set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DSEQAN_ENABLE_DEBUG=0")
+    set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSEQAN_ENABLE_DEBUG=1")
+
+    # enable static linkage for seqan apps
+    if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG AND NOT MINGW)
+      set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+      set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
+    endif ()
+
+    # Enable global exception handler for all seqan apps.
+    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} -DSEQAN_GLOBAL_EXCEPTION_HANDLER")
+
+    # Get all direct entries of the current source directory into ENTRIES.
+    file (GLOB ENTRIES
+          RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+          ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*)
+
+    # Add all values from ${ENTRIES} that are subdirectories and have a file
+    # CMakeListst.txt.
+    foreach (ENTRY ${ENTRIES})
+        if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ENTRY})
+            if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${ENTRY}/CMakeLists.txt)
+                if (("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE") OR
+                    ("${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") OR
+                    ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_APPS") OR
+                    ("${SEQAN_BUILD_SYSTEM}" STREQUAL "APP:${ENTRY}"))
+                    add_subdirectory(${ENTRY})
+                endif ()
+            endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${ENTRY}/CMakeLists.txt)
+        endif (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ENTRY})
+    endforeach (ENTRY ${ENTRIES})
+endmacro (seqan_register_apps)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_build_system_init ()
+#
+# Initialize build system.
+# ---------------------------------------------------------------------------
+
+macro (seqan_build_system_init)
+    # Enable CTest and command add_test().
+    enable_testing ()
+
+    if (NOT SEQAN_BUILD_SYSTEM)
+        set (SEQAN_BUILD_SYSTEM "DEVELOP")
+    endif (NOT SEQAN_BUILD_SYSTEM)
+    set (SEQAN_APP_VERSION "0.0.0" CACHE STRING "Version of the application.")
+    set (SEQAN_NIGHTLY_RELEASE FALSE CACHE BOOL "Set to TRUE to enable nightly app releases.")
+
+    if (("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE") OR
+        ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_LIBRARY"))
+        # Install SeqAn LICENSE, README.rst, CHANGELOG.rst files.
+        install (FILES LICENSE
+                       README.rst
+                       CHANGELOG.rst
+                 DESTINATION share/doc/seqan)
+    endif ()
+
+    set (SEQAN_BUILD_SYSTEM "DEVELOP" CACHE STRING "Build/Release mode to select. One of DEVELOP SEQAN_RELEASE, APP:\${APP_NAME}. Defaults to DEVELOP.")
+
+    set (_CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/include")
+    set (CMAKE_INCLUDE_PATH ${_CMAKE_INCLUDE_PATH} CACHE STRING "")
+
+    SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY
+         ${PROJECT_BINARY_DIR}/bin)
+endmacro (seqan_build_system_init)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_add_app_test (APP_NAME SUFFIX)
+#
+# Add app test invocation.
+# ---------------------------------------------------------------------------
+
+# App tests are run using Python.  Search for Python and register test if the
+# Python interpreter could be found.
+
+macro (seqan_add_app_test APP_NAME)
+    if (MODEL MATCHES ".*MemCheck.*")
+        set (_VALGRIND_FLAG --valgrind)
+    else ()
+        set (_VALGRIND_FLAG)
+    endif ()
+    find_package (PythonInterp)
+    if (PYTHONINTERP_FOUND)
+      add_test (NAME app_test_${APP_NAME}${ARGV1}
+                COMMAND ${PYTHON_EXECUTABLE}
+                        ${CMAKE_CURRENT_SOURCE_DIR}/tests/run_tests${ARGV1}.py
+                        ${_VALGRIND_FLAG}
+                        ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
+    endif (PYTHONINTERP_FOUND)
+endmacro (seqan_add_app_test APP_NAME)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_setup_library ()
+#
+# * Creates install targets for the library.
+# * Writes list SeqAn headers to ${_SEQAN_HEADERS}
+# ---------------------------------------------------------------------------
+
+macro (seqan_setup_library)
+    # Only install the library if the virtual build packages "SEQAN_RELEASE"
+    # or "SEQAN_LIBRARY_ONLY" are chosen.
+    if (("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE") OR
+        ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_LIBRARY"))
+        file (GLOB HEADERS
+              RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+              include/seqan/[A-z]*/[A-z]/[A-z]*.h
+              include/seqan/[A-z]*/[A-z]*.h
+              include/seqan/[A-z]*.h)
+        foreach (HEADER ${HEADERS})
+            get_filename_component (_DESTINATION ${HEADER} PATH)
+            install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER} DESTINATION ${_DESTINATION})
+        endforeach ()
+    endif ()
+
+    # Get list of header and super header files.
+    file (GLOB SUPER_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/seqan/[A-z]*.h)
+    file (GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/seqan/[A-z]*/[A-z]*.h)
+    file (GLOB SUB_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/seqan/[A-z]*/[A-z]*/[A-z]*.h)
+
+    # Sort headers for Xcode, ...
+    if (SUB_HEADERS)
+        list (SORT SUB_HEADERS)
+    endif (SUB_HEADERS)
+
+    # Sort headers for Xcode, ...
+    if (HEADERS)
+        list (SORT HEADERS)
+    endif (HEADERS)
+
+    # Sort super-headers for Xcode, ...
+    if (SUPER_HEADERS)
+        list (SORT SUPER_HEADERS)
+    endif (SUPER_HEADERS)
+
+    # Create source groups for Visual Studio (and possibly other IDEs).
+    foreach (HEADER ${HEADERS})
+        file (RELATIVE_PATH HEADER_REL ${CMAKE_CURRENT_SOURCE_DIR}/include/seqan ${HEADER})
+        get_filename_component (MODULE ${HEADER_REL} PATH)
+        source_group (seqan\\${MODULE} FILES ${HEADER})
+    endforeach (HEADER ${HEADERS})
+    source_group (seqan FILES ${SUPER_HEADERS})
+
+#    # CMake bug workaround: For Non-IDE generators there is a bug in cmake.
+#    # The SOURCE command in add_custom_target is not recognized there.
+#    set (NONIDE_GENERATORS "Unix Makefiles" "MinGW Makefiles")
+#    list (FIND NONIDE_GENERATORS ${CMAKE_GENERATOR} FOUND)
+#    if (FOUND EQUAL -1)
+#        set (IDE_SOURCES SOURCES ${HEADERS} ${SUPER_HEADERS})
+#    endif (FOUND EQUAL -1)
+
+    # Add pseudo target for the library part.  Note that the IDE_SOURCES
+    # variable includes the "SOURCES" argument for add_custom_target when
+    # building with a generator for an IDE.
+    add_custom_target (seqan_library SOURCES ${SUB_HEADERS} ${HEADERS} ${SUPER_HEADERS})
+endmacro (seqan_setup_library)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_setup_install_vars (APP_NAME)
+#
+# Setup variables for install, depending on build mode.
+# ---------------------------------------------------------------------------
+
+macro (seqan_setup_install_vars APP_NAME)
+    if ("${SEQAN_BUILD_SYSTEM}" STREQUAL "APP:${APP_NAME}")
+        set (SEQAN_PREFIX_SHARE ".")
+        set (SEQAN_PREFIX_SHARE_DOC ".")
+    else ()
+        set (SEQAN_PREFIX_SHARE "share/${APP_NAME}")
+        set (SEQAN_PREFIX_SHARE_DOC "share/doc/${APP_NAME}")
+    endif ()
+endmacro (seqan_setup_install_vars)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_configure_cpack_app (APP_NAME APP_DIR)
+#
+# Setup variables for install, depending on build mode.
+#
+# Sets defaults for CPACK_PACKAGE_DESCRIPTION_FILE and CPACK_RESOURCE_FILE_LICENSE
+# ---------------------------------------------------------------------------
+
+macro (seqan_configure_cpack_app APP_NAME APP_DIR)
+  # The following include automates the MS Redistributable installer.
+  include (InstallRequiredSystemLibraries)
+
+  if (CMAKE_SYSTEM_NAME MATCHES "Windows")
+    set (CPACK_GENERATOR "ZIP")
+  else ()
+    set (CPACK_GENERATOR "ZIP;TBZ2")
+  endif ()
+
+  # Set defaults for CPACK_PACKAGE_DESCRIPTION_FILE and CPACK_RESOURCE_FILE_LICENSE
+  if (NOT CPACK_PACKAGE_DESCRIPTION_FILE)
+    set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
+  endif ()
+  if (NOT CPACK_RESOURCE_FILE_LICENSE)
+    set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+  endif ()
+
+  # Automatically deduce system name for CPack.
+  include (SetCPackSystemName)
+
+  # Get SEQAN_APP_VERSION_{MAJOR,MINOR,PATCH} from SEQAN_APP_VERSION.
+  set (SEQAN_APP_VERSION_MAJOR "0")
+  if (SEQAN_APP_VERSION MATCHES "^([0-9]+).*")
+    string (REGEX REPLACE "^([0-9]+).*" "\\1" _SEQAN_APP_VERSION_MAJOR "${SEQAN_APP_VERSION}")
+  endif ()
+  if (_SEQAN_APP_VERSION_MAJOR)
+    set(SEQAN_APP_VERSION_MAJOR "${_SEQAN_APP_VERSION_MAJOR}")
+  endif ()
+  set (SEQAN_APP_VERSION_MINOR "0")
+  if (SEQAN_APP_VERSION MATCHES "^[0-9]+\\.([0-9]+).*")
+    string (REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" _SEQAN_APP_VERSION_MINOR "${SEQAN_APP_VERSION}")
+  endif ()
+  if (_SEQAN_APP_VERSION_MINOR)
+    set(SEQAN_APP_VERSION_MINOR "${_SEQAN_APP_VERSION_MINOR}")
+  endif ()
+  set (SEQAN_APP_VERSION_PATCH "0")
+  if (SEQAN_APP_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.([0-9]+)$")
+    string (REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)$" "\\1" _SEQAN_APP_VERSION_PATCH "${SEQAN_APP_VERSION}")
+  endif ()
+  if (_SEQAN_APP_VERSION_PATCH)
+    set(SEQAN_APP_VERSION_PATCH "${_SEQAN_APP_VERSION_PATCH}")
+  endif ()
+
+  # Setup the app version.  SEQAN_APP_VERSION_{MAJOR,MINOR,PATCH} have
+  # to be set.  To create nightly releases, set SEQAN_NIGHTLY_RELEASE to
+  # TRUE on the command line.
+  if (SEQAN_NIGHTLY_RELEASE)
+    include (GetCurrentDate)
+    set (CPACK_PACKAGE_VERSION "${CURRENT_YEAR}${CURRENT_MONTH}${CURRENT_DAY}")
+  else ()
+    set (CPACK_PACKAGE_VERSION "${SEQAN_APP_VERSION_MAJOR}.${SEQAN_APP_VERSION_MINOR}.${SEQAN_APP_VERSION_PATCH}")
+  endif ()
+  set (CPACK_PACKAGE_VERSION_MAJOR "${SEQAN_APP_VERSION_MAJOR}")
+  set (CPACK_PACKAGE_VERSION_MINOR "${SEQAN_APP_VERSION_MINOR}")
+  set (CPACK_PACKAGE_VERSION_PATCH "${SEQAN_APP_VERSION_PATCH}")
+
+  set (CPACK_PACKAGE_INSTALL_DIRECTORY "${APP_DIR} ${CPACK_PACKAGE_VERSION}")
+
+  include (CPack)
+endmacro (seqan_configure_cpack_app)
+
+
+# ---------------------------------------------------------------------------
+# Macro seqan_setup_cuda_vars ([DISABLE_WARNINGS] [DEBUG_DEVICE]
+#                              [ARCH sm_xx] [FLAGS flags ...])
+#
+# Setup CUDA variables.
+# ---------------------------------------------------------------------------
+
+macro (seqan_setup_cuda_vars)
+  cmake_parse_arguments(_SEQAN_CUDA
+                        "DISABLE_WARNINGS;DEBUG_DEVICE"
+                        "ARCH"
+                        "FLAGS"
+                        ${ARGN})
+  if (SEQAN_HAS_CUDA)
+    # Wrap nvcc to make cudafe output gcc-like.
+    find_program (COLOR_NVCC colornvcc PATHS ${CMAKE_SOURCE_DIR}/util NO_DEFAULT_PATH)
+    set (CUDA_NVCC_EXECUTABLE ${COLOR_NVCC})
+
+    # Build CUDA targets from the given architecture upwards.
+    set (CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -arch ${_SEQAN_CUDA_ARCH} ${_SEQAN_CUDA_FLAGS}")
+
+    # Add debug symbols to device code.
+    if (_SEQAN_CUDA_DISABLE_WARNINGS)
+      set (CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -G")
+    endif ()
+
+    # Add flags for the CUDA compiler.
+    list (APPEND CUDA_NVCC_FLAGS_RELEASE "-O3")
+    list (APPEND CUDA_NVCC_FLAGS_MINSIZEREL "-O3")
+    list (APPEND CUDA_NVCC_FLAGS_RELWITHDEBINFO "-O3 -g -lineinfo")
+    list (APPEND CUDA_NVCC_FLAGS_DEBUG "-O0 -g -lineinfo")
+
+    if (_SEQAN_CUDA_DISABLE_WARNINGS)
+      # Disable all CUDA warnings.
+      set (CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} --disable-warnings")
+    else ()
+      # Disable only Thrust warnings.
+      string (REGEX REPLACE "-Wall" ""
+              SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS}")
+      string (REGEX REPLACE "-pedantic" ""
+              SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS}")
+      if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+        set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -Wno-unused-parameter")
+      endif (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+    endif ()
+
+    # Fix CUDA on OSX.
+    if (APPLE AND COMPILER_IS_CLANG)
+      # (weese:) I had to deactivate the C compiler override to make it compile again
+      # NVCC mistakes /usr/bin/cc as gcc.
+      #list (APPEND CUDA_NVCC_FLAGS "-ccbin /usr/bin/clang")
+      # NVCC does not support libc++.
+      set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libstdc++")
+    endif ()
+  endif ()
+endmacro (seqan_setup_cuda_vars)
+
+
+# ---------------------------------------------------------------------------
+# Function seqan_get_version()
+#
+# Sets the variables SEQAN_VERSION, SEQAN_VERSION_MAJOR, SEQAN_VERSION_MINOR,
+# SEQAN_VERSION_PATCH, determined from seqan/version.h
+# ---------------------------------------------------------------------------
+
+macro (seqan_get_version)
+  try_run(_SEQAN_RUN_RESULT
+          _SEQAN_COMPILE_RESULT
+          ${CMAKE_BINARY_DIR}/CMakeFiles/SeqAnVersion
+          ${CMAKE_CURRENT_SOURCE_DIR}/util/cmake/SeqAnVersion.cpp
+          CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${CMAKE_CURRENT_SOURCE_DIR}/include
+          COMPILE_OUTPUT_VARIABLE _COMPILE_OUTPUT
+          RUN_OUTPUT_VARIABLE _RUN_OUTPUT)
+  if (NOT _RUN_OUTPUT)
+    message("")
+    message("ERROR: Could not determine SeqAn version.")
+    message("COMPILE OUTPUT:")
+    message(${_COMPILE_OUTPUT})
+  endif (NOT _RUN_OUTPUT)
+  string(REGEX REPLACE ".*SEQAN_VERSION_MAJOR:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_MAJOR ${_RUN_OUTPUT})
+  string(REGEX REPLACE ".*SEQAN_VERSION_MINOR:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_MINOR ${_RUN_OUTPUT})
+  string(REGEX REPLACE ".*SEQAN_VERSION_PATCH:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_PATCH ${_RUN_OUTPUT})
+  string(REGEX REPLACE ".*SEQAN_VERSION_PRE_RELEASE:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_PRE_RELEASE ${_RUN_OUTPUT})
+  set(SEQAN_VERSION "${SEQAN_VERSION_MAJOR}.${SEQAN_VERSION_MINOR}.${SEQAN_VERSION_PATCH}")
+#  if (SEQAN_VERSION_PRE_RELEASE STREQUAL 1)
+#    set(SEQAN_VERSION "pre${SEQAN_VERSION}")
+#  endif (SEQAN_VERSION_PRE_RELEASE STREQUAL 1)
+endmacro (seqan_get_version)
+
+# ---------------------------------------------------------------------------
+# Function seqan_get_repository_info()
+#
+# Sets the variables SEQAN_DATE and SEQAN_REVISION determined from git.
+# ---------------------------------------------------------------------------
+
+macro (seqan_get_repository_info)
+  set (_SEQAN_GIT_DIR "${CMAKE_SOURCE_DIR}/.git")
+
+  # Get Git information.
+  if (EXISTS ${_SEQAN_GIT_DIR})
+    find_package (GitInfo QUIET)
+    if (GIT_FOUND)
+      GIT_WC_INFO (${CMAKE_SOURCE_DIR} _SEQAN)
+    endif ()
+  else ()
+    message(STATUS "No revision system found.")
+  endif ()
+
+  # Set SeqAn date of last commit.
+  if (_SEQAN_WC_LAST_CHANGED_DATE)
+    set (SEQAN_DATE "${_SEQAN_WC_LAST_CHANGED_DATE}")
+    # icc doesn't cope with spaces..
+    string(REPLACE " " "_" SEQAN_DATE "${SEQAN_DATE}")
+    message (STATUS "  Determined repository date is ${SEQAN_DATE}")
+  else ()
+    message (STATUS "  Repository date not determined.")
+  endif ()
+
+  # Set SeqAn repository revision.
+  if (_SEQAN_WC_REVISION)
+    set (SEQAN_REVISION "${_SEQAN_WC_REVISION}" CACHE INTERNAL "SeqAn repository revision.")
+    message (STATUS "  Determined repository revision is ${SEQAN_REVISION}")
+   else ()
+    set (SEQAN_REVISION "tarball" CACHE INTERNAL "SeqAn repository revision.")
+    message (STATUS "  Repository revision not determined.")
+  endif ()
+endmacro (seqan_get_repository_info)
+
+# ---------------------------------------------------------------------------
+# Macro _seqan_setup_demo_test(cpp_file executable)
+#
+# When called with the file PATH.cpp, it will check whether PATH.cpp.stdout
+# and/or PATH.cpp.stderr exists.  If this is the case then we will add a test
+# that runs the demo and compares the standard output/error stream with the
+# given file.
+#
+# Used in seqan_build_demos_develop().
+# ---------------------------------------------------------------------------
+macro (_seqan_setup_demo_test CPP_FILE EXECUTABLE)
+    set (STDOUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${CPP_FILE}.stdout")
+    set (STDERR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${CPP_FILE}.stderr")
+    if (EXISTS "${STDOUT_PATH}" OR EXISTS "${STDERR_PATH}")
+        # Build the path to the demo_checker.py script.
+        set (CHECKER_PATH "${CMAKE_SOURCE_DIR}/util/bin/demo_checker.py")
+
+        # Compose arguments to the demo_checker.py script.
+        if (MSVC)
+            # Add buildtype path and ".exe" suffix under Windows.
+            set (ARGS "--binary-path" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${EXECUTABLE}.exe")
+        elseif (WIN32)
+          # Add ".exe" suffix for all other Windows compilers, e.g. MinGW.
+            set (ARGS "--binary-path" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${EXECUTABLE}.exe")
+        else ()
+            set (ARGS "--binary-path" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${EXECUTABLE}")
+        endif ()
+
+        if (EXISTS "${STDOUT_PATH}")
+            set (ARGS ${ARGS} "--stdout-path" "${STDOUT_PATH}")
+        endif ()
+        if (EXISTS "${STDERR_PATH}")
+            set (ARGS ${ARGS} "--stderr-path" "${STDERR_PATH}")
+        endif()
+
+        # Add the test.
+        find_package (PythonInterp)
+        if (PYTHONINTERP_FOUND)
+          add_test (NAME test_${EXECUTABLE}
+                    COMMAND ${PYTHON_EXECUTABLE} ${CHECKER_PATH} ${ARGS})
+          #message(STATUS "add_test (NAME test_${EXECUTABLE} COMMAND ${PYTHON_EXECUTABLE} ${CHECKER_PATH} ${ARGS})")
+        endif (PYTHONINTERP_FOUND)
+    endif ()
+endmacro (_seqan_setup_demo_test CPP_FILE)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_register_demos([prefix])
+#
+# Use this in demos directories and subdirectories.
+#
+# This is only used when doing a Whole SeqAn Release or when developing.
+# When doing a SeqAn Release then we copy over the demos, otherwise we build
+# them.
+# ---------------------------------------------------------------------------
+
+# NOTE that we look with default SeqAn dependencies and also build if some are not found. The demos themselves must contain the appropriate #if preprocessor statements.
+
+# Install all demo source files.
+macro (seqan_install_demos_release)
+    # Set flags for SeqAn. Use PARENT_SCOPE since it is called from within a function.
+    set (SEQAN_FIND_ENABLE_TESTING 0 PARENT_SCOPE)
+    set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DSEQAN_ENABLE_DEBUG=0" PARENT_SCOPE)
+    set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DSEQAN_ENABLE_DEBUG=0" PARENT_SCOPE)
+    set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSEQAN_ENABLE_DEBUG=1" PARENT_SCOPE)
+
+    # Get a list of all .cpp and .cu files in the current directory.
+    file (GLOB_RECURSE ENTRIES
+          RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+          ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*.cpp
+          ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*.cu)
+
+    # Set global definitions set for demos.
+    add_definitions (${SEQAN_DEFINITIONS})
+
+    # Get path to current source directory, relative from root.  Will be used to install demos in.
+    file (RELATIVE_PATH INSTALL_DIR "${SEQAN_ROOT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
+
+    # Install all demo files into "share/doc/seqan/demos" (demos comes from INSTALL_DIR).
+    install (FILES ${ENTRIES} DESTINATION "share/doc/seqan/${INSTALL_DIR}")
+endmacro (seqan_install_demos_release)
+
+macro (seqan_build_demos_develop PREFIX)
+    # Get a list of all .cpp and .cu files in the current directory.
+    file (GLOB_RECURSE ENTRIES
+          RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+          ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*.cpp
+          ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*.cu)
+
+    # Find SeqAn with all dependencies.
+    set (SEQAN_FIND_DEPENDENCIES ALL)
+    find_package (SeqAn REQUIRED)
+    find_package (CXX11)
+    find_package (OpenMP)
+    if (OPENMP_FOUND AND CMAKE_COMPILER_IS_GNUCXX)
+        set(SEQAN_LIBRARIES ${SEQAN_LIBRARIES} -lgomp)
+    endif()
+    # Setup include directories and definitions for SeqAn; flags follow below.
+    include_directories (${SEQAN_INCLUDE_DIRS})
+    add_definitions (${SEQAN_DEFINITIONS})
+
+    # Supress unused parameter warnings for demos.
+    if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+        set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -Wno-unused-parameter")
+    endif (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+
+    # Setup flags for CUDA demos.
+    seqan_setup_cuda_vars(ARCH sm_20 DEBUG_DEVICE DISABLE_WARNINGS)
+
+    # Add SeqAn flags to CXX and NVCC flags.
+    # Set to PARENT_SCOPE since this macro is executed from within a function which declares it's own scope.
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS} ${CXX11_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" PARENT_SCOPE)
+
+    # Add all demos with found flags in SeqAn.
+    foreach (ENTRY ${ENTRIES})
+        string (REPLACE "/" "_" BIN_NAME "${ENTRY}")
+        string (REPLACE "\\" "_" BIN_NAME "${BIN_NAME}")
+        get_filename_component (BIN_NAME "${BIN_NAME}" NAME_WE)
+
+        get_filename_component (FILE_NAME "${ENTRY}" NAME)
+        if ("${FILE_NAME}" MATCHES "\\.cu$")
+            if (SEQAN_HAS_CUDA)
+                cuda_add_executable(${PREFIX}${BIN_NAME} ${ENTRY})
+                target_link_libraries (${PREFIX}${BIN_NAME} ${SEQAN_LIBRARIES})
+                if (APPLE AND COMPILER_IS_CLANG)
+                    set_target_properties (${PREFIX}${BIN_NAME} PROPERTIES LINK_FLAGS -stdlib=libstdc++)
+                endif ()
+                _seqan_setup_demo_test (${ENTRY} ${PREFIX}${BIN_NAME})
+            endif ()
+        else ()
+            add_executable(${PREFIX}${BIN_NAME} ${ENTRY})
+            target_link_libraries (${PREFIX}${BIN_NAME} ${SEQAN_LIBRARIES})
+            _seqan_setup_demo_test (${ENTRY} ${PREFIX}${BIN_NAME})
+        endif ()
+    endforeach (ENTRY ${ENTRIES})
+endmacro (seqan_build_demos_develop)
+
+function (seqan_register_demos)
+    # Set optional parameter with index 0 into variable PREFIX.
+    if (${ARGC} GREATER 0)
+        set (PREFIX ${ARGV0})
+    else (${ARGC} GREATER 0)
+        set (PREFIX "")
+    endif (${ARGC} GREATER 0)
+
+    # Enable global exception handler for demos.
+    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} -DSEQAN_GLOBAL_EXCEPTION_HANDLER")
+
+    # Install demo source files when releasing and build demos when developing.
+    if ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE")
+        seqan_install_demos_release ()
+    elseif ("${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
+        seqan_build_demos_develop ("${PREFIX}")
+    endif ()
+endfunction (seqan_register_demos)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_register_tests ()
+# ---------------------------------------------------------------------------
+
+# Switch to testing mode and include all subdirectories with a CMakeLists.txt
+# file inside them.  This function should be called in the CMakeLists.txt in
+# the tests directories before including subdirectories.
+#
+# The following will happen:
+#
+# * Setting definitions SEQAN_ENABLE_DEBUG=1 and SEQAN_ENABLE_TESTING=1.
+# * If the ${MODEL} variable is NightlyCoverage OR ExperimentalCoverage,
+#   and the compiler is GCC C++ then symbols for test coverate are added.
+# * All subdirectories with a CMakeLists.txt file inside will be added.
+
+macro (seqan_register_tests)
+    # Setup flags for tests.
+    set (SEQAN_FIND_ENABLE_DEBUG TRUE)
+    set (SEQAN_FIND_ENABLE_TESTING TRUE)
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+
+    # Remove NDEBUG definition for tests.
+    string (REGEX REPLACE "-DNDEBUG" ""
+            CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+    string (REGEX REPLACE "-DNDEBUG" ""
+            CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+
+    # Add global exception handler
+    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} -DSEQAN_GLOBAL_EXCEPTION_HANDLER")
+
+    # Conditionally enable coverage mode by setting the appropriate flags.
+    if (MODEL STREQUAL "NightlyCoverage")
+        if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+            set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+            set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
+            add_definitions(-DSEQAN_ENABLE_CHECKPOINTS=0)
+        endif (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+    endif (MODEL STREQUAL "NightlyCoverage")
+    if (MODEL STREQUAL "ExperimentalCoverage")
+        if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+            set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+            set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
+            add_definitions(-DSEQAN_ENABLE_CHECKPOINTS=0)
+        endif (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+    endif (MODEL STREQUAL "ExperimentalCoverage")
+
+    # Add all subdirectories that have a CMakeLists.txt inside them.
+    file (GLOB ENTRIES
+          RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+          ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*)
+    foreach (ENTRY ${ENTRIES})
+        if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ENTRY})
+            if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${ENTRY}/CMakeLists.txt)
+                add_subdirectory(${ENTRY})
+            endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${ENTRY}/CMakeLists.txt)
+        endif (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ENTRY})
+    endforeach (ENTRY ${ENTRIES})
+endmacro (seqan_register_tests)
+
diff --git a/include/seqan/util/cmake/SeqAnContribs.cmake b/include/seqan/util/cmake/SeqAnContribs.cmake
new file mode 100644
index 0000000..670c591
--- /dev/null
+++ b/include/seqan/util/cmake/SeqAnContribs.cmake
@@ -0,0 +1,117 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2012, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+# Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+# ============================================================================
+# This CMake file is included by the root CMakeLists.txt to look for
+# installed SeqAn contribs on the WIN32 platform.
+# ============================================================================
+
+if (WIN32)
+  # For all contrib versions...
+  foreach (_SEQAN_CONTRIB_VERSION D20111031 D20130710 D20131121)
+    set (_SEQAN_CONTRIB_DIR "seqan-contrib-${_SEQAN_CONTRIB_VERSION}")
+
+	  # Determine architecture for the precompiled contribs.
+	  if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+		set (CONTRIB_ARCH "x64")
+	  else ()
+		set (CONTRIB_ARCH "x86")
+	  endif ()
+
+	  # Try to figure out where the user installed the contrib.  We expect
+	  # it to be either in C:\, or one of the Program Files dirs.
+	  #
+	  # First, look into Program Files on 64 bit.
+	  if (DEFINED ENV{ProgramW6432})
+		if (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		  set (SEQAN_CONTRIB_BASE "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		endif (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+	  endif (DEFINED ENV{ProgramW6432})
+	  # Try out Program Files for 32bit Windows.
+	  if (NOT DEFINED SEQAN_CONTRIB_BASE)
+		if (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		  set (SEQAN_CONTRIB_BASE "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		endif (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+	  endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+	  # Try out on C:/.
+	  if (NOT DEFINED SEQAN_CONTRIB_BASE)
+		if (IS_DIRECTORY C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH})
+		  set (SEQAN_CONTRIB_BASE "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		elseif ()
+		  set (SEQAN_CONTRIB_BASE "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		endif ()
+	  endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+      # Try to fall back to x64 on C:\ (MinGW is only available as 32 bit).
+      set (CONTRIB_ARCH "x64")
+      if (NOT DEFINED SEQAN_CONTRIB_BASE)
+        if (IS_DIRECTORY "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+          set (SEQAN_CONTRIB_BASE "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+        endif ()
+      endif ()
+
+	  # Debug help.
+      #if (NOT DEFINED SEQAN_CONTRIB_BASE)
+      #	message("SEQAN_CONTRIB_BASE is undefined!")
+      #else (NOT DEFINED SEQAN_CONTRIB_BASE)
+      #	message("SEQAN_CONTRIB_BASE is ${SEQAN_CONTRIB_BASE}")
+      #endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+
+	  # Try to figure out the generator.
+	  if (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
+		if (CMAKE_GENERATOR MATCHES "^Visual Studio .*")
+		  string (REGEX REPLACE "^Visual Studio ([0-9]+).*$" "\\1" SEQAN_CONTRIB_VARIANT ${CMAKE_GENERATOR})
+		  set (SEQAN_CONTRIB_VARIANT "vs${SEQAN_CONTRIB_VARIANT}")
+		elseif (MINGW)
+		  set (SEQAN_CONTRIB_VARIANT mingw)
+		endif (CMAKE_GENERATOR MATCHES "^Visual Studio .*")
+
+        #message(STATUS "SEQAN_CONTRIB_BASE    is ${SEQAN_CONTRIB_BASE}")
+        #message(STATUS "SEQAN_CONTRIB_VARIANT is ${SEQAN_CONTRIB_VARIANT}")
+
+		# Compose contrib path.
+		set(SEQAN_CONTRIB_PATH "${SEQAN_CONTRIB_BASE}/${SEQAN_CONTRIB_VARIANT}")
+
+		# Extend CMAKE_PREFIX_PATH.
+		if (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
+		  set (CMAKE_PREFIX_PATH ${SEQAN_CONTRIB_PATH} ${CMAKE_PREFIX_PATH})
+		endif (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
+	  endif (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
+
+      message(STATUS "CMAKE_PREFIX_PATH is \"${CMAKE_PREFIX_PATH}\".")
+
+      # Break out if contribs could be found.
+      if (DEFINED SEQAN_CONTRIB_BASE)
+        break ()  # found contribs at current path
+      endif (DEFINED SEQAN_CONTRIB_BASE)
+
+    endforeach ()  # all contrib versions.
+endif (WIN32)
+
diff --git a/include/seqan/util/cmake/SeqAnCtdSetup.cmake b/include/seqan/util/cmake/SeqAnCtdSetup.cmake
new file mode 100644
index 0000000..d3ffb34
--- /dev/null
+++ b/include/seqan/util/cmake/SeqAnCtdSetup.cmake
@@ -0,0 +1,242 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2012, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+# Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+# ============================================================================
+# CMake code for generation of CTD structure.
+#
+# All executables in the list SEQAN_CTD_EXECUTABLES will be included in the
+# resulting CTD structure.
+#
+# The following environment variables configure the output:
+#
+#   WORKFLOW_PLUGIN_DIR -- Output directory for CTD structure.  Defaults to
+#                          ${CMAKE_BINARY_DIR}/workflow_plugin_dir
+# ============================================================================
+
+# ============================================================================
+# Dependency Check
+# ============================================================================
+
+# If Java cannot be found, we disable CTD support.
+
+find_package (Java)
+if (NOT Java_JAR_EXECUTABLE)
+  message (STATUS "jar binary not found, disabling CTD support.")
+  return ()
+endif ()
+
+# Create the payload binary ZIP file.
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+  set (SEQAN_PLATFORM "lnx")
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
+  set (SEQAN_PLATFORM "win")
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+  set (SEQAN_PLATFORM "mac")
+else ()
+  message (STATUS "Unsupported platform ${CMAKE_SYSTEM_NAME}, disabling CTD support.")
+  return()
+endif ()
+
+# ============================================================================
+# Variable Setup
+# ============================================================================
+
+# Get path that all binaries are placed in.  With MSVC, we have to extend that
+# path with the configuration name.
+set (SEQAN_BIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+if (MSVC)
+  set (SEQAN_BIN_DIR "${SEQAN_BIN_DIR}/$(ConfigurationName)")
+endif ()
+
+# The user-definable setting for the output plugin dir.
+set (WORKFLOW_PLUGIN_DIR ${CMAKE_BINARY_DIR}/workflow_plugin_dir CACHE PATH
+     "Directory containing the generated plugin-sources for the SeqAn Workflow/KNIME package")
+# Shortcut to "descriptors" below target directory.
+set (CTD_PATH ${WORKFLOW_PLUGIN_DIR}/descriptors)
+# Shortcut to "payload" below target directory.
+set (PAYLOAD_PATH ${WORKFLOW_PLUGIN_DIR}/payload)
+
+# We will create the contents of the payload directory temporarily within the
+# output directory.
+set (PAYLOAD_TMP_PATH ${CMAKE_BINARY_DIR}/CMakeFiles/payload.tmp)
+set (PAYLOAD_TMP_BIN_PATH ${PAYLOAD_TMP_PATH}/bin)
+
+# ============================================================================
+# Creating directory structure.
+# ============================================================================
+
+# Create directory: workflow_plugin_dir
+add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR})
+# Create directory: workflow_plugin_dir/icons
+add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/icons
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}/icons
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR})
+# Create directory: workflow_plugin_dir/descriptors
+add_custom_command (OUTPUT ${CTD_PATH}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH}
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR})
+# Create directory: workflow_plugin_dir/payload
+add_custom_command (OUTPUT ${PAYLOAD_PATH}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_PATH}
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR})
+
+# Create directory: workflow_plugin_dir/payload.tmp
+add_custom_command (OUTPUT ${PAYLOAD_TMP_PATH}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_TMP_PATH}
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR})
+# Create directory: workflow_plugin_dir/payload.tmp/bin
+add_custom_command (OUTPUT ${PAYLOAD_TMP_BIN_PATH}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_TMP_BIN_PATH}
+                    DEPENDS ${PAYLOAD_TMP_PATH})
+
+# ============================================================================
+# Creating payload data.
+# ============================================================================
+
+# Binaries.
+foreach (_BINARY ${SEQAN_CTD_EXECUTABLES})
+  set (_TARGET ${_BINARY})
+  set (_BINARY_PATH "${SEQAN_BIN_DIR}/${_BINARY}")
+  if (WIN32)
+    set (_BINARY "${_BINARY}.exe")
+    set (_BINARY_PATH "${_BINARY_PATH}.exe")
+  endif ()
+
+  list (APPEND TMP_PAYLOAD_FILES "${PAYLOAD_TMP_BIN_PATH}/${_BINARY}")
+  add_custom_command (OUTPUT ${PAYLOAD_TMP_BIN_PATH}/${_BINARY}
+                      COMMAND ${CMAKE_COMMAND} -E copy "${_BINARY_PATH}" "${PAYLOAD_TMP_BIN_PATH}/${_BINARY}"
+                      DEPENDS ${_TARGET}
+                              ${PAYLOAD_TMP_BIN_PATH})
+endforeach ()
+
+# binaries.ini file.
+add_custom_command (OUTPUT "${PAYLOAD_TMP_PATH}/binaries.ini"
+                    COMMAND ${CMAKE_COMMAND} -E touch ${PAYLOAD_TMP_PATH}/binaries.ini
+                    DEPENDS ${PAYLOAD_TMP_PATH})
+
+if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set (SEQAN_SYSTEM_WORDSIZE "64")
+else ()
+  set (SEQAN_SYSTEM_WORDSIZE "32")
+endif ()
+
+set (_ZIP_NAME "binaries_${SEQAN_PLATFORM}_${SEQAN_SYSTEM_WORDSIZE}.zip")
+set (_ZIP_PATH "${PAYLOAD_PATH}")
+add_custom_command (OUTPUT ${_ZIP_PATH}/${_ZIP_NAME}
+                    COMMAND ${Java_JAR_EXECUTABLE} cfvM ${_ZIP_PATH}/${_ZIP_NAME} -C ${PAYLOAD_TMP_PATH} .
+                    DEPENDS ${PAYLOAD_PATH}
+                            ${TMP_PAYLOAD_FILES}
+                            ${PAYLOAD_TMP_PATH}/binaries.ini)
+
+# ============================================================================
+# CTDs and other descriptors contents.
+# ============================================================================
+
+# descriptors/mimetypes.xml
+# Note: The mimetypes.xml file is deprecated but we keep it here for backward compatibilty.
+add_custom_command (OUTPUT ${CTD_PATH}/mimetypes.xml
+                    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/mimetypes.xml"
+                                                     "${CTD_PATH}/mimetypes.xml"
+                    DEPENDS ${CTD_PATH}
+                            ${CMAKE_SOURCE_DIR}/util/cmake/ctd/mimetypes.xml)
+list (APPEND DESCRIPTOR_FILES ${CTD_PATH}/mimetypes.xml)
+
+# descriptors/mime.types
+add_custom_command (OUTPUT ${CTD_PATH}/mime.types
+                    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/mime.types"
+                                                     "${CTD_PATH}/mime.types"
+                    DEPENDS ${CTD_PATH}
+                            ${CMAKE_SOURCE_DIR}/util/cmake/ctd/mime.types)
+list (APPEND DESCRIPTOR_FILES ${CTD_PATH}/mime.types)
+
+# *.ctd
+foreach (_BINARY ${SEQAN_CTD_EXECUTABLES})
+  set (_BINARY_PATH "${SEQAN_BIN_DIR}/${_BINARY}")
+  if (WIN32)
+    set (_BINARY_PATH "${_BINARY_PATH}.exe")
+  endif ()
+
+  add_custom_command (OUTPUT ${CTD_PATH}/${_BINARY}.ctd
+                      COMMAND ${_BINARY_PATH} --write-ctd "${CTD_PATH}/${_BINARY}.ctd"
+                      DEPENDS ${CTD_PATH}
+                              ${_BINARY})
+  list (APPEND DESCRIPTOR_FILES ${CTD_PATH}/${_BINARY}.ctd)
+endforeach ()
+
+# ============================================================================
+# Eclipse Plugin Files.
+# ============================================================================
+
+# plugin.properties
+add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/plugin.properties
+                    COMMAND ${CMAKE_COMMAND} "-DSEQAN_SOURCE_DIR=${CMAKE_SOURCE_DIR}"
+                                             "-DWORKFLOW_PLUGIN_DIR=${WORKFLOW_PLUGIN_DIR}"
+                                             "-DSEQAN_VERSION_STRING=${SEQAN_VERSION_STRING}"
+                                             "-DSEQAN_DATE=${SEQAN_DATE}"
+                                             -P "${CMAKE_SOURCE_DIR}/util/cmake/ctd/configure_profile_properties.cmake"
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR}
+                            ${CMAKE_SOURCE_DIR}/util/cmake/ctd/plugin.properties.in)
+
+# ============================================================================
+# Static Files.
+# ============================================================================
+
+# Static files in plugin root.
+foreach (_FILE COPYRIGHT DESCRIPTION LICENSE)
+  add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/${_FILE}
+                      COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/${_FILE}"
+                                                       "${WORKFLOW_PLUGIN_DIR}/${_FILE}"
+                      DEPENDS ${WORKFLOW_PLUGIN_DIR}
+                              ${CMAKE_SOURCE_DIR}/util/cmake/ctd/${_FILE})
+  list (APPEND STATIC_FILES ${WORKFLOW_PLUGIN_DIR}/${_FILE})
+endforeach ()
+
+# Icon files.
+foreach (_FILE category.png splash.png)
+  add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/icons/${_FILE}
+                      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons/${_FILE}
+                                                       ${WORKFLOW_PLUGIN_DIR}/icons/${_FILE}
+                      DEPENDS ${WORKFLOW_PLUGIN_DIR}/icons
+                              ${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons/${FILE})
+  list (APPEND ICON_FILES ${WORKFLOW_PLUGIN_DIR}/icons/${_FILE})
+endforeach ()
+
+# ============================================================================
+# Master target.
+# ============================================================================
+
+add_custom_target (prepare_workflow_plugin
+                   DEPENDS ${DESCRIPTOR_FILES}
+                           ${STATIC_FILES}
+                           ${ICON_FILES}
+                           ${WORKFLOW_PLUGIN_DIR}/plugin.properties
+                           ${_ZIP_PATH}/${_ZIP_NAME})
diff --git a/include/seqan/util/cmake/SeqAnUsabilityAnalyzer.cmake b/include/seqan/util/cmake/SeqAnUsabilityAnalyzer.cmake
new file mode 100644
index 0000000..c84c199
--- /dev/null
+++ b/include/seqan/util/cmake/SeqAnUsabilityAnalyzer.cmake
@@ -0,0 +1,98 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2012, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+# Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+# ============================================================================
+# Define the macros required for using the instrumentation for the SeqAn
+# Usability Analyzer.
+# ============================================================================
+
+# ---------------------------------------------------------------------------
+# Macro seqan_setup_sua ()
+#
+# Setup target for the SUA data collection initialization.
+# ---------------------------------------------------------------------------
+
+function (seqan_setup_sua)
+  if (NOT SEQAN_INSTRUMENTATION)
+    return ()  # Do not process further when instrumentation is disabled.
+  endif (NOT SEQAN_INSTRUMENTATION)
+
+  message(STATUS "Prepare SeqAn Usability Analyzer data collection...")
+#  if (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
+#    # Use EXE for instrumentation with bundled Python runtime.
+#    execute_process (COMMAND ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe cmake ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
+#    add_custom_target (seqan_sua_target ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}
+#                       COMMENT "Build Instrumentation...")
+#  else (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
+    # Use system's Python runtime.
+    execute_process (COMMAND ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py cmake ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
+    add_custom_target (seqan_sua_target ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}
+                       COMMENT "Build Instrumentation...")
+#  endif (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
+endfunction (seqan_setup_sua)
+
+# ---------------------------------------------------------------------------
+# Macro seqan_add_sua_dependency (TARGET)
+#
+# Add hooks into the SUA data collection before and after building TARGET.
+# ---------------------------------------------------------------------------
+
+function (seqan_add_sua_dependency TARGET)
+  if (NOT SEQAN_INSTRUMENTATION)
+    return ()  # Do not add if instrumentation is disabled.
+  endif (NOT SEQAN_INSTRUMENTATION)
+
+  # Add dependency on the instrumentation target.
+  add_dependencies (${TARGET} seqan_sua_target)
+
+  # Add hooks before and after building.
+#  if (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
+#    set (_INST ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe)
+#    add_custom_command (TARGET ${TARGET}
+#                        PRE_BUILD
+#                        COMMAND ${_INST} pre_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
+#                        COMMENT "Pre Build Instrumentation...")
+#    add_custom_command (TARGET ${TARGET}
+#                        POST_BUILD
+#                        COMMAND ${_INST} post_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
+#                        COMMENT "Post Build Instrumentation...")
+#  else (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
+    set (_INST ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py)
+    add_custom_command (TARGET ${TARGET}
+                        PRE_BUILD
+                        COMMAND ${_INST} pre_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
+                        COMMENT "Pre Build Instrumentation...")
+    add_custom_command (TARGET ${TARGET}
+                        POST_BUILD
+                        COMMAND ${_INST} post_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
+                        COMMENT "Post Build Instrumentation...")
+#  endif (CMAKE_HOST_WIN32 AND NOT PYTHON_EXECUTABLE)
+endfunction (seqan_add_sua_dependency TARGET)
diff --git a/include/seqan/util/cmake/SeqAnVersion.cpp b/include/seqan/util/cmake/SeqAnVersion.cpp
new file mode 100755
index 0000000..c79668b
--- /dev/null
+++ b/include/seqan/util/cmake/SeqAnVersion.cpp
@@ -0,0 +1,48 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// ==========================================================================
+// Prints the current SeqAn version as it is available from the header
+// <seqan/version.h>.
+// ==========================================================================
+
+#include <iostream>
+#include <seqan/version.h>
+
+int main()
+{
+    std::cerr << "SEQAN_VERSION_MAJOR:" << SEQAN_VERSION_MAJOR << "\n"
+              << "SEQAN_VERSION_MINOR:" << SEQAN_VERSION_MINOR << "\n"
+              << "SEQAN_VERSION_PATCH:" << SEQAN_VERSION_PATCH << "\n"
+              << "SEQAN_VERSION_PRE_RELEASE:" << SEQAN_VERSION_PRE_RELEASE << "\n";
+    return 0;
+}
diff --git a/include/seqan/util/cmake/SetCPackSystemName.cmake b/include/seqan/util/cmake/SetCPackSystemName.cmake
new file mode 100644
index 0000000..f9d2274
--- /dev/null
+++ b/include/seqan/util/cmake/SetCPackSystemName.cmake
@@ -0,0 +1,51 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2012, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+# Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+# ============================================================================
+# Autotection of the the system name.
+# ============================================================================
+
+# Setting CMAKE_SYSTEM_PROCESSOR from the command line does not work, so we
+# set it here.  We need this to make the naming of the package file automatic.
+if (SEQAN_SYSTEM_PROCESSOR)
+  set(CMAKE_SYSTEM_PROCESSOR "${SEQAN_SYSTEM_PROCESSOR}")
+endif ()
+
+if (NOT DEFINED CPACK_SYSTEM_NAME)
+  set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
+endif (NOT DEFINED CPACK_SYSTEM_NAME)
+
+if (${CPACK_SYSTEM_NAME} MATCHES Windows)
+  set(CPACK_SYSTEM_NAME Windows-${CMAKE_SYSTEM_PROCESSOR})
+elseif (${CPACK_SYSTEM_NAME} MATCHES Darwin)
+  set(CPACK_SYSTEM_NAME Mac-${CMAKE_SYSTEM_PROCESSOR})
+endif (${CPACK_SYSTEM_NAME} MATCHES Windows)
+
diff --git a/include/seqan/util/cmake/ctd/COPYRIGHT b/include/seqan/util/cmake/ctd/COPYRIGHT
new file mode 100644
index 0000000..652cf0e
--- /dev/null
+++ b/include/seqan/util/cmake/ctd/COPYRIGHT
@@ -0,0 +1,2 @@
+Copyright (c) 2006-2014, Knut Reinert, FU Berlin
+All rights reserved.
diff --git a/include/seqan/util/cmake/ctd/DESCRIPTION b/include/seqan/util/cmake/ctd/DESCRIPTION
new file mode 100644
index 0000000..6ea4bdf
--- /dev/null
+++ b/include/seqan/util/cmake/ctd/DESCRIPTION
@@ -0,0 +1,7 @@
+SeqAn is an open source C++ library of efficient algorithms and data structures
+for the analysis of sequences with the focus on biological data. SeqAn is free
+software available under the three clause BSD license and runs under Windows,
+MacOSX and Linux. The library applies a unique generic design that guarantees
+high performance, generality, extensibility, and integration with other
+libraries. SeqAn is easy to use and simplifies the development of new software
+tools with a minimal loss of performance.
diff --git a/include/seqan/util/cmake/ctd/LICENSE b/include/seqan/util/cmake/ctd/LICENSE
new file mode 100644
index 0000000..1dffcb4
--- /dev/null
+++ b/include/seqan/util/cmake/ctd/LICENSE
@@ -0,0 +1,31 @@
+BSD 3-Clause License
+
+==========================================================================
+                SeqAn - The Library for Sequence Analysis
+==========================================================================
+Copyright (c) 2006-2014, Knut Reinert, FU Berlin
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Knut Reinert or the FU Berlin nor the names of
+      its contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
diff --git a/include/seqan/util/cmake/ctd/configure_profile_properties.cmake b/include/seqan/util/cmake/ctd/configure_profile_properties.cmake
new file mode 100644
index 0000000..074a716
--- /dev/null
+++ b/include/seqan/util/cmake/ctd/configure_profile_properties.cmake
@@ -0,0 +1,13 @@
+# If possible, get latest change date from SeqAn SVN.
+message(STATUS "SEQAN_SOURCE_DIR ${SEQAN_SOURCE_DIR}")
+message(STATUS "SEQAN_DATE ${SEQAN_DATE}")
+if (SEQAN_DATE)
+	string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+).*"
+    "\\1\\2\\3\\4\\5" SEQAN_LAST_CHANGED_DATE "${SEQAN_DATE}")
+  set (CF_SEQAN_VERSION ${SEQAN_VERSION_STRING}.${SEQAN_LAST_CHANGED_DATE})
+else ()
+  set (CF_SEQAN_VERSION "${SEQAN_VERSION_STRING}")
+endif ()
+
+# Actually configure the file.
+configure_file (${SEQAN_SOURCE_DIR}/util/cmake/ctd/plugin.properties.in ${WORKFLOW_PLUGIN_DIR}/plugin.properties)
\ No newline at end of file
diff --git a/include/seqan/util/cmake/ctd/icons/app.png b/include/seqan/util/cmake/ctd/icons/app.png
new file mode 100644
index 0000000..768e425
Binary files /dev/null and b/include/seqan/util/cmake/ctd/icons/app.png differ
diff --git a/include/seqan/util/cmake/ctd/icons/category.png b/include/seqan/util/cmake/ctd/icons/category.png
new file mode 100644
index 0000000..e439f1d
Binary files /dev/null and b/include/seqan/util/cmake/ctd/icons/category.png differ
diff --git a/include/seqan/util/cmake/ctd/icons/splash.png b/include/seqan/util/cmake/ctd/icons/splash.png
new file mode 100644
index 0000000..012d81a
Binary files /dev/null and b/include/seqan/util/cmake/ctd/icons/splash.png differ
diff --git a/include/seqan/util/cmake/ctd/mime.types b/include/seqan/util/cmake/ctd/mime.types
new file mode 100644
index 0000000..47255dd
--- /dev/null
+++ b/include/seqan/util/cmake/ctd/mime.types
@@ -0,0 +1,37 @@
+application/x-fasta fasta fa
+application/x-fastq fastq fq
+application/x-masic masic mas
+application/x-gsi gsi
+application/x-z-gsi gsi.gz
+application/x-gff gff
+application/x-gtf gtf
+application/x-razers razers
+application/x-eland eland
+application/x-masai raw
+application/x-sam sam
+application/x-bam bam
+application/x-afg afg
+application/x-dist dist
+application/x-dot dot
+application/x-newick newick
+application/x-alftsv alf.tsv
+application/x-txt txt
+application/x-fasta fasta fa
+application/x-fastq fastq fq
+application/x-masic masic mas
+application/x-gsi gsi
+application/x-z-gsi gsi.gz
+application/x-razers razers
+application/x-eland eland
+application/x-masai raw
+application/x-sam sam
+application/x-bam bam
+application/x-afg afg
+application/x-dist dist
+application/x-dot dot
+application/x-newick newick
+application/x-alftsv alf.tsv
+application/x-txt txt
+application/x-bam-coverage-tsv bam_coverage_tsv
+application/x-fq-stats-tsv fq_stats_tsv
+application/x-rabema-report-tsv rabema_report_tsv
\ No newline at end of file
diff --git a/include/seqan/util/cmake/ctd/mimetypes.xml b/include/seqan/util/cmake/ctd/mimetypes.xml
new file mode 100644
index 0000000..4eac9ec
--- /dev/null
+++ b/include/seqan/util/cmake/ctd/mimetypes.xml
@@ -0,0 +1,23 @@
+<mimetypes xmlns="http://www.ball-project.org/mimetypes">
+ <mimetype name="FASTA" binary="false" ext="FASTA" description="FASTA"/>
+ <mimetype name="FASTA" binary="false" ext="FA" description="FASTA"/>
+ <mimetype name="FASTQ" binary="false" ext="FQ" description="FASTQ"/>
+ <mimetype name="FASTQ" binary="false" ext="FASTQ" description="FASTQ"/>
+ <mimetype name="MASIC" binary="false" ext="masic" description="MASIC"/>
+ <mimetype name="MASIC" binary="false" ext="mas" description="MASIC"/>
+ <mimetype name="GSI" binary="false" ext="gsi" description="Gold Standard Intervals"/>
+ <mimetype name="ZGSI" binary="true" ext="gsi.gz" description="GZiped Gold Standard Intervals"/>
+ <mimetype name="GFF" binary="false" ext="gff" description="General Feature Format"/>
+ <mimetype name="GTF" binary="false" ext="gtf" description="Gene transfer format"/> 
+ <mimetype name="RAZERS" binary="false" ext="razers" description="RazerS read mapping format"/>
+ <mimetype name="ELAND" binary="false" ext="eland" description="ELAND read mapping format"/>
+ <mimetype name="MASAI" binary="true" ext="raw" description="Masai read mapping format"/>
+ <mimetype name="SAM" binary="true" ext="sam" description="SAM Sequence Alignment and Mapping Format"/>
+ <mimetype name="BAM" binary="true" ext="sam" description="BAM Binary Sequence Alignment and Mapping Format"/>
+ <mimetype name="AFG" binary="true" ext="afg" description="AMOS Assembly Container"/>
+ <mimetype name="DIST" binary="true" ext="dist" description="PHYLIP Formatted Distance Matrix"/>
+ <mimetype name="DOT" binary="true" ext="dot" description="GraphViz DOT Graph Format"/>
+ <mimetype name="NEWICK" binary="true" ext="newick" description="NEWICK Tree Format"/>
+ <mimetype name="ALFTSV" binary="true" ext="alf.tsv" description="ALF output format"/>
+ <mimetype name="TXT" binary="true" ext="txt" description="Text"/>
+</mimetypes>
diff --git a/include/seqan/util/cmake/ctd/plugin.properties.in b/include/seqan/util/cmake/ctd/plugin.properties.in
new file mode 100644
index 0000000..d3b87ff
--- /dev/null
+++ b/include/seqan/util/cmake/ctd/plugin.properties.in
@@ -0,0 +1,15 @@
+# the package of the plugin
+pluginPackage=de.seqan
+
+# the name of the plugin
+pluginName=SeqAn
+
+# the version of the plugin
+pluginVersion=@CF_SEQAN_VERSION@
+
+# the path (starting from KNIMEs Community Nodes node)
+nodeRepositoyRoot=community
+
+
+executor=com.genericworkflownodes.knime.execution.impl.LocalToolExecutor
+commandGenerator=com.genericworkflownodes.knime.execution.impl.CLICommandGenerator
\ No newline at end of file
diff --git a/include/seqan/util/cmake/package.cmake b/include/seqan/util/cmake/package.cmake
new file mode 100644
index 0000000..a3147b3
--- /dev/null
+++ b/include/seqan/util/cmake/package.cmake
@@ -0,0 +1,96 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2012, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+# Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+# ============================================================================
+# CMake file that is included from the root CMakeLists.txt.
+#
+# It sets variables for configuring CPack and then invokes CPack such that the
+# "make package" command is available.
+# ============================================================================
+
+if (("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE") OR
+    ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_APPS"))
+    include (InstallRequiredSystemLibraries)
+endif ()
+
+if (("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE") OR
+    ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_LIBRARY") OR
+    ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_APPS"))
+    include (SetCPackSystemName)
+
+    # NOTE that you have to run "make dox" before running cpack.  The reason
+    # is that we cannot add dependencies to the install target at the moment.
+    # See: http://public.kitware.com/Bug/view.php?id=8438
+
+    # ===========================================================================
+    # Archive Packages (.tar & .tar.bz2)
+    # ===========================================================================
+
+    if (WIN32)
+        SET (CPACK_GENERATOR "ZIP")
+    else ()
+        SET (CPACK_GENERATOR "ZIP;TBZ2")
+    endif ()
+    if ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE")
+      SET(CPACK_PACKAGE_NAME "seqan")
+    elseif ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_LIBRARY")
+      SET(CPACK_PACKAGE_NAME "seqan-library")
+    elseif ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_APPS")
+      SET(CPACK_PACKAGE_NAME "seqan-apps")
+    endif ()
+    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SeqAn - The C++ library for sequence analysis.")
+    SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>")
+    SET(CPACK_PACKAGE_VENDOR "SeqAn Team, FU Berlin")
+    SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.rst")
+    SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+
+    seqan_get_version()
+
+    if (SEQAN_NIGHTLY_RELEASE)
+      include (GetCurrentDate)
+      set (CPACK_PACKAGE_VERSION "${CURRENT_YEAR}${CURRENT_MONTH}${CURRENT_DAY}")
+      set (CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
+    else ()
+      set (CPACK_PACKAGE_VERSION "${SEQAN_VERSION_MAJOR}.${SEQAN_VERSION_MINOR}.${SEQAN_VERSION_PATCH}")
+      set (CPACK_PACKAGE_VERSION "${SEQAN_VERSION}")
+    endif (SEQAN_NIGHTLY_RELEASE)
+    SET(CPACK_PACKAGE_VERSION_MAJOR "${SEQAN_VERSION_MAJOR}")
+    SET(CPACK_PACKAGE_VERSION_MINOR "${SEQAN_VERSION_MINOR}")
+    SET(CPACK_PACKAGE_VERSION_PATCH "${SEQAN_VERSION_PATCH}")
+    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "SeqAn ${CPACK_PACKAGE_VERSION}")
+
+    if ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_LIBRARY")
+        set (CPACK_PACKAGE_FILE_NAME "seqan-library-${CPACK_PACKAGE_VERSION}")
+    endif ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_LIBRARY")
+
+    # Should be the last include.
+    INCLUDE(CPack)
+endif ()
diff --git a/include/seqan/util/colornvcc b/include/seqan/util/colornvcc
new file mode 100755
index 0000000..83b91be
--- /dev/null
+++ b/include/seqan/util/colornvcc
@@ -0,0 +1,259 @@
+#! /usr/bin/perl -w
+
+#
+# colornvcc
+#
+# Version: 1.0.0
+#
+# A wrapper to colorize the output from Nvidia's cuda
+# compiler "nvcc".  This wrapper also outputs messages
+# in gcc format instead of nvcc's format so that tools
+# which parse gcc errors can find filenames and line 
+# numbers (e.g. eclipse).
+#
+# This colornvcc wrapper is based on the colorgcc wrapper:
+# colorgcc Version: 1.3.2 by Jamie Moyers
+#
+# Requires the ANSIColor module from CPAN.
+#
+# Usage:
+#
+# In a directory that occurs in your PATH _before_ the directory
+# where the compiler lives, create a softlink to colornvcc for
+# each compiler you want to colorize:
+#
+#    nvcc -> colornvcc
+#
+# That's it. When "nvcc" is invoked, colornvcc is run instead.
+# colornvcc looks at the program name to figure out which compiler to run.
+#
+# The default settings can be overridden with ~/.colornvccrc.
+# See the comments in the sample .colornvccrc for more information.
+#
+# Note:
+#
+# colornvcc will only emit color codes if:
+# 
+#    (1) Its STDOUT is a tty and
+#    (2) the value of $TERM is not listed in the "nocolor" option.
+#
+# If colornvcc colorizes the output, the compiler's STDERR will be
+# combined with STDOUT. Otherwise, colornvcc just passes the output from
+# the compiler through without modification.
+# 
+# Author: Kristi Tsukida <kristi.tsukida at gmail.com>
+# Started: April 23, 2009
+# Licence: GNU Public License
+#
+# Credits:
+#
+#    I got the idea for this from "colorgcc" by Jamie Moyers
+#       who was inspired by a script called "color_cvs":
+#       color_cvs .03   Adrian Likins <adrian at gimp.org> <adrian at redhat.com>
+#
+# Changes:
+#
+# 1.0.0 Initial Version
+
+use Term::ANSIColor;
+use IPC::Open3;
+
+sub initDefaults
+{
+   $compilerPaths{"nvcc"} = "/usr/local/cuda/bin/nvcc";
+
+   $nocolor{"dumb"} = "true";
+
+   $colors{"srcColor"} = color("cyan");
+   $colors{"introColor"} = color("blue");
+
+   $colors{"warningFileNameColor"} = color("yellow");
+   $colors{"warningNumberColor"}   = color("yellow");
+   $colors{"warningMessageColor"}  = color("yellow");
+
+   $colors{"errorFileNameColor"} = color("bold red");
+   $colors{"errorNumberColor"}   = color("bold red");
+   $colors{"errorMessageColor"}  = color("bold red");
+}
+
+sub loadPreferences
+{
+# Usage: loadPreferences("filename");
+
+   my($filename) = @_;
+
+   open(PREFS, "<$filename") || return;
+
+   my $nvccVersion;
+   my $overrideCompilerPaths = 0;
+
+   while(<PREFS>)
+   {
+      next if (m/^\#.*/);          # It's a comment.
+      next if (!m/(.*):\s*(.*)/);  # It's not of the form "foo: bar".
+
+      $option = $1;
+      $value = $2;
+
+      if ($option =~ m/\A(nvcc)\Z/)
+      {
+                  $compilerPaths{$option} = $value;
+                  $overrideCompilerPaths  = 1;
+      }
+          elsif ($option eq "nvccVersion")
+          {
+                  $nvccVersion = $value;
+          }
+      elsif ($option eq "nocolor")
+      {
+         # The nocolor option lists terminal types, separated by
+         # spaces, not to do color on.
+         foreach $termtype (split(/\s+/, $value))
+         {
+            $nocolor{$termtype} = "true";
+         }
+      }
+      else
+      {
+         $colors{$option} = color($value);
+      }
+   }
+   close(PREFS);
+
+   # Append "-<nvccVersion>" to user-defined compilerPaths
+   if ($overrideCompilerPaths && $nvccVersion) {
+           $compilerPaths{$_} .= "-$nvccVersion" foreach (keys %compilerPaths);
+   }
+}
+
+sub srcscan
+{
+# Usage: srcscan($text, $normalColor)
+#    $text -- the text to colorize
+#    $normalColor -- The escape sequence to use for non-source text.
+
+# Looks for text between ` and ', and colors it srcColor.
+
+   my($line, $normalColor) = @_;
+
+   my($srcon) = color("reset") . $colors{"srcColor"};
+   my($srcoff) = color("reset") . $normalColor;
+
+   $line = $normalColor . $line;
+
+   # This substitute replaces `foo' with `AfooB' where A is the escape
+   # sequence that turns on the the desired source color, and B is the
+   # escape sequence that returns to $normalColor.
+   $line =~ s/\`(.*?)\'/\`$srcon$1$srcoff\'/g;
+
+   print($line, color("reset"));
+}
+
+#
+# Main program
+#
+
+# Set up default values for colors and compilers.
+initDefaults();
+
+# Read the configuration file, if there is one.
+$configFile = $ENV{"HOME"} . "/.colornvccrc";
+$default_configFile = "/etc/colornvccrc";
+if (-f $configFile)
+{
+   loadPreferences($configFile);
+} elsif (-f $default_configFile ) {
+        loadPreferences($default_configFile)
+        }
+
+# Figure out which compiler to invoke based on our program name.
+$0 =~ m%.*/(.*)$%;
+$progName = $1 || $0;
+
+$compiler = $compilerPaths{$progName} || $compilerPaths{"nvcc"};
+
+# Check that we don't reference self
+die "$compiler is self-referencing"
+        if ( -l $compiler and (stat $compiler)[1] == (stat $0)[1] );
+
+# Get the terminal type. 
+$terminal = $ENV{"TERM"} || "dumb";
+
+# If it's in the list of terminal types not to color, or if
+# we're writing to something that's not a tty, don't do color.
+$noColor = "false";
+if (! -t STDOUT || $nocolor{$terminal})
+{
+   $noColor = "true"; 
+   #exec $compiler, @ARGV
+   #   or die("Couldn't exec");
+}
+
+# Keep the pid of the compiler process so we can get its return
+# code and use that as our return code.
+$compiler_pid = open3('<&STDIN', \*NVCCOUT, \*NVCCOUT, $compiler, @ARGV);
+
+$line = "";
+
+# Colorize the output from the compiler.
+while(<NVCCOUT>)
+{
+   if (m/^(.*?)\(([0-9]+)\):(.*)$/) # filename(lineno):message
+   {
+      $field1 = $1 || "";
+      $field2 = $2 || "";
+      $field3 = $3 || "";
+	  if ($field3 =~ m/\s+(H|h)ere.*/)
+	  {
+         #print("$lineInstantiated from $1")
+	     print("$field1:$field2   instantiated from $line");
+	  }
+      elsif ($noColor eq "true")
+      {
+         print("$field1:$field2:$field3");
+      }
+      elsif ($field3 =~ m/\s+(W|w)arn(u|i)ng:.*/)
+      {
+         # Warning
+         print($colors{"warningFileNameColor"}, "$field1:", color("reset"));
+         print($colors{"warningNumberColor"}, "$field2:", color("reset"));
+         srcscan($field3, $colors{"warningMessageColor"});
+      }
+      else 
+      {
+         # Error
+         print($colors{"errorFileNameColor"}, "$field1:", color("reset"));
+         print($colors{"errorNumberColor"}, "$field2:", color("reset"));
+         srcscan($field3, $colors{"errorMessageColor"});
+      }
+      print("\n");
+   }
+   elsif (m/^$/) # empty line
+   {
+   }
+   elsif ($noColor eq "true")
+   {
+      print($_);
+   }
+   elsif (m/^(.*?):(.+):$/) # filename:message:
+   {
+      # No line number, treat as an "introductory" line of text.
+      srcscan($_, $colors{"introColor"});
+   }
+   elsif (m/^\s+detected during:$/)
+   {
+   }
+   elsif (m/^\s+(detected during )?instantiation of (.*)$/)
+   {
+      $line = $2 || "";
+   }
+   else # Anything else.        
+   {
+      # Doesn't seem to be a warning or an error. Print normally.
+      print(color("reset"), $_);
+   }
+}
+
+# Get the return code of the compiler and exit with that.
+waitpid($compiler_pid, 0);
+exit ($? >> 8);
diff --git a/include/seqan/util/ctd2galaxy.py b/include/seqan/util/ctd2galaxy.py
new file mode 100644
index 0000000..e39173a
--- /dev/null
+++ b/include/seqan/util/ctd2galaxy.py
@@ -0,0 +1,192 @@
+#!/usr/bin/env python
+
+import argparse
+import sys
+import xml.sax
+
+
+class CLIElement(object):
+    """Represents a <clielement> tag.
+
+    option_identifier -- str with parameters (e.g. --param), empty if argument.
+    is_list -- bool whether the element is a list.
+    """
+
+    def __init__(self, option_identifier='', mapping_path='', is_list=False):
+        self.option_identifier = option_identifier
+        self.mapping = None  # Link to ParametersNode, set after parsing.
+        self.mapping_path = mapping_path
+        self.is_list = is_list
+
+    def __str__(self):
+        t = (self.option_identifier, self.mapping_path, self.is_list)
+        return 'CLIElement(%s, %s, %s)' % tuple(map(repr, list(t)))
+
+
+class ParametersNode(object):
+    """Represents a <NODE> tag inside the <PARAMETERS> tags."""
+    
+    def __init__(self, kind='', name='', description='', value='', type_='', tags='',
+                 restrictions='', supported_formats=''):
+        self.name = name
+        self.description = description
+        self.value = value
+        self.type_ = type_
+        self.tags = tags
+        self.supported_formats = supported_formats
+        self.restrictions = None
+        self.path = None  # root if is None
+        self.parent = None  # not set, usually a list
+        self.children = {}
+
+    def computePath(self):
+        """Compute path entry from parent links."""
+
+    def __str__(self):
+        t = (self.name, self.description, self.value, self.type_, self.tags,
+             self.supported_formats, self.children)
+        return 'ParametersNode(%s, %s, %s, %s, %s, %s, %s)' % tuple(map(repr, t))
+
+    def __repr__(self):
+        return str(self)
+
+
+class Tool(object):
+    """Represents the top-level <tool> tag from a CTD file."""
+
+    def __init__(self, name='', executable_name='', version='',
+                 description='', manual='', doc_url='',
+                 category=''):
+        self.name = name
+        self.executable_name = executable_name
+        self.version = version
+        self.description = description
+        self.manual = manual
+        self.doc_url = doc_url
+        self.category = category
+        self.cli_elements = []
+        self.parameters = None
+
+    def __str__(self):
+        t = (self.name, self.executable_name, self.version, self.description,
+             self.manual, self.doc_url, self.category)
+        return 'Tool(%s, %s, %s, %s, %s, %s, %s)' % tuple(map(repr, list(t)))
+
+        
+
+class CTDFormatException(Exception):
+    """Raised when there is a format error in CTD."""
+
+    
+class CTDHandler(xml.sax.handler.ContentHandler):
+    def __init__(self):
+        self.result = None
+        # A stack of tag names that are currently open.
+        self.stack = []
+        # The current parameter to append nodes below.
+        self.parameter_node = None
+
+    def startElement(self, name, attrs):
+        """Handle start of element."""
+        # Maintain a stack of open tags.
+        self.stack.append(name)
+        if self.stack == ['tool']:
+            # Create the top level Tool object.
+            self.tool = Tool()
+            self.result = self.tool
+        elif self.stack == ['tool', 'cli', 'clielement']:
+            # Create a new CLIElement object for a <clieelement> tag.
+            if not attrs.get('isList'):
+                raise CTDFormatException('No attribute isList in <clielement>.')
+            if attrs.get('optionIdentifier') is None:
+                raise CTDFormatException('no attribute optionIdentifier in <clielement>.')
+            is_list = (attrs.get('isList') == 'false')
+            option_identifier = attrs.get('optionIdentifier')
+            self.tool.cli_elements.append(CLIElement(option_identifier=option_identifier, is_list=is_list))
+        elif self.stack == ['tool', 'cli', 'clielement', 'mapping']:
+            # Handle a <mapping> sub entry of a <clieelement> tag.
+            if not attrs.get('referenceName'):
+                raise CTDFormatException('no attribute referenceName in <mapping>')
+            self.tool.cli_elements[-1].mapping_path = attrs['referenceName']
+        elif self.stack == ['tool', 'PARAMETERS']:
+            # Handle the <PARAMETERS> entry by creating a new top parameters node.
+            self.tool.parameters = ParametersNode(kind='node', name='<root>')
+            self.parameter_node = self.tool.parameters
+        elif self.stack[:2] == ['tool', 'PARAMETERS'] and self.stack[-1] == 'NODE':
+            # Create a new node ParametersNode for the <PARAMETERS> entry.
+            if not attrs.get('name'):
+                raise CTDFormatException('no attribute name in <NODE>')
+            name = attrs.get('name')
+            node = ParametersNode(kind='node', name=name)
+            node.parent = self.parameter_node
+            self.parameter_node.children[name] = node
+            self.parameter_node = node.parent
+        elif self.stack[:2] == ['tool', 'PARAMETERS'] and self.stack[-1] == 'ITEM':
+            # Create a new item ParametersNode for the <ITEM> entry.
+            if not attrs.get('name'):
+                raise CTDFormatException('no attribute name in <ITEM>')
+            name = attrs.get('name')
+            value = attrs.get('value')
+            type_ = attrs.get('type')
+            tags = attrs.get('tags')
+            description = attrs.get('description')
+            restrictions = attrs.get('restrictions')
+            supported_formats = attrs.get('supported_formats')
+            child = ParametersNode(
+                kind='item', name=name, description=description, value=value,
+                type_=type_, tags=tags, supported_formats=supported_formats)
+            self.parameter_node.children[name] = child
+
+    def endElement(self, name):
+        self.stack.pop()
+        if name == 'NODE':
+            self.parameter_node = self.parameter_node.parent
+
+    def characters(self, content):
+        if self.stack == ['tool', 'name']:
+            self.tool.name += content
+        elif self.stack == ['tool', 'executableName']:
+            self.tool.executable_name += content
+        elif self.stack == ['tool', 'version']:
+            self.tool.version += content
+        elif self.stack == ['tool', 'description']:
+            self.tool.description += content
+        elif self.stack == ['tool', 'manual']:
+            self.tool.manual += content
+        elif self.stack == ['tool', 'docurl']:
+            self.tool.doc_url += content
+        elif self.stack == ['tool', 'category']:
+            self.tool.category += content
+
+
+class CTDParser(object):
+    """Parser for CTD files."""
+
+    def __init__(self):
+        self.handler = CTDHandler()
+
+    def parse(self, path):
+        parser = xml.sax.make_parser()
+        parser.setContentHandler(self.handler)
+        parser.parse(path)
+        return self.handler.result
+
+
+def main():
+    parser = argparse.ArgumentParser(description='Convert CTD to Galaxy XML')
+    parser.add_argument('-i', '--in-file', metavar='FILE',
+                        help='CTD file to read.', dest='in_file',
+                        required=True)
+
+    args = parser.parse_args()
+
+    ctd_parser = CTDParser()
+    tool = ctd_parser.parse(args.in_file)
+    print tool
+    for cli in tool.cli_elements:
+        print '  %s' % cli
+    print tool.parameters
+        
+
+if __name__ == '__main__':
+    sys.exit(main())
\ No newline at end of file
diff --git a/include/seqan/util/linux_binary_tests.sh b/include/seqan/util/linux_binary_tests.sh
new file mode 100755
index 0000000..4a004f8
--- /dev/null
+++ b/include/seqan/util/linux_binary_tests.sh
@@ -0,0 +1,171 @@
+#!/bin/bash
+# ----------------------------------------------------------------------------
+#                  SeqAn - The Library for Sequence Analysis
+# ----------------------------------------------------------------------------
+# Copyright (c) 2006-2013, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# License: BSD 3-clause
+# ----------------------------------------------------------------------------
+# Author: Sabrina Krakau <sabrina.krakau at fu-berlin.de>
+# Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+# ----------------------------------------------------------------------------
+# Binary test helper script.
+#
+# This script downloads binary packages of SeqAn apps on remote Linux machines
+# and calls the programs to test whether the applications can be executed at
+# all and thus check whether the system's libraries are compatible.
+#
+# The following packages have to be installed in order to run on the operating
+# systems:
+#
+# SUSE 64 Bit:
+#   zypper install libgomp1-32bit
+#
+# Fedora 64 Bit:
+#   yum install -y glibc.i686 libstdc++.i686 zlib.i686 libgomp.i686
+# ----------------------------------------------------------------------------
+
+# Global variables with user name and target host.
+USER_NAME=$USER
+SERVER_NAMES=
+
+# Parse option values.
+while getopts ":u:h:" opt
+do
+    case $opt in
+        u)
+            USER_NAME=$OPTARG
+            ;;
+        h)
+            SERVER_NAMES=$OPTARG
+            ;;
+        \?)
+            echo "Invalid option: -$OPTARG" >&2
+            exit 1
+            ;;
+    esac
+done
+
+
+# Check that ${USER_NAME} and ${SERVER_NAMES} are set.
+if [[ "$USER_NAME" == "" || "$SERVER_NAMES" == "" ]]; then
+    echo "Missing option -h" >&2
+    exit 1
+fi
+
+# List of binary packages to tests.
+BINARY_URLS=(
+    "http://packages.seqan.de/razers3/razers3-3.1.1-Linux-i686.tar.bz2"
+    "http://packages.seqan.de/razers3/razers3-3.1.1-Linux-x86_64.tar.bz2"
+    "http://packages.seqan.de/stellar/stellar-1.4.1-Linux-i686.tar.bz2"
+    "http://packages.seqan.de/stellar/stellar-1.4.1-Linux-x86_64.tar.bz2"
+    "http://packages.seqan.de/breakpoint_calculator/breakpoint_calculator-0.2.1-Linux-i686.tar.bz2"
+    "http://packages.seqan.de/breakpoint_calculator/breakpoint_calculator-0.2.1-Linux-x86_64.tar.bz2"
+    "http://packages.seqan.de/snp_store/snp_store-1.0.1-Linux-i686.tar.bz2"
+    "http://packages.seqan.de/snp_store/snp_store-1.0.1-Linux-x86_64.tar.bz2")
+
+# Array with test calls for each package.
+APP_CALLS=(
+    "./razers3 -o output.razers ../example/genome.fa ../example/reads.fa"
+    "./razers3 -o output.razers ../example/genome.fa ../example/reads.fa"
+    "./stellar -o ../example/mapped_reads.gff --minLength 30 ../example/NC_001477.fasta ../example/reads.fasta" 
+    "./stellar -o ../example/mapped_reads.gff --minLength 30 ../example/NC_001477.fasta ../example/reads.fasta"
+    "./breakpoint_calculator -d2 ../example/alignment.maf"
+    "./breakpoint_calculator -d2 ../example/alignment.maf"
+    "./snp_store ../example/exampleGenome.fa ../example/exampleReads.gff -o output_snp.txt -id output_indel1.txt"
+    "./snp_store ../example/exampleGenome.fa ../example/exampleReads.gff -o output_snp.txt -id output_indel1.txt")
+
+# Create tmp directory, download binaries, call program and return success/error message
+#
+# Arguments:
+#
+#  $1 server to connect to
+#  $2 call to application
+function test_app ()
+{
+    USER_SERVER=$1
+    APP_CALL=$2
+    # Create temporary directory.
+    echo "testing ${F}" >&2
+   	TMPDIR=$(ssh $USER_SERVER "mktemp -d")
+
+    # Download package.
+    echo -n "  downloading ..." >&2
+	ssh $USER_SERVER "cd $TMPDIR && curl $F -o binaryName.tar.bz2 &>/dev/null"
+    if [[ "$?" = "0" ]]; then
+        echo " OK" >&2
+    else
+        echo " FAILED" >&2
+        echo "FAILED"  # for caller
+        return
+    fi
+
+    # Extracting package.
+    echo -n "  unpacking ..." >&2
+	ssh $USER_SERVER "cd $TMPDIR && tar -xjf binaryName.tar.bz2"
+    if [[ "$?" = "0" ]]; then
+        echo " OK" >&2
+    else
+        echo " FAILED" >&2
+        echo "FAILED"  # for caller
+        return
+    fi
+
+    # Calling binary.
+    echo -n "  calling test ..." >&2
+    FILE=$(mktemp)
+    MSG=`ssh $USER_SERVER "cd $TMPDIR && cd */bin && (${APP_CALL}) > file.stdout" &>${FILE}`
+    RET=$?
+    if [[ "${RET}" = "0" ]]; then
+        echo " OK" >&2
+        echo "OK"  # for caller
+        return
+    else
+        echo " FAILED" >&2
+        echo " The program call returns: ${RET}." >&2
+        echo " Program output is >>>" >&2
+        cat ${FILE} >&2
+        rm -f ${FILE}
+        echo ${MSG}
+        echo "<<<" >&2
+        echo "FAILED"  # for caller
+        return
+    fi
+
+    # Remove temporary directory.
+	ssh $USER_SERVER "rm -r $TMPDIR"
+    
+}
+
+echo "Testing SeqAn Linux Binaries..." >&2
+echo >&2
+
+RESULTS=()
+IFS=";"; 
+
+# Execute tests for each server.
+for SERVER_NAME in ${SERVER_NAMES[@]}; do
+    echo "testing on ${SERVER_NAME}"
+	USER_SERVER="$USER_NAME@$SERVER_NAME"
+	COUNTER=0
+	for F in ${BINARY_URLS[@]}; do
+        #echo "${APP_CALLS[$COUNTER]}" >&2
+        RET=`test_app $USER_SERVER "${APP_CALLS[$COUNTER]}"`
+	    RESULTS+=("${RET}")
+		let COUNTER=COUNTER+1
+	done
+done
+
+# For each server and for each binary-url: Output test result
+echo -e '\t'
+for (( I = 0 ; I < ${#SERVER_NAMES[@]} ; I++ )) do
+    echo "Binary tests on ${SERVER_NAMES[$I]}:"
+    echo ""
+    for (( J = 0 ; J < ${#BINARY_URLS[@]} ; J++ )) do
+        K=$(($J+$I*${#BINARY_URLS[@]}))
+        echo -e "${BINARY_URLS[$J]}\t${RESULTS[$K]}"
+    done
+done
+
+
diff --git a/include/seqan/util/makefile_project/Makefile b/include/seqan/util/makefile_project/Makefile
new file mode 100644
index 0000000..7321460
--- /dev/null
+++ b/include/seqan/util/makefile_project/Makefile
@@ -0,0 +1,15 @@
+default: all
+
+all: debug release
+
+debug:
+	$(MAKE) -C debug
+
+release:
+	$(MAKE) -C release
+
+clean:
+	$(MAKE) -C debug clean
+	$(MAKE) -C release clean
+
+.PHONY: default all debug release clean
\ No newline at end of file
diff --git a/include/seqan/util/makefile_project/Makefile.rules b/include/seqan/util/makefile_project/Makefile.rules
new file mode 100644
index 0000000..0b4c6ce
--- /dev/null
+++ b/include/seqan/util/makefile_project/Makefile.rules
@@ -0,0 +1,17 @@
+SRC=../src
+CXXFLAGS+=-I../../../include
+CXXFLAGS+=-I../../../include
+
+default: all
+all: main
+
+main: main.o
+	$(CXX) $(LDFLAGS) -o main main.o
+
+main.o: $(SRC)/main.cpp
+	$(CXX) $(CXXFLAGS) -c -o main.o $(SRC)/main.cpp
+
+clean:
+	rm -f main.o main
+
+.PHONY: default all clean
diff --git a/include/seqan/util/makefile_project/README b/include/seqan/util/makefile_project/README
new file mode 100644
index 0000000..269885c
--- /dev/null
+++ b/include/seqan/util/makefile_project/README
@@ -0,0 +1 @@
+This is an example of how to use SeqAn in a Makefile based project.
diff --git a/include/seqan/util/makefile_project/debug/Makefile b/include/seqan/util/makefile_project/debug/Makefile
new file mode 100644
index 0000000..44d8dd6
--- /dev/null
+++ b/include/seqan/util/makefile_project/debug/Makefile
@@ -0,0 +1,3 @@
+include ../Makefile.rules
+
+CXXFLAGS+=-g -O0 -DSEQAN_ENABLE_TESTING=0 -DSEQAN_ENABLE_DEBUG=1
diff --git a/include/seqan/util/makefile_project/release/Makefile b/include/seqan/util/makefile_project/release/Makefile
new file mode 100644
index 0000000..0533793
--- /dev/null
+++ b/include/seqan/util/makefile_project/release/Makefile
@@ -0,0 +1,3 @@
+include ../Makefile.rules
+
+CXXFLAGS+=-O3 -DNDEBUG -DSEQAN_ENABLE_TESTING=0 -DSEQAN_ENABLE_DEBUG=0
diff --git a/include/seqan/util/makefile_project/src/main.cpp b/include/seqan/util/makefile_project/src/main.cpp
new file mode 100644
index 0000000..7f77b33
--- /dev/null
+++ b/include/seqan/util/makefile_project/src/main.cpp
@@ -0,0 +1,11 @@
+#include <seqan/basic.h>
+#include <seqan/sequence.h>
+#include <seqan/stream.h>
+
+using namespace seqan;
+
+int main()
+{
+    std::cout << CharString("Hello SeqAn!") << std::endl;
+    return 0;
+}
diff --git a/include/seqan/util/raw_cmake_project/CMakeLists.txt b/include/seqan/util/raw_cmake_project/CMakeLists.txt
new file mode 100644
index 0000000..914f0db
--- /dev/null
+++ b/include/seqan/util/raw_cmake_project/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Example CMakeLists.txt file that uses the FindSeqAn.cmake module for
+# building a SeqAn-based app.
+
+project (raw_cmake_project)
+cmake_minimum_required (VERSION 2.8.2)
+
+# Place binaries into "bin" directory.
+set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/")
+
+# Go to "src" subdirectory.
+add_subdirectory (src)
diff --git a/include/seqan/util/raw_cmake_project/README b/include/seqan/util/raw_cmake_project/README
new file mode 100644
index 0000000..0b6a72c
--- /dev/null
+++ b/include/seqan/util/raw_cmake_project/README
@@ -0,0 +1,2 @@
+This is an example of how to use SeqAn in a CMake-based project independently
+from the SeqAn build system.
diff --git a/include/seqan/util/raw_cmake_project/src/CMakeLists.txt b/include/seqan/util/raw_cmake_project/src/CMakeLists.txt
new file mode 100644
index 0000000..b7005ae
--- /dev/null
+++ b/include/seqan/util/raw_cmake_project/src/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Configure SeqAn, enabling features for libbz2 and zlib.
+set (SEQAN_FIND_DEPENDENCIES ZLIB BZip2)
+find_package (SeqAn REQUIRED)
+
+# Add include directories, defines, and flags for SeqAn (and its dependencies).
+include_directories (${SEQAN_INCLUDE_DIRS})
+add_definitions (${SEQAN_DEFINITIONS})
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS}")
+
+# Build the program and link it against the SeqAn dependency libraries.
+add_executable (main main.cpp)
+target_link_libraries (main ${SEQAN_LIBRARIES})
diff --git a/include/seqan/util/raw_cmake_project/src/main.cpp b/include/seqan/util/raw_cmake_project/src/main.cpp
new file mode 100644
index 0000000..b409fcd
--- /dev/null
+++ b/include/seqan/util/raw_cmake_project/src/main.cpp
@@ -0,0 +1,12 @@
+#include <iostream>
+
+#include <seqan/basic.h>
+#include <seqan/sequence.h>
+#include <seqan/stream.h>
+
+using namespace seqan;
+
+int main() {
+    std::cout << CharString("Hello SeqAn!") << std::endl;
+    return 0;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/lambda-align.git



More information about the debian-med-commit mailing list