# gtest.

include(ExternalProject)

ExternalProject_Add(gtest_ext
        SVN_REPOSITORY "http://googletest.googlecode.com/svn/tags/release-1.7.0"
        BINARY_DIR "${CMAKE_BINARY_DIR}/third-party/gtest-build"
        SOURCE_DIR "${CMAKE_BINARY_DIR}/third-party/gtest-src"
        CMAKE_ARGS "${gtest_cmake_args}"
        UPDATE_COMMAND ""
        INSTALL_COMMAND ""
        )

enable_testing()
include_directories("${CMAKE_BINARY_DIR}/third-party/gtest-src/include")
link_directories("${CMAKE_BINARY_DIR}/third-party/gtest-build")

function(cxx_test name sources)
    add_executable(${name} ${sources})
    target_link_libraries(${name} ${ARGN} gtest)
    add_dependencies(${name} gtest_ext)
    # Working directory: where the dlls are installed.
    add_test(NAME ${name}
             COMMAND ${name} "--gtest_break_on_failure")
endfunction()

# gtest.

include(ExternalProject)

ExternalProject_Add(gtest_ext
        SVN_REPOSITORY "http://googletest.googlecode.com/svn/tags/release-1.7.0"
        BINARY_DIR "${CMAKE_BINARY_DIR}/third-party/gtest-build"
        SOURCE_DIR "${CMAKE_BINARY_DIR}/third-party/gtest-src"
        CMAKE_ARGS "${gtest_cmake_args}"
        UPDATE_COMMAND ""
        INSTALL_COMMAND ""
        )

enable_testing()
link_directories("${CMAKE_BINARY_DIR}/third-party/gtest-build")

find_package(Threads)

function(cxx_test name sources)
    add_executable(${name} ${sources})
    target_link_libraries(${name} ${ARGN} gtest ${CMAKE_THREAD_LIBS_INIT})
    set_property(TARGET ${name} PROPERTY INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/third-party/gtest-src/include")
    add_dependencies(${name} gtest_ext)
    # Working directory: where the dlls are installed.
    add_test(NAME ${name}
             COMMAND ${name} "--gtest_break_on_failure")
endfunction()

Fix pthread issue. Per target include directories.


set(UPDATE_TYPE "true")

set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/tests/valgrind.supp)

set(CTEST_PROJECT_NAME "libssh")
set(CTEST_NIGHTLY_START_TIME "04:00:00 CET")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
set(CTEST_DROP_SITE_CDASH TRUE)

set(UPDATE_TYPE "true")

set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/tests/valgrind.supp)

set(CTEST_PROJECT_NAME "libssh")
set(CTEST_NIGHTLY_START_TIME "01:00:00 CET")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "test.libssh.org")
set(CTEST_DROP_LOCATION "/submit.php?project=libssh")
set(CTEST_DROP_SITE_CDASH TRUE)

Update config file for new cdash board.

ctest: Update config file for new cdash board.


#
# ONLY MODIFY TO CHANGE VERSION
#
# The number of commits since last this file has changed is used to
# define "dev" and "post", modification of this file will reset that
# version.
#

# Version info

set(SimpleITK_VERSION_MAJOR 1)
set(SimpleITK_VERSION_MINOR 3)
set(SimpleITK_VERSION_PATCH 0)
#set(SimpleITK_VERSION_TWEAK "")

include(sitkSourceVersion)

# pre-release codes are defined based on suffix of most recent tags.

# a[N]+<b[N]+<c[N]+=rc[N]+
if(NOT ${_GIT_VERSION_RC} STREQUAL "" )
  set(SimpleITK_VERSION_RC "${_GIT_VERSION_RC}")
endif()

# The hash is the current git sha1 hash tag of the HEAD.
set(SimpleITK_VERSION_HASH "${_GIT_VERSION_HASH}")

# DEV or POST is set to the number of commits since this file has been
# changed. If the MAJOR.MINOR.[PATCH[.TWEAK]] matches "closest"
# version tag then its consider in the release branch and POST is set
# while DEV is undefined, otherwise we are considered under
# development and DEV is set and POST is undefined.
if(DEFINED _GIT_VERSION_POST)
  set(SimpleITK_VERSION_POST "${_GIT_VERSION_POST}")
elseif(DEFINED _GIT_VERSION_DEV)
  set(SimpleITK_VERSION_DEV "${_GIT_VERSION_DEV}")
endif()

#
# ONLY MODIFY TO CHANGE VERSION
#
# The number of commits since last this file has changed is used to
# define "dev" and "post", modification of this file will reset that
# version.
#

# Version info

set(SimpleITK_VERSION_MAJOR 2)
set(SimpleITK_VERSION_MINOR 0)
set(SimpleITK_VERSION_PATCH 0)
#set(SimpleITK_VERSION_TWEAK "")

include(sitkSourceVersion)

# pre-release codes are defined based on suffix of most recent tags.

# a[N]+<b[N]+<c[N]+=rc[N]+
if(NOT ${_GIT_VERSION_RC} STREQUAL "" )
  set(SimpleITK_VERSION_RC "${_GIT_VERSION_RC}")
endif()

# The hash is the current git sha1 hash tag of the HEAD.
set(SimpleITK_VERSION_HASH "${_GIT_VERSION_HASH}")

# DEV or POST is set to the number of commits since this file has been
# changed. If the MAJOR.MINOR.[PATCH[.TWEAK]] matches "closest"
# version tag then its consider in the release branch and POST is set
# while DEV is undefined, otherwise we are considered under
# development and DEV is set and POST is undefined.
if(DEFINED _GIT_VERSION_POST)
  set(SimpleITK_VERSION_POST "${_GIT_VERSION_POST}")
elseif(DEFINED _GIT_VERSION_DEV)
  set(SimpleITK_VERSION_DEV "${_GIT_VERSION_DEV}")
endif()

Set SimpleITK version to 2.0.0

Set SimpleITK version to 2.0.0


cmake_minimum_required(VERSION 2.8.3)

# We want to explicitly symlink the newly installed app bundle
# such that the icon and executable match up correctly.
execute_process(COMMAND rm -f /usr/local/bin/tev)
execute_process(COMMAND ln -s "/Applications/tev.app/Contents/MacOS/tev" /usr/local/bin/tev)

cmake_minimum_required(VERSION 2.8.3)

# We want to explicitly symlink the newly installed app bundle
# such that the icon and executable match up correctly.
execute_process(COMMAND rm -f /usr/local/bin/tev)
execute_process(COMMAND ln -s /Applications/tev.app/Contents/MacOS/tev /usr/local/bin/tev)

Make formatting of osx install script more consistent


# for submission generation
set (CPACK_GENERATOR "")
set (CPACK_SOURCE_GENERATOR "ZIP")
set (CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
list (APPEND CPACK_SOURCE_IGNORE_FILES build/)

set (CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_AUTHOR_SHORTNAME})

# add out-of-source directories
set (CPACK_SOURCE_INSTALLED_DIRECTORIES
	${CMAKE_SOURCE_DIR};/${CMAKE_PROJECT_NAME}
	${PROJECT_ROOT_DIR}/common;/common
	${PROJECT_ROOT_DIR}/external/libigl-example-project/cmake;/common/cmake
)
include (CPack)

# for submission generation
set (CPACK_GENERATOR "")
set (CPACK_SOURCE_GENERATOR "ZIP")
set (CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
list (APPEND CPACK_SOURCE_IGNORE_FILES build/ data/ .*\.mesh)

set (CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_AUTHOR_SHORTNAME})

# add out-of-source directories
set (CPACK_SOURCE_INSTALLED_DIRECTORIES
	${CMAKE_SOURCE_DIR};/${CMAKE_PROJECT_NAME}
	${PROJECT_ROOT_DIR}/common;/common
	${PROJECT_ROOT_DIR}/external/libigl-example-project/cmake;/common/cmake
)
include (CPack)

