SET(THIRDPARTY_BUILD_METIS ON CACHE BOOL
    "Build ModMetis library from ThirdParty")

IF (THIRDPARTY_BUILD_METIS)
    INCLUDE(ExternalProject)
    EXTERNALPROJECT_ADD(
        modmetis-5.1.0
        PREFIX ${TPSRC}
        URL ${TPURL}/modmetis-5.1.0.tar.bz2
        URL_MD5 "8f8313a768e4611d1748d10f88f3d702"
        DOWNLOAD_DIR ${TPSRC}
        CONFIGURE_COMMAND ${CMAKE_COMMAND}
            -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
            -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
            -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist
            -DCMAKE_C_FLAGS:STRING=-fPIC
            -DGKLIB_PATH:PATH=${TPSRC}/src/modmetis-5.1.0/GKlib
            ${TPSRC}/src/modmetis-5.1.0
    )
    SET(METIS_LIB metis CACHE FILEPATH
        "METIS library" FORCE)
    MARK_AS_ADVANCED(METIS_LIB)
    LINK_DIRECTORIES(${TPSRC}/dist/lib)
    INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
    MESSAGE(STATUS "Build Metis: ${TPSRC}/dist/lib/lib${METIS_LIB}.a")
ELSE (THIRDPARTY_BUILD_METIS)
    INCLUDE (FindMetis)
ENDIF (THIRDPARTY_BUILD_METIS)

SET(THIRDPARTY_BUILD_METIS ON CACHE BOOL
    "Build ModMetis library from ThirdParty")

IF (THIRDPARTY_BUILD_METIS)
    INCLUDE(ExternalProject)
    EXTERNALPROJECT_ADD(
        modmetis-5.1.0
        PREFIX ${TPSRC}
        URL ${TPURL}/modmetis-5.1.0_1.tar.bz2
        URL_MD5 "6c6816aea0f53db6c71b1d98ed4ad42b"
        DOWNLOAD_DIR ${TPSRC}
        CONFIGURE_COMMAND ${CMAKE_COMMAND}
            -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
            -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
            -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist
            -DCMAKE_C_FLAGS:STRING=-fPIC
            -DGKLIB_PATH:PATH=${TPSRC}/src/modmetis-5.1.0/GKlib
            ${TPSRC}/src/modmetis-5.1.0
    )
    SET(METIS_LIB metis CACHE FILEPATH
        "METIS library" FORCE)
    MARK_AS_ADVANCED(METIS_LIB)
    LINK_DIRECTORIES(${TPSRC}/dist/lib)
    INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
    MESSAGE(STATUS "Build Metis: ${TPSRC}/dist/lib/lib${METIS_LIB}.a")
ELSE (THIRDPARTY_BUILD_METIS)
    INCLUDE (FindMetis)
ENDIF (THIRDPARTY_BUILD_METIS)

Update to ensure Metis compiles correctly on this branch with Max OSX


## Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
## Use of this source code is governed by a BSD-style license that can be
## found in the COPYING file.

# If someone is using qibuild configure, includes
# the dependencies.cmake file
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake)
  include(${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake)
endif()

get_filename_component(_this_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
set(_qibuild_path ${_this_dir}/..)

list(FIND CMAKE_MODULE_PATH "${_qibuild_path}" _found)
if(_found STREQUAL "-1")
  list(APPEND CMAKE_MODULE_PATH "${_qibuild_path}")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} CACHE INTERNAL ""  FORCE)

include(${_this_dir}/general.cmake)

## Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
## Use of this source code is governed by a BSD-style license that can be
## found in the COPYING file.

# If someone is using qibuild configure, includes
# the dependencies.cmake file
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake)
  include(${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake)
endif()

get_filename_component(_this_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
set(_qibuild_path ${_this_dir}/..)

list(FIND CMAKE_MODULE_PATH "${_qibuild_path}" _found)
if(_found STREQUAL "-1")
  list(APPEND CMAKE_MODULE_PATH "${_qibuild_path}")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} CACHE INTERNAL ""  FORCE)

# So that find_package(qibuild) works:
set(qibuild_DIR ${_this_dir} CACHE INTERNAL "" FORCE)
include(${_this_dir}/general.cmake)

Make sure find_package(qibuild) works when not using `qibuild configure`

This should fix #6872

Change-Id: Ia77bc9a2ee539d3867ebd1b5d0b518cfdab590c3
Reviewed-on: http://gerrit.aldebaran.lan:8080/91
Reviewed-by: Cedric GESTES <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Tested-by: Cedric GESTES <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>


# SPDX-License-Identifier: Apache-2.0

if(EXISTS ${SOC_DIR}/${ARCH}/${SOC_PATH}/tune_build_ops.cmake)
  include(${SOC_DIR}/${ARCH}/${SOC_PATH}/tune_build_ops.cmake)
endif()

if(NOT DEFINED GCC_ARC_TUNED_CPU)
  set(GCC_ARC_TUNED_CPU ${GCC_M_CPU})
endif()

list(APPEND TOOLCHAIN_C_FLAGS -mcpu=${GCC_ARC_TUNED_CPU})
list(APPEND TOOLCHAIN_LD_FLAGS -mcpu=${GCC_ARC_TUNED_CPU})

Add -mcpu flag to TOOLCHAIN_LD_FLAGS

arch/arc: Add -mcpu flag to TOOLCHAIN_LD_FLAGS

Make sure the linker knows what the target is, in case it needs to find
additional target-specific libraries (like picolibc).

Signed-off-by: Keith Packard <fd7f967895e9f35e58ec8a62a847a54d7fa7275f@keithp.com>


find_path(GLM_INCLUDE_DIR glm.hpp
	PATH_SUFFIXES include/glm include
)

mark_as_advanced(GLM_INCLUDE_DIR)

if(GLM_INCLUDE_DIR)
    set(GLM_FOUND TRUE)
endif()

if(GLM_FOUND)
    if(NOT GLM_FIND_QUIETLY)
        message(STATUS "Found GLM")
    endif()
else()
    if(GLM_FIND_REQUIRED)
        message(FATAL_ERROR "Could not find GLM")
    endif()
endif()

find_path(GLM_INCLUDE_DIR glm/glm.hpp
	PATH_SUFFIXES include
)

mark_as_advanced(GLM_INCLUDE_DIR)

if(GLM_INCLUDE_DIR)
    set(GLM_FOUND TRUE)
endif()

if(GLM_FOUND)
    if(NOT GLM_FIND_QUIETLY)
        message(STATUS "Found GLM")
    endif()
else()
    if(GLM_FIND_REQUIRED)
        message(FATAL_ERROR "Could not find GLM")
    endif()
endif()

Make sure glm is found so including the glm prefix


##############################################################################
# Copyright (c) 2013 Leon Lynch
#
# This file is licensed under the terms of the MIT license.
# See LICENSE file.
##############################################################################

find_path(GLM_INCLUDE_DIR "glm/glm.hpp")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLM
	REQUIRED_VARS GLM_INCLUDE_DIR
	FAIL_MESSAGE "Failed to find GLM header"
)

mark_as_advanced(GLM_INCLUDE_DIR)

##############################################################################
# Copyright (c) 2013 Leon Lynch
#
# This file is licensed under the terms of the MIT license.
# See LICENSE file.
##############################################################################

# This will define:
#
# GLM_FOUND
# GLM_INCLUDE_DIR
# GLM_VERSION

find_path(GLM_INCLUDE_DIR "glm/glm.hpp")
find_file(GLM_SETUP_HPP NAMES "glm/core/setup.hpp" "glm/detail/setup.hpp")

if(GLM_SETUP_HPP)
	file(STRINGS
		${GLM_SETUP_HPP}
		GLM_VERSION_DEFINES
		REGEX "#define[ \t]+GLM_VERSION_[A-Z]+[ \t]+[0-9]+$"
	)
	if(GLM_VERSION_DEFINES)
		foreach(item IN ITEMS MAJOR MINOR PATCH REVISION)
			string(REGEX REPLACE ".*#define[ \t]+GLM_VERSION_${item}[ \t]+([0-9]+).*" "\\1" GLM_VERSION_${item} ${GLM_VERSION_DEFINES})
		endforeach()
	endif()
	set(GLM_VERSION "${GLM_VERSION_MAJOR}.${GLM_VERSION_MINOR}.${GLM_VERSION_PATCH}.${GLM_VERSION_REVISION}")
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLM
	REQUIRED_VARS GLM_INCLUDE_DIR GLM_SETUP_HPP
	VERSION_VAR GLM_VERSION
)

mark_as_advanced(GLM_FOUND GLM_INCLUDE_DIR GLM_SETUP_HPP GLM_VERSION_MAJOR GLM_VERSION_MINOR GLM_VERSION_PATCH GLM_VERSION_REVISION GLM_VERSION)

Improve CMake module for GLM

Improve CMake module for GLM

* Parse version number from setup.hpp
* Document output variables
* Update advanced variables


# Copyright (c) 2014, Ruslan Baratov
# All rights reserved.

if(DEFINED POLLY_FLAGS_SANITIZE_THREAD_CMAKE_)
  return()
else()
  set(POLLY_FLAGS_SANITIZE_THREAD_CMAKE_ 1)
endif()

include(polly_add_cache_flag)

polly_add_cache_flag(CMAKE_CXX_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-fPIE")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-pie")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-g")

polly_add_cache_flag(CMAKE_C_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_C_FLAGS "-fPIE")
polly_add_cache_flag(CMAKE_C_FLAGS "-pie")
polly_add_cache_flag(CMAKE_C_FLAGS "-g")

# Copyright (c) 2014-2017, Ruslan Baratov
# All rights reserved.

if(DEFINED POLLY_FLAGS_SANITIZE_THREAD_CMAKE_)
  return()
else()
  set(POLLY_FLAGS_SANITIZE_THREAD_CMAKE_ 1)
endif()

include(polly_add_cache_flag)

polly_add_cache_flag(CMAKE_CXX_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-g")

polly_add_cache_flag(CMAKE_C_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_C_FLAGS "-g")

# NOTE:
#
#   PIE flags removed because it's not a requirement anymore:
#   * https://github.com/google/sanitizers/issues/503#issuecomment-137946595
#
#   With PIE flags sanitizer doesn't work on Ubuntu 14.04/16.04
#   producing runtime error "ThreadSanitizer: unexpected memory mapping":
#   * https://github.com/google/sanitizers/issues/503

Remove 'PIE' for Clang ThreadSanitizer

Remove 'PIE' for Clang ThreadSanitizer


# Copyright 2017 gRPC authors.
#
# 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.

option(gRPC_MSVC_STATIC_RUNTIME "Link with static msvc runtime libraries" OFF)

if(gRPC_MSVC_STATIC_RUNTIME)
  # switch from dynamic to static linking of msvcrt
  foreach(flag_var
    CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
    CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
    CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
    CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)

    if(flag_var MATCHES "/MD")
      string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
    endif()
  endforeach()
endif()

# Copyright 2017 gRPC authors.
#
# 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.

option(gRPC_MSVC_STATIC_RUNTIME "Link with static msvc runtime libraries" OFF)

if(gRPC_MSVC_STATIC_RUNTIME)
  # switch from dynamic to static linking of msvcrt
  foreach(flag_var
    CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
    CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
    CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
    CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)

    if(${flag_var} MATCHES "/MD")
      string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
    endif()
  endforeach()
endif()

Fix regression in MSVC runtime flag

Fix regression in MSVC runtime flag

In attempting to fix a CMake style issue, a variable dereference
was accidentally removed that should have been left alone. Restore
it to how it was.


cmake_minimum_required(VERSION 3.1)
project(pybind11-download NONE)

include(ExternalProject)
ExternalProject_Add(pybind11
    GIT_REPOSITORY    https://github.com/pybind/pybind11.git
    GIT_TAG           5ef1af138dc3ef94c05274ae554e70d64cd589bf # 2.2.3 + #1371 merged
    SOURCE_DIR        "${CMAKE_BINARY_DIR}/pybind11"
    BINARY_DIR        ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND     ""
    INSTALL_COMMAND   ""
    TEST_COMMAND      ""
    )

cmake_minimum_required(VERSION 3.1)
project(pybind11-download NONE)

include(ExternalProject)
ExternalProject_Add(pybind11
    GIT_REPOSITORY    https://github.com/pybind/pybind11.git
    GIT_TAG           v2.2.4
    SOURCE_DIR        "${CMAKE_BINARY_DIR}/pybind11"
    BINARY_DIR        ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND     ""
    INSTALL_COMMAND   ""
    TEST_COMMAND      ""
    )

Update pybind dependency to v2.2.4

Update pybind dependency to v2.2.4


function(find_compiler_rt_library name variable)
  set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${SANITIZER_COMMON_CFLAGS}
      "--rtlib=compiler-rt" "--print-libgcc-file-name")
  if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_TARGET)
    list(APPEND CLANG_COMMAND "--target=${CMAKE_CXX_COMPILER_TARGET}")
  endif()
  get_property(SANITIZER_CXX_FLAGS CACHE CMAKE_CXX_FLAGS PROPERTY VALUE)
  string(REPLACE " " ";" SANITIZER_CXX_FLAGS "${SANITIZER_CXX_FLAGS}")
  list(APPEND CLANG_COMMAND ${SANITIZER_CXX_FLAGS})
  execute_process(
      COMMAND ${CLANG_COMMAND}
      RESULT_VARIABLE HAD_ERROR
      OUTPUT_VARIABLE LIBRARY_FILE
  )
  string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
  string(REPLACE "builtins" "${name}" LIBRARY_FILE "${LIBRARY_FILE}")
  if (NOT HAD_ERROR AND EXISTS "${LIBRARY_FILE}")
    message(STATUS "Found compiler-rt ${name} library: ${LIBRARY_FILE}")
    set(${variable} "${LIBRARY_FILE}" PARENT_SCOPE)
  else()
    message(STATUS "Failed to find compiler-rt ${name} library")
  endif()
