cmake: rename glslang variables for clarity.

--- cmake/glslang.cmake
+++ cmake/glslang.cmake
@@ -37,10 +37,10 @@
         message(FATAL_ERROR "No shaders were passed to the function")
     endif()
     set(OUTPUT_SPIRV_FILES)
-    foreach(INPUT_GLSL IN LISTS ARGN)
+    foreach(INPUT_SHADER IN LISTS ARGN)
         # Build the correct output name and path
-        file(RELATIVE_PATH INPUT_GLSL_REL ${shader_root_folder} ${INPUT_GLSL})
-        set(OUTPUT_SPIRV "${CMAKE_BINARY_DIR}/spv/${INPUT_GLSL_REL}.spv")
+        file(RELATIVE_PATH INPUT_SHADER_REL ${shader_root_folder} ${INPUT_SHADER})
+        set(OUTPUT_SPIRV "${CMAKE_BINARY_DIR}/spv/${INPUT_SHADER_REL}.spv")
         get_filename_component(OUTPUT_SPIRV_PATH ${OUTPUT_SPIRV} DIRECTORY)
         get_filename_component(OUTPUT_SPIRV_NAME ${OUTPUT_SPIRV} NAME)

@@ -49,20 +49,20 @@
         if(${use_hlsl})
             add_custom_command(OUTPUT ${OUTPUT_SPIRV}
                 COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPUT_SPIRV_PATH}
-                COMMAND ${VULKAN_GLSLANGVALIDATOR_EXEC} --target-env spirv1.3 -g -e main -V -D ${INPUT_GLSL} -o ${OUTPUT_SPIRV}.unoptimized
+                COMMAND ${VULKAN_GLSLANGVALIDATOR_EXEC} --target-env spirv1.3 -g -e main -V -D ${INPUT_SHADER} -o ${OUTPUT_SPIRV}.unoptimized
                 COMMAND ${VULKAN_SPIRV_OPT_EXEC} ${OUTPUT_SPIRV}.unoptimized --legalize-hlsl -Os -o ${OUTPUT_SPIRV}
                 COMMAND ${VULKAN_SPIRV_VAL_EXEC} ${OUTPUT_SPIRV}
-                MAIN_DEPENDENCY ${INPUT_GLSL}
-                COMMENT "Compiling HLSL shader ${INPUT_GLSL_REL} into SPIR-V (${OUTPUT_SPIRV_NAME})"
+                MAIN_DEPENDENCY ${INPUT_SHADER}
+                COMMENT "Compiling HLSL shader ${INPUT_SHADER_REL} to SPIR-V (${OUTPUT_SPIRV_NAME})"
                 VERBATIM)
         else()
             add_custom_command(OUTPUT ${OUTPUT_SPIRV}
                 COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPUT_SPIRV_PATH}
-                COMMAND ${VULKAN_GLSLANGVALIDATOR_EXEC} --target-env spirv1.3 -g -V ${INPUT_GLSL} -o ${OUTPUT_SPIRV}.unoptimized
+                COMMAND ${VULKAN_GLSLANGVALIDATOR_EXEC} --target-env spirv1.3 -g -V ${INPUT_SHADER} -o ${OUTPUT_SPIRV}.unoptimized
                 COMMAND ${VULKAN_SPIRV_OPT_EXEC} ${OUTPUT_SPIRV}.unoptimized -Os -o ${OUTPUT_SPIRV}
                 COMMAND ${VULKAN_SPIRV_VAL_EXEC} ${OUTPUT_SPIRV}
-                MAIN_DEPENDENCY ${INPUT_GLSL}
-                COMMENT "Compiling GLSL shader ${INPUT_GLSL_REL} into SPIR-V (${OUTPUT_SPIRV_NAME})"
+                MAIN_DEPENDENCY ${INPUT_SHADER}
+                COMMENT "Compiling GLSL shader ${INPUT_SHADER_REL} to SPIR-V (${OUTPUT_SPIRV_NAME})"
                 VERBATIM)
         endif()


Removed unused CMake properties.

Removed unused CMake properties.

Removed SOVERSION property as there's no guarantees of ABI compatibility
between versions.

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -21,15 +21,6 @@
 	set(moduleName Cuttlefish)

 	set_property(TARGET ${ARGS_TARGET} PROPERTY VERSION ${CUTTLEFISH_VERSION})
-	set_property(TARGET ${ARGS_TARGET} PROPERTY SOVERSION ${CUTTLEFISH_MAJOR_VERSION})
-	set_property(TARGET ${ARGS_TARGET} PROPERTY INTERFACE_${moduleName}_MAJOR_VERSION
-		${CUTTLEFISH_MAJOR_VERSION})
-	set_property(TARGET ${ARGS_TARGET} PROPERTY INTERFACE_${moduleName}_MINOR_VERSION
-		${CUTTLEFISH_MINOR_VERSION})
-	set_property(TARGET ${ARGS_TARGET} PROPERTY INTERFACE_${moduleName}_PATCH_VERSION
-		${CUTTLEFISH_PATCH_VERSION})
-	set_property(TARGET ${ARGS_TARGET} APPEND PROPERTY COMPATIBLE_VERSION_STRING
-		${moduleName}_MAJOR_VERSION)
 	set_property(TARGET ${ARGS_TARGET} PROPERTY DEBUG_POSTFIX d)

 	set(interfaceIncludes


Version 0.2.0

Version 0.2.0

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -1 +1 @@
-set(HUNTER_VERSION "0.1.2")
+set(HUNTER_VERSION "0.2.0")


PARQUET-983: Update Thirdparty hash to Arrow 0.3.0

Author: Uwe L. Korn <uwe@apache.org>

Closes #324 from xhochy/PARQUET-983 and squashes the following commits:

c13b56b [Uwe L. Korn] PARQUET-983: Update Thirdparty hash to Arrow 0.3.0

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -582,7 +582,7 @@
   endif()

   if ("$ENV{PARQUET_ARROW_VERSION}" STREQUAL "")
-    set(ARROW_VERSION "2c3e111d45c056d429cef312533c9f3f96b08ae8")
+    set(ARROW_VERSION "d8db8f8a11abbbb6c45645b2d7370610311731bd")
   else()
     set(ARROW_VERSION "$ENV{PARQUET_ARROW_VERSION}")
   endif()


Correct the 'provides' entry of the DEB package. fixes #1748

--- packaging/linux/LinuxPackaging.cmake
+++ packaging/linux/LinuxPackaging.cmake
@@ -67,9 +67,7 @@
     )#TODO When we will not support old ubuntu it will not be necessary anymore.
   set(CPACK_DEBIAN_PACKAGE_HOMEPAGE http://med.inria.fr/)
   set(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
-  set(CPACK_DEBIAN_PACKAGE_PROVIDES
-    "${CPACK_PACKAGE_NAME} \(=${CPACK_PACKAGE_VERSION}\)"
-    )
+  set(CPACK_DEBIAN_PACKAGE_PROVIDES ${CPACK_PACKAGE_NAME})
   set(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
 endif()
 set(CPACK_GENERATOR "${CPACK_GENERATOR}" CACHE STRING "Type of package to build")


Some minor cleaning up.

Some minor cleaning up.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -91,7 +91,7 @@
   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"
      OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
     # The full list of diagnostic flags in Clang can be found at
-    # https://clang.llvm.org/docs/DiagnosticsReference.html
+    # https://clang.llvm.org/docs/DiagnosticsReference.html.
     set(_COMPILE_OPTIONS
       -Weverything
       -Wno-c++98-compat
@@ -130,7 +130,7 @@
     endif()

     # The full list of Clang-Tidy checks can be found at
-    # https://clang.llvm.org/extra/clang-tidy/checks/list.html
+    # https://clang.llvm.org/extra/clang-tidy/checks/list.html.
     set(_CLANG_TIDY_CHECKS
       -*
       bugprone-*
@@ -197,8 +197,8 @@
            _HEADER_FILTER_DIR "${_HEADER_FILTER_DIR}")

     if(MSVC)
-      # Extra argument for Clang-Tidy when used with cl
-      # https://gitlab.kitware.com/cmake/cmake/-/issues/20512#note_722771
+      # Extra argument for Clang-Tidy when used with cl.
+      # See https://gitlab.kitware.com/cmake/cmake/-/issues/20512#note_722771.
       set(_EXTRA_ARG ";--extra-arg=/EHsc")
     endif()


cmake: Fix defines for QNX platform

cmake: Fix defines for QNX platform

--- platforms/qnx-x86-qcc/platform.cmake
+++ platforms/qnx-x86-qcc/platform.cmake
@@ -7,5 +7,6 @@
 	-D_REENTRANT
 	-D_POSIX4_DRAFT_SOURCE
 	-D_POSIX4_DRAFT10_SOURCE
-	-U_OSF_SOURCE
+	-DU_OSF_SOURCE
+	-DHAVE_CONFIG_H
 )


Update FW

Update FW

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "cbed8ccd32c87d1e3a0cb66cbe1c342f9a8c8950")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "4e2882999984a6262facff1c12b94c1a2c115682")

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


Update FW before merge

Update FW before merge

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "58aa9f11691dae9a35395cbd359135e24a3582c6")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "58371c8407f617c12958b4bd84b7905b725135da")

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


Update FW, for depthai-shared to match with depthai-core

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "c5303ecec4c30a752a7f362589239b9d1784a0d3")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "a61df0cda79ec82a665dbf236de74b9aa2c096e4")

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


Fix for ROOT-7417 - Check for OPENGL_LIBRARIES if building on OSX without Cocoa

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -525,13 +525,14 @@
     find_path(OPENGL_INCLUDE_DIR GL/gl.h  PATHS /usr/X11R6/include /opt/X11/include)
     find_library(OPENGL_gl_LIBRARY NAMES GL PATHS /usr/X11R6/lib /opt/X11/lib)
     find_library(OPENGL_glu_LIBRARY NAMES GLU PATHS /usr/X11R6/lib /opt/X11/lib)
-    find_package_handle_standard_args(OpenGL REQUIRED_VARS OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY)
+    find_package_handle_standard_args(OpenGL REQUIRED_VARS OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY)
+    find_package_handle_standard_args(OpenGL_GLU REQUIRED_VARS OPENGL_glu_LIBRARY)
     set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
     mark_as_advanced(OPENGL_INCLUDE_DIR OPENGL_glu_LIBRARY OPENGL_gl_LIBRARY)
   else()
     find_package(OpenGL)
   endif()
-  if(NOT OPENGL_LIBRARIES)
+  if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND)
     if(fail-on-missing)
       message(FATAL_ERROR "OpenGL package (with GLU) not found and opengl option required")
     else()


[CMake] make liburing package search more robust

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1134,12 +1134,19 @@
 #---Check for liburing----------------------------------------------------------------
 if (uring)
   if(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
-    message(FATAL_ERROR "liburing is only available on Linux")
-  endif()
-  message(STATUS "Looking for liburing")
-  find_package(liburing)
-  if(NOT LIBURING_FOUND)
-    message(STATUS "liburing not found.")
+    set(uring OFF CACHE BOOL "Disabled because liburing is only available on Linux" FORCE)
+    message(STATUS "liburing was disabled because it is only available on Linux")
+  else()
+    message(STATUS "Looking for liburing")
+    find_package(liburing)
+    if(NOT LIBURING_FOUND)
+      if(fail-on-missing)
+        message(FATAL_ERROR "liburing not found and uring option required")
+      else()
+        message(STATUS "liburing not found. Switching off uring option")
+        set(uring OFF CACHE BOOL "Disabled because liburing was not found (${uring_description})" FORCE)
+      endif()
+    endif()
   endif()
 endif()


cmake: Update doxygen module.

cmake: Update doxygen module.

--- cmake/Modules/UseDoxygen.cmake
+++ cmake/Modules/UseDoxygen.cmake
@@ -2,9 +2,17 @@
 #
 # Adds a doxygen target that runs doxygen to generate the html
 # and optionally the LaTeX API documentation.
-# The doxygen target is added to the doc target as dependency.
+# The doxygen target is added to the doc target as a dependency.
 # i.e.: the API documentation is built with:
 #  make doc
+#
+# USAGE: GLOBAL INSTALL
+#
+# Install it with:
+#  cmake ./ && sudo make install
+# Add the following to the CMakeLists.txt of your project:
+#  include(UseDoxygen OPTIONAL)
+# Optionally copy Doxyfile.in in the directory of CMakeLists.txt and edit it.
 #
 # USAGE: INCLUDE IN PROJECT
 #
@@ -13,88 +21,124 @@
 # Add the Doxyfile.in and UseDoxygen.cmake files to the projects source directory.
 #
 #
+# CONFIGURATION
+#
+# To configure Doxygen you can edit Doxyfile.in and set some variables in cmake.
 # Variables you may define are:
-#  DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored. Defaults to "doc".
-#
-#  DOXYFILE_LATEX_DIR - Directory where the Doxygen LaTeX output is stored. Defaults to "latex".
-#
-#  DOXYFILE_HTML_DIR - Directory where the Doxygen html output is stored. Defaults to "html".
+#  DOXYFILE_SOURCE_DIR - Path where the Doxygen input files are.
+#  	Defaults to the current source directory.
+#  DOXYFILE_EXTRA_SOURCES - Additional source diretories/files for Doxygen to scan.
+#  	The Paths should be in double quotes and separated by space. e.g.:
+#  	 "${CMAKE_CURRENT_BINARY_DIR}/foo.c" "${CMAKE_CURRENT_BINARY_DIR}/bar/"
+#
+#  DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored.
+#  	Defaults to "${CMAKE_CURRENT_BINARY_DIR}/doc".
+#
+#  DOXYFILE_LATEX - ON/OFF; Set to "ON" if you want the LaTeX documentation
+#  	to be built.
+#  DOXYFILE_LATEX_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where
+#  	the Doxygen LaTeX output is stored. Defaults to "latex".
+#
+#  DOXYFILE_HTML_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where
+#  	the Doxygen html output is stored. Defaults to "html".
 #

 #
-#  Copyright (c) 2009-2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
-#  Copyright (c) 2010      Andreas Schneider <asn@cryptomilk.org>
+#  Copyright (c) 2009, 2010, 2011 Tobias Rautenkranz <tobias@rautenkranz.ch>
 #
 #  Redistribution and use is allowed according to the terms of the New
 #  BSD license.
 #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #

-macro(usedoxygen_set_default name value)
-    if(NOT DEFINED "${name}")
-        set("${name}" "${value}")
-    endif()
+macro(usedoxygen_set_default name value type docstring)
+	if(NOT DEFINED "${name}")
+		set("${name}" "${value}" CACHE "${type}" "${docstring}")
+	endif()
 endmacro()

 find_package(Doxygen)

 if(DOXYGEN_FOUND)
-    find_file(DOXYFILE_IN
-        NAMES
-            doxy.config.in
-        PATHS
-            ${CMAKE_CURRENT_SOURCE_DIR}
-            ${CMAKE_ROOT}/Modules/
-        NO_DEFAULT_PATH)
-    include(FindPackageHandleStandardArgs)
-    find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN")
+	find_file(DOXYFILE_IN "Doxyfile.in"
+			PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/"
+			NO_DEFAULT_PATH
+			DOC "Path to the doxygen configuration template file")
+	set(DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+	include(FindPackageHandleStandardArgs)
+	find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN")
 endif()

 if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND)
-    add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxy.config)
+	usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc"
+		PATH "Doxygen output directory")
+	usedoxygen_set_default(DOXYFILE_HTML_DIR "html"
+		STRING "Doxygen HTML output directory")
+	usedoxygen_set_default(DOXYFILE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
+		PATH "Input files source directory")
+	usedoxygen_set_default(DOXYFILE_EXTRA_SOURCE_DIRS ""
+		STRING "Additional source files/directories separated by space")
+	set(DOXYFILE_SOURCE_DIRS "\"${DOXYFILE_SOURCE_DIR}\" ${DOXYFILE_EXTRA_SOURCES}")

