qi_install_header : check that first arg is a target

--- cmake/qibuild/install.cmake
+++ cmake/qibuild/install.cmake
@@ -36,6 +36,7 @@
     qi_error("No headers specified")
   endif()

+  _qi_check_is_target(${target})
   # Handle ${target}_INTERNAL
   set(_should_install TRUE)
   if(${${target}_INTERNAL})


- Remove .exe suffix from glslc executable because... duh... we support linux

--- cmake/shader_compiler.cmake
+++ cmake/shader_compiler.cmake
@@ -3,7 +3,7 @@
 macro(add_shader_vulkan)
 	# example: C:\VulkanSDK\1.2.170.0\Bin\glslc.exe
 	set(VK_BIN_DIR $ENV{VK_SDK_PATH}/Bin)
-	set(VK_GLSLC_EXECUTABLE_PATH ${VK_BIN_DIR}/glslc.exe)
+	set(VK_GLSLC_EXECUTABLE_PATH ${VK_BIN_DIR}/glslc)

 	set(shader_path ${PROJECT_SOURCE_DIR}/${SHADER})
 	set(processed_shader_name ${SHADER}.glsl)


Fix CMake version check when Python3 is enabled

--- cmake/snippets/python.cmake
+++ cmake/snippets/python.cmake
@@ -21,6 +21,10 @@
     set(Python_ADDITIONAL_VERSIONS
       3
       ${PYTHON_VERSION})
+
+    if (CMAKE_VERSION VERSION_LESS "2.8.8")
+      message(WARNING "Python 3 support may not work with CMake versions older than 2.8.8")
+    endif ()
   endif ()

   # This is to avoid Boost.Python's headers to have __declspec(dllimport) in
@@ -31,8 +35,4 @@
   if (VISTK_HACK_LINK_BOOST_PYTHON_STATIC)
     add_definitions(-DBOOST_PYTHON_STATIC_LIB)
   endif ()
-
-  if (CMAKE_VERSION VERSION_LESS "2.8.8")
-    message(WARNING "Python 3 support may not work with CMake versions older than 2.8.8")
-  endif ()
 endif ()


Changed the target file for Doxygn to Doxyfile

--- cmake_scripts/doxygen.cmake
+++ cmake_scripts/doxygen.cmake
@@ -2,7 +2,7 @@
     find_package(Doxygen)
     if (DOXYGEN_FOUND)

-        set(DOXYGEN_INPUT Doxygen)
+        set(DOXYGEN_INPUT Doxyfile)
         set(DOXYGEN_OUTPUT doc/html)

         add_custom_command(


px4fmu-v2_test.cmake: remove inav

px4fmu-v2_test.cmake: remove inav

--- cmake/configs/nuttx_px4fmu-v2_test.cmake
+++ cmake/configs/nuttx_px4fmu-v2_test.cmake
@@ -98,7 +98,7 @@
 	# Estimation modules
 	#
 	modules/attitude_estimator_q
-	modules/position_estimator_inav
+	#modules/position_estimator_inav
 	modules/local_position_estimator
 	modules/ekf2


ARROW-8587: [C++] Fix linking Flight benchmarks

Closes #7031 from pitrou/ARROW-8587-flight-benchmark-boost

Authored-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
Signed-off-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -703,9 +703,10 @@

 # - Parquet requires boost only with gcc 4.8 (because of missing std::regex).
 # - Gandiva has a compile-time (header-only) dependency on Boost, not runtime.
-# - Tests needs Boost at runtime.
+# - Tests and Flight benchmarks need Boost at runtime.
 if(ARROW_BUILD_INTEGRATION
    OR ARROW_BUILD_TESTS
+   OR (ARROW_FLIGHT AND ARROW_BUILD_BENCHMARKS)
    OR ARROW_GANDIVA
    OR (ARROW_WITH_THRIFT AND Thrift_SOURCE STREQUAL "BUNDLED")
    OR (ARROW_PARQUET


Fix rcc compiler call

Fix rcc compiler call

--- Modules/CppMicroServices/cmake/usFunctionEmbedResources.cmake
+++ Modules/CppMicroServices/cmake/usFunctionEmbedResources.cmake
@@ -184,7 +184,7 @@
     add_custom_command(
       TARGET ${US_RESOURCE_TARGET}
       POST_BUILD
-      COMMAND ${resource_compiler} --append $<TARGET_FILE:${US_RESOURCE_TARGET}> ${US_RESOURCE_MODULE_NAME} ${_zip_archive}
+      COMMAND ${resource_compiler} --append $<TARGET_FILE:${US_RESOURCE_TARGET}> ${_zip_archive}
       WORKING_DIRECTORY ${US_RESOURCE_WORKING_DIRECTORY}
       COMMENT "Appending zipped resources to ${US_RESOURCE_TARGET}"
       VERBATIM


Cache RUN_${FEATURE} variable in CXXFeatureCheck.cmake (#886)

When cross-compiling, this variable was not set on the second run
of CMake, resulting in the next check failing even though it shouldn't
be run in the first place. Fix this by caching the variable.

--- cmake/CXXFeatureCheck.cmake
+++ cmake/CXXFeatureCheck.cmake
@@ -37,9 +37,9 @@
       if(COMPILE_${FEATURE})
         message(WARNING
               "If you see build failures due to cross compilation, try setting HAVE_${VAR} to 0")
-        set(RUN_${FEATURE} 0)
+        set(RUN_${FEATURE} 0 CACHE INTERNAL "")
       else()
-        set(RUN_${FEATURE} 1)
+        set(RUN_${FEATURE} 1 CACHE INTERNAL "")
       endif()
     else()
       message(STATUS "Performing Test ${FEATURE}")


Add missing SYSTEM to include of pybind11 headers

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -410,6 +410,7 @@
     endif()

     include_directories(
+        SYSTEM
         ${PYBIND11_INCLUDE_DIRS}
     )
 endif()


Another try

Another try

--- cmake/FindOpenImageIO.cmake
+++ cmake/FindOpenImageIO.cmake
@@ -32,7 +32,7 @@
 find_path(OIIO_INCLUDE_DIR OpenImageIO/version.h
   HINTS
     ENV OIIO_HOME
-  PATH_SUFFIXES include local/include
+  PATH_SUFFIXES include/ local/include/
   PATHS
   ~/Library/Frameworks
   /Library/Frameworks


Add more SDK path hints

Add more SDK path hints

FindSDK now considers the SDK_DIR and SAMP_SDK_DIR as well as corresponding
environment variables.

Also add "sdk" to PATH_SUFFIXES.

--- cmake/Modules/FindSDK.cmake
+++ cmake/Modules/FindSDK.cmake
@@ -1,8 +1,11 @@
 include(FindPackageHandleStandardArgs)

-find_path(SDK_INCLUDE_DIR NAMES "plugin.h" "plugincommon.h"
-          PATHS ENV "SAMP_SDK_DIR"
-          PATH_SUFFIXES "SDK"
+find_path(SDK_INCLUDE_DIR NAMES plugin.h plugincommon.h
+          HINTS ${SAMP_SDK_DIR}
+                ENV SAMP_SDK_DIR
+                ${SDK_DIR}
+                ENV SDK_DIR
+          PATH_SUFFIXES sdk SDK
           DOC "Path to SA-MP plugin SDK"
           NO_SYSTEM_ENVIRONMENT_PATH
           NO_CMAKE_SYSTEM_PATH)


No longer linking libmalloc_proxy.so

No longer linking libmalloc_proxy.so

--- cmake/Modules/FindTBB.cmake
+++ cmake/Modules/FindTBB.cmake
@@ -25,13 +25,7 @@
     HINTS ${TBB_LIBRARY_DIRS}
 )

-find_library(
-    TBB_MALLOC_PROXY_LIBRARY
-    NAMES tbbmalloc_proxy${TBB_LIB_SUFFIX}
-    HINTS ${TBB_LIBRARY_DIRS}
-)
-
-set(TBB_LIBRARIES ${TBB_MALLOC_LIBRARY} ${TBB_MALLOC_PROXY_LIBRARY} ${TBB_MAIN_LIBRARY})
+set(TBB_LIBRARIES ${TBB_MALLOC_LIBRARY} ${TBB_MAIN_LIBRARY})

 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(


More robust handling of numpy versions

More robust handling of numpy versions

--- cmake/Packages/Python.cmake
+++ cmake/Packages/Python.cmake
@@ -24,9 +24,9 @@
         OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
         OUTPUT_STRIP_TRAILING_WHITESPACE)
       SET(NUMPY_INCLUDE_DIR ${NUMPY_INCLUDE_DIR} CACHE STRING "Numpy directory")
-      STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" NUMPY_VERSION_MAJOR "${NUMPY_VERSION}")
-      STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" NUMPY_VERSION_MINOR "${NUMPY_VERSION}")
-      STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" NUMPY_VERSION_PATCH "${NUMPY_VERSION}")
+      STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" NUMPY_VERSION_MAJOR "${NUMPY_VERSION}")
+      STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" NUMPY_VERSION_MINOR "${NUMPY_VERSION}")
+      STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" NUMPY_VERSION_PATCH "${NUMPY_VERSION}")
       MESSAGE(STATUS "  * numpy:    version ${NUMPY_VERSION}; headers ${NUMPY_INCLUDE_DIR}")
     ELSE()
       SET(NUMPY_FOUND FALSE CACHE BOOL "Numpy found successfully" FORCE)


Use Boost 1.58.0-p1 for MinGW

Use Boost 1.58.0-p1 for MinGW

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -37,7 +37,6 @@
 hunter_config(Async++ VERSION 0.0.3-hunter)
 hunter_config(Avahi VERSION 0.6.31)
 hunter_config(BZip2 VERSION 1.0.6-p1)
-hunter_config(Boost VERSION 1.60.0)
 hunter_config(BoostCompute VERSION 0.5-p0)
 hunter_config(BoostProcess VERSION 0.5)
 hunter_config(CLAPACK VERSION 3.2.1)
@@ -112,6 +111,14 @@
 hunter_config(ZeroMQ VERSION 4.1.4-p2)
 hunter_config(Protobuf VERSION 3.0.0-beta-2)

+if(MINGW)
+  # 1.60.0 broken:
+  # * https://ci.appveyor.com/project/ingenue/hunter/build/1.0.216/job/twgm1vpxgn6w6dds
+  hunter_config(Boost VERSION 1.58.0-p1)
+else()
+  hunter_config(Boost VERSION 1.60.0)
+endif()
+
 if(MINGW OR MSVC80)
   hunter_config(GTest VERSION 1.7.0-hunter-6)
 else()


Add OpenSSL bin directory to PATH

Add OpenSSL bin directory to PATH

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -58,6 +58,22 @@

   get_property(_additional_paths GLOBAL PROPERTY MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS)

+  if(TARGET OpenSSL::SSL)
+    if(GLS_DEBUG)
+      get_target_property(_openssl_location OpenSSL::SSL IMPORTED_LOCATION_DEBUG)
+    else()
+      get_target_property(_openssl_location OpenSSL::SSL IMPORTED_LOCATION_RELEASE)
+    endif()
+    if(_openssl_location)
+      get_filename_component(_openssl_location ${_openssl_location} DIRECTORY)
+      set(_openssl_location "${_openssl_location}/../../bin")
+      if(EXISTS ${_openssl_location})
+        get_filename_component(_openssl_location ${_openssl_location} ABSOLUTE)
+        list(APPEND _dir_candidates ${_openssl_location})
+      endif()
+    endif()
+  endif()
+
   if(MITK_USE_HDF5)
     FIND_PACKAGE(HDF5 COMPONENTS C HL NO_MODULE REQUIRED shared)
     get_target_property(_location hdf5-shared LOCATION)


Updated auto-versioning to work with git-svnversion helper script for git-svn repositories

git-svn-id: cba43cac54c7347152078120010007b120454a54@2569 fa922fa7-2fde-0310-acd8-f43f465a7996

--- CMake_install_options.cmake
+++ CMake_install_options.cmake
@@ -36,7 +36,7 @@

 # users may not have subversion installed, search for it and set an unknown version if that is
 # the case
-find_program(SVNVERSION_EXE "svnversion" DOC "svnversion executable")
+find_program(SVNVERSION_EXE NAMES "git-svnversion.sh" "svnversion" DOC "svnversion executable")
 mark_as_advanced(SVNVERSION_EXE)
 if (SVNVERSION_EXE)
     exec_program(${SVNVERSION_EXE} ${HOOMD_SOURCE_DIR} ARGS ${HOOMD_SOURCE_DIR} OUTPUT_VARIABLE SVNVERSION)


ENH: Missing GTest

ENH: Missing GTest

--- utilities/SimpleRTK/SimpleRTKWithSwig.cmake
+++ utilities/SimpleRTK/SimpleRTKWithSwig.cmake
@@ -86,6 +86,23 @@
   list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES Swig)
 endif()

+#------------------------------------------------------------------------------
+# Google Test
+#------------------------------------------------------------------------------
+option( USE_SYSTEM_GTEST "Use a pre-compiled version of GoogleTest. " OFF )
+mark_as_advanced(USE_SYSTEM_GTEST)
+if ( BUILD_TESTING )
+  if (USE_SYSTEM_GTEST)
+    find_package( GTest REQUIRED )
+    list(APPEND SimpleRTK_VARS GTEST_LIBRARIES GTEST_INCLUDE_DIRS GTEST_MAIN_LIBRARIES)
+  else()
+    include(External_GTest)
+    set( GTEST_ROOT ${GTEST_ROOT} )
+    list(APPEND SimpleRTK_VARS GTEST_ROOT)
+    list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES GTest)
+  endif()
+endif()
+
 # We need python virtualenv
 #------------------------------------------------------------------------------
 # Python virtualenv


Fixed a binding issue in FW

Fixed a binding issue in FW

--- 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 "f7161557bbeb0d491841c8d0146141d610d91535")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "af62791b09e10086a13e1c1805176bf1db3e2802")

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


Update FW: OV9782 on RGB socket, working with OV9282 on L/R

--- 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 "2f108d8888ca6c318efba10fb0a8859d1e21d2dc")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "c2bf875327990b95a84aaa0e5d5fe05fa68e0592")

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


Update FW to 2.8.0

Update FW to 2.8.0

--- 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 "f5da60c9f0ff03c61605a7670ae2396a731ef5ac")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "c0a7810c9c1e7678ae65035b8f23d4cac6beb568")

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


Update FW before merge

Update FW before merge

--- 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 "bdcb5732313d56ae83cf2e1ca3148f647df7383d")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "4b6bbaa4b9c6f9fdfbb05badbda6d1cdcded63b4")

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


Build serdis / sercon with size optimization