endfunction()

function(find_compiler_rt_library name variable)
  set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${SANITIZER_COMMON_CFLAGS}
      "--rtlib=compiler-rt" "--print-libgcc-file-name")
  if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_TARGET)
    list(APPEND CLANG_COMMAND "--target=${CMAKE_CXX_COMPILER_TARGET}")
  endif()
  get_property(SANITIZER_CXX_FLAGS CACHE CMAKE_CXX_FLAGS PROPERTY VALUE)
  string(REPLACE " " ";" SANITIZER_CXX_FLAGS "${SANITIZER_CXX_FLAGS}")
  list(APPEND CLANG_COMMAND ${SANITIZER_CXX_FLAGS})
  execute_process(
      COMMAND ${CLANG_COMMAND}
      RESULT_VARIABLE HAD_ERROR
      OUTPUT_VARIABLE LIBRARY_FILE
  )
  string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
  file(TO_CMAKE_PATH "${LIBRARY_FILE}" LIBRARY_FILE)
  string(REPLACE "builtins" "${name}" LIBRARY_FILE "${LIBRARY_FILE}")
  if (NOT HAD_ERROR AND EXISTS "${LIBRARY_FILE}")
    message(STATUS "Found compiler-rt ${name} library: ${LIBRARY_FILE}")
    set(${variable} "${LIBRARY_FILE}" PARENT_SCOPE)
  else()
    message(STATUS "Failed to find compiler-rt ${name} library")
  endif()
endfunction()

Add a missing case of TO_CMAKE_PATH

[CMake] Add a missing case of TO_CMAKE_PATH

This fixes building sanitizers for mingw natively.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@347646 91177308-0d34-0410-b5e6-96231b3b80d8


# 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}_ISSET MATCHES "^${option}_ISSET")
    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)
      IF(DEFINED ${option})
        SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
      ENDIF(DEFINED ${option})
      SET(${option} ${force})
    ENDIF(${option}_AVAILABLE)
  ELSE(${option}_ISSET MATCHES "^${option}_ISSET")
    SET(${option} "${${option}_ISSET}")
  ENDIF(${option}_ISSET MATCHES "^${option}_ISSET")
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}_ISSET MATCHES "^${option}_ISSET$")
    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)
      IF(${option} MATCHES "^${option}$")
      ELSE(${option} MATCHES "^${option}$")
        SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
      ENDIF(${option} MATCHES "^${option}$")
      SET(${option} ${force})
    ENDIF(${option}_AVAILABLE)
  ELSE(${option}_ISSET MATCHES "^${option}_ISSET$")
    SET(${option} "${${option}_ISSET}")
  ENDIF(${option}_ISSET MATCHES "^${option}_ISSET$")
ENDMACRO(VTK_DEPENDENT_OPTION)

COMP: Fix for CMake 1.8, which does not have DEFINED test.


SET (CMAKE_C_COMPILER "gcc")
SET (CMAKE_CXX_COMPILER "g++")

SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -std=c99 -pedantic -O2 -flto -fwhole-program -fomit-frame-pointer" CACHE STRING "" FORCE)
#SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -std=c99 -pedantic -O0 -ggdb" CACHE STRING "" FORCE)
SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)

MESSAGE (STATUS "Found gcc toolchain")

SET (CMAKE_C_COMPILER "gcc")
SET (CMAKE_CXX_COMPILER "g++")

SET(CMAKE_C_FLAGS "-pipe -Wall -Wshadow -Wextra -Wwrite-strings -std=c99 -pedantic -O2 -flto -fwhole-program -fomit-frame-pointer" CACHE STRING "" FORCE)
#SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -std=c99 -pedantic -O0 -ggdb" CACHE STRING "" FORCE)
SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)

MESSAGE (STATUS "Found gcc toolchain")

Add compile switch to warn about shadowed variables or functions.


# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Zephyr cmake system looks into ${TOOLCHAIN_ROOT}, but we just send
# this out to the copy in ${ZEPHYR_BASE}.
include("${ZEPHYR_BASE}/cmake/compiler/gcc/target.cmake")

# no_libgcc support has been removed in upstream zephyr, but we still
# depend on it.  This ugly hack emulates what it used to do by undoing
# what some of target.cmake does.
if(no_libgcc)
  list(REMOVE_ITEM TOOLCHAIN_LIBS gcc)
endif()

Bring no_libgcc back to v2.7

zephyr: Bring no_libgcc back to v2.7

no_libgcc support was removed in upstream Zephyr OS, and we still
depend on it to make coreboot-sdk work, as well as to add EC software
panic handling for divide by zero.

This hack emulates how no_libgcc used to function by removing -lgcc
from the linker flags if no_libgcc is set.

BUG=b:198824039
BRANCH=none
TEST=compile volteer with v2.7_rc2

Signed-off-by: Jack Rosenthal <d3f605bef1867f59845d4ce6e4f83b8dc9e4e0ae@chromium.org>
Change-Id: I9e67277dd9f1f1b0dc36687b5255a99f82117a3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3179311
Commit-Queue: Denis Brockus <6b21e8190fb5e373363fb95271367073a16474ef@chromium.org>
Reviewed-by: Denis Brockus <6b21e8190fb5e373363fb95271367073a16474ef@chromium.org>


itk_fetch_module(SkullStrip
  "A class to perform automatic skull-stripping for neuroimage analysis."
  GIT_REPOSITORY https://github.com/lorensen/skullStrip.git
  GIT_TAG master
  )

itk_fetch_module(SkullStrip
  "A class to perform automatic skull-stripping for neuroimage analysis."
  GIT_REPOSITORY https://github.com/lorensen/skullStrip.git
  # April 7, 2015 Fixed KWStyle issues
  GIT_TAG 2c4ded1afd24607de921e37cf56693cc5fa05570
  )

Update to KWStyle conformant version

ENH: Update to KWStyle conformant version

SkullStrip is now KWStyle conformant.

Change-Id: Ic125b6f1aacdc1fabf550cec0a43d1ac2ecb05fd


# Always include srcdir and builddir in include path
# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in
# about every subdir
# since cmake 2.4.0
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources
# are prefered over the already installed ones
# since cmake 2.4.1
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)

# Use colored output
# since cmake 2.4.0
set(CMAKE_COLOR_MAKEFILE ON)

# Create the compile command database for clang by default
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Always build with -fPIC
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Avoid source tree pollution
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)

Disable in source builds the cmake way

cmake: Disable in source builds the cmake way

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


CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)

find_package(Git)
execute_process(
     COMMAND ${GIT_EXECUTABLE} describe --exact-match
     OUTPUT_VARIABLE VCS_VERSION
     ERROR_VARIABLE _git_error_msg
     OUTPUT_STRIP_TRAILING_WHITESPACE
)
if("${VCS_VERSION}" STREQUAL "")
     execute_process(
          COMMAND ${GIT_EXECUTABLE} log --pretty=format:%cd-g%h --date=short --abbrev-commit
          OUTPUT_VARIABLE VCS_VERSION
          ERROR_VARIABLE _git_error_msg
          OUTPUT_STRIP_TRAILING_WHITESPACE
     )
endif()
message(STATUS "VCS version: " ${VCS_VERSION})
configure_file(${SRC} ${DST} @ONLY)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)

find_package(Git)
execute_process(
     COMMAND ${GIT_EXECUTABLE} describe --exact-match
     OUTPUT_VARIABLE VCS_VERSION
     ERROR_VARIABLE _git_error_msg
     OUTPUT_STRIP_TRAILING_WHITESPACE
)
if("${VCS_VERSION}" STREQUAL "")
     execute_process(
          COMMAND ${GIT_EXECUTABLE} log --pretty=format:%cd-g%h --date=short --abbrev-commit -1
          OUTPUT_VARIABLE VCS_VERSION
          ERROR_VARIABLE _git_error_msg
          OUTPUT_STRIP_TRAILING_WHITESPACE
     )
endif()
message(STATUS "VCS version: " ${VCS_VERSION})
configure_file(${SRC} ${DST} @ONLY)

cmake: Fix VCS_VERSION command, generate only one commit ID


if(DEFINED HUNTER_CMAKE_PROJECTS_LIB_CPP_PRE_HUNTER_CMAKE_)
  return()
else()
  set(HUNTER_CMAKE_PROJECTS_LIB_CPP_PRE_HUNTER_CMAKE_ 1)
endif()

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

hunter_add_version(
    PACKAGE_NAME lib-cpp-pre
    VERSION "1.2.2"
    URL "https://github.com/daminetreg/lib-cpp-pre/archive/v1.2.2.tar.gz"
    SHA1 6733a0abd9f74bd67e4ef521e7677ad9437cdba1
)

