# the top-level README is used for describing this module, just
# re-used it for documentation here
get_filename_component( MY_CURENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file( READ "${MY_CURENT_DIR}/README" DOCUMENTATION )

# itk_module() defines the module dependencies in ITKStreamingSinc
# ITKStreamingSinc depends on ITKCommon
# The testing module in ITKStreamingSinc depends on ITKTestKernel
# and ITKMetaIO(besides ITKStreamingSinc and ITKCore)

# define the dependencies of the include module and the tests
itk_module(StreamingSinc
  DEPENDS
    ITKCommon
    ITKImageFilterBase
    ITKStatistics
    ITKImageStatistics
  TEST_DEPENDS
    ITKTestKernel
    ITKStatistics
  DESCRIPTION
    "${DOCUMENTATION}"
  EXCLUDE_FROM_ALL
)

# the top-level README is used for describing this module, just
# re-used it for documentation here
get_filename_component( MY_CURENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file( READ "${MY_CURENT_DIR}/README" DOCUMENTATION )

# itk_module() defines the module dependencies in ITKStreamingSinc
# ITKStreamingSinc depends on ITKCommon
# The testing module in ITKStreamingSinc depends on ITKTestKernel
# and ITKMetaIO(besides ITKStreamingSinc and ITKCore)

# ITK version 4.5 changed it from EXCLUDE_FROM_ALL to EXCLUDE_FROM_DEFAULT
set( _EXCLUDE "EXCLUDE_FROM_ALL" )
if (NOT "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_MINOR_PATCH}" VERSION_LESS "4.5")
  set( _EXCLUDE "EXCLUDE_FROM_DEFAULT" )
endif()

# define the dependencies of the include module and the tests
itk_module(StreamingSinc
  DEPENDS
    ITKCommon
    ITKImageFilterBase
    ITKStatistics
    ITKImageStatistics
  TEST_DEPENDS
    ITKTestKernel
    ITKStatistics
  DESCRIPTION
    "${DOCUMENTATION}"
  ${_EXCLUDE}
)

Update for newer exclude variable

Update for newer exclude variable


if(BUILD_TESTING)

#package testing
  if(NOT MITK_FAST_TESTING)

    # package testing in windows only for release
    if(WIN32)
      add_test(NAME mitkPackageTest CONFIGURATIONS Release
               COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config Release --target package)

      set_tests_properties( mitkPackageTest PROPERTIES
                          TIMEOUT 6000
                          LABELS "MITK;MITK-Plugins;PACKAGE_TESTS")
    elseif(CMAKE_BUILD_TYPE)
      add_test( NAME mitkPackageTest
                COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config ${CMAKE_BUILD_TYPE} --target package)

      set_tests_properties( mitkPackageTest PROPERTIES
                          TIMEOUT 6000
                          LABELS "MITK;MITK-Plugins;PACKAGE_TESTS"
                          RUN_SERIAL TRUE)
    endif()

  endif() # NOT MITK_FAST_TESTING

endif(BUILD_TESTING)

if(BUILD_TESTING)

#package testing
  if(NOT MITK_FAST_TESTING)

    # package testing in windows only for release
    if(WIN32)
      add_test(NAME mitkPackageTest CONFIGURATIONS Release
               COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config Release --target package)

      set_tests_properties( mitkPackageTest PROPERTIES
                          TIMEOUT 14400
                          LABELS "MITK;MITK-Plugins;PACKAGE_TESTS")
    elseif(CMAKE_BUILD_TYPE)
      add_test( NAME mitkPackageTest
                COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config ${CMAKE_BUILD_TYPE} --target package)

      set_tests_properties( mitkPackageTest PROPERTIES
                          TIMEOUT 14400
                          LABELS "MITK;MITK-Plugins;PACKAGE_TESTS"
                          RUN_SERIAL TRUE)
    endif()

  endif() # NOT MITK_FAST_TESTING

endif(BUILD_TESTING)

Increase timeout for mitkPackage test

Increase timeout for mitkPackage test

Summary: On our current test setup, mitkPackageTest runs into a timeout on OS X, so we can't see if there are maybe other problems. This commit increases the timeout as a first measure to fix the test.

Test Plan: Look at CI results, mitkPackageTest should pass on all primary platforms

Reviewers: O1 MITK Reviewer Group I, kislinsk

Reviewed By: O1 MITK Reviewer Group I, kislinsk

Subscribers: kislinsk

Maniphest Tasks: T27344

Differential Revision: https://phabricator.mitk.org/D278


set(CPACK_PACKAGE_VENDOR "Ultimaker")
set(CPACK_PACKAGE_CONTACT "Arjen Hiemstra <a.hiemstra@ultimaker.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Uranium 3D Application Framework")
set(CPACK_PACKAGE_VERSION_MAJOR 15)
set(CPACK_PACKAGE_VERSION_MINOR 05)
set(CPACK_PACKAGE_VERSION_PATCH 90)

set(CPACK_RPM_PACKAGE_REQUIRES "python >= 3.3.0, python-arcus >= 15.05.90, python-qt5 >= 5.4.0")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3 >= 3.3.0, python3-arcus >= 15.05.90, python-qt5 >= 5.4.0")

include(CPack)

set(CPACK_PACKAGE_VENDOR "Ultimaker")
set(CPACK_PACKAGE_CONTACT "Arjen Hiemstra <a.hiemstra@ultimaker.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Uranium 3D Application Framework")
set(CPACK_PACKAGE_VERSION_MAJOR 15)
set(CPACK_PACKAGE_VERSION_MINOR 05)
set(CPACK_PACKAGE_VERSION_PATCH 93)

set(RPM_REQUIRES
    "python3 >= 3.4.0"
    "python3-qt5 >= 5.4.0"
    "qt5-qtquickcontrols >= 5.4.0"
    "python3-arcus >= 15.05.90"
)
string(REPLACE ";" "," RPM_REQUIRES "${RPM_REQUIRES}")
set(CPACK_RPM_PACKAGE_REQUIRES ${RPM_REQUIRES})

set(DEB_DEPENDS
    "python3 >= 3.4.0"
    "python3-pyqt5 >= 5.4.0"
    "python3-pyqt5.qtopengl >= 5.4.0"
    "python3-pyqt5.qtquick >= 5.4.0"
    "python3-pyqt5.qtsvg >= 5.4.0"
    "qml-module-qtquick2 >= 5.4.0"
    "qml-module-qtquick-window2 >= 5.4.0"
    "qml-module-qtquick-layouts >= 5.4.0"
    "qml-module-qtquick-dialogs >= 5.4.0"
    "qml-module-qtquick-controls >= 5.4.0"
    "python3-arcus >= 15.05.90"
)
string(REPLACE ";" "," DEB_DEPENDS "${DEB_DEPENDS}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS})

include(CPack)

Update package version and set the right dependencies for Fedora/Debian

Contributes to #42


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

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

include(polly_add_cache_flag)

polly_add_cache_flag(CMAKE_CXX_FLAGS "-m32")
polly_add_cache_flag(CMAKE_C_FLAGS "-m32 -march=native")

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

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

include(polly_add_cache_flag)

polly_add_cache_flag(CMAKE_CXX_FLAGS "-m32 -march=native")
polly_add_cache_flag(CMAKE_C_FLAGS "-m32 -march=native")

Add march flag to gcc x86 to enable SSE, again


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

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

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

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

Update FW: CAM-D (4th socket) tested, AR0234 support. Note: if AR0234 sensors are used, cannot be combined with other types at the moment (due to tuning blobs in use)


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

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

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

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

Update FW - [ImageManip][bug fix] Properly align the maximum size of the calculated parameters for the warp filter


# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Sets cpu core options
function(mbed_set_cpu_core_options target mbed_toolchain)
    if(${mbed_toolchain} STREQUAL "GCC_ARM")
        list(APPEND common_toolchain_options
            "-mthumb"
            "-mcpu=cortex-m7"
        )

        target_compile_options(${target}
            INTERFACE
                ${common_toolchain_options}
        )

        target_link_options(${target}
            INTERFACE
                ${common_toolchain_options}
        )
    elseif(${mbed_toolchain} STREQUAL "ARM")
        list(APPEND compile_options
            "-mcpu=cortex-m7"
            "-mfpu=none"
        )

        target_compile_options(${target}
            INTERFACE
                $<$<COMPILE_LANGUAGE:C>:${compile_options}>
                $<$<COMPILE_LANGUAGE:CXX>:${compile_options}>
                $<$<COMPILE_LANGUAGE:ASM>:-mcpu=Cortex-M7.no_fp>
        )

        target_link_options(${target}
            INTERFACE
                "--cpu=Cortex-M7.no_fp"
        )
    endif()
endfunction()

function(mbed_set_cpu_core_definitions target)
    target_compile_definitions(${target}
        INTERFACE
            __CORTEX_M7
            ARM_MATH_CM7
            __CMSIS_RTOS
            __MBED_CMSIS_RTOS_CM
    )
endfunction()

# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Sets cpu core options
function(mbed_set_cpu_core_options target mbed_toolchain)
    if(${mbed_toolchain} STREQUAL "GCC_ARM")
        list(APPEND common_toolchain_options
            "-mthumb"
            "-mcpu=cortex-m7"
        )

        target_compile_options(${target}
            INTERFACE
                ${common_toolchain_options}
        )

        target_link_options(${target}
            INTERFACE
                ${common_toolchain_options}
        )
    elseif(${mbed_toolchain} STREQUAL "ARM")
        list(APPEND compile_options
            "-mcpu=cortex-m7"
            "-mfpu=none"
        )

        target_compile_options(${target}
            INTERFACE
                $<$<COMPILE_LANGUAGE:C>:${compile_options}>
                $<$<COMPILE_LANGUAGE:CXX>:${compile_options}>
                $<$<COMPILE_LANGUAGE:ASM>:${compile_options}>
        )

        target_link_options(${target}
            INTERFACE
                "--cpu=Cortex-M7.no_fp"
        )
    endif()
endfunction()

function(mbed_set_cpu_core_definitions target)
    target_compile_definitions(${target}
        INTERFACE
            __CORTEX_M7
            ARM_MATH_CM7
            __CMSIS_RTOS
            __MBED_CMSIS_RTOS_CM
    )
endfunction()

Fix Cortex M7 flag passed to assembler

CMake: Fix Cortex M7 flag passed to assembler


# Include the midas script
include(${Video-Core-Common_SOURCE_DIR}/MIDAS.cmake)

# Macro to add a midas test with the "Video" label
macro(add_video_test)
  midas_add_test(${ARGV})
  set_property(TEST ${ARGV1} PROPERTY LABELS Video)
endmacro(add_video_test)

# Include the midas script
include(${Video-Core-Common_SOURCE_DIR}/MIDAS.cmake)

# Macro to add a midas test with the "Video" label
macro(add_video_test)
  midas_add_test(${ARGV})
  set_property(TEST ${ARGV1} PROPERTY LABELS Video)
  set_property(TEST ${ARGV1}_fetchData PROPERTY LABELS Video)
endmacro(add_video_test)

Add Video label for _fetchData tests

COMP: Add Video label for _fetchData tests


## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
##
## # The following are required to submit to the CDash dashboard:
##   ENABLE_TESTING()
##   INCLUDE(CTest)

set(CTEST_PROJECT_NAME "Lean")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

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

set(UPDATE_COMMAND "git")

## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
##
## # The following are required to submit to the CDash dashboard:
##   ENABLE_TESTING()
##   INCLUDE(CTest)

set(CTEST_PROJECT_NAME "Lean")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

#set(CTEST_DROP_METHOD "http")
#set(CTEST_DROP_SITE "my.cdash.org")
#set(CTEST_DROP_LOCATION "/submit.php?project=Lean")
#set(CTEST_DROP_SITE_CDASH TRUE)

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cmacslab2.modck.cs.cmu.edu")
set(CTEST_DROP_LOCATION "/CDash-2-0-2/submit.php?project=Lean")
set(CTEST_DROP_SITE_CDASH TRUE)

set(UPDATE_COMMAND "git")

Use cdash on cmacslab2 machine due to 10-build per day restriction


#Find the Rabbitmq C library

INCLUDE(LibFindMacros)

# Find the include directories
FIND_PATH(Rabbitmqc_INCLUDE_DIR
	NAMES amqp.h
	PATHS ${Rabbitmqc_DIR}/include
	)

FIND_LIBRARY(Rabbitmqc_LIBRARY
	NAMES rabbitmq
	PATHS ${Rabbitmqc_DIR}/lib
	)

SET(Rabbitmqc_PROCESS_INCLUDES Rabbitmqc_INCLUDE_DIR)
SET(Rabbitmqc_PROCESS_LIBS Rabbitmqc_LIBRARY)
LIBFIND_PROCESS(Rabbitmqc)

#Find the Rabbitmq C library

INCLUDE(LibFindMacros)

# Find the include directories
FIND_PATH(Rabbitmqc_INCLUDE_DIR
	NAMES amqp.h
    HINTS ${Rabbitmqc_DIR}/include
	)

FIND_LIBRARY(Rabbitmqc_LIBRARY
	NAMES rabbitmq
    HINTS ${Rabbitmqc_DIR}/lib
	)

SET(Rabbitmqc_PROCESS_INCLUDES Rabbitmqc_INCLUDE_DIR)
SET(Rabbitmqc_PROCESS_LIBS Rabbitmqc_LIBRARY)

LIBFIND_PROCESS(Rabbitmqc)

Make Rabbitmq_DIR take precidence over system paths


#
# Usage: cmake -D "PROJECT_SOURCE_DIR:PATH=${PROJECT_SOURCE_DIR}"
#              -D "OUTPUT_FILE:PATH=${PROJECT_BINARY_DIR}/Examples.dox"
#              -P GenerateExamplesDox.cmake

# This cmake script gets a lists of examples for the project and
# generates a file suitable for doxygen. The file is a list of
# "\examples filename", where doxygen will search for fileanme in it's
# example path. Doxygen should then generate an examples page with the
# referenced files.

# glob the examples for each language
file( GLOB_RECURSE EXAMPLES_LIST
  RELATIVE "${PROJECT_SOURCE_DIR}/Examples"
  "*.cxx"
  "*.py"
  "*.java"
  "*.tcl"
  "*.rb"
  "*.R"
  "*.cs"
)

# remove the file before we begin appending
file( REMOVE ${OUTPUT_FILE} )

# begin comment
file( APPEND ${OUTPUT_FILE} "/**\n")

FOREACH( f IN LISTS EXAMPLES_LIST )
  file( APPEND ${OUTPUT_FILE}  "\\example ${f}\n" )
ENDFOREACH( )

# end comment
file( APPEND ${OUTPUT_FILE}  "*/\n" )

#
# Usage: cmake -D "PROJECT_SOURCE_DIR:PATH=${PROJECT_SOURCE_DIR}"
#              -D "OUTPUT_FILE:PATH=${PROJECT_BINARY_DIR}/Examples.dox"
#              -P GenerateExamplesDox.cmake

# This cmake script gets a lists of examples for the project and
# generates a file suitable for doxygen. The file is a list of
# "\examples filename", where doxygen will search for fileanme in it's
# example path. Doxygen should then generate an examples page with the
# referenced files.

# glob the examples for each language
file( GLOB_RECURSE EXAMPLES_LIST
  RELATIVE "${PROJECT_SOURCE_DIR}/Examples"
  "*.cxx"
  "*.py"
  "*.java"
  "*.tcl"
  "*.rb"
  "*.R"
  "*.cs"
)

# remove the file before we begin appending
file( REMOVE ${OUTPUT_FILE} )

# begin comment
file( APPEND ${OUTPUT_FILE} "namespace sitk = itk::simple;/**\n")

FOREACH( f IN LISTS EXAMPLES_LIST )
  file( APPEND ${OUTPUT_FILE}  "\\example ${f}\n" )
ENDFOREACH( )

# end comment
file( APPEND ${OUTPUT_FILE}  "*/\n" )

Add sitk namespace alias on example page.

This enable links from the C++ example to the used classes in the
doxygen.

Change-Id: Iaea442402f0ff27a4a83f1c380ed60a6fab52b72


# Make the SWIG generated Python interface modules more portable by using rpath for the the Python dynamic library.
string(REPLACE "${LIST_SEPARATOR}" ";" SHARED_OBJECT_MODULES "${SHARED_OBJECT_MODULES}")
foreach(_M ${SHARED_OBJECT_MODULES})
  execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -change "/Library/Frameworks/Python.framework/Versions/${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/Python" @rpath/Python.framework/Versions/${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/Python ${_M})
  execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -add_rpath /Library/Frameworks ${_M})
  execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -add_rpath /opt/homebrew/Frameworks ${_M})
endforeach()

# Make the SWIG generated Python interface modules more portable by using rpath for the the Python dynamic library.
string(REPLACE "${LIST_SEPARATOR}" ";" SHARED_OBJECT_MODULES "${SHARED_OBJECT_MODULES}")
foreach(_M ${SHARED_OBJECT_MODULES})
  execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -change "/Library/Frameworks/Python.framework/Versions/${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/Python" @rpath/Python.framework/Versions/${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/Python ${_M})
  execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -add_rpath /Library/Frameworks ${_M})
  execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -add_rpath /usr/local/Frameworks ${_M})
  execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -add_rpath /opt/homebrew/Frameworks ${_M})
