fix syntax regression from 1af2da1e6915085a608b4c9db47cd20992b49d6f

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -297,7 +297,7 @@
       ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/pkg.develspace.context.pc.py
       ${catkin_EXTRAS_DIR}/em/pkg.pc.em
       ${CATKIN_DEVEL_PREFIX}/lib/pkgconfig/${PROJECT_NAME}.pc)
-  )
+  endif()

   # generate devel space cfg-extras for project
   set(PKG_CFG_EXTRAS "")
@@ -342,7 +342,7 @@
       ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${PROJECT_NAME}Config-version.cmake
       @ONLY
     )
-  )
+  endif()

   #
   # INSTALLSPACE
@@ -380,7 +380,7 @@
     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}.pc
       DESTINATION lib/pkgconfig
     )
-  )
+  endif()

   # generate and install cfg-extras for project
   set(PKG_CFG_EXTRAS "")
@@ -441,7 +441,7 @@
       ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}Config-version.cmake
       DESTINATION share/${PROJECT_NAME}/cmake
     )
-  )
+  endif()

   # install package.xml
   install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/package.xml


Also specify CMAKE_MSVC_RUNTIME_LIBRARY for sub-build.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -154,15 +154,27 @@
       set(CMAKE_SUB_BUILD_OPTIONS ${CMAKE_SUB_BUILD_OPTIONS} --config Debug)
       if(MSVC_RUNTIME_LIBRARY_STATIC)
         set(SUBBUILD_MSVC_RUNTIME_FLAG "/MTd")
+        set(CMAKE_SUB_CONFIGURE_OPTIONS
+            ${CMAKE_SUB_CONFIGURE_OPTIONS}
+            -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug)
       else()
         set(SUBBUILD_MSVC_RUNTIME_FLAG "/MDd")
+        set(CMAKE_SUB_CONFIGURE_OPTIONS
+            ${CMAKE_SUB_CONFIGURE_OPTIONS}
+            -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL)
       endif()
     else()
       set(CMAKE_SUB_BUILD_OPTIONS ${CMAKE_SUB_BUILD_OPTIONS} --config Release)
       if(MSVC_RUNTIME_LIBRARY_STATIC)
         set(SUBBUILD_MSVC_RUNTIME_FLAG "/MT")
+        set(CMAKE_SUB_CONFIGURE_OPTIONS
+            ${CMAKE_SUB_CONFIGURE_OPTIONS}
+            -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded)
       else()
         set(SUBBUILD_MSVC_RUNTIME_FLAG "/MD")