hunter_add_version(
    PACKAGE_NAME lib-cpp-pre
    VERSION "1.3.2"
    URL "https://github.com/daminetreg/lib-cpp-pre/archive/v1.3.2.tar.gz"
    SHA1 8afe8c9d58a3f82dae5a92b2865cf243f3dc2f71
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_download(PACKAGE_NAME lib-cpp-pre)

if(DEFINED HUNTER_CMAKE_PROJECTS_LIB_CPP_PRE_HUNTER_CMAKE_)
  return()
else()
  set(HUNTER_CMAKE_PROJECTS_LIB_CPP_PRE_HUNTER_CMAKE_ 1)
endif()

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

hunter_add_version(
    PACKAGE_NAME lib-cpp-pre
    VERSION "1.2.2"
    URL "https://github.com/daminetreg/lib-cpp-pre/archive/v1.2.2.tar.gz"
    SHA1 6733a0abd9f74bd67e4ef521e7677ad9437cdba1
)

hunter_add_version(
    PACKAGE_NAME lib-cpp-pre
    VERSION "1.3.2"
    URL "https://github.com/daminetreg/lib-cpp-pre/archive/v1.3.2.tar.gz"
    SHA1 e91a1364d88087d162b9fb05309cb47702ec25a2
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_download(PACKAGE_NAME lib-cpp-pre)

Fix sha sum of lib-cpp-pre v1.3.2

Fix sha sum of lib-cpp-pre v1.3.2


set_ifndef(STLINK_FW stlink)

if(STLINK_FW STREQUAL jlink)
  board_runner_args(jlink "--device=stm32f070rb" "--speed=4000")
  include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
elseif(STLINK_FW STREQUAL stlink)
  include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake)
endif()

nucleo_f070rb: Add JLink tools for debug and download support

Segger provide a firmware makes the ST-LINK on-board compatible with
J-Link OB, allowing users to take advantage of most J-Link features
such as RTT(Real Time Transfer).

Signed-off-by: qianfan Zhao <0d01fab1932da5a147025f14dd5829cf5bf10d4d@163.com>


# message("In package CTK config")
find_package(CTK REQUIRED)
list(APPEND ALL_INCLUDE_DIRECTORIES ${CTK_INCLUDE_DIRS})
list(APPEND ALL_LIBRARIES ${CTK_LIBRARIES})
link_directories(${CTK_LIBRARY_DIRS} ${CTK_EXTERNAL_LIBRARY_DIRS})

# Temporary workaround for CTK bug of not exposing external project library dirs.
# Should be removed as soon as this is fixed in CTK. (espakm)
if(EXISTS "${CTK_DIR}/qRestAPI-build/qRestAPIConfig.cmake")
  include(${CTK_DIR}/qRestAPI-build/qRestAPIConfig.cmake)
  link_directories(${qRestAPI_LIBRARY_DIRS})
endif()
if(EXISTS "${CTK_DIR}/QuaZip-build/QuaZipConfig.cmake")
  include(${CTK_DIR}/QuaZip-build/QuaZipConfig.cmake)
  link_directories(${QUAZIP_LIBRARY_DIRS})
endif()

Revert "Revert workaround for CTK external library dirs"

This reverts commit 0d653d2c0ba97ca142be15287ffe64df6d5beea4.


# module openvr

option(TORQUE_OPENVR "Enable openvr module" OFF)
mark_as_advanced(TORQUE_OPENVR)
if(TORQUE_OPENVR)
	if(TORQUE_OCULUSVR_SDK_PATH STREQUAL "")
		set(TORQUE_OPENVR_SDK_PATH "" CACHE PATH "openvr library path" FORCE)
	endif()
else() # hide variable
    set(TORQUE_OPENVR_SDK_PATH "" CACHE INTERNAL "" FORCE)
endif()

if(TORQUE_OPENVR)
	# Source
	addPathRec( "${srcDir}/platform/input/openvr" )

	# Includes
	addInclude( "${TORQUE_OPENVR_SDK_PATH}/headers" )

	# Libs
	if( WIN32 )
		if( TORQUE_CPU_X64 )
		link_directories( "${TORQUE_OPENVR_SDK_PATH}/lib/win64" )
		else()
		link_directories( "${TORQUE_OPENVR_SDK_PATH}/lib/win32" )
		endif()
		addLib( "openvr_api" )
	endif()
endif()

# module openvr

option(TORQUE_OPENVR "Enable openvr module" OFF)
mark_as_advanced(TORQUE_OPENVR)
if(TORQUE_OPENVR)
	if(TORQUE_OPENVR_SDK_PATH STREQUAL "")
		set(TORQUE_OPENVR_SDK_PATH "" CACHE PATH "openvr library path" FORCE)
	endif()
else() # hide variable
	set(TORQUE_OPENVR_SDK_PATH "" CACHE INTERNAL "" FORCE)
endif()

if(TORQUE_OPENVR)
	# Source
	addPathRec( "${srcDir}/platform/input/openvr" )

	# Includes
	addInclude( "${TORQUE_OPENVR_SDK_PATH}/headers" )

	# Libs
	if( WIN32 )
		if( TORQUE_CPU_X64 )
		link_directories( "${TORQUE_OPENVR_SDK_PATH}/lib/win64" )
		else()
		link_directories( "${TORQUE_OPENVR_SDK_PATH}/lib/win32" )
		endif()
		addLib( "openvr_api" )
	endif()
endif()

Fix cmake file for openvr

Fix cmake file for openvr


# This config script tries to locate the project either in its source tree
# of from an install location.
#
# Please adjust the list of submodules to search for.

# List of modules
set(MODULE_NAMES
    baselib
    fiblib
)

# Macro to search for a specific module
macro(find_module FILENAME)
    if(EXISTS "${FILENAME}")
        set(MODULE_FOUND TRUE)
        include("${FILENAME}")
    endif()
endmacro()

# Macro to search for all modules
macro(find_modules PREFIX)
    foreach(module_name ${MODULE_NAMES})
        find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
    endforeach(module_name)
endmacro()

# Try install location
set(MODULE_FOUND FALSE)
find_modules("cmake")

if(MODULE_FOUND)
    return()
endif()

# Try common build locations
find_modules("build/cmake")
find_modules("build-debug/cmake")

# This config script tries to locate the project either in its source tree
# of from an install location.
#
# Please adjust the list of submodules to search for.

# List of modules
set(MODULE_NAMES
    baselib
    fiblib
)

# Macro to search for a specific module
macro(find_module FILENAME)
    if(EXISTS "${FILENAME}")
        set(MODULE_FOUND TRUE)
        include("${FILENAME}")
    endif()
endmacro()

# Macro to search for all modules
macro(find_modules PREFIX)
    foreach(module_name ${MODULE_NAMES})
        find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
    endforeach(module_name)
endmacro()

# Try install location
set(MODULE_FOUND FALSE)
find_modules("cmake")

if(MODULE_FOUND)
    return()
endif()

# Try common build locations
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
    find_modules("build-debug/cmake")
else()
    find_modules("build/cmake")
endif()

Extend template config script to chose either build or build-debug directory


Fix dependeces between build-{ep} targets


# fix the zdll.lib issue (qt wants the library to be named differently hence
# skipping using our zlib on windows. Let qt build its own zlib.)
add_external_project_or_use_system(
  qt
  BUILD_IN_SOURCE 1
  CONFIGURE_COMMAND <SOURCE_DIR>/configure
                    -prefix <INSTALL_DIR>
                    -confirm-license
                    -opensource
                    -release
                    -no-audio-backend
                    -no-dbus
                    -no-declarative-debug
                    -no-multimedia
                    -no-openssl
                    -no-phonon
                    -no-script
                    -no-scripttools
                    -nomake demos
                    -nomake examples
                    -nomake tests
                    -qt-libjpeg
                    -qt-libtiff
                    #-webkit
                    -xmlpatterns
                    -I <INSTALL_DIR>/include
                    -L <INSTALL_DIR>/lib
  BUILD_COMMAND     ${NMAKE_PATH}
  INSTALL_COMMAND   ${NMAKE_PATH} install
)

set(compiler_platform win32-msvc2012)
if (false)
  set(compiler_platform win32-g++)
endif()
# fix the zdll.lib issue (qt wants the library to be named differently hence
# skipping using our zlib on windows. Let qt build its own zlib.)
add_external_project_or_use_system(
  qt
  BUILD_IN_SOURCE 1
  CONFIGURE_COMMAND <SOURCE_DIR>/configure
                    -prefix <INSTALL_DIR>
                    -confirm-license
                    -opensource
                    -release
                    -no-audio-backend
                    -no-dbus
                    -no-declarative-debug
                    -no-multimedia
                    -no-openssl
                    -no-phonon
                    -no-script
                    -no-scripttools
                    -nomake demos
                    -nomake examples
                    -nomake tests
                    -qt-libjpeg
                    -qt-libtiff
                    #-webkit
                    -no-webkit
                    -platform ${compiler_platform}
                    -xmlpatterns
                    -I <INSTALL_DIR>/include
                    -L <INSTALL_DIR>/lib
  BUILD_COMMAND     ${NMAKE_PATH}
  INSTALL_COMMAND   ${NMAKE_PATH} install
)

Update windows flags for Qt 4.8.6 (assumes msvc 2012 for now)


#
# ITK WikiExamples
#

# If the environment var WikiExamplesTag exists, use it
if (NOT DEFINED ENV{WikiExamplesTag})
  set(GIT_TAG 07f0e1622ca3eeed8b9c5b9665b066b785af86e8)
else()
  set(GIT_TAG $ENV{WikiExamplesTag})
endif()

itk_fetch_module(WikiExamples
  "A collection of examples that illustrate how to use ITK."
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
  GIT_TAG ${GIT_TAG}
  )

#
# ITK WikiExamples
#
itk_fetch_module(WikiExamples
  "A collection of examples that illustrate how to use ITK."
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
  GIT_TAG 07f0e1622ca3eeed8b9c5b9665b066b785af86e8
  )

STYLE: Remove custom environmental override for WikiExamples


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

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

# "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 "1b93fa5bce981ec0624688db407231cf8e822b6d")

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

Hotfix: Update FW with fix for crash w/ depth-rgb aligment


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

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

# "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 "dd9a974d93b0951de921c9223c434f8ce1960699")

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

Update FW: implement RGB - Mono sync: capture time and sequence numbers


##############################################################################
#
# Library:   TubeTK
#
# Copyright 2010 Kitware Inc. 28 Corporate Drive,
# Clifton Park, NY, 12065, USA.
#
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
set(DOCUMENTATION
  "ITK conformant classes available as an ITK external module")

itk_module( TubeTKITK
  DEPENDS
    ITKCommon ITKSpatialObjects MinimalPathExtraction
  EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
)

##############################################################################
#
# Library:   TubeTK
#
# Copyright 2010 Kitware Inc. 28 Corporate Drive,
# Clifton Park, NY, 12065, USA.
#
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
set(DOCUMENTATION
  "ITK conformant classes available as an ITK external module")

itk_module( TubeTKITK
  DEPENDS
    ITKCommon ITKSpatialObjects
  EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
)

COMP: Remove explicit dependency on MinimalPathExtraction module for itktubetk


# VTK version number components.
set(VTK_MAJOR_VERSION 6)
set(VTK_MINOR_VERSION 0)
set(VTK_BUILD_VERSION 0)

# VTK version number components.
set(VTK_MAJOR_VERSION 6)
set(VTK_MINOR_VERSION 1)
set(VTK_BUILD_VERSION 0)

Increment version to VTK 6.1.0

Increment version to VTK 6.1.0

Change-Id: I754b471b2fe5b1fce74cf9d2848769583cfdd610


set(CTEST_SOURCE_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}")
set(CTEST_BINARY_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}/_build")

include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
set(CTEST_SITE "Travis")
set(CTEST_BUILD_NAME "Linux-$ENV{TRAVIS_BRANCH}")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
PYTHON_COVERAGE:BOOL=ON
")

ctest_start("Continuous")
ctest_configure()
ctest_build()
ctest_test(PARALLEL_LEVEL 3 RETURN_VALUE res)
ctest_coverage()
file(REMOVE "${CTEST_BINARY_DIRECTORY}/coverage.xml")
ctest_submit()

if(NOT res EQUAL 0)
  message(FATAL_ERROR "Test failures occurred.")
endif()

set(CTEST_SOURCE_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}")
set(CTEST_BINARY_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}/_build")

include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
set(CTEST_SITE "Travis")
set(CTEST_BUILD_NAME "Linux-$ENV{TRAVIS_BRANCH}")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

ctest_start("Continuous")
ctest_configure()
ctest_build()
ctest_test(PARALLEL_LEVEL 3 RETURN_VALUE res)
ctest_coverage()
file(REMOVE "${CTEST_BINARY_DIRECTORY}/coverage.xml")
ctest_submit()

if(NOT res EQUAL 0)
  message(FATAL_ERROR "Test failures occurred.")
endif()

Remove duplicative cache value writing for travis


add_eslint_test(
  isic_archive "${PROJECT_SOURCE_DIR}/plugins/isic_archive/web_external/js"
  ESLINT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/plugins/isic_archive/web_external/js/.eslintrc.js"
  ESLINT_IGNORE_FILE "${PROJECT_SOURCE_DIR}/plugins/isic_archive/web_external/js/.eslintignore"
)

###############################################################################
#  Copyright Kitware Inc.
#
#  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.
###############################################################################

add_python_style_test(
  python_static_analysis_isic_archive_models
  "${CMAKE_CURRENT_LIST_DIR}/server/models"
)

add_eslint_test(
  js_static_analysis_isic_archive_external
  "${CMAKE_CURRENT_LIST_DIR}/web_external/js"
  ESLINT_CONFIG_FILE "${CMAKE_CURRENT_LIST_DIR}/web_external/js/.eslintrc.js"
  ESLINT_IGNORE_FILE "${CMAKE_CURRENT_LIST_DIR}/web_external/js/.eslintignore"
)

Add Python style tests to model classes

Add Python style tests to model classes


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

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

# "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 "35d45ad291a6f988becc9663b6e8b2d58d4de24c")

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

Update FW: fix enabling MIPI clocks for 4-lane ports


# - Find zlib
# Find the native ZLIB includes and library
#
#  ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
#  ZLIB_LIBRARIES   - List of libraries when using zlib.
#  ZLIB_FOUND       - True if zlib found.

IF (ZLIB_INCLUDE_DIR)
  # Already in cache, be silent
  SET(ZLIB_FIND_QUIETLY TRUE)
ENDIF (ZLIB_INCLUDE_DIR)

FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)

