added ROS kinetic

added ROS kinetic

--- config/FindROS.cmake
+++ config/FindROS.cmake
@@ -12,7 +12,7 @@
 #

-SET(AVAILABLE_ROS_VERSIONS "jade;indigo;hydro;groovy")
+SET(AVAILABLE_ROS_VERSIONS "jade;indigo;hydro;groovy;kinetic")

 IF(ROSDEPS)
 ELSE(ROSDEPS)


Enable setting -DURHO3D_SSE=1 on Emscripten, but leave it disabled by default.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -96,9 +96,15 @@
         set (URHO3D_DEFAULT_SSE TRUE)
     endif ()
 else ()
-    set (URHO3D_DEFAULT_SSE TRUE)
-endif ()
-cmake_dependent_option (URHO3D_SSE "Enable SSE instruction set (Intel platform only including Android on Intel Atom)" ${URHO3D_DEFAULT_SSE} "NOT ARM AND NOT EMSCRIPTEN" FALSE)
+    if (EMSCRIPTEN)
+        # In Emscripten, default to false for targeting SSE2, since the SIMD.js specification is not yet widely adopted in browsers.
+        set (URHO3D_DEFAULT_SSE FALSE)
+    else()
+        # In other platforms, we can safely default to enabling SSE2.
+        set (URHO3D_DEFAULT_SSE TRUE)
+    endif()
+endif ()
+cmake_dependent_option (URHO3D_SSE "Enable SSE instruction set (Intel platform only including Android on Intel Atom)" ${URHO3D_DEFAULT_SSE} "NOT ARM" FALSE)
 if (CMAKE_PROJECT_NAME STREQUAL Urho3D)
     cmake_dependent_option (URHO3D_LUAJIT_AMALG "Enable LuaJIT amalgamated build (LuaJIT only)" FALSE "URHO3D_LUAJIT" FALSE)
     cmake_dependent_option (URHO3D_SAFE_LUA "Enable Lua C++ wrapper safety checks (Lua/LuaJIT only)" FALSE "URHO3D_LUA OR URHO3D_LUAJIT" FALSE)


Pass the build dir of NiftyReg

Pass the build dir of NiftyReg

--- SuperBuild/External_SIRF.cmake
+++ SuperBuild/External_SIRF.cmake
@@ -84,6 +84,7 @@
         -DPYTHON_LIBRARY=${PYTHON_LIBRARIES}
         -DPYTHON_DEST_DIR=${PYTHON_DEST_DIR}
         -DPYTHON_STRATEGY=${PYTHON_STRATEGY}
+        -DNiftyReg_Binary_DIR=${NiftyReg_Binary_DIR}
 	INSTALL_DIR ${SIRF_Install_Dir}
     DEPENDS
         ${${proj}_DEPENDENCIES}


Removed execution of tests after install

Tests in the SIRF tree cannot be run during compilation phase because
one must ensure that Gadgetron is running. It seems that this involves too
much effort, so we leave it to a manual step.

--- SuperBuild/External_SIRF.cmake
+++ SuperBuild/External_SIRF.cmake
@@ -82,7 +82,7 @@
 	INSTALL_DIR ${SIRF_Install_Dir}
     DEPENDS
         ${${proj}_DEPENDENCIES}
-    TEST_AFTER_INSTALL 1
+    TEST_AFTER_INSTALL 0
   )

     set(SIRF_ROOT        ${SIRF_SOURCE_DIR})


Added search for additional optional MSP libs in cmake find.

--- cmake/CMakeModules/FindMSP.cmake
+++ cmake/CMakeModules/FindMSP.cmake
@@ -6,22 +6,18 @@

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

-macro(FIND_MSP_LIBRARY LIBS_OK MYLIBRARYNAME)
-  if (LIBS_OK)
-     find_library( TARGET_LIBRARY_${MYLIBRARYNAME}
-        NAMES "${MYLIBRARYNAME}"
-        PATHS
+function(FIND_MSP_LIBRARY LIBNAME LIBSOK)
+  find_library( TARGET_LIBRARY_${LIBNAME} NAMES "${LIBNAME}" PATHS
         $ENV{MSP_HOME}/lib
         /usr/lib64
         /usr/lib
         /usr/local/lib )
-     if (TARGET_LIBRARY_${MYLIBRARYNAME})
-         set (MSP_LIBRARIES ${MSP_LIBRARIES} ${TARGET_LIBRARY_${MYLIBRARYNAME}})
-     else()
-       set(LIBS_OK "NO")
-     endif()
-   endif()
-endmacro(FIND_MSP_LIBRARY LIBS_OK MYLIBRARYNAME)
+  if (TARGET_LIBRARY_${LIBNAME})
+    set (MSP_LIBRARIES ${MSP_LIBRARIES} ${TARGET_LIBRARY_${LIBNAME}})
+  else()
+    set(${LIBSOK} "NO" PARENT_SCOPE)
+  endif()
+endfunction(FIND_MSP_LIBRARY)

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

@@ -49,57 +45,61 @@
                         ${MSP_INCLUDE_DIRS}/common/dtcc
                         ${MSP_INCLUDE_DIRS}/common/csm)
   set(LIBS_OK "YES")
-  FIND_MSP_LIBRARY(LIBS_OK MSPPointExtractionService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPSensorModelService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPSourceSelectionService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPCovarianceService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPSupportDataService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPTerrainService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPCCSUtils)
-  FIND_MSP_LIBRARY(LIBS_OK MSPCoordinateConversionService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPOutputMethodService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPasdetre)
-  FIND_MSP_LIBRARY(LIBS_OK MSPcoordconverter)
-  FIND_MSP_LIBRARY(LIBS_OK MSPcsisd)
-  FIND_MSP_LIBRARY(LIBS_OK MSPcsm)
-  FIND_MSP_LIBRARY(LIBS_OK MSPcsmutil)
-  FIND_MSP_LIBRARY(LIBS_OK MSPdtcc)
-  FIND_MSP_LIBRARY(LIBS_OK MSPlas)
-  FIND_MSP_LIBRARY(LIBS_OK MSPgeometry)
-  FIND_MSP_LIBRARY(LIBS_OK MSPmath)
-  FIND_MSP_LIBRARY(LIBS_OK MSPnitf)
-  FIND_MSP_LIBRARY(LIBS_OK MSPntmtre)
-  FIND_MSP_LIBRARY(LIBS_OK MSPrage)
-  FIND_MSP_LIBRARY(LIBS_OK MSPRageServiceUtils)
-  FIND_MSP_LIBRARY(LIBS_OK MSPrageutilities)
-  FIND_MSP_LIBRARY(LIBS_OK MSPSScovmodel)
-  FIND_MSP_LIBRARY(LIBS_OK MSPSSrutil)
-  FIND_MSP_LIBRARY(LIBS_OK MSPutilities)
-  FIND_MSP_LIBRARY(LIBS_OK CSM_PCAPI)
-  FIND_MSP_LIBRARY(LIBS_OK MSPrsme)
-  FIND_MSP_LIBRARY(LIBS_OK MSPRsmGeneratorService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPdei)
-  FIND_MSP_LIBRARY(LIBS_OK MSPrsmg)
-  FIND_MSP_LIBRARY(LIBS_OK MSPDEIUtil)
-  FIND_MSP_LIBRARY(LIBS_OK MSPrutil)
-  FIND_MSP_LIBRARY(LIBS_OK MSPSensorSpecificService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPImagingGeometryService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPjson)
-  FIND_MSP_LIBRARY(LIBS_OK MSPmens)
-  FIND_MSP_LIBRARY(LIBS_OK MSPTerrainService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPMensurationService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPMensurationSessionRecordService)
-  FIND_MSP_LIBRARY(LIBS_OK MSPwriteRsmNitf)
-  FIND_MSP_LIBRARY(LIBS_OK MSPMSPVersionUtils)
-  FIND_MSP_LIBRARY(LIBS_OK MSPmtdCommon)
-  FIND_MSP_LIBRARY(LIBS_OK pthread )
-  FIND_MSP_LIBRARY(LIBS_OK dl  )
+  FIND_MSP_LIBRARY(MSPPointExtractionService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPSensorModelService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPSourceSelectionService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPCovarianceService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPSupportDataService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPTerrainService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPCCSUtils LIBS_OK)
+  FIND_MSP_LIBRARY(MSPCoordinateConversionService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPOutputMethodService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPasdetre LIBS_OK)
+  FIND_MSP_LIBRARY(MSPcoordconverter LIBS_OK)
+  FIND_MSP_LIBRARY(MSPcsisd LIBS_OK)
+  FIND_MSP_LIBRARY(MSPcsm LIBS_OK)
+  FIND_MSP_LIBRARY(MSPcsmutil LIBS_OK)
+  FIND_MSP_LIBRARY(MSPdtcc LIBS_OK)
+  FIND_MSP_LIBRARY(MSPlas LIBS_OK)
+  FIND_MSP_LIBRARY(MSPgeometry LIBS_OK)
+  FIND_MSP_LIBRARY(MSPmath LIBS_OK)
+  FIND_MSP_LIBRARY(MSPnitf LIBS_OK)
+  FIND_MSP_LIBRARY(MSPntmtre LIBS_OK)
+  FIND_MSP_LIBRARY(MSPrage LIBS_OK)
+  FIND_MSP_LIBRARY(MSPRageServiceUtils LIBS_OK)
+  FIND_MSP_LIBRARY(MSPrageutilities LIBS_OK)
+  FIND_MSP_LIBRARY(MSPSScovmodel LIBS_OK)
+  FIND_MSP_LIBRARY(MSPSSrutil LIBS_OK)
+  FIND_MSP_LIBRARY(MSPutilities LIBS_OK)
+  FIND_MSP_LIBRARY(CSM_PCAPI LIBS_OK)
+  FIND_MSP_LIBRARY(MSPrsme LIBS_OK)
+  FIND_MSP_LIBRARY(MSPRsmGeneratorService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPdei LIBS_OK)
+  FIND_MSP_LIBRARY(MSPrsmg LIBS_OK)
+  FIND_MSP_LIBRARY(MSPDEIUtil LIBS_OK)
+  FIND_MSP_LIBRARY(MSPrutil LIBS_OK)
+  FIND_MSP_LIBRARY(MSPSensorSpecificService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPImagingGeometryService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPjson LIBS_OK)
+  FIND_MSP_LIBRARY(MSPmens LIBS_OK)
+  FIND_MSP_LIBRARY(MSPTerrainService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPMensurationService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPMensurationSessionRecordService LIBS_OK)
+  FIND_MSP_LIBRARY(MSPwriteRsmNitf LIBS_OK)
+  FIND_MSP_LIBRARY(MSPMSPVersionUtils LIBS_OK)
+  FIND_MSP_LIBRARY(MSPmtdCommon LIBS_OK)
+  FIND_MSP_LIBRARY(pthread  LIBS_OK)
+  FIND_MSP_LIBRARY(dl   LIBS_OK)
+
+# These are optional. Include only if present:
+  FIND_MSP_LIBRARY(MSPsupportdata DUMMY_ARG)
+  FIND_MSP_LIBRARY(MSPHardCopyService DUMMY_ARG)

   if( LIBS_OK )
     set(MSP_FOUND "YES")
     set(OSSIM_HAS_MSP 1)
-    #message("-- MSP_INCLUDE_DIRS = ${MSP_INCLUDE_DIRS}")
-    #message("-- MSP_LIBRARIES = ${MSP_LIBRARIES}")
+    message("-- MSP_INCLUDE_DIRS = ${MSP_INCLUDE_DIRS}")
+    message("-- MSP_LIBRARIES = ${MSP_LIBRARIES}")
   endif()

 endif()


Re-implemented cmake scripts to find dependencies for sink
plugin.

Signed-off-by: Gopal, Puunithaaraj <10308ab826b56f8bbce1ec0c10bd609cace363da@intel.com>

--- cmake/FindSinkDependencies.cmake
+++ cmake/FindSinkDependencies.cmake
@@ -1,52 +1,45 @@
-set (SINK_LIBRARIES "")
-if (HAVE_MFX_SINK)
-	if(HAVE_WAYLAND_RENDERER)
-		pkg_check_modules (WAYLAND_CLIENT REQUIRED wayland-client)
-		if (WAYLAND_CLIENT_FOUND)
-			include_directories (${WAYLAND_CLIENT_INCLUDE_DIRS})
-			LIST (APPEND SINK_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES})
-			SET (HAVE_WAYLAND 1)
-		endif()
-		if(HAVE_EGL_RENDERER)
-			pkg_check_modules (EGL REQUIRED egl)
-			if(EGL_FOUND)
-				include_directories(${EGL_INCLUDE_DIRS})
-				LIST(APPEND SINK_LIBRARIES ${EGL_LIBRARIES})
-				SET (HAVE_EGL 1)
-			endif()
-			pkg_check_modules (WAYLAND_EGL REQUIRED wayland-egl)
-			if(WAYLAND_EGL_FOUND)
-				include_directories(${WAYLAND_EGL_INCLUDE_DIRS})
-				LIST(APPEND SINK_LIBRARIES ${WAYLAND_EGL_LIBRARIES})
-			endif()
-		endif()
-	endif()
-	if(HAVE_X11_RENDERER)
-		pkg_check_modules (X11 REQUIRED x11)
-		pkg_check_modules (XKB xkbcommon)
-		pkg_check_modules (XRANDR xrandr)
-		if (X11_FOUND)
-			include_directories (${X11_INCLUDE_DIRS})
-			LIST (APPEND SINK_LIBRARIES ${X11_LIBRARIES})
-			SET (HAVE_X11 1)
-		endif()
-		if (XKB_FOUND)
-			include_directories (${XKB_INCLUDE_DIRS})
-			LIST (APPEND SINK_LIBRARIES ${XKB_LIBRARIES})
-			SET (HAVE_XKBLIB 1)
-		endif()
-		if (XRANDR_FOUND)
-			include_directories (${XRANDR_INCLUDE_DIRS})
-			LIST (APPEND SINK_LIBRARIES ${XRANDR_LIBRARIES})
-			SET (HAVE_XRANDR 1)
-		endif()
-		if(HAVE_EGL_RENDERER)
-			pkg_check_modules (EGL REQUIRED egl)
-			if(EGL_FOUND)
-				include_directories(${EGL_INCLUDE_DIRS})
-				LIST(APPEND SINK_LIBRARIES ${EGL_LIBRARIES})
-				SET (HAVE_EGL 1)
-			endif()
-		endif()
-	endif()
-endif()
+function(FindWayland libs)
+  pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client)
+  if(WAYLAND_CLIENT_FOUND)
+    set(${libs} ${${libs}} ${WAYLAND_CLIENT_LIBRARIES} PARENT_SCOPE)
+    include_directories (${WAYLAND_CLIENT_INCLUDE_DIRS})
+  endif()
+endfunction(FindWayland)
+
+function(FindX11 libs)
+  pkg_check_modules(X11    REQUIRED x11)
+  pkg_check_modules(XKB    REQUIRED xkbcommon)
+  pkg_check_modules(XRANDR REQUIRED xrandr)
+  if(X11_FOUND)
+    set(${libs} ${${libs}} ${X11_LIBRARIES} PARENT_SCOPE)
+    include_directories (${X11_INCLUDE_DIRS})
+  endif()
+
+  if(XKB_FOUND)
+    set(${libs} ${${libs}} ${XKB_LIBRARIES} PARENT_SCOPE)
+    include_directories (${XKB_INCLUDE_DIRS})
+    add_definitions(-DHAVE_XKBLIB)
+  endif()
+
+  if(XRANDR_FOUND)
+    set(${libs} ${${libs}} ${XRANDR_LIBRARIES} PARENT_SCOPE)
+    include_directories (${XRANDR_INCLUDE_DIRS})
+    add_definitions(-DHAVE_XRANDR)
+  endif()
+endfunction(FindX11)
+
+function(FindEGL libs)
+  pkg_check_modules(EGL REQUIRED egl)
+  if(EGL_FOUND)
+    set(${libs} ${${libs}} ${EGL_LIBRARIES} PARENT_SCOPE)
+    include_directories(${EGL_INCLUDE_DIRS})
+  endif()
+endfunction(FindEGL)
+
+function(FindEGLWayland libs)
+  pkg_check_modules(WAYLAND_EGL REQUIRED wayland-egl)
+  if(WAYLAND_EGL_FOUND)
+    set(${libs} ${${libs}} ${WAYLAND_EGL_LIBRARIES} PARENT_SCOPE)
+    include_directories(${WAYLAND_EGL_INCLUDE_DIRS})
+  endif()
+endfunction(FindEGLWayland)