+        set(CMAKE_SUB_CONFIGURE_OPTIONS
+            ${CMAKE_SUB_CONFIGURE_OPTIONS}
+            -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL)
       endif()
     endif()
     set(CMAKE_SUB_CONFIGURE_OPTIONS


Make determination of Octave version a little more proof against
errors. I have checked this logic works on Linux for the normal
"octave --version" command.  It also gives a soft landing when "octave
--version" is replaced by a bad octave command like "octave whatever".
However, the new logic cannot give a soft landing for internal octave
errors as occurs, for example, on wine.

svn path=/trunk/; revision=11380

--- cmake/modules/octave.cmake
+++ cmake/modules/octave.cmake
@@ -69,9 +69,20 @@
 if(ENABLE_octave)
   #OCTAVE_VERSION is the (dotted triplet) octave version.
   execute_process(
-  COMMAND ${OCTAVE} --version
-  OUTPUT_VARIABLE _OCTAVE_VERSION
-  )
+    COMMAND ${OCTAVE} --version
+    OUTPUT_VARIABLE _OCTAVE_VERSION
+    ERROR_VARIABLE OCTAVE_ERROR
+    RESULT_VARIABLE return_code
+    )
+  if(return_code)
+    message(STATUS "OCTAVE_ERROR = ${OCTAVE_ERROR}")
+    message(STATUS "WARNING: "
+    "${OCTAVE} --version generates an error (non-zero return code).  Disabling octave bindings")
+    set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE)
+  endif(return_code)
+endif(ENABLE_octave)
+
+if(ENABLE_octave)
   string(REGEX REPLACE
   "^.*version ([0-9]\\.[0-9]\\.[0-9]*).*$"
   "\\1"


device.cmake: added warning suppression

device.cmake: added warning suppression

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -922,10 +922,12 @@
     set(VPR_ARCH_ARGS "")
   endif()

+  set(OUT_NOISY_WARNINGS ${OUT_LOCAL}/noisy_warnings.log)
   separate_arguments(
     VPR_BASE_ARGS_LIST UNIX_COMMAND "${VPR_BASE_ARGS}"
     )
   list(APPEND VPR_BASE_ARGS_LIST --route_chan_width ${ROUTE_CHAN_WIDTH})
+  list(APPEND VPR_BASE_ARGS_LIST --suppress_warnings ${OUT_NOISY_WARNINGS},sum_pin_class:check_unbuffered_edges:load_rr_indexed_data_T_values:check_rr_node:trans_per_R)
   separate_arguments(
     VPR_EXTRA_ARGS_LIST UNIX_COMMAND "${VPR_EXTRA_ARGS}"
     )


programmer port becomes optional

programmer port becomes optional

--- generic-avr-gcc.cmake
+++ generic-avr-gcc.cmake
@@ -71,18 +71,24 @@
 endfunction(avr_add_executable_compilation)

 function(avr_add_executable_upload ${EXECUTABLE})
+	set(AVR_PROGRAMMER_OPTIONS "")
+
 	if(AVR_PROGRAMMER_BAUDRATE)
-		set(AVR_PROGRAMMER_OPTIONS "-b ${AVR_PROGRAMMER_BAUDRATE}")
+		set(AVR_PROGRAMMER_OPTIONS ${AVR_PROGRAMMER_OPTIONS} -b ${AVR_PROGRAMMER_BAUDRATE})
 	endif(AVR_PROGRAMMER_BAUDRATE)
+
+	if(AVR_PROGRAMMER_PORT)
+		set(AVR_PROGRAMMER_OPTIONS ${AVR_PROGRAMMER_OPTIONS} -P ${AVR_PROGRAMMER_PORT})
+	endif(AVR_PROGRAMMER_PORT)

 	# upload target
 	if(PROGRAM_EEPROM)
 		add_custom_target(upload_${EXECUTABLE}
-			COMMAND ${AVRDUDE} -p ${AVR_MCU} -c ${AVR_PROGRAMMER} -P ${AVR_PROGRAMMER_PORT} ${AVR_PROGRAMMER_OPTIONS} -U flash:w:${EXECUTABLE}.hex -U eeprom:w:${EXECUTABLE}_eeprom.hex
+			COMMAND ${AVRDUDE} -p ${AVR_MCU} -c ${AVR_PROGRAMMER} ${AVR_PROGRAMMER_OPTIONS} -U flash:w:${EXECUTABLE}.hex -U eeprom:w:${EXECUTABLE}_eeprom.hex
 			DEPENDS ${EXECUTABLE})
 	else(PROGRAM_EEPROM)
 		add_custom_target(upload_${EXECUTABLE}
-			COMMAND ${AVRDUDE} -p ${AVR_MCU} -c ${AVR_PROGRAMMER} -P ${AVR_PROGRAMMER_PORT} ${AVR_PROGRAMMER_OPTIONS} -U flash:w:${EXECUTABLE}.hex
+			COMMAND ${AVRDUDE} -p ${AVR_MCU} -c ${AVR_PROGRAMMER} ${AVR_PROGRAMMER_OPTIONS} -U flash:w:${EXECUTABLE}.hex
 			DEPENDS ${EXECUTABLE})
 	endif(PROGRAM_EEPROM)
 endfunction(avr_add_executable_upload)
@@ -92,11 +98,11 @@
 		message(FATAL_ERROR "AVR_MCU not defined")
 	endif(NOT AVR_MCU)
 	avr_add_executable_compilation(${EXECUTABLE} ${ARGN})
-	if(AVR_PROGRAMMER AND AVR_PROGRAMMER_PORT)
+	if(AVR_PROGRAMMER)
 		avr_add_executable_upload(${EXECUTABLE})
-	else(AVR_PROGRAMMER AND AVR_PROGRAMMER_PORT)
+	else(AVR_PROGRAMMER)
 		message(WARNING "Programmer not defined, upload target is not created")
-	endif(AVR_PROGRAMMER AND AVR_PROGRAMMER_PORT)
+	endif(AVR_PROGRAMMER)
 endfunction(avr_add_executable)

 function(avr_add_library LIBRARY)


ENH: Update version of DTI-Reg

ENH: Update version of DTI-Reg

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -487,7 +487,7 @@
   SVN_REPOSITORY "http://www.nitrc.org/svn/dtireg/trunk"
   SVN_USERNAME slicerbot
   SVN_PASSWORD slicer
-  SVN_REVISION -r 30 # 01/28/2013
+  SVN_REVISION -r 33 # 01/06/2013
   )
 set( CMAKE_ExtraARGS
   -DANTSTOOL:PATH=${ANTSPath}


FindOGRE.cmake fixes: - Use OGRE_DEPENDENCIES_DIR if defined (external dependencies) - Find media in the OGRE_SOURCE folder correctly - Use a zip file common to 1.6 and 1.7 to detect media (OgreCore.zip doesn't exist anymore in 1.7+)

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -58,6 +58,7 @@
 getenv_path(OGRE_SDK)
 getenv_path(OGRE_SOURCE)
 getenv_path(OGRE_BUILD)
+getenv_path(OGRE_DEPENDENCIES_DIR)
 getenv_path(PROGRAMFILES)

@@ -99,6 +100,7 @@
 # If both OGRE_BUILD and OGRE_SOURCE are set, prepare to find Ogre in a build dir
 set(OGRE_PREFIX_SOURCE ${OGRE_SOURCE} ${ENV_OGRE_SOURCE})
 set(OGRE_PREFIX_BUILD ${OGRE_BUILD} ${ENV_OGRE_BUILD})
+set(OGRE_PREFIX_DEPENDENCIES_DIR ${OGRE_DEPENDENCIES_DIR} ${ENV_OGRE_DEPENDENCIES_DIR})
 if (OGRE_PREFIX_SOURCE AND OGRE_PREFIX_BUILD)
   foreach(dir ${OGRE_PREFIX_SOURCE})
     set(OGRE_INC_SEARCH_PATH ${dir}/OgreMain/include ${dir}/Dependencies/include ${dir}/iPhoneDependencies/include ${OGRE_INC_SEARCH_PATH})
@@ -111,6 +113,12 @@
     set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
 	set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
   endforeach(dir)
+
+  if (OGRE_PREFIX_DEPENDENCIES_DIR)
+    set(OGRE_INC_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/include ${OGRE_INC_SEARCH_PATH})
+    set(OGRE_LIB_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/lib ${OGRE_LIB_SEARCH_PATH})
+    set(OGRE_BIN_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/bin ${OGRE_BIN_SEARCH_PATH})
+  endif()
 else()
   set(OGRE_PREFIX_SOURCE "NOTFOUND")
   set(OGRE_PREFIX_BUILD "NOTFOUND")
@@ -493,6 +501,7 @@

 # look for the media directory
 set(OGRE_MEDIA_SEARCH_PATH
+  ${OGRE_SOURCE}
   ${OGRE_LIBRARY_DIR_REL}/..
   ${OGRE_LIBRARY_DIR_DBG}/..
   ${OGRE_LIBRARY_DIR_REL}/../..
@@ -500,12 +509,13 @@
   ${OGRE_PREFIX_SOURCE}
 )
 set(OGRE_MEDIA_SEARCH_SUFFIX
+  Samples/Media
   Media
   media
   share/OGRE/media
-  Samples/Media
 )
+
 clear_if_changed(OGRE_PREFIX_WATCH OGRE_MEDIA_DIR)
-find_path(OGRE_MEDIA_DIR NAMES packs/OgreCore.zip HINTS ${OGRE_MEDIA_SEARCH_PATH}
+find_path(OGRE_MEDIA_DIR NAMES packs/cubemapsJS.zip HINTS ${OGRE_MEDIA_SEARCH_PATH}
   PATHS ${OGRE_PREFIX_PATH} PATH_SUFFIXES ${OGRE_MEDIA_SEARCH_SUFFIX})


Add threading library's include directory to Ogre include directories in FindOGRE.cmake

--HG--
branch : v1-7

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -285,6 +285,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${Boost_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
       endif ()
     elseif (OGRE_CONFIG_THREAD_PROVIDER EQUAL 2)
       find_package(POCO QUIET)
@@ -292,6 +293,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${POCO_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${POCO_INCLUDE_DIRS})
       endif ()
     elseif (OGRE_CONFIG_THREAD_PROVIDER EQUAL 3)
       find_package(TBB QUIET)
@@ -299,6 +301,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${TBB_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS})
       endif ()
     endif ()
   endif ()


COMP: updated tag number of MITK-Data repository

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag c2acb6ec)
+  set(revision_tag c3794753)
   #if(${proj}_REVISION_TAG)
   #  set(revision_tag ${${proj}_REVISION_TAG})
   #endif()


Consider all generated Qt 4.8 PythonQt wrappers

See issue #157

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -44,7 +44,7 @@
         message(FATAL_ERROR "error: Python is required to build ${PROJECT_NAME}")
       endif()

-      set(revision_tag 97df3b0845b3f5c987d3141a9e651436882f5913)
+      set(revision_tag 654f3249d1cf3f3ff674b2ff6cca7a2ef3517f60)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()


Fixed non windows path

Fixed non windows path

--- CMakeModules/FindFFmpeg.cmake
+++ CMakeModules/FindFFmpeg.cmake
@@ -113,7 +113,7 @@

 ELSE()

-    # SET(STDINT_OK TRUE)
+    SET(STDINT_OK TRUE)

 ENDIF()


- make it easier to select qt versions

- make it easier to select qt versions

--- ChooseQtVersion.cmake
+++ ChooseQtVersion.cmake
@@ -1,80 +1,95 @@
+# Copyright (C) 2017 by Pedro Mendes, Virginia Tech Intellectual
+# Properties, Inc., University of Heidelberg, and University of
+# of Connecticut School of Medicine.
+# All rights reserved.
+
 cmake_minimum_required(VERSION 2.8.9)

-option(PREFER_QT5 "Preferably to use qt5 if possible" ON)
-
-macro(QT_USE_MODULES _target)
-    # Enable AUTOMOC
-    set_target_properties(${_target} PROPERTIES AUTOMOC TRUE)
-    # Local variables
-    set(_modules_qt4)
-    set(_modules_qt5)
-    # Prepare modules
-    foreach(_module ${ARGN})
-        list(APPEND _modules_qt4 Qt${_module})
-        list(APPEND _modules_qt5 ${_module})
-        if(_module MATCHES "Gui")
-            list(APPEND _modules_qt5 "Widgets")
-        endif(_module MATCHES "Gui")
-    endforeach(_module ${ARGN})
-    list(REMOVE_DUPLICATES _modules_qt4)
-    list(REMOVE_DUPLICATES _modules_qt5)
-    # Find Qt libraries
-    if (${PREFER_QT5})
-    find_package(Qt5 QUIET COMPONENTS ${_modules_qt5})
-    endif()
+set(SELECT_QT "Any" CACHE STRING "The prefered Qt version one of: Qt5, Qt4 or Any" )
+if (DEFINED SELECT_QT)
+  if (NOT (${SELECT_QT} MATCHES "Qt5" OR
+           ${SELECT_QT} MATCHES "Qt4" OR
+           ${SELECT_QT} MATCHES "Any"))
+    message(WARNING "Unsupported Qt version: ${SELECT_QT}. Selecting best available.")
+    set(SELECT_QT " Any")
+  endif ()
+else ()
+  set(SELECT_QT " Any")
+endif(DEFINED SELECT_QT)

-    if(Qt5_FOUND)
-        qt5_use_modules(${_target} ${_modules_qt5})
-    else(Qt5_FOUND)
-        find_package(Qt4 QUIET COMPONENTS ${_modules_qt4})
-        if(Qt4_FOUND OR QT4_FOUND)
-            include(${QT_USE_FILE})
-            include_directories(${QT_INCLUDES})
-            add_definitions(${QT_DEFINITIONS})
-            target_link_libraries(${_target} ${QT_LIBRARIES})
-        endif(Qt4_FOUND OR QT4_FOUND)
-    endif(Qt5_FOUND)
+if (${SELECT_QT} MATCHES "Any")
+  set(QT_FIND_MODE QUIET)
+else ()
+  set(QT_FIND_MODE REQUIRED)
+endif()
+
+macro(QT_FIND_MODULES)
+  # Local variables
+  set(_modules_qt4)
+  set(_modules_qt5)
+
+  # Prepare modules
+  foreach(_module ${ARGN})
+     list(APPEND _modules_qt4 Qt${_module})
+     list(APPEND _modules_qt5 ${_module})
+     if(_module MATCHES " Gui")
+       list(APPEND _modules_qt5 "Widgets")
+     endif(_module MATCHES " Gui")
+  endforeach(_module ${ARGN})
+
+  list(REMOVE_DUPLICATES _modules_qt4)
+  list(REMOVE_DUPLICATES _modules_qt5)
+
+  # Find Qt libraries
+  if (${SELECT_QT} MATCHES "Qt5" OR
+      ${SELECT_QT} MATCHES "Any")
+    find_package(Qt5 ${QT_FIND_MODE} COMPONENTS ${_modules_qt5})
+  endif()
+
+  if (${SELECT_QT} MATCHES "Qt4" OR
+      ${SELECT_QT} MATCHES "Any")
+    find_package(Qt4 ${QT_FIND_MODE} COMPONENTS ${_modules_qt4})
+  endif()
+
+  if (NOT (Qt5_FOUND OR Qt4_FOUND OR QT4_FOUND))
+    message(FATAL_ERROR " Qt not found")
+  endif (NOT (Qt5_FOUND OR Qt4_FOUND OR QT4_FOUND))
+
+  if (Qt5_FOUND)
+    message(STATUS "Using Qt5")
+  endif (Qt5_FOUND)
+
+  if (Qt4_FOUND OR QT4_FOUND)
+    message(STATUS "Using Qt4")
+  endif (Qt4_FOUND OR QT4_FOUND)
+endmacro(QT_FIND_MODULES)
+
+macro(QT_USE_MODULES _target)
+  QT_FIND_MODULES(${ARGN})
+
+  # Enable AUTOMOC
+  set_target_properties(${_target} PROPERTIES AUTOMOC TRUE)
+
+  if (Qt5_FOUND)
+    qt5_use_modules(${_target} ${_modules_qt5})
+  else (Qt5_FOUND)
+    if (Qt4_FOUND OR QT4_FOUND)
+      include(${QT_USE_FILE})
+      include_directories(${QT_INCLUDES})
+      add_definitions(${QT_DEFINITIONS})
+    endif (Qt4_FOUND OR QT4_FOUND)
+  endif (Qt5_FOUND)
 endmacro(QT_USE_MODULES)

-macro(QT_FIND_MODULES)
-    # Local variables
-    set(_modules_qt4)
-    set(_modules_qt5)
-    # Prepare modules
-    foreach(_module ${ARGN})
-        list(APPEND _modules_qt4 Qt${_module})
-        list(APPEND _modules_qt5 ${_module})
-        if(_module MATCHES "Gui")
-            list(APPEND _modules_qt5 "Widgets")
-        endif(_module MATCHES "Gui")
-    endforeach(_module ${ARGN})
-    list(REMOVE_DUPLICATES _modules_qt4)
-    list(REMOVE_DUPLICATES _modules_qt5)
-    # Find Qt libraries
-    if (${PREFER_QT5})
-    find_package(Qt5 QUIET COMPONENTS ${_modules_qt5})
-    endif()
-    if( NOT Qt5_FOUND)
-        find_package(Qt4 QUIET COMPONENTS ${_modules_qt4})
-        if(Qt4_FOUND OR QT4_FOUND)
-            include(${QT_USE_FILE})
-            include_directories(${QT_INCLUDES})
-            add_definitions(${QT_DEFINITIONS})
-        endif(Qt4_FOUND OR QT4_FOUND)
-    endif( NOT Qt5_FOUND)
-endmacro(QT_FIND_MODULES)
-
 macro(QT_BIND_TO_TARGET _target)
-    # Enable AUTOMOC
-    #set_target_properties(${_target} PROPERTIES AUTOMOC TRUE)
-    if(Qt5_FOUND)
-        qt5_use_modules(${_target} ${_modules_qt5})
-    else(Qt5_FOUND)
-        if(Qt4_FOUND OR QT4_FOUND)
-            include(${QT_USE_FILE})
-            include_directories(${QT_INCLUDES})
-            add_definitions(${QT_DEFINITIONS})
-            target_link_libraries(${_target} ${QT_LIBRARIES})
-        endif(Qt4_FOUND OR QT4_FOUND)
-    endif(Qt5_FOUND)
+  if (Qt5_FOUND)
+    qt5_use_modules(${_target} ${_modules_qt5})
+  else (Qt5_FOUND)
+    if (Qt4_FOUND OR QT4_FOUND)
+      include(${QT_USE_FILE})
+      include_directories(${QT_INCLUDES})
+      add_definitions(${QT_DEFINITIONS})
+      target_link_libraries(${_target} ${QT_LIBRARIES})
+    endif (Qt4_FOUND OR QT4_FOUND)
+  endif (Qt5_FOUND)
 endmacro(QT_BIND_TO_TARGET)


Additional debug messages

Additional debug messages

--- CMake/FindEigen.cmake
+++ CMake/FindEigen.cmake
@@ -95,9 +95,13 @@
   eigen3 # Default root directory for Eigen.
   Eigen/include/eigen3 ) # Windows (for C:/Program Files prefix).

+file(GLOB EIGEN_CANDIDATES2 ${EIGEN_ROOT}/Eigen/Core)
+MESSAGE(status ${EIGEN_CANDIDATES2})
 file(GLOB EIGEN_CANDIDATES2 ${EIGEN_ROOT}/*/Eigen/Core)
 MESSAGE(status ${EIGEN_CANDIDATES2})
 file(GLOB EIGEN_CANDIDATES2 ${EIGEN_ROOT}/*/*/Eigen/Core)
+MESSAGE(status ${EIGEN_CANDIDATES2})
+file(GLOB EIGEN_CANDIDATES2 ${EIGEN_ROOT}/*/*/*/Eigen/Core)
 MESSAGE(status ${EIGEN_CANDIDATES2})
 # Search supplied hint directories first if supplied.
 FIND_PATH(EIGEN_INCLUDE_DIR


Changed to skip the ZLib check when ZLIB_SOURCE is set.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -209,13 +209,14 @@

 # Check for libz using the cmake supplied FindZLIB.cmake

-find_package(ZLIB)
-if(ZLIB_FOUND)
-  set(HAVE_ZLIB 1)
-else()
-  set(HAVE_ZLIB 0)
-endif()
-
+if(NOT ZLIB_SOURCE)
+  find_package(ZLIB)
+  if(ZLIB_FOUND)
+    set(HAVE_ZLIB 1)
+  else()
+    set(HAVE_ZLIB 0)
+  endif()
+endif()
 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)

 find_package(CppUnit)


I think this is finally correct

I think this is finally correct

--- Superbuild/UseBoost.cmake
+++ Superbuild/UseBoost.cmake
@@ -16,7 +16,11 @@
 # http://www.boost.org/doc/libs/1_58_0/more/getting_started/windows.html
 # http://www.boost.org/doc/libs/1_58_0/more/getting_started/unix-variants.html
 if(WIN32)
-  set(DEBUG_POSTFIX "-gd")
+  if(BUILD_WITH_PYTHON)
+    set(DEBUG_POSTFIX "-gyd")
+  else()
+    set(DEBUG_POSTFIX "-gd")
+  endif()
   set(boost_LIB_PREFIX "lib")
 else()
   set(DEBUG_POSTFIX "-yd")


Added Mili header-only library https://code.google.com/p/mili

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -181,6 +181,7 @@
 add_target(MAVEN maven)
 add_target(MAVEN_LIBS maven_libs)
 add_target(MCRYPT mcrypt)
+add_target(MILI mili)
 add_target(MPC mpc)
 add_target(MPFR mpfr)
 add_target(MYSQL mysql)
@@ -382,6 +383,7 @@
 set_library(llvm_xcore_disassembler ${LLVM_LIB_DIR} LLVMXCoreDisassembler)
 set_library(llvm_xcore_info ${LLVM_LIB_DIR} LLVMXCoreInfo)
 set_library(marisa_trie ${MARISA_TRIE_PREFIX}/lib marisa)
+set_library(mili "")  # Mili is header only.
 set_library(mpc ${MPC_PREFIX}/lib mpc)
 set_library(mpfr ${MPFR_PREFIX}/lib mpfr)
 set_library(mysqlcppconn ${MYSQLCPPCONN_PREFIX}/lib mysqlcppconn)
@@ -1575,6 +1577,19 @@
 add_dependencies(${MCRYPT_TARGET} ${LIBICONV_TARGET})
 add_dependencies(${MCRYPT_TARGET} ${LIBMCRYPT_TARGET})
 add_dependencies(${MCRYPT_TARGET} ${LIBMHASH_TARGET})
+
+################################################################################
+# Mili.
+add_external_project(
+  ${MILI_TARGET}
+  PREFIX ${MILI_PREFIX}
+  DOWNLOAD_COMMAND
+      ${HG} clone https://code.google.com/p/mili ${MILI_TARGET}
+  CONFIGURE_COMMAND echo ""
+  BUILD_COMMAND echo ""
+  INSTALL_COMMAND find mili | cpio -dp <INSTALL_DIR>/include
+  BUILD_IN_SOURCE 1)
+add_include_directory(${MILI_PREFIX}/include)

 ################################################################################
 # MPC.


Added a macro for detecting compiler

Added a macro for detecting compiler

--- build/macros.cmake
+++ build/macros.cmake
@@ -129,3 +129,25 @@
 	install_bin(${_targ})
 	install_headers(${_head} "${INSTALL_INC_DIR}")
 endmacro()
+
+macro(get_compiler_name _var)
+	if(MSVC)
+		if(MSVC11)
+			set(_var vc11)
+		elseif(MSVC12)
+			set(_var vc12)
+		elseif(MSVC14)
+			set(_var vc14)
+		endif()
+	elseif(DEFINED CMAKE_COMPILER_IS_GNUCC)
+		set(_var gcc)
+	elseif(DEFINED CMAKE_COMPILER_IS_GNUCXX)
+		set(_var gxx)
+	elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+		set(_var clang)
+	elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+		set(_var icc)
+	else()
+		message(FATAL_ERROR "Compiler not recognized")
+	endif()
+endmacro()


ENH: Updating to ITK v4.4.1 release tag

ENH: Updating to ITK v4.4.1 release tag

Change-Id: Id567c91c19321c86a43f604a55d6e7d86f1a315a

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -26,7 +26,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the
-set(ITK_TAG_COMMAND GIT_TAG 35b90133a793ffd884820e499175db19366fe627
+set(ITK_TAG_COMMAND GIT_TAG v4.4.1
  )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )


BUG:  CMAKE specification error.  I'm surprised this hasn't been a problem.

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -147,7 +147,7 @@
       -DBUILD_EXAMPLES:BOOL=OFF
       -DBUILD_TESTING:BOOL=OFF
       -DVTK_USE_PARALLEL:BOOL=ON
-      -DBUILD_SHARED_LIBS:OFF
+      -DBUILD_SHARED_LIBS:BOOL=OFF
       -DVTK_DEBUG_LEAKS:BOOL=${${PROJECT_NAME}_USE_VTK_DEBUG_LEAKS}
       -DVTK_LEGACY_REMOVE:BOOL=OFF
       -DVTK_WRAP_TCL:BOOL=${VTK_WRAP_TCL}


ENH: Improve Python SuperBuild

ENH: Improve Python SuperBuild

Shared libs were reset to OFF even when
the ITK_WRAP_PYTHON option was set to ON.

Change-Id: I25a27d137254fd06955d03f34e190f3752a4c831

--- Superbuild/External-ITK.cmake
+++ Superbuild/External-ITK.cmake
@@ -24,9 +24,11 @@
   set( _opencv_depends OpenCV )
 endif()

+set(use_shared_libs OFF)
 set( _wrap_python_args )
 if( ITKExamples_USE_WRAP_PYTHON )
-  set( _wrap_python_args -DITK_WRAP_PYTHON:BOOL=ON )
+  set(use_shared_libs ON)
+  set( _wrap_python_args -DITK_WRAP_PYTHON:BOOL=ON)
 endif()

 ExternalProject_Add( ITK
@@ -37,7 +39,7 @@
   CMAKE_GENERATOR ${gen}
   CMAKE_ARGS
     ${ep_common_args}
-    -DBUILD_SHARED_LIBS:BOOL=OFF
+    -DBUILD_SHARED_LIBS:BOOL=${use_shared_libs}
     -DBUILD_EXAMPLES:BOOL=OFF
     -DBUILD_TESTING:BOOL=OFF
     -DITK_BUILD_DEFAULT_MODULES:BOOL=ON


Temporary workaround for CTK issue: qRestAPI library dir set manually

--- CMake/PackageDepends/MITK_CTK_Config.cmake
+++ CMake/PackageDepends/MITK_CTK_Config.cmake
@@ -4,4 +4,9 @@
 list(APPEND ALL_LIBRARIES ${CTK_LIBRARIES})
 link_directories(${CTK_LIBRARY_DIRS})

-
+# Temporary workaround for CTK bug of not exposing external project library dirs.
+# Should be removed as soon as this is fixed in CTK. (espakm)
+if(EXISTS "${CTK_DIR}/qRestAPI-build/qRestAPIConfig.cmake")
+  include(${CTK_DIR}/qRestAPI-build/qRestAPIConfig.cmake)
+  link_directories(${qRestAPI_LIBRARY_DIRS})
+endif()


Revert "disable submitting to cdash"

Revert "disable submitting to cdash"

This reverts commit 285fb47b379d10cfeb951d4865450c4f2de28f79.

--- test.cmake
+++ test.cmake
@@ -422,7 +422,7 @@
    if(NOT is_experimental)
       CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
       if(res GREATER 0)
-         #ctest_submit(PARTS Update)
+         ctest_submit(PARTS Update)
       endif()
    endif()

@@ -436,7 +436,7 @@
          #"${CTEST_BINARY_DIRECTORY}/CMakeFiles/CMakeOutput.log"
          "${CTEST_BINARY_DIRECTORY}/CMakeFiles/CMakeError.log"
          )
-      #ctest_submit(PARTS Notes Configure)
+      ctest_submit(PARTS Notes Configure)
       unset(CTEST_NOTES_FILES) # less clutter in ctest -V output
       if(res EQUAL 0)
          set(test_results 0)
@@ -446,7 +446,7 @@
                BUILD "${CTEST_BINARY_DIRECTORY}"
                APPEND
                RETURN_VALUE res)
