cmake: don't add vs_version.rc for static modules (ts)

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -802,7 +802,9 @@
     endforeach()
   endif()

-  if(WIN32 AND BUILD_SHARED_LIBS AND NOT OPENCV_VS_VERSIONINFO_SKIP)
+  if(WIN32
+      AND (BUILD_SHARED_LIBS AND NOT "x${OPENCV_MODULE_TYPE}" STREQUAL "xSTATIC")
+      AND NOT OPENCV_VS_VERSIONINFO_SKIP)
     if(DEFINED OPENCV_VS_VERSIONINFO_FILE)
       set(_VS_VERSION_FILE "${OPENCV_VS_VERSIONINFO_FILE}")
     elseif(DEFINED OPENCV_VS_VERSIONINFO_${the_module}_FILE)


MAINT: fix CMake scripts.

MAINT: fix CMake scripts.

--- cmake/UseDOImageIO.cmake
+++ cmake/UseDOImageIO.cmake
@@ -8,15 +8,16 @@
 # Add the third-party image I/O libraries.
 if (JPEG_FOUND)
   include_directories(${JPEG_INCLUDE_DIR})
-  list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES ${JPEG_LIBRARY})
+  list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES ${JPEG_LIBRARIES})
 else ()
   include_directories(${DO_ThirdParty_DIR}/libjpeg)
   list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES jpeg)
 endif ()

 if (PNG_FOUND)
-  include_directories(${PNG_PNG_INCLUDE_DIR})
-  list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES ${PNG_LIBRARY_RELEASE})
+  add_definitions(${PNG_DEFINITIONS})
+  include_directories(${PNG_INCLUDE_DIRS})
+  list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES ${PNG_LIBRARIES})
 else ()
   include_directories(${DO_ThirdParty_DIR}/libpng)
   list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES png)
@@ -24,15 +25,15 @@

 if (TIFF_FOUND)
   include_directories(${TIFF_INCLUDE_DIR})
-  list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES ${TIFF_LIBRARY})
+  list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES ${TIFF_LIBRARIES})
 else ()
   include_directories(${DO_ThirdParty_DIR}/libtiff)
   list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES tiff)
 endif ()

 if (ZLIB_FOUND)
-  include_directories(${ZLIB_INCLUDE_DIR})
-  list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES ${ZLIB_LIBRARY})
+  include_directories(${ZLIB_INCLUDE_DIRS})
+  list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES ${ZLIB_LIBRARIES})
 else ()
   include_directories(${DO_ThirdParty_DIR}/zlib)
   list(APPEND DO_ImageIO_THIRD_PARTY_LIBRARIES zlib)


fetch fifechan shared lib

fetch fifechan shared lib

--- cmake/get-fifechan.cmake
+++ cmake/get-fifechan.cmake
@@ -17,7 +17,7 @@
       PREFIX              ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
       #URL                 https://github.com/fifengine/fifechan/releases/tag/${FIFECHAN_VERSION}/fifechan-v${FIFECHAN_VERSION}-MinGW.tar.gz
-      URL                 https://ci.appveyor.com/api/projects/jakoch/fifechan/artifacts/fifechan-MinGW.tar.gz
+      URL                 https://ci.appveyor.com/api/projects/jakoch/fifechan/artifacts/fifechan-shared-MinGW.tar.gz
       URL_MD5             1
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
@@ -35,8 +35,8 @@
       PREFIX              ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
       #URL                 https://github.com/fifengine/fifechan/releases/tag/${FIFECHAN_VERSION}/fifechan-v${FIFECHAN_VERSION}-VC14.zip
-      URL                 https://ci.appveyor.com/api/buildjobs/kbycmt20k0g1ah61/artifacts/fifechan-VC14.zip
-      URL_MD5             c96b3b8451120a729c8cc88277b1d18c
+      URL                 https://ci.appveyor.com/api/buildjobs/wkajhh6nkohb29dh/artifacts/fifechan-shared-VC14.zip
+      URL_MD5             b41cb9c717e5ad499a2ea8dbc85a161c
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
       INSTALL_COMMAND


CMake: MSVC: Added option to disable iterator debuggers.

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -39,6 +39,10 @@
         message(FATAL_ERROR "Inviwo requires C++11 features. "
                 "You need at least Visual Studio 12 (Microsoft Visual Studio 2013)")
     endif()
+    option(IVW_MSVC_DISABLE_ITERATOR_DEBUGGING "Disable Visual Stuidios Iterator debugging tests. (Requires QT built with the define _ITERATOR_DEBUG_LEVEL=0)" off)
+    if(IVW_MSVC_DISABLE_ITERATOR_DEBUGGING)
+        add_definitions(-D_ITERATOR_DEBUG_LEVEL=0)
+    endif()
 else()
     include(CheckCXXCompilerFlag)
     CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)


CMake Qt version variable fix

CMake Qt version variable fix

--- cmake/installutils.cmake
+++ cmake/installutils.cmake
@@ -235,7 +235,7 @@
                 set(dest_dir "${IVW_APP_INSTALL_NAME}.app/Contents/plugins")
             endif()
             if (dest_dir)
-                if (${QT_DEFAULT_MAJOR_VERSION} VERSION_LESS 6)
+                if (${QT_VERSION_MAJOR} VERSION_LESS 6)
                     foreach(plugin IN LISTS ${${qtarget}_PLUGINS})
                         get_target_property(_loc ${plugin} LOCATION)
                         get_filename_component(_path ${_loc} PATH)


fix OSX package names is OSX_DEPLOYMENT_TARGET is specified

--- cmake/package_name.cmake
+++ cmake/package_name.cmake
@@ -72,14 +72,15 @@
         ENDIF()
       ENDIF()
     ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-      IF(${CMAKE_OSX_DEPLOYMENT_TARGET})
-        SET(VER "${CMAKE_OSX_DEPLOYMENT_TARGET}")
+      IF(CMAKE_OSX_DEPLOYMENT_TARGET)
+        SET(DEFAULT_PLATFORM "osx${CMAKE_OSX_DEPLOYMENT_TARGET}")
       ELSE()
         SET(VER "${CMAKE_SYSTEM_VERSION}")
+        STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VER "${VER}")
+        # Subtract 4 from Darwin version to get correct osx10.X
+        MATH(EXPR VER  "${VER} -4")
+        SET(DEFAULT_PLATFORM "osx10.${VER}")
       ENDIF()
-      STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VER "${VER}")
-      MATH(EXPR VER  "${VER} -4")
-      SET(DEFAULT_PLATFORM "osx10.${VER}")
       LIST(LENGTH CMAKE_OSX_ARCHITECTURES LEN)
       IF(LEN GREATER 1)
         SET(DEFAULT_MACHINE "universal")


-march=cooperlake requires gcc10

-march=cooperlake requires gcc10

--- cmake/cc.cmake
+++ cmake/cc.cmake
@@ -107,7 +107,10 @@
 if (${CORE} STREQUAL "COOPERLAKE")
   if (NOT DYNAMIC_ARCH)
     if (NOT NO_AVX512)
-      set (CCOMMON_OPT = "${CCOMMON_OPT} -march=cooperlake")
+      execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+      if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL 10.1)
+        set (CCOMMON_OPT = "${CCOMMON_OPT} -march=cooperlake")
+      endif()
     endif ()
   endif ()
 endif ()


QUICK square-root is now the default.

QUICK square-root is now the default.

--- cmake/fb.cmake
+++ cmake/fb.cmake
@@ -69,7 +69,7 @@

 # Choose the arithmetic methods.
 if (NOT FB_METHD)
-	set(FB_METHD "LODAH;TABLE;QUICK;BASIC;QUICK;QUICK;EXGCD;SLIDE;QUICK")
+	set(FB_METHD "LODAH;TABLE;QUICK;QUICK;QUICK;QUICK;EXGCD;SLIDE;QUICK")
 endif(NOT FB_METHD)
 list(LENGTH FB_METHD FB_LEN)
 if (FB_LEN LESS 9)


getdeps: export a property that contains the path to the output executable

Summary:
Export a property that indicates the path to the test executable.  This is
useful for callers that want to install the binary or run it from other CMake
rules.

Reviewed By: simpkins

Differential Revision: D17647146

fbshipit-source-id: b32e2694e44a07d7c234e53a7a5c8443cb144487

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -156,6 +156,12 @@
   # Add an "ALL" target that depends on force ${EXE_NAME},
   # so that ${EXE_NAME} will be included in the default list of build targets.
   add_custom_target("${EXE_NAME}.GEN_PY_EXE" ALL DEPENDS "${output_file}")
