RootBuildOptions.cmake: update deprecation messages

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -355,14 +355,14 @@
 foreach(opt afdsmgrd afs bonjour castor chirp geocad glite globus gviz hdfs ios
             krb5 ldap qt qtgsi rfio ruby sapdb srp table)
   if(${opt})
-    message(FATAL_ERROR ">>> Option '${opt}' has been removed in ROOT v6.16.")
+    message(FATAL_ERROR ">>> Option '${opt}' is no longer supported in ROOT ${ROOT_VERSION}.")
   endif()
 endforeach()

 #---Deprecated options---------------------------------------------------------
 foreach(opt memstat vmc)
   if(${opt})
-    message(DEPRECATION ">>> Option '${opt}' is deprecated and will be removed in ROOT v6.18. Please inform rootdev@cern.ch should you still need it.")
+    message(DEPRECATION ">>> Option '${opt}' is deprecated and will be removed in the next release of ROOT. Please contact root-dev@cern.ch should you still need it.")
   endif()
 endforeach()


Use native paths again when passing them to the resource compiler.

--- cmake/usFunctionEmbedResources.cmake
+++ cmake/usFunctionEmbedResources.cmake
@@ -69,7 +69,8 @@
           message(SEND_ERROR "The ROOT_DIR argument is not a directory: ${current_root_dir}")
         endif()
         get_filename_component(current_root_dir "${current_root_dir}" REALPATH)
-        list(APPEND cmd_line_args -d "${current_root_dir}")
+        file(TO_NATIVE_PATH "${current_root_dir}" current_root_dir_native)
+        list(APPEND cmd_line_args -d "${current_root_dir_native}")
       elseif(current_arg_name STREQUAL "FILES")
         set(res_file "${current_root_dir}/${arg}")
         file(TO_NATIVE_PATH "${res_file}" res_file_native)
@@ -80,7 +81,8 @@
           message(SEND_ERROR "Resource does not exists: ${res_file_native}")
         endif()
         list(APPEND absolute_res_files ${res_file})
-        list(APPEND cmd_line_args "${arg}")
+        file(TO_NATIVE_PATH "${arg}" res_filename_native)
+        list(APPEND cmd_line_args "${res_filename_native}")
       endif()
     endif(is_arg_name GREATER -1)


Switch Qwt branch

Switch Qwt branch

--- Superbuild/QwtExternal.cmake
+++ Superbuild/QwtExternal.cmake
@@ -25,7 +25,7 @@
 #  DEALINGS IN THE SOFTWARE.

 SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})
-SET(qwt_GIT_TAG "origin/static-build")
+SET(qwt_GIT_TAG "origin/qt5-static")

 # If CMake ever allows overriding the checkout command or adding flags,
 # git checkout -q will silence message about detached head (harmless).
@@ -39,7 +39,7 @@
     -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-    -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+    -DQt5_PATH:PATH=${Qt5_PATH}
 )

 ExternalProject_Get_Property(Qwt_external BINARY_DIR)


SofaCUDA : fixed cudaNvccFlags duplication.

Signed-off-by: Étienne Schmitt <etienne.schmitt@inria.fr>

Former-commit-id: 284a5a3cc181f842f224ddc562b429668486a071

--- applications/plugins/SofaCUDA/SofaCUDANvccFlags.cmake
+++ applications/plugins/SofaCUDA/SofaCUDANvccFlags.cmake
@@ -1,7 +1,10 @@
-
-set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -arch ${SOFACUDA_ARCH} -Xcompiler")
-if(NOT WIN32)
-    set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -fPIC")
+set(TEMP_CUDA_FLAGS "-arch ${SOFACUDA_ARCH} -Xcompiler")
+if(NOT (${CUDA_NVCC_FLAGS} MATCHES ${TEMP_CUDA_FLAGS}))
+	set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} ${TEMP_CUDA_FLAGS}")
+	if(NOT WIN32)
+	    set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -fPIC")
+	endif()
 endif()
 set(CUDA_NVCC_FLAGS_DEBUG "-g")
 set(CUDA_NVCC_FLAGS_RELEASE "-DNDEBUG")
+unset(TEMP_CUDA_FLAGS)


Define most plugin tests with add_standard_plugin_tests

--- plugins/candela/plugin.cmake
+++ plugins/candela/plugin.cmake
@@ -1,9 +1 @@
-get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME)
-
-add_web_client_test(${PLUGIN}
-    "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests/candelaSpec.js"
-    PLUGIN ${PLUGIN})
-add_eslint_test(
-    ${PLUGIN} "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client")
-add_puglint_test(${PLUGIN}
-    "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client/templates")
+add_standard_plugin_tests()


Squashed 'CMakeModules/' changes from e83ac80..2979d55

2979d55 Fix install when version string is empty.

git-subtree-dir: CMakeModules
git-subtree-split: 2979d55e3ab903070e022c1154acd1a4cf4517e0

--- export_package.cmake
+++ export_package.cmake
@@ -1,16 +1,16 @@
- #######################################################################################
- # export_package.cmake - Functions for easy package exporting	     		       #
- # 								     		       #
- # export_package - Takes a package name and the following optional arguments: 	       #
- #   - TARGETS: A list of all the targets to export with this package 		       #
- #   - DEPENDS: A list of all the targets that this package depends                    #
- #              on from outside its directory 		                               #
- #   - VERSION: A version string for the package			     	       #
- #   - INCLUDE_DIRS: The include directories to export.		     		       #
- #   - LINK_DIRS: The link directories where libraries can be found   		       #
- #   - LIBRARIES: The libraries to export in ${package}_LIBRARIES		       #
- #   - LIBRARY: A library to export in ${package}_LIBRARY    		               #
- #######################################################################################
+#######################################################################################
+# export_package.cmake - Functions for easy package exporting	     		       #
+# 								     		       #
+# export_package - Takes a package name and the following optional arguments: 	       #
+#   - TARGETS: A list of all the targets to export with this package 		       #
+#   - DEPENDS: A list of all the targets that this package depends                    #
+#              on from outside its directory 		                               #
+#   - VERSION: A version string for the package			     	       #
+#   - INCLUDE_DIRS: The include directories to export.		     		       #
+#   - LINK_DIRS: The link directories where libraries can be found   		       #
+#   - LIBRARIES: The libraries to export in ${package}_LIBRARIES		       #
+#   - LIBRARY: A library to export in ${package}_LIBRARY    		               #
+#######################################################################################
 include(CMakeParseArguments)

 get_filename_component(modules_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
@@ -28,6 +28,7 @@
     "${ARGN}"
     )

+  set(CMAKECONFIG_INSTALL_DIR "lib/cmake/${package}")
   option(EXPORT_${package}
     "Should the ${package} package be exported for use by other software" ON)

@@ -35,6 +36,9 @@
   if(PACKAGE_VERSION)
     configure_file(${modules_dir}/PackageConfigVersion.cmake.in
       "${CMAKE_CURRENT_BINARY_DIR}/${package}ConfigVersion.cmake" @ONLY)
+    install(FILES
+      "${CMAKE_CURRENT_BINARY_DIR}/${package}ConfigVersion.cmake"
+      DESTINATION ${CMAKECONFIG_INSTALL_DIR} )
   endif()

   # Build tree config
@@ -52,7 +56,6 @@
     export(PACKAGE ${package})
   endif()

-  set(CMAKECONFIG_INSTALL_DIR "lib/cmake/${package}")
   file(RELATIVE_PATH REL_INCLUDE_DIR
     "${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR}"
     "${CMAKE_INSTALL_PREFIX}/include")
@@ -69,6 +72,5 @@

   install(FILES
     "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${package}Config.cmake"
-    "${CMAKE_CURRENT_BINARY_DIR}/${package}ConfigVersion.cmake"
     DESTINATION ${CMAKECONFIG_INSTALL_DIR} )
 endfunction()


feat(FindLua.cmake): search also for LuaJit

Signed-off-by: Leonardo de Moura <7610bae85f2b530654cc716772f1fe653373e892@microsoft.com>

--- src/cmake/Modules/FindLua.cmake
+++ src/cmake/Modules/FindLua.cmake
@@ -40,7 +40,7 @@
 IF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
   SET(_POSSIBLE_SUFFIXES "${Lua_FIND_VERSION_MAJOR}${Lua_FIND_VERSION_MINOR}" "${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}" "-${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}")
 ELSE(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
-  SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "51" "5.1" "-5.1")
+  SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "51" "5.1" "-5.1" "jit-2.0" "jit-5.1")
 ENDIF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)

 # Set up possible search names and locations


Remove old HunterGate

Remove old HunterGate


[added] new BOTG_AddTPL to make adding TPL dependencies to packages easier.

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -391,3 +391,12 @@
     TRIBITS_PACKAGE_POSTPROCESS()

 ENDMACRO()
+
+MACRO( BOTG_AddTPL type need name )
+    MESSAGE( STATUS "[BootsOnTheGround] adding TPL type=${type} need=${need} name=${name}...")
+    TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
+      ${type}_${need}_PACKAGES
+        BootsOnTheGround_${name}
+    )
+    INCLUDE( "${BOTG_SOURCE_DIR}/TPLs/${name}/cmake/Dependencies.cmake" )
+ENDMACRO()


set proper CMAKE_INSTALL_RPATH for _caffe.so and tools

--- cmake/Misc.cmake
+++ cmake/Misc.cmake
@@ -32,6 +32,11 @@
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOLEAN "Use link paths for shared library rpath")
 set(CMAKE_MACOSX_RPATH TRUE)

+list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES ${CMAKE_INSTALL_PREFIX}/lib __is_systtem_dir)
+if(${__is_systtem_dir} STREQUAL -1)
+  set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+endif()
+
 # ---[ Funny target
 if(UNIX OR APPLE)
   add_custom_target(symlink_to_build COMMAND "ln" "-sf" "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/build"


Tests require their programs

Tests require their programs

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


Remove obsolete OS X PPC support

Remove obsolete OS X PPC support

--- Common.cmake
+++ Common.cmake
@@ -102,13 +102,8 @@
     /opt/local/libexec/qt5-mac) # Macports
   set(ENV{PATH} "/opt/local/bin:$ENV{PATH}") # dito
   if(NOT CMAKE_OSX_ARCHITECTURES OR CMAKE_OSX_ARCHITECTURES STREQUAL "")
-    if(_CMAKE_OSX_MACHINE MATCHES "ppc")
-      set(CMAKE_OSX_ARCHITECTURES "ppc;ppc64" CACHE
-        STRING "Build architectures for OS X" FORCE)
-    else()
-      set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE
-        STRING "Build architectures for OS X" FORCE)
-    endif()
+    set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE
+      STRING "Build architectures for OS X" FORCE)
   endif()
   set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
   set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")


Default boost define for unit tests

Default boost define for unit tests

--- Common.cmake
+++ Common.cmake
@@ -70,6 +70,7 @@
 set(Boost_NO_BOOST_CMAKE ON CACHE BOOL "Enable fix for FindBoost.cmake" )
 add_definitions(-DBOOST_ALL_NO_LIB) # Don't use 'pragma lib' on Windows
 add_definitions(-DBoost_NO_BOOST_CMAKE) # Fix for CMake problem in FindBoost
+add_definitions(-DBOOST_TEST_DYN_LINK) # generates main() for unit tests

 include(TestBigEndian)
 test_big_endian(BIGENDIAN)


Update build_forge.cmake for glbinding

Update build_forge.cmake for glbinding

* Variables now match ForgeConfig.cmake
* Add glbinding as an external project passed from ArrayFire
* Fix the config thing

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -1,4 +1,10 @@
 INCLUDE(ExternalProject)
+
+IF(USE_SYSTEM_GLBINDING)
+    SET(GLBINDING_TARGET "")
+ELSE(USE_SYSTEM_GLBINDING)
+    SET(GLBINDING_TARGET glbinding)
+ENDIF(USE_SYSTEM_GLBINDING)

 SET(prefix ${PROJECT_BINARY_DIR}/third_party/forge)

@@ -14,18 +20,19 @@
 ELSE()
     SET(forge_lib_config Release)
 ENDIF()
-IF(CMAKE_GENERATOR MATCHES "Xcode") # TODO: Also for "Visual Studio"?
-    SET(forge_lib_infix "/${forge_lib_config}")
+
+IF(CMAKE_GENERATOR MATCHES "Xcode")
+    SET(forge_lib_infix "${forge_lib_config}/")
 ELSE()
-    SET(forge_lib_infix)
+    SET(forge_lib_infix "")
 ENDIF()
 IF(WIN32)
     SET(forge_lib_prefix "${prefix}/lib")
 ELSE(WIN32)
-    SET(forge_lib_prefix "${prefix}/src/forge-ext-build/src")
+    SET(forge_lib_prefix "${prefix}/src/forge-ext-build/src/backend/opengl")
 ENDIF(WIN32)

-SET(forge_location "${forge_lib_prefix}${forge_lib_infix}/${CMAKE_SHARED_LIBRARY_PREFIX}forge${CMAKE_SHARED_LIBRARY_SUFFIX}")
+SET(forge_location "${forge_lib_prefix}/${forge_lib_infix}${CMAKE_SHARED_LIBRARY_PREFIX}forge${CMAKE_SHARED_LIBRARY_SUFFIX}")
 IF(CMAKE_VERSION VERSION_LESS 3.2)
     IF(CMAKE_GENERATOR MATCHES "Ninja")
         MESSAGE(WARNING "Building forge with Ninja has known issues with CMake older than 3.2")
@@ -39,17 +46,18 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG master
+    GIT_TAG devel
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""
+    DEPENDS ${GLBINDING_TARGET}
     CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" <SOURCE_DIR>
     -DCMAKE_SOURCE_DIR:PATH=<SOURCE_DIR>
     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-    -DUSE_GLEWmx_STATIC:BOOL=${USE_GLEWmx_STATIC}
-    -DGLEW_ROOT_DIR:STRING=${GLEW_ROOT_DIR}
+    -DUSE_SYSTEM_GLBINDING:BOOL=TRUE
+    -Dglbinding_DIR:STRING=${glbinding_DIR}
     -DGLFW_ROOT_DIR:STRING=${GLFW_ROOT_DIR}
     -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
     -DBUILD_EXAMPLES:BOOL=OFF
@@ -59,17 +67,21 @@

 ExternalProject_Get_Property(forge-ext binary_dir)
 ExternalProject_Get_Property(forge-ext install_dir)
+
 ADD_LIBRARY(forge SHARED IMPORTED)
 SET_TARGET_PROPERTIES(forge PROPERTIES IMPORTED_LOCATION ${forge_location})