-            #ctest_submit(PARTS Build)
+            ctest_submit(PARTS Build)
             if(NOT skip_tests)
                ctest_test(
                   BUILD "${CTEST_BINARY_DIRECTORY}"
@@ -454,7 +454,7 @@
                   RETURN_VALUE test_results
                   PARALLEL_LEVEL ${number_of_processors})
             endif()
-            #ctest_submit(PARTS Test)
+            ctest_submit(PARTS Test)
          else()
             if("${subset}" STREQUAL "sse")
                set(label_list other Scalar SSE)
@@ -471,7 +471,7 @@
                   BUILD "${CTEST_BINARY_DIRECTORY}"
                   APPEND
                   RETURN_VALUE res)
-               #ctest_submit(PARTS Build)
+               ctest_submit(PARTS Build)
                if(res EQUAL 0 AND NOT skip_tests)
                   execute_process(
                      COMMAND ${CMAKE_CTEST_COMMAND} -N -L "^${label}$"
@@ -487,7 +487,7 @@
                         RETURN_VALUE res
                         PARALLEL_LEVEL ${number_of_processors}
                         INCLUDE_LABEL "^${label}$")
-                     #ctest_submit(PARTS Test)
+                     ctest_submit(PARTS Test)
                      if(NOT res EQUAL 0)
                         message("ctest_test returned non-zero result: ${res}")
                         set(test_results ${res})
@@ -501,7 +501,7 @@
                      BUILD "${CTEST_BINARY_DIRECTORY}"
                      APPEND
                      RETURN_VALUE res)
-                  #ctest_submit(PARTS Build)
+                  ctest_submit(PARTS Build)
                endif()
             endforeach()
          endif()


fix ctest -D Foo with MSVC 2008

fix ctest -D Foo with MSVC 2008

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -30,7 +30,7 @@
   if(MSVC_VERSION EQUAL 1600) # MSVC 2010
     set(EIGEN_MAKECOMMAND_PLACEHOLDER "${CMAKE_MAKE_PROGRAM_SAVE} buildtests.vcxproj /p:Configuration=\${CTEST_CONFIGURATION_TYPE} \n# ")
   else() # MSVC 2008 (TODO check MSVC 2005)
-    set(EIGEN_MAKECOMMAND_PLACEHOLDER "${CMAKE_MAKE_PROGRAM_SAVE} /project buildtests")
+    set(EIGEN_MAKECOMMAND_PLACEHOLDER "${CMAKE_MAKE_PROGRAM_SAVE} Eigen.sln /build \"Release\" /project buildtests \n# ")
   endif()
 else()
   # for make and nmake


LLVM's GoogleTest copy has moved its source code back to the default
location, update this reference to reflect that.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@194802 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -109,10 +109,11 @@

 # Unittests support.
 set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest)
-set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/gtest-all.cc)
+set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/src/gtest-all.cc)
 set(COMPILER_RT_GTEST_INCLUDE_CFLAGS
   -DGTEST_NO_LLVM_RAW_OSTREAM=1
   -I${COMPILER_RT_GTEST_PATH}/include
+  -I${COMPILER_RT_GTEST_PATH}
 )

 # Use Clang to link objects into a single executable with just-built


ENH: Missing download location in LibSVM external project

--- SuperBuild/CMake/External_libsvm.cmake
+++ SuperBuild/CMake/External_libsvm.cmake
@@ -18,6 +18,7 @@
     URL "http://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-3.20.tar.gz"
     URL_MD5 5f088e5f89da1c65b642300c9c5ea772
     BINARY_DIR ${LIBSVM_SB_BUILD_DIR}
+    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     CMAKE_CACHE_ARGS
       -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}


valgrind: use less verbose output to keep artifacts reasonable

--- scripts/cmake/ElektraCache.cmake
+++ scripts/cmake/ElektraCache.cmake
@@ -353,7 +353,7 @@
 	""
 	CACHE STRING "Optional suffix to use on lib folders (e.g. 64 for lib64)")

