don't use cmake_force_c_compiler from CMake 3.5

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -8,8 +8,6 @@
 # search path for included .cmake files (set this as early as possible, so that
 # indirect includes still use it)
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
-
-include(CMakeForceCompiler)

 set(CMAKE_SYSTEM_NAME mbedOS)
 set(CMAKE_SYSTEM_VERSION 1)
@@ -73,10 +71,16 @@
 set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_MODULE_LINKER_FLAGS_INIT} -Wl,-wrap,main")

 # Set the compiler to ARM-GCC
-include(CMakeForceCompiler)
-
-cmake_force_c_compiler("${ARM_NONE_EABI_GCC}" GNU)
-cmake_force_cxx_compiler("${ARM_NONE_EABI_GPP}" GNU)
+if(CMAKE_VERSION VERSION_LESS "3.5.0")
+    include(CMakeForceCompiler)
+    cmake_force_c_compiler("${ARM_NONE_EABI_GCC}" GNU)
+    cmake_force_cxx_compiler("${ARM_NONE_EABI_GPP}" GNU)
+else()
+    # from 3.5 the force_compiler macro is deprecated: CMake can detect
+    # arm-none-eabi-gcc as being a GNU compiler automatically
+    set(CMAKE_C_COMPILER "${ARM_NONE_EABI_GCC}")
+    set(CMAKE_CXX_COMPILER "${ARM_NONE_EABI_GPP}")
+endif()

 # post-process elf files into .bin files:
 function(yotta_apply_target_rules target_type target_name)


Fix typo in CMake

Fix typo in CMake


ENH: Add bugtracking link

ENH: Add bugtracking link

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -25,7 +25,8 @@
 SET (CVS_WEB_CVSROOT "VTK")
 SET (USE_DOXYGEN "On")
 SET (DOXYGEN_URL "http://www.vtk.org/doc/nightly/html/" )
-SET (GNATS_WEB_URL "http://${DROP_SITE}/")
+SET (GNATS_WEB_URL "http://public.kitware.com/Bug/bug.php")
+SET (USE_GNATS "On")

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


Give all the sources to add_library.

Give all the sources to add_library.

	* build-aux/cmake/modules/Gostai.cmake (gostai_add_library): Here.


Remove -pthread option on Cygwin

Remove -pthread option on Cygwin

--- cmake/BuildSettings.cmake
+++ cmake/BuildSettings.cmake
@@ -4,9 +4,14 @@
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi")
     set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /debug")
 elseif(${UNIX})
-    # These are all required on Xcode 4.5.1 + iOS, because the defaults are no good.
-    set(CMAKE_C_FLAGS "-pthread -g")
-    set(CMAKE_CXX_FLAGS "-pthread -g")
+    if(${CYGWIN})
+        set(CMAKE_C_FLAGS "-g")
+        set(CMAKE_CXX_FLAGS "-g")
+    else()
+        # These are all required on Xcode 4.5.1 + iOS, because the defaults are no good.
+        set(CMAKE_C_FLAGS "-pthread -g")
+        set(CMAKE_CXX_FLAGS "-pthread -g")
+    endif()
     set(CMAKE_C_FLAGS_DEBUG "-O0")
     set(CMAKE_CXX_FLAGS_DEBUG "-O0")
     set(CMAKE_C_FLAGS_RELEASE "-Os")


Updated XLink with libusb kernel detach fix

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4.2-develop"
-    URL "https://github.com/luxonis/XLink/archive/b8a37de143d98cb0beb5393055fcdc9d621765bb.tar.gz"
-    SHA1 "f8f91f0056bc46bba825bfff868136734f8585be"
+    URL "https://github.com/luxonis/XLink/archive/4f8cd1f9b2ab1b44e36c448a4b7d5d80255f5872.tar.gz"
+    SHA1 "fe7aaa8a61ddd7e9030c6c2720978e35a1449fba"
 )

 hunter_config(


datetime now issues a warning instead of a fatal error

--- cmake/core/datetime.cmake
+++ cmake/core/datetime.cmake
@@ -25,6 +25,19 @@

     return("${dt}")
   else()
-    message(FATAL_ERROR "oocmake's datetime is implemented  for your system")
+
+    message(WARNING "oocmake's datetime is not implemented  for your system")
+    set(yyyy)
+    set(MM)
+    set(dd)
+    set(hh)
+    set(mm)
+    set(ss)
+    set(ms)
+
+    map_capture(${dt} yyyy MM dd hh mm ss ms)
+
+    return("${dt}")
+
   endif()
 endfunction()


Make glog depend on gflags

Make glog depend on gflags

--- cmake/external/glog.cmake
+++ cmake/external/glog.cmake
@@ -20,6 +20,10 @@
         -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
         -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON)

+IF(NOT gflags_FOUND)
+    ADD_DEPENDENCIES(Glog_project gflags_project)
+ENDIF()
+
 ADD_LIBRARY(GLOG STATIC IMPORTED)
 SET_PROPERTY(TARGET GLOG PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/glog_project/src/glog/libglog.a)
 SET(GLOG_LIBRARIES "")


Modify lite commit id. (#22371)

Modify lite commit id. (#22371)

* modify lite commit id to support var_conv_2d cascade. test=develop

* modify lite commit id. test=develop

--- cmake/external/lite.cmake
+++ cmake/external/lite.cmake
@@ -44,7 +44,7 @@
       ${LITE_PROJECT}
       ${EXTERNAL_PROJECT_LOG_ARGS}
       GIT_REPOSITORY      "https://github.com/PaddlePaddle/Paddle-Lite.git"
-      GIT_TAG             9343782bb6e3c7876fdb6ecacd0d3bd3db4ce2bc
+      GIT_TAG             922ace19a45f30075618f71428523e7a2d5898d6
       PREFIX              ${LITE_SOURCES_DIR}
       UPDATE_COMMAND      ""
       BUILD_COMMAND       ${LITE_BUILD_COMMAND}


Add alternate cublaslt library name. CUDA 11.0 uses cublasLt. (#6541)

--- cmake/util/FindCUDA.cmake
+++ cmake/util/FindCUDA.cmake
@@ -91,7 +91,8 @@
       find_library(CUDA_CUBLAS_LIBRARY cublas
         ${CUDA_TOOLKIT_ROOT_DIR}/lib64
         ${CUDA_TOOLKIT_ROOT_DIR}/lib)
-      find_library(CUDA_CUBLASLT_LIBRARY cublaslt
+      find_library(CUDA_CUBLASLT_LIBRARY
+        NAMES cublaslt cublasLt
         ${CUDA_TOOLKIT_ROOT_DIR}/lib64
         ${CUDA_TOOLKIT_ROOT_DIR}/lib)
     endif(MSVC)


COMP: let cmake find ossim includes and libs automatically

--- CMake/FindOssim.cmake
+++ CMake/FindOssim.cmake
@@ -11,13 +11,7 @@
     set( Ossim_FIND_QUIETLY TRUE )
 endif()

-find_path( OSSIM_INCLUDE_DIR
-           NAMES ossim/init/ossimInit.h
-           PATHS
-           $ENV{OSSIM_INCLUDE_DIR}
-           ${CMAKE_PREFIX_PATH}/include
-           /usr/local/include
-           /usr/include )
+find_path( OSSIM_INCLUDE_DIR NAMES ossim/init/ossimInit.h )

   file(READ "${OSSIM_INCLUDE_DIR}/ossim/ossimVersion.h" _ossim_version_h_CONTENTS)
   string(REGEX REPLACE ".*# *define OSSIM_VERSION *\"([0-9.]+)\".*" "\\1" OSSIM_VERSION "${_ossim_version_h_CONTENTS}")
@@ -29,15 +23,7 @@
     "((${OSSIM_MAJOR_VERSION_NUMBER})*100+${OSSIM_MINOR_VERSION_NUMBER})*100+${OSSIM_PATCH_VERSION_NUMBER}")
   mark_as_advanced(OSSIM_VERSION)

-find_library(OSSIM_LIBRARY
-             NAMES ossim
-             PATHS
-             ${CMAKE_PREFIX_PATH}/lib
-             ${CMAKE_PREFIX_PATH}/lib64
-             /usr/local/lib/ossim
-             /usr/local/lib64/
-             /usr/lib/
-             /usr/lib64/)
+find_library(OSSIM_LIBRARY NAMES ossim)

 # handle the QUIETLY and REQUIRED arguments and set OSSIM_FOUND to TRUE if
 # all listed variables are TRUE


Revert "COMP: backport find shark script from develop"

this fix requires more work on windows side

This reverts commit 817e317bb1cd43737c8d804218a7570f37726c5a.

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -41,11 +41,9 @@

 endif() #if(Shark_DIR)

-find_path( SHARK_INCLUDE_DIR
-  NAMES shark/Core/Shark.h
+find_path( SHARK_INCLUDE_DIR shark/Core/Shark.h
   PATHS "${SHARK_SEARCH_PATH}"
-  PATH_SUFFIXES include include/shark shark
-  )
+  PATH_SUFFIXES include include/shark shark)

 find_library( SHARK_LIBRARY
   NAMES shark shark_debug
@@ -53,37 +51,22 @@
   PATH_SUFFIXES lib
   )

-mark_as_advanced( SHARK_INCLUDE_DIR  SHARK_LIBRARY )
-
-find_package( Boost 1.48.0 REQUIRED QUIET COMPONENTS
+mark_as_advanced( SHARK_INCLUDE_DIR
+                  SHARK_LIBRARY )
+find_package(
+	Boost 1.48.0 REQUIRED QUIET COMPONENTS
 	system date_time filesystem
 	program_options serialization thread
 	unit_test_framework
-	)
+)

 if(NOT Boost_FOUND)
   message(FATAL_ERROR "Please make sure Boost 1.48.0 is installed on your system")
 endif()

-if(NOT SHARK_LIBRARY)
-  message(FATAL_ERROR "Cannot find SHARK_LIBRARY. set it with cmake -DSHARK_LIBRARY=")
-  return()
+if(NOT SHARK_CONFIG_FILE)
+  find_file(SHARK_CONFIG_FILE SharkConfig.cmake PATH_SUFFIXES lib/cmake/Shark share/Shark)
 endif()
-
-if(NOT SHARK_INCLUDE_DIR)
-  message(FATAL_ERROR "Cannot find SHARK_INCLUDE_DIR. Set it with cmake -DSHARK_INCLUDE_DIR=")
-  return()
-endif()
-
-get_filename_component(SHARK_INSTALLDIR ${SHARK_LIBRARY} PATH)
-get_filename_component(SHARK_INSTALLDIR ${SHARK_INSTALLDIR} PATH)
-
-if(NOT SHARK_CONFIG_FILE)
-  find_file(SHARK_CONFIG_FILE SharkConfig.cmake
-    PATHS ${SHARK_INSTALLDIR}
-    PATH_SUFFIXES lib/cmake/Shark share/Shark cmake/Shark)
-endif()
-
 if(SHARK_CONFIG_FILE)
   file(STRINGS "${SHARK_CONFIG_FILE}" SHARK_CONFIG_FILE_CONTENTS)
   string(REGEX REPLACE
@@ -98,42 +81,13 @@

   set(SHARK_VERSION_STRING
   "${SHARK_VERSION_MAJOR}.${SHARK_VERSION_MINOR}.${SHARK_VERSION_PATCH}")
+
 endif()

-set(SHARK_USE_OPENMP_matched)
-#define SHARK_USE_OPENMP
-file(STRINGS "${SHARK_INCLUDE_DIR}/shark/Core/Shark.h" SHARK_H_CONTENTS)
-string(REGEX MATCH
-  "#define.SHARK_USE_OPENMP"
-  SHARK_USE_OPENMP_matched "${SHARK_H_CONTENTS}")
-
-#this variable is added in cache but not used now
-# you can use it to see if shark installation has openMP
-# later if needed in other places..
-set(SHARK_USE_OPENMP FALSE CACHE BOOL "shark is built with OpenMP")
-if(SHARK_USE_OPENMP_matched)
-  set(SHARK_USE_OPENMP TRUE CACHE BOOL "shark is built with OpenMP" FORCE)
-endif()
-
-if(SHARK_USE_OPENMP)
-  message(STATUS "Shark is built with OpenMP: SHARK_USE_OPENMP = TRUE")
-  find_package(OpenMP REQUIRED QUIET)
-  if(OPENMP_FOUND)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
-  else()
-    message(FATAL_ERROR "Your shark libraries are compiled with it OpenMP")
-    set(SHARK_FOUND FALSE)
-  endif()
-else()
-  message(STATUS "Shark is built without OpenMP: SHARK_USE_OPENMP = FALSE")
-endif()
 INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
-  REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR
-  VERSION_VAR SHARK_VERSION_STRING)
-
+                                  REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR
+                                  VERSION_VAR SHARK_VERSION_STRING)
 if(SHARK_FOUND)
   set(SHARK_INCLUDE_DIRS ${SHARK_INCLUDE_DIR} ${Boost_INCLUDE_DIR} )
   set(SHARK_LIBRARIES ${SHARK_LIBRARY} ${Boost_LIBRARIES} )


Fixed polarssl programs included

Fixed polarssl programs included

--- lib/polarssl.cmake
+++ lib/polarssl.cmake
@@ -2,7 +2,8 @@
 if(NOT TARGET polarssl)
 	message("including polarssl")
 	if (SELF_TEST)
-		set(ENABLE_TESTING OFF CACHE BOOL)
+		set(ENABLE_TESTING OFF CACHE BOOL "Disable tests")
+		set(ENABLE_PROGRAMS OFF CACHE BOOL "Disable programs")
 		add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl)
 	else()
 		add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl EXCLUDE_FROM_ALL)


cmake: Fix build warning on OpenIndiana.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -39,6 +39,11 @@
         check_c_compiler_flag("-fvisibility=hidden" WITH_VISIBILITY_HIDDEN)
     endif (NOT GNUCC_VERSION EQUAL 34)
 endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
+
+# DEFINITIONS
+if (SOLARIS)
+    add_definitions(-D__EXTENSIONS__)
+endif (SOLARIS)

 # HEADER FILES
 check_include_file(assert.h HAVE_ASSERT_H)


[cmake] fix globbing expression that adds core moduels to cmake generated cbp


add preproject.cmake

add preproject.cmake

* this is a file with some useful and common cmake that needs to take place prior to project() call
* unfortunately projects that need this can't use it from externpro -- they'll need to copy it for themselves
* the externpro find script (called via `find_package(externpro)`) currently has to happen after project()
* however it's convenient to have this in externpro so it's readily available and can be compared


New improved Find cmake file

New improved Find cmake file

git-svn-id: fc35eccb03ccef1c432fd0fcf5295fcceaca86a6@34044 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6

--- FindLinkGrammar.cmake
+++ FindLinkGrammar.cmake
@@ -5,7 +5,8 @@
 #  LINK_GRAMMAR_LIBRARIES - The libraries needed to use link-grammar
 #  LINK_GRAMMAR_DATA_DIR - the dir where you will find the dictionaries

-# Copyright (c) 2008, OpenCog.org (http://opencog.org)
+# Copyright (c) 2008 OpenCog.org (http://opencog.org)
+# Copyright (c) 2014 Linas Vepstas
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -65,7 +66,7 @@
 	SET(LG_VERSION_MINOR 0)
 	SET(LG_VERSION_PATCH 0)