Exclude data directory and meshes from submission archive.


# Build a local version
INCLUDE(ExternalProject)

SET(physfs_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/physfs)

SET(physfs_CMAKE_ARGS
    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
    -DCMAKE_DEBUG_POSTFIX=d
)

ExternalProject_Add(physfs
    PREFIX ${physfs_PREFIX}

    DOWNLOAD_DIR ${POLYCODE_DEPS_DOWNLOAD_DIR}

    URL http://offload1.icculus.org:9090/physfs/downloads/physfs-2.0.2.tar.gz
    URL_MD5 4e8927c3d30279b03e2592106eb9184a

    INSTALL_DIR ${POLYCODE_DEPS_CORE_PREFIX}
    CMAKE_ARGS ${physfs_CMAKE_ARGS}
)

# Build a local version
INCLUDE(ExternalProject)

SET(physfs_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/physfs)

SET(physfs_CMAKE_ARGS
    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
    -DCMAKE_DEBUG_POSTFIX=d
    -DPHYSFS_BUILD_TEST=FALSE
    -DPHYSFS_BUILD_WX_TEST=FALSE
)

ExternalProject_Add(physfs
    PREFIX ${physfs_PREFIX}

    DOWNLOAD_DIR ${POLYCODE_DEPS_DOWNLOAD_DIR}

    URL http://offload1.icculus.org:9090/physfs/downloads/physfs-2.0.2.tar.gz
    URL_MD5 4e8927c3d30279b03e2592106eb9184a

    INSTALL_DIR ${POLYCODE_DEPS_CORE_PREFIX}
    CMAKE_ARGS ${physfs_CMAKE_ARGS}
)

Disable PhysFS tests. For some reason they tried to build by default on Mac.


# Copyright 2006-2008 The FLWOR Foundation.
#
# 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 (CTEST_DROP_METHOD http)
SET (CTEST_PROJECT_NAME "zorba")
SET (CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
SET (CTEST_DROP_SITE "dbisdart.inf.ethz.ch")
SET (CTEST_DROP_LOCATION "/cdash/submit.php?project=zorba")
SET (CTEST_DROP_SITE_CDASH TRUE)
SET (CTEST_CUSTOM_WARNING_EXCEPTION
    ${CTEST_CUSTOM_WARNING_EXCEPTION}
    "Warning: GNU Bison.*"
    "Warning: using repository file.*"
    "Warning: urning: GNU Flex.*")
# SET (CTEST_COMPRESS_SUBMISSION ON)

# Copyright 2006-2008 The FLWOR Foundation.
#
# 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 (CTEST_DROP_METHOD http)
SET (CTEST_PROJECT_NAME "Zorba")
SET (CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
SET (CTEST_DROP_SITE "zorbatest.lambda.nu:8080")
SET (CTEST_DROP_LOCATION "/cdash/submit.php?project=Zorba")
SET (CTEST_DROP_SITE_CDASH TRUE)
SET (CTEST_CUSTOM_WARNING_EXCEPTION
    ${CTEST_CUSTOM_WARNING_EXCEPTION}
    "Warning: GNU Bison.*"
    "Warning: using repository file.*"
    "Warning: urning: GNU Flex.*")
SET (CTEST_COMPRESS_SUBMISSION ON)

Update to point at new CDash.

Update to point at new CDash.


find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
  pkg_search_module(SHARED_HIREDIS REQUIRED hiredis)
endif()

find_path(HIREDIS_INCLUDE_DIR hiredis/hiredis.h
  HINTS ${SHARED_HIREDIS_INCLUDEDIR} ${SHARED_HIREDIS_INCLUDE_DIRS}
  ${LIMIT_SEARCH})

find_library(HIREDIS_LIBRARY NAMES hiredis
  HINTS ${SHARED_HIREDIS_LIBDIR} ${SHARED_HIREDIS_LIBRARY_DIRS}
  ${LIMIT_SEARCH})

mark_as_advanced(HIREDIS_INCLUDE_DIR HIREDIS_LIBRARY)

set(HIREDIS_LIBRARIES ${HIREDIS_LIBRARY})
set(HIREDIS_INCLUDE_DIRS ${HIREDIS_INCLUDE_DIR})

find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
  pkg_check_modules(SHARED_HIREDIS REQUIRED hiredis)
endif()

find_path(HIREDIS_INCLUDE_DIR hiredis/hiredis.h
  HINTS ${SHARED_HIREDIS_INCLUDEDIR} ${SHARED_HIREDIS_INCLUDE_DIRS}
  ${LIMIT_SEARCH})

find_library(HIREDIS_LIBRARY NAMES hiredis
  HINTS ${SHARED_HIREDIS_LIBDIR} ${SHARED_HIREDIS_LIBRARY_DIRS}
  ${LIMIT_SEARCH})

mark_as_advanced(HIREDIS_INCLUDE_DIR HIREDIS_LIBRARY)

set(HIREDIS_LIBRARIES ${HIREDIS_LIBRARY})
set(HIREDIS_INCLUDE_DIRS ${HIREDIS_INCLUDE_DIR})

Change pkgconfig hiredis library search method


# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
  PACKAGE_NAME
  msgpack
  VERSION
  "1.4.1"
  URL
  "https://github.com/hunter-packages/msgpack-c/archive/cpp-1.4.1-hunter-p1.tar.gz"
  SHA1
  55e5ea871ca5fcbf1be204219cd77da237662360
  )

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(msgpack)
hunter_download(PACKAGE_NAME msgpack)

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
  PACKAGE_NAME
  msgpack
  VERSION
  "1.4.1"
  URL
  "https://github.com/hunter-packages/msgpack-c/archive/cpp-1.4.1-hunter-p1.tar.gz"
  SHA1
  5074d28857661693b71c4bda3f8fc662e4c73990
  )

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(msgpack)
hunter_download(PACKAGE_NAME msgpack)

Update msgpack-c package to doesn't compile examples and tests


# Locate async I/O libraries on a host OS.

IF (UNIX)
    FIND_PATH(ASYNC_IO_INCLUDE_DIR libaio.h
              PATH_SUFFIXES include
              PATHS
                  ~/Library/Frameworks
                  /Library/Frameworks
                  /usr/local
                  /opt/local
                  /opt/csw
                  /opt)

    FIND_LIBRARY(ASYNC_IO_LIBRARIES
                 NAMES aio
                 PATHS
                     ~/Library/Frameworks
                     /Library/Frameworks
                     /usr/local
                     /opt/local
                     /opt/csw
                     /opt)
ELSEIF (WIN32)
ENDIF()

