include(FindPackageHandleStandardArgs)
find_library (TRIANGLE_LIBRARY NAMES triangle TRIANGLE DOC "Location of the Triangle package")
find_path (TRIANGLE_INCLUDE_DIR triangle.h PATH_SUFFIXES triangle)

# TODO: Fail if triangle is not found, or perhaps compile without TriangularDecompositions
if (TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)
    find_package_handle_standard_args(triangle DEFAULT_MSG TRIANGLE_LIBRARY TRIANGLE_INCLUDE_DIR)
    message (STATUS "Triangle package found.")
else (TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)
    message (STATUS "Triangle package not found.")
endif (TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)

find_library(TRIANGLE_LIBRARY triangle DOC "Location of Triangle library")
find_path(TRIANGLE_INCLUDE_DIR triangle.h PATH_SUFFIXES triangle
   DOC "Location of Triangle header file directory")

if(TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)
  #if already installed, show that library and headers were found
    include(FindPackageHandleStandardArgs)
    find_package_handle_standard_args(triangle DEFAULT_MSG TRIANGLE_LIBRARY TRIANGLE_INCLUDE_DIR)
else(TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)
endif(TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)

include(FindPackageHandleStandardArgs)
find_library (TRIANGLE_LIBRARY NAMES triangle TRIANGLE DOC "Location of the Triangle package")
find_path (TRIANGLE_INCLUDE_DIR triangle.h PATH_SUFFIXES triangle)

# TODO: Fail if triangle is not found, or perhaps compile without TriangularDecompositions
if (TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)
    find_package_handle_standard_args(triangle DEFAULT_MSG TRIANGLE_LIBRARY TRIANGLE_INCLUDE_DIR)
    message (STATUS "Triangle package found.")
else (TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)
    message (STATUS "Triangle package not found.")
endif (TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)

find_library(TRIANGLE_LIBRARY triangle DOC "Location of Triangle library")
find_path(TRIANGLE_INCLUDE_DIR triangle.h PATH_SUFFIXES triangle
   DOC "Location of Triangle header file directory")

if(TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)
  #if already installed, show that library and headers were found
    include(FindPackageHandleStandardArgs)
    find_package_handle_standard_args(triangle DEFAULT_MSG TRIANGLE_LIBRARY TRIANGLE_INCLUDE_DIR)
else(TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)
    message(FATAL_ERROR "Triangle is not found")
endif(TRIANGLE_LIBRARY AND TRIANGLE_INCLUDE_DIR)

Stop the presses if triangle is not found

--HG--
branch : syclop-triangulate


SET(SDK_MIN "10.9")
SET(SDK "10.9")
SET(DEV_SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SDK}.sdk")

ADD_DEFINITIONS(
  -DMAC
  -DGCC_VISIBILITY
  -mmacosx-version-min=${SDK_MIN}
  )

SET(CMAKE_OSX_SYSROOT ${DEV_SDK})

SET(SDK_MIN "10.8")
SET(SDK "10.8")
SET(DEV_SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SDK}.sdk")

ADD_DEFINITIONS(
  -DMAC
  -DGCC_VISIBILITY
  -mmacosx-version-min=${SDK_MIN}
  )

SET(CMAKE_OSX_SYSROOT ${DEV_SDK})

Set min OSX SDK to 10.8

Set min OSX SDK to 10.8


# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Generic)

# which compilers to use for C and C++
SET(CMAKE_C_COMPILER ${DEVKITARM}/bin/arm-none-eabi-gcc)
SET(CMAKE_CXX_COMPILER ${DEVKITARM}/bin/arm-none-eabi-g++)
SET(CMAKE_SIZE ${DEVKITARM}/bin/arm-none-eabi-size)
SET(CMAKE_OBJCOPY ${DEVKITARM}/bin/arm-none-eabi-objcopy)
SET(CMAKE_AR ${DEVKITARM}/bin/arm-none-eabi-ar)
SET(CMAKE_RANLIB ${DEVKITARM}/bin/arm-none-eabi-ranlib)

set(CMAKE_FIND_ROOT_PATH ${DEVKITARM} ${DEVKITPRO} ${DEVKITPRO}/portlibs/3ds ${DEVKITPRO}/portlibs/armv6k)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Generic)

# which compilers to use for C and C++
SET(CMAKE_C_COMPILER ${DEVKITARM}/bin/arm-none-eabi-gcc)
SET(CMAKE_CXX_COMPILER ${DEVKITARM}/bin/arm-none-eabi-g++)
SET(CMAKE_SIZE ${DEVKITARM}/bin/arm-none-eabi-size)
SET(CMAKE_OBJCOPY ${DEVKITARM}/bin/arm-none-eabi-objcopy)
SET(CMAKE_AR ${DEVKITARM}/bin/arm-none-eabi-ar)
SET(CMAKE_RANLIB ${DEVKITARM}/bin/arm-none-eabi-ranlib)

set(CMAKE_FIND_ROOT_PATH $ENV{PORTLIBS}/3ds $ENV{PORTLIBS}/armv6k ${DEVKITARM} ${DEVKITPRO} ${DEVKITPRO}/portlibs/3ds ${DEVKITPRO}/portlibs/armv6k)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

Add possible PORTLIBS override env variable


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

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

# "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 "998500e9b6cd25679bfacf54c085e4d6c494d944")

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

Update FW with stereo confidence runtime config fix


SET(XSCRIPT_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/exec/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/scripts)
MAKE_DIRECTORY(${XSCRIPT_OUTPUT_PATH})
# define TSP_XSCRIPT MACRO
MACRO(TSP_XSCRIPT)
  FOREACH(SCRIPT_FILE ${ARGV})
    GET_FILENAME_COMPONENT(FN ${SCRIPT_FILE} NAME)
    CONFIGURE_FILE(${SCRIPT_FILE} ${XSCRIPT_OUTPUT_PATH}/${FN} COPYONLY)
  ENDFOREACH(SCRIPT_FILE)
ENDMACRO(TSP_XSCRIPT)

SET(XINCLUDE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/exec/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/include)
MAKE_DIRECTORY(${XINCLUDE_OUTPUT_PATH})
# define TSP_XINCLUDE MACRO
MACRO(TSP_XINCLUDE)
  FOREACH(INCLUDE_FILE ${ARGV})
    GET_FILENAME_COMPONENT(FN ${INCLUDE_FILE} NAME)
    CONFIGURE_FILE(${INCLUDE_FILE} ${XINCLUDE_OUTPUT_PATH}/${FN} COPYONLY)
  ENDFOREACH(INCLUDE_FILE)
ENDMACRO(TSP_XINCLUDE)

MARK_AS_ADVANCED(
  XSCRIPT_OUTPUT_PATH
  XINCLUDE_OUTPUT_PATH
  )

MESSAGE(STATUS "TSP CMake Tools loaded.")

SET(XSCRIPT_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/exec/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/scripts)
MAKE_DIRECTORY(${XSCRIPT_OUTPUT_PATH})
# define TSP_XSCRIPT MACRO
MACRO(TSP_XSCRIPT)
  FOREACH(SCRIPT_FILE ${ARGV})
    GET_FILENAME_COMPONENT(FN ${SCRIPT_FILE} NAME)
    CONFIGURE_FILE(${SCRIPT_FILE} ${XSCRIPT_OUTPUT_PATH}/${FN} COPYONLY)
  ENDFOREACH(SCRIPT_FILE)
ENDMACRO(TSP_XSCRIPT)

SET(XINCLUDE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/exec/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/include)
MAKE_DIRECTORY(${XINCLUDE_OUTPUT_PATH})
# define TSP_XINCLUDE MACRO
MACRO(TSP_XINCLUDE)
  FOREACH(INCLUDE_FILE ${ARGV})
    GET_FILENAME_COMPONENT(FN ${INCLUDE_FILE} NAME)
    CONFIGURE_FILE(${INCLUDE_FILE} ${XINCLUDE_OUTPUT_PATH}/${FN} COPYONLY)
  ENDFOREACH(INCLUDE_FILE)
ENDMACRO(TSP_XINCLUDE)

MACRO(TSP_CONFIGURE_FILE_AUTOTOOLS_COMPAT)
  SET(configure_input "DO NOT EDIT file was generated by CMake using -${ARGV0}- file.")
  CONFIGURE_FILE(${ARGV})
ENDMACRO(TSP_CONFIGURE_FILE_AUTOTOOLS_COMPAT)

MARK_AS_ADVANCED(
  XSCRIPT_OUTPUT_PATH
  XINCLUDE_OUTPUT_PATH
  )

MESSAGE(STATUS "TSP CMake Tools loaded.")

Add TSP_CONFIGURE_FILE_AUTOTOOLS_COMPAT macro for previously configure-generated files src/scripts/tsp_dev.login src/scripts/tsp_dev.login.sh src/scripts/tsp.pc src/doxy/tsp src/core/include/tsp_prjcfg.h


set(SITK_CMAKE_MINIMUM_REQUIRED_VERSION "3.16.3")
set(SITK_CMAKE_POLICY_VERSION "3.16.3")

if("${CMAKE_VERSION}" VERSION_LESS_EQUAL "${SITK_CMAKE_POLICY_VERSION}")
  set(SITK_CMAKE_POLICY_VERSION "${CMAKE_VERSION}")
endif()

Set CMake Policy version up to 3.20

Set CMake Policy version up to 3.20


add_custom_target(check)

macro(mimosa_test MODULE)
  add_executable(tst-${MODULE} ${ARGN})
  target_link_libraries(tst-${MODULE} gtest_main gtest mimosa)
  add_custom_target(run-tst-${MODULE} ./tst-${MODULE} DEPENDS tst-${MODULE})
  add_dependencies(check run-tst-${MODULE})
endmacro(mimosa_test)

add_custom_target(check)

macro(mimosa_test MODULE)
  add_executable(tst-${MODULE} EXCLUDE_FROM_ALL ${ARGN})
  target_link_libraries(tst-${MODULE} gtest_main gtest mimosa)
  add_custom_target(run-tst-${MODULE} ./tst-${MODULE} DEPENDS tst-${MODULE})
  add_dependencies(check run-tst-${MODULE})
endmacro(mimosa_test)

Add EXCLUDE_FROM_ALL to the CMake macro mimosa_test


# Contains the dac build specific definitions. Included by the leaf dac cmake files.

remove_definitions(-DPROFILING_SUPPORTED)
add_definitions(-DDACCESS_COMPILE)
if(WIN32)
    add_definitions(-MT)
endif(WIN32)

# Contains the dac build specific definitions. Included by the leaf dac cmake files.

add_definitions(-DDACCESS_COMPILE)
if(WIN32)
    remove_definitions(-DPROFILING_SUPPORTED)
    add_definitions(-DPROFILING_SUPPORTED_DATA)
    add_definitions(-MT)
endif(WIN32)

Fix sos on window's build.

Fix sos on window's build.


INCLUDE(CheckIncludeFile)
INCLUDE(CheckLibraryExists)

# Only build statically on Windows.
IF(WIN32)
    SET(CMAKE_EXE_LINKER_FLAGS "-static")
    SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ELSE(WIN32)
    SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ENDIF(WIN32)

# Ignore depreciation warnings on OSX because GLUT is deprecated.
IF(APPLE)
    add_compile_options(-Wno-deprecated)
ENDIF(APPLE)

# Find required libraries.
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(Threads REQUIRED)

# Check for some include files.
check_include_files(dirent.h HAVE_DIRENT_H)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)

INCLUDE(CheckIncludeFile)
INCLUDE(CheckLibraryExists)

# Only build statically on Windows.
IF(WIN32)
    SET(CMAKE_EXE_LINKER_FLAGS "-static")
    SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ELSE(WIN32)
    SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ENDIF(WIN32)

# Ignore depreciation warnings on OSX because GLUT is deprecated.
IF(APPLE)
    add_compile_options(-Wno-deprecated)
ENDIF(APPLE)

# Find required libraries.
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(Threads REQUIRED)
find_package(PNG REQUIRED)

# Check for some include files.
check_include_files(dirent.h HAVE_DIRENT_H)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)

Add libpng as a required package for CMake.


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

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

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

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

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

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


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

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

Update MGHIO to be shared lib

ENH: Update MGHIO to be shared lib