-	# Extract the libguile version from the 'version.h' file
+	# Extract the version from the 'version.h' file
 	FILE(READ "${LINK_GRAMMAR_INCLUDE_DIR}/link-grammar/link-features.h" _LG_FEAT_H_CONTENTS)

 	STRING(REGEX MATCH "#define LINK_MAJOR_VERSION[	 ]+([0-9]+)" _MATCH "${_LG_FEAT_H_CONTENTS}")
@@ -75,30 +76,26 @@
 	STRING(REGEX MATCH "#define LINK_MICRO_VERSION[	 ]+([0-9]+)" _MATCH "${_LG_FEAT_H_CONTENTS}")
 	SET(LG_VERSION_PATCH ${CMAKE_MATCH_1})

+	SET(LG_VERSION "${LG_VERSION_MAJOR}.${LG_VERSION_MINOR}.${LG_VERSION_PATCH}")
+
 	# Check found version against required one
-	# Use nested less...equal so that version 2.0.0 is newer than version 1.9.1 is newer than 1.8.6
-	IF (LinkGrammar_FIND_VERSION_MAJOR AND ${LG_VERSION_MAJOR} LESS LinkGrammar_FIND_VERSION_MAJOR)
+	IF (DEFINED LinkGrammar_FIND_VERSION AND ${LG_VERSION} VERSION_LESS LinkGrammar_FIND_VERSION)
 		SET(LINK_GRAMMAR_FOUND FALSE)
-	ELSE (LinkGrammar_FIND_VERSION_MAJOR AND ${LG_VERSION_MAJOR} LESS LinkGrammar_FIND_VERSION_MAJOR)
-		IF (LinkGrammar_FIND_VERSION_MAJOR AND ${LG_VERSION_MAJOR} EQUAL LinkGrammar_FIND_VERSION_MAJOR)
-			IF (LinkGrammar_FIND_VERSION_MINOR AND ${LG_VERSION_MINOR} LESS LinkGrammar_FIND_VERSION_MINOR)
-				SET(LINK_GRAMMAR_FOUND FALSE )
-			ELSE (LinkGrammar_FIND_VERSION_MINOR AND ${LG_VERSION_MINOR} LESS LinkGrammar_FIND_VERSION_MINOR)
-				IF (LinkGrammar_FIND_VERSION_MINOR AND ${LG_VERSION_MINOR} EQUAL LinkGrammar_FIND_VERSION_MINOR)
-					IF (LinkGrammar_FIND_VERSION_PATCH AND ${LG_VERSION_PATCH} LESS LinkGrammar_FIND_VERSION_PATCH)
-						SET(LINK_GRAMMAR_FOUND FALSE )
-					ENDIF (LinkGrammar_FIND_VERSION_PATCH AND ${LG_VERSION_PATCH} LESS LinkGrammar_FIND_VERSION_PATCH)
-				ENDIF (LinkGrammar_FIND_VERSION_MINOR AND ${LG_VERSION_MINOR} EQUAL LinkGrammar_FIND_VERSION_MINOR)
-			ENDIF (LinkGrammar_FIND_VERSION_MINOR AND ${LG_VERSION_MINOR} LESS LinkGrammar_FIND_VERSION_MINOR)
-		ENDIF (LinkGrammar_FIND_VERSION_MAJOR AND ${LG_VERSION_MAJOR} EQUAL LinkGrammar_FIND_VERSION_MAJOR)
-	ENDIF (LinkGrammar_FIND_VERSION_MAJOR AND ${LG_VERSION_MAJOR} LESS LinkGrammar_FIND_VERSION_MAJOR)
+	ELSE ()
+		SET(LINK_GRAMMAR_FOUND TRUE)
+	ENDIF ()
 ENDIF(LINK_GRAMMAR_INCLUDE_DIR AND NOT CMAKE_MAJOR_VERSION LESS 2 AND NOT CMAKE_MINOR_VERSION LESS 6)

+IF (LinkGrammar_FIND_VERSION)
+	SET(_LG_VERSION_MESSAGE_STRING "(${LG_VERSION} >= ${LinkGrammar_FIND_VERSION})")
+ENDIF (LinkGrammar_FIND_VERSION)
+
 # Report the results.
-IF (NOT LINK_GRAMMAR_FOUND)
-	IF (LinkGrammar_FIND_VERSION_MAJOR)
-		SET(_LG_VERSION_MESSAGE_STRING " (>=${LinkGrammar_FIND_VERSION_MAJOR}.${LinkGrammar_FIND_VERSION_MINOR}.${LinkGrammar_FIND_VERSION_PATCH})")
-	ENDIF (LinkGrammar_FIND_VERSION_MAJOR)
+IF (LINK_GRAMMAR_FOUND)
+	IF (NOT LINK_GRAMMAR_FIND_QUIETLY)
+		MESSAGE(STATUS "Link Grammar ${_LG_VERSION_MESSAGE_STRING} found.")
+	ENDIF (NOT LINK_GRAMMAR_FIND_QUIETLY)
+ELSE (LINK_GRAMMAR_FOUND)
 	SET(LINK_GRAMMAR_DIR_MESSAGE
 		"link-grammar${_LG_VERSION_MESSAGE_STRING} was not found. Make sure LINK_GRAMMAR_LIBRARY, LINK_GRAMMAR_INCLUDE_DIR and LINK_GRAMMAR_DATA_DIR are set.")
 	IF (NOT LINK_GRAMMAR_FIND_QUIETLY)
@@ -108,7 +105,7 @@
 			MESSAGE(FATAL_ERROR "${LINK_GRAMMAR_DIR_MESSAGE}")
 		ENDIF (LINK_GRAMMAR_FIND_REQUIRED)
 	ENDIF (NOT LINK_GRAMMAR_FIND_QUIETLY)
-ENDIF (NOT LINK_GRAMMAR_FOUND)
+ENDIF (LINK_GRAMMAR_FOUND)

 MARK_AS_ADVANCED(
 	LINK_GRAMMAR_INCLUDE_DIR


Sync wit cogutil version

Sync wit cogutil version

--- FindLinkGrammar.cmake
+++ FindLinkGrammar.cmake
@@ -37,7 +37,8 @@
 	PATHS
 		/usr/share/link-grammar/en/
 		/usr/local/share/link-grammar/en/
-		/opt/local/share/link-grammar/en/)
+		/opt/local/share/link-grammar/en/
+	PATH_SUFFIXES share/link-grammar/en/ )

 # Look for the library
 FIND_LIBRARY(LINK_GRAMMAR_LIBRARY


Update FW: fix overriding useHomographyRectification behaviour specified in docs when custom mesh is provided

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "7f7e0e7aa2d705d8e618605800fd3c2447a866dd")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "d1086bf51f6aa5a75c9afcda34c74c62e4e9a53b")

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


ENH: Needed to add DCMTK support option to be turned on.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -85,13 +85,14 @@
 option(USE_SYSTEM_ITK "Build using an externally defined version of ITK" OFF)
 option(USE_SYSTEM_SlicerExecutionModel "Build using an externally defined version of SlicerExecutionModel"  OFF)
 option(USE_SYSTEM_VTK "Build using an externally defined version of VTK" OFF)
+option(USE_SYSTEM_DCMTK "Build using an externally defined version of DCMTK" OFF)
+option(${PROJECT_NAME}_BUILD_DICOM_SUPPORT "Build Dicom Support" ON)

 #------------------------------------------------------------------------------
 # ${LOCAL_PROJECT_NAME} dependency list
 #------------------------------------------------------------------------------

 set(ITK_EXTERNAL_NAME ITKv${ITK_VERSION_MAJOR})
-set(${PROJECT_NAME}_BUILD_DICOM_SUPPORT ON)

 set(${LOCAL_PROJECT_NAME}_DEPENDENCIES DCMTK ${ITK_EXTERNAL_NAME} SlicerExecutionModel VTK BRAINSTools)


COMP: At superbuild level, the build of CTK is always triggered.

There are now two targets:
  1) CTK-build:

     "make" or "make CTK-build"  will update all external projects and re-build CTK

  2) CTK-build-only

     "make CTK-build-only" will only attempt to re-build CTK without updating the external projects

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -216,29 +216,35 @@
   DEPENDS
     "CTK-Utilities"
   )
-
-
+
 #-----------------------------------------------------------------------------
 # CTK
 #
 #MESSAGE(STATUS SUPERBUILD_EXCLUDE_CTKBUILD_TARGET:${SUPERBUILD_EXCLUDE_CTKBUILD_TARGET})
 IF(NOT DEFINED SUPERBUILD_EXCLUDE_CTKBUILD_TARGET OR NOT SUPERBUILD_EXCLUDE_CTKBUILD_TARGET)
-  SET(proj CTK-build)
-  ExternalProject_Add(${proj}
-    DOWNLOAD_COMMAND ""
-    CMAKE_GENERATOR ${gen}
-    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
-    BINARY_DIR CTK-build
-    INSTALL_COMMAND ""
-    DEPENDS
-      "CTK-Configure"
-    )
+#   SET(proj CTK-build)
+#   ExternalProject_Add(${proj}
+#     DOWNLOAD_COMMAND ""
+#     CMAKE_GENERATOR ${gen}
+#     SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
+#     BINARY_DIR CTK-build
+#     INSTALL_COMMAND ""
+#     DEPENDS
+#       "CTK-Configure"
+#     )
+  ADD_CUSTOM_TARGET(CTK-build ALL
+    COMMAND ${CMAKE_COMMAND} -G "${gen}" --build ${CMAKE_CURRENT_BINARY_DIR}/CTK-build
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CTK-build
+    COMMENT "Now building CTK ..."
+  )
+  ADD_DEPENDENCIES(CTK-build CTK-Configure)
 ENDIF()

 #-----------------------------------------------------------------------------
-# Custom target allowing to drive the build of CTK project itself
-#
-ADD_CUSTOM_TARGET(CTK
-  COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/CTK-build
+# Custom target allowing to drive the build of CTK project itself without superbuild
+#
+ADD_CUSTOM_TARGET(CTK-build-only
+  COMMAND ${CMAKE_COMMAND} -G "${gen}" --build ${CMAKE_CURRENT_BINARY_DIR}/CTK-build
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CTK-build
-  )
+  COMMENT "Now building CTK ..."
+  )


VAD_cliini - fix fnmatch on win

VAD_cliini - fix fnmatch on win

--- VAD_cliini.cmake
+++ VAD_cliini.cmake
@@ -23,6 +23,10 @@

   git_clone(cliini)

+  if(WIN32)
+    vigra_add_dep(fnmatch REQUIRED LIVE)
+  endif()
+
   # TODO default seems to point to checkout out dir in source?!?
   add_subdirectory("${VAD_EXTERNAL_ROOT}/cliini" "${CMAKE_BINARY_DIR}/external/cliini")


ENH: Update SlicerExecutionModel

ENH: Update SlicerExecutionModel

$ git shortlog 311eff9..62d0121 --no-merges
Francois Budin (1):
      BUG: Wrong unparsed arguments variable name

Hans Johnson (6):
      COMP: KWSYS removed support for pre-C++98 in 2015
      ENH: Exceptions should be caught by reference
      STYLE: Prefere initialization to assignment
      STYLE: Remove unused function WriteLines
      STYLE: Remove unused variable 'elements'
      BUG: find_package(ITK ...) clobbered existing

Jean-Christophe Fillion-Robin (19):
      STYLE: ModuleDescription: Move definition to cxx file
      STYLE: Remove obsolete ModuleFactory class
      STYLE: ModuleDescription: Remove unused Alternative Type/Target/Location
      STYLE: Remove obsolete BinaryFileDescriptor support
      STYLE: ModuleDescriptionParser: Add separator comment, small tweaks
      STYLE: Add ModuleDescriptionTesting Macros and Utilities files
      STYLE: ModuleDescription: Add TestDefaults
      ENH: ModuleDescription: Add support for lazily setting the target
      ENH: Update SEMMacroBuildCLI to copy (and optionally install) the XML file
      STYLE: CMakeLists: Consistently requires version 2.8.6
      STYLE: CMakeLists: Simplify code removing unneeded setting of CMP0016 to NEW
      STYLE: CMakeLists: Simplify code removing unneeded setting of CMP0017
      STYLE: CMakeLists: Simplify buildsystem using FindThreads module
      STYLE: CMakeLists: Remove obsolete option ModuleDescriptionParser_USE_PYTHON
      STYLE: CMakeLists: Finding of threading library is not needed anymore
      JsonSerializationUtilities: Remove unused method
      gitignore: Add CMakeLists.txt.user
      docker: Associate build-time metadata with the image
      README: Add docker badges

Johan Andruejol (13):
      ENH: Improve JsonCpp support for SlicerExecutionModel
      ENH: Add JsonCpp path to the GenerateCLP launcher
      ENH: Do not pass the JsonCpp_DIR to the testing directly
      ENH: Allow CLI to deserialize without the required arguments
      ENH: Improve support for empty arrays
      ENH: ParameterSerializer: Use the longflag in priority
      ENH: ParameterSerializer: Fix multiple parameters handling for deserialization
      STYLE: GenerateCLP: Factorize out the CMakeLists of the testing CLIs
      ENH: ParameterSerializer: Improve escaping of the JSONModuleDescription
      ENH: GenerateCLP: Force GenerateCLPLauncher rebuild on GenerateCLP change
      ENH: Uniformize the use of JsonCpp with VTK
      BUG: Fix GenerateCLP_FORWARD_PATHS_[BUILD/INSTALL] variable
      ENH: GenerateCLP: Include jsoncpp include dirs in UseGenerateCLP.cmake.in

Lucas Gandel (2):
      BUG: Fix ctest error on ITKExpat linking in GenerateCLP testing
      BUG: Fix link error related to ITKExpat when using ITK > v4.8.1

Matt McCormick (3):
      ENH: Use hidden visibility on the CLI library.
      Revert "BUG: Fix ctest error on ITKExpat linking in GenerateCLP testing"
      COMP: Do not use hidden visibility when ITK is built statically.

Stephen Aylward (1):
      WARN: Rename isPresent variables to avoid hidden local variable

ivmartel (2):
      Made implicit conversion explicit (size_t to int).
      Using static_cast instead of direct cast.

--- CMakeExternals/SlicerExecutionModel.cmake
+++ CMakeExternals/SlicerExecutionModel.cmake
@@ -33,7 +33,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/Slicer/SlicerExecutionModel.git"
-    GIT_TAG "311eff9038be165c1341dab90196fbd7466e715a"
+    GIT_TAG "62d0121dbb0fb057ebbd7c9ab84520accacec8bc"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build
     CMAKE_CACHE_ARGS


removed boost from cmake ALL_LIBRARIES and link directories

since we only use boost headers this should suffice.
Component specification is also not needed if there are
only boost headers in use.

--- CMake/PackageDepends/MITK_Boost_Config.cmake
+++ CMake/PackageDepends/MITK_Boost_Config.cmake
@@ -1,10 +1,11 @@
 IF(MITK_USE_Boost)