endforeach()

Add /usr/local/Frameworks as another path to search.


include(CMakeParseArguments)

find_program(POD2MAN pod2man)

# Create a target to create a man page from a pod file.
#
# manpage(
#     SOURCE foobar.pod
#     PAGE_HEADER "text"
#     MAN_FILE_BASENAME foobar
#     MAN_SECTION N
#     INSTALL_IN_COMPONENT comp
#     )
function(manpage)
  cmake_parse_arguments(
      MP # prefix
      "" # options
      "SOURCE;PAGE_HEADER;MAN_FILE_BASENAME;MAN_SECTION;INSTALL_IN_COMPONENT" # single-value args
      "" # multi-value args
      ${ARGN})

  if(NOT POD2MAN)
    message(FATAL_ERROR "Need pod2man installed to generate man page")
  endif()

  set(output_file_name
      "${CMAKE_CURRENT_BINARY_DIR}/${MP_MAN_FILE_BASENAME}.${MP_MAN_SECTION}")

  add_custom_command_target(
      unused_var
      COMMAND
        "${POD2MAN}" "--section" "${MP_MAN_SECTION}"
        "--center" "${MP_PAGE_HEADER}" "--release"
        "--name" "${MP_MAN_FILE_BASENAME}"
        "--stderr"
        "${MP_SOURCE}" > "${output_file_name}"
      OUTPUT "${output_file_name}"
      DEPENDS "${MP_SOURCE}"
      ALL)

  swift_install_in_component("${MP_INSTALL_IN_COMPONENT}"
      FILES "${output_file_name}"
      DESTINATION "share/man/man${MP_MAN_SECTION}")
endfunction()

include(CMakeParseArguments)

find_program(POD2MAN pod2man)

# Create a target to create a man page from a pod file.
#
# manpage(
#     SOURCE foobar.pod
#     PAGE_HEADER "text"
#     MAN_FILE_BASENAME foobar
#     MAN_SECTION N
#     INSTALL_IN_COMPONENT comp
#     )
function(manpage)
  cmake_parse_arguments(
      MP # prefix
      "" # options
      "SOURCE;PAGE_HEADER;MAN_FILE_BASENAME;MAN_SECTION;INSTALL_IN_COMPONENT" # single-value args
      "" # multi-value args
      ${ARGN})

  if(NOT POD2MAN)
    message(FATAL_ERROR "Need pod2man installed to generate man page")
  endif()

  set(output_file_name
      "${CMAKE_CURRENT_BINARY_DIR}/${MP_MAN_FILE_BASENAME}.${MP_MAN_SECTION}")

  add_custom_command_target(
      unused_var
      COMMAND
        "${POD2MAN}" "--section" "${MP_MAN_SECTION}"
        "--center" "${MP_PAGE_HEADER}" "--release=\"swift ${SWIFT_VERSION}\""
        "--name" "${MP_MAN_FILE_BASENAME}"
        "--stderr"
        "${MP_SOURCE}" > "${output_file_name}"
      OUTPUT "${output_file_name}"
      DEPENDS "${MP_SOURCE}"
      ALL)

  swift_install_in_component("${MP_INSTALL_IN_COMPONENT}"
      FILES "${output_file_name}"
      DESTINATION "share/man/man${MP_MAN_SECTION}")
endfunction()

Add release version to manpage

Add release version to manpage

This also fixes compatibility with newer versions of pod2man.


# --------------------------------------------------------------
# Indicate CMake 2.7 and above that we don't want to mix relative
#  and absolute paths in linker lib lists.
# Run "cmake --help-policy CMP0003" for more information.
# --------------------------------------------------------------
if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

if(COMMAND cmake_policy)
	# We don't want to mix relative and absolute paths in linker lib lists.
	cmake_policy(SET CMP0003 NEW)

	# Allow using the LOCATION target property.
	if(NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 3.0)
		cmake_policy(SET CMP0026 OLD)
	endif(NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 3.0)
endif(COMMAND cmake_policy)

Handle new CMake 3.0 policy: CMP0026

Handle new CMake 3.0 policy: CMP0026


if (MSI_OUTPUT_LEGACY)
  add_custom_target(packageupload
    COMMAND rclone --transfers=1 --checkers=2 mkdir ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
    COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
    COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}/${MSI_OUTPUT_LEGACY}
  )
else(MSI_OUTPUT_LEGACY)
  add_custom_target(packageupload
    COMMAND rclone --transfers=1 --checkers=2 mkdir ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
    COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
  )
endif(MSI_OUTPUT_LEGACY)

if (MSI_OUTPUT_LEGACY)
  add_custom_target(packageupload
    COMMAND rclone --transfers=1 --checkers=2 mkdir ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
    COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
    COMMAND copy ${MSI_OUTPUT} ${MSI_OUTPUT_LEGACY}
    COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT_LEGACY} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
  )
else(MSI_OUTPUT_LEGACY)
  add_custom_target(packageupload
    COMMAND rclone --transfers=1 --checkers=2 mkdir ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
    COMMAND rclone --transfers=1 --checkers=2 copy ${MSI_OUTPUT} ${REPO_UPLOAD_CLOUD}:${VERSION_SHORT}
  )
endif(MSI_OUTPUT_LEGACY)

Create a local copy of the legacy MSI, then upload

rclone cannot copy one file to a different remote name


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

cmake_minimum_required(VERSION 3.0)

### Include HunterGate module from git submodule
set(gate_dir "${CMAKE_CURRENT_LIST_DIR}/../gate")
set(gate_module "${gate_dir}/cmake/HunterGate.cmake")

get_filename_component(gate_module "${gate_module}" ABSOLUTE)
if(NOT EXISTS "${gate_module}")
  message(
      FATAL_ERROR
      "${gate_module} module not found (update git submodule needed?)"
  )
endif()

message("Including HunterGate: ${gate_module}")
include("${gate_module}")

### Check testing variables are set
string(COMPARE EQUAL "${TESTING_URL}" "" url_is_empty)
string(COMPARE EQUAL "${TESTING_SHA1}" "" sha1_is_empty)
string(COMPARE EQUAL "${HUNTER_ROOT}" "" hunter_root_is_empty)

if(NOT url_is_empty AND NOT sha1_is_empty AND NOT hunter_root_is_empty)
  get_filename_component(TESTING_URL "${TESTING_URL}" ABSOLUTE)

  ### HunterGate module
  HunterGate(URL "${TESTING_URL}" SHA1 "${TESTING_SHA1}")