-    usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
-    usedoxygen_set_default(DOXYFILE_HTML_DIR "html")
+	usedoxygen_set_default(DOXYFILE_LATEX YES BOOL "Generate LaTeX API documentation" OFF)
+	usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex" STRING "LaTex output directory")

-    set_property(DIRECTORY APPEND PROPERTY
-            ADDITIONAL_MAKE_CLEAN_FILES "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}")
+	mark_as_advanced(DOXYFILE_OUTPUT_DIR DOXYFILE_HTML_DIR DOXYFILE_LATEX_DIR
+		DOXYFILE_SOURCE_DIR DOXYFILE_EXTRA_SOURCE_DIRS DOXYFILE_IN)

-    set(DOXYFILE_LATEX FALSE)
-    set(DOXYFILE_PDFLATEX FALSE)
-    set(DOXYFILE_DOT FALSE)

-    #find_package(LATEX)
-    #if(LATEX_COMPILER AND MAKEINDEX_COMPILER)
-    #    set(DOXYFILE_LATEX TRUE)
-    #    usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex")
-    #
-    #    set_property(DIRECTORY APPEND PROPERTY
-    #            ADDITIONAL_MAKE_CLEAN_FILES
-    #            "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
-    #
-    #    if(PDFLATEX_COMPILER)
-    #        set(DOXYFILE_PDFLATEX TRUE)
-    #    endif()
-    #    if(DOXYGEN_DOT_EXECUTABLE)
-    #        set(DOXYFILE_DOT TRUE)
-    #    endif()
-    #
-    #    add_custom_command(TARGET doxygen
-    #        POST_BUILD
-    #        COMMAND ${CMAKE_MAKE_PROGRAM}
-    #        WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
-    #endif()
+	set_property(DIRECTORY
+		APPEND PROPERTY
+		ADDITIONAL_MAKE_CLEAN_FILES
+		"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}")

-    configure_file(${DOXYFILE_IN} ${CMAKE_CURRENT_BINARY_DIR}/doxy.config ESCAPE_QUOTES IMMEDIATE @ONLY)
-    if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doxy.trac.in)
-        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxy.trac.in ${CMAKE_CURRENT_BINARY_DIR}/doxy.trac ESCAPE_QUOTES IMMEDIATE @ONLY)
-        add_custom_target(doxygen-trac ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxy.trac)
-    endif()
+	add_custom_target(doxygen
+		COMMAND "${DOXYGEN_EXECUTABLE}"
+			"${DOXYFILE}"
+		COMMENT "Writing documentation to ${DOXYFILE_OUTPUT_DIR}..."
+		WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")

-    get_target_property(DOC_TARGET doc TYPE)
-    if(NOT DOC_TARGET)
-        add_custom_target(doc)
-    endif()
+	set(DOXYFILE_DOT "NO")
+	if(DOXYGEN_DOT_EXECUTABLE)
+		set(DOXYFILE_DOT "YES")
+	endif()

-    add_dependencies(doc doxygen)
+	## LaTeX
+	set(DOXYFILE_PDFLATEX "NO")
+
+	set_property(DIRECTORY APPEND PROPERTY
+		ADDITIONAL_MAKE_CLEAN_FILES
+		"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
+
+	if(DOXYFILE_LATEX STREQUAL "ON")
+		set(DOXYFILE_GENERATE_LATEX "YES")
+		find_package(LATEX)
+		find_program(DOXYFILE_MAKE make)
+		mark_as_advanced(DOXYFILE_MAKE)
+		if(LATEX_COMPILER AND MAKEINDEX_COMPILER AND DOXYFILE_MAKE)
+			if(PDFLATEX_COMPILER)
+				set(DOXYFILE_PDFLATEX "YES")
+			endif()
+
+			add_custom_command(TARGET doxygen
+				POST_BUILD
+				COMMAND "${DOXYFILE_MAKE}"
+				COMMENT	"Running LaTeX for Doxygen documentation in ${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}..."
+				WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
+		else()
+			set(DOXYGEN_LATEX "NO")
+		endif()
+	else()
+		set(DOXYFILE_GENERATE_LATEX "NO")
+	endif()
+
+
+	configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY)
+
+	get_target_property(DOC_TARGET doc TYPE)
+	if(NOT DOC_TARGET)
+		add_custom_target(doc)
+	endif()
+
+	add_dependencies(doc doxygen)
 endif()


From Gerri:
Make sure that XROOTD_PRIVATE_INCLUDE_DIR is not undefined.

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@49077 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/FindXROOTD.cmake
+++ cmake/modules/FindXROOTD.cmake
@@ -113,7 +113,8 @@
             ${XROOTD_INCLUDE_DIR}
         )
      endif()
-
+
+     SET(XROOTD_PRIVATE_INCLUDE_DIR FALSE)
      if (XROOTD_INCLUDE_DIR)
         # Check for additional headers in new directories
         find_path(XROOTD_PRIVATE_INCLUDE_DIR
@@ -171,7 +172,11 @@
   if(XROOTD_LIBRARIES)
     set(XROOTD_FOUND TRUE)
     if(NOT XROOTD_FIND_QUIETLY )
-      message(STATUS "             include_dir: ${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}")
+      if (XROOTD_PRIVATE_INCLUDE_DIR)
+         message(STATUS "             include_dir: ${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR}")
+      else ()
+         message(STATUS "             include_dir: ${XROOTD_INCLUDE_DIR}")
+      endif ()
       message(STATUS "             libraries: ${XROOTD_LIBRARIES}")
     endif()
   else ()


Update cmake build setup so lldb doesn't link against the DebugSymbols
framework on macOS, in line with the source/xcode project changes in
r364243.
<rdar://problem/49458356>

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@364979 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -335,7 +335,6 @@
   if(NOT IOS)
     find_library(CARBON_LIBRARY Carbon)
     find_library(CORE_SERVICES_LIBRARY CoreServices)
-    find_library(DEBUG_SYMBOLS_LIBRARY DebugSymbols PATHS "/System/Library/PrivateFrameworks")
   endif()
   find_library(FOUNDATION_LIBRARY Foundation)
   find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)


fix missing OpenMP linker flag

fix missing OpenMP linker flag

--- alpakaConfig.cmake
+++ alpakaConfig.cmake
@@ -454,6 +454,7 @@
 SET(alpaka_INCLUDE_DIRS ${_ALPAKA_INCLUDE_DIRECTORIES_PUBLIC})
 SET(alpaka_LIBRARY ${_ALPAKA_LINK_LIBRARY})
 SET(alpaka_LIBRARIES ${_ALPAKA_LINK_LIBRARIES_PUBLIC})
+LIST(APPEND alpaka_LIBRARIES ${_ALPAKA_LINK_FLAGS_PUBLIC})

 #-------------------------------------------------------------------------------
 # Print the return values.


Add version and languages to project() command

--- templates/CMake/cpp.cmake
+++ templates/CMake/cpp.cmake
@@ -1,7 +1,9 @@
 cmake_minimum_required(VERSION <%= executable('cmake') ? split(systemlist('cmake --version')[0], ' ')[2] : '3.1' %>)
-project(<+DIR+> C CXX)
-
-set(BUILD_TARGET "main"<+CURSOR+>)
+project(<+DIR+>
+  VERSION "1.0.0.0"
+  LANGUAGES C CXX)
+
+set(BUILD_TARGET ${PROJECT_NAME}<+CURSOR+>)

 set(CMAKE_C_STANDARD 11)
 set(CMAKE_C_STANDARD_REQUIRED ON)


Add a Russian translation for the download page.

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -120,8 +120,8 @@
     wget http://tarantool.org/dist/public.key
     sudo apt-key add ./public.key
     release=`lsb_release -c -s`
-    sudo echo "deb http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list
-    sudo echo "deb-src http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list
+    echo "deb http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list
+    echo "deb-src http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list
     sudo apt-get update
     sudo apt-get install tarantool tarantool-client

@@ -157,64 +157,26 @@

 Текущая стабильная версия **@TARANTOOL_VERSION@**.

-Для каждого изменения репозитория автоматически
-создаётся, тестируется и публикуется набор пакетов
-для всех поддерживаемых операционных систем и оборудования.
-Все пакеты содержат информацию, необходимую для
-аварийной отладки. Пакеты с суффиксом **-debug-**
-скомпилированы без оптимзации и содержат отладочные
-проверки.
+#### Исходный код
+
+Архив .tar.gz с последний версией исходного кода доступен по следующей
+ссылке:
+tarantool-@TARANTOOL_VERSION@-src.tar.gz.
+Файл README.<OS> содержит инструкции по сборке из исходников.
+
+### Бинарные пакеты

 Для использования в высоконагруженных проектах
 рекомендуются пакеты, опубликованные на этом сайте.

-Последний стабильный релиз представлен в таблице:
+#### RedHat, FreeBSD, Mac OS X

-

-    Source tarball
-
-        tarantool-@TARANTOOL_VERSION@-src.tar.gz
-
-

-
-  Linux
-
-
-

+  RedHat
+

         RedHat .rpm
@@ -246,6 +208,7 @@

+  Other Linux distributions

@@ -283,10 +246,30 @@

+#### Debian GNU/Linux and Ubuntu
+
+Мы поддерживаем собственные репозитории .deb пакетов, который
+содержит последние версии сервера и клиентских библиотек для
+*Debian GNU/Linux* и  *Ubuntu*:
+http://tarantoo.org/dist/debian,
+http://tarantool.org/dist/ubuntu.
+
+Репозитории содержат пакеты для Debian "Sid", "Squeeze",
+"Wheezy" и Ubuntu "Precise". Для установки можно воспользоваться следующим
+скриптом:
+
+    wget http://tarantool.org/dist/public.key
+    sudo apt-key add ./public.key
+    release=`lsb_release -c -s`
+    echo "deb http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list
+    echo "deb-src http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list
+    sudo apt-get update
+    sudo apt-get install tarantool tarantool-client
+
 ### Архив старых релизов

-Архив старых релизов находится здесь.
+Архив старых релизов доступен по адресу http://tarantool.org/dist.

 ### Доступ из языков программирования


cmake: Fixed typo in the toolchain platform check

--- .cmake/Toolchains/Toolchain-mingw-w64.cmake
+++ .cmake/Toolchains/Toolchain-mingw-w64.cmake
@@ -1,10 +1,10 @@
 # the name of the target operating system
 set(CMAKE_SYSTEM_NAME Windows)

-if (CMAKE_SYSTEM_PROCESSOR MATCHES "^x86")
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "^x86$")
     set (CMAKE_SYSTEM_PROCESSOR i686)
     set (BITS 32)
-elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^x64")
+elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^x64$")
     set (CMAKE_SYSTEM_PROCESSOR x86_64)
     set (BITS 64)
 endif ()


Formatting

Formatting

--- omni-cx2x/unittest/junit.cmake
+++ omni-cx2x/unittest/junit.cmake
@@ -28,5 +28,9 @@
     endif()
   endforeach(ARG)

-  add_test(NAME ${TARGET_NAME} COMMAND ${Java_JAVA_EXECUTABLE} ${JVMARGS} -classpath ${CLASSPATH} org.junit.runner.JUnitCore ${TESTS})
+  add_test(
+    NAME ${TARGET_NAME}
+    COMMAND ${Java_JAVA_EXECUTABLE} ${JVMARGS}
+    -classpath ${CLASSPATH} org.junit.runner.JUnitCore ${TESTS}
+  )
 endfunction(add_junit_test)


Change compiler flags and add warnings to GCC

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -22,17 +22,26 @@
     set(COMMON_FLAGS "${COMMON_FLAGS} -fPIC")
   endif ()

-  set(COMMON_FLAGS_DEBUG "-g3 -ggdb3 -O0 -fno-inline -fno-omit-frame-pointer -fno-optimize-sibling-calls")
+  set(COMMON_FLAGS_DEBUG "-gz -g3 -ggdb3 -O0 -fno-inline -fno-omit-frame-pointer -fno-optimize-sibling-calls")
   set(COMMON_FLAGS_RELEASE "-O3 -flto -fuse-linker-plugin")
   set(COMMON_FLAGS_LINKER "-Wl,-O1 -Wl,--fatal-warnings -Wl,--discard-all -Wl,--build-id=sha1")
   set(COMMON_DEFINITIONS_DEBUG "-D_DEBUG")
   set(COMMON_DEFINITIONS_RELEASE "-DNDEBUG")
   if (GCC)
-    set(COMMON_WARNINGS "")
+    set(COMMON_FLAGS_CXX "-fdelete-null-pointer-checks -fstrict-aliasing -fipa-pure-const")
+    set(COMMON_WARNINGS "-Wall -Wextra -Werror -Wnull-dereference -Wreturn-type -Wdouble-promotion")
+    set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wformat=2 -Wuninitialized -Winit-self -Wmissing-include-dirs")
+    set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wmissing-format-attribute -Wsuggest-final-types")
+    set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wsuggest-final-methods -Wduplicated-branches -Wduplicated-cond -Wshadow")
+    set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wundef -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion")
+    set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wzero-as-null-pointer-constant -Wparentheses -Wenum-compare -Wlogical-op")
+    set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wlong-long -Wrestrict -Wold-style-cast")
   elseif (CLANG)
     set(COMMON_FLAGS_CXX "-stdlib=libc++")
     set(COMMON_WARNINGS "-Weverything -Werror -Wno-c++98-compat -Wno-padded -Wno-exit-time-destructors")
     set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wno-weak-vtables -Wno-global-constructors")