-FIND_PACKAGE(Boost COMPONENTS graph math/special_functions)
+FIND_PACKAGE(Boost REQUIRED)

 LIST(APPEND ALL_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
-LIST(APPEND ALL_LIBRARIES ${Boost_LIBRARIES})
-link_directories(${Boost_LIBRARY_DIRS})
+# this is only necessary if we use more than just the headers
+#LIST(APPEND ALL_LIBRARIES ${Boost_LIBRARIES})
+#link_directories(${Boost_LIBRARY_DIRS})

 ENDIF(MITK_USE_Boost)


DOC: module documentation

DOC: module documentation

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -167,6 +167,7 @@
 #     [PROVIDES <library name which is built>]
 #     [PACKAGE_DEPENDS <packages we need, like ITK, VTK, QT>]
 #     [EXPORT_DEFINE <declspec macro name for dll exports>]
+#     [QT_MODULE]
 #
 ##################################################################
 MACRO(MITK_CREATE_MODULE MODULE_NAME_IN)


Remove inadvertent comment

Remove inadvertent comment

Former-commit-id: a76143824c6717e4f531acdb2b3e8709015215aa

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -3,7 +3,7 @@
 function(halide_use_image_io TARGET)
   foreach(PKG PNG JPEG)
     # It's OK to call find_package() for the same package multiple times.
-    # find_package(${PKG} QUIET)
+    find_package(${PKG} QUIET)
     if(${PKG}_FOUND)
       target_compile_definitions(${TARGET} PRIVATE ${${PKG}_DEFINITIONS})
       target_include_directories(${TARGET} PRIVATE ${${PKG}_INCLUDE_DIRS})


Prevent vars generation conflict (#469)

Prevent vars generation conflict (#469)

Signed-off-by: Kochin, Ivan <322d74381b505d2ff864bbdf31c9fa2072d65bfa@intel.com>

--- integration/cmake/generate_vars.cmake
+++ integration/cmake/generate_vars.cmake
@@ -30,7 +30,9 @@
     file(TO_NATIVE_PATH "${BIN_PATH}" BINARY_PATH_REPLACEMENT)
 endif()

-configure_file( ${INPUT_FILE} ${OUTPUT_FILE} @ONLY )
+if (NOT EXISTS ${OUTPUT_FILE})
+    configure_file(${INPUT_FILE} ${OUTPUT_FILE} @ONLY)
+endif()

 if (TBB_INSTALL_VARS)
     set(OUTPUT_FILE "${BINARY_DIR}/internal_install_vars")


COMP: add dependency on ImageCompose module to Statistics Module

Change-Id: I561b1cad862c19974cb2459519b14f39f8deed3a

--- Modules/Numerics/Statistics/itk-module.cmake
+++ Modules/Numerics/Statistics/itk-module.cmake
@@ -1,2 +1,2 @@
-itk_module(ITK-Statistics DEPENDS ITK-Common ITK-Netlib TEST_DEPENDS ITK-TestKernel  ITK-ImageIntensity)
+itk_module(ITK-Statistics DEPENDS ITK-Common ITK-Netlib TEST_DEPENDS ITK-TestKernel  ITK-ImageIntensity ITK-ImageCompose)
 #extra test dependecy of ImageIntensity is introduced by itkImageToListSampleAdaptorTest.cxx)


cmake: Link against libz when searching for btf_dump__new

Kernel commit 166750bc1dd256
("libbpf: Support libbpf-provided extern variables") placed an explicit
dependency from libbpf to libz. This caused symbol checks in static
builds to fail linking (because static library dependencies are not
automatically pulled in like dynamic libraries).

The end result was that BTF support was silently failing because the
BTF::BTF() constructor was using the stubbed out implementation, leaving
the BTF instance in bpftrace in NODATA state. This caused the
FieldAnalyser to bail early and not analyze fields b/c it thought the
system did not have BTF data.


hwloc finder fix

hwloc finder fix

--- Findhwloc.cmake
+++ Findhwloc.cmake
@@ -19,10 +19,8 @@

 if(hwloc_FIND_REQUIRED)
   set(_hwloc_OPTS "REQUIRED")
-endif()
-
-if(hwloc_FIND_QUIETLY)
-  set(_hwloc_OPTS "${_hwloc_OPTS} QUIET")
+elseif(hwloc_FIND_QUIETLY)
+  set(_hwloc_OPTS "QUIET")
 else()
   set(_hwloc_output 1)
 endif()


no longer  a rust ide

no longer  a rust ide

--- install/cpack-config.cmake
+++ install/cpack-config.cmake
@@ -8,7 +8,7 @@

 SET(CPACK_PACKAGE_NAME "Ride")
 SET(CPACK_PACKAGE_DESCRIPTION "Ride")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ride is a Rust IDE")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ride is good program")
 SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 SET(CPACK_PACKAGE_FILE_NAME "ride-${CPACK_PACKAGE_VERSION}")
 SET(CPACK_RESOURCE_FILE_LICENSE  "${PROJECT_SOURCE_DIR}/install/LICENSE.txt")


Visual tweak for BBPDocumentation

Visual tweak for BBPDocumentation

--- Doxygit.cmake
+++ Doxygit.cmake
@@ -178,7 +178,7 @@
   "  \n"
   "  \n"
   "
"
-  "
Projects
")
+  "
Projects
")

   foreach(Entry ${Entries})
     string(REGEX REPLACE "^(.+)-.+$" "\\1" Project ${Entry})


Removed unneded shared source files

Removed unneded shared source files

--- shared/depthai-shared.cmake
+++ shared/depthai-shared.cmake
@@ -2,13 +2,7 @@

 set(DEPTHAI_SHARED_3RDPARTY_HEADERS_PATH "depthai-shared/3rdparty")

-set(DEPTHAI_SHARED_SOURCES
-    #${DEPTHAI_SHARED_FOLDER}/src/general/data_writer.cpp
-    #${DEPTHAI_SHARED_FOLDER}/src/logger/logs_writer.cpp
-    #${DEPTHAI_SHARED_FOLDER}/src/stream/stream_info.cpp
-    #${DEPTHAI_SHARED_FOLDER}/src/xlink/xlink_wrapper.cpp
-    #${DEPTHAI_SHARED_FOLDER}/src/json_helper.cpp
-    #${DEPTHAI_SHARED_FOLDER}/src/disparity_luts.cpp
+set(DEPTHAI_SHARED_SOURCES
     ${DEPTHAI_SHARED_FOLDER}/src/datatype/DatatypeEnum.cpp
 )


Test->TEST

Test->TEST

--- src/CMake/UseCyclus.cmake
+++ src/CMake/UseCyclus.cmake
@@ -182,7 +182,7 @@
       CACHE INTERNAL "Agent test source" FORCE
       )

-    ADD_LIBRARY(${lib_root}Tests ${${lib_root}_Test_CC})
+    ADD_LIBRARY(${lib_root}Tests ${${lib_root}_TEST_CC})
     TARGET_LINK_LIBRARIES(${lib_root}Tests dl cycluscore ${CYCLUS_GTEST_LIBRARIES})
     SET_TARGET_PROPERTIES(${lib_root}Tests PROPERTIES LINKER_LANGUAGE C)
     SET(


ENH: Change "homepage" for DTIAtlasFiberAnalyzer built as a Slicer extension

--- Common.cmake
+++ Common.cmake
@@ -43,7 +43,7 @@

 #-----------------------------------------------------------------------------
 set(EXTENSION_NAME DTIAtlasFiberAnalyzer)
-set(EXTENSION_HOMEPAGE "http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/DTIAtlasFiberAnalyzer")
+set(EXTENSION_HOMEPAGE "http://www.nitrc.org/projects/dti_tract_stat")
 set(EXTENSION_CATEGORY "Diffusion")
 set(EXTENSION_CONTRIBUTORS "Francois Budin (UNC)")
 set(EXTENSION_DESCRIPTION "This extension provides the tool DTIAtlasFiberAnalyzer integrated in Slicer")


Add all missing header files to cmake

Add all missing header files to cmake

--- src.cmake
+++ src.cmake
@@ -19,6 +19,7 @@
 )

 set(COMMONLIST
+    ${COMMON_DIR}/Assert.h
     ${COMMON_DIR}/Color.h
     ${COMMON_DIR}/Color.cpp
     ${COMMON_DIR}/Command.cpp
@@ -212,8 +213,11 @@
 set(SERVERLIST
     ${ENGINE_DIR}/botlib/bot_api.h
     ${ENGINE_DIR}/botlib/bot_convert.cpp
+    ${ENGINE_DIR}/botlib/bot_convert.h
+    ${ENGINE_DIR}/botlib/bot_debug.h
     ${ENGINE_DIR}/botlib/bot_load.cpp
     ${ENGINE_DIR}/botlib/bot_local.cpp
+    ${ENGINE_DIR}/botlib/bot_local.h
     ${ENGINE_DIR}/botlib/bot_nav.cpp
     ${ENGINE_DIR}/botlib/bot_navdraw.h
     ${ENGINE_DIR}/botlib/bot_types.h
@@ -235,6 +239,7 @@

 set(ENGINELIST
     ${ENGINE_DIR}/framework/Application.cpp
+    ${ENGINE_DIR}/framework/Application.h
     ${ENGINE_DIR}/framework/BaseCommands.cpp
     ${ENGINE_DIR}/framework/BaseCommands.h
     ${ENGINE_DIR}/framework/CommandBufferHost.cpp


CMake: modifying OMNIORB_ADD_MODULE macro to support dynamic build of IDL files in the build tree (used in PARAVIS module)

--- salome_adm/cmake_files/UseOmniORB.cmake
+++ salome_adm/cmake_files/UseOmniORB.cmake
@@ -38,7 +38,10 @@
 #
 # ARGUMENTS:
 #   module    : module name
-#   idlfiles  : list of IDL files to be compiled into module
+#   idlfiles  : list of IDL files to be compiled into module. If just a file name is given, the source
+#               tree is first inspected. If not found there, the macro assumes the file will be built
+#               in the build tree (CMAKE_CURRENT_BINARY_DIR) thanks to some ADD_CUSTOM_COMMAND() call
+#               (used in PARAVIS).
 #   incdirs   : additional include dirs for IDL staff
 #   linklibs  : additional libraries the module to be linked to (optional)
 #
@@ -95,7 +98,13 @@
     GET_FILENAME_COMPONENT(_base ${_input} NAME_WE)
     GET_FILENAME_COMPONENT(_path ${_input} PATH)
     IF(NOT _path)
-      SET(_input ${CMAKE_CURRENT_SOURCE_DIR}/${_input})
+      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_input})
+        SET(_input_cmd ${CMAKE_CURRENT_SOURCE_DIR}/${_input})
+      ELSE()
+        SET(_input_cmd ${CMAKE_CURRENT_BINARY_DIR}/${_input})
+      ENDIF()
+    ELSE()
+      SET(_input_cmd ${_input})
     ENDIF()

     SET(_inc     ${CMAKE_CURRENT_BINARY_DIR}/${_base}.hh)
@@ -107,8 +116,8 @@
     SET(_outputs ${_inc} ${_src} ${_dynsrc})

     ADD_CUSTOM_COMMAND(OUTPUT ${_outputs}
-      COMMAND ${OMNIORB_IDL_COMPILER} ${_cxx_flags} ${_input}
-      MAIN_DEPENDENCY ${_input})
+      COMMAND ${OMNIORB_IDL_COMPILER} ${_cxx_flags} ${_input_cmd}
+      DEPENDS ${_input})

     INSTALL(FILES ${_input} DESTINATION idl/salome)
     INSTALL(FILES ${_inc}   DESTINATION include/salome)


32bitFixes: Fixed vktrace layer name for 32-bit build32/

32-bit vktrace layer had 32 appended on the end.  Remove that.

--- vktrace/src/build_options.cmake
+++ vktrace/src/build_options.cmake
@@ -34,8 +34,14 @@
     set(CMAKE_EXECUTABLE_SUFFIX "${CMAKE_EXECUTABLE_SUFFIX}")
     set(CMAKE_SHARED_LIBRARY_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
 else()
-    set(CMAKE_EXECUTABLE_SUFFIX "32${CMAKE_EXECUTABLE_SUFFIX}")
-    set(CMAKE_SHARED_LIBRARY_SUFFIX "32${CMAKE_SHARED_LIBRARY_SUFFIX}")
+    # Don't add the 32 for Windows because it goes in a different location.
+    if (MSVC)
+        set(CMAKE_EXECUTABLE_SUFFIX "${CMAKE_EXECUTABLE_SUFFIX}")
+        set(CMAKE_SHARED_LIBRARY_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
+    else()
+        set(CMAKE_EXECUTABLE_SUFFIX "32${CMAKE_EXECUTABLE_SUFFIX}")
+        set(CMAKE_SHARED_LIBRARY_SUFFIX "32${CMAKE_SHARED_LIBRARY_SUFFIX}")
+    endif()
 endif()

 # Default to release build


Update windows.cmake

Update windows.cmake

--- mk/windows.cmake
+++ mk/windows.cmake
@@ -17,11 +17,11 @@
     set (LIBRARY_OUTPUT_PATH ${CMAKE_INSTALL_PREFIX}/lib)
     set (EXTERNAL_LIB_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/windows)
     set (BUILD_EXTERNAL_ARGS -DPLATFORM=${PLATFORM} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX})
-    SET(ExternalLibs ${ExternalLibs}  object pthread m)
+    SET(ExternalLibs ${ExternalLibs} -Wl,--whole-archive object -Wl,--no-whole-archive regex pthread m)
 endmacro()

 macro (display_windows_platform_configs)
     message("-- EXECUTABLE_OUTPUT_PATH: ${EXECUTABLE_OUTPUT_PATH}")
     message("-- LIBRARY_OUTPUT_PATH: ${LIBRARY_OUTPUT_PATH}")
     message("-- CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
-endmacro()+endmacro()


Update version number for new release.

Update version number for new release.

--- CMake/Version.cmake
+++ CMake/Version.cmake
@@ -1,6 +1,6 @@
 # edit the following three version numbers
 SET(VERSION_MAJOR 0)
-SET(VERSION_MINOR 2)
+SET(VERSION_MINOR 3)
 SET(VERSION_RELEASE 0)

 #


cmake: fix curl linking on Windows

cmake: fix curl linking on Windows

Somehow, on a fresh Windows 10 install with MSVC 2019 these libraries
are required.

--- cmake/curl.cmake
+++ cmake/curl.cmake
@@ -16,6 +16,10 @@

     set(CURL_INCLUDE_DIRS ${WIN_CURL_INCLUDE_DIR})
     set(CURL_LIBRARY ${WIN_CURL_LIB})
+    # Strangely with curl 7.64.1 the following libs are required additionally to avoid linking errors.
+    list(APPEND CURL_LIBRARY Crypt32.Lib)
+    list(APPEND CURL_LIBRARY Wldap32.Lib)
+    list(APPEND CURL_LIBRARY Normaliz.lib)

     add_definitions(
         -DCURL_STATICLIB


Prefer new ISPC v1.9.2

Prefer new ISPC v1.9.2

--- cmake/ispc.cmake
+++ cmake/ispc.cmake
@@ -15,7 +15,7 @@
 ## ======================================================================== ##

 # ISPC versions to look for, in decending order (newest first)
-set(ISPC_VERSION_WORKING "1.9.1")
+set(ISPC_VERSION_WORKING "1.9.2" "1.9.1")
 list(GET ISPC_VERSION_WORKING -1 ISPC_VERSION_REQUIRED)

 IF (NOT ISPC_EXECUTABLE)
@@ -215,4 +215,4 @@
   endforeach()
   tsimd_ispc_compile(${ISPC_SOURCES})
   add_executable(${name} ${ISPC_OBJECTS} ${OTHER_SOURCES} ${ISPC_SOURCES})
-endmacro()+endmacro()


Reset version to 0.0.0

Reset version to 0.0.0

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -43,7 +43,7 @@
   # ----------------------------------------------------------------------------
   # meta-data
   NAME        "VolumetricMapping"
-  VERSION     "1.1.0" # version of this module
+  VERSION     "0.0.0" # version of this module
   SOVERSION   "0"     # API yet unstable
   PACKAGE     "MIRTK"
   AUTHORS     "Andreas Schuh"


r1401@suzhe:  suzhe | 2009-04-08 11:22:28 +0800  - Fix cmake build with xulrunner 1.9.1

--- cmake/Configure.cmake
+++ cmake/Configure.cmake
@@ -95,6 +95,7 @@
 INCLUDE(CheckFunctionExists)
 INCLUDE(GGLCheckFunctionExists)
 INCLUDE(FindPkgConfig)
+INCLUDE(CheckIncludeFile)

 INCLUDE(CheckTypeSize)
 SET(HAVE_STDDEF_H 1)
@@ -447,6 +448,11 @@
   SET(CMAKE_REQUIRED_INCLUDES ${SMJS_INCLUDE_DIR})
   SET(CMAKE_REQUIRED_LIBRARIES ${SMJS_LIBRARIES})
   SET(CMAKE_REQUIRED_LINK_DIR ${SMJS_LINK_DIR})
+  SET(CMAKE_REQUIRED_DEFINITIONS ${SMJS_DEFINITIONS})
+  CHECK_INCLUDE_FILE(jsversion.h JSVERSION_H_FOUND)
+  IF(JSVERSION_H_FOUND)
+    LIST(APPEND SMJS_DEFINITIONS "-DHAVE_JSVERSION_H")
+  ENDIF(JSVERSION_H_FOUND)
   GGL_CHECK_FUNCTION_EXISTS(JS_SetOperationCallback JS_SETOPERATIONCALLBACK_FOUND)
   IF(JS_SETOPERATIONCALLBACK_FOUND)
     LIST(APPEND SMJS_DEFINITIONS "-DHAVE_JS_SetOperationCallback")


Properly compute the CEGUI_INCLUDE_DIRS

Properly compute the CEGUI_INCLUDE_DIRS

We do this by including *only* the parent
directories of the "CEGUI/" subdirectory,
so that we won't get into compilation errors.

Also, set more explicitly the docstrings


Sync FindClang.cmake from upstream

Sync FindClang.cmake from upstream

--- cmake/FindClang.cmake
+++ cmake/FindClang.cmake
@@ -7,9 +7,11 @@
 #
 #  CLANG_LIBCLANG_LIB          - Libclang C library
 #
-#  CLANG_CLANGFRONTEND_LIB     - Clang Frontend Library
-#  CLANG_CLANGDRIVER_LIB       - Clang Driver Library
+#  CLANG_CLANGFRONTEND_LIB     - Clang Frontend (C++) Library
+#  CLANG_CLANGDRIVER_LIB       - Clang Driver (C++) Library
 #  ...
+#
+#  CLANG_LIBS                  - All the Clang C++ libraries
 #
 # Uses the same include and library paths detected by FindLLVM.cmake
 #
@@ -72,7 +74,7 @@
   FIND_AND_ADD_CLANG_LIB(clangRewriteCore)
 endif()

-if(CLANG_LIBS)
+if(CLANG_LIBS OR CLANG_LIBCLANG_LIB)
   set(CLANG_FOUND TRUE)
 else()
   message(STATUS "Could not find any Clang libraries in ${LLVM_LIBRARY_DIRS}")


More checks for iconv

More checks for iconv

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -14,9 +14,8 @@

 # Normal search.
 set(_ICONV_SEARCH_NORMAL
-  PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Iconv;InstallPath]"
-        "$ENV{PROGRAMFILES}/iconv"
-  )
+    PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Iconv;InstallPath]"
+          "$ENV{PROGRAMFILES}/iconv")
 list(APPEND _ICONV_SEARCHES _ICONV_SEARCH_NORMAL)

 set(ICONV_NAMES iconv iconv2 libiconv iconv64)
@@ -24,40 +23,39 @@

 # Try each search configuration.
 foreach(search ${_ICONV_SEARCHES})
-  find_path(ICONV_INCLUDE_DIR NAMES iconv.h ${${search}} PATH_SUFFIXES include)
+    find_path(ICONV_INCLUDE_DIR NAMES iconv.h ${${search}} PATH_SUFFIXES include)
 endforeach()

 # Allow ICONV_LIBRARY to be set manually, as the location of the iconv library
 if(NOT ICONV_LIBRARY)
-  foreach(search ${_ICONV_SEARCHES})
-    find_library(ICONV_LIBRARY_RELEASE NAMES ${ICONV_NAMES} ${${search}} PATH_SUFFIXES lib)
-    find_library(ICONV_LIBRARY_DEBUG   NAMES ${ICONV_NAMES_DEBUG} ${${search}} PATH_SUFFIXES lib)
-  endforeach()
+    foreach(search ${_ICONV_SEARCHES})
+        find_library(ICONV_LIBRARY_RELEASE NAMES ${ICONV_NAMES} ${${search}} PATH_SUFFIXES lib)
+        find_library(ICONV_LIBRARY_DEBUG   NAMES ${ICONV_NAMES_DEBUG} ${${search}} PATH_SUFFIXES lib)
+    endforeach()

-  include(SelectLibraryConfigurations)
-  select_library_configurations(ICONV)
+    include(SelectLibraryConfigurations)
+    select_library_configurations(ICONV)
 endif()

 unset(ICONV_NAMES)
 unset(ICONV_NAMES_DEBUG)

-mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR)
-
 if(ICONV_INCLUDE_DIR AND EXISTS "${ICONV_INCLUDE_DIR}/iconv.h")
     file(STRINGS "${ICONV_INCLUDE_DIR}/iconv.h" ICONV_H REGEX "^#define _LIBICONV_VERSION 0x([0-9]+)")
-
-    string(REGEX MATCH "#define _LIBICONV_VERSION 0x([0-9][0-9])([0-9][0-9])?([0-9][0-9])?.*" temp_match "${ICONV_H}")
+    string(REGEX MATCH "q#define _LIBICONV_VERSION 0x([0-9][0-9])([0-9][0-9])?([0-9][0-9])?.*" temp_match "${ICONV_H}")
     unset(temp_match)
-    set(ICONV_VERSION_MAJOR "${CMAKE_MATCH_1}")
-    set(ICONV_VERSION_MINOR "${CMAKE_MATCH_2}")
-    set(ICONV_VERSION_PATCH "${CMAKE_MATCH_3}")
-    string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_MAJOR "${ICONV_VERSION_MAJOR}")
-    string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_MINOR "${ICONV_VERSION_MINOR}")
-    string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_PATCH "${ICONV_VERSION_PATCH}")
+    if(CMAKE_MATCH_0)
+        set(ICONV_VERSION_MAJOR "${CMAKE_MATCH_1}")
+        set(ICONV_VERSION_MINOR "${CMAKE_MATCH_2}")
+        set(ICONV_VERSION_PATCH "${CMAKE_MATCH_3}")
+        string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_MAJOR "${ICONV_VERSION_MAJOR}")
+        string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_MINOR "${ICONV_VERSION_MINOR}")
+        string(REGEX REPLACE "0*([1-9][0-9]*).*" "\\1" ICONV_VERSION_PATCH "${ICONV_VERSION_PATCH}")