-set (MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-leak-kinds=all --gen-suppressions=all --error-exitcode=1")
+set (MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --gen-suppressions=all --error-exitcode=1")
 set (
 	MEMORYCHECK_SUPPRESSIONS_FILE
 	"${CMAKE_SOURCE_DIR}/tests/valgrind.suppression"


Fix incorrect boost find result

Fix incorrect boost find result

--- deps/OpenVDB/OpenVDB.cmake
+++ deps/OpenVDB/OpenVDB.cmake
@@ -7,8 +7,8 @@
 endif()

 prusaslicer_add_cmake_project(OpenVDB
-    URL https://github.com/tamasmeszaros/openvdb/archive/refs/tags/v6.2-prusa3d.zip #v6.2.1 patched
-    URL_HASH SHA256=3429d0b6a51298ea2bbdd189c741db0a7d6dbda2388afcce76e1031103d1dafe
+    URL https://github.com/tamasmeszaros/openvdb/archive/refs/tags/v6.2.1-prusa3d.zip #v6.2.1 patched
+    URL_HASH SHA256=caf9f0c91976722883ff9cb32420ef142af22f7e625fc643b91c23d6e4172f62
     DEPENDS dep_TBB dep_Blosc dep_OpenEXR dep_Boost
     CMAKE_ARGS
         -DCMAKE_POSITION_INDEPENDENT_CODE=ON


On OS X, make sure that we use at least the Mac OS X 10.7 SDK.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -161,40 +161,61 @@
         ADD_DEFINITIONS(-D_UNICODE)
     ENDIF()

-    # On OS X, use the oldest SDK shipped with Xcode
+    # On OS X, use the oldest SDK available, as long as it is for Mac OS X 10.7
+    # or later (i.e. a version that supports C++11)

     IF(APPLE)
         EXECUTE_PROCESS(COMMAND xcodebuild -showsdks
                         COMMAND grep --colour=never macosx
-                        COMMAND head -1
-                        OUTPUT_VARIABLE OLDEST_SDK_LINE
-                        OUTPUT_STRIP_TRAILING_WHITESPACE)
-        EXECUTE_PROCESS(COMMAND echo ${OLDEST_SDK_LINE}
                         COMMAND cut -f2
-                        OUTPUT_VARIABLE OLDEST_OS_X_VERSION
-                        OUTPUT_STRIP_TRAILING_WHITESPACE)
-        EXECUTE_PROCESS(COMMAND echo ${OLDEST_OS_X_VERSION}
+                        COMMAND sed "s/ *$//"
+                        OUTPUT_VARIABLE OS_X_VERSIONS
+                        ERROR_QUIET)
+        EXECUTE_PROCESS(COMMAND echo ${OS_X_VERSIONS}
                         COMMAND rev
                         COMMAND cut -d " " -f1
                         COMMAND rev
-                        OUTPUT_VARIABLE OLDEST_OS_X_VERSION_NUMBER
+                        COMMAND tr "\n" ";"
+                        OUTPUT_VARIABLE OS_X_VERSION_NUMBERS)
+
+        SET(VALID_OS_X_VERSION_NUMBER)
+        SET(INVALID_OS_X_VERSION_NUMBER)
+
+        FOREACH(OS_X_VERSION_NUMBER ${OS_X_VERSION_NUMBERS})
+            IF(${OS_X_VERSION_NUMBER} VERSION_LESS 10.7)
+                SET(INVALID_OS_X_VERSION_NUMBER ${OS_X_VERSION_NUMBER})
+            ELSE()
+                IF("${VALID_OS_X_VERSION_NUMBER}" STREQUAL "")
+                    SET(VALID_OS_X_VERSION_NUMBER ${OS_X_VERSION_NUMBER})
+                ENDIF()
+            ENDIF()
+        ENDFOREACH()
+
+        IF("${VALID_OS_X_VERSION_NUMBER}" STREQUAL "")
+            IF("${INVALID_OS_X_VERSION_NUMBER}" STREQUAL "")
+                MESSAGE(FATAL_ERROR "No SDK could be found...")
+            ELSE()
+                EXECUTE_PROCESS(COMMAND echo ${OS_X_VERSIONS}
+                                COMMAND grep "${INVALID_OS_X_VERSION_NUMBER}"
+                                OUTPUT_VARIABLE INVALID_OS_X_VERSION
+                                OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+                MESSAGE(FATAL_ERROR "The ${INVALID_OS_X_VERSION} SDK was found, but the Mac OS X 10.7 SDK or later is needed...")
+            ENDIF()
+        ENDIF()
+
+        EXECUTE_PROCESS(COMMAND echo ${OS_X_VERSIONS}
+                        COMMAND grep "${VALID_OS_X_VERSION_NUMBER}"
+                        OUTPUT_VARIABLE VALID_OS_X_VERSION
                         OUTPUT_STRIP_TRAILING_WHITESPACE)
-        EXECUTE_PROCESS(COMMAND echo ${OLDEST_SDK_LINE}
-                        COMMAND cut -f3
-                        OUTPUT_VARIABLE OLDEST_SDK_VERSION
+        EXECUTE_PROCESS(COMMAND xcodebuild -version -sdk macosx${VALID_OS_X_VERSION_NUMBER} Path
+                        OUTPUT_VARIABLE VALID_SDK_PATH
                         OUTPUT_STRIP_TRAILING_WHITESPACE)
-        EXECUTE_PROCESS(COMMAND echo ${OLDEST_SDK_VERSION}
-                        COMMAND cut -d " " -f2
-                        OUTPUT_VARIABLE OLDEST_SDK_NAME
-                        OUTPUT_STRIP_TRAILING_WHITESPACE)
-        EXECUTE_PROCESS(COMMAND xcodebuild -version -sdk ${OLDEST_SDK_NAME} Path
-                        OUTPUT_VARIABLE OLDEST_SDK_PATH
-                        OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-        MESSAGE("Building for ${OLDEST_OS_X_VERSION} and later...")
-
-        SET(CMAKE_OSX_DEPLOYMENT_TARGET ${OLDEST_OS_X_VERSION_NUMBER})
-        SET(CMAKE_OSX_SYSROOT ${OLDEST_SDK_PATH})
+
+        MESSAGE("Building for ${VALID_OS_X_VERSION} and later...")
+
+        SET(CMAKE_OSX_DEPLOYMENT_TARGET ${VALID_OS_X_VERSION_NUMBER})
+        SET(CMAKE_OSX_SYSROOT ${VALID_SDK_PATH})
     ENDIF()

     # Location of our plugins so that we don't have to deploy OpenCOR on


Some work towards upgrading to Qt 5.6.1 LTS + Qt WebKit (#1015).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -14,8 +14,8 @@

     IF(WIN32)
         IF(   NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"
-           OR NOT ${MSVC_VERSION} EQUAL 1800)
-            MESSAGE(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using MSVC 2013 on Windows...")
+           OR NOT ${MSVC_VERSION} EQUAL 1900)
+            MESSAGE(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using MSVC 2015 on Windows...")
         ENDIF()
     ELSEIF(APPLE)
         IF(    NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"


cmake(python): Add missing proto, file and lib

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -33,6 +33,7 @@
 set(PROTO_PYS)
 file(GLOB_RECURSE proto_py_files RELATIVE ${PROJECT_SOURCE_DIR}
   "ortools/constraint_solver/*.proto"
+  "ortools/data/*.proto"
   "ortools/linear_solver/*.proto"
   "ortools/sat/*.proto"
   "ortools/util/*.proto"
@@ -86,11 +87,13 @@
 file(COPY ortools/__init__.py DESTINATION python/${PROJECT_NAME}/algorithms)
 file(COPY ortools/__init__.py DESTINATION python/${PROJECT_NAME}/data)

-file(COPY ortools/linear_solver/linear_solver_natural_api.py
+file(COPY
+    ortools/linear_solver/linear_solver_natural_api.py
   DESTINATION python/ortools/linear_solver)
-file(COPY ortools/sat/python/cp_model.py
-  DESTINATION python/ortools/sat/python)
-file(COPY ortools/sat/python/visualization.py
+file(COPY
+    ortools/sat/python/cp_model.py
+    ortools/sat/python/cp_model_helper.py
+    ortools/sat/python/visualization.py
   DESTINATION python/ortools/sat/python)

 # setup.py.in contains cmake variable e.g. @PROJECT_NAME@ and
@@ -142,6 +145,7 @@
   COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:pywraplp> ${PROJECT_NAME}/linear_solver
   COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:pywrapsat> ${PROJECT_NAME}/sat
   COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:pywraprcpsp> ${PROJECT_NAME}/data
+  COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:sorted_interval_list> ${PROJECT_NAME}/util
   #COMMAND ${Python_EXECUTABLE} setup.py bdist_egg bdist_wheel
   COMMAND ${Python_EXECUTABLE} setup.py bdist_wheel
   BYPRODUCTS


modules: support Windows release package by default.

--- modules/FindSDL2.cmake
+++ modules/FindSDL2.cmake
@@ -37,7 +37,8 @@
 if(CORRADE_TARGET_EMSCRIPTEN)
     set(_SDL2_PATH_SUFFIXES SDL)
 else()
-    find_library(SDL2_LIBRARY SDL2)
+    find_library(SDL2_LIBRARY SDL2
+        PATH_SUFFIXES lib/x86 lib/x64)
     set(SDL2_LIBRARY_NEEDED SDL2_LIBRARY)
     set(_SDL2_PATH_SUFFIXES SDL2)
 endif()


PATCH projects/README.md w/o GIT_REF, GIT_TAG, DIFF

issue https://github.com/smanders/externpro/issues/162

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -584,7 +584,7 @@
 endfunction()

 function(ipMarkdownPro)
-  set(oneValueArgs NAME DESC VER GIT_REF GIT_TAG SUPERPRO DIFF)
+  set(oneValueArgs NAME DESC VER GIT_REF GIT_TAG SUPERPRO DIFF PATCH)
   set(multiValueArgs WEB LICENSE REPO)
   cmake_parse_arguments(P "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   if(DEFINED P_WEB)
@@ -619,6 +619,9 @@
       string(SUBSTRING ${P_GIT_REF} ${loc} -1 P_GIT_REF)
     endif()
     set(diff "[diff](${P_DIFF}${P_GIT_REF}...${P_GIT_TAG} 'patch/diff')")
+  elseif(DEFINED P_PATCH)
+    file(RELATIVE_PATH relpath ${PRO_DIR} ${P_PATCH})
+    set(diff "[patch](${relpath} 'patch')")
   else()
     set(diff "none")
   endif()


Add static library definition to FindCAF lookup

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -83,8 +83,8 @@
       endif ()
       find_library(CAF_LIBRARY_${UPPERCOMP}
                    NAMES
-                     "caf_${comp}"
-		     "caf_${comp}_static"
+                    "caf_${comp}"
+		      "caf_${comp}_static"
                    HINTS
                      ${library_hints}
                      /usr/lib


Find libpng on Ubuntu 12.04

Find libpng on Ubuntu 12.04

--- cmake/FindPNG.cmake
+++ cmake/FindPNG.cmake
@@ -26,6 +26,7 @@

 find_library(PNG_LIBRARY
   NAMES
+    png
     libpng
     libpng16
     libpng_static
@@ -37,10 +38,12 @@
   PATH_SUFFIXES
     lib64
     lib
+    lib/x86_64-linux-gnu
 )

 find_library(PNG_LIBRARY_DEBUG
   NAMES
+    pngd
     libpngd
     libpng16d
     libpng_staticd
@@ -52,6 +55,7 @@
   PATH_SUFFIXES
     lib64
     lib
+    lib/x86_64-linux-gnu
 )

 if(PNG_LIBRARY_DEBUG)


Add "lib" to search prefixes for libtbb

Add "lib" to search prefixes for libtbb

* Fix quoting error in library search.
* Add "lib" to prefixes when system is "Linux".

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -158,6 +158,7 @@
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
       set(TBB_LIB_PATH_SUFFIX "lib/ia32/gcc4.4")
     endif()
+    list(APPEND TBB_LIB_PATH_SUFFIX "lib")
   endif()

   ##################################
@@ -179,12 +180,12 @@
     find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}
         HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
         PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
-        PATH_SUFFIXES "${TBB_LIB_PATH_SUFFIX}")
+        PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})

     find_library(TBB_${_comp}_LIBRARY_DEBUG ${_comp}_debug
         HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
         PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
-        PATH_SUFFIXES "${TBB_LIB_PATH_SUFFIX}")
+        PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})

     # Set the library to be used for the component


Fix lld search path

Fix lld search path

--- cmake/Findlld.cmake
+++ cmake/Findlld.cmake
@@ -8,13 +8,13 @@

 find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
     PATHS
-        /usr/lib/llvm-10.0/include
+        /usr/lib/llvm-10/include
         /usr/local/llvm100/include
         /mingw64/include)

 find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld
     PATHS
-        /usr/lib/llvm-10.0/lib
+        /usr/lib/llvm-10/lib
         /usr/local/llvm100/lib
 )
 if(EXISTS ${LLD_LIBRARY})
@@ -24,7 +24,7 @@
         string(TOUPPER ${_libname_} _prettylibname_)
         find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
             PATHS
-                /usr/lib/llvm-10.0/lib
+                /usr/lib/llvm-10/lib
                 /usr/local/llvm100/lib
                 /mingw64/lib
                 /c/msys64/mingw64/lib


pass travis ci

pass travis ci

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -27,6 +27,7 @@
 #
 # cmake_parse_arguments can help us to achieve this goal.
 # https://cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html
+#

 # cc_library parses tensor.cc and figures out that target also depend on tensor.h.
 # cc_library(tensor


Add pre-commit checks for tabs and NOCHECKIN.  As we can't add Google Code
subversion hooks, we have runsuite.cmake do the checks by creating a diff
from the specified working directory.

SVN-Revision: 2401

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -59,6 +59,81 @@
 else (UNIX)
   set(install_build_args "")
 endif (UNIX)
+
+
+##################################################
+# Pre-commit source file checks.
+# Google Code does not support adding subversion hooks, so we
+# have checks here.
+# We could do a GLOB_RECURSE and read every file, but that's slow, so
+# we try to construct the diff.
+if (EXISTS "${CTEST_SOURCE_DIRECTORY}/.svn" OR
+    # in case the top-level dir and not trunk was checked out
+    EXISTS "${CTEST_SOURCE_DIRECTORY}/../.svn")
+  find_program(SVN svn DOC "subversion client")
+  if (SVN)
+    execute_process(COMMAND ${SVN} diff
+      WORKING_DIRECTORY "${CTEST_SOURCE_DIRECTORY}"
+      RESULT_VARIABLE svn_result
+      ERROR_VARIABLE svn_err
+      OUTPUT_VARIABLE diff_contents)
+    if (svn_result OR svn_err)
+      message(FATAL_ERROR "*** ${SVN} diff failed: ***\n${svn_result} ${svn_err}")
+    endif (svn_result OR svn_err)
+    # Remove tabs from the revision lines
+    string(REGEX REPLACE "\n(---|\\+\\+\\+)[^\n]*\t" "" diff_contents "${diff_contents}")
+  endif (SVN)
+else ()
+  if (EXISTS "${CTEST_SOURCE_DIRECTORY}/.git")
+    find_program(GIT git DOC "git client")
+    if (GIT)
+      # Included committed, staged, and unstaged changes.
+      # We assume "master" contains the svn top-of-trunk.
+      execute_process(COMMAND ${GIT} diff master
+        WORKING_DIRECTORY "${CTEST_SOURCE_DIRECTORY}"
+        RESULT_VARIABLE git_result
+        ERROR_VARIABLE git_err
+        OUTPUT_VARIABLE diff_contents)
+      if (git_result OR git_err)
+        if (git_err MATCHES "unknown revision")
+          # It may be a cloned branch
+          execute_process(COMMAND ${GIT} diff remotes/origin/master
+            WORKING_DIRECTORY "${CTEST_SOURCE_DIRECTORY}"
+            RESULT_VARIABLE git_result
+            ERROR_VARIABLE git_err
+            OUTPUT_VARIABLE diff_contents)
+        endif ()
+        if (git_result OR git_err)
+          message(FATAL_ERROR "*** ${GIT} diff failed: ***\n${git_err}")
+        endif (git_result OR git_err)
+      endif (git_result OR git_err)
+    endif (GIT)
+  endif (EXISTS "${CTEST_SOURCE_DIRECTORY}/.git")
+endif ()
+if (NOT DEFINED diff_contents)
+  message(FATAL_ERROR "Unable to construct diff for pre-commit checks")
+endif ()
+
+# Check for tabs.  We already removed them from svn's diff format.
+string(REGEX MATCH "\t" match "${diff_contents}")
+if (NOT "${match}" STREQUAL "")
+  string(REGEX MATCH "\n[^\n]*\t[^\n]*" match "${diff_contents}")
+  message(FATAL_ERROR "ERROR: diff contains tabs: ${match}")
+endif ()
+
+# Check for NOCHECKIN
+string(REGEX MATCH "NOCHECKIN" match "${diff_contents}")
+if (NOT "${match}" STREQUAL "")
+  string(REGEX MATCH "\n[^\n]*NOCHECKIN[^\n]*" match "${diff_contents}")
+  message(FATAL_ERROR "ERROR: diff contains NOCHECKIN: ${match}")
+endif ()
+
+# CMake seems to remove carriage returns for us so we can't easily
+# check for them unless we switch to perl or python or something
+# to get the diff and check it.
+
+##################################################
+

 # for short suite, don't build tests for builds that don't run tests
 # (since building takes forever on windows): so we only turn


ARROW-7181: [C++] Fix an Arrow module search bug with pkg-config

If an Arrow module has only shared library and pkg-config is used to
find the module, FindArrow.cmake can't find directory that has the
shared library.

Closes #5850 from kou/cpp-find-arrow-set-missing-variable-pkg-config and squashes the following commits:

6d461ba4d <Sutou Kouhei>  Fix an Arrow module search bug with pkg-config

Authored-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>
Signed-off-by: Neal Richardson <beb59f0141269d2d04e73d0dcc1967b64ba87e13@gmail.com>

--- cpp/cmake_modules/FindArrow.cmake
+++ cpp/cmake_modules/FindArrow.cmake
@@ -275,6 +275,7 @@
                                      "${rest_shared_lib_paths}"
                                      IMPORTED_LOCATION
                                      "${first_shared_lib_path}")
+    get_target_property(shared_lib ${target_shared} IMPORTED_LOCATION)

     find_library(${prefix}_static_lib
                  NAMES "${static_lib_name}"


corrected url in custom viewer description

--- Examples/BlueBerryExampleLauncher/Configurations/CustomViewer.cmake
+++ Examples/BlueBerryExampleLauncher/Configurations/CustomViewer.cmake
@@ -19,5 +19,5 @@

 GUI Customization using Qt-Stylesheets

-See the main documentation for details."
+See the main documentation for details."
 )


fixing a cmake vs version issue

fixing a cmake vs version issue

--- cmake/CMakeCompiler.cmake
+++ cmake/CMakeCompiler.cmake
@@ -30,7 +30,7 @@
 	if( MSVC_VERSION EQUAL 1900 )
 		set(DEVENV_NAME "vs2015")
 		set(COMPILER_NAME "vc14")
-	elseif( MSVC_VERSION EQUAL 1911 )
+	elseif( MSVC_VERSION GREATER_EQUAL 1910 )
 		set(DEVENV_NAME "vs2017")
 		set(COMPILER_NAME "vc15")
 	else()


Fix MacOS installation with homebrew and enable back freeCAD compilation with OpenCAM lib support

--- src/pythonlib/pythonlib.cmake
+++ src/pythonlib/pythonlib.cmake
@@ -132,6 +132,18 @@
 # set_target_properties(ocl PROPERTIES VERSION ${MY_VERSION})
 # endif (WIN32)

+if (APPLE AND NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+install(
+  TARGETS ocl
+  LIBRARY DESTINATION lib/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/ocl
+)
+# these are the python helper lib-files such as camvtk.py
+install(
+  DIRECTORY lib/
+  DESTINATION lib/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/ocl
+  #    PATTERN .svn EXCLUDE
+)
+else()
 install(
   TARGETS ocl
   LIBRARY DESTINATION ${PYTHON_ARCH_PACKAGES}
@@ -142,3 +154,4 @@
   DESTINATION ${PYTHON_SITE_PACKAGES}
   #    PATTERN .svn EXCLUDE
 )
+endif()


CMake: In the message that displays what CUDA architectures are enabled, clarify that we're talking about explicitly enabled architectures.

--- cmake/CubCudaConfig.cmake
+++ cmake/CubCudaConfig.cmake
@@ -5,7 +5,7 @@
 #

 set(all_archs 35 37 50 52 53 60 61 62 70 72 75 80)
-set(arch_message "CUB: Enabled CUDA architectures:")
+set(arch_message "CUB: Explicitly enabled CUDA architectures:")

 # Thrust sets up the architecture flags in CMAKE_CUDA_FLAGS already. Just
 # reuse them if possible. After we transition to CMake 3.18 CUDA_ARCHITECTURE


Add better logic and messaging when detecting HDF5

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -90,12 +90,22 @@
 # HDF5
 if(ADIOS2_USE_HDF5 STREQUAL AUTO)
   find_package(HDF5 COMPONENTS C)
+  if(HDF5_FOUND AND
+     ((ADIOS2_HAVE_MPI AND HDF5_IS_PARALLEL) OR
+      (NOT ADIOS2_HAVE_MPI AND NOT HDF5_IS_PARALLEL)))
+    set(ADIOS2_HAVE_HDF5 TRUE)
+  endif()
 elseif(ADIOS2_USE_HDF5)
   find_package(HDF5 REQUIRED COMPONENTS C)
-endif()
-if(HDF5_FOUND AND
-   ((ADIOS2_HAVE_MPI AND HDF5_IS_PARALLEL) OR
-    NOT (ADIOS2_HAVE_MPI OR HDF5_IS_PARALLEL)))
+  if(ADIOS2_HAVE_MPI)
+    if(NOT HDF5_IS_PARALLEL)
+      message(FATAL_ERROR "MPI is enabled but serial HDF5 is detected.")
+    endif()
+  else()
+    if(HDF5_IS_PARALLEL)
+      message(FATAL_ERROR "MPI is disabled but parallel HDF5 is detected.")
+    endif()
+  endif()
   set(ADIOS2_HAVE_HDF5 TRUE)
 endif()


On the minheadless VM that is built using cmake, the add_vm_plugin_sources cmake macro requires specifying the the plugin sources explicitly, which is omitting the src/plugins/SqueakSSL/SqueakSSL.c in the compilation of the plugin. By using the other macro (add_vm_plugin_auto), the platform specific files are automatically found with a glob pattern. This is a mistake that I introduced myself. This problem can be reproduced in Pharo using the minheadless vm of this repository on OS X with the following script:

```smalltalk
url := 'https://google.com' asZnUrl.
ZnClient new
url: url;
get;
response
```

In the case of the minheadless VM for OS X, we are treating the VM as it were an unix since we are removing all of the platform specific windowing code in this VM variant. For this reason, in the cases where OS X is different than another unix, the plugin code has to be added manually.

--- cmake/PluginsCommon.cmake
+++ cmake/PluginsCommon.cmake
@@ -96,6 +96,10 @@
 endif()

 # Squeak SSL plugin
+# In the case of the minheadless VM for OS X, we are treating the VM as it were
+# an unix since we are removing all of the platform specific windowing code in
+# this VM variant. For this reason, in the cases where OS X is different than
+# another unix, the plugin code has to be added manually.
 if (APPLE)
 	set(SqueakSSL_Sources
 	    "platforms/iOS/plugins/SqueakSSL/sqMacSSL.c"


Modifying elemvariables.cmake to account for the case where there are no MPI include flags.

--- cmake/elemvariables.cmake
+++ cmake/elemvariables.cmake
@@ -14,7 +14,11 @@
 MPI_CXX_LINK_FLAGS = @MPI_CXX_LINK_FLAGS@
 MPI_CXX_LIBS = @MPI_CXX_LIBS@

-ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC} -I${MPI_CXX_INCLUDE_PATH}
+ifeq ($(strip $(MPI_CXX_INCLUDE_PATH)),)
+  ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC}
+else
+  ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC} -I${MPI_CXX_INCLUDE_PATH}
+endif
 ELEM_LINK_FLAGS = -L${ELEM_LIB} ${MPI_CXX_LINK_FLAGS}

 HAVE_PMRRR = @HAVE_PMRRR@


Minor fix.

Minor fix.

--- Utilities.cmake
+++ Utilities.cmake
@@ -9,8 +9,7 @@
   set_target_properties(${module_name} PROPERTIES SUFFIX ".so")
   target_link_libraries(${module_name} efu
     ${${module_name}_LIB}
-    ${EFU_COMMON_LIBS}
-    eventlib)
+  ${EFU_COMMON_LIBS})
   if(${CMAKE_COMPILER_IS_GNUCXX})
     add_linker_flags(${module_name} "-Wl,--no-as-needed")
   endif()


Removing parent_scope settings.

Removing parent_scope settings.

--- CPM.cmake
+++ CPM.cmake
@@ -443,12 +443,12 @@
   else()
     # Add our definition to the list of pre-existing preproc items.
     # We use this list to clear out existing entries in our subdirectories.
-    set(${CPM_KV_PREPROC_NS_MAP_${__CPM_LAST_MODULE_PREPROC}} ${fullUNID} PARENT_SCOPE)
-    set(CPM_KV_LIST_PREPROC_NS_MAP ${CPM_KV_LIST_PREPROC_NS_MAP} ${__CPM_LAST_MODULE_PREPROC} PARENT_SCOPE)
+    set(${CPM_KV_PREPROC_NS_MAP_${__CPM_LAST_MODULE_PREPROC}} ${fullUNID})# PARENT_SCOPE)
+    set(CPM_KV_LIST_PREPROC_NS_MAP ${CPM_KV_LIST_PREPROC_NS_MAP} ${__CPM_LAST_MODULE_PREPROC})# PARENT_SCOPE)
   endif()

   # Add the interface definition to our list of preprocessor definitions.
-  set(CPM_DEFINITIONS ${CPM_DEFINITIONS} "-D${__CPM_LAST_MODULE_PREPROC}=${fullUNID}" PARENT_SCOPE)
+  set(CPM_DEFINITIONS ${CPM_DEFINITIONS} "-D${__CPM_LAST_MODULE_PREPROC}=${fullUNID}")# PARENT_SCOPE)

   # Clear our variable.
   set(__CPM_LAST_MODULE_PREPROC)
@@ -711,17 +711,17 @@
   # Add the module version to the map.
   if (NOT DEFINED CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID})
     # Add this entry to the map list.
-    set(CPM_KV_LIST_MOD_VERSION_MAP ${CPM_KV_LIST_MOD_VERSION_MAP} ${__CPM_PATH_UNID} PARENT_SCOPE)
-  endif()
-  set(CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID} ${__CPM_PATH_UNID_VERSION} PARENT_SCOPE)
+    set(CPM_KV_LIST_MOD_VERSION_MAP ${CPM_KV_LIST_MOD_VERSION_MAP} ${__CPM_PATH_UNID}) #PARENT_SCOPE)
+  endif()
+  set(CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID} ${__CPM_PATH_UNID_VERSION}) #PARENT_SCOPE)

   # Setup module interface definition. This is the name the module is using
   # to identify itself in it's headers.
-  #if (DEFINED CPM_LAST_MODULE_NAME)
-  #  _cpm_check_and_add_preproc(${name} ${CPM_LAST_MODULE_NAME} ${__CPM_FULL_UNID})
-  #else()
-  #  message(FATAL_ERROR "A ${CPM_LAST_MODULE_NAME} module (${__CPM_MODULE_SOURCE_DIR}) failed to define its name!")
-  #endif()
+  if (DEFINED CPM_LAST_MODULE_NAME)
+    _cpm_check_and_add_preproc(${name} ${CPM_LAST_MODULE_NAME} ${__CPM_FULL_UNID})
+  else()
+    message(FATAL_ERROR "A ${CPM_LAST_MODULE_NAME} module (${__CPM_MODULE_SOURCE_DIR}) failed to define its name!")
+  endif()

   # Set the appropriate preprocessor definition for this module and populate
   # our namespace header file.
@@ -731,8 +731,10 @@
   set(__CPM_MODULE_PREPROC)

   # Append target to pre-existing libraries.
-  set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
-  set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} "${__CPM_MODULE_SOURCE_DIR}/include" PARENT_SCOPE)
+  #set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
+  #set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} "${__CPM_MODULE_SOURCE_DIR}/include" PARENT_SCOPE)
+  set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}")
+  set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} "${__CPM_MODULE_SOURCE_DIR}/include")

   if (DEFINED CPM_SHOW_HIERARCHY)
     if(__CPM_USING_GIT)