This makes MGHIO consistent with Slicer environment
and the rest of the image IO mechanism.

This patch was tested within the Slicer environment.


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

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

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

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

Add workaround for stereo subpixel/extended mode crash at the expense of system performance


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

# "version if applicable"
#set(DEPTHAI_BOOTLOADER_VERSION "0.0.15")
set(DEPTHAI_BOOTLOADER_VERSION "bb9e4c86ce3c22da0aeb92dc18c8b28458bed4af")

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

# "version if applicable"
set(DEPTHAI_BOOTLOADER_VERSION "0.0.15")
#set(DEPTHAI_BOOTLOADER_VERSION "870bec4ca0ef026ddb9c490a38dfe9d097614554")

Revert "USB bootloader with support for missing 24MHz USB osc (OAK-D Pro-PoE initial flashing)"

This reverts commit 96691b9a8295c54bea1c04c20bc4ad60091ca536.


message(STATUS "QtSsh subdir: ${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(${CMAKE_CURRENT_LIST_DIR})
include_directories(${CMAKE_CURRENT_LIST_DIR}/qtssh)

message(STATUS "QtSsh subdir: ${CMAKE_CURRENT_LIST_DIR}")
set(BUILD_STATIC ON)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR})
include_directories(${CMAKE_CURRENT_LIST_DIR}/qtssh)

Build statically when used as subproject


itk_fetch_module(SCIFIO
  "SCIFIO (Bioformats) ImageIO plugin for ITK"
  GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
  GIT_TAG 789c08071bbcd4341eba76fda10582a8d5fb7626
  )

itk_fetch_module(SCIFIO
  "SCIFIO (Bioformats) ImageIO plugin for ITK"
  GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
  GIT_TAG 9346dbbf30b64645ebd9546fbf82f5438dc88a48
  )

Update SCIFIO for KWStyke failures

STYLE: Update SCIFIO for KWStyke failures

Change-Id: I59746f951013cd19fdff9b5aea6900d67f050253


include(${CMAKE_CURRENT_LIST_DIR}/Default.cmake)

set(MITK_VTK_DEBUG_LEAKS OFF CACHE BOOL "Enable VTK Debug Leaks" FORCE)

# Ensure that the in-application help can be build
set(BLUEBERRY_QT_HELP_REQUIRED ON CACHE BOOL "Required Qt help documentation in plug-ins" FORCE)

include(${CMAKE_CURRENT_LIST_DIR}/Default.cmake)

set(MITK_CONFIG_PACKAGES ${MITK_CONFIG_PACKAGES}
  MatchPoint
)

set(MITK_CONFIG_PLUGINS ${MITK_CONFIG_PLUGINS}
  org.mitk.gui.qt.multilabelsegmentation
  org.mitk.matchpoint.core.helper
  org.mitk.gui.qt.matchpoint.algorithm.browser
  org.mitk.gui.qt.matchpoint.algorithm.control
  org.mitk.gui.qt.matchpoint.mapper
  org.mitk.gui.qt.matchpoint.framereg
  org.mitk.gui.qt.matchpoint.visualizer
  org.mitk.gui.qt.matchpoint.evaluator
  org.mitk.gui.qt.matchpoint.manipulator
)

set(MITK_VTK_DEBUG_LEAKS OFF CACHE BOOL "Enable VTK Debug Leaks" FORCE)

# Ensure that the in-application help can be build
set(BLUEBERRY_QT_HELP_REQUIRED ON CACHE BOOL "Required Qt help documentation in plug-ins" FORCE)

Add matchpoint to workbench release config


if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
    message(WARNING "Current CMake verision is ${CMAKE_VERSION}. stm32-cmake requires CMake 3.16 or greater")
endif()

get_filename_component(STM32_CMAKE_DIR ${CMAKE_CURRENT_LIST_FILE} DIRECTORY)
list(APPEND CMAKE_MODULE_PATH ${STM32_CMAKE_DIR})

include(stm32/common)
include(stm32/devices)

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

find_program(CMAKE_C_COMPILER NAMES ${STM32_TARGET_TRIPLET}-gcc HINTS ${TOOLCHAIN_BIN_PATH})
find_program(CMAKE_CXX_COMPILER NAMES ${STM32_TARGET_TRIPLET}-g++ HINTS ${TOOLCHAIN_BIN_PATH})
find_program(CMAKE_ASM_COMPILER NAMES ${STM32_TARGET_TRIPLET}-gcc HINTS ${TOOLCHAIN_BIN_PATH})

set(CMAKE_EXECUTABLE_SUFFIX_C   .elf)
set(CMAKE_EXECUTABLE_SUFFIX_CXX .elf)
set(CMAKE_EXECUTABLE_SUFFIX_ASM .elf)

# This should be safe to set for a bare-metal cross-compiler
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

Check cmake version and warn user if lower than required


include(tomviz.bundle.common)

set(CPACK_GENERATOR DragNDrop)
include(CPack)

install(CODE "
     file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
          \"${install_location}/Applications/TomViz.app\")

     file(WRITE \"\${CMAKE_INSTALL_PREFIX}/TomViz.app/Contents/Resources/qt.conf\"
                \"\")
     execute_process(
       COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
               \"\${CMAKE_INSTALL_PREFIX}/TomViz.app\"
               \"${install_location}/lib\"
               \"${install_location}/plugins\")
   "
   COMPONENT superbuild)

include(tomviz.bundle.common)

set(CPACK_GENERATOR DragNDrop)
include(CPack)

install(CODE "
     file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
          \"${install_location}/Applications/tomviz.app\")

     file(WRITE \"\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Resources/qt.conf\"
                \"\")

    # install all python modules/packages from paraview.
    file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Python\"
         USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
         \"${install_location}/Applications/paraview.app/Contents/Python/\")

    # install all other libraries from paraview (this is needed for the PythonD-*.dylib files
    # which don't get copied over by the fixup_bundle.py
    file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Libraries\"
         USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
         \"${install_location}/Applications/paraview.app/Contents/Libraries/\")

    execute_process(
       COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
               \"\${CMAKE_INSTALL_PREFIX}/tomviz.app\"
               \"${install_location}/lib\"
               \"${install_location}/plugins\")
   "
   COMPONENT superbuild)

Fix Python install rules on OsX.

Fix Python install rules on OsX.

Add rules to install tomviz and ParaView Python module files
in the app bundle.

Also install PythonD.dylib files explicitly, since they
do not get installed automatically by fixup_bundle.


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

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

cmake: Use specific instruction sets for extra CPU features


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

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

BUG: Update MGHImageIO for header guarder style

Addresses failing KWStyle test.

Remove usage of reserved "__" prefix.

Change-Id: Ic92657fa61d1c78c0168b8fa7317d2de6bb98ec2


set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_SYSTEM_VERSION 1)
set(BUILD_ARM 1)
set(BUILD_RK1108 1)

set(RK1108_TOOLCHAIN_ROOT /opt/rk1108_toolchain)
set(RK1108_COMMON_FLAGS " --sysroot=${RK1108_TOOLCHAIN_ROOT}/usr/arm-rkcvr-linux-uclibcgnueabihf/sysroot -D__RK1108__")

set(CMAKE_C_COMPILER ${RK1108_TOOLCHAIN_ROOT}/usr/bin/arm-linux-gcc CACHE FILEPATH "C Compiler" FORCE)
set(CMAKE_CXX_COMPILER ${RK1108_TOOLCHAIN_ROOT}/usr/bin/arm-linux-g++ CACHE FILEPATH "C++ Compiler" FORCE)

set(CMAKE_C_FLAGS "${RK1108_COMMON_FLAGS}" CACHE STRING "toolchain_cflags" FORCE)
set(CMAKE_CXX_FLAGS "${RK1108_COMMON_FLAGS}" CACHE STRING "toolchain_cxxflags" FORCE)
set(CMAKE_LINK_FLAGS "${RK1108_COMMON_FLAGS}" CACHE STRING "toolchain_linkflags" FORCE)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_SYSTEM_VERSION 1)
set(BUILD_ARM 1)
set(BUILD_RK1108 1)

set(RK1108_TOOLCHAIN_ROOT /opt/rk1108_toolchain)
set(RK1108_COMMON_FLAGS " --sysroot=${RK1108_TOOLCHAIN_ROOT}/usr/arm-rkcvr-linux-uclibcgnueabihf/sysroot -D__RK1108__ -fno-omit-frame-pointer")

set(CMAKE_C_COMPILER ${RK1108_TOOLCHAIN_ROOT}/usr/bin/arm-linux-gcc CACHE FILEPATH "C Compiler" FORCE)
set(CMAKE_CXX_COMPILER ${RK1108_TOOLCHAIN_ROOT}/usr/bin/arm-linux-g++ CACHE FILEPATH "C++ Compiler" FORCE)

set(CMAKE_C_FLAGS "${RK1108_COMMON_FLAGS}" CACHE STRING "toolchain_cflags" FORCE)
set(CMAKE_CXX_FLAGS "${RK1108_COMMON_FLAGS}" CACHE STRING "toolchain_cxxflags" FORCE)
set(CMAKE_LINK_FLAGS "${RK1108_COMMON_FLAGS}" CACHE STRING "toolchain_linkflags" FORCE)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Add -fno-omit-frame-pointer by default on RK1108


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

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

include(polly_add_cache_flag)

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

set(
    CMAKE_CXX_FLAGS_RELEASE
    "-O1"
    CACHE
    STRING
    "C++ compiler flags"
    FORCE
)

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

set(
    CMAKE_C_FLAGS_RELEASE
    "-O1"
    CACHE
    STRING
    "C compiler flags"
    FORCE
)

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

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

include(polly_add_cache_flag)

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

set(
    CMAKE_CXX_FLAGS_RELEASE
    "-O1 -DNDEBUG"
    CACHE
    STRING
    "C++ compiler flags"
    FORCE
)

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

set(
    CMAKE_C_FLAGS_RELEASE
    "-O1 -DNDEBUG"
    CACHE
    STRING
    "C compiler flags"
    FORCE
)

Add NDEBUG to release flags

Add NDEBUG to release flags


#Tweaks for the different package types

if (${CPACK_GENERATOR} STREQUAL "DEB")
   #set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
   set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib (>=1.2.8), czmq (>=1.4.1), apr-accre (>= 1.5.0), apr-util-ACCRE (>=1.5.3), zeromq (=>4.0.1)")
elseif (${CPACK_GENERATOR} STREQUAL "RPM")
   set(CPACK_RPM_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib (>=1.2.8), czmq (>=1.4.1), apr-accre (>= 1.5.0), apr-util-ACCRE (>=1.5.3), zeromq (=>4.0.1)")
   #set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
endif()

#Tweaks for the different package types

if (${CPACK_GENERATOR} STREQUAL "DEB")
   #set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
   set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib1g (>= 1:1.1.4), czmq (>=1.4.1), libapr-accre1 (>= 1.5.0), libapr-accre-util1 (>=1.5.3), libzmq3 (>=4.0.1)")
elseif (${CPACK_GENERATOR} STREQUAL "RPM")
   set(CPACK_RPM_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib (>=1.2.8), czmq (>=1.4.1), apr-accre (>= 1.5.0), apr-util-ACCRE (>=1.5.3), zeromq (=>4.0.1)")
   #set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
endif()

Fix the hardcoded Debian package dependencies


# Find QJSON - JSON handling library for Qt
#
# This module defines
#  QJSON_FOUND - whether the qsjon library was found
#  QJSON_LIBRARIES - the qjson library
#  QJSON_INCLUDE_DIR - the include path of the qjson library
#

if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)

  # Already in cache
  set (QJSON_FOUND TRUE)

else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)

  if (NOT WIN32)
    # use pkg-config to get the values of QJSON_INCLUDE_DIRS
    # and QJSON_LIBRARY_DIRS to add as hints to the find commands.
    include (FindPkgConfig)
    pkg_check_modules (QJSON QJson>=0.5)
  endif (NOT WIN32)

  find_library (QJSON_LIBRARIES
    NAMES
    qjson
    PATHS
    ${QJSON_LIBRARY_DIRS}
    ${LIB_INSTALL_DIR}
    ${KDE4_LIB_DIR}
  )

  find_path (QJSON_INCLUDE_DIR
    NAMES
    parser.h
    PATH_SUFFIXES
    qjson
    PATHS
    ${QJSON_INCLUDE_DIRS}
    ${INCLUDE_INSTALL_DIR}
    ${KDE4_INCLUDE_DIR}
  )

  include(FindPackageHandleStandardArgs)
  find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)

endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)