SET(ZLIB_NAMES z zlib zdll)
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES})

MARK_AS_ADVANCED(
  ZLIB_LIBRARY
  ZLIB_INCLUDE_DIR
  )

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_INCLUDE_DIR ZLIB_LIBRARY)

INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})

FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
FIND_LIBRARY(ZLIB_LIBRARY z)

MARK_AS_ADVANCED(ZLIB ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB "zlib is required" ZLIB_INCLUDE_DIR ZLIB_LIBRARY)

INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})

Adjust zlib find tool to be inline with the rest


find_package(Qt5 COMPONENTS ${Qt5_REQUIRED_COMPONENTS_BY_MODULE} REQUIRED QUIET)
foreach(_component ${Qt5_REQUIRED_COMPONENTS_BY_MODULE})
  list(APPEND ALL_LIBRARIES ${Qt5${_component}_LIBRARIES})
endforeach()

find_package(Qt5 COMPONENTS ${Qt5_REQUIRED_COMPONENTS_BY_MODULE} REQUIRED QUIET)

foreach(qt5_component ${Qt5_REQUIRED_COMPONENTS_BY_MODULE})
  list(APPEND ALL_LIBRARIES Qt5::${qt5_component})
endforeach()

Improve Qt5 package depends file

Improve Qt5 package depends file


#
# 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()

#
# 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 1)
#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()

Update release version to 2.0.1

Update release version to 2.0.1


# SampPlugin.cmake
#
# Functions:
#   add_samp_plugin(name [sources...])
#
# Supported platforms:
#   Windows
#   Linux
#
# Supported compilers:
#   GCC
#   MinGW
#   Microsoft Visual C++

function(add_samp_plugin name)
  add_library(${name} MODULE ${ARGN})

  set_target_properties(${name} PROPERTIES PREFIX "")

  if(CMAKE_COMPILER_IS_GNUCC)
    set_property(TARGET ${name} APPEND PROPERTY COMPILE_FLAGS "-m32")
    set_property(TARGET ${name} APPEND PROPERTY LINK_FLAGS    "-m32")
  endif()

  if(UNIX AND NOT WIN32)
    set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS "LINUX")
  endif()
endfunction()

# SampPlugin.cmake
#
# Functions:
#   add_samp_plugin(name [sources...])
#
# Supported platforms:
#   Windows
#   Linux
#
# Supported compilers:
#   GCC
#   MinGW
#   Microsoft Visual C++

function(add_samp_plugin name)
  add_library(${name} MODULE ${ARGN})

  set_target_properties(${name} PROPERTIES PREFIX "")

  if(CMAKE_COMPILER_IS_GNUCC)
    set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -m32")
    set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS    " -m32")
  endif()

  if(UNIX AND NOT WIN32)
    set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS "LINUX")
  endif()
endfunction()

Fix extra semicolon in compile/link flags


set(CTEST_SOURCE_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}")
set(CTEST_BINARY_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}/_build")

include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
set(CTEST_SITE Travis)
set(CTEST_BUILD_NAME "Linux-$ENV{TRAVIS_BRANCH}")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

ctest_start(Continuous)
ctest_configure()
ctest_test(RETURN_VALUE res)

if(NOT res EQUAL 0)
  message(FATAL_ERROR "Test failures occurred.")
endif()

set(CTEST_SOURCE_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}")
set(CTEST_BINARY_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}/_build")

set(CTEST_SITE Travis)
set(CTEST_BUILD_NAME "Linux-$ENV{TRAVIS_BRANCH}")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

ctest_start(Continuous)
ctest_configure()
ctest_test(RETURN_VALUE res)

if(NOT res EQUAL 0)
  message(FATAL_ERROR "Test failures occurred.")
endif()

Remove faulty line from travis CI cmake script


# FindBenchmark
# ---------
#
# Find google benchmark include dirs and libraries
#
# The following variables are optionally searched for defaults
# benchmark_ROOT_DIR:  Base directory where all benchmark components are found
#
# Once done this will define
# benchmark_FOUND - System has benchmark
# benchmark_INCLUDE_DIRS - The benchmark include directories
# benchmark_LIBRARIES - The libraries needed to use benchmark

find_path(benchmark_INCLUDE_DIR "benchmark/benchmark.h"
	PATHS ${benchmark_ROOT_DIR}
	PATH_SUFFIXES include
	NO_DEFAULT_PATH)
find_path(benchmark_INCLUDE_DIR "benchmark/benchmark.h")

find_library(benchmark_LIBRARY NAMES "benchmark"
	PATHS ${benchmark_ROOT_DIR}
	PATH_SUFFIXES lib lib64
	NO_DEFAULT_PATH)
find_library(benchmark_LIBRARY NAMES "benchmark")

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set benchmark_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(benchmark FOUND_VAR benchmark_FOUND
	REQUIRED_VARS benchmark_LIBRARY
	benchmark_INCLUDE_DIR)

if(benchmark_FOUND)
	set(benchmark_LIBRARIES ${benchmark_LIBRARY})
	set(benchmark_INCLUDE_DIRS ${benchmark_INCLUDE_DIR})
endif()

mark_as_advanced(benchmark_INCLUDE_DIR benchmark_LIBRARY)

# FindBenchmark
# ---------
#
# Find google benchmark include dirs and libraries
#
# The following variables are optionally searched for defaults
# benchmark_ROOT_DIR:  Base directory where all benchmark components are found
#
# Once done this will define
# benchmark_FOUND - System has benchmark
# benchmark_INCLUDE_DIRS - The benchmark include directories
# benchmark_LIBRARIES - The libraries needed to use benchmark

find_path(benchmark_INCLUDE_DIR "benchmark/benchmark.h"
	PATHS ${benchmark_ROOT_DIR}
	PATH_SUFFIXES include
	NO_DEFAULT_PATH)
find_path(benchmark_INCLUDE_DIR "benchmark/benchmark.h")

find_library(benchmark_LIBRARY NAMES "benchmark"
	PATHS ${benchmark_ROOT_DIR}
	PATH_SUFFIXES lib lib64
	NO_DEFAULT_PATH)
find_library(benchmark_LIBRARY NAMES "benchmark")

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set benchmark_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(benchmark FOUND_VAR benchmark_FOUND
	REQUIRED_VARS benchmark_LIBRARY
	benchmark_INCLUDE_DIR)

if (benchmark_FOUND AND NOT TARGET benchmark)
	add_library(benchmark UNKNOWN IMPORTED)
	set_target_properties(benchmark PROPERTIES
		IMPORTED_LOCATION "${benchmark_LIBRARY}"
		INTERFACE_INCLUDE_DIRECTORIES "${benchmark_INCLUDE_DIR}"
	)
endif()

Create imported target in find module

benchmarks: Create imported target in find module

Is much more convenient than using the variables that have been found
directly.


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

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

# "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 "ebd8f842de48304a24a07bb62e7f9b8854e78601")

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

Update FW to latest develop

Update FW to latest develop


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

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

# "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 "28e8a2ae69b9c6cebbb6b4cf920f21d5b3d7a8fe")

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

Update FW: improved focus for IMX214, lowered range


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

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

# "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 "28c625387fce2d731328cb072f959435ab29458b")

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

Update FW with xlink thread priority changes


# 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)

# 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 "release-1.10.0" 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)

Update GTest version to 1.10.0 in super build


#
# Find the packages required by this module
#

# Needed VTK version
set(VERSION_MIN "5.9.20110419")

# Look for VTK
find_package(VTK REQUIRED)

# Older versions of VTK (VTK 5.5 for example) do not have VTK_VERSION, in this
# case it needs to be defined manually
if(NOT VTK_VERSION)
set(VTK_VERSION "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
endif()

if (${VTK_VERSION} VERSION_LESS ${VERSION_MIN})
  message(ERROR " VtkGlue requires VTK version ${VERSION_MIN} or newer but the current version is ${VTK_VERSION}")
endif()

# The VTK DICOMParser and vtkmetaio includes conflict with the ITK
# versions. Here we remove them from the include directories.
#
string(REGEX REPLACE "[^;]*MetaIO;"
         "" VTK_INCLUDE_DIRS "${VTK_INCLUDE_DIRS}")
string(REGEX REPLACE "[^;]*vtkmetaio;"
         "" VTK_INCLUDE_DIRS "${VTK_INCLUDE_DIRS}")
string(REGEX REPLACE "[^;]*DICOMParser;"
         "" VTK_INCLUDE_DIRS "${VTK_INCLUDE_DIRS}")
include(${VTK_USE_FILE})

#
# Find the packages required by this module
#

# Needed VTK version
set(VERSION_MIN "5.10.0")

# Look for VTK
find_package(VTK REQUIRED)

# Older versions of VTK (VTK 5.5 for example) do not have VTK_VERSION, in this
# case it needs to be defined manually
if(NOT VTK_VERSION)
set(VTK_VERSION "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
endif()

if (${VTK_VERSION} VERSION_LESS ${VERSION_MIN})
  message(ERROR " VtkGlue requires VTK version ${VERSION_MIN} or newer but the current version is ${VTK_VERSION}")
endif()

# The VTK DICOMParser and vtkmetaio includes conflict with the ITK
# versions. Here we remove them from the include directories.
#
string(REGEX REPLACE "[^;]*MetaIO;"
         "" VTK_INCLUDE_DIRS "${VTK_INCLUDE_DIRS}")
string(REGEX REPLACE "[^;]*vtkmetaio;"
         "" VTK_INCLUDE_DIRS "${VTK_INCLUDE_DIRS}")
string(REGEX REPLACE "[^;]*DICOMParser;"
         "" VTK_INCLUDE_DIRS "${VTK_INCLUDE_DIRS}")
include(${VTK_USE_FILE})

BUG: Update VTK minimum version (for release)

If you look at the version number for VTK for the 19 april 2011,
the VTK version is set to 5.9.0, so this version number makes no sense.
I updated the version to 5.10.0, which is known to work with VTKGlue.

Bug reported by Norman K Williams on the ITK mailing list.

Change-Id: I55f13f539e9a47682f0ce5dcdb2bdd4b85f2f745


#---Custom CTest settings---------------------------------------------------

set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
    test-stressgui)

if(WIN32)
  set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
      test-tcollex)
endif()

if(CTEST_BUILD_NAME MATCHES icc14)  #  sse tests of vc fail for icc compiler
  set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
      vc-math_sse
      vc-math_VC_LOG_ILP2_sse
      vc-math_VC_LOG_ILP_sse)
endif()

if(CTEST_BUILD_NAME MATCHES mac107)  #  sse tests of vc fail for mac107 compiler
  set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
      vc-gather_VC_USE_BSF_GATHERS_sse
      vc-gather_VC_USE_SET_GATHERS_sse
      vc-load_sse
      vc-math_sse
      vc-math_VC_LOG_ILP2_sse
      vc-math_VC_LOG_ILP_sse
      vc-scalaraccess_sse
      vc-swizzles_sse
      vc-utils_sse)
endif()

#---Custom CTest settings---------------------------------------------------

set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
    test-stressgui
    test-stressproof)

