-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
147 lines (118 loc) · 5.66 KB
/
CMakeLists.txt
File metadata and controls
147 lines (118 loc) · 5.66 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
################################################################################
# TakeABreak: Breakpoint detection from raw unassembled NGS reads
# A tool from the GATB (Genome Assembly Tool Box)
# Copyright (C) 2014 INRIA
# Authors: C.Lemaitre, P.Peterlongo, E.Drezen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
################################################################################
project(TakeABreak)
cmake_minimum_required (VERSION 2.6)
################################################################################
# The version number.
################################################################################
# The default version number is the latest official build
SET (gatb-tool_VERSION_MAJOR 1)
SET (gatb-tool_VERSION_MINOR 1)
SET (gatb-tool_VERSION_PATCH 2)
# But, it is possible to define another release number during a local build
IF (DEFINED MAJOR)
SET (gatb-tool_VERSION_MAJOR ${MAJOR})
ENDIF()
IF (DEFINED MINOR)
SET (gatb-tool_VERSION_MINOR ${MINOR})
ENDIF()
IF (DEFINED PATCH)
SET (gatb-tool_VERSION_PATCH ${PATCH})
ENDIF()
set (gatb-tool-version ${gatb-tool_VERSION_MAJOR}.${gatb-tool_VERSION_MINOR}.${gatb-tool_VERSION_PATCH})
# However, continuous integration has priority over local compilation
IF (DEFINED JENKINS_TAG)
SET (gatb-tool-version ${JENKINS_TAG})
ENDIF()
################################################################################
# Define cmake modules directory
################################################################################
SET (GATB_CORE_HOME ${PROJECT_SOURCE_DIR}/thirdparty/gatb-core/gatb-core)
SET (CMAKE_MODULE_PATH ${GATB_CORE_HOME}/cmake)
################################################################################
# SUPPORTED KMER SIZES
################################################################################
# One can uncomment this line and set the wanted values
#set (KSIZE_LIST "32 64 96 128 160 192 224 256")
################################################################################
# THIRD PARTIES
################################################################################
# We don't want to install some GATB-CORE artifacts
#SET (GATB_CORE_EXCLUDE_TOOLS 1)
SET (GATB_CORE_EXCLUDE_TESTS 1)
SET (GATB_CORE_EXCLUDE_EXAMPLES 1)
# GATB CORE
include (GatbCore)
################################################################################
# TOOL
################################################################################
# We add the compilation options for the library
add_definitions (${gatb-core-flags})
# we add a new compilation variable
if (PRINTALL)
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPRINTALL" )
endif()
# We add the gatb-core include directory
include_directories (${gatb-core-includes})
# We add the path for extra libraries
link_directories (${gatb-core-extra-libraries-path})
set (PROGRAM_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include_directories (${PROGRAM_SOURCE_DIR})
file (GLOB_RECURSE ProjectFiles ${PROGRAM_SOURCE_DIR}/*.cpp)
add_executable(${PROJECT_NAME} ${ProjectFiles})
target_link_libraries(${PROJECT_NAME} ${gatb-core-libraries})
################################################################################
# PACKAGING
################################################################################
# We set the version number
SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "gatb-tool ${PROJECT_NAME}")
SET (CPACK_PACKAGE_VENDOR "Genscale team (INRIA)")
SET (CPACK_PACKAGE_VERSION_MAJOR "${gatb-tool_VERSION_MAJOR}")
SET (CPACK_PACKAGE_VERSION_MINOR "${gatb-tool_VERSION_MINOR}")
SET (CPACK_PACKAGE_VERSION_PATCH "${gatb-tool_VERSION_PATCH}")
SET (CPACK_PACKAGE_VERSION "${gatb-tool-version}")
# We set the kind of archive
SET (CPACK_GENERATOR "TGZ")
SET (CPACK_SOURCE_GENERATOR "TGZ")
# We ignore unwated files for the source archive
SET (CPACK_SOURCE_IGNORE_FILES
"^${PROJECT_SOURCE_DIR}/\\.git/" ;
"^${PROJECT_SOURCE_DIR}/\\.gitmodules" ;
"^${PROJECT_SOURCE_DIR}/\\.gitignore";
"^${PROJECT_SOURCE_DIR}/build/" ;
"^${GATB_CORE_HOME}/\\.cproject" ;
"^${GATB_CORE_HOME}/\\.git/" ;
"^${GATB_CORE_HOME}/\\.project" ;
"^${GATB_CORE_HOME}/\\.gitignore";
"^${PROJECT_SOURCE_DIR}/tests/scalability";
"^${PROJECT_SOURCE_DIR}/tests/.*igrida.sh";
"^${PROJECT_SOURCE_DIR}/tests/.*txt";
"^${PROJECT_SOURCE_DIR}/tests/.*cpp"
)
# We copy some files to the binary archive
INSTALL (TARGETS ${PROJECT_NAME} DESTINATION bin)
INSTALL (DIRECTORY "${PROJECT_SOURCE_DIR}/tests/data" DESTINATION .)
#INSTALL (DIRECTORY "${PROJECT_SOURCE_DIR}/tests/gold" DESTINATION tests)
#INSTALL (FILES tests/run-tests.sh tests/simple_test.sh DESTINATION tests)
INSTALL (FILES LICENSE README.md CHANGELOG.md DESTINATION bin/..)
# We include the "bin" tag into binary archive file name
set (CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}-bin-${CMAKE_SYSTEM_NAME})
include (CPack)