else()
  get_filename_component(HUNTER_ROOT "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
  HunterGate(URL "x" SHA1 "x")
endif()

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

cmake_minimum_required(VERSION 3.0)

### Include HunterGate module from git submodule
set(gate_dir "${CMAKE_CURRENT_LIST_DIR}/../gate")
set(gate_module "${gate_dir}/cmake/HunterGate.cmake")

get_filename_component(gate_module "${gate_module}" ABSOLUTE)
if(NOT EXISTS "${gate_module}")
  message(
      FATAL_ERROR
      "${gate_module} module not found (update git submodule needed?)"
  )
endif()

message("Including HunterGate: ${gate_module}")
include("${gate_module}")

### Check testing variables are set
string(COMPARE EQUAL "${TESTING_URL}" "" url_is_empty)
string(COMPARE EQUAL "${TESTING_SHA1}" "" sha1_is_empty)
string(COMPARE EQUAL "${HUNTER_ROOT}" "" hunter_root_is_empty)

if(NOT url_is_empty AND NOT sha1_is_empty AND NOT hunter_root_is_empty)
  get_filename_component(TESTING_URL "${TESTING_URL}" ABSOLUTE)

  ### HunterGate module
  HunterGate(URL "${TESTING_URL}" SHA1 "${TESTING_SHA1}")
else()
  get_filename_component(HUNTER_ROOT "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
  HunterGate(URL "x" SHA1 "xxxxxxxx")
endif()

Fix SHA1 for manually downloaded hunter with git

When using CMake 3.0.x, with manually downloaded Hunter the examples
fails with:

CMake Error at /home/pretyman/.hunter/gate/cmake/HunterGate.cmake:124
(string):
  string end index: 7 is out of range -1 - 1
Call Stack (most recent call first):
  /home/pretyman/.hunter/gate/cmake/HunterGate.cmake:447
(hunter_gate_self)
  /home/pretyman/.hunter/examples/common.cmake:33 (HunterGate)
  CMakeLists.txt:5 (include)

Because the SHA1 passed by examples/common.cmake is too short, so it
was expanded to 7 characters to avoid this error.


#ckwg +4
# Copyright 2010, 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.

# Locate NumPy library
# This module defines
#  NUMPY_FOUND       - if false, do not try to link to NumPy
#  NUMPY_INCLUDE_DIR - where to find numpy/numpyconfig.h

if (PYTHON_EXECUTABLE)
  execute_process(
    COMMAND         "${PYTHON_EXECUTABLE}" -c
                    "import numpy, sys; sys.stdout.write(numpy.get_include())"
    RESULT_VARIABLE __numpy_include_dir_res
    OUTPUT_VARIABLE __numpy_include_dir
    ERROR_QUIET)

  if (${__numpy_include_dir_res} EQUAL 0)
    set(NUMPY_INCLUDE_DIR "${__numpy_include_dir}")
  endif ()
endif ()

# handle the QUIETLY and REQUIRED arguments and set NUMPY_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(NumPy DEFAULT_MSG NUMPY_INCLUDE_DIR)

mark_as_advanced(
  NUMPY_INCLUDE_DIR)

#ckwg +4
# Copyright 2010, 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.

# Locate NumPy library
# This module defines
#  NUMPY_FOUND       - if false, do not try to link to NumPy
#  NUMPY_INCLUDE_DIR - where to find numpy/numpyconfig.h

if (PYTHON_EXECUTABLE)
  execute_process(
    COMMAND         "${PYTHON_EXECUTABLE}" -c
                    "import numpy, sys; sys.stdout.write(numpy.get_include())"
    RESULT_VARIABLE __numpy_include_dir_res
    OUTPUT_VARIABLE __numpy_include_dir
    ERROR_QUIET)

  if (${__numpy_include_dir_res} EQUAL 0)
    set(NUMPY_INCLUDE_DIR "${__numpy_include_dir}"
      CACHE PATH "Include directory for NumPy headers")
  endif ()
endif ()

# handle the QUIETLY and REQUIRED arguments and set NUMPY_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(NumPy DEFAULT_MSG NUMPY_INCLUDE_DIR)

mark_as_advanced(
  NUMPY_INCLUDE_DIR)

Set the include dir for NumPy in the cache


itk_fetch_module(MGHIO
  "MGHIO ImageIO plugin for ITK"
  GIT_REPOSITORY https://github.com/Slicer/itkMGHImageIO.git
  GIT_TAG 841832fd94889d0793b606c0a5b9be981b98cec3
  )

itk_fetch_module(MGHIO
  "MGHIO ImageIO plugin for ITK"
  GIT_REPOSITORY https://github.com/Slicer/itkMGHImageIO.git
  GIT_TAG 1beeaa5abb18188ded17bf6337b31c572d2594cf
  )

Fix cmake warnings on EXCLUDE_FROM_ALL.

COMP: Fix cmake warnings on EXCLUDE_FROM_ALL.

EXCLUDE_FROM_ALL is replaced by EXCLUDE_FROM_DEFAULT
in MGHIO remote module:
1beeaa5abb18188ded17bf6337b31c572d2594cf .

Change-Id: I7e0aa6b4fcec4a631faded0949d425de7cf9d3ba


if(UNIX)
    include_directories("/usr/include/mysql/")
else()
    include_directories("${LIBRARY_DIR}/external/MySQL/")
    if(CMAKE_SIZEOF_VOID_P EQUAL 4)
        # 32 bit link
        link_directories(${LIBRARY_DIR}/external/MySQL/x86)
        link_directories(${LIBRARY_DIR}/external/zlib/x86)
    else()
        # 64 bit link
        link_directories(${LIBRARY_DIR}/external/MySQL/x64)
        link_directories(${LIBRARY_DIR}/external/zlib/x64)
    endif()
endif()

if(UNIX)
    find_path(MYSQL_INCLUDE_DIR mysql.h
        /usr/include/mysql
        /usr/local/include/mysql
        /opt/mysql/mysql/include
        /opt/mysql/mysql/include/mysql
        /opt/mysql/include
        /opt/local/include/mysql5
        /usr/local/mysql/include
        /usr/local/mysql/include/mysql
        $ENV{ProgramFiles}/MySQL/*/include
        $ENV{SystemDrive}/MySQL/*/include
    )

    if(MYSQL_INCLUDE_DIR)
        set(MYSQL_FOUND TRUE)

        include_directories(${MYSQL_INCLUDE_DIR})
    endif(MYSQL_INCLUDE_DIR)

    if(MYSQL_FOUND)
        message(STATUS "MySQL include dir: ${MYSQL_INCLUDE_DIR}")
    else(MYSQL_FOUND)
        message(FATAL_ERROR "Could not find MySQL headers.")
    endif(MYSQL_FOUND)
else()
    include_directories("${LIBRARY_DIR}/external/MySQL/")
    if(CMAKE_SIZEOF_VOID_P EQUAL 4)
        # 32 bit link
        link_directories(${LIBRARY_DIR}/external/MySQL/x86)
        link_directories(${LIBRARY_DIR}/external/zlib/x86)
    else()
        # 64 bit link
        link_directories(${LIBRARY_DIR}/external/MySQL/x64)
        link_directories(${LIBRARY_DIR}/external/zlib/x64)
    endif()
endif()

Fix CMake MySQL module to be more nix-friendly


# Enable C++11
if(CMAKE_COMPILER_IS_GNUCXX)
  add_definitions(-std=c++0x)
  add_definitions(-std=c++11)
endif()

# Enable C++11
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  # using regular Clang or AppleClang
  add_definitions(-std=c++11)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  # using GCC
  add_definitions(-std=c++0x)
  add_definitions(-std=c++11)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
  # using Intel C++
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  # using Visual Studio C++
endif()

Add compiler options to clang as well as gcc and msvc


option(ITK_USE_SYSTEM_HDF5 "Use an outside build of HDF5." ${ITK_USE_SYSTEM_LIBRARIES})
mark_as_advanced(ITK_USE_SYSTEM_HDF5)
if(ITK_USE_SYSTEM_HDF5)
  if(BUILD_SHARED_LIBS)
    find_package(HDF5 NO_MODULE COMPONENTS CXX C shared)
  else()
    find_package(HDF5 NO_MODULE COMPONENTS CXX C static)
  endif()

  if(NOT HDF5_FOUND)
    find_package(HDF5 REQUIRED COMPONENTS CXX C)
  endif()
endif()

option(ITK_USE_SYSTEM_HDF5 "Use an outside build of HDF5." ${ITK_USE_SYSTEM_LIBRARIES})
mark_as_advanced(ITK_USE_SYSTEM_HDF5)
if(ITK_USE_SYSTEM_HDF5)
  if(BUILD_SHARED_LIBS)
    find_package(HDF5 QUIET NO_MODULE COMPONENTS CXX C shared)
  else()
    find_package(HDF5 QUIET NO_MODULE COMPONENTS CXX C static)
  endif()

  if(NOT HDF5_FOUND)
    find_package(HDF5 REQUIRED COMPONENTS CXX C)
  endif()
endif()

COMP: Make initial HDF5 discovery of 1.8.16 quiet.

Avoid the warning:

CMake Warning at Modules/ThirdParty/HDF5/itk-module-init.cmake:7 (find_package):
  Could not find a package configuration file provided by "HDF5" with any of
  the following names:

    HDF5Config.cmake
    hdf5-config.cmake

  Add the installation prefix of "HDF5" to CMAKE_PREFIX_PATH or set
  "HDF5_DIR" to a directory containing one of the above files.  If "HDF5"
  provides a separate development package or SDK, be sure it has been
  installed.

when HDF5 1.8.15 or lower is installed.

Change-Id: Ie7a5dac8da8d3e85c62cc01c8d5a8ed5f18f5d93


#ctest_submit(                                             RETURN_VALUE res)

SET(CTEST_PROJECT_NAME "OpenViBe")
SET(CTEST_NIGHTLY_START_TIME "20:00:00 EST")
SET(CTEST_DROP_METHOD "http")
SET(CTEST_DROP_SITE "cdash.inria.fr")
SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=OpenViBe")
SET(CTEST_DROP_SITE_CDASH TRUE)

#ctest_submit(                                             RETURN_VALUE res)

SET(CTEST_PROJECT_NAME "OpenViBe")
SET(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
SET(CTEST_DROP_METHOD "http")
SET(CTEST_DROP_SITE "cdash.inria.fr")
SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=OpenViBe")
SET(CTEST_DROP_SITE_CDASH TRUE)

Fix time for start nightly build with (Central European Summer Time)

git-svn-id: 8b72b58fb31a931b6e9a2bd3bb08bc6614045fb1@3468 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f


# -*- mode: cmake -*-

# - Find the DATE system
# Finds if the RuleChecker is installed and sets the following variables:
#
# DATE_FOUND = Boolean defining if DATE is installed
#

# Check if DATE is installed and in the path

Execute_process(
  COMMAND which date-config
  OUTPUT_VARIABLE DATE_PROGRAM)

If(DATE_PROGRAM)
  Set(DATE_FOUND YES)
  Message(STATUS "DATE is installed on this system")
  Execute_process(COMMAND date-config --cflags OUTPUT_VARIABLE DATEFLAGS)
Else(DATE_PROGRAM)
  Set(DATE_FOUND NO)
  Message(STATUS "DATE is not installed on this system")
  If(UNIX)
    Execute_process(
      COMMAND uname
      OUTPUT_VARIABLE _uname
      OUTPUT_STRIP_TRAILING_WHITESPACE)
  Else(UNIX)
    Set(_uname "Unknown")
  Endif(UNIX)
  Set(DATEFLAGS "-D${_uname} -DDATE_SYS=${_uname} -Dlong32=\"int\" -Dlong64=\"long long\" -DdatePointer=\"long\"")
Endif(DATE_PROGRAM)

Set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${DATEFLAGS})

# -*- mode: cmake -*-

# - Find the DATE system
# Finds if the RuleChecker is installed and sets the following variables:
#
# DATE_FOUND = Boolean defining if DATE is installed
#

# Check if DATE is installed and in the path

Find_program( DATE_PROGRAM date-config )

If(DATE_PROGRAM)
  Set(DATE_FOUND YES)
  Message(STATUS "DATE is installed on this system")
  Execute_process(COMMAND date-config --cflags OUTPUT_VARIABLE DATEFLAGS)
Else(DATE_PROGRAM)
  Set(DATE_FOUND NO)
  Message(STATUS "DATE is not installed on this system")
  If(UNIX)
    Execute_process(
      COMMAND uname
      OUTPUT_VARIABLE _uname
      OUTPUT_STRIP_TRAILING_WHITESPACE)
  Else(UNIX)
    Set(_uname "Unknown")
  Endif(UNIX)
  Set(DATEFLAGS "-D${_uname} -DDATE_SYS=${_uname} -Dlong32=\"int\" -Dlong64=\"long long\" -DdatePointer=\"long\"")
Endif(DATE_PROGRAM)

Set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${DATEFLAGS})

Use Find_program instead of Execute_process to detect date-config


# Creates a script that applies patches
# This script does not fail on errors. It ensures that we can "apply" patches over and over again.
include(CMakeParseArguments)
find_program(PATCH_EXECUTABLE patch)
function(create_patch_script NAME OUTVAR)
    if(NOT PATCH_EXECUTABLE)
        message(FATAL_ERROR "Could not find the patch program")
    endif()
    cmake_parse_arguments(patcher
        ""
        "CMDLINE;WORKING_DIRECTORY"
        ""
        ${ARGN}
    )
    if(NOT patcher_CMDLINE)
        set(patcher_CMDLINE "")
    endif()
    if(NOT patcher_WORKING_DIRECTORY)
        set(patcher_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    endif()

    # Create patcher script
    file(WRITE "${PROJECT_BINARY_DIR}/patches/${NAME}.cmake"
        "execute_process(\n"
    )
    foreach(filename ${patcher_UNPARSED_ARGUMENTS})
        get_filename_component(filename "${filename}" ABSOLUTE)
        file(APPEND "${PROJECT_BINARY_DIR}/patches/${NAME}.cmake"
            "   COMMAND ${PATCH_EXECUTABLE} -N ${patcher_CMDLINE} < ${filename}\n"
        )
    endforeach()
    file(APPEND "${PROJECT_BINARY_DIR}/patches/${NAME}.cmake"
        "   WORKING_DIRECTORY ${patcher_WORKING_DIRECTORY}\n"
        ")\n"
    )

    set(${OUTVAR} "${PROJECT_BINARY_DIR}/patches/${NAME}.cmake" PARENT_SCOPE)
endfunction()

# Creates a script that applies patches
# This script does not fail on errors. It ensures that we can "apply" patches over and over again.
include(CMakeParseArguments)
find_program(PATCH_EXECUTABLE patch)
find_program(BASH_EXECUTABLE bash)
function(create_patch_script NAME OUTVAR)
    if(NOT PATCH_EXECUTABLE)
        message(FATAL_ERROR "Could not find the patch program")
    endif()
    cmake_parse_arguments(patcher
        ""
        "CMDLINE;WORKING_DIRECTORY"
        ""
        ${ARGN}
    )
    if(NOT patcher_CMDLINE)
        set(patcher_CMDLINE "")
    endif()
    if(NOT patcher_WORKING_DIRECTORY)
        set(patcher_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    endif()

    # Create patcher script
    set(script_file "${PROJECT_BINARY_DIR}/CMakeFiles/patches/noperms/${NAME}.sh")
    file(WRITE "${script_file}"
        "#!${BASH_EXECUTABLE}\n"
        "cd ${patcher_WORKING_DIRECTORY}\n"
    )
    foreach(filename ${patcher_UNPARSED_ARGUMENTS})
        get_filename_component(filename "${filename}" ABSOLUTE)
        file(APPEND "${script_file}"
            "${PATCH_EXECUTABLE} -N ${patcher_CMDLINE} < ${filename}\n"
        )
    endforeach()
    file(APPEND "${script_file}" "true\n")

    file(COPY "${script_file}"
        DESTINATION "${PROJECT_BINARY_DIR}/CMakeFiles/patches/"
        FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
    )

    set(${OUTVAR} "${PROJECT_BINARY_DIR}/CMakeFiles/patches/${NAME}.sh" PARENT_SCOPE)
endfunction()

Patch script as a bash file

Patch script as a bash file

Because execute_process does not accept pipes, it would seem.


#
# ITK WikiExamples
#

# If the environment var WikiExamplesTag exists, use it
if (NOT DEFINED ENV{WikiExamplesTag})
  set(GIT_TAG ee85e99ab3cdd0dd4bedbdd7893c48a09cab0244
     )
else()
  set(GIT_TAG ee85e99ab3cdd0dd4bedbdd7893c48a09cab0244
     )
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 ee85e99ab3cdd0dd4bedbdd7893c48a09cab0244
  )

#
# ITK WikiExamples
#

# If the environment var WikiExamplesTag exists, use it
if (NOT DEFINED ENV{WikiExamplesTag})
  set(GIT_TAG ee85e99ab3cdd0dd4bedbdd7893c48a09cab0244)
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}
  )