+
+  # Allow resolving the executable path for the target that we generate
+  # via a generator expression like:
+  # "WATCHMAN_WAIT_PATH=$<TARGET_PROPERTY:watchman-wait.GEN_PY_EXE,EXECUTABLE>"
+  set_property(TARGET "${EXE_NAME}.GEN_PY_EXE"
+      PROPERTY EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/${output_file}")
 endfunction()

 #


Fix to re-enable opencl

Fix to re-enable opencl

--- shiitake_suse_gcc_opencl.cmake
+++ shiitake_suse_gcc_opencl.cmake
@@ -5,7 +5,7 @@
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 set(dashboard_binary_name "RTK_lin64_gcc_opencl")
 set(ENV{ITK_DIR} "/home/srit/src/itk/lin64")
-set(ENV{LD_LIBRARY_PATH} "/home/srit/Download/AMD-APP-SDK-v2.5-lnx64/lib/x86_64:$ENV{LD_LIBRARY_PATH}")
+set(CONFIGURE_OPTIONS "-DOPENCL_ROOT_DIR=/home/srit/Download/AMD-APP-SDK-v2.5-lnx64")

 include("${CTEST_SCRIPT_DIRECTORY}/rtk_common.cmake")


windows needs pyd suffix

windows needs pyd suffix

--- src/pythonlib/pythonlib.cmake
+++ src/pythonlib/pythonlib.cmake
@@ -124,7 +124,10 @@
 message(STATUS "linking python binary ocl.so with boost: " ${Boost_PYTHON_LIBRARY})

 # this makes the lib name ocl.so and not libocl.so
-set_target_properties(ocl PROPERTIES PREFIX "")
+set_target_properties(ocl PROPERTIES PREFIX "")
+if (WIN32)
+  set_target_properties(ocl PROPERTIES SUFFIX ".pyd")
+endif (WIN32)
 # if (WIN32)
 # set_target_properties(ocl PROPERTIES VERSION ${MY_VERSION})
 # endif (WIN32)


ENH: Add more types to work with other transforms (thanks to Michael Bell)

--- Wrapping/WrapITK/Modules/BaseTransforms/wrap_itkCenteredTransformInitializer.cmake
+++ Wrapping/WrapITK/Modules/BaseTransforms/wrap_itkCenteredTransformInitializer.cmake
@@ -1,9 +1,24 @@
 WRAP_INCLUDE("itkVersorRigid3DTransform.h")
+WRAP_INCLUDE("itkCenteredAffineTransform.h")
+WRAP_INCLUDE("itkAffineTransform.h")
+WRAP_INCLUDE("itkSimilarity2DTransform.h")
+WRAP_INCLUDE("itkSimilarity3DTransform.h")
 WRAP_CLASS("itk::CenteredTransformInitializer" POINTER)
     FILTER_DIMS(d 3)
     IF(d)
         FOREACH(t ${WRAP_ITK_SCALAR})
           WRAP_TEMPLATE("VR3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::VersorRigid3DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
+          WRAP_TEMPLATE("CA3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredAffineTransform< ${ITKT_D} , ${d} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
+          WRAP_TEMPLATE("A3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::AffineTransform< ${ITKT_D} , ${d} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
+          WRAP_TEMPLATE("S3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::Similarity3DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
+        ENDFOREACH(t)
+    ENDIF(d)
+    FILTER_DIMS(d 2)
+    IF(d)
+        FOREACH(t ${WRAP_ITK_SCALAR})
+          WRAP_TEMPLATE("CA2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredAffineTransform< ${ITKT_D} , ${d} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
+          WRAP_TEMPLATE("A2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::AffineTransform< ${ITKT_D} , ${d} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
+          WRAP_TEMPLATE("S3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::Similarity2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
         ENDFOREACH(t)
     ENDIF(d)
 END_WRAP_CLASS()


CMake: Use macros for defining engine options.

Macros define options only if they are undefined. This allows users to consume project as subdirectory and configure it by setting configuration variables. Without these macros CMake produces warnings and resets configured values when option() executes.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -39,6 +39,26 @@
     endforeach()
 endif ()

+# Define an _option or dependent _option if it's value is not defined yet.
+macro(_option VAR DESCRIPTION VALUE)
+    if (NOT DEFINED ${VAR})
+        option(${VAR} "${DESCRIPTION}" ${VALUE})
+    endif ()
+endmacro ()
+
+macro(_option2 VAR DESCRIPTION VALUE CONDITION CONDITION_VALUE)
+    if (NOT DEFINED ${VAR})
+        cmake_dependent_option(${VAR} "${DESCRIPTION}" ${VALUE} "${CONDITION}" ${CONDITION_VALUE})
+    else ()
+        foreach(COND ${CONDITION})
+            if (NOT ${COND})
+                set (${VAR} ${CONDITION_VALUE})
+                break()
+            endif ()
+        endforeach()
+    endif ()
+endmacro ()
+
 # Set platform variables
 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
     set (LINUX ON CACHE BOOL "" FORCE)
@@ -61,54 +81,54 @@
 include(CMakeDependentOption)

 # Build properties
-option(BUILD_SHARED_LIBS                        "Build engine as shared library."       ON)
-option(URHO3D_ENABLE_ALL                        "Enable (almost) all engine features."  ON)
-option(URHO3D_STATIC_RUNTIME                    "Link to static runtime"               OFF)
-set   (URHO3D_SSE             SSE2 CACHE STRING "Enable SSE instructions")
+_option(BUILD_SHARED_LIBS                        "Build engine as shared library."       ON)
+_option(URHO3D_ENABLE_ALL                        "Enable (almost) all engine features."  ON)
+_option(URHO3D_STATIC_RUNTIME                    "Link to static runtime"               OFF)
+set    (URHO3D_SSE             SSE2 CACHE STRING "Enable SSE instructions")

 # Subsystems
-option                (URHO3D_IK                 "Inverse kinematics subsystem enabled"                  ${URHO3D_ENABLE_ALL})
-option                (URHO3D_LOGGING            "Enable logging subsystem"                              ${URHO3D_ENABLE_ALL})
-option                (URHO3D_NAVIGATION         "Navigation subsystem enabled"                          ${URHO3D_ENABLE_ALL})
-cmake_dependent_option(URHO3D_NETWORK            "Networking subsystem enabled"                          ${URHO3D_ENABLE_ALL} "NOT WEB"                       OFF)
-option                (URHO3D_PHYSICS            "Physics subsystem enabled"                             ${URHO3D_ENABLE_ALL})
-cmake_dependent_option(URHO3D_PROFILING          "Profiler support enabled"                              ${URHO3D_ENABLE_ALL} "NOT WEB"                       OFF)
-option                (URHO3D_SYSTEMUI           "Build SystemUI subsystem"                              ${URHO3D_ENABLE_ALL})
-option                (URHO3D_URHO2D             "2D subsystem enabled"                                  ${URHO3D_ENABLE_ALL})
+_option(URHO3D_IK                 "Inverse kinematics subsystem enabled"                  ${URHO3D_ENABLE_ALL})
+_option(URHO3D_LOGGING            "Enable logging subsystem"                              ${URHO3D_ENABLE_ALL})
+_option(URHO3D_NAVIGATION         "Navigation subsystem enabled"                          ${URHO3D_ENABLE_ALL})
+_option2(URHO3D_NETWORK           "Networking subsystem enabled"                          ${URHO3D_ENABLE_ALL} "NOT WEB"                       OFF)
+_option(URHO3D_PHYSICS            "Physics subsystem enabled"                             ${URHO3D_ENABLE_ALL})
+_option2(URHO3D_PROFILING         "Profiler support enabled"                              ${URHO3D_ENABLE_ALL} "NOT WEB"                       OFF)
+_option(URHO3D_SYSTEMUI           "Build SystemUI subsystem"                              ${URHO3D_ENABLE_ALL})
+_option(URHO3D_URHO2D             "2D subsystem enabled"                                  ${URHO3D_ENABLE_ALL})

 # Features
-cmake_dependent_option(URHO3D_CSHARP             "Enable C# support"                                     OFF                  "BUILD_SHARED_LIBS"             OFF)
+_option2(URHO3D_CSHARP             "Enable C# support"                                     OFF                  "BUILD_SHARED_LIBS"             OFF)
 # Valid values at https://docs.microsoft.com/en-us/dotnet/standard/frameworks
-set                   (URHO3D_NETFX net471 CACHE STRING "TargetFramework value for .NET projects")
+set(URHO3D_NETFX net471 CACHE STRING "TargetFramework value for .NET projects")
 if (WIN32)
-    cmake_dependent_option(URHO3D_WITH_MONO      "Use Mono runtime"                                      OFF                  "URHO3D_CSHARP"                 OFF)
+    _option2(URHO3D_WITH_MONO      "Use Mono runtime"                                      OFF                  "URHO3D_CSHARP"                 OFF)
 else ()
     set (URHO3D_WITH_MONO ON)
 endif ()
-cmake_dependent_option(URHO3D_FILEWATCHER        "Watch filesystem for resource changes"                 ${URHO3D_ENABLE_ALL} "URHO3D_THREADING"              OFF)
-option                (URHO3D_HASH_DEBUG         "Enable StringHash name debugging"                      ${URHO3D_ENABLE_ALL}                                    )
-option                (URHO3D_MONOLITHIC_HEADER  "Create Urho3DAll.h which includes all engine headers." OFF                                                     )
-cmake_dependent_option(URHO3D_MINIDUMPS          "Enable writing minidumps on crash"                     ${URHO3D_ENABLE_ALL} "MSVC"                          OFF)
-option                (URHO3D_PLUGINS            "Enable plugins"                                        ${URHO3D_ENABLE_ALL})
-cmake_dependent_option(URHO3D_THREADING          "Enable multithreading"                                 ${URHO3D_ENABLE_ALL} "NOT WEB"                       OFF)
-option                (URHO3D_WEBP               "WEBP support enabled"                                  ${URHO3D_ENABLE_ALL}                                    )
+_option2(URHO3D_FILEWATCHER       "Watch filesystem for resource changes"                 ${URHO3D_ENABLE_ALL} "URHO3D_THREADING"              OFF)
+_option(URHO3D_HASH_DEBUG         "Enable StringHash name debugging"                      ${URHO3D_ENABLE_ALL}                                    )
+_option(URHO3D_MONOLITHIC_HEADER  "Create Urho3DAll.h which includes all engine headers." OFF                                                     )
+_option2(URHO3D_MINIDUMPS         "Enable writing minidumps on crash"                     ${URHO3D_ENABLE_ALL} "MSVC"                          OFF)
+_option(URHO3D_PLUGINS            "Enable plugins"                                        ${URHO3D_ENABLE_ALL})
+_option2(URHO3D_THREADING         "Enable multithreading"                                 ${URHO3D_ENABLE_ALL} "NOT WEB"                       OFF)
+_option(URHO3D_WEBP               "WEBP support enabled"                                  ${URHO3D_ENABLE_ALL}                                    )
 # Web
-cmake_dependent_option(URHO3D_WEB_ASSEMBLY       "Use wasm instead of asm.js"                            ON                   "WEB"                           OFF)
-cmake_dependent_option(EMSCRIPTEN_MEMORY_GROWTH  "Allow memory growth. Disables some optimizations."     OFF                  "WEB"                           OFF)
-set                   (EMSCRIPTEN_MEMORY_LIMIT 128 CACHE STRING "Memory limit in megabytes. Set to 0 for dynamic growth.")
+_option2(URHO3D_WEB_ASSEMBLY      "Use wasm instead of asm.js"                            ON                   "WEB"                           OFF)
+_option2(EMSCRIPTEN_MEMORY_GROWTH "Allow memory growth. Disables some optimizations."     OFF                  "WEB"                           OFF)
+set(EMSCRIPTEN_MEMORY_LIMIT 128 CACHE STRING "Memory limit in megabytes. Set to 0 for dynamic growth.")

 # Misc
-cmake_dependent_option(URHO3D_EXTRAS             "Build extra tools"                                     ${URHO3D_ENABLE_ALL} "NOT WEB AND NOT MOBILE"        OFF)
-cmake_dependent_option(URHO3D_TOOLS              "Tools enabled"                                         ${URHO3D_ENABLE_ALL} "NOT WEB AND NOT MOBILE"        OFF)
-option                (URHO3D_SAMPLES            "Build samples"                                         OFF)
-option                (URHO3D_DOCS               "Build documentation."                                  OFF)
-cmake_dependent_option(URHO3D_MERGE_STATIC_LIBS  "Merge third party dependency libs to Urho3D.a"         OFF "NOT BUILD_SHARED_LIBS"                          OFF)
-option                (URHO3D_NO_EDITOR_PLAYER_EXE "Do not build editor or player executables."          OFF)
+_option2(URHO3D_EXTRAS            "Build extra tools"                                     ${URHO3D_ENABLE_ALL} "NOT WEB AND NOT MOBILE"        OFF)
+_option2(URHO3D_TOOLS             "Tools enabled"                                         ${URHO3D_ENABLE_ALL} "NOT WEB AND NOT MOBILE"        OFF)
+_option(URHO3D_SAMPLES            "Build samples"                                         OFF)
+_option(URHO3D_DOCS               "Build documentation."                                  OFF)
+_option2(URHO3D_MERGE_STATIC_LIBS "Merge third party dependency libs to Urho3D.a"         OFF "NOT BUILD_SHARED_LIBS"                          OFF)
+_option(URHO3D_NO_EDITOR_PLAYER_EXE "Do not build editor or player executables."          OFF)

 if (WIN32)
     set(URHO3D_GRAPHICS_API D3D11 CACHE STRING "Graphics API")
     set_property(CACHE URHO3D_GRAPHICS_API PROPERTY STRINGS D3D9 D3D11 OpenGL)
-    option(URHO3D_WIN32_CONSOLE "Show log messages in win32 console"                                     OFF                                                     )
+    _option(URHO3D_WIN32_CONSOLE "Show log messages in win32 console"                     OFF)
 elseif (IOS OR ANDROID)
     set(URHO3D_GRAPHICS_API GLES2 CACHE STRING "Graphics API")
     set_property(CACHE URHO3D_GRAPHICS_API PROPERTY STRINGS GLES2 GLES3)


show all warnings during compilation

show all warnings during compilation

--- util/cmake/common.cmake
+++ util/cmake/common.cmake
@@ -12,8 +12,8 @@
 set(LIBRARIES_DEF "")

 # add debug definitions to compiler flags
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fopenmp")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -Wall")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fopenmp -Wall")

 # define some colors for funny cmake messages
 option(CMAKE_USE_COLOR "CMAKE_USE_COLOR" ON)


[Arm64/Unix] Set PROCFS_* available in tryrun (#10255)

--- cross/arm64/tryrun.cmake
+++ cross/arm64/tryrun.cmake
@@ -107,17 +107,17 @@
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_PROCFS_CTL_EXITCODE
-     1
+     0
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_PROCFS_MAPS_EXITCODE
-     1
+     0
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_PROCFS_STAT_EXITCODE
-     1
+     0
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_PROCFS_STATUS_EXITCODE
-     1
+     0
      CACHE STRING "Result from TRY_RUN" FORCE)


In FindOpenMP.cmake: Use dummy target to test OpenMP libraries when

Former-commit-id: 5ebdab33ba90b8d6d472d22feaa17937da9390f3

--- cmake-modules/FindOpenMP.cmake
+++ cmake-modules/FindOpenMP.cmake
@@ -10,6 +10,22 @@
         endif()
     endforeach()
     set(${output_string} ${result_string} PARENT_SCOPE)
+endfunction()
+
+function(define_omp_target tgt lib)
+    if(IS_ABSOLUTE ${lib})
+        if(NOT TARGET ${tgt})
+            add_library(${tgt} ${LINK_TYPE} IMPORTED)
+        endif()
+        set_target_properties(${tgt} PROPERTIES IMPORTED_LOCATION ${lib})
+    else()
+        if(NOT TARGET ${tgt})
+            add_library(${tgt} INTERFACE IMPORTED)
+        endif()
+        target_link_libraries(${tgt} INTERFACE ${lib})
+    endif()
+    target_link_libraries(${tgt} INTERFACE Threads::Threads)
+    set_target_properties(${tgt} PROPERTIES INTERFACE_COMPILE_DEFINITIONS "_OPENMP")
 endfunction()

@@ -140,18 +156,17 @@

     foreach(lib ${omp_lib_candidates})
         # Make a target wrapper for a library
-        if(NOT TARGET openmp::openmp)
-            add_library(openmp::openmp INTERFACE IMPORTED)
+        if(IS_ABSOLUTE ${lib})
+            get_filename_component(libname ${lib} NAME_WE)
+            set(OMP_DUMMY_TARGET openmp::dummy_${libname})
+        else()
+            set(OMP_DUMMY_TARGET openmp::dummy_${lib})
         endif()
-        if(IS_ABSOLUTE lib)
-            set_target_properties(openmp::openmp PROPERTIES IMPORTED_LOCATION ${lib})
-            target_link_libraries(openmp::openmp INTERFACE Threads::Threads)
-        else()
-            target_link_libraries(openmp::openmp INTERFACE ${lib} Threads::Threads)
-        endif()
-        set_target_properties(openmp::openmp PROPERTIES INTERFACE_COMPILE_DEFINITIONS "_OPENMP")
-        check_omp_compiles(openmp::openmp)
+        message(STATUS "Testing target ${OMP_DUMMY_TARGET}")
+        define_omp_target(${OMP_DUMMY_TARGET} ${lib})
+        check_omp_compiles(${OMP_DUMMY_TARGET})
         if(OMP_COMPILES)
+            define_omp_target("openmp::openmp" ${lib})
             break()
         endif()
     endforeach()


Remove comment

Remove comment

Former-commit-id: 569e8804ea043b096fee1889e8a86226fcd1cc7c

--- cmake-modules/FindOpenMP.cmake
+++ cmake-modules/FindOpenMP.cmake
@@ -27,7 +27,6 @@
         list(APPEND CMAKE_REQUIRED_LIBRARIES -static)
     endif()
     list(APPEND CMAKE_REQUIRED_LIBRARIES ${omp_tgt}) # Can be a ;list
-#    set(CMAKE_REQUIRED_DEFINITIONS "${omp_def}") # Can be a ;list
     if(DMRG_PRINT_CHECKS)
         message(STATUS "OPENMP COMPILE TEST required      ${CMAKE_REQUIRED_LIBRARIES}")
         message(STATUS "OPENMP COMPILE TEST target        ${omp_tgt}")


Make sure the boost libs are generated with the proper prefix.

--- cmake/BuildExternalBoost.cmake
+++ cmake/BuildExternalBoost.cmake
@@ -5,6 +5,7 @@
 	set(boost_lib_args
 		-DENABLE_SHARED:BOOL=OFF
 		-DENABLE_STATIC:BOOL=ON
+		-DLIBPREFIX=lib
 	)
 else()
 	set(boost_lib_args
@@ -16,7 +17,7 @@
 ExternalProject_Add(Boost
 	PREFIX ${VENDOR_PREFIX}
 	GIT_REPOSITORY https://github.com/anhstudios/boost.git
-	GIT_TAG 3e977d9f
+	GIT_TAG 7b35086
 	UPDATE_COMMAND ""
 	CMAKE_ARGS
 		${boost_lib_args}


added some cmake options for tensorflow on windows

--- cmake/ExternalTensorflow.cmake
+++ cmake/ExternalTensorflow.cmake
@@ -21,11 +21,12 @@
                 -G${CMAKE_GENERATOR}
                 -DCMAKE_BUILD_TYPE:STRING=Release
                 -Dtensorflow_BUILD_PYTHON_BINDINGS=OFF
+                -Dtensorflow_ENABLE_SNAPPY_SUPPRT=OFF
                 -Dtensorflow_BUILD_CC_EXAMPLE=OFF
                 -Dtensorflow_BUILD_SHARED_LIB=ON
                 -Dtensorflow_BUILD_CONTRIB_KERNELS=OFF
                 -Dtensorflow_ENABLE_GRPC_SUPPORT=OFF
-                -Dtensorflow_OPTIMIZE_FOR_NATIVE_ARCH=OFF
+                -Dtensorflow_WIN_CPU_SIMD_OPTIONS=/arch:AVX
                 #-Dtensorflow_ENABLE_GPU=ON
                 -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
                 -DCMAKE_INSTALL_MESSAGE:BOOL=LAZY


Fixed issue with missing headers on tensorflow install

--- cmake/ExternalTensorflow.cmake
+++ cmake/ExternalTensorflow.cmake
@@ -54,11 +54,13 @@
                 echo "Installing tensorflow generated headers" COMMAND
                 xcopy "${FAST_EXTERNAL_BUILD_DIR_WIN}\\tensorflow\\src\\tensorflow_download\\bazel-bin\\tensorflow\\*.h" "${FAST_EXTERNAL_INSTALL_DIR_WIN}\\include\\tensorflow\\" /syi COMMAND
                 echo "Installing tensorflow third party headers"  COMMAND
-                xcopy "${FAST_EXTERNAL_BUILD_DIR_WIN}\\tensorflow\\src\\tensorflow_download\\third_party\\*.h" "${FAST_EXTERNAL_INSTALL_DIR_WIN}\\include\\third_party\\" /syi  COMMAND
+                xcopy "${FAST_EXTERNAL_BUILD_DIR_WIN}\\tensorflow\\src\\tensorflow_download\\third_party\\" "${FAST_EXTERNAL_INSTALL_DIR_WIN}\\include\\third_party\\" /syi  COMMAND
                 echo "Installing protobuf headers"  COMMAND
                 xcopy "${FAST_EXTERNAL_BUILD_DIR_WIN}\\tensorflow\\src\\tensorflow_download\\bazel-tensorflow_download\\external\\com_google_protobuf\\src\\google\\*.h" "${FAST_EXTERNAL_INSTALL_DIR_WIN}\\include\\google\\" /syi COMMAND
+                xcopy "${FAST_EXTERNAL_BUILD_DIR_WIN}\\tensorflow\\src\\tensorflow_download\\bazel-tensorflow_download\\external\\com_google_protobuf\\src\\google\\*.inc" "${FAST_EXTERNAL_INSTALL_DIR_WIN}\\include\\google\\" /syi COMMAND
                 echo "Installing absl headers"  COMMAND
-                xcopy "${FAST_EXTERNAL_BUILD_DIR_WIN}\\tensorflow\\src\\tensorflow_download\\bazel-tensorflow_download\\external\\com_google_absl\\absl\\*.h" "${FAST_EXTERNAL_INSTALL_DIR_WIN}\\include\\absl\\" /syi
+                xcopy "${FAST_EXTERNAL_BUILD_DIR_WIN}\\tensorflow\\src\\tensorflow_download\\bazel-tensorflow_download\\external\\com_google_absl\\absl\\*.h" "${FAST_EXTERNAL_INSTALL_DIR_WIN}\\include\\absl\\" /syi COMMAND
+                xcopy "${FAST_EXTERNAL_BUILD_DIR_WIN}\\tensorflow\\src\\tensorflow_download\\bazel-tensorflow_download\\external\\com_google_absl\\absl\\*.inc" "${FAST_EXTERNAL_INSTALL_DIR_WIN}\\include\\absl\\" /syi
     )
 else(WIN32)
     # Use bazel to build tensorflow on linux


Refactoring TbagConfig.cmake files.

Refactoring TbagConfig.cmake files.

--- cmake/Modules/TbagConfig.cmake
+++ cmake/Modules/TbagConfig.cmake
@@ -1,5 +1,5 @@
 #/// @file   TbagConfig.cmake
-#/// @brief  Default tbag cmake configure.
+#/// @brief  Tbag configure macros.
 #/// @author zer0
 #/// @date   2016-05-26

@@ -15,6 +15,10 @@
 include (TbagCxxConfigGenerator)
 include (TbagDoxygenGenerator)
 include (ProtobufGenerator)
+
+## -----------------
+## Main information.
+## -----------------

 #/// Initialize & caching main information.
 #///
@@ -39,7 +43,7 @@
 #/// @param __packet_major  [in] Packet major version.
 #/// @param __packet_minor  [in] Packet minor version.
 #/// @param __release       [in] Release number.
-macro (tbag_config__init_version __major __minor __patch __packet_major __packet_minor __release)
+macro (tbag_config__init_version_information __major __minor __patch __packet_major __packet_minor __release)
     # Main version.
     set (VERSION_MAJOR ${__major})
     set (VERSION_MINOR ${__minor})
@@ -67,29 +71,34 @@

 #/// Exists main information.
 macro (tbag_config__exists_main_information)
-    # Main information.
     tbag_utils__exists_define_or_die (MAIN_NAME)
     tbag_utils__exists_define_or_die (MAIN_AUTHOR)
     tbag_utils__exists_define_or_die (MAIN_EMAIL)
     tbag_utils__exists_define_or_die (MAIN_BRIEF)
+endmacro ()

-    # Main version.
+#/// Exists version information.
+macro (tbag_config__exists_version_information)
     tbag_utils__exists_define_or_die (VERSION_MAJOR)
     tbag_utils__exists_define_or_die (VERSION_MINOR)
     tbag_utils__exists_define_or_die (VERSION_PATCH)
-
-    # Packet version.
     tbag_utils__exists_define_or_die (VERSION_PACKET_MAJOR)
     tbag_utils__exists_define_or_die (VERSION_PACKET_MINOR)
-
-    # Extension version number.
     tbag_utils__exists_define_or_die (VERSION_RELEASE)
 endmacro ()

+## --------------
+## CMake options.
+## --------------
+
 #/// The caching shared library options.
-macro (tbag_config__caching_shared_library_option)
+macro (tbag_config__add_shared_library_option)
     option (BUILD_SHARED_LIBS "Create shared libraries if on." ON)
 endmacro ()
+
+## ----------------------
+## Libraries information.
+## ----------------------

 #/// Create & cacheing library option.
 #///
@@ -97,62 +106,41 @@
 #///  - USE_${_name}: library variable.
 macro (tbag_config__add_library_option __name __enable)
     set (USE_${__name} ${__enable} CACHE BOOL "Use the ${__name} library.")
-
-    #if (${__enable})
-    #    find_package (${__name})
-    #endif ()
 endmacro ()

 #/// Create & cacheing library list.
 #///
-#/// @param __default_root  [in] Default library root directory.
+#/// @param __default_root  [in] Default root directory of libraries.
 #/// @param ...             [in] list of library name.
-macro (tbag_config__add_library_list __default_root)
+macro (tbag_config__add_libraries __default_root)
     foreach (__list_cursor ${ARGN})
-        tbag_debug (tbag_config__add_library_list "Add ${__list_cursor} library.")
+        tbag_debug (tbag_config__add_libraries "Add ${__list_cursor} library.")

         set ("${__list_cursor}_ROOT" "${__default_root}" CACHE PATH "${__list_cursor} library root directory.")
         tbag_config__add_library_option (${__list_cursor} ON)
     endforeach ()
 endmacro ()

-# List of libraries.
-#tbag_config__add_library_option (ZLIB      OFF)
-#tbag_config__add_library_option (LMDB      OFF)
-#tbag_config__add_library_option (GTest     ON)
-#tbag_config__add_library_option (Spdlog    ON)
-#tbag_config__add_library_option (UV        ON)
-#tbag_config__add_library_option (TinyXML2  ON)
-#tbag_config__add_library_option (NCurses   ON)
-#tbag_config__add_library_option (SQLite3   ON)
-#tbag_config__add_library_option (Doxygen   ON)
-#tbag_config__add_library_option (Protobuf  OFF)
-#tbag_config__add_library_option (GFlags    OFF)
-#tbag_config__add_library_option (GLog      OFF)
-#tbag_config__add_library_option (HDF5-2    OFF) # Don't use standard module. (FindHDF5.cmake)
-#tbag_config__add_library_option (OpenBLAS  OFF)
-#tbag_config__add_library_option (Snappy    OFF)
-#tbag_config__add_library_option (LevelDB   OFF)
-#tbag_config__add_library_option (PNG       OFF)
-#tbag_config__add_library_option (wxWidgets OFF)
-#tbag_config__add_library_option (Tbag      OFF)
+## -----------
+## ALL IN ONE.
+## -----------

 #/// Read information file and initialize.
 #///
 #/// @param __path [in] Information file path.
-macro (tbag_config__init_from_file __path)
+macro (tbag_config __path)
     tbag_config_file__read (__tbag_config "${__path}")
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_MAIN_NAME)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_MAIN_AUTHOR)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_MAIN_EMAIL)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_MAIN_BRIEF)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_VERSION_MAJOR)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_VERSION_MINOR)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_VERSION_PATCH)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_VERSION_PACKET_MAJOR)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_VERSION_PACKET_MINOR)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_VERSION_RELEASE)
-    tbag_debug__variable (tbag_config__init_from_file __tbag_config_INFORMATION_LIBRARIES)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_MAIN_NAME)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_MAIN_AUTHOR)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_MAIN_EMAIL)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_MAIN_BRIEF)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_VERSION_MAJOR)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_VERSION_MINOR)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_VERSION_PATCH)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_VERSION_PACKET_MAJOR)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_VERSION_PACKET_MINOR)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_VERSION_RELEASE)
+    tbag_debug__variable (tbag_config  __tbag_config_INFORMATION_LIBRARIES)

     # Main information.
     tbag_config__init_main_information (
@@ -160,7 +148,7 @@
             "${__tbag_config_INFORMATION_MAIN_AUTHOR}"
             "${__tbag_config_INFORMATION_MAIN_EMAIL}"
             "${__tbag_config_INFORMATION_MAIN_BRIEF}")