-    set(ICONV_VERSION_STRING "${ICONV_VERSION_MAJOR}.${ICONV_VERSION_MINOR}")
-    if(ICONV_VERSION_PATCH)
-        set(ICONV_VERSION_STRING "${ICONV_VERSION_STRING}.${ICONV_VERSION_PATCH}")
+        set(ICONV_VERSION_STRING "${ICONV_VERSION_MAJOR}.${ICONV_VERSION_MINOR}")
+        if(ICONV_VERSION_PATCH)
+            set(ICONV_VERSION_STRING "${ICONV_VERSION_STRING}.${ICONV_VERSION_PATCH}")
+        endif()
     endif()
 endif()

@@ -73,13 +71,15 @@
     REQUIRED_VARS ICONV_LIBRARY ICONV_INCLUDE_DIR
     VERSION_VAR ICONV_VERSION_STRING)

+mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR)
+
 if(NOT ICONV_FOUND)
     return()
 endif()

 set(ICONV_INCLUDE_DIRS ${ICONV_INCLUDE_DIR})

-if(NOT ICONV_LIBRARIES)
+if(NOT ICONV_LIBRARIES AND EXISTS "${ICONV_LIBRARY}")
     set(ICONV_LIBRARIES ${ICONV_LIBRARY})
 endif()

@@ -87,6 +87,11 @@
     add_library(ICONV::ICONV UNKNOWN IMPORTED)
     set_target_properties(ICONV::ICONV PROPERTIES
         INTERFACE_INCLUDE_DIRECTORIES "${ICONV_INCLUDE_DIRS}")