+
 IF(WIN32)
     SET_TARGET_PROPERTIES(forge PROPERTIES IMPORTED_IMPLIB ${forge_lib_prefix}/forge.lib)
 ELSE(WIN32)
-    SET(forge_bindir_location ${binary_dir}/src${forge_lib_infix}/${CMAKE_SHARED_LIBRARY_PREFIX}forge${CMAKE_SHARED_LIBRARY_SUFFIX})
+    SET(forge_bindir_location ${binary_dir}/src/backend/opengl/${forge_lib_infix}${CMAKE_SHARED_LIBRARY_PREFIX}forge${CMAKE_SHARED_LIBRARY_SUFFIX})
     IF(NOT (${forge_bindir_location} STREQUAL ${forge_location}))
         MESSAGE(WARNING "Did the forge binary location move? (Have ${forge_bindir_location} vs ${forge_location})")
     ENDIF()
 ENDIF(WIN32)
-ADD_DEPENDENCIES(forge forge-ext)
-SET(FORGE_INCLUDE_DIRECTORIES ${install_dir}/include)
+
+ADD_DEPENDENCIES(forge forge-ext ${GLBINDING_TARGET})
+
+SET(FORGE_INCLUDE_DIRS ${install_dir}/include)
 SET(FORGE_LIBRARIES forge)
 SET(FORGE_FOUND ON)


Use CTK debug output cleanup

Use CTK debug output cleanup

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag 70943814)
+    SET(revision_tag 25b5c22)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Adding Wavelet Module to ITK

Adding Wavelet Module to ITK

Summary: Adding a Wavelet Module to ITK, needed for example for Radiomics

Test Plan: Provide a Module and a GUI (different Task) enabling the use of the modules softwarex

Reviewers: O1 MITK Core, floca

Reviewed By: O1 MITK Core, floca

Maniphest Tasks: T25520

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

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -37,6 +37,8 @@
     -DModule_ITKReview:BOOL=ON
   # for 4.7, the OpenJPEG is needed by review but the variable must be set
     -DModule_ITKOpenJPEG:BOOL=ON
+  # Added Module for Wavelets
+    -DModule_IsotropicWavelets:BOOL=ON
   )

   if(CTEST_USE_LAUNCHERS)


BUG: Fix packaging error for Mac

BUG: Fix packaging error for Mac

--- CMake/VisomicsCPack.cmake
+++ CMake/VisomicsCPack.cmake
@@ -65,8 +65,14 @@

 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Visomics - Application allowing to import, analyze and visualize metabolomics and genomics data.")
 SET(CPACK_PACKAGE_VENDOR "Kitware, Inc.")
-SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/NOTICE")
-SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/NOTICE")
+
+CONFIGURE_FILE(
+  ${CMAKE_CURRENT_SOURCE_DIR}/NOTICE
+  ${CMAKE_CURRENT_BINARY_DIR}/NOTICE.txt
+  COPYONLY)
+SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/NOTICE.txt")
+SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/NOTICE.txt")
+
 SET(CPACK_PACKAGE_VERSION_MAJOR "${Visomics_MAJOR_VERSION}")
 SET(CPACK_PACKAGE_VERSION_MINOR "${Visomics_MINOR_VERSION}")
 SET(CPACK_PACKAGE_VERSION_PATCH "${Visomics_BUILD_VERSION}")
@@ -82,8 +88,8 @@

 CONFIGURE_FILE(
   ${PROJECT_SOURCE_DIR}/CMake/VisomicsCPackOptions.cmake.in
-  ${PROJECT_BINARY_DIR}/VisomicsCPackOptions.cmake @ONLY)
-
+  ${PROJECT_BINARY_DIR}/VisomicsCPackOptions.cmake
+  @ONLY)
 SET(CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/VisomicsCPackOptions.cmake")

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


Restore missing OUTPUT variable.

Restore missing OUTPUT variable.

--- CMake/vtkTestFFMPEG.cmake
+++ CMake/vtkTestFFMPEG.cmake
@@ -19,7 +19,7 @@
     ELSE(VTK_FFMPEG_HAS_OLD_HEADER)
       SET(VTK_FFMPEG_CDEFS "HAS_NEW_HEADER")
     ENDIF(VTK_FFMPEG_HAS_OLD_HEADER)
-
+
     IF(FFMPEG_avcodec_LIBRARY)
       TRY_COMPILE(VTK_FFMPEG_HAS_IMG_CONVERT
         ${VTK_BINARY_DIR}/CMakeTmp
@@ -32,12 +32,12 @@
         MESSAGE(STATUS "Checking if FFMPEG has img_convert - found")
         FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
                 "Checking if FFMPEG has img_convert (passed):\n"
-                "${OUTPUT}\n\n")
+                "${OUTPUT}\n\n")
       ELSE(VTK_FFMPEG_HAS_IMG_CONVERT)
         MESSAGE(STATUS "Checking if FFMPEG has img_convert - not found")
         FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
                 "Checking if FFMPEG has img_convert (failed):\n"
-                "${OUTPUT}\n\n")
+                "${OUTPUT}\n\n")
       ENDIF(VTK_FFMPEG_HAS_IMG_CONVERT)
     ENDIF(FFMPEG_avcodec_LIBRARY)
     SET(VTK_FFMPEG_CACHED_AVCODEC ${FFMPEG_avcodec_LIBRARY} CACHE INTERNAL "Previous value of FFMPEG_avcodec_LIBRARY" FORCE)
@@ -57,16 +57,18 @@
         CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${FFMPEG_INCLUDE_DIR}"
           -DCOMPILE_DEFINITIONS:STRING=-D${VTK_FFMPEG_CDEFS}
           "-DLINK_LIBRARIES:STRING=${FFMPEG_avformat_LIBRARY};${FFMPEG_avutil_LIBRARY};${FFMPEG_avcodec_LIBRARY}"
+        OUTPUT_VARIABLE OUTPUT)
+
         IF(VTK_FFMPEG_OLD_URL_FCLOSE)
           MESSAGE(STATUS "Checking if FFMPEG uses old API for url_fclose - found")
           FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
                   "Checking if FFMPEG uses old API for url_fclose (passed):\n"
-                  "${OUTPUT}\n\n")
+                  "${OUTPUT}\n\n")
         ELSE(VTK_FFMPEG_OLD_URL_FCLOSE)
           MESSAGE(STATUS "Checking if FFMPEG uses old API for url_fclose - not found")
           FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
                   "Checking if FFMPEG uses old API for url_fclose (failed):\n"
-                  "${OUTPUT}\n\n")
+                  "${OUTPUT}\n\n")
         ENDIF(VTK_FFMPEG_OLD_URL_FCLOSE)
     ENDIF(FFMPEG_avformat_LIBRARY)
   ENDIF("VTK_FFMPEG_OLD_URL_FCLOSE" MATCHES "^VTK_FFMPEG_OLD_URL_FCLOSE$" OR NOT "VTK_FFMPEG_CACHED_AVFORMAT" MATCHES "^${FFMPEG_avformat_LIBRARY}$")
@@ -86,16 +88,17 @@
           -DCOMPILE_DEFINITIONS:STRING=-D${VTK_FFMPEG_CDEFS}
           "-DLINK_LIBRARIES:STRING=${FFMPEG_avformat_LIBRARY}"
         OUTPUT_VARIABLE OUTPUT)
+
         IF(VTK_FFMPEG_NEW_ALLOC)
           MESSAGE(STATUS "Checking if FFMPEG has avformat_alloc_context - found")
           FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
                   "Checking if FFMPEG has avformat_alloc_context (passed):\n"
-                  "${OUTPUT}\n\n")
+                  "${OUTPUT}\n\n")
         ELSE(VTK_FFMPEG_NEW_ALLOC)
           MESSAGE(STATUS "Checking if FFMPEG has avformat_alloc_context - not found")
           FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
                   "Checking if FFMPEG has avformat_alloc_context (failed):\n"
-                  "${OUTPUT}\n\n")
+                  "${OUTPUT}\n\n")
         ENDIF(VTK_FFMPEG_NEW_ALLOC)
     ENDIF(FFMPEG_avformat_LIBRARY)
     SET(VTK_FFMPEG_CACHED_AVFORMAT ${FFMPEG_avformat_LIBRARY} CACHE INTERNAL "Previous value of FFMPEG_avformat_LIBRARY" FORCE)


Squashed 'cmake/yacma/' changes from ba6dd38..14b830d

14b830d Tentative yacma fix.
ee88350 Include Python dirs as SYSTEM.
eac192c Merge pull request #1 from bluescarni/pr/py_fixes
d841133 Another simplification.
ba89892 Tentative Python libs linking fix.

git-subtree-dir: cmake/yacma
git-subtree-split: 14b830d9bbfe07aeba31edbada75ebb1e4fd18be

--- YACMAPythonSetup.cmake
+++ YACMAPythonSetup.cmake
@@ -3,11 +3,7 @@
 endif()

 # NOTE: this is a heuristic to determine whether we need to link to the Python library.
-# In theory, Python extensions don't need to, as they are dlopened() by the Python process
-# and thus they don't need to be linked to the Python library at compile time. However,
-# the dependency on Boost.Python muddies the waters, as BP itself does link to the Python
-# library, at least on some platforms. The following configuration seems to be working fine
-# on various CI setups.
+# The linking seems to be necessary only on Windows.
 if(WIN32)
   message(STATUS "Python modules require linking to the Python library.")
   set(_YACMA_PYTHON_MODULE_NEED_LINK TRUE)
@@ -40,22 +36,17 @@
 endif()
 mark_as_advanced(YACMA_PYTHON_INCLUDE_DIR)

+# Add an interface imported target for the
+# Python include dir.
+add_library(YACMA::PythonIncludeDir INTERFACE IMPORTED)
+set_target_properties(YACMA::PythonIncludeDir PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${YACMA_PYTHON_INCLUDE_DIR})
+
 message(STATUS "Python interpreter: ${PYTHON_EXECUTABLE}")
 message(STATUS "Python interpreter version: ${PYTHON_VERSION_STRING}")
 if(_YACMA_PYTHON_MODULE_NEED_LINK)
   message(STATUS "Python libraries: ${PYTHON_LIBRARIES}")
 endif()
 message(STATUS "Python include dir: ${YACMA_PYTHON_INCLUDE_DIR}")
-
-# An imported target to be used when building extension modules.
-if(_YACMA_PYTHON_MODULE_NEED_LINK)
-  add_library(YACMA::PythonModule UNKNOWN IMPORTED)
-  set_target_properties(YACMA::PythonModule PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${YACMA_PYTHON_INCLUDE_DIR}"
-    IMPORTED_LOCATION "${PYTHON_LIBRARIES}" IMPORTED_LINK_INTERFACE_LANGUAGES "C")
-else()
-  add_library(YACMA::PythonModule INTERFACE IMPORTED)
-  set_target_properties(YACMA::PythonModule PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${YACMA_PYTHON_INCLUDE_DIR}")
-endif()

 # This flag is used to signal the need to override the default extension of the Python modules
 # depending on the architecture. Under Windows, for instance, CMake produces shared objects as
@@ -141,7 +132,14 @@
       # https://cmake.org/pipermail/cmake/2017-March/065115.html
       set_target_properties(${name} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
     endif()
-    target_link_libraries("${name}" PRIVATE YACMA::PythonModule)
+
+    # Add the Python include dirs.
+    target_include_directories("${name}" SYSTEM PRIVATE ${YACMA_PYTHON_INCLUDE_DIR})
+
+    # Link to the Python libs, if necessary.
+    if(_YACMA_PYTHON_MODULE_NEED_LINK)
+      target_link_libraries("${name}" PRIVATE ${PYTHON_LIBRARIES})
+    endif()
 endfunction()

 # Mark as included.


Finding the proper youbot_driver config dir.

--- YouBot_OODL/external/cmake_modules/FindOODL_YouBot.cmake
+++ YouBot_OODL/external/cmake_modules/FindOODL_YouBot.cmake
@@ -40,6 +40,7 @@

 FIND_PATH(OODL_YOUBOT_CONFIG_DIR NAMES youbot-ethercat.cfg
   PATHS
+  ${youbot_driver_PACKAGE_PATH}/config
   $ENV{YOUBOTDIR}/config
   $ENV{ROBOTPKG_BASE}/config
   /etc/youbot


ENH: Update elastix

ENH: Update elastix

This version of elastix includes a fix for transformix which did not
propagate direction to result image.

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -20,7 +20,7 @@
 set( proj Elastix )

 set( ELASTIX_GIT_REPOSITORY https://github.com/SuperElastix/elastix )
-set( ELASTIX_GIT_TAG 81b498e32688e2dac34ed1fbd84d576ceac1cfb3 )
+set( ELASTIX_GIT_TAG 3809d045d2e0a28d1b57b1e1b59a5f3f6ae3d0da )

 UPDATE_SELX_SUPERBUILD_COMMAND(${proj})


cmake: Rebuild when DTS sources are modified

Ensure that changes to DeviceTree sources cause CMake to be re-run
when make/ninja is invoked.

Note that this is not perfect, as it does not cover files that are
\#included, but it will cover most DT changes.

This fixes #12692

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -43,6 +43,12 @@
     else()
       message(STATUS "Overlaying ${dts_file}")
     endif()
+
+    # Ensure that changes to 'dts_file's cause CMake to be re-run
+    set_property(DIRECTORY APPEND PROPERTY
+      CMAKE_CONFIGURE_DEPENDS
+      ${dts_file}
+      )

     math(EXPR i "${i}+1")
   endforeach()


tweaking mex compiler interaction (in response to bug 1648).   but it's not resolved yet.

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@6921 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -54,6 +54,7 @@
   set(MEX_EXT ${MEX_EXT} PARENT_SCOPE)

   get_mex_option(CC)
+
   get_mex_option(CFLAGS)
   get_mex_option(CDEBUGFLAGS)
   get_mex_option(COPTIMFLAGS)
@@ -114,21 +115,17 @@
   set (CMAKE_C_COMPILER_BK ${CMAKE_C_COMPILER})
   set (CMAKE_C_FLAGS_DEBUG_BK ${CMAKE_C_FLAGS_DEBUG})
   set (CMAKE_C_FLAGS_RELEASE_BK ${CMAKE_C_FLAGS_RELEASE})
-  set (CMAKE_C_LINK_EXECUTABLE_BK ${CMAKE_C_LINK_EXECUTABLE})
   set (CMAKE_CXX_COMPILER_BK ${CMAKE_CXX_COMPILER})
   set (CMAKE_CXX_FLAGS_DEBUG_BK ${CMAKE_CXX_FLAGS_DEBUG})
   set (CMAKE_CXX_FLAGS_RELEASE_BK ${CMAKE_CXX_FLAGS_RELEASE})
-  set (CMAKE_CXX_LINK_EXECUTABLE_BK ${CMAKE_C_LINK_EXECUTABLE})

   # set global props
-  set (CMAKE_C_COMPILER ${MEX_CC})
+  find_program (CMAKE_C_COMPILER ${MEX_CC})
   set (CMAKE_C_FLAGS_DEBUG ${MEX_CFLAGS} ${MEX_CDEBUGFLAGS} ${MEX_CC_ARGUMENTS})
   set (CMAKE_C_FLAGS_RELEASE ${MEX_CFLAGS} ${MEX_COPTIMFLAGS} ${MEX_CC_ARGUMENTS})
-#  set (CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} ${MEX_CLIBS}")
-  set (CMAKE_CXX_COMPILER ${MEX_CXX})
+  find_program (CMAKE_CXX_COMPILER ${MEX_CXX})
   set (CMAKE_CXX_FLAGS_DEBUG ${MEX_CXXFLAGS} ${MEX_CXXDEBUGFLAGS} ${MEX_CXX_ARGUMENTS})
   set (CMAKE_CXX_FLAGS_RELEASE ${MEX_CXXFLAGS} ${MEX_CXXOPTIMFLAGS} ${MEX_CXX_ARGUMENTS})
-#  set (CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${MEX_CXXLIBS}")

   list(FIND ARGV SHARED isshared)
   if (isshared EQUAL -1)
@@ -141,11 +138,9 @@
   set (CMAKE_C_COMPILER ${CMAKE_C_COMPILER_BK})
   set (CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG_BK})
   set (CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE_BK})
-  set (CMAKE_C_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE_BK})
   set (CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_BK})
   set (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_BK})
   set (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE_BK})