-    tbag_config__init_version (
+    tbag_config__init_version_information (
             "${__tbag_config_INFORMATION_VERSION_MAJOR}"
             "${__tbag_config_INFORMATION_VERSION_MINOR}"
             "${__tbag_config_INFORMATION_VERSION_PATCH}"
@@ -170,23 +158,30 @@
             "${__tbag_config_INFORMATION_LIBRARIES}")

     # Exists.
-    tbag_config__exists_main_information ()
+    tbag_config__exists_main_information    ()
+    tbag_config__exists_version_information ()

     # Options.
-    tbag_config__caching_shared_library_option ()
+    tbag_config__add_shared_library_option ()

     # Default settings.
-    tbag_flags__default ()
-    tbag_tparty__default ()
+    tbag_flags__default  ()
+    tbag_tparty__default () # Setup the THIRD_PREFIX variable.

     # Libraryies.
-    tbag_config__add_library_list ("${THIRD_PREFIX}" ${__tbag_config_INFORMATION_LIBRARIES})
+    tbag_utils__exists_define_or_die (THIRD_PREFIX)
+    tbag_config__add_libraries ("${THIRD_PREFIX}" ${__tbag_config_INFORMATION_LIBRARIES})
+
+    unset (__tbag_config_INFORMATION_MAIN_NAME)
+    unset (__tbag_config_INFORMATION_MAIN_AUTHOR)
+    unset (__tbag_config_INFORMATION_MAIN_EMAIL)
+    unset (__tbag_config_INFORMATION_MAIN_BRIEF)
+    unset (__tbag_config_INFORMATION_VERSION_MAJOR)
+    unset (__tbag_config_INFORMATION_VERSION_MINOR)
+    unset (__tbag_config_INFORMATION_VERSION_PATCH)
+    unset (__tbag_config_INFORMATION_VERSION_PACKET_MAJOR)
+    unset (__tbag_config_INFORMATION_VERSION_PACKET_MINOR)
+    unset (__tbag_config_INFORMATION_VERSION_RELEASE)
+    unset (__tbag_config_INFORMATION_LIBRARIES)
 endmacro ()

-#/// Default config macro.
-#///
-#/// @param __path [in] Information file path.
-macro (tbag_config __path)
-    tbag_config__init_from_file ("${__path}")
-endmacro ()
-


Fix install with external protobuf

Fix install with external protobuf

--- cmake/OpenCVFindProtobuf.cmake
+++ cmake/OpenCVFindProtobuf.cmake
@@ -44,8 +44,10 @@

   if(Protobuf_FOUND)
     if(TARGET protobuf::libprotobuf)
-      add_library(libprotobuf INTERFACE)
-      target_link_libraries(libprotobuf INTERFACE protobuf::libprotobuf)
+      add_library(libprotobuf INTERFACE IMPORTED)
+      set_target_properties(libprotobuf PROPERTIES
+        INTERFACE_LINK_LIBRARIES protobuf::libprotobuf
+      )
     else()
       add_library(libprotobuf UNKNOWN IMPORTED)
       set_target_properties(libprotobuf PROPERTIES


Update the pinned firestore version to include the googletest changes

The C++ integration tests also include googletest, which previous versions of the iOS SDK always included. The updated version changed that to only get googletest if iOS unit tests were being run, so pinning to that version fixes the integration tests.

PiperOrigin-RevId: 301452780

--- cmake/external/firestore.cmake
+++ cmake/external/firestore.cmake
@@ -19,13 +19,12 @@
 endif()

 # Pin to the first revision that includes these changes:
-# https://github.com/firebase/firebase-ios-sdk/pull/4984
-# https://github.com/firebase/firebase-ios-sdk/pull/5027
+# https://github.com/firebase/firebase-ios-sdk/pull/5052
 #
 # These changes are required for the firebase-ios-sdk build to interoperate
-# well with a wrapper build. Once M67 iOS releases this should point to the
-# Firestore release tag.
-set(version fb0fc07609a55cd2e5acf47fe034bf0c8e8419ad)
+# well with a wrapper build that also uses googletest. Once M67 iOS
+# releases with that change, this should point to the Firestore release tag.
+set(version a568a96f7e6cf26f74d3c04892d02c4a218d5566)

 ExternalProject_Add(
   firestore


Set the correct version requirement

Set the correct version requirement

--- cmake/modules/FindPolkit.cmake
+++ cmake/modules/FindPolkit.cmake
@@ -21,8 +21,8 @@
    # use pkg-config to get the directories and then use these values
    # in the FIND_PATH() and FIND_LIBRARY() calls
    find_package(PkgConfig)
-   pkg_check_modules(PC_POLKIT polkit-gobject-1)
-   pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1)
+   pkg_check_modules(PC_POLKIT polkit-gobject-1>=0.98)
+   pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1>=0.98)
    set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER})
 endif (NOT WIN32)


[cmake] do not use $ROOTSYS/include when building ROOT executables

As all libraries, executables have to use source directories
for build. In this case only includes from linked libraries are
allowed to be used

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -1338,9 +1338,36 @@
   if(ARG_TEST) # we are building a test, so add EXCLUDE_FROM_ALL
     set(_all EXCLUDE_FROM_ALL)
   endif()
-  include_directories(BEFORE ${CMAKE_BINARY_DIR}/include)
-  add_executable( ${executable} ${_all} ${exe_srcs})
-  target_link_libraries(${executable} ${ARG_LIBRARIES} )
+  if(NOT (PROJECT_NAME STREQUAL "ROOT"))
+    # only for non-ROOT executable use $ROOTSYS/include
+    include_directories(BEFORE ${CMAKE_BINARY_DIR}/include)
+  endif()
+  add_executable(${executable} ${_all} ${exe_srcs})
+  target_link_libraries(${executable} ${ARG_LIBRARIES})
+
+  if(PROJECT_NAME STREQUAL "ROOT")
+    set(dep_list)
+    if(ARG_LIBRARIES)
+      foreach(lib ${ARG_LIBRARIES})
+        if(TARGET ${lib})
+          get_target_property(lib_incdirs ${lib} INCLUDE_DIRECTORIES)
+          if(lib_incdirs)
+            foreach(dir ${lib_incdirs})
+              string(REGEX REPLACE "^[$]<BUILD_INTERFACE:(.+)>" "\\1" dir ${dir})
+              list(APPEND dep_list ${dir})
+            endforeach()
+          endif()
+        endif()
+      endforeach()
+    endif()
+    if(dep_list)
+      list(REMOVE_DUPLICATES dep_list)
+      foreach(incl ${dep_list})
+         target_include_directories(${executable} PRIVATE ${incl})
+      endforeach()
+    endif()
+  endif()
+
   if(WIN32 AND ${executable} MATCHES \\.exe)
     set_target_properties(${executable} PROPERTIES SUFFIX "")
   endif()