+    set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wno-missing-variable-declarations -Wno-float-equal -Wno-switch-enum")
+    set(COMMON_WARNINGS "${COMMON_WARNINGS} -Wno-missing-prototypes -Wsuggest-override")
   endif ()
 else ()
   message(FATAL_ERROR "Unknown compiler")
@@ -40,8 +49,8 @@

 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS} ${COMMON_FLAGS_C} ${COMMON_DEFINITIONS}")
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMMON_FLAGS_DEBUG} ${COMMON_WARNINGS} ${COMMON_DEFINITIONS_DEBUG}")
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${COMMON_FLAGS_RELEASE} ${COMMON_DEFINITIONS_RELEASE}")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${COMMON_FLAGS_RELEASE} ${COMMON_WARNINGS} ${COMMON_DEFINITIONS_RELEASE}")

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS} ${COMMON_FLAGS_CXX} ${COMMON_DEFINITIONS}")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_FLAGS_DEBUG} ${COMMON_WARNINGS} ${COMMON_DEFINITIONS_DEBUG}")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_FLAGS_RELEASE} ${COMMON_DEFINITIONS_RELEASE}")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_FLAGS_RELEASE} ${COMMON_WARNINGS} ${COMMON_DEFINITIONS_RELEASE}")


Add debug statements

Add debug statements

--- cmake/MyPackagePack.cmake
+++ cmake/MyPackagePack.cmake
@@ -55,9 +55,15 @@
       MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Development install type : ${_CAN_DEVELOPMENTTYPE}")
     ENDIF ()
     IF (_CAN_FULLTYPE)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add FullType")
+      ENDIF ()
       CPACK_ADD_INSTALL_TYPE (FullType        DISPLAY_NAME "Full")
     ENDIF ()
     IF (_CAN_DEVELOPMENTTYPE)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add DevelopmentType")
+      ENDIF ()
       CPACK_ADD_INSTALL_TYPE (DevelopmentType DISPLAY_NAME "Development")
     ENDIF ()
     #
@@ -90,21 +96,43 @@
       MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Runtime group            : ${_CAN_RUNTIMEGROUP}")
     ENDIF ()
     IF (_CAN_DEVELOPMENTGROUP)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add DevelopmentGroup")
+      ENDIF ()
       CPACK_ADD_COMPONENT_GROUP (DevelopmentGroup        DISPLAY_NAME "Development" DESCRIPTION "Develoment files\n\nThis group contains libraries and headers"  EXPANDED)
     ENDIF ()
     IF (_CAN_DEVELOPMENTLIBRARYGROUP)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add DevelopmentLibraryGroup")
+      ENDIF ()
       CPACK_ADD_COMPONENT_GROUP (DevelopmentLibraryGroup DISPLAY_NAME "Libraries"   DESCRIPTION "Library files\n\nBoth static and dynamic version are provided" PARENT_GROUP DevelopmentGroup)
     ENDIF ()
     IF (_CAN_DOCUMENTGROUP)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add DevelopmentLibraryGroup")
+      ENDIF ()
       CPACK_ADD_COMPONENT_GROUP (DocumentGroup           DISPLAY_NAME "Documents"   DESCRIPTION "Document files\n\nThis group contains all the provided documentation" EXPANDED)
     ENDIF ()
     IF (_CAN_RUNTIMEGROUP)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add RuntimeGroup")
+      ENDIF ()
       CPACK_ADD_COMPONENT_GROUP (RuntimeGroup            DISPLAY_NAME "Runtime"     DESCRIPTION "Runtime applications"  EXPANDED)
     ENDIF ()
     #
     # Components
     #