--- cmake/configs/nuttx_px4fmu-v1_default.cmake
+++ cmake/configs/nuttx_px4fmu-v1_default.cmake
@@ -175,10 +175,12 @@
 set_target_properties(sercon PROPERTIES
 	PRIORITY "SCHED_PRIORITY_DEFAULT"
 	MAIN "sercon"
-	STACK_MAIN "2048")
+	STACK_MAIN "2048"
+	COMPILE_FLAGS "-Os")

 add_custom_target(serdis)
 set_target_properties(serdis PROPERTIES
 	PRIORITY "SCHED_PRIORITY_DEFAULT"
 	MAIN "serdis"
-	STACK_MAIN "2048")
+	STACK_MAIN "2048"
+	COMPILE_FLAGS "-Os")


px4fmu-v5:Added support for I2C LED driver

--- cmake/configs/nuttx_px4fmu-v5_default.cmake
+++ cmake/configs/nuttx_px4fmu-v5_default.cmake
@@ -43,6 +43,7 @@
 	drivers/pwm_out_sim
 	drivers/px4flow
 	drivers/px4fmu
+	drivers/rgbled
 	drivers/rgbled_pwm
 	drivers/sdp3x_airspeed
 	drivers/sf0x


Bump builtin version of Vc to 1.3.3

Bump builtin version of Vc to 1.3.3

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1347,7 +1347,7 @@
 endif()

 if(vc AND NOT Vc_FOUND)
-  set(Vc_VERSION "1.3.2")
+  set(Vc_VERSION "1.3.3")
   set(Vc_PROJECT "Vc-${Vc_VERSION}")
   set(Vc_SRC_URI "${lcgpackages}/${Vc_PROJECT}.tar.gz")
   set(Vc_DESTDIR "${CMAKE_BINARY_DIR}/externals")
@@ -1357,7 +1357,7 @@

   ExternalProject_Add(VC
     URL     ${Vc_SRC_URI}
-    URL_HASH SHA256=3eae2b05836a1a57545e624b38345ad33cfde23d527e12575edde784c4c330ee
+    URL_HASH SHA256=08c629d2e14bfb8e4f1a10f09535e4a3c755292503c971ab46637d2986bdb4fe
     BUILD_IN_SOURCE 0
     BUILD_BYPRODUCTS ${Vc_LIBRARY}
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1


[PyROOT][CMake] Prevent pyroot=OFF and pyroot_legacy=ON

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1556,6 +1556,10 @@

 #---Check for PyROOT legacy---------------------------------------------------------------
 if(pyroot_legacy)
+  if(NOT pyroot)
+    message(FATAL_ERROR "pyroot_legacy is ON but pyroot is OFF. Please reconfigure with -Dpyroot=ON")
+  endif()
+
   if(fail-on-missing AND (NOT PYTHONLIBS_FOUND AND NOT Python2_Interpreter_Development_FOUND AND NOT Python3_Interpreter_Development_FOUND))
     message(FATAL_ERROR "PyROOT: Python development package not found and pyroot legacy component required"
                         " (python executable: ${PYTHON_EXECUTABLE})")


Change name of variable so -D TRILINOS_LIB_DIR=... can be used

--- fastlib/trunk/CMake/FindTrilinos.cmake
+++ fastlib/trunk/CMake/FindTrilinos.cmake
@@ -4,7 +4,7 @@
 # It sets TRILINOS_INCLUDE_DIR and TRILINOS_LIBS and also finds MPI_INCLUDE_DIR

 ## Location of trilinos
-set(TRILINOS_BASE_DIR /usr/local CACHE PATH
+set(TRILINOS_LIB_DIR /usr/local/lib CACHE PATH
   "Directory where trilinos is installed.")

 ## library
@@ -17,14 +17,14 @@
     set(trilinos_lib trilinos_lib-NOTFOUND CACHE INTERNAL "")
     find_library(trilinos_lib ${lib}
         PATHS
-        ${TRILINOS_BASE_DIR}/lib
+        ${TRILINOS_LIB_DIR}
         /opt/trilinos/lib
     )
     if(NOT trilinos_lib)
         # try looking for libtrilinos_${lib}
         find_library(trilinos_lib trilinos_${lib}
             PATHS
-            ${TRILINOS_BASE_DIR}/lib
+            ${TRILINOS_LIB_DIR}
             /opt/trilinos/lib
         )
         if(NOT trilinos_lib)
@@ -37,7 +37,7 @@
 ## include dirs
 find_path(TRILINOS_INCLUDE_DIR Trilinos_version.h
     PATHS
-    ${TRILINOS_BASE_DIR}/include
+    ${TRILINOS_LIB_DIR}/../include
     /opt/trilinos/include
     PATH_SUFFIXES
     trilinos


Replace PATHS by HINTS to avoid getting the system installed ROOT (e.g. lxplus)

--- etc/cmake/FindROOT.cmake
+++ etc/cmake/FindROOT.cmake
@@ -15,7 +15,7 @@
 #  dependencies in ROOT_GENERATE_DICTIONARY

 find_program(ROOT_CONFIG_EXECUTABLE root-config
-  PATHS $ENV{ROOTSYS}/bin)
+  HINTS $ENV{ROOTSYS}/bin)

 execute_process(
     COMMAND ${ROOT_CONFIG_EXECUTABLE} --prefix
@@ -77,8 +77,8 @@
 mark_as_advanced(ROOT_CONFIG_EXECUTABLE)

 include(CMakeParseArguments)
-find_program(ROOTCINT_EXECUTABLE rootcint PATHS $ENV{ROOTSYS}/bin)
-find_program(GENREFLEX_EXECUTABLE genreflex PATHS $ENV{ROOTSYS}/bin)
+find_program(ROOTCINT_EXECUTABLE rootcint HINTS $ENV{ROOTSYS}/bin)
+find_program(GENREFLEX_EXECUTABLE genreflex HINTS $ENV{ROOTSYS}/bin)
 find_package(GCCXML)

 #----------------------------------------------------------------------------
@@ -105,7 +105,7 @@
         endif()
       endforeach()
     else()
-      find_file(headerFile ${fp} PATHS ${incdirs})
+      find_file(headerFile ${fp} HINTS ${incdirs})
       set(headerfiles ${headerfiles} ${headerFile})
       unset(headerFile CACHE)
     endif()
@@ -113,7 +113,7 @@
   #---Get LinkDef.h file------------------------------------
   set(linkdefs)
   foreach( f ${ARG_LINKDEF})
-    find_file(linkFile ${f} PATHS ${incdirs})
+    find_file(linkFile ${f} HINTS ${incdirs})
     set(linkdefs ${linkdefs} ${linkFile})
     unset(linkFile CACHE)
   endforeach()


ARROW-11281: [C++] Remove needless runtime RapidJSON dependency

Closes #9224 from kou/cpp-remove-needless-runtime-rapidjson-dependency

Authored-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>
Signed-off-by: Krisztián Szűcs <6bab32dc957a05a87930e779f272342e159326fa@gmail.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1902,7 +1902,9 @@
                      HAVE_ALT
                      TRUE
                      REQUIRED_VERSION
-                     ${ARROW_RAPIDJSON_REQUIRED_VERSION})
+                     ${ARROW_RAPIDJSON_REQUIRED_VERSION}
+                     IS_RUNTIME_DEPENDENCY
+                     FALSE)

   if(RapidJSON_INCLUDE_DIR)
     set(RAPIDJSON_INCLUDE_DIR "${RapidJSON_INCLUDE_DIR}")


FIX: typo in -D define

FIX: typo in -D define

--- lib/smurff-cpp/cmake/scripts/DependenciesConfig.cmake
+++ lib/smurff-cpp/cmake/scripts/DependenciesConfig.cmake
@@ -41,7 +41,9 @@
       message(STATUS "OpenMP_CXX_LIB_NAMES ${OpenMP_CXX_LIB_NAMES}")
       message(STATUS "OpenMP_CXX_LIBRARY ${OpenMP_CXX_LIBRARY}")
       message(STATUS "OpenMP_CXX_LIBRARIES ${OpenMP_CXX_LIBRARIES}")
+      message(STATUS "OpenMP_CXX_INCLUDE_DIRS ${OpenMP_CXX_INCLUDE_DIRS}")
       message(STATUS "OpenMP_CXX_FLAGS ${OpenMP_CXX_FLAGS}")
+      include_directories(${OpenMP_CXX_INCLUDE_DIRS})
   else()
       message(STATUS "OpenMP not found")
   endif()
@@ -68,7 +70,7 @@
   find_package( BLAS REQUIRED )
   endif()

-  add_definitions(-DEIGEN_USE_BLAS -DEIGEN_USE_LAPACKEyy)
+  add_definitions(-DEIGEN_USE_BLAS -DEIGEN_USE_LAPACKE)

   message(STATUS BLAS: ${BLAS_LIBRARIES} )


Update.

Update.

--- mod_cmake/ModularDeps.cmake
+++ mod_cmake/ModularDeps.cmake
@@ -8,7 +8,6 @@
 set(DEPENDENCY_LIST)

 function(add_dependency DEP_NAME DEP_REPO)
-  message("dsdada: ${PROJECT_SOURCE_DIR}")
   # Determine if the dependency has already been added.
   set(DEP_INDEX)
   list(FIND DEPENDENCY_LIST "${DEP_NAME}" DEP_INDEX)


COMP: automated sed removed important characters

--- utilities/SimpleRTK/CMake/VariableList.cmake
+++ utilities/SimpleRTK/CMake/VariableList.cmake
@@ -19,7 +19,7 @@
 set( ${var} \"${${var}}\" CACHE \"${type}\" \"${helpstring}\" FORCE )
 if( ${advanced} )
   mark_as_advanced( ${var} )
-endif()
+endif()" )
     endif()
   endforeach()
   set( ${cache} "${_cache}" PARENT_SCOPE)


Bump version to 0.10.1

Bump version to 0.10.1

--- CMake_version_options.cmake
+++ CMake_version_options.cmake
@@ -4,7 +4,7 @@
 ## Version information
 set(HOOMD_VERSION_MAJOR "0")
 set(HOOMD_VERSION_MINOR "10")
-set(HOOMD_VERSION_PATCH "0")
+set(HOOMD_VERSION_PATCH "1")
 set(HOOMD_VERSION "${HOOMD_VERSION_MAJOR}.${HOOMD_VERSION_MINOR}.${HOOMD_VERSION_PATCH}")

 # users may not have git installed, or this may be a tarball build - set a dummy version if that is the case


update dplicy check

update dplicy check

--- cmakepp.cmake
+++ cmakepp.cmake
@@ -20,8 +20,9 @@

 cmake_policy(SET CMP0007 NEW)
 cmake_policy(SET CMP0012 NEW)
-cmake_policy(SET CMP0054 NEW)
-
+if(POLICY CMP0054)
+  cmake_policy(SET CMP0054 NEW)
+endif()
 # installation dir of oocmake
 set(oocmake_base_dir "${CMAKE_CURRENT_LIST_DIR}")


Implement Daniel's ordering

Implement Daniel's ordering

--- Doxygit.cmake
+++ Doxygit.cmake
@@ -33,8 +33,26 @@
 "
Projects
")

 file(GLOB Entries RELATIVE ${CMAKE_SOURCE_DIR} *-*)
+
+# sort entries forward for names, backwards for versions
 list(SORT Entries)
-list(REVERSE Entries)
+set(LAST_Project)
+foreach(Entry ${Entries})
+  string(REGEX REPLACE "^(.+)-.+$" "\\1" Project ${Entry})
+  if(NOT Project STREQUAL LAST_Project)
+    if(SubEntries)
+      list(REVERSE SubEntries)
+      list(APPEND Entries2 ${SubEntries})
+    endif()
+    set(LAST_Project ${Project})
+    set(SubEntries)
+  endif()
+  list(APPEND SubEntries ${Entry})
+endforeach()
+
+list(REVERSE SubEntries)
+set(Entries ${Entries2} ${SubEntries})
+
 set(LAST_Project)
 set(BODY)


SVG for API doc diagrams makes a lot more sense in 2021

This also makes things look non-crappy on high-DPI monitors.

--- Doxyfile.cmake
+++ Doxyfile.cmake
@@ -196,7 +196,7 @@
 INCLUDED_BY_GRAPH      = YES
 CALL_GRAPH             = NO
 GRAPHICAL_HIERARCHY    = YES
-DOT_IMAGE_FORMAT       = png
+DOT_IMAGE_FORMAT       = svg
 DOT_PATH               =
 DOTFILE_DIRS           =
 MAX_DOT_GRAPH_WIDTH    = 1024


doxygen: Explicitly enable generation of HTML doc

Running 'make docs' with doxygen 1.8.7 gives:
"Warning: No output formats selected! Set at least one of the main
GENERATE_* options to YES."
and even though make is successful, no documentation is generated.
Adding GENERATE_HTML = yes to Doxyfile avoids this.

--- Doxyfile.cmake
+++ Doxyfile.cmake
@@ -1,6 +1,7 @@
 PROJECT_NAME        = "${PROJECT_NAME}"
 PROJECT_NUMBER      = ${PROJECT_VERSION}
 HTML_OUTPUT         = docs
+GENERATE_HTML       = YES
 GENERATE_LATEX      = NO
 GENERATE_MAN        = NO
 GENERATE_RTF        = NO


find standalone asio

find standalone asio

--- FindAsio.cmake
+++ FindAsio.cmake
@@ -1,6 +1,6 @@
 find_path( ASIO_INCLUDE_DIR asio.hpp /usr/include /usr/local/include )

-#FIND_LIBRARY(ASIO_LIBRARY NAMES asio PATH /usr/lib /usr/local/lib)
+#find_library(ASIO_LIBRARY NAMES asio PATH /usr/lib /usr/local/lib)

 if( ASIO_INCLUDE_DIR )
    set(ASIO_FOUND TRUE)


bug fix for MacOSX

bug fix for MacOSX

--- FindJAVA.cmake
+++ FindJAVA.cmake
@@ -37,9 +37,14 @@
     # use the CMake FindJava.cmake module
     FIND_PACKAGE( Java )

+    #MESSAGE( STATUS "JAVA_RUNTIME: ${JAVA_RUNTIME}" )
+    #MESSAGE( STATUS "JAVA_COMPILE: ${JAVA_COMPILE}" )
+    #MESSAGE( STATUS "JAVA_ARCHIVE: ${JAVA_ARCHIVE}" )
+
     IF( JAVA_RUNTIME AND JAVA_COMPILE AND JAVA_ARCHIVE )

         IF( UNIX AND NOT APPLE )
+
             # look for the readlink binary
             FIND_PROGRAM( READLINK_BIN readlink )
             MARK_AS_ADVANCED( READLINK_BIN )
@@ -59,6 +64,43 @@
             ENDIF()

             GET_FILENAME_COMPONENT( JAVA_HOME ${JAVA_BIN_PATH} PATH )
+        ELSE()
+
+            SET( JAVA_HOME_MAC JAVA_HOME_MAC-NOTFOUND )
+            FIND_PROGRAM( JAVA_HOME_MAC
+                java_home
+                /usr/libexec/
+            )
+
+            IF( JAVA_HOME_MAC )
+
+                EXEC_PROGRAM( "${JAVA_HOME_MAC}"
+                    OUTPUT_VARIABLE JAVA_HOME
+                    RETURN_VALUE out_ret
+                )
+
+                IF( out_ret )
+                    IF( NOT JAVA_FIND_QUIETLY )
+                        MESSAGE( STATUS "Error executing java_home" )
+                    ENDIF()
+                ENDIF()
+
+                SET( JAVA_BIN_PATH JAVA_BIN_PATH-NOTFOUND )
+                FIND_PATH( JAVA_BIN_PATH
+                    javac
+                    ${JAVA_HOME}/bin
+                    ${JAVA_HOME}/Commands
+                    NO_DEFAULT_PATH )
+
+                IF( NOT JAVA_BIN_PATH AND NOT JAVA_FIND_QUIETLY )
+                    MESSAGE( STATUS "${JAVA_HOME} is not a valid path for Java!!" )
+                ENDIF()
+
+            ELSE()
+                IF( NOT JAVA_FIND_QUIETLY )
+                    MESSAGE( STATUS "Failed to autodetect Java!!" )
+                ENDIF()
+            ENDIF()

         ENDIF()
     ELSE()
@@ -113,7 +155,7 @@
     FIND_PATH( JAVA_BIN_PATH
         javac
         ${JAVA_HOME}/bin
-        ${JAVA_HOME}/Commands   # FIXME MacOS
+        ${JAVA_HOME}/Commands
         NO_DEFAULT_PATH )

     IF( NOT JAVA_BIN_PATH AND NOT JAVA_FIND_QUIETLY )


patch to version 0.7.1

patch to version 0.7.1

Change-Id: I7add8288f84d6fa3a320208b0490999fc4f3090e

--- Version.cmake
+++ Version.cmake
@@ -10,7 +10,7 @@

 set(SimpleITK_VERSION_MAJOR 0)
 set(SimpleITK_VERSION_MINOR 7)
-set(SimpleITK_VERSION_PATCH 0)
+set(SimpleITK_VERSION_PATCH 1)
 #set(SimpleITK_VERSION_TWEAK "")


Fix escaped ‘\’ in when creating symlinks for qt4 headers.

--- qt4.cmake
+++ qt4.cmake
@@ -98,7 +98,7 @@

 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 	ExternalProject_Add_Step(${qt4_NAME} ${qt4_NAME}-create-symlinks
-	   COMMAND "for i in `ls ${BUILDEM_DIR}/lib | grep \.framework`; do ln -s ${BUILDEM_DIR}/lib/$i/Headers ${BUILDEM_DIR}/include/`echo $i | sed 's/\.framework//g'`; done"
+	   COMMAND "for i in `ls ${BUILDEM_DIR}/lib | grep \\.framework`; do ln -s ${BUILDEM_DIR}/lib/$i/Headers ${BUILDEM_DIR}/include/`echo $i | sed 's/\\.framework//g'`; done"
 	   DEPENDEES install
 	)
 endif()


Turn off warning.

Turn off warning.

--- CMakeModules/FindTacentProjectUtilities.cmake
+++ CMakeModules/FindTacentProjectUtilities.cmake
@@ -37,18 +37,19 @@
 		PRIVATE
 			# MSVC compiler.
 			$<$<CXX_COMPILER_ID:MSVC>:/W2 /GS /Gy /Zc:wchar_t /Gm- /Zc:inline /fp:precise /WX- /Zc:forScope /Gd /FC>
+			$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:MSVC>>:/Od>
+			$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:MSVC>>:/O2>

 			# Clang compiler.
 			$<$<CXX_COMPILER_ID:Clang>:-Wno-switch>

 			# GNU compiler.
 			$<$<CXX_COMPILER_ID:GNU>:-Wno-unused-result>
-			$<$<CXX_COMPILER_ID:GNU>:-Wno-multichar>

+			# Clang and GNU.
+			$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:-Wno-multichar>
 			$<$<AND:$<CONFIG:Debug>,$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>>:-O0>
-			$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:MSVC>>:/Od>
 			$<$<AND:$<CONFIG:Release>,$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>>:-O2>
-			$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:MSVC>>:/O2>
 	)
 endfunction(tacent_target_compile_options)


fix imported target are not created for CMake = 3.0.0 (VERSION_GREATER is > - not >=)

--- FindICU.cmake
+++ FindICU.cmake
@@ -275,7 +275,7 @@
     set(${ICU_PUBLIC_VAR_NS}_LIBRARIES ${${ICU_PUBLIC_VAR_NS}_LIBRARY})
     set(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS ${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIR})

-    if(CMAKE_VERSION VERSION_GREATER "3.0.0")
+    if(NOT CMAKE_VERSION VERSION_LESS "3.0.0")
         if(NOT TARGET ICU::ICU)
             add_library(ICU::ICU INTERFACE IMPORTED)
         endif(NOT TARGET ICU::ICU)
@@ -297,7 +297,7 @@
             set_property(TARGET ICU::ICU APPEND PROPERTY INTERFACE_LINK_LIBRARIES "ICU::${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}")
 #             set_target_properties("ICU::${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIR}")
         endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT)