Enable -dev ntk by default.  Thanks to Arjen's recent changes it works
fine for me on Linux, and Arjen reports it also works well on Cygwin,
and Windows.

Tested by Alan W. Irwin <airwin@users.sourceforge.net> on Linux using
the test_c_ntk target.

svn path=/trunk/; revision=12741

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -190,7 +190,7 @@
   #"ljii:ljii:OFF:F:OFF"
   #"ljiip:ljiip:OFF:F:OFF"
   "mem:mem:ON:M:OFF"
-  "ntk:ntk:OFF:I:OFF"
+  "ntk:ntk:ON:I:OFF"
   "null:null:ON:N:OFF"
   # The pbm device is primitive (e.g., Hershey fonts, software fills,
   # no alpha transparency) and poorly maintained (the double free for


Move the build log to nuttx directory

Move the build log to nuttx directory

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -212,7 +212,7 @@
 		COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean
 		COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/
 		COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
-		COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh
+		COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh && cd ..
 		#COMMAND ${ECHO} Exporting NuttX for ${CONFIG}
 		COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export > nuttx_build.log
 		COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export


CMake: Bugfix: Remove forgotten "compat_files" target

--- cmake/setup_custom_targets.cmake
+++ cmake/setup_custom_targets.cmake
@@ -17,7 +17,6 @@
 # Add convenience targets that build and install only a specific component:
 #
 #   library
-#   compat_files
 #   documentation
 #   examples
 #
@@ -53,7 +52,7 @@
 # The library can always be compiled and/or installed unconditionally ;-)
 _add_custom_target(library)

-FOREACH(_component compat_files documentation examples)
+FOREACH(_component documentation examples)
   STRING(TOUPPER "${_component}" _component_uppercase)
   IF(DEAL_II_COMPONENT_${_component_uppercase})
     _add_custom_target(${_component})
@@ -136,7 +135,6 @@
 #                     and reruns the configure and generate phases of CMake
 #    rebuild_cache  - rerun the configure and generate phases of CMake
 #
-#    compat_files   - ${_description_string} component 'compat_files'
 #    documentation  - ${_description_string} component 'documentation'
 #    examples       - ${_description_string} component 'examples'
 #    library        - ${_description_string} component 'library'


doc: fix that all tools are added

doc: fix that all tools are added

--- scripts/cmake/ElektraCache.cmake
+++ scripts/cmake/ElektraCache.cmake
@@ -69,12 +69,12 @@
 endif ()

 if (TOOLS MATCHES "NODEP")
-	set (TOOLS_LIST)
+	set (TOOLS_LIST race)
 	set (TOOLS_FORCE FORCE)
 endif ()

 if (TOOLS MATCHES "ALL")
-	set (TOOLS_LIST pythongen race qt-gui gen-gpg-testkey fuse)
+	set (TOOLS_LIST elektrad fuse gen-gpg-testkey hub-zeromq kdb pythongen qt-gui race webd website webui)
 	set (TOOLS_FORCE FORCE)
 	list (REMOVE_ITEM TOOLS ALL)
 endif ()


+ pyExts: introduced support for automated include/linkage for imported targets

--- contrib/cmake/PyExtensions.cmake
+++ contrib/cmake/PyExtensions.cmake
@@ -105,13 +105,40 @@
             #PUBLIC $<TARGET_PROPERTY:${StromaV_LIB},INCLUDE_DIRECTORIES>
         #)
         foreach( LINK_LIB IN LISTS py_extensions_LINK_LIBS )
-            #set_source_files_properties( ${IFACE_FILE} PROPERTIES COMPILE_FLAGS
-            #    -I$<JOIN:$<TARGET_PROPERTY:${LINK_LIB},INCLUDE_DIRECTORIES>, -I> )
-            get_target_property( _LIB_INCS ${LINK_LIB} INTERFACE_INCLUDE_DIRECTORIES )
-            string(REGEX REPLACE "([^;]+)" "-I\\1" _LIB_INCS_PRFXD "${_LIB_INCS}")
-            set_property( SOURCE ${IFACE_FILE} PROPERTY SWIG_FLAGS ${_LIB_INCS_PRFXD} )
+            if( NOT TARGET ${LINK_LIB} )
+                # The given library is not a target, so we're unable to retrieve
+                # its *_INCLUDE_DIRECTORIES properties.
+                continue()
+            endif()
+            # NOTE: what about INTERFACE_SYSTEM_INCLUDE_DIRECTORIES property?
+            get_target_property( _LIB_INCS     ${LINK_LIB} INTERFACE_INCLUDE_DIRECTORIES )
+            list( APPEND SWIG_MODULE_LIB_USR_INCS ${_LIB_INCS} )
+            get_target_property( _LIB_SYS_INCS ${LINK_LIB} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES )
+            list( APPEND SWIG_MODULE_LIB_SYS_INCS ${_LIB_SYS_INCS} )
         endforeach()
+
+        list( REMOVE_DUPLICATES SWIG_MODULE_LIB_USR_INCS )
+        list( REMOVE_DUPLICATES SWIG_MODULE_LIB_SYS_INCS )
+
+        string(REGEX REPLACE "([^;]+)" "$<$<BOOL:\\1>:-I\\1>"       _USR_INCS_PRFXD "${SWIG_MODULE_LIB_USR_INCS}")
+        string(REGEX REPLACE "([^;]+)" "$<$<BOOL:\\1>:-isystem\\1>" _SYS_INCS_PRFXD "${SWIG_MODULE_LIB_SYS_INCS}" )
+        # NOTE: SWIG does not accept -isystem flag, so we have to prepend system includes
+        # with -I as well:
+        string(REGEX REPLACE "([^;]+)" "$<$<BOOL:\\1>:-I\\1>" _SYS_INCS_PRFXD_2 "${SWIG_MODULE_LIB_SYS_INCS}" )
+
+        set_property( SOURCE ${IFACE_FILE} PROPERTY SWIG_FLAGS "${_USR_INCS_PRFXD} ${_SYS_INCS_PRFXD_2}" )
+
+        # DEBUG:
+        #get_property( _RET1 SOURCE ${IFACE_FILE} PROPERTY SWIG_FLAGS )
+        #message( STATUS "DEBUG:${IFACE_FILE}:${LINK_LIB};USR:${_LIB_INCS}|${_RET1};SYS:${_LIB_SYS_INCS};SYS2:${_LIB_SYS_INCS_PRFXD_2}" )
+
         swig_add_module( ${IFACE} python ${IFACE_FILE} )
+
+        set_source_files_properties( ${swig_generated_file_fullname} PROPERTIES
+            INTERFACE_INCLUDE_DIRECTORIES "${_USR_INCS_PRFXD}" )
+        set_source_files_properties( ${swig_generated_file_fullname} PROPERTIES
+            INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_SYS_INCS_PRFXD}" )
+
         swig_link_libraries( ${IFACE} ${PYTHON_LIBRARIES} ${py_extensions_LINK_LIBS})

         # TODO: use install.py


first cut at xpInstallPro cmake function

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

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -669,6 +669,37 @@
   set(${_ret} ${prefix} PARENT_SCOPE)
 endfunction()

+function(xpInstallPro)
+  if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git)
+    return()
+  endif()
+  if(NOT DEFINED BUILD_PLATFORM)
+    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      set(BUILD_PLATFORM 64)
+    elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+      set(BUILD_PLATFORM 32)
+    endif()
+  endif()
+  if(NOT GIT_FOUND)
+    include(FindGit)
+    find_package(Git)
+  endif()
+  set(XP_DEFAULT ON) # avoid PARTIAL marker
+  set(MODULES_DIR ${moduleDir}) # moduleDir from Findexternpro.cmake
+  include(${MODULES_DIR}/macpro.cmake)
+  proSetStageDir()
+  set(CMAKE_INSTALL_PREFIX ${STAGE_DIR} CACHE PATH
+    "Install path prefix, prepended onto install directories." FORCE
+    )
+  install(FILES ${XP_INFOFILE} DESTINATION .)
+  install(FILES ${STAGE_DIR}/share/cmake/Find${CMAKE_PROJECT_NAME}.cmake DESTINATION share/cmake)
+  if(NOT DEFINED CPACK_PACKAGE_VENDOR AND DEFINED PACKAGE_VENDOR)
+    set(CPACK_PACKAGE_VENDOR ${PACKAGE_VENDOR})
+  endif()
+  proSetCpackOpts()
+  include(CPack)
+endfunction()
+
 function(xpListPrependToAll var prefix)
   set(listVar)
   foreach(f ${ARGN})


disabling distributed api

disabling distributed api

--- cmake/mpi.cmake
+++ cmake/mpi.cmake
@@ -157,7 +157,7 @@

     INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
     ADD_DEFINITIONS(-DOSPRAY_MPI=1)
-    ADD_DEFINITIONS(-DOSPRAY_MPI_DISTRIBUTED=1)
+#    ADD_DEFINITIONS(-DOSPRAY_MPI_DISTRIBUTED=1)
     SET(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
     SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MPI_CXX_COMPILE_FLAGS}")
     SET(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} ${MPI_CXX_COMPILE_FLAGS}")


Add clang-tidy check in llvm-amdgpu package (#2279)

HIP-Clang's compiler will include clang-tidy inside the llvm-amdgpu package installation location.

--- cmake/ClangTidy.cmake
+++ cmake/ClangTidy.cmake
@@ -40,6 +40,7 @@
         compiler/bin
     PATHS
         /opt/rocm/hcc
+        /opt/rocm/llvm/bin
         /usr/local/opt/llvm/bin
 )


Fix order of apron static libraries

Fix order of apron static libraries

--- cmake/FindApron.cmake
+++ cmake/FindApron.cmake
@@ -20,9 +20,10 @@
    find_library(Apron_Box_Lib NAMES libboxMPQ.a PATHS ${APRON_ROOT}/lib)
    find_library(Apron_Itv_Lib NAMES libitvMPQ.a PATHS ${APRON_ROOT}/lib)

-   set(APRON_LIBRARY ${Apron_Polka_Lib} ${Apron_Oct_Lib}
+   set(APRON_LIBRARY ${Apron_Box_Lib}
+     ${Apron_Polka_Lib} ${Apron_Oct_Lib}
      ${Apron_Opt_Oct_Lib} ${Apron_Opt_Oct_utils_Lib}
-     ${Apron_Apron_Lib} ${Apron_Box_Lib} ${Apron_Itv_Lib} )
+     ${Apron_Itv_Lib} ${Apron_Apron_Lib})

    include (FindPackageHandleStandardArgs)
    find_package_handle_standard_args (Apron


Pass on the needed FUSE3 variables

Pass on the needed FUSE3 variables

--- cmake/FindFUSE3.cmake
+++ cmake/FindFUSE3.cmake
@@ -44,4 +44,4 @@
 find_package_handle_standard_args ("FUSE3" DEFAULT_MSG
     FUSE_INCLUDE_DIR FUSE_LIBRARIES)

-mark_as_advanced (FUSE_INCLUDE_DIR FUSE_LIBRARIES)
+mark_as_advanced (FUSE_INCLUDE_DIR FUSE_LIBRARIES HAS_FUSE3 FUSE3_FOUND)


Fixed cmake script

Fixed cmake script

--- cmake/Findphypp.cmake
+++ cmake/Findphypp.cmake
@@ -29,12 +29,12 @@

     # Define the command to generate the binary file
     if(CMAKE_BUILD_TYPE MATCHES Debug)
-        add_custom_command(OUTPUT ${FILE_BASE}-make VERBATIM COMMAND
-            ${PHYPP_COMPILER} debug ${PROJECT_SOURCE_DIR}/${CPP_FILE_NAME} -o ${CMAKE_CURRENT_BINARY_DIR}/${FILE_BASE}-make
+        add_custom_command(OUTPUT "${FILE_BASE}-make" VERBATIM COMMAND
+            ${PHYPP_COMPILER} debug "${PROJECT_SOURCE_DIR}/${CPP_FILE_NAME}" -o "${CMAKE_CURRENT_BINARY_DIR}/${FILE_BASE}-make"
             DEPENDS ${PROJECT_SOURCE_DIR}/${CPP_FILE_NAME} ${PHYPP_HEADERS})
     else()
-        add_custom_command(OUTPUT ${FILE_BASE}-make VERBATIM COMMAND
-            ${PHYPP_COMPILER} optimize ${PROJECT_SOURCE_DIR}/${CPP_FILE_NAME} -o ${CMAKE_CURRENT_BINARY_DIR}/${FILE_BASE}-make
+        add_custom_command(OUTPUT "${FILE_BASE}-make" VERBATIM COMMAND
+            ${PHYPP_COMPILER} optimize "${PROJECT_SOURCE_DIR}/${CPP_FILE_NAME}" -o "${CMAKE_CURRENT_BINARY_DIR}/${FILE_BASE}-make"
             DEPENDS ${PROJECT_SOURCE_DIR}/${CPP_FILE_NAME} ${PHYPP_HEADERS})
     endif()


BUG: Fix MGHIO to fix write failures

BUG: Fix MGHIO to fix write failures

MGHIO was not always writing valid images to disk. This problem was
identified as part of the BRAINSTools use of MGHIO, and resulted
in incorrect data results when using .mgz extension instead of
.nii.gz.  The problem was identified as incorrect direction cosine
manipulation between MGH coordinate space and ITK coordinate space.

In order to facilitate future maintenance, the code was modified
to use itk::Vector and itk::Matrix mathematical operations rather
than c-arrays with manual computations.  This change makes the
code easier to debug (using external matrix calculators) and easier
to validate to the documentation.

More extensive tests created to stress test reading and writing.

Test images converted to/from nifti format for reading and writing
and loaded into slicer to visually confirm that all information is
preserved.

Change-Id: I7a850e2aa6a1938c94326769c415380cf6ee68e8

--- Modules/Remote/MGHIO.remote.cmake
+++ Modules/Remote/MGHIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(MGHIO
   "MGHIO ImageIO plugin for ITK"
   GIT_REPOSITORY https://github.com/Slicer/itkMGHImageIO.git
-  GIT_TAG dc1f16c73d497ca2d1d7e1c77096817f8a82eb21
+  GIT_TAG 7d0386335dd90199fa7f1e79db7ceab22d8e957f
   )


Compile fix on BGAS

Compile fix on BGAS

--- CMake/Site/CSCS.cmake
+++ CMake/Site/CSCS.cmake
@@ -10,7 +10,7 @@
 elseif(hostname MATCHES bbpbg2)
   set(BGAS 1)
   set(SKV_ENV "BGAS")
-  set(SKV_MPI "BGAS-MVAPICH")
+  set(SKV_MPI "AUTO")
   message("Running on BGAS")
 else()
   set(NORMAL 1)


Bug #59148 - made tests experimental Fixed a cmake 2.8.8 compilation problem.

--- configure.cmake
+++ configure.cmake
@@ -149,7 +149,9 @@
   SET(CMAKE_REQUIRED_LIBRARIES
     ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})

-  LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
+  IF(NOT ${CMAKE_REQUIRED_LIBRARIES} MATCHES '')
+    LIST(REMOVE_DUPLICATES ${CMAKE_REQUIRED_LIBRARIES})
+  ENDIF()
   LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT})

   OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF)