+    IF (MYPACKAGE_DEBUG)
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Manpage component        : ${_HAVE_MANPAGECOMPONENT}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Dynamic Library component: ${_HAVE_DYNAMICLIBRARYCOMPONENT}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Static Library component : ${_HAVE_STATICLIBRARYCOMPONENT}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Header component         : ${_HAVE_HEADERCOMPONENT}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Application component    : ${_HAVE_APPLICATIONCOMPONENT}")
+    ENDIF ()
     IF (_HAVE_MANPAGECOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add ManpageComponent")
+      ENDIF ()
       CPACK_ADD_COMPONENT(ManpageComponent
                           DISPLAY_NAME "Man pages"
                           DESCRIPTION "Documentation in the man format\n\nUseful on all platforms but Windows, in general"
@@ -112,6 +140,9 @@
                           INSTALL_TYPES FullType)
     ENDIF ()
     IF (_HAVE_DYNAMICLIBRARYCOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add DynamicLibraryComponent")
+      ENDIF ()
       CPACK_ADD_COMPONENT(DynamicLibraryComponent
                           DISPLAY_NAME "Dynamic"
                           DESCRIPTION "Dynamic Libraries\n\nNecessary almost anytime"
@@ -119,6 +150,9 @@
                           INSTALL_TYPES FullType DevelopmentType)
     ENDIF ()
     IF (_HAVE_STATICLIBRARYCOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add StaticLibraryComponent")
+      ENDIF ()
       CPACK_ADD_COMPONENT(StaticLibraryComponent
                           DISPLAY_NAME "Static"
                           DESCRIPTION "Static Libraries\n\nOnly programmers would eventually need that"
@@ -126,6 +160,9 @@
                           INSTALL_TYPES FullType DevelopmentType)
     ENDIF ()
     IF (_HAVE_HEADERCOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add HeaderComponent")
+      ENDIF ()
       CPACK_ADD_COMPONENT(HeaderComponent
                           DISPLAY_NAME "Headers"
                           DESCRIPTION "C/C++ Headers\n\nProgrammers will need these files"
@@ -133,19 +170,15 @@
                           INSTALL_TYPES FullType DevelopmentType)
     ENDIF ()
     IF (_HAVE_APPLICATIONCOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Add ApplicationComponent")
+      ENDIF ()
       CPACK_ADD_COMPONENT(ApplicationComponent
                           DISPLAY_NAME "Applications"
                           DESCRIPTION "Executables"
                           GROUP RuntimeGroup
                           INSTALL_TYPES FullType
                           DEPENDS DynamicLibraryComponent)
-    ENDIF ()
-    IF (MYPACKAGE_DEBUG)
-      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Manpage component        : ${_HAVE_MANPAGECOMPONENT}")
-      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Dynamic Library component: ${_HAVE_DYNAMICLIBRARYCOMPONENT}")
-      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Static Library component : ${_HAVE_STATICLIBRARYCOMPONENT}")
-      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Header component         : ${_HAVE_HEADERCOMPONENT}")
-      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Application component    : ${_HAVE_APPLICATIONCOMPONENT}")
     ENDIF ()
     #
     # Quite subtil, but the "package" target is not visible at this time. There is a old standing bug
@@ -154,9 +187,8 @@
     # In addition documentation is generated using the INSTALL(CODE xxx) hack.
     #
     ADD_CUSTOM_TARGET(pack
-      COMMAND ${CMAKE_MAKE_PROGRAM} package
+      COMMAND ${CMAKE_MAKE_PROGRAM} man package
       COMMENT "Packaging ${PROJECT_NAME}"
-      DEPENDS man
       VERBATIM
     )
   ENDIF ()


Remove CMAKE_FORCE_{C,CXX}_COMPILER (deprecated)

--- cmake/arm-toolchain.cmake
+++ cmake/arm-toolchain.cmake
@@ -2,8 +2,8 @@
 INCLUDE(CMakeForceCompiler)
 set(ARM_PREFIX arm-frc-linux-gnueabi)
 set(CMAKE_SYSTEM_NAME Linux)
-CMAKE_FORCE_CXX_COMPILER(${ARM_PREFIX}-g++ GNU)
-CMAKE_FORCE_C_COMPILER(${ARM_PREFIX}-gcc GNU)
+set(CMAKE_CXX_COMPILER ${ARM_PREFIX}-g++)
+set(CMAKE_C_COMPILER ${ARM_PREFIX}-gcc)
 set(CMAKE_CXX_FLAGS "-std=c++1y -Wformat=2 -Wall -Wextra -pedantic" CACHE STRING "" FORCE)
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3" CACHE STRING "" FORCE)
 set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g" CACHE STRING "" FORCE)


Gloo update (#45584)

Gloo update (#45584)

* back fl

* delete ssl cert

* .

* make warning

* .

* unittest paral degree

* solve unittest

* heter & multi cloud commm ready

* .

* .

* fix gloo compile warning

--- cmake/external/gloo.cmake
+++ cmake/external/gloo.cmake
@@ -25,8 +25,8 @@
     "${GLOO_INSTALL_DIR}/lib"
     CACHE PATH "gloo library directory." FORCE)
 # As we add extra features for gloo, we use the non-official repo
-set(GLOO_REPOSITORY ${GIT_URL}/sandyhouse/gloo.git)
-set(GLOO_TAG v0.0.2)
+set(GLOO_REPOSITORY ${GIT_URL}/ziyoujiyi/gloo.git)
+set(GLOO_TAG v0.0.3)
 set(GLOO_LIBRARIES
     "${GLOO_INSTALL_DIR}/lib/libgloo.a"
     CACHE FILEPATH "gloo library." FORCE)


update lite tag (#29517)

update lite tag (#29517)

--- cmake/external/lite.cmake
+++ cmake/external/lite.cmake
@@ -34,7 +34,7 @@
   set(LITE_INSTALL_DIR ${THIRD_PARTY_PATH}/install/lite)

   if(NOT LITE_GIT_TAG)
-    set(LITE_GIT_TAG 345545e2ce2f3895a332be88d5c3d495d9b206d3)
+    set(LITE_GIT_TAG 68e64e0eb74cdd13383ae78caf889973499ebd14)
   endif()

   if(NOT CUDA_ARCH_NAME)


Moved mercurial check into ensure hg current function.

Now issue a fatal error if mercurial is not found and it is required.

--- CPM.cmake
+++ CPM.cmake
@@ -279,11 +279,6 @@
   message(FATAL_ERROR "CPM requires Git.")
 endif()

-find_package(Hg)
-if(NOT HG_FOUND)
- message("CPM could not find Mercurial(Hg) Mecurial based packages will fail")
-endif()
-
 macro(_cpm_debug_log debug)
   if ((DEFINED _CPM_DEBUG_LOG) AND (_CPM_DEBUG_LOG))
     message("== ${debug}")
@@ -1149,6 +1144,12 @@
   set(repo ${_CPM_REPO_HG_REPOSITORY})
   set(dir ${_CPM_REPO_TARGET_DIR})

+  # Attempt to find the mercurial package
+  find_package(Hg)
+  if(NOT HG_FOUND)
+    message(FATAL_ERROR "CPM could not find Mercurial(Hg). Cannot ensure ${repo} is current.")
+  endif()
+
   if (NOT EXISTS "${dir}/")

     # If there exists a cache repository, check the cache directory before


COMP: Remove dead template dispatch code

Mechanism for dispatching template type based on file name was still present,
so it was removed

--- Code/BasicFilters/SourceCodeGenerator.cmake
+++ Code/BasicFilters/SourceCodeGenerator.cmake
@@ -12,22 +12,12 @@
   set ( output_h "${CMAKE_CURRENT_BINARY_DIR}/sitk${FILENAME}ImageFilter.h" )
   set ( output_cxx "${CMAKE_CURRENT_BINARY_DIR}/sitk${FILENAME}ImageFilter.cxx" )

-  # Use the ImageFilterTemplate if specified
-  if ( ${TEMPLATE_TYPE} EQUAL ${image_filter_template} )
-    set ( input_json_file ${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}.json )
-    set ( template_file_h ${CMAKE_CURRENT_SOURCE_DIR}/sitkImageFilterTemplate.h.in )
-    set ( template_file_cxx ${CMAKE_CURRENT_SOURCE_DIR}/sitkImageFilterTemplate.cxx.in )
-    # Make a global list of ImageFilter template filters
-    set ( IMAGE_FILTER_LIST ${IMAGE_FILTER_LIST} ${FILENAME} CACHE INTERNAL "" )
+  set ( input_json_file ${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}.json )
+  set ( template_file_h ${CMAKE_CURRENT_SOURCE_DIR}/sitkImageFilterTemplate.h.in )
+  set ( template_file_cxx ${CMAKE_CURRENT_SOURCE_DIR}/sitkImageFilterTemplate.cxx.in )

-  # Use the RegionGrowingImageFilterTemplate if specified
-  elseif ( ${TEMPLATE_TYPE} EQUAL ${region_growing_image_filter_template} )
-    set ( input_json_file ${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}_RegionGrowing.json )
-    set ( template_file_h ${CMAKE_CURRENT_SOURCE_DIR}/sitkRegionGrowingImageFilterTemplate.h.in )
-    set ( template_file_cxx ${CMAKE_CURRENT_SOURCE_DIR}/sitkRegionGrowingImageFilterTemplate.cxx.in )
-    # Make a global list of RegionGrowingImageFilter template filters
-    set ( REGION_GROWING_FILTER_LIST ${REGION_GROWING_FILTER_LIST} ${FILENAME} CACHE INTERNAL "" )
-  endif()
+  # Make a global list of ImageFilter template filters
+  set ( IMAGE_FILTER_LIST ${IMAGE_FILTER_LIST} ${FILENAME} CACHE INTERNAL "" )

   add_custom_command (
     OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/sitk${FILENAME}ImageFilter.h" "${CMAKE_CURRENT_BINARY_DIR}/sitk${FILENAME}ImageFilter.cxx"


Fix ChooseBlas.cmake for CMake build dir name (#20072)

--- cmake/ChooseBlas.cmake
+++ cmake/ChooseBlas.cmake
@@ -80,7 +80,7 @@
         COMMAND ${CMAKE_COMMAND} .
       )
       set(FORTRAN_DIR "")
-      include(build/temp/FortranDir.cmake)
+      include(${CMAKE_CURRENT_BINARY_DIR}/temp/FortranDir.cmake)
       find_library(FORTRAN_LIB NAMES gfortran HINTS ${FORTRAN_DIR})
       message("FORTRAN_DIR is ${FORTRAN_DIR}")
       message("FORTRAN_LIB is ${FORTRAN_LIB}")


PAR: optionally add extra files to the PAR

--- cmake/GenParFile.cmake
+++ cmake/GenParFile.cmake
@@ -12,6 +12,7 @@
 #  - the LinkDef used by ROOT
 #  - dependent libraries: used to generate the rootmap
 #  - extra include paths (optional): passed during compilation
+#  - extra files not considered during build (optional)
 #
 # To generate a PARfile, if enabled in its CMakeLists.txt, go to the build directory and run:
 #   make BLAHBLAH.par
@@ -41,6 +42,13 @@
     # Optional: extra includes, space-separated
     set(PAREXTRAINCLUDES "${ARGV5}")
     #message(STATUS "[add_target_parfile] Extra Includes (space-separated): ${PAREXTRAINCLUDES}")
+  endif()
+
+  if(NOT "${ARGV6}" STREQUAL "")
+    # Optional: extra files (not part of the build process), space-separated
+    set(PAREXTRAFILES "${ARGV6}")
+    string(REPLACE ";" " " PAREXTRAFILES_FLAT "${PAREXTRAFILES}")
+    #message(STATUS "[add_target_parfile] Extra Files (space-separated): ${PAREXTRAFILES_FLAT}")
   endif()

   # PARfile temporary directory
@@ -97,7 +105,7 @@
     COMMAND ${CMAKE_COMMAND} -E make_directory ${PARDIR}

     # TODO: cmake -E copy unfortunately does not handle multiple files
-    COMMAND rsync --relative ${PARSOURCES} ${PARHEADERS} ${PARLINKDEF} ${PARDIR}/
+    COMMAND rsync --relative ${PARSOURCES} ${PARHEADERS} ${PAREXTRAFILES} ${PARLINKDEF} ${PARDIR}/

     COMMAND ${CMAKE_COMMAND} -E copy ${PARTMP}/Makefile ${PARDIR}/Makefile
     COMMAND ${CMAKE_COMMAND} -E copy ${PARTMP}/SETUP.C ${PARMETADIR}/SETUP.C


Removed that dependency on opencv.

Removed that dependency on opencv.

--- cmake/ROCSMacros.cmake
+++ cmake/ROCSMacros.cmake
@@ -70,9 +70,6 @@
 		endforeach(I)
 	endif(NOT "${ARG_LINK_MODULES}" STREQUAL "")

-	# Add dependency on OpenCV
-	target_link_libraries(rocs_${ARG_NAME} {OPENCV_LIBRARIES})
-
 	# Install
 	install(TARGETS rocs_${ARG_NAME} LIBRARY DESTINATION ${ROCS_DIR}/lib ARCHIVE DESTINATION lib)
 	install(FILES cpp/rocs/${ARG_NAME}.h DESTINATION ${ROCS_DIR}/include/rocs)


[build] Enforce local-scoped symbols in static llvm libs (#5553)

--- cmake/TaichiCore.cmake
+++ cmake/TaichiCore.cmake
@@ -298,6 +298,13 @@

     add_subdirectory(taichi/runtime/wasm)
     target_link_libraries(${CORE_LIBRARY_NAME} PRIVATE wasm_runtime)
+
+    if (LINUX)
+        # Remove symbols from llvm static libs
+        foreach(LETTER ${llvm_libs})
+            target_link_options(${CORE_LIBRARY_NAME} PUBLIC -Wl,--exclude-libs=lib${LETTER}.a)
+        endforeach()
+    endif()
 endif()


fixed os x build

fixed os x build

--- cmake/TaichiCore.cmake
+++ cmake/TaichiCore.cmake
@@ -116,7 +116,9 @@
 message("PYTHON_LIBRARIES" ${PYTHON_LIBRARIES})
 target_link_libraries(${CORE_LIBRARY_NAME} ${PYTHON_LIBRARIES})

-target_link_libraries(${CORE_LIBRARY_NAME} -static-libgcc -static-libstdc++)
+if (NOT APPLE)
+    target_link_libraries(${CORE_LIBRARY_NAME} -static-libgcc -static-libstdc++)
+endif()

 foreach (source IN LISTS TAICHI_CORE_SOURCE)
     file(RELATIVE_PATH source_rel ${CMAKE_CURRENT_LIST_DIR} ${source})


r9695/sofa : cmake: portable openmp flags

Former-commit-id: a445086177ad82928fd7a9f0c89786001861fcb3

--- cmake/buildFlags.cmake
+++ cmake/buildFlags.cmake
@@ -55,8 +55,13 @@
 # OpenMP flags
 if(SOFA-MISC_OPENMP)
 	list(APPEND compilerDefines "USING_OMP_PRAGMAS")
-	set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fopenmp")
-	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fopenmp")
+	find_package(OpenMP QUIET)
+	if (OPENMP_FOUND)
+	    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+	    set (CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} ${OpenMP_C_FLAGS}")
+	    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+	    set (CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} ${OpenMP_CXX_FLAGS}")
+	endif()
 endif()


Fixed dependencies for Android projects

Fixed dependencies for Android projects

--- OpenCVAndroidProject.cmake
+++ OpenCVAndroidProject.cmake
@@ -63,7 +63,8 @@
                 COMMAND ${ANDROID_EXECUTABLE} update project --name "${_target}" --target "${ANDROID_SDK_TARGET}" --library "${OPENCV_REFERENCE_PATH}" --path .
                 WORKING_DIRECTORY ${build_path}
                 DEPENDS ${${_target}_project_files}
-                DEPENDS opencv_java_android_library
+                DEPENDS "${CMAKE_BINARY_DIR}/default.properties"
+                DEPENDS "${CMAKE_BINARY_DIR}/AndroidManifest.xml"
                 COMMENT "Updating android project - ${_target}"
                 )
         else()
@@ -124,7 +125,6 @@
             COMMAND ${CMAKE_COMMAND} -E copy "${build_path}/bin/${_target}-debug.apk" "${CMAKE_BINARY_DIR}/bin/${_target}.apk"
             WORKING_DIRECTORY ${build_path}
             DEPENDS ${${_target}_project_files}
-            DEPENDS ${JNI_LIB_NAME} opencv_java
             COMMENT "Generating bin/${_target}.apk"
         )

@@ -133,6 +133,8 @@
             DEPENDS "${CMAKE_BINARY_DIR}/bin/${_target}.apk"
             )

+        add_dependencies(${_target}_android_project opencv_java ${JNI_LIB_NAME})
+
         if("${ARGN}" STREQUAL "INSTALL" AND INSTALL_ANDROID_EXAMPLES)
             install(FILES "${CMAKE_BINARY_DIR}/bin/${_target}.apk" DESTINATION "bin" COMPONENT main)
         endif()


CLW: added flags to do coverage testing using gcc tools

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -10,6 +10,17 @@

 SET (TRIGGER_SITE
   "http://${DROP_SITE}/cgi-bin/Submit-CTC-TestingResults.cgi")
+
+IF(CMAKE_COMPILER_IS_GNUCXX)
+  SET(CTEST_COVERAGE_COMMAND gcov)
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ftest-coverage
+-fprofile-arcs")
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ftest-coverage
+-fprofile-arcs")
+  SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -ftest-coverage
+-fprofile-arcs")
+  LINK_LIBRARIES(gcov)
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)

 # Project Home Page
 # SET (PROJECT_URL "http://www.bsl.ece.vt.edu")


Install QtWebEngineProcess with execute rights

--- CMake/mitkInstallRules.cmake
+++ CMake/mitkInstallRules.cmake
@@ -70,9 +70,9 @@
     set(_install_DESTINATION "")

     if(WIN32)
-      MITK_INSTALL(FILES "${_qmake_path}/QtWebEngineProcess.exe")
+      MITK_INSTALL(PROGRAMS "${_qmake_path}/QtWebEngineProcess.exe")
     elseif(UNIX)
-      MITK_INSTALL(FILES "${_qmake_path}/../libexec/QtWebEngineProcess")
+      MITK_INSTALL(PROGRAMS "${_qmake_path}/../libexec/QtWebEngineProcess")
     endif()

     MITK_INSTALL(DIRECTORY "${_qmake_path}/../resources")


Fixing the logic to find cblas.h in FindCBLAS.cmake

--- CMakeModules/FindCBLAS.cmake
+++ CMakeModules/FindCBLAS.cmake
@@ -109,7 +109,7 @@
     _flags
     _list
     _include
-    _search_include,
+    _search_include
     _libraries_work_check)
   # This macro checks for the existence of the combination of fortran libraries
   # given by _list.  If the combination is found, this macro checks (using the
@@ -168,11 +168,6 @@
       ENDIF(APPLE)
       MARK_AS_ADVANCED(${_prefix}_${_library}_LIBRARY)

-      IF(${_prefix}_${_library}_LIBRARY)
-        GET_FILENAME_COMPONENT(_path ${${_prefix}_${_library}_LIBRARY} PATH)
-        LIST(APPEND _paths ${_path}/../include ${_path}/../../include ${CBLAS_ROOT_DIR}/include)
-      ENDIF(${_prefix}_${_library}_LIBRARY)
-
       SET(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
       SET(_libraries_work ${${_prefix}_${_library}_LIBRARY})
     ENDIF(_libraries_work)
@@ -183,8 +178,17 @@
   SET(_bug_libraries_work_check ${_libraries_work_check}) #CMAKE BUG!!! SHOULD NOT BE THAT

   IF(_bug_search_include)
-    FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include} ${_paths})
+    FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include}
+      /opt/intel/mkl/include
+      /usr/include
+      /usr/local/include
+      /sw/include
+      /opt/local/include
+      PATH_SUFFIXES
+      openblas
+      )
     MARK_AS_ADVANCED(${_prefix}${_combined_name}_INCLUDE)
+
     IF(${_prefix}${_combined_name}_INCLUDE)
       IF (_verbose)
         MESSAGE(STATUS "Includes found")
@@ -194,6 +198,7 @@
     ELSE(${_prefix}${_combined_name}_INCLUDE)
       SET(_libraries_work FALSE)
     ENDIF(${_prefix}${_combined_name}_INCLUDE)
+
   ELSE(_bug_search_include)
     SET(${_prefix}_INCLUDE_DIR)
     SET(${_prefix}_INCLUDE_FILE ${_include})


build BUGFIX vasprintf detection on BSD

build BUGFIX vasprintf detection on BSD

--- CMakeModules/UseCompat.cmake
+++ CMakeModules/UseCompat.cmake
@@ -7,6 +7,7 @@
     # compatibility checks
     set(CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=200809L)
     list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
+    list(APPEND CMAKE_REQUIRED_DEFINITIONS -D__BSD_VISIBLE=1)
     check_symbol_exists(vdprintf "stdio.h;stdarg.h" HAVE_VDPRINTF)
     check_symbol_exists(asprintf "stdio.h" HAVE_ASPRINTF)
     check_symbol_exists(vasprintf "stdio.h" HAVE_VASPRINTF)


cmake: Fix Boost detection in FindThrift.cmake

This cmake module was checking the wrong variable and refused to find
Thrift if some optional boost components weren't found. Now it only
checks for the presence of Boost headers.

Change-Id: I125a0f1f03d280c6c3b63a5826ed5f92a0b8ba6d

--- FindThrift.cmake
+++ FindThrift.cmake
@@ -8,11 +8,11 @@
 #     THRIFT_COMPILER

 # Dependencies:
-if (NOT Boost_FOUND)
+if (NOT Boost_INCLUDE_DIRS)
 	if(Thrift_FIND_REQUIRED)
-		message(FATAL_ERROR "Thrift requires Boost to be found")
+		message(FATAL_ERROR "Thrift requires Boost headers")
 	elseif(NOT Thrift_FIND_QUIETLY)
-		message(STATUS "Thrift requires Boost to be found")
+		message(STATUS "Thrift requires Boost headers")
 	endif()
 	return()
 endif()


Cmake: Add cudart to cctag.

Cmake: Add cudart to cctag.

--- src/cmakeFindModules/FindCCTag.cmake
+++ src/cmakeFindModules/FindCCTag.cmake
@@ -76,7 +76,7 @@
 )
 # To work with cuda, cctags needs additional CUDA cudadevrt library
 IF(CCTAGCUDA_LIBRARY)
-  SET(CCTAGCUDA_LIBRARIES ${CCTAGCUDA_LIBRARY} cudadevrt)
+  SET(CCTAGCUDA_LIBRARIES ${CCTAGCUDA_LIBRARY} cudart cudadevrt)
 ENDIF()

 # Sets the libraries needed to link with CCTag


pybind linux - Fix missing debug symbols in RelWithDebug mode

--- wrappers/python/third_party/pybind11/tools/pybind11Tools.cmake
+++ wrappers/python/third_party/pybind11/tools/pybind11Tools.cmake
@@ -181,7 +181,7 @@

   _pybind11_add_lto_flags(${target_name} ${ARG_THIN_LTO})

-  if (NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug)
+  if (NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo)
     # Strip unnecessary sections of the binary on Linux/Mac OS
     if(CMAKE_STRIP)
       if(APPLE)


BUG: Update SmoothingRecursiveYvvGaussianFilter remote module

This fixes build errors and warnings on MSVC.

Change-Id: I6d4cc2c4b6e911d67a7afb078dedf423acd7b57e

--- Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
+++ Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
@@ -2,5 +2,5 @@
 itk_fetch_module(SmoothingRecursiveYvvGaussianFilter
   "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: http://hdl.handle.net/10380/3425"
   GIT_REPOSITORY https://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter
-  GIT_TAG 36ac66b318f6c2b70cf09a1c9c8aa5c572f855e6
+  GIT_TAG a5504a0e3849cf9e0e86af92221cae61e5c1c62b
   )


[CMake] Upgraded Python CMake support file


Update FW with multi instance support

Update FW with multi instance support

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "bf0a337613d82ad97f13b1cf2b6e99e4d8ae7032")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "99b34ec1ca0635bb9e55c570b907a67eafa5fe19")

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


cmae check for revision!

cmae check for revision!

--- cmake/GetGitRevisionDescriptionExtern.cmake
+++ cmake/GetGitRevisionDescriptionExtern.cmake
@@ -2,8 +2,9 @@
 include(cmake/GetGitRevisionDescription.cmake)
 git_describe(ExecutionGraph_VERSION "--tags" "--abbrev=0")

-if( NOT ExecutionGraph_VERSION )
-message(FATAL_ERROR "ExecutionGraph library version could not be determined!, ${ExecutionGraph_VERSION}")
+if( NOT ExecutionGraph_VERSION OR (NOT "${ExecutionGraph_VERSION}" MATCHES ".") )
+message(FATAL_ERROR "ExecutionGraph library version could not be determined or contains errors!, ${ExecutionGraph_VERSION}")
 endif()

+
 message(STATUS "${ExecutionGraph_VERSION}")


Move Vc compatibility check close to other Vc checks

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1129,29 +1129,6 @@
   endif()
 endif()