+
+    if(EXISTS "${ICONV_LIBRARY}")
+        set_target_properties(ICONV::ICONV PROPERTIES
+        IMPORTED_LOCATION "${ICONV_LIBRARY}")
+    endif()

     if(ICONV_LIBRARY_RELEASE)
         set_property(TARGET ICONV::ICONV APPEND PROPERTY
@@ -101,9 +106,4 @@
         set_target_properties(ICONV::ICONV PROPERTIES
             IMPORTED_LOCATION_DEBUG "${ICONV_LIBRARY_DEBUG}")
     endif()
-
-    if(NOT ICONV_LIBRARY_RELEASE AND NOT ICONV_LIBRARY_DEBUG)
-        set_property(TARGET ICONV::ICONV APPEND PROPERTY
-            IMPORTED_LOCATION "${ICONV_LIBRARY}")
-    endif()
 endif()


Fix build error by adding parameters demo to notebook skiplist (#119)

Error introduced in PR #118 , but was not detected in the PR CI checks.

--- cmake/Notebooks.cmake
+++ cmake/Notebooks.cmake
@@ -46,7 +46,7 @@
 endfunction(GenerateNotebookTarget)

 # Demos to skip over
-set(SKIPLIST "soma_clustering" "tumor_concept" "multiple_simulations" "gene_regulation" "sbml_integration" "makefile_project")
+set(SKIPLIST "soma_clustering" "tumor_concept" "multiple_simulations" "gene_regulation" "sbml_integration" "makefile_project" "parameters")

 # We chain the targets of the demos to each other, because of a race conditions
 # that occurs when invoking jupyter-notebook with multiple processes:


added custom command to remove test data before build, so that the copy in post is clean

--- WkTest.cmake
+++ WkTest.cmake
@@ -87,7 +87,11 @@

 		#copying data for tests
 		IF(EXISTS "${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}" AND IS_DIRECTORY "${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}")
-		    #message(STATUS "adding copy command for ${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}")
+		    ADD_CUSTOM_COMMAND( TARGET ${PROJECT_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E remove_directory
+			    "${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}"
+			    COMMENT
+			    "Removing ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}"
+			    VERBATIM)
 		    ADD_CUSTOM_COMMAND( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
 			    "${PROJECT_SOURCE_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}"
 			    "${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_TEST_DIR}/${${PROJECT_NAME}_TEST_DATA_DIR}"


Update FindSDL2.cmake

Update FindSDL2.cmake

--- scripts/FindSDL2.cmake
+++ scripts/FindSDL2.cmake
@@ -32,7 +32,7 @@
    set(SDL2_LIBRARY_PATH_SUFFIXES lib/x64)
 endif()

-find_library(SDL2_LIBRARY NAMES SDL2 sdl2 sdl2 sdl-2.0
+find_library(SDL2_LIBRARY NAMES SDL2 SDL2d sdl2 sdl2 sdl-2.0
           PATH_SUFFIXES ${SDL2_LIBRARY_PATH_SUFFIXES}
           DOC "The SDL library"
 )


added -funroll-loops

added -funroll-loops

[git-p4: depot-paths = "//sw/gpgpu/nvbio/main/": change = 18807326]

--- cmake-local/gcc.cmake
+++ cmake-local/gcc.cmake
@@ -9,7 +9,7 @@

     set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
     if (CMAKE_SYSTEM_PROCESSOR MATCHES "Intel" OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
-        set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse4.2 -mpopcnt")
+        set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse4.2 -mpopcnt -funroll-loops")
     endif()

     if(WERROR)


Set CEGUI_INCLUDE_DIRS for v0.7 as well

Set CEGUI_INCLUDE_DIRS for v0.7 as well

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -493,9 +493,11 @@
 # its parent rather than directly the subdirectory. Otherwise we'll get compiler errors.
 if ("${CEGUI_VERSION}" VERSION_GREATER "0.8.0")
     add_parent_dir(CEGUI_INCLUDE_DIRS_TEMP CEGUI_INCLUDE_DIR)
-    set(CEGUI_INCLUDE_DIRS ${CEGUI_INCLUDE_DIRS_TEMP})
+    # we basically overwrite CEGUI_INCLUDE_DIR so that it contains only the parent directory.
+    set(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS_TEMP})
 endif()
-set(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS})
+
+set(CEGUI_INCLUDE_DIRS ${CEGUI_INCLUDE_DIR})

 mark_as_advanced(CEGUI_CONFIG_INCLUDE_DIR)


MOD: Adding new ICONV Cmake Find file.

MOD: Adding new ICONV Cmake Find file.

--HG--
branch : v0-8

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -1,44 +1,92 @@
+# taken from:
+# http://code.google.com/p/tinygettext/source/browse/trunk/FindICONV.cmake?spec=svn183&r=183
+
+#
+#  Copyright (c) 2006, Peter Kmmel, <syntheticpp@gmx.net>
+#
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions
+#  are met:
+#
+#  1. Redistributions of source code must retain the copyright
+#     notice, this list of conditions and the following disclaimer.
+#  2. Redistributions in binary form must reproduce the copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#  3. The name of the author may not be used to endorse or promote products
+#     derived from this software without specific prior written permission.
+#
+#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+#  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+#  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+#  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+#  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
 ################################################################################
-# Custom cmake module for CEGUI to see if iconv exists
+# Adapted for CEGUI
 ################################################################################
-include(FindPackageHandleStandardArgs)
-include(CheckCXXSourceCompiles)

-find_path(ICONV_H_PATH NAMES iconv.h)
-find_library(ICONV_LIB NAMES iconv)
-
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+include(CheckFunctionExists)
 if (ICONV_H_PATH)
-    check_cxx_source_compiles("
-    #include <iconv.h>
-    int main() {
-        iconv(0, 0, 0, 0, 0);
-        return 0;
-    }"
-
-    ICONV_LIB_GLIBC)
-
-    if (NOT ICONV_LIB_GLIBC)
-        find_package_handle_standard_args(Iconv DEFAULT_MSG ICONV_LIB ICONV_H_PATH)
-    else()
-        set(ICONV_FOUND TRUE)
-        unset(ICONV_LIB)
-    endif()
-
-    # This compiles a test to determine whether iconv API takes ptr to const or
-    # non-const as the input buffer
-    set (CMAKE_REQUIRED_LIBRARIES ${ICONV_LIB})
-    check_cxx_source_compiles("
-    #include <iconv.h>
-    int main() {
-        const char* inbuf = 0;
-        iconv(0, &inbuf, 0, 0, 0);
-        return 0;
-    }"
-
-    CEGUI_ICONV_USES_CONST_INBUF)
+  # Already in cache, be silent
+  set(ICONV_FIND_QUIETLY TRUE)
 endif()

-mark_as_advanced(ICONV_H_PATH ICONV_LIB ICONV_LIB_GLIBC)
+find_path(ICONV_H_PATH iconv.h
+ /usr/include
+ /usr/local/include)
+
+set(POTENTIAL_ICONV_LIBS iconv libiconv libiconv2)
+
+find_library(ICONV_LIB NAMES ${POTENTIAL_ICONV_LIBS}
+	PATHS /usr/lib /usr/local/lib)
+
+if(WIN32)
+	set(ICONV_DLL_NAMES iconv.dll  libiconv.dll libiconv2.dll)
+	find_file(ICONV_DLL
+					NAMES ${ICONV_DLL_NAMES}
+					PATHS ENV PATH
+					NO_DEFAULT_PATH)
+	find_file(ICONV_DLL_HELP
+					NAMES ${ICONV_DLL_NAMES}
+					PATHS ENV PATH
+					${ICONV_H_PATH}/../bin)
+	if(ICONV_FIND_REQUIRED)
+		if(NOT ICONV_DLL AND NOT ICONV_DLL_HELP)
+			message(FATAL_ERROR "Could not find iconv.dll, please add correct your PATH environment variable")
+		endif()
+		if(NOT ICONV_DLL AND ICONV_DLL_HELP)
+			get_filename_component(ICONV_DLL_HELP ${ICONV_DLL_HELP} PATH)
+			message(STATUS)
+			message(STATUS "Could not find iconv.dll in standard search path, please add ")
+			message(STATUS "${ICONV_DLL_HELP}")
+			message(STATUS "to your PATH environment variable.")
+			message(STATUS)
+			message(FATAL_ERROR "exit cmake")
+		endif()
+	endif()
+	if(ICONV_H_PATH AND ICONV_LIB AND ICONV_DLL)
+   		set(ICONV_FOUND TRUE)
+	endif()
+else()
+	check_function_exists(iconv HAVE_ICONV_IN_LIBC)
+	if(ICONV_H_PATH AND HAVE_ICONV_IN_LIBC)
+   		set(ICONV_FOUND TRUE)
+		set(ICONV_LIB  CACHE TYPE STRING FORCE)
+	endif()
+	if(ICONV_H_PATH AND ICONV_LIB)
+   		set(ICONV_FOUND TRUE)
+	endif()
+endif()
+
+mark_as_advanced(ICONV_H_PATH ICONV_LIB)

 # set up output vars
 if (ICONV_FOUND)


config-ix.cmake: Search for CMAKE_XCRUN before using it.

This was previously searched in CMakeLists.txt unconditionally but as of
r294371 it is only searched in some circumstances. Repeating the search
in config-ix.cmake to make this robust and hopefully fix the macOS
Asan+Ubsan jenkins build.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@294811 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -547,6 +547,9 @@
 	"PATH to binutils/include containing plugin-api.h for gold plugin.")

 if(CMAKE_HOST_APPLE AND APPLE)
+  if(NOT CMAKE_XCRUN)
+    find_program(CMAKE_XCRUN NAMES xcrun)
+  endif()
   if(CMAKE_XCRUN)
     execute_process(COMMAND ${CMAKE_XCRUN} -find ld
       OUTPUT_VARIABLE LD64_EXECUTABLE


do not look for NSIS, let cpack find it

do not look for NSIS, let cpack find it

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@3175 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -25,10 +25,7 @@

 # NSIS
 if(WIN32)
-  find_program(NSIS_PROGRAM makensis MakeNSIS)
-  if(EXISTS ${NSIS_PROGRAM})
-    list(APPEND CPACK_GENERATOR "NSIS")
-  endif(EXISTS ${NSIS_PROGRAM})
+  list(APPEND CPACK_GENERATOR "NSIS")
   if(CMAKE_CL_64)
     set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
     set(win_system_name win64)


Disabled c++ warning 26812 'unscoped enums' temporary, tho Visual Studio doesn't seem to notice the disabled status (yet?).

--- src/cmake/toolchains/Windows-MSVC.cmake
+++ src/cmake/toolchains/Windows-MSVC.cmake
@@ -11,12 +11,12 @@

 	 # Setting the Visual Studio warning level to 4 and forcing MultiProccessor compilation
 	SET (C_FLAGS_COMMON		"${C_FLAGS_EXTRA} /W4 /MP /GR /fp:fast\
-					/wd4127 /wd4131 /wd4310 /wd4996 /wd4701 /wd4703"		)
+					/wd4127 /wd4131 /wd4310 /wd4996 /wd4701 /wd4703 /wd26812"		)
 	 #				# Disable warnings caused by external c libraries.
 	 # For zlib: C4244, C4245

 	SET (CXX_FLAGS_COMMON		"${CXX_FLAGS_EXTRA} /W4 /MP /GR /fp:fast /std:c++17\
-					/wd4127 /wd4131 /wd4310 /wd4996 /wd4701 /wd4703"		)
+					/wd4127 /wd4131 /wd4310 /wd4996 /wd4701 /wd4703 /wd26812"		)

 	 # Setting the exe to be a GUI application and not a console one.
 	SET (LINKER_FLAGS_COMMON	"/SUBSYSTEM:WINDOWS"		)


Small update

Small update

--- share/FindLustre.cmake
+++ share/FindLustre.cmake
@@ -82,23 +82,24 @@
   endif()

   file(MAKE_DIRECTORY ${LUSTRE_OUTPUT_DIR})
-  set(LUSTRE_GENERATED_FILES)
+  set(GLOBAL_LUSTRE_GENERATED_FILES)
   foreach(LFILE IN LISTS LUS_LUS_FILES)
     get_filename_component(L ${LFILE} NAME_WE)
-    list(APPEND LUSTRE_GENERATED_FILES ${LUSTRE_OUTPUT_DIR}/${L}.h ${LUSTRE_OUTPUT_DIR}/${L}.c)
+    set(LUSTRE_GENERATED_FILES ${LUSTRE_OUTPUT_DIR}/${L}.h ${LUSTRE_OUTPUT_DIR}/${L}.c)
+    list(APPEND GLOBAL_LUSTRE_GENERATED_FILES ${LUSTRE_GENERATED_FILES})
     add_custom_command(
       OUTPUT ${LUSTRE_GENERATED_FILES}
-      COMMAND ${LUSTRE_COMPILER} ${LUSTRE_REAL_OPT} -d ${LUSTRE_OUTPUT_DIR} ${LUS_LUS_FILES}
-      DEPENDS ${LUS_LUS_FILES}
+      COMMAND ${LUSTRE_COMPILER} ${LUSTRE_NODE_OPT} -d ${LUSTRE_OUTPUT_DIR} ${LFILE}
+      DEPENDS ${LFILE}
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-      COMMENT "Compile Lustre source(s): ${LUS_LUS_FILES}."
+      COMMENT "Compile Lustre source(s): ${LFILE}."
       )
+    set_source_files_properties(${LUSTRE_GENERATED_FILES} PROPERTIES GENERATED TRUE)
   endforeach()

-  set_source_files_properties(${LUSTRE_GENERATED_FILES} PROPERTIES GENERATED TRUE)
   include_directories(${LUSTRE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LUSTRE_OUTPUT_DIR})
   add_library(${LUS_LIBNAME} SHARED
-              ${LUSTRE_GENERATED_FILES} ${LUS_USER_C_FILES}
+              ${GLOBAL_LUSTRE_GENERATED_FILES} ${LUS_USER_C_FILES}
              )
   message(STATUS "Lustre: Added rule for building lustre library: ${LUS_LIBNAME}")
 endfunction(Lustre_Compile)


Delay load the OpenCV dlls by debug name as well

--- src/osvr/DelayLoad.cmake
+++ src/osvr/DelayLoad.cmake
@@ -4,7 +4,8 @@
         foreach(_dep ${ARGN})
             # Not perfectly elegant, but can't use generator expressions in LINK_FLAGS...
             set_property(TARGET ${_target} APPEND PROPERTY LINK_FLAGS "/DELAYLOAD:${_dep}${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}.dll")
+            set_property(TARGET ${_target} APPEND PROPERTY LINK_FLAGS "/DELAYLOAD:${_dep}${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}d.dll")
             target_link_libraries(${_target} PRIVATE DelayImp.lib)
         endforeach()
     endif()
-endfunction()+endfunction()


[travis] Fixed cram tests not running

[travis] Fixed cram tests not running

--- .cmake/Modules/Cram.cmake
+++ .cmake/Modules/Cram.cmake
@@ -46,13 +46,17 @@
   endif ()
 endif ()

-if (NOT ENV{PYTHON_BIN})
-  set (PYTHON "python")
+if ("$ENV{TRAVIS}" STREQUAL "true")
+  execute_process (COMMAND cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)
 else ()
-  set (PYTHON "$ENV{PYTHON_BIN}")
+  if (NOT ENV{PYTHON_BIN})
+    set (PYTHON "python")
+  else ()
+    set (PYTHON "$ENV{PYTHON_BIN}")
+  endif ()
+
+  execute_process (COMMAND ${PYTHON} -m cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)
 endif ()
-
-execute_process (COMMAND ${PYTHON} -m cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)

 if (NOT RES STREQUAL "0")
   message (FATAL_ERROR "Cram tests failed")


rename vigralibs/core => vigralibs/vigra_core

--- VigraAddTest.cmake
+++ VigraAddTest.cmake
@@ -76,9 +76,9 @@

     ADD_DEPENDENCIES(check_cpp ${target})
     ADD_DEPENDENCIES(ctest ${target})
-    ADD_DEPENDENCIES(${target} core)
+    ADD_DEPENDENCIES(${target} vigra_core)

-    TARGET_LINK_LIBRARIES(${target} core)
+    TARGET_LINK_LIBRARIES(${target} vigra_core)
     if(AT_LIBRARIES)
         TARGET_LINK_LIBRARIES(${target} ${AT_LIBRARIES})
     endif()


Re #106: point 8 update wcslib to 7.1

Re #106: point 8 update wcslib to 7.1

--- SuperBuild/External_wcslib.cmake
+++ SuperBuild/External_wcslib.cmake
@@ -19,8 +19,8 @@

 if((NOT DEFINED WCSLIB_LIBRARY_DIR OR NOT DEFINED WCSLIB_INCLUDE_DIR) AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})

-  set(WCSLIB_DOWNLOAD_VERSION "5.18" CACHE STRING "Version of WCSlib source package to download")
-  set_property(CACHE WCSLIB_DOWNLOAD_VERSION PROPERTY STRINGS "5.18")
+  set(WCSLIB_DOWNLOAD_VERSION "7.1" CACHE STRING "Version of WCSlib source package to download")
+  set_property(CACHE WCSLIB_DOWNLOAD_VERSION PROPERTY STRINGS "7.1")

   if(NOT DEFINED git_protocol)
     set(git_protocol "git")
@@ -33,7 +33,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/Punzo/wcslib"
-    GIT_TAG "e6e4570a42197a5ca1b494b0cd1f3175b114ac3e"
+    GIT_TAG "9b45438b15c6421e15da2c1a942fa9bd125339e7"
     SOURCE_DIR ${${proj}_SOURCE_DIR}
     BINARY_DIR ${${proj}_BINARY_DIR}
     CMAKE_CACHE_ARGS


ENH: Use Python 3 venv in the superbuild

--- Superbuild/External-Python.cmake
+++ Superbuild/External-Python.cmake
@@ -1,38 +1,15 @@
-#---------------------------------------------------------------------------
-# Get a Python with the itk package installed on Windows or create a
-# virtualenv to install the ITK package on Linux or Mac
+find_package(PythonInterp 3 REQUIRED)

+set(_itk_venv "${CMAKE_CURRENT_BINARY_DIR}/itkpython")
 if(WIN32)
-  # python.org 64 bit Windows Python with the itk and sphinx packages installed
-  # Todo: needs update
-  message(FATAL_ERROR "ITKExamples_USE_WRAP_PYTHON without PYTHON_EXECUTABLE set is currently not supported on Windows.")
-  set(_itk_python_dir "${CMAKE_CURRENT_BINARY_DIR}/itkpython")
-  set(ITKPYTHON_EXECUTABLE "${_itk_python_dir}/python.exe" CACHE FILEPATH "Python executable with the ITK package installed" FORCE)
-  ExternalProject_Add(ITKPython
-    URL "https://data.kitware.com/api/v1/file/58c760808d777f0aef5d798e/download"
-    URL_MD5 "440580cec3b86903da26f0246637024f"
-    DOWNLOAD_NAME itkpython.zip
-    DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}
-    SOURCE_DIR ${_itk_python_dir}
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND ""
-    INSTALL_COMMAND ""
-    )
+  set(ITKPYTHON_EXECUTABLE "${_itk_venv}/python.exe" CACHE FILEPATH "Python executable with the ITK package installed" FORCE)
 else()
-  find_package(PythonInterp REQUIRED)
+  set(ITKPYTHON_EXECUTABLE "${_itk_venv}/bin/python" CACHE FILEPATH "Python executable with the ITK package installed" FORCE)
+endif()

-  set(_virtualenv_version 15.0.1)
-  set(_virtualenv_SOURCE_DIR "virtualenv-${_virtualenv_version}")
-  set(_virtualenv_script "${CMAKE_CURRENT_BINARY_DIR}/${_virtualenv_SOURCE_DIR}/virtualenv.py")
-  set(_itk_venv "${CMAKE_CURRENT_BINARY_DIR}/itkpython")
-  set(ITKPYTHON_EXECUTABLE "${_itk_venv}/bin/python" CACHE FILEPATH "Python executable with the ITK package installed" FORCE)
-  ExternalProject_Add(ITKPython
-    URL "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-${_virtualenv_version}.tar.gz"
-    URL_MD5 "28d76a0d9cbd5dc42046dd14e76a6ecc"
-    DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}
-    SOURCE_DIR ${_virtualenv_SOURCE_DIR}
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND ${PYTHON_EXECUTABLE} "${_virtualenv_script}" "${_itk_venv}"
-    INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --pre itk sphinx
-    )
-endif()
+ExternalProject_Add(ITKPython
+  DOWNLOAD_COMMAND ""
+  CONFIGURE_COMMAND ""
+  BUILD_COMMAND ${PYTHON_EXECUTABLE} -m venv "${_itk_venv}"
+  INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --pre itk sphinx
+  )


Compilation Release with debug info par default

--- CMake/ConfigXsilium.cmake
+++ CMake/ConfigXsilium.cmake
@@ -25,7 +25,7 @@
 	if (CMAKE_BUILD_TYPE STREQUAL "")
 	  # CMake defaults to leaving CMAKE_BUILD_TYPE empty. This screws up
 	  # differentiation between debug and release builds.
-	  set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
+	  set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
 	endif ()

 	set(XSILIUM_INSTALL_PREFIX ${ROOT})


Add new printout for new settings (fast OpenGL handle translation).

--- CMake/PrintSettings.cmake
+++ CMake/PrintSettings.cmake
@@ -6,11 +6,12 @@
 message(STATUS "    * Irrlicht: ${IRRLICHT_FOUND}")
 message(STATUS " ")
 message(STATUS " -> Options set:")
-message(STATUS "    * Build static lib:           ${IRRIMGUI_STATIC_LIBRARY}")
-message(STATUS "    * Install media files:        ${IRRIMGUI_INSTALL_MEDIA_FILES}")
-message(STATUS "    * Build examples:             ${IRRIMGUI_BUILD_EXAMPLES}")
-message(STATUS "    * Direct Irrlicht Includes:   ${IRRIMGUI_IRRLICHT_DIRECT_INCLUDES}")
-message(STATUS "    * Use native OpenGL function: ${IRRIMGUI_NATIVE_OPENGL}")
+message(STATUS "    * Build static lib:             ${IRRIMGUI_STATIC_LIBRARY}")
+message(STATUS "    * Install media files:          ${IRRIMGUI_INSTALL_MEDIA_FILES}")
+message(STATUS "    * Build examples:               ${IRRIMGUI_BUILD_EXAMPLES}")
+message(STATUS "    * Direct Irrlicht Includes:     ${IRRIMGUI_IRRLICHT_DIRECT_INCLUDES}")
+message(STATUS "    * Use native OpenGL function:   ${IRRIMGUI_NATIVE_OPENGL}")
+message(STATUS "    * Fast OpenGL texture creation: ${IRRIMGUI_FAST_OPENGL_TEXTURE_CREATION}")
 message(STATUS " ")
 message(STATUS " -> Compiler settings:")
 message(STATUS "    * GCC like compiler:            ${GCC_LIKE_COMPILER}")


fix CMake module to not require OpenSplice but fall back gracefully (fix #79)

--- opensplice_cmake_module/cmake/Modules/FindOpenSplice.cmake
+++ opensplice_cmake_module/cmake/Modules/FindOpenSplice.cmake
@@ -90,7 +90,7 @@
   set(OpenSplice_FOUND TRUE)
 else()
   # try to find_package() it
-  find_package(opensplice NO_MODULE REQUIRED COMPONENTS CXX PATHS /usr /usr/local)
+  find_package(opensplice NO_MODULE COMPONENTS CXX PATHS /usr /usr/local)
   if(OPENSPLICE_FOUND)
     message(STATUS "Found PrismTech OpenSplice: ${opensplice_DIR}")
     set(OpenSplice_HOME "${OPENSPLICE_PREFIX}")


Improved the cache cmake script.

Improved the cache cmake script.


- removed odd statement

- removed odd statement

--- sedml/common/libsedml-package.h.cmake
+++ sedml/common/libsedml-package.h.cmake
@@ -39,18 +39,6 @@
  * <tt>libsedml-package.h.in</tt> by the @c configure script at the top
  * level of the libSEDML source tree.
  *
- * @note This file is handled unusually.  The file itself is generated by
- * @c configure, but unlike other files that are likewise automatically
- * generated, it is also checked into the source repository.  The need for
- * this is due to the fact that under Windows, developers may not be
- * running @c configure at all (e.g., if they are using the MSVC
- * environment).  The .h file therefore needs to be provided directly in
- * order for people to be able to compile the sources under Windows.
- * Developers must remember to check in the .h version of this file in the
- * source code repository prior to major releases, so that an up-to-date .h
- * file is present in distributions.  This is admittedly an undesirable and
- * error-prone situation, but it is currently the best alternative we have
- * been able to find.
  */


modules: updated FindCorrade.cmake.

modules: updated FindCorrade.cmake.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -119,7 +119,7 @@
 #
 #   This file is part of Corrade.
 #
-#   Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
+#   Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
 #             Vladimír Vondruš <mosra@centrum.cz>
 #
 #   Permission is hereby granted, free of charge, to any person obtaining a


change paraview tag to add the pointcloud representation plugin

--- Superbuild/versions.cmake
+++ Superbuild/versions.cmake
@@ -15,7 +15,7 @@
 set(PARAVIEW_VERSION 5.4)
 superbuild_set_revision(paraview
   GIT_REPOSITORY https://gitlab.kitware.com/bjacquet/paraview.git
-  GIT_TAG origin/5.4CustomForVeloview)
+  GIT_TAG origin/5.4CustomForVeloview-withPointCloudRepPlugin)

 superbuild_set_revision(veloview
     SOURCE_DIR ${CMAKE_SOURCE_DIR}/..


remove useless dependency udt3

remove useless dependency udt3

--- source/ConfigureChecks.cmake
+++ source/ConfigureChecks.cmake
@@ -25,7 +25,6 @@
   index_manager
   mock_index_manager
   febird
-  udt3
   izene_log
   bigint
   procmeminfo


suppress autological-compare warning with clang

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -66,7 +66,7 @@

 set(_target_suffix "__dds_connext_cpp")

-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-tautological-compare")

 add_library(${rosidl_generate_interfaces_TARGET}${_target_suffix} SHARED ${_generated_files})
 target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}


change ykt site settings for MPI to enable automatic find of mvapich

--- CMake/Site/ykt.cmake
+++ CMake/Site/ykt.cmake
@@ -1,2 +1,5 @@
+set(MPI_CXX_COMPILER /usr/lib64/mvapich2/bin/mpicxx)
+set(MPI_C_COMPILER /usr/lib64/mvapich2/bin/mpicc)
+
 set(SKV_ENV "BGAS" )
-set(SKV_MPI "MVAPICH2_RHEL65" )
+set(SKV_MPI "AUTO" )


Changed configuration to use vpm_include_directories

--- configure.cmake
+++ configure.cmake
@@ -5,4 +5,4 @@
   crunch_base
   crunch_containers)