-  set (CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_CXX_LINK_EXECUTABLE_BK})

   set_target_properties(${target} PROPERTIES
     COMPILE_FLAGS "-DMATLAB_MEX_FILE"
@@ -180,3 +175,5 @@

 mex_setup()
+
+


Attempt a fix at the OS X matviz bundle

Attempt a fix at the OS X matviz bundle

--- projects/apple/matviz.bundle.cmake
+++ projects/apple/matviz.bundle.cmake
@@ -1,12 +1,13 @@
 include(matviz.bundle.common)
+
+include(paraview.bundle)

 set (CPACK_GENERATOR DragNDrop)
 include(CPack)

-# we only to paraview explicitly.
 install(CODE "
      file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
-          \"${install_location}/bin/matviz.app\")
+          \"${install_location}/Applications/matviz.app\")

      file(WRITE \"\${CMAKE_INSTALL_PREFIX}/matviz.app/Contents/Resources/qt.conf\"
                 \"\")
@@ -14,7 +15,20 @@
        COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
                \"\${CMAKE_INSTALL_PREFIX}/matviz.app\"
                \"${install_location}/lib\"
-               \"${SuperBuild_BINARY_DIR}/paraview/src/paraview-build/lib\"
                \"${install_location}/plugins\")
    "
    COMPONENT superbuild)
+
+install(CODE "
+     file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
+          \"${install_location}/Applications/paraview.app\")
+
+     file(WRITE \"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/Resources/qt.conf\"
+                \"\")
+     execute_process(
+       COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
+               \"\${CMAKE_INSTALL_PREFIX}/paraview.app\"
+               \"${install_location}/lib\"
+               \"${install_location}/plugins\")
+   "
+   COMPONENT superbuild)


Bump to the 5.4.0 tag

Bump to the 5.4.0 tag

--- versions.cmake
+++ versions.cmake
@@ -80,7 +80,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "646556962cbe8f2c4a6b11bf45813db2d0e27832")
+  set(_paraview_revision "95fe92d907a8702b1669b68d5aecf777ae72bcda")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


Push forward ParaView version to tomviz/release

The tomviz/release branch was updated recently to be almost the latest
master branch of ParaView. Update the tag sha to reflect the new
tomviz/release branch.

Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>

--- versions.cmake
+++ versions.cmake
@@ -89,7 +89,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision locally before proposing a move
-  set(_paraview_revision "74338e7d6058d0d1cf89405b3c8e932f9d4ea921")
+  set(_paraview_revision "6d9192059fe998cf7004dd85638ccf33f89e6976")
 endif()
 # Locally patched ParaView repo, or main repo
 #set(_paraview_repo "https://gitlab.kitware.com/paraview/paraview.git")


Bump the ParaView SHA (RC4) for bug fixes

--- versions.cmake
+++ versions.cmake
@@ -92,7 +92,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "becc40522ca4cdb2e9d4352e62889b4dc8d7ded0")
+  set(_paraview_revision "1f133bbdde4a05cbfe72b25c3b09fb564452d3b0")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


Updated the boost version

Updated the boost version

--- cmake/BuildExternalBoost.cmake
+++ cmake/BuildExternalBoost.cmake
@@ -15,7 +15,7 @@
 ExternalProject_Add(Boost
 	PREFIX ${VENDOR_PREFIX}
 	GIT_REPOSITORY https://github.com/anhstudios/boost.git
-	GIT_TAG 3960f21
+	GIT_TAG 11ad4dc
 	UPDATE_COMMAND ""
 	CMAKE_ARGS
 		${boost_lib_args}


adding hints for OpenNI

adding hints for OpenNI

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@843 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -16,24 +16,16 @@

 set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})

-#using the 64bit version of OpenNi if generating for 64bit
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-    set(PROGRAMFILES_ "$ENV{PROGRAMW6432}")
-    set(OPENNI_SUFFIX "64")
-else(CMAKE_SIZEOF_VOID_P EQUAL 8)
-    set(PROGRAMFILES_ "$ENV{PROGRAMFILES}")
-    set(OPENNI_SUFFIX "")
-endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
-
 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
-    HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni
-    "${PROGRAMFILES_}/OpenNI/Include"
-    PATH_SUFFIXES openni)
+          HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni
+          PATHS "$ENV{PROGRAMFILES}/OpenNI/Include" "$ENV{PROGRAMW6432}/OpenNI/Include"
+          PATH_SUFFIXES openni)
 #add a hint so that it can find it without the pkg-config
 find_library(OPENNI_LIBRARY
-    NAMES OpenNI64 OpenNI
-    HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${PROGRAMFILES_}/OpenNI/Lib${OPENNI_SUFFIX}")
+             NAMES OpenNI64 OpenNI
+             HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib
+             PATHS "$ENV{PROGRAMFILES}/OpenNI/Lib${OPENNI_SUFFIX}" "$ENV{PROGRAMW6432}/OpenNI/Lib${OPENNI_SUFFIX}")

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
 set(OPENNI_LIBRARIES ${OPENNI_LIBRARY})


fix for bug #2985:

fix for bug #2985:

OPENCLAMDBLAS and OPENCLAMDFFT never detected under linux.
lib64/import and lib32/import is the path on Windows but not Linux.
for CLAMDBLAS library we should use CLAMDBLAS_PATH (not CLAMDFFT_PATH)

--- cmake/OpenCVDetectOpenCL.cmake
+++ cmake/OpenCVDetectOpenCL.cmake
@@ -44,10 +44,16 @@
   set(OPENCL_INCLUDE_DIRS ${OPENCL_INCLUDE_DIR})
   set(OPENCL_LIBRARIES    ${OPENCL_LIBRARY})

-  if (X86_64)
+  if(WIN64)
     set(CLAMD_POSSIBLE_LIB_SUFFIXES lib64/import)
-  elseif (X86)
+  elseif(WIN32)
     set(CLAMD_POSSIBLE_LIB_SUFFIXES lib32/import)
+  endif()
+
+  if(X86_64 AND UNIX)
+    set(CLAMD_POSSIBLE_LIB_SUFFIXES lib64)
+  elseif(X86 AND UNIX)
+    set(CLAMD_POSSIBLE_LIB_SUFFIXES lib32)
   endif()

   if(WITH_OPENCLAMDFFT)
@@ -80,7 +86,7 @@
   if(WITH_OPENCLAMDBLAS)
     find_path(CLAMDBLAS_ROOT_DIR
               NAMES include/clAmdBlas.h
-              PATHS ENV CLAMDFFT_PATH ENV ProgramFiles
+              PATHS ENV CLAMDBLAS_PATH ENV ProgramFiles
               PATH_SUFFIXES clAmdBlas AMD/clAmdBlas
               DOC "AMD FFT root directory"
               NO_DEFAULT_PATH)


fixed a problem retrieving the svn revision from svn info

--- cmake/oskar_build_macros.cmake
+++ cmake/oskar_build_macros.cmake
@@ -185,7 +185,8 @@
 macro(get_svn_revision dir variable)
     find_program(SVN_EXECUTABLE svn DOC "subversion command line client")
     if (SVN_EXECUTABLE AND EXISTS ${OSKAR_SOURCE_DIR}/.svn)
-        execute_process(COMMAND ${SVN_EXECUTABLE} info ${dir}
+        execute_process(COMMAND
+            ${SVN_EXECUTABLE} info ${dir}/oskar_global.h
             OUTPUT_VARIABLE ${variable}
             OUTPUT_STRIP_TRAILING_WHITESPACE)
         string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"


enable readline support if header and lib found

--- cmake_admin/FindReadline.cmake
+++ cmake_admin/FindReadline.cmake
@@ -10,9 +10,9 @@
 find_path ( READLINE_INCLUDE_DIR NAMES history.h readline/history.h )
 find_library ( READLINE_LIBRARIES NAMES readline )

-if ( READLINE_INCLUDE_DIR )
-    set ( HAVE_READLINE TRUE CACHE TYPE BOOL )
-endif ( READLINE_INCLUDE_DIR )
+if ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
+    set ( HAVE_READLINE TRUE CACHE BOOL )
+endif ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )

 include ( FindPackageHandleStandardArgs )
 FIND_PACKAGE_HANDLE_STANDARD_ARGS( READLINE DEFAULT_MSG


Update Thrift

Update Thrift

--- cmake_modules/FindTHRIFT.cmake
+++ cmake_modules/FindTHRIFT.cmake
@@ -30,13 +30,21 @@
 		PATHS
 		${THRIFT_ROOT}/lib
 	)
+	find_library(THRIFTZ_LIBRARIES_RELEASE NAMES libthriftz thriftz
+		PATHS
+		${THRIFT_ROOT}/lib
+	)
 	find_library(THRIFT_LIBRARIES_DEBUG NAMES libthriftd thriftd libthrift thrift
 		PATHS
 		${THRIFT_ROOT}/lib
 	)
+	find_library(THRIFTZ_LIBRARIES_DEBUG NAMES libthriftzd libthriftz thriftzd thriftz
+		PATHS
+		${THRIFT_ROOT}/lib
+	)
 	set(THRIFT_LIBRARIES
-		debug ${THRIFT_LIBRARIES_DEBUG}
-		optimized ${THRIFT_LIBRARIES_RELEASE}
+		debug ${THRIFT_LIBRARIES_DEBUG} ${THRIFTZ_LIBRARIES_DEBUG}
+		optimized ${THRIFT_LIBRARIES_RELEASE} ${THRIFTZ_LIBRARIES_RELEASE}
 	)
 endif()

@@ -56,6 +64,12 @@
     	/usr/local/lib/
     	/opt/local/lib/
     )
+	find_library(THRIFTZ_LIBRARIES_RELEASE NAMES libthriftz thriftz
+    	PATHS
+    	/usr/lib/
+    	/usr/local/lib/
+    	/opt/local/lib/
+    )

 	find_library(THRIFT_LIBRARIES_DEBUG NAMES libthriftd thriftd libthrift thrift
     	PATHS
@@ -63,10 +77,16 @@
     	/usr/local/lib/
     	/opt/local/lib/
     )
+	find_library(THRIFTZ_LIBRARIES_DEBUG NAMES libthriftzd thriftzd libthriftz thriftz
+    	PATHS
+    	/usr/lib/
+    	/usr/local/lib/
+    	/opt/local/lib/
+    )

 	set(THRIFT_LIBRARIES
-		debug ${THRIFT_LIBRARIES_DEBUG}
-		optimized ${THRIFT_LIBRARIES_RELEASE}
+		debug ${THRIFT_LIBRARIES_DEBUG} ${THRIFTZ_LIBRARIES_DEBUG}
+		optimized ${THRIFT_LIBRARIES_RELEASE} ${THRIFTZ_LIBRARIES_RELEASE}
 		)
 endif(THRIFT_INCLUDE_DIR AND THRIFT_LIBRARIES)


Small changes to package into .tgz on Ubuntu (at least)

--- cmake/Modules/DefineCPackConfig.cmake
+++ cmake/Modules/DefineCPackConfig.cmake
@@ -31,24 +31,23 @@
   set(CPACK_NSIS_COMPRESSOR "/SOLID zlib")
   set(CPACK_NSIS_MENU_LINKS "http://www.lastcraft.com/cgreen.php" "cgreen homepage")
   set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
+else()
+  set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
+  set(CPACK_GENERATOR "TGZ")
 endif(WIN32)

-if(CYGWIN)
-  set(CPACK_GENERATOR "TGZ")
-  set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
-endif()
-
 set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
-set(CPACK_INSTALL_DIRECTORY "")
 set(CPACK_PACKAGE_FILE_NAME ${APPLICATION_NAME}-${CPACK_PACKAGE_VERSION})

 set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
-set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
 set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
   "Libraries used to build programs which use cgreen")
+
+set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
 set(CPACK_COMPONENT_HEADERS_DESCRIPTION
   "C/C++ header files for use with cgreen")
 set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
+
 set(CPACK_COMPONENT_APPLICATIONS_GROUP "Runtime")
 set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
 set(CPACK_COMPONENT_HEADERS_GROUP "Development")


Added tree copying

Added tree copying

--- cmake/ReplicatePythonSourceTree.cmake
+++ cmake/ReplicatePythonSourceTree.cmake
@@ -1,4 +1,4 @@
 # Note: when executed in the build dir, then CMAKE_CURRENT_SOURCE_DIR is the
 # build dir.
