-
Notifications
You must be signed in to change notification settings - Fork 20
/
CMakeLists.txt
87 lines (67 loc) · 3.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# ===========================================================================
# Lambda
# ===========================================================================
cmake_minimum_required (VERSION 3.4.0)
string(ASCII 27 Esc)
set(ColourBold "${Esc}[1m")
set(ColourReset "${Esc}[m")
set(ColourRed "${Esc}[31m")
message ("${ColourBold}Compiler Detection${ColourReset}")
project (lambda3 CXX)
# ----------------------------------------------------------------------------
# Make "Release" the default cmake build type
# ----------------------------------------------------------------------------
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo"
FORCE)
endif ()
# ----------------------------------------------------------------------------
# Options
# ----------------------------------------------------------------------------
option (LAMBDA_WITH_BIFM "Include codepaths for bidirectional indexes." OFF)
if (LAMBDA_WITH_BIFM)
add_definitions (-DLAMBDA_WITH_BIFM=1)
endif ()
# ----------------------------------------------------------------------------
# Begin of dependency detection
# ----------------------------------------------------------------------------
message ("\n${ColourBold}Dependency detection${ColourReset}")
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/submodules/seqan/include/seqan/version.h")
set (CMAKE_INCLUDE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/submodules/seqan/include
${CMAKE_INCLUDE_PATH})
set (CMAKE_PREFIX_PATH
${CMAKE_CURRENT_SOURCE_DIR}/submodules/seqan/util/cmake
${CMAKE_PREFIX_PATH})
set (CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/submodules/seqan/util/cmake
${CMAKE_MODULE_PATH})
message (STATUS "Found a local SeqAn library provided with the Lambda source code.")
message ( " This will be preferred over system global headers.")
endif ()
# CEREAL
if (EXISTS ${CMAKE_SOURCE_DIR}/submodules/cereal)
set(BUILD_SANDBOX OFF)
set(BUILD_DOC OFF)
set(BUILD_TESTS OFF)
set(SKIP_PERFORMANCE_COMPARISON ON)
set(CEREAL_INSTALL OFF)
add_subdirectory(submodules/cereal)
endif ()
# ----------------------------------------------------------------------------
# Add Lambda targets
# ----------------------------------------------------------------------------
add_subdirectory(src)
# ----------------------------------------------------------------------------
# Warn if cmake build type is not "Release"
# ----------------------------------------------------------------------------
if (NOT CMAKE_BUILD_TYPE STREQUAL Release)
message (STATUS "${ColourRed}CMAKE_BUILD_TYPE is not \"Release\", your binaries will be slow.${ColourReset}")
endif ()
# ----------------------------------------------------------------------------
# Add Tests
# ----------------------------------------------------------------------------
message ("\n${ColourBold}Setting up unit tests${ColourReset}")
enable_testing ()
add_subdirectory (test EXCLUDE_FROM_ALL)