# Find QJSON - JSON handling library for Qt
#
# This module defines
#  QJSON_FOUND - whether the qsjon library was found
#  QJSON_LIBRARIES - the qjson library
#  QJSON_INCLUDE_DIR - the include path of the qjson library
#

if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)

  # Already in cache
  set (QJSON_FOUND TRUE)

else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)

  if (NOT WIN32)
    # use pkg-config to get the values of QJSON_INCLUDE_DIRS
    # and QJSON_LIBRARY_DIRS to add as hints to the find commands.
    include (FindPkgConfig)
    pkg_check_modules (QJSON QJson>=0.5)
  endif (NOT WIN32)

  find_library (QJSON_LIBRARIES
    NAMES
    qjson
    PATHS
    ${QJSON_LIBRARY_DIRS}
    ${LIB_INSTALL_DIR}
    ${KDE4_LIB_DIR}
  )

  find_path (QJSON_INCLUDE_DIR
    NAMES
    qjson/parser.h
    PATHS
    ${QJSON_INCLUDE_DIRS}
    ${INCLUDE_INSTALL_DIR}
    ${KDE4_INCLUDE_DIR}
  )

  include(FindPackageHandleStandardArgs)
  find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)

endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)

Add ${INCLUDE_INSTALL_DIR} to the include dirs, not ${INCLUDE_INSTALL_DIR}/qjson

Having ${INCLUDE_INSTALL_DIR}/qjson in the include dirs means one include qjson
files with #include <parser.h>, which can cause the wrong file to be included because
parser.h is a very generic name.

If only ${INCLUDE_INSTALL_DIR} is in the include dirs, people have to use
#include <qjson/parser.h> instead, which avoids any confusion.


include("${CMAKE_CURRENT_LIST_DIR}/ix86_energyTargets.cmake")

set(x86_energy_FOUND TRUE)

get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)

message(STATUS "Using x86_energy: ${_IMPORT_PREFIX}")

set(_IMPORT_PREFIX)

include("${CMAKE_CURRENT_LIST_DIR}/x86_energyTargets.cmake")

set(x86_energy_FOUND TRUE)

get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)

message(STATUS "Using x86_energy: ${_IMPORT_PREFIX}")

set(_IMPORT_PREFIX)

Fix typo in CMake boiler plate

Fix typo in CMake boiler plate


SET(CPACK_RPM_PACKAGE_REQUIRES "libstdc++ >= 4.8, httpd >= 2.4")
SET(CPACK_RPM_PACKAGE_URL "https://github.com/matiu2/cdnalizer")
SET(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")

set(YUM_DIR packages/redhat)

file(COPY ${YUM_DIR}/01-cdnalizer.conf ${YUM_DIR}/postrm DESTINATION .)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cdnalizer.conf DESTINATION /etc/httpd/conf.modules.d/)

configure_file(${YUM_DIR}/postinst postinst)
SET(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_BINARY_DIR}/postinst )
SET(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_BINARY_DIR}/postrm )

SET(CPACK_RPM_PACKAGE_REQUIRES "libstdc++ >= 4.8, httpd >= 2.4")
SET(CPACK_RPM_PACKAGE_URL "https://github.com/matiu2/cdnalizer")
SET(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")

set(YUM_DIR packages/redhat)

file(COPY ${YUM_DIR}/01-cdnalizer.conf ${YUM_DIR}/postrm DESTINATION .)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/01-cdnalizer.conf DESTINATION /etc/httpd/conf.modules.d/)

configure_file(${YUM_DIR}/postinst postinst)
SET(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_BINARY_DIR}/postinst )
SET(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_BINARY_DIR}/postrm )

Fix yum conf file name

Fix yum conf file name


set(CPACK_GENERATOR
    TGZ
    ZIP
    )

set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
set(CPACK_INSTALL_CMAKE_PROJECTS
    "${CMAKE_BINARY_DIR}"
    "${PROJECT_NAME}"
    ALL
    .
    )

set(CPACK_PROJECT_URL "https://github.com/gabime/spdlog")
set(CPACK_PACKAGE_VENDOR "Gabi Melman")
set(CPACK_PACKAGE_CONTACT "Gabi Melman <gmelman1@gmail.com>")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
if (PROJECT_VERSION_TWEAK)
    set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}.${PROJECT_VERSION_TWEAK})
endif ()
set(CPACK_PACKAGE_RELOCATABLE ON)

include(CPack)

set(CPACK_GENERATOR
    TGZ
    ZIP
    )

set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
set(CPACK_INSTALL_CMAKE_PROJECTS
    "${CMAKE_BINARY_DIR}"
    "${PROJECT_NAME}"
    ALL
    .
    )

set(CPACK_PROJECT_URL "https://github.com/gabime/spdlog")
set(CPACK_PACKAGE_VENDOR "Gabi Melman")
set(CPACK_PACKAGE_CONTACT "Gabi Melman <gmelman1@gmail.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Fast C++ logging library")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
if (PROJECT_VERSION_TWEAK)
    set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}.${PROJECT_VERSION_TWEAK})
endif ()
set(CPACK_PACKAGE_RELOCATABLE ON)

set(CPACK_RPM_PACKAGE_LICENSE "MIT")
set(CPACK_RPM_PACKAGE_GROUP "System Environment/Libraries")
set(CPACK_RPM_PACKAGE_URL ${CPACK_PROJECT_URL})
set(CPACK_RPM_PACKAGE_DESCRIPTION "Very fast, header-only/compiled, C++ logging library.")

include(CPack)

Set additional CPACK variables for RPM generator

Sets the following when querying the generated RPM's info:

Group       : System Environment/Libraries
License     : MIT
URL         : https://github.com/gabime/spdlog
Summary     : Fast C++ logging library
Description :
Very fast, header-only/compiled, C++ logging library.


include(CheckCXXSourceCompiles)
include(CMakeCheckCompilerFlagCommonPatterns)

include(compiler-flags.cmake)

macro(check_supported_flags OUTPUT_VAR)
  CHECK_COMPILER_FLAG_COMMON_PATTERNS(_CheckCXXCompilerFlag_COMMON_PATTERNS)
  foreach(flag ${GCC_EXTRA_WARNINGS} ${CLANG_EXTRA_WARNINGS})
    set(CMAKE_REQUIRED_DEFINITIONS "-W${flag}")
    CHECK_CXX_SOURCE_COMPILES("int main() { return 0; }" flag-${flag}-result
      FAIL_REGEX ${_CheckCXXCompilerFlag_COMMON_PATTERNS})
    if(${flag-${flag}-result})
      list(APPEND CXX_ALL_WARNINGS "${flag}")
    endif()
  endforeach()

  # flatten the list
  list(INSERT CXX_ALL_WARNINGS 0 "")
  string (REPLACE ";" " -W" ${OUTPUT_VAR} "${CXX_ALL_WARNINGS}")
endmacro()

include(CheckCXXSourceCompiles)
include(CMakeCheckCompilerFlagCommonPatterns)

include(cmake/compiler-flags.cmake)

macro(check_supported_flags OUTPUT_VAR)
  CHECK_COMPILER_FLAG_COMMON_PATTERNS(_CheckCXXCompilerFlag_COMMON_PATTERNS)
  foreach(flag ${GCC_EXTRA_WARNINGS} ${CLANG_EXTRA_WARNINGS})
    set(CMAKE_REQUIRED_DEFINITIONS "-W${flag}")
    string(REPLACE "=" "-" result_var "flag-${flag}-result" )
    CHECK_CXX_SOURCE_COMPILES("int main() { return 0; }" ${result_var}
      FAIL_REGEX ${_CheckCXXCompilerFlag_COMMON_PATTERNS})
    if(${result_var})
      list(APPEND CXX_ALL_WARNINGS "${flag}")
    endif()
  endforeach()

  # flatten the list
  list(INSERT CXX_ALL_WARNINGS 0 "")
  string (REPLACE ";" " -W" ${OUTPUT_VAR} "${CXX_ALL_WARNINGS}")
endmacro()

Clean make up for correct variable names