Fix IlmBase/OpenEXR build break when they are oddly installed in separate directories instead of the include files together.

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -38,6 +38,7 @@
 find_package (IlmBase REQUIRED)

 include_directories ("${ILMBASE_INCLUDE_DIR}")
+include_directories ("${ILMBASE_INCLUDE_DIR}/OpenEXR")

 macro (LINK_ILMBASE target)
     target_link_libraries (${target} ${ILMBASE_LIBRARIES})


Adding support for easybuild modules

Adding support for easybuild modules

Former-commit-id: 3682f8d631c4ff6d488c1f6c02847ba48e3bd724

--- cmake-modules/Fetch_Arpackpp.cmake
+++ cmake-modules/Fetch_Arpackpp.cmake
@@ -35,6 +35,7 @@
             )
     if(ARPACKPP_INCLUDE_DIR)
         get_filename_component(DIRNAME ${ARPACKPP_INCLUDE_DIR} NAME)
+        message(DIRNAME: ${DIRNAME})
         if("${DIRNAME}" STREQUAL "arpack++")
             get_filename_component(ARPACKPP_INCLUDE_DIR ${ARPACKPP_INCLUDE_DIR} DIRECTORY)
             message(STATUS "Searching for Arpack++ in module - Success: ${ARPACKPP_INCLUDE_DIR}")


openocd.board.cmake: Fix flash load address

'make flash' always erase the flash banks from sector 0, and flashing
the Zephyr.bin file to base address of flash even if there has a
bootloader placed on the first sector.

Users maybe want placed Zephyr to another location instead of sector
0 by adding 'zephyr,code-partition' in dts. But the openocd scripts
doesn't deal with that currently.

Fix this issue, flash zephyr.elf instead of zephyr.bin, elf file
contain load address and openocd scripts can deal with it.

Signed-off-by: qianfan Zhao <0d01fab1932da5a147025f14dd5829cf5bf10d4d@163.com>

--- boards/common/openocd.board.cmake
+++ boards/common/openocd.board.cmake
@@ -11,14 +11,11 @@
   set_ifndef(OPENOCD_FLASH "flash write_image erase")
 endif()

-# zephyr.bin, or something else?
-set_ifndef(OPENOCD_IMAGE "${PROJECT_BINARY_DIR}/${KERNEL_BIN_NAME}")
+# zephyr.elf, or something else?
+set_ifndef(OPENOCD_IMAGE "${PROJECT_BINARY_DIR}/${KERNEL_ELF_NAME}")

-# CONFIG_FLASH_BASE_ADDRESS, or something else?
-set_ifndef(OPENOCD_ADDRESS "${CONFIG_FLASH_BASE_ADDRESS}")
-
-set(OPENOCD_CMD_LOAD_DEFAULT "${OPENOCD_FLASH} ${OPENOCD_IMAGE} ${OPENOCD_ADDRESS}")
-set(OPENOCD_CMD_VERIFY_DEFAULT "verify_image ${OPENOCD_IMAGE} ${OPENOCD_ADDRESS}")
+set(OPENOCD_CMD_LOAD_DEFAULT "${OPENOCD_FLASH} ${OPENOCD_IMAGE}")
+set(OPENOCD_CMD_VERIFY_DEFAULT "verify_image ${OPENOCD_IMAGE}")

 board_finalize_runner_args(openocd
   --cmd-load "${OPENOCD_CMD_LOAD_DEFAULT}"


- Add proper build version to build string

--- cmake/Modules/BuildFlags.cmake
+++ cmake/Modules/BuildFlags.cmake
@@ -5,6 +5,18 @@
     # Build time strings, embedded within constexpr strings to keep track of when a build was made.
     # Because file timestamps are unreliable.
     string (TIMESTAMP CBUILDTIME "%y%m%d%H")
+
+    execute_process (
+        COMMAND ${CMAKE_SOURCE_DIR}/version.py none --version
+        OUTPUT_VARIABLE COFFEE_VERSION_CODE
+        )
+
+    string ( REGEX REPLACE "\n$" "" COFFEE_VERSION_CODE "${COFFEE_VERSION_CODE}" )
+
+    message ( "${COFFEE_VERSION_CODE}" )
+
+    set ( COFFEE_VERSION_CODE "${COFFEE_VERSION_CODE}"
+        CACHE STRING "" )

     if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT WIN32)
         set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wpedantic -Wno-gnu-anonymous-struct -Wno-nested-anon-types"


looks like Maksim was right; the new fix does not do the second attempt to detect python libs, it finds it correctly with the first attempt

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -75,10 +75,10 @@

     if(NOT ANDROID AND NOT IOS)
       ocv_check_environment_variables(${library_env} ${include_dir_env})
-      if(${library_env})
+      if(${${library_env}})
           set(PYTHON_LIBRARY "${${library_env}}")
       endif()
-      if(${include_dir_env})
+      if(${${include_dir_env}})
           set(PYTHON_INCLUDE_DIR "${${include_dir_env}}")
       endif()

@@ -88,9 +88,6 @@
         find_host_package(PythonLibs "${_version_major_minor}")
       else()
         find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)
-        if(NOT PYTHONLIBS_FOUND)
-            find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}")
-        endif()
       endif()

       if(PYTHONLIBS_FOUND)


Set correct Python version after building yourself

This coincides with the output of the FindPythonInterp script.

--- cmake/modules/FindPython.cmake
+++ cmake/modules/FindPython.cmake
@@ -16,6 +16,10 @@
 		BUILD_IN_SOURCE 1
 	)
 	set(PYTHON_EXECUTABLE ${CMAKE_INSTALL_PREFIX}/bin/python3)
+	set(PYTHON_VERSION_STRING "3.5.2")
+	set(PYTHON_VERSION_MAJOR 3)
+	set(PYTHON_VERSION_MINOR 5)
+	set(PYTHON_VERSION_PATCH 2)
 	set(PYTHON_FOUND TRUE)
 else() #Just find it on the system.
 	if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED") #Pass the REQUIRED parameter on to the script. Perhaps also do other parameters?


[cxxmodules] Remove the requres objc clause allowing to load libGCocoa.so

This should fix the failing roottest-root-html-runMakeIndex on OSX with
-Druntime_cxxmodules=On

Patch by Alexander Penev!

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -633,10 +633,8 @@
     set (modulemap_entry "${modulemap_entry}\n  use ROOT_Foundation_C\n")
   endif()

-  # For modules GCocoa and GQuartz we need objc context.
-  if (${library} MATCHES "(GCocoa|GQuartz)")
-    set (modulemap_entry "${modulemap_entry}\n  requires objc\n")
-  else()
+  # For modules GCocoa and GQuartz we need objc and cplusplus context.
+  if (NOT ${library} MATCHES "(GCocoa|GQuartz)")
     set (modulemap_entry "${modulemap_entry}\n  requires cplusplus\n")
   endif()
   if (library_headers)


Check the system for a boost installation before checking GOMC local installation.

--- CMake/FindBoost.cmake
+++ CMake/FindBoost.cmake
@@ -159,11 +159,11 @@
 endmacro()

 if(NOT BOOST_FOUND)
-	DO_FIND_BOOST_ROOT()
+	DO_FIND_BOOST_SYSTEM()
 endif()

 if(NOT BOOST_FOUND)
-	DO_FIND_BOOST_SYSTEM()
+	DO_FIND_BOOST_ROOT()
 endif()

 if(NOT BOOST_FOUND)


-fno-threadsafe-statics is a C++-only option

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -30,10 +30,10 @@

 # set default compilation flags
-set(_C_FAMILY_FLAGS_INIT "-fno-threadsafe-statics -fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra")
+set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra")
 set(CMAKE_C_FLAGS_INIT   "-std=c99 ${_C_FAMILY_FLAGS_INIT}")
 set(CMAKE_ASM_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -x assembler-with-cpp")
-set(CMAKE_CXX_FLAGS_INIT "${_C_FAMILY_FLAGS_INIT} -fno-rtti")
+set(CMAKE_CXX_FLAGS_INIT "${_C_FAMILY_FLAGS_INIT} -fno-rtti -fno-threadsafe-statics")
 set(CMAKE_MODULE_LINKER_FLAGS_INIT
     "-fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment"
 )


Fixed broken detection of Clang on OSX (10.8).

--- cmake/BALLCompilerSpecific.cmake
+++ cmake/BALLCompilerSpecific.cmake
@@ -13,7 +13,7 @@

 SET(CXX_USE_TR1 TRUE CACHE STRING "Use tr1 support if available")

-IF(CMAKE_COMPILER_IS_GNUCXX)
+IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")

 	SET(CXX_COMPILER_ID "GXX")

@@ -71,6 +71,8 @@
 		ADD_BALL_DEFINITIONS(-fmessage-length=0)
 	ENDIF()

+# TODO: replace by proper compiler ID
+# elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "???")
 ELSEIF(MINGW)

 	SET(CXX_COMPILER_ID "MinGW")
@@ -94,7 +96,7 @@
 		ADD_BALL_DEFINITIONS(-pedantic)
 	ENDIF()

-ELSEIF(MSVC)
+ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")

 	SET(CXX_COMPILER_ID "MSVC")

@@ -135,7 +137,7 @@
 	IF (BALL_BUILD_SOLUTION_PARALLEL)
 		ADD_DEFINITIONS(/MP)
 	ENDIF()
-ELSEIF(CMAKE_CXX_COMPILER MATCHES "icpc")
+ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")

 	SET(CXX_COMPILER_ID "Intel")

@@ -159,7 +161,8 @@
 	STRING(REGEX REPLACE "([0-9][0-9])\\.([0-9])\\.([0-9])$" "\\3"
 		CXX_COMPILER_VERSION_MINOR_MINOR ${CXX_COMPILER_VERSION})

-ELSEIF(CMAKE_CXX_COMPILER MATCHES "clang")
+ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+   # using Clang
 	SET(CXX_COMPILER_ID "LLVM")
 	SET(CMAKE_COMPILER_IS_LLVM TRUE CACHE INTERNAL "Is LLVM C++ compiler (llvm)")


clang: add trailing newline to generated readme files

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -449,5 +449,5 @@
 	# allow macros:
 	STRING(REGEX REPLACE "\" *#ifdef ([^\\]*)\\\\n\"" "#ifdef \\1" contents "${contents}")
 	STRING(REGEX REPLACE "\" *#endif\\\\n\"" "#endif" contents "${contents}")
-	FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/readme_${p}.c ${contents})
+	FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/readme_${p}.c "${contents}\n")
 endfunction()


Handle REQUIRED option in FindMonalisa.cmake

--- cmake/modules/FindMonalisa.cmake
+++ cmake/modules/FindMonalisa.cmake
@@ -6,7 +6,6 @@
 # MONALISA_LIBRARIES, the libraries to link against to use Monalisa
 # MONALISA_FOUND.  If false, you cannot build anything that requires Monalisa.

-set(MONALISA_FOUND 0)
 if(MONALISA_LIBRARY AND MONALISA_INCLUDE_DIR)
   set(MONALISA_FIND_QUIETLY TRUE)
 endif()
@@ -37,14 +36,10 @@
   DOC "Specify the libapmoncpp library here."
 )

-if(MONALISA_INCLUDE_DIR AND MONALISA_LIBRARY)
-  set(MONALISA_FOUND 1 )
-  if(NOT MONALISA_FIND_QUIETLY)
-     message(STATUS "Found Monalisa includes at ${MONALISA_INCLUDE_DIR}")
-     message(STATUS "Found Monalisa library at ${MONALISA_LIBRARY}")
-  endif()
-endif()
-
 set(MONALISA_LIBRARIES ${MONALISA_LIBRARY})

+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Monalisa
+  FOUND_VAR MONALISA_FOUND REQUIRED_VARS MONALISA_LIBRARY MONALISA_INCLUDE_DIR)
+
 mark_as_advanced(MONALISA_LIBRARY MONALISA_INCLUDE_DIR)


Remove InstallSettings include. It isn't needed.

svn path=/trunk/kdesupport/polkit-qt/; revision=959276

--- cmake/modules/FindPolkitQt.cmake
+++ cmake/modules/FindPolkitQt.cmake
@@ -14,8 +14,6 @@
 # Copyright (c) 2009, Michal Malek, <michalm@jabster.pl>
 #
 # Redistribution and use is allowed according to the terms of the GPLv2+ license.
-
-include(InstallSettings)

 if (POLKITQT_INCLUDE_DIR AND POLKITQT_LIB)
     set(POLKITQT_FIND_QUIETLY TRUE)


Fixed HEXAGON_ARM_SYSROOT

Fixed HEXAGON_ARM_SYSROOT

This was being reset in px4_impl_posix.cmake

Signed-off-by: Mark Charlebois <f1891e7fc976ae1bd489627e2954fb730751d728@gmail.com>