BUG: Address use of CMake variables in CMakeLists.txt.

Use the variables referenced for that purpose in the `if/else` block in
order to pick the appropriate commit hash from git.

Change-Id: Ieac69918eb51bc90bc4591c0e709d441d80ab53f


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

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

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

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

Add support for yolov6r2 parsing

Add support for yolov6r2 parsing


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

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

# "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 "4959c559cf7979e1a1a5cbdd0f9a5cbd2299ecb2")

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

Update FW: change SIPP mem alloc to allow 4x ColorCamera to operate at the same time


INCLUDE(ExternalProject)

SET(prefix ${CMAKE_BINARY_DIR}/third_party/cl2hpp)

ExternalProject_Add(
    cl2hpp-ext
    GIT_REPOSITORY https://github.com/KhronosGroup/OpenCL-CLHPP.git
    GIT_TAG 75bb7d0d8b2ffc6aac0a3dcaa22f6622cab81f7c
    PREFIX "${prefix}"
    INSTALL_DIR "${prefix}/package"
    UPDATE_COMMAND ""
    CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" <SOURCE_DIR>
    -DCMAKE_SOURCE_DIR:PATH=<SOURCE_DIR>
    -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
    -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    -DBUILD_DOCS:BOOL=OFF
    -DBUILD_EXAMPLES:BOOL=OFF
    -DBUILD_TESTS:BOOL=OFF
    )

ExternalProject_Get_Property(cl2hpp-ext install_dir)

ADD_CUSTOM_TARGET(cl2hpp DEPENDS "${prefix}/package/CL/cl2.hpp")

ADD_DEPENDENCIES(cl2hpp cl2hpp-ext)

SET(CL2HPP_INCLUDE_DIRECTORY ${install_dir})

INCLUDE(ExternalProject)

SET(prefix ${CMAKE_BINARY_DIR}/third_party/cl2hpp)

ExternalProject_Add(
    cl2hpp-ext
    GIT_REPOSITORY https://github.com/KhronosGroup/OpenCL-CLHPP.git
    GIT_TAG 75bb7d0d8b2ffc6aac0a3dcaa22f6622cab81f7c
    PREFIX "${prefix}"
    INSTALL_DIR "${prefix}/package"
    UPDATE_COMMAND ""
    CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" <SOURCE_DIR>
    -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
    -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    -DBUILD_DOCS:BOOL=OFF
    -DBUILD_EXAMPLES:BOOL=OFF
    -DBUILD_TESTS:BOOL=OFF
    )

ExternalProject_Get_Property(cl2hpp-ext install_dir)

ADD_CUSTOM_TARGET(cl2hpp DEPENDS "${prefix}/package/CL/cl2.hpp")

ADD_DEPENDENCIES(cl2hpp cl2hpp-ext)

SET(CL2HPP_INCLUDE_DIRECTORY ${install_dir})

Remove manual definition of CMAKE_SOURCE_DIR from cl2hpp


# Copyright (c) 2015 Daniel.Nachbaur@epfl.ch
#
# Provide the function common_check_targets to add check targets (clangcheck,
# cppcheck, cpplint) to the given target.

include(GetSourceFilesFromTarget)
include(CommonClangCheck)
include(CommonCPPCheck)
include(CommonCPPLint)

function(common_check_targets _name)
  set(_exclude_pattern ".*moc_|.*qrc_.*\\.c.*$") # Qt moc and qrc files

  # Get the list of files once for all check targets
  get_source_files(${_name} ${_exclude_pattern})
  if(NOT ${_name}_FILES)
    return()
  endif()

  common_clangcheck(${_name} FILES ${${_name}_FILES})
  common_cppcheck(${_name} FILES ${${_name}_FILES}
    POSSIBLE_ERROR FAIL_ON_WARNINGS)
  common_cpplint(${_name} FILES ${${_name}_FILES} CATEGORY_FILTER_OUT readability/streams)
endfunction()

# Copyright (c) 2015 Daniel.Nachbaur@epfl.ch
#
# Provide the function common_check_targets to add check targets (clangcheck,
# cppcheck, cpplint) to the given target.

include(GetSourceFilesFromTarget)
include(CommonClangCheck)
include(CommonCPPCheck)
include(CommonCPPLint)

function(common_check_targets _name)
  # Qt moc & qrc files, C and Objective-C files
  set(_exclude_pattern ".*moc_|.*qrc_.*\\.c.*|.*\\.mm.*$")

  # Get the list of files once for all check targets
  get_source_files(${_name} ${_exclude_pattern})
  if(NOT ${_name}_FILES)
    return()
  endif()

  common_clangcheck(${_name} FILES ${${_name}_FILES})
  common_cppcheck(${_name} FILES ${${_name}_FILES}
    POSSIBLE_ERROR FAIL_ON_WARNINGS)
  common_cpplint(${_name} FILES ${${_name}_FILES} CATEGORY_FILTER_OUT readability/streams)
endfunction()

Exclude Objective-C files from cppcheck

Exclude Objective-C files from cppcheck


set(DOCUMENTATION "This module contains a filter to compute the strain tensor
field from a displacement field image.")

itk_module(Strain
  DEPENDS
    ITKCommon
    ITKImageGradient
    ITKImageSources
  TEST_DEPENDS
    ITKTestKernel
    ITKDisplacementField
  EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
)

set(DOCUMENTATION "This module contains a filter to compute the strain tensor
field from a displacement field image.")

itk_module(Strain
  DEPENDS
    ITKCommon
    ITKImageGradient
    ITKImageSources
  TEST_DEPENDS
    ITKTestKernel
    ITKDisplacementField
    ITKIOVTK
  EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
)

BUG: Fix module test missing ITKIOVTK dependency.

Fix module test missing `ITKIOVTK` library dependency.


# - Find the readline include files and libraries
# - Include finding of termcap or curses
#
# READLINE_FOUND
# READLINE_INCLUDE_DIR
# READLINE_LIBRARIES
#
include(FindCurses)
include(FindTermcap)

FIND_LIBRARY(READLINE_HISTORY_LIBRARY NAMES history)
FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline)
FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h)
SET(READLINE_FOUND FALSE)

IF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
	SET (READLINE_FOUND TRUE)
	SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
	SET (READLINE_LIBRARIES ${READLINE_HISTORY_LIBRARY} ${READLINE_READLINE_LIBRARY})
	MESSAGE(STATUS "Found GNU readline: ${READLINE_HISTORY_LIBRARY}, ${READLINE_READLINE_LIBRARY}")
	IF (CURSES_FOUND)
		SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${CURSES_LIBRARY})
	ENDIF(CURSES_FOUND)
	IF (TERMCAP_FOUND)
		SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY})
	ENDIF (TERMCAP_FOUND)
ENDIF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR)

MARK_AS_ADVANCED(
	READLINE_FOUND
	READLINE_INCLUDE_DIR
	READLINE_LIBRARIES
	)

# - Find the readline include files and libraries
# - Include finding of termcap or curses
#
# READLINE_FOUND
# READLINE_INCLUDE_DIR
# READLINE_LIBRARIES
#
include(FindTermcap)

FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline)
FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h)
SET(READLINE_FOUND FALSE)