if(WIN32)
  set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
      test-tcollex)
endif()

if(CTEST_BUILD_NAME MATCHES icc14)  #  sse tests of vc fail for icc compiler
  set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
      vc-math_sse
      vc-math_VC_LOG_ILP2_sse
      vc-math_VC_LOG_ILP_sse)
endif()

if(CTEST_BUILD_NAME MATCHES mac107)  #  sse tests of vc fail for mac107 compiler
  set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE}
      vc-gather_VC_USE_BSF_GATHERS_sse
      vc-gather_VC_USE_SET_GATHERS_sse
      vc-load_sse
      vc-math_sse
      vc-math_VC_LOG_ILP2_sse
      vc-math_VC_LOG_ILP_sse
      vc-scalaraccess_sse
      vc-swizzles_sse
      vc-utils_sse)
endif()

Disable test-stressproof for the time being


# Copyright (c) 2012 Stefan Eilemann <eile@eyescale.ch>

# Info: http://www.itk.org/Wiki/CMake:Component_Install_With_CPack

set(CPACK_PACKAGE_VENDOR "vmmlib.sourceforge.net")
set(CPACK_PACKAGE_CONTACT "Stefan Eilemann <eile@eyescale.ch>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
  "Templatized C++ vector and matrix math library")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
  "libstdc++6")

if(RELEASE_VERSION)
  set(CPACK_COMPONENTS_ALL dev)
else()
  set(CPACK_COMPONENTS_ALL unspecified dev)
endif()

set(CPACK_COMPONENT_UNSPECIFIED_DISPLAY_NAME "Unspecified")
set(CPACK_COMPONENT_UNSPECIFIED_DESCRIPTION
  "Unspecified Component - set COMPONENT in CMake install() command")

set(CPACK_COMPONENT_DEV_DISPLAY_NAME
  "${CPACK_PROJECT_NAME} Development Files")
set(CPACK_COMPONENT_DEV_DESCRIPTION
  "Header and Library Files for ${CPACK_PROJECT_NAME} Development")

include(CommonCPack)

# Copyright (c) 2012 Stefan Eilemann <eile@eyescale.ch>

# Info: http://www.itk.org/Wiki/CMake:Component_Install_With_CPack

set(CPACK_PACKAGE_VENDOR "vmmlib.sourceforge.net")
set(CPACK_PACKAGE_CONTACT "Stefan Eilemann <eile@eyescale.ch>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
  "Templatized C++ vector and matrix math library")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
  "libstdc++6")

if(RELEASE_VERSION)
  set(CPACK_COMPONENTS_ALL dev)
else()
  set(CPACK_COMPONENTS_ALL unspecified dev)
endif()

set(CPACK_COMPONENT_UNSPECIFIED_DISPLAY_NAME "Unspecified")
set(CPACK_COMPONENT_UNSPECIFIED_DESCRIPTION
  "Unspecified Component - set COMPONENT in CMake install() command")

set(CPACK_COMPONENT_DEV_DISPLAY_NAME
  "${CPACK_PROJECT_NAME} Development Files")
set(CPACK_COMPONENT_DEV_DESCRIPTION
  "Header and Library Files for ${CPACK_PROJECT_NAME} Development")

set(CPACK_NSIS_MODIFY_PATH OFF) # no binaries installed
include(CommonCPack)

Tweak CPack settings for Windows

Tweak CPack settings for Windows


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

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

# "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 "f825fda83e06a392d79d2c787ce5e452fabe149b")

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

Update FW with object tracker KCF fixes

Update FW with object tracker KCF fixes


ExternalProject_Add(
    boost_external
    GIT_REPOSITORY https://github.com/boostorg/boost.git
    GIT_TAG boost-1.59.0
    UPDATE_COMMAND ""
    BUILD_IN_SOURCE 1
    CONFIGURE_COMMAND ./bootstrap.sh
    BUILD_COMMAND ./b2 -s NO_BZIP2=1 --prefix=<INSTALL_DIR> --with-system --with-filesystem --with-program_options --without-python install
    #BUILD_COMMAND ./b2 --show-libraries
    INSTALL_COMMAND ""
)
ExternalProject_Get_Property(boost_external source_dir install_dir)

file(MAKE_DIRECTORY "${install_dir}/include")

set(${package_found_prefix}_CMAKE_DEP boost_external)
set(${package_found_prefix}_LIBRARIES
    "${install_dir}/lib/libboost_system.a"
    "${install_dir}/lib/libboost_filesystem.a"
    "${install_dir}/lib/libboost_program_options.a"
)
set(${package_found_prefix}_INCLUDE_DIRS "${install_dir}/include")

ExternalProject_Add(
    boost_external
    GIT_REPOSITORY https://github.com/boostorg/boost.git
    GIT_TAG boost-1.59.0
    UPDATE_COMMAND ""
    BUILD_IN_SOURCE 1
    CONFIGURE_COMMAND ./bootstrap.sh
    BUILD_COMMAND ./b2 -s NO_BZIP2=1 --prefix=<INSTALL_DIR> --with-system --with-filesystem --with-program_options install
    #BUILD_COMMAND ./b2 --show-libraries
    INSTALL_COMMAND ""
)
ExternalProject_Get_Property(boost_external source_dir install_dir)

file(MAKE_DIRECTORY "${install_dir}/include")

set(${package_found_prefix}_CMAKE_DEP boost_external)
set(${package_found_prefix}_LIBRARIES
    "${install_dir}/lib/libboost_system.a"
    "${install_dir}/lib/libboost_filesystem.a"
    "${install_dir}/lib/libboost_program_options.a"
)
set(${package_found_prefix}_INCLUDE_DIRS "${install_dir}/include")

Fix boost build (with and without cannot be used simultaneously)


# Always install to install tree - packaging requires this even if virtualenv is used.
#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/opencmiss
#        DESTINATION python/$<CONFIG>
#        COMPONENT PythonBindings
#        FILES_MATCHING PATTERN ${ZINC_SHARED_OBJECT_GLOB}
#)

install(TARGETS ${SWIG_MODULE_TARGETS}
    DESTINATION python/$<CONFIG>/opencmiss/zinc
    COMPONENT PythonBindings
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/setup.py
    DESTINATION python/$<CONFIG>
    COMPONENT PythonBindings
)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/opencmiss
    DESTINATION python/$<CONFIG>
    COMPONENT PythonBindings
    FILES_MATCHING PATTERN "*.py"
)
install(FILES "${BASE_PYTHON_PACKAGE_DIR}/README.txt"
    DESTINATION python/$<CONFIG>
    COMPONENT PythonBindings
)

# Install step for virtual environment (if given)
if (ZINC_USE_VIRTUALENV)
    # Variables required for OCPythonBindingsVirtualEnv.
    set(VIRTUALENV_INSTALL_PREFIX ${ZINC_VIRTUALENV_INSTALL_PREFIX})
    set(PYTHON_PACKAGE_CURRENT_NAME zinc)
    # Virtual environment creation target.
    include(OCPythonBindingsVirtualEnv)
endif ()

# Always install to install tree - packaging requires this even if virtualenv is used.
#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/opencmiss
#        DESTINATION python/$<CONFIG>
#        COMPONENT PythonBindings
#        FILES_MATCHING PATTERN ${ZINC_SHARED_OBJECT_GLOB}
#)

set(_PYTHON_DESTINATION_PREFIX lib/python${PYTHONLIBS_MAJOR_VERSION}.${PYTHONLIBS_MINOR_VERSION})

install(TARGETS ${SWIG_MODULE_TARGETS}
    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>/opencmiss/zinc
    COMPONENT PythonBindings
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/setup.py
    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
    COMPONENT PythonBindings
)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/opencmiss
    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
    COMPONENT PythonBindings
    FILES_MATCHING PATTERN "*.py"
)
install(FILES "${BASE_PYTHON_PACKAGE_DIR}/README.txt"
    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
    COMPONENT PythonBindings
)

# Install step for virtual environment (if given)
if (ZINC_USE_VIRTUALENV)
    # Variables required for OCPythonBindingsVirtualEnv.
    set(VIRTUALENV_INSTALL_PREFIX ${ZINC_VIRTUALENV_INSTALL_PREFIX})
    set(PYTHON_PACKAGE_CURRENT_NAME zinc)
    # Virtual environment creation target.
    include(OCPythonBindingsVirtualEnv)
endif ()

Install python packages into a standard location.


include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)

set(CMAKE_GENERATOR Xcode)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")
set(CMAKE_XCODE_GENERATE_SCHEME ON CACHE BOOL "")

set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")

# Print a warning with instructions, if we
# build with Xcode and didn't use this cache.
set(LLDB_EXPLICIT_XCODE_CACHE_USED ON CACHE INTERNAL "")

include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)

set(CMAKE_GENERATOR Xcode CACHE STRING "")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")
set(CMAKE_XCODE_GENERATE_SCHEME ON CACHE BOOL "")

set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")

# Print a warning with instructions, if we
# build with Xcode and didn't use this cache.
set(LLDB_EXPLICIT_XCODE_CACHE_USED ON CACHE INTERNAL "")

Fix one more detail in r368066

[lldb][CMake] Fix one more detail in r368066

Differential Revision: https://reviews.llvm.org/D65797

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@368148 91177308-0d34-0410-b5e6-96231b3b80d8


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

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

# "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 "bfc908b0cbaa949254b8ae1c1b68f51d8ba7cb01")

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

Update FW: RGB orientation fix for OAK-1 (new versions) and OAK-1-Lite


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

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

# "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 "7f7e0e7aa2d705d8e618605800fd3c2447a866dd")

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

Fix RGB alignment remapping when configured color camera resolution is different from calibration one


#
#  femusMacroBuildApplication.cmake
#
#  Created by Simone Bnà
#
#

MACRO(femusMacroBuildApplication mainname appname)

# Build the executable
ADD_EXECUTABLE(${appname} ${PROJECT_SOURCE_DIR}/${mainname}.cpp)

# Link the executable to the petsc anf femttu libs
TARGET_LINK_LIBRARIES(${appname} femus)
TARGET_LINK_LIBRARIES(${appname} ${PETSC_LIBRARIES})
TARGET_LINK_LIBRARIES(${appname} ${B64_LIBRARIES})
TARGET_LINK_LIBRARIES(${appname} ${JSONCPP_LIBRARIES})
TARGET_LINK_LIBRARIES(${appname} ${ADEPT_LIBRARIES})

IF(FPARSER_FOUND)
  TARGET_LINK_LIBRARIES(${appname} ${FPARSER_LIBRARY})
ENDIF(FPARSER_FOUND)

IF(MPI_FOUND)
  TARGET_LINK_LIBRARIES(${appname} ${MPI_EXTRA_LIBRARY})
ENDIF(MPI_FOUND)

IF(HDF5_FOUND)
  TARGET_LINK_LIBRARIES(${appname} ${HDF5_LIBRARIES})
ENDIF(HDF5_FOUND)

FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/output/)
FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/input/)
FILE(COPY           ${PROJECT_SOURCE_DIR}/input/ DESTINATION ${PROJECT_BINARY_DIR}/input/)

ENDMACRO(femusMacroBuildApplication)

#
#  femusMacroBuildApplication.cmake
#
#  Created by Simone Bnà
#
#

MACRO(femusMacroBuildApplication mainname appname)

# Build the executable
ADD_EXECUTABLE(${appname} ${PROJECT_SOURCE_DIR}/${mainname}.cpp)

# Link the executable to the petsc anf femttu libs
TARGET_LINK_LIBRARIES(${appname} femus)
TARGET_LINK_LIBRARIES(${appname} ${PETSC_LIBRARIES})
TARGET_LINK_LIBRARIES(${appname} ${B64_LIBRARIES})
TARGET_LINK_LIBRARIES(${appname} ${JSONCPP_LIBRARIES})
TARGET_LINK_LIBRARIES(${appname} ${ADEPT_LIBRARIES})

IF(FPARSER_FOUND)
  TARGET_LINK_LIBRARIES(${appname} ${FPARSER_LIBRARY})
ENDIF(FPARSER_FOUND)