-#---Check for vc and its compatibility-----------------------------------------------
-if(vc)
-  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
-      message(STATUS "VC requires GCC version >= 4.5; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-    endif()
-  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-    if ( APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
-      message(STATUS "VC requires Apple Clang version >= 4.0; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-    elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
-      message(STATUS "VC requires Clang version >= 3.1; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-    endif()
-  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)  # equivalent to MSVC 2010
-      message(STATUS "VC requires MSVC version >= 2011; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-    endif()
-  endif()
-endif()
-
 #---Check for TCMalloc---------------------------------------------------------------
 if (tcmalloc)
   message(STATUS "Looking for tcmalloc")
@@ -1247,6 +1224,29 @@
   endif()
 endif()

+#---Check for vc and its compatibility-----------------------------------------------
+if(vc)
+  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
+      message(STATUS "VC requires GCC version >= 4.5; switching OFF 'vc' option")
+      set(vc OFF CACHE BOOL "" FORCE)
+    endif()
+  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    if ( APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
+      message(STATUS "VC requires Apple Clang version >= 4.0; switching OFF 'vc' option")
+      set(vc OFF CACHE BOOL "" FORCE)
+    elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
+      message(STATUS "VC requires Clang version >= 3.1; switching OFF 'vc' option")
+      set(vc OFF CACHE BOOL "" FORCE)
+    endif()
+  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)  # equivalent to MSVC 2010
+      message(STATUS "VC requires MSVC version >= 2011; switching OFF 'vc' option")
+      set(vc OFF CACHE BOOL "" FORCE)
+    endif()
+  endif()
+endif()
+
 #---Check for Vc---------------------------------------------------------------------
 if(vc OR builtin_vc)
   if(NOT builtin_vc)


Use the latest version of Davix. This solves a compilation error on 32bit

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -715,7 +715,7 @@
     if(NOT davix)
       set(davix ON CACHE BOOL "" FORCE)
     endif()
-    set(DAVIX_VERSION 0.3.4)
+    set(DAVIX_VERSION 0.3.6)
     message(STATUS "Downloading and building Davix version ${DAVIX_VERSION}")
     string(REPLACE "-Wall " "" __cxxflags "${CMAKE_CXX_FLAGS}")                      # Otherwise it produces tones of warnings
     string(REPLACE "-W " "" __cxxflags "${__cxxflags} -Wno-unused-const-variable")


BUG: Need to push all relevant CMake vars to superbuild of local project.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -111,6 +111,17 @@
     -DTubeTK_USE_SUPERBUILD:BOOL=FALSE
     -DITK_DIR:PATH=${ITK_DIR}
     -DGenerateCLP_DIR:PATH=${prefix}/lib/GenerateCLP
+    -DBUILD_TESTING:BOOL=${BUILD_TESTING}
+    -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+    -DBUILD_DOCUMENTATION:BOOL=${BUILD_DOCUMENTATION}
+    -DBUILDNAME:STRING=${BUILDNAME}
+    -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+    -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
+    -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
+    -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
+    -DMAKECOMMAND:STRING=${MAKECOMMAND}
+    -DSITE:STRING=${SITE}
+    -DTubeTK_USE_KWSTYLE:BOOL=${TubeTK_USE_KWSTYLE}
   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
   BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeExternals/Build/TubeTK-inner
   DEPENDS


ENH: Using same repos and tags for ITK and VTK as Slicer

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -46,8 +46,8 @@
   ##
   set(proj Insight)
   ExternalProject_Add(${proj}
-    GIT_REPOSITORY "http://itk.org/ITK.git"
-    GIT_TAG v3.20.0
+    GIT_REPOSITORY "http://github.com/Slicer/ITK.git"
+    GIT_TAG "v3.20.0"
     SOURCE_DIR "${CMAKE_BINARY_DIR}/Insight"
     BINARY_DIR Insight-Build
     CMAKE_GENERATOR ${gen}
@@ -88,7 +88,8 @@
       ##
       set(proj VTK)
       ExternalProject_Add(${proj}
-        GIT_REPOSITORY "http://vtk.org/VTK.git"
+        GIT_REPOSITORY "http://github.com/Slicer/VTK.git"
+        GIT_TAG "origin/slicer-4.0"
         SOURCE_DIR "${CMAKE_BINARY_DIR}/VTK"
         BINARY_DIR VTK-Build
         CMAKE_GENERATOR ${gen}


Try another approach to specifying python lib to python exe

--- python.cmake
+++ python.cmake
@@ -32,7 +32,7 @@
     CONFIGURE_COMMAND   ${FLYEM_ENV_STRING} ${python_SRC_DIR}/configure
         --prefix=${FLYEM_BUILD_DIR}
         --enable-shared
-        LDFLAGS=-L${FLYEM_BUILD_DIR}/lib,-rpath=${FLYEM_BUILD_DIR}/lib
+        LDFLAGS=-Wl,-rpath=${FLYEM_BUILD_DIR}/lib
         CPPFLAGS=-I${FLYEM_BUILD_DIR}/include
     BUILD_COMMAND       ${FLYEM_ENV_STRING} make
     INSTALL_COMMAND     ${FLYEM_ENV_STRING} make install


Minor fix to our common.cmake file.

Minor fix to our common.cmake file.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -15,9 +15,8 @@
         SET(LINK_FLAGS_PROPERTIES "${LINK_FLAGS_PROPERTIES} /STACK:10000000 /MACHINE:X86")
     ELSE()
         SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
-    ENDIF()
-
-    SET(LINK_FLAGS_PROPERTIES)
+        SET(LINK_FLAGS_PROPERTIES)
+    ENDIF()

     IF("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
         MESSAGE("Building a debug version...")


Can now fully test plugins within our testing framework on Mac OS X.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -368,11 +368,15 @@

         # Make sure that the plugin refers to our embedded version of the
         # external dependencies on which it depends
-        # Note: we do it in two different ways, since some external libraries
-        #       we use refer to the library itself (e.g. CellML) while others
-        #       refer to some @executable_path information (e.g. LLVM), so...
+        # Note #1: we do it in two different ways, since some external libraries
+        #          we use refer to the library itself (e.g. CellML) while others
+        #          refer to some @executable_path information (e.g. LLVM), so...
+        # Note #2: we must do it for both the deployed and 'test' versions of
+        #          the plugin...

         FOREACH(EXTERNAL_DEPENDENCY ${EXTERNAL_DEPENDENCIES})
+            # First, for the deployed version of the plugin
+
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND install_name_tool -change ${EXTERNAL_DEPENDENCY}
                                                                  @executable_path/../Frameworks/${EXTERNAL_DEPENDENCY}
@@ -382,6 +386,18 @@
                                COMMAND install_name_tool -change @executable_path/../lib/${EXTERNAL_DEPENDENCY}
                                                                  @executable_path/../Frameworks/${EXTERNAL_DEPENDENCY}
                                                                  ${MAC_OS_X_PROJECT_BINARY_DIR}/Contents/PlugIns/${MAIN_PROJECT_NAME}/${PLUGIN_FILENAME})
+
+            # Second, for the 'test' version of the plugin
+
+            ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                               COMMAND install_name_tool -change ${EXTERNAL_DEPENDENCY}
+                                                                 ${CMAKE_BINARY_DIR}/${EXTERNAL_DEPENDENCY}
+                                                                 ${CMAKE_BINARY_DIR}/${PLUGIN_FILENAME})
+
+            ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                               COMMAND install_name_tool -change @executable_path/../lib/${EXTERNAL_DEPENDENCY}
+                                                                 ${CMAKE_BINARY_DIR}/${EXTERNAL_DEPENDENCY}
+                                                                 ${CMAKE_BINARY_DIR}/${PLUGIN_FILENAME})
         ENDFOREACH()
     ENDIF()

@@ -576,8 +592,8 @@
     ELSE()
         # Make sure that the third-party library refers to our embedded version
         # of the libraries on which it depends
-        # Note: we need to do that for both the deployed and 'test' versions of
-        #       the third-party library...
+        # Note: we must do it for both the deployed and 'test' versions of the
+        #       third-party library...

         FOREACH(LIBRARY ${LIBRARIES})
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD


Turn on -Wall

Turn on -Wall

IoT.js-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -20,7 +20,7 @@
 set(CFLAGS ${CMAKE_CXX_FLAGS})
 #set(CFLAGS "${CFLAGS} -flto")
 if (NOT(${NO_PTHREAD}))
-    set(CFLAGS "${CFLAGS} -pthread")
+    set(CFLAGS "${CFLAGS} -pthread -Wall")
 endif()

 set(ROOT ${CMAKE_SOURCE_DIR})


cmake: Fixed FindOpenACC flags.

cmake: Fixed FindOpenACC flags.

Only tested with pgi, added -target:nvidia,nordc required for shared libraries.
Note: This will only compile gpu code, it should also target host-code for fallback.

--- ve/cpu/cmake/Modules/FindOpenACC.cmake
+++ ve/cpu/cmake/Modules/FindOpenACC.cmake
@@ -31,12 +31,12 @@
     #GNU
     "-fopenacc"
     #Portland Group, PathScale
-    "-acc"
+    "-acc -ta=tesla:nordc"
   )

   set(ACC_FLAG_GNU "-fopenacc")
-  set(ACC_FLAG_PathScale "-acc")
-  set(ACC_FLAG_PGI "-acc")
+  set(ACC_FLAG_PathScale "-acc ")
+  set(ACC_FLAG_PGI "-acc -ta=tesla:nordc")

   # Move the flag that matches the compiler to the head of the list,
   # this is faster and doesn't clutter the output that much. If that


Remove unncessary include

Remove unncessary include

--- cmake/AddCobaltLib.cmake
+++ cmake/AddCobaltLib.cmake
@@ -1,5 +1,4 @@
 include(CMakeParseArguments)
-include(CMakeFindDependencyMacro)

 function(add_cobalt_lib NAME)
     set(options OPTIMIZE_ALPHA OPTIMIZE_BETA ENABLE_LOGGER EXCLUDE_FROM_ALL)


remove ADD_DEFINITION(DUSE_GLOG) in Dependencies.cmake to avoid compilation warning

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -68,7 +68,7 @@
 FIND_PACKAGE(Glog)
 IF(GLOG_FOUND)
     #MESSAGE(STATUS "GLOG FOUND at ${GLOG_INCLUDE_DIR}")
-    ADD_DEFINITIONS("-DUSE_GLOG")
+    #ADD_DEFINITIONS("-DUSE_GLOG")
     SET(USE_GLOG TRUE)
     LIST(APPEND SINGA_LINKER_LIBS ${GLOG_LIBRARIES})
     INCLUDE_DIRECTORIES(${GLOG_INCLUDE_DIR})


Add SUPPORT_NAMES argument to test macro

--- cmake/DevBaseMacro.cmake
+++ cmake/DevBaseMacro.cmake
@@ -172,7 +172,12 @@
 macro(add_unit_test)
     set(OPTIONS "")
     set(ONE_VALUE_ARGUMENTS SCOPE NAME)
-    set(MULTI_VALUE_ARGUMENTS OBJECT_LIBRARIES LINK_LIBRARIES DEPENDENCIES)
+    set(MULTI_VALUE_ARGUMENTS
+        SUPPORT_NAMES
+        OBJECT_LIBRARIES
+        LINK_LIBRARIES
+        DEPENDENCIES
+    )

     cmake_parse_arguments(ADD_UNIT_TEST "${OPTIONS}" "${ONE_VALUE_ARGUMENTS}"
         "${MULTI_VALUE_ARGUMENTS}" ${ARGN})
@@ -188,6 +193,7 @@
     set(TEST_EXE_NAME ${ADD_UNIT_TEST_SCOPE}_${TEST_MODULE_NAME})

     add_executable(${TEST_EXE_NAME} ${TEST_MODULE_NAME}
+        ${ADD_UNIT_TEST_SUPPORT_NAMES}
         ${ADD_UNIT_TEST_OBJECT_LIBRARIES})

     target_link_libraries(${TEST_EXE_NAME}
@@ -224,8 +230,13 @@
 function(add_unit_tests)
     set(OPTIONS "")
     set(ONE_VALUE_ARGUMENTS SCOPE)
-    set(MULTI_VALUE_ARGUMENTS NAMES OBJECT_LIBRARIES LINK_LIBRARIES
-        DEPENDENCIES)
+    set(MULTI_VALUE_ARGUMENTS
+        NAMES
+        SUPPORT_NAMES
+        OBJECT_LIBRARIES
+        LINK_LIBRARIES
+        DEPENDENCIES
+    )

     cmake_parse_arguments(ADD_UNIT_TESTS "${OPTIONS}" "${ONE_VALUE_ARGUMENTS}"
         "${MULTI_VALUE_ARGUMENTS}" ${ARGN})
@@ -241,6 +252,7 @@
         add_unit_test(
             SCOPE ${ADD_UNIT_TESTS_SCOPE}
             NAME ${NAME}
+            SUPPORT_NAMES ${ADD_UNIT_TESTS_SUPPORT_NAMES}
             OBJECT_LIBRARIES ${ADD_UNIT_TESTS_OBJECT_LIBRARIES}
             LINK_LIBRARIES ${ADD_UNIT_TESTS_LINK_LIBRARIES})
         set(target_name ${ADD_UNIT_TESTS_SCOPE}_${NAME})


pkg-config version for a5 is just 5

pkg-config version for a5 is just 5

--- cmake/FindALLEGRO5.cmake
+++ cmake/FindALLEGRO5.cmake
@@ -17,15 +17,15 @@
   $ENV{MINGDIR}/include/allegro5
 )

-set(VERSION_NUMBER "5.1")
+set(VERSION_NUMBER "5")

 if(UNIX AND NOT CYGWIN)
 	exec_program(pkg-config ARGS "allegro-${VERSION_NUMBER} allegro_ttf-${VERSION_NUMBER} allegro_memfile-${VERSION_NUMBER} allegro_image-${VERSION_NUMBER} allegro_primitives-${VERSION_NUMBER} allegro_audio-${VERSION_NUMBER} allegro_acodec-${VERSION_NUMBER} --libs" OUTPUT_VARIABLE ALLEGRO_LIBRARY)
-	IF (NOT ${ALLEGRO_LIBRARY})
+    #IF (NOT ${ALLEGRO_LIBRARY})
 	    # FALL BACK TO 5.0
-	    set(VERSION_NUMBER "5.0")
-	    exec_program(pkg-config ARGS "allegro-${VERSION_NUMBER} allegro_ttf-${VERSION_NUMBER} allegro_memfile-${VERSION_NUMBER} allegro_image-${VERSION_NUMBER} allegro_primitives-${VERSION_NUMBER} allegro_audio-${VERSION_NUMBER} allegro_acodec-${VERSION_NUMBER} --libs" OUTPUT_VARIABLE ALLEGRO_LIBRARY)
-	ENDIF (NOT ${ALLEGRO_LIBRARY})
+        #    set(VERSION_NUMBER "5.0")
+        #    exec_program(pkg-config ARGS "allegro-${VERSION_NUMBER} allegro_ttf-${VERSION_NUMBER} allegro_memfile-${VERSION_NUMBER} allegro_image-${VERSION_NUMBER} allegro_primitives-${VERSION_NUMBER} allegro_audio-${VERSION_NUMBER} allegro_acodec-${VERSION_NUMBER} --libs" OUTPUT_VARIABLE ALLEGRO_LIBRARY)
+        # ENDIF (NOT ${ALLEGRO_LIBRARY})
 	# Check if any of these checks have found if so then cause failure)
 	STRING(REGEX MATCH "not found" LIB_CHECK ${ALLEGRO_LIBRARY})
 	IF (${LIB_CHECK})


Export LLVM_ALL_TARGETS in LLVM.cmake. It is used by LLVMConfig.

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

--- cmake/modules/LLVM.cmake
+++ cmake/modules/LLVM.cmake
@@ -5,6 +5,8 @@
 set(llvm_libs @llvm_libs@)

 set(llvm_lib_targets @llvm_lib_targets@)
+
+set(LLVM_ALL_TARGETS @LLVM_ALL_TARGETS@)

 set(LLVM_TARGETS_TO_BUILD @LLVM_TARGETS_TO_BUILD@)


added rosconsole and roscpp_serialization

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

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

 macro(link_ros_libs _target)
     if(USE_ROS)
-        target_link_libraries(${_target} sensor_msgs)
+        target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole)
     endif(USE_ROS)
 endmacro(link_ros_libs)


Fix FindFFMPEG. Previously, cmake was setting _COMPONENT_FOUND true even if the headers weren't found.
The new version should work much better.
The deprecated 'pkgconfig' was also replaced.

svn path=/trunk/kdesupport/strigi/; revision=1139520

--- libstreamanalyzer/cmake/FindFFMPEG.cmake
+++ libstreamanalyzer/cmake/FindFFMPEG.cmake
@@ -7,37 +7,43 @@
 #  FFMPEG_DEFINITIONS - Compiler switches required for using FFMPEG
 #
 #  Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
+#  Copyright (c) 2010 Christophe Giboudeaux <cgiboudeaux@gmail.com>
 #
 #  Redistribution and use is allowed according to the terms of the New
 #  BSD license.
 #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #
-

 if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIRS)
   # in cache already
   set(FFMPEG_FOUND TRUE)
 else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIRS)
