Commit f5c1b11b authored by Guillaume Pasero's avatar Guillaume Pasero

MRG: Synchronize with branch develop

parents 66f273ba 85a944e0
Pipeline #3132 passed with stages
in 88 minutes and 32 seconds
......@@ -136,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
......@@ -325,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,21 @@ 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>
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 +36,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 +71,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>
......@@ -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)
......
......@@ -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
# RESULT_VARIABLE Mercurial_hg_identify_result
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
execute_process(COMMAND ${Mercurial_HG_EXECUTABLE} status -m ${dir}
OUTPUT_VARIABLE ${prefix}_WC_STATUS
# ERROR_VARIABLE Mercurial_hg_status_error
# RESULT_VARIABLE Mercurial_hg_status_result
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
if(NOT ${Mercurial_hg_identify_result} EQUAL 0)
message(SEND_ERROR "Command \"${Mercurial_HG_EXECUTABLE} identify ${dir}\" failed with output:\n${Mercurial_hg_identify_error}")
else()
string(REGEX REPLACE "^(.*\n)?Mercurial Distributed SCM [(]version ([.0-9]+).*"
"\\2" Mercurial_VERSION_HG "${Mercurial_VERSION_HG}")
string(REGEX REPLACE "^(.*\n)?([0-9a-f]+).*"
"\\2" ${prefix}_WC_REVISION "${${prefix}_WC_IDENTIFY}")
endif()
# restore the previous LC_ALL
set(ENV{LC_ALL} ${_Mercurial_SAVED_LC_ALL})
endmacro()
endif()
if(NOT Mercurial_FOUND)
if(NOT Mercurial_FIND_QUIETLY)
message(STATUS "Mercurial was not found.")
else()
if(Mercurial_FIND_REQUIRED)
message(FATAL_ERROR "Mercurial was not found.")
endif()
endif()
endif()
......@@ -21,9 +21,9 @@
set(OPENCV_SEARCH_PATH)
if(OpenCV_DIR)
get_filename_component(OPENCV_SEARCH_PATH "${OpenCV_DIR}" PATH)
get_filename_component(OPENCV_SEARCH_PATH "${OpenCV_DIR}" REALPATH)
if(OPENCV_SEARCH_PATH)
get_filename_component(OPENCV_SEARCH_PATH "${OPENCV_SEARCH_PATH}" PATH)
get_filename_component(OPENCV_SEARCH_PATH "${OPENCV_SEARCH_PATH}" REALPATH)
endif()
if(OPENCV_SEARCH_PATH)
find_path(
......
# OpenThreads is a C++ based threading library. Its largest userbase
# seems to OpenSceneGraph so you might notice I accept OSGDIR as an
# environment path.
# I consider this part of the Findosg* suite used to find OpenSceneGraph
# components.
# Each component is separate and you must opt in to each module.
#
# Locate OpenThreads
# This module defines
# OPENTHREADS_LIBRARIES
# OPENTHREADS_FOUND, if false, do not try to link to OpenThreads
# OPENTHREADS_INCLUDE_DIRS, where to find the headers
# OPENTHREADS_VERSION - version string
# OPENTHREADS_VERSION_MAJOR - version major number
# OPENTHREADS_VERSION_MINOR - version minor number
# OPENTHREADS_VERSION_PATCH - version patch number
# OPENTHREADS_VERSION_NUMBER - version number ((major*100)+minor)*100+patch
#
# $OPENTHREADS_DIR is an environment variable that would
# correspond to the ./configure --prefix=$OPENTHREADS_DIR
# used in building osg.
#
# Created by Eric Wing.
# Modified by Guillaume Pasero.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
# Copyright 2009-2017 Centre National d'Etudes Spatiales (CNES)
#
# 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.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Header files are presumed to be included like
# #include <OpenThreads/Thread>
# To make it easier for one-step automated configuration/builds,
# we leverage environmental paths. This is preferable
# to the -DVAR=value switches because it insulates the
# users from changes we may make in this script.
# It also offers a little more flexibility than setting
# the CMAKE_*_PATH since we can target specific components.
# However, the default CMake behavior will search system paths
# before anything else. This is problematic in the cases
# where you have an older (stable) version installed, but
# are trying to build a newer version.
# CMake doesn't offer a nice way to globally control this behavior
# so we have to do a nasty "double FIND_" in this module.
# The first FIND disables the CMAKE_ search paths and only checks
# the environmental paths.
# If nothing is found, then the second find will search the
# standard install paths.
# Explicit -DVAR=value arguments should still be able to override everything.
# This whole file could be deleted. Find Packages OpenThreads can be used now
find_path(
OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
PATH_SUFFIXES include
)
mark_as_advanced(OPENTHREADS_INCLUDE_DIR)
if(EXISTS "${OPENTHREADS_INCLUDE_DIR}/OpenThreads/Version")
file(READ "${OPENTHREADS_INCLUDE_DIR}/OpenThreads/Version" _openthreads_version_CONTENTS)
string(REGEX REPLACE ".*# *define +OPENTHREADS_MAJOR_VERSION +([0-9]+).*" "\\1" OPENTHREADS_VERSION_MAJOR "${_openthreads_version_CONTENTS}")
string(REGEX REPLACE ".*# *define +OPENTHREADS_MINOR_VERSION +([0-9]+).*" "\\1" OPENTHREADS_VERSION_MINOR "${_openthreads_version_CONTENTS}")
string(REGEX REPLACE ".*# *define +OPENTHREADS_PATCH_VERSION +([0-9]+).*" "\\1" OPENTHREADS_VERSION_PATCH "${_openthreads_version_CONTENTS}")
set(OPENTHREADS_VERSION "${OPENTHREADS_VERSION_MAJOR}.${OPENTHREADS_VERSION_MINOR}.${OPENTHREADS_VERSION_PATCH}")
math(EXPR OPENTHREADS_VERSION_NUMBER
"((${OPENTHREADS_VERSION_MAJOR})*100+${OPENTHREADS_VERSION_MINOR})*100+${OPENTHREADS_VERSION_PATCH}")
else()
if(NOT OPENTHREADS_FIND_QUIETLY)
message(WARNING "OpenThreads/Version not found !")
endif()
endif()
find_library(OPENTHREADS_LIBRARY
NAMES OpenThreads OpenThreadsWin32
PATH_SUFFIXES lib64 lib
)
mark_as_advanced(OPENTHREADS_LIBRARY)
find_library(OPENTHREADS_LIBRARY_DEBUG
NAMES OpenThreadsd OpenThreadsWin32d
PATH_SUFFIXES lib64 lib
)
mark_as_advanced(OPENTHREADS_LIBRARY_DEBUG)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenThreads DEFAULT_MSG
OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)
if(OPENTHREADS_LIBRARY_DEBUG)
set(OPENTHREADS_LIBRARIES
optimized ${OPENTHREADS_LIBRARY}
debug ${OPENTHREADS_LIBRARY_DEBUG})
else()
set(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY})
endif()
set(OPENTHREADS_INCLUDE_DIRS ${OPENTHREADS_INCLUDE_DIR})
#
# 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.
#
macro(package_mingw)
cmake_parse_arguments(PACKAGE "" "PREFIX_DIR;ARCH;MXEROOT;WITH_OTBGUI" "SEARCHDIRS;PEFILES" ${ARGN} )