if (NOT PLIBSYS_SIZEOF_VOID_P EQUAL 4)
        message (FATAL_ERROR
                 "
                 PGI compiler doesn't support 64-bit shared libraries on
                 macOS. Use 32-bit version of the compiler instead.
                 ")
endif()

set (PLIBSYS_THREAD_MODEL posix)
set (PLIBSYS_IPC_MODEL posix)
set (PLIBSYS_TIME_PROFILER_MODEL mach)
set (PLIBSYS_DIR_MODEL posix)
set (PLIBSYS_LIBRARYLOADER_MODEL posix)

set (PLIBSYS_PLATFORM_DEFINES
        -D_REENTRANT
)

if (NOT PLIBSYS_SIZEOF_VOID_P EQUAL 4)
        if (CMAKE_VERSION VERSION_LESS 2.8.10)
                message (WARNING
                         "
                         Unable to detect PGI compiler version. Beware that old
                         PGI versions doesn't support shared libraries on 64-bit
                         macOS.
                         ")
        elseif (CMAKE_C_COMPILER_VERSION VERSION_LESS 18.4)
                message (FATAL_ERROR
                         "
                         PGI compiler before verison 18.4 doesn't support 64-bit
                         shared libraries on macOS. Use older 32-bit version of
                         the compiler instead.
                         ")
        endif()
endif()

set (PLIBSYS_THREAD_MODEL posix)
set (PLIBSYS_IPC_MODEL posix)
set (PLIBSYS_TIME_PROFILER_MODEL mach)
set (PLIBSYS_DIR_MODEL posix)
set (PLIBSYS_LIBRARYLOADER_MODEL posix)

set (PLIBSYS_PLATFORM_DEFINES
        -D_REENTRANT
)

mac: Put warning when using old PGI compiler on 64-bit macOS


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

TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES(
  BoostOrg
  REQUIRED_HEADERS boost/property_tree/json_parser.hpp
                   boost/property_tree/ptree.hpp
                   boost/math/tools/polynomial.hpp
                   boost/math/tools/rational.hpp
                   boost/geometry.hpp
                   boost/range.hpp
                   boost/current_function.hpp
  )

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

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

TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES(
  BoostOrg
  REQUIRED_HEADERS boost/property_tree/json_parser.hpp
                   boost/property_tree/ptree.hpp
                   boost/math/tools/polynomial.hpp
                   boost/math/tools/rational.hpp
                   boost/geometry.hpp
                   boost/range.hpp
  )

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

Drop <boost/current_function.hpp> from the list of required headers when TriBITS looks for Boost


# Contact: Pablo Hernandez-Cerdan <pablo.hernandez.cerdan@outlook.com>
itk_fetch_module(IsotropicWavelets
"An ITK-based implementation of steerable isotropic wavelet transforms for multiscale phase analysis.
A more detailed description can be found in the Insight Journal article::

Cerdan, P.H. \"Steerable Isotropic Wavelets for Multiscale and Phase Analysis\".
  http://hdl.handle.net/10380/3558
  November, 2016.
"
  # Upstream repository was transfered from phcerdan to InsightSoftwareConsortium
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIsotropicWavelets.git
  GIT_TAG e76bc678cbcbdb70e479008772ac6451c2cf038b
)

# Contact: Pablo Hernandez-Cerdan <pablo.hernandez.cerdan@outlook.com>
itk_fetch_module(IsotropicWavelets
"An ITK-based implementation of steerable isotropic wavelet transforms for multiscale phase analysis.
A more detailed description can be found in the Insight Journal article::

Cerdan, P.H. \"Steerable Isotropic Wavelets for Multiscale and Phase Analysis\".
  http://hdl.handle.net/10380/3558
  November, 2016.
"
  # Upstream repository was transfered from phcerdan to InsightSoftwareConsortium
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIsotropicWavelets.git
  GIT_TAG 8f79edab90e4f80b883f6abbaeb120cdbc01da5a
)

BUG: Update IsotropicWavelets module for Doxygen build

To address the Doxygen CMake configuration error on the location of the
Python tests.

Changes:

   Matt McCormick (3):
     COMP: Wrap GaussianImageSource for StructureTensor
     BUG: Move Python tests to wrapping/test/CMakeLists.txt
     ENH: Build against ITK 5.0.1 and bump Python package version


set_ifndef(STLINK_FW stlink)

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

nucleo_f429zi: Add JLink support for flash, as per nucleo_f070rb

Signed-off-by: Dave Marples <dave@marples.net>

Added ability to use JLink in addition to OpenOCD for flashing.


macro(fix_cudart_rpath target)
if (ENABLE_CUDA AND APPLE)
get_target_property(_target_exe ${target} LOCATION)
add_custom_command(TARGET ${target} POST_BUILD
                          COMMAND install_name_tool ARGS -change @rpath/libcudart.dylib ${CUDA_CUDART_LIBRARY} ${_target_exe})
add_custom_command(TARGET ${target} POST_BUILD
                          COMMAND install_name_tool ARGS -change @rpath/libcufft.dylib ${CUDA_CUDART_EMU_LIBRARY} ${_target_exe})
endif (ENABLE_CUDA AND APPLE)
endmacro(fix_cudart_rpath)

macro(fix_cudart_rpath target)
if (ENABLE_CUDA AND APPLE)
get_target_property(_target_exe ${target} LOCATION)
add_custom_command(TARGET ${target} POST_BUILD
                          COMMAND install_name_tool ARGS -change @rpath/libcudart.dylib ${CUDA_CUDART_LIBRARY} ${_target_exe})
add_custom_command(TARGET ${target} POST_BUILD
                          COMMAND install_name_tool ARGS -change @rpath/libcufft.dylib ${CUDA_cufft_LIBRARY} ${_target_exe})
endif (ENABLE_CUDA AND APPLE)
endmacro(fix_cudart_rpath)

Fix bug that prevented mac os x builds from running in the build directory

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@3903 fa922fa7-2fde-0310-acd8-f43f465a7996


if (Module_vtkRenderingVolumeOpenGLNEW AND
    NOT (VTK_RENDERING_BACKEND STREQUAL "OpenGL2"))
  set(VTK_RENDERING_VOLUME_BACKEND
    "vtkRenderingVolumeOpenGLNew")
else ()
  set (VTK_RENDERING_VOLUME_BACKEND "")
endif()

vtk_module(vtkRenderingVolume
  GROUPS
    Rendering
  DEPENDS
    vtkImagingCore
    vtkRenderingCore
  TEST_DEPENDS
    vtkFiltersModeling
    vtkTestingCore
    vtkTestingRendering
    vtkRenderingVolume${VTK_RENDERING_BACKEND}
    ${VTK_RENDERING_VOLUME_BACKEND}
    vtkRenderingFreeType
    vtkIOXML
    vtkImagingSources
    vtkImagingGeneral
    vtkImagingHybrid
    vtkInteractionStyle
    vtkIOLegacy
  KIT
    vtkRendering
  )

vtk_module(vtkRenderingVolume
  GROUPS
    Rendering
  DEPENDS
    vtkImagingCore
    vtkRenderingCore
  TEST_DEPENDS
    vtkFiltersModeling
    vtkTestingCore
    vtkTestingRendering
    vtkRenderingVolume${VTK_RENDERING_BACKEND}
    vtkRenderingFreeType
    vtkIOXML
    vtkImagingSources
    vtkImagingGeneral
    vtkImagingHybrid
    vtkInteractionStyle
    vtkIOLegacy
  KIT
    vtkRendering
  )

Remove trailing references to VolumeOpenGLNew


macro(addTestTargetToLibavgPythonPackage testTarget)
    add_custom_target(copy_${testTarget} ALL)
    add_dependencies(copy_${testTarget} ${testTarget})
    add_custom_command(TARGET copy_${testTarget}
        COMMAND ${CMAKE_COMMAND} -E copy
        "${CMAKE_CURRENT_BINARY_DIR}/${testTarget}"
        "${CMAKE_BINARY_DIR}/python/libavg/test/cpptest"
        )
endmacro()

macro(addTestDataToLibavgPythonPackage testTarget dataDir)
    add_custom_command(TARGET copy_${testTarget}
        COMMAND ${CMAKE_COMMAND} -E copy_directory
        "${CMAKE_CURRENT_SOURCE_DIR}/${dataDir}"
        "${CMAKE_BINARY_DIR}/python/libavg/test/cpptest/baseline"
        )
endmacro()

macro(addPluginToLibavgPythonPackage plugin)
    add_custom_target(copy_${plugin} ALL)
    add_dependencies(copy_${plugin} ${plugin})
    add_custom_command(TARGET copy_${plugin}
        COMMAND ${CMAKE_COMMAND} -E copy
        "${CMAKE_CURRENT_BINARY_DIR}/${plugin}${CMAKE_SHARED_MODULE_SUFFIX}"
        "${CMAKE_BINARY_DIR}/python/libavg/test/plugin"
        )
endmacro()

function(addTestTargetToLibavgPythonPackage testTarget)
    add_custom_target(copy_${testTarget} ALL)
    add_dependencies(copy_${testTarget} ${testTarget})
    add_custom_command(TARGET copy_${testTarget}
        COMMAND ${CMAKE_COMMAND} -E copy
        "${CMAKE_CURRENT_BINARY_DIR}/${testTarget}"
        "${CMAKE_BINARY_DIR}/python/libavg/test/cpptest"
        )
endfunction()

function(addTestDataToLibavgPythonPackage testTarget dataDir)
    add_custom_command(TARGET copy_${testTarget}
        COMMAND ${CMAKE_COMMAND} -E copy_directory
        "${CMAKE_CURRENT_SOURCE_DIR}/${dataDir}"
        "${CMAKE_BINARY_DIR}/python/libavg/test/cpptest/baseline"
        )
endfunction()

function(addPluginToLibavgPythonPackage plugin)
    add_custom_target(copy_${plugin} ALL)
    add_dependencies(copy_${plugin} ${plugin})
    add_custom_command(TARGET copy_${plugin}
        COMMAND ${CMAKE_COMMAND} -E copy
        "${CMAKE_CURRENT_BINARY_DIR}/${plugin}${CMAKE_SHARED_MODULE_SUFFIX}"
        "${CMAKE_BINARY_DIR}/python/libavg/test/plugin"
        )
endfunction()

Minor: Use functions instead of macros for better scope control.


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

set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} tutorial-pyroot-zdemo)

if("$ENV{COMPILER}" STREQUAL "classic") #  TTreeProcessorM{T,P} are not available
  list(APPEND CTEST_CUSTOM_TESTS_IGNORE tutorial-multicore-mp102_readNtuplesFillHistosAndFit)
endif()

if (CTEST_BUILD_NAME MATCHES aarch64 AND CTEST_BUILD_NAME MATCHES dbg)
  # these tutorials are disabled as they timeout
  list(APPEND CTEST_CUSTOM_TESTS_IGNORE
       tutorial-roostats-StandardBayesianNumericalDemo
       tutorial-roostats-OneSidedFrequentistUpperLimitWithBands
       tutorial-tmva-TMVAClassification
       tutorial-tmva-TMVARegression
       tutorial-tmva-TMVAMulticlass
       tutorial-tmva-TMVAMulticlassApplication
       tutorial-tmva-TMVARegressionApplication
       tutorial-tmva-TMVAClassificationApplication
       tutorial-roostats-TwoSidedFrequentistUpperLimitWithBands)
endif()

if (CTEST_BUILD_NAME MATCHES aarch64)
  # The new triangulation does not work on ARM
  list(APPEND CTEST_CUSTOM_TESTS_IGNORE tutorial-mlp-mlpRegression)
endif()

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

set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} tutorial-pyroot-zdemo)

if("$ENV{COMPILER}" STREQUAL "classic")
  #  TTreeProcessorM{T,P} are not available
  list(APPEND CTEST_CUSTOM_TESTS_IGNORE tutorial-multicore-mp102_readNtuplesFillHistosAndFit)
  #  pthread is not retained on ubuntus when building root.exe
  list(APPEND CTEST_CUSTOM_TESTS_IGNORE
       tutorial-multicore-mt101_fillNtuples
       tutorial-multicore-mt001_fillHistos
       tutorial-multicore-mt201_parallelHistoFill)
endif()

if (CTEST_BUILD_NAME MATCHES aarch64 AND CTEST_BUILD_NAME MATCHES dbg)
  # these tutorials are disabled as they timeout
  list(APPEND CTEST_CUSTOM_TESTS_IGNORE
       tutorial-roostats-StandardBayesianNumericalDemo
       tutorial-roostats-OneSidedFrequentistUpperLimitWithBands
       tutorial-tmva-TMVAClassification
       tutorial-tmva-TMVARegression
       tutorial-tmva-TMVAMulticlass
       tutorial-tmva-TMVAMulticlassApplication
       tutorial-tmva-TMVARegressionApplication
       tutorial-tmva-TMVAClassificationApplication
       tutorial-roostats-TwoSidedFrequentistUpperLimitWithBands)
endif()

if (CTEST_BUILD_NAME MATCHES aarch64)
  # The new triangulation does not work on ARM
  list(APPEND CTEST_CUSTOM_TESTS_IGNORE tutorial-mlp-mlpRegression)
endif()

Remove some imt tutorials from the test batteries for classic builds

on ubuntus, despite the usage of -pthread, the executable root.exe
is not linked to libpthread: the -Wl,--as-needed flag is being specified.
As a result, the usage of any thread in a macro results in a crash.


CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

include (ExternalProject)
include (BuildSupport)

external_git_repo (emdata
    HEAD
    http://github.com/janelia-flyem/emdata.git)

message ("Installing ${emdata_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${emdata_NAME}
    DEPENDS             ${python_NAME} ${setuptools_NAME}
    PREFIX              ${BUILDEM_DIR}
    GIT_REPOSITORY      ${emdata_URL}
    UPDATE_COMMAND      ""
    PATCH_COMMAND       ""
    CONFIGURE_COMMAND   ""
    BUILD_COMMAND       ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} -DBUILDEM_DIR=${BUILDEM_DIR} ${emdata_SRC_DIR}
    TEST_COMMAND        ${BUILDEM_ENV_STRING} ${BUILDEM_BIN_DIR}/tests/test_encoder
    INSTALL_COMMAND     ""
)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

include (ExternalProject)
include (BuildSupport)

external_git_repo (emdata
    HEAD
    http://github.com/janelia-flyem/emdata.git)

message ("Installing ${emdata_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${emdata_NAME}
    DEPENDS             ${python_NAME} ${setuptools_NAME}
    PREFIX              ${BUILDEM_DIR}
    GIT_REPOSITORY      ${emdata_URL}
    UPDATE_COMMAND      ""
    PATCH_COMMAND       ""
    CONFIGURE_COMMAND   ""
    BUILD_COMMAND       ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} -DBUILDEM_DIR=${BUILDEM_DIR} ${emdata_SRC_DIR}
    TEST_COMMAND        ""
    INSTALL_COMMAND     ""
)

Remove encoder test for now

Remove encoder test for now


# Contact: Simon Rit <simon.rit@creatis.insa-lyon.fr>
itk_fetch_module(RTK
    "Reconstruction Toolkit (RTK) http://www.openrtk.org/"
  GIT_REPOSITORY ${git_protocol}://github.com/SimonRit/RTK.git
  GIT_TAG 3fc00efadef8324aba31f77390c3e562f9af5147
)

# Contact: Simon Rit <simon.rit@creatis.insa-lyon.fr>
itk_fetch_module(RTK
    "Reconstruction Toolkit (RTK) http://www.openrtk.org/"
  GIT_REPOSITORY ${git_protocol}://github.com/SimonRit/RTK.git
  GIT_TAG f0451dafae314c142d2ead540b8fde5f1f8a51d8
)

Update RTK for future proofing.

ENH: Update RTK for future proofing.

Using explicit typecasts for future-proofing
enums.  RTK treats enum values as integers and
enumerations interchangeably for pushing onto
a stack of integers.  Using explicit static_casts
makes code future proof when enum class is used.