Adjust UseDoxygen.cmake to disable latex output by default and to allow using dot without latex.

--- cmake/modules/UseDoxygen.cmake
+++ cmake/modules/UseDoxygen.cmake
@@ -62,30 +62,38 @@
 	set_property(DIRECTORY APPEND PROPERTY
 			ADDITIONAL_MAKE_CLEAN_FILES "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}")

+
+	set(DOXYFILE_DOT "NO")
+
+	if(DOXYGEN_DOT_FOUND)
+		set(DOXYFILE_DOT "YES")
+	endif()
+
+
+	usedoxygen_set_default(DOXYFILE_ENABLE_LATEX_DOC OFF)
 	set(DOXYFILE_LATEX "NO")
 	set(DOXYFILE_PDFLATEX "NO")
-	set(DOXYFILE_DOT "NO")

-	find_package(LATEX)
-	if(LATEX_COMPILER AND MAKEINDEX_COMPILER)
-		set(DOXYFILE_LATEX "YES")
-		usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex")
+	if (DOXYFILE_ENABLE_LATEX_DOC)
+		find_package(LATEX)

-		set_property(DIRECTORY APPEND PROPERTY
-				ADDITIONAL_MAKE_CLEAN_FILES
-				"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
+		if(LATEX_COMPILER AND MAKEINDEX_COMPILER)
+			set(DOXYFILE_LATEX "YES")
+			usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex")

-		if(PDFLATEX_COMPILER)
-			set(DOXYFILE_PDFLATEX "YES")
+			set_property(DIRECTORY APPEND PROPERTY
+					ADDITIONAL_MAKE_CLEAN_FILES
+					"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
+
+			if(PDFLATEX_COMPILER)
+				set(DOXYFILE_PDFLATEX "YES")
+			endif()
+
+			add_custom_command(TARGET doxygen
+				POST_BUILD
+				COMMAND ${CMAKE_MAKE_PROGRAM}
+				WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
 		endif()
-		if(DOXYGEN_DOT_EXECUTABLE)
-			set(DOXYFILE_DOT "YES")
-		endif()
-
-		add_custom_command(TARGET doxygen
-			POST_BUILD
-			COMMAND ${CMAKE_MAKE_PROGRAM}
-			WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
 	endif()


Fix doxygen cmake module

Fix doxygen cmake module

--- cmake/modules/UseDoxygen.cmake
+++ cmake/modules/UseDoxygen.cmake
@@ -53,8 +53,6 @@
 #  BSD license.
 #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #
-
-cmake_policy(SET CMP0045 OLD)

 macro(usedoxygen_set_default name value type docstring)
 	if(NOT DEFINED "${name}")
@@ -139,10 +137,6 @@

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

-	get_target_property(DOC_TARGET doc TYPE)
-	if(NOT DOC_TARGET)
-		add_custom_target(doc)
-	endif()
-
+	add_custom_target(doc)
 	add_dependencies(doc doxygen)
 endif()


Fix example

Fix example

[skip ci]

--- examples/qt-camera/config.cmake
+++ examples/qt-camera/config.cmake
@@ -30,6 +30,7 @@
       xrender
       xshmfence
       xxf86vm
+      Jpeg
   )
   foreach(pkg ${dependencies})
     hunter_config(


Include circleci stage/job name in cdash build name

also add support for CTEST_BUILD_TARGET

--- .circleci/circleci.cmake
+++ .circleci/circleci.cmake
@@ -22,8 +22,6 @@
 set(CTEST_SITE "CircleCI")
 set(CTEST_UPDATE_VERSION_ONLY 1)

-set_from_env(PARALLEL_LEVEL "PARALLEL_LEVEL" DEFAULT 2 )
-set( CTEST_TEST_ARGS ${CTEST_TEST_ARGS} PARALLEL_LEVEL  ${PARALLEL_LEVEL})

 # Make environment variables to CMake variables for CTest
 set_from_env(CTEST_CMAKE_GENERATOR "CTEST_CMAKE_GENERATOR" DEFAULT "Unix Makefiles" )
@@ -32,12 +30,18 @@
 set_from_env(CTEST_SOURCE_DIRECTORY "CTEST_SOURCE_DIRECTORY" REQUIRED)
 set_from_env(CTEST_CONFIGURATION_TYPE "CTEST_CONFIGURATION_TYPE" DEFAULT "Release")
 set_from_env(CTEST_BUILD_FLAGS "CTEST_BUILD_FLAGS")
+set_from_env(CTEST_BUILD_TARGET "CTEST_BUILD_TARGET")
+set_from_env(CTEST_TEST_ARGS "CTEST_TEST_ARGS")
+
+
+set_from_env(PARALLEL_LEVEL "PARALLEL_LEVEL" DEFAULT 2 )
+set( CTEST_TEST_ARGS ${CTEST_TEST_ARGS} PARALLEL_LEVEL ${PARALLEL_LEVEL})

 set_from_env(DASHBOARD_BRANCH_DIRECTORY "DASHBOARD_BRANCH_DIRECTORY" REQUIRED)

 # Construct build name based on what is being built
 string(SUBSTRING $ENV{CIRCLE_SHA1} 0 7 commit_sha1)
-set(CTEST_BUILD_NAME "CircleCI-$ENV{CIRCLE_BRANCH}-${commit_sha1}")
+set(CTEST_BUILD_NAME "CircleCI-$ENV{CIRCLE_BRANCH}-$ENV{CIRCLE_STAGE}-${commit_sha1}")

 set_from_env(dashboard_git_branch "CIRCLE_BRANCH")
 set_from_env(dashboard_model "DASHBOARD_MODEL" DEFAULT "Experimental" )


COMP:  Add current ITKv4 git tag.

COMP:  Add current ITKv4 git tag.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -73,7 +73,7 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG I610d626d13964bf3fd620e23fc5b4b8a75d4bed3) #2012-08-15
+  set(${proj}_GIT_TAG 6fcfe1c24e1050b5efca7830869c5f74e72e132f) #2012-08-15
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


adding construct to test

adding construct to test

--- test/testing.cmake
+++ test/testing.cmake
@@ -54,6 +54,12 @@
   "${MDIR}/pipe.dmg"
   "pipe_4_.smb"
   "tet.smb")
+set(MDIR ${MESHES}/cube)
+add_test(construct
+  ${MPIRUN} ${MPIRUN_PROCFLAG} 4
+  ./construct
+  "${MDIR}/cube.dmg"
+  "${MDIR}/pumi7k/4/cube.smb")
 set(MDIR ${MESHES}/spr)
 add_test(spr
   ${MPIRUN} ${MPIRUN_PROCFLAG} 4


flags/lto: modify C flags too

flags/lto: modify C flags too

--- flags/lto.cmake
+++ flags/lto.cmake
@@ -8,4 +8,6 @@
 endif()

 include(polly_add_cache_flag)
+
 polly_add_cache_flag(CMAKE_CXX_FLAGS "-flto")
+polly_add_cache_flag(CMAKE_C_FLAGS "-flto")


Add sb_configure_options

Add sb_configure_options

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -103,7 +103,7 @@
 set ( PROJECT_SOURCE_DIR "${OTB_SOURCE_DIR}" )

 set (CONFIGURE_OPTIONS  "")
-include ( "${CMAKE_CURRENT_LIST_DIR}/configure_option.cmake" )
+include ( "${CMAKE_CURRENT_LIST_DIR}/sb_configure_options.cmake" )
 # SuperBuild case : one more configure option
 set ( CONFIGURE_OPTIONS
   "${CONFIGURE_OPTIONS}-DCMAKE_PREFIX_PATH=${XDK_PATH};")


fix code coverage issue with clang

fix code coverage issue with clang

--- CMake/CodeCoverage.cmake
+++ CMake/CodeCoverage.cmake
@@ -1,10 +1,6 @@
 # Check prereqs
 FIND_PROGRAM(GCOV_PATH gcov)
-
-IF(CMAKE_COMPILER_IS_GNUCXX)
-    FIND_PROGRAM(LCOV_PATH lcov)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
+FIND_PROGRAM(LCOV_PATH lcov)
 FIND_PROGRAM(GENHTML_PATH genhtml)

 IF(NOT GCOV_PATH)
@@ -18,15 +14,11 @@
 #Setup compiler options
 ADD_DEFINITIONS(-fprofile-arcs -ftest-coverage)

-IF(CMAKE_COMPILER_IS_GNUCXX)
-    LINK_LIBRARIES(gcov)
-ELSEIF(CMAKE_COMPILER_IS_CLANG)
-    LINK_LIBRARIES(profile_rt)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs ")

-IF((NOT LCOV_PATH) AND CMAKE_COMPILER_IS_GNUCXX)
+IF(NOT LCOV_PATH)
     MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
-ENDIF((NOT LCOV_PATH) AND CMAKE_COMPILER_IS_GNUCXX)
+ENDIF(NOT LCOV_PATH)

 IF(NOT GENHTML_PATH)
     MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")


iOS: Don't search for X11 if building for iOS.  I'm surprised that this hasn't been found until now.  Apparently most devs have the X11 package installed.

--HG--
branch : v1-7

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -70,7 +70,7 @@
 macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" TRUE "" "")

 # Find X11
-if (UNIX)
+if (UNIX AND NOT OGRE_BUILD_PLATFORM_IPHONE)
 	find_package(X11)
 	macro_log_feature(X11_FOUND "X11" "X Window system" "http://www.x.org" TRUE "" "")
 	macro_log_feature(X11_Xt_FOUND "Xt" "X Toolkit" "http://www.x.org" TRUE "" "")


Qt4 insource build and try to detect sqlite

--- CMake/External_qt4.cmake
+++ CMake/External_qt4.cmake
@@ -19,7 +19,7 @@
   endif()

   #activate only required components for Qt4
-  set(QT4_SB_CONFIG -no-phonon-backend -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support)
+  set(QT4_SB_CONFIG )

   if(NOT USE_SYSTEM_ZLIB)
     list(APPEND ${proj}_DEPENDENCIES ZLIB)
@@ -38,27 +38,18 @@
   endif()

  #use system libs always for Qt4 as we build them from source or have already in system
-  set(QT4_SB_CONFIG  ${QT4_SB_CONFIG} -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite)
-
+  set(QT4_SB_CONFIG)
+
+    STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
+    STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
+
   ExternalProject_Add(${proj}
     PREFIX ${proj}
     URL "http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz"
     URL_MD5 2edbe4d6c2eff33ef91732602f3518eb
-    #GIT_REPOSITORY "${git_protocol}://gitorious.org/qt/qt.git"
-    #GIT_TAG dde0c2f4f6d72bcc9db732eb51399395ffc37778
     BINARY_DIR ${QT4_SB_SRC}
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
-    CONFIGURE_COMMAND
-      ${QT4_SB_SRC}/configure
-        -prefix ${CMAKE_INSTALL_PREFIX}
-        -opensource
-        -confirm-license
-        -release
-        -shared
-        -nomake demos
-        -nomake examples
-        -nomake tools
-        ${QT4_SB_CONFIG}
+    CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${QT4_SB_SRC} configure -prefix ${CMAKE_WIN_INSTALL_PREFIX} -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite
     DEPENDS ${${proj}_DEPENDENCIES}
     )


Do not include vespa as system headers.

Do not include vespa as system headers.

--- functions.cmake
+++ functions.cmake
@@ -53,7 +53,7 @@
     set(PACKAGE_INCLUDE_DIR ${${PACKAGE_NAME}_INCLUDE_DIR})
     set(PACKAGE_LIBRARIES ${${PACKAGE_NAME}_LIBRARIES})
     link_libraries(${PACKAGE_LIBRARIES})
-    include_directories(SYSTEM ${PACKAGE_INCLUDE_DIR})
+    include_directories(${PACKAGE_INCLUDE_DIR})
 endfunction()

 # TODO: Merge this function into add_target_system_dependency
@@ -63,7 +63,7 @@
     set(PACKAGE_INCLUDE_DIR ${${PACKAGE_NAME}_INCLUDE_DIR})
     set(PACKAGE_LIBRARIES ${${PACKAGE_NAME}_LIBRARIES})
     target_link_libraries(${TARGET} PUBLIC ${PACKAGE_LIBRARIES})
-    target_include_directories(${TARGET} SYSTEM PUBLIC ${PACKAGE_INCLUDE_DIR})
+    target_include_directories(${TARGET} PUBLIC ${PACKAGE_INCLUDE_DIR})
 endfunction()

 function(vespa_add_target_system_dependency TARGET PACKAGE_NAME)
@@ -531,8 +531,8 @@
     get_directory_property(LOCAL_INCLUDE_DIRS INCLUDE_DIRECTORIES)
     get_target_property(TARGET_TYPE ${TARGET} TYPE)
     if(TARGET_TYPE STREQUAL INTERFACE_LIBRARY)
-        target_include_directories(${TARGET} SYSTEM INTERFACE ${LOCAL_INCLUDE_DIRS})
-    else()
-        target_include_directories(${TARGET} SYSTEM PUBLIC ${LOCAL_INCLUDE_DIRS})
-    endif()
-endfunction()
+        target_include_directories(${TARGET} INTERFACE ${LOCAL_INCLUDE_DIRS})
+    else()
+        target_include_directories(${TARGET} PUBLIC ${LOCAL_INCLUDE_DIRS})
+    endif()
+endfunction()


android.toolchain.cmake: restore implicit link with math library for C++ objects

Ticket #2426

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -231,6 +231,12 @@
 #     [+] added NDK release name detection (see ANDROID_NDK_RELEASE)
 #     [+] added support for all C++ runtimes from NDK
 #         (system, gabi++, stlport, gnustl)
+#     [+] improved warnings on known issues of NDKs
+#     [~] use gold linker as default if available (NDK r8b)
+#     [~] globally turned off rpath
+#     [~] compiler options are aligned with NDK r8b
+#   - modified October 2012
+#     [~] fixed C++ linking: explicitly link with math library (OpenCV #2426)
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -1091,6 +1097,11 @@
   set( CMAKE_C_CREATE_SHARED_MODULE  "${CMAKE_C_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" )
   set( CMAKE_C_LINK_EXECUTABLE       "${CMAKE_C_LINK_EXECUTABLE} \"${__libsupcxx}\"" )
  endif()
+ if( ANDROID_STL MATCHES "gnustl" )
+  set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} -lm" )
+  set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} -lm" )
+  set( CMAKE_CXX_LINK_EXECUTABLE       "${CMAKE_CXX_LINK_EXECUTABLE} -lm" )
+ endif()
 endif()

 # variables controlling optional build flags


increased version number to 0.9.7

increased version number to 0.9.7

--- CMake/config.cmake
+++ CMake/config.cmake
@@ -28,7 +28,7 @@
 # setup version numbers
 set(RTTR_VERSION_MAJOR 0)
 set(RTTR_VERSION_MINOR 9)
-set(RTTR_VERSION_PATCH 6)
+set(RTTR_VERSION_PATCH 7)
 set(RTTR_VERSION ${RTTR_VERSION_MAJOR}.${RTTR_VERSION_MINOR}.${RTTR_VERSION_PATCH})
 set(RTTR_VERSION_STR "${RTTR_VERSION_MAJOR}.${RTTR_VERSION_MINOR}.${RTTR_VERSION_PATCH}")
 math(EXPR RTTR_VERSION_CALC "${RTTR_VERSION_MAJOR}*1000 + ${RTTR_VERSION_MINOR}*100 + ${RTTR_VERSION_PATCH}")


* [CMake] BugFix: Remove a forgotten debug message.

--- Tools/CMake/basics.cmake
+++ Tools/CMake/basics.cmake
@@ -300,7 +300,6 @@
     # more paths?
     if(${ARGC} GREATER 0)
         foreach(dir ${ARGV0})
-            MESSAGE(STATUS "TEST: ${dir}")
             addPath("${dir}")
         endforeach()
     endif()


Create a fancier FindCogUtil.cmake file

Create a fancier FindCogUtil.cmake file

--- lib/FindCogUtil.cmake
+++ lib/FindCogUtil.cmake
@@ -1,29 +1,42 @@
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
 find_library(COGUTIL_LIBRARY
 	NAMES cogutil
 	PATH /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64)

 INCLUDE (CheckIncludeFiles)

-# The location of iberty.h varies according to the distro.
-# Fine the right location.
-find_path(
-    COGUTIL_INCLUDE_DIR backtrace-symbols.h
-    PATHS
-        /usr/include
-        /usr/local/include
-        /usr/include/opencog/util
-        /usr/local/include/opencog/util
+# The location of cogutil is variable. Find the right location.
+find_path(COGUTIL_INCLUDE_DIR opencog/util/cogutil.h
+	PATH /usr/include /usr/local/include
 )

 set(CMAKE_REQUIRED_INCLUDES ${COGUTIL_INCLUDE_DIR})
-CHECK_INCLUDE_FILES (backtrace-symbols.h HAVE_COGUTIL_H)
+CHECK_INCLUDE_FILES (cogutil.h HAVE_COGUTIL_H)

 if (COGUTIL_LIBRARY AND HAVE_COGUTIL_H)
-	set( COGUTIL_FOUND TRUE )
+	set(COGUTIL_FOUND TRUE)
+	set(COGUTIL_VERSION 0)
+	FILE(READ "${COGUTIL_INCLUDE_DIR}/cogutil.h" _CU_H_CONTENTS)
+	STRING(REGEX MATCH
+		"#define COGUTIL_VERSION_STRING[  ]+\"([0-9.]+)\""
+		_MATCH "${_CU_H_CONTENTS}")
+	SET(COGUTIL_VERSION ${CMAKE_MATCH_1})
 endif (COGUTIL_LIBRARY AND HAVE_COGUTIL_H)

 if ( COGUTIL_FOUND )
-	message( STATUS "Found CogUtil: ${COGUTIL_LIBRARY}")
+	message( STATUS "Found CogUtil version ${COGUTIL_VERSION} at ${COGUTIL_LIBRARY}")
 else ( COGUTIL_FOUND )
 	message( STATUS "CogUtil not found")
 endif ( COGUTIL_FOUND )


cdash : remove compiler flags from nightly testing

NOTE: the following flags no longer do anything
-D CMAKE_C_FLAGS
-D CMAKE_CXX_FLAGS

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -276,8 +276,6 @@
 SET(CONFIGURE_OPTIONS
   "-DCMAKE_C_COMPILER:FILEPATH=mpicc"
   "-DCMAKE_CXX_COMPILER:FILEPATH=mpicxx"
-  "-DCMAKE_C_FLAGS:STRING=-O2 -g -Wall -Wextra"
-  "-DCMAKE_CXX_FLAGS:STRING=-O2 -g -Wall -Wextra"
   "-DENABLE_ZOLTAN:BOOL=ON"
   "-DPCU_COMPRESS:BOOL=ON"
   "-DIS_TESTING:BOOL=True"


px4_fmu-v2: disable vtol_att_control to save flash

--- boards/px4/fmu-v2/default.cmake
+++ boards/px4/fmu-v2/default.cmake
@@ -91,7 +91,7 @@
 		#sih
 		#temperature_compensation
 		vmount
-		vtol_att_control
+		#vtol_att_control
 	SYSTEMCMDS
 		bl_update
 		#config


Don't run "yarn clean" since it may remove needed files.

This isn't quite the same as "npm prune" that we were replacing. "clean"
will remove files from inside the npm directories that it thinks are
inessential. But this doesn't always work.

--- build/cmake/core-admin-ui.cmake
+++ build/cmake/core-admin-ui.cmake
@@ -28,7 +28,7 @@
   DEPENDS
     yarn
     ${STAMP_DIR}/core-admin-ui-build-dir
-  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} yarn install && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} yarn clean
+  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} yarn install
   COMMAND touch ${STAMP_DIR}/core-admin-ui-yarn-install
 )


