Skip to content
Snippets Groups Projects
Commit ef41e413 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

Merge branch 'gsl_superbuild' into develop

parents 543df0d2 cd9a4969
No related branches found
No related tags found
No related merge requests found
......@@ -26,5 +26,6 @@ A more detailed description can be found on the project website:
http://tully.ups-tlse.fr/jordi/temporalgapfilling
"
GIT_REPOSITORY http://tully.ups-tlse.fr/jordi/temporalgapfilling.git
GIT_TAG 4180f28091fb10029860ada2dcf9c9526d3a55d2
# Commit on develop branch which includes patches for Windows support
GIT_TAG 4fc4a71acf7b9b051cda5a3b950de2cdb9d26287
)
#
# Copyright (C) 2005-2017 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.
#
project(OTBGSL)
set(OTBGSL_THIRD_PARTY 1)
set(OTBGSL_SYSTEM_INCLUDE_DIRS ${GSL_INCLUDE_DIR})
set(OTBGSL_LIBRARIES ${GSL_LIBRARY})
otb_module_impl()
#
# Copyright (C) 2005-2017 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.
#
find_package(GSL REQUIRED)
# On Windows system, if you will be using one of the dynamic libraries, add GSL_DLL to the list of predefined macros
if (BUILD_SHARED_LIBS)
if (WIN32)
add_definitions(-DGSL_DLL)
endif()
endif()
mark_as_advanced(GSL_INCLUDE_DIR)
mark_as_advanced(GSL_LIBRARY)
#
# Copyright (C) 2005-2017 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.
#
set(DOCUMENTATION "This module imports GSL to the build system. Note that when using the GLS
library you must comply with the GPL license.")
otb_module(OTBGSL
DEPENDS
TEST_DEPENDS
DESCRIPTION
"${DOCUMENTATION}"
)
otb_module_activation_option("Enable GSL dependent modules" OFF)
......@@ -99,7 +99,7 @@ int otbWrapperApplicationDocTest(int argc, char* argv[])
otb::Wrapper::DocExampleStructure::Pointer doc = app->GetDocExample();
if( doc->GetApplicationName() == "" )
{
std::cout<<"Error in doc example: no aaplication name found."<<std::endl;
std::cout<<"Error in doc example: no application name found."<<std::endl;
isOK = false;
}
if( doc->GetParameterList().size() == 0 )
......
......@@ -80,6 +80,8 @@ function(install_rule src_file)
continue()
elseif("${sfile_ABS_LOWER}" MATCHES "\\.settings$")
continue()
elseif("${sfile_ABS_LOWER}" MATCHES "-config$")
continue()
else()
if(UNIX)
#the last else() loop where we run a 'file' command to find file type and directory
......
#
# Copyright (C) 2005-2017 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.
#
INCLUDE_ONCE_MACRO(GSL)
SETUP_SUPERBUILD(GSL)
ExternalProject_Add(GSL
PREFIX GSL
URL "https://github.com/ampl/gsl/archive/v2.3.0.tar.gz"
DOWNLOAD_NAME gsl_v2.3.0.tar.gz
URL_MD5 7e0478f7c5e62696fef480b9a46f708c
BINARY_DIR ${GSL_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
DEPENDS ${GSL_DEPENDENCIES}
LOG_DOWNLOAD 1
LOG_CONFIGURE 1
LOG_BUILD 1
LOG_INSTALL 1
)
SUPERBUILD_UPDATE_CMAKE_VARIABLES(GSL FALSE)
......@@ -120,6 +120,13 @@ if(OTB_USE_QWT)
ADD_SUPERBUILD_CMAKE_VAR(OTB QWT_LIBRARY)
endif()
if(OTB_USE_GSL)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GSL)
ADD_SUPERBUILD_CMAKE_VAR(OTB GSL_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OTB GSL_LIBRARY)
endif()
ADD_SUPERBUILD_CMAKE_VAR(OTB GDAL_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OTB GDAL_LIBRARY)
......@@ -140,6 +147,13 @@ if(WITH_REMOTE_MODULES)
foreach(remote_module SertitObject Mosaic otbGRM OTBFFSforGMM)
list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
endforeach()
# Add CESBIO'S remote modules if OTB is compiled with GSL support (for now only TemporalGapFilling)
if(OTB_USE_GSL)
foreach(remote_module OTBTemporalGapFilling)
list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
endforeach()
endif()
else()
set(OTB_MODULES_CONFIG)
endif()
......@@ -191,6 +205,7 @@ ExternalProject_Add(OTB
-DOTB_USE_GLUT:BOOL=${OTB_USE_GLUT}
-DOTB_USE_QWT:BOOL=${OTB_USE_QWT}
-DOTB_USE_OPENMP:BOOL=${OTB_USE_OPENMP}
-DOTB_USE_GSL:BOOL=${OTB_USE_GSL}
-DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
-DOTB_WRAP_PYTHON3:BOOL=${OTB_WRAP_PYTHON3}
-DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
......
......@@ -291,6 +291,7 @@ option(USE_SYSTEM_SHARK "Use a system build of Shark" OFF)
option(USE_SYSTEM_HDF4 "Use a system build of HDF4" OFF)
option(USE_SYSTEM_HDF5 "Use a system build of HDF5" OFF)
option(USE_SYSTEM_NETCDF "Use a system build of NetCDF" OFF)
option(USE_SYSTEM_GSL "Use a system build of GSL" OFF)
# Call OTB
option(OTB_USE_6S "Enable module 6S in OTB" ON)
......@@ -311,7 +312,7 @@ option(OTB_USE_SIFTFAST "Enable module Siftfast in OTB" ON)
option(OTB_USE_OPENGL "Enable module OpenGL in OTB" ON)
option(OTB_USE_GLEW "Enable module GLEW in OTB" ON)
#Cannot activate GLUT on OSX. See manits issue #1194")
#Cannot activate GLUT on OSX. See Mantis issue #1194")
# do not activate GLFW by default on osx. see failing test
# https://dash.orfeo-toolbox.org/testDetails.php?test=59844554&build=287120
if(APPLE)
......@@ -324,6 +325,7 @@ endif()
option(OTB_USE_SHARK "Enable module Shark in OTB" ON)
option(OTB_USE_QWT "Enable module QWT in OTB" ON)
option(OTB_USE_GSL "Enable module GSL in OTB" ON)
# set OTB_DATA_ROOT to run test
find_path(OTB_DATA_ROOT README-OTB-Data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment