1# ============================================================================ 2# SeqAn - The Library for Sequence Analysis 3# ============================================================================ 4# Copyright (c) 2006-2018, Knut Reinert, FU Berlin 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions are met: 9# 10# * Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# * Redistributions in binary form must reproduce the above copyright 13# notice, this list of conditions and the following disclaimer in the 14# documentation and/or other materials provided with the distribution. 15# * Neither the name of Knut Reinert or the FU Berlin nor the names of 16# its contributors may be used to endorse or promote products derived 17# from this software without specific prior written permission. 18# 19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE 23# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 29# DAMAGE. 30# ============================================================================ 31# 32# This CMake module will try to find SeqAn and its dependencies. You can use 33# it the same way you would use any other CMake module. 34# 35# find_package(SeqAn [REQUIRED] ...) 36# 37# SeqAn has some optional dependencies that you must search for **before** 38# you search for SeqAn: 39# 40# ZLIB -- zlib compression library 41# BZip2 -- libbz2 compression library 42# OpenMP -- OpenMP language extensions to C/C++ 43# 44# E.g. 45# find_package (ZLIB) 46# find_package (BZip2) 47# find_package (SeqAn [REQUIRED] ...) 48# 49# Once the search has been performed, the following variables will be set. 50# 51# SEQAN_FOUND -- Indicate whether SeqAn was found. 52# 53# (the dependencies have their own *_FOUND variables, but inside the code we 54# also define the following macros to indicate whether dependencies were found: 55# of the SeqAn library were found. 56# 57# SEQAN_HAS_ZLIB 58# SEQAN_HAS_BZIP2 59# SEQAN_HAS_OPENMP 60# 61# These variables give lists that are to be passed to the 62# include_directories(), target_link_libraries(), and add_definitions() 63# functions. 64# 65# SEQAN_INCLUDE_DIRS 66# SEQAN_LIBRARIES 67# SEQAN_DEFINITIONS 68# 69# The C++ compiler flags to set. 70# 71# SEQAN_CXX_FLAGS 72# 73# The following variables give the version of the SeqAn library, its 74# major, minor, and the patch version part of the version string. 75# 76# SEQAN_VERSION_STRING 77# SEQAN_VERSION_MAJOR 78# SEQAN_VERSION_MINOR 79# SEQAN_VERSION_PATCH 80# 81# ============================================================================ 82 83include(FindPackageMessage) 84include(CheckIncludeFileCXX) 85include(CheckCXXSourceCompiles) 86 87# ---------------------------------------------------------------------------- 88# Set CMAKE policies. 89# ---------------------------------------------------------------------------- 90 91if (POLICY CMP0054) # Disables auto-dereferencing of variables in quoted statements 92 cmake_policy(SET CMP0054 NEW) 93endif() 94 95# ---------------------------------------------------------------------------- 96# Define Constants. 97# ---------------------------------------------------------------------------- 98 99set(_SEQAN_DEFAULT_LIBRARIES ZLIB OpenMP) 100set(_SEQAN_ALL_LIBRARIES ZLIB BZip2 OpenMP) 101 102# ---------------------------------------------------------------------------- 103# Set variables SEQAN_FIND_* to their default unless they have been set. 104# ---------------------------------------------------------------------------- 105 106# SEQAN_FIND_DEPENDENCIES 107if (SEQAN_FIND_DEPENDENCIES STREQUAL "DEFAULT") 108 set(SEQAN_FIND_DEPENDENCIES ${_SEQAN_DEFAULT_LIBRARIES}) 109elseif (SEQAN_FIND_DEPENDENCIES STREQUAL "ALL") 110 set(SEQAN_FIND_DEPENDENCIES ${_SEQAN_ALL_LIBRARIES}) 111elseif (SEQAN_FIND_DEPENDENCIES STREQUAL "NONE") 112 set(SEQAN_FIND_DEPENDENCIES) 113endif () 114 115# SEQAN_FIND_DEPENDENCIES IS DEPRECATED, just use find_package! 116 117# ---------------------------------------------------------------------------- 118# Deactivate verbosity if package detection is quite 119# ---------------------------------------------------------------------------- 120 121# deactivate messages in check_* if quiet 122set (CMAKE_REQUIRED_QUIET ${SeqAn_FIND_QUIETLY}) 123 124# ---------------------------------------------------------------------------- 125# Determine compiler. 126# ---------------------------------------------------------------------------- 127 128# Recognize Clang compiler. 129 130set (COMPILER_CLANG FALSE) 131set (COMPILER_GCC FALSE) 132set (COMPILER_LINTEL FALSE) 133set (COMPILER_WINTEL FALSE) 134set (COMPILER_MSVC FALSE) 135set (STDLIB_VS ${MSVC}) 136 137if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") 138 set (COMPILER_CLANG TRUE) 139elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND STDLIB_VS) 140 set (COMPILER_WINTEL TRUE) 141elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel") 142 set (COMPILER_LINTEL TRUE) 143elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") 144 set (COMPILER_GCC TRUE) 145elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") 146 set (COMPILER_MSVC TRUE) 147endif () 148 149# ---------------------------------------------------------------------------- 150# Check required compiler versions. 151# ---------------------------------------------------------------------------- 152 153if (COMPILER_GCC) 154 155 # require at least gcc 4.9 156 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) 157 message(AUTHOR_WARNING "GCC version (${CMAKE_CXX_COMPILER_VERSION}) should be at least 4.9! Anything below is untested.") 158 endif () 159 160elseif (COMPILER_CLANG) 161 162 # require at least clang 3.5 163 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) 164 message(AUTHOR_WARNING "Clang version (${CMAKE_CXX_COMPILER_VERSION}) should be at least 3.5! Anything below is untested.") 165 endif () 166 167elseif (COMPILER_LINTEL OR COMPILER_WINTEL) 168 169 # require at least icpc 17.0.0 170 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0.0) 171 message(AUTHOR_WARNING "Intel Compiler version (${CMAKE_CXX_COMPILER_VERSION}) should be at least 17.0.0! Anything below is untested.") 172 endif () 173 174elseif (COMPILER_MSVC) 175 176 # require at least MSVC 19.0 177 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0") 178 message(FATAL_ERROR "MSVC version (${CMAKE_CXX_COMPILER_VERSION}) must be at least 19.0 (Visual Studio 2015)!") 179 endif () 180 181else () 182 message(WARNING "You are using an unsupported compiler! Compilation has only been tested with >= Clang 3.5, >= GCC 4.9 and >= MSVC 19.0 (VS 2015).") 183endif () 184 185# ---------------------------------------------------------------------------- 186# Require C++14 187# ---------------------------------------------------------------------------- 188 189# The visual studio compiler and intel compiler on windows defines __cplusplus 190# still as 199711L, thus the check below would fail. 191if (NOT (COMPILER_MSVC OR COMPILER_WINTEL)) 192 set(CXXSTD_TEST_SOURCE 193 "#if !defined(__cplusplus) || (__cplusplus < 201300L) 194 #error NOCXX14 195 #endif 196 int main() {}") 197 check_cxx_source_compiles("${CXXSTD_TEST_SOURCE}" CXX14_BUILTIN) 198 if (NOT CXX14_BUILTIN) 199 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") 200 check_cxx_source_compiles("${CXXSTD_TEST_SOURCE}" CXX14_FLAG) 201 if (NOT CXX14_FLAG) 202 message (FATAL_ERROR "SeqAn requires C++14 since v2.2.0, but your compiler does not support it.") 203 return () 204 endif () 205 endif () 206endif () 207 208# ---------------------------------------------------------------------------- 209# Compile-specific settings and workarounds around missing CMake features. 210# ---------------------------------------------------------------------------- 211 212# GCC/CLANG/ICC 213if (COMPILER_GCC OR COMPILER_CLANG OR COMPILER_LINTEL) 214 # Tune warnings for GCC. 215 set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64) 216 217 # Determine GCC version. 218 EXEC_PROGRAM(${CMAKE_CXX_COMPILER} 219 ARGS --version 220 OUTPUT_VARIABLE __GCC_VERSION) 221 # Remove all but first line. 222 STRING(REGEX REPLACE "([^\n]+).*" "\\1" __GCC_VERSION ${__GCC_VERSION}) 223 # Find out version (3 or 2 components). 224 STRING(REGEX REPLACE ".*([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" 225 __GCC_VERSION ${__GCC_VERSION}) 226 STRING(REGEX REPLACE ".*([0-9])\\.([0-9]).*" "\\1\\20" 227 _GCC_VERSION ${__GCC_VERSION}) 228 229 # Force GCC to keep the frame pointer when debugging is enabled. This is 230 # mainly important for 64 bit but does not get into the way on 32 bit either 231 # at minimal performance impact. 232 if (CMAKE_BUILD_TYPE STREQUAL Debug) 233 set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer") 234 elseif (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) 235 set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_CXX_FLAGS_RELEASE} -g -fno-omit-frame-pointer") 236 endif () 237endif () 238 239# Windows Setup 240if (WIN32) 241 # Always set NOMINMAX such that <Windows.h> does not define min/max as 242 # macros. 243 set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} -DNOMINMAX) 244endif (WIN32) 245 246# Visual Studio Setup 247if (COMPILER_MSVC OR COMPILER_WINTEL) 248 # Enable intrinics (e.g. _interlockedIncrease) 249 # COMPILER_CLANG (clang/c2 3.7) can not handle the /EHsc and /Oi flag 250 set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} /EHsc /Oi) 251endif () 252 253# ---------------------------------------------------------------------------- 254# Search for directory seqan. 255# ---------------------------------------------------------------------------- 256 257option (SEQAN_USE_SEQAN_BUILD_SYSTEM "Whether or not to expect the SeqAn build system." OFF) 258 259if (SEQAN_USE_SEQAN_BUILD_SYSTEM) 260 # When using the SeqAn build system, we scan all entries in 261 # CMAKE_INCLUDE_PATH for a subdirectory seqan and add all paths to the 262 # variable SEQAN_INCLUDE_DIRS_MAIN. 263 set (_SEQAN_INCLUDE_DIRS "") 264 foreach (_SEQAN_BASEDIR ${CMAKE_INCLUDE_PATH}) 265 if (EXISTS ${_SEQAN_BASEDIR}/seqan) 266 get_filename_component(_SEQAN_BASEDIR "${_SEQAN_BASEDIR}" ABSOLUTE) 267 set(_SEQAN_INCLUDE_DIRS ${_SEQAN_INCLUDE_DIRS} ${_SEQAN_BASEDIR}) 268 endif (EXISTS ${_SEQAN_BASEDIR}/seqan) 269 endforeach (_SEQAN_BASEDIR ${CMAKE_INCLUDE_PATH}) 270 271 if (_SEQAN_INCLUDE_DIRS) 272 set(SEQAN_FOUND TRUE) 273 set(SEQAN_INCLUDE_DIRS_MAIN ${SEQAN_INCLUDE_DIRS_MAIN} ${_SEQAN_INCLUDE_DIRS}) 274 else (_SEQAN_INCLUDE_DIRS) 275 set(SEQAN_FOUND FALSE) 276 endif (_SEQAN_INCLUDE_DIRS) 277else (SEQAN_USE_SEQAN_BUILD_SYSTEM) 278 # When NOT using the SeqAn build system then we only look for one directory 279 # with subdirectory seqan and thus only one library. 280 find_path(_SEQAN_BASEDIR "seqan" 281 PATHS ${SEQAN_INCLUDE_PATH} ENV SEQAN_INCLUDE_PATH 282 NO_DEFAULT_PATH) 283 284 if (NOT _SEQAN_BASEDIR) 285 find_path(_SEQAN_BASEDIR "seqan") 286 endif() 287 288 mark_as_advanced(_SEQAN_BASEDIR) 289 290 if (_SEQAN_BASEDIR) 291 set(SEQAN_FOUND TRUE) 292 set(SEQAN_INCLUDE_DIRS_MAIN ${SEQAN_INCLUDE_DIRS_MAIN} ${_SEQAN_BASEDIR}) 293 else () 294 set(SEQAN_FOUND FALSE) 295 endif () 296endif (SEQAN_USE_SEQAN_BUILD_SYSTEM) 297 298# ---------------------------------------------------------------------------- 299# Search for dependencies. 300# ---------------------------------------------------------------------------- 301 302# librt, libpthread -- implicit, on Linux only 303 304if ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR (${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") OR (${CMAKE_SYSTEM_NAME} STREQUAL "GNU")) 305 set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} rt) 306endif () 307 308# some OSes don't link pthread fully when building statically so we explicitly include whole archive 309if (UNIX AND NOT APPLE) 310 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive") 311endif () 312 313if ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") OR (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")) 314 set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-D_GLIBCXX_USE_C99=1") 315endif () 316 317# libexecinfo -- implicit 318 319check_include_file_cxx(execinfo.h _SEQAN_HAVE_EXECINFO) 320mark_as_advanced(_SEQAN_HAVE_EXECINFO) 321if (_SEQAN_HAVE_EXECINFO) 322 set(SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-DSEQAN_HAS_EXECINFO=1") 323 if ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") OR (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")) 324 set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} execinfo elf) 325 endif () 326else (_SEQAN_HAVE_EXECINFO) 327 set(SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-DSEQAN_HAS_EXECINFO=0") 328endif (_SEQAN_HAVE_EXECINFO) 329 330# ZLIB 331 332set (SEQAN_HAS_ZLIB FALSE) 333 334# should SeqAn search for dependency? 335list(FIND SEQAN_FIND_DEPENDENCIES "ZLIB" _SEQAN_FIND_ZLIB) 336mark_as_advanced(_SEQAN_FIND_ZLIB) 337if (NOT _SEQAN_FIND_ZLIB EQUAL -1) 338 find_package(ZLIB QUIET) 339endif () 340 341if (ZLIB_FOUND) 342 set (SEQAN_HAS_ZLIB TRUE) # deprecated: use ZLIB_FOUND instead 343 set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} ${ZLIB_LIBRARIES}) 344 set (SEQAN_INCLUDE_DIRS_DEPS ${SEQAN_INCLUDE_DIRS_DEPS} ${ZLIB_INCLUDE_DIRS}) 345 set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-DSEQAN_HAS_ZLIB=1") 346endif () 347 348# BZip2 349 350set (SEQAN_HAS_BZIP2 FALSE) 351 352# should SeqAn search for dependency? 353list(FIND SEQAN_FIND_DEPENDENCIES "BZip2" _SEQAN_FIND_BZIP2) 354mark_as_advanced(_SEQAN_FIND_BZIP2) 355if (NOT _SEQAN_FIND_BZIP2 EQUAL -1) 356 find_package(BZip2 QUIET) 357endif () 358 359if (NOT ZLIB_FOUND AND BZIP2_FOUND) 360 # NOTE(marehr): iostream_bzip2 uses the type `uInt`, which is defined by 361 # `zlib`. Therefore, `bzip2` will cause a ton of errors without `zlib`. 362 message(AUTHOR_WARNING "Disabling BZip2 [which was successfully found], " 363 "because ZLIB was not found. BZip2 is depending on ZLIB.") 364 unset(BZIP2_FOUND) 365 unset(SEQAN_HAS_BZIP2) 366endif () 367 368if (BZIP2_FOUND) 369 set (SEQAN_HAS_BZIP2 TRUE) # deprecated: use BZIP2_FOUND instead 370 set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} ${BZIP2_LIBRARIES}) 371 set (SEQAN_INCLUDE_DIRS_DEPS ${SEQAN_INCLUDE_DIRS_DEPS} ${BZIP2_INCLUDE_DIRS}) 372 set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-DSEQAN_HAS_BZIP2=1") 373endif () 374 375# OpenMP 376 377set (SEQAN_HAS_OPENMP FALSE) 378 379# should SeqAn search for dependency? 380list(FIND SEQAN_FIND_DEPENDENCIES "OpenMP" _SEQAN_FIND_OPENMP) 381mark_as_advanced(_SEQAN_FIND_OPENMP) 382if (NOT _SEQAN_FIND_OPENMP EQUAL -1) 383 find_package(OpenMP QUIET) 384endif () 385 386if (OPENMP_FOUND) 387 if (COMPILER_CLANG AND (_GCC_VERSION MATCHES "^37[0-9]$")) 388 message (STATUS "Because of a bug in clang-3.7.x OpenMP cannot be used (even if available). Please update your clang!") 389 set (OPENMP_FOUND FALSE) 390 elseif (COMPILER_CLANG AND STDLIB_VS AND (_GCC_VERSION MATCHES "^38[0-9]$")) 391 # The compiler also issues a warning 392 # clang.exe : warning : '-fopenmp=libomp': OpenMP is not supported 393 message (STATUS "The clang/c2 compiler on windows (version 3.7 and 3.8) doesn't support OpenMP!") 394 set (OPENMP_FOUND FALSE) 395 else () 396 set (SEQAN_HAS_OPENMP TRUE) # deprecated: use OPENMP_FOUND instead 397 set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} ${OpenMP_LIBRARIES}) 398 set (SEQAN_INCLUDE_DIRS_DEPS ${SEQAN_INCLUDE_DIRS_DEPS} ${OpenMP_INCLUDE_DIRS}) 399 set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-DSEQAN_HAS_OPENMP=1") 400 set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") 401 endif () 402endif () 403 404if (Boost_FOUND) 405 # Example warning: 406 # C:\seqan-deps\boost_1_53_0\boost/mpl/if.hpp(131,1): error : pasting formed 407 # 'BOOST_PP_TUPLE_ELEM_E_2(', an invalid preprocessing token 408 if (COMPILER_CLANG AND STDLIB_VS) 409 message (STATUS "The boost library (at least until 1.53) doesn't support the clang/c2 compiler on windows (version 3.7 and 3.8), yet!") 410 set (Boost_FOUND FALSE) 411 unset(Boost_INCLUDE_DIRS) 412 unset(Boost_LIBRARY_DIRS) 413 unset(Boost_LIBRARIES) 414 endif() 415endif() 416 417# Build SEQAN_INCLUDE_DIRS from SEQAN_INCLUDE_DIRS_MAIN and SEQAN_INCLUDE_DIRS_DEPS 418 419set (SEQAN_INCLUDE_DIRS ${SEQAN_INCLUDE_DIRS_MAIN} ${SEQAN_INCLUDE_DIRS_DEPS}) 420 421# ---------------------------------------------------------------------------- 422# Determine and set SEQAN_VERSION_* variables. 423# ---------------------------------------------------------------------------- 424 425if (NOT DEFINED SEQAN_VERSION_STRING) 426 427 # Scan all include dirs identified by the build system and 428 # check if there is a file version.h in a subdir seqan/ 429 # If exists store absolute path to file and break loop. 430 431 set (_SEQAN_VERSION_H "") 432 foreach(_INCLUDE_DIR ${SEQAN_INCLUDE_DIRS_MAIN}) 433 get_filename_component(_SEQAN_VERSION_H "${_INCLUDE_DIR}/seqan/version.h" ABSOLUTE) 434 if (EXISTS ${_SEQAN_VERSION_H}) 435 break() 436 endif() 437 endforeach() 438 439 set (_SEQAN_VERSION_IDS MAJOR MINOR PATCH PRE_RELEASE) 440 441 # If file wasn't found seqan version is set to 0.0.0 442 foreach (_ID ${_SEQAN_VERSION_IDS}) 443 set(_SEQAN_VERSION_${_ID} "0") 444 endforeach() 445 446 # Error log if version.h not found, otherwise read version from 447 # version.h and cache it. 448 if (NOT EXISTS "${_SEQAN_VERSION_H}") 449 message ("") 450 message ("ERROR: Could not determine SeqAn version.") 451 message ("Could not find file: ${_SEQAN_VERSION_H}") 452 else () 453 foreach (_ID ${_SEQAN_VERSION_IDS}) 454 file (STRINGS ${_SEQAN_VERSION_H} _VERSION_${_ID} REGEX ".*SEQAN_VERSION_${_ID}.*") 455 string (REGEX REPLACE ".*SEQAN_VERSION_${_ID}[ |\t]+([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_${_ID} ${_VERSION_${_ID}}) 456 endforeach () 457 endif () 458 459 # Check for pre release. 460 if (SEQAN_VERSION_PRE_RELEASE EQUAL 1) 461 set (_SEQAN_VERSION_DEVELOPMENT "TRUE") 462 else () 463 set (_SEQAN_VERSION_DEVELOPMENT "FALSE") 464 endif () 465 466 set (_SEQAN_VERSION_STRING "${_SEQAN_VERSION_MAJOR}.${_SEQAN_VERSION_MINOR}.${_SEQAN_VERSION_PATCH}") 467 if (_SEQAN_VERSION_DEVELOPMENT) 468 set (_SEQAN_VERSION_STRING "${_SEQAN_VERSION_STRING}_dev") 469 endif () 470 471 # Cache results. 472 set (SEQAN_VERSION_MAJOR "${_SEQAN_VERSION_MAJOR}" CACHE INTERNAL "SeqAn major version.") 473 set (SEQAN_VERSION_MINOR "${_SEQAN_VERSION_MINOR}" CACHE INTERNAL "SeqAn minor version.") 474 set (SEQAN_VERSION_PATCH "${_SEQAN_VERSION_PATCH}" CACHE INTERNAL "SeqAn patch version.") 475 set (SEQAN_VERSION_PRE_RELEASE "${_SEQAN_VERSION_PRE_RELEASE}" CACHE INTERNAL "Whether version is a pre-release version version.") 476 set (SEQAN_VERSION_STRING "${_SEQAN_VERSION_STRING}" CACHE INTERNAL "SeqAn version string.") 477endif (NOT DEFINED SEQAN_VERSION_STRING) 478 479# ---------------------------------------------------------------------------- 480# Print Variables 481# ---------------------------------------------------------------------------- 482 483if (NOT SeqAn_FIND_QUIETLY) 484 message (STATUS "Found Seqan: ${SEQAN_INCLUDE_DIRS_MAIN} (found version \"${SEQAN_VERSION_STRING}\")") 485endif () 486 487if (SEQAN_FIND_DEBUG) 488 message("Result for ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt") 489 message("") 490 message(" CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}") 491 message(" CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR}") 492 message(" CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH}") 493 message(" _SEQAN_BASEDIR ${_SEQAN_BASEDIR}") 494 message("") 495 message(" SEQAN_FOUND ${SEQAN_FOUND}") 496 message(" SEQAN_HAS_ZLIB ${SEQAN_HAS_ZLIB}") 497 message(" SEQAN_HAS_BZIP2 ${SEQAN_HAS_BZIP2}") 498 message(" SEQAN_HAS_OPENMP ${SEQAN_HAS_OPENMP}") 499 message("") 500 message(" SEQAN_INCLUDE_DIRS ${SEQAN_INCLUDE_DIRS}") 501 message(" SEQAN_INCLUDE_DIRS_DEPS ${SEQAN_INCLUDE_DIRS_DEPS}") 502 message(" SEQAN_INCLUDE_DIRS_MAIN ${SEQAN_INCLUDE_DIRS_MAIN}") 503 message(" SEQAN_LIBRARIES ${SEQAN_LIBRARIES}") 504 message(" SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS}") 505 message(" SEQAN_CXX_FLAGS ${SEQAN_CXX_FLAGS}") 506 message("") 507 message(" SEQAN_VERSION_STRING ${SEQAN_VERSION_STRING}") 508 message(" SEQAN_VERSION_MAJOR ${SEQAN_VERSION_MAJOR}") 509 message(" SEQAN_VERSION_MINORG ${SEQAN_VERSION_MINOR}") 510 message(" SEQAN_VERSION_PATCH ${SEQAN_VERSION_PATCH}") 511endif () 512