ilastik-gui: Added launch script for watershed gui.

--- ilastik-gui.cmake
+++ ilastik-gui.cmake
@@ -56,6 +56,17 @@
     COMMENT     "Added ilastik gui command to bin directory"
 )

+ExternalProject_add_step(${ilastik_NAME}  install_gui_ws_launch # Alternate GUI that includes watershed
+    DEPENDEES   install_gui_env_script
+    COMMAND     ${TEMPLATE_EXE}
+        --exe
+        ${TEMPLATE_DIR}/ilastik_script.template
+        ${BUILDEM_DIR}/bin/ilastik_gui_ws
+        ${BUILDEM_DIR}/bin/setenv_ilastik_gui.sh
+        ${ilastik_SRC_DIR}/ilastik/workflows/vigraWatershed/pixelClassificationWithWatershedMain.py
+    COMMENT     "Added ilastik gui-ws command to bin directory"
+)
+
 ExternalProject_add_step(${ilastik_NAME}  install_gui_test
     DEPENDEES   install_gui_launch
     COMMAND     ${TEMPLATE_EXE}


Check for minimum required version of TBB

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -13,6 +13,8 @@
 ## See the License for the specific language governing permissions and      ##
 ## limitations under the License.                                           ##
 ## ======================================================================== ##
+
+SET(TBB_VERSION_REQUIRED "3.0")

 IF (NOT TBB_ROOT)
   SET(TBB_ROOT $ENV{TBB_ROOT})
@@ -97,13 +99,34 @@
   MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC_MIC)
 ENDIF()

+SET(TBB_ERROR_MESSAGE
+  "Threading Building Blocks (TBB) with minimum version ${TBB_VERSION_REQUIRED} not found.
+OSPRay uses TBB as default tasking system. Please make sure you have the TBB headers installed as well (the package is typically named 'libtbb-dev' or 'tbb-devel') and/or hint the location of TBB in TBB_ROOT.
+Alternatively, you can try to use OpenMP as tasking system by setting OSPRAY_TASKING_SYSTEM=OpenMP")
+
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB
-  "Threading Building Blocks (TBB) not found.
-OSPRay uses TBB as default tasking system. Please make sure you have the TBB headers installed as well (the package is typically named 'libtbb-dev' or 'tbb-devel') and/or hint the location of TBB in TBB_ROOT.
-Alternatively, you can try to use OpenMP as tasking system by setting OSPRAY_TASKING_SYSTEM=OpenMP"
+  ${TBB_ERROR_MESSAGE}
   TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_MALLOC
 )
+
+# check version
+IF (TBB_INCLUDE_DIR)
+  FILE(READ ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h TBB_STDDEF_H)
+
+  STRING(REGEX MATCH "#define TBB_VERSION_MAJOR ([0-9])" DUMMY "${TBB_STDDEF_H}")
+  SET(TBB_VERSION_MAJOR ${CMAKE_MATCH_1})
+
+  STRING(REGEX MATCH "#define TBB_VERSION_MINOR ([0-9])" DUMMY "${TBB_STDDEF_H}")
+  SET(TBB_VERSION "${TBB_VERSION_MAJOR}.${CMAKE_MATCH_1}")
+
+  IF (TBB_VERSION VERSION_LESS TBB_VERSION_REQUIRED)
+    MESSAGE(FATAL_ERROR ${TBB_ERROR_MESSAGE})
+  ENDIF()
+
+  SET(TBB_VERSION ${TBB_VERSION} CACHE STRING "TBB Version")
+  MARK_AS_ADVANCED(TBB_VERSION)
+ENDIF()

 IF (TBB_FOUND)
   SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})


Fixing gflags static link

Fixing gflags static link

Former-commit-id: faf1e9dfc9cce584075a6e8f3d323ea58af32e7a

--- cmake-modules/Fetch_Ceres.cmake
+++ cmake-modules/Fetch_Ceres.cmake
@@ -32,13 +32,10 @@
     ################################
     ### Compiler-dependent flags ###
     ################################
-    if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" )
-        set(FLAGS "${FLAGS} -Wno-implicit-fallthrough -Wno-deprecated-declarations -Wno-ignored-attributes -Wno-int-in-bool-context -Wno-maybe-uninitialized -Wno-enum-compare -Wno-unused-local-typedefs")
-    elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-        set(FLAGS "${FLAGS} -v --gcc-toolchain=${GCC_TOOLCHAIN}")
-        set(FLAGS "${FLAGS} -stdlib=libstdc++ -Wno-deprecated-declarations -Wno-ignored-attributes -Wno-invalid-partial-specialization -Wno-missing-braces -Wno-overloaded-virtual -Wno-uninitialized")
+    if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+        set(FLAGS "${FLAGS}  -v --gcc-toolchain=${GCC_TOOLCHAIN} -stdlib=libstdc++")
     endif()
-
+    set(FLAGS "${FLAGS} -I${GLOG_INCLUDE_DIR} -L${GLOG_LIBRARY_DIR} -I${GFLAGS_INCLUDE_DIR}  -L${GFLAGS_LIBRARY_DIR}")

@@ -70,10 +67,10 @@
             -DEIGEN_INCLUDE_DIR_HINTS:PATH=${EIGEN3_INCLUDE_DIR}
             -DEIGEN_PREFER_EXPORTED_EIGEN_CMAKE_CONFIGURATION:BOOL=FALSE
             -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION:BOOL=FALSE
-            -DGFLAGS_INCLUDE_DIR_HINTS:PATH=${GFLAGS_INCLUDE_DIR} ${GLOG_INCLUDE_DIR}
+            -DGFLAGS_INCLUDE_DIR_HINTS:PATH=${GFLAGS_INCLUDE_DIR}
             -DGFLAGS_LIBRARY_DIR_HINTS:PATH=${GFLAGS_LIBRARY_DIR}
             -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION:BOOL=FALSE
-            -DGLOG_INCLUDE_DIR_HINTS:PATH=${GLOG_INCLUDE_DIR} ${GFLAGS_INCLUDE_DIR}
+            -DGLOG_INCLUDE_DIR_HINTS:PATH=${GLOG_INCLUDE_DIR}
             -DGLOG_LIBRARY_DIR_HINTS:PATH=${GLOG_LIBRARY_DIR}
             -DLAPACK:BOOL=OFF
             -DEIGENSPARSE:BOOL=ON


Squashed '3rdparty/github/cmake-utils/' changes from b1c4be8..e310bfc

e310bfc Fix a message

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: e310bfc2826a37616f11340a904c661b20ebc924

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -52,7 +52,7 @@
     MESSAGE(STATUS "Looking for ${dependTarget}")
     FIND_PACKAGE (${dependTarget})
     IF (NOT ${_FINDPACKAGE}_FOUND)
-      MESSAGE (FATAL ERROR "find ${dependTarget} failure")
+      MESSAGE (FATAL_ERROR "find ${dependTarget} failure")
     ENDIF ()
     #
     # The following lines are experimental


build: add imported library for libedit

build: add imported library for libedit

This allows us to use CMake more effectively rather than proliferating
the linking and header search path logic.

--- cmake/modules/FindLibEdit.cmake
+++ cmake/modules/FindLibEdit.cmake
@@ -59,6 +59,12 @@
                                       LibEdit_LIBRARIES
                                     VERSION_VAR
                                       LibEdit_VERSION_STRING)