-include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
+vpm_include_directories(${CMAKE_CURRENT_LIST_DIR}/include)


Force string pooling to workaround a codegen bug

Summary:
There are bugs in MSVC's codegen that causes `StringPiece`'s evaluated in a `constexpr` context to have the start pointer point to one copy of the string and the end pointer point to another. Using the `StringPiece` at compile-time is perfectly fine, it just has the wrong values at runtime.
We can work around this issue by enabling string pooling in all modes.

Original bug report:
https://developercommunity.visualstudio.com/content/problem/3216/c-incorrect-data-duplication-in-constexpr-context.html

Reviewed By: yfeldblum

Differential Revision: D5409753

fbshipit-source-id: 24e2b343209ba7c86d0dd39a1358d0abe9ee6d4d

--- CMake/FollyCompiler.cmake
+++ CMake/FollyCompiler.cmake
@@ -72,6 +72,7 @@
   target_compile_options(${THETARGET}
     PUBLIC
       /EHa # Enable both SEH and C++ Exceptions.
+      /GF # There are bugs with constexpr StringPiece when string pooling is disabled.
       /Zc:referenceBinding # Disallow temporaries from binding to non-const lvalue references.
       /Zc:rvalueCast # Enforce the standard rules for explicit type conversion.
       /Zc:implicitNoexcept # Enable implicit noexcept specifications where required, such as destructors.
@@ -95,14 +96,12 @@
       # Debug builds
       $<$<CONFIG:DEBUG>:
         /Gy- # Disable function level linking.
-        /GF- # Disable string pooling.

         $<$<BOOL:${MSVC_ENABLE_DEBUG_INLINING}>:/Ob2> # Add /Ob2 if allowing inlining in debug mode.
       >

       # Non-debug builds
       $<$<NOT:$<CONFIG:DEBUG>>:
-        /GF # Enable string pooling. (this is enabled by default by the optimization level, but we enable it here for clarity)
         /Gw # Optimize global data. (-fdata-sections)
         /Gy # Enable function level linking. (-ffunction-sections)
         /Qpar # Enable parallel code generation.


Squashed 'cmake/' changes from d206036..e4fe921

e4fe921 improved cpp tools
d34f916 include CMakeParseArguments

git-subtree-dir: cmake
git-subtree-split: e4fe921297d8644d2bfee611adcb57daf24e53a9

--- helpers.cmake
+++ helpers.cmake
@@ -14,6 +14,7 @@
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.

 set(HELPER_MODULES_PATH ${CMAKE_CURRENT_LIST_DIR})
+include(CMakeParseArguments)

 function(set_advanced_cpp_warnings TARGET)
@@ -201,12 +202,12 @@
     ARGUMENTS -quiet SOURCEFILE -- -std=c++11 INCLUDES DEFINITIONS)
   if(TARGET ${TARGET}_clang_tidy)
     set(CPP_TARGETS ${CPP_TARGETS} ${TARGET}_clang_tidy)
-  endif()
-
-  add_on_source(${TARGET}
-    NAME ${TARGET}_clang_tidy_fix
-    COMMAND clang-tidy
-    ARGUMENTS -quiet -fix -format-style=file SOURCEFILE -- -std=c++11 INCLUDES DEFINITIONS)
+
+    add_on_source(${TARGET}
+      NAME ${TARGET}_clang_tidy_fix
+      COMMAND clang-tidy
+      ARGUMENTS -quiet -fix -format-style=file SOURCEFILE -- -std=c++11 INCLUDES DEFINITIONS)
+  endif()

   add_on_source(${TARGET}
     NAME ${TARGET}_cppcheck
@@ -219,17 +220,26 @@
   add_on_source(${TARGET}
     NAME ${TARGET}_cppclean
     COMMAND cppclean
-    ARGUMENTS INCLUDES ALL_SOURCEFILES)
-  if(TARGET ${TARGET}_cppclean)
-    set(CPP_TARGETS ${CPP_TARGETS} ${TARGET}_cppclean)
-  endif()
-
-  add_on_source(${TARGET}
-    NAME ${TARGET}_iwyu
-    COMMAND iwyu
-    ARGUMENTS -std=c++11 -I/usr/include/clang/3.8/include INCLUDES DEFINITIONS SOURCEFILE)
-  if(TARGET ${TARGET}_iwyu)
-    set(CPP_TARGETS ${CPP_TARGETS} ${TARGET}_iwyu)
+    ARGUMENTS INCLUDES SOURCEFILE)
+  #if(TARGET ${TARGET}_cppclean)
+  #  set(CPP_TARGETS ${CPP_TARGETS} ${TARGET}_cppclean)
+  #endif()
+
+  add_on_source(${TARGET}
+    NAME ${TARGET}_vera
+    COMMAND vera++
+    ARGUMENTS --warning --no-duplicate --show-rule ALL_SOURCEFILES)
+  if(TARGET ${TARGET}_vera)
+    set(CPP_TARGETS ${CPP_TARGETS} ${TARGET}_vera)
+  endif()
+
+  get_target_property(INCLUDE_DIRECTORIES ${TARGET} INCLUDE_DIRECTORIES)
+  add_on_source(${TARGET}
+    NAME ${TARGET}_flint
+    COMMAND flint++
+    ARGUMENTS -v -r ALL_SOURCEFILES ${INCLUDE_DIRECTORIES})
+  if(TARGET ${TARGET}_flint)
+    set(CPP_TARGETS ${CPP_TARGETS} ${TARGET}_flint)
   endif()

   if(CPP_TARGETS)
@@ -260,19 +270,6 @@
     find_program(HAVE_GIT git)
     mark_as_advanced(HAVE_GIT)
     if(HAVE_GIT)
-
-      #add_custom_target(${TARGET}_version ALL
-      #  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/git_version/version.h)
-
-      #add_custom_command(
-      #  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/git_version/version.h
-      #  COMMAND ${CMAKE_COMMAND}
-      #  -DARGS_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}
-      #  -DARGS_DIFF_VAR=${ARGS_DIFF_VAR}
-      #  -DARGS_DPREFIX=${ARGS_DPREFIX}
-      #  -DARGS_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-      #  -DARGS_WITH_DIFF=${ARGS_WITH_DIFF}
-      #  -P ${HELPER_MODULES_PATH}/git_version.cmake)

       add_custom_target(${TARGET}_version ALL
         COMMAND ${CMAKE_COMMAND}


Fix the CMP0022 policy on CMake 2.8.12+

Fix the CMP0022 policy on CMake 2.8.12+

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -204,9 +204,16 @@
     set_target_properties(${_LIB_NAME} PROPERTIES DEFINE_SYMBOL ${_CEGUI_EXPORT_DEFINE})

     if (NOT CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES)
-        set_target_properties(${_LIB_NAME} PROPERTIES
-            LINK_INTERFACE_LIBRARIES ""
-        )
+        # Starting with CMake 2.8.12 LINK_INTERFACE_LIBRARIES was renamed to INTERFACE_LINK_LIBRARIES
+        if (${CMAKE_VERSION} VERSION_GREATER 2.8.12 OR ${CMAKE_VERSION} VERSION_EQUAL 2.8.12)
+            set_target_properties(${_LIB_NAME} PROPERTIES
+                INTERFACE_LINK_LIBRARIES ""
+            )
+        else()
+            set_target_properties(${_LIB_NAME} PROPERTIES
+                LINK_INTERFACE_LIBRARIES ""
+            )
+        endif()
     endif()

     if (APPLE)


Removed html documentation from cmake install

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -374,13 +374,6 @@
 	)
 endif()

-if(FAST_BUILD_DOCS)
-	install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
-        DESTINATION fast/doc
-		COMPONENT fast
-    )
-endif()
-
 # Create empty kernel_binaries folder for caching
 install(DIRECTORY
 	DESTINATION fast/kernel_binaries


gtest 1.5 fix

gtest 1.5 fix

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@725 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -134,17 +134,19 @@
     cmake_parse_arguments(PCL_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
     add_executable(${_exename} ${PCL_ADD_TEST_FILES})
     PCL_ADD_OPENMP_FLAGS(${_exename})
+    target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     # must link explicitly against boost only on Windows
     target_link_libraries(${_exename} ${Boost_LIBRARIES})
     #
     # Only link if needed
     if(UNIX)
       SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS -Wl,--as-needed)
+      # GTest >= 1.5 requires pthread and CMake's 2.8.4 FindGTest is broken
+      target_link_libraries(${_exename} pthread)
     elseif(WIN32)
       SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS /OPT:REF)
     endif()
     #
-    target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     PCL_LINK_OPENMP(${_exename})

     if(${CMAKE_VERSION} VERSION_LESS 2.8.4)


cmake: Add compiler check for -fstack-clash-protection

--- CompilerChecks.cmake
+++ CompilerChecks.cmake
@@ -73,6 +73,11 @@
         endif()
     endif (WITH_STACK_PROTECTOR_STRONG)

+    check_c_compiler_flag_ssp("-fstack-clash-protection" WITH_STACK_CLASH_PROTECTION)
+    if (WITH_STACK_CLASH_PROTECTION)
+        list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-clash-protection")
+    endif()
+
     if (PICKY_DEVELOPER)
         add_c_compiler_flag("-Wno-error=deprecated-declarations" SUPPORTED_COMPILER_FLAGS)
         add_c_compiler_flag("-Wno-error=tautological-compare" SUPPORTED_COMPILER_FLAGS)


