Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 227 lines (193 sloc) 5.519 kB
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
1 # CMakeLists.txt root folder for BIOLIB (see http://biolib.open-bio.org/)
2 #
3 # Build everything:
4 #
5 # cmake .
6 #
7 # Conditionals:
8 #
9 # Build the libraries without language interfaces:
10 #
b678d7b @pjotrp Introduce subset builds - e.g.
authored
11 # cmake -DBUILD_LIBS:BOOLEAN=TRUE .
12 # cmake -DBUILD_DOCS:BOOLEAN=TRUE .
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
13 #
14 # Build the Ruby/Python/Perl interface and libraries:
15 #
b678d7b @pjotrp Introduce subset builds - e.g.
authored
16 # cmake -DBUILD_RUBY:BOOLEAN=TRUE .
17 # cmake -DBUILD_PYTHON:BOOLEAN=TRUE .
18 # cmake -DBUILD_PERL:BOOLEAN=TRUE .
19 #
d9ae700 @pjotrp Fix for dynamic library linking - now core tests pass
authored
20 # each of these will include BUILD_LIBS
21 #
4cfe6d2 @pjotrp Adding R/QTL support
authored
22 # To build specific libraries, for example
b678d7b @pjotrp Introduce subset builds - e.g.
authored
23 #
24 # cmake -DSTADEN_LIB:BOOLEAN=TRUE
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
25 # cmake -DEMBOSS_LIB:BOOLEAN=TRUE
4cfe6d2 @pjotrp Adding R/QTL support
authored
26 # cmake -DRQTL_LIB:BOOLEAN=TRUE
27 #
bf1eb5a @pjotrp Build biolib_R library on demand
authored
28 # Combine with BUILD_RUBY (etc.) to build just one library type.
29 #
4cfe6d2 @pjotrp Adding R/QTL support
authored
30 # See ./INSTALL for more information
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
31
32 cmake_minimum_required(VERSION 2.6)
33
34 project (BIOLIB)
35
70f006a @pjotrp Adding unit tests and doctests to CMake for R/qtl
authored
36 ENABLE_TESTING()
37
3e6a3ff @pjotrp Fine graining the test system
authored
38 # Testing:
39 #
ad41d0a @pjotrp Fixed differentiated tests. Now we can do:
authored
40 # quicktest: Run fast 'integration' tests
41 # unittest: Run unit testing
42 # doctest: Run doctest testing
43 # regressiontest: Run all regression tests
44 # test: Run all tests
3e6a3ff @pjotrp Fine graining the test system
authored
45 #
ad41d0a @pjotrp Fixed differentiated tests. Now we can do:
authored
46 # So:
70f006a @pjotrp Adding unit tests and doctests to CMake for R/qtl
authored
47 #
ad41d0a @pjotrp Fixed differentiated tests. Now we can do:
authored
48 # make unittest
49 # make doctest
50 # etc.
70f006a @pjotrp Adding unit tests and doctests to CMake for R/qtl
authored
51 #
52 #
ad41d0a @pjotrp Fixed differentiated tests. Now we can do:
authored
53 ADD_CUSTOM_TARGET(regressiontest COMMAND ctest -R TestRegression)
54 ADD_CUSTOM_TARGET(unittest COMMAND ctest -R TestUnit)
55 ADD_CUSTOM_TARGET(doctest COMMAND ctest -R TestDoc)
56 ADD_CUSTOM_TARGET(testall COMMAND ctest)
57 ADD_CUSTOM_TARGET(quicktest COMMAND ctest -E "TestRegression\\|TestUnit\\|Slow\\|TestDoc")
3e6a3ff @pjotrp Fine graining the test system
authored
58
7df7c99 @pjotrp Moving cmake modules into cmake-support
authored
59 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/tools/cmake-support/modules/")
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
60 message("CMake modules: ${CMAKE_MODULE_PATH}")
9485fc7 @pjotrp Moving to cmake-support
authored
61
62 FIND_PACKAGE(GitSubmodule)
63
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
64 include(CheckIncludeFiles)
65
66 message("Building biolib:")
67
596d412 @pjotrp Fixed example test for Perl (on OSX)
authored
68 if(BUILD_ALL)
69 set(BUILD_RUBY TRUE)
70 set(BUILD_PERL TRUE)
5d10c83 @pjotrp Adding Python support
authored
71 set(BUILD_PYTHON TRUE)
596d412 @pjotrp Fixed example test for Perl (on OSX)
authored
72 endif(BUILD_ALL)
73
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
74 if(BUILD_RUBY)
75 message(" Ruby interface")
76 set(BUILD_LIBS TRUE)
77 endif(BUILD_RUBY)
5d10c83 @pjotrp Adding Python support
authored
78
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
79 if(BUILD_PYTHON)
80 message(" Python interface")
81 set(BUILD_LIBS TRUE)
82 endif(BUILD_PYTHON)
5d10c83 @pjotrp Adding Python support
authored
83
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
84 if(BUILD_PERL)
85 message(" Perl interface")
86 set(BUILD_LIBS TRUE)
87 endif(BUILD_PERL)
88
89 if(NOT BUILD_DOCS)
90 if(NOT BUILD_LIBS)
91 set(BUILD_LIBS TRUE)
92 message(" Building libraries only")
93 set(BUILD_RUBY TRUE)
94 message(" Ruby interface")
95 # set(BUILD_PYTHON TRUE)
96 # set(BUILD_PERL TRUE)
97 endif(NOT BUILD_LIBS)
98 endif(NOT BUILD_DOCS)
99
dbb074e @pjotrp CMakeLists.txt: Changed default build
authored
100 # For release 1.0 the following modules are default:
617eeb1 @pjotrp s/BLD_BIOLIB/BLD_BIOLIB_CORE/
authored
101 set(BLD_BIOLIB_CORE TRUE)
e972001 @pjotrp rc1: Default packages to build
authored
102 set(BLD_BIOLIB_R TRUE)
ebc67c3 @pjotrp Fixes for affyio build
authored
103 set(BLD_AFFYIO TRUE)
e972001 @pjotrp rc1: Default packages to build
authored
104 set(BLD_STADEN TRUE)
105 set(BLD_EMBOSS TRUE)
106 set(BLD_EXAMPLE TRUE)
dbb074e @pjotrp CMakeLists.txt: Changed default build
authored
107
108 # These modules are optional
e972001 @pjotrp rc1: Default packages to build
authored
109 set(BLD_RQTL FALSE)
110 set(BLD_LIBSEQUENCE FALSE)
dbb074e @pjotrp CMakeLists.txt: Changed default build
authored
111
112 IF(NOT CYGWIN)
70f006a @pjotrp Adding unit tests and doctests to CMake for R/qtl
authored
113 set(BLD_AFFYIO TRUE) # still problem finding Rlib
dbb074e @pjotrp CMakeLists.txt: Changed default build
authored
114 ENDIF()
b678d7b @pjotrp Introduce subset builds - e.g.
authored
115
27695b2 @pjotrp Honor EXAMPLE and AFFYIO switches for cmake
authored
116 if (EXAMPLE_LIB)
117 set(BLD_STADEN FALSE)
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
118 set(BLD_EMBOSS FALSE)
4cfe6d2 @pjotrp Adding R/QTL support
authored
119 set(BLD_RQTL FALSE)
27695b2 @pjotrp Honor EXAMPLE and AFFYIO switches for cmake
authored
120 set(BLD_AFFYIO FALSE)
121 set(BLD_EXAMPLE TRUE)
617eeb1 @pjotrp s/BLD_BIOLIB/BLD_BIOLIB_CORE/
authored
122 set(BLD_BIOLIB_CORE FALSE)
3498264 @pjotrp Staden_io_lib: functioning build of latest io_lib
authored
123 set(BLD_BIOLIB_R FALSE)
596d412 @pjotrp Fixed example test for Perl (on OSX)
authored
124 endif (EXAMPLE_LIB)
125
27695b2 @pjotrp Honor EXAMPLE and AFFYIO switches for cmake
authored
126 if (AFFYIO_LIB)
127 set(BLD_STADEN FALSE)
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
128 set(BLD_EMBOSS FALSE)
4cfe6d2 @pjotrp Adding R/QTL support
authored
129 set(BLD_RQTL FALSE)
27695b2 @pjotrp Honor EXAMPLE and AFFYIO switches for cmake
authored
130 set(BLD_AFFYIO TRUE)
131 set(BLD_EXAMPLE FALSE)
617eeb1 @pjotrp s/BLD_BIOLIB/BLD_BIOLIB_CORE/
authored
132 set(BLD_BIOLIB_CORE TRUE) # requires biolib error handler
dbb074e @pjotrp CMakeLists.txt: Changed default build
authored
133 set(BLD_BIOLIB_R TRUE) # R dependency for error messages
27695b2 @pjotrp Honor EXAMPLE and AFFYIO switches for cmake
authored
134 endif (AFFYIO_LIB)
596d412 @pjotrp Fixed example test for Perl (on OSX)
authored
135
b678d7b @pjotrp Introduce subset builds - e.g.
authored
136 if (STADEN_LIB)
137 set(BLD_STADEN TRUE)
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
138 set(BLD_EMBOSS FALSE)
4cfe6d2 @pjotrp Adding R/QTL support
authored
139 set(BLD_RQTL FALSE)
27695b2 @pjotrp Honor EXAMPLE and AFFYIO switches for cmake
authored
140 set(BLD_AFFYIO FALSE)
b678d7b @pjotrp Introduce subset builds - e.g.
authored
141 set(BLD_EXAMPLE FALSE)
617eeb1 @pjotrp s/BLD_BIOLIB/BLD_BIOLIB_CORE/
authored
142 set(BLD_BIOLIB_CORE FALSE)
3498264 @pjotrp Staden_io_lib: functioning build of latest io_lib
authored
143 set(BLD_BIOLIB_R FALSE)
b678d7b @pjotrp Introduce subset builds - e.g.
authored
144 endif (STADEN_LIB)
145
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
146 if (EMBOSS_LIB)
147 set(BLD_EMBOSS TRUE)
148 set(BLD_STADEN FALSE)
149 set(BLD_RQTL FALSE)
150 set(BLD_AFFYIO FALSE)
151 set(BLD_EXAMPLE FALSE)
152 set(BLD_BIOLIB FALSE)
3498264 @pjotrp Staden_io_lib: functioning build of latest io_lib
authored
153 set(BLD_BIOLIB_R FALSE)
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
154 endif (EMBOSS_LIB)
155
4cfe6d2 @pjotrp Adding R/QTL support
authored
156 if (RQTL_LIB)
157 set(BLD_RQTL TRUE)
617eeb1 @pjotrp s/BLD_BIOLIB/BLD_BIOLIB_CORE/
authored
158 set(BLD_BIOLIB_CORE TRUE)
159 set(BLD_BIOLIB_R TRUE)
4cfe6d2 @pjotrp Adding R/QTL support
authored
160 set(BLD_STADEN FALSE)
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
161 set(BLD_EMBOSS FALSE)
4cfe6d2 @pjotrp Adding R/QTL support
authored
162 set(BLD_AFFYIO FALSE)
e231939 @pjotrp Added example to r/qtl tests
authored
163 set(BLD_EXAMPLE TRUE) # contains typemap tests
b35599f @pjotrp Added Ruby mapping for R/QTL
authored
164 endif (RQTL_LIB)
27695b2 @pjotrp Honor EXAMPLE and AFFYIO switches for cmake
authored
165
9738b6f @pjotrp Building libsequence
authored
166 if (LIBSEQUENCE_LIB)
167 set(BLD_LIBSEQUENCE TRUE)
168 set(BLD_RQTL FALSE)
169 set(BLD_STADEN FALSE)
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
170 set(BLD_EMBOSS FALSE)
9738b6f @pjotrp Building libsequence
authored
171 set(BLD_AFFYIO FALSE)
172 set(BLD_EXAMPLE FALSE)
173 set(BLD_BIOLIB FALSE)
d1b44e0 @diavy 1. built libsequece dynamic library for General IO module of libs…
diavy authored
174 endif (LIBSEQUENCE_LIB)
9738b6f @pjotrp Building libsequence
authored
175
847bda6 @pjotrp Can make python example from configure
authored
176 if (EXAMPLE_LIB)
177 set(BLD_RQTL FALSE)
178 set(BLD_STADEN FALSE)
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
179 set(BLD_EMBOSS FALSE)
847bda6 @pjotrp Can make python example from configure
authored
180 set(BLD_AFFYIO FALSE)
181 set(BLD_EXAMPLE TRUE)
617eeb1 @pjotrp s/BLD_BIOLIB/BLD_BIOLIB_CORE/
authored
182 set(BLD_BIOLIB_CORE FALSE)
847bda6 @pjotrp Can make python example from configure
authored
183 endif (EXAMPLE_LIB)
184
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
185 message(" Biolib libraries")
e972001 @pjotrp rc1: Default packages to build
authored
186 message(STATUS "Install Biolib_R ${BLD_BIOLIB_R}")
b678d7b @pjotrp Introduce subset builds - e.g.
authored
187 message(STATUS "Install Affyio ${BLD_AFFYIO}")
188 message(STATUS "Install Staden ${BLD_STADEN}")
4ec419e @pjotrp Can build EMBOSS mapping from root
authored
189 message(STATUS "Install EMBOSS ${BLD_EMBOSS}")
4cfe6d2 @pjotrp Adding R/QTL support
authored
190 message(STATUS "Install RQTL ${BLD_RQTL}")
9738b6f @pjotrp Building libsequence
authored
191 message(STATUS "Install Libsequence ${BLD_LIBSEQUENCE}")
b678d7b @pjotrp Introduce subset builds - e.g.
authored
192 message(STATUS "Install Example ${BLD_EXAMPLE}")
193
29122d2 @pjotrp Use cmake-support
authored
194 FIND_PACKAGE(Map)
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
195
72e22a4 @pjotrp Ruby include path for affyio
authored
196 # SET(CMAKE_BUILD_TYPE Debug) Release is on by default
197 if(DEBUG)
198 SET(CMAKE_BUILD_TYPE Debug)
199 else(DEBUG)
200 SET(CMAKE_BUILD_TYPE Release)
201 endif(DEBUG)
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
202 SET(DEFAULT_BUILD_SHARED_LIBS ON)
203 SET(BUILD_SHARED_LIBS ${DEFAULT_BUILD_SHARED_LIBS} CACHE BOOL "Building shared or static libraries")
204
205 # Documentation
206 if (BUILD_DOCS)
7df7c99 @pjotrp Moving cmake modules into cmake-support
authored
207 INCLUDE (APIDoc)
4246c40 Initialization of new git repository. The SVN revision is in the *fro…
Pjotr authored
208 endif (BUILD_DOCS)
209
210 # Turn off chatty makefiles by default. To make them chatty again,
211 # call make with VERBOSE=1 like this:
212 #
213 # make VERBOSE=1
214
215 SET(CMAKE_VERBOSE_MAKEFILE OFF)
216
217 ############################################################
218 # Set default search directory prefixes for third party libraries.
219
220 SET(THIRD_PARTY_LIBRARY_PATH "" CACHE PATH "Default search path for third-party libraries")
221 SET(THIRD_PARTY_INCLUDE_PATH "" CACHE PATH "Default search path for third-party headers")
222
223 add_subdirectory (src)
224 include(src)
225
7df7c99 @pjotrp Moving cmake modules into cmake-support
authored
226 FIND_PACKAGE(SystemInfo)
Something went wrong with that request. Please try again.