IF(MPI_FOUND)
  TARGET_LINK_LIBRARIES(${appname} ${MPI_EXTRA_LIBRARY})
ENDIF(MPI_FOUND)

IF(HDF5_FOUND)
  TARGET_LINK_LIBRARIES(${appname} ${HDF5_LIBRARIES})
ENDIF(HDF5_FOUND)

FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/output/)
FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/input/)
FILE(COPY           ${PROJECT_SOURCE_DIR}/input/ DESTINATION ${PROJECT_BINARY_DIR}/input/)
# TODO this file copy does not generate a dependency rule in the makefiles, maybe we should think of how to obtain that,
# to avoid re-running cmake when new input files are added in the applications

ENDMACRO(femusMacroBuildApplication)

Comment on dependency rule for input files


# - Try to find the gnokii directory library
# Once done this will define
#
#  GNOKII_FOUND - system has GNOKII
#  GNOKII_INCLUDE_DIR - the GNOKII include directory
#  GNOKII_LIBRARIES - The libraries needed to use GNOKII

if (GNOKII_INCLUDE_DIR)
  # Already in cache, be silent
  set(GNOKII_FIND_QUIETLY TRUE)
endif (GNOKII_INCLUDE_DIR)

FIND_PATH(GNOKII_INCLUDE_DIR gnokii.h
   /usr/include
   /usr/local/include
)

FIND_LIBRARY(GNOKII_LIBRARIES NAMES gnokii
   PATHS
   /usr/lib
   /usr/local/lib
)

if (GNOKII_INCLUDE_DIR AND GNOKII_LIBRARIES)
   set(GNOKII_FOUND TRUE)
endif (GNOKII_INCLUDE_DIR AND GNOKII_LIBRARIES)

if (GNOKII_FOUND)
   if (NOT GNOKII_FIND_QUIETLY)
      message(STATUS "Found gnokii: ${GNOKII_LIBRARIES}")
   endif (NOT GNOKII_FIND_QUIETLY)
else(GNOKII_FOUND)
   if (GNOKII_FIND_REQUIRED)
      message(FATAL_ERROR "Could NOT find gnokii")
   endif (GNOKII_FIND_REQUIRED)
endif (GNOKII_FOUND)

MARK_AS_ADVANCED(GNOKII_INCLUDE_DIR GNOKII_LIBRARIES)

# - Try to find the gnokii directory library
# Once done this will define
#
#  GNOKII_FOUND - system has GNOKII
#  GNOKII_INCLUDE_DIR - the GNOKII include directory
#  GNOKII_LIBRARIES - The libraries needed to use GNOKII

if (GNOKII_INCLUDE_DIR AND GNOKII_LIBRARIES)
  # Already in cache, be silent
  set(GNOKII_FIND_QUIETLY TRUE)
endif (GNOKII_INCLUDE_DIR AND GNOKII_LIBRARIES)

FIND_PATH(GNOKII_INCLUDE_DIR gnokii.h
)

FIND_LIBRARY(GNOKII_LIBRARIES NAMES gnokii
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNOKII DEFAULT_MSG GNOKII_INCLUDE_DIR GNOKII_LIBRARIES )

MARK_AS_ADVANCED(GNOKII_INCLUDE_DIR GNOKII_LIBRARIES)

Use FIND_PACKAGE_HANDLE_STANDARD_ARGS
Remove not necessary path
Fix typo

svn path=/trunk/KDE/kdepim/; revision=700311


find_path(_udt_INCLUDE_DIR udt.h
  HINTS ${UDT_ROOT}/include
  PATHS /usr/include /usr/local/include /opt/local/include)
find_library(_udt_LIBRARY NAMES udt
  HINTS ${UDT_ROOT}/lib
  PATHS /usr/lib /usr/local/lib /opt/local/lib)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UDT DEFAULT_MSG
  _udt_INCLUDE_DIR _udt_LIBRARY)

set(UDT_INCLUDE_DIRS ${_udt_INCLUDE_DIR})
set(UDT_LIBRARIES ${_udt_LIBRARY})

if(UDT_FOUND)
  message(STATUS "Found UDT in ${UDT_INCLUDE_DIRS};${UDT_LIBRARIES}")
endif()

find_path(_udt_INCLUDE_DIR udt.h
  HINTS ${UDT_ROOT}/include
  PATHS /usr/include /usr/local/include /opt/local/include /usr/include/udt)

find_library(_udt_LIBRARY NAMES udt
  HINTS ${UDT_ROOT}/lib
  PATHS /usr/lib /usr/local/lib /opt/local/lib)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UDT DEFAULT_MSG
  _udt_INCLUDE_DIR _udt_LIBRARY)

set(UDT_INCLUDE_DIRS ${_udt_INCLUDE_DIR})
set(UDT_LIBRARIES ${_udt_LIBRARY})
if(_udt_INCLUDE_DIR)
  file(STRINGS "${_udt_INCLUDE_DIR}/udt.h" UDT_HAS_RCVDATA REGEX UDT_RCVDATA)
endif()

if(UDT_FOUND)
  message(STATUS "Found UDT in ${UDT_INCLUDE_DIRS};${UDT_LIBRARIES}")
endif()

Improve UDT finder for Ubuntu packages

Improve UDT finder for Ubuntu packages


### the directory name
SET(DIRECTORY source/APPLICATIONS/UTILITIES)

### list all filenames of the directory here ###
SET(EXECUTABLES_LIST
	add_hydrogens
	assign_charges_from_rules
	assign_radii_from_rules
	assign_typenames_from_rules
	atomtyper
	calculate_RMSD
	clip_protein_around_ligand
	compute_docking_RMSD
	create_random_numbers
	dcd2dcd
	export_fragment
	hin2mol2
	pdb2amber_naming
	pdb2dcd
	pdb2hin
	reconstruct_fragment
	rigid_docking
	solvent_accessibility
)

IF (BALL_HAS_MPI)
	LIST(APPEND EXECUTABLES_LIST geometricFit_slave)
ENDIF()

SET(UTILITIES_EXECUTABLES ${UTILITIES_EXECUTABLES} ${EXECUTABLES_LIST})

### add filenames to Visual Studio solution
SET(UTILITIES_SOURCES)
FOREACH(i ${EXECUTABLES_LIST})
	LIST(APPEND UTILITIES_SOURCES "${i}")
ENDFOREACH(i)
SOURCE_GROUP("" FILES ${UTILITIES_SOURCES})

### the directory name
SET(DIRECTORY source/APPLICATIONS/UTILITIES)

### list all filenames of the directory here ###
SET(EXECUTABLES_LIST
	add_hydrogens
	assign_charges_from_rules
	assign_radii_from_rules
	assign_typenames_from_rules
	atomtyper
	calculate_RMSD
	clip_protein_around_ligand
	compute_docking_RMSD
	create_random_numbers
	dcd2dcd
	export_fragment
	hin2mol2
	pdb2amber_naming
	pdb2dcd
	pdb2hin
	reconstruct_fragment
	solvent_accessibility
)

IF (BALL_HAS_FFTW)
	LIST(APPEND EXECUTABLES_LIST rigid_docking)

	IF (BALL_HAS_MPI)
		LIST(APPEND EXECUTABLES_LIST geometricFit_slave)
	ENDIF()
ENDIF()

SET(UTILITIES_EXECUTABLES ${UTILITIES_EXECUTABLES} ${EXECUTABLES_LIST})

### add filenames to Visual Studio solution
SET(UTILITIES_SOURCES)
FOREACH(i ${EXECUTABLES_LIST})
	LIST(APPEND UTILITIES_SOURCES "${i}")
ENDFOREACH(i)
SOURCE_GROUP("" FILES ${UTILITIES_SOURCES})

Make compilation of rigid_docking dependent on FFTW.


if (NOT EXISTS ${CMAKE_BINARY_DIR}/external/googletest)
  message("--googletest not found. Installing")
  ExternalProject_Add(googletest
    GIT_REPOSITORY "https://github.com/google/googletest.git"
    GIT_TAG "release-1.8.0"
    PREFIX external/googletest
    BUILD_IN_SOURCE
    UPDATE_COMMAND ""
    CMAKE_CACHE_ARGS
      -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
      -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
      -DBUILD_GMOCK:BOOL=OFF
      -DBUILD_GTEST:BOOL=ON
      -DCMAKE_BUILD_TYPE:STRING=Release
  )
endif()

set(GTEST_ROOT ${CMAKE_BINARY_DIR}/external/googletest)
set(env(GTEST_ROOT) ${CMAKE_BINARY_DIR}/external/googletest)

if (NOT EXISTS ${CMAKE_BINARY_DIR}/external/googletest)
  message("--googletest not found. Installing")
  ExternalProject_Add(googletest
    GIT_REPOSITORY "https://github.com/google/googletest.git"
    GIT_TAG "release-1.8.0"
    PREFIX external/googletest
    BUILD_IN_SOURCE
    UPDATE_COMMAND ""
    CMAKE_CACHE_ARGS
      -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
      -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
      -DBUILD_GMOCK:BOOL=OFF
      -DBUILD_GTEST:BOOL=ON
      -DCMAKE_BUILD_TYPE:STRING=Debug
  )
endif()

set(GTEST_ROOT ${CMAKE_BINARY_DIR}/external/googletest)
set(env(GTEST_ROOT) ${CMAKE_BINARY_DIR}/external/googletest)

Use debug mode for GTest

Use debug mode for GTest


# SampPlugin.cmake
#
# Functions:
#   add_samp_plugin(name [sources...])
#
# Supported platforms:
#   Windows
#   Linux
#
# Supported compilers:
#   GCC
#   MinGW
#   Microsoft Visual C++

function(add_samp_plugin name)
  add_library(${name} MODULE ${ARGN})

  set_target_properties(${name} PROPERTIES PREFIX "")

  if(CMAKE_COMPILER_IS_GNUCC)
    set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -m32")
    set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS    " -m32")
  endif()

  if(UNIX AND NOT WIN32)
    set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS "LINUX")
  endif()
endfunction()

# SampPlugin.cmake
#
# Functions:
#   add_samp_plugin(name [sources...])
#
# Supported platforms:
#   Windows
#   Linux
#
# Supported compilers:
#   GCC
#   MinGW
#   Microsoft Visual C++

function(add_samp_plugin name)
  add_library(${name} MODULE ${ARGN})

  set_target_properties(${name} PROPERTIES PREFIX "")

  if(CMAKE_COMPILER_IS_GNUCC)
    set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -m32")
    set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS    " -m32")
  endif()

  if(WIN32 AND CMAKE_COMPILER_IS_GNUCC)
    set_property(TARGET ${name} APPEND_STRING PROPERTY
                 LINK_FLAGS " -Wl,--enable-stdcall-fixup")
  endif()

  if(UNIX AND NOT WIN32)
    set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS "LINUX")
  endif()
endfunction()

Add --enable-stdcall-fixup to ld flags on Windows


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

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

# "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 "b71584129b101b30e4632678c19d33b020c04c36")

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

Update FW: hotfix for stereo confidence threshold setting, it was overwritten to 200


GetCompilers()

include(ExternalProject)
ExternalProject_Add(
	Eigen3
	PREFIX ${CMAKE_BINARY_DIR}/Eigen3
	DOWNLOAD_DIR ${THIRD_PARTY_DIR}/Eigen3
	URL http://bitbucket.org/eigen/eigen/get/3.1.4.tar.bz2
	URL_MD5 15a7914c3768d51a3637fb3d64556a28
	CMAKE_ARGS -DEIGEN_INCLUDE_INSTALL_DIR:PATH=${THIRD_PARTY_DIR}/include/eigen
		-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}${CMAKE_DEFINITIONS}
		-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}${CMAKE_DEFINITIONS}
		-DCMAKE_C_COMPILER:STRING=${C_COMPILER}
		-DCMAKE_CXX_COMPILER:STRING=${CXX_COMPILER}
		-DEIGEN_BUILD_PKGCONFIG=0
	)

SET(EIGEN_INCLUDE_DIR ${THIRD_PARTY_DIR}/include/eigen)
LIST(APPEND SHOGUN_DEPENDS Eigen3)