IF (ASYNC_IO_LIBRARIES)
    MESSAGE(STATUS "Found async I/O libraries in ${ASYNC_IO_INCLUDE_DIR} :
            ${ASYNC_IO_LIBRARIES}")
    ADD_DEFINITIONS(-D_ASYNC_IO=1)
    set(ASYNC_IO_LIB ${ASYNC_IO_LIBRARIES})
    include_directories(AFTER ${ASYNC_IO_INCLUDE_DIR})
    MARK_AS_ADVANCED(ASYNC_IO_INCLUDE_DIR ASYNC_IO_LIBRARIES)
ELSE (ASYNC_IO_LIBRARIES)
    MESSAGE(STATUS "Can't find async I/O libraries")
ENDIF (ASYNC_IO_LIBRARIES)

# Locate async I/O libraries on a host OS.

IF (UNIX)
    FIND_PATH(ASYNC_IO_INCLUDE_DIR libaio.h
              PATH_SUFFIXES include
              PATHS
                  ~/Library/Frameworks
                  /Library/Frameworks
                  /usr/local
                  /opt/local
                  /opt/csw
                  /opt)

    FIND_LIBRARY(ASYNC_IO_LIBRARIES
                 NAMES aio
                 PATHS
                     ~/Library/Frameworks
                     /Library/Frameworks
                     /usr/local
                     /opt/local
                     /opt/csw
                     /opt)
ELSEIF (WIN32)
ENDIF()

IF (ASYNC_IO_LIBRARIES AND ASYNC_IO_INCLUDE_DIR)
    MESSAGE(STATUS "Found async I/O libraries in ${ASYNC_IO_INCLUDE_DIR} :
            ${ASYNC_IO_LIBRARIES}")
    ADD_DEFINITIONS(-D_ASYNC_IO=1)
    set(ASYNC_IO_LIB ${ASYNC_IO_LIBRARIES})
    include_directories(AFTER ${ASYNC_IO_INCLUDE_DIR})
    MARK_AS_ADVANCED(ASYNC_IO_INCLUDE_DIR ASYNC_IO_LIBRARIES)
ELSE (ASYNC_IO_LIBRARIES AND ASYNC_IO_INCLUDE_DIR)
    MESSAGE(STATUS "Can't find async I/O libraries")
ENDIF (ASYNC_IO_LIBRARIES AND ASYNC_IO_INCLUDE_DIR)

Fix build failures on platforms with a lib named aio

Solaris have a library named libaio.so, which historically
provided the asynchronous IO functions aiocancel/read etc,
but all of this is now part of libc (and the library exists
for backwards compatibility). We need to check that we've
got the header and the library before using the macro,
otherwise we'll get errors due to using a cmake variable
that isn't set

Change-Id: Ie87790fc527c7877d01cd8aef7bd7c8a17f5a117


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "eb3b3cfd94b306ae38f114c1c98b090cb3fe2671")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "06a2d8b03e7903024ed58e3a74161440438a6da3")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW with stereo LR-check, subpixel fixes; extended mode is not available


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "c1d766103180bf0e8893b07314ec3382e054f6e8")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "bb7bda62770e68d9e6de69ce2801ab87d9fa1047")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW: log warnings for unimplemented `initialControl` commands, changes to shared


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "1bd254499ebd4d54cfd247aa6f15b8379d458aa4")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "4311773fde2eab53793380420f88c7ac6b46fbcb")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW: fix sporadic scaling issue or crash, when rectified streams are used for NN input


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "796eb3f58b24447286ee88ba2278c52709133591")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "52f7331e81fc872f2191fd473adc96032675f518")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Add support for Yolo v6 decoding

Add support for Yolo v6 decoding


# Set the test name, 'test_' will be prepended to the
# name set here
set(CURRENT_TEST <test-name>)
# Set a category name to enable running commands like:
#    ctest -R <category-label>
# which will run the tests matching this category-label.
# Can be left empty (or just not set)
set(CURRENT_CATEGORY <category-label>)
list(APPEND YAWOT_TESTS ${CURRENT_TEST})
# Remember this is relative to the CMakeLists.txt file in
# the tests directory
set(${CURRENT_TEST}_SRCS
  ${CURRENT_TEST}/<test_source_files.cpp>
)
set(${CURRENT_TEST}_HDRS
  ${CURRENT_TEST}/<test_header_files.h>
)

# Set the test name, 'test_' will be prepended to the
# name set here
set(CURRENT_TEST <test-name>)
# Set a category name to enable running commands like:
#    ctest -R <category-label>
# which will run the tests matching this category-label.
# Can be left empty (or just not set)
set(CURRENT_CATEGORY <category-label>)
list(APPEND LIBCELLML_TESTS ${CURRENT_TEST})
# Remember this is relative to the CMakeLists.txt file in
# the tests directory
set(${CURRENT_TEST}_SRCS
  ${CURRENT_TEST}/<test_source_files.cpp>
)
set(${CURRENT_TEST}_HDRS
  ${CURRENT_TEST}/<test_header_files.h>
)

Use correct name in tests template documentation.


WRAP_CLASS("itk::BinaryThresholdProjectionImageFilter" POINTER_WITH_SUPERCLASS)
  WRAP_IMAGE_FILTER_SCALAR(2)

  # reduce the output dimension by 1, if possible
  FOREACH(t ${WRAP_ITK_SCALAR})
    FOREACH(t2 ${WRAP_ITK_INT})
      FOREACH(d ${WRAP_ITK_DIMS})
        DECREMENT(d1 ${d})
        FILTER_DIMS(d2 "${d1}")
        IF(d2)
          WRAP_TEMPLATE("${ITKM_I${t}${d}}${ITKM_I${t2}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t2}${d2}}")
        ENDIF(d2)
      ENDFOREACH(d)
    ENDFOREACH(t2)
  ENDFOREACH(t)
END_WRAP_CLASS()

WRAP_CLASS("itk::BinaryThresholdProjectionImageFilter" POINTER_WITH_SUPERCLASS)
  WRAP_IMAGE_FILTER_SCALAR(2)

  # reduce the output dimension by 1, if possible
  FOREACH(t ${WRAP_ITK_SCALAR})
#    FOREACH(t2 ${WRAP_ITK_INT})
      SET(t2 ${t})
      FOREACH(d ${WRAP_ITK_DIMS})
        DECREMENT(d1 ${d})
        FILTER_DIMS(d2 "${d1}")
        IF(d2)
          WRAP_TEMPLATE("${ITKM_I${t}${d}}${ITKM_I${t2}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t2}${d2}}")
        ENDIF(d2)
      ENDFOREACH(d)
#    ENDFOREACH(t2)
  ENDFOREACH(t)
END_WRAP_CLASS()

COMP: Reduce the number of wrapped types to avoid the hierarchy gaps warnings


# Maintainer: Matt McCormick <matt.mccormick@kitware.com>
set(DOCUMENTATION "This module contains a filter to compute higher order
accurate numerical derivatives and gradients from an input scalar image.
field from a displacement field image.
Higher Order Accurate Derivative and Gradient Calculation in ITK
http://www.insight-journal.org/browse/publication/775
http://hdl.handle.net/10380/3231
")

itk_module(HigherOrderAccurateGradient
  DEPENDS
    ITKCommon
    ITKImageGradient
    ITKImageIntensity
    ITKImageFeature
    SplitComponents
  TEST_DEPENDS
    ITKTestKernel
  EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
)

# Maintainer: Matt McCormick <matt.mccormick@kitware.com>
set(DOCUMENTATION "This module contains a filter to compute higher order
accurate numerical derivatives and gradients from an input scalar image.
field from a displacement field image.
Higher Order Accurate Derivative and Gradient Calculation in ITK
http://www.insight-journal.org/browse/publication/775
http://hdl.handle.net/10380/3231
")

itk_module(HigherOrderAccurateGradient
  DEPENDS
    ITKCommon
    ITKImageGradient
    ITKImageIntensity
    ITKImageFeature
  TEST_DEPENDS
    ITKTestKernel
  EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
)

BUG: Remove extra SplitComponent module dependency


set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_COMMON}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_COMMON} -O3")

set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=gnu++14")
function(apply_folly_compile_options_to_target THETARGET)
  target_compile_definitions(${THETARGET}
    PRIVATE
      _REENTRANT
      _GNU_SOURCE
      "FOLLY_XLOG_STRIP_PREFIXES=\"${FOLLY_DIR_PREFIXES}\""
  )
  target_compile_options(${THETARGET}
    PRIVATE
      -g
      -std=gnu++14
      -finput-charset=UTF-8
      -fsigned-char
      -Werror
      -Wall
      -Wno-deprecated
      -Wdeprecated-declarations
      -Wno-error=deprecated-declarations
      -Wno-sign-compare
      -Wno-unused
      -Wunused-label
      -Wunused-result
      -Wnon-virtual-dtor
      ${FOLLY_CXX_FLAGS}
  )
endfunction()

set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_COMMON}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_COMMON} -O3")

