forked from orfeotoolbox/OTB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure_options.cmake
97 lines (84 loc) · 2.52 KB
/
configure_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
#
# Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This script is a prototype for the future CI, it may evolve rapidly in a near future
#This file set the following variable :
# * otb_build_project_option
# * otb_use_option
# * otb_wrap_option
# * CONFIGURE_OPTIONS
set (otb_build_project_option
"BUILD_COOKBOOK:BOOL=OFF
BUILD_EXAMPLES:BOOL=OFF
BUILD_SHARED_LIBS:BOOL=ON
BUILD_TESTING:BOOL=ON")
if(WIN32)
set(otb_build_project_option
"${otb_build_project_option}
CMAKE_C_COMPILER_LAUNCHER=buildcache
CMAKE_CXX_COMPILER_LAUNCHER=buildcache")
endif()
set (otb_qa_option
"CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON")
set (otb_use_option
"OTB_USE_6S:BOOL=ON
OTB_USE_CURL:BOOL=ON
OTB_USE_GSL:BOOL=ON
OTB_USE_LIBKML:BOOL=OFF
OTB_USE_SIFTFAST:BOOL=ON
OTB_USE_SSE_FLAGS:BOOL=ON")
set (otb_wrap_option
"OTB_WRAP_PYTHON:BOOL=ON")
set (cmake_configure_option
"CMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION}
CMAKE_INSTALL_PREFIX:PATH=${CTEST_INSTALL_DIRECTORY}")
# extra options for XDK builds
if(XDK_INSTALL_PATH)
set(cmake_configure_option
"${cmake_configure_option}
CMAKE_PREFIX_PATH=${XDK_INSTALL_PATH}")
foreach(remote_module OTBTemporalGapFilling SertitObject otbGRM S1TilingSupportApplications) #DiapOTBModule
set(cmake_configure_option
"${cmake_configure_option}
Module_${remote_module}:BOOL=ON")
endforeach()
endif()
if((CTEST_SITE) AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/${CTEST_SITE}.cmake")
# will set its output in 'site_option'
include("${CMAKE_CURRENT_LIST_DIR}/${CTEST_SITE}.cmake")
endif()
set(concat_options
"${otb_build_project_option}
${otb_use_option}
${otb_wrap_option}
${otb_data_option}
${cmake_configure_option}
${site_option}
")
if (QA)
set(concat_options
"${concat_options}
${otb_qa_option}
")
endif()
#Transform the previous string in list
string (REPLACE "\n" ";" otb_options ${concat_options})
foreach(item ${otb_options})
set( CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS}-D${item};")
endforeach(item)