vtk_module(vtkFiltersParallelImaging
  GROUPS
    Imaging
  DEPENDS
    vtkImagingCore
    vtkFiltersImaging
    vtkFiltersParallel
    vtkParallelCore
  )

vtk_module(vtkFiltersParallelImaging
  DEPENDS
    vtkImagingCore
    vtkFiltersImaging
    vtkFiltersParallel
    vtkParallelCore
  )

Remove FiltersParallelImaging from Imaging group

This was causing MPI to be brought in when enabling the Imaging group.

Change-Id: I7cec2e0cf013499449a6ad4cdac5b8f0b44a187e


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

set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} test-stressgui)

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

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

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

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

Disable test-stressproof for the time being


/* Define if you have valgrind.h installed */
#cmakedefine HAVE_VALGRIND_H 1

/* Define if you have xmms libraries and header files. */
#cmakedefine HAVE_XMMS 1

/* Define to compile with GSM SMS support */
/* #undef INCLUDE_SMSGSM */

/* TODO */
/* #undef HAVE_XSHM */

/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1

/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if your processor stores words with the most significant byte
   first (like Motorola and SPARC, unlike Intel and VAX). */
#cmakedefine WORDS_BIGENDIAN ${CMAKE_WORDS_BIGENDIAN}

/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG ${SIZEOF_LONG}

/* The size of a `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG ${SIZEOF_UNSIGNED_LONG}

/* Define to 1 if you want libv4l support */
#cmakedefine HAVE_LIBV4L2 1

#cmakedefine HAVE_V4L 1

/* Define if you have valgrind.h installed */
#cmakedefine HAVE_VALGRIND_H 1

/* Define if you have xmms libraries and header files. */
#cmakedefine HAVE_XMMS 1

/* Define to compile with GSM SMS support */
/* #undef INCLUDE_SMSGSM */

/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1

/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if your processor stores words with the most significant byte
   first (like Motorola and SPARC, unlike Intel and VAX). */
#cmakedefine WORDS_BIGENDIAN ${CMAKE_WORDS_BIGENDIAN}

/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG ${SIZEOF_LONG}

/* The size of a `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG ${SIZEOF_UNSIGNED_LONG}

/* Define to 1 if you want libv4l support */
#cmakedefine HAVE_LIBV4L2 1

#cmakedefine HAVE_V4L 1

Remove HAVE_XSHM because it is not used

Remove HAVE_XSHM because it is not used


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

set(proj GTest)

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

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

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

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

sitkSourceDownloadDependency(${proj})

set(GTEST_ROOT ${GTEST_source_dir})

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

set(proj GTest)

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

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

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

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

sitkSourceDownloadDependency(${proj})

set(GTEST_ROOT ${GTEST_source_dir})

Update superbuild googletest version to 1.11


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

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

# "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 "51da5cf23ce7f05ff8466193dbe76758c4668c69")

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

Update FW: disparity (U8) aligning to RGB works. TODO depth and subpixel (U16)


# Find, include and link Python
# Find is already called in the top-level CMakeLists

macro (FIND_PYTHON)

  if (UNIX)
    find_package (PkgConfig)
    pkg_search_module (python python)
    if (NOT python_INCLUDE_DIRS AND NOT python_LIBRARIES)
      message (FATAL_ERROR "Python not found by pkg-config")
  endif()

endmacro (FIND_PYTHON)

macro (INCLUDE_PYTHON)

  if (MSVC)
    include_directories (${REX_DEP_PATH}/Python/include)
    link_directories (${REX_DEP_PATH}/Python/lib)
  else()
    include_directories(${python_INCLUDE_DIRS})
    link_directories(${python_LIBRARY_DIRS})
  endif (MSVC)

endmacro (INCLUDE_PYTHON)

macro (LINK_PYTHON)
  if (MSVC)
    if(PYTHON_FORCE_RELEASE_VERSION)
      target_link_libraries (${TARGET_NAME}
	#			debug Python26
	#			optimized Python26)
	debug Python25
	optimized Python25)
    else(PYTHON_FORCE_RELEASE_VERSION)
      target_link_libraries (${TARGET_NAME}
	#			debug Python26_d
	#			optimized Python26)
	debug Python25_d
	optimized Python25)
    endif(PYTHON_FORCE_RELEASE_VERSION)
  else()
    target_link_libraries (${TARGET_NAME} ${python_LIBRARIES})
  endif (MSVC)

endmacro (LINK_PYTHON)

# Find, include and link Python
# Find is already called in the top-level CMakeLists

macro (FIND_PYTHON)

  if (UNIX)
    find_package(PythonLibs)
    if (NOT PYTHON_LIBRARIES OR NOT_PYTHON_INCLUDE_PATH)
      message (FATAL_ERROR "Python not found by pkg-config")
    endif()
  endif()

endmacro (FIND_PYTHON)

macro (INCLUDE_PYTHON)

  if (MSVC)
    include_directories (${REX_DEP_PATH}/Python/include)
    link_directories (${REX_DEP_PATH}/Python/lib)
  else()
    include_directories(${PYTHON_INCLUDE_PATH})
    link_directories(${PYTHON_LIBRARY_DIR})
  endif (MSVC)

endmacro (INCLUDE_PYTHON)

macro (LINK_PYTHON)
  if (MSVC)
    if(PYTHON_FORCE_RELEASE_VERSION)
      target_link_libraries (${TARGET_NAME}
	#			debug Python26
	#			optimized Python26)
	debug Python25
	optimized Python25)
    else(PYTHON_FORCE_RELEASE_VERSION)
      target_link_libraries (${TARGET_NAME}
	#			debug Python26_d
	#			optimized Python26)
	debug Python25_d
	optimized Python25)
    endif(PYTHON_FORCE_RELEASE_VERSION)
  else()
    target_link_libraries (${TARGET_NAME} ${PYTHON_LIBRARIES})
  endif (MSVC)

endmacro (LINK_PYTHON)

Fix which corrects that Linux founds needed python package.

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1016 5b2332b8-efa3-11de-8684-7d64432d61a3


macro(buildCurl)
  include(ExternalProject)

  set(SECURE_TRANSPORT_FLAGS "")
  if(APPLE)
    set(SECURE_TRANSPORT_FLAGS "--with-secure-transport")
  endif()

  ExternalProject_Add(BuildCurlBundled
      SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/curl"
      PREFIX "${CMAKE_BINARY_DIR}/curl"
      BUILD_IN_SOURCE 1
      CONFIGURE_COMMAND bash -c "autoreconf -i && ./configure  --prefix=${CMAKE_CURRENT_BINARY_DIR}/curl --disable-ldap --disable-ldaps ${SECURE_TRANSPORT_FLAGS} && ${CMAKE_SOURCE_DIR}/patch-curl-clock-gettime.sh"
      BUILD_COMMAND ${MAKE}
  )

  add_library(libcurl STATIC IMPORTED)
  set_property(TARGET libcurl PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/curl/lib/libcurl.a)
  add_dependencies(libcurl BuildCurlBundled)

  # Replace with the following when possible:
  # target_include_directories(libcurl INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/deps/curl/include)
  set_property(TARGET libcurl APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/deps/curl/include)
endmacro()

macro(buildCurl)
  include(ExternalProject)

  set(SECURE_TRANSPORT_FLAGS "")
  if(APPLE)
    set(SECURE_TRANSPORT_FLAGS "--with-secure-transport")
  endif()

  ExternalProject_Add(BuildCurlBundled
      SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/curl"
      PREFIX "${CMAKE_BINARY_DIR}/curl"
      BUILD_IN_SOURCE 1
      CONFIGURE_COMMAND bash -c "autoreconf -i && ./configure  --prefix=${CMAKE_CURRENT_BINARY_DIR}/curl --disable-ftp --disable-ldap --disable-ldaps --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --without-libidn2 ${SECURE_TRANSPORT_FLAGS} && ${CMAKE_SOURCE_DIR}/patch-curl-clock-gettime.sh"
      BUILD_COMMAND ${MAKE}
  )

  add_library(libcurl STATIC IMPORTED)
  set_property(TARGET libcurl PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/curl/lib/libcurl.a)
  add_dependencies(libcurl BuildCurlBundled)

  # Replace with the following when possible:
  # target_include_directories(libcurl INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/deps/curl/include)
  set_property(TARGET libcurl APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/deps/curl/include)
endmacro()

Disable many weird libcurl features when bundling


# Creates a FROM->TO symlink during installation
function(INSTALL_SYMLINK FROM TO COMPONENT)
  if (MSVC)
    install(CODE
      "get_filename_component(FROM_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${FROM}
         ABSOLUTE)
       file(TO_NATIVE_PATH \${FROM_ABSOLUTE} FROM_ABSOLUTE)
       file(TO_NATIVE_PATH \${CMAKE_INSTALL_PREFIX}/${TO} TO)
       message(\"mklink /j \${TO} \${FROM_ABSOLUTE}\")
       execute_process(COMMAND mklink /j \${TO} \${FROM_ABSOLUTE})"
      COMPONENT "${COMPONENT}")
  else()
    install(CODE
      "execute_process(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/${TO})
       get_filename_component(FROM_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${FROM}
         ABSOLUTE)
       execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
         \${FROM_ABSOLUTE} ${CMAKE_INSTALL_PREFIX}/${TO})"
      COMPONENT "${COMPONENT}")
  endif()
endfunction()

# Creates a FROM->TO symlink during installation
function(INSTALL_SYMLINK)
  cmake_parse_arguments(THIS "" "" "FROM;TO;WORKING_DIRECTORY;COMPONENT" ${ARGN})
  if(MSVC)
    install(CODE
      "message(\"mklink /j \${THIS_TO} \${THIS_FROM}\")
       execute_process(COMMAND mklink /j \${THIS_TO} \${THIS_FROM}
                       WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})"
      COMPONENT "${THIS_COMPONENT}")
  else()
    install(CODE
      "execute_process(COMMAND rm -f ${THIS_TO}
                       WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})
       execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${THIS_FROM} ${THIS_TO}
                       WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})"
      COMPONENT "${THIS_COMPONENT}")
  endif()
endfunction()

Install symlinks relative, not absolute

Install symlinks relative, not absolute

This is necessary to fix artifact copy in Jenkins. Besides, the
symlinking on Unix for the different SO versions of libraries
is also based on relative symlinks.


# 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


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

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

# Project Home Page
SET (PROJECT_URL "http://www.arl.hpc.mil/ice/")

# Dart server configuration
SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/xdmf-rollup-dashboard.sh")
SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/Xdmf/")
SET (CVS_WEB_CVSROOT "Xdmf")
#SET (DOXYGEN_URL "http://${DROP_SITE}/" )
#SET (GNATS_WEB_URL "http://${DROP_SITE}/")

# copy over the testing logo
#CONFIGURE_FILE(${PARAVIEW_SOURCE_DIR}/Web/Art/ParaViewLogo.gif ${PARAVIEW_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)

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

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

# Project Home Page
SET (PROJECT_URL "http://www.arl.hpc.mil/ice/")

# Dart server configuration
SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/xdmf-rollup-dashboard.sh")
SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/Xdmf/")
SET (CVS_WEB_CVSROOT "Xdmf")
#SET (DOXYGEN_URL "http://${DROP_SITE}/" )
#SET (GNATS_WEB_URL "http://${DROP_SITE}/")

# copy over the testing logo
#CONFIGURE_FILE(${PARAVIEW_SOURCE_DIR}/Web/Art/ParaViewLogo.gif ${PARAVIEW_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)

Add support for http submit

ENH: Add support for http submit


set(MITK_CONFIG_PACKAGES
  ACVD
  QT
  BLUEBERRY
)

set(MITK_CONFIG_PLUGINS
  org.mitk.gui.qt.datamanager
  org.mitk.gui.qt.stdmultiwidgeteditor
  org.mitk.gui.qt.dicom
  org.mitk.gui.qt.imagenavigator
  org.mitk.gui.qt.measurementtoolbox
  org.mitk.gui.qt.properties
  org.mitk.gui.qt.segmentation
  org.mitk.gui.qt.volumevisualization
  org.mitk.planarfigure
  org.mitk.gui.qt.moviemaker
  org.mitk.gui.qt.pointsetinteraction
  org.mitk.gui.qt.registration
  org.mitk.gui.qt.remeshing
  org.mitk.gui.qt.viewnavigator
  org.mitk.gui.qt.imagecropper
)

