Commit 06dbd439 authored by Cédric Traizet's avatar Cédric Traizet

Merge branch 'develop' into 2004-mosaic_rgb

parents 8ceeec77 832879c3
Pipeline #3333 passed with stages
in 75 minutes and 47 seconds
......@@ -119,7 +119,10 @@ fast-build:
legal-check:
extends: .common
only: [merge_requests, develop, headers_check]
only:
- merge_requests
- develop
- /^release-[0-9]+\.[0-9]+$/
stage: precheck
image: $BUILD_IMAGE_REGISTRY/otb-alpine:3.7
variables:
......@@ -133,9 +136,13 @@ legal-check:
#------------------------- prepare & build jobs --------------------------------
debian-build:
extends: .common-build
image: $BUILD_IMAGE_REGISTRY/otb-debian-native:unstable
image: $BUILD_IMAGE_REGISTRY/otb-debian-native:testing
allow_failure: true
script:
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-unstable-gcc
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-testing-gcc
after_script:
- export CI_ALLOW_FAILURE=ON
- python3 -u CI/cdash_handler.py
dependencies: []
## Ubuntu superbuild
......@@ -322,6 +329,7 @@ ubuntu-xdk-report:
- sonar-scanner -Dproject.settings=sonar-project.properties
-Dsonar.host.url=https://sonar.orfeo-toolbox.org
-Dsonar.login=$SONAR_OTB_TOKEN
-Dsonar.projectKey=$CI_PROJECT_NAMESPACE-$CI_PROJECT_NAME
`test -z "$CI_COMMIT_TAG" || echo "-Dsonar.projectVersion=$CI_COMMIT_TAG"`
-Dsonar.branch.name=$CI_COMMIT_REF_NAME
......
......@@ -5,21 +5,23 @@ Antoine Regimbeau <antoine.regimbeau@c-s.fr>
Antoine Regimbeau <antoine.regimbeau@c-s.fr> aregimbe <antoine.regimbeau@c-s.fr>
Antoine Regimbeau <antoine.regimbeau@c-s.fr> aregimbeau <antoine.regimbeau@c-s.fr>
Arnaud Jaen <arnaud.jaen@c-s.fr>
Aurélie Emilien <aurelie.emilien@c-s.fr> Aurelie Emilien <aurelie.emilien@c-s.fr>
Aurélie Emilien <aurelie.emilien@c-s.fr>
Aurelien Bricier <aurelien.bricier@c-s.fr>
Aurélie Emilien <aurelie.emilien@c-s.fr>
Aurélie Emilien <aurelie.emilien@c-s.fr> Aurelie Emilien <aurelie.emilien@c-s.fr>
Bas Couwenberg <sebastic@debian.org>
Bas Couwenberg <sebastic@debian.org> Bas Couwenberg <sebastic@xs4all.nl>
Carole Amiot <carole.amiot@cnes.fr>
Carole Amiot <carole.amiot@cnes.fr> Carole Amiot <carole.amiot@thales-services.fr>
Caroline Ruffel <caroline.ruffel@c-s.fr>
Cédric Traizet <cedric.traizet@c-s.fr> Cedric <cedric.traizet@c-s.fr>
Cédric Traizet <cedric.traizet@c-s.fr> Cédric Traizet <traizetc@cesbio.cnes.fr>
Cédric Traizet <cedric.traizet@c-s.fr> ctraizet <cedric.traizet@c-s.fr>
Cédric Traizet <cedric.traizet@c-s.fr> Traizet Cedric <cedric.traizet@cesbio.cnes.fr>
Charles Peyrega <charles.peyrega@c-s.fr>
Chia Aik Song <crscas@nus.edu.sg>
Christophe Palmann <christophe.palmann@c-s.fr>
Conrad Bielski <conrad.bielski@yahoo.com>
Cyrille Valladeau <cyrille.valladeau@c-s.fr>
Cédric Traizet <cedric.traizet@c-s.fr> Cedric <cedric.traizet@c-s.fr>
Cédric Traizet <cedric.traizet@c-s.fr> Cédric Traizet <traizetc@cesbio.cnes.fr>
Cédric Traizet <cedric.traizet@c-s.fr> Traizet Cedric <cedric.traizet@cesbio.cnes.fr>
Cédric Traizet <cedric.traizet@c-s.fr> ctraizet <cedric.traizet@c-s.fr>
Daniel McInerney <daniel.o.mcinerney@gmail.com>
Daniel McInerney <daniel.o.mcinerney@gmail.com> dmci <daniel.o.mcinerney@gmail.com>
Daphne Deleflie <daphne.deleflie@thalesgroup.com>
......@@ -36,7 +38,8 @@ Grégoire Mercier <gregoire.mercier@telecom-bretagne.eu> Gregoire Mercier <gre
Guilhem Bonnefille <guilhem.bonnefille@c-s.fr>
Guillaume Borrut <guillaume.borrut@c-s.fr>
Guillaume Pasero <guillaume.pasero@c-s.fr>
janestar <janestar92@163.com>
Guillaume Pernot <guillaume.pernot@c-s.fr>
Guillaume Pernot <guillaume.pernot@c-s.fr> gpernot <guillaume.pernot@c-s.fr>
Jee Roen <jeroen.staab@posteo.de>
Jonathan Guinet <jonathan.guinet@c-s.fr>
Jordi Inglada <jordi.inglada@cesbio.eu>
......@@ -70,26 +73,27 @@ Rashad Kanavath <rashad.kanavath@c-s.fr> Rashad Kanavath <moham
Rashad Kanavath <rashad.kanavath@c-s.fr> Rashad Kanavath <rashad.kanavath.email.com>
Rashad Kanavath <rashad.kanavath@c-s.fr> Rashad Kanavath <rashad.kanvath@c-s.fr>
Rashad Kanavath <rashad.kanavath@c-s.fr> Rashad M <rashad.kanavath@c-s.fr>
Rémi Cresson <remi.cresson@irstea.fr> remicres <remi.cresson@teledetection.fr>
Rémi Cresson <remi.cresson@irstea.fr> Remi Cresson <remi.cresson@irstea.fr>
Rémi Cresson <remi.cresson@irstea.fr> remi cresson <remi.cresson@teledetection.fr>
Rémi Cresson <remi.cresson@irstea.fr> remi <remi.cresson@irstea.fr>
Rémi Cresson <remi.cresson@irstea.fr> Rémi <remi.cresson@teledetection.fr>
Romain Garrigues <romain.garrigues@c-s.fr>
Rosa Ruiloba <rosario.ruiloba@c-s.fr>
Sébastien Dinot <sebastien.dinot@c-s.fr>
Sébastien Dinot <sebastien.dinot@c-s.fr> Sebastien Dinot <sebastien.dinot@c-s.fr>
Sébastien Dinot <sebastien.dinot@c-s.fr> Achille Talon <atalon@dinot.net>
Rémi Cresson <remi.cresson@irstea.fr> Remi Cresson <remi.cresson@irstea.fr>
Rémi Cresson <remi.cresson@irstea.fr> Rémi <remi.cresson@teledetection.fr>
Rémi Cresson <remi.cresson@irstea.fr> remi <remi.cresson@irstea.fr>
Rémi Cresson <remi.cresson@irstea.fr> remi cresson <remi.cresson@teledetection.fr>
Rémi Cresson <remi.cresson@irstea.fr> remicres <remi.cresson@teledetection.fr>
Sebastien Harasse <sebastien.harasse@c-s.fr>
Stephane Albert <stephane.albert@c-s.fr>
Stephane Albert <stephane.albert@c-s.fr> Stephane Albert <salbert@dora.si.c-s.fr>
Stephane Albert <stephane.albert@c-s.fr> Stephane ALBERT <stephane.albert@c-s.fr>
Stephane Albert <stephane.albert@c-s.fr> Stephane Albert <salbert@dora.si.c-s.fr>
Sylvain Poulain <kikislater@users.noreply.github.com> Sylvain POULAIN <kikislater@users.noreply.github.com>
Sébastien Dinot <sebastien.dinot@c-s.fr>
Sébastien Dinot <sebastien.dinot@c-s.fr> Achille Talon <atalon@dinot.net>
Sébastien Dinot <sebastien.dinot@c-s.fr> Sebastien Dinot <sebastien.dinot@c-s.fr>
Thomas Feuvrier <thomas.feuvrier@c-s.fr>
Tishampati Dhar <devnull@localhost>
Victor Poughon <victor.poughon@cnes.fr>
Vincent Poulain <vincent.poulain@thalesgroup.com>
Yannick Tanguy <yannick.tanguy@cnes.fr> Yannick TANGUY <yannick.tanguy@cnes.fr>
Yannick Tanguy <yannick.tanguy@cnes.fr> Yannick TANGUY <tanguyy@visu01.sis.cnes.fr>
Yannick Tanguy <yannick.tanguy@cnes.fr> Yannick TANGUY <yannick.tanguy@cnes.fr>
Yannick Tanguy <yannick.tanguy@cnes.fr> ytanguy <yannick.tanguy@cnes.fr>
Yin Tiangang <crsyt@nus.edu.sg>
janestar <janestar92@163.com>
......@@ -237,7 +237,7 @@ class Handler:
K8S_SECRET_API_TOKEN -> Token for Gitlab API
CI_MERGE_REQUEST_REF_PATH -> Ref name to push the status (only for merge request pipeline)
CI_COMMIT_REF_NAME -> Ref name to push the status
They can be overriden by a full command line :
They can be overridden by a full command line :
cdash_handler.py commit_sha1 project_id project_directory token ref_name
"""
if __name__ == "__main__":
......@@ -246,6 +246,9 @@ if __name__ == "__main__":
if ( len(sys.argv) < 6 and len(sys.argv) > 1 ):
print("Usage : "+sys.argv[0]+" commit_sha1 project_id project_directory token ref_name")
sys.exit(1)
allow_failure = os.environ.get('CI_ALLOW_FAILURE', False)
if ( len(sys.argv) >= 6):
sha1 = sys.argv[1]
proj = sys.argv[2]
......@@ -286,6 +289,10 @@ if __name__ == "__main__":
sys.exit(0)
gitlab_url = "https://gitlab.orfeo-toolbox.org/api/v4/projects/"
gitlab_url += proj + "/statuses/" + sha1
if allow_failure:
state = 'success'
params = urllib.parse.urlencode({'name':'cdash:' + handler.site , 'state': state ,\
'target_url' : cdash_url , 'description' : error , 'ref' : refn })
gitlab_request = urllib.request.Request(gitlab_url)
......
......@@ -66,7 +66,7 @@ if __name__ == "__main__":
# are we in a merge_request pipeline ?
if 'CI_MERGE_REQUEST_IID' in env.keys():
if not CheckEnvParameters(['K8S_SECRET_API_TOKEN']):
print("WARNING: Make sure you have set a valid acces token for Gitlab API." \
print("WARNING: Make sure you have set a valid access token for Gitlab API." \
+ "The K8S_SECRET_API_TOKEN environment variable should be set in 'Settings -> CI/CD -> Variables'" \
+ "Without this token, some feature of the CI platform will be disabled.")
sys.exit(0)
......
......@@ -56,7 +56,7 @@ OTB_USE_SIFTFAST:BOOL=ON
OTB_USE_SPTW:BOOL=ON
OTB_USE_SSE_FLAGS:BOOL=ON")
# Usefull if MPI is ON : OTB_MPIEXEC_OPT:STRING=--allow-run-as-root
# Useful if MPI is ON : OTB_MPIEXEC_OPT:STRING=--allow-run-as-root
set (otb_wrap_option
"OTB_WRAP_PYTHON:BOOL=ON")
......@@ -70,7 +70,7 @@ if(XDK_PATH)
set(cmake_configure_option
"${cmake_configure_option}
CMAKE_PREFIX_PATH=${XDK_PATH}")
foreach(remote_module OTBTemporalGapFilling SertitObject DiapOTBModule)#otbGRM
foreach(remote_module OTBTemporalGapFilling SertitObject otbGRM DiapOTBModule)
set(cmake_configure_option
"${cmake_configure_option}
Module_${remote_module}:BOOL=ON")
......
......@@ -38,8 +38,8 @@ git shortlog -es HEAD | cut -f 2- \
curl -s ${GITLAB_PROJECT_URL}/raw/master/CI/contributors/known-contributors.txt \
| sort -u > ${KNOWN_CONTRIBUTORS}
diff ${KNOWN_CONTRIBUTORS} ${GIT_CONTRIBUTORS} > ${UNKNOWN_CONTRIBUTORS}
if [ "$?" -ne "0" ] ; then
diff ${KNOWN_CONTRIBUTORS} ${GIT_CONTRIBUTORS} | grep '^>' > ${UNKNOWN_CONTRIBUTORS}
if [ -s "${UNKNOWN_CONTRIBUTORS}" ] ; then
echo ""
echo "WARNING: ***************************************************************"
echo "WARNING: Unknown contributors found:"
......
......@@ -21,7 +21,7 @@
# Configuration options for debian-unstable-gcc
set(site_option
"opencv_INCLUDE_DIR:PATH=/usr/include
"OpenCV_DIR:PATH=/usr
OTB_USE_MPI:BOOL=OFF
OTB_USE_SHARK:BOOL=OFF
")
#
# Copyright (C) 2005-2019 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.
#
# Deploy a qt.conf file in the specified
# target build directory, as a pre-build step
macro( deploy_qt_conf TARGET_NAME )
add_custom_command(
TARGET ${TARGET_NAME}
PRE_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -D QT_TRANSLATIONS_DIR:PATH=${QT_TRANSLATIONS_DIR}
-D QT_PLUGINS_DIR:PATH=${QT_PLUGINS_DIR}
-D Monteverdi_SOURCE_DIR:PATH=${Monteverdi_SOURCE_DIR}
-D TARGET_DIR:PATH=$<TARGET_FILE_DIR:${TARGET_NAME}>
-P ${Monteverdi_SOURCE_DIR}/CMake/DeployQtConfScript.cmake
COMMENT "Deploying qt.conf in ${TARGET_NAME} build dir"
VERBATIM
)
endmacro()
#
# Copyright (C) 2005-2019 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.
#
configure_file(${Monteverdi_SOURCE_DIR}/CMake/qt.conf.in
${TARGET_DIR}/qt.conf
@ONLY)
\ No newline at end of file
#
# Copyright (C) 2005-2019 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 the AntiGrain Geometry graphical toolkit header files
#
# AGG_FOUND - True if AGG found.
# AGG_INCLUDE_DIRS - where to find agg_pixfmt_rgba.h, etc.
#
if( AGG_INCLUDE_DIR )
# Already in cache, be silent
set( AGG_FIND_QUIETLY TRUE )
endif()
find_path( AGG_INCLUDE_DIR agg_pixfmt_rgba.h
PATH_SUFFIXES agg2
)
# handle the QUIETLY and REQUIRED arguments and set AGG_FOUND to TRUE if
# all listed variables are TRUE
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( Agg DEFAULT_MSG AGG_INCLUDE_DIR )
mark_as_advanced( AGG_INCLUDE_DIR )
if(AGG_FOUND)
set(AGG_INCLUDE_DIRS ${AGG_INCLUDE_DIR})
else()
set(AGG_INCLUDE_DIRS)
endif()
# File from https://github.com/progschj/OpenGL-Examples/
#
# ----------------------------------------------------------------------------
# Copyright (c) 2012-2013 Jakob Progsch
# Released under ZLib license:
#
# This software is provided 'as-is', without any express or implied warranty.
# In no event will the authors be held liable for any damages arising from the
# use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you must not
# claim that you wrote the original software. If you use this software in
# a product, an acknowledgment in the product documentation would be
# appreciated but is not required.
#
# 2. Altered source versions must be plainly marked as such, and must not be
# misrepresented as being the original software.
#
# 3. This notice may not be removed or altered from any source distribution.
# ----------------------------------------------------------------------------
#
# NOTE: This file was removed from OpenGL-Examples project on 2013-11-01:
# https://github.com/progschj/OpenGL-Examples/commit/a100ce1ec6f5f6acf6ba3a3279cd3b3b91775b20
#
# Try to find GLEW library and include path.
# Once done this will define
#rewritten for OTB by Rashad Kanavath
#
# GLEW_FOUND
# GLEW_INCLUDE_PATH
# GLEW_LIBRARY
#
# This whole file could be deleted. Find Packages GLEW can be used now
find_path(
GLEW_INCLUDE_DIR GL/glew.h
DOC "The directory where GL/glew.h resides"
)
if(WIN32)
set(GLEW_LIB_NAMES glew GLEW glew32 glew32s)
else()
set(GLEW_LIB_NAMES libGLEW GLEW)
endif()
FIND_LIBRARY( GLEW_LIBRARY
NAMES ${GLEW_LIB_NAMES}
DOC "The GLEW library")
set(GLEW_FOUND FALSE)
if (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
set(GLEW_LIBRARIES ${GLEW_LIBRARY})
set(GLEW_FOUND TRUE)
endif()
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(GLEW
REQUIRED_VARS GLEW_LIBRARY GLEW_INCLUDE_DIR
VERSION_VAR GLEW_VERSION_STRING)
#
# Copyright (C) 2005-2019 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 ICUUC
# Find the native ICUUC includes and library
#
# ICUUC_FOUND - True if ICUUC found.
# ICUUC_INCLUDE_DIRS - where to find unicode/unistr.h, etc.
# ICUUC_LIBRARIES - List of libraries when using ICUUC.
#
if( ICUUC_INCLUDE_DIR )
# Already in cache, be silent
set( ICUUC_FIND_QUIETLY TRUE )
endif()
find_path( ICUUC_INCLUDE_DIR unicode/unistr.h )
find_library( ICUUC_LIBRARY
NAMES icuuc )
# handle the QUIETLY and REQUIRED arguments and set ICUUC_FOUND to TRUE if
# all listed variables are TRUE
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( ICUUC DEFAULT_MSG ICUUC_LIBRARY ICUUC_INCLUDE_DIR )
mark_as_advanced( ICUUC_INCLUDE_DIR ICUUC_LIBRARY )
if(ICUUC_FOUND)
set(ICUUC_INCLUDE_DIRS ${ICUUC_INCLUDE_DIR})
set(ICUUC_LIBRARIES ${ICUUC_LIBRARY})
else()
set(ICUUC_INCLUDE_DIRS)
set(ICUUC_LIBRARIES)
endif()
# - Finds the KWStyle utility
# This module looks for KWStyle. If KWStyle is found,
# the following variables are defined:
# KWSTYLE_FOUND - Set if KWStyle is found
# KWSTYLE_EXECUTABLE - Path to the KWStyle executable
# KWSTYLE_VERSION_STRING - A human-readable string containing the version of KWStyle
#=============================================================================
# Copyright 2008-2013 Kitware, Inc.
# Copyright 2013 Brian Helba
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
find_program(
KWSTYLE_EXECUTABLE
NAMES KWStyle
DOC "Path to the KWStyle executable"
)
mark_as_advanced(KWSTYLE_EXECUTABLE)
if(KWSTYLE_EXECUTABLE)
execute_process(
COMMAND ${KWSTYLE_EXECUTABLE} -version
OUTPUT_VARIABLE KWSTYLE_VERSION_STRING
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(KWSTYLE_VERSION_STRING)
# string(REPLACE ..) fails if the input is an empty string
string(REPLACE
"Version: "
""
KWSTYLE_VERSION_STRING
${KWSTYLE_VERSION_STRING}
)
else(KWSTYLE_VERSION_STRING)
# CMake's find_package_handle_standard_args has a bug where the
# version empty string ("") is always acceptable
set(KWSTYLE_VERSION_STRING "?")
endif(KWSTYLE_VERSION_STRING)
endif(KWSTYLE_EXECUTABLE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
KWStyle
REQUIRED_VARS KWSTYLE_EXECUTABLE
VERSION_VAR KWSTYLE_VERSION_STRING
)
#
# Copyright (C) 2005-2019 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 LTDL
# Find the native LTDL includes and library
#
# LTDL_FOUND - True if LTDL found.
# LTDL_INCLUDE_DIRS - where to find ltdl.h, etc.
# LTDL_LIBRARIES - List of libraries when using LTDL.
#
if( LTDL_INCLUDE_DIR )
# Already in cache, be silent
set( LTDL_FIND_QUIETLY TRUE )
endif()
find_path( LTDL_INCLUDE_DIR ltdl.h )
find_library( LTDL_LIBRARY
NAMES ltdl )
# handle the QUIETLY and REQUIRED arguments and set LTDL_FOUND to TRUE if
# all listed variables are TRUE
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( LTDL DEFAULT_MSG LTDL_LIBRARY LTDL_INCLUDE_DIR )
mark_as_advanced( LTDL_INCLUDE_DIR LTDL_LIBRARY )
if(LTDL_FOUND)
set(LTDL_INCLUDE_DIRS ${LTDL_INCLUDE_DIR})
set(LTDL_LIBRARIES ${LTDL_LIBRARY})
else()
set(LTDL_INCLUDE_DIRS)
set(LTDL_LIBRARIES)
endif()
#
# Copyright (C) 2005-2019 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.
#
# - Extract information from a mercurial working copy
# Example usage:
# find_package(Mercurial)
# if(Mercurial_FOUND)
# Mercurial_WC_IDENTIFY(${PROJECT_SOURCE_DIR} Project)
# message("Current revision is ${Project_WC_REVISION}")
# message("Mercurial version is ${Mercurial_VERSION_HG}")
# endif()
# This file can be deleted as we no longer use mercurial
set(Mercurial_FOUND FALSE)
set(Mercurial_HG_FOUND FALSE)
find_program(Mercurial_HG_EXECUTABLE hg
DOC "mercurial command line client")
mark_as_advanced(Mercurial_HG_EXECUTABLE)
if(Mercurial_HG_EXECUTABLE)
set(Mercurial_HG_FOUND TRUE)
set(Mercurial_FOUND TRUE)
macro(Mercurial_WC_IDENTIFY dir prefix)
# the subversion commands should be executed with the C locale, otherwise
# the message (which are parsed) may be translated, Alex
set(_Mercurial_SAVED_LC_ALL "$ENV{LC_ALL}")
set(ENV{LC_ALL} C)
execute_process(COMMAND ${Mercurial_HG_EXECUTABLE} version
WORKING_DIRECTORY ${dir}
OUTPUT_VARIABLE Mercurial_VERSION_HG
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
execute_process(COMMAND ${Mercurial_HG_EXECUTABLE} identify ${dir}
OUTPUT_VARIABLE ${prefix}_WC_IDENTIFY
# ERROR_VARIABLE Mercurial_hg_identify_error