UNSET(C_COMPILER)
UNSET(CXX_COMPILER)

GetCompilers()

include(ExternalProject)
ExternalProject_Add(
	Eigen3
	PREFIX ${CMAKE_BINARY_DIR}/Eigen3
	DOWNLOAD_DIR ${THIRD_PARTY_DIR}/Eigen3
	URL https://bitbucket.org/eigen/eigen/get/3.2.8.tar.bz2
	URL_MD5 9e3bfaaab3db18253cfd87ea697b3ab1
	CMAKE_ARGS -DEIGEN_INCLUDE_INSTALL_DIR:PATH=${THIRD_PARTY_DIR}/include/eigen
		-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}${CMAKE_DEFINITIONS}
		-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}${CMAKE_DEFINITIONS}
		-DCMAKE_C_COMPILER:STRING=${C_COMPILER}
		-DCMAKE_CXX_COMPILER:STRING=${CXX_COMPILER}
		-DEIGEN_BUILD_PKGCONFIG=0
	)

SET(EIGEN_INCLUDE_DIR ${THIRD_PARTY_DIR}/include/eigen)
LIST(APPEND SHOGUN_DEPENDS Eigen3)

UNSET(C_COMPILER)
UNSET(CXX_COMPILER)

Upgrade bundled eigen version to 3.2.8

Upgrade bundled eigen version to 3.2.8


set(DOCUMENTATION "This module contains the third party GDCM library.
Grassroots DiCoM is a C++ library for DICOM medical files.")

itk_module(ITKGDCM
  DEPENDS
    ITKZLIB
    ITKExpat
    ITKOpenJPEG
  DESCRIPTION
    "${DOCUMENTATION}"
)

set(DOCUMENTATION "This module contains the third party GDCM library.
Grassroots DiCoM is a C++ library for DICOM medical files.")

if(ITK_USE_SYSTEM_GDCM)
  itk_module(ITKGDCM
    DESCRIPTION
      "${DOCUMENTATION}"
    EXCLUDE_FROM_ALL
    )
else()
  itk_module(ITKGDCM
    DEPENDS
      ITKZLIB
      ITKExpat
      ITKOpenJPEG
    DESCRIPTION
      "${DOCUMENTATION}"
  )
endif()

ENH: Exclude ITKGDCM module when system GDCM is ON.

When ITK_USE_SYSTEM_GDCM is set to be ON,ITKGDCM module
should be excluded from building.


set(DATE_INSTALL_DIR ${CMAKE_THIRD_PARTY_DIR})

ExternalProject_Add(
  date
  GIT_REPOSITORY https://github.com/HowardHinnant/date.git
  GIT_TAG 6a4d93a0bd8b56db68821067322c09ec37d0d8a9
  CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCURL_LIBRARY=${CURL_LIBRARY} -DCURL_INCLUDE_DIR=${CURL_INCLUDE_DIR} -DCMAKE_INSTALL_PREFIX=${DATE_INSTALL_DIR} -DENABLE_DATE_TESTING=OFF
  PATCH_COMMAND ${PATCH_SCRIPT_PATH} ${CMAKE_PATCH_DIR}/date_win.patch
  INSTALL_DIR ${DATE_INSTALL_DIR}
  DEPENDS CURL::libcurl
  BUILD_COMMAND cmake --build . --target install
)

ExternalProject_Get_Property(
  date
  install_dir
)

set(DATE_INCLUDE_DIR "${install_dir}/include")
if(NOT TARGET DATE::DATE)
    add_library(DATE::DATE INTERFACE IMPORTED)
    add_dependencies(DATE::DATE date)
    set_target_properties(DATE::DATE PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${DATE_INCLUDE_DIR}")
endif()

set(DATE_INSTALL_DIR ${CMAKE_THIRD_PARTY_DIR})

ExternalProject_Add(
  date
  GIT_REPOSITORY https://github.com/HowardHinnant/date.git
  GIT_TAG 6a4d93a0bd8b56db68821067322c09ec37d0d8a9
  CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCURL_LIBRARY=${CURL_LIBRARY} -DCURL_INCLUDE_DIR=${CURL_INCLUDE_DIR} -DCMAKE_INSTALL_PREFIX=${DATE_INSTALL_DIR} -DENABLE_DATE_TESTING=OFF
  PATCH_COMMAND ${PATCH_SCRIPT_PATH} ${CMAKE_PATCH_DIR}/date_win.patch
  INSTALL_DIR ${DATE_INSTALL_DIR}
  DEPENDS CURL::libcurl
)

ExternalProject_Get_Property(
  date
  install_dir
)

set(DATE_INCLUDE_DIR "${install_dir}/include")
if(NOT TARGET DATE::DATE)
    add_library(DATE::DATE INTERFACE IMPORTED)
    add_dependencies(DATE::DATE date)
    set_target_properties(DATE::DATE PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${DATE_INCLUDE_DIR}")
endif()

Remove build command from date build 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>")

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}")

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)

cpack: Add project version major to cpack package name


Set ctest update command to git.

Set ctest update command to git.


#
# ITK WikiExamples
#

itk_fetch_module(WikiExamples
  "A collection of examples that illustrate how to use ITK."
  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
  # June 26, 2015
  GIT_TAG 74e09f3e88cf2168e35af197e4b27a8686aa8f22
  )

#
# ITK WikiExamples
#

itk_fetch_module(WikiExamples
  "A collection of examples that illustrate how to use ITK."
  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
  # July 09, 2015
  GIT_TAG 1c53a9346e914959f1afb8df79cf449ff99ac7fa
  )

Update to version for WikiExamples

COMP: Update to version for WikiExamples

The wikiexamples were upgraded to allow both
forward and backwards compatibility with ITK 4.8.0.

Change-Id: I92032a5254978ddee560cb1959345f7f116138f8


option(ITK_USE_SYSTEM_GOOGLETEST "Use an outside build or install \
source of GoogleTest. Set GTEST_ROOT to specify location." ${ITK_USE_SYSTEM_LIBRARIES})
mark_as_advanced(ITK_USE_SYSTEM_GOOGLETEST)

option(ITK_USE_SYSTEM_GOOGLETEST "Use an outside build or installed source of GoogleTest. Set GTEST_ROOT to specify location." ${ITK_USE_SYSTEM_LIBRARIES})
mark_as_advanced(ITK_USE_SYSTEM_GOOGLETEST)

COMP: Use single line for string argument, by-pass multi-line issues

This addresses the following CMake configuration error:
CMake Error at Modules/ThirdParty/GoogleTest/itk-module-init.cmake:1
(option):
  Syntax error in cmake code at

    /home/kitware/Dashboards/src/ITK/Modules/ThirdParty/GoogleTest/itk-module-init.cmake:1

  when parsing string

    Use an outside build or install \

  source of GoogleTest.  Set GTEST_ROOT to specify location.

  syntax error, unexpected cal_SYMBOL, expecting $end (91)

Change-Id: I6d2d61d4ed2a3a12b166a4dd3a9531ddf8bc2066


#
# CMake defines to cross-compile to ARM/Linux on BCM2708 using glibc.
#

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
SET(CMAKE_ASM_COMPILER arm-linux-gnueabihf-gcc)
SET(CMAKE_SYSTEM_PROCESSOR arm)

#ADD_DEFINITIONS("-march=armv6")
add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard")

# rdynamic means the backtrace should work
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
   add_definitions(-rdynamic)
ENDIF()

# avoids annoying and pointless warnings from gcc
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE")
SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -c")

#
# CMake defines to cross-compile to ARM/Linux on BCM2708 using glibc.
#

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
SET(CMAKE_ASM_COMPILER arm-linux-gnueabihf-gcc)
SET(CMAKE_SYSTEM_PROCESSOR arm)

#ADD_DEFINITIONS("-march=armv6")
add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -marm")

# rdynamic means the backtrace should work
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
   add_definitions(-rdynamic)
ENDIF()

# avoids annoying and pointless warnings from gcc
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE")
SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -c")

cmake: Add -marm for building with generic toolchain


prefix=${CMAKE_INSTALL_PREFIX}
exec_prefix=${EXEC_INSTALL_PREFIX}
libdir=${LIB_INSTALL_DIR}
includedir=${INCLUDE_INSTALL_DIR}

Name: ${PROJECT_NAME}
Description: The Musicbrainz Client Library.
URL: http://musicbrainz.org/doc/libmusicbrainz
Version: ${PROJECT_VERSION}
Requires: neon >= 0.25, libdiscid
Libs: -L${LIB_INSTALL_DIR} -lmusicbrainz3
Cflags: -I${INCLUDE_INSTALL_DIR}

prefix=${CMAKE_INSTALL_PREFIX}
exec_prefix=${EXEC_INSTALL_PREFIX}
libdir=${LIB_INSTALL_DIR}
includedir=${INCLUDE_INSTALL_DIR}

Name: ${PROJECT_NAME}
Description: The Musicbrainz Client Library.
URL: http://musicbrainz.org/doc/libmusicbrainz
Version: ${PROJECT_VERSION}
Requires.private: neon >= 0.25, libdiscid
Libs: -L${LIB_INSTALL_DIR} -lmusicbrainz3
Cflags: -I${INCLUDE_INSTALL_DIR}

Use Requires.private instead of Requires, patch by Rex Dieter


prefix=${CMAKE_INSTALL_PREFIX}
exec_prefix=${EXEC_INSTALL_PREFIX}
libdir=${LIB_INSTALL_DIR}
includedir=${INCLUDE_INSTALL_DIR}

Name: ${PROJECT_NAME}
Description: The Musicbrainz Client Library.
URL: http://musicbrainz.org/doc/libmusicbrainz
Version: ${PROJECT_VERSION}
Requires.private: neon >= 0.25, libdiscid
Libs: -L${LIB_INSTALL_DIR} -lmusicbrainz4
Cflags: -I${INCLUDE_INSTALL_DIR}

prefix=${CMAKE_INSTALL_PREFIX}
exec_prefix=${EXEC_INSTALL_PREFIX}
libdir=${LIB_INSTALL_DIR}
includedir=${INCLUDE_INSTALL_DIR}

Name: ${PROJECT_NAME}
Description: The Musicbrainz Client Library.
URL: http://musicbrainz.org/doc/libmusicbrainz
Version: ${PROJECT_VERSION}
Requires.private: neon >= 0.25
Libs: -L${LIB_INSTALL_DIR} -lmusicbrainz4
Cflags: -I${INCLUDE_INSTALL_DIR}

Remove requirement for libdiscid from pkgconfig

git-svn-id: 95f3c568a8d713c8a134cac44d96183059969c76@13255 b0b80210-5d09-0410-99dd-b4bd03f891c0


# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(BridgeNumPy
  "This module contains wrapper code to convert ITK Image's to
  NumPy array's and back.  For example:

    import itk
    ImageType = itk.Image[itk.F, 2]
    image = ImageType.New()
    array = itk.PyBuffer[ImageType].GetArrayFromImage(image)
    image = itk.PyBuffer[ImageType].GetImageFromArray(array)

  See http://insight-journal.org/browse/publication/85
      http://hdl.handle.net/1926/188"
  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git
  GIT_TAG 0de6ece97d4146031f72767f242862d3be868782
  )

# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(BridgeNumPy
  "This module contains wrapper code to convert ITK Image's to
  NumPy array's and back.  For example:

    import itk
    ImageType = itk.Image[itk.F, 2]
    image = ImageType.New()
    array = itk.PyBuffer[ImageType].GetArrayFromImage(image)
    image = itk.PyBuffer[ImageType].GetImageFromArray(array)

  See http://insight-journal.org/browse/publication/85
      http://hdl.handle.net/1926/188"
  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git
  GIT_TAG f645d226d3f2980c48fd15a9240ae0ce23deb046
  )

BUG: Fix BridgeNumPy signed / unsigned short correspondance.

By bumping the BridgeNumPy module, we fixed the signed / unsigned short
correspondance with the appropriate NumPy type.  They were reversed before.

Change-Id: I6397c327874bcd59cc51617fca54bd97cce5ff5e