-    endif(CMAKE_VERSION VERSION_GREATER "3.0.0")
+    endif(NOT CMAKE_VERSION VERSION_LESS "3.0.0")
 endif(${ICU_PUBLIC_VAR_NS}_FOUND)

 mark_as_advanced(


modified FindTreeFrog.cmake.

modified FindTreeFrog.cmake.

--- defaults/FindTreeFrog.cmake
+++ defaults/FindTreeFrog.cmake
@@ -1,32 +1,31 @@
-set(TreeFrog_INCLUDE_SEARCH_PATHS
-  /usr/include/treefrog
-  /usr/local/include/treefrog
-  $ENV{TreeFrog_HOME}
-  $ENV{TreeFrog_HOME}/include
-  $ENV{TreeFrog_HOME}/include/treefrog
-)
+# Search paths
+if(NOT WIN32)
+  set(TreeFrog_INCLUDE_SEARCH_PATHS
+    $ENV{TFDIR}/include/treefrog
+    /usr/include/treefrog
+    /usr/local/include/treefrog
+  )

-set(TreeFrog_LIB_SEARCH_PATHS
-  /usr/lib
-  /usr/local/lib
-  $ENV{TreeFrog_HOME}
-  $ENV{TreeFrog_HOME}/lib
-  $ENV{TreeFrog_HOME}/bin
-)
+  set(TreeFrog_LIB_SEARCH_PATHS
+    $ENV{TFDIR}/lib
+    /usr/lib
+    /usr/local/lib
+  )

-set(TreeFrog_BIN_SEARCH_PATHS
-  /usr/bin
-  /usr/local/bin
-  $ENV{TreeFrog_HOME}
-  $ENV{TreeFrog_HOME}/bin
-)
+  set(TreeFrog_BIN_SEARCH_PATHS
+    $ENV{TFDIR}/bin
+    /usr/bin
+    /usr/local/bin
+  )
+  find_library(TreeFrog_LIB NAMES treefrog PATHS ${TreeFrog_LIB_SEARCH_PATHS})
+else()
+  set(TreeFrog_INCLUDE_SEARCH_PATHS $ENV{TFDIR}/include)
+  set(TreeFrog_LIB_SEARCH_PATHS $ENV{TFDIR}/bin)
+  set(TreeFrog_BIN_SEARCH_PATHS $ENV{TFDIR}/bin)
+  find_library(TreeFrog_LIB NAMES treefrog1 PATHS ${TreeFrog_LIB_SEARCH_PATHS})
+endif()

 find_path(TreeFrog_INCLUDE_DIR NAMES TGlobal PATHS ${TreeFrog_INCLUDE_SEARCH_PATHS})
-if(WIN32)
-  find_library(TreeFrog_LIB NAMES treefrog1 PATHS ${TreeFrog_LIB_SEARCH_PATHS})
-else()
-  find_library(TreeFrog_LIB NAMES treefrog PATHS ${TreeFrog_LIB_SEARCH_PATHS})
-endif()
 find_program(TreeFrog_TMAKE_CMD tmake PATHS ${TreeFrog_BIN_SEARCH_PATHS})

 set(TreeFrog_FOUND ON)
@@ -54,12 +53,11 @@
   message(STATUS "Found TreeFrog include: ${TreeFrog_INCLUDE_DIR}")
   message(STATUS "Found TreeFrog tmake command: ${TreeFrog_TMAKE_CMD}")
 else(TreeFrog_FOUND)
-  message(FATAL_ERROR "Could not find TreeFrog")
+  message(FATAL_ERROR "Could not find TreeFrog. Set the path to TFDIR environment variable.")
 endif(TreeFrog_FOUND)

 mark_as_advanced(
   TreeFrog_INCLUDE_DIR
   TreeFrog_LIB
   TreeFrog_TMAKE_CMD
-  TreeFrog
 )


remove the unneeded file

remove the unneeded file

--- FindGSL.cmake
+++ FindGSL.cmake
@@ -1,133 +0,0 @@
-##
-## Try to find gnu scientific library GSL
-## (see http://www.gnu.org/software/gsl/)
-## Once run this will define:
-##
-## GSL_FOUND       = system has GSL lib
-##
-## GSL_LIBRARIES   = full path to the libraries
-##    on Unix/Linux with additional linker flags from "gsl-config --libs"
-##
-## CMAKE_GSL_CXX_FLAGS  = Unix compiler flags for GSL, essentially "`gsl-config --cxxflags`"
-##
-## GSL_INCLUDE_DIR      = where to find headers
-##
-## GSL_LINK_DIRECTORIES = link directories, useful for rpath on Unix
-## GSL_EXE_LINKER_FLAGS = rpath on Unix
-##
-## Felix Woelk 07/2004
-## minor corrections Jan Woetzel
-##
-## www.mip.informatik.uni-kiel.de
-## --------------------------------
-##
-
-
-IF(WIN32)
-
-  SET(GSL_MINGW_PREFIX "c:/msys/local" )
-  SET(GSL_MSVC_PREFIX "$ENV{LIB_DIR}")
-  FIND_LIBRARY(GSL_LIB gsl PATHS
-    ${GSL_MINGW_PREFIX}/lib
-    ${GSL_MSVC_PREFIX}/lib
-    )
-  #MSVC version of the lib is just called 'cblas'
-  FIND_LIBRARY(GSLCBLAS_LIB gslcblas cblas PATHS
-    ${GSL_MINGW_PREFIX}/lib
-    ${GSL_MSVC_PREFIX}/lib
-    )
-
-  FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_blas.h
-    ${GSL_MINGW_PREFIX}/include
-    ${GSL_MSVC_PREFIX}/include
-    )
-
-  IF (GSL_LIB AND GSLCBLAS_LIB)
-    SET (GSL_LIBRARIES ${GSL_LIB} ${GSLCBLAS_LIB})
-  ENDIF (GSL_LIB AND GSLCBLAS_LIB)
-
-ELSE(WIN32)
-  IF(UNIX)
-    SET(GSL_CONFIG_PREFER_PATH "$ENV{GSL_HOME}/bin" CACHE STRING "preferred path to GSL (gsl-config)")
-    FIND_PROGRAM(GSL_CONFIG gsl-config
-      ${GSL_CONFIG_PREFER_PATH}
-      $ENV{LIB_DIR}/bin
-      /usr/local/bin/
-      /usr/bin/
-      )
-    # MESSAGE("DBG GSL_CONFIG ${GSL_CONFIG}")
-
-    IF (GSL_CONFIG)
-      # set CXXFLAGS to be fed into CXX_FLAGS by the user:
-      EXEC_PROGRAM(${GSL_CONFIG}
-          ARGS --cflags
-          OUTPUT_VARIABLE GSL_CXX_FLAGS)
-
-      # set INCLUDE_DIRS to prefix+include
-      EXEC_PROGRAM(${GSL_CONFIG}
-        ARGS --prefix
-        OUTPUT_VARIABLE GSL_PREFIX)
-      SET(GSL_INCLUDE_DIR ${GSL_PREFIX}/include CACHE STRING INTERNAL)
-
-      # set link libraries and link flags
-      EXEC_PROGRAM(${GSL_CONFIG}
-          ARGS --libs
-          OUTPUT_VARIABLE GSL_LIBRARIES)
-
-      ## extract link dirs for rpath
-      EXEC_PROGRAM(${GSL_CONFIG}
-        ARGS --libs
-        OUTPUT_VARIABLE GSL_CONFIG_LIBS )
-
-      ## split off the link dirs (for rpath)
-      ## use regular expression to match wildcard equivalent "-L*<endchar>"
-      ## with <endchar> is a space or a semicolon
-      STRING(REGEX MATCHALL "[-][L]([^ ;])+"
-        GSL_LINK_DIRECTORIES_WITH_PREFIX
-        "${GSL_CONFIG_LIBS}" )
-        #      MESSAGE("DBG  GSL_LINK_DIRECTORIES_WITH_PREFIX=${GSL_LINK_DIRECTORIES_WITH_PREFIX}")
-
-      ## remove prefix -L because we need the pure directory for LINK_DIRECTORIES
-
-      IF (GSL_LINK_DIRECTORIES_WITH_PREFIX)
-        STRING(REGEX REPLACE "[-][L]" "" GSL_LINK_DIRECTORIES ${GSL_LINK_DIRECTORIES_WITH_PREFIX} )
-      ENDIF (GSL_LINK_DIRECTORIES_WITH_PREFIX)
-      SET(GSL_EXE_LINKER_FLAGS "-Wl,-rpath,${GSL_LINK_DIRECTORIES}" CACHE STRING INTERNAL)
-      #      MESSAGE("DBG  GSL_LINK_DIRECTORIES=${GSL_LINK_DIRECTORIES}")
-      #      MESSAGE("DBG  GSL_EXE_LINKER_FLAGS=${GSL_EXE_LINKER_FLAGS}")
-
-      #      ADD_DEFINITIONS("-DHAVE_GSL")
-      #      SET(GSL_DEFINITIONS "-DHAVE_GSL")
-      MARK_AS_ADVANCED(
-        GSL_CXX_FLAGS
-        GSL_INCLUDE_DIR
-        GSL_LIBRARIES
-        GSL_LINK_DIRECTORIES
-        GSL_DEFINITIONS
-      )
-
-    ELSE(GSL_CONFIG)
-
-      IF (GSL_FIND_REQUIRED)
-         MESSAGE(FATAL_ERROR "Could not find gsl-config. Please set it manually. GSL_CONFIG=${GSL_CONFIG}")
-      ELSE (GSL_FIND_REQUIRED)
-         MESSAGE(STATUS "Could not find GSL")
-         # TODO: Avoid cmake complaints if GSL is not found
-      ENDIF (GSL_FIND_REQUIRED)
-
-    ENDIF(GSL_CONFIG)
-
-  ENDIF(UNIX)
-ENDIF(WIN32)
-
-
-IF(GSL_LIBRARIES)
-  IF(GSL_INCLUDE_DIR OR GSL_CXX_FLAGS)
-
-    SET(GSL_FOUND 1)
-
-    MESSAGE(STATUS "Using GSL from ${GSL_PREFIX}")
-
-  ENDIF(GSL_INCLUDE_DIR OR GSL_CXX_FLAGS)
-ENDIF(GSL_LIBRARIES)
-