@@ -744,7 +746,7 @@

   # Now propogate the version map upwards (we don't really *need* to do this).
   # But makes it clear what we are trying to do.
-  _cpm_propogate_version_map_up()
+  #_cpm_propogate_version_map_up()
 endfunction()

 function(CPM_AddExternal name)


can append cache vars

can append cache vars

--- CMake/UseCyclus.cmake
+++ CMake/UseCyclus.cmake
@@ -69,7 +69,7 @@
     ENDIF(NOT EXISTS ${HOUT})
     SET(
       "${lib_root}_H"
-      "${HOUT}"
+      "${lib_root}_H" "${HOUT}"
       CACHE INTERNAL "Agent header" FORCE
       )
   ENDIF(EXISTS "${HIN}")
@@ -84,7 +84,7 @@
   ENDIF(NOT EXISTS ${CCOUT})
   SET(
     "${lib_root}_CC"
-    "${CCOUT}"
+    "${lib_root}_CC" "${CCOUT}"
     CACHE INTERNAL "Agent source" FORCE
     )
 ENDMACRO()


More informative error message when configure script not provided.

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -145,6 +145,12 @@
              ${CMAKE} .. -C${CACHE_FILE} -DCMAKE_VERBOSE_MAKEFILE=ON)
         _add_driver_step (${DRIVER_SCRIPT} CONFIGURE CONFIGURE_COMMAND)

+
+    else (EXISTS ${TEST_FILE_PATH})
+
+        message (SEND_ERROR "The file ${TEST_FILE_PATH} must exist"
+                            " in order for the configure step to run")
+
     endif (EXISTS ${TEST_FILE_PATH})

 endfunction (_append_configure_step)


Bump TubeTK to add tortuosity module

Bump TubeTK to add tortuosity module

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "b8970626ab008d4daf81841b27906a423a1017fe"
+    GIT_TAG "7744f4a5a8bc4364dd1f2e59b72ae445a1ef5672"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Squashed 'cmake/yacma/' changes from c46f016..7b54746

7b54746 A yacma update to enable more warnings.

git-subtree-dir: cmake/yacma
git-subtree-split: 7b547467110158a0c8bd9370502b1bb1323b6e1c

--- YACMACompilerLinkerSettings.cmake
+++ YACMACompilerLinkerSettings.cmake
@@ -111,9 +111,7 @@
         # This limit is supposed to be at least 1024 in C++11, but for some reason
         # clang sets this to 256, and gcc to 900.
         _YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
-        # NOTE: this can be useful, but at the moment it triggers lots of warnings in type traits.
-        # Keep it in mind for the next time we touch type traits.
-        # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
         # NOTE: disable this for now, as it results in a lot of clutter from Boost.
         # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)
@@ -131,6 +129,7 @@
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshift-negative-value)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshift-overflow=2)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wduplicated-cond)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnull-dereference)
         # From GCC 7.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wduplicated-branches)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wrestrict)


minor fix

minor fix

--- SM/SM.cmake
+++ SM/SM.cmake
@@ -41,6 +41,7 @@
 		# set(FEAT_ENABLED OFF)
 	endif(CV_NONFREE_FOUND)
 	set(COMPOSITE_SEARCH_METHODS ${COMPOSITE_SEARCH_METHODS} FeatureTracker)
+	set(SEARCH_PARAMS ${SEARCH_PARAMS} FLANNCV)
 else(WITH_FEAT)
 	message(STATUS "Feature tracker disabled")
 	set(MTF_DEFINITIONS ${MTF_DEFINITIONS} DISABLE_FEAT)
@@ -80,16 +81,10 @@
 	else()
 		message(STATUS "FLANN not found so the templated version of NN has been disabled")
 		set(MTF_DEFINITIONS ${MTF_DEFINITIONS} DISABLE_FLANN DISABLE_HDF5)
-		if(WITH_FEAT)
-			set(SEARCH_PARAMS ${SEARCH_PARAMS} FLANNCV)
-		endif(WITH_FEAT)
 	endif()

 else()
 	set(MTF_DEFINITIONS ${MTF_DEFINITIONS} DISABLE_FLANN DISABLE_HDF5)
-	if(WITH_FEAT)
-		set(SEARCH_PARAMS ${SEARCH_PARAMS} FLANNCV)
-	endif(WITH_FEAT)
 	message(STATUS "FLANN based NN is disabled")
 endif()
 set(SEARCH_METHODS ${SEARCH_METHODS} ${COMPOSITE_SEARCH_METHODS})


[CMake] Fix unified build

[CMake] Fix unified build

Make sure SWIFT_NATIVE_LLVM_TOOLS_PATH and SWIFT_NATIVE_CLANG_TOOLS_PATH
are set even when not building standalone.

Swift SVN r24726

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -238,9 +238,11 @@
   set(PATH_TO_LLVM_SOURCE "${CMAKE_SOURCE_DIR}")
   set(PATH_TO_LLVM_BUILD "${CMAKE_BINARY_DIR}")
   set(${product}_PATH_TO_CLANG_BUILD "${CMAKE_BINARY_DIR}")
-  set(PATH_TO_CLANG_BUILD "${SWIFT_PATH_TO_CLANG_BUILD}")
+  set(PATH_TO_CLANG_BUILD "${CMAKE_BINARY_DIR}")
   set(CLANG_MAIN_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/tools/clang/include")
   set(CLANG_BUILD_INCLUDE_DIR "${CMAKE_BINARY_DIR}/tools/clang/include")
+  set(${product}_NATIVE_LLVM_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")
+  set(${product}_NATIVE_CLANG_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")

   include_directories(
       "${CLANG_BUILD_INCLUDE_DIR}"


Ridiculous hack to "work around" Sourceforge's unreliability.

--- modules/DownloadModules.cmake
+++ modules/DownloadModules.cmake
@@ -77,8 +77,13 @@
     # Download
     if (_getmod)
       message ("Downloading module '${_modname}'...")
-      execute_process (COMMAND "${svn}" checkout "${_modurl}" "${_modname}"
-        WORKING_DIRECTORY "${outdir}")
+      # QQQ Ridiculous and slow hack, but Sourceforge has been incredibly
+      # unreliable lately so this is the best choice I've got to make
+      # the remote queue semi-stable
+      foreach (s 1 2)
+        execute_process (COMMAND "${svn}" checkout "${_modurl}" "${_modname}"
+          WORKING_DIRECTORY "${outdir}")
+      endforeach (s 1 2)
     endif (_getmod)
   endif (modline)
 endforeach (modline)


ENH: link OSSIM with superbuild of libjpeg


Issue #29: Fix Boost --with-whatever-lib flags.

--- CMake/ExternalProjects/Boost.cmake
+++ CMake/ExternalProjects/Boost.cmake
@@ -14,7 +14,6 @@

 set(MYPROJECT_USE_Boost 1)
 set(MYPROJECT_USE_Boost_LIBRARIES ${MYPROJECT_BOOST_LIBS})
-

 #-----------------------------------------------------------------------------
 # Boost
@@ -53,7 +52,7 @@
   if(MYPROJECT_USE_Boost_LIBRARIES)
     string(REPLACE ";" "," _boost_libs "${MYPROJECT_USE_Boost_LIBRARIES}")
     foreach(_boost_lib ${MYPROJECT_USE_Boost_LIBRARIES})
-      list(APPEND _with_boost_libs ${_with_boost_libs} --with-${_boost_lib})
+      list(APPEND _with_boost_libs --with-${_boost_lib})
     endforeach()
   endif()


Cleanup toolchain file.

Cleanup toolchain file.

--- cmake/Toolchains/mingw64-x86_64.cmake
+++ cmake/Toolchains/mingw64-x86_64.cmake
@@ -2,9 +2,12 @@

 set(CMAKE_SYSTEM_NAME Windows)

-set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
-set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
-set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
+SET(PREFIX x86_64-w64-mingw32)
+SET(CMAKE_C_COMPILER   ${PREFIX}-gcc)
+SET(CMAKE_CXX_COMPILER ${PREFIX}-g++)
+SET(CMAKE_AR           ${PREFIX}-gcc-ar)
+SET(CMAKE_NM           ${PREFIX}-gcc-nm)
+SET(CMAKE_RC_COMPILER  ${PREFIX}-windres)

 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)


Fixed problem with finding krislibrary due to myfile change

--- CMakeModules/FindKrisLibrary.cmake
+++ CMakeModules/FindKrisLibrary.cmake
@@ -11,17 +11,38 @@
 #this will get everything but KrisLibrary
 INCLUDE(KrisLibraryDependencies)

+FIND_PATH(KRISLIBRARY_INCLUDE_DIR
+  	KrisLibrary/File.h
+  PATHS /usr/include /usr/local/include ${KRISLIBRARY_ROOT}
+  DOC "Directory where KrisLibrary header files are stored" )
+
 # Find KrisLibrary
-FIND_LIBRARY( KRISLIBRARY_LIBRARY KrisLibrary PATHS /usr/local/lib "${KRISLIBRARY_ROOT}/KrisLibrary/lib" )
-FIND_PATH(KRISLIBRARY_INCLUDE_DIR
-	KrisLibrary/myfile.h
-PATHS /usr/include /usr/local/include ${KrisLibrary_ROOT}
-DOC "Directory where KrisLibrary header files are stored" )
-
-#do the find_package call...
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(KRISLIBRARY "Could not find KrisLibrary " KRISLIBRARY_INCLUDE_DIR KRISLIBRARY_LIBRARY)
-# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view
+IF(WIN32)
+  include(FindPackageHandleStandardArgs)
+  FIND_PATH(KRISLIBRARY_INCLUDE_DIR KrisLibrary/File.h
+    PATHS ${KRISLIBRARY_ROOT}  )
+  FIND_LIBRARY(KRISLIBRARY_LIBRARY_DEBUG
+	NAMES KrisLibraryd
+	PATHS ${KRISLIBRARY_ROOT})
+  FIND_LIBRARY(KRISLIBRARY_LIBRARY_RELEASE
+	NAMES KrisLibrary
+	PATHS ${KRISLIBRARY_ROOT})
+  find_package_handle_standard_args(KRISLIBRARY
+	DEFAULT_MSG
+	KRISLIBRARY_INCLUDE_DIR
+	KRISLIBRARY_LIBRARY_DEBUG
+	KRISLIBRARY_LIBRARY_RELEASE)
+  if(NOT KRISLIBRARY_FOUND)
+    MESSAGE("KrisLibrary not found!")
+  endif( )
+ELSE(WIN32)
+  FIND_LIBRARY( KRISLIBRARY_LIBRARY KrisLibrary PATHS /usr/local/lib "${KRISLIBRARY_ROOT}/KrisLibrary/lib" )
+
+  #do the find_package call...
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(KRISLIBRARY "Could not find KrisLibrary " KRISLIBRARY_INCLUDE_DIR KRISLIBRARY_LIBRARY)
+  # show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view
+  ENDIF(WIN32)

 SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS} ${KRISLIBRARY_INCLUDE_DIR})
 SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARY} ${KRISLIBRARY_LIBRARIES})


