Blame view

CMakeLists.txt 8.43 KB
fbe3c2bb   Benjamin Renard   First commit
1
2
3
cmake_minimum_required(VERSION 2.6)

PROJECT(AMDA-Kernel)
fbe3c2bb   Benjamin Renard   First commit
4
5

SET(CPACK_PACKAGE_VERSION_MAJOR "3")
189b3107   Benjamin Renard   Increments version
6
SET(CPACK_PACKAGE_VERSION_MINOR "7")
7d34f9c5   Benjamin Renard   New version
7
8
SET(CPACK_PACKAGE_VERSION_PATCH "3")
SET(CPACK_PACKAGE_VERSION_DATE "2024-10-02")
fbe3c2bb   Benjamin Renard   First commit
9
10
11
12
13

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/bin/)
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib/)
set(PLUGIN_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/plugin/)

a9ef3909   Benjamin Renard   Specific compilat...
14
15
16
17
18
19
20
21
22
23
find_program(LSB_RELEASE_EXEC lsb_release)
execute_process(COMMAND ${LSB_RELEASE_EXEC} -is
    OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
    OUTPUT_STRIP_TRAILING_WHITESPACE
)

if (${LSB_RELEASE_ID_SHORT} MATCHES "Fedora")
    set(OPTION_SUP "${OPTION_SUP} -I/usr/include/tirpc -Wno-deprecated-copy")
endif()

fbe3c2bb   Benjamin Renard   First commit
24
25
26
27
28
29
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OPTION_SUP} -std=c++0x -fPIC -Wall -Wextra -ggdb -DLINUX -Dlinux -D_REENTRANT -malign-double -pthread")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}  ${OPTION_SUP} -fPIC -Wall -ggdb -DLINUX  -fPIC -Dlinux -D_REENTRANT -malign-double -pthread")

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++0x -Wall -Wextra -fPIC -DLINUX -Dlinux -D_REENTRANT -malign-double -pthread -O3 -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG}  ${OPTION_SUP} -fPIC -Wall -DLINUX -Dlinux -D_REENTRANT -malign-double -pthread")

fbe3c2bb   Benjamin Renard   First commit
30
set(Boost_USE_MULTITHREADED ON)
fbe3c2bb   Benjamin Renard   First commit
31

7bde1dd3   Benjamin Renard   Remove hard coded...
32
33
34
# Check some environment variables
if (EXISTS "$ENV{AMDA_COTS_DIR}")
    message("AMDA_COTS_DIR exists")
96e26914   Benjamin Renard   Some fix in kerne...
35
36
37
    set(AMDA_COTS_DIR "$ENV{AMDA_COTS_DIR}")
    set(USERLOCAL_ROOT "$ENV{AMDA_COTS_DIR}/local")
    set(AMDA_TOOLS_DIR "$ENV{AMDA_COTS_DIR}/tools")
ab9d7e65   Benjamin Renard   Fix libraries loc...
38
39
    set(GCC_ROOT "$ENV{GCC_ROOT}")
    set(BOOST_ROOT "$ENV{BOOST_ROOT}")
96e26914   Benjamin Renard   Some fix in kerne...
40
    set(SONAR_ROOT "$ENV{AMDA_COTS_DIR}/tools/sonar")
fb64e17e   Benjamin Renard   Add script to run...
41
    set(FITNESSE_ROOT "$ENV{AMDA_COTS_DIR}/tools/FitNesse")
33ae4cbe   Benjamin Renard   Set SPICE_KERNELS...
42
    set(SPICE_KERNELS_DATA "$ENV{SPICE_KERNELS_DATA}")
7bde1dd3   Benjamin Renard   Remove hard coded...
43
44
45
else()
    message(FATAL_ERROR "AMDA_COTS_DIR NOT exists")
endif()
cfe8df50   Benjamin Renard   DD_Client is now ...
46

7bde1dd3   Benjamin Renard   Remove hard coded...
47
message("USERLOCAL_ROOT (AMDA COTS install directory) is defined as ${USERLOCAL_ROOT}")
96e26914   Benjamin Renard   Some fix in kerne...
48
message("GCC_ROOT (gcc install directory) is defined as ${GCC_ROOT}")
7bde1dd3   Benjamin Renard   Remove hard coded...
49
50
message("BOOST_ROOT (Boost install directory) is defined as ${BOOST_ROOT}")