IF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
	SET (READLINE_FOUND TRUE)
	SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
	SET (READLINE_LIBRARIES ${READLINE_READLINE_LIBRARY})
	MESSAGE(STATUS "Found GNU readline: ${READLINE_READLINE_LIBRARY}")
	IF (TERMCAP_FOUND)
		SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY})
	ENDIF (TERMCAP_FOUND)
ENDIF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR)

MARK_AS_ADVANCED(
	READLINE_FOUND
	READLINE_INCLUDE_DIR
	READLINE_LIBRARIES
	)

Fix broken (crashing) command line client on Ubuntu Precise

libreadline already goes with libhistory compiled in,
no reason to add it to the dynamically linked library
list.
Apparently, explicitly listing libhistory leads to
the dl loader pre-loading it instead of the compiled-in
version, which, in turn, leads to a crash on the first
history search in the command line client.

The fix is to remove cmake dependency on libhistory
as well as on libncurses, which we don't need either
(always require libtermcap).


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

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

include(polly_fatal_error)

string(COMPARE EQUAL "${POLLY_XCODE_COMPILER}" "" _is_empty)
if(_is_empty)
  polly_fatal_error("Please set POLLY_CODE_COMPILER")
endif()

set(_cmd xcrun --find "${POLLY_XCODE_COMPILER}")