set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=gnu++14")
function(apply_folly_compile_options_to_target THETARGET)
  target_compile_definitions(${THETARGET}
    PRIVATE
      _REENTRANT
      _GNU_SOURCE
      "FOLLY_XLOG_STRIP_PREFIXES=\"${FOLLY_DIR_PREFIXES}\""
  )
  target_compile_options(${THETARGET}
    PRIVATE
      -g
      -std=gnu++14
      -finput-charset=UTF-8
      -fsigned-char
      -Werror
      -Wall
      -Wno-deprecated
      -Wno-deprecated-declarations
      -Wno-sign-compare
      -Wno-unused
      -Wunused-label
      -Wunused-result
      -Wnon-virtual-dtor
      ${FOLLY_CXX_FLAGS}
  )
endfunction()

Disable -Wdeprecated-declarations in cmake builds

Summary:
[Folly] Disable `-Wdeprecated-declarations` in cmake builds.

To hide deprecation spam in unit-tests for uses of deprecated declarations which cannot yet be removed.

Reviewed By: Orvid

Differential Revision: D10287167

fbshipit-source-id: 2dddd9f69ca1dcced61e4a2d6cd16bad54b2a2ad


#Contact: Rémi Cresson <remi.cresson@teledetection.fr>
otb_fetch_module(Mosaic
  "This module provides one application dedicated to images mosaicking
A more detailed description can be found on the project website:
https://github.com/remicres/otb-mosaic
"
  GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
  GIT_TAG 64cb06798fb237e10f929c1adaab37441e09fbc3
)

#Contact: Rémi Cresson <remi.cresson@teledetection.fr>
otb_fetch_module(Mosaic
  "This module provides one application dedicated to images mosaicking
A more detailed description can be found on the project website:
https://github.com/remicres/otb-mosaic
"
  GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
  GIT_TAG 9a8cdd63ed3bba500bb4ea3867abc38bce8be562
)

Update Mosaic Remote Module GIT_TAG

Update Mosaic Remote Module GIT_TAG


message("Making build directory: ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build)
message("Generating project files...")
execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142 -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.19041.0
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build
  RESULT_VARIABLE success
)
if (NOT ${success} MATCHES "0")
  message(FATAL_ERROR "Generation step failed.")
endif()

message("Making build directory: ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build)
message("Generating project files...")
execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142,version=14.29.16.11 -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.19041.0
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build
  RESULT_VARIABLE success
)
if (NOT ${success} MATCHES "0")
  message(FATAL_ERROR "Generation step failed.")
endif()

Fix MSVC compiler version to one where all tests pass.


GLOBAL_SET(BoostOrg_INCLUDE_DIRS "${Boost_INCLUDE_DIRS}")
GLOBAL_SET(BoostOrg_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}")

TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES(
  BoostOrg
  REQUIRED_HEADERS boost/version.hpp boost/mpl/at.hpp
  REQUIRED_LIBS_NAMES boost_mpi boost_serialization
  )

# Use CMake FindBoost module to check version is sufficient
SET(BOOST_INCLUDEDIR "${BoostOrg_INCLUDE_DIRS}")
SET(Boost_NO_SYSTEM_PATHS ON)
FIND_PACKAGE(Boost 1.61.0 REQUIRED)

GLOBAL_SET(BoostOrg_INCLUDE_DIRS "${Boost_INCLUDE_DIRS}")
GLOBAL_SET(BoostOrg_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}")

TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES(
  BoostOrg
  REQUIRED_HEADERS boost/version.hpp boost/mpl/at.hpp
  REQUIRED_LIBS_NAMES boost_mpi boost_serialization
  )

# Use CMake FindBoost module to check version is sufficient
SET(BOOST_INCLUDEDIR ${TPL_BoostOrg_INCLUDE_DIRS})
SET(Boost_NO_SYSTEM_PATHS ON)
FIND_PACKAGE(Boost 1.61.0 REQUIRED)

Fix configure with Boost TPL installed from system package manager


set(cmakefiles_dir
  "${sprokit_binary_dir}/CMakeFiles")

if (CMAKE_CROSSCOMPILING)
  set(BOOST_MANGLE_NAMESPACE "boost" CACHE STRING "The mangled boost namespace")
else ()
  set(boost_mangle_namespace_path
    "${cmakefiles_dir}/boost_mangle_namespace.cxx")
  file(WRITE "${boost_mangle_namespace_path}"
"
#include <boost/config.hpp>
#include <boost/preprocessor/stringize.hpp>

#include <iostream>

#include <cstdlib>

int
main()
{
#ifdef boost
  std::cout << BOOST_PP_STRINGIZE(boost) << std::endl;
#else
  std::cout << \"boost\" << std::endl;
#endif

  return EXIT_SUCCESS;
}
")

  try_run(boost_mangle_namespace_run boost_mangle_namespace_compile
    "${sprokit_binary_dir}"
    "${boost_mangle_namespace_path}"
    CMAKE_FLAGS         "-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIRS}"
    RUN_OUTPUT_VARIABLE boost_detect_mangle_namespace)
  string(STRIP "${boost_detect_mangle_namespace}" boost_detect_mangle_namespace)
  set(BOOST_MANGLE_NAMESPACE "${boost_detect_mangle_namespace}"
    CACHE INTERNAL "The detected mangled boost namespace")
endif ()

set(cmakefiles_dir
  "${sprokit_binary_dir}/CMakeFiles")

if (CMAKE_CROSSCOMPILING)
  set(BOOST_MANGLE_NAMESPACE "boost" CACHE STRING "The mangled boost namespace")
else ()
  set(boost_mangle_namespace_path
    "${cmakefiles_dir}/boost_mangle_namespace.cxx")
  file(WRITE "${boost_mangle_namespace_path}"
"
#include <boost/config.hpp>
#include <boost/preprocessor/stringize.hpp>

#include <iostream>

#include <cstdlib>

int
main()
{
#ifdef boost
  std::cout << BOOST_PP_STRINGIZE(boost) << std::endl;
#else
  std::cout << \"boost\" << std::endl;
#endif

  return EXIT_SUCCESS;
}
")

  try_run(boost_mangle_namespace_run boost_mangle_namespace_compile
    "${sprokit_binary_dir}"
    "${boost_mangle_namespace_path}"
    CMAKE_FLAGS         "-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIRS}"
    RUN_OUTPUT_VARIABLE boost_detect_mangle_namespace)
  string(STRIP "${boost_detect_mangle_namespace}" boost_detect_mangle_namespace)
  # The mangled namespace is detected, so make the value INTERNAL to prevent
  # accidentally changing in in a GUI.
  set(BOOST_MANGLE_NAMESPACE "${boost_detect_mangle_namespace}"
    CACHE INTERNAL "The detected mangled boost namespace")
endif ()

Add a comment about BOOST_MANGLED_NAMESPACE


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "d4c86b3b232f37796293cf0c995d61fa276b9837")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "25e22d27838d599121d1b6d9fc131456efc49a46")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW: - support for camera modules with IMX380 sensor id, reusing IMX378 driver (some Arducam IMX577(?)) - soft-reset the sensor before config, to fix streaming with some Arducam modules


# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(SphinxExamples
  "This module builds the examples found at https://itk.org/ITKExamples/"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKExamples.git
  GIT_TAG 3966234dc803b269a8acad2dcdc8ef9ffbda4940
  )

# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(SphinxExamples
  "This module builds the examples found at https://itk.org/ITKExamples/"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKExamples.git
  GIT_TAG abaac79d3380b23a6cd38ac772c91302463ed3c3
  )

ENH: Update SphinxExamples to lastest master branch

This updates the support for ITKv5.0.0, update python to 3.6 support,
updates submodules to working hashes, updates documentation warnings,
uses https vs http for websites that support it, and updates http addresses
that are are permanently redirected.


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "35d2c8c5f2b082326334c982d54ae16908f1315d")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "69f4a4f521e5f3029d30582a5e6ad4352340d12a")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW - [ImageManip][bug fix][setCropRotatedRect] Adding a fix for the case when the center of the rectangle crop is very close to the image border