minor cleanup

minor cleanup

--- FindICU.cmake
+++ FindICU.cmake
@@ -37,7 +37,7 @@
 #      include_directories(${ICU_INCLUDE_DIRS})
 #      add_executable(myapp myapp.c)
 #      target_link_libraries(myapp ${ICU_LIBRARIES})
-#   endif()
+#   endif(ICU_FOUND)

 #=============================================================================
 # Copyright (c) 2011-2012, julp
@@ -100,7 +100,6 @@
 set(${ICU_PUBLIC_VAR_NS}_FOUND TRUE)
 set(${ICU_PUBLIC_VAR_NS}_LIBRARIES )
 set(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS )
-set(${ICU_PUBLIC_VAR_NS}_DEFINITIONS )
 foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS})
     string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT)
     set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" FALSE) # may be done in the icu_declare_component macro


CMake: Bugfix: Set a compiler option for the correct build type

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@32311 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_compiler_flags_gnu.cmake
+++ deal.II/cmake/setup_compiler_flags_gnu.cmake
@@ -171,7 +171,7 @@
     #
     # Enable test coverage
     #
-    ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-fno-elide-constructors")
+    ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-fno-elide-constructors")
     ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-ftest-coverage -fprofile-arcs")
     ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS_DEBUG "-ftest-coverage -fprofile-arcs")
   ENDIF()


ENH:  Add test.

ENH:  Add test.

--- Modules/Remote/AdaptiveDenoising.remote.cmake
+++ Modules/Remote/AdaptiveDenoising.remote.cmake
@@ -56,5 +56,5 @@
   "
   MODULE_COMPLIANCE_LEVEL
   GIT_REPOSITORY ${git_protocol}://github.com/ntustison/ITKAdaptiveDenoising.git
-  GIT_TAG e8adb9cb73e22c1c9adef41e25dd08ec6f287870
+  GIT_TAG ef309a1f050a2f7b1102f5024cf4997cd284266b
 )


Add duktape to iOS static libs when not using JSCore

--- platforms/ios/config.cmake
+++ platforms/ios/config.cmake
@@ -154,6 +154,9 @@
   $<TARGET_FILE:miniz>
   "
 )
+if (NOT TANGRAM_USE_JSCORE)
+  set(TANGRAM_STATIC_DEPENDENCIES "${TANGRAM_STATIC_DEPENDENCIES} $<TARGET_FILE:duktape>")
+endif()

 set_target_properties(tangram-static PROPERTIES
   XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION "${TANGRAM_FRAMEWORK_VERSION}"


[changed] default languages to NONE

[changed] default languages to NONE

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -301,7 +301,6 @@
     ENDIF()
     PROJECT( "${PROJECT_NAME}"
         VERSION "${PROJECT_VERSION}"
-        LANGUAGES C Fortran CXX
     )

     # Set variable version strings for TriBITS.
@@ -321,7 +320,7 @@
     GLOBAL_SET( ${PROJECT_NAME}_ENABLE_TESTS ON CACHE BOOL "Enable all tests by default.")

     # Turn secondary tested code on by default.
-    GLOBAL_SET( ${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE ON CACHE BOOL "Enable secondary tested code by default.")
+    SET( ${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE ON)

     # Set repository names if not set.
     GLOBAL_SET( REPOSITORY_NAME ${PROJECT_NAME} )


CMake: Fix a test for bug in LLVM that incorrectly stated it's checking for assertions; it's checking for LLVM's debugging support.

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -506,10 +506,10 @@

 if(NOT LLVM_CXXFLAGS MATCHES "-DNDEBUG")

-  message(STATUS "Checking if LLVM is built with assertions")
+  message(STATUS "Checking if LLVM is a DEBUG build")
   separate_arguments(_FLAGS UNIX_COMMAND "${LLVM_CXXFLAGS}")

-  set(_TEST_SOURCE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/llvmbuiltwithassertions.cc")
+  set(_TEST_SOURCE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/llvmNDEBUG.cc")
   file(WRITE "${_TEST_SOURCE}"
     "
       #include <llvm/Support/Debug.h>
@@ -532,9 +532,9 @@
     "Test -NDEBUG flag: ${_TRY_COMPILE_OUTPUT}\n")

   if(_TRY_SUCCESS)
-    message(STATUS "assertions present")
-  else()
-    message(STATUS "no assertions.. adding -DNDEBUG")
+    message(STATUS "DEBUG build")
+  else()
+    message(STATUS "Not a DEBUG build, adding -DNDEBUG explicitly")
     set(LLVM_CXXFLAGS "${LLVM_CXXFLAGS} -DNDEBUG")
   endif()


CMake: clean up the clang library list

CMake: clean up the clang library list

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -177,27 +177,11 @@
 separate_arguments(LLVM_LIBFILES)
 separate_arguments(LLVM_LIBS)
 # Llvm-config does not include clang libs
-
-list(APPEND CLANG_LIB_NAMES
-  clangFrontend
-  clangDriver
-  clangParse
-  clangSema
-  clangEdit
-  clangLex
-  clangSerialization
-  clangBasic
-  clangFrontendTool
-  clangRewriteFrontend
-  clangStaticAnalyzerFrontend
-  clangStaticAnalyzerCore
-  clangAnalysis
-  clangCodeGen
-  clangAST)
-
-if(LLVM_3_6)
-  list(APPEND CLANG_LIB_NAMES clangToolingCore)
-endif()
+set(CLANG_LIBNAMES clangFrontendTool clangFrontend clangDriver clangSerialization clangCodeGen clangParse clangSema)
+if(LLVM_MINOR GREATER 4)
+  list(APPEND CLANG_LIBNAMES clangRewrite)
+endif()
+list(APPEND CLANG_LIBNAMES clangRewriteFrontend clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers clangStaticAnalyzerCore clangARCMigrate clangAnalysis clangEdit clangAST clangLex clangBasic)

 list(APPEND CLANG_LIB_NAMES
   clangASTMatchers


CMake: add LLVM_LDFLAGS to the DNDEBUG try-compile test

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -492,7 +492,7 @@
   TRY_COMPILE(_TRY_SUCCESS ${CMAKE_BINARY_DIR} "${_TEST_SOURCE}"
     CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${LLVM_INCLUDE_DIRS}"
     CMAKE_FLAGS "-DLINK_DIRECTORIES:STRING=${LLVM_LIBDIR}"
-    LINK_LIBRARIES "${LLVM_LIBS} ${LLVM_SYSLIBS}"
+    LINK_LIBRARIES "${LLVM_LIBS} ${LLVM_SYSLIBS} ${LLVM_LDFLAGS}"
     COMPILE_DEFINITIONS ${TRY_COMPILE_CXX_FLAGS}
     OUTPUT_VARIABLE _TRY_COMPILE_OUTPUT
   )


Pinned BX version to something that works.

--- cmake/bgfx.cmake
+++ cmake/bgfx.cmake
@@ -3,7 +3,7 @@
 # Download `bx` and extract source path.
 ExternalProject_Add(bx_EXTERNAL
     GIT_REPOSITORY "https://github.com/bkaradzic/bx.git"
-    GIT_TAG "master"
+    GIT_TAG "c989434ad78398241e8792efc992290ee2823555"
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND ""


The executable path is wrong with config subdirs

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -160,8 +160,12 @@
   set_tests_properties(test-${testname}-${instance}
     PROPERTIES
       WORKING_DIRECTORY       "${test_working_path}"
-      FAIL_REGULAR_EXPRESSION "^Error: ;\nError: "
-      REQUIRED_FILES          "${test_output_path}/test-${testname}")
+      FAIL_REGULAR_EXPRESSION "^Error: ;\nError: ")
+  if (NOT vistk_use_config_subdir)
+    set_tests_properties(test-${testname}-${instance}
+      PROPERTIES
+        REQUIRED_FILES "${test_output_path}/test-${testname}")
+  endif ()
   if (test_environment)
     set_tests_properties(test-${testname}-${instance}
       PROPERTIES


CMake: Recognize FreeType version 2.3.11

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239)
+set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239 freetype2311)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


ENH: Update SlicerExecutionModel external project

List of changes:

$ git shortlog 983d2112e..0dee79884 --no-merges
Andrey Fedorov (1):
      ENH: add pointer to the wiki documentation

Francois Budin (1):
      ENH: cxx and executable can have different names.

Hans Johnson (3):
      COMP: Prefer NULL to 0 for pointer initialization
      ENH: Remove unused variable warning from static analysis
      COMP: Fix language feature introspection for SEM

Jean-Baptiste Vimort (2):
      STYLE: Renaming of the 'defaultValue' parameter's attribute to 'Value'
      ENH: Depreciation of the old functions

Jean-Christophe Fillion-Robin (34):
      gitignore: Add CMakeLists.txt.user
      docker: Associate build-time metadata with the image
      README: Add docker badges
      STYLE: GenerateCLPTest: Update print_command_as_string to display working dir
      BUG: Fix GenerateCLP tests when JsonCpp and Serializer support are ON
      STYLE: GenerateCLP tests: Consistently use GenerateCLP_TEST_PROJECT macros
      ENH: ci: Run tests against ITK v4.10.1
      ENH: ci: Speedup testing caching docker images using scikit-ci-addons
      STYLE: circle: Update indent to facilitate reading of configuration file
      ENH: Add test building and running test with Serializer and JsonCpp ON
      COMP: GenerateCLP: Fix -Wunused-variable warning
      COMP: GenerateCLP: Fix -Wshadow warning
      Add License and Notice files
      README: Add contributing section
      README: Add "Testing environments" section
      docker: Use up-to-date build env. using dockerbuild/centos5 base image
      test: Simplify scripts to ensure exit on first error
      ci: Transition to CircleCI v2.0
      circleci: Fix working_directory
      docker: Fix image ensuring source and build directory are removed
      docker: Install ITK into /usr/local to ensure library loader find them
      test: Fix parameterserializer tests using up-to-date repository
      README: Fix reference to CircleCI config
      docker: Remove build and run script, and use Makefile instead
      Makefile: Fix build implicit rule
      circleci: Fix buildname used in serializer test
      circleci: Facilitate reading remove extra lines and comment
      test: Add support for running test against ITK v4.13.0 and ITK master (v5.0)
      Makefile: Add convenience rule to push images on dockerhub
      circleci: group test under the same job, use CIRCLE_JOB env var
      README: add "Adding or updating a testing environment" section
      README: Improve overview section
      README/Overview: Tweak format adding newline
      Makefile: Ensure image is deleted if different

Johan Andruejol (1):
      ENH: GenerateCLP: Include jsoncpp include dirs in UseGenerateCLP.cmake.in

Stephen Aylward (2):
      WARN: Rename isPresent variables to avoid hidden local variable
      BUG: ModuleDescription: Param LibraryLoader shadows this->LibraryLoader

--- SuperBuild/External_SlicerExecutionModel.cmake
+++ SuperBuild/External_SlicerExecutionModel.cmake
@@ -54,7 +54,7 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY "${git_protocol}://github.com/Slicer/SlicerExecutionModel.git")
-  set(${proj}_GIT_TAG 983d2112ec431af20cafa49ca6cf7bd1a777869a)
+  set(${proj}_GIT_TAG 0dee798848bacf26d6d4c0fc5f5397d72c1a202b)
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


Version bump to 1.6.0

Version bump to 1.6.0

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
-SET(LIBREPO_MINOR "5")
-SET(LIBREPO_PATCH "2")
+SET(LIBREPO_MINOR "6")
+SET(LIBREPO_PATCH "0")


- Maybe fix minor dependency loading

- Maybe fix minor dependency loading

--- toolchain/cmake/Modules/GitDependencies.cmake
+++ toolchain/cmake/Modules/GitDependencies.cmake
@@ -43,10 +43,13 @@
         if(NOT "${CMAKE_PREFIX_PATH}" MATCHES "${LOCAL_DIR}" )
             set (
                 CMAKE_PREFIX_PATH
-                    "${CMAKE_PREFIX_PATH};${LOCAL_DIR}"
-                CACHE STRING ""
-                FORCE
+                "${CMAKE_PREFIX_PATH};${LOCAL_DIR}"
                 PARENT_SCOPE
+                )
+            set (
+                ${NAME}_DIR
+                ${LOCAL_DIR}/lib/cmake/${NAME}
+                PARENT_SCOPE
                 )
         endif()


removed debug output

removed debug output

--- WkBuild.cmake
+++ WkBuild.cmake
@@ -324,11 +324,8 @@
 	#putting them in source groups. Very useful for VS.
 	if(WIN32)
 		foreach( header ${${PROJECT_NAME}_${target_name}_HEADERS} )
-			message(${header})
 			get_filename_component(folder ${header} DIRECTORY)
-			message(${folder})
 			string(REPLACE "/" "\\" folder ${folder})
-			message(${folder})
 			SOURCE_GROUP("${folder}" FILES ${header})
 		endforeach(header)
 	endif(WIN32)
@@ -341,11 +338,8 @@
 	#putting them in source groups. Very useful for VS.
 	if(WIN32)
 		foreach( source ${${PROJECT_NAME}_${target_name}_SOURCES} )
-			message(${source})
 			get_filename_component(folder ${source} DIRECTORY)
-			message(${folder})
 			string(REPLACE "/" "\\" folder ${folder})
-			message(${folder})
 			SOURCE_GROUP("${folder}" FILES ${source})
 		endforeach(source)
 	endif(WIN32)


remove a now unnecessary if statement

remove a now unnecessary if statement

--- config/cmake/modules/MfemCmakeUtilities.cmake
+++ config/cmake/modules/MfemCmakeUtilities.cmake
@@ -43,22 +43,14 @@
   set(${NAMES} ${tmp_names} PARENT_SCOPE)
 endfunction()

-# Wrapper for add_executable that calls the HIP wrapper if applicable
+# Wrapper for add_executable
 macro(mfem_add_executable NAME)
-  if (MFEM_USE_HIP)
-    add_executable(${NAME} ${ARGN})
-  else()
-    add_executable(${NAME} ${ARGN})
-  endif()
+  add_executable(${NAME} ${ARGN})
 endmacro()

-# Wrapper for add_library that calls the HIP wrapper if applicable
+# Wrapper for add_library
 macro(mfem_add_library NAME)
-  if (MFEM_USE_HIP)
-    add_library(${NAME} ${ARGN})
-  else()
-    add_library(${NAME} ${ARGN})
-  endif()
+  add_library(${NAME} ${ARGN})
 endmacro()

 # Simple shortcut to add_custom_target() with option to add the target to the


[build] Silence `-Wvoid-pointer-to-int-cast`

libdispatch will fail to build with a newly introduced clang diagnostic
`pointer-to-int-cast`. libdispatch converts a void pointer to a
dispatch_invoke_flags_t (aka unsigned int) in a few places. Ideally we would not
be doing this, but this solution at least gets libdispatch building again
with a newer version of clang.

--- cmake/modules/DispatchCompilerWarnings.cmake
+++ cmake/modules/DispatchCompilerWarnings.cmake
@@ -62,6 +62,7 @@
   add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Wno-unreachable-code-aggressive>)
   add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Wno-unused-macros>)
   add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Wno-used-but-marked-unused>)
+  add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Wno-void-pointer-to-int-cast>)
   add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Wno-vla>)

   if(CMAKE_SYSTEM_NAME STREQUAL Android)