set(DOCUMENTATION "The modules provides filters may be particularly useful for
ultrasound image reconstruction and analysis.")

# A library is only created when FFTW support is ON
set(_fft_depends ITKFFT)
if(ITK_USE_FFTWF OR ITK_USE_FFTWD)
  set(_fft_depends ITKFFT)
endif()

itk_module(Ultrasound
  DEPENDS
    ITKImageCompose
    ITKImageIntensity
    ITKIOImageBase
    ITKTransform
    ITKRegistrationCommon
    ${_fft_depends}
  PRIVATE_DEPENDS
    ITKHDF5
  TEST_DEPENDS
    ITKTransform
    ITKTestKernel
    ITKImageSources
    ${_fft_depends}
  EXCLUDE_FROM_DEFAULT
  ENABLE_SHARED
  DESCRIPTION
    "${DOCUMENTATION}"
  )

set(DOCUMENTATION "The modules provides filters may be particularly useful for
ultrasound image reconstruction and analysis.")

# A library is only created when FFTW support is ON
set(_fft_depends ITKFFT)
if(ITK_USE_FFTWF OR ITK_USE_FFTWD)
  set(_fft_depends ITKFFT)
endif()

itk_module(Ultrasound
  DEPENDS
    ITKImageCompose
    ITKImageIntensity
    ITKIOImageBase
    ITKTransform
    ITKRegistrationCommon
    Strain
    ${_fft_depends}
  PRIVATE_DEPENDS
    ITKHDF5
  TEST_DEPENDS
    ITKTransform
    ITKTestKernel
    ITKImageSources
    ${_fft_depends}
  EXCLUDE_FROM_DEFAULT
  ENABLE_SHARED
  DESCRIPTION
    "${DOCUMENTATION}"
  )

Add dependency on the Strain module

COMP: Add dependency on the Strain module

For itkBlockMatchingStrainWindowDisplacementCalculator.h


include(compilation)
include(deps)

if (APPLE)
  include(mac)
endif()

if (LINUX)
  include(linux)
endif()

if (WIN32)
  include(win)
endif()

include(compilation)
include(deps)

if (APPLE)
  include(mac)
endif()

if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  SET(LINUX 1)
endif()
if (LINUX)
  include(linux)
endif()

if (WIN32)
  include(win)
endif()

Fix so LINUX can be used to check OS.

CMake: Fix so LINUX can be used to check OS.


#
# CMake Toolchain file for crosscompiling on ARM.
#
# This can be used when running cmake in the following way:
#  cd build/
#  cmake .. -DCMAKE_TOOLCHAIN_FILE=../canopy-cross-compile.cmake
#

set(CROSS_PATH "/usr/arm-linux-gnueabi")

# Target operating system name.
set(CMAKE_SYSTEM_NAME Linux)

# Name of C compiler.
set(CMAKE_C_COMPILER "/usr/bin/arm-linux-gnueabi-gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/arm-linux-gnueabi-g++")

# Where to look for the target environment. (More paths can be added here)
set(CMAKE_FIND_ROOT_PATH "${CROSS_PATH}")

# Adjust the default behavior of the FIND_XXX() commands:
# search programs in the host environment only.
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# Search headers and libraries in the target environment only.
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

#
# CMake Toolchain file for crosscompiling on ARM.
#
# This can be used when running cmake in the following way:
#  cd build/
#  cmake .. -DCMAKE_TOOLCHAIN_FILE=../canopy-cross-compile.cmake
#

set(CROSS_PATH $ENV{CANOPY_CROSS_PATH})

# Target operating system name.
set(CMAKE_SYSTEM_NAME Linux)

# Name of C compiler.
set(CMAKE_C_COMPILER $ENV{CC})
set(CMAKE_CXX_COMPILER $ENV{CXX})

# Where to look for the target environment. (More paths can be added here)
set(CMAKE_FIND_ROOT_PATH "${CROSS_PATH}")

# Adjust the default behavior of the FIND_XXX() commands:
# search programs in the host environment only.
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# Search headers and libraries in the target environment only.
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Use environment variables for Canopy cross compile


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

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

# "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 "5813806b6f2de7aaa4c211e5d8aa8e98774da8c8")

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

Update FW: patch EEPROM data for incorrectly programmed RGB spec translation, for manually ran calibration on CM3/CM4 boards. Was leading to wrong RGB-depth alignment


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

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

# "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 "d26fdab6b0a66b09f0b3b6ca8d0dea50229278b7")

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

Update FW: stereo fixes: LR-check flip, `depth` align to RGB


FIND_PROGRAM(DOXYGEN_EXECUTABLE doxygen
    PATHS "C:/Program Files/doxygen/bin"
    ENV PATH
    NO_DEFAULT_PATH
    )

IF(DOXYGEN_EXECUTABLE-NOTFOUND)
ELSE(DOXYGEN_EXECUTABLE-NOTFOUND)
    SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")

    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
          ${DOXY_CONFIG}
          @ONLY )

    ADD_CUSTOM_TARGET(DoxygenApiDocs ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})

    FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/html/")
    INSTALL(DIRECTORY "${PROJECT_BINARY_DIR}/html/"
            DESTINATION "core/doc/api/${PROJECT_NAME}/"
            )
ENDIF(DOXYGEN_EXECUTABLE-NOTFOUND)

INCLUDE(FindDoxygen)

IF(DOXYGEN_EXECUTABLE-NOTFOUND)
ELSE(DOXYGEN_EXECUTABLE-NOTFOUND)
    SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")

    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
          ${DOXY_CONFIG}
          @ONLY )

    ADD_CUSTOM_TARGET(DoxygenApiDocs ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})

    FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/html/")
    INSTALL(DIRECTORY "${PROJECT_BINARY_DIR}/html/"
            DESTINATION "core/doc/api/${PROJECT_NAME}/"
            )
ENDIF(DOXYGEN_EXECUTABLE-NOTFOUND)

Use canonical INCLUDE(FindDoxygen) line to find doxygen executable


# Dashboard is opened for submissions for a 24 hour period starting at
# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
SET (NIGHTLY_START_TIME "23:00:00 EST")

# Dart server to submit results (used by client)
SET (DROP_SITE "public.kitware.com")
SET (DROP_LOCATION "/incoming")
SET (DROP_SITE_USER "ftpuser")
SET (DROP_SITE_PASSWORD "public")
SET (TRIGGER_SITE
       "http://${DROP_SITE}/cgi-bin/Submit-vtk-TestingResults.pl")

# Dart server configuration
SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/VTK/")
SET (CVS_WEB_CVSROOT "VTK")
SET (USE_DOXYGEN "On")
SET (DOXYGEN_URL "http://${DROP_SITE}/VTK/doc/nightly/html/" )
SET (GNATS_WEB_URL "http://${DROP_SITE}/")

# copy over the testing logo
CONFIGURE_FILE(${VTK_SOURCE_DIR}/TestingLogo.gif ${VTK_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)

# Continuous email delivery variables
SET (DELIVER_CONTINUOUS_EMAIL "Off")
SET (CONTINUOUS_FROM "lorensen@crd.ge.com")
SET (SMTP_MAILHOST "public.kitware.com")
SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com")
SET (CONTINUOUS_BASE_URL "http://public.kitware.com/VTK")

ENH: Support for the Continuous build email notification


include(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)

macro(CHECK_TYPE_SIZE_EX TYPE HEADER VARIABLE)
  set(CMAKE_EXTRA_INCLUDE_FILES ${HEADER})
  CHECK_TYPE_SIZE(${TYPE} ${VARIABLE})
  if(HAVE_${VARIABLE})
    set(HAVE_${VARIABLE} 1)
  else()
    set(HAVE_${VARIABLE} 0)
  endif()
  set(CMAKE_EXTRA_INCLUDE_FILES)
endmacro(CHECK_TYPE_SIZE_EX)

macro(FIND_DIRS_RECURSIVE VARIABLE REGEX PATH)
    file(GLOB children RELATIVE "${PATH}" ${PATH}/*)
    foreach(child ${children})
        if(IS_DIRECTORY ${PATH}/${child})
            if(child MATCHES "${REGEX}")
                list(APPEND ${VARIABLE} "${PATH}/${child}")
            endif()
            FIND_DIRS_RECURSIVE("${VARIABLE}" "${REGEX}" "${PATH}/${child}")
        endif()
    endforeach()
endmacro(FIND_SVN)

include(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)

macro(CHECK_TYPE_SIZE_EX TYPE HEADER VARIABLE)
  set(CMAKE_EXTRA_INCLUDE_FILES ${HEADER})
  CHECK_TYPE_SIZE(${TYPE} ${VARIABLE})
  if(HAVE_${VARIABLE})
    set(HAVE_${VARIABLE} 1)
  else()
    set(HAVE_${VARIABLE} 0)
  endif()
  set(CMAKE_EXTRA_INCLUDE_FILES)
endmacro(CHECK_TYPE_SIZE_EX)

macro(FIND_DIRS_RECURSIVE VARIABLE REGEX PATH)
    file(GLOB children RELATIVE "${PATH}" ${PATH}/*)
    foreach(child ${children})
        if(IS_DIRECTORY ${PATH}/${child})
            if(child MATCHES "${REGEX}")
                list(APPEND ${VARIABLE} "${PATH}/${child}")
            endif()
            FIND_DIRS_RECURSIVE("${VARIABLE}" "${REGEX}" "${PATH}/${child}")
        endif()
    endforeach()
endmacro(FIND_DIRS_RECURSIVE)

Change wrong name in marco.cmake

Change wrong name in marco.cmake


#
# file: Toolchain-arm-none-eabi.cmake
#
# author: Copyright (C) 2018 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
# distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(TARGET_TRIPLE "arm-none-eabi-")
set(CMAKE_C_COMPILER ${TARGET_TRIPLE}gcc)
set(CMAKE_CXX_COMPILER ${TARGET_TRIPLE}g++)
set(CMAKE_SIZE ${TARGET_TRIPLE}size)

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

#
# file: Toolchain-arm-none-eabi.cmake
#
# author: Copyright (C) 2018 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
# distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(TARGET_TRIPLE "arm-none-eabi-")
set(CMAKE_C_COMPILER ${TARGET_TRIPLE}gcc)
set(CMAKE_CXX_COMPILER ${TARGET_TRIPLE}g++)
SET(CMAKE_AR ${TARGET_TRIPLE}gcc-ar CACHE STRING "Name of archiving tool for static libraries.")
SET(CMAKE_RANLIB ${TARGET_TRIPLE}gcc-ranlib CACHE STRING "Name of randomizing tool for static libraries.")
set(CMAKE_SIZE ${TARGET_TRIPLE}size)

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

Fix CMake build with LTO enabled

Fix CMake build with LTO enabled


set(UPDATE_TYPE "true")

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)

set(UPDATE_TYPE "true")

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

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)

Change start time to UTC.

cmake: Change start time to UTC.


prusaslicer_add_cmake_project(PNG
    GIT_REPOSITORY https://github.com/glennrp/libpng.git
    GIT_TAG v1.6.35
    DEPENDS ${ZLIB_PKG}
    CMAKE_ARGS
        -DPNG_SHARED=OFF
        -DPNG_STATIC=ON
        -DPNG_TESTS=OFF
)

if (MSVC)
    add_debug_dep(dep_PNG)
endif ()

prusaslicer_add_cmake_project(PNG
    GIT_REPOSITORY https://github.com/glennrp/libpng.git
    GIT_TAG v1.6.35
    DEPENDS ${ZLIB_PKG}
    CMAKE_ARGS
        -DPNG_SHARED=OFF
        -DPNG_STATIC=ON
        -DPNG_PREFIX=prusaslicer_
        -DPNG_TESTS=OFF
)

if (MSVC)
    add_debug_dep(dep_PNG)
endif ()

Fix issues with libpng for good

Fix issues with libpng for good

Add "prusaslicer_" prefix to static libpng in deps


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

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

# "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 "673983dd2b693f267cb3cb11a4247ec4a38a6508")

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

Update FW with SDK update

Update FW with SDK update