-file( COPY setup.py src test bin DESTINATION "${CMAKE_ARGV3}"
+file( COPY setup.py configure.py pyne DESTINATION "${CMAKE_ARGV3}"
   FILES_MATCHING PATTERN "*.py" )


Do not use system PATH in find_package (#104)

--- cmake/bde_external_dependencies.cmake
+++ cmake/bde_external_dependencies.cmake
@@ -222,8 +222,11 @@

             # Looking up CMake export for the external dependency.
             find_package(
-                ${depName} QUIET
-                PATH_SUFFIXES "${CMAKE_INSTALL_LIBDIR}/${bde_install_ufid}/cmake"
+                ${depName}
+                    NO_SYSTEM_ENVIRONMENT_PATH
+                    NO_CMAKE_PACKAGE_REGISTRY
+                    QUIET
+                    PATH_SUFFIXES "${CMAKE_INSTALL_LIBDIR}/${bde_install_ufid}/cmake"
             )

             if(TARGET ${depName})


Added custom .pc templates to support wierd packages/groups. (#69)

--- cmake/layers/install_pkg_config.cmake
+++ cmake/layers/install_pkg_config.cmake
@@ -13,14 +13,20 @@
     find_file(bdePkgConfigFile "group.pc.in" PATHS ${CMAKE_MODULE_PATH})
     mark_as_advanced(bdePkgConfigFile)

-    set(pkgConfigFile ${bdePkgConfigFile})
+    bde_expand_list_file(${listFile} LISTDIR listDir FILENAME name)

-    bde_expand_list_file(${listFile} LISTDIR listDir FILENAME name)
+    set(customPkgConfigIn ${listDir}/${name}.pc.in)
+    if(EXISTS ${customPkgConfigIn})
+        set(pkgConfigFile ${customPkgConfigIn})
+        bde_log(VERBOSE "    CUSTOM pkgconfig input template from ${customPkgConfigIn}")
+    else()
+        set(pkgConfigFile ${bdePkgConfigFile})
+    endif()
+
     set(customPkgConfigDesc ${listDir}/${name}.pc.desc)
     if(EXISTS ${customPkgConfigDesc})
-        #set(pkgConfigFile ${customPkgConfigFile})
         include(${customPkgConfigDesc})
-        bde_log(VERBOSE "CUSTOM pkgconfig description from ${customPkgConfigDesc}")
+        bde_log(VERBOSE "    CUSTOM pkgconfig description from ${customPkgConfigDesc}")
     endif()

     if(NOT uor_name)


Build LLVM with -Wstrict-prototypes enabled

Clang 5 supports -Wstrict-prototypes. We should use it to catch any C
declarations that declare a non-prototype function.

rdar://33705313

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -581,6 +581,8 @@

   # Enable -Wstring-conversion to catch misuse of string literals.
   add_flag_if_supported("-Wstring-conversion" STRING_CONVERSION_FLAG)
+  # Enable -Wstrict-prototypes to catch incorrectly declared functions in C.
+  add_flag_if_supported("-Wstrict-prototypes" STRICT_PROTOTYPES_FLAG)
 endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))

 if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS)


closes #5379 add TOKU_PTHREAD_DEBUG for debug builds

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -18,6 +18,9 @@
   __STDC_FORMAT_MACROS
   __STDC_LIMIT_MACROS
   )
+
+## add TOKU_PTHREAD_DEBUG for debug builds
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG)

 if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
   message(WARNING "Setting TOKU_ALLOW_DEPRECATED on Darwin and with clang.  TODO: remove this.")


cmake: add windeployqt call after target build (#9)

--- config/cmake/WinDeployQt.cmake
+++ config/cmake/WinDeployQt.cmake
@@ -50,6 +50,11 @@
 		message(STATUS "not set, the VC++ redistributable installer will NOT be bundled")
 	endif()

+	add_custom_command(TARGET ${_deploy_TARGET}
+		POST_BUILD
+		COMMAND ${_deploy_PROGRAM} ${_ARGS}
+		$<TARGET_FILE:${_deploy_TARGET}>)
+
 	add_custom_target(windeployqt ${_deploy_PROGRAM} ${_ARGS}
 		$<TARGET_FILE:${_deploy_TARGET}>
 		DEPENDS ${_deploy_TARGET})


Fix InstallHeaders so it works properly with generated sources

--- standard/InstallHeaders.cmake
+++ standard/InstallHeaders.cmake
@@ -15,7 +15,7 @@
   set(multiValueArgs)

   cmake_parse_arguments(opt "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
+
   string(TOLOWER LOWERNAME CMAKE_PROJECT_NAME)
   default_value(opt_DESTINATION include/${LOWERNAME})

@@ -28,15 +28,47 @@
     if(NOT ${opt_NOEXCLUDE_STDAFX} AND ${src} STREQUAL "stdafx.h")
       continue()
     endif()
+    get_filename_component(src_ext ${src} EXT)
+    if(NOT src_ext STREQUAL ".h")
+      continue()
+    endif()
+
+    # Need to make the path absolute.  We first look in the source directory,
+    # then we look in the binary directory, but only if the path is relative.
+    if(NOT IS_ABSOLUTE ${src})
+      get_filename_component(src_src ${src} ABSOLUTE BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+      get_filename_component(src_bin ${src} ABSOLUTE BASE_DIR ${CMAKE_CURRENT_BINARY_DIR})
+      if(EXISTS ${src_src})
+        set(src ${src_src})
+      elseif(EXISTS ${src_bin})
+        set(src ${src_bin})
+      else()
+        message(FATAL_ERROR "Could not find input header file ${src}")
+      endif()
+    endif()
+
+    # We find out what directory part the file is in, we want the shortest
+    # relative path on the assumption that the file will be most properly
+    # located in the directory whose relative address is the shortest.
+    file(RELATIVE_PATH src_rel ${CMAKE_SOURCE_DIR} ${src})
+    get_filename_component(src_rel ${src_rel} DIRECTORY)
+    string(LENGTH ${src_rel} src_rel_len)
+
+    file(RELATIVE_PATH bin_rel ${CMAKE_BINARY_DIR} ${src})
+    get_filename_component(bin_rel ${bin_rel} DIRECTORY)
+    string(LENGTH ${bin_rel} bin_rel_len)
+
+    if(src_rel_len LESS bin_rel_len)
+      set(actual_rel ${src_rel})
+    else()
+      set(actual_rel ${bin_rel})
+    endif()

     get_filename_component(src_ext ${src} EXT)
-    if(src_ext STREQUAL ".h")
-      get_filename_component(src_rel ${src} DIRECTORY)
-      install(
-        FILES ${src}
-        DESTINATION ${opt_DESTINATION}/${src_rel}
-        ${opt_UNPARSED_ARGUMENTS}
-      )
-    endif()
+    install(
+      FILES ${src}
+      DESTINATION ${opt_DESTINATION}/${actual_rel}
+      ${opt_UNPARSED_ARGUMENTS}
+    )
   endforeach()
 endfunction()


ARROW-7597: [C++] More compact CMake configuration summary

This moves the option values right next to the option name and makes it so they can be easily copy-and-pasted for use with `-D` in build scripts. Blank lines between options are also removed

Closes #6193 from wesm/cpp-compact-build-summary and squashes the following commits:

ffd2c1895 <Wes McKinney> Incorporate feedback
3131d2185 <Wes McKinney> More compact build summary

Authored-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>
Signed-off-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>

--- cpp/cmake_modules/DefineOptions.cmake
+++ cpp/cmake_modules/DefineOptions.cmake
@@ -385,22 +385,15 @@
       set(description ${${name}_OPTION_DESCRIPTION})

       if(NOT ("${${name}_OPTION_ENUM}" STREQUAL ""))
-        set(summary "[default=${${name}_OPTION_ENUM}] ${value}")
+        set(summary "=${value} [default=${${name}_OPTION_ENUM}]")
       else()
-        set(summary "[default=${${name}_OPTION_DEFAULT}] ${value}")
+        set(summary "=${value} [default=${${name}_OPTION_DEFAULT}]")
       endif()

-      string(LENGTH "${summary}" summary_length)
-      string(LENGTH "${name}" name_length)
-      math(EXPR padding_length "${summary_length} + ${name_length}")
-      string(SUBSTRING "                                                \
-                                    ${summary}" ${padding_length} -1 right_padded_summary)
-
-      message(STATUS "  ${name} ${right_padded_summary}")
+      message(STATUS "  ${name}${summary}")
       foreach(description_line ${description})
         message(STATUS "      ${description_line}")
       endforeach()
-      message(STATUS)
     endforeach()

   endforeach()


Removed the vtkFiltersCore dep

Removed the vtkFiltersCore dep

No longer needed, we stopped using the filter a while back.

Change-Id: I8fca799d8e2b5b31c9122b6a167e4ba9ad7746d1

--- Rendering/OpenGL2/module.cmake
+++ Rendering/OpenGL2/module.cmake
@@ -7,7 +7,6 @@
   PRIVATE_DEPENDS
     vtksys
     vtkRenderingOpenGL
-    vtkFiltersCore # Do we want this just for vtkPolyDataNormals?
   COMPILE_DEPENDS
     vtkUtilitiesEncodeString
   TEST_DEPENDS


CMake: unix_config, set CMAKE_POSITION_INDEPENDENT_CODE

And remove manually set fPIC. CMAKE_POSITION_INDEPENDENT_CODE properly
sets fPIC for libraries and fPIE for executables.

--- CMake/unix_config.cmake
+++ CMake/unix_config.cmake
@@ -1,8 +1,9 @@
 message(STATUS "Setting Unix configurations")

 macro(os_set_flags)
-    set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -fPIC -pedantic -g -D_DEFAULT_SOURCE")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pedantic -g -Wno-missing-field-initializers")
+    set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+    set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -pedantic -g -D_DEFAULT_SOURCE")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -g -Wno-missing-field-initializers")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-multichar -Wsequence-point -Wformat -Wformat-security")

     execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE MACHINE)


CMake: Bugfix: Rename "POINT" by "PATCH"

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

--- deal.II/cmake/modules/FindP4EST.cmake
+++ deal.II/cmake/modules/FindP4EST.cmake
@@ -25,7 +25,7 @@
 #   P4EST_VERSION_MAJOR
 #   P4EST_VERSION_MINOR
 #   P4EST_VERSION_SUBMINOR
-#   P4EST_VERSION_POINT
+#   P4EST_VERSION_PATCH
 #

 INCLUDE(FindPackageHandleStandardArgs)
@@ -145,7 +145,7 @@
     P4EST_VERSION_SUBMINOR "${P4EST_VERSION}")
   STRING(REGEX REPLACE
     "^[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
-    P4EST_VERSION_POINT "${P4EST_VERSION}")
+    P4EST_VERSION_PATCH "${P4EST_VERSION}")

   MARK_AS_ADVANCED(P4EST_DIR)
 ELSE()


Trivial commnet.

Trivial commnet.

--- dep/icu.cmake
+++ dep/icu.cmake
@@ -40,7 +40,7 @@

 add_custom_command (
         OUTPUT ${TBAG_DEP_ICU_ARCHIVES}
-        COMMAND make V=1 > "${TBAG_DEP_ICU_LOG_PREFIX}.2" 2>&1
+        COMMAND make VERBOSE=1 > "${TBAG_DEP_ICU_LOG_PREFIX}.2" 2>&1
         DEPENDS "${PROJECT_SOURCE_DIR}/dep/icu/Makefile"
         WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/dep/icu/")


Upgrade GMP version (link errors similar to RPI)

--- deps/GMP/GMP.cmake
+++ deps/GMP/GMP.cmake
@@ -18,7 +18,8 @@

 else ()
     ExternalProject_Add(dep_GMP
-        URL  https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
+        # URL  https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
+        URL https://gmplib.org/download/gmp/gmp-6.2.0.tar.lz
         BUILD_IN_SOURCE ON
         CONFIGURE_COMMAND ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" --with-pic
         BUILD_COMMAND     make -j


35 -> 5

35 -> 5

--- cmake/ModuleHeaderTest.cmake
+++ cmake/ModuleHeaderTest.cmake
@@ -11,7 +11,7 @@
 # The maximum number of headers in a test.  This helps limit memory issues,
 # and the cppcheck tests.  However, if this is not unity, there is a slight
 # chance that problems may be hidden.  For a complete header check, set to "1".
-set( MAXIMUM_NUMBER_OF_HEADERS 35
+set( MAXIMUM_NUMBER_OF_HEADERS 5
   CACHE STRING "The number of headers in a HeaderTest code." )
 mark_as_advanced( MAXIMUM_NUMBER_OF_HEADERS )


Add QVTK hint for Apple to FindQVTK.cmake (thanks Bill Lorensen)

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

--- cmake/Modules/FindQVTK.cmake
+++ cmake/Modules/FindQVTK.cmake
@@ -8,7 +8,7 @@
 # if QVTK_FOUND then QVTK_INCLUDE_DIR is appended to VTK_INCLUDE_DIRS and
 # QVTK_LIBRARY is appended to QVTK_LIBRARY_DIR

-find_library (QVTK_LIBRARY QVTK HINT ${VTK_DIR})
+find_library (QVTK_LIBRARY QVTK HINTS ${VTK_DIR} ${VTK_DIR}/bin)
 find_path (QVTK_INCLUDE_DIR QVTKWidget.h HINT ${VTK_INCLUDE_DIRS})
 find_package_handle_standard_args(QVTK DEFAULT_MSG
   QVTK_LIBRARY QVTK_INCLUDE_DIR)


cmake: avoid some duplications by using a helper

Create a helper function to determine if we are targeting a Darwin SDK or not.
The repetition is error-prone and verbose.  Simplify by adding a checking
function.  NFC.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -59,6 +59,20 @@
     set(${out_var} "-flto=full" PARENT_SCOPE)
   elseif (lowercase_option STREQUAL "thin")
     set(${out_var} "-flto=thin" PARENT_SCOPE)
+  endif()
+endfunction()
+
+function(is_darwin_based_sdk sdk_name out_var)
+  if ("${sdk_name}" STREQUAL "OSX" OR
+      "${sdk_name}" STREQUAL "IOS" OR
+      "${sdk_name}" STREQUAL "IOS_SIMULATOR" OR
+      "${sdk_name}" STREQUAL "TVOS" OR
+      "${sdk_name}" STREQUAL "TVOS_SIMULATOR" OR
+      "${sdk_name}" STREQUAL "WATCHOS" OR
+      "${sdk_name}" STREQUAL "WATCHOS_SIMULATOR")
+    set(${out_var} TRUE PARENT_SCOPE)
+  else()
+    set(${out_var} FALSE PARENT_SCOPE)
   endif()
 endfunction()

@@ -85,13 +99,8 @@
     ${${CFLAGS_RESULT_VAR_NAME}}
     "-target" "${SWIFT_SDK_${CFLAGS_SDK}_ARCH_${CFLAGS_ARCH}_TRIPLE}")

-  if("${CFLAGS_SDK}" STREQUAL "OSX" OR
-     "${CFLAGS_SDK}" STREQUAL "TVOS" OR
-     "${CFLAGS_SDK}" STREQUAL "TVOS_SIMULATOR" OR
-     "${CFLAGS_SDK}" STREQUAL "IOS" OR
-     "${CFLAGS_SDK}" STREQUAL "IOS_SIMULATOR" OR
-     "${CFLAGS_SDK}" STREQUAL "WATCHOS" OR
-     "${CFLAGS_SDK}" STREQUAL "WATCHOS_SIMULATOR")
+  is_darwin_based_sdk("${CFLAGS_SDK}" IS_DARWIN)
+  if(IS_DARWIN)
     list(APPEND result "-isysroot" "${SWIFT_SDK_${CFLAGS_SDK}_PATH}")
   else()
     if(NOT "${SWIFT_SDK_${CFLAGS_SDK}_PATH}" STREQUAL "/")
@@ -510,13 +519,8 @@
   endif()

   if (SWIFT_COMPILER_VERSION)
-    if ("${SWIFTLIB_SINGLE_SDK}" STREQUAL "OSX" OR
-        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "IOS" OR
-        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "IOS_SIMULATOR" OR
-        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "TVOS" OR
-        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "TVOS_SIMULATOR" OR
-        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "WATCHOS" OR
-        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "WATCHOS_SIMULATOR")
+    is_darwin_based_sdk("${SWIFTLIB_SINGLE_SDK}" IS_DARWIN)
+    if(IS_DARWIN)
       list(APPEND SWIFTLIB_SINGLE_LINK_FLAGS "-Xlinker" "-current_version" "-Xlinker" "${SWIFT_COMPILER_VERSION}" "-Xlinker" "-compatibility_version" "-Xlinker" "1")
     endif()
   endif()
@@ -678,13 +682,8 @@
     endforeach()
   endif()

-  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "OSX" OR
-     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "IOS" OR
-     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "IOS_SIMULATOR" OR
-     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "TVOS" OR
-     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "TVOS_SIMULATOR" OR
-     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "WATCHOS" OR
-     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "WATCHOS_SIMULATOR")
+  is_darwin_based_sdk("${SWIFTLIB_SINGLE_SDK}" IS_DARWIN)
+  if(IS_DARWIN)
     set(install_name_dir "@rpath")

     if(SWIFTLIB_SINGLE_IS_STDLIB)


build: drop LINK_FLAGS from add_swift_host_library

This is not currently being used.  Unfortunately, setting linker options
is difficult until CMake 3.13 which introduced target_link_options.
Prior to that, you needed to do:

set_property(TARGET <TARGET> APPEND_STRING LINK_FLAGS <NEW FLAGS>)

If needed, we could write a helper to provide the target_link_options
interface on earlier CMake versions.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1357,7 +1357,6 @@
 #     [SWIFT_MODULE_DEPENDS dep1 ...]
 #     [LLVM_COMPONENT_DEPENDS comp1 ...]
 #     [FILE_DEPENDS target1 ...]
-#     [LINK_FLAGS flag1...]
 #     [INSTALL]
 #     INSTALL_IN_COMPONENT comp
 #     source1 [source2 source3 ...])
@@ -1379,9 +1378,6 @@
 #
 # FILE_DEPENDS
 #   Additional files this library depends on.
-#
-# LINK_FLAGS
-#   Extra linker flags.
 #
 # INSTALL_IN_COMPONENT comp
 #   The Swift installation component that this library belongs to.
@@ -1399,7 +1395,6 @@
         DEPENDS
         FILE_DEPENDS
         INTERFACE_LINK_LIBRARIES
-        LINK_FLAGS
         LINK_LIBRARIES
         LLVM_COMPONENT_DEPENDS)