SuperBuild: rpath fix on macos for GEOTIFF

--- SuperBuild/CMake/External_geotiff.cmake
+++ SuperBuild/CMake/External_geotiff.cmake
@@ -48,9 +48,7 @@
       BUILD_COMMAND $(MAKE)
       INSTALL_COMMAND $(MAKE) install)

-    SUPERBUILD_PATCH_SOURCE(GEOTIFF "patch-configure-script")
-
-    FIX_RPATH_FOR_AUTOCONF_BUILD(GEOTIFF "libgeotiff*.dylib")
+      SUPERBUILD_PATCH_SOURCE(GEOTIFF "patch-configure-rpath")

   else()


xpFlatBuffersBuildTS enhancement - PROPERTIES

use plural version, set_target_properties() instead of set_property
issue https://github.com/smanders/externpro/issues/350

--- projects/use/usexp-flatbuffers-config.cmake
+++ projects/use/usexp-flatbuffers-config.cmake
@@ -62,5 +62,5 @@
     )
   set(tgtName ${P_TARGET}_fbs_ts)
   add_custom_target(${tgtName} ALL DEPENDS ${cmdFile})
-  set_property(TARGET ${tgtName} PROPERTY FOLDER ${folder} STAMP ${cmdFile})
+  set_target_properties(${tgtName} PROPERTIES FOLDER ${folder} STAMP ${cmdFile})
 endfunction()


boost_filesystem: link and forward the same dependencies

--- external/vigra_cmake/VAD_boost_filesystem.cmake
+++ external/vigra_cmake/VAD_boost_filesystem.cmake
@@ -13,10 +13,12 @@

   file(GLOB _SRCS "${VAD_EXTERNAL_ROOT}/boost_filesystem/src/*")

+  set(_BOOST_FS_DEPS boost_config boost_system boost_type_traits boost_iterator boost_smart_ptr boost_io boost_functional boost_range)
+
   add_library(boost_filesystem ${_SRCS})
-  target_link_libraries(boost_filesystem PUBLIC ${_FORWARD_DEPS})
+  target_link_libraries(boost_filesystem PUBLIC ${_BOOST_FS_DEPS})

   # FIXME
   #somehow inc dir forwarding is not working for pure imported targets (e.g. config, utility etc...)
-  forward_target_includes(boost_filesystem boost_config boost_system boost_type_traits boost_iterator boost_smart_ptr boost_io boost_functional boost_range)
+  forward_target_includes(boost_filesystem ${_BOOST_FS_DEPS})
 endfunction()


update

update

--- modules/HdrHistogram.cmake
+++ modules/HdrHistogram.cmake
@@ -18,6 +18,7 @@

   # Includes
   include_directories("zlib")
+  message(${CMAKE_CURRENT_BINARY_DIR})
   include_directories("../build/modules/zlib")

   # Add module library


Default zlib to shared libraries

Default zlib to shared libraries

--- external/zlib/Options.cmake
+++ external/zlib/Options.cmake
@@ -8,7 +8,7 @@

 # ZLIB library options
 set_option(ZLIB_ENABLED TRUE BOOL "Build 'zlib' 3rdparty/external libraries?")
-set_option(ZLIB_SHARED_LIBRARIES FALSE BOOL "Build 'zlib' shared libraries?")
+set_option(ZLIB_SHARED_LIBRARIES TRUE BOOL "Build 'zlib' shared libraries?")
 set_option(ZLIB_BUILD_DOCS FALSE BOOL "Build 'zlib' documentation?")
 set_option(ZLIB_BUILD_EXAMPLES FALSE BOOL "Build 'zlib' examples?")


style: reformat

style: reformat

--- scripts/cmake/Modules/PackagingDebian.cmake
+++ scripts/cmake/Modules/PackagingDebian.cmake
@@ -197,7 +197,10 @@
 set (CPACK_DEBIAN_ELEKTRA-QT-GUI_PACKAGE_NAME "${CPACK_COMPONENT_ELEKTRA-QT-GUI_DISPLAY_NAME}")
 if ("${OS_DISTRIB}" MATCHES "Ubuntu20.04" OR ${OS_PRETTY_NAME} MATCHES ".*bullseye.*")
 	# qml-module-qtquick-controls-styles-breeze not available on ubuntu focal and debian bullseye
-	message (STATUS "Exclude debian package dependency qml-module-qtquick-controls-styles-breeze from elektra-qt-gui package as it is not available.")
+	message (
+		STATUS
+			"Exclude debian package dependency qml-module-qtquick-controls-styles-breeze from elektra-qt-gui package because it is not available."
+	)
 	set (
 		CPACK_DEBIAN_ELEKTRA-QT-GUI_PACKAGE_DEPENDS
 		"qml-module-qtquick2, qml-module-qtquick-window2, qml-module-qtquick-dialogs, qml-module-qt-labs-folderlistmodel, qml-module-qt-labs-settings"


Test check for existence of mako-render script

--- tests/mako/mako_build.cmake
+++ tests/mako/mako_build.cmake
@@ -15,6 +15,9 @@

 lookup_python_package(mako REQUIRED)
 find_program(mako_SCRIPT mako-render HINT "${EXTERNAL_ROOT}/python")
+if(NOT mako_SCRIPT)
+    message(FATAL_ERROR "Could not find mako-render script.")
+endif()

 file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/__init__.mako.py"
     "import other\n"


binding.gyp.cmake: Use node or nodejs depending on what the binary is called

This should fix npm builds on some recent ubuntu and debian images

Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- src/javascript/binding.gyp.cmake
+++ src/javascript/binding.gyp.cmake
@@ -11,8 +11,8 @@
         @mraa_LIB_INCLUDE_DIRS_GYP@
       ],
       'variables': {
-        "v8_version%": "<!(node -e 'console.log(process.versions.v8)' | sed 's/\.//g' | cut -c 1-5)",
-        "arch%": "<!(node -e 'console.log(process.arch)')"
+        "v8_version%": "<!(`command -v nodejs 2> /dev/null || echo node` -e 'console.log(process.versions.v8)' | sed 's/\.//g' | cut -c 1-5)",
+        "arch%": "<!(`command -v nodejs 2> /dev/null || echo node` -e 'console.log(process.arch)')"
       },
       'cflags_cc!': [ '-fno-rtti', '-fno-exceptions' ],
       'cflags!': [ '-fno-exceptions' ],


BUG: Remove check for APPLE

BUG: Remove check for APPLE

These variables are needed for all build systems

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -137,7 +137,7 @@
 set(proj ${PRIMARY_PROJECT_NAME})
 set(proj_build ${proj}-build)

-IF(APPLE)
+
 SET(CMAKE_ARGS
       -DDTIProcess_SUPERBUILD:BOOL=OFF
       -DDTIProcess_EXTENSION:BOOL=ON #install the tests if it is built as an extension
@@ -155,7 +155,7 @@
       -DBUILD_dwiAtlas:BOOL=${BUILD_dwiAtlas}
       -DCMAKE_INSTALL_PREFIX:PATH=${DTIProcess_INSTALL_DIRECTORY}
   )
-ENDIF(APPLE)
+

 ExternalProject_Add(${proj}
     DOWNLOAD_COMMAND ""


BUG: When DTIAtlasBuilder is built as a Slicer extension, we set VTK_VERSION_MAJOR as a CACHE variable to avoid erasing its value when looking for VTK

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -63,7 +63,8 @@
 # Slicer Extension
 option( DTIAtlasBuilder_BUILD_SLICER_EXTENSION "Build DTIAtlasBuilder as a Slicer extension" OFF )
 if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-
+  #VTK_VERSION_MAJOR is define but not a CACHE variable
+  set( VTK_VERSION_MAJOR ${VTK_VERSION_MAJOR} CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6).")
   set(EXTENSION_NAME DTIAtlasBuilder)
   set(EXTENSION_HOMEPAGE "http://www.nitrc.org/projects/dtiatlasbuilder")
   set(EXTENSION_CATEGORY "Diffusion")


up vtk hash

up vtk hash

--- superbuild/versions.cmake
+++ superbuild/versions.cmake
@@ -85,7 +85,7 @@

 add_revision(vtk
   GIT_REPOSITORY http://vtk.org/VTK.git
-  GIT_TAG f62600aca3542ce3169e091ca3854eaeeb59f3d6 )
+  GIT_TAG bac5c2a5293cc2da9c0b86b419ad01a7aa7b0589 )

 if (UNIX)
   add_revision(mpi


Use the VTK_RUNTIME_LIBRARY_DIRS variable when calculating the search path.

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -37,11 +37,24 @@
     list(APPEND _dir_candidates ${_additional_paths})
   endif()

+  if(VTK_DIR)
+    find_package(VTK QUIET)
+    if(VTK_RUNTIME_LIBRARY_DIRS)
+      list(APPEND _dir_candidates ${VTK_RUNTIME_LIBRARY_DIRS})
+    endif()
+  endif()
+
+
+  # The code below is sub-optimal. It makes assumptions about
+  # the structure of the build directories, pointed to by
+  # the *_DIR variables. Instead, we should rely on package
+  # specific "LIBRARY_DIRS" variables, if they exist.
+
   if(WIN32)
     if(DCMTK_DIR)
       list(APPEND _dir_candidates "${DCMTK_DIR}/bin")
     endif()
-   list(APPEND _dir_candidates "${ITK_DIR}/bin")
+    list(APPEND _dir_candidates "${ITK_DIR}/bin")
   else()
     if(DCMTK_DIR)
       list(APPEND _dir_candidates "${DCMTK_DIR}/lib")
@@ -49,10 +62,6 @@
     list(APPEND _dir_candidates "${ITK_DIR}/lib")
   endif()

-  # The code below is sub-optimal. It makes assumptions about
-  # the structure of the build directories, pointed to by
-  # the *_DIR variables. Instead, we should rely on package
-  # specific "LIBRARY_DIRS" variables, if they exist.
   if(MITK_USE_Python AND CTK_PYTHONQT_INSTALL_DIR)
     list(APPEND _dir_candidates "${CTK_PYTHONQT_INSTALL_DIR}/bin")
   endif()


cmake: dts: Allow DTS_BOARD_FIXUP_FILE to be defined anywhere

Allow for DTS_BOARD_FIXUP_FILE to be defined in other locations (ie by
board directory code).  Thus allow the board to set any location to find
the fixup file.

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- dts/dts.cmake
+++ dts/dts.cmake
@@ -85,7 +85,7 @@

   # Run extract_dts_includes.py for the header file
   # generated_dts_board.h
-  set(DTS_BOARD_FIXUP_FILE ${PROJECT_SOURCE_DIR}/dts/${ARCH}/${BOARD_FAMILY}.fixup)
+  set_ifndef(DTS_BOARD_FIXUP_FILE ${PROJECT_SOURCE_DIR}/dts/${ARCH}/${BOARD_FAMILY}.fixup)
   if(EXISTS ${DTS_BOARD_FIXUP_FILE})
     set(DTS_BOARD_FIXUP -f ${DTS_BOARD_FIXUP_FILE})
   endif()


Bugfix

Bugfix

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30946 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -357,12 +357,12 @@

 CTEST_START(Experimental TRACK ${TRACK})

-CTEST_CONFIGURE(OPTIONS "${_options}" RETURN_VALUE _res)
+CTEST_CONFIGURE(OPTIONS "${_options}" NUMBER_ERRORS _res)

 IF("${_res}" STREQUAL "0")
   # Only run the build stage if configure was successful:

-  CTEST_BUILD(TARGET RETURN_VALUE _res)
+  CTEST_BUILD(TARGET NUMBER_ERRORS _res)

   IF("${_res}" STREQUAL "0")
     # Only run tests if the build was successful:


Add -ip to the optimized compiler flags for icc

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29119 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_compiler_flags_intel.cmake
+++ deal.II/cmake/setup_compiler_flags_intel.cmake
@@ -84,6 +84,7 @@
   # General optimization flags:
   #
   ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-ip")

   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-ansi-alias") # equiv. -fstrict-aliasing


ENH: Fix kaspermarstal/SimpleElastix#3 upgrade to elastix 4.8

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -5,6 +5,7 @@

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_REPOSITORY}
+  GIT_TAG elastix-4-8
   UPDATE_COMMAND ""
   SOURCE_DIR ${proj}
   BINARY_DIR ${proj}-build


ENH: Update elastix

ENH: Update elastix

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -2,7 +2,7 @@
 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )

 set( ELASTIX_GIT_REPOSITORY ${git_protocol}://github.com/SuperElastix/elastix )
-set( ELASTIX_GIT_TAG e8354222396c6bd78e9fe6d5a39e4ecac4bb0d52 )
+set( ELASTIX_GIT_TAG 6472fc81721725d37eb0f147aeda635ce42a3bb4 )

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_GIT_REPOSITORY}


Allow specifying -DUSE_OPENGL=0 for MinGW. Compiling ShaderCompiler is likely to fail in that case. Closes #36.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -70,9 +70,12 @@

 # If not on MSVC, enable use of OpenGL instead of Direct3D9 (either not compiling on Windows or
 # with a compiler that may not have an up-to-date DirectX SDK). This can also be unconditionally
-# enabled, but Windows graphics card drivers are usually better optimized for Direct3D.
+# enabled, but Windows graphics card drivers are usually better optimized for Direct3D. Direct3D can
+# be manually enabled for MinGW with -DUSE_OPENGL=0, but is likely to fail due to missing headers.
 if (NOT MSVC)