Install scripts: allow installing optional VC redistributables.

--- cmakemodules/script_setup_cpack.cmake
+++ cmakemodules/script_setup_cpack.cmake
@@ -108,6 +108,19 @@
 	else(CMAKE_SIZEOF_VOID_P EQUAL 8)
 	  set(CPACK_NSIS_PROGRAMFILES PROGRAMFILES)
 	endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+
+	# Allow installing VC redistributables:
+	SET(INSTALL_MSVC_REDISTRIBUTABLE "" CACHE FILEPATH "Select an optional vcredist*.exe file to include in the installation")
+	MARK_AS_ADVANCED(INSTALL_MSVC_REDISTRIBUTABLE)
+
+	if (NOT "${INSTALL_MSVC_REDISTRIBUTABLE}" STREQUAL "")
+		GET_FILENAME_COMPONENT(INSTALL_MSVC_REDISTRIBUTABLE_FILENAME "${INSTALL_MSVC_REDISTRIBUTABLE}" NAME_WE)
+
+		install(PROGRAMS ${INSTALL_MSVC_REDISTRIBUTABLE} DESTINATION tmp)
+		set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
+               ExecWait \\\"$INSTDIR\\\\tmp\\\\${INSTALL_MSVC_REDISTRIBUTABLE_FILENAME}\\\"
+               ")
+	endif (NOT "${INSTALL_MSVC_REDISTRIBUTABLE}" STREQUAL "")

 ENDIF(WIN32)
 IF(UNIX)


temporary inchi download location; (#5653)

add temporary inchi download location until the problems with their server are resolved.

--- Code/cmake/Modules/FindInchi.cmake
+++ Code/cmake/Modules/FindInchi.cmake
@@ -39,7 +39,8 @@
   else (INCHI_FOUND)
     # system InChI is missing, download it
     if(NOT DEFINED INCHI_URL)
-      set(INCHI_URL "https://www.inchi-trust.org/download/106/INCHI-1-SRC.zip")
+      #set(INCHI_URL "https://www.inchi-trust.org/download/106/INCHI-1-SRC.zip")
+      set(INCHI_URL "https://rdkit.org/downloads/INCHI-1-SRC.zip")
     endif()
     if(NOT DEFINED INCHI_MD5SUM)
       set(INCHI_MD5SUM "f2efa0c58cef32915686c04d7055b4e9")


[DEBIAN10] YottaDB is now supported on Debian 10 (buster/sid); icu-config is deprecated in Debian 10 so use pkg-config instead everywhere

--- ydbcmake/CMakeDetermineMUMPSCompiler.cmake
+++ ydbcmake/CMakeDetermineMUMPSCompiler.cmake
@@ -51,25 +51,25 @@
 	HINTS $ENV{ydb_dist} $ENV{gtm_dist} ${PC_YOTTADB_INCLUDEDIR} )

 if(MUMPS_UTF8_MODE)
-  find_program(ICUCONFIG NAMES icu-config)
-  if(ICUCONFIG)
+  find_program(PKGCONFIG NAMES pkg-config)
+  if(PKGCONFIG)
     execute_process(
-      COMMAND ${ICUCONFIG} --version
+      COMMAND ${PKGCONFIG} --modversion icu-io
       OUTPUT_VARIABLE icu_version
       RESULT_VARIABLE icu_failed
       OUTPUT_STRIP_TRAILING_WHITESPACE
       )
     if(icu_failed)
-      message(FATAL_ERROR "Command\n ${ICUCONFIG} --version\nfailed (${icu_failed}).")
+      message(FATAL_ERROR "Command\n ${PKGCONFIG} --modversion icu-io\nfailed (${icu_failed}).")
     elseif("x${icu_version}" MATCHES "^x([0-9]+\\.[0-9]+)")
       set(ydb_icu_version "${CMAKE_MATCH_1}")
     else()
-      message(FATAL_ERROR "Command\n ${ICUCONFIG} --version\nproduced unrecognized output:\n ${icu_version}")
+      message(FATAL_ERROR "Command\n ${PKGCONFIG} --modversion icu-io\nproduced unrecognized output:\n ${icu_version}")
     endif()
   else()
-    message(FATAL_ERROR "Unable to find 'icu-config'.  Set ICUCONFIG in CMake cache.")
+    message(FATAL_ERROR "Unable to find 'pkg-config'.  Set PKGCONFIG in CMake cache.")
   endif()