6c8de11c   Benjamin Renard   Remove hard coded...
51
if(NOT DEFINED ENV{DDSERVER_HOST_NAME})
7bde1dd3   Benjamin Renard   Remove hard coded...
52
53
54
55
56
    message(FATAL_ERROR "Missing DDSERVER_HOST_NAME definition")
endif()

set(DDSERVER_HOST_NAME "$ENV{DDSERVER_HOST_NAME}")

6c8de11c   Benjamin Renard   Remove hard coded...
57
if(NOT DEFINED ENV{DDSERVER_PORT})
7bde1dd3   Benjamin Renard   Remove hard coded...
58
59
60
61
62
63
64
    message(FATAL_ERROR "Missing DDSERVER_PORT definition")
endif()

set(DDSERVER_PORT "$ENV{DDSERVER_PORT}")


#Find all packages
fbe3c2bb   Benjamin Renard   First commit
65
66
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")

7bde1dd3   Benjamin Renard   Remove hard coded...
67
68
find_package( Boost 1.51 REQUIRED COMPONENTS program_options regex system filesystem thread iostreams)
find_package(Threads REQUIRED)
e958d5cc   Benjamin Renard   Update PLPlot to ...
69
#find_package( Boost COMPONENTS thread system REQUIRED)
7bde1dd3   Benjamin Renard   Remove hard coded...
70
71
72
73
74
75
76
77
78
find_package(cURL REQUIRED)
find_package(Archive REQUIRED)
find_package(Log4Cxx REQUIRED)
find_package(LibXML2 REQUIRED)
find_package(PLplot REQUIRED)
find_package(CDF REQUIRED)
find_package(NetCDF REQUIRED)
find_package(DDClientCpp REQUIRED)
find_package(Geopack REQUIRED)
6308a1c0   Hacene SI HADJ MOHAND   compil presue
79
find_package(Maglib REQUIRED)
da266937   Erdogan Furkan   Correction of pla...
80
find_package(Eigen REQUIRED)
09b5a8e4   Erdogan Furkan   10038
81
find_package(InternalField REQUIRED)
9a4854f9   Erdogan Furkan   Implémentation de...
82
find_package(Con2020 REQUIRED)
3e353d23   Furkan   Process creadted ...
83
find_package(KT17 REQUIRED)
6ba9e9fd   Hacene SI HADJ MOHAND   connection ok
84
find_package(Cainlib REQUIRED)
7bde1dd3   Benjamin Renard   Remove hard coded...
85
86
find_package(CSlim)

7bde1dd3   Benjamin Renard   Remove hard coded...
87
88
89
90
91
92
93
get_filename_component(DDCLIENTLIB_DIR ${DDCLIENTLIBRARIES} PATH)

# Apply configuration
configure_file (
 "${CMAKE_SOURCE_DIR}/src/Common/AMDA-Kernel_Config.hh.in"
 "${CMAKE_SOURCE_DIR}/src/Common/AMDA-Kernel_Config.hh"
)
fbe3c2bb   Benjamin Renard   First commit
94

7bde1dd3   Benjamin Renard   Remove hard coded...
95
96
97
98
configure_file (
    "${CMAKE_SOURCE_DIR}/config/app/templates/spiceKernelConfig.xml.in"
    "${CMAKE_SOURCE_DIR}/config/app/spiceKernelConfig.xml"
)
cfe8df50   Benjamin Renard   DD_Client is now ...
99

7bde1dd3   Benjamin Renard   Remove hard coded...
100
101
102
103
104
105
106
107
108
foreach(environment debug release generate-paraminfo)
    configure_file (
        "${CMAKE_SOURCE_DIR}/config/app/templates/app.properties.${environment}.in"
        "${CMAKE_SOURCE_DIR}/app-${environment}/app.properties"
    )
    configure_file (
        "${CMAKE_SOURCE_DIR}/config/app/templates/DD.res.in"
        "${CMAKE_SOURCE_DIR}/app-${environment}/DD.res"
    )
3eb67c8c   Benjamin Renard   Copy amda.propert...
109
110
111
112
113
    configure_file(
        "${CMAKE_SOURCE_DIR}/config/app/amda.properties"
        "${CMAKE_SOURCE_DIR}/app-${environment}/amda.properties"
        COPYONLY
    )