set(MITK_CONFIG_PACKAGES
  ACVD
  QT
  BLUEBERRY
)

set(MITK_CONFIG_PLUGINS
  org.mitk.gui.qt.datamanager
  org.mitk.gui.qt.stdmultiwidgeteditor
  org.mitk.gui.qt.dicom
  org.mitk.gui.qt.imagenavigator
  org.mitk.gui.qt.measurementtoolbox
  org.mitk.gui.qt.properties
  org.mitk.gui.qt.segmentation
  org.mitk.gui.qt.volumevisualization
  org.mitk.planarfigure
  org.mitk.gui.qt.moviemaker
  org.mitk.gui.qt.pointsetinteraction
  org.mitk.gui.qt.remeshing
  org.mitk.gui.qt.viewnavigator
  org.mitk.gui.qt.imagecropper
)

Remove registration from default and release configuration


#/// @file   TbagObjectProtobufPython.cmake
#/// @brief  Google-protocol-buffers python object module.
#/// @author zer0
#/// @date   2016-06-01

if (NOT PROTOBUF_FOUND)
    find_package (TbagProtobuf)
endif ()

if (PROTOBUF_FOUND)
    tbag_protobuf__generate_py (__proto_srcs __proto_headers "${TBAG_OBJECT_CONST_SOURCES}")

    #add_custom_target ("${TBAG_PROJECT_CONST_NAME}_pythyon" ALL DEPENDS ${__proto_srcs})
    add_custom_target ("${TBAG_PROJECT_CONST_NAME}_${__proto_srcs}" ALL DEPENDS ${__proto_srcs})
    list (APPEND TBAG_OBJECT_DEPENDENCIES ${TBAG_PROJECT_CONST_NAME}_python)
endif ()

#/// @file   TbagObjectProtobufPython.cmake
#/// @brief  Google-protocol-buffers python object module.
#/// @author zer0
#/// @date   2016-06-01

if (NOT PROTOBUF_FOUND)
    find_package (TbagProtobuf)
endif ()

if (PROTOBUF_FOUND)
    tbag_protobuf__generate_py (__proto_srcs __proto_headers "${TBAG_OBJECT_CONST_SOURCES}")

    string (MD5 __proto_srcs_hash "${__proto_srcs}")
    set (__protobuf_python_target_name "${TBAG_PROJECT_CONST_NAME}_protobuf_python_${__proto_srcs_hash}")
    add_custom_target ("${__protobuf_python_target_name}" ALL DEPENDS ${__proto_srcs})
    list (APPEND TBAG_OBJECT_DEPENDENCIES ${TBAG_PROJECT_CONST_NAME}_python)
endif ()

Fix the error of 'Target names may not contain a slash'.


# Copyright © 2012 Lénaïc Bagnères, hnc@singularity.fr

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

# Try to find the hnc library

# HNC_FOUND       - System has hnc lib
# HNC_INCLUDE_DIR - The hnc include directory

if (HNC_INCLUDE_DIR)
	# Already in cache, be silent
	set(HNC_FIND_QUIETLY TRUE)
endif()

find_path(HNC_INCLUDE_DIR NAMES hnc/hnc.hpp)

if (HNC_INCLUDE_DIR)
	message(STATUS "Library hnc found =) ${HNC_INCLUDE_DIR}")
else()
	message(STATUS "Library hnc not found =(")
endif()

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HNC DEFAULT_MSG HNC_INCLUDE_DIR)

mark_as_advanced(HNC_INCLUDE_DIR)

# Copyright © 2012 Lénaïc Bagnères, hnc@singularity.fr

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

# Try to find the hnc library

# HNC_FOUND       - System has hnc lib
# HNC_INCLUDE_DIR - The hnc include directory

if (HNC_INCLUDE_DIR)
	# Already in cache, be silent
	set(HNC_FIND_QUIETLY TRUE)
endif()

find_path(HNC_INCLUDE_DIR NAMES hnc/hnc.hpp)

if (HNC_INCLUDE_DIR)
	message(STATUS "Library hnc found =) ${HNC_INCLUDE_DIR}")
else()
	message(STATUS "Library hnc not found :(")
endif()

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HNC DEFAULT_MSG HNC_INCLUDE_DIR)

mark_as_advanced(HNC_INCLUDE_DIR)

Update smiley in hnc cmake module

Update smiley in hnc cmake module


# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(SphinxExamples
  "This module builds the examples found at http://itk.org/ITKExamples/"
  GIT_REPOSITORY ${git_protocol}://itk.org/ITKExamples.git
  # 2015-07-09
  GIT_TAG 2bc08a52aa0437da776cc777157f25b7b525b46f
  )

# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(SphinxExamples
  "This module builds the examples found at http://itk.org/ITKExamples/"
  GIT_REPOSITORY http://itk.org/ITKExamples.git
  # 2016-01-27
  GIT_TAG 3dfb50ce56c79cbc3f889d402ce1a920c1663a0f
  )

DOC: Update the SphinxExamples Remote Module.

Change-Id: I011a281306f90977f09be2200247a05225fe80b2


SET (CMAKE_C_COMPILER "clang")
SET (CMAKE_CXX_COMPILER "clang++")

SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wshadow -Wformat=2 -Wwrite-strings -std=c99 -pedantic" CACHE STRING "" FORCE)

SET(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb" CACHE STRING "" FORCE)

IF(NOT CMAKE_BUILD_TYPE )
  SET(CMAKE_BUILD_TYPE RELEASE CACHE STRING "" FORCE )
ENDIF()

SET(CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)

MESSAGE (STATUS "Found CLANG toolchain")

SET (CMAKE_C_COMPILER "clang")
SET (CMAKE_CXX_COMPILER "clang++")

SET(CMAKE_C_FLAGS "-pipe -Weverything -std=c99 -pedantic" CACHE STRING "" FORCE)

SET(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb" CACHE STRING "" FORCE)

IF(NOT CMAKE_BUILD_TYPE )
  SET(CMAKE_BUILD_TYPE RELEASE CACHE STRING "" FORCE )
ENDIF()

SET(CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)

MESSAGE (STATUS "Found CLANG toolchain")

Check for errors with -Weverything

Check for errors with -Weverything


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

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

  See http://insight-journal.org/browse/publication/85
      https://hdl.handle.net/1926/188"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git
  GIT_TAG 6218266e76d00439bbad32d1d3acec069442aeab
  )

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

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

  See http://insight-journal.org/browse/publication/85
      https://hdl.handle.net/1926/188"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git
  GIT_TAG 9b5b17a462e88478f3ea780b805b6a3a5e10dee5
  )

BUG: Address memory leak, remove NumPy build dep in BridgeNumPy

This addresses a memory leak, reported on the mailing list, and remove the
build dependency on NumPy as well as other improvements.

git shortlog --no-merges 6218266e7..9b5b17a462e8

  HYUN JAE KANG (5):
        ENH: Update the module of ITKBridgeNumPy
        ENH : Add itemset function to itkndarray class
        BUG. Fixed inappropriate argument number of _GetArrayFromImage
        STYLE: Removed debug messages.
        ENH: Update itkPyBuffer.py

  Matt McCormick (13):
        ENH: Build the module externally
        ENH: Add CTestConfig.cmake
        ENH: Add Docker testing
        ENH: Add CircleCI configuration
        STYLE: Fix KWStyle test
        BUG: Address memory leak in GetImageFromArray
        BUG: Address CPython API exception raising
        BUG: Fix itkPyBufferTest name
        BUG: Do not add tests with ITK < 4.11
        BUG: Update testing ITK version to in development 4.11
        ENH: Add Docker image caching in CircleCI
        ENH: Use local Debian mirror to improve package download reliability
        DOC: Update README

Change-Id: I1700fa0d95e418c3d2f86e9c676df9c924402dba


# Help CMake find recent Boost MSVC binaries without manual configuration.
if(MSVC AND (NOT Boost_INCLUDE_DIR OR NOT Boost_LIBRARY_DIR))
    math(EXPR _vs_ver "${MSVC_VERSION} / 100 - 6")
    if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
        set(_libdir "lib64-msvc-${_vs_ver}.0")
    else()
        set(_libdir "lib32-msvc-${_vs_ver}.0")
    endif()

    set(_haslibs)
    if(EXISTS "c:/local")
        file(GLOB _possibilities "c:/local/boost*")
        list(REVERSE _possibilities)
        foreach(DIR ${_possibilities})
            if(EXISTS "${DIR}/${_libdir}")
                list(APPEND _haslibs "${DIR}")
            endif()
        endforeach()
        if(_haslibs)
            list(APPEND CMAKE_PREFIX_PATH ${_haslibs})
            find_package(Boost QUIET)
            if(Boost_FOUND AND NOT Boost_LIBRARY_DIR)
                set(BOOST_ROOT "${Boost_INCLUDE_DIR}")
                set(BOOST_LIBRARYDIR "${Boost_INCLUDE_DIR}/${_libdir}")
            endif()
        endif()
    endif()
endif()

# Help CMake find recent Boost MSVC binaries without manual configuration.
if(MSVC AND (NOT Boost_INCLUDE_DIR OR NOT Boost_LIBRARY_DIR))
    math(EXPR _vs_ver "${MSVC_VERSION} / 100 - 6")
    if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
        set(_libdir "lib64-msvc-${_vs_ver}.0")
    else()
        set(_libdir "lib32-msvc-${_vs_ver}.0")
    endif()

    set(_haslibs)
    if(EXISTS "c:/local")
        file(GLOB _possibilities "c:/local/boost*")
        list(REVERSE _possibilities)
        foreach(DIR ${_possibilities})
            if(EXISTS "${DIR}/${_libdir}")
                list(APPEND _haslibs "${DIR}")
            endif()
        endforeach()
        if(_haslibs)
            list(APPEND CMAKE_PREFIX_PATH ${_haslibs})
            find_package(Boost QUIET)
            if(Boost_FOUND AND NOT Boost_LIBRARY_DIR)
                set(BOOST_ROOT "${Boost_INCLUDE_DIR}" CACHE PATH "")
                set(BOOST_LIBRARYDIR "${Boost_INCLUDE_DIR}/${_libdir}" CACHE PATH "")
            endif()
        endif()
    endif()
endif()

Improve boost helper for reconfigures.

Improve boost helper for reconfigures.


set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "")

set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "")
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(LLVM_ENABLE_MODULES ON CACHE BOOL "")

# Release builds set these explicitly:
#set(LLDB_VERSION_MAJOR 9999 CACHE STRING "")
#set(LLDB_VERSION_MINOR 9 CACHE STRING "")
#set(LLDB_VERSION_PATCH 9 CACHE STRING "")
#set(LLDB_VERSION_SUFFIX git CACHE STRING "")

set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "")

set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "")
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
# Unfortunately this is blocked on Swift being properly modularized.
set(LLVM_ENABLE_MODULES OFF CACHE BOOL "")

# Release builds set these explicitly:
#set(LLDB_VERSION_MAJOR 9999 CACHE STRING "")
#set(LLDB_VERSION_MINOR 9 CACHE STRING "")
#set(LLDB_VERSION_PATCH 9 CACHE STRING "")
#set(LLDB_VERSION_SUFFIX git CACHE STRING "")

Disable building swift-lldb with modules until Swift is modularized.