# Macro to provide an option only if a set of other variables are ON.
# Example invocation:
#
#  VTK_DEPENDENT_OPTION(USE_FOO "Use Foo" ON "USE_BAR;USE_ZOT" OFF)
#
# If both USE_BAR and USE_ZOT are true, this provides an option called
# USE_FOO that defaults to ON.  Otherwise, it sets USE_FOO to OFF.  If
# the status of USE_BAR or USE_ZOT ever changes, any value for the
# USE_FOO option is saved so that when the option is re-enabled it
# retains its old value.
#
MACRO(VTK_DEPENDENT_OPTION option doc default depends force)
  SET(${option}_AVAILABLE 1)
  FOREACH(d ${depends})
    IF(NOT ${d})
      SET(${option}_AVAILABLE 0)
    ENDIF(NOT ${d})
  ENDFOREACH(d)
  IF(${option}_AVAILABLE)
    OPTION(${option} "${doc}" "${default}")
    SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
  ELSE(${option}_AVAILABLE)
    SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
    SET(${option} ${force})
  ENDIF(${option}_AVAILABLE)
ENDMACRO(VTK_DEPENDENT_OPTION)

# Macro to provide an option only if a set of other variables are ON.
# Example invocation:
#
#  VTK_DEPENDENT_OPTION(USE_FOO "Use Foo" ON "USE_BAR;USE_ZOT" OFF)
#
# If both USE_BAR and USE_ZOT are true, this provides an option called
# USE_FOO that defaults to ON.  Otherwise, it sets USE_FOO to OFF.  If
# the status of USE_BAR or USE_ZOT ever changes, any value for the
# USE_FOO option is saved so that when the option is re-enabled it
# retains its old value.
#
MACRO(VTK_DEPENDENT_OPTION option doc default depends force)
  IF(${option}_FORCE MATCHES "^${option}_FORCE")
    SET(${option}_AVAILABLE 1)
    FOREACH(d ${depends})
      IF(NOT ${d})
        SET(${option}_AVAILABLE 0)
      ENDIF(NOT ${d})
    ENDFOREACH(d)
    IF(${option}_AVAILABLE)
      OPTION(${option} "${doc}" "${default}")
      SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
    ELSE(${option}_AVAILABLE)
      SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
      SET(${option} ${force})
    ENDIF(${option}_AVAILABLE)
  ELSE(${option}_FORCE MATCHES "^${option}_FORCE")
    SET(${option} "${${option}_FORCE}")
  ENDIF(${option}_FORCE MATCHES "^${option}_FORCE")
ENDMACRO(VTK_DEPENDENT_OPTION)

ENH: Allow forcing of options without showing in cmake gui


set(CMAKE_CXX_STANDARD 11 CACHE INTERNAL "specifies the C++ standard whose features are requested to build this target")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  ### Even though CMAKE_CXX_STANDARD_REQUIRED is supported since CMake 3.1, it doesn't work for Emscripten em++ together with
  ### Cmake 3.6.
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++${CMAKE_CXX_STANDARD}")
endif()

find_package(Boost 1.56.0 REQUIRED)
if(Boost_VERSION VERSION_LESS "1.72.0")
	set(CMAKE_CXX_STANDARD 11 CACHE INTERNAL "specifies the C++ standard whose features are requested to build this target")
else()
	set(CMAKE_CXX_STANDARD 14 CACHE INTERNAL "specifies the C++ standard whose features are requested to build this target")
endif()

set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  ### Even though CMAKE_CXX_STANDARD_REQUIRED is supported since CMake 3.1, it doesn't work for Emscripten em++ together with
  ### Cmake 3.6.
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++${CMAKE_CXX_STANDARD}")
endif()

Add check for boost version to set appropriate c++ standard.


set(proj SimpleITKExamples)

# Set dependency list
set(SimpleITKExamples_DEPENDENCIES "SimpleITK")

if (${BUILD_EXAMPLES} )

  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )

  ExternalProject_Add(${proj}
    DOWNLOAD_COMMAND ""
    UPDATE_COMMAND ""
    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../Examples
    BINARY_DIR ${proj}-build
    CMAKE_GENERATOR ${gen}
    CMAKE_ARGS
      -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE}
      --no-warn-unused-cli
      -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
      ${ep_common_args}
      -DITK_DIR:PATH=${ITK_DIR}
      -DElastix_DIR:PATH=${Elastix_DIR}
      -DSimpleITK_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/SimpleITK-1.0/
      -DCMAKE_SKIP_RPATH:BOOL=ON
      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    BUILD_COMMAND ${BUILD_COMMAND_STRING}
    INSTALL_COMMAND ""
    DEPENDS "${SimpleITKExamples_DEPENDENCIES}"
    ${External_Project_USES_TERMINAL}
    )

endif()

set(proj SimpleITKExamples)

# Set dependency list
set(SimpleITKExamples_DEPENDENCIES "SimpleITK")

if (${BUILD_EXAMPLES} )

  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )

  ExternalProject_Add(${proj}
    DOWNLOAD_COMMAND ""
    UPDATE_COMMAND ""
    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../Examples
    BINARY_DIR ${proj}-build
    CMAKE_GENERATOR ${gen}
    CMAKE_ARGS
      -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE}
      --no-warn-unused-cli
      -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
      ${ep_common_args}
      -DITK_DIR:PATH=${ITK_DIR}
      -DElastix_DIR:PATH=${Elastix_DIR}
      -DSimpleITK_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/SimpleITK-1.1/
      -DCMAKE_SKIP_RPATH:BOOL=ON
      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    BUILD_COMMAND ${BUILD_COMMAND_STRING}
    INSTALL_COMMAND ""
    DEPENDS "${SimpleITKExamples_DEPENDENCIES}"
    ${External_Project_USES_TERMINAL}
    )

endif()

Update the SimpleITK_DIR version to the current SimpleITK version