the use of "extern template" forces to link task libraries to toolkits

This commit fixes a link bug, where port-related symbols
were not defined in the task libraries. This was caused by
the (new) usage of "extern template" in toolkits, which
speed up the compilation greatly. Caveat: one has to link
the toolkit to the task library, or the actual template
instanciation will not be found.

--- lib/orogen/templates/config/TaskLib.cmake
+++ lib/orogen/templates/config/TaskLib.cmake
@@ -27,9 +27,11 @@
 include_directories(${PROJECT_SOURCE_DIR}/<%= Generation::AUTOMATIC_AREA_NAME %>/toolkit)
 <% end %>
 <% related_toolkits = component.tasks.inject(ValueSet.new) { |set, task| set | task.used_toolkits }
- related_toolkits.each do |tk| %>
+related_toolkits.each do |tk| %>
 pkg_check_modules(<%= tk.name %>_TOOLKIT REQUIRED <%= tk.name %>-toolkit-${OROCOS_TARGET})
 include_directories(${<%= tk.name %>_TOOLKIT_INCLUDE_DIRS})
+link_directories(${<%= tk.name %>_TOOLKIT_LIBRARY_DIRS})
+list(APPEND <%= component.name.upcase %>_TASKLIB_DEPENDENT_LIBRARIES ${<%= tk.name %>_TOOLKIT_LIBRARIES})
 <% end %>

 <% component.used_libraries.each do |pkg|


fixed typo

fixed typo

--- CMake/OCL-UtilitiesUse.cmake
+++ CMake/OCL-UtilitiesUse.cmake
@@ -9,6 +9,6 @@
 #------------------------------------------------------------------------------
 # Where to look for includes and libraries
 #------------------------------------------------------------------------------
-include_directories( ${OCL-Utilities_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS})
+include_directories( ${OCL-Utilities_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIR})
 link_directories (${OCL-Utilities_LIBRARY_DIRS})


By default, do not install application headers

See issue #65

--- CMake/ctkMacroBuildApp.cmake
+++ CMake/ctkMacroBuildApp.cmake
@@ -27,7 +27,7 @@
 macro(ctkMacroBuildApp)
   ctkMacroParseArguments(MY
     "NAME;SRCS;MOC_SRCS;UI_FORMS;INCLUDE_DIRECTORIES;TARGET_LIBRARIES;RESOURCES"
-    ""
+    "INSTALL"
     ${ARGN}
     )

@@ -120,12 +120,14 @@
   target_link_libraries(${proj_name} ${my_libs})

   # Install headers
-  file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
-  install(FILES
-    ${headers}
-    ${dynamicHeaders}
-    DESTINATION ${CTK_INSTALL_INCLUDE_DIR} COMPONENT Development
-    )
+  if(MY_INSTALL)
+    file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
+    install(FILES
+      ${headers}
+      ${dynamicHeaders}
+      DESTINATION ${CTK_INSTALL_INCLUDE_DIR} COMPONENT Development
+      )
+  endif()

 endmacro()


Set _bundle_dest_dir as local variable

Set _bundle_dest_dir as local variable

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -53,6 +53,7 @@
         get_filename_component(_item_path \"\${full_path}\" PATH)
       endif()

+      set(_bundle_dest_dir \"${_bundle_dest_dir}\")
       if(_bundle_dest_dir)
         set(_plugins_path \"\${CMAKE_INSTALL_PREFIX}/${_bundle_dest_dir}/plugins\")
       else()


Cleaned up recent CMake module changes to use variable instead of string in regex matches.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -269,8 +269,8 @@
 macro (enable_pch)
     if (MSVC)
         foreach (FILE ${SOURCE_FILES})
-            if (${FILE} MATCHES \\.cpp$)
-                if (${FILE} MATCHES Precompiled\\.cpp$)
+            if (FILE MATCHES \\.cpp$)
+                if (FILE MATCHES Precompiled\\.cpp$)
                     set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS "/YcPrecompiled.h")
                 else ()
                     set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS "/YuPrecompiled.h")
@@ -280,7 +280,7 @@
     else ()
         # TODO: to enable usage of precompiled header in GCC, for now just make sure the correct Precompiled.h is found in the search
         foreach (FILE ${SOURCE_FILES})
-            if (${FILE} MATCHES Precompiled\\.h$)
+            if (FILE MATCHES Precompiled\\.h$)
                 get_filename_component (PATH ${FILE} PATH)
                 include_directories (${PATH})
                 break ()


Bug fix.

Bug fix.

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -100,12 +100,11 @@
             set(MY_CSC "xbuild")
         endif()
         if(DSN_BUILD_RUNTIME)
-            set(DSN_CORE_DLL "${OUTPUT_DIRECTORY}")
+            set(DSN_CORE_DLL "${OUTPUT_DIRECTORY}/lib/dsn.core.*")
         else()
-            set(DSN_CORE_DLL "${DSN_ROOT}")
-        endif()
-        #set(DSN_CORE_DLL "${DSN_CORE_DLL}/lib/libdsn.core.*")
-        file(GLOB DSN_CORE_DLL "${DSN_CORE_DLL}/lib/libdsn.core.*")
+            set(DSN_CORE_DLL "${DSN_ROOT}/lib/libdsn.core.*")
+        endif()
+        file(GLOB DSN_CORE_DLL "${DSN_CORE_DLL}")
         execute_process(
             COMMAND ${MY_CSC} "${CMAKE_CURRENT_BINARY_DIR}/${PROJ_NAME}.csproj"
             )


Revert the part of r8787 that stopped HAVE_OGRE_BUILDSETTINGS_H getting written to the OgreConfig.h; was breaking external builds

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -94,9 +94,12 @@
 configure_file(${OGRE_TEMPLATES_DIR}/buildsettings.h.in ${OGRE_BINARY_DIR}/include/buildsettings.h @ONLY)
 install(FILES ${OGRE_BINARY_DIR}/include/buildsettings.h DESTINATION include/OGRE)

-# Install OgreConfig.h file
-# This used to add HAVE_OGRE_BUILDSETTINGS_H to the top, which is a duplicate of adding -DHAVE_OGRE_BUILDSETTINGS_H
-install(FILES ${OGRE_SOURCE_DIR}/OgreMain/include/OgreConfig.h DESTINATION include/OGRE)
+# Read contents of the OgreConfig.h file
+file(READ "${OGRE_SOURCE_DIR}/OgreMain/include/OgreConfig.h" OGRE_CONFIG_H)
+# add HAVE_OGRE_BUILDSETTINGS_H preprocessor define
+file(WRITE ${OGRE_BINARY_DIR}/include/OgreConfig.h "#define HAVE_OGRE_BUILDSETTINGS_H\n${OGRE_CONFIG_H}")
+install(FILES ${OGRE_BINARY_DIR}/include/OgreConfig.h DESTINATION include/OGRE)
+

 # Create the pkg-config package files on Unix systems
 if (UNIX)


ENH: restrict the number of DCMTK modules

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -71,6 +71,8 @@
       -DDCMTK_OVERWRITE_WIN32_COMPILER_FLAGS:BOOL=OFF
       -DDCMTK_ENABLE_BUILTIN_DICTIONARY:BOOL=ON
       -DDCMTK_ENABLE_PRIVATE_TAGS:BOOL=ON
+      # restrict enabled modules to cut on build time
+      -DDCMTK_MODULES:STRING=ofstd;oflog;dcmdata;dcmsr;dcmiod;dcmfg;dcmseg;dcmimgle;dcmimage
     DEPENDS
       ${${proj}_DEPENDENCIES}
     )


cmake: Add doc comments in compiler_flags.cmake.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=76

Change-Id: Id4c31aeb4593c80cf6f0c40d2846ec52ba44c3bb

--- build/cmake/compiler_flags.cmake
+++ build/cmake/compiler_flags.cmake
@@ -13,6 +13,13 @@
 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)

+# Strings used to cache failed C/CXX flags.
+set(AOM_FAILED_C_FLAGS)
+set(AOM_FAILED_CXX_FLAGS)
+
+# Checks C compiler for support of $c_flag. Adds $c_flag to $CMAKE_C_FLAGS when
+# the compile test passes. Caches $c_flag in $AOM_FAILED_C_FLAGS when the test
+# fails.
 function (add_c_flag_if_supported c_flag)
   unset(C_FLAG_FOUND CACHE)
   string(FIND "${CMAKE_C_FLAGS}" "${c_flag}" C_FLAG_FOUND)
@@ -32,6 +39,9 @@
   endif ()
 endfunction ()

+# Checks C++ compiler for support of $cxx_flag. Adds $cxx_flag to
+# $CMAKE_CXX_FLAGS when the compile test passes. Caches $c_flag in
+# $AOM_FAILED_CXX_FLAGS when the test fails.
 function (add_cxx_flag_if_supported cxx_flag)
   unset(CXX_FLAG_FOUND CACHE)
   string(FIND "${CMAKE_CXX_FLAGS}" "${cxx_flag}" CXX_FLAG_FOUND)
@@ -52,6 +62,8 @@
   endif ()
 endfunction ()

+# Convenience method for adding a flag to both the C and C++ compiler command
+# lines.
 function (add_compiler_flag_if_supported flag)
   add_c_flag_if_supported(${flag})
   add_cxx_flag_if_supported(${flag})


Add experimental dependency builder for SWIG

This comes from a patch proposed for UseSWIG. However, some problems
seam to exist according to the bug report
(http://public.kitware.com/Bug/view.php?id=4147). We will need to see if
it works or not for us.

--- build/UseSWIG.cmake
+++ build/UseSWIG.cmake
@@ -4,6 +4,9 @@
 #     - Define swig module with given name and specified language
 #   SWIG_LINK_LIBRARIES(name [ libraries ])
 #     - Link libraries to swig module
+#   SWIG_GET_WRAPPER_DEPENDENCIES(swigFile genWrapper language DEST_VARIABLE)
+#     - Put dependencies of the wrapper genWrapper generated by swig from
+#     swigFile in DEST_VARIABLE
 # All other macros are for internal use only.
 # To get the actual name of the swig module,
 # use: ${SWIG_MODULE_${name}_REAL_NAME}.
@@ -77,6 +80,57 @@
       "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}")
   ENDFOREACH(it)
 ENDMACRO(SWIG_GET_EXTRA_OUTPUT_FILES)
+
+#
+# Get dependencies of the generated wrapper.
+#
+MACRO(SWIG_GET_WRAPPER_DEPENDENCIES swigFile genWrapper language DEST_VARIABLE)
+  GET_FILENAME_COMPONENT(swig_getdeps_basename ${swigFile} NAME_WE)
+  GET_FILENAME_COMPONENT(swig_getdeps_outdir ${genWrapper} PATH)
+  GET_SOURCE_FILE_PROPERTY(swig_getdeps_extra_flags "${swigFile}" SWIG_FLAGS)
+  IF("${swig_getdeps_extra_flags}" STREQUAL "NOTFOUND")
+    SET(swig_getdeps_extra_flags "")
+  ENDIF("${swig_getdeps_extra_flags}" STREQUAL "NOTFOUND")
+
+  IF(NOT swig_getdeps_outdir)
+    SET(swig_getdeps_outdir ${CMAKE_CURRENT_BINARY_DIR})
+  ENDIF(NOT swig_getdeps_outdir)
+  SET(swig_getdeps_depsfile
+    ${swig_getdeps_outdir}/swig_${swig_getdeps_basename}_deps.txt)
+  GET_DIRECTORY_PROPERTY(swig_getdeps_include_directories INCLUDE_DIRECTORIES)
+  SET(swig_getdeps_include_dirs)
+  FOREACH(it ${swig_getdeps_include_directories})
+    SET(swig_getdeps_include_dirs ${swig_getdeps_include_dirs} "-I${it}")
+  ENDFOREACH(it)
+  EXECUTE_PROCESS(
+    COMMAND ${SWIG_EXECUTABLE}
+    -MM -MF ${swig_getdeps_depsfile} ${swig_getdeps_extra_flags}
+    ${CMAKE_SWIG_FLAGS} -${language}
+    -o ${genWrapper} ${swig_getdeps_include_dirs} ${swigFile}
+    RESULT_VARIABLE swig_getdeps_result
+    ERROR_VARIABLE swig_getdeps_error
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  IF(NOT ${swig_getdeps_error} EQUAL 0)
+    MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -MM -MF ${swig_getdeps_depsfile} ${swig_getdeps_extra_flags} ${CMAKE_SWIG_FLAGS} -${language} -o ${genWrapper} ${swig_getdeps_include_dirs} ${swigFile}\" failed with output:\n${swig_getdeps_error}")
+    SET(swig_getdeps_dependencies "")
+  ELSE(NOT ${swig_getdeps_error} EQUAL 0)
+    FILE(READ ${swig_getdeps_depsfile} ${DEST_VARIABLE})
+    # Remove the first line
+    STRING(REGEX REPLACE "^.+: +\\\\\n +" ""
+      ${DEST_VARIABLE} "${${DEST_VARIABLE}}")
+    # Clean the end of each line
+    STRING(REGEX REPLACE " +(\\\\)?\n" "\n" ${DEST_VARIABLE}
+      "${${DEST_VARIABLE}}")
+    # Clean beginning of each line
+    STRING(REGEX REPLACE "\n +" "\n"
+      ${DEST_VARIABLE} "${${DEST_VARIABLE}}")
+    # clean paths
+    STRING(REGEX REPLACE "\\\\\\\\" "/" ${DEST_VARIABLE}
+      "${${DEST_VARIABLE}}")
+    STRING(REGEX REPLACE "\n" ";"
+      ${DEST_VARIABLE} "${${DEST_VARIABLE}}")
+  ENDIF(NOT ${swig_getdeps_error} EQUAL 0)
+ENDMACRO(SWIG_GET_WRAPPER_DEPENDENCIES)

 #
 # Take swig (*.i) file and add proper custom commands for it
@@ -162,6 +216,10 @@
   IF(SWIG_MODULE_${name}_EXTRA_FLAGS)
     SET(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS})
   ENDIF(SWIG_MODULE_${name}_EXTRA_FLAGS)