@@ -1438,7 +1433,6 @@
     DEPENDS ${ASHL_DEPENDS}
     LLVM_COMPONENT_DEPENDS ${ASHL_LLVM_COMPONENT_DEPENDS}
     FILE_DEPENDS ${ASHL_FILE_DEPENDS}
-    LINK_FLAGS ${ASHL_LINK_FLAGS}
     INSTALL_IN_COMPONENT "dev"
     )


build: remove reference to `handle_swift_sources` in C++ path

The toolchain binaries are all C++ code.  This removes the last tie to
the custom Swift handling in CMake for the host functions.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -895,22 +895,6 @@
     LINK_LIBRARIES_VAR_NAME link_libraries
     LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories)

-  handle_swift_sources(
-      dependency_target
-      unused_module_dependency_target
-      unused_sib_dependency_target
-      unused_sibopt_dependency_target
-      unused_sibgen_dependency_target
-      SWIFTEXE_SINGLE_SOURCES SWIFTEXE_SINGLE_EXTERNAL_SOURCES ${name}
-      DEPENDS
-        ${SWIFTEXE_SINGLE_DEPENDS}
-      MODULE_NAME ${name}
-      SDK ${SWIFTEXE_SINGLE_SDK}
-      ARCHITECTURE ${SWIFTEXE_SINGLE_ARCHITECTURE}
-      COMPILE_FLAGS ${SWIFTEXE_SINGLE_COMPILE_FLAGS}
-      IS_MAIN)
-  add_swift_source_group("${SWIFTEXE_SINGLE_EXTERNAL_SOURCES}")
-
   add_executable(${name}
       ${SWIFTEXE_SINGLE_SOURCES}
       ${SWIFTEXE_SINGLE_EXTERNAL_SOURCES})
@@ -918,7 +902,6 @@
   add_dependencies_multiple_targets(
       TARGETS "${name}"
       DEPENDS
-        ${dependency_target}
         ${LLVM_COMMON_DEPENDS}
         ${SWIFTEXE_SINGLE_DEPENDS})
   llvm_update_compile_flags("${name}")
@@ -960,17 +943,6 @@

   swift_common_llvm_config("${name}" ${SWIFTEXE_SINGLE_LLVM_LINK_COMPONENTS})

-  # NOTE(compnerd) use the C linker language to invoke `clang` rather than
-  # `clang++` as we explicitly link against the C++ runtime.  We were previously
-  # actually passing `-nostdlib++` to avoid the C++ runtime linkage.
-  if(${SWIFTEXE_SINGLE_SDK} STREQUAL ANDROID)
-    set_property(TARGET "${name}" PROPERTY
-      LINKER_LANGUAGE "C")
-  else()
-    set_property(TARGET "${name}" PROPERTY
-      LINKER_LANGUAGE "CXX")
-  endif()
-
   set_target_properties(${name} PROPERTIES FOLDER "Swift executables")
 endfunction()


FindSoci: Force use of suffix if declared suffix fails.

--- cmake/modules/FindSoci.cmake
+++ cmake/modules/FindSoci.cmake
@@ -35,7 +35,8 @@
 #
 FIND_PATH(
     SOCI_INCLUDE_DIR soci.h
-    PATHS "/usr/local" "${PROJECT_SOURCE_DIR}/dependencies/soci-3.2.2/core/"
+    PATHS "/usr/local"
+          "${PROJECT_SOURCE_DIR}/dependencies/soci-3.2.2/core/"
     PATH_SUFFIXES "" "soci"
     DOC "Soci (http://soci.sourceforge.net) include directory")
 MARK_AS_ADVANCED(SOCI_INCLUDE_DIR)
@@ -49,7 +50,7 @@
     SOCI_LIBRARY
     NAMES soci_core
     HINTS ${SOCI_INCLUDE_DIR}/..
-    PATH_SUFFIXES lib${LIB_SUFFIX})
+    PATH_SUFFIXES lib${LIB_SUFFIX}) lib lib32 lib64
 MARK_AS_ADVANCED(SOCI_LIBRARY)

 GET_FILENAME_COMPONENT(SOCI_LIBRARY_DIR ${SOCI_LIBRARY} PATH)


It is the user's (and ultimately the Linux vendor's) responsibility to have
a working libfreetype (without badly done security fixes) so enable freetype
by default.

svn path=/trunk/; revision=6893

--- cmake/modules/freetype.cmake
+++ cmake/modules/freetype.cmake
@@ -19,7 +19,11 @@
 #
 # Configuration for the freetype support in plplot.

-option(WITH_FREETYPE "Enable driver options for using freetype library for fonts" OFF)
+option(
+WITH_FREETYPE
+"Enable driver options for using freetype library for fonts"
+ON
+)

 # Look for freetype libraries
 if (WITH_FREETYPE)


add comment for last commit

add comment for last commit

--- CMakeModules/PythonBindingsUtils.cmake
+++ CMakeModules/PythonBindingsUtils.cmake
@@ -20,6 +20,8 @@
     set(PYOMPL_EXTRA_CFLAGS "-m64")
 endif(APPLE)

+# Trick gccxml to ignore some compiler intrinsics that are used in Boost.Atomic
+# in Boost 1.55.
 if(CMAKE_COMPILER_IS_GNUCXX AND BOOST_VERSION VERSION_GREATER "1.54.0")
     set(PYOMPL_EXTRA_CFLAGS "${PYOMPL_EXTRA_CFLAGS} -DBOOST_INTEL_CXX_VERSION")
 endif()


SWDEV-316665 - Use CMAKE_SIZEOF_VOID_P to detect 32bit build

Change-Id: If959b0d012caa55afbe54f0fe7da8ad3cca6d452

--- cmake/ROCclr.cmake
+++ cmake/ROCclr.cmake
@@ -95,7 +95,7 @@
   target_compile_definitions(rocclr PUBLIC ATI_OS_LINUX)
 endif()

-if(NOT CMAKE_CL_64)
+if(CMAKE_SIZEOF_VOID_P EQUAL 4)
   target_compile_definitions(rocclr PUBLIC ATI_BITS_32)
 endif()