-    set (USE_OPENGL 1)
+    if (NOT WIN32 OR NOT DEFINED USE_OPENGL)
+        set (USE_OPENGL 1)
+    endif ()
 endif ()
 if (USE_OPENGL)
     add_definitions (-DUSE_OPENGL)


respect the install prefix for the systemd unit file anyways.


Tweak test associated with HAVE_LIBIEEE and find library only if needed

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -5,6 +5,7 @@
 include(CMakePushCheckState)
 include(CheckStructHasMember)
 include(CheckFunctionExists)
+include(CheckLibraryExists)
 include(CheckSymbolExists)
 include(CheckVariableExists)
 include(cmake/CheckTypeExists.cmake)
@@ -34,6 +35,7 @@
 check_include_files(dlfcn.h HAVE_DLFCN_H)
 check_include_files(errno.h HAVE_ERRNO_H)
 check_include_files(fcntl.h HAVE_FCNTL_H)
+check_include_files(fpu_control.h HAVE_FPU_CONTROL_H)
 check_include_files(grp.h HAVE_GRP_H)
 check_include_files(inttypes.h HAVE_INTTYPES_H)
 check_include_files(io.h HAVE_IO_H)
@@ -115,7 +117,6 @@
 find_library(HAVE_LIBCRYPT crypt)
 find_library(HAVE_LIBDL dl)
 find_library(HAVE_LIBDLD dld)
-find_library(HAVE_LIBIEEE ieee)
 find_library(HAVE_LIBINTL intl)
 find_library(HAVE_LIBM m)
 find_library(HAVE_LIBNCURSES ncurses)
@@ -266,6 +267,15 @@
 check_symbol_exists(fork         "${CFG_HEADERS}" HAVE_FORK)
 check_symbol_exists(forkpty      "${CFG_HEADERS}" HAVE_FORKPTY)
 check_symbol_exists(fpathconf    "${CFG_HEADERS}" HAVE_FPATHCONF)
+cmake_push_check_state()
+set(CFG_HEADERS_SAVE ${CFG_HEADERS})
+add_cond(CFG_HEADERS HAVE_FPU_CONTROL_H fpu_control.h)
+check_symbol_exists(__fpu_control  "${CFG_HEADERS}" HAVE___FPU_CONTROL)
+if(NOT HAVE___FPU_CONTROL)
+  check_library_exists(ieee __fpu_control "" HAVE_LIBIEEE)
+endif(NOT HAVE___FPU_CONTROL)
+set(CFG_HEADERS ${CFG_HEADERS_SAVE})
+cmake_pop_check_state()
 check_symbol_exists(fseek64      "${CFG_HEADERS}" HAVE_FSEEK64)
 check_symbol_exists(fseeko       "${CFG_HEADERS}" HAVE_FSEEKO)
 check_symbol_exists(fstatvfs     "${CFG_HEADERS}" HAVE_FSTATVFS)


Added explicit deb package dependency from libtbb-dev if TBB is enabled.

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -104,6 +104,14 @@
   endif()
 endif()

+if(HAVE_TBB AND NOT BUILD_TBB)
+  if(CPACK_DEB_DEV_PACKAGE_DEPENDS)
+    set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, libtbb-dev")
+  else()
+    set(CPACK_DEB_DEV_PACKAGE_DEPENDS "libtbb-dev")
+  endif()
+endif()
+
 if(NOT OPENCV_CUSTOM_PACKAGE_INFO)
   set(CPACK_COMPONENT_LIBS_DESCRIPTION "Open Computer Vision Library")
   set(CPACK_DEBIAN_COMPONENT_LIBS_NAME "libopencv")


Add comments (mark Android API releated packages)

[skip ci]

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,13 +24,13 @@
 # NOTE: no names with spaces!

 hunter_config(Android-Build-Tools VERSION 22.0.1)
-hunter_config(Android-Google-APIs VERSION 22)
-hunter_config(Android-Google-APIs-Intel-x86-Atom-System-Image VERSION 22)
+hunter_config(Android-Google-APIs VERSION 22) # API 22
+hunter_config(Android-Google-APIs-Intel-x86-Atom-System-Image VERSION 22) # API 22
 hunter_config(Android-Google-Repository VERSION 19)
-hunter_config(Android-Intel-x86-Atom-System-Image VERSION 22)
+hunter_config(Android-Intel-x86-Atom-System-Image VERSION 22) # API 22
 hunter_config(Android-Modules VERSION 1.0.0)
 hunter_config(Android-SDK VERSION 0.0.1)
-hunter_config(Android-SDK-Platform VERSION 22_r02)
+hunter_config(Android-SDK-Platform VERSION 22_r02) # API 22
 hunter_config(Android-SDK-Platform-tools VERSION r22)
 hunter_config(Android-SDK-Tools VERSION 24.3)
 hunter_config(Android-Support-Repository VERSION 15)
@@ -62,7 +62,7 @@
 hunter_config(PNG VERSION 1.6.16-p3)
 hunter_config(RapidJSON VERSION 0.11-hunter)
 hunter_config(Sober VERSION 0.1.1) # Relax warnings
-hunter_config(Sources-for-Android-SDK VERSION 22)
+hunter_config(Sources-for-Android-SDK VERSION 22) # API 22
 hunter_config(Sugar VERSION 1.2.2)
 hunter_config(TIFF VERSION 4.0.2-p3)
 hunter_config(Washer VERSION 0.1.2)


On Microsoft Visual Studio, used internal urdfdom by default

--- cmake/iDynTreeOptions.cmake
+++ cmake/iDynTreeOptions.cmake
@@ -33,7 +33,12 @@

 option(IDYNTREE_ENABLE_SYMORO_PAR "Enable support for SyMoRo par format" TRUE)
 option(IDYNTREE_USES_ICUB_MAIN  "Compiled iDynTree with icub-main dependencies (for iKin and skinDynLib helper functions and tools)" TRUE)
+if( MSVC )
+option(IDYNTREE_USES_INTERNAL_URDFDOM "Compile iDynTree with an internal copy of urdfdom patched to avoid Boost dependencies" TRUE)
+else()
 option(IDYNTREE_USES_INTERNAL_URDFDOM "Compile iDynTree with an internal copy of urdfdom patched to avoid Boost dependencies" FALSE)
+endif()
+
 if(IDYNTREE_USES_INTERNAL_URDFDOM)
     add_definitions(-DURDF_USE_PLAIN_POINTERS)
     add_definitions(-DIDYNTREE_USE_INTERNAL_URDFDOM)


cmake px4_add_library remove unused PX4_LIBRARIES property

--- cmake/px4_add_library.cmake
+++ cmake/px4_add_library.cmake
@@ -54,6 +54,5 @@
 	# Pass variable to the parent px4_add_module.
 	set(_no_optimization_for_target ${_no_optimization_for_target} PARENT_SCOPE)

-	set_property(GLOBAL APPEND PROPERTY PX4_LIBRARIES ${target})
 	set_property(GLOBAL APPEND PROPERTY PX4_MODULE_PATHS ${CMAKE_CURRENT_SOURCE_DIR})
 endfunction()


Use 10.5 sdk

Use 10.5 sdk

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -81,13 +81,13 @@
   # otherwise CMAKE_OSX_SYSROOT will be overridden here. We can't just check
   # for it being unset, as it gets set to the system default :(

-  # Default to building against the 10.4 SDK if no deployment target is
+  # Default to building against the 10.5 SDK if no deployment target is
   # specified.
   if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
     # NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html
     # see http://public.kitware.com/Bug/view.php?id=9959 + poppy
-    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
-    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4)
+    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
+    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
   endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET)

   # GCC 4.2 is incompatible with the MacOSX 10.4 SDK


Python headers are copied to include directory

This directory is in the python package. It makes it easier to include
mako-generated pxd files.

--- scripts/PythonModule.cmake
+++ scripts/PythonModule.cmake
@@ -194,7 +194,7 @@
     string(REGEX REPLACE "/" "_" h "h.${module}")
     cmake_parse_arguments(${h}
         ""
-        "INSTALL;LOCATION;DESTINATION"
+        "INSTALL;LOCATION;DESTINATION;TARGET"
         "SOURCES"
         ${ARGN}
     )
@@ -220,6 +220,12 @@
         string(REGEX REPLACE "\\." "/" header_destination ${${h}_DESTINATION})
     endif()