+
+  include(FindPkgConfig)
+
   # use pkg-config to get the directories and then use these values
   # in the FIND_PATH() and FIND_LIBRARY() calls
-  if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
-    include(UsePkgConfig)
-    pkgconfig(libavcodec _AVCODEC_INCLUDEDIR _AVCODEC_LIBDIR _AVCODEC_LDFLAGS _AVCODEC_CFLAGS)
-    pkgconfig(libavformat _AVFORMAT_INCLUDEDIR _AVFORMAT_LIBDIR _AVFORMAT_LDFLAGS _AVFORMAT_CFLAGS)
-    pkgconfig(libavutil _AVUTIL_INCLUDEDIR _AVUTIL_LIBDIR _AVUTIL_LDFLAGS _AVUTIL_CFLAGS)
-#    pkgconfig(libpostproc _POSTPROC_INCLUDEDIR _POSTPROC_LIBDIR _POSTPROC_LDFLAGS _POSTPROC_CFLAGS)
-    pkgconfig(libswscale _SWSCALE_INCLUDEDIR _SWSCALE_LIBDIR _SWSCALE_LDFLAGS _SWSCALE_CFLAGS)
-  else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
-    message("Doing find_package(PkgConfig)")
-    find_package(PkgConfig)
-    if (PKG_CONFIG_FOUND)
-      pkg_check_modules(_AVCODEC libavcodec)
-      pkg_check_modules(_AVFORMAT libavformat)
-      pkg_check_modules(_AVUTIL libavutil)
-#      pkg_check_modules(_POSTPROC libpostproc)
-      pkg_check_modules(_SWSCALE libswscale)
-    endif (PKG_CONFIG_FOUND)
-  endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+  if (NOT WIN32)
+    include(UsePkgConfig REQUIRED)
+    pkg_check_modules(_AVCODEC libavcodec)
+    pkg_check_modules(_AVFORMAT libavformat)
+    pkg_check_modules(_AVUTIL libavutil)
+    #pkg_check_modules(_POSTPROC libpostproc)
+    pkg_check_modules(_SWSCALE libswscale)
+
+  endif (NOT WIN32)
+
+  find_library(AVCODEC_LIBRARY
+    NAMES
+      avcodec
+    PATHS
+      ${_AVCODEC_LIBDIR}
+      /usr/lib
+      /usr/local/lib
+      /opt/local/lib
+      /sw/lib
+    NO_DEFAULT_PATH
+  )

   find_path(AVCODEC_INCLUDE_DIR
     NAMES
@@ -54,9 +60,55 @@
     NO_DEFAULT_PATH
   )

-  message("AVCODEC_INCLUDE_DIR = ${AVCODEC_INCLUDE_DIR}")
-
-  mark_as_advanced(AVCODEC_INCLUDE_DIR)
+  if(AVCODEC_LIBRARY AND AVCODEC_INCLUDE_DIR)
+    set(AVCODEC_FOUND TRUE)
+    mark_as_advanced(AVCODEC_LIBRARY AVCODEC_INCLUDE_DIR)
+  endif(AVCODEC_LIBRARY AND AVCODEC_INCLUDE_DIR)
+
+  find_library(AVFORMAT_LIBRARY
+    NAMES
+      avformat
+    PATHS
+      ${_AVFORMAT_LIBDIR}
+      /usr/lib
+      /usr/local/lib
+      /opt/local/lib
+      /sw/lib
+    NO_DEFAULT_PATH
+  )
+
+  find_path(AVFORMAT_INCLUDE_DIR
+    NAMES
+      avformat.h
+    PATHS
+      ${_AVFORMAT_INCLUDEDIR}
+      /usr/include
+      /usr/local/include
+      /opt/local/include
+      /sw/include
+    PATH_SUFFIXES
+      libavformat
+      ffmpeg
+    NO_DEFAULT_PATH
+  )
+
+  if(AVFORMAT_LIBRARY AND AVFORMAT_INCLUDE_DIR)
+    set(AVFORMAT_FOUND TRUE)
+    mark_as_advanced(AVFORMAT_LIBRARY AVFORMAT_INCLUDE_DIR)
+  endif(AVFORMAT_LIBRARY AND AVFORMAT_INCLUDE_DIR)
+
+  find_library(AVUTIL_LIBRARY
+    NAMES
+      avutil
+    PATHS
+      ${_AVUTIL_LIBDIR}
+      /usr/lib
+      /usr/local/lib
+      /opt/local/lib
+      /sw/lib
+    NO_DEFAULT_PATH
+  )
+  mark_as_advanced(AVUTIL_LIBRARY)

   find_path(AVUTIL_INCLUDE_DIR
     NAMES
@@ -72,41 +124,24 @@
       ffmpeg
     NO_DEFAULT_PATH
   )
-  mark_as_advanced(AVUTIL_INCLUDE_DIR)
-
-  find_path(AVFORMAT_INCLUDE_DIR
-    NAMES
-      avformat.h
-    PATHS
-      ${_AVFORMAT_INCLUDEDIR}
-      /usr/include
-      /usr/local/include
-      /opt/local/include
-      /sw/include
-    PATH_SUFFIXES
-      libavformat
-      ffmpeg
-    NO_DEFAULT_PATH
-  )
-  mark_as_advanced(AVFORMAT_INCLUDE_DIR)
-
-  if (FALSE)
-  find_path(POSTPROC_INCLUDE_DIR
-    NAMES
-      postprocess.h
-    PATHS
-      ${_POSTPROC_INCLUDEDIR}
-      /usr/include/postproc
-      /usr/local/include/postproc
-      /opt/local/include/postproc
-      /sw/include
-    PATH_SUFFIXES
-      libpostproc
-      ffmpeg
-  )
-  mark_as_advanced(POSTPROC_INCLUDE_DIR)
-  endif(FALSE)
-
+
+  if(AVUTIL_LIBRARY AND AVUTIL_INCLUDE_DIR)
+    set(AVUTIL_FOUND TRUE)
+    mark_as_advanced(AVUTIL_LIBRARY AVUTIL_INCLUDE_DIR)
+  endif(AVUTIL_LIBRARY AND AVUTIL_INCLUDE_DIR)
+
+  find_library(SWSCALE_LIBRARY
+    NAMES
+      swscale
+    PATHS
+      ${_SWSCALE_LIBDIR}
+      /usr/lib
+      /usr/local/lib
+      /opt/local/lib
+      /sw/lib
+    NO_DEFAULT_PATH
+  )
+
   find_path(SWSCALE_INCLUDE_DIR
     NAMES
       swscale.h
@@ -121,159 +156,60 @@
       ffmpeg
     NO_DEFAULT_PATH
   )
-  mark_as_advanced(SWSCALE_INCLUDE_DIR)
-
-  find_library(AVCODEC_LIBRARY
-    NAMES
-      avcodec
-    PATHS
-      ${_FFMPEG_LIBDIR}
-      /usr/lib
-      /usr/local/lib
-      /opt/local/lib
-      /sw/lib
-    NO_DEFAULT_PATH
-  )
-  mark_as_advanced(AVCODEC_LIBRARY)
-
-  find_library(AVUTIL_LIBRARY
-    NAMES
-      avutil
-    PATHS
-      ${_FFMPEG_LIBDIR}
-      /usr/lib
-      /usr/local/lib
-      /opt/local/lib
-      /sw/lib
-    NO_DEFAULT_PATH
-  )
-  mark_as_advanced(AVUTIL_LIBRARY)
-
-  find_library(AVFORMAT_LIBRARY
-    NAMES
-      avformat
-    PATHS
-      ${_FFMPEG_LIBDIR}
-      /usr/lib
-      /usr/local/lib
-      /opt/local/lib
-      /sw/lib
-    NO_DEFAULT_PATH
-  )
-  mark_as_advanced(AVFORMAT_LIBRARY)
-
-  if (FALSE)
-  find_library(POSTPROC_LIBRARY
-    NAMES
-      postproc
-    PATHS
-      ${_FFMPEG_LIBDIR}
-      /usr/lib
-      /usr/local/lib
-      /opt/local/lib
-      /sw/lib
-    NO_DEFAULT_PATH
-  )
-  mark_as_advanced(POSTPROC_LIBRARY)
-  endif(FALSE)
-
-  find_library(SWSCALE_LIBRARY
-    NAMES
-      swscale
-    PATHS
-      ${_FFMPEG_LIBDIR}
-      /usr/lib
-      /usr/local/lib
-      /opt/local/lib
-      /sw/lib
-    NO_DEFAULT_PATH
-  )
-  mark_as_advanced(SWSCALE_LIBRARY)
-
-  if (AVCODEC_LIBRARY)
-    set(AVCODEC_FOUND TRUE)
-  endif (AVCODEC_LIBRARY)
-  if (AVUTIL_LIBRARY)
-    set(AVUTIL_FOUND TRUE)
-  endif (AVUTIL_LIBRARY)
-  if (AVFORMAT_LIBRARY)
-    set(AVFORMAT_FOUND TRUE)
-  endif (AVFORMAT_LIBRARY)
-
- if (POSTPROC_LIBRARY)
-    set(POSTPROC_FOUND TRUE)
-  endif (POSTPROC_LIBRARY)
-  if (SWSCALE_LIBRARY)
+
+  if(SWSCALE_LIBRARY AND SWSCALE_INCLUDE_DIR)
     set(SWSCALE_FOUND TRUE)