Fixed an issue about none of the recent snapshots working properly on vanilla Linux (closes #519).

This basically reverts f543e70d4a0d378988ae44071d9cf30977bc3a2f. Why on
earth did I ever do that in the first place?!

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -290,7 +290,7 @@

         SET(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks;@executable_path/../PlugIns/${PROJECT_NAME}")
     ELSEIF(NOT WIN32)
-        SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
+        SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/../plugins/${PROJECT_NAME}")
     ENDIF()
 ENDMACRO()


Oops, forgot to update the name of a manually deployed library.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -381,7 +381,7 @@
     # Copy the Qt library itself

     IF("${TYPE}" STREQUAL "Library")
-        SET(QT_LIBRARY_LIB_FILEPATH ${QT_LIBRARY_LIB_DIR}/${QT_LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX})
+        SET(QT_LIBRARY_LIB_FILEPATH ${QT_LIBRARY_LIB_DIR}/${QT_LIBRARY}.${QT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX})

         ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
                            COMMAND ${CMAKE_COMMAND} -E copy ${QT_LIBRARY_DIR}/${QT_LIBRARY}.${QT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX} ${QT_LIBRARY_LIB_FILEPATH})


Trivial uTVM -> microTVM "spelling" fix to align with branding. (#8905)

* Embarrassingly trivial fix remove use of uTVM and replace with the proper microTVM naming convention.

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -108,7 +108,7 @@
 # Whether to enable the profiler for the graph executor and vm
 set(USE_PROFILER ON)

-# Whether enable uTVM standalone runtime
+# Whether enable microTVM standalone runtime
 set(USE_MICRO_STANDALONE_RUNTIME OFF)

 # Whether build with LLVM support


Sort list

Sort list

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -20,5 +20,5 @@
 hunter_config(OpenSSL VERSION 1.0.1f)
 hunter_config(RapidJSON VERSION 0.11-hunter)
 hunter_config(Sugar VERSION 1.0.11)
+hunter_config(ZLIB VERSION 1.2.8-hunter CMAKE_ARGS ZLIB_BUILD_SHARED=OFF)
 hunter_config(ios_sim VERSION 1.8.2)
-hunter_config(ZLIB VERSION 1.2.8-hunter CMAKE_ARGS ZLIB_BUILD_SHARED=OFF)


Roll back change to library install location for now.

--- cmake/macros.cmake
+++ cmake/macros.cmake
@@ -220,7 +220,7 @@
 macro(SET_INSTALL_DIRS)
   string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
   if (NOT DEFINED PDAL_LIB_INSTALL_DIR)
-    set(PDAL_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+    set(PDAL_LIB_INSTALL_DIR lib)
   endif ()
     set(PDAL_INCLUDE_INSTALL_ROOT "include/")
     set(PDAL_INCLUDE_INSTALL_DIR


DEFAULT_NO_DEVICES ON now supersedes
DEFAULT_ALL_DEVICES are ON with a warning message rather than fatal error.

svn path=/trunk/; revision=6972

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -40,20 +40,25 @@
 # and drivers.  This will be inspected to build up the set of drivers
 # to be compiled based on which devices are selected.

+option(DEFAULT_NO_DEVICES
+"Disable all (ON) or enable individually (OFF) devices by default"
+OFF
+)
+
 option(DEFAULT_ALL_DEVICES
 "Enable all (ON) or enable individually (OFF) devices by default"
 OFF
 )

-option(DEFAULT_NO_DEVICES
-"Disable all (ON) or enable individually (OFF) devices by default"
-OFF
-)
-
-if(DEFAULT_ALL_DEVICES AND DEFAULT_NO_DEVICES)
-  message(FATAL_ERROR
-  "DEFAULT_ALL_DEVICES AND DEFAULT_NO_DEVICES must not be ON simultaneously")
-endif(DEFAULT_ALL_DEVICES AND DEFAULT_NO_DEVICES)
+if(DEFAULT_NO_DEVICES AND DEFAULT_ALL_DEVICES)
+  message(STATUS
+  "WARNING. DEFAULT_NO_DEVICES ON supersedes DEFAULT_ALL_DEVICES ON.")
+  set(DEFAULT_ALL_DEVICES OFF
+  CACHE BOOL
+  "Enable all (ON) or enable individually (OFF) devices by default"
+  FORCE
+  )
+endif(DEFAULT_NO_DEVICES AND DEFAULT_ALL_DEVICES)

 # The DRIVERS_DEVICE_LIST defined below is a list of


Add libjpeg-turbo as jpeg (#62)

Add libjpeg-turbo as jpeg (#62)

--- cmake/projects/Jpeg/hunter.cmake
+++ cmake/projects/Jpeg/hunter.cmake
@@ -5,6 +5,7 @@

 include(hunter_add_version)
 include(hunter_cacheable)
+include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)

@@ -52,6 +53,28 @@
     42ff243ae28bdda5b4df5c47fb727272a534dc94
 )

+hunter_add_version(
+    PACKAGE_NAME
+    Jpeg
+    VERSION
+    "turbo-2.0.3-p4"
+    URL
+    "https://github.com/cpp-pm/libjpeg-turbo/archive/v2.0.3-p4.tar.gz"
+    SHA1
+    75c9961f52ef9f79a79498e3d46f9107f467494d
+)
+
+string(FIND "${HUNTER_Jpeg_VERSION}" "turbo" HUNTER_Jpeg_IS_TURBO)
+if(NOT HUNTER_Jpeg_IS_TURBO EQUAL -1)
+  hunter_cmake_args(
+    Jpeg
+    CMAKE_ARGS
+      ENABLE_SHARED=OFF
+      ENABLE_STATIC=ON
+      EXPORT_AS_JPEG=ON
+  )
+endif()
+
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(Jpeg)
 hunter_download(PACKAGE_NAME Jpeg)


Fix ninja builds on Windows.

Fix ninja builds on Windows.

--HG--
branch : v1-9

--- CMake/Utils/PrecompiledHeader.cmake
+++ CMake/Utils/PrecompiledHeader.cmake
@@ -17,7 +17,7 @@
   get_filename_component(HEADER ${HEADER_FILE} NAME)

   # Use MSVC_IDE to exclude NMake from using PCHs
-  if (MSVC AND NOT NMAKE AND NOT OGRE_UNITY_BUILD)
+  if (MSVC AND NOT NMAKE AND NOT OGRE_UNITY_BUILD AND NOT ${CMAKE_GENERATOR} MATCHES Ninja)
 	add_definitions(/Yu"${HEADER}")
     set_source_files_properties(${SRC_FILE}
       PPROPERTIES COMPILE_FLAGS /Yc"${HEADER}"


Gtest: use -Z7 rather than -Zi.

Gtest: use -Z7 rather than -Zi.

So it plays nice with buildcache/clcache.

--- tests/gtest/cmake/internal_utils.cmake
+++ tests/gtest/cmake/internal_utils.cmake
@@ -55,7 +55,7 @@
   if (MSVC)
     # Newlines inside flags variables break CMake's NMake generator.
     # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
-    set(cxx_base_flags "-GS -W4 -WX -wd4127 -wd4251 -wd4275 -nologo -J -Zi")
+    set(cxx_base_flags "-GS -W4 -WX -wd4127 -wd4251 -wd4275 -nologo -J -Z7")
     if (MSVC_VERSION LESS 1400)
       # Suppress spurious warnings MSVC 7.1 sometimes issues.
       # Forcing value to bool.


Fix Ptex issue with unset cmake variables

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -582,15 +582,17 @@
 # PTex
 if (USE_PTEX)
     find_package (PTex)
-    if (VERBOSE)
-        if (PTEX_FOUND)
+    if (PTEX_FOUND)
+        if (VERBOSE)
             message (STATUS "PTex include ${PTEX_INCLUDE_DIR}")
             message (STATUS "PTex library ${PTEX_LIBRARY}")
-        else ()
+        endif ()
+    else ()
+        if (VERBOSE)
             message (STATUS "PTex not found externally, using embedded source")
-            set (PTEX_LIBRARY "")
-            set (PTEX_INCLUDE_DIR "")
-        endif ()
+        endif ()
+        set (PTEX_LIBRARY "")
+        set (PTEX_INCLUDE_DIR "")
     endif ()
 endif()
 # end PTEX setup


Bug#12710832 - PB2 DAILY-TRUNK BUILD FAILS ON SOLARIS X86_64

Compiler bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6879978

Workaround is to always specify "-xOn".

cmake/build_configurations/mysql_release.cmake:
  Enable basic optimization for debug builds.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -210,8 +210,8 @@
       IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
         SET(COMMON_C_FLAGS                   "-g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
         SET(COMMON_CXX_FLAGS                 "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
-        SET(CMAKE_C_FLAGS_DEBUG              "${COMMON_C_FLAGS}")
-        SET(CMAKE_CXX_FLAGS_DEBUG            "${COMMON_CXX_FLAGS}")
+        SET(CMAKE_C_FLAGS_DEBUG              "-xO1 ${COMMON_C_FLAGS}")
+        SET(CMAKE_CXX_FLAGS_DEBUG            "-xO1 ${COMMON_CXX_FLAGS}")
         IF(32BIT)
           SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-xO2 ${COMMON_C_FLAGS}")
           SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-xO2 ${COMMON_CXX_FLAGS}")


Bug #58227 	improve error message "aio is required on Linux"

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -120,7 +120,13 @@
     CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
     CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
     IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO)
-      MESSAGE(FATAL_ERROR "aio is required on Linux")
+      MESSAGE(FATAL_ERROR "
+      aio is required on Linux, you need to install the required library:
+
+        Debian/Ubuntu:              apt-get install libaio-dev
+        RedHat/Fedora/Oracle Linux: yum install libaio-devel
+        SuSE:                       zypper install libaio-devel
+       ")
     ENDIF()
   ENDIF()


MAINT: don't link GPU implementations yet.

--- cpp/src/DO/Sara/UseDOSaraImageProcessing.cmake
+++ cpp/src/DO/Sara/UseDOSaraImageProcessing.cmake
@@ -26,8 +26,7 @@
                 shakti_gradient_2d_32f_cpu
                 shakti_polar_gradient_2d_32f_cpu
                 # Gaussian convolutions.
-                shakti_gaussian_convolution_cpu
-                shakti_gaussian_convolution_gpu)
+                shakti_gaussian_convolution_cpu)
     endif()
   endif()
 endif()


ENH: remove cmake info message

ENH: remove cmake info message

--- SuperBuild/CMake/External_muparserx.cmake
+++ SuperBuild/CMake/External_muparserx.cmake
@@ -11,8 +11,6 @@
 if(MSVC AND BUILD_SHARED_LIBS)
  list(APPEND MUPARSERX_FLAGS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=ON)
 endif()
-
-message(INFO "SB_CMAKE_CACHE_ARGS= " ${SB_CMAKE_CACHE_ARGS})

 ExternalProject_Add(MUPARSERX
   PREFIX MUPARSERX


ENH: Update niral_utilities to build it with ITKv4.6

--- SuperBuild/External_niral_utilities.cmake
+++ SuperBuild/External_niral_utilities.cmake
@@ -77,7 +77,7 @@

   ### --- End Project specific additions
   set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/niral_utilities.git )
-  set( ${proj}_GIT_TAG dea3323b99be580b6fd2a7214ce60ddb9d7baec2 )
+  set( ${proj}_GIT_TAG 3996b452eaa807cd53f167e35de76e181d497e58 )
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


Update CMakeExternals.cmake

Update CMakeExternals.cmake

This should provide maximum compatibility with GLFW 3.3.2, using CMAKE_INSTALL_LIBDIR as in their CMake build system (see [glfw/src/CMakeLists.txt](https://github.com/glfw/glfw/blob/bc3be40f2167dc59d720202d6f81224eda63ff45/src/CMakeLists.txt), rows 173-177).

--- CMakeExternals.cmake
+++ CMakeExternals.cmake
@@ -174,11 +174,13 @@
       return()
     endif()

-    if(WIN32)
-      set(GLFW_IMPORT_LIB "lib/glfw3dll.lib")
+    include(GNUInstallDirs)
+
+    if(WIN32)
+      set(GLFW_IMPORT_LIB "${CMAKE_INSTALL_LIBDIR}/glfw3dll.lib")
       set(GLFW_LIB "bin/glfw3.dll")
     else()
-      set(GLFW_LIB "lib/libglfw.so")
+      set(GLFW_LIB "${CMAKE_INSTALL_LIBDIR}/libglfw.so")
     endif()

     add_external_project(glfw SHARED


remove EditorFramework from demos dependencies

--- CMake/Utils/MyGUIConfigTargets.cmake
+++ CMake/Utils/MyGUIConfigTargets.cmake
@@ -101,16 +101,6 @@
 	# define the sources
 	include(${PROJECTNAME}.list)

-	if (${SOLUTIONFOLDER} STREQUAL "Tools")
-		include_directories(${MYGUI_SOURCE_DIR}/Tools/EditorFramework)
-		include(PrecompiledHeader)
-		# specify a precompiled header to use
-		use_precompiled_header(${PROJECTNAME}
-			"../../Common/Precompiled.h"
-			"../../Common/Precompiled.cpp"
-		)
-	endif ()
-
 	# Set up dependencies
 	if(MYGUI_RENDERSYSTEM EQUAL 1)
 		include_directories(../../Common/Base/Dummy)
@@ -203,10 +193,6 @@
 		MyGUIEngine
 	)

-	target_link_libraries(${PROJECTNAME}
-		EditorFramework
-	)
-
 	if (MYGUI_GENERATE_LIST_FILES_FROM_VSPROJECT)
 		add_custom_command(TARGET ${PROJECTNAME}
 			POST_BUILD
@@ -231,15 +217,6 @@
 	)
 	# define the sources
 	include(${PROJECTNAME}.list)
-
-	if (${SOLUTIONFOLDER} STREQUAL "Tools")
-		include(PrecompiledHeader)
-		# specify a precompiled header to use
-		use_precompiled_header(${PROJECTNAME}
-			"../../Common/Precompiled.h"
-			"../../Common/Precompiled.cpp"
-		)
-	endif ()

 	# Set up dependencies
 	if(MYGUI_RENDERSYSTEM EQUAL 1)
@@ -285,7 +262,7 @@

 	add_definitions("-D_USRDLL -DMYGUI_BUILD_DLL")
 	add_library(${PROJECTNAME} ${MYGUI_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
-	set_target_properties(${PROJECTNAME} PROPERTIES FOLDER "Tools")
+	set_target_properties(${PROJECTNAME} PROPERTIES FOLDER ${SOLUTIONFOLDER})
 	add_dependencies(${PROJECTNAME} MyGUIEngine)
 	target_link_libraries(${PROJECTNAME} MyGUIEngine)

@@ -345,6 +322,18 @@
 	if (MYGUI_INSTALL_TOOLS)
 		mygui_install_app(${PROJECTNAME})
 	endif ()
+
+	include_directories(${MYGUI_SOURCE_DIR}/Tools/EditorFramework)
+	include(PrecompiledHeader)
+	# specify a precompiled header to use
+	use_precompiled_header(${PROJECTNAME}
+		"../../Common/Precompiled.h"
+		"../../Common/Precompiled.cpp"
+	)
+
+	target_link_libraries(${PROJECTNAME}
+		EditorFramework
+	)
 endfunction(mygui_tool)

@@ -358,6 +347,13 @@
 	if (MYGUI_INSTALL_TOOLS)
 		mygui_install_app(${PROJECTNAME})
 	endif ()
+
+	include(PrecompiledHeader)
+	# specify a precompiled header to use
+	use_precompiled_header(${PROJECTNAME}
+		"../../Common/Precompiled.h"
+		"../../Common/Precompiled.cpp"
+	)
 endfunction(mygui_tool_dll)


ENH: ctkDashboardDriverScript.cmake now handle option ADDITIONNAL_CMAKECACHE_OPTION

This option allows for example to specify which lib, plugin or app should be enabled

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -5,6 +5,7 @@

 # The following variable are expected to be define in the top-level script:
 set(expected_variables
+  ADDITIONNAL_CMAKECACHE_OPTION
   CTEST_NOTES_FILES
   CTEST_SITE
   CTEST_DASHBOARD_ROOT
@@ -93,6 +94,7 @@
 QT_QMAKE_EXECUTABLE:FILEPATH=/home/jchris/Projects/qtsdk-2010.02/qt/bin/qmake
 SUPERBUILD_EXCLUDE_CTKBUILD_TARGET:BOOL=TRUE
 WITH_COVERAGE:BOOL=TRUE
+${ADDITIONNAL_CMAKECACHE_OPTION}
 ")
   endif()


knet -DLINUX -> -DUNIX

knet -DLINUX -> -DUNIX

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -150,9 +150,9 @@
 macro (configure_ogre)
     if ("$ENV{OGRE_HOME}" STREQUAL "" OR NOT WIN32)
         if (APPLE)
-    	FIND_LIBRARY(OGRE_LIBRARY NAMES Ogre)
-    	set (OGRE_INCLUDE_DIRS ${OGRE_LIBRARY}/Headers)
-    	set (OGRE_LIBRARIES ${OGRE_LIBRARY})
+    	  FIND_LIBRARY(OGRE_LIBRARY NAMES Ogre)
+    	  set (OGRE_INCLUDE_DIRS ${OGRE_LIBRARY}/Headers)
+    	  set (OGRE_LIBRARIES ${OGRE_LIBRARY})
         else ()
             sagase_configure_package (OGRE
             NAMES Ogre OgreSDK ogre OGRE
@@ -446,7 +446,7 @@
     include_directories(${KNET_DIR}/include)
     link_directories(${KNET_DIR}/lib)
     if (UNIX)
-        add_definitions(-DLINUX)
+        add_definitions(-DUNIX)
     endif()
     add_definitions(-DKNET_USE_BOOST)
 endmacro()


Include generated header file directory

Include generated header file directory

This enforces compilation of source files which include
generated header files when the header files change. The
header file changes are triggered by changes in the
event files or changes to the generate_event_file script

--- cmake/add_event_function.cmake
+++ cmake/add_event_function.cmake
@@ -15,6 +15,8 @@
 function(generate_event_targets)
   # If directory to store event files does not exist, create directory
   set(EVENT_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${PROJECT_NAME}")
+  set(EVENT_INCLUDE_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}")
+  include_directories(${EVENT_INCLUDE_DIRECTORY})
   if (NOT (EXISTS ${EVENT_DIRECTORY}))
     execute_process(
         COMMAND ${CMAKE_COMMAND} -E make_directory ${EVENT_DIRECTORY}


[cmake] change target name convention TARGET-run to run_TARGET

--- cmake/cleanCppExtensions.cmake
+++ cmake/cleanCppExtensions.cmake
@@ -3,7 +3,7 @@

 # Adds -run and -dbg targets
 macro(addRunAndDebugTargets TARGET)
-    add_custom_target(${TARGET}-run
+    add_custom_target(run_${TARGET}
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         USES_TERMINAL
         DEPENDS ${TARGET}
@@ -11,7 +11,7 @@

     # convenience run gdb target
     if(GDB_PATH)
-        add_custom_target(${TARGET}-gdb
+        add_custom_target(gdb_${TARGET}
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
             USES_TERMINAL
             DEPENDS ${TARGET}


Switching vectorization off and removing find CUDA since both is not necessary

--- cmake/optimization_flags.cmake
+++ cmake/optimization_flags.cmake
@@ -1,56 +1,33 @@
 # set common optimization flags
-
-find_package(CUDA 6.5)
-
-if (CUDA_FOUND)
-  set(USE_CUDA 1 CACHE BOOL "Use CUDA to speed up some functions")
-else ()
-  set(USE_CUDA 0 CACHE BOOL "Use CUDA to speed up some functions" FORCE)
-endif ()

 EXECUTE_PROCESS(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE)
 message(STATUS "Detected architecture ${ARCHITECTURE}")

-if (${ARCHITECTURE} STREQUAL "armv7l") # Preselect settings for Odroid or Tegra K1
-    set(USE_SSE2 0 CACHE BOOL "Compile for SSE2 (x86) using -msse2")
-    set(USE_SSE4.2 0 CACHE BOOL "Compile for SSE4.2 (x86) using -mpopcnt -msse4.2")
-    set(USE_AVX 0 CACHE BOOL "Compile for AVX (x86) using -mavx")
-    set(USE_AVX2 0 CACHE BOOL "Compile for AVX2 (x86) using -mavx2")
-    set(USE_ARMV7_CA15 1 CACHE BOOL "Compile for ARM V7 Cortex-A15 using -mcpu=cortex-a15 -mfpu=neon")
-    set(USE_ARMV8_AARCH64 0 CACHE BOOL "Compile for ARM V8 64 bit using -mcpu=armv8-a -mtune=cortex-a57")
-elseif (${ARCHITECTURE} STREQUAL "aarch64") # Preselect settings for Tegra X1
-    set(USE_SSE2 0 CACHE BOOL "Compile for SSE2 (x86) using -msse2")
-    set(USE_SSE4.2 0 CACHE BOOL "Compile for SSE4.2 (x86) using -mpopcnt -msse4.2")
-    set(USE_AVX 0 CACHE BOOL "Compile for AVX (x86) using -mavx")
-    set(USE_AVX2 0 CACHE BOOL "Compile for AVX2 (x86) using -mavx2")
-    set(USE_ARMV7_CA15 0 CACHE BOOL "Compile for ARM V7 Cortex-A15 using -mcpu=cortex-a15 -mfpu=neon")
-    set(USE_ARMV8_AARCH64 1 CACHE BOOL "Compile for ARM V8 64 bit using -mcpu=armv8-a -mtune=cortex-a57")
-else () # Preselect settings for intel architecture
-    set(USE_SSE2 1 CACHE BOOL "Compile for SSE2 (x86) using -msse2")
-    set(USE_SSE4.2 1 CACHE BOOL "Compile for SSE4.2 (x86) using -mpopcnt -msse4.2")
-    set(USE_AVX 1 CACHE BOOL "Compile for AVX (x86) using -mavx")
-    set(USE_AVX2 1 CACHE BOOL "Compile for AVX2 (x86) using -mavx2")
-    set(USE_ARMV7_CA15 0 CACHE BOOL "Compile for ARM V7 Cortex-A15 using -mcpu=cortex-a15 -mfpu=neon")
-    set(USE_ARMV8_AARCH64 0 CACHE BOOL "Compile for ARM V8 64 bit using -mcpu=armv8-a -mtune=cortex-a57")
-endif ()
+if (CMAKE_COMPILER_IS_GNUCC)
+  if ("${ARCHITECTURE}" STREQUAL "armv7l") # Preselect settings for Odroid or Tegra K1
+      set(USE_SSE2 0 CACHE BOOL "Compile for SSE2 (x86) using -msse2")
+      set(USE_SSE4.2 0 CACHE BOOL "Compile for SSE4.2 (x86) using -mpopcnt -msse4.2")
+      set(USE_AVX 0 CACHE BOOL "Compile for AVX (x86) using -mavx")
+      set(USE_AVX2 0 CACHE BOOL "Compile for AVX2 (x86) using -mavx2")
+      set(USE_ARMV7_CA15 1 CACHE BOOL "Compile for ARM V7 Cortex-A15 using -mcpu=cortex-a15 -mfpu=neon")
+      set(USE_ARMV8_AARCH64 0 CACHE BOOL "Compile for ARM V8 64 bit using -mcpu=armv8-a -mtune=cortex-a57")
+  elseif ("${ARCHITECTURE}" STREQUAL "aarch64") # Preselect settings for Tegra X1
+      set(USE_SSE2 0 CACHE BOOL "Compile for SSE2 (x86) using -msse2")
+      set(USE_SSE4.2 0 CACHE BOOL "Compile for SSE4.2 (x86) using -mpopcnt -msse4.2")
+      set(USE_AVX 0 CACHE BOOL "Compile for AVX (x86) using -mavx")
+      set(USE_AVX2 0 CACHE BOOL "Compile for AVX2 (x86) using -mavx2")
+      set(USE_ARMV7_CA15 0 CACHE BOOL "Compile for ARM V7 Cortex-A15 using -mcpu=cortex-a15 -mfpu=neon")
+      set(USE_ARMV8_AARCH64 1 CACHE BOOL "Compile for ARM V8 64 bit using -mcpu=armv8-a -mtune=cortex-a57")
+  else () # Preselect settings for intel architecture
+      set(USE_SSE2 0 CACHE BOOL "Compile for SSE2 (x86) using -msse2")
+      set(USE_SSE4.2 0 CACHE BOOL "Compile for SSE4.2 (x86) using -mpopcnt -msse4.2")
+      set(USE_AVX 0 CACHE BOOL "Compile for AVX (x86) using -mavx")
+      set(USE_AVX2 0 CACHE BOOL "Compile for AVX2 (x86) using -mavx2")
+      set(USE_ARMV7_CA15 0 CACHE BOOL "Compile for ARM V7 Cortex-A15 using -mcpu=cortex-a15 -mfpu=neon")
+      set(USE_ARMV8_AARCH64 0 CACHE BOOL "Compile for ARM V8 64 bit using -mcpu=armv8-a -mtune=cortex-a57")
+  endif ()

-set(UNROLL_LOOPS 1 CACHE BOOL "Compile using -funroll-loops")
-
-if (USE_CUDA)
-    include_directories(${CUDA_INCLUDE_DIRS})
-
-    if (${ARCHITECTURE} STREQUAL "armv7l")
-        set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode=arch=compute_32,code=sm_32 -O3)
-    elseif (${ARCHITECTURE} STREQUAL "aarch64")
-        set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode=arch=compute_53,code=sm_53 -O3)
-    else ()
-        set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_52,code=compute_52 -O3)
-    endif ()
-
-    add_definitions(-DINCLUDE_CUDA)
-
-    get_filename_component(CUDA_LIB_FOLDER ${CUDA_LIBRARIES} DIRECTORY)
-    set(CUDA_STATIC_LIBRARIES "${CUDA_LIB_FOLDER}/libcudart_static.a" -ldl -lrt)
+  set(UNROLL_LOOPS 1 CACHE BOOL "Compile using -funroll-loops")
 endif ()

 if (USE_SSE2)


Add system includes the conventional way

--- cmakemodules/UtilsMacros.cmake
+++ cmakemodules/UtilsMacros.cmake
@@ -36,8 +36,7 @@
 	    IF($ENV{VERBOSE})
 		    MESSAGE(STATUS "isystem: Path added: ${PATH_DIR}")
 	    ENDIF()
-	    SET(CMAKE_CXX_FLAGS "-isystem ${PATH_DIR} ${CMAKE_CXX_FLAGS}")
-	    SET(CMAKE_C_FLAGS "-isystem ${PATH_DIR} ${CMAKE_C_FLAGS}")
+	    INCLUDE_DIRECTORIES(SYSTEM ${PATH_DIR})
 	endif()
 ENDMACRO()


Add option to *link* otf2 statically

Add option to *link* otf2 statically

--- cmake/FindOTF2.cmake
+++ cmake/FindOTF2.cmake
@@ -1,3 +1,9 @@
+option(OTF2_USE_STATIC_LIBS "Link OTF2 statically." ON)
+if(OTF2_USE_STATIC_LIBS)
+  set(_OTF2_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+  set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
+endif()
+
 IF(OTF2_CONFIG_PATH)
     FIND_PROGRAM(OTF2_CONFIG NAMES otf2-config
         PATHS
@@ -68,3 +74,7 @@
     unset(OTF2_LINK_DIRS)
     unset(OTF2_LIBRARIES)
 endif()
+
+if(OTF2_USE_STATIC_LIBS)
+  set(CMAKE_FIND_LIBRARY_SUFFIXES ${_OTF2_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+endif()


Added dependency of concept on ml.

Added dependency of concept on ml.

--- cmake/ROCSDeps.cmake
+++ cmake/ROCSDeps.cmake
@@ -29,6 +29,7 @@
 # Module Concept
 if(ROCS_BUILD_MODULE_CONCEPT)
 	set(ROCS_BUILD_MODULE_CONCEPT yes)
+	set(ROCS_BUILD_MODULE_ML yes)
 	set(ROCS_BUILD_MODULE_CORE yes)
 	set(ROCS_BUILD_THIRDPARTY_LIBDAI yes)
 endif(ROCS_BUILD_MODULE_CONCEPT)


Fix oss build

Fix oss build

Summary: Bistro CMake files misses link target libthriftmetadata.so, we need to add it manually.

Reviewed By: vitaut

Differential Revision: D20007534

fbshipit-source-id: 70d93922b979bf03e8b8126c63ba03bfbd60ebf6

--- bistro/cmake/setup.cmake
+++ bistro/cmake/setup.cmake
@@ -50,6 +50,7 @@
   libprotocol.so
   libthrift-core.so
   libthriftcpp2.so
+  libthriftmetadata.so
   libthriftprotocol.so
   libtransport.so
 )


ENH: Bump ITK version to 5.3.0

ENH: Bump ITK version to 5.3.0

--- CMake/itkVersion.cmake
+++ CMake/itkVersion.cmake
@@ -1,4 +1,4 @@
 # ITK version number components.
 set(ITK_VERSION_MAJOR "5")
-set(ITK_VERSION_MINOR "2")
+set(ITK_VERSION_MINOR "3")
 set(ITK_VERSION_PATCH "0")


Test FindRAPTOR module with LINUXBREW environment variable

--- source/raptor/FindRAPTOR.cmake
+++ source/raptor/FindRAPTOR.cmake
@@ -45,6 +45,7 @@
               /usr/freeware/include
               /usr/local/include/raptor2    # Homebrew
               $ENV{HOME}/.linuxbrew/include/raptor2  # linuxbrew
+              $ENV{LINUXBREW}/include/raptor2
               /usr/include/raptor2
              NO_DEFAULT_PATH)

@@ -75,7 +76,7 @@
     message("Found Raptor at ${RAPTOR_LIBRARY}")
     message("home: $ENV{HOME}")
     message("user: $ENV{USER}")
-    file(GLOB_RECURSE include_files LIST_DIRECTORIES true home/$ENV{USER}/.linuxbrew/include/*)
+    file(GLOB_RECURSE include_files LIST_DIRECTORIES true $ENV{LINUXBREW}/include/*)
     message("${include_files}")

     if (NOT WIN32)


do not confuse Eigen3 or beta versions of Eigen3 with Eigen2

--- cmake/FindEigen2.cmake
+++ cmake/FindEigen2.cmake
@@ -39,11 +39,11 @@
   set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")

   set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
-  if(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})
+  if((${EIGEN2_WORLD_VERSION} NOTEQUAL 2) OR (${EIGEN2_MAJOR_VERSION} GREATER 10) OR (${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION}))
     set(EIGEN2_VERSION_OK FALSE)
-  else(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})
+  else()
     set(EIGEN2_VERSION_OK TRUE)
-  endif(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})
+  endif()

   if(NOT EIGEN2_VERSION_OK)


fix issue #453

fix issue #453

--- cmake/FindSphinx.cmake
+++ cmake/FindSphinx.cmake
@@ -241,27 +241,42 @@

 # ----------------------------------------------------------------------------
 # determine Sphinx version
+# some quick experiments by @ploxiln
+# - sphinx 1.7 and later have the version output format like "sphinx-build 1.7.2"
+# - sphinx 1.2 through 1.6 have the version output format like "Sphinx (sphinx-build) 1.2.2"
+# - sphinx 1.1 and before do not have a "--version" flag, but it causes the help output like "-h" does which includes version like "Sphinx v1.0.2"
 if (Sphinx-build_EXECUTABLE)
   # intentionally use invalid -h option here as the help that is shown then
   # will include the Sphinx version information
   if (Sphinx_PYTHON_EXECUTABLE)
     execute_process (
-      COMMAND "${Sphinx_PYTHON_EXECUTABLE}" ${Sphinx_PYTHON_OPTIONS} "${Sphinx-build_EXECUTABLE}" -h
+      COMMAND "${Sphinx_PYTHON_EXECUTABLE}" ${Sphinx_PYTHON_OPTIONS} "${Sphinx-build_EXECUTABLE}" --version
       OUTPUT_VARIABLE _Sphinx_VERSION
       ERROR_VARIABLE  _Sphinx_VERSION
     )
   elseif (UNIX)
     execute_process (
-      COMMAND "${Sphinx-build_EXECUTABLE}" -h
+      COMMAND "${Sphinx-build_EXECUTABLE}" --version
       OUTPUT_VARIABLE _Sphinx_VERSION
       ERROR_VARIABLE  _Sphinx_VERSION
     )
   endif ()

   # The sphinx version can also contain a "b" instead of the last dot.
-  # For example "Sphinx v1.2b1" so we cannot just split on "."
-  if (_Sphinx_VERSION MATCHES "Sphinx v([0-9]+\\.[0-9]+(\\.|b)[0-9]+)")
+  # For example "Sphinx v1.2b1" or "Sphinx 1.7.0b2" so we cannot just split on "."
+  if (_Sphinx_VERSION MATCHES "sphinx-build ([0-9]+\\.[0-9]+(\\.|a?|b?)([0-9]*)(b?)([0-9]*))")
     set (Sphinx_VERSION_STRING "${CMAKE_MATCH_1}")
+    set (_SPHINX_VERSION_FOUND)
+  elseif (_Sphinx_VERSION MATCHES "Sphinx v([0-9]+\\.[0-9]+(\\.|b?)([0-9]*)(b?)([0-9]*))")
+    set (Sphinx_VERSION_STRING "${CMAKE_MATCH_1}")
+    set (_SPHINX_VERSION_FOUND)
+  elseif (_Sphinx_VERSION MATCHES "Sphinx \\(sphinx-build\\) ([0-9]+\\.[0-9]+(\\.|a?|b?)([0-9]*)(b?)([0-9]*))")
+    set (Sphinx_VERSION_STRING "${CMAKE_MATCH_1}")
+    set (_SPHINX_VERSION_FOUND)
+  endif ()
+endif ()
+
+if(_SPHINX_VERSION_FOUND)
     string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.|b)[0-9]+" "\\1" Sphinx_VERSION_MAJOR ${Sphinx_VERSION_STRING})
     string(REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.|b)[0-9]+" "\\1" Sphinx_VERSION_MINOR ${Sphinx_VERSION_STRING})
     string(REGEX REPLACE "[0-9]+\\.[0-9]+(\\.|b)([0-9]+)" "\\1" Sphinx_VERSION_PATCH ${Sphinx_VERSION_STRING})
@@ -270,7 +285,6 @@
     if (Sphinx_VERSION_PATCH EQUAL 0)
       string (REGEX REPLACE "\\.0$" "" Sphinx_VERSION_STRING "${Sphinx_VERSION_STRING}")
     endif ()
-  endif()
 endif ()

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


Passing Elemental revision to parent project

--- cmake/clique_sub.cmake
+++ cmake/clique_sub.cmake
@@ -1,3 +1,4 @@
+set(ELEM_REV ${ELEM_REV} PARENT_SCOPE)
 set(USE_CUSTOM_ALLTOALLV ${USE_CUSTOM_ALLTOALLV} PARENT_SCOPE)
 set(BARRIER_IN_ALLTOALLV ${BARRIER_IN_ALLTOALLV} PARENT_SCOPE)
 set(HAVE_PARMETIS ${HAVE_PARMETIS} PARENT_SCOPE)


cmake: add optional app_set_runner_args()

Due to a chicken-and-egg problem, it's not possible to call
board_runner_args() directly from an application CMakeLists.txt and
have it take effect:

  - if the board_runner_args() call appears before including the
    boilerplate file, then the function is undefined and an error
    occurs.

  - if the call appears after including the boilerplate file, then
    board_finalize_runner_args() has already been called by the
    relevant runner.board.cmake file, so it won't take effect.

Similarly to the way set_conf_file() works, allow applications to
declare additional runner args by checking if they have provided a
macro named app_set_runner_args(), which contains calls to
board_runner_args(). Using a macro means that we can invoke it with
the definition of board_runner_args() in scope.

Signed-off-by: Marti Bolivar <fd5da480b758a78208111e6ae5c6806e1f887137@opensourcefoundries.com>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -520,17 +520,28 @@
 # provides glue between CMake and the runner invocation script,
 # zephyr_flash_debug.py.

-# This function is intended for board.cmake files.
-#
-# Usage:
+# This function is intended for board.cmake files and application
+# CMakeLists.txt files.
+#
+# Usage from board.cmake files:
 #   board_runner_args(runner "--some-arg=val1" "--another-arg=val2")
 #
-# Will ensure the command line to zephyr_flash_debug.py contains:
+# The build system will then ensure the command line to
+# zephyr_flash_debug.py contains:
 #   --some-arg=val1 --another-arg=val2
 #
-# in the flash, debug, and debugserver target recipes, as
-# appropriate. These settings will override any defaults provided by
-# the build system.
+# Within application CMakeLists.txt files, ensure that all calls to
+# board_runner_args() are part of a macro named app_set_runner_args(),
+# like this, which is defined before including the boilerplate file:
+#   macro(app_set_runner_args)
+#     board_runner_args(runner "--some-app-setting=value")
+#   endmacro()
+#
+# The build system tests for the existence of the macro and will
+# invoke it at the appropriate time if it is defined.
+#
+# Any explicitly provided settings given by this function override
+# defaults provided by the build system.
 function(board_runner_args runner)
   string(MAKE_C_IDENTIFIER ${runner} runner_id)
   # Note the "_EXPLICIT_" here, and see below.
@@ -554,8 +565,16 @@
 # precedence, except for arguments which can be given multiple times
 # (use these with caution).
 function(board_finalize_runner_args runner)
+  # If the application provided a macro to add additional runner
+  # arguments, handle them.
+  if(COMMAND app_set_runner_args)
+    app_set_runner_args()
+  endif()
+
+  # Retrieve the list of explicitly set arguments.
   string(MAKE_C_IDENTIFIER ${runner} runner_id)
   get_property(explicit GLOBAL PROPERTY "BOARD_RUNNER_ARGS_EXPLICIT_${runner_id}")
+
   # Note no _EXPLICIT_ here. This property contains the final list.
   set_property(GLOBAL APPEND PROPERTY BOARD_RUNNER_ARGS_${runner_id}
     # Default arguments from the common runner file come first.


Fix for Bug#11892055 - "GCC COMPILER FLAG -WOVERLOADED-VIRTUAL NOT USED, WHICH LETS BUGS IN"

--- cmake/maintainer.cmake
+++ cmake/maintainer.cmake
@@ -35,7 +35,7 @@
 # Setup G++ (GNU C++ compiler) warning options.
 MACRO(SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS)
   SET(MY_MAINTAINER_CXX_WARNINGS
-      "${MY_MAINTAINER_WARNINGS} -Wno-unused-parameter"
+      "${MY_MAINTAINER_WARNINGS} -Wno-unused-parameter -Woverloaded-virtual"
       CACHE STRING "C++ warning options used in maintainer builds.")
 ENDMACRO()


fix dry tests by disabling ctest for dry packages (fix #483)

--- cmake/test/tests.cmake
+++ cmake/test/tests.cmake
@@ -43,7 +43,15 @@
 # do not enable ctest's on the farm, since they are automatically executed by the current rules files
 # and since the tests have not been build rostests would hang forever
 if(NOT CATKIN_BUILD_BINARY_PACKAGE)
-  enable_testing()
+  # do not enable ctest's for dry packages, since they have a custom test target which must not be overwritten
+  if(NOT ROSBUILD_init_called)
+    message(STATUS "Call enable_testing()")
+    enable_testing()
+  else()
+    message(STATUS "Skip enable_testing() for dry packages")
+  endif()
+else()
+  message(STATUS "Skip enable_testing() when building binary package")
 endif()

 # allow overriding CATKIN_TEST_RESULTS_DIR when explicitly passed to CMake as a command line argument


Use dashboard script variables instead of find

The build has not started when find is called and therefore there is
no directory to be found. Also at this point some of the used variables
have not been filled yet.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -62,17 +62,14 @@

 set(CTEST_PATH "$ENV{PATH}")
 if(WIN32)
-  if(CMAKE_CL_64)
+  if("${CTEST_CMAKE_GENERATOR}" MATCHES ".*Win64")
     set(CMAKE_LIBRARY_ARCHITECTURE x64)
   else()
     set(CMAKE_LIBRARY_ARCHITECTURE x86)
   endif()
-  find_path(OPENCV_BIN_DIR opencv_core2411.dll
-    PATHS "${CTEST_BINARY_DIRECTORY}/ep/${CMAKE_LIBRARY_ARCHITECTURE}"
-    PATH_SUFFIXES vc10/bin vc11/bin vc12/bin vc13/bin vc14/bin
-    NO_DEFAULT_PATH
-  )
-  message("OpenCV runtime path: ${OPENCV_BIN_DIR}")
+  string(SUBSTRING "${MY_COMPILER}" 2 2 vc_version)
+
+  set(OPENCV_BIN_DIR "${CTEST_BINARY_DIRECTORY}/ep/${CMAKE_LIBRARY_ARCHITECTURE}/vc${vc_version}/bin")

   set(SOFA_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/ep/src/SOFA-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(BLUEBERRY_RUNTIME_DIR "${CTEST_BINARY_DIRECTORY}/MITK-build/bin/plugins/${CTEST_BUILD_CONFIGURATION}")


Allow CDash clients to configure more MITK options.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -85,12 +85,23 @@
   set(MITK_BUILD_ALL_APPS TRUE)
 endif()

+if(NOT DEFINED BLUEBERRY_BUILD_ALL_PLUGINS)
+  set(BLUEBERRY_BUILD_ALL_PLUGINS TRUE)
+endif()
+
+if(NOT DEFINED MITK_BUILD_ALL_PLUGINS)
+  set(MITK_BUILD_ALL_PLUGINS TRUE)
+endif()
+
+if(NOT DEFINED MITK_BUILD_EXAMPLES)
+  set(MITK_BUILD_EXAMPLES TRUE)
+endif()
+
 set(INITIAL_CMAKECACHE_OPTIONS "
-BLUEBERRY_BUILD_TESTING:BOOL=TRUE
-BLUEBERRY_BUILD_ALL_PLUGINS:BOOL=TRUE
-MITK_BUILD_ALL_PLUGINS:BOOL=TRUE
+BLUEBERRY_BUILD_ALL_PLUGINS:BOOL=${MITK_BUILD_ALL_PLUGINS}
+MITK_BUILD_ALL_PLUGINS:BOOL=${MITK_BUILD_ALL_PLUGINS}
 MITK_BUILD_ALL_APPS:BOOL=${MITK_BUILD_ALL_APPS}
-MITK_BUILD_EXAMPLES:BOOL=TRUE
+MITK_BUILD_EXAMPLES:BOOL=${MITK_BUILD_EXAMPLES}
 SUPERBUILD_EXCLUDE_MITKBUILD_TARGET:BOOL=TRUE
 MITK_USE_Boost:BOOL=${MITK_USE_Boost}
 MITK_USE_OpenCV:BOOL=${MITK_USE_OpenCV}


Wtf last change didn't make sense at all

--- CMakeDetermineGoCompiler.cmake
+++ CMakeDetermineGoCompiler.cmake
@@ -16,10 +16,6 @@
 # loading this file to force a compiler.

 if(NOT CMAKE_Go_COMPILER)
-
-  if (NOT $ENV{GOPATH} OR $ENV{GOPATH} STREQUAL "")
-    message(SEND_ERROR "Please set GOPATH before running make")
-  endif()

   # prefer the environment variable CC
   if(NOT $ENV{GO_COMPILER} STREQUAL "")


From Mathieu Marache, "This modified version of FindCOLLADA finds it correctly when installed with macports as in 'port install collada-dom'"

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -41,6 +41,7 @@
     $ENV{COLLADA_DIR}
     ~/Library/Frameworks
     /Library/Frameworks
+    /opt/local/Library/Frameworks #macports
     /usr/local/include
     /usr/local/include/colladadom
     /usr/include/
@@ -62,7 +63,8 @@
     $ENV{COLLADA_DIR}/lib-dbg
     $ENV{COLLADA_DIR}
     ~/Library/Frameworks
-    /Library/Frameworks
+    /Library/Frameworks
+    /opt/local/Library/Frameworks #macports
     /usr/local/lib
     /usr/local/lib64
     /usr/lib
@@ -85,6 +87,7 @@
     $ENV{COLLADA_DIR}
     ~/Library/Frameworks
     /Library/Frameworks
+    /opt/local/Library/Frameworks #macports
     /usr/local/lib
     /usr/local/lib64
     /usr/lib
@@ -107,6 +110,7 @@
     $ENV{COLLADA_DIR}
     ~/Library/Frameworks
     /Library/Frameworks
+    /opt/local/Library/Frameworks #macports
     /usr/local/lib
     /usr/local/lib64
     /usr/lib
@@ -129,6 +133,7 @@
     $ENV{COLLADA_DIR}
     ~/Library/Frameworks
     /Library/Frameworks
+    /opt/local/Library/Frameworks #macports
     /usr/local/lib
     /usr/local/lib64
     /usr/lib


fix ei_add_property

fix ei_add_property

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -1,7 +1,7 @@

 macro(ei_add_property prop value)
   get_property(previous GLOBAL PROPERTY ${prop})
-  if (NOT ${previous} OR ${previous} STREQUAL "")
+  if ((NOT previous) OR (previous STREQUAL ""))
     set_property(GLOBAL PROPERTY ${prop} "${value}")
   else()
     set_property(GLOBAL PROPERTY ${prop} "${previous} ${value}")


Fix detection for readline/libedit on 32bit Haiku (#312)

--- cmake/FindReadline.cmake
+++ cmake/FindReadline.cmake
@@ -19,13 +19,16 @@

 find_path(Readline_ROOT_DIR
     NAMES include/readline/readline.h includes/editline/readline.h
+          develop/headers/x86/readline/readline.h develop/headers/x86/editline/readline.h
           develop/headers/readline/readline.h develop/headers/editline/readline.h
 )

 find_path(Readline_INCLUDE_DIR
     NAMES readline.h
-    HINTS ${Readline_ROOT_DIR}/include/readline ${Readline_ROOT_DIR}/develop/headers/readline
-        ${Readline_ROOT_DIR}/include/editline ${Readline_ROOT_DIR}/develop/headers/editline
+    HINTS ${Readline_ROOT_DIR}/include/readline ${Readline_ROOT_DIR}/develop/headers/x86/readline
+			${Readline_ROOT_DIR}/develop/headers/readline
+        ${Readline_ROOT_DIR}/include/editline ${Readline_ROOT_DIR}/develop/headers/x86/editline
+			${Readline_ROOT_DIR}/develop/headers/editline
 )

 if(EXISTS ${Readline_INCLUDE_DIR}/history.h)
@@ -34,7 +37,8 @@

 find_library(Readline_LIBRARY
     NAMES readline edit
-    HINTS ${Readline_ROOT_DIR}/lib ${Readline_ROOT_DIR}/develop/lib
+    HINTS ${Readline_ROOT_DIR}/lib ${Readline_ROOT_DIR}/develop/lib/x86
+		${Readline_ROOT_DIR}/develop/lib
 )

 if(Readline_INCLUDE_DIR AND Readline_LIBRARY)


Fixed broken by r8007 install target

Fixed broken by r8007 install target

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -481,8 +481,8 @@
   # only "public" headers need to be installed
   if(OPENCV_MODULE_${the_module}_HEADERS AND OPENCV_MODULES_PUBLIC MATCHES "(^|;)${the_module}(;|$)")
     foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS})
-      string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr "${hdr}")
-      if(hdr MATCHES "^(opencv2/.*)/[^/]+.h(..)?$")
+      string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
+      if(hdr2 MATCHES "^(opencv2/.*)/[^/]+.h(..)?$")
         install(FILES ${hdr} DESTINATION "${OPENCV_INCLUDE_PREFIX}/${CMAKE_MATCH_1}" COMPONENT main)
       endif()
     endforeach()


CMake: OpenMP on if found

CMake: OpenMP on if found

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -276,17 +276,16 @@

 #--------------------------------------------------------------------
 # Check if OpenMP is available and set it to use, and include the dll in packs
-option(OpenMP_ON "Use OpenMP" OFF)
 find_package(OpenMP QUIET)
-if(OpenMP_ON)
-    if(OPENMP_FOUND)
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
-    else()
-        message(FATAL_ERROR "OpenMP not available")
-    endif()
-endif()
+option(OpenMP_ON "Use OpenMP" ${OPENMP_FOUND})
+if(OpenMP_ON AND OPENMP_FOUND)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
+elseif(OpenMP_ON)
+    message(FATAL_ERROR "OpenMP not available")
+endif()
+

 #--------------------------------------------------------------------
 # Set preprocessor definition to indicate whether