set(CPACK_PACKAGE_VENDOR "Ultimaker")
set(CPACK_PACKAGE_CONTACT "Arjen Hiemstra <a.hiemstra@ultimaker.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cura Engine")
set(CPACK_PACKAGE_VERSION "15.05.90")
set(CPACK_GENERATOR "DEB")
if(NOT DEFINED CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
  execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")

set(DEB_DEPENDS
    "arcus (>= 15.05.90)"
    "protobuf (>= 3.0.0)"
    "libstdc++6 (>= 4.9.0)"
    "libgcc1 (>= 4.9.0)"
)
string(REPLACE ";" ", " DEB_DEPENDS "${DEB_DEPENDS}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS})

include(CPack)

set(CPACK_PACKAGE_VENDOR "Ultimaker")
set(CPACK_PACKAGE_CONTACT "Arjen Hiemstra <a.hiemstra@ultimaker.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cura Engine")
set(CPACK_PACKAGE_VERSION "15.05.90" CACHE STRING "Cura Engine Package Version")
set(CPACK_GENERATOR "DEB")
if(NOT DEFINED CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
  execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")

set(MINIMAL_ARCUS_VERSION "15.05.90" CACHE STRING "Minimal Arcus Version")

set(DEB_DEPENDS
    "arcus (>= ${MINIMAL_ARCUS_VERSION})"
    "protobuf (>= 3.0.0)"
    "libstdc++6 (>= 4.9.0)"
    "libgcc1 (>= 4.9.0)"
)
string(REPLACE ";" ", " DEB_DEPENDS "${DEB_DEPENDS}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS})

include(CPack)

Package version and arcus version tweak

Package version and arcus version tweak


message(STATUS "Use external libusb")
include(ExternalProject)

ExternalProject_Add(
    libusb

    GIT_REPOSITORY "https://github.com/libusb/libusb.git"
    GIT_TAG "v1.0.22"

    UPDATE_COMMAND ${CMAKE_COMMAND} -E copy
            ${CMAKE_CURRENT_SOURCE_DIR}/third-party/libusb/CMakeLists.txt
            ${CMAKE_CURRENT_BINARY_DIR}/third-party/libusb/CMakeLists.txt
    PATCH_COMMAND ""

    SOURCE_DIR "third-party/libusb/"
    CMAKE_ARGS -DCMAKE_CXX_STANDARD_LIBRARIES=${CMAKE_CXX_STANDARD_LIBRARIES}
            -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
            -DANDROID_ABI=${ANDROID_ABI}
            -DANDROID_STL=${ANDROID_STL}
            -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/libusb_install
    TEST_COMMAND ""
)

set(LIBUSB1_LIBRARY_DIRS ${CMAKE_CURRENT_BINARY_DIR}/libusb_install/lib)
link_directories(${LIBUSB1_LIBRARY_DIRS})

set(LIBUSB1_LIBRARIES usb)
set(USE_EXTERNAL_USB ON)
set(LIBUSB_LOCAL_INCLUDE_PATH ${CMAKE_CURRENT_BINARY_DIR}/third-party/libusb/libusb)

message(STATUS "Use external libusb")
include(ExternalProject)

ExternalProject_Add(
    libusb

    GIT_REPOSITORY "https://github.com/libusb/libusb.git"
    GIT_TAG "2a7372db54094a406a755f0b8548b614ba8c78ec" # "v1.0.22" + Mac get_device_list hang fix

    UPDATE_COMMAND ${CMAKE_COMMAND} -E copy
            ${CMAKE_CURRENT_SOURCE_DIR}/third-party/libusb/CMakeLists.txt
            ${CMAKE_CURRENT_BINARY_DIR}/third-party/libusb/CMakeLists.txt
    PATCH_COMMAND ""

    SOURCE_DIR "third-party/libusb/"
    CMAKE_ARGS -DCMAKE_CXX_STANDARD_LIBRARIES=${CMAKE_CXX_STANDARD_LIBRARIES}
            -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
            -DANDROID_ABI=${ANDROID_ABI}
            -DANDROID_STL=${ANDROID_STL}
            -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/libusb_install
    TEST_COMMAND ""
)

set(LIBUSB1_LIBRARY_DIRS ${CMAKE_CURRENT_BINARY_DIR}/libusb_install/lib)
link_directories(${LIBUSB1_LIBRARY_DIRS})

set(LIBUSB1_LIBRARIES usb)
set(USE_EXTERNAL_USB ON)
set(LIBUSB_LOCAL_INCLUDE_PATH ${CMAKE_CURRENT_BINARY_DIR}/third-party/libusb/libusb)

Update libusb to fix get_device_list hang


set(DOCUMENTATION "This Module contains helper classes used for the Testing
infrastructure of ITK. As an application developer you should not normally need
any of these classes. However, they are essential for the quality control
system supporting ITK.")

itk_module(ITKTestKernel
  DEPENDS
    ITKIOPNG
    ITKIOMeta
    ITKIOTIFF
    ITKIOBMP
    ITKIOVTK
    ITKIOJPEG
    ITKIONRRD
    ITKIOGDCM
    ITKIOGIPL
    ITKIONIFTI
    ITKKWSys
  DESCRIPTION
    "${DOCUMENTATION}"
)

set(DOCUMENTATION "This Module contains helper classes used for the Testing
infrastructure of ITK. As an application developer you should not normally need
any of these classes. However, they are essential for the quality control
system supporting ITK.")

itk_module(ITKTestKernel
  DEPENDS
    ITKIOBioRad
    ITKIOBMP
    ITKIOGDCM
    ITKIOGIPL
    ITKIOJPEG
    ITKIOLSM
    ITKIOMeta
    ITKIONIFTI
    ITKIONRRD
    ITKIOPNG
    ITKIOStimulate
    ITKIOTIFF
    ITKIOVTK
    ITKKWSys
  DESCRIPTION
    "${DOCUMENTATION}"
)

BUG: Add missing module dependencies for ITKTestKernel.

This arise from itkTestDriverIncludeBuiltInIOFactories.h.

Change-Id: Ie10f566f3b8352ddcce41969f717c313013ec4e5


set(CMAKE_SYSTEM_NAME Linux)

set(CMAKE_SYSTEM_PROCESSOR ppc64le)

set(CMAKE_C_COMPILER powerpc64le-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER powerpc64le-linux-gnu-g++)

set(CMAKE_SYSTEM_NAME Linux)

# Linux and GNU have different names for little-endian 64-bit PowerPC.
#
# Linux calls it "ppc64le"[1], and that's what CMake ends up using for
# CMAKE_SYSTEM_PROCESSOR since it's set using `uname -r`[2] which comes from
# the kernel.
#
# GNU calls it "powerpc64le"[3], so we use that to name this toolchain. It's
# also the fragment that appears in the toolchain binary names and the name of
# the package we used to install the cross-compile toolchain[4].
#
# [1] https://git.io/JeahC
# [2] https://git.io/Jeahc
# [3] https://git.io/Jeaho
# [4] https://packages.debian.org/stable/gcc-powerpc64le-linux-gnu
set(CMAKE_SYSTEM_PROCESSOR ppc64le)

set(CMAKE_C_COMPILER powerpc64le-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER powerpc64le-linux-gnu-g++)

Add a comment explaining ppc64le vs. powerpc64le


# This script returns the current date in ISO format
#
# YYYY-MM-DD
#
MACRO (TODAY RESULT)
    IF (WIN32)
        EXECUTE_PROCESS(COMMAND "cmd" " /C date +%Y-%m-%d" OUTPUT_VARIABLE ${RESULT})
        string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" ${RESULT} ${${RESULT}})
    ELSEIF(UNIX)
        if (DEFINED ENV{SOURCE_DATE_EPOCH})
            EXECUTE_PROCESS(COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}" "+%Y-%m-%d" OUTPUT_VARIABLE ${RESULT})
        else ()
            EXECUTE_PROCESS(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE ${RESULT})
        endif ()
        string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" ${RESULT} ${${RESULT}})
    ELSE (WIN32)
        MESSAGE(SEND_ERROR "date not implemented")
        SET(${RESULT} 000000)
    ENDIF (WIN32)
ENDMACRO (TODAY)

# This script returns the current date in ISO format
#
# YYYY-MM-DD
#
MACRO (TODAY RESULT)
    if (DEFINED ENV{SOURCE_DATE_EPOCH} AND NOT WIN32)
        EXECUTE_PROCESS(COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}" "+%Y-%m-%d"
                        OUTPUT_VARIABLE ${RESULT} OUTPUT_STRIP_TRAILING_WHITESPACE)
    else()
        STRING(TIMESTAMP ${RESULT} "%Y-%m-%d" UTC)
    endif()
ENDMACRO (TODAY)

Use CMake TIMESTAMP, remove newline from TODAY


set(_DISCOVER_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/../Scripts/CppUTestBuildTimeDiscoverTests.cmake")

# Create target to discover tests
function (cpputest_buildtime_discover_tests tgt)
  add_custom_command(
    TARGET ${tgt} POST_BUILD
    COMMAND
      ${CMAKE_COMMAND}
      -D "TESTS_DETAILED:BOOL=${TESTS_DETAILED}"
      -D "EXECUTABLE=$<TARGET_FILE:${tgt}>"
      -D "EMULATOR=$<TARGET_PROPERTY:${tgt},CROSSCOMPILING_EMULATOR>"
      -P "${_DISCOVER_SCRIPT}"
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    COMMENT "Discovering Tests in ${tgt}"
    VERBATIM
  )
endfunction ()

set(_DISCOVER_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/../Scripts/CppUTestBuildTimeDiscoverTests.cmake")

# Create target to discover tests
function (cpputest_buildtime_discover_tests tgt)
  if(NOT TARGET ${tgt})
    message(FATAL_ERROR
      "Cannot discover tests for target \"${tgt}\" "
      "which is not built by this project."
    )
  endif()

  get_property(target_type
    TARGET ${tgt}
    PROPERTY TYPE
  )
  if(NOT target_type STREQUAL "EXECUTABLE")
    message(FATAL_ERROR
      "Cannot discover tests for target \"${tgt}\" "
      "which is not an executable."
    )
  endif()

  add_custom_command(
    TARGET ${tgt} POST_BUILD
    COMMAND
      ${CMAKE_COMMAND}
      -D "TESTS_DETAILED:BOOL=${TESTS_DETAILED}"
      -D "EXECUTABLE=$<TARGET_FILE:${tgt}>"
      -D "EMULATOR=$<TARGET_PROPERTY:${tgt},CROSSCOMPILING_EMULATOR>"
      -P "${_DISCOVER_SCRIPT}"
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    COMMENT "Discovering Tests in ${tgt}"
    VERBATIM
  )
endfunction ()

Add error handling to discovery module

Add error handling to discovery module


<?xml version="1.0" encoding="utf-8"?>
<!--
     This file contains all common entities.
     tnt.ent is built by cmake from tnt.ent.cmake.
-->
<!ENTITY tnt_version "@TARANTOOL_VERSION@">
<!-- Include the standard ISO 8879 publishing entities -->
<!ENTITY % isopub PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN//XML"
                         "http://www.w3.org/2003/entities/iso8879/isopub.ent">
%isopub;
<!--
  vim: syntax=dtd
-->

<?xml version="1.0" encoding="utf-8"?>
<!--
     This file contains all common entities.
     tnt.ent is built by cmake from tnt.ent.cmake.
-->
<!ENTITY tnt_version "@PACKAGE_VERSION@">
<!-- Include the standard ISO 8879 publishing entities -->
<!ENTITY % isopub PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN//XML"
                         "http://www.w3.org/2003/entities/iso8879/isopub.ent">
%isopub;
<!--
  vim: syntax=dtd
-->

Fix the version in the user guide.

Fix the version in the user guide.


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

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

Add the CTK external library dirs to the link dirs.


include(CMakeFindDependencyMacro)

find_dependency(range-v3 0.10.0)

include(${CMAKE_CURRENT_LIST_DIR}/jegp-targets.cmake)

add_library(jegp::jegp INTERFACE IMPORTED)
target_link_libraries(jegp::jegp INTERFACE jegp)

Add missing alias for installed builds

Add missing alias for installed builds


# /test/CreateTargetForUnusedFunctionCheckWarnOnly.cmake
# Adds some sources to the global unused function check properties and adds
# checks to a newly created external target, but only for warnings.
#
# See LICENCE.md for Copyright Information.

include (${CPPCHECK_COMMON_UNIVERSAL_CMAKE_DIRECTORY}/CPPCheck.cmake)
include (${CPPCHECK_COMMON_UNIVERSAL_CMAKE_TESTS_DIRECTORY}/CMakeUnit.cmake)

find_program (CPPCHECK_EXECUTABLE cppcheck)

set (SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/FirstSource.cpp)
file (WRITE ${SOURCES} "")

cppcheck_add_to_unused_function_check (global
                                       SOURCES ${SOURCES})

# Put CMAKE_CURRENT_SOURCE_DIR in the global INCLUDES
cppcheck_add_unused_function_check_with_name (global WARN_ONLY)

# /test/CreateTargetForUnusedFunctionCheckWarnOnly.cmake
# Adds some sources to the global unused function check properties and adds
# checks to a newly created external target.
#
# See LICENCE.md for Copyright Information.

include (${CPPCHECK_COMMON_UNIVERSAL_CMAKE_DIRECTORY}/CPPCheck.cmake)
include (${CPPCHECK_COMMON_UNIVERSAL_CMAKE_TESTS_DIRECTORY}/CMakeUnit.cmake)

find_program (CPPCHECK_EXECUTABLE cppcheck)

set (SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/FirstSource.cpp)
file (WRITE ${SOURCES} "")

cppcheck_add_to_unused_function_check (global
                                       SOURCES ${SOURCES})

# Put CMAKE_CURRENT_SOURCE_DIR in the global INCLUDES
cppcheck_add_unused_function_check_with_name (global)

Fix duplication of WARN_ONLY in test where WARN_ONLY is not required.


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

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

# "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 "28471d4d80ffe0dcd9c251544e5da2aecfc2ec48")

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

Add support for 4k/12MP inputs

FeatureTracker: Add support for 4k/12MP inputs


cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

find_package(catkin REQUIRED COMPONENTS
    interactive_markers
    std_msgs
    visualization_msgs
    openrave_catkin
)
catkin_package()

include_directories(
    ${OpenRAVE_INCLUDE_DIRS}
    ${catkin_INCLUDE_DIRS}
)
link_directories(
    ${OpenRAVE_LIBRARY_DIRS}
    ${catkin_LIBRARY_DIRS}
)

add_definitions(--std=c++0x)

openrave_plugin("${PROJECT_NAME}_plugin"
    src/or_interactivemarker_plugin.cpp
    src/or_interactivemarker.cpp
    src/or_conversions.cpp
    src/KinBodyMarker.cpp
    src/KinBodyLinkMarker.cpp
    src/KinBodyJointMarker.cpp
    src/LinkMarker.cpp
    src/JointMarker.cpp
    src/ManipulatorMarker.cpp
)
target_link_libraries("${PROJECT_NAME}_plugin"
    ${catkin_LIBRARIES}
)

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

find_package(catkin REQUIRED COMPONENTS
    interactive_markers
    std_msgs
    visualization_msgs
    openrave_catkin
)
catkin_package()

include_directories(
    ${OpenRAVE_INCLUDE_DIRS}
    ${catkin_INCLUDE_DIRS}
)
link_directories(
    ${OpenRAVE_LIBRARY_DIRS}
    ${catkin_LIBRARY_DIRS}
)

add_definitions(--std=c++0x)

add_library(${PROJECT_NAME} SHARED
    src/or_interactivemarker.cpp
    src/or_conversions.cpp
    src/KinBodyMarker.cpp
    src/KinBodyLinkMarker.cpp
    src/KinBodyJointMarker.cpp
    src/LinkMarker.cpp
    src/JointMarker.cpp
    src/ManipulatorMarker.cpp
)
target_link_libraries(${PROJECT_NAME}
    ${catkin_LIBRARIES}
)

openrave_plugin(${PROJECT_NAME}_plugin
    src/or_interactivemarker_plugin.cpp
)
target_link_libraries(${PROJECT_NAME}_plugin
    ${PROJECT_NAME}
    ${catkin_LIBRARIES}
)

Split core functionality into a library.


#Tweaks for the different package types

if (${CPACK_GENERATOR} STREQUAL "DEB")
   #set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
   set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib (>=1.2.8), czmq (>=1.4.1), apr-accre (>= 1.5.0), apr-util-ACCRE (>=1.5.3), zeromq (=>4.0.1)")
elseif (${CPACK_GENERATOR} STREQUAL "RPM")
   set(CPACK_RPM_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib (>=1.2.8), czmq (>=1.4.1), apr-accre (>= 1.5.0), apr-util-ACCRE (>=1.5.3), zeromq (=>4.0.1)")
   #set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
endif()

#Tweaks for the different package types

if (${CPACK_GENERATOR} STREQUAL "DEB")
   #set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
   set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib1g (>= 1:1.1.4), czmq (>=1.4.1), libapr-accre1 (>= 1.5.0), libapr-accre-util1 (>=1.5.3), libzmq3 (>=4.0.1)")
elseif (${CPACK_GENERATOR} STREQUAL "RPM")
   set(CPACK_RPM_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib (>=1.2.8), czmq (>=1.4.1), apr-accre (>= 1.5.0), apr-util-ACCRE (>=1.5.3), zeromq (=>4.0.1)")
   #set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
endif()

Fix the hardcoded Debian package dependencies


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

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

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_configuration_types)

hunter_add_version(
    PACKAGE_NAME
    Qt
    VERSION
    "5.5.0"
    URL
    "http://download.qt.io/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.gz"
    SHA1
    5a11602e781ef3160965dce9e959b2d4f93e6def
)

hunter_cacheable(Qt)

if(NOT APPLE)
  hunter_configuration_types(Qt CONFIGURATION_TYPES Release)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/qtbase/hunter.cmake")

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

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

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_cmake_args)
include(hunter_configuration_types)

hunter_add_version(
    PACKAGE_NAME
    Qt
    VERSION
    "5.5.0"
    URL
    "http://download.qt.io/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.gz"
    SHA1
    5a11602e781ef3160965dce9e959b2d4f93e6def
)

hunter_cacheable(Qt)

if(NOT APPLE)
  hunter_configuration_types(Qt CONFIGURATION_TYPES Release)
endif()

if(ANDROID)
  # Static variant is not supported: https://bugreports.qt.io/browse/QTBUG-47455
  hunter_cmake_args(Qt CMAKE_ARGS BUILD_SHARED_LIBS=ON)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/qtbase/hunter.cmake")

Add link to the bug

Add link to the bug


# Common configurations

set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")

set(CMAKE_CXX_STANDARD 17)

include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/vendor)
include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/vendor/cget/include)
include_directories(${CMAKE_CURRENT_LIST_DIR}/share)

add_compile_options(-Wall)
add_compile_options(-Werror)
add_compile_options(-O2)
add_compile_options(-fobjc-arc)
add_compile_options(-fmodules)

add_definitions(-DFMT_HEADER_ONLY)

# Version

file(READ ${CMAKE_CURRENT_LIST_DIR}/../version KARABINER_VERSION)
string(STRIP ${KARABINER_VERSION} KARABINER_VERSION)

configure_file (
  ${CMAKE_CURRENT_LIST_DIR}/share/karabiner_version.h.in
  ${CMAKE_CURRENT_LIST_DIR}/share/karabiner_version.h
)

# Variables to avoid string replacement in Info.plist

set(PLIST_EXECUTABLE_NAME "$\{EXECUTABLE_NAME\}")
set(PLIST_MACOSX_DEPLOYMENT_TARGET "$\{MACOSX_DEPLOYMENT_TARGET\}")
set(PLIST_PRODUCT_NAME "$\{PRODUCT_NAME\}")

# Common configurations

set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")

set(CMAKE_CXX_STANDARD 17)

include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/vendor)
include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/vendor/cget/include)
include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/vendor/Karabiner-DriverKit-VirtualHIDDevice/include)
include_directories(${CMAKE_CURRENT_LIST_DIR}/share)

add_compile_options(-Wall)
add_compile_options(-Werror)
add_compile_options(-O2)
add_compile_options(-fobjc-arc)
add_compile_options(-fmodules)

add_definitions(-DFMT_HEADER_ONLY)

# Version

file(READ ${CMAKE_CURRENT_LIST_DIR}/../version KARABINER_VERSION)
string(STRIP ${KARABINER_VERSION} KARABINER_VERSION)

configure_file (
  ${CMAKE_CURRENT_LIST_DIR}/share/karabiner_version.h.in
  ${CMAKE_CURRENT_LIST_DIR}/share/karabiner_version.h
)

# Variables to avoid string replacement in Info.plist

set(PLIST_EXECUTABLE_NAME "$\{EXECUTABLE_NAME\}")
set(PLIST_MACOSX_DEPLOYMENT_TARGET "$\{MACOSX_DEPLOYMENT_TARGET\}")
set(PLIST_PRODUCT_NAME "$\{PRODUCT_NAME\}")

Add Karabiner-DriverKit-VirtualHIDDevice/include to header search path


if(NOT VTK_INSTALL_EXPORT_NAME)
  set(VTK_INSTALL_EXPORT_NAME VTKTargets)
endif()

MACRO(VTK_ADD_LIBRARY name)
  ADD_LIBRARY(${name} ${ARGN})
  SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
ENDMACRO(VTK_ADD_LIBRARY)

MACRO(VTK_ADD_EXECUTABLE name)
  ADD_EXECUTABLE(${name} ${ARGN})
  SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
ENDMACRO(VTK_ADD_EXECUTABLE)

if(NOT VTK_INSTALL_EXPORT_NAME)
  set(VTK_INSTALL_EXPORT_NAME VTKTargets)
endif()

MACRO(VTK_ADD_LIBRARY name)
  add_library(${name} ${ARGN})
  set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
ENDMACRO(VTK_ADD_LIBRARY)

MACRO(VTK_ADD_EXECUTABLE name)
  if(UNIX AND VTK_BUILD_FORWARDING_EXECUTABLES)
    add_executable_with_forwarding(VTK_EXE_SUFFIX ${name} ${ARGN})
    set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
  else()
    add_executable(${name} ${ARGN})
    set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
  endif()
ENDMACRO(VTK_ADD_EXECUTABLE)

Refactor VTK_ADD_EXECUTABLE macro to build forwarding executables.

Only if VTK_BUILD_FORWARDING_EXECUTABLES is ON.

Change-Id: Ie21825f6b44a8dc7a4767de941c2ae025f31446b


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

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

Update IOSTL module for KWStyle test.

STYLE: Update IOSTL module for KWStyle test.

Addresses __ in header guards.

Change-Id: Iee45e8a9e3c6a9a019a1a8ba7130633b305c8edd


## 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(DART_TESTING_TIMEOUT "4800")

set(CTEST_PROJECT_NAME "netcdf-c")
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=netcdf-c")
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 submit to the CDash dashboard:
##   ENABLE_TESTING()
##   INCLUDE(CTest)

set(DART_TESTING_TIMEOUT "4800")

set(CTEST_PROJECT_NAME "netcdf-c")
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=netcdf-stagic")
set(CTEST_DROP_SITE_CDASH TRUE)

Switch back to staging repo for CDash

Switch back to staging repo for CDash


macro(package_add_test TESTNAME)
    add_executable(${TESTNAME}.x ${ARGN})
    target_compile_options(${TESTNAME}.x PRIVATE -Wunused-parameter -Wall)
    target_link_libraries(${TESTNAME}.x JPetFramework Boost::unit_test_framework)
    add_test(NAME ${TESTNAME}.x COMMAND ${TESTNAME}.x "--log_level=ERROR --log_format=XML --raport_level=no")
    set_target_properties(${TESTNAME}.x PROPERTIES FOLDER tests)
    add_dependencies(${TESTNAME}.x link_target)
endmacro()

function(package_add_format_hook)
  set(INSTALL_HOOK ${CMAKE_CURRENT_SOURCE_DIR}/hooks/git-pre-commit-format install)
  execute_process(COMMAND ${INSTALL_HOOK})
endfunction()

macro(package_add_test TESTNAME)
    add_executable(${TESTNAME}.x ${ARGN})
    target_compile_options(${TESTNAME}.x PRIVATE -Wunused-parameter -Wall)
    target_link_libraries(${TESTNAME}.x JPetFramework Boost::unit_test_framework)
    add_test(NAME ${TESTNAME}.x COMMAND ${TESTNAME}.x "--log_level=ERROR --log_format=XML --log_sink=${TESTNAME}.xml --raport_level=no")
    set_target_properties(${TESTNAME}.x PROPERTIES FOLDER tests)
    add_dependencies(${TESTNAME}.x link_target)
endmacro()

function(package_add_format_hook)
  set(INSTALL_HOOK ${CMAKE_CURRENT_SOURCE_DIR}/hooks/git-pre-commit-format install)
  execute_process(COMMAND ${INSTALL_HOOK})
endfunction()

Revert removing saving test log to file

Revert removing saving test log to file