-  endif (SWSCALE_LIBRARY)
-
-  if (AVCODEC_FOUND)
-    set(FFMPEG_LIBRARIES
-      ${FFMPEG_LIBRARIES}
-      ${AVCODEC_LIBRARY}
+  mark_as_advanced(SWSCALE_LIBRARY SWSCALE_INCLUDE_DIR)
+  endif(SWSCALE_LIBRARY AND SWSCALE_INCLUDE_DIR)
+
+  #  find_library(POSTPROC_LIBRARY
+  #    NAMES
+  #      postproc
+  #    PATHS
+  #      ${_POSTPROC_LIBDIR}
+  #      /usr/lib
+  #      /usr/local/lib
+  #      /opt/local/lib
+  #      /sw/lib
+  #    NO_DEFAULT_PATH
+  #  )
+  #  mark_as_advanced(POSTPROC_LIBRARY)
+
+  #  find_path(POSTPROC_INCLUDE_DIR
+  #    NAMES
+  #      postprocess.h
+  #    PATHS
+  #      ${_POSTPROC_INCLUDEDIR}
+  #      /usr/include/postproc
+  #      /usr/local/include/postproc
+  #      /opt/local/include/postproc
+  #      /sw/include
+  #    PATH_SUFFIXES
+  #      libpostproc
+  #      ffmpeg
+  #  )
+  #  mark_as_advanced(POSTPROC_INCLUDE_DIR)
+
+  # if(POSTPROC_LIBRARY AND POSTPROC_INCLUDE_DIR)
+  #   set(SWSCALE_FOUND TRUE)
+  # mark_as_advanced(POSTPROC_LIBRARY POSTPROC_INCLUDE_DIR)
+  # endif(POSTPROC_LIBRARY AND POSTPROC_INCLUDE_DIR)
+
+  if(AVCODEC_FOUND AND AVFORMAT_FOUND AND AVUTIL_FOUND AND SWSCALE_FOUND)
+    set (FFMPEG_LIBRARIES
+        ${AVCODEC_LIBRARY}
+        ${AVFORMAT_LIBRARY}
+        ${AVUTIL_LIBRARY}
+        ${SWSCALE_LIBRARY}
     )
     set(FFMPEG_INCLUDE_DIRS
-      ${_AVCODEC_INCLUDEDIR}
-      ${AVCODEC_INCLUDE_DIR}
+        ${AVCODEC_INCLUDE_DIR}
+        ${AVFORMAT_INCLUDE_DIR}
+        ${AVUTIL_INCLUDE_DIR}
+        ${SWSCALE_INCLUDE_DIR}
     )
-  endif (AVCODEC_FOUND)
-  if (AVUTIL_FOUND)
-    set(FFMPEG_LIBRARIES
-      ${FFMPEG_LIBRARIES}
-      ${AVUTIL_LIBRARY}
-    )
-    set(FFMPEG_INCLUDE_DIRS
-      ${AVUTIL_INCLUDE_DIR}
-      ${FFMPEG_INCLUDE_DIRS}
-    )
-  endif (AVUTIL_FOUND)
-  if (AVFORMAT_FOUND)
-    set(FFMPEG_LIBRARIES
-      ${FFMPEG_LIBRARIES}
-      ${AVFORMAT_LIBRARY}
-    )
-    set(FFMPEG_INCLUDE_DIRS
-      ${AVFORMAT_INCLUDE_DIR}
-      ${FFMPEG_INCLUDE_DIRS}
-    )
-  endif (AVFORMAT_FOUND)
-  if (POSTPROC_FOUND)
-    set(FFMPEG_LIBRARIES
-      ${FFMPEG_LIBRARIES}
-      ${POSTPROC_LIBRARY}
-    )
-    set(FFMPEG_INCLUDE_DIRS
-      ${POSTPROC_INCLUDE_DIR}
-      ${FFMPEG_INCLUDE_DIRS}
-    )
-  endif (POSTPROC_FOUND)
-  if (SWSCALE_FOUND)
-    set(FFMPEG_LIBRARIES
-      ${FFMPEG_LIBRARIES}
-      ${SWSCALE_LIBRARY}
-    )
-    set(FFMPEG_INCLUDE_DIRS
-      ${SWSCALE_INCLUDE_DIR}
-      ${FFMPEG_INCLUDE_DIRS}
-    )
-  endif (SWSCALE_FOUND)
-
-  if (FFMPEG_INCLUDE_DIRS AND FFMPEG_LIBRARIES)
-     set(FFMPEG_FOUND TRUE)
-  endif (FFMPEG_INCLUDE_DIRS AND FFMPEG_LIBRARIES)
-
-  if (FFMPEG_FOUND)
-    if (NOT FFMPEG_FIND_QUIETLY)
-      message(STATUS "Found FFMPEG: ${FFMPEG_LIBRARIES}")
-    endif (NOT FFMPEG_FIND_QUIETLY)
-  else (FFMPEG_FOUND)
-    if (FFMPEG_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find FFMPEG")
-    endif (FFMPEG_FIND_REQUIRED)
-  endif (FFMPEG_FOUND)
-
-  # show the FFMPEG_INCLUDE_DIRS and FFMPEG_LIBRARIES variables only in the advanced view
-  mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES)
+    set(FFMPEG_FOUND TRUE)
+    mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES)
+  endif(AVCODEC_FOUND AND AVFORMAT_FOUND AND AVUTIL_FOUND AND SWSCALE_FOUND)

 endif (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIRS)
-


Fixing code to locate wrapping executables.

Fixes issue with VTK_WRAP_TCL_INIT_EXE.

Change-Id: I5f66d66453c355a1194ebc2ae1e6f0c327819377

--- CMake/vtkTclWrapping.cmake
+++ CMake/vtkTclWrapping.cmake
@@ -7,7 +7,12 @@

 function(vtk_add_tcl_wrapping module_name module_srcs module_hdrs)
   if(NOT VTK_WRAP_TCL_INIT_EXE)
-    message(FATAL_ERROR "VTK must be built with Tcl wrapping turned on.")
+    if (TARGET vtkWrapTclInit)
+      set(VTK_WRAP_TCL_INIT_EXE vtkWrapTclInit)
+    else()
+      message(FATAL_ERROR
+        "VTK_WRAP_TCL_INIT_EXE must be set before calling vtk_add_tcl_wrapping.")
+    endif()
   endif()
   # Need to add the Wrapping directory to the include directory
   set(_tcl_include_dirs


Small fix to non debug path

Small fix to non debug path

--- CMakeModules/FindPNG.cmake
+++ CMakeModules/FindPNG.cmake
@@ -10,7 +10,7 @@
 		set(PNG_FIND_QUIETLY TRUE)
 	endif(PNG_INCLUDE_DIR AND PNG_LIBRARY AND PNG_LIBRARY_DEBUG)
 else(PNG_FIND_DEBUG)
-	if(PNG_INCLUDE_DIR AND QUIKGRID_LIBRARY)
+	if(PNG_INCLUDE_DIR AND PNG_LIBRARY)
 		set(PNG_FIND_QUIETLY TRUE)
 	endif(PNG_INCLUDE_DIR AND PNG_LIBRARY)
 endif(PNG_FIND_DEBUG)


Have moved FindXUL.cmake to deprecated

Have moved FindXUL.cmake to deprecated

--- CMakeModules/FindXUL.cmake
+++ CMakeModules/FindXUL.cmake
@@ -1,175 +0,0 @@
-# Locate XUL
-# This module defines
-# XUL_LIBRARIES
-# XUL_FOUND, if false, do not try to link to gdal
-# XUL_INCLUDE_DIR, where to find the headers
-#
-# $XUL_DIR is an environment variable that would
-# correspond to the ./configure --prefix=$XUL_DIR
-#
-# Created by Robert Osfield.
-
-#use pkg-config to find various modues
-INCLUDE(FindPkgConfig OPTIONAL)
-
-IF(PKG_CONFIG_FOUND)
-
-    INCLUDE(FindPkgConfig)
-
-    pkg_check_modules(XULRUNNER_XPCOM xulrunner-xpcom<=1.8.9)
-    pkg_check_modules(XULRUNNER_JS xulrunner-js)
-    pkg_check_modules(XULRUNNER_NSPR xulrunner-nspr)
-    pkg_check_modules(XULRUNNER_NSS xulrunner-nss)
-
-ENDIF(PKG_CONFIG_FOUND)
-
-# Added check to make sure that nsIBaseWindow.h is available, as it's not a standard part the of 1.8.x SDK
-FIND_PATH(NSIBASEWINDOW_INCLUDE_DIR widget/nsIBaseWindow.h
-    PATHS ${XULRUNNER_XPCOM_INCLUDE_DIRS}
-    ~/Library/Frameworks
-    /Library/Frameworks
-    /usr/local/include/xulrunner
-    /usr/local/include
-    /usr/include/xulrunner
-    /usr/include
-    /sw/include/xulrunner # Fink
-    /sw/include # Fink
-    /opt/local/include/xulrunner # DarwinPorts
-    /opt/local/include # DarwinPorts
-    /opt/csw/include/xulrunner # Blastwave
-    /opt/csw/include # Blastwave
-    /opt/include/xulrunner
-    /opt/include
-    /usr/freeware/include/xulrunner
-    /usr/freeware/include
-)
-
-FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
-    PATHS ${XULRUNNER_XPCOM_INCLUDE_DIRS}
-    ~/Library/Frameworks
-    /Library/Frameworks
-    /usr/local/include/xulrunner
-    /usr/local/include
-    /usr/include/xulrunner
-    /usr/include
-    /sw/include/xulrunner # Fink
-    /sw/include # Fink
-    /opt/local/include/xulrunner # DarwinPorts
-    /opt/local/include # DarwinPorts
-    /opt/csw/include/xulrunner # Blastwave
-    /opt/csw/include # Blastwave
-    /opt/include/xulrunner
-    /opt/include
-    /usr/freeware/include/xulrunner
-    /usr/freeware/include
-)
-
-FIND_PATH(NSPR_INCLUDE_DIR prtypes.h
-    PATHS ${XULRUNNER_NSPR_INCLUDE_DIRS}
-    ~/Library/Frameworks
-    /Library/Frameworks
-    /usr/local/include/nspr
-    /usr/local/include
-    /usr/include/nspr
-    /usr/include
-    /sw/include/nspr # Fink
-    /sw/include # Fink
-    /opt/local/include/nspr # DarwinPorts
-    /opt/local/include # DarwinPorts
-    /opt/csw/include/nspr # Blastwave
-    /opt/csw/include # Blastwave
-    /opt/include/nspr
-    /opt/include
-    /usr/freeware/include/nspr
-    /usr/freeware/include
-)
-
-FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
-    PATHS ${XULRUNNER_JS_INCLUDE_DIRS}
-    ~/Library/Frameworks
-    /Library/Frameworks
-    /usr/local/include/mozjs
-    /usr/local/include
-    /usr/include/mozjs
-    /usr/include
-    /sw/include/mozjs # Fink
-    /sw/include # Fink
-    /opt/local/include/mozjs # DarwinPorts
-    /opt/local/include # DarwinPorts
-    /opt/csw/include/mozjs # Blastwave
-    /opt/csw/include # Blastwave
-    /opt/include/mozjs
-    /opt/include
-    /usr/freeware/include/mozjs
-    /usr/freeware/include
-)
-
-FIND_PATH(XUL_DIR
-    NAMES components/appshell.xpt
-    PATHS
-    ~/Library/Frameworks
-    /Library/Frameworks
-    /usr/local/lib/xulrunner
-    /usr/local/lib
-    /usr/lib/xulrunner
-    /usr/lib
-    /sw/lib/xulrunner
-    /sw/lib
-    /opt/local/lib/xulrunner
-    /opt/local/lib
-    /opt/csw/lib/xulrunner
-    /opt/csw/lib
-    /opt/lib/xulrunner
-    /opt/lib
-    /usr/freeware/lib64/xulrunner
-    /usr/freeware/lib64
-)
-
-MACRO(FIND_XUL_LIBRARY MYLIBRARY MYLIBRARYNAME)
-
-    FIND_LIBRARY(${MYLIBRARY}
-        PATHS ${XULRUNNER_XPCOM_LIBRARY_DIRS}
-        PATHS ${XULRUNNER_JS_LIBRARY_DIRS}
-        PATHS ${XULRUNNER_NSPR_LIBRARY_DIRS}
-        PATHS ${XULRUNNER_NSS_LIBRARY_DIRS}
-        NAMES ${MYLIBRARYNAME}
-        PATHS
-        ~/Library/Frameworks
-        /Library/Frameworks
-        /usr/local/lib/xulrunner
-        /usr/local/lib
-        /usr/lib/xulrunner
-        /usr/lib
-        /sw/lib/xulrunner
-        /sw/lib
-        /opt/local/lib/xulrunner
-        /opt/local/lib
-        /opt/csw/lib/xulrunner
-        /opt/csw/lib
-        /opt/lib/xulrunner
-        /opt/lib
-        /usr/freeware/lib64/xulrunner
-        /usr/freeware/lib64
-    )
-
-ENDMACRO(FIND_XUL_LIBRARY LIBRARY LIBRARYNAME)
-
-
-FIND_XUL_LIBRARY(XUL_LIBRARY xul plds4 plc4 nspr4)
-FIND_XUL_LIBRARY(XUL_MOZJS_LIBRARY mozjs)
-FIND_XUL_LIBRARY(XUL_XPCOM_LIBRARY xpcom)
-FIND_XUL_LIBRARY(XUL_PLUGIN_LIBRARY plds4)
-FIND_XUL_LIBRARY(XUL_NSS_LIBRARY nss3)
-
-
-SET(XUL_FOUND "NO")
-IF(XUL_LIBRARY AND XUL_INCLUDE_DIR AND NSIBASEWINDOW_INCLUDE_DIR)
-
-    SET(XUL_FOUND "YES")
-    SET(XUL_LIBRARIES ${XUL_LIBRARY} ${XUL_MOZJS_LIBRARY} ${XUL_XPCOM_LIBRARY} ${XUL_PLUGIN_LIBRARY} ${XUL_NSS_LIBRARY})
-    SET(XUL_INCLUDE_DIRS ${XUL_INCLUDE_DIR} ${NSPR_INCLUDE_DIR} ${MOZJS_INCLUDE_DIR})
-
-ENDIF(XUL_LIBRARY AND XUL_INCLUDE_DIR AND NSIBASEWINDOW_INCLUDE_DIR)
-
-# MESSAGE("XUL_INCLUDE_DIR " ${XUL_INCLUDE_DIR})
-# MESSAGE("XUL_LIBRARIES " ${XUL_LIBRARIES})


Update FindACE.cmake

Update FindACE.cmake

Added ACE paths for OS X (MacPorts edition)

--- CMakeScripts/FindACE.cmake
+++ CMakeScripts/FindACE.cmake
@@ -18,14 +18,16 @@
 ENDIF (ACE_path AND ACE_lib_path)

 FIND_PATH(ACE_path ace/ACE.h
+  /opt/local/include/ace
   /usr/local/include/ace
   /usr/include/ace
   ${MAIN_INCLUDE_PATH}
   ${MAIN_INCLUDE_PATH}/ace
 )

