-
Notifications
You must be signed in to change notification settings - Fork 71
/
Options.cmake
127 lines (113 loc) · 4.88 KB
/
Options.cmake
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
###########################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# Copyright (C) : 2009-2017
# European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# FRANCE
#
# Contact: [email protected]
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This software 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
# Use submodules
option(LIMA_BUILD_SUBMODULES "Build with submodules (vs prebuilt packages)?" ON)
if(UNIX)
# Spec-like shared memory
if(DEFINED ENV{COMPILE_SPS_IMAGE})
set(LIMA_ENABLE_SPS_IMAGE "$ENV{COMPILE_SPS_IMAGE}" CACHE BOOL "compile sps_image?" FORCE)
else()
option(LIMA_ENABLE_SPS_IMAGE "compile sps_image?" OFF)
endif()
# openGL real-time display
if(DEFINED ENV{COMPILE_GLDISPLAY})
set(LIMA_ENABLE_GLDISPLAY "$ENV{COMPILE_GLDISPLAY}" CACHE BOOL "compile gldisplay?" FORCE)
else()
option(LIMA_ENABLE_GLDISPLAY "compile sps_image?" OFF)
endif()
endif()
#--------------------------------------------------------------------------------
# Compile tests
#--------------------------------------------------------------------------------
option(LIMA_ENABLE_TESTS "compile test directories ?" OFF)
#--------------------------------------------------------------------------------
# Compile with trace (debug information)
#--------------------------------------------------------------------------------
option(LIMA_ENABLE_DEBUG "compile with trace ?" ON)
#--------------------------------------------------------------------------------
# libconfig
#--------------------------------------------------------------------------------
if(DEFINED ENV{LIMA_ENABLE_CONFIG})
set(LIMA_ENABLE_CONFIG "$ENV{LIMA_ENABLE_CONFIG}" CACHE BOOL "compile with libconfig code?" FORCE)
else()
option(LIMA_ENABLE_CONFIG "compile with libconfig?" OFF)
endif()
#--------------------------------------------------------------------------------
# Saving formats can be enabled from environment variables using config.inc file
#--------------------------------------------------------------------------------
if(UNIX)
# The formats have not been tested on windows
if(DEFINED ENV{LIMA_ENABLE_CBF})
set(LIMA_ENABLE_CBF "$ENV{LIMA_ENABLE_CBF}" CACHE BOOL "compile CBF saving code?" FORCE)
else()
option(LIMA_ENABLE_CBF "compile CBF saving code?" OFF)
endif()
if(DEFINED ENV{LIMA_ENABLE_FITS})
set(LIMA_ENABLE_FITS "$ENV{LIMA_ENABLE_FITS}" CACHE BOOL "compile FITS saving code?" FORCE)
else()
option(LIMA_ENABLE_FITS "compile FITS saving code?" OFF)
endif()
if(DEFINED ENV{LIMA_ENABLE_NXS})
set(LIMA_ENABLE_NXS "$ENV{LIMA_ENABLE_NXS}" CACHE BOOL "compile Nexus saving code?" FORCE)
else()
option(LIMA_ENABLE_NXS "compile Nexus saving code?" OFF)
endif()
endif()
if(DEFINED ENV{LIMA_ENABLE_TIFF})
set(LIMA_ENABLE_TIFF "$ENV{LIMA_ENABLE_TIFF}" CACHE BOOL "compile TIFF saving code?" FORCE)
else()
option(LIMA_ENABLE_TIFF "compile TIFF saving code?" OFF)
endif()
if(DEFINED ENV{LIMA_ENABLE_EDFLZ4})
set(LIMA_ENABLE_EDFLZ4 "$ENV{LIMA_ENABLE_EDFLZ4}" CACHE BOOL "compile EDF.LZ4 saving code?" FORCE)
else()
option(LIMA_ENABLE_EDFLZ4 "compile EDF.LZ4 saving code?" OFF)
endif()
if(DEFINED ENV{LIMA_ENABLE_EDFGZ})
set(LIMA_ENABLE_EDFGZ "$ENV{LIMA_ENABLE_EDFGZ}" CACHE BOOL "compile EDF.GZ saving code?" FORCE)
else()
option(LIMA_ENABLE_EDFGZ "compile EDF.GZ saving code?" OFF)
endif()
if(DEFINED ENV{LIMA_ENABLE_HDF5})
set(LIMA_ENABLE_HDF5 "$ENV{LIMA_ENABLE_HDF5}" CACHE BOOL "compile HDF5 saving code?" FORCE)
else()
option(LIMA_ENABLE_HDF5 "compile HDF5 saving code?" OFF)
endif()
if(DEFINED ENV{LIMA_ENABLE_HDF5_BS})
set(LIMA_ENABLE_HDF5_BS "$ENV{LIMA_ENABLE_HDF5_BS}" CACHE BOOL "compile HDF5/BS saving code?" FORCE)
else()
option(LIMA_ENABLE_HDF5_BS "compile HDF5/BS saving code?" OFF)
endif()
# Compile python wrapping code generated using SIP
IF(DEFINED ENV{LIMA_ENABLE_PYTHON})
set(LIMA_ENABLE_PYTHON "$ENV{LIMA_ENABLE_PYTHON}" CACHE BOOL "compile python modules?" FORCE)
else()
option(LIMA_ENABLE_PYTHON "compile python modules?" OFF)
endif()
# Python Tango server
IF(DEFINED ENV{LIMA_ENABLE_PYTANGO_SERVER})
set(LIMA_ENABLE_PYTANGO_SERVER "$ENV{LIMA_ENABLE_PYTANGO_SEVER}" CACHE BOOL "install python tango server?" FORCE)
else()
option(LIMA_ENABLE_PYTANGO_SERVER "install python tango server?" OFF)
endif()