-
+
   find_program(LOCALECFG NAMES locale)
   if(LOCALECFG)
     execute_process(


Made CPUNameTest.cmake more robust

Made CPUNameTest.cmake more robust

--- sofa-platform/src/main/cpp/CMakeModules/CPUNameTest.cmake
+++ sofa-platform/src/main/cpp/CMakeModules/CPUNameTest.cmake
@@ -17,26 +17,31 @@
 # You should have received a copy of the GNU General Public License
 # along with Milkyway@Home.  If not, see <http://www.gnu.org/licenses/>.
 #
+# Simon Billemont; Modified to handle empty CMAKE_SYSTEM_PROCESSOR

-# CMAKE_SYSTEM_PROCESSOR is unfortunately still i386 on 64 bit OS X
-if(    ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386"
-    OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i486"
-    OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i586"  # This is stupid
-    OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i686"
-    OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86"
-    OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64"
-    OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "amd64")
-  set(SYSTEM_IS_X86 TRUE CACHE INTERNAL "Is x86")
+if (DEFINED ${CMAKE_SYSTEM_PROCESSOR})
+	# CMAKE_SYSTEM_PROCESSOR is unfortunately still i386 on 64 bit OS X
+	if(    ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386"
+		OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i486"
+		OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i586"  # This is stupid
+		OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i686"
+		OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86"
+		OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64"
+		OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "amd64")
+	  set(SYSTEM_IS_X86 TRUE CACHE INTERNAL "Is x86")
+	else()
+	  set(SYSTEM_IS_X86 FALSE CACHE INTERNAL "Is not x86")
+	endif()
+	if(    ${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc"
+		OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
+	  set(SYSTEM_IS_PPC TRUE CACHE INTERNAL "Is PPC")
+	else()
+	  set(SYSTEM_IS_PPC FALSE CACHE INTERNAL "Is PPC")
+	endif()
 else()
-  set(SYSTEM_IS_X86 FALSE CACHE INTERNAL "Is x86")
-endif()
-
-
-if(    ${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc"
-    OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
-  set(SYSTEM_IS_PPC TRUE CACHE INTERNAL "Is PPC")
-else()
-  set(SYSTEM_IS_PPC FALSE CACHE INTERNAL "Is PPC")
+	message(STATUS "CMAKE_SYSTEM_PROCESSOR is empty, asuming SYSTEM_IS_X86")
+	set(SYSTEM_IS_X86 TRUE  CACHE INTERNAL "Is x86")
+	set(SYSTEM_IS_PPC FALSE CACHE INTERNAL "Is PPC")
 endif()

 # FIXME: This seems to not be set on windows
@@ -57,8 +62,3 @@
 if(SYSTEM_IS_X86 AND SYSTEM_IS_32)
   set(SYSTEM_IS_X86_32 TRUE CACHE INTERNAL "Is 32-bit x86")
 endif()
-
-
-
-
-


hwloc finder fix

hwloc finder fix

--- Findhwloc.cmake
+++ Findhwloc.cmake
@@ -22,7 +22,7 @@
 endif()

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


minor fix

minor fix

--- Examples/Examples.cmake
+++ Examples/Examples.cmake
@@ -234,8 +234,8 @@
 			install(TARGETS mexMTF2
 			RUNTIME DESTINATION ${MTF_MEX_INSTALL_DIR}
 			LIBRARY DESTINATION ${MTF_MEX_INSTALL_DIR}
-			COMPONENT mex)
-			add_custom_target(mex DEPENDS mexMTF2)
+			COMPONENT mex2)
+			add_custom_target(mex2 DEPENDS mexMTF2)
 			if(NOT WIN32)
 				add_custom_target(install_mex2
 				  ${CMAKE_COMMAND}


Use _INCLUDE_DIRS as project header variable name

--- template-config.cmake
+++ template-config.cmake
@@ -10,14 +10,14 @@
 # TEMPLATE_DIR -> <PROJECT_NAME>_DIR
 # TEMPLATE_FOUND -> <PROJECT_NAME>_FOUND
 # TEMPLATE_LIBRARIES -> <PROJECT_NAME>_LIBRARIES
-# TEMPLATE_INCLUDES -> <PROJECT_NAME>_INCLUDES
+# TEMPLATE_INCLUDE_DIRS -> <PROJECT_NAME>_INCLUDE_DIRS

 # TEMPLATE_FIBLIB_LIBRARY -> <PROJECT_NAME>_<...>_LIBRARY
 # TEMPLATE_FIBLIB_LIBRARY_RELEASE -> <PROJECT_NAME>_<...>_LIBRARY_RELEASE
 # TEMPLATE_FIBLIB_LIBRARY_DEBUG -> <PROJECT_NAME>_<...>_LIBRARY_DEBUG
 # TEMPLATE_FIBLIB_INCLUDE_DIR -> <PROJECT_NAME>_<...>_INCLUDE_DIR

-set(TEMPLATE_INCLUDES "")
+set(TEMPLATE_INCLUDE_DIRS "")
 set(TEMPLATE_LIBRARIES "")

 # Definition of function "find" with two mandatory arguments, "LIB_NAME" and "HEADER".
@@ -71,7 +71,7 @@
         set(${LIB_NAME_UPPER}_LIBRARY ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
     endif()

-    list(APPEND TEMPLATE_INCLUDES ${${LIB_NAME_UPPER}_INCLUDE_DIR})
+    list(APPEND TEMPLATE_INCLUDE_DIRS ${${LIB_NAME_UPPER}_INCLUDE_DIR})
     list(APPEND TEMPLATE_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY})

     # DEBUG MESSAGES
@@ -121,8 +121,8 @@

 # DEBUG
-# message("TEMPLATE_INCLUDES  = ${TEMPLATE_INCLUDES}")
+# message("TEMPLATE_INCLUDE_DIRS  = ${TEMPLATE_INCLUDE_DIRS}")
 # message("TEMPLATE_LIBRARIES = ${TEMPLATE_LIBRARIES}")

-find_package_handle_standard_args(TEMPLATE DEFAULT_MSG TEMPLATE_LIBRARIES TEMPLATE_INCLUDES)
+find_package_handle_standard_args(TEMPLATE DEFAULT_MSG TEMPLATE_LIBRARIES TEMPLATE_INCLUDE_DIRS)
 mark_as_advanced(TEMPLATE_FOUND)


Change warnings to work with NMake

Change warnings to work with NMake

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -118,8 +118,7 @@

             # MSVC compiler defines
             $<$<CXX_COMPILER_ID:MSVC>:/EHsc>
-            $<$<CXX_COMPILER_ID:MSVC>:/W4>
-            $<$<CXX_COMPILER_ID:MSVC>:/wd"4324">
+            $<$<CXX_COMPILER_ID:MSVC>:/wd4324>

             # G++ and Clang++ compiler defines
             $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall>
@@ -290,6 +289,10 @@

 astcenc_set_properties(${ASTC_TARGET}-static)

+    target_compile_options(${ASTC_TARGET}-static
+        PRIVATE
+            $<$<CXX_COMPILER_ID:MSVC>:/W4>)
+
 if(${CLI})
     astcenc_set_properties(${ASTC_TARGET})


ENH: update BoneEnhancement remote module

Some of the filters are now streamable,
greatly reducing main filter's memory consumption.

--- Modules/Remote/BoneEnhancement.remote.cmake
+++ Modules/Remote/BoneEnhancement.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(BoneEnhancement
   "Various filters for enhancing cortical bones in quantitative computed tomography."
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBoneEnhancement.git
-  GIT_TAG 22bfcc50561c174fd5942e6ea817a54fff89b6f3
+  GIT_TAG 872ac188933b44ee84986e984ce73d53c2c4ef5f
 )


shield: cmake: adjust if(EXISTS <shield>.conf) to check for right file

Fixes: #32269

This commit is a followup to #31877 where the `${shield_dir}/${s_dir}`
was adjusted to `${SHIELD_DIR_${s}}` to ensure only including shields
and not boards in list of known shields.

An `if(EXISTS ${shield_dir}/${s_dir}...)` was missed in this process
which causes #32269. This is corrected in this commit.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -349,7 +349,7 @@
         )

       # search for shield/shield.conf file
-      if(EXISTS ${shield_dir}/${s_dir}/${s}.conf)
+      if(EXISTS ${SHIELD_DIR_${s}}/${s}.conf)
         # add shield.conf to the shield config list
         list(APPEND
           shield_conf_files


Unity opensource: Fixed build issue with nanopb on kokoro windows

PiperOrigin-RevId: 271606877

--- cmake/external/nanopb.cmake
+++ cmake/external/nanopb.cmake
@@ -22,8 +22,8 @@
   nanopb

   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
-  URL https://github.com/nanopb/nanopb/archive/nanopb-0.3.9.1.tar.gz
-  URL_HASH SHA256=67460d0c0ad331ef4d5369ad337056d0cd2f900c94887628d287eb56c69324bc
+  URL https://github.com/nanopb/nanopb/archive/0.3.9.2.tar.gz
+  URL_HASH SHA256=b8dd5cb0d184d424ddfea13ddee3f7b0920354334cbb44df434d55e5f0086b12

   PREFIX ${PROJECT_BINARY_DIR}


build: remove exec bit on cmake file (#116)

libtuv-DCO-1.0-Signed-off-by: Philippe Coval p.coval@samsung.com


Fix RPM prefix.

Fix RPM prefix.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -67,7 +67,7 @@
 #ENDIF()

 IF(UNIX)
-  IF(INSTALL_LAYOUT MATCHES "UNIX")
+  IF(INSTALL_LAYOUT MATCHES "RPM")
     SET(default_prefix "/usr")
   ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
     SET(default_prefix "/opt/mysql/mysql")


added boost 1.48 and 1.49 to the mix

added boost 1.48 and 1.49 to the mix

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -8,7 +8,7 @@
 if(${CMAKE_VERSION} VERSION_LESS 2.8.5)
   SET(Boost_ADDITIONAL_VERSIONS "1.43" "1.43.0" "1.44" "1.44.0" "1.45" "1.45.0" "1.46.1" "1.46.0" "1.46" "1.47" "1.47.0")
 else(${CMAKE_VERSION} VERSION_LESS 2.8.5)
-  SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0")
+  SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0" "1.48" "1.48.0" "1.49" "1.49.0")
 endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)

 # Disable the config mode of find_package(Boost)


Use installed version 2 of TBB libs, fixes #93

--- common/cmake/embree-config-linux.cmake
+++ common/cmake/embree-config-linux.cmake
@@ -21,8 +21,8 @@
 SET(EMBREE_USE_PACKAGED_TBB @EMBREE_ZIP_MODE@)

 IF (${EMBREE_TASKING_TBB} AND ${EMBREE_USE_PACKAGED_TBB})
-  SET(EMBREE_TBB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/../../@CMAKE_SHARED_LIBRARY_PREFIX@tbb@CMAKE_SHARED_LIBRARY_SUFFIX@)
-  SET(EMBREE_TBB_LIBRARY_MALLOC ${CMAKE_CURRENT_LIST_DIR}/../../@CMAKE_SHARED_LIBRARY_PREFIX@tbbmalloc@CMAKE_SHARED_LIBRARY_SUFFIX@)
+  SET(EMBREE_TBB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/../../@CMAKE_SHARED_LIBRARY_PREFIX@tbb@CMAKE_SHARED_LIBRARY_SUFFIX@.2)
+  SET(EMBREE_TBB_LIBRARY_MALLOC ${CMAKE_CURRENT_LIST_DIR}/../../@CMAKE_SHARED_LIBRARY_PREFIX@tbbmalloc@CMAKE_SHARED_LIBRARY_SUFFIX@.2)
 ELSE()
   SET(EMBREE_USE_PACKAGED_TBB OFF)
   UNSET(EMBREE_TBB_LIBRARY)


Cmake: fix copy/paste error

Cmake: fix copy/paste error

--- source/cmake_modules/FindProtoc.cmake
+++ source/cmake_modules/FindProtoc.cmake
@@ -10,7 +10,7 @@

 if(PROTOC_EXECUTABLE)
     set(PROTOC_FOUND TRUE)
-    if(NOT LOG4CPLUS_FIND_QUIETLY)
+    if(NOT PROTOC_FIND_QUIETLY)
         message(STATUS "Found protoc: ${PROTOC_EXECUTABLE}")
     endif()
 else()


Added a flag so that MinGW GCC would throw warnings for non-void functions not returning a value.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -22,6 +22,10 @@
   set(CURRENT_TARGET ${target})
   if (NOT "${PROJECT_NAME}" STREQUAL ${target})
     add_project(${target})
+  endif ()
+
+  if (MINGW)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wreturn-type")
   endif ()

   if ("${ARGN}" STREQUAL "")


FIX: test case counting

FIX: test case counting

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -1017,10 +1017,12 @@
 			if is_skipped_module_test $TEST $TARGET; then
 				continue;
 			fi
-			if [ "x$CONFIG_ARG" = "x" ]; then
+			if [ "$CONFIG_ARG" != "" ]; then
+				CONFIG=$CONFIG_ARG
+			elif [ $CONFIG_ALL -eq 1 ]; then
 				CONFIG=$(generate_translation_configurations $TARGET)
 			else
-				CONFIG=$CONFIG_ARG
+				CONFIG=$DEFAULT_CONFIG
 			fi
 			num=$((num + $(echo $CONFIG | wc -w)))
 		done


[Build] Suppressed wrong end-of-lines.

[Build] Suppressed wrong end-of-lines.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1280,9 +1280,7 @@

   # Convenient message to the user/developer
   if (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)
-    install (CODE "message (\"On Unix-based platforms, run "
-	  "export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH "
-	  "once per session\")")
+    install (CODE "message (\"On Unix-based platforms, run export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH once per session\")")
   endif (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)

 endmacro (module_library_add_standard)


BUG: update expat version in Superbuild (security issue)

--- SuperBuild/CMake/External_expat.cmake
+++ SuperBuild/CMake/External_expat.cmake
@@ -24,8 +24,8 @@

 ExternalProject_Add(EXPAT
   PREFIX EXPAT
-  URL "http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz"
-  URL_MD5 dd7dab7a5fea97d2a6a43f511449b7cd
+  URL "http://downloads.sourceforge.net/project/expat/expat/2.3.0/expat-2.3.0.tar.gz"
+  URL_MD5 fb89c9a3dcc1e00e0fe0d0200af692dc
   BINARY_DIR ${EXPAT_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


Fix OpenMP compilation on Mac OS X

Fix OpenMP compilation on Mac OS X

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

--- CMake/hoomd/HOOMDCFlagsSetup.cmake
+++ CMake/hoomd/HOOMDCFlagsSetup.cmake
@@ -61,14 +61,13 @@
 endif(NOT PASSED_FIRST_CONFIGURE)

 # add openmp compile option to the flags
-if(NOT APPLE)
 find_package(OpenMP)
 if (ENABLE_OPENMP AND OPENMP_FOUND)
     # these changes unfortunately don't make it into the cache, but the user doesn't really need to see it, they can control it with the ENABLE_OPENMP option
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+    list(APPEND CMAKE_EXE_LINKER_FLAGS ${OpenMP_CXX_FLAGS})
 endif (ENABLE_OPENMP AND OPENMP_FOUND)
-endif(NOT APPLE)

 # disable crazy windows warnings
 if (WIN32)


Create short revision ID for git repositories

--- CMake/mitkFunctionGetVersion.cmake
+++ CMake/mitkFunctionGetVersion.cmake
@@ -69,6 +69,11 @@

   set(${prefix}_WC_TYPE ${_wc_type} PARENT_SCOPE)
   set(${prefix}_REVISION_ID ${_wc_id} PARENT_SCOPE)
+  set(_shortid ${_wc_id})
+  if(_wc_type STREQUAL "git")
+    string(SUBSTRING ${_shortid} 0 8 _shortid)
+  endif()
+  set(${prefix}_REVISION_SHORTID ${_shortid} PARENT_SCOPE)
   set(${prefix}_REVISION_NAME ${_wc_name} PARENT_SCOPE)

   # For backwards compatibility


Removed the Found OpenThreads message

Removed the Found OpenThreads message

git-svn-id: 23b6355f2bb369032457de4eb5f713ee134f73a8@6424 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/FindOpenThreads.cmake
+++ CMakeModules/FindOpenThreads.cmake
@@ -77,8 +77,8 @@

 SET(OPENTHREADS_FOUND "NO")
 IF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY)
-	SET(OPENTHREADS_FOUND "YES")
-  MESSAGE("-- Found OpenThreads: "${OPENTHREADS_LIBRARY})
+  SET(OPENTHREADS_FOUND "YES")
+  # MESSAGE("-- Found OpenThreads: "${OPENTHREADS_LIBRARY})
   IF(NOT OPENTHREADS_LIBRARY_DEBUG)
   	MESSAGE("-- Warning Debug OpenThreads not found, using: ${OPENTHREADS_LIBRARY}")
   	SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}")


Update: rely on find_package_handle_standard_args for message printing
NM: renice a bit

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

--- cmake/Modules/Findlibusb-1.0.cmake
+++ cmake/Modules/Findlibusb-1.0.cmake
@@ -11,6 +11,9 @@
 #  Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
 #
 #  (Changes for libusb) Copyright (c) 2008 Kyle Machulis <kyle@nonpolynomial.com>
+#
+#  Point Cloud Library (PCL) - www.pointclouds.org
+#  Copyright (c) 2012, Willow Garage, Inc. (use of FindPackageHandleStandardArgs)
 #
 # Redistribution and use is allowed according to the terms of the New BSD license.
 #
@@ -42,57 +45,26 @@
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #

-
 if (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
   # in cache already
   set(LIBUSB_FOUND TRUE)
+  set(LIBUSB_1_FOUND TRUE)
 else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
   find_path(LIBUSB_1_INCLUDE_DIR
-    NAMES
-	libusb-1.0/libusb.h
-    PATHS
-      /usr/include
-      /usr/local/include
-      /opt/local/include
-      /sw/include
-	PATH_SUFFIXES
-	  libusb-1.0
-  )
+            NAMES libusb-1.0/libusb.h
+	    PATHS /usr/include /usr/local/include /opt/local/include /sw/include
+	    PATH_SUFFIXES libusb-1.0)

   find_library(LIBUSB_1_LIBRARY
-    NAMES
-      usb-1.0
-    PATHS
-      /usr/lib
-      /usr/local/lib
-      /opt/local/lib
-      /sw/lib
-  )
+               NAMES usb-1.0
+	       PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib)

-  set(LIBUSB_1_INCLUDE_DIRS
-    ${LIBUSB_1_INCLUDE_DIR}
-  )
-  set(LIBUSB_1_LIBRARIES
-    ${LIBUSB_1_LIBRARY}
-)
+  set(LIBUSB_1_INCLUDE_DIRS ${LIBUSB_1_INCLUDE_DIR})
+  set(LIBUSB_1_LIBRARIES ${LIBUSB_1_LIBRARY})

-  if (LIBUSB_1_INCLUDE_DIRS AND LIBUSB_1_LIBRARIES)
-     set(LIBUSB_1_FOUND TRUE)
-  endif (LIBUSB_1_INCLUDE_DIRS AND LIBUSB_1_LIBRARIES)
-
-  if (LIBUSB_1_FOUND)
-    if (NOT libusb_1_FIND_QUIETLY)
-      message(STATUS "Found libusb-1.0:")
-	  message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}")
-	  message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}")
-    endif (NOT libusb_1_FIND_QUIETLY)
-  else (LIBUSB_1_FOUND)
-    if (libusb_1_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find libusb")
-    endif (libusb_1_FIND_REQUIRED)
-  endif (LIBUSB_1_FOUND)
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(LIBUSB_1 DEFAULT_MSG LIBUSB_1_LIBRARY LIBUSB_1_INCLUDE_DIR)

   # show the LIBUSB_1_INCLUDE_DIRS and LIBUSB_1_LIBRARIES variables only in the advanced view
   mark_as_advanced(LIBUSB_1_INCLUDE_DIRS LIBUSB_1_LIBRARIES)
-
-endif (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)+endif (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)


Fix LCB_VERSION_HEX rendering when components > 10

Change-Id: I1bdc5632ef84ac99422ca07667926d7c6e4b2e7e
Reviewed-on: http://review.couchbase.org/c/libcouchbase/+/144124
Reviewed-by: Chris Hillery <cfae542fe86c678840b344434ba21c8613a98bd2@couchbase.com>
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>

--- cmake/Modules/GetVersionInfo.cmake
+++ cmake/Modules/GetVersionInfo.cmake
@@ -48,7 +48,9 @@
     SET(LCB_VERSION_CHANGESET "0xdeadbeef")
 ENDIF()
 IF (NOT LCB_VERSION_HEX)
-    SET(LCB_VERSION_HEX "0x0${libcouchbase_VERSION_MAJOR}0${libcouchbase_VERSION_MINOR}0${libcouchbase_VERSION_PATCH}")
+    MATH(EXPR LCB_VERSION_HEX
+         "${libcouchbase_VERSION_MAJOR} * 0x10000 + ${libcouchbase_VERSION_MINOR} * 0x100 + ${libcouchbase_VERSION_PATCH}"
+         OUTPUT_FORMAT HEXADECIMAL)
 ENDIF()

 # Now parse the version string


Always use 10 characters abbreviation of SHA1 in version

Change-Id: I34957de48cb222fef30866b102183b822dacbaa2
Reviewed-on: http://review.couchbase.org/100230
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>
Tested-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GetVersionInfo.cmake
+++ cmake/Modules/GetVersionInfo.cmake
@@ -17,7 +17,7 @@
 ENDMACRO()

 if (GIT_EXECUTABLE AND NOT LCB_SKIP_GIT_VERSION)
-    RUNGIT(LCB_REVDESCRIBE describe --long)
+    RUNGIT(LCB_REVDESCRIBE describe --long --abbrev=10)
     RUNGIT(LCB_VERSION describe)
     STRING(REPLACE "-" "_" LCB_VERSION "${LCB_VERSION}")
     MESSAGE(STATUS "Sanitized VERSION=${LCB_VERSION}")


Fix CLI script name on Windows

Fix CLI script name on Windows

--- cmake/Modules/SampPluginTest.cmake
+++ cmake/Modules/SampPluginTest.cmake
@@ -48,7 +48,12 @@

 	file(READ "${ARG_OUT_FILE}" out)

-	add_test(${name} "samp-server-cli" ${arguments})
+	if(WIN32)
+		add_test(${name} "samp-server-cli.bat" ${arguments})
+	else()
+		add_test(${name} "samp-server-cli" ${arguments})
+	endif()
+
 	set_tests_properties(${name} PROPERTIES
 		ENVIRONMENT "AMX_PATH=${CMAKE_CURRENT_SOURCE_DIR}/${name}"
 		PASS_REGULAR_EXPRESSION "${out}"


Do not force -O2 flag in hardening-enabled builds

--- cmake/OpenCVCompilerDefenses.cmake
+++ cmake/OpenCVCompilerDefenses.cmake
@@ -87,11 +87,3 @@
 set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OPENCV_LINKER_DEFENSES_FLAGS_COMMON}" )
 set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${OPENCV_LINKER_DEFENSES_FLAGS_COMMON}" )
 set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENCV_LINKER_DEFENSES_FLAGS_COMMON}" )
-
-if(CV_GCC OR CV_CLANG)
-  foreach(flags
-          CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG
-          CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
-    string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
-  endforeach()
-endif()


Add a cmake warning when gfortran version is not detected (#173)

--- cmake/OpenfastFortranOptions.cmake
+++ cmake/OpenfastFortranOptions.cmake
@@ -49,11 +49,13 @@
   # Verify proper compiler versions are available
   # see https://github.com/OpenFAST/openfast/issues/88
   if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
-    if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "4.6.0")
-      message(FATAL_ERROR "A version of GNU GFortran greater than 4.6.0 is required. GFortran version detected by CMake: ${CMAKE_Fortran_COMPILER_VERSION}.")
+    if("${CMAKE_Fortran_COMPILER_VERSION}" STREQUAL "")
+        message(WARNING "A version of GNU GFortran greater than 4.6.0 is required but CMake could not detect your GFortran version.")
+    elseif("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "4.6.0")
+        message(FATAL_ERROR "A version of GNU GFortran greater than 4.6.0 is required. GFortran version detected by CMake: ${CMAKE_Fortran_COMPILER_VERSION}.")
     endif()
   elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
-    if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "11")
+    if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "11")
       message(FATAL_ERROR "A version of Intel ifort greater than 11 is required. ifort version detected by CMake: ${CMAKE_Fortran_COMPILER_VERSION}.")
     endif()
   endif()


Updated eprosima_libraries.cmake

Updated eprosima_libraries.cmake

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -21,7 +21,9 @@
             set(EPROSIMA_PACKAGE_EXTERNAL_DIR "" CACHE PATH "External directory to compile eprosima libraries")
             set(${package}ExternalDir ${PROJECT_BINARY_DIR}/external/${package})

-            if(NOT "${EPROSIMA_PACKAGE_EXTERNAL_DIR}" STREQUAL "")
+            if("${EPROSIMA_PACKAGE_EXTERNAL_DIR}" STREQUAL "")
+                set(EPROSIMA_PACKAGE_EXTERNAL_DIR ${PROJECT_BINARY_DIR}/external)
+            else()
                 set(${package}ExternalDir ${EPROSIMA_PACKAGE_EXTERNAL_DIR}/${package})
             endif()

@@ -65,7 +67,6 @@
                     "\${CMAKE_CXX_COMPILER_}"
                     "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS_}"
                     "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS_}"
-                    ${BUILD_OPTION}
                     ${ANDROID_BUILD_OPTIONS}
                     "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
                     "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}"
@@ -77,6 +78,7 @@
                     "-DLICENSE_INSTALL_DIR:PATH=licenses"
                     "\${CMAKE_INSTALL_PREFIX_}"
                     "\${CMAKE_PREFIX_PATH_}"
+                    "\${EPROSIMA_PACKAGE_EXTERNAL_DIR_}"
                     )
                 list(APPEND ${package}_CMAKE_ARGS LIST_SEPARATOR "|")

@@ -90,6 +92,7 @@
                     "set(CMAKE_PREFIX_PATH_ -DCMAKE_PREFIX_PATH=\"${CMAKE_PREFIX_PATH_}\")\n"
                     "set(CMAKE_C_COMPILER_ \"-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}\")\n"
                     "set(CMAKE_CXX_COMPILER_ \"-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}\")\n"
+                    "set(EPROSIMA_PACKAGE_EXTERNAL_DIR_ \"-DEPROSIMA_PACKAGE_EXTERNAL_DIR:PATH=${EPROSIMA_PACKAGE_EXTERNAL_DIR}\")\n"
                     "ExternalProject_Add(${package}\n"
                     "CONFIGURE_COMMAND \"${CMAKE_COMMAND}\"\n"
                     "${${package}_CMAKE_ARGS}\n"
@@ -100,9 +103,12 @@
                     ")\n"
                     "install(CODE \"file(WRITE install.txt \\\"Installation completed\\\")\")\n")