+    if(NOT IS_ABSOLUTE "${header_destination}")
+        add_copy_files(${${h}_TARGET}
+            FILES ${headers}
+            DESTINATION "${PYTHON_BINARY_DIR}/${header_destination}"
+        )
+    endif()
     install_python(FILES ${headers}
         DESTINATION ${header_destination}
         COMPONENT dev
@@ -268,11 +274,9 @@
         set(c_source "cython_${cy_module}.c")
     endif()

-    # Figure out generated source name
-    set(generated_source "${source}")
     # Create C source from cython
     list(APPEND arguments
-        "${generated_source}"
+        "${source}"
         -o "${CMAKE_CURRENT_BINARY_DIR}/${c_source}" ${inclusion}
     )
     add_custom_command(
@@ -406,6 +410,7 @@

     # Then copy/install header files
     _pm_add_headers(${module}
+        TARGET ${targetname}
         LOCATION ${location}
         DESTINATION ${${module}_HEADER_DESTINATION}
         SOURCES ${CPP_HEADERS} ${C_HEADERS} ${CY_HEADERS}


Implement HAVE_WORKING_TZSET run platform test

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -1013,6 +1013,83 @@
 endif(HAVE_SYS_TIME_H AND HAVE_SYS_SELECT_H)

+
+# Check tzset(3) exists and works like we expect it to
+set(check_src ${PROJECT_BINARY_DIR}/ac_cv_working_tzset.c)
+file(WRITE ${check_src} "#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+
+#if HAVE_TZNAME
+extern char *tzname[];
+#endif
+
+int main()
+{
+  /* Note that we need to ensure that not only does tzset(3)
+     do 'something' with localtime, but it works as documented
+     in the library reference and as expected by the test suite.
+     This includes making sure that tzname is set properly if
+     tm->tm_zone does not exist since it is the alternative way
+     of getting timezone info.
+
+     Red Hat 6.2 doesn't understand the southern hemisphere
+     after New Year's Day.
+  */
+
+  time_t groundhogday = 1044144000; /* GMT-based */
+  time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
+
+  putenv(\"TZ=UTC+0\");
+  tzset();
+  if (localtime(&groundhogday)->tm_hour != 0)
+      exit(1);
+#if HAVE_TZNAME
+  /* For UTC, tzname[1] is sometimes \"\", sometimes \"   \" */
+  if (strcmp(tzname[0], "UTC") ||
+    (tzname[1][0] != 0 && tzname[1][0] != ' '))
+      exit(1);
+#endif
+
+  putenv(\"TZ=EST+5EDT,M4.1.0,M10.5.0\");
+  tzset();
+  if (localtime(&groundhogday)->tm_hour != 19)
+      exit(1);
+#if HAVE_TZNAME
+  if (strcmp(tzname[0], \"EST\") || strcmp(tzname[1], \"EDT\"))
+      exit(1);
+#endif
+
+  putenv(\"TZ=AEST-10AEDT-11,M10.5.0,M3.5.0\");
+  tzset();
+  if (localtime(&groundhogday)->tm_hour != 11)
+      exit(1);
+#if HAVE_TZNAME
+  if (strcmp(tzname[0], \"AEST\") || strcmp(tzname[1], \"AEDT\"))
+      exit(1);
+#endif
+
+#if HAVE_STRUCT_TM_TM_ZONE
+  if (strcmp(localtime(&groundhogday)->tm_zone, \"AEDT\"))
+      exit(1);
+  if (strcmp(localtime(&midyear)->tm_zone, \"AEST\"))
+      exit(1);
+#endif
+
+  exit(0);
+}
+")
+cmake_push_check_state()
+add_cond(CMAKE_REQUIRED_DEFINITIONS HAVE_TZNAME "-DHAVE_TZNAME")
+add_cond(CMAKE_REQUIRED_DEFINITIONS HAVE_STRUCT_TM_TM_ZONE "-DHAVE_STRUCT_TM_TM_ZONE")
+python_platform_test_run(
+  HAVE_WORKING_TZSET
+  "Checking for working tzset()"
+  ${check_src}
+  DIRECT
+  )
+cmake_pop_check_state()
+
 # Check for broken unsetenv
 set(check_src ${PROJECT_BINARY_DIR}/have_broken_unsetenv.c)
 file(WRITE ${check_src} "#include <stdlib.h>
@@ -1062,7 +1139,6 @@
 set(HAVE_UCS4_TCL 0)
 set(HAVE_PROTOTYPES 1)
 set(PTHREAD_SYSTEM_SCHED_SUPPORTED 1)
-set(HAVE_WORKING_TZSET 1)
 set(HAVE_DEVICE_MACROS ${HAVE_MAKEDEV})

 endif(WIN32)


Only conflict with packages corresponding to modules that are built

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -120,8 +120,10 @@

 foreach(module calib3d contrib core features2d flann gpu highgui imgproc legacy
                ml objdetect ocl photo stitching superres ts video videostab)
-  list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4")
-  list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
+  if(HAVE_opencv_${module})
+    list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4")
+    list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
+  endif()
 endforeach()

 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_CONFLICTS "${STD_OPENCV_LIBS}")


ENH: Remove deprecated python build

ENH: Remove deprecated python build

--- cmake/external/python.cmake
+++ cmake/external/python.cmake
@@ -32,193 +32,6 @@
         MESSAGE(FATAL_ERROR "Found Python Protobuf ${PY_GOOGLE.PROTOBUF_VERSION} < 3.0.0, "
         "please use pip to upgrade protobuf. pip install -U protobuf")
     ENDIF()
-ELSE(PYTHONINTERP_FOUND)
-    MESSAGE(FATAL_ERROR "Please install python 2.7 before building PaddlePaddle.")
-    ##################################### PYTHON ########################################
-    SET(PYTHON_SOURCES_DIR ${THIRD_PARTY_PATH}/python)
-    SET(PYTHON_INSTALL_DIR ${THIRD_PARTY_PATH}/install/python)
-    SET(_python_DIR ${PYTHON_INSTALL_DIR})
-
-    IF(UNIX)
-        SET(PYTHON_FOUND ON)
-        SET(PYTHON_INCLUDE_DIR "${PYTHON_INSTALL_DIR}/include/python2.7" CACHE PATH "Python include dir" FORCE)
-        SET(PYTHON_LIBRARIES "${PYTHON_INSTALL_DIR}/lib/libpython2.7.a" CACHE FILEPATH "Python library" FORCE)
-        SET(PYTHON_EXECUTABLE ${PYTHON_INSTALL_DIR}/bin/python CACHE FILEPATH "Python executable" FORCE)
-        SET(PY_SITE_PACKAGES_PATH "${PYTHON_INSTALL_DIR}/lib/python2.7/site-packages" CACHE PATH "Python site-packages path" FORCE)
-    ELSEIF(WIN32)
-        SET(PYTHON_FOUND ON)
-        SET(PYTHON_INCLUDE_DIR "${PYTHON_INSTALL_DIR}/include" CACHE PATH "Python include dir" FORCE)
-        SET(PYTHON_LIBRARIES "${PYTHON_INSTALL_DIR}/libs/python27.lib" CACHE FILEPATH "Python library" FORCE)
-        SET(PYTHON_EXECUTABLE "${PYTHON_INSTALL_DIR}/bin/python.exe" CACHE FILEPATH "Python executable" FORCE)
-        SET(PY_SITE_PACKAGES_PATH "${PYTHON_INSTALL_DIR}/Lib/site-packages" CACHE PATH "Python site-packages path" FORCE)
-    ELSE()
-        MESSAGE(FATAL_ERROR "Unknown system !")
-    ENDIF()
-
-    IF(APPLE)
-        LIST(APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS
-            -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
-            )
-    ENDIF()
-
-    SET(EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS)
-
-    # Force Python build to "Release".
-    IF(CMAKE_CONFIGURATION_TYPES)
-        SET(SAVED_CMAKE_CFG_INTDIR ${CMAKE_CFG_INTDIR})
-        SET(CMAKE_CFG_INTDIR "Release")
-    ELSE()
-        LIST(APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS
-            -DCMAKE_BUILD_TYPE:STRING=Release
-            )
-    ENDIF()
-
-    ExternalProject_Add(python
-        ${EXTERNAL_PROJECT_LOG_ARGS}
-        GIT_REPOSITORY    "https://github.com/python-cmake-buildsystem/python-cmake-buildsystem.git"
-        PREFIX            ${PYTHON_SOURCES_DIR}
-        UPDATE_COMMAND    ""
-        CMAKE_ARGS        -DPYTHON_VERSION=2.7.12
-        CMAKE_ARGS        -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-        CMAKE_ARGS        -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-        CMAKE_CACHE_ARGS
-            -DCMAKE_INSTALL_PREFIX:PATH=${PYTHON_INSTALL_DIR}
-            -DBUILD_LIBPYTHON_SHARED:BOOL=OFF
-            -DUSE_SYSTEM_LIBRARIES:BOOL=OFF
-            -DZLIB_ROOT:FILEPATH=${ZLIB_ROOT}
-            -DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR}
-            -DZLIB_LIBRARY:FILEPATH=${ZLIB_LIBRARIES}
-            -DDOWNLOAD_SOURCES:BOOL=ON
-            -DINSTALL_WINDOWS_TRADITIONAL:BOOL=OFF
-            ${EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS}
-            ${EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS}
-        DEPENDS zlib
-    )
-
-    SET(py_env
-        PATH=${PYTHON_INSTALL_DIR}/bin
-        PYTHONHOME=${PYTHON_INSTALL_DIR}
-        PYTHONPATH=${PYTHON_INSTALL_DIR}/lib:${PYTHON_INSTALL_DIR}/lib/python2.7:${PY_SITE_PACKAGES_PATH})
-    ####################################################################################
-
-    ##################################### SETUPTOOLS ###################################
-    SET(SETUPTOOLS_SOURCES_DIR ${PYTHON_SOURCES_DIR}/setuptools)
-    ExternalProject_Add(setuptools
-        ${EXTERNAL_PROJECT_LOG_ARGS}
-        PREFIX              ${SETUPTOOLS_SOURCES_DIR}
-        URL                 "https://pypi.python.org/packages/source/s/setuptools/setuptools-18.3.2.tar.gz"
-        BUILD_IN_SOURCE     1
-        PATCH_COMMAND       ""
-        UPDATE_COMMAND      ""
-        CONFIGURE_COMMAND   ""
-        INSTALL_COMMAND     ""
-        BUILD_COMMAND       env ${py_env} ${PYTHON_EXECUTABLE} setup.py install
-        DEPENDS             python zlib
-    )
-    #####################################################################################
-
-    ##################################### SIX ###########################################
-    SET(SIX_SOURCES_DIR ${PYTHON_SOURCES_DIR}/six)
-    ExternalProject_Add(six
-        ${EXTERNAL_PROJECT_LOG_ARGS}
-        PREFIX              ${SIX_SOURCES_DIR}
-        URL                 https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz
-        BUILD_IN_SOURCE     1
-        PATCH_COMMAND       ""
-        UPDATE_COMMAND      ""
-        CONFIGURE_COMMAND   ""
-        INSTALL_COMMAND     ""
-        BUILD_COMMAND       env ${py_env} ${PYTHON_EXECUTABLE} setup.py install
-        DEPENDS             python setuptools
-    )
-    #####################################################################################
-
-    ##################################### CYTHON ########################################
-    SET(CYTHON_SOURCES_DIR ${PYTHON_SOURCES_DIR}/cython)
-    ExternalProject_Add(cython
-        ${EXTERNAL_PROJECT_LOG_ARGS}
-        PREFIX                ${CYTHON_SOURCES_DIR}
-        URL                   https://github.com/cython/cython/archive/0.25.2.tar.gz
-        GIT_TAG               0.25.2
-        BUILD_IN_SOURCE       1
-        CONFIGURE_COMMAND     ""
-        PATCH_COMMAND         ""
-        UPDATE_COMMAND        ""
-        INSTALL_COMMAND       ""
-        BUILD_COMMAND         env ${py_env} ${PYTHON_EXECUTABLE} setup.py install
-        DEPENDS               python
-    )
-    ####################################################################################
-
-    ##################################### NUMPY ########################################
-    SET(NUMPY_SOURCES_DIR ${PYTHON_SOURCES_DIR}/numpy)
-    SET(NUMPY_TAG_VERSION "v1.11.3")
-    SET(NUMPY_VERSION "1.11.3")
-
-    SET(EGG_NAME "")
-    SET(PYTHON_NUMPY_INCLUDE_DIR "")
-    IF(WIN32)
-        SET(EGG_NAME "numpy-${NUMPY_VERSION}-py2.7-${HOST_SYSTEM}.egg")
-    ELSE(WIN32)
-        IF(APPLE)
-            SET(EGG_NAME "numpy-${NUMPY_VERSION}-py2.7-${HOST_SYSTEM}-${MACOS_VERSION}")
-        ELSE(APPLE)
-            SET(EGG_NAME "numpy-${NUMPY_VERSION}-py2.7-linux")
-            SET(EGG_NAME "numpy-${NUMPY_VERSION}-py2.7-linux")
-        ENDIF(APPLE)
-
-        FOREACH(suffix x86_64 intel fat64 fat32 universal)
-            LIST(APPEND PYTHON_NUMPY_INCLUDE_DIR ${PY_SITE_PACKAGES_PATH}/${EGG_NAME}-${suffix}.egg/numpy/core/include)
-        ENDFOREACH()
-    ENDIF(WIN32)
-
-    ExternalProject_Add(numpy
-        ${EXTERNAL_PROJECT_LOG_ARGS}
-        GIT_REPOSITORY      https://github.com/numpy/numpy.git
-        GIT_TAG             ${NUMPY_TAG_VERSION}
-        CONFIGURE_COMMAND   ""
-        UPDATE_COMMAND      ""
-        PREFIX              ${NUMPY_SOURCES_DIR}
-        BUILD_COMMAND       env ${py_env} ${PYTHON_EXECUTABLE} setup.py build
-        INSTALL_COMMAND     env ${py_env} ${PYTHON_EXECUTABLE} setup.py install
-        BUILD_IN_SOURCE     1
-        DEPENDS             python setuptools cython
-    )
-    ####################################################################################
-
-    ##################################### WHEEL ########################################
-    SET(WHEEL_SOURCES_DIR ${PYTHON_SOURCES_DIR}/wheel)
-    ExternalProject_Add(wheel
-        ${EXTERNAL_PROJECT_LOG_ARGS}
-        URL                 https://pypi.python.org/packages/source/w/wheel/wheel-0.29.0.tar.gz
-        PREFIX              ${WHEEL_SOURCES_DIR}
-        CONFIGURE_COMMAND   ""
-        UPDATE_COMMAND      ""
-        BUILD_COMMAND       ""
-        INSTALL_COMMAND     env ${py_env} ${PYTHON_EXECUTABLE} setup.py install
-        BUILD_IN_SOURCE     1
-        DEPENDS             python setuptools
-    )
-    ####################################################################################
-
-    ################################### PROTOBUF #######################################
-    SET(PY_PROTOBUF_SOURCES_DIR ${PYTHON_SOURCES_DIR}/protobuf)
-    ExternalProject_Add(python-protobuf
-        ${EXTERNAL_PROJECT_LOG_ARGS}
-        URL                   https://pypi.python.org/packages/e0/b0/0a1b364fe8a7d177b4b7d4dca5b798500dc57a7273b93cca73931b305a6a/protobuf-3.1.0.post1.tar.gz
-        URL_MD5               38b5fb160c768d2f8444d0c6d637ff91
-        PREFIX                ${PY_PROTOBUF_SOURCES_DIR}
-        BUILD_IN_SOURCE       1
-        PATCH_COMMAND         ""
-        CONFIGURE_COMMAND     ""
-        BUILD_COMMAND         env ${py_env} ${PYTHON_EXECUTABLE} setup.py build
-        INSTALL_COMMAND       env ${py_env} ${PYTHON_EXECUTABLE} setup.py install
-        DEPENDS               python setuptools six
-    )
-    ####################################################################################
-
-    LIST(APPEND external_project_dependencies python setuptools six cython wheel python-protobuf numpy)
-
 ENDIF(PYTHONINTERP_FOUND)

 IF(WITH_PYTHON)


Allow java include files

Allow java include files

--- cmake/includes/Export.cmake
+++ cmake/includes/Export.cmake
@@ -161,7 +161,7 @@
 function(export_java_project)
     set(options )
     set(oneValueArgs NAME)
-    set(multiValueArgs JARS JAR_PATHS APKS)
+    set(multiValueArgs JARS JAR_PATHS INCLUDES APKS)
     cmake_parse_arguments(EXP "${options}" "${oneValueArgs}"
         "${multiValueArgs}" ${ARGN})

@@ -212,4 +212,12 @@
         endforeach()
     endif()

+    if (EXP_INCLUDES)
+        file(APPEND ${export_config} "set(${EXP_NAME_uc}_INCLUDES \"\")\n")
+        foreach(j ${EXP_INCLUDES})
+            file(APPEND ${export_config}
+                "list(APPEND ${EXP_NAME_uc}_INCLUDES ${j})\n")
+        endforeach()
+    endif()
+
 endfunction()


[CMake] Use add_dependencies in add_llvm_install_targets

Summary:
The CMake documentation says that the `DEPENDS` field of
add_custom_target is for files and output of custom commands. Adding a
dependency on a target should be done with `add_dependency`.

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

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -597,21 +597,35 @@
     set(prefix_option -DCMAKE_INSTALL_PREFIX="${ARG_PREFIX}")
   endif()

+  set(file_dependencies)
+  set(target_dependencies)
+  foreach(dependency ${ARG_DEPENDS})
+    if(TARGET ${dependency})
+      list(APPEND target_dependencies ${dependency})
+    else()
+      list(APPEND file_dependencies ${dependency})
+    endif()
+  endforeach()
+
   add_custom_target(${target}
-                    DEPENDS ${ARG_DEPENDS}
+                    DEPENDS ${file_dependencies}
                     COMMAND "${CMAKE_COMMAND}"
                             ${component_option}
                             ${prefix_option}
                             -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
                     USES_TERMINAL)
   add_custom_target(${target}-stripped
-                    DEPENDS ${ARG_DEPENDS}
+                    DEPENDS ${file_dependencies}
                     COMMAND "${CMAKE_COMMAND}"
                             ${component_option}
                             ${prefix_option}
                             -DCMAKE_INSTALL_DO_STRIP=1
                             -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
                     USES_TERMINAL)
+  if(target_dependencies)
+    add_dependencies(${target} ${target_dependencies})
+    add_dependencies(${target}-stripped ${target_dependencies})
+  endif()
 endfunction()

 macro(add_llvm_library name)


Revert "[cmake] Add helper for finding potentially external projects"

This reverts commit r244633.

We aren't going to be able to use it because the compiler-rt build can
be built standalone without an LLVM source dir *or* an installed copy of
LLVM.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -717,23 +717,6 @@
   add_llvm_external_project(${name})
 endmacro(add_llvm_tool_subdirectory)

-# Finds a (potentially external) project that normally lives at
-# llvm/${subdir}/${name}. For example, to find clang:
-#   find_llvm_external_project(tools clang CLANG_SRC)
-# Returns nothing if the project is not configured to build.
-function(find_llvm_external_project subdir name path_out)
-  canonicalize_tool_name(${name} nameUPPER)
-  if (NOT LLVM_TOOL_${nameUPPER}_BUILD)
-    set(${path_out} PARENT_SCOPE)
-  elseif (EXISTS LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)
-    set(${path_out} LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR PARENT_SCOPE)
-  elseif (EXISTS ${LLVM_MAIN_SRC_DIR}/${subdir}/${name})
-    set(${path_out} ${LLVM_MAIN_SRC_DIR}/${subdir}/${name} PARENT_SCOPE)
-  else()
-    set(${path_out} PARENT_SCOPE)
-  endif()
-endfunction(find_llvm_external_project)
-
 function(get_project_name_from_src_var var output)
   string(REGEX MATCH "LLVM_EXTERNAL_(.*)_SOURCE_DIR"
          MACHED_TOOL "${var}")


added /usr/local/include to the search path

--- cmake_modules/Findbta.cmake
+++ cmake_modules/Findbta.cmake
@@ -5,6 +5,7 @@
  	PATHS
   		/usr/include/libbta/
 		/usr/local/include/libbta/
+		/usr/local/include/
 		../include/
 		../inc/
 		./


[FIX] Making FindOpenMP.cmake compatible with cmake 2.8.2.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13402 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/FindOpenMP.cmake
+++ util/cmake/FindOpenMP.cmake
@@ -25,6 +25,10 @@
 #=============================================================================
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
+
+if (NOT CMAKE_CURRENT_LIST_DIR)  # CMAKE_CURRENT_LIST_DIR only from cmake 2.8.3.
+  get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+endif (NOT CMAKE_CURRENT_LIST_DIR)

 # Do not try to find OpenMP if we know that it cannot be found.
 if (_OPENMP_NOT_FOUND)
@@ -123,4 +127,4 @@
 if (NOT OPENMP_FOUND)
     set (OPENMP_NOT_FOUND TRUE CACHE INTERNAL
         "Set such that OpenMP is not searched for more than once.")
-endif ()+endif ()


modules: and what now!

modules: and what now!

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -337,7 +337,7 @@

 # Component distinction (listing them explicitly to avoid mistakes with finding
 # components from other repositories)
-set(_MAGNUM_LIBRARY_COMPONENTS "^(Audio|DebugTools|MeshTools|Primitives|SceneGraph|Shaders|Shapes|Text|TextureTools|GlutApplication|GlxApplication|NaClApplication|Sdl2Application|XEglApplication|WindowlessCglApplication|WindowlessEglApplication|WindowlessGlxApplication|WindowlessNaClApplication|WindowlessWglApplication|WindowlessWindowsEglApplication|CglContext|EglContext|GlxContext|WglContext)$")
+set(_MAGNUM_LIBRARY_COMPONENTS "^(Audio|DebugTools|MeshTools|Primitives|SceneGraph|Shaders|Shapes|Text|TextureTools|AndroidApplication|GlutApplication|GlxApplication|NaClApplication|Sdl2Application|XEglApplication|WindowlessCglApplication|WindowlessEglApplication|WindowlessGlxApplication|WindowlessNaClApplication|WindowlessWglApplication|WindowlessWindowsEglApplication|CglContext|EglContext|GlxContext|WglContext)$")
 set(_MAGNUM_PLUGIN_COMPONENTS "^(MagnumFont|MagnumFontConverter|ObjImporter|TgaImageConverter|TgaImporter|WavAudioImporter)$")
 set(_MAGNUM_EXECUTABLE_COMPONENTS "^(distancefieldconverter|fontconverter|info)$")


Split off 8.6.62

Split off 8.6.62

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 6 )
-set ( HPCC_POINT 61 )
+set ( HPCC_POINT 63 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


bump version

bump version

--- version.cmake
+++ version.cmake
@@ -1,7 +1,7 @@
 # Copyright (c) 2011-2014, Christian Rorvik
 # Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)

-set(VPM_FRAMEWORK_VERSION 1.06.01)
+set(VPM_FRAMEWORK_VERSION 1.06.02)

 macro(vpm_set_version _name _version)
   if(VPM_VERBOSE)


Split off 8.0.76

Split off 8.0.76

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 75 )
+set ( HPCC_POINT 77 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Make APPLICATION_LINK_TO_OPENSPACE actually include the libOpenSpace and Ghoul as well

--- support/cmake/support_macros.cmake
+++ support/cmake/support_macros.cmake
@@ -192,6 +192,29 @@
             unset(APPLICATION_LINK_TO_OPENSPACE)
             include(${OPENSPACE_APPS_DIR}/${app}/CMakeLists.txt)
             set_compile_settings(${APPLICATION_NAME})
+
+            if (APPLICATION_LINK_TO_OPENSPACE)
+                    get_property(
+                        OPENSPACE_INCLUDE_DIR
+                        TARGET libOpenSpace
+                        PROPERTY INTERFACE_INCLUDE_DIRECTORIES
+                    )
+                    target_include_directories(${APPLICATION_NAME} PUBLIC
+                        "${OPENSPACE_BASE_DIR}"
+                        ${OPENSPACE_INCLUDE_DIR}
+                    )
+
+                    get_property(
+                        OPENSPACE_DEFINES
+                        TARGET libOpenSpace
+                        PROPERTY INTERFACE_COMPILE_DEFINITIONS
+                    )
+                    target_compile_definitions(${APPLICATION_NAME} PUBLIC ${OPENSPACE_DEFINES})
+
+                    target_link_libraries(${APPLICATION_NAME} Ghoul)
+                    target_link_libraries(${APPLICATION_NAME} libOpenSpace)
+            endif ()
+
             list(APPEND applications ${APPLICATION_NAME})
             list(APPEND applications_link_to_openspace ${APPLICATION_LINK_TO_OPENSPACE})
             unset(APPLICATION_NAME)
@@ -362,7 +385,7 @@
                 list(GET OPENSPACE_APPLICATIONS ${val} val1)
                 list(GET OPENSPACE_APPLICATIONS_LINK_REQUEST ${val} val2)
                 if (${val2})
-                    target_link_libraries(${app} ${libraryName})
+                    target_link_libraries(${app} ${libraryName})
                 endif ()
             endforeach()


Silence CMake warnings regarding FindOpenGL

For now we keep the old behavior and prefer the legacy OpenGL
library libGL over the VND version libOpenGL.

--- CMake/PackageDepends/MITK_OpenGL_Config.cmake
+++ CMake/PackageDepends/MITK_OpenGL_Config.cmake
@@ -1,3 +1,4 @@
+set(OpenGL_GL_PREFERENCE LEGACY)
 find_package(OpenGL REQUIRED)
 list(APPEND ALL_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR})
 list(APPEND ALL_LIBRARIES ${OPENGL_LIBRARIES})


ENH: Bump version of ITK and GenerateCLP to match Slicer

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -77,17 +77,17 @@

 ###########################################################
 ###########################################################
-# The following were copied from Slicer on 11/22/2015
+# The following were copied from Slicer on 2/29/2016
 ###########################################################
 ###########################################################

 # Common Toolkit
 set( CTK_URL ${github_protocol}://github.com/commontk/CTK.git )
-set( CTK_HASH_OR_TAG 5f581323b6526caf5ff293d9a810a3c9f68343d9 )
+set( CTK_HASH_OR_TAG caaf2c8cdee08e95bc823ab92865e1e9153dcc04 )

 # Insight Segmentation and Registration Toolkit
 set( ITK_URL ${github_protocol}://github.com/Slicer/ITK.git )
-set( ITK_HASH_OR_TAG 03055046e2693349937339975df4e16b598609c1 )
+set( ITK_HASH_OR_TAG 84ba36bbbdfc9bdf489479453a4a85b4a4ed22d5 )

 # Slicer Execution Model
 set( SlicerExecutionModel_URL


Fix a bug in the Git CMake module.

Fix a bug in the Git CMake module.

--- cmake/Modules/GetGitRevisionDescription.cmake
+++ cmake/Modules/GetGitRevisionDescription.cmake
@@ -62,9 +62,13 @@
 	# check if this is a submodule
 	if(NOT IS_DIRECTORY ${GIT_DIR})
 		file(READ ${GIT_DIR} submodule)
-		string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
-		get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
-		get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
+		string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE_OR_ABSOLUTE ${submodule})
+		if (IS_ABSOLUTE ${GIT_DIR_RELATIVE_OR_ABSOLUTE})
+			set(GIT_DIR "${GIT_DIR_RELATIVE_OR_ABSOLUTE}")
+		else()
+			get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
+			get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE_OR_ABSOLUTE} ABSOLUTE)
+		endif()
 	endif()
 	set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
 	if(NOT EXISTS "${GIT_DATA}")


cmake: Add GCC -Og flag fallback to -O0.

The -Og (optimise for debugging) flag is only available for GCC 4.8.0
and above, and specifying it for a GCC version lower than 4.8.0 will
result in a compilation error.

This commit adds a check for compiler -Og optimisation flag support and
a fallback to -O0 (disable optimisation) when -Og flag is unsupported.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/compiler/gcc/target_optimizations.cmake
+++ cmake/compiler/gcc/target_optimizations.cmake
@@ -15,7 +15,13 @@
 endmacro()

 macro(toolchain_cc_optimize_for_debug_flag dest_var_name)
-  set_ifndef(${dest_var_name}  "-Og")
+  # -Og optimisation flag is only supported from gcc 4.8.0 and above.
+  # Fall back to using -O0 flag if running an older gcc version.
+  if(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.8.0")
+    set_ifndef(${dest_var_name}  "-O0")
+  else()
+    set_ifndef(${dest_var_name}  "-Og")
+  endif()
 endmacro()

 macro(toolchain_cc_optimize_for_speed_flag dest_var_name)


Revert "Avoid numdiff check race condition in test"

This reverts commit 41d4678230e24635583eb892fdf473c5d6847a05.

--- cmake/macros/macro_deal_ii_pickup_tests.cmake
+++ cmake/macros/macro_deal_ii_pickup_tests.cmake
@@ -164,10 +164,11 @@
       RESULT_VARIABLE _numdiff_tolerance_test_status
       )

-    # Note: We do not remove the test files to avoid a race condition if
-    # cmake decides to rerun in a concurrent situation:
-    # FILE(REMOVE ${_first_test_file_name})
-    # FILE(REMOVE ${_second_test_file_name})
+    #
+    # Tidy up:
+    #
+    FILE(REMOVE ${_first_test_file_name})
+    FILE(REMOVE ${_second_test_file_name})

     IF(NOT "${_numdiff_tolerance_test_status}" STREQUAL "0")
       MESSAGE(FATAL_ERROR


refs #5127 ignore warnings generated by compiling jemalloc source

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@50691 c7de825b-a66e-492c-adef-691d508d4ae1

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -223,6 +223,8 @@
   "xz-4.999.9beta/src/liblzma"
   # don't complain about clang missing warnings from xz code
   "clang: warning: unknown warning option"
+  # don't complain about warnings in jemalloc source
+  "jemalloc-3.2.0/src"
   # don't complain about ranlib on empty archive
   "ranlib:"
   )


Reuse known debs for CPack

Reuse known debs for CPack

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -43,6 +43,9 @@
 endif()
 if(NOT CPACK_PACKAGE_CONFIG_REQUIRES)
   set(CPACK_PACKAGE_CONFIG_REQUIRES ${${UPPER_PROJECT_NAME}_DEPENDENT_LIBRARIES})
+endif()
+if(NOT CPACK_DEBIAN_BUILD_DEPENDS)
+  set(CPACK_DEBIAN_BUILD_DEPENDS ${${UPPER_PROJECT_NAME}_BUILD_DEBS})
 endif()

 # Default component definition


Fix debian package naming

Fix debian package naming

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -113,7 +113,7 @@

   if(CPACK_GENERATOR STREQUAL "DEB")
     # dpkg requires lowercase package names
-    set(CPACK_DEBIAN_PACKAGE_NAME ${LOWER_PROJECT_NAME})
+    string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)

     if(CPACK_PACKAGE_NAME_EXTRA)
       set(CPACK_DEBIAN_PACKAGE_VERSION


COMP: Fix static library dependencies on VS 7

Visual Studio 7 and 7.1 do not support direct dependencies between static
library targets cleanly.  CMake works around the problem by adding a
custom "_UTILITY" target in between, but only does it for explicit
add_dependencies and not for target_link_libraries because the extra
targets are ugly and the dependencies are not needed only for compiling
sources.

Now that VTK uses custom commands to run vtkWrapHierarchy when building
module libraries we need the library target ordering dependencies to be
enforced.  In the case of STATIC libraries on VS 7, use an explicit
add_dependencies call to tell CMake to use the work around to enforce the
target build order.  In other cases the existing target_link_libraries is
enough.

Change-Id: I62c934669cedfdb23f7cf8f6cd1e7ee1d1f1d427

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -465,11 +465,24 @@
   else()
     set(_hierarchy "")
   endif()
+  if(CMAKE_GENERATOR MATCHES "Visual Studio 7([^0-9]|$)" AND
+      NOT VTK_BUILD_SHARED_LIBS AND _hierarchy)
+    # For VS <= 7.1 use explicit dependencies between static libraries
+    # to tell CMake to use an ugly workaround for a VS limitation.
+    set(_help_vs7 1)
+  else()
+    set(_help_vs7 0)
+  endif()

   vtk_add_library(${vtk-module} ${ARGN} ${_hdrs} ${_instantiator_SRCS} ${_hierarchy})
   foreach(dep IN LISTS ${vtk-module}_LINK_DEPENDS)
     target_link_libraries(${vtk-module} ${${dep}_LIBRARIES})
-  endforeach()
+    if(_help_vs7 AND ${dep}_LIBRARIES)
+      add_dependencies(${vtk-module} ${${dep}_LIBRARIES})
+    endif()
+  endforeach()
+
+  unset(_help_vs7)

   set(sep "")
   if(${vtk-module}_EXPORT_CODE)


Fix update of .gitexternals

Fix update of .gitexternals

The newly-added git_external() call caused the script to fail since it
executed unneeded add_custom_targets which are unsupported in script
mode.

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -12,10 +12,11 @@
 #
 # [optional] Flags which control behaviour
 #  NO_UPDATE
-#    When set, GitExternal will not change a repo that has already been checked out.
-#    The purpose of this is to allow one to set a default branch to be checked out,
-#    but stop GitExternal from changing back to that branch if the user has checked
-#    out and is working on another.
+#    When set, GitExternal will not change a repo that has already
+#    been checked out.  The purpose of this is to allow one to set a
+#    default branch to be checked out, but stop GitExternal from
+#    changing back to that branch if the user has checked out and is
+#    working on another.
 #  VERBOSE
 #    When set, displays information about git commands that are executed
 #
@@ -115,7 +116,7 @@
   set(GIT_EXTERNALS "${CMAKE_CURRENT_SOURCE_DIR}/.gitexternals")
 endif()

-if(EXISTS ${GIT_EXTERNALS})
+if(EXISTS ${GIT_EXTERNALS} AND NOT GIT_EXTERNAL_SCRIPT_MODE)
   include(${GIT_EXTERNALS})
   file(READ ${GIT_EXTERNALS} GIT_EXTERNAL_FILE)
   string(REGEX REPLACE "\n" ";" GIT_EXTERNAL_FILE "${GIT_EXTERNAL_FILE}")
@@ -161,7 +162,7 @@
             file(WRITE "${GIT_EXTERNAL_SCRIPT}"
               "file(WRITE ${GIT_EXTERNALS} \"# -*- mode: cmake -*-\n\")\n")
             add_custom_target(${GIT_EXTERNAL_TARGET}
-              COMMAND ${CMAKE_COMMAND} -P ${GIT_EXTERNAL_SCRIPT}
+              COMMAND ${CMAKE_COMMAND} -DGIT_EXTERNAL_SCRIPT_MODE=1 -P ${GIT_EXTERNAL_SCRIPT}
               COMMENT "Recreate ${GIT_EXTERNALS_BASE}"
               WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
           endif()
@@ -183,7 +184,7 @@
   file(APPEND ${GIT_EXTERNALS} \"# ${DIR} ${REPO} ${TAG}\n\")
 endif()")
           add_custom_target(update_git_external_${GIT_EXTERNAL_NAME}
-            COMMAND ${CMAKE_COMMAND} -P ${GIT_EXTERNAL_SCRIPT}
+            COMMAND ${CMAKE_COMMAND} -DGIT_EXTERNAL_SCRIPT_MODE=1 -P ${GIT_EXTERNAL_SCRIPT}
             COMMENT "Update ${REPO} in ${GIT_EXTERNALS_BASE}"
             DEPENDS ${GIT_EXTERNAL_TARGET}
             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")