7bde1dd3   Benjamin Renard   Remove hard coded...
114
115
endforeach()

96e26914   Benjamin Renard   Some fix in kerne...
116
117
118
119
120
configure_file (
    "${CMAKE_SOURCE_DIR}/script/templates/amda-kernel-env.in"
    "${CMAKE_SOURCE_DIR}/script/amda-kernel-env"
    @ONLY
)
7bde1dd3   Benjamin Renard   Remove hard coded...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

# Build AMDA Kernel
MESSAGE( STATUS "Build AMDA-Kernel Project" )

add_subdirectory(src/TimeUtil)
add_subdirectory(src/Common)
add_subdirectory(src/helpers)
add_subdirectory(src/Info)
add_subdirectory(src/Parameters)
add_subdirectory(src/XMLConfigurator)
add_subdirectory(src/XMLParameterConfigurator)
add_subdirectory(src/Plugins)
add_subdirectory(src/Main)
add_subdirectory(src/XMLRequest)
add_subdirectory(src/SpiceKernel)
add_subdirectory(src/amdaXMLRequestorTool)
add_subdirectory(src/amdaParameterGenerator)
bee4e403   Hacene SI HADJ MOHAND   tests ok
138
add_subdirectory(src/expressionParser)
7bde1dd3   Benjamin Renard   Remove hard coded...
139
add_subdirectory(src/amdaParameterInfo)
80111081   Benjamin Renard   Add executable am...
140
add_subdirectory(src/amdaGetErrorMsg)
7bde1dd3   Benjamin Renard   Remove hard coded...
141
142
143
144
145
146
147
148
149
add_subdirectory(src/PostProcessing)
add_subdirectory(src/ParamOutputImpl/Download)
add_subdirectory(src/ParamOutputImpl/IntervalTrue)
add_subdirectory(src/ParamOutputImpl/DataMining)
add_subdirectory(src/ParamOutputImpl/Plot)
add_subdirectory(src/ParamOutputImpl/Statistic)
add_subdirectory(src/TimeTableCatalog)
add_subdirectory(src/TTOperations)
add_subdirectory(src/TTConversion)
95e26447   Erdogan Furkan   Executable used t...
150
add_subdirectory(src/colorMapGen)
7bde1dd3   Benjamin Renard   Remove hard coded...
151
152
add_subdirectory(src/ParamGetImpl/DDServerInterface)
add_subdirectory(src/ParamGetImpl/LocalFileInterface)
895c3576   Benjamin Renard   ConstantInterface...
153
add_subdirectory(src/ParamGetImpl/ConstantInterface)
7bde1dd3   Benjamin Renard   Remove hard coded...
154
155
add_subdirectory(src/InternLib)
add_subdirectory(src/ExternLib/Deriv)
7bde1dd3   Benjamin Renard   Remove hard coded...
156
157
158
159
160
161
162
163
164
165
166
167
add_subdirectory(src/ExternLib/Morschhauser)
add_subdirectory(src/ExternLib/Ram_Presure)
add_subdirectory(src/ExternLib/TimeShifted)
add_subdirectory(src/ExternLib/GetClbInfo)
add_subdirectory(src/ExternLib/GetClbInfoByIndex)
add_subdirectory(src/ExternLib/GetMavenStaticEnergy)
add_subdirectory(src/ExternLib/GetJunoJediEnergy)
add_subdirectory(src/ExternLib/EnergyBounds)
add_subdirectory(src/ExternLib/Boxcar)
add_subdirectory(src/ExternLib/SlidingAverage)
add_subdirectory(src/ExternLib/Merge)
add_subdirectory(src/ExternLib/els_calculate)
6308a1c0   Hacene SI HADJ MOHAND   compil presue
168
add_subdirectory(src/ExternLib/Maglib)
a1ab0552   Hacene SI HADJ MOHAND   plugin added
169
add_subdirectory(src/ExternLib/Cain)
7bde1dd3   Benjamin Renard   Remove hard coded...
170
171
add_subdirectory(src/ExternLib/mexvex_els_decode)
add_subdirectory(src/ExternLib/mexvex_els_calculate)
4ff6e5e9   Elena.Budnik   mexvex_els_calcul...
172
add_subdirectory(src/ExternLib/mexvex_els_calculate_sum)
4ff9a3bd   Elena.Budnik   MEX IMA plugin
173
174
add_subdirectory(src/ExternLib/mex_imah_calculate)
add_subdirectory(src/ExternLib/mex_imao_calculate)
7bde1dd3   Benjamin Renard   Remove hard coded...
175
176
177
add_subdirectory(src/ExternLib/PlotCurves)
add_subdirectory(src/ExternLib/StatisticProcesses)
add_subdirectory(src/ExternLib/FramesTransformation)
7a7cbef3   Hacene SI HADJ MOHAND   jupiter cmakelists
178
add_subdirectory(src/ExternLib/Jupiter_JRM09_CAN_81)
7bde1dd3   Benjamin Renard   Remove hard coded...
179
add_subdirectory(src/ExternLib/sum_into_table_range)
09ec73e7   Benjamin Renard   Add process sum_i...
180
add_subdirectory(src/ExternLib/sum_into_table_indexes)
7bde1dd3   Benjamin Renard   Remove hard coded...
181
182
add_subdirectory(src/ExternLib/EISCATDataFilter)
add_subdirectory(src/ExternLib/Tsyganenko96)
45fb3489   Hacene SI HADJ MOHAND   plugin
183
add_subdirectory(src/ExternLib/Shue)
74a11471   Benjamin Renard   Add min, max, var...
184
185
186
add_subdirectory(src/ExternLib/StatisticFunctions)
add_subdirectory(src/ExternLib/Fix)
add_subdirectory(src/ExternLib/Ceil)
4200776e   Erdogan Furkan   #11537 - Done.
187
add_subdirectory(src/ExternLib/IsNaN)
74a11471   Benjamin Renard   Add min, max, var...
188
189
add_subdirectory(src/ExternLib/Floor)
add_subdirectory(src/ExternLib/Sign)
40f1fe40   Benjamin Renard   Define a simple p...
190
add_subdirectory(src/ExternLib/ttcat_to_param)
5d85642a   Benjamin Renard   Add vector functi...
191
add_subdirectory(src/ExternLib/vector_)
22cbc642   Hacene SI HADJ MOHAND   adding plugin to ...
192
add_subdirectory(src/ExternLib/DataFiltering)
b58d725b   Hacene SI HADJ MOHAND   adding plungin auto
193
add_subdirectory(src/ExternLib/Spectrum)
09b5a8e4   Erdogan Furkan   10038
194
add_subdirectory(src/ExternLib/InternalField)
3e353d23   Furkan   Process creadted ...
195
add_subdirectory(src/ExternLib/KT17)
3b7530a6   Erdogan Furkan   # 6598- Creation ...
196
add_subdirectory(src/ExternLib/Timestamp)
05101f8e   Benjamin Renard   Fix Tetrahedron l...
197
198
add_subdirectory(src/ExternLib/Tetrahedron/elongation)
add_subdirectory(src/ExternLib/Tetrahedron/planarity)
1692bd9c   Benjamin Renard   Add tetrahedron c...
199
add_subdirectory(src/ExternLib/Tetrahedron/characteristic)
ec108f70   Benjamin Renard   First version for...
200
add_subdirectory(src/ExternLib/gtl_lepb_calculate)
262ee6e6   Elena.Budnik   new function angl...
201
 
7bde1dd3   Benjamin Renard   Remove hard coded...
202
203
204
205
IF ( CSLIM_FOUND )
    add_subdirectory(test/DD_Client/CSlimFixtures)
    add_subdirectory(test/CSlimTestServer)
ENDIF ()
fbe3c2bb   Benjamin Renard   First commit
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
    
IF(CMAKE_COMPILER_IS_GNUCC)
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

SET(CMAKE_VERBOSE_MAKEFILE ON)

SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "AMDA-Kernel")
SET(CPACK_GENERATOR "STGZ;TGZ")
SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_PACKAGE_VENDOR "AKKA IS")
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
#SET(CPACK_STRIP_FILES "bin/MyExecutable")
#SET(CPACK_SOURCE_STRIP_FILES "")
SET(CPACK_PACKAGE_EXECUTABLES "roof" "FTP client")
INCLUDE(CPack)