+                if(NOT "$ENV{CMAKE_MAKEFLAGS}" STREQUAL "")
+                    set(ENV{MAKEFLAGS} "$ENV{CMAKE_MAKEFLAGS}")
+                endif()
+
                 execute_process(COMMAND ${CMAKE_COMMAND}
                     -G ${CMAKE_GENERATOR}
-                    ${BUILD_OPTION}
                     ${ANDROID_BUILD_OPTIONS}
                     WORKING_DIRECTORY ${${package}ExternalDir}
                     RESULT_VARIABLE EXECUTE_RESULT


Drop -fvisibility=hidden option from both CFLAGS and CXXFLAGS.  This
solved a build issue where I happened to have those flags enabled.

Tested by Alan W. Irwin <airwin@users.sourceforge.net> on Linux using
build_wxwidgets target for epa_build project.

svn path=/trunk/; revision=12788

--- cmake/epa_build/wxwidgets/bp.cmake
+++ cmake/epa_build/wxwidgets/bp.cmake
@@ -47,18 +47,24 @@
   # memory with MinGW.  See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601
   # for discussion of this.  Apparently the issue was fixed for
   # MinGW-4.6, but it appears to be back for 4.7.2.
-  set(${BP_PACKAGE}_SET_CXXFLAGS "CXXFLAGS=-fno-keep-inline-dllexport")
+  set(${BP_PACKAGE}_SET_CXXFLAGS "CXXFLAGS=-fno-keep-inline-dllexport $ENV{CXXFLAGS}")
 else(MSYS_PLATFORM)
   set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
-  set(${BP_PACKAGE}_SET_CXXFLAGS)
+  set(${BP_PACKAGE}_SET_CXXFLAGS "CXXFLAGS=$ENV{CXXFLAGS}")
 endif(MSYS_PLATFORM)
 #message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}")
+
+# Drop -fvisibility=hidden since that option does not work for this package.
+string(REGEX REPLACE "-fvisibility=hidden" "" ${BP_PACKAGE}_SET_CFLAGS "${${BP_PACKAGE}_SET_CFLAGS}")
+string(REGEX REPLACE "-fvisibility=hidden" "" ${BP_PACKAGE}_SET_CXXFLAGS "${${BP_PACKAGE}_SET_CXXFLAGS}")

 ExternalProject_Add(
   build_${BP_PACKAGE}
   URL ${${BP_PACKAGE}_URL}
   URL_MD5 ${${BP_PACKAGE}_URL_MD5}
-  CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CXXFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND} --enable-shared --enable-unicode --enable-debug --enable-debug_gdb
+  CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} ${${BP_PACKAGE}_SET_CXXFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND} --enable-shared --enable-unicode --enable-debug --enable-debug_gdb
   BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
   INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install
   )


Fix include paths

Fix include paths

--- cmake/modules/FindKTelepathy.cmake
+++ cmake/modules/FindKTelepathy.cmake
@@ -22,7 +22,6 @@
 find_path(KTELEPATHY_INCLUDE_DIR
   NAMES KTelepathy/presence.h
   PATHS ${KDE4_INCLUDE_DIR}
-  PATH_SUFFIXES telepathy-1.0
 )

 find_library(KTELEPATHY_LIBRARIES NAMES telepathykdecommoninternalsprivate )


More graceful method of dealing with missing *.rc.in template file so that
only the run-time check using the test_dyndrivers target shows there is an
issue.

svn path=/trunk/; revision=9722

--- cmake/modules/drivers-finish.cmake
+++ cmake/modules/drivers-finish.cmake
@@ -39,10 +39,13 @@
     endforeach(DRIVER_IN_LIST ${DRIVERS_LIST})
     if(APPEND_DRIVER)
       if(ENABLE_DYNDRIVERS)
-        file(STRINGS
-	  ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}.rc.in
-	  ${DRIVER}_INFO
-	  )
+      	set(${DRIVER}_INFO)
+	if(EXISTS ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}.rc.in)
+          file(STRINGS
+  	    ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}.rc.in
+	    ${DRIVER}_INFO
+	    )
+	endif(EXISTS ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}.rc.in)
       endif(ENABLE_DYNDRIVERS)
       set(DRIVERS_LIST ${DRIVERS_LIST} ${DRIVER})
       if(DRIVER STREQUAL "wxwidgets")


spdlog: SPDLOG_BUILD_EXAMPLE=OFF

spdlog: SPDLOG_BUILD_EXAMPLE=OFF

--- cmake/projects/spdlog/hunter.cmake
+++ cmake/projects/spdlog/hunter.cmake
@@ -113,6 +113,7 @@
     CMAKE_ARGS
         SPDLOG_EXTERNAL_TOOLCHAIN=ON # tell spdlog not to modify cxxflags
         SPDLOG_BUILD_EXAMPLES=OFF
+        SPDLOG_BUILD_EXAMPLE=OFF
         SPDLOG_BUILD_TESTING=OFF
         SPDLOG_BUILD_TESTS=OFF
         SPDLOG_BUILD_BENCH=OFF


refs #5368 make conditions for running helgrind/drd more explicit

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

--- cmake_modules/TokuSetupCTest.cmake
+++ cmake_modules/TokuSetupCTest.cmake
@@ -92,13 +92,12 @@

   include(CMakeDependentOption)
   set(helgrind_drd_depend_conditions "")
-  ## helgrind and drd are bad at dealing with freebsd's pthreads
-  ## implementation, see pkg-message at
-  ## http://www.freebsdports.info/ports/devel/valgrind.html
-  list(APPEND helgrind_drd_depend_conditions "NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD")
-  ## supposedly it's bad on darwin too, don't have a link for that, maybe
-  ## worth re-checking
-  list(APPEND helgrind_drd_depend_conditions "NOT CMAKE_SYSTEM_NAME STREQUAL Darwin")
+  ## Helgrind and DRD explicitly state that they only run with the Linux
+  ## glibc-2.3 NPTL threading implementation [1,2].  If this ever changes
+  ## we can enable helgrind and drd on other systems.
+  ## [1]: http://valgrind.org/docs/manual/hg-manual.html#hg-manual.effective-use
+  ## [2]: http://valgrind.org/docs/manual/drd-manual.html#drd-manual.limitations
+  list(APPEND helgrind_drd_depend_conditions "CMAKE_SYSTEM_NAME STREQUAL Linux")
   ## no point doing it with gcov
   list(APPEND helgrind_drd_depend_conditions "NOT USE_GCOV")
   cmake_dependent_option(RUN_DRD_TESTS "Run some tests under drd." ON


turn off jemalloc debug mode for mysql builds, it's more than we need

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -6,7 +6,8 @@
   message(FATAL_ERROR "Can't find jemalloc sources.  Please check them out to ${JEMALLOC_SOURCE_DIR} or modify JEMALLOC_SOURCE_DIR.")
 endif ()
 set(jemalloc_configure_opts "CC=${CMAKE_C_COMPILER}" "--with-jemalloc-prefix=" "--with-private-namespace=tokudb_jemalloc_internal_" "--enable-cc-silence")
-if (NOT CMAKE_BUILD_TYPE MATCHES Release)
+option(JEMALLOC_DEBUG "Build jemalloc with --enable-debug." OFF)
+if (JEMALLOC_DEBUG)
   list(APPEND jemalloc_configure_opts --enable-debug)
 endif ()
 ExternalProject_Add(build_jemalloc


Use HDF5Group version of FFTW for Windows

Gadgetron copy seems no longer accessible

--- version_config.cmake
+++ version_config.cmake
@@ -34,10 +34,10 @@
 if(WIN32)
   # Just use precompiled version
   # TODO would prefer the next zip file but for KT using an ftp URL times-out (firewall?)
-  #set(${proj}_URL ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip )
-  #set(${proj}_MD5 cb3c5ad19a89864f036e7a2dd5be168c )
-  set(FFTW3_URL https://s3.amazonaws.com/install-gadgetron-vs2013/Dependencies/FFTW/zip/FFTW3.zip )
-  set(FFTW3_MD5 a42eac92d9ad06d7c53fb82b09df2b6e )
+  set(FFTW3_URL ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip )
+  set(FFTW3_MD5 cb3c5ad19a89864f036e7a2dd5be168c )
+  #set(FFTW3_URL https://s3.amazonaws.com/install-gadgetron-vs2013/Dependencies/FFTW/zip/FFTW3.zip )
+  #set(FFTW3_MD5 a42eac92d9ad06d7c53fb82b09df2b6e )
 else(WIN32)
   set(FFTW3_URL http://www.fftw.org/fftw-3.3.5.tar.gz )
   set(FFTW3_MD5 6cc08a3b9c7ee06fdd5b9eb02e06f569 )
@@ -68,7 +68,7 @@

 #Set the default versions for SIRF, STIR, Gadgetron and ISMRMRD
 # with devel build it uses latest version of upstream packages
-# otherwise uses the versions for SIRF 0.9
+# otherwise uses the versions for current SIRF

 set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/SIRF )
 if (DEVEL_BUILD)


build: fix pythonarchlib for non /usr installs

Conflicts:
	build/cmake/CondorConfigure.cmake

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -110,7 +110,7 @@
             set(PYTHON_QUERY_PART_08 "print(sysconfig.get_config_var('LIBDIR'));")
             set(PYTHON_QUERY_PART_09 "print(sysconfig.get_config_var('MULTIARCH'));")
             set(PYTHON_QUERY_PART_10 "print(sysconfig.get_config_var('LDLIBRARY'));")
-            set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib(1)[5:]);")
+            set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib(plat_specific=True, prefix=''));")

             set(PYTHON_QUERY_COMMAND "${PYTHON_QUERY_PART_01}${PYTHON_QUERY_PART_02}${PYTHON_QUERY_PART_03}${PYTHON_QUERY_PART_04}${PYTHON_QUERY_PART_05}${PYTHON_QUERY_PART_06}${PYTHON_QUERY_PART_07}${PYTHON_QUERY_PART_08}${PYTHON_QUERY_PART_09}${PYTHON_QUERY_PART_10}${PYTHON_QUERY_PART_11}")
             execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "${PYTHON_QUERY_COMMAND}"
@@ -160,7 +160,7 @@
             set(PYTHON_QUERY_PART_08 "print(sysconfig.get_config_var('LIBDIR'));")
             set(PYTHON_QUERY_PART_09 "print(sysconfig.get_config_var('MULTIARCH'));")
             set(PYTHON_QUERY_PART_10 "print(sysconfig.get_config_var('LDLIBRARY'));")
-            set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib(1)[5:]);")
+            set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib(plat_specific=True, prefix=''));")

             set(PYTHON_QUERY_COMMAND "${PYTHON_QUERY_PART_01}${PYTHON_QUERY_PART_02}${PYTHON_QUERY_PART_03}${PYTHON_QUERY_PART_04}${PYTHON_QUERY_PART_05}${PYTHON_QUERY_PART_06}${PYTHON_QUERY_PART_07}${PYTHON_QUERY_PART_08}${PYTHON_QUERY_PART_09}${PYTHON_QUERY_PART_10}${PYTHON_QUERY_PART_11}")
             execute_process(COMMAND "${PYTHON3_EXECUTABLE}" "-c" "${PYTHON_QUERY_COMMAND}"


Only add specific OpenCV search path for windows

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -86,7 +86,9 @@
   endif()

   if(OpenCV_DIR)
-    list(APPEND _dir_candidates "${OpenCV_LIB_PATH}/../bin")
+    if(WIN32)
+      list(APPEND _dir_candidates "${OpenCV_LIB_PATH}/../bin")
+    endif()
   endif()

   if(MITK_USE_Python)