-  mark_as_advanced(LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
 endif()

+if(LibEdit_FOUND AND NOT TARGET libedit)
+  add_library(libedit UNKNOWN IMPORTED)
+  set_target_properties(libedit PROPERTIES
+    IMPORTED_LOCATION ${LibEdit_LIBRARIES}
+    INTERFACE_INCLUDE_DIRECTORIES ${LibEdit_INCLUDE_DIRS})
+endif()
+mark_as_advanced(LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)


Fix grpc_cpp_plugin executable import (#525)

--- cmake/opentelemetry-proto.cmake
+++ cmake/opentelemetry-proto.cmake
@@ -82,8 +82,7 @@
   list(APPEND PROTOBUF_INCLUDE_FLAGS "-I${IMPORT_DIR}")
 endforeach()

-get_target_property(gRPC_CPP_PLUGIN_EXECUTABLE gRPC::grpc_cpp_plugin
-                    IMPORTED_LOCATION_RELEASE)
+set(gRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:gRPC::grpc_cpp_plugin>)

 add_custom_command(
   OUTPUT ${COMMON_PB_H_FILE}


Update externals script

Update externals script

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -2,7 +2,7 @@
 if(NOT EXISTS "${CMAKE_BINARY_DIR}/script-externals")
   message(STATUS "Downloading external scripts")
   execute_process(COMMAND
-    ${GIT_EXECUTABLE} clone -b v2.0 https://github.com/UniStuttgart-VISUS/megamol-cmake-externals.git script-externals --depth 1
+    ${GIT_EXECUTABLE} clone -b v2.2 https://github.com/UniStuttgart-VISUS/megamol-cmake-externals.git script-externals --depth 1
     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
     ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
 endif()


Update FindLua module to find lua 5.3

Update FindLua module to find lua 5.3

See also: #111

--- cmake/FindLua.cmake
+++ cmake/FindLua.cmake
@@ -67,7 +67,7 @@
 unset(_lua_library_names)

 # this is a function only to have all the variables inside go away automatically
-set(LUA_MINOR_VERSIONS 2 1)
+set(LUA_MINOR_VERSIONS 3 2 1)

 foreach (ver IN LISTS LUA_MINOR_VERSIONS)
     list(APPEND _lua_include_subdirs


disable some bogus warnings from ICC

disable some bogus warnings from ICC

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -136,6 +136,8 @@

 if(MIC_NATIVE_FOUND OR MIC_OFFLOAD_FOUND)
    set(MIC_FOUND true)
+   list(APPEND CMAKE_MIC_CXX_FLAGS "-diag-disable 2338") # this switch statement does not have a default clause
+   list(APPEND CMAKE_MIC_CXX_FLAGS "-diag-disable 193") # zero used for undefined preprocessing identifier "VC_GCC"

    macro(mic_add_definitions)
       add_definitions(${ARGN})


FindTBB.cmake: Fix typo

FindTBB.cmake: Fix typo

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -53,10 +53,10 @@
         set(_TBB_COMPILER "vc12")
     endif(MSVC12)
     if (MSVC14)
-	set(_TBB_COMPILER "vc14")
+        set(_TBB_COMPILER "vc14")
     endif(MSVC14)
     if (NOT _TBB_COMPILER)
-        message("ERROR: TBB supports only VC 7.1, 8, 9, 10, 11, and 12 compilers on Windows platforms.")
+        message("ERROR: TBB supports only VC 7.1, 8, 9, 10, 11, 12, and 14 compilers on Windows platforms.")
     endif (NOT _TBB_COMPILER)
     set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
 endif (WIN32)


GCC PCH recompile depends on all headers

--- cmake/add_pch.cmake
+++ cmake/add_pch.cmake
@@ -105,7 +105,7 @@
     ADD_CUSTOM_COMMAND(
       OUTPUT ${_output}
       COMMAND ${CMAKE_CXX_COMPILER} ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source}
-      DEPENDS ${_source} )
+      DEPENDS ${_source} ${IRRLICHT_HEADERS} )
     ADD_CUSTOM_TARGET(${_targetName}_gch DEPENDS ${_output})
     ADD_DEPENDENCIES(${_targetName} ${_targetName}_gch)
     SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "-include ${_name} -Winvalid-pch")


[CI] ctest: second start means other tag, so submit all files

--- CI/machinery/CTestDriver.cmake
+++ CI/machinery/CTestDriver.cmake
@@ -151,6 +151,7 @@
 set(CTEST_BUILD_FLAGS -j${NP})
 set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${NP})
 endif()
+
 ctest_start("${MODE}")

 if(SUBMIT EQUAL 0)
@@ -168,6 +169,7 @@
   if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
     ctest_memcheck()
   endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
+
   if(NOT TEST_RETURN_VAL EQUAL 0)
     message(FATAL_ERROR " *** test failure *** ")
   endif()
@@ -176,7 +178,12 @@
 if(SUBMIT EQUAL 1)
   # note: if the submission process experiences some slow-down, then we
   # may get a return-code error, so we do it in a second phase.
-  ctest_submit(RETURN_VALUE SUBMIT_RETURN_VAL)
+
+  # we need to get all the previously built files as ctest_start may
+  # begin with another tag
+  file(GLOB SUBMIT_FILES ${CMAKE_BINARY_DIR}/Testing/*/*)
+  message(STATUS "submit files : ${SUBMIT_FILES}")
+  ctest_submit(FILES ${SUBMIT_FILES} RETURN_VALUE SUBMIT_RETURN_VAL)

   if(NOT SUBMIT_RETURN_VAL EQUAL 0)
     message(WARNING " *** submission failure *** ")


Fix PCH generation for the Web/MODULE lib type.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -1205,7 +1205,7 @@
                 get_directory_property (COMPILE_DEFINITIONS COMPILE_DEFINITIONS)
                 get_directory_property (INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
                 get_target_property (TYPE ${TARGET_NAME} TYPE)
-                if (TYPE MATCHES SHARED)
+                if (TYPE MATCHES SHARED|MODULE)
                     list (APPEND COMPILE_DEFINITIONS ${TARGET_NAME}_EXPORTS)
                     if (LANG STREQUAL CXX)
                         _test_compiler_hidden_visibility ()


ctest: test 32-bit parameter passing

ctest: test 32-bit parameter passing

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- tests/abi.cmake
+++ tests/abi.cmake
@@ -1,21 +1,20 @@
 execute_process(
    COMMAND ${OBJDUMP} --no-show-raw-insn -dC -j .text ${BINARY}
-   COMMAND grep -A2 " <test"
+   COMMAND grep -A3 " <test"
    COMMAND sed 1d
    COMMAND cut -d: -f2
    COMMAND xargs echo
    OUTPUT_VARIABLE asm)
 string(STRIP "${asm}" asm)
+
+# Note the regex parts looking for %esp can only match on ia32. (Not sure about x32, though)
+# 'retq' on the other hand, can only match on x64
 if("${IMPL}" STREQUAL SSE)
-   set(reference "^(addps %xmm(0,%xmm1 movaps %xmm1,%xmm0|1,%xmm0 retq)|vaddps %xmm(0,%xmm1|1,%xmm0),%xmm0 retq)$")
-elseif("${IMPL}" STREQUAL SSE2)
-   set(reference "^vaddps %xmm(0,%xmm1|1,%xmm0),%xmm0 retq$")
-elseif("${IMPL}" STREQUAL AVX)
-   set(reference "^vaddps %ymm(0,%ymm1|1,%ymm0),%ymm0 retq$")
-elseif("${IMPL}" STREQUAL AVX2)
-   set(reference "^vaddps %ymm(0,%ymm1|1,%ymm0),%ymm0 retq$")
+   set(reference "^(addps %xmm(0,%xmm1 movaps %xmm1,%xmm0 retq|1,%xmm0 retq)|vaddps %xmm(0,%xmm1|1,%xmm0),%xmm0 retq|.*v?movaps 0x[12]4\\(%esp\\),%xmm[01]( | .+ )v?(add|mova)ps 0x[12]4\\(%esp\\),%xmm[01])")
+elseif("${IMPL}" STREQUAL AVX OR "${IMPL}" STREQUAL AVX2)
+   set(reference "^(vaddps %ymm(0,%ymm1|1,%ymm0),%ymm0 retq|vmovaps 0x[24]4\\(%esp\\),%ymm[01]( | .+ )v(add|mova)ps 0x[24]4\\(%esp\\),%ymm[01],%ymm)")
 elseif("${IMPL}" STREQUAL MIC)
-   set(reference "^vaddps %zmm(0,%zmm1|1,%zmm0),%zmm0 retq$")
+   set(reference "^vaddps %zmm(0,%zmm1|1,%zmm0),%zmm0 retq")
 else()
    message(FATAL_ERROR "Unknown IMPL '${IMPL}'")
 endif()


Updates download script

Updates download script

--- LookUp-GreatCMakeCookOff.cmake
+++ LookUp-GreatCMakeCookOff.cmake
@@ -9,8 +9,8 @@

 # First attempts to find the package
-set(COOKOFF_DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/external/src/GreatCMakeCookOff)
-find_package(GreatCMakeCookOff NO_MODULE PATHS ${COOKOFF_DOWNLOAD_DIR} QUIET)
+set(COOKOFF_DOWNLOAD_DIR "${PROJECT_BINARY_DIR}/external/src/GreatCMakeCookOff")
+find_package(GreatCMakeCookOff NO_MODULE PATHS "${COOKOFF_DOWNLOAD_DIR}" QUIET)

 # Otherwise attempts to download it.
 # Does not use ExternalProject_Add to avoid doing a recursive cmake step.
@@ -24,9 +24,9 @@
   endif()

   # Remove GreatCMakeCookOff directory if it exists
-  if(EXISTS ${COOKOFF_DOWNLOAD_DIR})
+  if(EXISTS "${COOKOFF_DOWNLOAD_DIR}")
     execute_process(
-      COMMAND ${CMAKE_COMMAND} -E remove_directory ${COOKOFF_DOWNLOAD_DIR}
+      COMMAND ${CMAKE_COMMAND} -E remove_directory "${COOKOFF_DOWNLOAD_DIR}"
       OUTPUT_QUIET
     )
   endif()
@@ -34,7 +34,7 @@
     COMMAND ${GIT_EXECUTABLE} clone
          https://github.com/UCL/GreatCMakeCookOff.git
          -b refactor
-         ${COOKOFF_DOWNLOAD_DIR}
+         "${COOKOFF_DOWNLOAD_DIR}"
     RESULT_VARIABLE CLONING_COOKOFF
     OUTPUT_QUIET
     ERROR_VARIABLE CLONING_ERROR
@@ -45,10 +45,10 @@
     message(FATAL_ERROR "[GreatCMakeCookOff] git cloning failed.")
   else()
     message(STATUS "[GreatCMakeCookOff] downloaded to ${COOKOFF_DOWNLOAD_DIR}")
-    find_package(GreatCMakeCookOff NO_MODULE PATHS ${COOKOFF_DOWNLOAD_DIR} QUIET)
+    find_package(GreatCMakeCookOff NO_MODULE PATHS "${COOKOFF_DOWNLOAD_DIR}" QUIET)
   endif()

-  set(GreatCMakeCookOff_DIR ${COOKOFF_DOWNLOAD_DIR})
+  set(GreatCMakeCookOff_DIR "${COOKOFF_DOWNLOAD_DIR}/cmake")
   set(GreatCMakeCookOff_FOUND TRUE)
 endif()
 unset(COOKOFF_DOWNLOAD_DIR)


Fix Gperftools CMake script.

Fix Gperftools CMake script.

--- cmake/FindGperftools.cmake
+++ cmake/FindGperftools.cmake
@@ -17,8 +17,6 @@
 #  GPERFTOOLS_LIBRARIES          The Gperftools libraries (tcmalloc & profiler)
 #  GPERFTOOLS_INCLUDE_DIR        The location of Gperftools headers

-find_path(Gperftools_ROOT_DIR NAMES include/google/heap-profiler.h)
-
 find_library(GPERFTOOLS_TCMALLOC
     NAMES tcmalloc
     HINTS ${Gperftools_ROOT_DIR}/lib)
@@ -32,7 +30,7 @@
     HINTS ${Gperftools_ROOT_DIR}/lib)

 find_path(GPERFTOOLS_INCLUDE_DIR
-    NAMES Gperftools/heap-profiler.h
+    NAMES gperftools/heap-profiler.h
     HINTS ${Gperftools_ROOT_DIR}/include)

 set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})


Disable debug mode

Disable debug mode

--- cmake/Modules/UseODB.cmake
+++ cmake/Modules/UseODB.cmake
@@ -1,5 +1,5 @@

-set(ODB_COMPILE_DEBUG TRUE)
+set(ODB_COMPILE_DEBUG FALSE)
 set(ODB_COMPILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/odb_gen")
 set(ODB_COMPILE_HEADER_SUFFIX ".h")
 set(ODB_COMPILE_INLINE_SUFFIX "_inline.h")


Squashed '3rdparty/github/cmake-utils-remote/' changes from ab35df0..c43493b

c43493b Use target_file in test

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: c43493b2f050389b74e7cef157f79911fbccb262

--- cmake/MyPackageCheck.cmake
+++ cmake/MyPackageCheck.cmake
@@ -35,7 +35,7 @@

   FOREACH (_name ${name} ${name}_static)
     ADD_TEST (NAME ${_name}
-      COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" ${_name}
+      COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" $<TARGET_FILE:${_name}>
       WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH})
     ADD_DEPENDENCIES(check ${_name})
   ENDFOREACH ()


cmake: add directory creation to download helper scripts

--- cmake/OpenCVDownload.cmake
+++ cmake/OpenCVDownload.cmake
@@ -204,8 +204,8 @@
 ${OPENCV_DOWNLOAD_LOG}
 ")
       # write helper scripts for failed downloads
-      file(APPEND "${OPENCV_DOWNLOAD_WITH_CURL}" "curl --output \"${CACHE_CANDIDATE}\" \"${DL_URL}\"\n")
-      file(APPEND "${OPENCV_DOWNLOAD_WITH_WGET}" "wget -O \"${CACHE_CANDIDATE}\" \"${DL_URL}\"\n")
+      file(APPEND "${OPENCV_DOWNLOAD_WITH_CURL}" "curl --create-dirs --output \"${CACHE_CANDIDATE}\" \"${DL_URL}\"\n")
+      file(APPEND "${OPENCV_DOWNLOAD_WITH_WGET}" "mkdir -p $(dirname ${CACHE_CANDIDATE}) && wget -O \"${CACHE_CANDIDATE}\" \"${DL_URL}\"\n")
       return()
     endif()


IntelGPU backend: Change clDNN hash version to release tag (#3063)

--- cmake/external_cldnn.cmake
+++ cmake/external_cldnn.cmake
@@ -22,7 +22,7 @@
 #------------------------------------------------------------------------------

 set(CLDNN_GIT_REPO_URL https://github.com/intel/clDNN.git)
-set(CLDNN_GIT_LABEL 3e4b6ec092ca7c5d83ccb23bffcdf2a143127c78)
+set(CLDNN_GIT_LABEL v0.1.0)
 set(OUT_DIR ${EXTERNAL_PROJECTS_ROOT}/cldnn/out)

 ExternalProject_Add(


Fix typo in last commit for cmake checks for finite / _finite.

svn path=/trunk/; revision=9600

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -191,7 +191,7 @@
 # are sometimes all that is available on windows
 check_symbol_exists(finite "math.h" HAVE_FINITE)
 if(NOT HAVE_FINITE)
-  check_symbolnction_exists(_finite "math.h" _HAVE_FINITE)
+  check_symbol_exists(_finite "math.h" _HAVE_FINITE)
   set(HAVE_FINITE ${_HAVE_FINITE} CACHE INTERNAL "Have function _finite")
 endif(NOT HAVE_FINITE)
 check_symbol_exists(isnan "math.h" HAVE_ISNAN)


reverting iostreams for now until we find a solution (installer)

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -4,7 +4,7 @@
   set(Boost_USE_STATIC_LIBS ON)
 endif(NOT PCL_SHARED_LIBS OR WIN32)

-find_package(Boost 1.40.0 COMPONENTS system filesystem thread date_time iostreams)
+find_package(Boost 1.40.0 COMPONENTS system filesystem thread date_time)

 if(Boost_FOUND)
   # Obtain diagnostic information about Boost's automatic linking outputted


Optional components removed seems that cmake doesn't like it

Boost is reported as non found due to the second call to find_package

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -19,8 +19,6 @@

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)
-	# Optional boost modules
-	find_package(Boost 1.40.0 COMPONENTS mpi serialization)
   # Obtain diagnostic information about Boost's automatic linking outputted
   # during compilation time.
   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})


* set Boost libraries as system libraries

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -22,6 +22,6 @@
   # Obtain diagnostic information about Boost's automatic linking outputted
   # during compilation time.
   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-  include_directories(${Boost_INCLUDE_DIRS})
+  include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
   link_directories(${Boost_LIBRARY_DIRS})
 endif(Boost_FOUND)


Atlas: Added comments explaining what to do if a build fails due to "cpu throttling" detected.

--- atlas.cmake
+++ atlas.cmake
@@ -1,6 +1,22 @@
 #
 # Install atlas from source
 #
+
+#
+# Note: The ATLAS build process uses timing tests to determine the best implementation to build for your system.
+#       These timing tests cannot function properly if CPU throttling is enabled on your machine.
+#       If the ATLAS build script detects CPU throttling on your machine, it will fail with an error like this:
+#
+#         It appears you have cpu throttling enabled, which makes timings
+#         unreliable and an ATLAS install nonsensical. Aborting.
+#
+#       If you get this error, you must temporarily disable CPU throttling (or "Turbo Boost") while ATLAS is built.
+#       On Fedora 16, this can be done via the cpupower command:
+#
+#         $ cpupower frequency-info # Check current settings...
+#         $ sudo cpupower frequency-set -g performance
+#
+#         See cpupower help frequency-set for more info.

 if (NOT atlas_NAME)


Adds option to select a particular tag for Google's benchmark

--- modules/LookUpGBenchmark.cmake
+++ modules/LookUpGBenchmark.cmake
@@ -1,13 +1,23 @@
 # Installs GBenchmark into build directory
 if(GBenchmark_ARGUMENTS)
-  cmake_parse_arguments(GBenchmark "" "GIT_REPOSITORY" "" ${GBenchmark_ARGUMENTS})
+    cmake_parse_arguments(GBenchmark
+        ""
+        "GIT_REPOSITORY;GIT_TAG"
+        ""
+        ${GBenchmark_ARGUMENTS}
+    )
 endif()
+
 if(NOT GBenchmark_GIT_REPOSITORY)
   set(GBenchmark_GIT_REPOSITORY  https://github.com/google/benchmark.git)
 endif()

+if(NOT GBenchmark_GIT_TAG)
+  set(GBenchmark_GIT_TAG master)
+endif()
+
 include(PassonVariables)
-passon_variables(GTest
+passon_variables(GBenchmark
     FILENAME "${EXTERNAL_ROOT}/src/GBenchmarkVariables.cmake"
     PATTERNS
         "CMAKE_[^_]*_R?PATH"
@@ -20,6 +30,7 @@
 ExternalProject_Add(
     Lookup-GBenchmark
     GIT_REPOSITORY ${GBenchmark_GIT_REPOSITORY}
+    GIT_TAG ${GBenchmark_GIT_TAG}
     PREFIX "${EXTERNAL_ROOT}"
     # Force separate output paths for debug and release builds to allow easy
     # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands
@@ -30,7 +41,10 @@

     # Wrap download, configure and build steps in a script to log output
     UPDATE_COMMAND ""
-    LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
+    LOG_DOWNLOAD ON
+    LOG_CONFIGURE ON
+    LOG_BUILD ON
+    LOG_INSTALL ON
 )

 add_recursive_cmake_step(Lookup-GBenchmark DEPENDEES install)


vigra.cmake: Updated default vigra version to today's commit.

--- vigra.cmake
+++ vigra.cmake
@@ -31,7 +31,7 @@
 include (nose)

 # select the desired VIGRA commit
-set(DEFAULT_VIGRA_VERSION "4fe15e890e0252f2fb2b38552d321d43f32c07b5") # from 2014-05-23
+set(DEFAULT_VIGRA_VERSION "fb83cf8a595a36285980bd563c90e5d666bce388") # from 2014-06-23
 IF(NOT DEFINED VIGRA_VERSION)
     SET(VIGRA_VERSION "${DEFAULT_VIGRA_VERSION}")
 ENDIF()


fix merging issue by removing function(addMaxsupport)

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.0)

-### Core libraries ###
+### Core libraries ###
 function(setupJamomaLibraryProperties LIBNAME)
 	# Filename
 	set_property(TARGET ${LIBNAME}
 				 PROPERTY OUTPUT_NAME Jamoma${LIBNAME})
-
+
 	if(BUILD_JAMOMAMAX)
     	if(APPLE)
         	set_property(TARGET ${PROJECT_NAME}
@@ -15,7 +15,7 @@
                      	PROPERTY INSTALL_RPATH "\$ORIGIN/../support;\$ORIGIN")
     	endif()
 	endif()
-
+
 	if(BUILD_JAMOMAPD)
     	if(APPLE)
         	set_property(TARGET ${PROJECT_NAME}
@@ -80,7 +80,7 @@
 				${PROJECT_SRCS} ${PROJECT_HDRS})

 	setupJamomaLibraryProperties(${PROJECT_NAME})
-
+
 	# Static
 	if(APPLE AND STATIC_TESTING)
 		# i386
@@ -90,12 +90,12 @@
 		set_property(TARGET ${PROJECT_NAME}-i386-static
 					 PROPERTY OSX_ARCHITECTURES i386)
 		setupJamomaLibraryProperties(${PROJECT_NAME}-i386-static)
-
-		# x86_64
+
+		# x86_64
 		add_library(${PROJECT_NAME}-x86_64-static
 					STATIC
 					${PROJECT_SRCS} ${PROJECT_HDRS})
-
+
 		set_property(TARGET ${PROJECT_NAME}-x86_64-static
 					 PROPERTY OSX_ARCHITECTURES x86_64)
 		setupJamomaLibraryProperties(${PROJECT_NAME}-x86_64-static)
@@ -231,89 +231,22 @@
 				set_property(TARGET "test32_${PROJECT_NAME}" PROPERTY OSX_ARCHITECTURES i386)
 				target_link_libraries("test32_${PROJECT_NAME}" ${PROJECT_NAME}-i386-static)
 				add_test("test32_${PROJECT_NAME}" "test32_${PROJECT_NAME}")
-
+
 				# x86_64
 				add_executable("test64_${PROJECT_NAME}" ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp ${TEST_SRCS})
 				set_property(TARGET "test64_${PROJECT_NAME}" PROPERTY OSX_ARCHITECTURES x86_64)
 				target_link_libraries("test64_${PROJECT_NAME}" ${PROJECT_NAME}-x86_64-static)
-
+
 				add_test("test64_${PROJECT_NAME}" "test64_${PROJECT_NAME}")
 			else()
 				add_executable("test_${PROJECT_NAME}" ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp ${TEST_SRCS})
 				target_link_libraries("test_${PROJECT_NAME}" ${PROJECT_NAME})
-
+
 				add_test("test_${PROJECT_NAME}" "test_${PROJECT_NAME}")
 			endif()
 		endif()
 	endif()
 endFunction()
-
-## Function to add the Max/MSP includes ##
-# TODO put this in a module file instead.
-function(addMaxsupport)
-	find_path(JAMOMAMAX_PATH "source/c74support/max-includes/commonsyms.h"
-			  HINTS "${CMAKE_SOURCE_DIR}/../Implementations/Max"
-			  		"${CMAKE_SOURCE_DIR}/Implementations/Max")
-	set(MAXSDK_PATH "${JAMOMAMAX_PATH}/source/c74support/")
-
-	include_directories("${MAXSDK_PATH}/max-includes")
-	include_directories("${MAXSDK_PATH}/msp-includes")
-	include_directories("${MAXSDK_PATH}/jit-includes")
-	include_directories("${JAMOMAMAX_PATH}/library/includes")
-
-	FIND_LIBRARY(MaxAPI_LIB
-				 NAMES MaxAPI
-				 PATHS ${MAXSDK_PATH}/max-includes/)
-	MARK_AS_ADVANCED (MaxAPI_LIB)
-	SET(MaxAPI_LIB ${MaxAPI_LIB})
-
-	if(WIN32)
-		if(CMAKE_BUILD_TYPE STREQUAL "Release")
-			add_definitions(-DMAXAPI_USE_MSCRT)
-		endif()
-		# FIND_LIBRARY(MaxCRT_LIB
-					 # NAMES maxcrt
-					 # PATHS ${MAXSDK_PATH}/max-includes/)
-		# MARK_AS_ADVANCED (MaxCRT_LIB)
-		# SET(MaxCRT_LIB ${MaxCRT_LIB})
-		# FIND_LIBRARY(MaxCRT_P_LIB
-					 # NAMES maxcrt_p
-					 # PATHS ${MAXSDK_PATH}/max-includes/)
-		# MARK_AS_ADVANCED (MaxCRT_P_LIB)
-		# SET(MaxCRT_P_LIB ${MaxCRT_P_LIB})
-	endif()
-
-	FIND_LIBRARY(MaxAudio_LIB
-				 NAMES
-				 	MaxAudio
-				 	MaxAudioAPI
-				 PATHS
-				 	${MAXSDK_PATH}/msp-includes
-				 	${MAXSDK_PATH}/msp-includes/x64
-	)
-	MARK_AS_ADVANCED (MaxAudio_LIB)
-	SET(MaxAudio_LIB ${MaxAudio_LIB})
-
-	FIND_LIBRARY(Jitter_LIB
-				 NAMES
-				 	jitlib
-				 	JitterAPI
-				 PATHS
-				 	${MAXSDK_PATH}/jit-includes
-				 	${MAXSDK_PATH}/jit-includes/x64
-	)
-	MARK_AS_ADVANCED (Jitter_LIB)
-	SET(Jitter_LIB ${Jitter_LIB})
-
-if(NOT WIN32)
-	set(C74_SYM_LINKER_FLAGS " -Wl,-U,_sysmem_newptr,-U,_sysmem_freeptr,-U,_sysmem_resizeptr,-U,_strncpy_zero,-U,_stdinletinfo,-U,_outlet_new,-U,_outlet_anything,-U,_object_getmethod,-U,_object_post,-U,_object_obex_store,-U,_object_obex_dumpout,-U,_object_method,-U,_object_error,-U,_object_alloc,-U,_hashtab_store,-U,_hashtab_new,-U,_hashtab_lookup,-U,_gensym,-U,_error,-U,_common_symbols_gettable,-U,_class_register,-U,_class_new,-U,_class_attr_addattr_parse,-U,_class_addmethod,-U,_class_addattr,-U,_attr_offset_new,-U,_attr_args_process,-U,_attr_args_offset,-U,_atom_setsym,-U,_atom_setlong,-U,_atom_setfloat,-U,_atom_gettype,-U,_atom_getsym,-U,_atom_getlong,-U,_atom_getfloat,-U,_z_dsp_setup,-U,_z_dsp_free,-U,_sys_getsr,-U,_dsp_addv,-U,_class_dspinit,-U,_jit_object_method,-U,_outlet_int,-U,_outlet_list,-U,_class_attr_get,-U,_dsp_add,-U,_fileusage_addfile,-U,_locatefile_extended,-U,_nameinpath,-U,_path_closefolder,-U,_path_foldernextfile,-U,_path_openfolder,-U,_defer_low,-U,_globalsymbol_reference,-U,_globalsymbol_dereference,-U,_bangout,-U,_freeobject,-U,_outlet_bang,-U,_outlet_float,-U,_proxy_getinlet,-U,_proxy_new,-U,_atom_arg_getlong,-U,_atom_arg_getsym,-U,_floatout,-U,_intout,-U,_post,-U,_sys_getblksize,-U,_sysmem_newptrclear,-U,_object_attr_setfloat,-U,_object_attr_setlong,-U,_atom_arg_getfloat,-U,_atom_getfloatarg,-U,_listout,-U,_attr_addfilter_clip,-U,_attr_dictionary_process,-U,_class_attr_addattr_format,-U,_jbox_free,-U,_jbox_get_rect_for_view,-U,_jbox_initclass,-U,_jbox_new,-U,_jbox_ready,-U,_jbox_redraw,-U,_jgraphics_fill,-U,_jgraphics_rectangle_rounded,-U,_jgraphics_set_source_jrgba,-U,_object_attach_byptr,-U,_object_attr_get_rect,-U,_object_attr_set_rect,-U,_object_detach_byptr,-U,_object_dictionaryarg,-U,_object_register,-U,_object_unregister,-U,_patcherview_get_jgraphics,-U,_symbol_unique,-U,_attr_offset_array_new,-U,_defer,-U,_object_free,-U,_object_method_typed,-U,_object_new_typed,-U,_path_copyfile,-U,_path_copyfolder,-U,_path_createfolder,-U,_path_frompathname,-U,_path_nameconform,-U,_clock_delay,-U,_clock_new,-U,_clock_unset,-U,_intin,-U,_addmess,-U,_newobject,-U,_setup,-U,_z_add_signalmethod,-U,_object_attr_setsym,-U,_open_dialog,-U,_path_addnamed,-U,_path_createsysfile,-U,_path_getfilemoddate,-U,_path_opensysfile,-U,_path_topotentialname,-U,_sysfile_close,-U,_sysfile_geteof,-U,_sysfile_read,-U,_sysfile_seteof,-U,_sysfile_write,-U,_systime_secondstodate,-U,_qelem_new,-U,_qelem_free,-U,_qelem_set,-U,_jit_class_addadornment,-U,_jit_class_addattr,-U,_jit_class_addmethod,-U,_jit_class_findbyname,-U,_jit_class_new,-U,_jit_class_register,-U,_jit_error_code,-U,_jit_object_alloc,-U,_jit_object_free,-U,_jit_object_new,-U,_jit_object_new_imp,-U,_max_addmethod_usurp_low,-U,_max_jit_attr_args,-U,_max_jit_classex_mop_wrap,-U,_max_jit_classex_setup,-U,_max_jit_classex_standard_wrap,-U,_max_jit_mop_assist,-U,_max_jit_mop_free,-U,_max_jit_mop_getoutputmode,-U,_max_jit_mop_outputmatrix,-U,_max_jit_mop_setup_simple,-U,_max_jit_obex_adornment_get,-U,_max_jit_obex_free,-U,_max_jit_obex_jitob_get,-U,_max_jit_obex_new,-U,_jbox_get_nextobject,-U,_jbox_get_object,-U,_jbox_get_varname,-U,_jpatcher_get_box,-U,_jpatcher_get_firstobject,-U,_object_attr_getnames,-U,_object_attr_getvalueof,-U,_object_new_imp,-U,_object_obex_lookup,-U,_jit_atom_setfloat,-U,_jit_error_sym,-U,_jit_matrix_info_default,-U,_jit_object_findregistered,-U,_jit_symbol_unique,-U,_max_jit_obex_dumpout,-U,_jit_object_detach,-U,_jit_object_attach,-U,_atom_setobj,-U,_gettime,-U,_critical_enter,-U,_critical_exit,-U,_object_attr_setchar,-U,_object_new,-U,_object_warn,-U,_outlet_atoms,-U,_atom_setparse,-U,_class_findbyname,-U,_maxversion,-U,_newinstance,-U,_object_attr_getobj,-U,_object_attr_getsym,-U,_object_classname,-U,_object_method_long,-U,_object_method_parse,-U,_path_topathname,-U,_qelem_unset,-U,_saveas_promptset,-U,_saveasdialog_extended,-U,_setclock_fdelay,-U,_sysmem_copyptr,-U,_systime_ms,-U,_zgetfn,-U,__jit_sym_char,-U,__jit_sym_getdata,-U,__jit_sym_jit_matrix,-U,__jit_sym_setinfo,-U,_jit_object_register,-U,_jit_object_unregister,-U,_class_dspinitjbox,-U,_jbox_notify,-U,_jgraphics_attr_setrgba,-U,_jgraphics_image_surface_create,-U,_jgraphics_image_surface_draw,-U,_jgraphics_image_surface_set_pixel,-U,_jgraphics_line_to,-U,_jgraphics_move_to,-U,_jgraphics_rectangle_fill_fast,-U,_jgraphics_set_line_width,-U,_jgraphics_stroke,-U,_jgraphics_surface_destroy,-U,_notify_free,-U,_sys_getdspstate,-U,_z_jbox_dsp_free,-U,_z_jbox_dsp_setup,-U,_classname_openhelp,-U,_classname_openrefpage,-U,_jbox_getoutlet,-U,_newobject_sprintf,-U,_object_attr_setvalueof,-U,_object_method_sym,-U,_filewatcher_new,-U,_filewatcher_start,-U,_filewatcher_stop,-U,_atom_alloc,-U,_attribute_new_parse,-U,_class_sticky,-U,_class_sticky_clear,-U,_dictionary_read,-U,_jbox_get_textfield,-U,_jbox_set_mousedragdelta,-U,_jdialog_showtext,-U,_jfont_create,-U,_jfont_destroy,-U,_jgraphics_arc,-U,_jgraphics_close_path,-U,_jgraphics_select_font_face,-U,_jgraphics_set_font_size,-U,_jgraphics_show_text,-U,_jpatcher_get_firstview,-U,_jpopupmenu_additem,-U,_jpopupmenu_addseperator,-U,_jpopupmenu_create,-U,_jpopupmenu_destroy,-U,_jpopupmenu_popup,-U,_jpopupmenu_setfont,-U,_linklist_append,-U,_linklist_clear,-U,_linklist_getindex,-U,_linklist_getsize,-U,_linklist_new,-U,_object_addattr_format,-U,_object_attach_byptr_register,-U,_object_attr_setcolor,-U,_object_attr_setobj,-U,_symobject_new,-U,_textfield_get_textmargins,-U,_textfield_set_editonclick,-U,_textfield_set_noactivate,-U,_textfield_set_readonly,-U,_textfield_set_textcolor,-U,_textfield_set_textmargins,-U,_textfield_set_useellipsis,-U,_textfield_set_wordwrap,-U,_jgraphics_line_draw_fast,-U,_jgraphics_rectangle,-U,_jmouse_setposition_view,-U,_atom_gettext,-U,_jgraphics_oval,-U,_jgraphics_set_source_rgb,-U,_jgraphics_set_source_rgba,-U,_jrgba_set,-U,_jpopupmenu_popup_nearbox,-U,_jtextlayout_create,-U,_jtextlayout_destroy,-U,_jtextlayout_draw,-U,_jtextlayout_set,-U,_jtextlayout_settextcolor,-U,__jit_sym_float32,-U,__jit_sym_getindex,-U,__jit_sym_jit_attr_offset,-U,__jit_sym_jit_mop,-U,__jit_sym_lock,-U,_jit_object_error,-U,__jit_sym_jit_attr_offset_array,-U,__jit_sym_long,-U,__jit_sym_symbol,-U,_table_get,-U,_jbox_get_maxclass,-U,_jpatchline_get_box1,-U,_jpatchline_get_box2,-U,_jpatchline_get_inletnum,-U,_jpatchline_get_outletnum,-U,_cpost,-U,_object_error_obtrusive,-U,_gensym_tr,-U,_str_tr,-U,_jit_object_method_imp,-U,_object_method_imp,-U,_buffer_getchannelcount,-U,_buffer_getframecount,-U,_buffer_locksamples,-U,_buffer_ref_getobject,-U,_buffer_ref_new,-U,_buffer_ref_notify,-U,_buffer_ref_set,-U,_buffer_setdirty,-U,_buffer_unlocksamples,-U,_buffer_view,-U,_dictionary_sprintf,-U,_dictionary_appendatoms,-U,_dictionary_new,-U,_dictionary_appenddictionary,-U,_jpatcher_get_parentpatcher,-U,_atom_getlong" )
-
-	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${C74_SYM_LINKER_FLAGS}" PARENT_SCOPE)
-	set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${C74_SYM_LINKER_FLAGS}" PARENT_SCOPE)
-	set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${C74_SYM_LINKER_FLAGS}" PARENT_SCOPE)
-endif() # Todo : find something equivalent for windows
-endFunction()
-

 # This function checks the architectures of a given library on OS X
 function(osx_check_architecture LIBNAME LIBFILE)
@@ -323,7 +256,7 @@
 			return()
 		endif()
 		message("Checking ${LIBFILE} architecture.")
-		execute_process(COMMAND "/usr/bin/file" "${LIBFILE}"
+		execute_process(COMMAND "/usr/bin/file" "${LIBFILE}"
 						OUTPUT_VARIABLE DYLIB_ARCHS)

 		set(${LIBNAME}_DYLIB_ARCHS_MATCH_REQUIRED_ARCHS False PARENT_SCOPE)


Fixes to luahpdf.cmake for travis

Fixes to luahpdf.cmake for travis

--- lib/luahpdf.cmake
+++ lib/luahpdf.cmake
@@ -8,9 +8,9 @@

 ADD_LIBRARY(luahpdf STATIC hpdf.c)

-TARGET_LINK_LIBRARIES(luahpdf PUBLIC ${hpdfs} lua ZLIB::ZLIB PNG::PNG)
+TARGET_LINK_LIBRARIES(luahpdf PUBLIC ${hpdfs} lua ZLIB::ZLIB ${PNG_LIBRARIES})

-TARGET_INCLUDE_DIRECTORIES(luahpdf PUBLIC ${CMAKE_INSTALL_PREFIX}/include)
+TARGET_INCLUDE_DIRECTORIES(luahpdf PUBLIC ${CMAKE_INSTALL_PREFIX}/include ${PNG_INCLUDE_DIRS})

 INSTALL(TARGETS luahpdf EXPORT luahpdf-targets DESTINATION lib)


change and clean up doc output dir

change and clean up doc output dir

In preparation for also generating user-level documentation, change the
output directory of the API/SDK documentation to 'doc/sdk'. As part of
this, clean up the inconsistent specification of said directory in
doxygen.cmake.

--- CMake/doxygen.cmake
+++ CMake/doxygen.cmake
@@ -28,7 +28,7 @@
   )

   set(QT4_EXTRA_TAG_FILE
-    "${visGUI_BINARY_DIR}/doc/qt4-extra.tag" CACHE INTERNAL
+    "${visGUI_BINARY_DIR}/doc/sdk/qt4-extra.tag" CACHE INTERNAL
     "Location of generated file containing additional Doxygen tags for Qt4"
     FORCE
   )
@@ -43,6 +43,7 @@
     set(tag_files)
     set(tag_targets)

+    set(doc_root "${CMAKE_BINARY_DIR}/doc/sdk")
     foreach(tag ${ARGN})
       if("x_${tag}" MATCHES "^x_[Qq][Tt]4?$")
         if(QT4_TAG_FILE)
@@ -57,7 +58,7 @@
         set(tag_file "${QT4_EXTRA_TAG_FILE}")
         set(tag_href "${QT_DOC_DIR}/html")
       else()
-        set(tag_file "${visGUI_BINARY_DIR}/doc/${tag}/${tag}.tag")
+        set(tag_file "${doc_root}/${tag}/${tag}.tag")
         set(tag_href "../${tag}")
       endif()
       list(APPEND tag_files "\"${tag_file}=${tag_href}\"")
@@ -77,7 +78,7 @@
     endif()
     string(REPLACE ";" " " DOXYGEN_INCLUDE_PATHS "${DOXYGEN_INCLUDE_PATHS}")

-    set(doc_dir "${CMAKE_BINARY_DIR}/doc/${name}")
+    set(doc_dir "${doc_root}/${name}")
     set(doxyfile_template "${visGUI_SOURCE_DIR}/CMake/Doxyfile.in")
     set(doxyfile "${doc_dir}/Doxyfile")
     set(doc_css "${visGUI_SOURCE_DIR}/CMake/visgui.css")
@@ -101,37 +102,37 @@
               -D "DOXYGEN_EXTRA_STYLESHEET=${doc_css}"
               -P "${visGUI_SOURCE_DIR}/CMake/doxygen-script.cmake"
       DEPENDS "${doc_dir}" "${doxyfile_template}"
-      WORKING_DIRECTORY "${visGUI_BINARY_DIR}/doc/${name}"
+      WORKING_DIRECTORY "${doc_dir}"
       COMMENT "Generating Doxyfile for ${name}"
     )
     add_custom_target(doxygen-${name}-tag DEPENDS "${doxyfile}.tag")
     add_custom_command(
       TARGET doxygen-${name}-tag
       COMMAND "${DOXYGEN_EXECUTABLE}" "${doxyfile}.tag"
-      WORKING_DIRECTORY "${visGUI_BINARY_DIR}/doc/${name}"
+      WORKING_DIRECTORY "${doc_dir}"
       COMMENT "Creating tags for ${name}"
     )
     add_custom_target(doxygen-${name}
       DEPENDS ${tag_targets} "${doxyfile}.html" "${doc_css}"
       COMMAND "${DOXYGEN_EXECUTABLE}" "${doxyfile}.html"
-      WORKING_DIRECTORY "${visGUI_BINARY_DIR}/doc/${name}"
+      WORKING_DIRECTORY "${doc_dir}"
       COMMENT "Creating documentation for ${name}"
     )
     add_dependencies(doc doxygen-${name})

     if(VISGUI_INSTALL_DOCUMENTATION)
       install(
-        DIRECTORY "${visGUI_BINARY_DIR}/doc/${name}"
-        DESTINATION "share/doc/visgui-${VISGUI_VERSION_STR}/${name}"
+        DIRECTORY "${doc_dir}"
+        DESTINATION "share/doc/visgui-${VISGUI_VERSION_STR}/sdk/${name}"
         COMPONENT documentation
       )
     endif()

     if(QHELPGENERATOR_EXECUTABLE)
-      set(qch_file "${visGUI_BINARY_DIR}/doc/${name}.qch")
+      set(qch_file "${doc_root}/${name}.qch")
       add_custom_target(doxygen-${name}-qch
         COMMAND "${QHELPGENERATOR_EXECUTABLE}" index.qhp -o "${qch_file}"
-        WORKING_DIRECTORY "${visGUI_BINARY_DIR}/doc/${name}"
+        WORKING_DIRECTORY "${doc_dir}"
         DEPENDS doxygen-${name}
         COMMENT "Creating Qt compressed help for ${name}"
       )
@@ -139,7 +140,7 @@

       if(VISGUI_INSTALL_DOCUMENTATION)
         install("${qch_file}"
-          DESTINATION "share/doc/visgui-${VISGUI_VERSION_STR}"
+          DESTINATION "share/doc/visgui-${VISGUI_VERSION_STR}/sdk"
           COMPONENT documentation
         )
       endif()


BUILD: Bump version number

BUILD: Bump version number

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 1)
 set (VV_VERSION_MINOR 1)
-set (VV_VERSION_PATCH 1)
+set (VV_VERSION_PATCH 2)


xcode: use compiler/xcode

xcode: use compiler/xcode

--- xcode.cmake
+++ xcode.cmake
@@ -9,16 +9,15 @@

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_init.cmake")

+set(POLLY_XCODE_COMPILER "clang")
 polly_init(
-    "Xcode / LLVM Standard C++ Library (libc++) / c++11 support"
+    "Xcode / ${POLLY_XCODE_COMPILER} / \
+LLVM Standard C++ Library (libc++) / c++11 support"
     "Xcode"
 )

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake")

-# There is no way to change compiler for Xcode generator so there is no sense
-# to set CMAKE_C_COMPILER/CMAKE_CXX_COMPILER variables here. If you know
-# how to change default compiler that Xcode use please let me know :)
-
+include("${CMAKE_CURRENT_LIST_DIR}/compiler/xcode.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/library/std/libcxx.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake")


ADD mitkRawImageFileReader.cpp

ADD mitkRawImageFileReader.cpp

--- Core/IO/files.cmake
+++ Core/IO/files.cmake
@@ -24,6 +24,7 @@
   mitkPicVolumeTimeSeriesReader.cpp
   mitkPointSetReader.cpp
   mitkPointSetWriter.cpp
+  mitkRawImageFileReader.cpp
   mitkStandardFileLocations.cpp
   mitkSTLFileIOFactory.cpp
   mitkSTLFileReader.cpp


Add EXCLUDE arguments for add_coverage_target_occ

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -182,7 +182,7 @@

     set(options COBERTURA)
     set(one_value_args RUNNER OUTPUT_NAME)
-    set(multi_value_args FILTERS)
+    set(multi_value_args FILTERS EXCLUDE)
     cmake_parse_arguments(arg "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})

     if(NOT arg_RUNNER)
@@ -198,6 +198,15 @@
         endforeach()
     endif()

+    if(arg_EXCLUDE)
+        set(excluded)
+        foreach(_loop IN ITEMS ${arg_EXCLUDE})
+            # OpenCppCoverage requires backslashes
+            file(TO_NATIVE_PATH ${_loop} filter_path)
+            list(APPEND excluded --excluded_sources \"${filter_path}\")
+        endforeach()
+    endif()
+
     set(output_name ${_target})
     if(arg_OUTPUT_NAME)
         set(output_name ${arg_OUTPUT_NAME})
@@ -210,7 +219,7 @@
     endif()

     add_custom_target(${_target}
-        COMMAND ${OPEN_CPP_COVERAGE_EXECUTABLE} ${sources} ${export_type} -- $<TARGET_FILE:${arg_RUNNER}>
+        COMMAND ${OPEN_CPP_COVERAGE_EXECUTABLE} ${sources} ${excluded} ${export_type} -- $<TARGET_FILE:${arg_RUNNER}>
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     )
 endfunction()


Update nvcuvid linker flag

Update nvcuvid linker flag

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -118,7 +118,7 @@
   list(APPEND SCANNER_LIBRARIES
     util_cuda
     "${CUDA_LIBRARIES}"
-    "/usr/lib/x86_64-linux-gnu/libnvcuvid.so"
+    "-lnvcuvid"
     "-lcuda")
 endif()


cmake: hide variables

cmake: hide variables

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -431,4 +431,6 @@
 		  Qt5Widgets_DIR
 		  Qt5_DIR
 		  Qt5DBus_DIR
+		  GPGME_EXECUTABLE
+		  YAEP_LIBRARY_CPP
 		  Qt5Svg_DIR)


add python plugin to ElektraCache

add python plugin to ElektraCache

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -120,6 +120,7 @@
 	augeas
 	journald
 	jni
+	python
 	)

 #