+  SWIG_GET_WRAPPER_DEPENDENCIES("${swig_source_file_fullname}"
+    "${swig_generated_file_fullname}" ${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}
+    swig_extra_dependencies)
+  LIST(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${swig_extra_dependencies})
   ADD_CUSTOM_COMMAND(
     OUTPUT "${swig_generated_file_fullname}" ${swig_extra_generated_files}
     # Let's create the ${swig_outdir} at execution time, in case dir contains $(OutDir)


fix: Turn on "ROSETTASTONE_WARNINGS_AS_ERRORS" and disable some warnings

- C4251, C4127, C4275, C4244, C4100, C4267, C4522, C4996, C4458, C4305, C4018

--- Builds/CMake/CompileOptions.cmake
+++ Builds/CMake/CompileOptions.cmake
@@ -3,7 +3,7 @@
 #

 # Set warnings as errors flag
-option(ROSETTASTONE_WARNINGS_AS_ERRORS "Treat all warnings as errors" OFF)
+option(ROSETTASTONE_WARNINGS_AS_ERRORS "Treat all warnings as errors" ON)
 if(ROSETTASTONE_WARNINGS_AS_ERRORS)
 	if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
 		set(WARN_AS_ERROR_FLAGS	"/WX")
@@ -78,10 +78,19 @@
 		/W4           # -> warning level 3
 		${WARN_AS_ERROR_FLAGS}

-		# /wd4251     # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2'
+		/wd4251       # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2' (caused by Torch)
 		# /wd4592     # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation)
 		# /wd4201     # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
-		# /wd4127     # -> disable warning: conditional expression is constant (caused by Qt)
+		/wd4127       # -> disable warning: conditional expression is constant (caused by Torch)
+		/wd4275		  # -> disable warning: non dll-interface class 'std::exception' used as base for dll-interface class 'c10::Error' (caused by Torch)
+		/wd4244       # -> disable warning: 'argument': conversion from 'int' to 'float', possible loss of data (caused by Torch)
+		/wd4100       # -> disable warning: 'other': unreferenced formal parameter (caused by Torch)
+		/wd4267       # -> disable warning: 'return': conversion from 'size_t' to 'uint32_t', possible loss of data (cased by Torch)
+		/wd4522       # -> disable warning: 'at::Tensor': multiple assignment operators specified (caused by Torch)
+		/wd4996       # -> disable warning: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead (caused by Torch)
+		/wd4458       # -> disable warning: declaration of 'pyobj' hides class member (caused by Torch)
+		/wd4305       # -> disable warning: 'initializing': truncation from 'double' to 'float' (caused by Torch)
+		/wd4018       # -> disable warning: '>': signed/unsigned mismatch (caused by Torch)

 		#$<$<CONFIG:Debug>:
 		#/RTCc        # -> value is assigned to a smaller data type and results in a data loss


Add make target to run after-install script manually.

--- build/cmake/install.cmake
+++ build/cmake/install.cmake
@@ -90,3 +90,8 @@
   install-hadoop-analytics
   COMMAND ${CMAKE_COMMAND} -D CMAKE_INSTALL_COMPONENT=hadoop-analytics -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
 )
+
+add_custom_target(
+  after-install
+  COMMAND ${CMAKE_SOURCE_DIR}/build/package/scripts/after-install 1
+)


Added macros for exceptions

Added macros for exceptions

--- build/macros.cmake
+++ build/macros.cmake
@@ -151,3 +151,30 @@
 		message(FATAL_ERROR "Compiler not recognized")
 	endif()
 endmacro()
+
+#MSVC exception logic
+set(EH_STRINGS "EH{a|s}{c|r}?\-?")
+macro(enable_structured_exceptions)
+	string (REGEX MATCH "${EH_STRINGS}" HAS_EH_FLAG "${CMAKE_CXX_FLAGS}")
+	if(HAS_EH_FLAG)
+		string(REGEX REPLACE "${EH_STRINGS}" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+	elseif(MSVC)
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")
+	endif()
+endmacro()
+macro(enable_synchronous_exceptions)
+	string (REGEX MATCH "${EH_STRINGS}" HAS_EH_FLAG "${CMAKE_CXX_FLAGS}")
+	if(HAS_EH_FLAG)
+		string(REGEX REPLACE "${EH_STRINGS}" "EHs" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+	elseif(MSVC)
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs")
+	endif()
+endmacro()
+macro(enable_only_cxx_exceptions)
+	string (REGEX MATCH "${EH_STRINGS}" HAS_EH_FLAG "${CMAKE_CXX_FLAGS}")
+	if(HAS_EH_FLAG)
+		string(REGEX REPLACE "${EH_STRINGS}" "EHsc" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+	elseif(MSVC)
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
+	endif()
+endmacro()


disable native CPU optimization when cross-compiling

--- build_options.cmake
+++ build_options.cmake
@@ -93,9 +93,11 @@
     endif()
 endif()

-option( TNUN_NATIVE_CPU_OPTIMIZATION "Perform optimizations specific to host CPU" true )
-if( ${TNUN_NATIVE_CPU_OPTIMIZATION} )
-    TNUN_add_compile_options( Release ${TNUN_native_optimization} )
+if( NOT ANDROID AND NOT iOS )
+    option( TNUN_NATIVE_CPU_OPTIMIZATION "Perform optimizations specific to host CPU" true )
+    if( ${TNUN_NATIVE_CPU_OPTIMIZATION} )
+        TNUN_add_compile_options( Release ${TNUN_native_optimization} )
+    endif()
 endif()

 ################################################################################


- Fix problem with Assimp loading on non-standard include directories

--- cmake/Modules/BuildOptions.cmake
+++ cmake/Modules/BuildOptions.cmake
@@ -87,6 +87,11 @@
 # Chromium Embedded Framework
 option ( COFFEE_BUILD_CEF "Build with CEF" OFF )

+if(COFFEE_BUILD_ASSIMP)
+    find_package(assimp REQUIRED)
+    include_directories(${ASSIMP_INCLUDE_DIR})
+endif()
+
 #
 #


[CMake] Fixing a typo

[CMake] Fixing a typo

This was called out on the list a long time ago and just got pointed out to me again. Need to fix it before I forget.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@272201 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -1,4 +1,4 @@
-function(llvm_create_cross_target_internal target_name toochain buildtype)
+function(llvm_create_cross_target_internal target_name toolchain buildtype)

   if(NOT DEFINED LLVM_${target_name}_BUILD)
     set(LLVM_${target_name}_BUILD "${CMAKE_BINARY_DIR}/${target_name}")


Refactor CMAKE_ARGS for WebP

Refactor CMAKE_ARGS for WebP

--- cmake/projects/WebP/hunter.cmake
+++ cmake/projects/WebP/hunter.cmake
@@ -55,39 +55,40 @@
     2b5aba3283e1f61b7d3c60a9b9eb97c3910806c1
 )

+set(
+    _hunter_webp_cmake_args
+    WEBP_BUILD_WEBP_JS=OFF
+    WEBP_ENABLE_NEAR_LOSSLESS=ON
+    WEBP_ENABLE_SIMD=ON
+    WEBP_ENABLE_SWAP_16BIT_CSP=OFF
+    WEBP_EXPERIMENTAL_FEATURES=OFF
+)
+
 if(ANDROID OR IOS)
-    hunter_cmake_args(
-        WebP
-        CMAKE_ARGS
-        WEBP_BUILD_ANIM_UTILS=OFF
-        WEBP_BUILD_CWEBP=OFF
-        WEBP_BUILD_DWEBP=OFF
-        WEBP_BUILD_GIF2WEBP=OFF
-        WEBP_BUILD_IMG2WEBP=OFF
-        WEBP_BUILD_WEBPINFO=OFF
-        WEBP_BUILD_WEBPMUX=OFF
-        WEBP_BUILD_WEBP_JS=OFF
-        WEBP_ENABLE_NEAR_LOSSLESS=ON
-        WEBP_ENABLE_SIMD=ON
-        WEBP_ENABLE_SWAP_16BIT_CSP=OFF
-        WEBP_EXPERIMENTAL_FEATURES=OFF
-    )
+  list(
+      APPEND
+      _hunter_webp_cmake_args
+      WEBP_BUILD_ANIM_UTILS=OFF
+      WEBP_BUILD_CWEBP=OFF
+      WEBP_BUILD_DWEBP=OFF
+      WEBP_BUILD_GIF2WEBP=OFF
+      WEBP_BUILD_IMG2WEBP=OFF
+      WEBP_BUILD_WEBPINFO=OFF
+      WEBP_BUILD_WEBPMUX=OFF
+  )
 else()
-    hunter_cmake_args(
-        WebP
-        CMAKE_ARGS
-        WEBP_ENABLE_SIMD=ON
-        WEBP_BUILD_CWEBP=ON
-        WEBP_BUILD_DWEBP=ON
-        WEBP_BUILD_GIF2WEBP=ON
-        WEBP_BUILD_IMG2WEBP=ON
-        WEBP_BUILD_WEBPINFO=ON
-        WEBP_BUILD_WEBP_JS=OFF
-        WEBP_ENABLE_NEAR_LOSSLESS=ON
-        WEBP_EXPERIMENTAL_FEATURES=OFF
-        WEBP_ENABLE_SWAP_16BIT_CSP=OFF
-    )
+  list(
+      APPEND
+      _hunter_webp_cmake_args
+      WEBP_BUILD_CWEBP=ON
+      WEBP_BUILD_DWEBP=ON
+      WEBP_BUILD_GIF2WEBP=ON
+      WEBP_BUILD_IMG2WEBP=ON
+      WEBP_BUILD_WEBPINFO=ON
+  )
 endif()
+
+hunter_cmake_args(WebP CMAKE_ARGS ${_hunter_webp_cmake_args})

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(WebP)


remove KML libs from GDAL binaires jira 743

--- CMake/External_GDAL.cmake
+++ CMake/External_GDAL.cmake
@@ -161,6 +161,22 @@
         BUILD_COMMAND ""
         INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory  ${GDAL_SB_SRC} ${CMAKE_INSTALL_PREFIX}
     )
+
+    ExternalProject_Add_Step(${proj} remove_libkml_headers
+        COMMAND ${CMAKE_COMMAND} -E remove_directory
+        ${CMAKE_INSTALL_PREFIX}/include/kml
+        DEPENDEES install
+    )
+     set(KMLLIBS)
+    foreach(KMLLIB "base" "convenience" "regionator" "dom" "engine" "xsd")
+        ExternalProject_Add_Step(${proj} remove_libkml_${KMLLIB}
+        COMMAND ${CMAKE_COMMAND} -E remove
+        ${CMAKE_INSTALL_PREFIX}/lib/libkml${KMLLIB}.lib
+        DEPENDEES remove_libkml_headers
+    )
+    list(APPEND KMLLIBS ${proj}_${KMLLIB})
+    endforeach()
+

   endif()


Revert "Updated boost.compute to latest develop commit"

This reverts commit 98e023d7a10e301f793c04246c80bcc1c1bcfd1b.

--- CMakeModules/build_boost_compute.cmake
+++ CMakeModules/build_boost_compute.cmake
@@ -1,9 +1,9 @@
 # If using a commit, remove the v prefix to VER in URL.
 # If using a tag, don't use v in VER
 # This is because of how github handles it's release tar balls
-SET(VER 523d8e974559977fab006190e9d40eb2e4f87bd0)
-SET(URL https://github.com/boostorg/compute/archive/${VER}.tar.gz)
-SET(MD5 bbce9e2730e449db5c8f88eae160ea12)
+SET(VER 0.5)
+SET(URL https://github.com/boostorg/compute/archive/v${VER}.tar.gz)
+SET(MD5 69a52598ac539d3b7f6005a3dd2b6f58)

 SET(thirdPartyDir "${CMAKE_BINARY_DIR}/third_party")
 SET(srcDir "${thirdPartyDir}/compute-${VER}")


missing mono should not cause fatal error

--- cmake/FindUnityMono.cmake
+++ cmake/FindUnityMono.cmake
@@ -39,7 +39,7 @@
       mono_version_tmp "${mono_version_str}")
   set(MONO_VERSION ${mono_version_tmp} CACHE STRING "Mono version")
 else()
-  message(FATAL_ERROR "Cannot find mono.")
+  message(STATUS "Cannot find mono.")
 endif()

 if(FIREBASE_INCLUDE_UNITY)


Cherry picked XLink macos fix

Cherry picked XLink macos fix

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -7,9 +7,9 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2021.3-develop"
-    URL "https://github.com/luxonis/XLink/archive/4c149080d22c35a17ce285f5bca99f2b2fe05e46.tar.gz"
-    SHA1 "64b0a8bfeb1a91f909df88ea8b1d0b17885b92ff"
+    VERSION "luxonis-2021.4-master"
+    URL "https://github.com/luxonis/XLink/archive/c06b86675b8d0fd512ae30fe666eff48468036de.tar.gz"
+    SHA1 "58ff7125729b79b726e23563046b61fcbc659f95"
 )

 hunter_config(


Updated XLink dependency

Updated XLink dependency

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -14,8 +14,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2020.2"
-    URL "https://github.com/luxonis/XLink/archive/luxonis-2020.2.tar.gz"
-    SHA1 "ef288d62fa25c182fbad8df2686060809f0bd440"
+    URL "https://github.com/luxonis/XLink/archive/cc33e15c01453742799c945cf443c177d824f76b.tar.gz"
+    SHA1 "950b00439022850b951aa97164ea335a611e2f8f"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
 )


updated for usb fetch wip

updated for usb fetch wip

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -13,9 +13,9 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2020.2-test-2"
+    VERSION "luxonis-2020.2-test-4"
     URL "/Users/blackbird/Desktop/codes/Luxonis/new_build_system/XLink.zip"
-    SHA1 "c9be7a3a71cc48c33bf750be276d18a3adb99ed9"
+    SHA1 "ad1bbaccfa548860274a040f5d17b6c8533ae5fa"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
 )


add a comment, test=document_fix (#28008)

--- cmake/external/gloo.cmake
+++ cmake/external/gloo.cmake
@@ -20,6 +20,7 @@
 SET(GLOO_INSTALL_DIR   ${THIRD_PARTY_PATH}/install/gloo)
 SET(GLOO_INCLUDE_DIR   "${GLOO_INSTALL_DIR}/include" CACHE PATH "gloo include directory." FORCE)
 SET(GLOO_LIBRARY_DIR   "${GLOO_INSTALL_DIR}/lib" CACHE PATH "gloo library directory." FORCE)
+# As we add extra features for gloo, we use the non-official repo
 SET(GLOO_REPOSITORY    https://github.com/sandyhouse/gloo.git)
 SET(GLOO_TAG           v0.0.2)
 SET(GLOO_LIBRARIES     "${GLOO_INSTALL_DIR}/lib/libgloo.a" CACHE FILEPATH "gloo library." FORCE)


fix snap package filename

fix snap package filename

--- cmake/packages/snap.cmake
+++ cmake/packages/snap.cmake
@@ -7,7 +7,7 @@
 if(SNAPCRAFT_FOUND)
   set(SNAPCRAFT_TEMPLATE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Installation/Ubuntu")
   set(SNAPCRAFT_SOURCE_DIR "${CMAKE_BINARY_DIR}/_CPack_Packages/SNAP")
-  set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}.snap")
+  set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${ARANGODB_PACKAGE_ARCHITECTURE}.snap")

   message(STATUS "Creating snap package")


clean out the working directory for snap - just in case.

--- cmake/packages/snap.cmake
+++ cmake/packages/snap.cmake
@@ -32,8 +32,13 @@
     DESTINATION "${SNAPCRAFT_SOURCE_DIR}/"
     )

+snapcraft clean arangodb3 -s pull
+
+arangodb3
+
   add_custom_target(snap
     COMMENT "create snap-package"
+    COMMAND ${SNAP_EXE} clean ${CPACK_PACKAGE_NAME}
     COMMAND ${SNAP_EXE} snap
     COMMAND ${CMAKE_COMMAND} -E copy ${SNAPCRAFT_SOURCE_DIR}/${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}*_${ARANGODB_PACKAGE_ARCHITECTURE}.snap ${PROJECT_BINARY_DIR}
     DEPENDS TGZ_package