--- cmake/posix/px4_impl_posix.cmake
+++ cmake/posix/px4_impl_posix.cmake
@@ -206,7 +206,6 @@
 	endif()

 	# Add the toolchain specific flags
-	set(HEXAGON_ARM_SYSROOT ${HEXAGON_SDK_ROOT}/sysroot)
         set(added_cflags ${POSIX_CMAKE_C_FLAGS} --sysroot=${HEXAGON_ARM_SYSROOT})
         set(added_cxx_flags ${POSIX_CMAKE_CXX_FLAGS} --sysroot=${HEXAGON_ARM_SYSROOT})


better doc string for CPLEX_ROOT_DIR

better doc string for CPLEX_ROOT_DIR

--- cmake_extensions/FindCplex.cmake
+++ cmake_extensions/FindCplex.cmake
@@ -8,7 +8,7 @@
 #  CPLEX_LIBRARIES          - library files

 ## config
-set(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
+set(CPLEX_ROOT_DIR "" CACHE PATH "Hint the CPLEX Optimization Studio root directory (set if autodiscovery fails)")

 if(WIN32)
   if(NOT CPLEX_WIN_VERSION)


Fix build when building complete kdesupport at once

git-svn-id: 7928e23e4d58c5ca14aa7b47c53aeff82ee1dd0c@740189 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -20,7 +20,7 @@
 	SET(HAVE_ZLIB 0)
 ENDIF(ZLIB_FOUND)

-SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
 FIND_PACKAGE(CppUnit)
 IF (NOT CPPUNIT_FOUND AND BUILD_TESTS)
 	MESSAGE(STATUS "CppUnit not found, disabling tests.")


Removing boost unit test libraries from MXA_BOOST_COMPONENTS

--- Resources/CMake/FindSupportLibraries.cmake
+++ Resources/CMake/FindSupportLibraries.cmake
@@ -12,7 +12,7 @@
 SET (Boost_ADDITIONAL_VERSIONS "1.41" "1.41.0" "1.39" "1.39.0")

 if ( NOT MXA_BOOST_HEADERS_ONLY)
- set (MXA_BOOST_COMPONENTS program_options unit_test_framework test_exec_monitor)
+ set (MXA_BOOST_COMPONENTS program_options )
 endif()

 FIND_PACKAGE(Boost COMPONENTS  ${MXA_BOOST_COMPONENTS} )


ENH: static lib not used

ENH: static lib not used

--- CMake/External_fftw.cmake
+++ CMake/External_fftw.cmake
@@ -30,6 +30,7 @@
         ${FFTW_SB_BUILD_FLOAT_DIR}/configure
             --prefix=${CMAKE_INSTALL_PREFIX}
             --enable-shared
+            --disable-static
             --enable-float
             --enable-threads
             --disable-fortran
@@ -53,6 +54,7 @@
         ${FFTW_SB_BUILD_DOUBLE_DIR}/configure
             --prefix=${CMAKE_INSTALL_PREFIX}
             --enable-shared
+            --disable-static
             --disable-float
             --enable-threads
             --disable-fortran


Re-enable plug-in build

Re-enable plug-in build

--- CMake/cuda/FindCUDA.cmake
+++ CMake/cuda/FindCUDA.cmake
@@ -949,7 +949,7 @@
 set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL
   "This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE)

-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 find_package_handle_standard_args(CUDA
   REQUIRED_VARS
     CUDA_TOOLKIT_ROOT_DIR


COMP: Added missing condition that checks for MITK_USE_GLUT.

--- CMakeExternals/GLUT.cmake
+++ CMakeExternals/GLUT.cmake
@@ -2,37 +2,40 @@
 # freeglut
 #-----------------------------------------------------------------------------

-# Sanity checks
-if(DEFINED GLUT_DIR AND NOT EXISTS ${GLUT_DIR})
-  message(FATAL_ERROR "GLUT_DIR variable is defined but corresponds to non-existing directory")
-endif()
+if(MITK_USE_GLUT)
+  # Sanity checks
+  if(DEFINED GLUT_DIR AND NOT EXISTS ${GLUT_DIR})
+    message(FATAL_ERROR "GLUT_DIR variable is defined but corresponds to non-existing directory")
+  endif()

-set(proj GLUT)
-set(proj_DEPENDENCIES )
-set(${proj}_DEPENDS ${proj})
+  set(proj GLUT)
+  set(proj_DEPENDENCIES )
+  set(${proj}_DEPENDS ${proj})

-if(NOT DEFINED GLUT_DIR)
+  if(NOT DEFINED GLUT_DIR)

-  set(patch_cmd ${CMAKE_COMMAND} -Dproj:STRING=${proj} -Dproj_target:STRING=GLUT -P ${CMAKE_CURRENT_LIST_DIR}/GenerateDefaultCMakeBuildSystem.cmake)
+    set(patch_cmd ${CMAKE_COMMAND} -Dproj:STRING=${proj} -Dproj_target:STRING=GLUT -P ${CMAKE_CURRENT_LIST_DIR}/GenerateDefaultCMakeBuildSystem.cmake)

-  ExternalProject_Add(${proj}
-     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
-     BINARY_DIR ${proj}-build
-     PREFIX ${proj}-cmake
-     URL http://mitk.org/download/thirdparty/freeglut-2.8.1.tar.gz
-     URL_MD5 918ffbddcffbac83c218bc52355b6d5a
-     PATCH_COMMAND ${patch_cmd}
-     INSTALL_COMMAND ""
-     CMAKE_GENERATOR ${gen}
-     CMAKE_ARGS
-       ${ep_common_args}
-     DEPENDS ${proj_DEPENDENCIES}
-    )
+    ExternalProject_Add(${proj}
+       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
+       BINARY_DIR ${proj}-build
+       PREFIX ${proj}-cmake
+       URL http://mitk.org/download/thirdparty/freeglut-2.8.1.tar.gz
+       URL_MD5 918ffbddcffbac83c218bc52355b6d5a
+       PATCH_COMMAND ${patch_cmd}
+       INSTALL_COMMAND ""
+       CMAKE_GENERATOR ${gen}
+       CMAKE_ARGS
+         ${ep_common_args}
+       DEPENDS ${proj_DEPENDENCIES}
+      )

-  set(GLUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build)
+    set(GLUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build)

-else()
+  else()

-  mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
+    mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
+
+  endif()

 endif()


Still more refactoring

Still more refactoring

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -20,6 +20,24 @@
   endif()
 endfunction()

+function(halide_generator_add_exec_generator_target EXEC_TARGET)
+  set(options )
+  set(oneValueArgs GENERATOR_TARGET GENFILES_DIR)
+  set(multiValueArgs OUTPUTS GENERATOR_ARGS)
+  cmake_parse_arguments(args "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+  halide_generator_get_exec_path(${args_GENERATOR_TARGET} EXEC_PATH)
+
+  add_custom_command(
+    OUTPUT "${args_OUTPUTS}"
+    DEPENDS "${GENERATOR_TARGET}"
+    COMMAND "${EXEC_PATH}" ${args_GENERATOR_ARGS}
+    WORKING_DIRECTORY "${GENFILES_DIR}"
+  )
+  set(EXEC_GENERATOR_TARGET "${AOT_LIBRARY_TARGET}.exec_generator")
+  add_custom_target(${EXEC_TARGET} DEPENDS "${args_DEPENDS}")
+  set_target_properties(${EXEC_TARGET} PROPERTIES FOLDER "generator")
+endfunction()

 # This function adds custom build steps to invoke a Halide generator exectuable
 # and produce a static library containing the generated code.
@@ -79,26 +97,13 @@
   # GENERATOR_ARGS always come last
   list(APPEND GENERATOR_EXEC_ARGS ${args_GENERATOR_ARGS})

-  halide_generator_get_exec_path(${args_GENERATOR_TARGET} GENERATOR_EXEC_PATH)
-
-  # Add a custom target to invoke the GENERATOR_TARGET and output the Halide
-  # generated library.
-  add_custom_command(
-    OUTPUT "${GENFILES_DIR}/${FILTER_LIB}" "${GENFILES_DIR}/${FILTER_HDR}"
-    DEPENDS "${args_GENERATOR_TARGET}"
-    COMMAND "${GENERATOR_EXEC_PATH}" ${GENERATOR_EXEC_ARGS}
-    WORKING_DIRECTORY "${GENFILES_DIR}"
+  halide_generator_add_exec_generator_target(
+    "${AOT_LIBRARY_TARGET}.exec_generator"
+    GENERATOR_TARGET ${args_GENERATOR_TARGET}
+    GENFILES_DIR     ${GENFILES_DIR}
+    OUTPUTS          "${GENFILES_DIR}/${FILTER_LIB}" "${GENFILES_DIR}/${FILTER_HDR}"
+    EXEC_ARGS        "${GENERATOR_ARGS}"
   )
-
-  # Use a custom target to force it to run the generator before the
-  # object file for the runner.
-  set(EXEC_GENERATOR_TARGET "${AOT_LIBRARY_TARGET}.exec_generator")
-  add_custom_target(${EXEC_GENERATOR_TARGET}
-                    DEPENDS "${GENFILES_DIR}/${FILTER_LIB}" "${GENFILES_DIR}/${FILTER_HDR}")
-
-  # Place the target in a special folder in IDEs
-  set_target_properties(${EXEC_GENERATOR_TARGET} PROPERTIES FOLDER "generator")
-
 endfunction(halide_add_aot_library)

 # Usage:
@@ -106,11 +111,9 @@
 function(halide_add_aot_library_dependency TARGET AOT_LIBRARY_TARGET)
     halide_generator_genfiles_dir(${AOT_LIBRARY_TARGET} GENFILES_DIR)

+    add_dependencies("${TARGET}" "${AOT_LIBRARY_TARGET}.exec_generator")
+
     set(FILTER_LIB "${AOT_LIBRARY_TARGET}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-
-    set(EXEC_GENERATOR_TARGET "${AOT_LIBRARY_TARGET}.exec_generator")
-    add_dependencies("${TARGET}" "${EXEC_GENERATOR_TARGET}")
-
     target_link_libraries("${TARGET}" PRIVATE "${GENFILES_DIR}/${FILTER_LIB}")
     target_include_directories("${TARGET}" PRIVATE "${GENFILES_DIR}")

@@ -124,7 +127,6 @@
     else()
       target_link_libraries("${TARGET}" PRIVATE dl pthread z)
     endif()
-
 endfunction(halide_add_aot_library_dependency)

 function(halide_add_generator NAME)


Remove some NaCl special-casing in CMake

This is no longer necessary now that we are producing static library
output by default.

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -68,12 +68,6 @@
   set(FILTER_LIB "${args_GENERATED_FUNCTION}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(FILTER_HDR "${args_GENERATED_FUNCTION}.h")

-  # Check to see if the target includes pnacl
-  if ("${args_GENERATOR_ARGS}" MATCHES ".*pnacl.*")
-    set(FILTER_LIB "${args_GENERATED_FUNCTION}.bc")
-    set(target_is_pnacl TRUE)
-  endif()
-
   set(invoke_args "-g" "${args_GENERATOR_NAME}" "-f" "${args_GENERATED_FUNCTION_NAMESPACE}${args_GENERATED_FUNCTION}" "-o" "${SCRATCH_DIR}" ${args_GENERATOR_ARGS})
   set(generator_exec ${args_GENERATOR_TARGET}${CMAKE_EXECUTABLE_SUFFIX})

@@ -96,13 +90,6 @@
       # build script.
       COMMAND "${CMAKE_BINARY_DIR}/bin/$(CONFIGURATION)/${generator_exec}" ${invoke_args}

-      WORKING_DIRECTORY "${SCRATCH_DIR}"
-      )
-  elseif(target_is_pnacl)
-    # No archive step for pnacl targets
-    add_custom_command(OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
-      DEPENDS "${args_GENERATOR_TARGET}"
-      COMMAND "${CMAKE_BINARY_DIR}/bin/${generator_exec}" ${invoke_args}
       WORKING_DIRECTORY "${SCRATCH_DIR}"
       )
   else()


better existing/new destination dir comparison

--- Modules/CakePkg.cmake
+++ Modules/CakePkg.cmake
@@ -289,7 +289,7 @@
     else()
       set(pk_from_name "")
     endif()
-
+
     if(pk_from_name)
       if(pk_from_url)
         if(pk_from_name EQUAL pk_from_url)
@@ -321,9 +321,18 @@
     else()
       set(existing_destination "")
     endif()
+
+  # following hack is to solve for example "c:/" != "C:/" problems
+  if(destination)
+    get_filename_component(destination "${destination}" ABSOLUTE)
+  endif()
+  if(existing_destination)
+    get_filename_component(existing_destination "${existing_destination}" ABSOLUTE)
+  endif()

     if(existing_destination)
       # nothing to do, if no explicit destination specified, or it's the same as previous
+    cmake_print_variables(destination existing_destination)
       if(NOT destination OR destination STREQUAL existing_destination)
         set(ans "${pk}" PARENT_SCOPE)
         return()


fix FindCUDA CMake module:

fix FindCUDA CMake module:

do not unset variables if CUDA_TOOLKIT_TARGET_DIR is not defined

--- cmake/FindCUDA.cmake
+++ cmake/FindCUDA.cmake
@@ -538,7 +538,7 @@
 endif()

 if(NOT "${CUDA_TARGET_TRIPLET}" STREQUAL "${CUDA_TARGET_TRIPLET_INTERNAL}" OR
-   NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}")
+   (DEFINED CUDA_TOOLKIT_TARGET_DIR AND NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}"))
   cuda_unset_include_and_libraries()
 endif()


Find popt under windows

Find popt under windows

--- cmake/FindPOPT.cmake
+++ cmake/FindPOPT.cmake
@@ -44,7 +44,7 @@
   ## Check for the header files

   find_path (POPT_INCLUDE_DIRS popt.h
-    HINTS ${POPT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX}
+    HINTS ${POPT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX} $ENV{programfiles}\\GnuWin32 $ENV{programfiles32}\\GnuWin32
     PATH_SUFFIXES include
     )

@@ -52,7 +52,7 @@
   ## Check for the library

   find_library (POPT_LIBRARIES popt
-    HINTS ${POPT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX}
+    HINTS ${POPT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX} $ENV{programfiles}\\GnuWin32 $ENV{programfiles32}\\GnuWin32
     PATH_SUFFIXES lib
     )


Determine Poco Version for JSON search

Determine Poco Version for JSON search

Poco 1.5 provides a JSON library. Use Poco/Version.h to extract version
number of found Poco. If version is 1.5 and higher, also search for
PocoJSON library.

--- cmake/FindPoco.cmake
+++ cmake/FindPoco.cmake
@@ -28,8 +28,19 @@
 # - Header path
 find_path(Poco_INCLUDE_DIR Poco/Poco.h DOC "Path to Poco headers" ${Poco_HEADER_SEARCH})

+# Get Version
+if(Poco_INCLUDE_DIR)
+  # Parse Poco's hex based version number
+  file(STRINGS ${Poco_INCLUDE_DIR}/Poco/Version.h Poco_PP_VERSION REGEX "^#define POCO_VERSION 0x.*$")
+  string(REGEX REPLACE ".*0x([0-9][0-9])([0-9][0-9])([0-9][0-9]).*" "\\1;\\2;\\3" Poco_VERSION_TUPLE ${Poco_PP_VERSION})
+  string(REGEX REPLACE "^0|;0" ";" Poco_VERSION_TUPLE "${Poco_VERSION_TUPLE}")
+  list(REMOVE_ITEM Poco_VERSION_TUPLE "")

-# - Libraries in turn (only Foundation/Util for now, and don't
+  # Convert to CMake-compatible version
+  string(REPLACE ";" "." Poco_VERSION "${Poco_VERSION_TUPLE}")
+endif()
+
+# - Libraries in turn (only Foundation/Util/XML/JSON for now, and don't
 # distinguish Release/Debug)
 find_library(Poco_FOUNDATION_LIBRARY
   NAMES PocoFoundation PocoFoundationd
@@ -43,6 +54,22 @@
   ${Poco_LIBRARY_SEARCH}
   )

+find_library(Poco_XML_LIBRARY
+  NAMES PocoXML PocoXMLd
+  DOC "Path to Poco XML library"
+  ${Poco_LIBRARY_SEARCH}
+  )
+
+# - Json only on 1.5 and above
+if(Poco_VERSION VERSION_GREATER 1.4.99)
+  find_library(Poco_JSON_LIBRARY
+    NAMES PocoJSON PocoJSONd
+    DOC "Path to Poco JSON library"
+    ${Poco_LIBRARY_SEARCH}
+    )
+endif()
+
+
 # - Handle Standard Args
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Poco DEFAULT_MSG Poco_INCLUDE_DIR Poco_FOUNDATION_LIBRARY)


Add suppression of C4351 warning for MSVC. (#101)

--- cmake/bde_ufid.cmake
+++ cmake/bde_ufid.cmake
@@ -413,6 +413,8 @@
             $<$<CXX_COMPILER_ID:MSVC>:
                 # deletion of pointer to incomplete type
                 /we4150
+                # elements of array will be default initialized
+                /wd4351
                 # default constructor could not be generated
                 /wd4510
                 # default constructor could not be generated


cmake: Fix windows build

cmake: Fix windows build


cmake: add get_templated_filename function

Signed-off-by: Karol Gugala <38af71640571ee4b5093d4f69ffca1ac454f2948@antmicro.com>

--- make/gen.cmake
+++ make/gen.cmake
@@ -264,6 +264,38 @@
   endif()
 endfunction(MUX_GEN)

+function(GET_TEMPLATED_FILENAME var SRC PREFIX)
+  # ~~~
+  # GET_TEMPLATED_FILENAME(
+  #   NAME <name>
+  #   var <calculated templated filename>
+  #   SRC <template file>
+  #   PREFIX <template prefixes>
+  #   )
+  # ~~~
+  #
+  # GET_TEMPLATED_FILENAME calculates file name that from given template and prefix.
+  # The template file should have a form of ntemplate.<rest>.
+  # The function removes the "ntemplate" prefix and converting all N's in file name
+  # to <prefix>.
+  #
+  string(
+    REPLACE
+      "ntemplate."
+      ""
+      SRC_NO_NTEMPLATE
+      ${SRC}
+  )
+  string(
+    REPLACE
+      "N"
+      ${PREFIX}
+      SRC_WITH_PREFIX
+      ${SRC_NO_NTEMPLATE}
+  )
+set(${var} ${SRC_WITH_PREFIX} PARENT_SCOPE)
+endfunction()
+
 function(N_TEMPLATE)
   # ~~~
   # N_TEMPLATE(
@@ -301,40 +333,14 @@
   foreach(PREFIX ${N_TEMPLATE_PREFIXES})
     foreach(SRC ${N_TEMPLATE_SRCS})
       set(REAL_INCLUDE_FILES "")
-      string(
-        REPLACE
-          "ntemplate."
-          ""
-          SRC_NO_NTEMPLATE
-          ${SRC}
-      )
-      string(
-        REPLACE
-          "N"
-          ${PREFIX}
-          SRC_WITH_PREFIX
-          ${SRC_NO_NTEMPLATE}
-      )
+      get_templated_filename(SRC_WITH_PREFIX ${SRC} ${PREFIX})
       get_file_target(SRC_TARGET_NAME ${SRC})
       get_target_property(SRC_INCLUDE_FILES ${SRC_TARGET_NAME} INCLUDE_FILES)
       foreach(INC ${SRC_INCLUDE_FILES})
         get_filename_component(INC_FILE ${INC} NAME)
         get_filename_component(INC_DIR ${INC} DIRECTORY)
         # template all the include files
-        string(
-          REPLACE
-            "ntemplate."
-            ""
-            INC_NO_NTEMPLATE
-            ${INC_FILE}
-        )
-        string(
-          REPLACE
-            "N"
-            ${PREFIX}
-            INC_WITH_PREFIX
-            ${INC_NO_NTEMPLATE}
-        )
+        get_templated_filename(INC_WITH_PREFIX ${INC_FILE} ${PREFIX})
         list(APPEND REAL_INCLUDE_FILES ${INC_DIR}/${INC_WITH_PREFIX})
       endforeach()
       get_file_location(SRC_LOCATION ${SRC})


One of the Macs has 'python2.7' but not 'python2'.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -98,7 +98,13 @@
     else()
         # We need to do this the hard way for both python2 and python3 support in the same build
         # This will be easier in cmake 3
-        find_program(PYTHON_EXECUTABLE python2)
+
+        if(DARWIN)
+            find_program(PYTHON_EXECUTABLE python2.7)
+        else()
+            find_program(PYTHON_EXECUTABLE python2)
+        endif()
+
         if (PYTHON_EXECUTABLE)
             set(PYTHONINTERP_FOUND TRUE)
             set(PYTHON_QUERY_PART_01 "from distutils import sysconfig;")


Fix CMake find module

Fix CMake find module

Fix redundant third_party dependancies in AWSSDK_LINK_LIBRARIES caused problem.

--- cmake/AWSSDKConfig.cmake
+++ cmake/AWSSDKConfig.cmake
@@ -278,15 +278,26 @@
 endmacro(AWSSDK_LIB_DEPS)

 if (AWSSDK_FIND_COMPONENTS)
-    message(STATUS "Components specified for AWSSDK: ${AWSSDK_FIND_COMPONENTS}")
+    #AWSSDK_LINK_LIBRARIES includes all the libraries (including dependencies) used by SDK and needed by customer application when doing linking.
+    #It only comes with COMPONENTS when doing find_package in customer application. e.g. find_package(AWSSDK REQUIRED COMPONENT s3 ec2)
+    #While SDK will resolve all the dependencies for customer application by doing find_package when COMPONENTS are specified,
+    #there is no need to add those dependencies into AWSSDK_LINK_LIBRARIES. Dependencies in AWSSDK_LINK_LIBRARIES will also become a problem when
+    #customer specified CMAKE_PREFIX_PATH and set it with non-default CMake search directories for dependencies when building SDK. In this case, when building customer
+    #application, target_link_libraries(target ${AWSSDK_LINK_LIBRARIES}) will fail to find the dependencies even when you specify CMAKE_PREFIX_PATH to the same directories.
+    #See https://github.com/aws/aws-sdk-cpp/issues/1279
+    #Because CMAKE_PREFIX_PATH is used for find_package, find_dependency, find_library, etc, but not target_link_libraries.
+    #Well, you could still solve it by adding an additional target_link_directories call before target_link_libraries, whereas remove those dependencies from
+    #AWSSDK_LINK_LIBRARIES will be more convenient and less confusing.
     AWSSDK_DETERMINE_LIBS_TO_LINK(AWSSDK_FIND_COMPONENTS AWSSDK_LINK_LIBRARIES)
+    message(STATUS "Components specified for AWSSDK: ${AWSSDK_FIND_COMPONENTS}, application wll be depending on libs: ${AWSSDK_LINK_LIBRARIES}")
+
+    # platform dependencies will be resolved automatically when doing find_package(aws-cpp-sdk-core).
+    list(REMOVE_ITEM AWSSDK_LINK_LIBRARIES ${AWSSDK_PLATFORM_DEPS})
+    # third_party dependencies will be resolved automatically when doing fidn_package(aws-cpp-sdk-core) as well.
+    list(REMOVE_ITEM AWSSDK_LINK_LIBRARIES ${AWSSDK_THIRD_PARTY_LIBS})
+
     set(AWSSDK_TARGETS ${AWSSDK_LINK_LIBRARIES})
-    # for static sdk, platform dependencies will be included in AWSSDK_LINK_LIBRARIES.
-    list(REMOVE_ITEM AWSSDK_TARGETS ${AWSSDK_PLATFORM_DEPS})
-    # for static sdk, third_party dependencies should be included in AWSSDK_LINK_LIBRARIES and should be resolved automatically by find_package(aws-cpp-sdk-core).
-    list(REMOVE_ITEM AWSSDK_TARGETS ${AWSSDK_THIRD_PARTY_LIBS})
     list(REVERSE AWSSDK_TARGETS)
-
     foreach(TARGET IN LISTS AWSSDK_TARGETS)
         message(STATUS "Try finding ${TARGET}")
         find_package(${TARGET} REQUIRED)


Update Cmake window search path

Update Cmake window search path

--- cmake/AWSSDKConfig.cmake
+++ cmake/AWSSDKConfig.cmake
@@ -51,6 +51,12 @@
 if (NOT AWSSDK_INSTALL_INCLUDEDIR)
     set(AWSSDK_INSTALL_INCLUDEDIR "include")
 endif()
+
+# on Windows or Win64 dlls are treated as runtime target and installed in bindir
+if (CMAKE_HOST_WIN32)
+    set(AWSSDK_INSTALL_LIBDIR "${AWSSDK_INSTALL_BINDIR}")
+endif()
+

 # Compute the default installation root relative to this file.
 # from prefix/lib/cmake/AWSSDK/xx.cmake to prefix
@@ -103,12 +109,6 @@
         "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_LIBDIR}/${AWSSDK_PLATFORM_PREFIX}/Release"
         "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_LIBDIR}/${AWSSDK_PLATFORM_PREFIX}/RelWithDebInfo"
         "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_LIBDIR}/${AWSSDK_PLATFORM_PREFIX}/MinSizeRel"
-        "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_BINDIR}/${AWSSDK_PLATFORM_PREFIX}"
-        "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_BINDIR}/${AWSSDK_PLATFORM_PREFIX}/Debug"
-        "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_BINDIR}/${AWSSDK_PLATFORM_PREFIX}/DebugOpt"
-        "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_BINDIR}/${AWSSDK_PLATFORM_PREFIX}/Release"
-        "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_BINDIR}/${AWSSDK_PLATFORM_PREFIX}/RelWithDebInfo"
-        "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_BINDIR}/${AWSSDK_PLATFORM_PREFIX}/MinSizeRel"
         NO_DEFAULT_PATH)

@@ -120,13 +120,6 @@
 # based on AWSSDK_CORE_LIB_FILE path, inspects the actual AWSSDK_PLATFROM_PREFIX
 get_filename_component(TEMP_PATH "${AWSSDK_CORE_LIB_FILE}" PATH)
 get_filename_component(TEMP_NAME "${TEMP_PATH}" NAME)
-
-# on Windows or Win64 dlls are treated as runtime target and installed in bindir
-if (CMAKE_HOST_WIN32)
-    set(LIB_SEARCH_PREFIX "${AWSSDK_INSTALL_BINDIR}")
-else()
-    set(LIB_SEARCH_PREFIX "${AWSSDK_INSTALL_LIBDIR}")
-endif()

 while (NOT TEMP_NAME STREQUAL ${LIB_SEARCH_PREFIX})
     set(TEMP_PLATFORM_PREFIX "${TEMP_NAME}/${TEMP_PLATFORM_PREFIX}")


inside kdesupport the location for Automoc4Config.cmake has changed

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -20,7 +20,7 @@
 # check if we are inside KDESupport and automoc is enabled
 if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project as part of kdesupport
-   set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake")
+   set(AUTOMOC4_CONFIG_FILE "${KDESupport_BINARY_DIR}/automoc/Automoc4Config.cmake")
 else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project outside kdesupport


Fix for automatic detection of GPU CUDA architecture.

Explicitly set the host compiler when building test program for querrying device peoperties.
This eliminates the need for having the compiler in PATH (issue with Visual Studio).

--- cmake/FindCudaArch.cmake
+++ cmake/FindCudaArch.cmake
@@ -43,7 +43,7 @@
       "  return 0;\n"
       "}\n")

-    EXECUTE_PROCESS(COMMAND "${CUDA_NVCC_EXECUTABLE}" "--run" "${__cufile}"
+    EXECUTE_PROCESS(COMMAND "${CUDA_NVCC_EXECUTABLE}" "--compiler-bindir" "${CMAKE_CXX_COMPILER}" "--run" "${__cufile}"
                     WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/CMakeFiles/"
                     RESULT_VARIABLE __nvcc_res OUTPUT_VARIABLE __nvcc_out
                     ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)


use XCFun v2.0.2 (fixes spin-polarized VWN3)

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -12,7 +12,7 @@
     GIT_REPOSITORY
       https://github.com/dftlibs/xcfun.git
     GIT_TAG
-      v2.0.1
+      v2.0.2
     )

   add_subdirectory(


Various fixes.

Various fixes.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -167,6 +167,10 @@
     if(CC_VERSION VERSION_GREATER 3.7 OR CC_VERSION VERSION_EQUAL 3.7)
         set(CTEST_COVERAGE_EXTRA_FLAGS "${CTEST_COVERAGE_EXTRA_FLAGS} gcov")
     endif()
+    if(CC_VERSION VERSION_EQUAL 3.6)
+        set(CTEST_COVERAGE_COMMAND "")
+        set(CTEST_COVERAGE_EXTRA_FLAGS "")
+    endif()
 elseif(CC_NAME STREQUAL "xcode")
     find_program(CTEST_COVERAGE_COMMAND NAMES llvm-cov PATHS /Library/Developer/CommandLineTools/usr/bin/)
     if(CC_VERSION VERSION_GREATER 7.3 OR CC_VERSION VERSION_EQUAL 7.3)
@@ -277,12 +281,16 @@
     if(CC_VERSION VERSION_GREATER 4.8 OR CC_VERSION VERSION_EQUAL 4.8)
         if(CC_ASAN GREATER 0)
             set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer")
+            set(CC_ASAN_FLAGS "-fuse-ld=gold")
         endif()
     endif()
 elseif(CC_NAME STREQUAL "clang")
     if(CC_VERSION VERSION_GREATER 3.1 OR CC_VERSION VERSION_EQUAL 3.1)
         if(CC_ASAN GREATER 0)
             set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer")
+            if(CC_VERSION VERSION_LESS 3.7)
+                set(CC_ASAN_FLAGS "-fuse-ld=gold")
+            endif()
         endif()
     endif()
 endif()
@@ -293,7 +301,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_FLAGS=-fuse-ld=gold -fsanitize=address -fno-omit-frame-pointer")
+    ctest_configure(OPTIONS "-DCI_FLAGS=${CC_ASAN_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
     ctest_build()
     ctest_test()
     ctest_memcheck()


- Fix to FindStandardLibs.cmake

- Fix to FindStandardLibs.cmake

--- cmake/Find/FindStandardLibs.cmake
+++ cmake/Find/FindStandardLibs.cmake
@@ -109,5 +109,4 @@
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(StandardLibs
     REQUIRED_VARS
     STANDARDLIBS_LIBRARIES
-    STANDARDLIBS_INCLUDE_DIR
 )


Fix issue where windows would build sqlite3 as a DLL instead of a static lib

--- cmake/modules/Build-sqlite3.cmake
+++ cmake/modules/Build-sqlite3.cmake
@@ -27,7 +27,7 @@
       URL https://sqlite.org/2019/sqlite-amalgamation-3270200.zip
       URL_HASH SHA1=0bafa4f52c19b8a917ad31048d22787d2e25be68
       CONFIGURE_COMMAND ""
-      BUILD_COMMAND cl sqlite3.c -link -dll -out:${SQLITE3_INSTALL_DIR}/lib/libsqlite3.lib
+      BUILD_COMMAND cl /c /EHsc sqlite3.c && lib sqlite3.obj /OUT:${SQLITE3_INSTALL_DIR}/lib/libsqlite3.lib
       BUILD_IN_SOURCE true
       BUILD_BYPRODUCTS ${_byproducts}
       INSTALL_COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>" "<INSTALL_DIR>/include/" "*.h"


Fail configuration if the specified CMAKE_BUILD_TYPE is unknown

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -19,7 +19,6 @@
 else()
   set(CXX ${CMAKE_CXX_COMPILER})
 endif()
-string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)

 #----Test if clang setup works----------------------------------------------------------------------
 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
@@ -60,6 +59,11 @@
 set(CMAKE_CONFIGURATION_TYPES Release MinSizeRel Debug RelWithDebInfo Optimized)
 if(NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: Release, MinSizeRel, Debug, RelWithDebInfo, Optimized." FORCE)
+endif()
+string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
+string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" uppercase_CMAKE_CONFIGURATION_TYPES)
+if(NOT "${uppercase_CMAKE_CONFIGURATION_TYPES}" MATCHES "${uppercase_CMAKE_BUILD_TYPE}")
+  message(FATAL_ERROR "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} needs to be one of known build types: ${CMAKE_CONFIGURATION_TYPES}")
 endif()

 include(CheckCXXCompilerFlag)


ENH: Tell ExternalData to look at an itk.org URL for data objects

This URL is populated automatically from data pushed to Gerrit by the
git-gerrit-push script.

--- CMake/ITKExternalData.cmake
+++ CMake/ITKExternalData.cmake
@@ -6,6 +6,9 @@

   # Data published by MIDAS
   "http://midas.kitware.com/api/rest/midas.bitstream.by.hash?hash=%(hash)&algorithm=%(algo)"
+
+  # Data published by developers using git-gerrit-push.
+  "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"
   )

 # Tell ExternalData commands to transform raw files to content links.


Don't add QtSOAP library dirs because it is static.

--- CMakeExternals/QtSOAP.cmake
+++ CMakeExternals/QtSOAP.cmake
@@ -34,9 +34,8 @@
       )
     SET(QtSOAP_DIR "${ep_build_dir}/${proj}")

-    # Since the link directories associated with QtSOAP is used, it makes sens to
-    # update CTK_EXTERNAL_LIBRARY_DIRS with its associated library output directory
-    LIST(APPEND CTK_EXTERNAL_LIBRARY_DIRS ${QtSOAP_DIR}/bin)
+    # Since QtSOAP is statically build, there is not need to add its corresponding
+    # library output directory to CTK_EXTERNAL_LIBRARY_DIRS

   ELSE()
     ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")


ENH: refs #0090. Support multiple file references in a single argument

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -82,38 +82,43 @@

   # Substitute the downloaded file argument(s)
   foreach(arg ${ARGN})
-    if(arg MATCHES "MIDAS[a-zA-Z_]*{[^}]*}")
-      string(REGEX MATCH "MIDAS[a-zA-Z_]*{([^}]*)}" toReplace "${arg}")
-      string(REGEX MATCH "^MIDAS[a-zA-Z_]*" keyword "${toReplace}")
-      string(REGEX REPLACE "MIDAS[a-zA-Z_]*{([^}]*)}" "\\1" parameter "${toReplace}")
-      if(keyword STREQUAL "MIDAS_DIRECTORY")
-        file(GLOB fileList RELATIVE "${MIDAS_KEY_DIR}" "${MIDAS_KEY_DIR}/${parameter}/*")
-        foreach(keyFile ${fileList})
-          if(NOT IS_DIRECTORY "${MIDAS_KEY_DIR}/${keyFile}")
-            _process_keyfile("${keyFile}" ${testName} 0)
-          endif(NOT IS_DIRECTORY "${MIDAS_KEY_DIR}/${keyFile}")
-        endforeach(keyFile ${fileList})
-      elseif(keyword STREQUAL "MIDAS_TGZ")
-        _process_keyfile("${parameter}" ${testName} 1)
-      else()
-        _process_keyfile("${parameter}" ${testName} 0)
-      endif(keyword STREQUAL "MIDAS_DIRECTORY")
-
-      if(keyword STREQUAL "MIDAS_DIRECTORY")
-        string(REGEX REPLACE ${toReplace} "${MIDAS_DATA_DIR}/${parameter}" newArg "${arg}")
+    if(NOT arg MATCHES "MIDAS[a-zA-Z_]*{[^}]*}")
+      list(APPEND testArgs ${arg})
+    else()
+      while(arg MATCHES "MIDAS[a-zA-Z_]*{[^}]*}")
+        string(REGEX MATCH "MIDAS[a-zA-Z_]*{([^}]*)}" toReplace "${arg}")
+        string(REGEX MATCH "^MIDAS[a-zA-Z_]*" keyword "${toReplace}")
+        string(REGEX REPLACE "MIDAS[a-zA-Z_]*{([^}]*)}" "\\1" parameter "${toReplace}")
+        if(keyword STREQUAL "MIDAS_DIRECTORY")
+          file(GLOB fileList RELATIVE "${MIDAS_KEY_DIR}" "${MIDAS_KEY_DIR}/${parameter}/*")
+          foreach(keyFile ${fileList})
+            if(NOT IS_DIRECTORY "${MIDAS_KEY_DIR}/${keyFile}")
+              _process_keyfile("${keyFile}" ${testName} 0)
+            endif(NOT IS_DIRECTORY "${MIDAS_KEY_DIR}/${keyFile}")
+          endforeach(keyFile ${fileList})
+        elseif(keyword STREQUAL "MIDAS_TGZ")
+          _process_keyfile("${parameter}" ${testName} 1)
+        else()
+          _process_keyfile("${parameter}" ${testName} 0)
+        endif(keyword STREQUAL "MIDAS_DIRECTORY")
+
+        if(keyword STREQUAL "MIDAS_DIRECTORY")
+          string(REGEX REPLACE ${toReplace} "${MIDAS_DATA_DIR}/${parameter}" newArg "${arg}")
+        elseif(keyword STREQUAL "MIDAS_TGZ")
+          get_filename_component(extractedPath "${parameter}" PATH)
+          get_filename_component(dirName "${parameter}" NAME_WE)
+          string(REGEX REPLACE ${toReplace} "${MIDAS_DATA_DIR}/${extractedPath}/${dirName}" newArg "${arg}")
+        elseif(NOT keyword STREQUAL "MIDAS_FETCH_ONLY")
+          string(REGEX REPLACE ${toReplace} "${MIDAS_DATA_DIR}/${base_file}" newArg "${arg}")
+        endif(keyword STREQUAL "MIDAS_DIRECTORY")
+
+        set(arg ${newArg})
+      endwhile(arg MATCHES "MIDAS[a-zA-Z_]*{[^}]*}")
+
+      if(NOT keyword STREQUAL "MIDAS_FETCH_ONLY")
         list(APPEND testArgs ${newArg})
-      elseif(keyword STREQUAL "MIDAS_TGZ")
-        get_filename_component(extractedPath "${parameter}" PATH)
-        get_filename_component(dirName "${parameter}" NAME_WE)
-        string(REGEX REPLACE ${toReplace} "${MIDAS_DATA_DIR}/${extractedPath}/${dirName}" newArg "${arg}")
-        list(APPEND testArgs ${newArg})
-      elseif(NOT keyword STREQUAL "MIDAS_FETCH_ONLY")
-        string(REGEX REPLACE ${toReplace} "${MIDAS_DATA_DIR}/${base_file}" newArg "${arg}")
-        list(APPEND testArgs ${newArg})
-      endif(keyword STREQUAL "MIDAS_DIRECTORY")
-    else(arg MATCHES "MIDAS[a-zA-Z_]*{[^}]*}")
-      list(APPEND testArgs ${arg})
-    endif(arg MATCHES "MIDAS[a-zA-Z_]*{[^}]*}")
+      endif(NOT keyword STREQUAL "MIDAS_FETCH_ONLY")
+    endif(NOT arg MATCHES "MIDAS[a-zA-Z_]*{[^}]*}")
   endforeach(arg)

   file(WRITE "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/${testName}_fetchData.cmake"


- Linux CI

- Linux CI

--- CMake/Common.cmake
+++ CMake/Common.cmake
@@ -13,6 +13,16 @@
 set(PBD_BINARY_MINSIZEREL_POSTFIX "_ms" CACHE INTERNAL "Postfix for executables")

 include(CMakeDependentOption)
+
+cmake_dependent_option(USE_PYTHON_BINDINGS "Generate Python Bindings using PyBind11" ON "PYTHON_EXECUTABLE" OFF)
+if (USE_PYTHON_BINDINGS AND UNIX)
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+    message(STATUS "Adding -fPIC option when generating Python bindings using GCC")
+endif ()
+
+option(CI_BUILD "Build on CI System" OFF)
+mark_as_advanced(CI_BUILD)

 if (NOT WIN32)
 	if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
@@ -45,9 +55,14 @@
 if (UNIX OR MINGW)
     set(CMAKE_USE_RELATIVE_PATHS "1")
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
-    # Set compiler flags for "release"
-    set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -march=native")
-	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG -march=native")
+    # Set compiler flags for "release" Use generic 64 bit instructions when building on CI
+	if (CI_BUILD)
+		set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -march=x86-64")
+		set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG -march=x86-64")
+	else()
+		set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -march=native")
+		set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG -march=native")
+	endif ()
 endif (UNIX OR MINGW)
 if(MINGW)
 	set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1 -Wa,-mbig-obj")
@@ -67,10 +82,3 @@
 if (USE_DOUBLE_PRECISION)
 	add_definitions( -DUSE_DOUBLE)
 endif (USE_DOUBLE_PRECISION)
-
-cmake_dependent_option(USE_PYTHON_BINDINGS "Generate Python Bindings using PyBind11" ON "PYTHON_EXECUTABLE" OFF)
-if (USE_PYTHON_BINDINGS AND UNIX)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
-    message(STATUS "Adding -fPIC option when generating Python bindings using GCC")
-endif ()


New version: 0.4.4

New version: 0.4.4

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "4")
-SET(HAWKEY_PATCH "3")
+SET(HAWKEY_PATCH "4")


Issue #51: Try simple OpenCV build, removing LAPACK on Mac, and imgproc.

--- CMake/ExternalProjects/OpenCV.cmake
+++ CMake/ExternalProjects/OpenCV.cmake
@@ -50,8 +50,20 @@
     -DWITH_FFMPEG:BOOL=OFF
     -DWITH_OPENMP:BOOL=${MYPROJECT_USE_OPENMP}
   )
+  if (NOT APPLE)
+    list(APPEND _vtk_options
+      -DWITH_LAPACK:BOOL=ON
+    )
+  else()
+    list(APPEND _vtk_options
+      -DWITH_LAPACK:BOOL=OFF
+    )
+  endif()

   if(BUILD_Python_Boost OR BUILD_Python_PyBind)
+
+    message("Building minimum OpenCV modules, as you want a Python build.")
+
     list(APPEND _vtk_options
       -DBUILD_opencv_apps:BOOL=OFF
       -DBUILD_opencv_calib3d:BOOL=ON
@@ -62,7 +74,7 @@
       -DBUILD_opencv_gapi:BOOL=OFF
       -DBUILD_opencv_highgui:BOOL=OFF
       -DBUILD_opencv_imgcodecs:BOOL=OFF
-      -DBUILD_opencv_imgproc:BOOL=ON
+      -DBUILD_opencv_imgproc:BOOL=OFF
       -DBUILD_opencv_java_bindings_generator:BOOL=OFF
       -DBUILD_opencv_js:BOOL=OFF
       -DBUILD_opencv_ml:BOOL=OFF


extended list by loggingzeug vars set in cmake config

--- libzeug-config.cmake
+++ libzeug-config.cmake
@@ -33,6 +33,11 @@
 # LIBZEUG_SCRIPT_LIBRARY_RELEASE
 # LIBZEUG_SCRIPT_LIBRARY_DEBUG
 # LIBZEUG_SCRIPT_INCLUDE_DIR
+
+# LIBZEUG_LOGGING_LIBRARY
+# LIBZEUG_LOGGING_LIBRARY_RELEASE
+# LIBZEUG_LOGGING_LIBRARY_DEBUG
+# LIBZEUG_LOGGING_INCLUDE_DIR


Add helper function to install headers

Add helper function to install headers

Add an additional helper function lcm_install_headers for installing
C/C++ headers. Very much like lcm_install_python, the main advantage to
this is that it preserves the package name subdirectory components.
(Internally, the two functions share about half their logic, with only
the default destination differing.)

--- lcm-cmake/lcmUtilities.cmake
+++ lcm-cmake/lcmUtilities.cmake
@@ -125,6 +125,15 @@
   foreach(_package ${_lua_packages})
     set(_init "${_DESTINATION}/${_package}/init.lua")
     file(APPEND ${_init} "\nreturn M\n")
+  endforeach()
+endfunction()
+
+#------------------------------------------------------------------------------
+function(_lcm_install_files DESTINATION RELATIVE_PATH)
+  foreach(_file ${ARGN})
+    file(RELATIVE_PATH _package_dir ${RELATIVE_PATH} ${_file})
+    get_filename_component(_package_dir ${_package_dir} PATH)
+    install(FILES ${_file} DESTINATION ${DESTINATION}/${_package_dir})
   endforeach()
 endfunction()

@@ -306,6 +315,25 @@
 endfunction()

 #------------------------------------------------------------------------------
+function(lcm_install_headers)
+  # Parse arguments
+  set(_flags "")
+  set(_sv_opts DESTINATION RELATIVE_PATH)
+  set(_mv_opts "")
+  cmake_parse_arguments("" "${_flags}" "${_sv_opts}" "${_mv_opts}" ${ARGN})
+
+  # Set default destination and relative path, if none given
+  if(NOT DEFINED _DESTINATION)
+    set(_DESTINATION include)
+  endif()
+  if(NOT DEFINED _RELATIVE_PATH)
+    set(_RELATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+  endif()
+
+  _lcm_install_files(${_DESTINATION} ${_RELATIVE_PATH} ${_UNPARSED_ARGUMENTS})
+endfunction()
+
+#------------------------------------------------------------------------------
 function(lcm_install_python)
   # Parse arguments
   set(_flags "")
@@ -328,9 +356,5 @@
     set(_RELATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}")
   endif()

-  foreach(_file ${_UNPARSED_ARGUMENTS})
-    file(RELATIVE_PATH _package_dir ${_RELATIVE_PATH} ${_file})
-    get_filename_component(_package_dir ${_package_dir} PATH)
-    install(FILES ${_file} DESTINATION ${_DESTINATION}/${_package_dir})
-  endforeach()
-endfunction()
+  _lcm_install_files(${_DESTINATION} ${_RELATIVE_PATH} ${_UNPARSED_ARGUMENTS})
+endfunction()


Do not set for Clang libc++, it is already set inside in top level compiler flags

--- math/vc/cmake/VcMacros.cmake
+++ math/vc/cmake/VcMacros.cmake
@@ -376,7 +376,8 @@
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wno-local-type-template-args")
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wno-unnamed-type-template-args")

-      AddCompilerFlag(-stdlib=libc++)
+#not needed in ROOT
+#      AddCompilerFlag(-stdlib=libc++)
    endif()

    if(NOT Vc_COMPILER_IS_MSVC)


Fix whitespaces

Fix whitespaces

--- cmake/Modules/cvmfs_options.cmake
+++ cmake/Modules/cvmfs_options.cmake
@@ -14,7 +14,7 @@
 option (BUILD_GEOAPI            "Build the geo api service"                                        ON)
 option (BUILD_LIBCVMFS          "Build the CernVM-FS client library"                               ON)
 option (BUILD_LIBCVMFS_CACHE    "Build the cache plugin library"                                   ON)
-option (BUILD_SHRINKWRAP  "Build the shrinkwrap tool"                                        OFF)
+option (BUILD_SHRINKWRAP        "Build the shrinkwrap tool"                                        OFF)

 option (BUILD_PRELOADER         "Build the alien cache pre-loader"                                 OFF)
 option (BUILD_SERVER_DEBUG      "Build writer's end programs with debug symbols and debug outputs" OFF)


Temporary fix for cnats

Temporary fix for cnats

--- cmake/projects/cnats/hunter.cmake
+++ cmake/projects/cnats/hunter.cmake
@@ -12,9 +12,9 @@
     VERSION
     "1.5.0"
     URL
-    "https://github.com/nats-io/cnats/archive/v1.5.0.tar.gz"
+    "https://github.com/dmpriso/cnats/archive/dmpriso1.tar.gz"
     SHA1
-    0343535115F65E3B7B790557EE47D937AA3D24A4
+    83DC3BD1B5DAEB141AA705CA3C8C843AE3599283
 )

 # Probably more versions for real packages...


ENH: Update GSL to 2.7

ENH: Update GSL to 2.7

--- SuperBuild/CMake/External_gsl.cmake
+++ SuperBuild/CMake/External_gsl.cmake
@@ -24,13 +24,14 @@

 ExternalProject_Add(GSL
   PREFIX GSL
-  URL "https://github.com/ampl/gsl/archive/v2.3.0.tar.gz"
-  DOWNLOAD_NAME gsl_v2.3.0.tar.gz
-  URL_MD5 7e0478f7c5e62696fef480b9a46f708c
+  URL "https://github.com/ampl/gsl/archive/v2.7.0.tar.gz"
+  DOWNLOAD_NAME gsl_v2.7.0.tar.gz
+  URL_MD5 566ca5f5f08057aa6572aecf7fd67eb9
   BINARY_DIR ${GSL_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
+  -DNO_AMPL_BINDINGS:BOOL=ON
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   DEPENDS ${GSL_DEPENDENCIES}
   LOG_DOWNLOAD 1


Add -D_FORTIFY_SOURCE=2 to our builds

Add -D_FORTIFY_SOURCE=2 to our builds

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -15,6 +15,9 @@
  # limitations under the License.
  #
  ###############################################################
+
+
+add_definitions(-D_FORTIFY_SOURCE=2)

 # OS pre mods
 if(${OS_NAME} STREQUAL "DARWIN")


Disable pthreads under Mac OS X 10.6, which lacks PTHREAD_RECURSIVE_MUTEX_INITIALIZER and PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -388,7 +388,7 @@
 	  find_library(HAVE_X11 X11)
 	endif()

-	dprint("Threaded functionality only enabled in Linux, Windows, and Mac")
+	dprint("Threaded functionality only enabled in Linux, Windows, and Mac OS X > 10.6")
 	set(HAS_PTHREADS ${CMAKE_USE_PTHREADS_INIT})
 	set(HAVE_PTHREADS ${CMAKE_USE_PTHREADS_INIT})

@@ -414,9 +414,17 @@
 	find_library( COREFOUNDATION_FOUND CoreFoundation )
 	set(CMAKE_STRIP ${CMAKE_SOURCE_DIR}/src/condor_scripts/macosx_strip CACHE FILEPATH "Command to remove sybols from binaries" FORCE)

-	dprint("Threaded functionality only enabled in Linux, Windows and Mac")
-	set(HAS_PTHREADS ${CMAKE_USE_PTHREADS_INIT})
-	set(HAVE_PTHREADS ${CMAKE_USE_PTHREADS_INIT})
+	dprint("Threaded functionality only enabled in Linux, Windows and Mac OS X > 10.6")
+
+	check_symbol_exists(PTHREAD_RECURSIVE_MUTEX_INITIALIZER "pthread.h" HAVE_DECL_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+	check_symbol_exists(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP "pthread.h" HAVE_DECL_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+	if (HAVE_DECL_PTHREAD_RECURSIVE_MUTEX_INITIALIZER OR HAVE_DECL_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+		set(HAS_PTHREADS ${CMAKE_USE_PTHREADS_INIT})
+		set(HAVE_PTHREADS ${CMAKE_USE_PTHREADS_INIT})
+	else()
+		set(HAS_PTHREADS FALSE)
+		set(HAVE_PTHREADS FALSE)
+	endif()
 endif()

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


[FIX] Automatic detection of Matlab on MacOS X. Matlab must be installed in the folder /Applications

git-svn-id: ed06c97986a68fa016311908f99ed1538fbb9b5d@243 93be6e1e-6fcc-11de-baec-69240fdc299a

--- CMake/FindMatlab.cmake
+++ CMake/FindMatlab.cmake
@@ -84,51 +84,71 @@
 ELSE(WIN32)
   # MEX files extension
   IF(APPLE)
-    IF(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
+    FILE(GLOB MATLAB_PATHS "/Applications/MATLAB_*")
+    FIND_PATH(MATLAB_ROOT "license.txt" ${MATLAB_PATHS})
+    IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+      SET(MBITS 32)
+      IF(CMAKE_OSX_ARCHITECTURES MATCHES ppc)
+        SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/mac")
+          SET(MATLAB_MEXFILE_EXT mexmac)
+        ELSE(CMAKE_OSX_ARCHITECTURES MATCHES ppc)
+        SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/maci")
+          SET(MATLAB_MEXFILE_EXT mexmaci)
+        ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES ppc)
+    ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
+      IF(EXISTS "${MATLAB_ROOT}/bin/maci64/")
+      SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/maci64")
+      SET(MATLAB_MEXFILE_EXT mexmaci64)
+      ELSE(EXISTS "${MATLAB_ROOT}/bin/maci64/")
+      MESSAGE("You use a Matlab 32 bits version on a 64 bits OS. BTK will be compiled in 32 bits to be useble with your Matlab version.")
+      SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/maci")
       SET(MATLAB_MEXFILE_EXT mexmaci)
-    ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
-      SET(MATLAB_MEXFILE_EXT mexmac)
-    ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
+      SET(CMAKE_CXX_FLAGS "-m32" CACHE STRING "Flags used by the compiler during all build types." FORCE)
+      ENDIF(EXISTS "${MATLAB_ROOT}/bin/maci64/")
+    ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+
     SET(LIBMEX "libmex.dylib")
     SET(LIBMX "libmx.dylib")
     SET(LIBENG "libeng.dylib")
-   ELSE(APPLE)
+  ELSE(APPLE)
     SET(MATLAB_MEXFILE_EXT mexglx)
     SET(LIBMEX "libmex.so")
     SET(LIBMX "libmx.so")
     SET(LIBENG "libeng.so")
+
+    FIND_PATH(MATLAB_ROOT "license.txt" ${MATLAB_PATHS})
+    IF(NOT MATLAB_ROOT)
+      MESSAGE("Linux users have to set the Matlab installation path into the MATLAB_ROOT variable")
+    ENDIF(NOT MATLAB_ROOT)
+
+    IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+      # Regular x86
+      SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/glnx86")
+    ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
+      # AMD64:
+      SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/glnxa64")
+    ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
   ENDIF(APPLE)
-
-  FIND_PATH(MATLAB_ROOT "license.txt" ${MATLAB_PATHS})
-  IF(NOT MATLAB_ROOT)
-    MESSAGE("Linux/MacOS users have to set the Matlab installation path into the MATLAB_ROOT variable")
-  ENDIF(NOT MATLAB_ROOT)
-  IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
-    # Regular x86
-    SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/glnx86")
-  ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
-    # AMD64:
-    SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/glnxa64")
-  ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
-
-  SET(MATLAB_INCLUDE_PATHS "${MATLAB_ROOT}/extern/include/")
+
+  # Common for UNIX
+  SET(MATLAB_INCLUDE_PATHS "${MATLAB_ROOT}/extern/include")
 ENDIF(WIN32)

 FIND_LIBRARY(MATLAB_MEX_LIBRARY
     ${LIBMEX}
-    ${MATLAB_LIBRARIES_PATHS}
+    ${MATLAB_LIBRARIES_PATHS} NO_DEFAULT_PATH
     )
 FIND_LIBRARY(MATLAB_MX_LIBRARY
     ${LIBMX}
-    ${MATLAB_LIBRARIES_PATHS}
+    ${MATLAB_LIBRARIES_PATHS} NO_DEFAULT_PATH
     )
 FIND_LIBRARY(MATLAB_ENG_LIBRARY
     ${LIBENG}
-    ${MATLAB_LIBRARIES_PATHS}
+    ${MATLAB_LIBRARIES_PATHS} NO_DEFAULT_PATH
     )
 FIND_PATH(MATLAB_INCLUDE_DIR
     "mex.h"
-    ${MATLAB_INCLUDE_PATHS}
+    ${MATLAB_INCLUDE_PATHS} NO_DEFAULT_PATH
     )

 # This is common to UNIX and Win32:


BUG: Bump ImageViewer version.

BUG: Bump ImageViewer version.

Includes ExternalProject, FLTK patch, and gui initializion fixes.

Change-Id: Iff68c2e47b14f07f9b085597618f2f05e19fd457

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -370,7 +370,7 @@
 set( proj ImageViewer )
 ExternalProject_Add( ImageViewer
   GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/TubeTK/ImageViewer.git"
-  GIT_TAG "914c6127d5c07332ed3b365ae8308a584f276445"
+  GIT_TAG "c8d2f3c9d148824dc3d0f05d37bbb7e141651b6f"
   SOURCE_DIR "${CMAKE_BINARY_DIR}/ImageViewer"
   BINARY_DIR ImageViewer-Build
   CMAKE_GENERATOR ${gen}


Add zlib functionality

Add zlib functionality

--- deps/zlib.cmake
+++ deps/zlib.cmake
@@ -10,7 +10,6 @@
 else (WithSharedZLIB)
   message("Enabling Static ZLIB")
   add_subdirectory(deps/zlib)
-  list(APPEND LIB_LIST zlibstatic)
 endif (WithSharedZLIB)

 add_definitions(-DWITH_ZLIB)


Fix Lua compilation with Lua51

Fix Lua compilation with Lua51

When passing some FLAGS to the compilation macro, if the flags were
equal to "" then the default flags were used instead. This trigger a
problem with the compilation of interactive.lua as it ended loosing all
debug information which prevent to correctly use the interactive mode.

--- build/UseLua.cmake
+++ build/UseLua.cmake
@@ -30,14 +30,15 @@
 	set(multiValueArgs FILES FLAGS)
 	cmake_parse_arguments(LUA_COMPILE "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

-	set(LUA_COMPILE_COMPILED_FILES "")
+	set(ARGS_LIST "${ARGN}")
+	list(FIND ARGS_LIST "FLAGS" LUA_COMPILE_HAS_FLAGS)

-	if(LUA_COMPILE_FLAGS)
-		set(LUA_FLAGS "${LUA_COMPILE_FLAGS}")
-	else(LUA_COMPILE_FLAGS)
+	if(LUA_COMPILE_HAS_FLAGS EQUAL -1)
 		string(TOUPPER "LUA_FLAGS_${CMAKE_BUILD_TYPE}" LUA_FLAGS)
 		set(LUA_FLAGS "${${LUA_FLAGS}}")
-	endif(LUA_COMPILE_FLAGS)
+	else()
+		set(LUA_FLAGS "${LUA_COMPILE_FLAGS}")
+	endif()

 	foreach(it ${LUA_COMPILE_FILES})
 		get_filename_component(lua_source_file_path "${it}" ABSOLUTE)


fix gcc detection on linux

fix gcc detection on linux

--- toolchains/linux.toolchain.cmake
+++ toolchains/linux.toolchain.cmake
@@ -17,7 +17,7 @@
 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     include( "${CMAKE_CURRENT_LIST_DIR}/clang.cmake" )
 else()
-    include( "${CMAKE_CURRENT_LIST_DIR}/gcc_compatibles.cmake" )
+    include( "${CMAKE_CURRENT_LIST_DIR}/gcc.cmake" )
 endif()

 option( TNUN_STATIC_LIBC "Link all binaries statically with libc and libc++" false )


Always keep track of the hierarchy level.

--- CPM.cmake
+++ CPM.cmake
@@ -186,14 +186,17 @@
 # Clear out any definitions a parent_scope might have declared.
 set(CPM_DEFINITIONS)

+if (DEFINED CPM_HIERARCHY_LEVEL)
+  math(EXPR CPM_HIERARCHY_LEVEL "${CPM_HIERARCHY_LEVEL}+1")
+else()
+  set(CPM_HIERARCHY_LEVEL 0)
+endif()
+
 # Increment the module hierarchy level if it exists.
 if ((DEFINED CPM_SHOW_HIERARCHY) AND (CPM_SHOW_HIERARCHY))
-  if (DEFINED CPM_HIERARCHY_LEVEL)
-    math(EXPR CPM_HIERARCHY_LEVEL "${CPM_HIERARCHY_LEVEL}+1")
-  else()
-    set(CPM_HIERARCHY_LEVEL 0)
+  if (CPM_HIERARCHY_LEVEL EQUAL 0)
     message("CPM Module Dependency Hierarchy:")
-    message("Top")
+    message("Root")
   endif()
 endif()


Re-add last_module_name check.

Re-add last_module_name check.

--- CPM.cmake
+++ CPM.cmake
@@ -717,11 +717,11 @@

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


The user can now select which version of QtMobility should be used to binding generation.

The command line option is called "MOBILITY_VERSION" and the possible
options (on Fremantle) are "default", "1.1" and "1.2".

Example usage: cmake .. -DMOBILITY_VERSION=1.1

Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>

--- cmake/Modules/FindQtMobility.cmake
+++ cmake/Modules/FindQtMobility.cmake
@@ -20,13 +20,40 @@
     ENDIF()
 endmacro()

-if(EXISTS "${QT_MKSPECS_DIR}/features/mobility12.prf")
-    set(MOBILITY_PRF_FILE "${QT_MKSPECS_DIR}/features/mobility12.prf")
-elseif(EXISTS "${QT_MKSPECS_DIR}/features/mobility11.prf")
-    set(MOBILITY_PRF_FILE "${QT_MKSPECS_DIR}/features/mobility11.prf")
-elseif(EXISTS "${QT_MKSPECS_DIR}/features/mobility.prf")
-    set(MOBILITY_PRF_FILE "${QT_MKSPECS_DIR}/features/mobility.prf")
+set(VERSION_INFO "")
+set(FEATURE_FILE_PREFIX "${QT_MKSPECS_DIR}/features/mobility")
+
+if(DEFINED MOBILITY_VERSION)
+    if(MOBILITY_VERSION STREQUAL "1.1" AND EXISTS "${FEATURE_FILE_PREFIX}11.prf")
+        set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}11.prf")
+        set(VERSION_INFO "1.1")
+    elseif(MOBILITY_VERSION STREQUAL "1.2" AND EXISTS "${FEATURE_FILE_PREFIX}12.prf")
+        set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}12.prf")
+        set(VERSION_INFO "1.2")
+    elseif(MOBILITY_VERSION STREQUAL "default" AND EXISTS "${FEATURE_FILE_PREFIX}.prf")
+        set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}.prf")
+        set(VERSION_INFO "system's default")
+    else()
+        message(STATUS "Couldn't find QtMobility version: ${MOBILITY_VERSION}")
+    endif()
 endif()
+
+if(NOT DEFINED MOBILITY_PRF_FILE)
+    if(EXISTS "${FEATURE_FILE_PREFIX}.prf")
+        set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}.prf")
+        set(VERSION_INFO "system's default")
+    elseif(EXISTS "${FEATURE_FILE_PREFIX}12.prf")
+        set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}12.prf")
+        set(VERSION_INFO "1.2")
+    elseif(EXISTS "${FEATURE_FILE_PREFIX}11.prf")
+        set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}11.prf")
+        set(VERSION_INFO "1.1")
+    else()
+        message(FATAL_ERROR "Couldn't find any version of QtMobility.")
+    endif()
+endif()
+
+message(STATUS "Using QtMobility version: ${VERSION_INFO}")

 IF(DEFINED MOBILITY_PRF_FILE)
     FILE(READ ${MOBILITY_PRF_FILE} MOBILITY_FILE_CONTENTS)


gpgme++/ConfigureChecks.cmake: fix test program (failed on VC, succeeded on gcc)

svn path=/trunk/KDE/kdepimlibs/; revision=1203341

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -253,7 +253,6 @@
 check_cxx_source_compiles ("
   #include <gpgme.h>
   int main() {
-    gpgme_protocol_t proto = GPGME_PROTOCOL_GPGCONF;
     const gpgme_protocol_t proto = GPGME_PROTOCOL_GPGCONF;
     gpgme_ctx_t ctx = 0;
     gpgme_conf_comp_t comp = 0;


change ilplib from static to dynamic

change ilplib from static to dynamic

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -19,7 +19,7 @@
 FIND_PACKAGE(wisekma REQUIRED)
 FIND_PACKAGE(izenecma REQUIRED)
 FIND_PACKAGE(izenejma REQUIRED)
-FIND_PACKAGE(ilplib REQUIRED COMPONENTS ilplib)
+FIND_PACKAGE(ilplib REQUIRED)
 FIND_PACKAGE(imllib REQUIRED)
 FIND_PACKAGE(xml2 REQUIRED)


[CMake][Fuchsia] Use RelWithDebInfo to build runtimes

We want to preserve debug info in our runtimes to aid symbolization and
debugging; for shared libraries this will be stripped away during
install-stripped step and distributed via .build-id, for static archives
it's part of the archive and it's a responsibility of the consumer to
strip it away in the final binary if not needed.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@365845 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -58,7 +58,7 @@
     # Set the per-target builtins options.
     list(APPEND BUILTIN_TARGETS "${target}")
     set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
-    set(BUILTINS_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
+    set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
     set(BUILTINS_${target}_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
     set(BUILTINS_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
     set(BUILTINS_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
@@ -67,7 +67,7 @@
     # Set the per-target runtimes options.
     list(APPEND RUNTIME_TARGETS "${target}")
     set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
-    set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
+    set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
     set(RUNTIMES_${target}_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
     set(RUNTIMES_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
     set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
@@ -107,7 +107,7 @@
     # Set the per-target builtins options.
     list(APPEND BUILTIN_TARGETS "${target}-unknown-fuchsia")
     set(BUILTINS_${target}-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
-    set(BUILTINS_${target}-unknown-fuchsia_CMAKE_BUILD_TYPE Release CACHE STRING "")
+    set(BUILTINS_${target}-unknown-fuchsia_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
     set(BUILTINS_${target}-unknown-fuchsia_CMAKE_ASM_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "")
     set(BUILTINS_${target}-unknown-fuchsia_CMAKE_C_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "")
     set(BUILTINS_${target}-unknown-fuchsia_CMAKE_CXX_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "")
@@ -119,7 +119,7 @@
     # Set the per-target runtimes options.
     list(APPEND RUNTIME_TARGETS "${target}-unknown-fuchsia")
     set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
-    set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_BUILD_TYPE Release CACHE STRING "")
+    set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
     set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "")
     set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_ASM_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "")
     set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_C_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "")


[CMake] Enable ARM target in Fuchsia toolchain

This is still used by some users of Fuchsia toolchain. Also include
llc and opt which is useful for development and testing.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@300917 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -1,7 +1,7 @@
 # This file sets up a CMakeCache for the second stage of a Fuchsia toolchain
 # build.

-set(LLVM_TARGETS_TO_BUILD X86;AArch64 CACHE STRING "")
+set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "")

 set(PACKAGE_VENDOR Fuchsia CACHE STRING "")

@@ -36,6 +36,7 @@
 # Setup toolchain.
 set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
 set(LLVM_TOOLCHAIN_TOOLS
+  llc
   llvm-ar
   llvm-cov
   llvm-cxxfilt
@@ -49,6 +50,7 @@
   llvm-readobj
   llvm-size
   llvm-symbolizer
+  opt
   CACHE STRING "")

 set(LLVM_DISTRIBUTION_COMPONENTS


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/vmime/hunter.cmake
+++ cmake/projects/vmime/hunter.cmake
@@ -3,6 +3,13 @@
 include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)
+
+hunter_add_version(
+	PACKAGE_NAME vmime
+	VERSION "0.9.3.0"
+	URL "https://github.com/designerror/vmime/archive/v0.9.3.0.tar.gz"
+	SHA1 673cb177c2818ddefceda231a5841ba2b8803679
+)

 hunter_add_version(
 	PACKAGE_NAME vmime


make possible to disable gadgetron checkouts

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -74,10 +74,13 @@
   mark_as_advanced(${proj}_USE_CUDA)

+  # Sets ${proj}_URL_MODIFIED and ${proj}_TAG_MODIFIED
+  SetGitTagAndRepo("${proj}")
+
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
-    GIT_REPOSITORY ${${proj}_URL}
-    GIT_TAG ${${proj}_TAG}
+    GIT_REPOSITORY "${${proj}_URL_MODIFIED}"
+    GIT_TAG "${${proj}_TAG_MODIFIED}"
     ${${proj}_EP_ARGS_DIRS}

     CMAKE_ARGS


changed: allow OSG_GL_INCLUDE_GLEW to be externally overriden

--- OSGConfigured.h.cmake
+++ OSGConfigured.h.cmake
@@ -59,7 +59,9 @@

 #cmakedefine OSG_USE_OGLES_PROTOS 1

+#if !defined(OSG_GL_INCLUDE_GLEW)
 #cmakedefine OSG_GL_INCLUDE_GLEW 1
+#endif

 #cmakedefine OSG_OGL_NO_DOUBLE 1


Ensure that the import target is always built and directory created.

Previously we would add the dependency to add_custom_command although
that doesn't quite work right, so just add it directly to the relevant
target.

--- VeraPPUtilities.cmake
+++ VeraPPUtilities.cmake
@@ -423,11 +423,17 @@
                                   MODE ${MODE}
                                   ${CHECK_GENERATED_OPTION})

+    # Ensure that the directory always exists.
+    file (MAKE_DIRECTORY ${VERAPP_DIRECTORY})
+
+    # DEPENDS with a target name doesn't quite work on this situation
+    # so just add a dependency on the normal target.
     add_custom_command (TARGET ${TARGET}
                         ${WHEN}
                         ${COMMAND_LIST}
-                        DEPENDS ${IMPORT_TARGET}
                         WORKING_DIRECTORY ${VERAPP_DIRECTORY})
+
+    add_dependencies (${TARGET} ${IMPORT_TARGET})

 endfunction (_verapp_profile_check_sources_conformance_for_target)

@@ -473,6 +479,9 @@

     set (STAMPFILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.stamp)

+    # Ensure that the directory always exists.
+    file (MAKE_DIRECTORY ${VERAPP_DIRECTORY})
+
     add_custom_command (OUTPUT ${STAMPFILE}
                         ${COMMAND_LIST}
                         COMMAND ${CMAKE_COMMAND} -E touch ${STAMPFILE}
@@ -480,12 +489,12 @@
                         ${VERAPP_DIRECTORY}
                         DEPENDS
                         ${${SOURCES_LIST_VAR}}
-                        ${IMPORT_TARGET}
                         COMMENT "Vera++ check for source group: ${TARGET}")

     add_custom_target (${TARGET} ALL
                        DEPENDS
-                       ${STAMPFILE})
+                       ${STAMPFILE}
+                       ${IMPORT_TARGET})

 endfunction (verapp_profile_check_source_files_conformance_for_target)


Investigating rpm build

Investigating rpm build

--- Modules/PackRPM.cmake
+++ Modules/PackRPM.cmake
@@ -176,6 +176,7 @@
 	    SET(_prj_srpm_path "${RPM_BUILD_SRPMS}/${${var}}")
 	    PACK_RPM_GET_ARCH(_archStr "${spec_in}")
 	    SET(_prj_rpm_path "${RPM_BUILD_RPMS}/${_archStr}/${PROJECT_NAME}-${PRJ_VER}-${PRJ_RELEASE}.${_archStr}.rpm")
+	    MESSAGE("_prj_rpm_path=${_prj_rpm_path}")

 	    #-------------------------------------------------------------------
 	    # RPM build commands and targets
@@ -203,8 +204,7 @@
 		--define '_srcrpmdir ${RPM_BUILD_SRPMS}'
 		--define '_rpmdir ${RPM_BUILD_RPMS}'
 		--define '_specdir ${RPM_BUILD_SPECS}'
-		DEPENDS ${CMAKE_SOURCE_DIR}/ChangeLog
-		${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec
+		DEPENDS ${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec
 		${RPM_BUILD_SOURCES}/${sourcePackage} ${fileDependencies}
 		${RPM_BUILD_SRPMS}
 		COMMENT "Building srpm"
@@ -218,9 +218,10 @@
 	    # RPMs (except SRPM)

 	    ADD_CUSTOM_COMMAND(OUTPUT ${_prj_rpm_path}
-		COMMAND ${RPMBUILD} -bb --buildroot ${RPM_BUILD_BUILDROOT} ${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec
+		COMMAND ${RPMBUILD} -bb  ${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec
 		--define '_sourcedir ${RPM_BUILD_SOURCES}'
 		--define '_builddir ${RPM_BUILD_BUILD}'
+		--define '_buildrootdir ${RPM_BUILD_BUILDROOT}'
 		--define '_srcrpmdir ${RPM_BUILD_SRPMS}'
 		--define '_rpmdir ${RPM_BUILD_RPMS}'
 		--define '_specdir ${RPM_BUILD_SPECS}'


Fix -m32 unrecognized issue when compile 32-bit target on some 64-bit systems (#866)

When compile 32-bit targets on some 64-bit systems, the "-m32" flag might be
unrecognized by some gcc compilers, e.g. compiling arm32 in aarch64 system,
compiling riscv32 in riscv64 system.
Add check before adding "-m32" flag to gcc, and only add it if it is supported.

--- build-scripts/config_common.cmake
+++ build-scripts/config_common.cmake
@@ -61,9 +61,13 @@
       set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -fPIC")
     endif ()
   else ()
-    add_definitions (-m32)
-    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
-    set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
+    include(CheckCCompilerFlag)
+    Check_C_Compiler_Flag( -m32  M32_OK )
+    if (M32_OK)
+      add_definitions (-m32)
+      set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
+      set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
+    endif ()
   endif ()
 endif ()


Add safefile directory to include directory list.  Ticket #2180.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -565,6 +565,7 @@
 include_directories(${CONDOR_SOURCE_DIR}/src/h)
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/src/h)
 include_directories(${CONDOR_SOURCE_DIR}/src/classad)
+include_directories(${CONDOR_SOURCE_DIR}/src/safefile)
 if (WANT_CONTRIB)
     include_directories(${CONDOR_SOURCE_DIR}/src/condor_contrib)
 endif(WANT_CONTRIB)


Some minor cleaning up.

Some minor cleaning up.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -70,14 +70,15 @@

     # Required packages

-    IF(APPLE)
-        SET(MAC_EXTRAS MacExtras)
-    ELSE()
-        SET(MAC_EXTRAS)
+    IF(WIN32)
+        SET(WEBKIT WebKit)
+    ELSE()
+        SET(WEBKIT)
     ENDIF()

     SET(REQUIRED_QT_MODULES
         Network
+        ${WEBKIT}
         Widgets
     )