execute_process(
    COMMAND
    ${_cmd}
    OUTPUT_VARIABLE _compiler_path
    RESULT_VARIABLE _result
    OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(NOT _result EQUAL 0)
  polly_fatal_error("Command failed: ${_cmd}")
endif()

set(CMAKE_XCODE_ATTRIBUTE_CC "${_compiler_path}")

polly_status_debug("Compiler: ${_compiler_path}")

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

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

include(polly_fatal_error)

string(COMPARE EQUAL "${POLLY_XCODE_COMPILER}" "" _is_empty)
if(_is_empty)
  polly_fatal_error("Please set POLLY_XCODE_COMPILER")
endif()

set(_cmd xcrun --find "${POLLY_XCODE_COMPILER}")

execute_process(
    COMMAND
    ${_cmd}
    OUTPUT_VARIABLE _compiler_path
    RESULT_VARIABLE _result
    OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(NOT _result EQUAL 0)
  polly_fatal_error("Command failed: ${_cmd}")
endif()

set(CMAKE_XCODE_ATTRIBUTE_CC "${_compiler_path}")

polly_status_debug("Compiler: ${_compiler_path}")

Fix typo in error message for POLLY_XCODE_COMPILER


# header files
#SET(CMAKE_INCLUDE_DIRECTORIES_BEFORE, ON)
if(MSVC)
ADD_DEFINITIONS(-DHAVE_MS_C_RUNTIME)
ADD_DEFINITIONS(-DHAVE_WIN32_THREADS)
INCLUDE_DIRECTORIES(AFTER ${M3E_SOURCE_DIR}/src/native/msvc)
endif()
INCLUDE_DIRECTORIES(AFTER ${M3E_SOURCE_DIR}/src/native/include)

# source files
FILE(GLOB LIBUTILS_SOURCE_FILES
${M3E_SOURCE_DIR}/src/native/libutils/*.c
${M3E_SOURCE_DIR}/src/native/libutils/*.cpp
${M3E_SOURCE_DIR}/src/native/libutils/cutils/*.c
)

# source code for MSVC
if(MSVC)
SET(LIBUTILS_SOURCE_FILES ${LIBUTILS_SOURCE_FILES} ${M3E_SOURCE_DIR}/src/native/msvc/sys/time.c)
endif()

# target files
ADD_LIBRARY(utils SHARED ${LIBUTILS_SOURCE_FILES})

# include and define
#SET(CMAKE_INCLUDE_DIRECTORIES_BEFORE, ON)
if(MSVC)
ADD_DEFINITIONS(-DHAVE_MS_C_RUNTIME)
ADD_DEFINITIONS(-DHAVE_WIN32_THREADS)
INCLUDE_DIRECTORIES(AFTER ${M3E_SOURCE_DIR}/src/native/msvc)
elseif(APPLE)
ADD_DEFINITIONS(-D_MACOSX)
ADD_DEFINITIONS(-DHAVE_PTHREADS)
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11 -stdlib=libc++")
endif()
INCLUDE_DIRECTORIES(AFTER ${M3E_SOURCE_DIR}/src/native/include)

# header files
FILE(GLOB LIBUTILS_HEADER_FILES
${M3E_SOURCE_DIR}/src/native/include/cutils/*.h
${M3E_SOURCE_DIR}/src/native/include/utils/*.h
)

# source files
FILE(GLOB LIBUTILS_SOURCE_FILES
${M3E_SOURCE_DIR}/src/native/libutils/*.c
${M3E_SOURCE_DIR}/src/native/libutils/*.cpp
${M3E_SOURCE_DIR}/src/native/libutils/cutils/*.c
)

# header and source code for MSVC
if(MSVC)
SET(LIBUTILS_HEADER_FILES ${LIBUTILS_HEADER_FILES} ${M3E_SOURCE_DIR}/src/native/msvc/stdint.h)
SET(LIBUTILS_HEADER_FILES ${LIBUTILS_HEADER_FILES} ${M3E_SOURCE_DIR}/src/native/msvc/sys/time.h)
SET(LIBUTILS_SOURCE_FILES ${LIBUTILS_SOURCE_FILES} ${M3E_SOURCE_DIR}/src/native/msvc/sys/time.c)
endif()

# target files
ADD_LIBRARY(utils SHARED ${LIBUTILS_SOURCE_FILES} ${LIBUTILS_HEADER_FILES})

Fix building error for xcode. & Add header files to project.


#set(Boost_DEBUG 1)

message(STATUS "Looking for boost")

#set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:/Boost/boost_1_72_0/include")
#set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:/Boost/boost_1_72_0/lib")

set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_DEBUG_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)

find_package(Boost REQUIRED COMPONENTS
    program_options chrono filesystem system date_time)

message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost_LIBRARY_DIR_DEBUG: ${Boost_LIBRARY_DIR_DEBUG}")
message(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")

include_directories(${Boost_INCLUDE_DIRS})

Remove debugging of Boost libs.

Remove debugging of Boost libs.


# This extends CMake's FindHDF5.cmake to add support to include MPI include
# paths and libraries in the HDF5 ones if HDF5_IS_PARALLEL is ON
# (BUG #0014363).

# include the default FindHDF5.cmake.
include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)

if(HDF5_FOUND AND HDF5_IS_PARALLEL)
  include(vtkMPI)
  if(MPI_C_INCLUDE_PATH)
    list(APPEND HDF5_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH})
  endif()
  if(MPI_C_LIBRARIES)
    list(APPEND HDF5_LIBRARIES ${MPI_C_LIBRARIES})
  endif()
endif()

# This extends CMake's FindHDF5.cmake to add support to include MPI include
# paths and libraries in the HDF5 ones if HDF5_IS_PARALLEL is ON
# (BUG #0014363).

# include the default FindHDF5.cmake.
include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)

if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL))
  include(vtkMPI)
  if(MPI_C_INCLUDE_PATH)
    list(APPEND HDF5_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH})
  endif()
  if(MPI_C_LIBRARIES)
    list(APPEND HDF5_LIBRARIES ${MPI_C_LIBRARIES})
  endif()
endif()

Fix issue with external HDF5

Fix issue with external HDF5

In certain cases HDF5 sets HDF5_IS_PARALLEL flag and in other cases sets
HDF5_ENABLE_PARALLEL flag. Updated the logic to check for both.

Change-Id: If923d82d9cfbd40ea05322305d5790438e98ed4e


if(NOT USE_QT5)
  find_package(Qt4 COMPONENTS QTCORE OPTIONAL QUIET)
  if(NOT QT_QTCORE_LIBRARY)
    message(STATUS "Qt4's core was not found, trying to find Qt5's libraries")
    set(USE_QT5 1)
  endif()
endif()

if(USE_QT5)
  find_package(Qt5Core REQUIRED)
  set(QT_INCLUDES "${QT_INCLUDES} ${Qt5Core_INCLUDE_DIRS}")
  set(QT_LIBRARIES "${QT_LIBRARIES} ${Qt5Core_LIBRARIES}")
  set(QT_DEFINITIONS "${QT_DEFINITIONS} ${Qt5Core_DEFINITIONS}")
else()
  find_package(Qt4 COMPONENTS QTCORE REQUIRED)
  include(${QT_USE_FILE})
endif()

include_directories(SYSTEM "${QT_INCLUDES} ${SYSTEM}")
add_definitions(${QT_DEFINITIONS})

set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR "ON")

if(NOT USE_QT5)
  find_package(Qt4 COMPONENTS QTCORE OPTIONAL QUIET)
  if(NOT QT_QTCORE_LIBRARY)
    message(STATUS "Qt4's core was not found, trying to find Qt5's libraries")
    set(USE_QT5 1)
  endif()
endif()

if(USE_QT5)
  find_package(Qt5Core REQUIRED)
  set(QT_INCLUDES "$${Qt5Core_INCLUDE_DIRS}")
  set(QT_LIBRARIES "${Qt5Core_LIBRARIES}")
  set(QT_DEFINITIONS "${Qt5Core_DEFINITIONS}")
else()
  find_package(Qt4 COMPONENTS QTCORE REQUIRED)
  include(${QT_USE_FILE})
endif()

include_directories(SYSTEM "${QT_INCLUDES} ${SYSTEM}")
add_definitions(${QT_DEFINITIONS})

set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR "ON")

Fix CMake warning when building with Qt5.x


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

include(AmxConfig)

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++

include(AmxConfig)

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


# Copyright 2015 Samsung Electronics Co., Ltd.
#
# 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(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv7l-hf)

set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
# FIXME: This could break cross compilation, when the strip is not for the target architecture
find_program(CMAKE_STRIP NAMES arm-linux-gnueabihf-strip strip)
#
# Limit fpu to VFPv3 with d0-d15 registers
#
# If this is changed, setjmp / longjmp for ARMv7 should be updated accordingly
#
set(FLAGS_COMMON_ARCH -mlittle-endian -mthumb -mfpu=vfpv3-d16)

# Copyright 2015 Samsung Electronics Co., Ltd.
#
# 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(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv7l-hf)

set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
# FIXME: This could break cross compilation, when the strip is not for the target architecture
find_program(CMAKE_STRIP NAMES arm-linux-gnueabihf-strip strip)
#
# Limit fpu to VFPv3 with d0-d15 registers
#
# If this is changed, setjmp / longjmp for ARMv7 should be updated accordingly
#
set(FLAGS_COMMON_ARCH -mthumb -mfpu=vfp -march=armv7)

Fix the ARM linux native build for RPi2

Fix the ARM linux native build for RPi2

JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com


# - Try to find libjpeg-turbo
# Once done, this will define
#
#  LibJpegTurbo_FOUND - system has libjpeg-turbo
#  LibJpegTurbo_INCLUDE_DIRS - the libjpeg-turbo include directories
#  LibJpegTurbo_LIBRARIES - link these to use libjpeg-turbo
#
# this file is modeled after http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries

include(LibFindMacros)

# Use pkg-config to get hints about paths
libfind_pkg_check_modules(LibJpegTurbo_PKGCONF LibJpegTurbo)

# Include dir
find_path(LibJpegTurbo_INCLUDE_DIR
  NAMES turbojpeg.h
  PATHS ${LibJpegTurbo_PKGCONF_INCLUDE_DIRS} /opt/libjpeg-turbo/include
)

# Finally the library itself
find_library(LibJpegTurbo_LIBRARY
  NAMES turbojpeg.so
  PATHS ${LibJpegTurbo_PKGCONF_LIBRARY_DIRS} /opt/libjpeg-turbo/lib
)

# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
set(LibJpegTurbo_PROCESS_INCLUDES LibJpegTurbo_INCLUDE_DIR)
set(LibJpegTurbo_PROCESS_LIBS LibJpegTurbo_LIBRARY)
libfind_process(LibJpegTurbo)

# - Try to find libjpeg-turbo
# Once done, this will define
#
#  LibJpegTurbo_FOUND - system has libjpeg-turbo
#  LibJpegTurbo_INCLUDE_DIRS - the libjpeg-turbo include directories
#  LibJpegTurbo_LIBRARIES - link these to use libjpeg-turbo
#
# this file is modeled after http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries

include(LibFindMacros)

# Use pkg-config to get hints about paths
libfind_pkg_check_modules(LibJpegTurbo_PKGCONF LibJpegTurbo)

# Include dir
find_path(LibJpegTurbo_INCLUDE_DIR
  NAMES turbojpeg.h
  PATHS ${LibJpegTurbo_PKGCONF_INCLUDE_DIRS} /opt/libjpeg-turbo/include
)

# Finally the library itself
find_library(LibJpegTurbo_LIBRARY
  NAMES libturbojpeg.so turbojpeg.dll libturbojpeg.dylib
  PATHS ${LibJpegTurbo_PKGCONF_LIBRARY_DIRS} /opt/libjpeg-turbo/lib
)

# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
set(LibJpegTurbo_PROCESS_INCLUDES LibJpegTurbo_INCLUDE_DIR)
set(LibJpegTurbo_PROCESS_LIBS LibJpegTurbo_LIBRARY)
libfind_process(LibJpegTurbo)

Fix LibJpegTurbo finder to ignore static library, needed on Ubuntu 13.10


## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
##   ENABLE_TESTING()
##   INCLUDE(Dart)

set(CTEST_PROJECT_NAME "MERCURY")
set(CTEST_NIGHTLY_START_TIME "00:00:00 CST")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
set(CTEST_DROP_LOCATION "/submit.php?project=MERCURY")
set(CTEST_DROP_SITE_CDASH TRUE)

## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
##   ENABLE_TESTING()
##   INCLUDE(Dart)

set(CTEST_PROJECT_NAME "MERCURY")
set(CTEST_NIGHTLY_START_TIME "00:00:00 CST")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash.hdfgroup.org")
set(CTEST_DROP_LOCATION "/submit.php?project=MERCURY")
set(CTEST_DROP_SITE_CDASH TRUE)

Fix hdfgroup domain for CDash

Fix hdfgroup domain for CDash


# This file is used for non-server builds (e.g. for Couchbase mobile)

# If GoogleTest is checked out then include it and we can run some tests
IF(EXISTS "${PROJECT_SOURCE_DIR}/thirdparty/googletest/CMakeLists.txt")
    ADD_SUBDIRECTORY(thirdparty/googletest EXCLUDE_FROM_ALL)
ENDIF ()

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")

# Include some of the compiler flag modules from couchbase/tlm
INCLUDE(CouchbaseCompilerOptions)
INCLUDE(CouchbaseCodeCoverage)

# This file is used for non-server builds (e.g. for Couchbase mobile)

# If GoogleTest is checked out then include it and we can run some tests
IF(EXISTS "${PROJECT_SOURCE_DIR}/thirdparty/googletest/CMakeLists.txt")
    SET(gtest_force_shared_crt ON CACHE BOOL
        "Use shared (DLL) run-time lib even when Google Test
        is built as static lib.")
    ADD_SUBDIRECTORY(thirdparty/googletest EXCLUDE_FROM_ALL)
ENDIF ()

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")

# Include some of the compiler flag modules from couchbase/tlm
INCLUDE(CouchbaseCompilerOptions)
INCLUDE(CouchbaseCodeCoverage)

Resolve GoogleTest link issues on Windows


## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
##   ENABLE_TESTING()
##   INCLUDE(CTest)
set(CTEST_PROJECT_NAME "VTKModular")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=VTKModular")
set(CTEST_DROP_SITE_CDASH TRUE)

## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
##   ENABLE_TESTING()
##   INCLUDE(CTest)
set(CTEST_PROJECT_NAME "VTK")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=VTK")
set(CTEST_DROP_SITE_CDASH TRUE)

ENH: Move back to main VTK project for CTest submission

Change-Id: If8ae82e20adcc3c7329e1b3f82694ba1130ea392


## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
##   ENABLE_TESTING()
##   INCLUDE(CTest)
set(CTEST_PROJECT_NAME "ArrayFire")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "ci.arrayfire.org")
set(CTEST_DROP_LOCATION "/submit.php?project=ArrayFire")
set(CTEST_DROP_SITE_CDASH TRUE)

## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
##   ENABLE_TESTING()
##   INCLUDE(CTest)
set(CTEST_PROJECT_NAME "ArrayFire")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "ci.arrayfire.org")
set(CTEST_DROP_LOCATION "/submit.php?project=ArrayFire")
set(CTEST_DROP_SITE_CDASH TRUE)

Update CDash drop site to use https

Update CDash drop site to use https


# This file contains all the specific settings that will be used
# when running 'make Experimental'

# Change the maximum warnings that will be displayed
# on the report page (default 50)
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000)

# Errors that will be ignored
set(CTEST_CUSTOM_ERROR_EXCEPTION
  ${CTEST_CUSTOM_ERROR_EXCEPTION}
  "ICECC"
  "Segmentation fault"
  "GConf Error"
  "Client failed to connect to the D-BUS daemon"
  "Failed to connect to socket"
  "qlist.h.*increases required alignment of target type"
  "qmap.h.*increases required alignment of target type"
  "qhash.h.*increases required alignment of target type"
  )

# No coverage for these files
set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_" "/libs/tests" "/server/tests")

# This file contains all the specific settings that will be used
# when running 'make Experimental'

# Change the maximum warnings that will be displayed
# on the report page (default 50)
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000)

# Errors that will be ignored
set(CTEST_CUSTOM_ERROR_EXCEPTION
  ${CTEST_CUSTOM_ERROR_EXCEPTION}
  "ICECC"
  "Segmentation fault"
  "GConf Error"
  "Client failed to connect to the D-BUS daemon"
  "Failed to connect to socket"
  "qlist.h.*increases required alignment of target type"
  "qmap.h.*increases required alignment of target type"
  "qhash.h.*increases required alignment of target type"
  )

# No coverage for these files (auto-generated, unit tests, etc)
set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_" "/libs/tests" "/server/tests" "qrc_" "adaptor.h$" "adaptor.cpp$")

Hide more auto-generated files from the coverage analysis.


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

set(proj GTest)

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

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

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

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

sitkSourceDownloadDependency(${proj})

set(GTEST_ROOT ${GTEST_source_dir}/googletest)

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

set(proj GTest)

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

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

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

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

sitkSourceDownloadDependency(${proj})

set(GTEST_ROOT ${GTEST_source_dir}/googletest)

Change to use GoogleTest for github repo with update

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

google/googletest#1111


# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

#Enable 64 bit file offsets
SET(_LARGE_FILES 1)

# Fix xlC oddity - it complains about same inline function defined multiple times
# in different compilation units
INCLUDE(CheckCXXCompilerFlag)
 CHECK_CXX_COMPILER_FLAG("-qstaticinline" HAVE_QSTATICINLINE)
 IF(HAVE_QSTATICINLINE)
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qstaticinline")
 ENDIF()

# The following is required to export all symbols
# (also with leading underscore)
STRING(REPLACE  "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
  ${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}")
STRING(REPLACE  "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
  "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")

# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

#Enable 64 bit file offsets
SET(_LARGE_FILES 1)

# Fix xlC oddity - it complains about same inline function defined multiple times
# in different compilation units
INCLUDE(CheckCXXCompilerFlag)
 CHECK_CXX_COMPILER_FLAG("-qstaticinline" HAVE_QSTATICINLINE)
 IF(HAVE_QSTATICINLINE)
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qstaticinline")
 ENDIF()

# The following is required to export all symbols
# (also with leading underscore)
STRING(REPLACE  "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
  "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}")
STRING(REPLACE  "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
  "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")

Fix syntax error (missing quote).

Fix syntax error (missing quote).


# Contact: Luis Ibanez <luis.ibanez@kitware.com>
itk_fetch_module(IOSTL
  "This module contains classes for reading and writing QuadEdgeMeshes using
  the STL (STereoLithography)file format. http://hdl.handle.net/10380/3452"
  GIT_REPOSITORY https://github.com/luisibanez/ITKSTLMeshIO.git
  GIT_TAG ebb492ceeb443b9b41845a5a7d48f3e317a37579
  )

# Contact: Luis Ibanez <luis.ibanez@kitware.com>
itk_fetch_module(IOSTL
  "This module contains classes for reading and writing QuadEdgeMeshes using
  the STL (STereoLithography)file format. http://hdl.handle.net/10380/3452"
  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git
  GIT_TAG 933359a5fd1bac792a3c0af5f4e05e291e153677
  )

COMP: Fix IOSTL Doxygen group and Windows shared build.

Change-Id: Idef2f73738dea7846ac78c303b14a744801cec80


# - Check whether the C compiler supports a given flag in the
# context of a stack checking compiler option.

# CHECK_C_COMPILER_FLAG_SSP(FLAG VARIABLE)
#
#  FLAG - the compiler flag
#  VARIABLE - variable to store the result
#
#  This actually calls check_c_source_compiles.
#  See help for CheckCSourceCompiles for a listing of variables
#  that can modify the build.

# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

# Requires cmake 3.10
#include_guard(GLOBAL)
include(CheckCSourceCompiles)

macro(CHECK_C_COMPILER_FLAG_SSP _FLAG _RESULT)
   set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
   set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")

   check_c_source_compiles("int main(int argc, char **argv) { char buffer[256]; return buffer[argc]=0;}" ${_RESULT})

   set(CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
endmacro(CHECK_C_COMPILER_FLAG_SSP)

# - Check whether the C compiler supports a given flag in the
# context of a stack checking compiler option.

# CHECK_C_COMPILER_FLAG_SSP(FLAG VARIABLE)
#
#  FLAG - the compiler flag
#  VARIABLE - variable to store the result
#
#  This actually calls check_c_source_compiles.
#  See help for CheckCSourceCompiles for a listing of variables
#  that can modify the build.

# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

# Requires cmake 3.10
#include_guard(GLOBAL)
include(CheckCSourceCompiles)

macro(CHECK_C_COMPILER_FLAG_SSP _FLAG _RESULT)
   set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
   set(CMAKE_REQUIRED_FLAGS "${_FLAG}")

   check_c_source_compiles("int main(int argc, char **argv) { char buffer[256]; return buffer[argc]=0;}" ${_RESULT})

   set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
endmacro(CHECK_C_COMPILER_FLAG_SSP)

Fix SSP compiler flag check

cmake: Fix SSP compiler flag check

Need to use CMAKE_REQUIRED_FLAGS when checking SSP, not
CMAKE_REQUIRED_DEFINITIONS.

Signed-off-by: Joel Carlson <d7b603241b8a42129a6a698ae087a34c06f1e1a1@gmail.com>
Reviewed-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>


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

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

# "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 "48fca4a443d841221c94c70d5c05e7e946168636")

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

Update FW: zero out uninitialized DDR memory


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

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

# "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 "8ebbc98374f6970e227804c235e87e8801043bf1")

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

Update FW: fix some OV7251 flickering, change stereo res to 480p, improve IMX214 focusing


hunter_config(GTest VERSION 1.8.0-hunter-p5)
hunter_config(glog VERSION 0.3.4-p2)
hunter_config(Boost VERSION 1.63.0)
hunter_config(OpenSSL VERSION 1.1.0e)

hunter_config(GTest VERSION 1.8.0-hunter-p5)
hunter_config(Boost VERSION 1.63.0)

Remove version requirements of unused libraries


### the directory name ###
SET(DIRECTORY source/CONCEPT)

### list all filenames of the directory here ###
SET(SOURCES_LIST
	autoDeletable.C
	composite.C
	embeddable.C
	enumerator.C
	factory.C
	object.C
	persistenceManager.C
	preferencesObject.C
	processor.C
	property.C
	selectable.C
	textPersistenceManager.C
	timeStamp.C
	visitor.C
	molecularInformation.C
)

### asio dependent sources ###
IF (BALL_HAS_ASIO)
	SET(SOURCES_LIST ${SOURCES_LIST} client.C)
ENDIF()

ADD_BALL_SOURCES("CONCEPT" "${SOURCES_LIST}")

### the directory name ###
SET(DIRECTORY source/CONCEPT)

### list all filenames of the directory here ###
SET(SOURCES_LIST
	autoDeletable.C
	composite.C
	embeddable.C
	enumerator.C
	factory.C
	object.C
	persistenceManager.C
	preferencesObject.C
	processor.C
	property.C
	selectable.C
	textPersistenceManager.C
	timeStamp.C
	visitor.C
	molecularInformation.C
)

IF(BALL_HAS_XDR)
	LIST(APPEND SOURCES_LIST XDRPersistenceManager.C)
ENDIF()

### asio dependent sources ###
IF (BALL_HAS_ASIO)
	SET(SOURCES_LIST ${SOURCES_LIST} client.C)
ENDIF()

ADD_BALL_SOURCES("CONCEPT" "${SOURCES_LIST}")

Use the new BALL_HAS_XDR CMake flag

Use the new BALL_HAS_XDR CMake flag


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

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

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

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

Fix ColorCamera resource allocation when setIspScale is used


# have ExternalProject available
include(ExternalProject)

#set( ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL "" FORCE )
#set( ASSIMP_BUILD_TESTS OFF CACHE BOOL "" FORCE )
#set( ASSIMP_BUILD_SAMPLES OFF CACHE BOOL "" FORCE )

# here is defined the way we want to import assimp
ExternalProject_Add(
        assimp

        # where the source will live
        SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdPartyLibraries/Assimp"

        # override default behaviours
        UPDATE_COMMAND ""

        # set the installatin to root
		INSTALL_COMMAND ""
        INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}
        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DASSIMP_BUILD_ASSIMP_TOOLS=False -DASSIMP_BUILD_SAMPLES=False -DASSIMP_BUILD_TESTS=False
)

# have ExternalProject available
include(ExternalProject)

#set( ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL "" FORCE )
#set( ASSIMP_BUILD_TESTS OFF CACHE BOOL "" FORCE )
#set( ASSIMP_BUILD_SAMPLES OFF CACHE BOOL "" FORCE )

# here is defined the way we want to import assimp
ExternalProject_Add(
        assimp

        # where the source will live
        SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdPartyLibraries/Assimp"

        # override default behaviours
        UPDATE_COMMAND ""

        # set the installatin to root
	# INSTALL_COMMAND ""
        INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}
        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DASSIMP_BUILD_ASSIMP_TOOLS=False -DASSIMP_BUILD_SAMPLES=False -DASSIMP_BUILD_TESTS=False
)

Fix compilation error introduced by a previous windows-related bugfix.


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

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

Increment version to VTK 7.0.0

Increment version to VTK 7.0.0


add_standard_plugin_tests(NO_SERVER_TESTS)

add_python_test(dicom_viewer
  PLUGIN dicom_viewer
  EXTERNAL_DATA
  plugins/dicom_viewer/000000.dcm
  plugins/dicom_viewer/000001.dcm
  plugins/dicom_viewer/000002.dcm
  plugins/dicom_viewer/000003.dcm
)

set(_pluginDir "${CMAKE_CURRENT_LIST_DIR}")
get_filename_component(_pluginName "${CMAKE_CURRENT_LIST_DIR}" NAME)

add_eslint_test(${_pluginName}_webpack "${_pluginDir}/webpack.helper.js")

add_standard_plugin_tests(NO_SERVER_TESTS)

add_python_test(dicom_viewer
  PLUGIN dicom_viewer
  EXTERNAL_DATA
  plugins/dicom_viewer/000000.dcm
  plugins/dicom_viewer/000001.dcm
  plugins/dicom_viewer/000002.dcm
  plugins/dicom_viewer/000003.dcm
)

get_filename_component(_pluginName "${CMAKE_CURRENT_LIST_DIR}" NAME)

add_eslint_test(${_pluginName}_webpack "${_pluginDir}/webpack.helper.js")
add_python_style_test(python_static_anaysis_${_pluginName}_tests "${_pluginDir}/plugin_tests")

Add style test on dicom_viewer_test

Cmake: Add style test on dicom_viewer_test


if( CMAKE_SYSTEM_NAME MATCHES "Linux" )
	set( LINUX TRUE )
	add_definitions( -D_POSIX_C_SOURCE=200809L -D_SVID_SOURCE )
endif( CMAKE_SYSTEM_NAME MATCHES "Linux" )

if( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
	set( FREEBSD TRUE )
	set( BSD TRUE )
endif( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )

if( CMAKE_SYSTEM_NAME MATCHES "OpenBSD" )
	set( OPENBSD TRUE )
	set( BSD TRUE )
endif( CMAKE_SYSTEM_NAME MATCHES "OpenBSD" )

if (CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
	set( NETBSD TRUE )
	set( BSD TRUE )
endif( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )

if( CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)" )
	set( SOLARIS TRUE )
	add_definitions( -D_POSIX_C_SOURCE=200809L -D_SVID_SOURCE )
	add_definitions( -D__EXTENSIONS__ )
endif( CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)" )

if( APPLE )
	check_library_exists( intl gettext "" HAVE_LIBINTL )
endif( APPLE )

if( CMAKE_SYSTEM_NAME MATCHES "Linux" )
	set( LINUX TRUE )
	add_definitions( -D_POSIX_C_SOURCE=200809L -D_SVID_SOURCE )
	add_definitions( -D_DEFAULT_SOURCE )
endif( CMAKE_SYSTEM_NAME MATCHES "Linux" )

if( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
	set( FREEBSD TRUE )
	set( BSD TRUE )
endif( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )

if( CMAKE_SYSTEM_NAME MATCHES "OpenBSD" )
	set( OPENBSD TRUE )
	set( BSD TRUE )
endif( CMAKE_SYSTEM_NAME MATCHES "OpenBSD" )

if (CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
	set( NETBSD TRUE )
	set( BSD TRUE )
endif( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )

if( CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)" )
	set( SOLARIS TRUE )
	add_definitions( -D_POSIX_C_SOURCE=200809L -D_SVID_SOURCE )
	add_definitions( -D__EXTENSIONS__ )
endif( CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)" )

if( APPLE )
	check_library_exists( intl gettext "" HAVE_LIBINTL )
endif( APPLE )

Add -D_DEFAULT_SOURCE for modern platforms


# -----------------------------------------------------------------------------
#
# Copyright (C) The BioDynaMo Project.
# 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.
#
# See the LICENSE file distributed with this work for details.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# -----------------------------------------------------------------------------

# add a target to generate BioDynaMo website using Gatsby static generator

function(GenerateStaticFiles TARGET FLAGS)
  set(WEB_DIR ${CMAKE_CURRENT_BINARY_DIR}/website)
  file(MAKE_DIRECTORY "${WEB_DIR}")
  add_custom_target(${TARGET}
      WORKING_DIRECTORY "${WEB_DIR}"
      COMMAND rm -rf ${WEB_DIR} && mkdir ${WEB_DIR}
      COMMAND git clone https://github.com/BioDynaMo/website.git .
      # TODO: merge into master to avoid this
      COMMAND git checkout web-updates
      COMMENT "Generate website"
      COMMAND ./build_website.sh --dir ${CMAKE_CURRENT_SOURCE_DIR} ${FLAGS}
      VERBATIM)
  add_dependencies(${TARGET} doc)
endfunction()

if (website)
  if (NOT DOXYGEN_FOUND)
    message(FATAL "You cannot build the website without Doxygen. Please make
    sure that Doxygen is installed before attempting to build the website!")
  endif()
  # Generate static website files
  GenerateStaticFiles(website "--api")
  # Generate staic website files and launches website on localhost for live editing
  GenerateStaticFiles(website-live "--develop")
endif()

# ------------------------------------------------------------------------------

# -----------------------------------------------------------------------------
#
# Copyright (C) The BioDynaMo Project.
# 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.
#
# See the LICENSE file distributed with this work for details.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# -----------------------------------------------------------------------------

# add a target to generate BioDynaMo website using Gatsby static generator

function(GenerateStaticFiles TARGET FLAGS)
  set(WEB_DIR ${CMAKE_CURRENT_BINARY_DIR}/website)
  file(MAKE_DIRECTORY "${WEB_DIR}")
  add_custom_target(${TARGET}
      WORKING_DIRECTORY "${WEB_DIR}"
      COMMAND rm -rf ${WEB_DIR} && mkdir ${WEB_DIR}
      COMMAND git clone https://github.com/BioDynaMo/website.git .
      COMMAND git checkout master
      COMMENT "Generate website"
      COMMAND ./build_website.sh --dir ${CMAKE_CURRENT_SOURCE_DIR} ${FLAGS}
      VERBATIM)
  add_dependencies(${TARGET} doc)
endfunction()

if (website)
  if (NOT DOXYGEN_FOUND)
    message(FATAL "You cannot build the website without Doxygen. Please make
    sure that Doxygen is installed before attempting to build the website!")
  endif()
  # Generate static website files
  GenerateStaticFiles(website "--api")
  # Generate staic website files and launches website on localhost for live editing
  GenerateStaticFiles(website-live "--develop")
endif()

# ------------------------------------------------------------------------------

Use master branch for website deployment

Merged all changes from web-updates -> master


find_package(PythonInterp)
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${catkin_EXTRAS_DIR}/python_version.py
  OUTPUT_VARIABLE PYTHON_VERSION_XDOTY
  OUTPUT_STRIP_TRAILING_WHITESPACE)

set(PYTHON_VERSION_XDOTY ${PYTHON_VERSION_XDOTY} CACHE STRING "python version")

# this should actually be for anything non-dist-packages
if(APPLE)
  set(PYTHON_PACKAGES_DIR site-packages CACHE STRING "dist-packages or site-packages")
  set(SETUPTOOLS_ARG_EXTRA "" CACHE STRING "extra arguments to setuptools")
else()
  set(PYTHON_PACKAGES_DIR dist-packages CACHE STRING "dist-packages or site-packages")
  set(SETUPTOOLS_ARG_EXTRA "--install-layout=deb" CACHE STRING "extra arguments to setuptools")
endif()

set(INSTALLED_PYTHONPATH ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_XDOTY}/${PYTHON_PACKAGES_DIR}
  CACHE INTERNAL "This needs to be in pythonpath when setup.py install is called.  And it needs to match.  But setuptools won't tell us where it will install things.")

find_package(PythonInterp)
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${catkin_EXTRAS_DIR}/python_version.py
  OUTPUT_VARIABLE PYTHON_VERSION_XDOTY
  OUTPUT_STRIP_TRAILING_WHITESPACE)

set(PYTHON_VERSION_XDOTY ${PYTHON_VERSION_XDOTY} CACHE STRING "python version")

#This should be resolved automatically one day...
option(SETUPTOOLS_DEB_LAYOUT "ON for debian style python packages layout" ON)

if(APPLE)
  set(SETUPTOOLS_DEB_LAYOUT OFF)
endif()

if(SETUPTOOLS_DEB_LAYOUT)
  set(PYTHON_PACKAGES_DIR dist-packages CACHE STRING "dist-packages or site-packages")
  set(SETUPTOOLS_ARG_EXTRA "--install-layout=deb" CACHE STRING "extra arguments to setuptools")
else()
  set(PYTHON_PACKAGES_DIR site-packages CACHE STRING "dist-packages or site-packages")
  set(SETUPTOOLS_ARG_EXTRA "" CACHE STRING "extra arguments to setuptools")
endif()

set(INSTALLED_PYTHONPATH ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_XDOTY}/${PYTHON_PACKAGES_DIR}
  CACHE INTERNAL "This needs to be in pythonpath when setup.py install is called.  And it needs to match.  But setuptools won't tell us where it will install things.")

Implement SETUPTOOLS_DEB_LAYOUT to handle non debian systems.


get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME)

add_python_test(tasks PLUGIN ${PLUGIN})

add_python_style_test(python_static_analysis_${PLUGIN}
                      "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/server")
add_python_style_test(python_static_analysis_${PLUGIN}_tests
                      "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests")

add_web_client_test(
    widgets "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests/widget.js" PLUGIN ${PLUGIN})
add_web_client_test(
    tasks "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests/tasks.js" PLUGIN ${PLUGIN}
    SETUP_MODULES "${CMAKE_CURRENT_LIST_DIR}/plugin_tests/mock_worker.py")

if (BUILD_JAVASCRIPT_TESTS)
    set_property(TEST web_client_item_tasks.tasks PROPERTY RUN_SERIAL ON)
endif()

add_eslint_test(${PLUGIN} "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client")
add_eslint_test(${PLUGIN}-tests "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests")
add_puglint_test(${PLUGIN} "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client/templates")

get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME)

add_python_test(tasks PLUGIN ${PLUGIN})

add_python_style_test(python_static_analysis_${PLUGIN}
                      "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/server")
add_python_style_test(python_static_analysis_${PLUGIN}_tests
                      "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests")

add_web_client_test(
    widgets "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests/widget.js" PLUGIN ${PLUGIN})
add_web_client_test(
    tasks "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests/tasks.js" PLUGIN ${PLUGIN}
    SETUP_MODULES "${CMAKE_CURRENT_LIST_DIR}/plugin_tests/mock_worker.py")

# run this test serially to avoid event stream timeouts on CI
if (BUILD_JAVASCRIPT_TESTS)
    set_property(TEST web_client_item_tasks.tasks PROPERTY RUN_SERIAL ON)
endif()

add_eslint_test(${PLUGIN} "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client")
add_eslint_test(${PLUGIN}-tests "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests")
add_puglint_test(${PLUGIN} "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client/templates")

Add a comment about running item_tasks test serially


OPTION(THIRDPARTY_BUILD_SMV "Build LibSMV" OFF)

IF (THIRDPARTY_BUILD_SMV)
    INCLUDE(ExternalProject)
    EXTERNALPROJECT_ADD(
        libsmvf1.0
        PREFIX ${TPSRC}
        URL ${TPURL}/libsmvf1.0.tar.gz
        URL_MD5 "40cad0538acebd4aa83136ef9319150e"
        DOWNLOAD_DIR ${TPSRC}
        CONFIGURE_COMMAND ${CMAKE_COMMAND}
          -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist ${TPSRC}/src/libsmvf1.0
        INSTALL_COMMAND echo "LibSMV compiled successfully"
    )
    SET(SMV sbtk CACHE FILEPATH "Path to LibSMV." FORCE)
    MARK_AS_ADVANCED(SMV)
    LINK_DIRECTORIES(${TPSRC}/dist/lib)
ELSE (THIRDPARTY_BUILD_SMV)
    INCLUDE(FindSMV)
ENDIF (THIRDPARTY_BUILD_SMV)

OPTION(THIRDPARTY_BUILD_SMV "Build LibSMV" OFF)

IF (THIRDPARTY_BUILD_SMV)
    INCLUDE(ExternalProject)
    EXTERNALPROJECT_ADD(
        libsmvf1.0
        PREFIX ${TPSRC}
        URL ${TPURL}/libsmvf1.0.tar.gz
        URL_MD5 "40cad0538acebd4aa83136ef9319150e"
        DOWNLOAD_DIR ${TPSRC}
        CONFIGURE_COMMAND ${CMAKE_COMMAND}
          -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist ${TPSRC}/src/libsmvf1.0
        INSTALL_COMMAND echo "LibSMV compiled successfully"
    )
    SET(SMV sbtk CACHE FILEPATH "Path to LibSMV." FORCE)
    MARK_AS_ADVANCED(SMV)
    LINK_DIRECTORIES(${TPSRC}/dist/lib)
ELSE (THIRDPARTY_BUILD_SMV)
    IF (NEKTAR_USE_SMV)
        INCLUDE(FindSMV)
    ENDIF (NEKTAR_USE_SMV)
ENDIF (THIRDPARTY_BUILD_SMV)

Fix LibSMV being searched when NEKTAR_USE_SMV is OFF


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

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

# "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 "3b51648b0d96c9391d878eede0fd5fd9b44084ca")

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

Update FW, fix CI build: depthai-shared PR merged


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

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

# "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 "47e069cc7f16d29b37e17b2923322bc9824ebed4")

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

Update FW: support for new devices with 3x 4-lane cam ports, TMP: enable RGB-depth alignment for 12MP full FoV (hardcoded)


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

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

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

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

Update FW/mdk: Merge confidence_map_alignment_opt into develop


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

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

# "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 "140e154fc21a851daeb1d2ecee29d5dfb16f6847")

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

Update device FW with fixes for RGB: - fix crash with RGB 12MP + depth - fix the cropping for 4K (make it centered)


## Copyright (c) 2015 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.

function(qi_set_qt_plugin_properties target)
  if(CMAKE_MAJOR_VERSION LESS 3)
    set_target_properties("${target}"
      PROPERTIES
      COMPILE_DEFINITIONS_RELEASE "QT_SHARED;QT_PLUGIN;QT_NO_DEBUG"
      COMPILE_DEFINITIONS_DEBUG "QT_SHARED;QT_PLUGIN;QT_DEBUG"
    )
  else()
    set_target_properties("${target}"
      PROPERTIES
      COMPILE_DEFINITIONS "QT_SHARED;QT_PLUGIN;$<$<CONFIG:Release>:QT_NO_DEBUG>$<$<CONFIG:Debug>:QT_DEBUG>"
    )
  endif()
endfunction()

## Copyright (c) 2015 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.

function(qi_set_qt_plugin_properties target)
  if(CMAKE_MAJOR_VERSION LESS 3)
    get_target_property(RELEASE_DEF "${target}" COMPILE_DEFINITIONS_RELEASE)
    get_target_property(DEBUG_DEF "${target}" COMPILE_DEFINITIONS_DEBUG)
    set_target_properties("${target}"
      PROPERTIES
      COMPILE_DEFINITIONS_RELEASE "${RELEASE_DEF};QT_SHARED;QT_PLUGIN;QT_NO_DEBUG"
      COMPILE_DEFINITIONS_DEBUG "${DEBUG_DEF};QT_SHARED;QT_PLUGIN;QT_DEBUG"
    )
  else()
    get_target_property(DEF "${target}" COMPILE_DEFINITIONS)
    set_target_properties("${target}"
      PROPERTIES
      COMPILE_DEFINITIONS "${DEF};QT_SHARED;QT_PLUGIN;$<$<CONFIG:Release>:QT_NO_DEBUG>$<$<CONFIG:Debug>:QT_DEBUG>"
    )
  endif()
endfunction()

Fix qi_set_qt_plugin_properties to not lose previous compile definitions

Change-Id: Ife2b87597fe43dc0c664550e7d3a746b1cfdd3be
Reviewed-on: http://gerrit.aldebaran.lan/62687
Reviewed-by: gvallat <7d83891388e041c562501668fa177e847ace2b0a@aldebaran-robotics.com>
Tested-by: gerrit


set (CMAKE_SYSTEM_NAME Windows)

set (GCC_PREFIX i686-w64-mingw32)
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)
set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++)
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
set (CMAKE_NM nm CACHE FILEPATH "" FORCE)
#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE)
set (CMAKE_RC_COMPILER windres)

set (CMAKE_FIND_ROOT_PATH c:/msys2/mingw32)

# Ensure cmake doesn't find things in the wrong places
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target

set (MINGW_FLAG "-m64")

set (CMAKE_SYSTEM_NAME Windows)

set (GCC_PREFIX i686-w64-mingw32)
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)
set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++)
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
set (CMAKE_NM nm CACHE FILEPATH "" FORCE)
#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE)
set (CMAKE_RC_COMPILER windres)

set (CMAKE_FIND_ROOT_PATH c:/msys2/mingw32)

# Ensure cmake doesn't find things in the wrong places
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target

set (MINGW_FLAG "-m32")

Fix march flag for 32-bit build

Fix march flag for 32-bit build


set(CAPABS "-mavx -maes -mfma -mfpmath=sse")
message(STATUS "Using extended CPU features: AVX, AES, FMA. CAPABS = ${CAPABS}")

set(CAPABS "-march=native -mfpmath=sse")
message(STATUS "Using native CPU features. CAPABS = ${CAPABS}")

cmake: Make non-vanilla CPU feat use -march=native


#
# MSVC options
#

set(CMAKE_CXX_FLAGS "/nologo /std:c++latest /W4 /WX /EHsc")
set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Zi /Od /RTC1 /sdl /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "/DNDEBUG /Ox /MT")

add_definitions(
  /D _SBCS
  /D WIN32_LEAN_AND_MEAN
)

#
# MSVC options
#

set(CMAKE_CXX_FLAGS "/nologo /std:c++latest /EHsc /W4 /WX")
set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Zi /Od /RTC1 /sdl /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "/DNDEBUG /Ox /MT")

add_definitions(
  /D _SBCS
  /D WIN32_LEAN_AND_MEAN
)

# https://docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default
string(CONCAT CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}"
  " /w34265"
  " /w34777"
  " /w34946"
  " /w35038"
)

Add MSVC warnings (off by default at /W4)


set(DUKTAPEDIR ${CMAKE_CURRENT_LIST_DIR}/lib/duktape)

include_directories(
  ${DUKTAPEDIR}/src
)

add_library(duktape STATIC ${DUKTAPEDIR}/src/duktape.c)

if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
  target_link_libraries(duktape
    m dl
  )
endif()

set(DUKTAPEDIR ${CMAKE_CURRENT_LIST_DIR}/lib/duktape)

include_directories(
  ${DUKTAPEDIR}/src
)

add_library(duktape STATIC ${DUKTAPEDIR}/src/duktape.c)

if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
  target_link_libraries(duktape
    m dl rt
  )
endif()

Add rt support for some unsupported platform


#
#  Copyright (C) 2013-2016 MariaDB Corporation AB
#
#  Redistribution and use is allowed according to the terms of the New
#  BSD license.
#  For details see the COPYING-CMAKE-SCRIPTS file.
#
MACRO(GET_CONNECTOR_PACKAGE_NAME name)
# check if we have 64bit
IF(SIZEOF_VOIDP EQUAL 8)
  SET(IS64 1)
ENDIF()

SET (PLAFORM_NAME CMAKE_SYSTEM_NAME)
SET (MACHINE_NAME CMAKE_SYSTEM_PROCESSOR)
SET (CONCAT_SIGN "-")

IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
  SET(PLATFORM_NAME "win")
  SET(CONCAT_SIGN "")
  IF(IS64)
    SET(MACHINE_NAME "x64")
  ELSE()
    SET(MACHINE_NAME "32")
  END()
ENDIF()

SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}")
STRING(TOLOWER ${product_name} ${name})
ENDMACRO()

#
#  Copyright (C) 2013-2016 MariaDB Corporation AB
#
#  Redistribution and use is allowed according to the terms of the New
#  BSD license.
#  For details see the COPYING-CMAKE-SCRIPTS file.
#
MACRO(GET_CONNECTOR_PACKAGE_NAME name)
# check if we have 64bit
IF(SIZEOF_VOIDP EQUAL 8)
  SET(IS64 1)
ENDIF()

SET (PLAFORM_NAME CMAKE_SYSTEM_NAME)
SET (MACHINE_NAME CMAKE_SYSTEM_PROCESSOR)
SET (CONCAT_SIGN "-")

IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
  SET(PLATFORM_NAME "win")
  SET(CONCAT_SIGN "")
  IF(IS64)
    SET(MACHINE_NAME "x64")
  ELSE()
    SET(MACHINE_NAME "32")
  ENDIF()
ENDIF()

SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}")
STRING(TOLOWER ${product_name} ${name})
ENDMACRO()

Fix syntax error in cmake 3.20

Fix syntax error in cmake 3.20