-FIND_PATH(ACE_lib_path NAMES ACE.lib libACE.so
+FIND_PATH(ACE_lib_path NAMES ACE.lib libACE.so libACE.dylib
     PATHS
+        /opt/local/lib
         /usr/lib
         /usr/local/lib
         ${MAIN_LIB_PATH}


Preserve the JS output file timestamp to avoid unnecessary re-link. At the moment a re-link may still take place due to a limitation of Emscripten's file_packager.py tool.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -1052,18 +1052,16 @@

     # Define a custom command for generating a shared data files (if enabled)
     if (EMSCRIPTEN_SHARE_DATA AND RESOURCE_PAKS)
-        if (NOT TARGET DATA_SHARE)
-            # When sharing a single data file, all main targets are assumed to use a same set of resource paks
-            foreach (FILE ${RESOURCE_PAKS})
-                get_filename_component (NAME ${FILE} NAME)
-                list (APPEND PAK_NAMES ${NAME})
-            endforeach ()
-            add_custom_command (OUTPUT ${SHARED_RESOURCE_JS}
-                COMMAND ${EMPACKAGER} ${SHARED_RESOURCE_JS}.data --preload ${PAK_NAMES} --js-output=${SHARED_RESOURCE_JS} --use-preload-cache
-                DEPENDS RESOURCE_CHECK ${RESOURCE_PAKS}
-                WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-                COMMENT "Creating shared data files")
-        endif ()
+        # When sharing a single data file, all main targets are assumed to use a same set of resource paks
+        foreach (FILE ${RESOURCE_PAKS})
+            get_filename_component (NAME ${FILE} NAME)
+            list (APPEND PAK_NAMES ${NAME})
+        endforeach ()
+        add_custom_command (OUTPUT ${SHARED_RESOURCE_JS}
+            COMMAND ${EMPACKAGER} ${SHARED_RESOURCE_JS}.data --preload ${PAK_NAMES} --js-output=${SHARED_RESOURCE_JS}.new --use-preload-cache && ${CMAKE_COMMAND} -E copy_if_different ${SHARED_RESOURCE_JS}.new ${SHARED_RESOURCE_JS} && ${CMAKE_COMMAND} -E remove ${SHARED_RESOURCE_JS}.new
+            DEPENDS RESOURCE_CHECK ${RESOURCE_PAKS}
+            WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+            COMMENT "Creating shared data files")
     endif ()
 endmacro ()


COMP: Update ITK to address itk::NumericTraits::Zero build errors.

This includes
InsightSoftwareConsortium/ITK@5aa604c9942612957dd0d6f2bf8f2fbca928885b
which should address dashboard build errors like:

   TubeTK-Debug/TubeTK-build/ITKModules/MinimalPathExtraction/test/MinimalPathTest.h:211:
   undefined reference to `itk::NumericTraits::Zero'

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -87,7 +87,7 @@

 # Insight Segmentation and Registration Toolkit
 set( ITK_URL ${github_protocol}://github.com/Slicer/ITK.git )
-set( ITK_HASH_OR_TAG 9fa8f6333a4d66f31f26527b2eb23e170a0e6e16 )
+set( ITK_HASH_OR_TAG 58a7203f9ec431f9fe71ac087d0bd7e02b495634 )

 # Slicer Execution Model
 set( SlicerExecutionModel_URL


Undefined EIGEN3_INCLUDE_DIR made test fail in some cmake versions

It is undefined because it was not downloaded/looked up yet.

--- tests/lookup_eigen.cmake
+++ tests/lookup_eigen.cmake
@@ -4,7 +4,9 @@
 include(PackageLookup)
 lookup_package(Eigen3 DOWNLOAD_BY_DEFAULT KEEP)

-include_directories(${EIGEN3_INCLUDE_DIR})
+if(EIGEN3_INCLUDE_DIR)
+  include_directories(${EIGEN3_INCLUDE_DIR})
+endif()
 file(WRITE "${CMAKE_SOURCE_DIR}/main.cc"
     "#include <iostream>\n"
     "#include <Eigen/Dense>\n"


remove support for older cuda since we don't compile

--- caffe/cmake/Cuda.cmake
+++ caffe/cmake/Cuda.cmake
@@ -4,7 +4,7 @@

 # Known NVIDIA GPU achitectures Caffe can be compiled for.
 # This list will be used for CUDA_ARCH_NAME = All option
-set(Caffe_known_gpu_archs "20 21(20) 30 35 50 60 61")
+set(Caffe_known_gpu_archs "30 35 50 60 61")

 ################################################################################################
 # A function for automatic detection of GPUs installed  (if autodetection is enabled)


Pass extra CFLAGS using property

Pass extra CFLAGS using property

--- projects/python.cmake
+++ projects/python.cmake
@@ -1,9 +1,9 @@
-
+set_property(GLOBAL PROPERTY python_APPEND_PROJECT_ONLY_FLAGS_CMAKE_C_FLAGS -I${CMAKE_OSX_SYSROOT}/usr/include)
 add_external_project_or_use_system(python
   CONFIGURE_COMMAND <SOURCE_DIR>/configure
                     --prefix=<INSTALL_DIR>
                     --enable-unicode=ucs4
-                    --enable-shared CFLAGS=-I${CMAKE_OSX_SYSROOT}/usr/include
+                    --enable-shared
   PROCESS_ENVIRONMENT CFLAGS -I${CMAKE_OSX_SYSROOT}/usr/include
   )
 set (pv_python_executable "${install_location}/bin/python3" CACHE INTERNAL "" FORCE)


add antweakbar lib

add antweakbar lib

--- cmake/FindLIBIGL.cmake
+++ cmake/FindLIBIGL.cmake
@@ -67,6 +67,13 @@
   endif(NOT LIBIGL_LIBRARY)
   set(LIBIGL_LIBRARIES ${LIBIGL_LIBRARIES}  ${LIBIGL_LIBRARY})

+  FIND_LIBRARY( LIBIGLANTTWEAKBAR_LIBRARY NAMES iglanttweakbar PATHS ${LIBIGL_LIB_DIRS})
+  if(NOT LIBIGLANTTWEAKBAR_LIBRARY)
+    set(LIBIGL_FOUND FALSE)
+    message(FATAL_ERROR "could NOT find libiglanttweakbar")
+  endif(NOT LIBIGLANTTWEAKBAR_LIBRARY)
+  set(LIBIGL_LIBRARIES ${LIBIGL_LIBRARIES}  ${LIBIGLANTTWEAKBAR_LIBRARY})
+
   # libiglbbw will work with/without mosek
   FIND_LIBRARY( LIBIGLBBW_LIBRARY NAMES iglbbw PATHS ${LIBIGL_LIB_DIRS})
   if(NOT LIBIGLBBW_LIBRARY)
@@ -135,6 +142,20 @@
     endif(NOT LIBIGLMOSEK_LIBRARY)
     set(LIBIGL_LIBRARIES ${LIBIGL_LIBRARIES}  ${LIBIGLMOSEK_LIBRARY})
   endif(MOSEK_FOUND)
+
+  FIND_LIBRARY( LIBIGLOPENGL_LIBRARY NAMES iglopengl PATHS ${LIBIGL_LIB_DIRS})
+  if(NOT LIBIGLOPENGL_LIBRARY)
+    set(LIBIGL_FOUND FALSE)
+    message(FATAL_ERROR "could NOT find libiglopengl")
+  endif(NOT LIBIGLOPENGL_LIBRARY)
+  set(LIBIGL_LIBRARIES ${LIBIGL_LIBRARIES}  ${LIBIGLOPENGL_LIBRARY})
+
+  FIND_LIBRARY( LIBIGLOPENGL2_LIBRARY NAMES iglopengl2 PATHS ${LIBIGL_LIB_DIRS})
+  if(NOT LIBIGLOPENGL2_LIBRARY)
+    set(LIBIGL_FOUND FALSE)
+    message(FATAL_ERROR "could NOT find libiglopengl2")
+  endif(NOT LIBIGLOPENGL2_LIBRARY)
+  set(LIBIGL_LIBRARIES ${LIBIGL_LIBRARIES}  ${LIBIGLOPENGL2_LIBRARY})

   if(TETGEN_FOUND)
     FIND_LIBRARY( LIBIGLTETGEN_LIBRARY NAMES igltetgen PATHS ${LIBIGL_LIB_DIRS})


CMake: add versions to FindMatlab.cmake

CMake: add versions to FindMatlab.cmake


Only build Metis on Unix platforms

Only build Metis on Unix platforms

--- cmake/SuperBuild.cmake
+++ cmake/SuperBuild.cmake
@@ -108,11 +108,15 @@

 #######################################################################
 if(USE_MPI)
-  find_package(METIS QUIET)
-  if(NOT METIS_FOUND)
-    message(STATUS "Could not find METIS, it will be built from source")
-    include(cmake/external_projects/metis.cmake)
-  endif()
+  if(UNIX)
+    find_package(METIS QUIET)
+    if(NOT METIS_FOUND)
+      message(STATUS "Could not find METIS, it will be built from source")
+      include(cmake/external_projects/metis.cmake)
+    endif()
+  else(UNIX)
+    find_package(METIS REQUIRED)
+  endif(UNIX)
 endif(USE_MPI)


fix UseDoxygen

fix UseDoxygen

--- cmake/UseDoxygen.cmake
+++ cmake/UseDoxygen.cmake
@@ -135,8 +135,9 @@

 	configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY)

-	get_target_property(DOC_TARGET doc TYPE)
-	if(NOT DOC_TARGET)
+	#get_target_property(DOC_TARGET doc TYPE)
+	#if(NOT DOC_TARGET)
+	if(NOT TARGET doc)
 		add_custom_target(doc)
 	endif()


fix(cmake): Default to -O2 for Release builds

--- cmake/build/core.cmake
+++ cmake/build/core.cmake
@@ -18,7 +18,7 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")


cmake: armfvp: Improve the FVP version check

Print a warning message on 'west build -t run', if the FVP does not meet
the minimal requirement. The check acts as a reminder instead of an
entrance guard. So, the check won't stop executing the FVP program.

Signed-off-by: Jaxson Han <70391990969cde8f4f4c008c74e601e9ed3959a1@arm.com>

--- cmake/emu/armfvp.cmake
+++ cmake/emu/armfvp.cmake
@@ -10,7 +10,7 @@
   NAMES ${ARMFVP_BIN_NAME}
   )

-if ((NOT "${ARMFVP}" STREQUAL "ARMFVP-NOTFOUND") AND (DEFINED ARMFVP_MIN_VERSION))
+if(ARMFVP AND (DEFINED ARMFVP_MIN_VERSION))
   execute_process(
     COMMAND ${ARMFVP} --version
     OUTPUT_VARIABLE out
@@ -19,8 +19,13 @@
   string(REPLACE "\n" "" out ${out})
   string(REGEX MATCH "[0-9]+\.[0-9]+\.[0-9]+" armfvp_version ${out})
   if(${armfvp_version} VERSION_LESS ${ARMFVP_MIN_VERSION})
-    message(WARNING "Found FVP version is \"${armfvp_version}\", "
+    set(armfvp_warning_message "Found FVP version is \"${armfvp_version}\", "
       "the minimum required by the current board is \"${ARMFVP_MIN_VERSION}\".")
+    message(WARNING "${armfvp_warning_message}")
+    set(ARMFVP
+      COMMAND ${CMAKE_COMMAND} -E echo ${armfvp_warning_message}
+      COMMAND ${ARMFVP}
+    )
   endif()
 endif()

@@ -54,8 +59,8 @@
   COMMAND
   ${ARMFVP}
   ${ARMFVP_FLAGS}
-  DEPENDS ${ARMFVP} ${logical_target_for_zephyr_elf}
+  DEPENDS ${logical_target_for_zephyr_elf}
   WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
-  COMMENT "FVP: ${ARMFVP}"
+  COMMENT "${ARMFVP_BIN_NAME}: ${armfvp_version}"
   USES_TERMINAL
   )


build(cmake/modules/jq): explaination for jq mirroring link

Co-Authored-By: Leonardo Grasso <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <0189fb5ac8a393aa741cf57f29cfe3228fcad081@gmail.com>

--- cmake/modules/jq.cmake
+++ cmake/modules/jq.cmake
@@ -40,6 +40,8 @@
     #
     # This is needed because many distros do not ship the right
     # version of autoreconf, making virtually impossible to build Falco on them.
+    # Read more about it here:
+    #   https://github.com/stedolan/jq/issues/2061#issuecomment-593445920
     ExternalProject_Add(
             jq
             URL "https://dl.bintray.com/falcosecurity/dependencies/jq-1.6.tar.gz"


BUG: compiler-bindir and ccbin conflict

BUG: compiler-bindir and ccbin conflict

- Use CUDA_NVCC_FLAGS as a list
- Remove equal sign after compiler-bindir (FindCUDA does not expect it
when looking for flag conflict)

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -57,7 +57,7 @@

     IF(GCC_PATH)
       MESSAGE(STATUS "nvcc-check: Found adequate gcc (${GCC_PATH})... telling nvcc to use it!")
-      SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --compiler-bindir=${GCC_PATH})
+      LIST(APPEND CUDA_NVCC_FLAGS --compiler-bindir ${GCC_PATH})
     ELSE(GCC_PATH)
       MESSAGE(FATAL_ERROR "nvcc-check: Please install adequate gcc for cuda.\nNote that gcc-4.x can be installed side-by-side with your current version of gcc.\n")
     ENDIF(GCC_PATH)


Disable LTO

Disable LTO

Breaks linker script variables

--- arch/x86_64/platform.cmake
+++ arch/x86_64/platform.cmake
@@ -3,7 +3,7 @@
     -DX86_64
 )

-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --target=x86_64-pc-none-elf -fno-omit-frame-pointer -flto -mcmodel=kernel -mno-red-zone")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --target=x86_64-pc-none-elf -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone")
 # Be careful of what you pass in here. Input will go directly to LLD, so no Clang flags allowed
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --lto-O3 -T${CMAKE_SOURCE_DIR}/arch/x86_64/mint.lds")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -T${CMAKE_SOURCE_DIR}/arch/x86_64/mint.lds")
 set(CMAKE_ASM_NASM_COMPILE_OBJECT "${CMAKE_ASM_NASM_COMPILE_OBJECT} -felf64")


PKG: install GDAL python bindings and scripts

--- Packaging/install_python_bindings.cmake
+++ Packaging/install_python_bindings.cmake
@@ -32,4 +32,19 @@
       PATTERN "__pycache__" EXCLUDE
       )
   endif()
+  # Handle GDAL python bindings
+  file(GLOB gdal_python_scripts "${SUPERBUILD_INSTALL_DIR}/bin/gdal*.py")
+  foreach(_script ${gdal_python_scripts})
+    install(PROGRAMS ${_script}
+      DESTINATION ${PKG_STAGE_DIR}/bin)
+  endforeach()
+  file(GLOB gdal_python_wrappings "${SUPERBUILD_INSTALL_DIR}/lib/python[2|3]*")
+  foreach(_wrap ${gdal_python_wrappings})
+    if (IS_DIRECTORY _wrap)
+      install(DIRECTORY ${_wrap}
+        DESTINATION ${PKG_STAGE_DIR}/lib
+        PATTERN "*.pyc" EXCLUDE
+        PATTERN "__pycache__" EXCLUDE)
+    endif()
+  endforeach()
 endfunction()


Correct faad include filename

Correct faad include filename

--- src/FindFaad.cmake
+++ src/FindFaad.cmake
@@ -1,9 +1,9 @@
-#  FAAD_INCLUDE_DIRS - where to find faad.h, etc.
+#  FAAD_INCLUDE_DIRS - where to find neaacdec.h, etc.
 #  FAAD_LIBRARIES    - List of libraries when using libfaad.
 #  FAAD_FOUND        - True if libfaad found.

 # Look for the header file.
-FIND_PATH(FAAD_INCLUDE_DIR NAMES faad.h)
+FIND_PATH(FAAD_INCLUDE_DIR NAMES neaacdec.h)
 MARK_AS_ADVANCED(FAAD_INCLUDE_DIR)

 # Look for the library.


build system: remove -Wno-format flag for RISC-V targets

--- components/riscv/project_include.cmake
+++ components/riscv/project_include.cmake
@@ -1,5 +1,3 @@
-set(compile_options "-Wno-error=format="
-                    "-nostartfiles"
-                    "-Wno-format")
+set(compile_options "-nostartfiles")

 idf_build_set_property(COMPILE_OPTIONS "${compile_options}" APPEND)