/*
    Copyright (C) 2012 Harald Sitter <sitter@kde.org>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PHONON_VLC_MIME_H
#define PHONON_VLC_MIME_H

#include <QtCore/QStringList>

namespace Phonon {
namespace VLC {

static QStringList mimeTypeList()
{
    // In CMake we null-terminate this list for ease of iteration.
    const char *c_strings[] = @PHONON_VLC_MIME_TYPES_C_ARRAY@;

    QStringList list;
    int i = 0;
    while (c_strings[i])
        list.append(QLatin1String(c_strings[i]));
    return list;
}

} // namespace VLC
} // namespace Phonon

#endif // PHONON_VLC_MIME_H

/*
    Copyright (C) 2012 Harald Sitter <sitter@kde.org>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PHONON_VLC_MIME_H
#define PHONON_VLC_MIME_H

#include <QtCore/QStringList>

namespace Phonon {
namespace VLC {

static QStringList mimeTypeList()
{
    // In CMake we null-terminate this list for ease of iteration.
    const char *c_strings[] = @PHONON_VLC_MIME_TYPES_C_ARRAY@;

    QStringList list;
    int i = 0;
    while (c_strings[i])
        list.append(QLatin1String(c_strings[i++]));
    return list;
}

} // namespace VLC
} // namespace Phonon

#endif // PHONON_VLC_MIME_H

Fix missing increment, causing infinite loop consuming all memory


TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
  LIB_REQUIRED_PACKAGES
  DataTransferKitUtils
  Intrepid2
  Kokkos
  Shards
  Teuchos
  Tpetra
  LIB_REQUIRED_TPLS
  Boost
  )

TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
  LIB_REQUIRED_PACKAGES
  DataTransferKitUtils
  Intrepid2
  Kokkos
  Shards
  Teuchos
  Tpetra
  TEST_REQUIRED_TPLS
  Boost
  )

Make Boost a test required TPL in the Search subpackage rather than a lib required package


otto_include_board(parts/ui/egl)
otto_include_board(parts/audio/rtaudio)
set(OTTO_USE_FBCP ON)
set(CMAKE_LINKER_FLAGS_RELEASE "${CMAKE_LINKER_FLAGS_RELEASE} -ffast-math -funsafe-math-optimizations -mfpu=neon-vfpv4")

Add fast-math and neon flags on raspi

Add fast-math and neon flags on raspi


SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andreas Grob <vilarion@illarion.org>")
set(CPACK_PACKAGE_VENDOR "Illarion e.V.")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.txt")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")

SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andreas Grob <vilarion@illarion.org>")
set(CPACK_PACKAGE_VENDOR "Illarion e.V.")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.txt")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_PACKAGE_FILE_NAME "illarion")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-system1.67.0, libboost-graph1.67.0, libc6 (>= 2.14), libgcc1 (>= 1:3.0), liblua5.2-0, libluabind0.9.1d1, libpqxx-6.2 (>= 6.2), libstdc++6 (>= 6)")

Add Debian dependencies to cpack config

Add Debian dependencies to cpack config


# NodeJS: For building admin-ui Ember app.
ExternalProject_Add(
  nodejs
  URL https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-linux-x64.tar.xz
  URL_HASH SHA256=${NODEJS_HASH}
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ""
  INSTALL_COMMAND rsync -a -v <SOURCE_DIR>/ ${DEV_INSTALL_PREFIX}/
)

ExternalProject_Add(
  yarn
  DEPENDS nodejs
  URL https://github.com/yarnpkg/yarn/releases/download/v${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz
  URL_HASH MD5=${YARN_HASH}
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ""
  INSTALL_COMMAND rsync -a -v --delete <SOURCE_DIR>/ ${DEV_INSTALL_PREFIX}/yarn/
    # Remove the previous bin symlink that was necessary.
    COMMAND rm -f ${DEV_INSTALL_PREFIX}/bin/yarn.js
)

# NodeJS: For building admin-ui Ember app.
ExternalProject_Add(
  nodejs
  URL https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-linux-x64.tar.xz
  URL_HASH SHA256=${NODEJS_HASH}
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ""
  INSTALL_COMMAND rsync -a -v <SOURCE_DIR>/ ${DEV_INSTALL_PREFIX}/
)

ExternalProject_Add(
  yarn
  DEPENDS nodejs
  URL https://github.com/yarnpkg/yarn/releases/download/v${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz
  URL_HASH MD5=${YARN_HASH}
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ""
  INSTALL_COMMAND rsync -a -v --delete <SOURCE_DIR>/ ${DEV_INSTALL_PREFIX}/yarn/
    COMMAND cd ${DEV_INSTALL_PREFIX}/bin && ln -snf ../yarn/bin/yarn ./yarn
    # Remove the previous bin symlink that was necessary.
    COMMAND rm -f ${DEV_INSTALL_PREFIX}/bin/yarn.js
)

Bring back missing symlink for yarn process.

This accidentally got removed during the last yarn upgrade.


# Check for settings from VXL that are incompatible with flags.

set(cmakefiles_dir
  "${vistk_binary_dir}/CMakeFiles")

if (VISTK_ENABLE_PEDANTIC)
  if (CMAKE_CROSSCOMPILING)
    message(WARNING "The `-pedantic` flag is not recommended when "
      "cross-compiling.")
  else ()
    set(vxl_has_float_decls_path
      "${cmakefiles_dir}/vxl_has_float_decls.cxx")
    file(WRITE "${vxl_has_float_decls_path}"
"
#include <config_compiler>

#include <cstdlib>

int
main()
{
#if VCL_CAN_STATIC_CONST_INIT_FLOAT
#error \"VCL_CAN_STATIC_CONST_INIT_FLOAT is defined\"
#endif

  return EXIT_SUCCESS;
}
")

    try_compile(VXL_HAS_FLOAT_DECLS_COMPILE
      "${vistk_binary_dir}"
      "${vxl_has_float_decls_path}"
      CMAKE_FLAGS
        "-DINCLUDE_DIRECTORIES=${VXL_VCL_INCLUDE_DIR}")

    if (NOT VXL_HAS_FLOAT_DECLS_COMPILE)
      message(WARNING "VXL was compiled such that float declarations are in "
        "header files, but the `-pedantic` flag does not allow this, please "
        "continue at your own risk.")
    endif ()
  endif ()
endif ()

# Check for settings from VXL that are incompatible with flags.

set(cmakefiles_dir
  "${vistk_binary_dir}/CMakeFiles")

if (VISTK_ENABLE_PEDANTIC)
  if (CMAKE_CROSSCOMPILING)
    message(WARNING "The `-pedantic` flag is not recommended when "
      "cross-compiling.")
  else ()
    set(vxl_has_float_decls_path
      "${cmakefiles_dir}/vxl_has_float_decls.cxx")
    file(WRITE "${vxl_has_float_decls_path}"
"
#include <vcl_config_compiler.h>

#include <cstdlib>

int
main()
{
#if VCL_CAN_STATIC_CONST_INIT_FLOAT
#error \"VCL_CAN_STATIC_CONST_INIT_FLOAT is defined\"
#endif

  return EXIT_SUCCESS;
}
")

    try_compile(VXL_HAS_FLOAT_DECLS_COMPILE
      "${vistk_binary_dir}"
      "${vxl_has_float_decls_path}"
      CMAKE_FLAGS
        "-DINCLUDE_DIRECTORIES=${VXL_VCL_INCLUDE_DIR}")

    if (NOT VXL_HAS_FLOAT_DECLS_COMPILE)
      message(WARNING "VXL was compiled such that float declarations are in "
        "header files, but the `-pedantic` flag does not allow this, please "
        "continue at your own risk.")
    endif ()
  endif ()
endif ()

Include the proper header file

Include the proper header file


set(proj cpprestsdk)
set(proj_DEPENDENCIES Boost ZLIB)

if(MITK_USE_${proj})
  set(${proj}_DEPENDS ${proj})

  if(DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR})
    message(FATAL_ERROR "${proj}_DIR variable is defined but corresponds to non-existing directory!")
  endif()

  if(NOT DEFINED ${proj}_DIR)
    set(cmake_cache_args
      ${ep_common_cache_args}
      -DBUILD_SAMPLES:BOOL=OFF
      -DBUILD_TESTS:BOOL=OFF
      -DWERROR:BOOL=OFF
    )

    if(OPENSSL_ROOT_DIR)
      list(APPEND cmake_cache_args
        -DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT_DIR}
      )
    endif()

    ExternalProject_Add(${proj}
      GIT_REPOSITORY https://github.com/microsoft/cpprestsdk.git
      GIT_TAG v2.10.16
      SOURCE_SUBDIR Release
      CMAKE_ARGS ${ep_common_args}
      CMAKE_CACHE_ARGS ${cmake_cache_args}
      CMAKE_CACHE_DEFAULT_ARGS ${ep_common_cache_default_args}
      DEPENDS ${proj_DEPENDENCIES}
    )

    set(${proj}_DIR ${ep_prefix})
  else()
    mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
  endif()
endif()

set(proj cpprestsdk)
set(proj_DEPENDENCIES Boost ZLIB)

if(MITK_USE_${proj})
  set(${proj}_DEPENDS ${proj})

  if(DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR})
    message(FATAL_ERROR "${proj}_DIR variable is defined but corresponds to non-existing directory!")
  endif()

  if(NOT DEFINED ${proj}_DIR)
    set(cmake_cache_args
      ${ep_common_cache_args}
      -DBUILD_SAMPLES:BOOL=OFF
      -DBUILD_TESTS:BOOL=OFF
      -DWERROR:BOOL=OFF
    )

    if(OPENSSL_ROOT_DIR)
      list(APPEND cmake_cache_args
        -DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT_DIR}
      )
    endif()

    ExternalProject_Add(${proj}
      GIT_REPOSITORY https://github.com/microsoft/cpprestsdk.git
      GIT_TAG v2.10.18
      SOURCE_SUBDIR Release
      CMAKE_ARGS ${ep_common_args}
      CMAKE_CACHE_ARGS ${cmake_cache_args}
      CMAKE_CACHE_DEFAULT_ARGS ${ep_common_cache_default_args}
      DEPENDS ${proj_DEPENDENCIES}
    )

    set(${proj}_DIR ${ep_prefix})
  else()
    mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
  endif()
endif()

Upgrade C++ REST SDK from version 2.10.16 to 2.10.18


# Make sure this file is included only once
get_filename_component(CMAKE_CURRENT_LIST_FILENAME ${CMAKE_CURRENT_LIST_FILE} NAME_WE)
if(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
  return()
endif()
set(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)

set(proj GTest)

set(GTEST_TARGET_VERSION 1.8.0)
set(GTEST_DOWNLOAD_SOURCE_HASH "16877098823401d1bf2ed7891d7dce36")

# follow the standard EP_PREFIX locations
set(GTEST_source_dir ${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj})

sitkSourceDownload(GTEST_URL "googletest-release-${GTEST_TARGET_VERSION}.tar.gz" ${GTEST_DOWNLOAD_SOURCE_HASH})

ExternalProject_Add(${proj}
  URL "${GTEST_URL}"
  URL_MD5 ${GTEST_DOWNLOAD_SOURCE_HASH}
  CONFIGURE_COMMAND ""
  BUILD_COMMAND     ""
  INSTALL_COMMAND   ""
  TEST_COMMAND      ""
  ${External_Project_USES_TERMINAL}
)

sitkSourceDownloadDependency(${proj})

set(GTEST_ROOT ${GTEST_source_dir}/googletest)

# Make sure this file is included only once
get_filename_component(CMAKE_CURRENT_LIST_FILENAME ${CMAKE_CURRENT_LIST_FILE} NAME_WE)
if(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
  return()
endif()
set(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)

set(proj GTest)

set(GTEST_GIT_REPOSITORY "${git_protocol}://github.com/google/googletest.git" CACHE  STRING "Google Test repository")
mark_as_advanced(GTEST_GIT_REPOSITORY)

set(GTEST_GIT_TAG "0fe96607d85cf3a25ac40da369db62bbee2939a5" CACHE STRING "Tag or hash for GTtest git repo")
mark_as_advanced(GTEST_GIT_TAG)
set(GTEST_TAG_COMMAND GIT_TAG "${GTEST_GIT_TAG}")

# follow the standard EP_PREFIX locations
set(GTEST_source_dir ${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj})

ExternalProject_Add(${proj}
  GIT_REPOSITORY ${GTEST_GIT_REPOSITORY}
  ${GTEST_TAG_COMMAND}
  CONFIGURE_COMMAND ""
  BUILD_COMMAND     ""
  INSTALL_COMMAND   ""
  TEST_COMMAND      ""
  ${External_Project_USES_TERMINAL}
)

sitkSourceDownloadDependency(${proj})

set(GTEST_ROOT ${GTEST_source_dir}/googletest)

Change to use GoogleTest for github repo with update

The 1.8.0 release has issues with MSVC 2017. The usage of tr1 produces
a warning, and flags are enable so that warnings are enabled. The
selected version of GoogleTest is the same one that ITK is using has a
fix for the issue.

google/googletest#1111


find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h HINTS ${MBEDTLS_FOLDER_INCLUDE})

find_library(MBEDTLS_LIBRARY mbedtls HINTS ${MBEDTLS_FOLDER_LIBRARY})
find_library(MBEDX509_LIBRARY mbedx509 HINTS ${MBEDTLS_FOLDER_LIBRARY})
find_library(MBEDCRYPTO_LIBRARY mbedcrypto HINTS ${MBEDTLS_FOLDER_LIBRARY})

set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MBEDTLS DEFAULT_MSG
        MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)

mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)

find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h HINTS ${MBEDTLS_FOLDER_INCLUDE})

if(UA_BUILD_OSS_FUZZ)
    # oss-fuzz requires static linking of libraries
    set(MBEDTLS_LIBRARY /usr/lib/x86_64-linux-gnu/libmbedtls.a)
    set(MBEDX509_LIBRARY /usr/lib/x86_64-linux-gnu/libmbedx509.a)
    set(MBEDCRYPTO_LIBRARY /usr/lib/x86_64-linux-gnu/libmbedcrypto.a)
else()
    find_library(MBEDTLS_LIBRARY mbedtls HINTS ${MBEDTLS_FOLDER_LIBRARY})
    find_library(MBEDX509_LIBRARY mbedx509 HINTS ${MBEDTLS_FOLDER_LIBRARY})
    find_library(MBEDCRYPTO_LIBRARY mbedcrypto HINTS ${MBEDTLS_FOLDER_LIBRARY})
endif()

set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MBEDTLS DEFAULT_MSG
        MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)

mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)

Use static linking for oss-fuzz

Use static linking for oss-fuzz


# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
    PACKAGE_NAME libdill
    VERSION "1.6"
    URL "https://github.com/isaachier/libdill/archive/hunter-1.6-p1.tar.gz"
    SHA1 "06a6aa00364007b2f19d942b503566bb15136a93")
hunter_cmake_args(libdill CMAKE_ARGS
                  BUILD_TESTING=OFF
                  BUILD_PERF=OFF)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(libdill)
hunter_download(PACKAGE_NAME libdill)

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
    PACKAGE_NAME libdill
    VERSION "1.6"
    URL "https://github.com/hunter-packages/libdill/archive/hunter-1.6.tar.gz"
    SHA1 "603ca85ac4b0d9f0ab4f5db57281127370c5cacc")
hunter_cmake_args(libdill CMAKE_ARGS
                  BUILD_TESTING=OFF
                  BUILD_PERF=OFF)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(libdill)
hunter_download(PACKAGE_NAME libdill)

Fix link to download libdill.

Fix link to download libdill.


Add newline at the end of *.cmake

Add newline at the end of *.cmake

(except cmake-modules which we'll fix in its source repo)


message(AUTHOR_WARNING "TODO: Implement module test.")

find_package(PETSc REQUIRED)

message(AUTHOR_WARNING "TODO: Implement module test.")

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  find_package(PETSc COMPONENTS CXX REQUIRED)
else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  find_package(PETSc REQUIRED)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

Set PETSc language bindings to CXX for mac


# Set necessary compile and link flags
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wformat -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -Wformat=2 -Wextra -Wnon-virtual-dtor -fPIC -O0")
    if(WITH_COVERAGE)
        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
    endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
    # TODO figure clang stuff to enable test-coverage
    # Instrument Program flow should be set to Yes
    # http://stackoverflow.com/questions/7949781/undefined-symbols-for-architecture-i386-upgrading-project-to-ios-5
    set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wall -Wextra -Wnon-virtual-dtor -fPIC -O0")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    # no msvc flags for now
endif()

# Set necessary compile and link flags
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wformat -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -Wformat=2 -Wextra -Wnon-virtual-dtor -fPIC -O0")
    if(WITH_COVERAGE)
        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
    endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
    # TODO figure clang stuff to enable test-coverage
    # Instrument Program flow should be set to Yes
    # http://stackoverflow.com/questions/7949781/undefined-symbols-for-architecture-i386-upgrading-project-to-ios-5
    set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wall -Wextra -Wnon-virtual-dtor -fPIC -O0")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    # no msvc flags for now
endif()

Enable coverage also for release build

Enable coverage also for release build


set(UPDATE_TYPE "true")

set(CTEST_PROJECT_NAME "resolvwrapper")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "mock.cryptomilk.org")
set(CTEST_DROP_LOCATION "/submit.php?project=resolvwrapper")
set(CTEST_DROP_SITE_CDASH TRUE)

set(UPDATE_TYPE "true")

set(CTEST_PROJECT_NAME "resolvwrapper")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "mock.cryptomilk.org")
set(CTEST_DROP_LOCATION "/submit.php?project=resolvwrapper")
set(CTEST_DROP_SITE_CDASH TRUE)

Drop test results via https.

cmake: Drop test results via https.

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@samba.org>


#
# 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.
#
# For know OTB_DEPENDS is build with default value

set ( cmake_configure_option
"CMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION}
CMAKE_INSTALL_PREFIX:PATH=${CTEST_INSTALL_DIRECTORY}")

set ( temporary_option
"OTB_USE_LIBKML=ON
OTB_USE_MPI=OFF")

set(concat_options
"${cmake_configure_option}
${temporary_option}
")

#Transform the previous string in list
string (REPLACE "\n" ";" sb_options ${concat_options})

foreach(item ${sb_options})
  set( SB_CONFIGURE_OPTIONS "${SB_CONFIGURE_OPTIONS}-D${item};")
endforeach(item)

#
# 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.
#
# For know OTB_DEPENDS is build with default value

set ( cmake_configure_option
"CMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION}
CMAKE_INSTALL_PREFIX:PATH=${CTEST_INSTALL_DIRECTORY}")

set ( temporary_option
"OTB_USE_LIBKML=OFF
OTB_USE_MPI=OFF")

set(concat_options
"${cmake_configure_option}
${temporary_option}
")

#Transform the previous string in list
string (REPLACE "\n" ";" sb_options ${concat_options})

foreach(item ${sb_options})
  set( SB_CONFIGURE_OPTIONS "${SB_CONFIGURE_OPTIONS}-D${item};")
endforeach(item)

Revert "Change an option to check process"

This reverts commit 2ab1001ab1a28d80ea789fa0229d77478ea8a80e.


#Contact: Rémi Cresson <remi.cresson@teledetection.fr>
otb_fetch_module(Mosaic
  "This module provides one application dedicated to images mosaicking
A more detailed description can be found on the project website:
https://github.com/remicres/otb-mosaic
"
  GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
  GIT_TAG 80637f8ede41f99b6ba147c9a5eef2346e5ae7f0
)

#Contact: Rémi Cresson <remi.cresson@teledetection.fr>
otb_fetch_module(Mosaic
  "This module provides one application dedicated to images mosaicking
A more detailed description can be found on the project website:
https://github.com/remicres/otb-mosaic
"
  GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
  GIT_TAG 64cb06798fb237e10f929c1adaab37441e09fbc3
)

Update GIT_TAG for Mosaic module

RemoteModule: Update GIT_TAG for Mosaic module


set(CPACK_PACKAGE_VENDOR "Daniel Nicoletti")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_CONTACT "Daniel Nicoletti <dantti12@gmail.com>")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}")

if(UNIX)
  if(NOT CPACK_GENERATOR)
    set(CPACK_GENERATOR "DEB")
  endif()

  set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
  set(CPACK_STRIP_FILES 1)
  if(${CMAKE_VERSION} VERSION_GREATER "3.5")
    set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
  endif()
endif()

include(CPack)

set(CPACK_PACKAGE_VENDOR "Daniel Nicoletti")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_CONTACT "Daniel Nicoletti <dantti12@gmail.com>")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}-qt${QT_VERSION_MAJOR}")

if(UNIX)
  if(NOT CPACK_GENERATOR)
    set(CPACK_GENERATOR "DEB")
  endif()

  set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
  set(CPACK_STRIP_FILES 1)
  if(${CMAKE_VERSION} VERSION_GREATER "3.5")
    set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
  endif()
endif()

include(CPack)

Fix CPack creating -qtX packages

Fix CPack creating -qtX packages


# Try to find the Botan library.
#
# Defines:
#
#  BOTAN_FOUND - set if the system has the Botan library
#  BOTAN_LIBRARIES - the linker libraries needed to use the Botan library
#  BOTAN_INCLUDE_DIRS - the path to the include files of the Botan library
#
# Copyright (c) 2017 Peter Nirschl <peter.nirschl@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#

if (NOT BOTAN_FOUND)
  include (FindPkgConfig)
  pkg_search_module (BOTAN QUIET botan-1.10 botan-1.9 botan-1.8 botan)
endif ()

if (BOTAN_FOUND)
  # try to compile and link a minimal sample program against libbotan
  try_compile (HAS_BOTAN_4SURE
    "${CMAKE_BINARY_DIR}"
    "${PROJECT_SOURCE_DIR}/src/plugins/crypto/compile_botan.cpp"
    CMAKE_FLAGS
      -DINCLUDE_DIRECTORIES:STRING=${BOTAN_INCLUDE_DIRS}
      -DLINK_LIBRARIES:PATH=${BOTAN_LIBRARIES}
  )

  if (NOT HAS_BOTAN_4SURE)
    message (STATUS "Botan compile/linker test failed")
    set (BOTAN_FOUND OFF)
    set (BOTAN_INCLUDE_DIR "")
    set (BOTAN_LIBRARIES "")
  endif ()

  unset (HAS_BOTAN_4SURE)
endif ()

Botan: Remove useless whitespace from CMake code


# Bison handling

MACRO(FIND_BISON)
	IF(NOT BISON_EXECUTABLE)
		MESSAGE("-- Looking for bison executable")
		FIND_PROGRAM(BISON_EXECUTABLE bison)
		IF(NOT BISON_EXECUTABLE)
			MESSAGE(FATAL_ERROR "bison not found - aborting")
		ENDIF(NOT BISON_EXECUTABLE)
	ENDIF(NOT BISON_EXECUTABLE)
ENDMACRO(FIND_BISON)

MACRO(ADD_BISON_SOURCE f_src f_dest)
	ADD_CUSTOM_COMMAND(SOURCE ${f_src}
		COMMAND ${BISON_EXECUTABLE}
		ARGS ${f_src} -o ${f_dest}
		OUTPUT ${f_dest})
	SET_SOURCE_FILES_PROPERTIES(${f_dest} GENERATED)
ENDMACRO(ADD_BISON_SOURCE f_src f_dest)

# Bison handling

MACRO(FIND_BISON)
	IF(NOT BISON_EXECUTABLE)
		MESSAGE("-- Looking for bison executable")
		FIND_PROGRAM(BISON_EXECUTABLE bison)
		IF(NOT BISON_EXECUTABLE)
			MESSAGE(FATAL_ERROR "bison not found - aborting")
		ENDIF(NOT BISON_EXECUTABLE)
	ENDIF(NOT BISON_EXECUTABLE)
ENDMACRO(FIND_BISON)

MACRO(ADD_BISON_SOURCE f_src f_dest)
	ADD_CUSTOM_COMMAND(SOURCE ${f_src}
		COMMAND ${BISON_EXECUTABLE}
		ARGS ${f_src} -o ${f_dest}
		OUTPUT ${f_dest}
		DEPENDS ${f_src})
	SET_SOURCE_FILES_PROPERTIES(${f_dest} GENERATED)
ENDMACRO(ADD_BISON_SOURCE f_src f_dest)

Fix missing dependency in ADD_BISON_SOURCE


# Find the native XML2 includes and library
#
# XML2_INCLUDE_DIRS - where to find header files.
# XML2_LIBRARIES - List of libraries.
# XML2_FOUND - True if XML2 is found.

# Find the include path
find_path(XML2_INCLUDE_DIR libxml2/libxml/xpath.h)

find_library(XML2_LIBRARY NAMES xml2)

if (XML2_LIBRARY AND XML2_INCLUDE_DIR)
    SET(XML2_FOUND "YES")
endif (XML2_LIBRARY AND XML2_INCLUDE_DIR)

if (XML2_FOUND)
   message(STATUS "Found XML2: ${XML2_LIBRARY} ${XML2_INCLUDE_DIR}")
else (XML2_FOUND)
   message(STATUS "Could not find XML2 library")
endif (XML2_FOUND)

MARK_AS_ADVANCED(
  XML2_LIBRARY
  XML2_INCLUDE_DIR
  XML2_FOUND
)

Add helper for finding XML2 library

Add helper for finding XML2 library