Backup.

Backup.

--- sheaves/component_definitions.cmake
+++ sheaves/component_definitions.cmake
@@ -143,16 +143,15 @@
         # Java ################################################################
         #

-        set(SWIG_CXX_EXTENSION "cxx" CACHE STRING "Swig source file extension")
-        set(CMAKE_SWIG_FLAGS -package bindings.java CACHE STRING "Swig flags")
+       set(SWIG_CXX_EXTENSION "cxx" CACHE STRING "Swig source file extension")
+       set(CMAKE_SWIG_FLAGS -package bindings.java CACHE STRING "Swig flags")

         include_directories(${JDK_INC_DIR} ${JDK_PLATFORM_INC_DIR})
         include_directories(${${COMPONENT}_JAVA_BINDING_SRC_DIR})
         include_directories(${${COMPONENT}_COMMON_BINDING_SRC_DIR})
-
         set_source_files_properties(${${COMPONENT}_JAVA_BINDING_SRC_DIR}/${${COMPONENT}_SWIG_JAVA_INTERFACE} PROPERTIES CPLUSPLUS ON)

-        # Add the java binding library target
+         # Add the java binding library target
         swig_add_module(${${COMPONENT}_JAVA_BINDING_LIB} java ${${COMPONENT}_JAVA_BINDING_SRC_DIR}/${${COMPONENT}_SWIG_JAVA_INTERFACE})

         if(WIN64INTEL OR WIN64MSVC)
@@ -216,10 +215,8 @@
             endif()
         endif()
         set_target_properties(${PROJECT_NAME}_java_binding.jar PROPERTIES FOLDER "Library Jars")
-        mark_as_advanced(FORCE ${COMPONENT}_CLASSPATH)
-
-
-
+        mark_as_advanced(FORCE ${COMPONENT}_CLASSPATH)
+
         #
         # CSharp ##############################################################
         #
@@ -261,7 +258,6 @@
         endif()
         add_dependencies(${${COMPONENT}_CSHARP_BINDING_ASSY} ${${COMPONENT}_CSHARP_BINDING_LIB})
         set_target_properties(${${COMPONENT}_CSHARP_BINDING_ASSY} PROPERTIES FOLDER "CSharp Assembly Targets")
-

         #
         # Python ##############################################################
@@ -299,7 +295,6 @@
         add_dependencies(${PROJECT_NAME}-bindings ${PROJECT_NAME}_java_binding.jar ${${COMPONENT}_PYTHON_BINDING_LIB} ${${COMPONENT}_CSHARP_BINDING_LIB})

     endif()
-
 endfunction(add_bindings_targets)

 #


Fixed openmp linking

Fixed openmp linking

Former-commit-id: 04d9195857cfa57f51d6f5d8ab53af4087083411

--- cmake-modules/FindOpenMP.cmake
+++ cmake-modules/FindOpenMP.cmake
@@ -13,27 +13,28 @@
 endfunction()

-function(check_omp_compiles REQUIRED_FLAGS REQUIRED_LIBRARIES_UNPARSED REQUIRED_INCLUDES)
+function(check_omp_compiles omp_tgt)
+    if(NOT TARGET ${omp_tgt})
+        message(FATAL_ERROR "Given OpenMP target [${omp_tgt}] is not a target")
+    endif()
     include(CheckIncludeFileCXX)
     include(cmake-modules/getExpandedTarget.cmake)
-    expand_target_libs("${REQUIRED_LIBRARIES_UNPARSED}" expanded_libs)
-    expand_target_incs("${REQUIRED_LIBRARIES_UNPARSED}" expanded_incs)
-    expand_target_opts("${REQUIRED_LIBRARIES_UNPARSED}" expanded_opts)
-
-    strip_genex("${expanded_libs}"     expanded_libs)
-    strip_genex("${expanded_incs}"     expanded_incs)
-    strip_genex("${expanded_opts}"     expanded_opts)
-    strip_genex("${REQUIRED_INCLUDES}" REQUIRED_INCLUDES)
-    strip_genex("${REQUIRED_FLAGS}"    REQUIRED_FLAGS)
-
-    set(CMAKE_REQUIRED_LIBRARIES "${expanded_libs}") # Can be a ;list
-    set(CMAKE_REQUIRED_INCLUDES  "${REQUIRED_INCLUDES};${expanded_incs}") # Can be a ;list
-    string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${REQUIRED_FLAGS} ${expanded_opts}") # Needs to be a space-separated list
+    expand_target_libs("${omp_tgt}" omp_lib)
+    expand_target_incs("${omp_tgt}" omp_inc)
+    expand_target_opts("${omp_tgt}" omp_opt)
+    expand_target_defs("${omp_tgt}" omp_def)
+    if(NOT BUILD_SHARED_LIBS)
+        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 TEST COMPILE CMAKE_REQUIRED_FLAGS        ${CMAKE_REQUIRED_FLAGS}")
-        message(STATUS "OPENMP TEST COMPILE CMAKE_REQUIRED_DEFINITIONS  ${CMAKE_REQUIRED_DEFINITIONS}")
-        message(STATUS "OPENMP TEST COMPILE CMAKE_REQUIRED_LIBRARIES    ${CMAKE_REQUIRED_LIBRARIES}")
-        message(STATUS "OPENMP TEST COMPILE CMAKE_REQUIRED_INCLUDES     ${CMAKE_REQUIRED_INCLUDES}")
+        message(STATUS "OPENMP COMPILE TEST required      ${CMAKE_REQUIRED_LIBRARIES}")
+        message(STATUS "OPENMP COMPILE TEST target        ${omp_tgt}")
+        message(STATUS "OPENMP COMPILE TEST libraries     ${omp_lib}")
+        message(STATUS "OPENMP COMPILE TEST options       ${omp_opt}")
+        message(STATUS "OPENMP COMPILE TEST includes      ${omp_inc}")
+        message(STATUS "OPENMP COMPILE TEST definitions   ${omp_def}")
     endif()
     unset(has_omp_h)
     unset(has_omp_h CACHE)
@@ -63,11 +64,16 @@
             }
             " OMP_COMPILES
             )
+    set(OMP_COMPILES ${OMP_COMPILES} PARENT_SCOPE)
     if(NOT OMP_COMPILES)
-        set(OMP_COMPILES FALSE PARENT_SCOPE)
-    else()
-        set(OMP_COMPILES TRUE PARENT_SCOPE)
+        unset(OMP_COMPILES CACHE)
+        unset(OMP_COMPILES PARENT_SCOPE)
+        if(DMRG_PRINT_CHECKS AND EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log")
+            file(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log" ERROR_LOG)
+            message(STATUS "CMakeError.log: \n ${ERROR_LOG}")
+        endif()
     endif()
+
 endfunction()

@@ -80,12 +86,22 @@
     find_package(OpenMP)
     list(APPEND CMAKE_MODULE_PATH ${BACKUP})
     unset(BACKUP)
+    if(OpenMP_FOUND AND TARGET OpenMP::OpenMP_CXX)
+        include (cmake-modules/PrintTargetProperties.cmake)
+        set_target_properties(OpenMP::OpenMP_CXX PROPERTIES INTERFACE_COMPILE_DEFINITIONS "_OPENMP")
+        print_target_properties(OpenMP::OpenMP_CXX)
+        check_omp_compiles(OpenMP::OpenMP_CXX)
+        if(OMP_COMPILES AND TARGET OpenMP::OpenMP_CXX)
+            add_library(openmp::openmp INTERFACE IMPORTED)
+            target_link_libraries(openmp::openmp INTERFACE OpenMP::OpenMP_CXX)
+        endif()
+    endif()
 endif()

 if(NOT OpenMP_FOUND)
-
+    find_package(Threads)
     list(APPEND omp_lib_candidates gomp omp iomp5)
     if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
         # MKL comes with a useable iomp5 library
@@ -111,6 +127,8 @@

         find_library(omp_lib_iomp5 NAMES iomp5
                 PATHS
+                /usr/lib/llvm-11
+                /usr/lib/llvm-10
                 /usr/lib/llvm-9
                 /usr/lib/llvm-8
                 /usr/lib/llvm-7
@@ -128,9 +146,19 @@

     foreach(lib ${omp_lib_candidates})
-        check_omp_compiles("-D_OPENMP" "-static;${lib};pthread;rt;dl" "")
+        # Make a target wrapper for a library
+        if(NOT TARGET openmp::openmp)
+            add_library(openmp::openmp INTERFACE IMPORTED)
+        endif()
+        if(IS_ABSOLUTE lib)
+            set_target_properties(openmp::openmp PROPERTIES IMPORTED_LOCATION ${lib})
+            set_target_properties(openmp::openmp PROPERTIES INTERFACE_LINK_LIBRARIES "Threads::Threads;rt;dl")
+        else()
+            set_target_properties(openmp::openmp PROPERTIES INTERFACE_LINK_LIBRARIES "${lib};Threads::Threads;rt;dl")
+        endif()
+        set_target_properties(openmp::openmp PROPERTIES INTERFACE_COMPILE_DEFINITIONS "_OPENMP")
+        check_omp_compiles(openmp::openmp)
         if(OMP_COMPILES)
-            set(OMP_LIBRARY ${lib})
             break()
         endif()
     endforeach()
@@ -141,12 +169,3 @@
 find_package_handle_standard_args(OpenMP DEFAULT_MSG OMP_COMPILES)

-
-if(OMP_COMPILES AND NOT TARGET openmp::openmp)
-    add_library(openmp::openmp INTERFACE IMPORTED)
-    target_link_libraries(openmp::openmp INTERFACE ${OMP_LIBRARY} Threads::Threads rt dl)
-    target_compile_definitions(openmp::openmp INTERFACE -D_OPENMP)
-elseif(TARGET OpenMP::OpenMP_CXX)
-    add_library(openmp::openmp INTERFACE IMPORTED)
-    target_link_libraries(openmp::openmp INTERFACE OpenMP::OpenMP_CXX)
-endif()


[cmake] Add proper copyright licence to AddUninstallTarget.cmake file

--- cmake/AddUninstallTarget.cmake
+++ cmake/AddUninstallTarget.cmake
@@ -18,15 +18,35 @@
 # Copyright 2013  iCub Facility, Istituto Italiano di Tecnologia
 #     @author Daniele E. Domenichelli <daniele.domenichelli@iit.it>
 #
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
 #
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
+# * Redistributions of source code must retain the above copyright
+#  notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#  notice, this list of conditions and the following disclaimer in the
+#  documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+#  nor the names of their contributors may be used to endorse or promote
+#  products derived from this software without specific prior written
+#  permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "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 COPYRIGHT
+# HOLDER OR CONTRIBUTORS 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.
+#
 #=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)

 if(DEFINED __ADD_UNINSTALL_TARGET_INCLUDED)


ability to enable OpenMP simultaneously with other parallel framework

--- cmake/OpenCVFindLibsPerf.cmake
+++ cmake/OpenCVFindLibsPerf.cmake
@@ -93,8 +93,25 @@
   set(HAVE_CSTRIPES 0)
 endif()

+# --- GCD ---
+if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
+  set(HAVE_GCD 1)
+else()
+  set(HAVE_GCD 0)
+endif()
+
+# --- Concurrency ---
+if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
+  set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
+  file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
+  try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
+  file(REMOVE "${_fname}")
+else()
+  set(HAVE_CONCURRENCY 0)
+endif()
+
 # --- OpenMP ---
-if(WITH_OPENMP AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
+if(WITH_OPENMP)
   find_package(OpenMP)
   if(OPENMP_FOUND)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
@@ -102,20 +119,3 @@
   endif()
   set(HAVE_OPENMP "${OPENMP_FOUND}")
 endif()
-
-# --- GCD ---
-if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
-  set(HAVE_GCD 1)
-else()
-  set(HAVE_GCD 0)
-endif()
-
-# --- Concurrency ---
-if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
-  set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
-  file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
-  try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
-  file(REMOVE "${_fname}")
-else()
-  set(HAVE_CONCURRENCY 0)
-endif()


fixed linking CLP in the case of MinGW (patch #1872)

--- cmake/OpenCVFindLibsPerf.cmake
+++ cmake/OpenCVFindLibsPerf.cmake
@@ -67,7 +67,11 @@
       if(UNIX)
         set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} Clp CoinUtils m)
       else()
-        set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} libClp libCoinUtils)
+        if(MINGW)
+            set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} Clp CoinUtils)
+        else()
+            set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} libClp libCoinUtils)
+        endif()
       endif()
       set(HAVE_CLP TRUE)
     endif()


Python install once again

Python install once again

--- cmake/PythonInstallSetup.cmake
+++ cmake/PythonInstallSetup.cmake
@@ -82,12 +82,10 @@
     configure_file(fake/__init__.py tmp/fake/__init__.py)
     configure_file(find_python_install.py tmp/find_python_install.py)
     execute_process(
-      COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/tmp/
       COMMAND ${PYTHON_EXECUTABLE} find_python_install.py
       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tmp/
       OUTPUT_VARIABLE PY_INSTALL_DIR)
   endif()
-  assert(PY_INSTALL_DIR)
   string(STRIP ${PY_INSTALL_DIR} PY_INSTALL_DIR)
   set(SICONOS_PYTHON_INSTALL_DIR ${PY_INSTALL_DIR}
     CACHE PATH "Install directory for python bindings." FORCE)


do not require -Ofast for GNU

do not require -Ofast for GNU

--- cmake/compilers/CXXFlags.cmake
+++ cmake/compilers/CXXFlags.cmake
@@ -16,7 +16,9 @@
 if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
     set(CMAKE_CXX_FLAGS         "-Wall -Wno-unknown-pragmas -Wno-sign-compare -Woverloaded-virtual -Wwrite-strings -Wno-unused")
     set(CMAKE_CXX_FLAGS_DEBUG   "-O0 -g3")
-    set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -march=native")
+  # # radovan: problem on OSX
+  # set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -march=native")
+    set(CMAKE_CXX_FLAGS_RELEASE "-O3")
     if(ENABLE_OMP)
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
     endif()


added comment to list_append_unique to justify its use over vanilla cmake

--- cmake/list_append_unique.cmake
+++ cmake/list_append_unique.cmake
@@ -1,8 +1,15 @@
+#
+# Append elements to a list if they are not already in the list.
+#
+# .. note:: Using CMake's ``list(APPEND ..)`` and
+#   ``list(REMOVE_DUPLICATES ..)`` since its implementation uses a
+#   set internally which make the operation unstable.
+#
 macro(list_append_unique listname)
-  foreach(item ${ARGN})
-    list(FIND ${listname} ${item} _index)
+  foreach(_item ${ARGN})
+    list(FIND ${listname} ${_item} _index)
     if(_index EQUAL -1)
-      list(APPEND ${listname} ${item})
+      list(APPEND ${listname} ${_item})
     endif()
   endforeach()
 endmacro()


[cmake] look for eigen in local/include

[cmake] look for eigen in local/include

Discovery of eigen3 was brokn for me. Although pkg-config would find the
local eigen3 installation pkg_check_modules would not find it. Since the
FindEigen3.cmake does support hints fora dditional search dirs I hardcoded
the additional location which is currently used by out setup.

--- cmake/modules/FindEigen3.cmake
+++ cmake/modules/FindEigen3.cmake
@@ -65,6 +65,7 @@
       PATHS
       ${CMAKE_INSTALL_PREFIX}/include
       ${KDE4_INCLUDE_DIR}
+      ${PROJECT_SOURCE_DIR}/../local/include
       PATH_SUFFIXES eigen3 eigen
     )


Add message indicating we're building Python from source

If we are building Python from source, that is.

--- cmake/modules/FindPython.cmake
+++ cmake/modules/FindPython.cmake
@@ -7,6 +7,7 @@
 	if(WIN32)
 		message(WARNING "Building Python on Windows is not supported at the moment. You will probably run into problems.")
 	endif()
+	message(STATUS "Building Python from source.")
 	include(ExternalProject)
 	ExternalProject_Add(Python
 		URL https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz


Fix Qt URLs (#103)

Fix Qt URLs (#103)

--- cmake/projects/Qt/hunter.cmake
+++ cmake/projects/Qt/hunter.cmake
@@ -233,7 +233,7 @@
     VERSION
     "5.10.1"
     URL
-    "http://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
+    "http://download.qt.io/archive/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
     SHA1
     3d71e887287bdea664ac6f8db4aaa4a7d913be59
 )
@@ -244,7 +244,7 @@
     VERSION
     "5.11.1"
     URL
-    "http://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz"
+    "http://download.qt.io/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz"
     SHA1
     0ac866442a960d4038a51ba3096b2cc5d796b5ee
 )
@@ -255,7 +255,7 @@
     VERSION
     "5.11.3"
     URL
-    "https://download.qt.io/official_releases/qt/5.11/5.11.3/single/qt-everywhere-src-5.11.3.tar.xz"
+    "https://download.qt.io/archive/qt/5.11/5.11.3/single/qt-everywhere-src-5.11.3.tar.xz"
     SHA1
     3f6c0df4fa7524ed11557ed55db35ef551cd2782
 )
@@ -266,7 +266,7 @@
     VERSION
     "5.12.3"
     URL
-    "https://download.qt.io/official_releases/qt/5.12/5.12.3/single/qt-everywhere-src-5.12.3.tar.xz"
+    "https://download.qt.io/archive/qt/5.12/5.12.3/single/qt-everywhere-src-5.12.3.tar.xz"
     SHA1
     cf1bbdf0e69a651a67738e9b3e616e0dd9cf3087
 )


PARQUET-945: Thrift static libraries are not used with recent patch

Author: Deepak Majeti <deepak.majeti@hpe.com>

Closes #290 from majetideepak/PARQUET-945 and squashes the following commits:

875da78 [Deepak Majeti] remove thrift shared library detection
0ce8623 [Deepak Majeti] Fix static library resolution

--- cmake_modules/FindThrift.cmake
+++ cmake_modules/FindThrift.cmake
@@ -25,7 +25,7 @@
 #  THRIFT_VERSION, version string of ant if found
 #  THRIFT_INCLUDE_DIR, where to find THRIFT headers
 #  THRIFT_CONTRIB_DIR, where contrib thrift files (e.g. fb303.thrift) are installed
-#  THRIFT_LIBS, THRIFT libraries
+#  THRIFT_STATIC_LIB, THRIFT static library
 #  THRIFT_FOUND, If false, do not try to use ant

 # prefer the thrift version supplied in THRIFT_HOME
@@ -48,15 +48,8 @@
   NO_DEFAULT_PATH
 )

-find_library(THRIFT_STATIC_LIB
+find_library(THRIFT_STATIC_LIB NAMES
   ${CMAKE_STATIC_LIBRARY_PREFIX}thrift${CMAKE_STATIC_LIBRARY_SUFFIX}
-  HINTS ${_thrift_roots}
-  NO_DEFAULT_PATH
-  PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib"
-)
-
-find_library(THRIFT_LIB NAMES
-  ${CMAKE_SHARED_LIBRARY_PREFIX}thrift${CMAKE_SHARED_LIBRARY_SUFFIX}
   HINTS ${_thrift_roots}
   NO_DEFAULT_PATH
   PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib"
@@ -68,9 +61,8 @@
   PATH_SUFFIXES "bin"
 )

-if (THRIFT_LIB)
+if (THRIFT_STATIC_LIB)
   set(THRIFT_FOUND TRUE)
-  set(THRIFT_LIBS ${THRIFT_LIB})
   exec_program(${THRIFT_COMPILER}
     ARGS -version OUTPUT_VARIABLE THRIFT_VERSION RETURN_VALUE THRIFT_RETURN)
 else ()
@@ -84,12 +76,12 @@
 else ()
   message(STATUS "Thrift compiler/libraries NOT found. "
           "Thrift support will be disabled (${THRIFT_RETURN}, "
-          "${THRIFT_INCLUDE_DIR}, ${THRIFT_LIB})")
+          "${THRIFT_INCLUDE_DIR}, ${THRIFT_STATIC_LIB})")
 endif ()

 mark_as_advanced(
-  THRIFT_LIB
+  THRIFT_STATIC_LIB
   THRIFT_COMPILER
   THRIFT_INCLUDE_DIR
 )


Update ITK superbuild version to v5.2.0 tag

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -61,7 +61,7 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(_DEFAULT_ITK_GIT_TAG "22ca5dd83dc3ed0f6cebdc4dc82273f1068ef36e") # After 5.2rc3 tag
+set(_DEFAULT_ITK_GIT_TAG "v5.2.0")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


STYLE: Update vtk superbuild to use qt5

STYLE: Update vtk superbuild to use qt5

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -128,7 +128,7 @@
         -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
         )
     endif()
-    find_package(Qt4 REQUIRED)
+    find_package(Qt5 COMPONENTS Core Widgets Svg OpenGL REQUIRED)
   else()
     set(VTK_QT_ARGS
         -DVTK_USE_GUISUPPORT:BOOL=OFF


- Fix toolchain for Gamecube

- Fix toolchain for Gamecube

--- toolchain/cmake/Toolchains/none-cube-powerpc-eabi_linux.toolchain.cmake
+++ toolchain/cmake/Toolchains/none-cube-powerpc-eabi_linux.toolchain.cmake
@@ -26,7 +26,7 @@
 set ( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )

 set ( CMAKE_EXE_LINKER_FLAGS
-    "${CMAKE_EXE_LINKER_FLAGS} -I$ENV{PPCPORTLIBS_CUBE}/include -L$ENV{PPCPORTLIBS_CUBE}/lib -logc -lm"
+    "${CMAKE_EXE_LINKER_FLAGS} -I$ENV{PPCPORTLIBS_CUBE}/include -L$ENV{PPCPORTLIBS_CUBE}/lib/cube -logc -lm"
     CACHE STRING ""
     )


Fix for windows + develop.py:  Use pscp on windows instead of scp.

This also requires a putty session to be created, same as we do for svn.

--- indra/cmake/FindSCP.cmake
+++ indra/cmake/FindSCP.cmake
@@ -12,7 +12,11 @@
 #   SCP_BATCH_FLAG - how to put scp/pscp into batch mode

 SET(SCP_EXECUTABLE)
-FIND_PROGRAM(SCP_EXECUTABLE NAMES scp scp.exe pscp pscp.exe)
+IF (WINDOWS)
+  FIND_PROGRAM(SCP_EXECUTABLE NAMES pscp pscp.exe)
+ELSE (WINDOWS)
+  FIND_PROGRAM(SCP_EXECUTABLE NAMES scp scp.exe)
+ENDIF (WINDOWS)

 IF (SCP_EXECUTABLE)
   SET(SCP_FOUND ON)


fix sporadic build error on Win10 by unpacking the indi libs at cmake-time rather than at build time

--- thirdparty/thirdparty.cmake
+++ thirdparty/thirdparty.cmake
@@ -620,14 +620,11 @@
   set(indi_zip ${CMAKE_SOURCE_DIR}/thirdparty/indiclient-44aaf5d3-win32.zip)
   set(indiclient_root ${thirdparties_deflate_directory})
   set(indiclient_dir ${indiclient_root}/indiclient)
-  add_custom_target(unzip_indi ALL)
-  add_custom_command(TARGET unzip_indi PRE_BUILD
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${indiclient_dir}
-    COMMAND ${CMAKE_COMMAND} -E tar xvf ${indi_zip} --format=zip
-    WORKING_DIRECTORY ${indiclient_root}
-    DEPENDS ${indi_zip}
-    COMMENT "Unpacking INDI Client sources"
-    VERBATIM)
+  if(NOT EXISTS ${indiclient_dir})
+    message(STATUS "[thirdparty] untarring indiclient")
+    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${indi_zip}
+                    WORKING_DIRECTORY ${indiclient_root})
+  endif()
   include_directories(${indiclient_dir}/include)
   set(PHD_LINK_EXTERNAL_RELEASE ${PHD_LINK_EXTERNAL_RELEASE} ${indiclient_dir}/lib/indiclient.lib)
   set(PHD_LINK_EXTERNAL_DEBUG ${PHD_LINK_EXTERNAL_DEBUG} ${indiclient_dir}/lib/indiclientd.lib)


Make iree-benchmark-suites buildable with some backends disabled. (#10508)

Note: the reason why iree-test-deps wasn't failing similarly was that
`iree_single_backend_generated_trace_runner_test` and
`iree_check_single_backend_test_suite` were already performing a similar
check, but they do it on the `DRIVER`, not on the `TARGET_BACKEND`. They
can do so because these targets are built in the device build dir, where
`IREE_HAL_DRIVER_*` variables are set and drivers are built, because
drivers are part of the runtime, so they're built in the device build
dir.

Unlike those targets, `iree-benchmark-suites` is built in the host build
dir, so we shouldn't enable or disable benchmarks based on
`IREE_HAL_DRIVER_*` here. Instead, what is relevant (and to the point of
fixing the module compile error that caused me to look into this) is a
check on `IREE_TARGET_BACKEND_*`.

Possibly these could be unified by switching also `iree-test-deps` to
this `IREE_TARGET_BACKEND_*` check.

--- build_tools/cmake/iree_benchmark_suite.cmake
+++ build_tools/cmake/iree_benchmark_suite.cmake
@@ -185,6 +185,19 @@
     "BENCHMARK_MODES;BENCHMARK_TOOL;MODULES"
   )

+  # Try to check if the compiler supports the TARGET_BACKEND. If
+  # IREE_HOST_BINARY_ROOT is defined, we are using a compiler binary, in which
+  # case we can't check it's supported backend just by looking at this build
+  # dir's cmake variables --- we would have to implement a configure-check
+  # executing that compiler.
+  if (NOT DEFINED IREE_HOST_BINARY_ROOT)
+    string(TOUPPER ${_RULE_TARGET_BACKEND} _UPPERCASE_TARGET_BACKEND)
+    string(REPLACE "-" "_" _NORMALIZED_TARGET_BACKEND ${_UPPERCASE_TARGET_BACKEND})
+    if(NOT IREE_TARGET_BACKEND_${_NORMALIZED_TARGET_BACKEND})
+      return()
+    endif()
+  endif()
+
   iree_package_name(_PACKAGE_NAME)

   # Add the benchmark suite target.


add_partially_linked_object: Replaced nonexistent MESSAGE option in
add_custom_command with COMMENT. It was forcing unconditional command
execution.

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

--- cmake/modules/AddPartiallyLinkedObject.cmake
+++ cmake/modules/AddPartiallyLinkedObject.cmake
@@ -8,7 +8,7 @@
     set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/temp_lib)
     add_library( ${lib} STATIC ${ARGN})
     add_custom_command(OUTPUT ${pll}
-      MESSAGE "Building ${lib}.o..."
+      COMMENT "Building ${lib}.o..."
       DEPENDS ${lib}
       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/temp_lib
       COMMAND ar x ${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}


Find DBus: Reformat CMake code

Find DBus: Reformat CMake code

--- cmake/Modules/FindDBus.cmake
+++ cmake/Modules/FindDBus.cmake
@@ -1,3 +1,4 @@
+# ~~~
 # - Try to find the low-level D-Bus library
 # Once done this will define
 #
@@ -5,68 +6,62 @@
 #  DBUS_INCLUDE_DIR - the D-Bus include directory
 #  DBUS_ARCH_INCLUDE_DIR - the D-Bus architecture-specific include directory
 #  DBUS_LIBRARIES - the libraries needed to use D-Bus
+# ~~~

+# ~~~
 # Copyright (c) 2008, Kevin Kofler, <kevin.kofler@chello.at>
 # modeled after FindLibArt.cmake:
 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# ~~~

 if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)

-  # in cache already
-  SET(DBUS_FOUND TRUE)
+	# in cache already
+	set (DBUS_FOUND TRUE)

 else (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)

-  IF (NOT WIN32)
-    FIND_PACKAGE(PkgConfig)
-    IF (PKG_CONFIG_FOUND)
-      # use pkg-config to get the directories and then use these values
-      # in the FIND_PATH() and FIND_LIBRARY() calls
-      pkg_check_modules(_DBUS_PC QUIET dbus-1)
-    ENDIF (PKG_CONFIG_FOUND)
-  ENDIF (NOT WIN32)
+	if (NOT WIN32)
+		find_package (PkgConfig)
+		if (PKG_CONFIG_FOUND)

-  FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h
-    ${_DBUS_PC_INCLUDE_DIRS}
-    /usr/include
-    /usr/include/dbus-1.0
-    /usr/local/include
-  )
+			# use pkg-config to get the directories and then use these values
+			# in the FIND_PATH() and FIND_LIBRARY() calls
+			pkg_check_modules (_DBUS_PC QUIET dbus-1)
+		endif (PKG_CONFIG_FOUND)
+	endif (NOT WIN32)

-  FIND_PATH(DBUS_ARCH_INCLUDE_DIR dbus/dbus-arch-deps.h
-    ${_DBUS_PC_INCLUDE_DIRS}
-    /usr/lib${LIB_SUFFIX}/include
-    /usr/lib${LIB_SUFFIX}/dbus-1.0/include
-    /usr/lib64/include
-    /usr/lib64/dbus-1.0/include
-    /usr/lib/include
-    /usr/lib/dbus-1.0/include
-  )
+	find_path (DBUS_INCLUDE_DIR dbus/dbus.h ${_DBUS_PC_INCLUDE_DIRS} /usr/include /usr/include/dbus-1.0 /usr/local/include)

-  FIND_LIBRARY(DBUS_LIBRARIES NAMES dbus-1 dbus
-    PATHS
-     ${_DBUS_PC_LIBDIR}
-  )
+	find_path (DBUS_ARCH_INCLUDE_DIR
+		   dbus/dbus-arch-deps.h
+		   ${_DBUS_PC_INCLUDE_DIRS}
+		   /usr/lib${LIB_SUFFIX}/include
+		   /usr/lib${LIB_SUFFIX}/dbus-1.0/include
+		   /usr/lib64/include
+		   /usr/lib64/dbus-1.0/include
+		   /usr/lib/include
+		   /usr/lib/dbus-1.0/include)

+	find_library (DBUS_LIBRARIES NAMES dbus-1 dbus PATHS ${_DBUS_PC_LIBDIR})

-  if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
-     set(DBUS_FOUND TRUE)
-  endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+	if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+		set (DBUS_FOUND TRUE)
+	endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)

+	if (DBUS_FOUND)
+		if (NOT DBus_FIND_QUIETLY)
+			message (STATUS "Found D-Bus: ${DBUS_LIBRARIES}")
+		endif (NOT DBus_FIND_QUIETLY)
+	else (DBUS_FOUND)
+		if (DBus_FIND_REQUIRED)
+			message (FATAL_ERROR "Could NOT find D-Bus")
+		endif (DBus_FIND_REQUIRED)
+	endif (DBUS_FOUND)

-  if (DBUS_FOUND)
-     if (NOT DBus_FIND_QUIETLY)
-        message(STATUS "Found D-Bus: ${DBUS_LIBRARIES}")
-     endif (NOT DBus_FIND_QUIETLY)
-  else (DBUS_FOUND)
-     if (DBus_FIND_REQUIRED)
-        message(FATAL_ERROR "Could NOT find D-Bus")
-     endif (DBus_FIND_REQUIRED)
-  endif (DBUS_FOUND)
-
-  MARK_AS_ADVANCED(DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES)
+	mark_as_advanced (DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES)

 endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)


Minor adjustments to sketch processing

Minor adjustments to sketch processing

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -1109,6 +1109,7 @@

         generate_cpp_from_sketch("${MAIN_SKETCH}" "${SKETCH_SOURCES}" "${SKETCH_CPP}")

+        include_directories(${SKETCH_PATH})
         # Regenerate build system if sketch changes
         add_custom_command(OUTPUT ${SKETCH_CPP}
                            COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}
@@ -1170,7 +1171,7 @@
     foreach(SKETCH_SOURCE_PATH ${SKETCH_SOURCES} ${MAIN_SKETCH_PATH})
         #message(STATUS "Sketch: ${SKETCH_SOURCE_PATH}")
         file(READ ${SKETCH_SOURCE_PATH} SKETCH_SOURCE)
-        string(REGEX MATCHALL "[\n]([a-zA-Z]+[ ])*[_a-zA-Z0-9]+([ ]*[\n][\t]*|[ ])[_a-zA-Z0-9]+[ ]?[\n]?[\t]*[ ]*[(]([\t]*[ ]*[*]?[ ]?[a-zA-Z0-9_](\\[([0-9]+)?\\])*[,]?[ ]*[\n]?)*([,]?[ ]*[\n]?[.][.][.])?[)]([ ]*[\n][\t]*|[ ]){" SKETCH_PROTOTYPES ${SKETCH_SOURCE})
+        string(REGEX MATCHALL "[\n]([a-zA-Z]+[ ])*[_a-zA-Z0-9]+([ ]*[\n][\t]*|[ ])[_a-zA-Z0-9]+[ ]?[\n]?[\t]*[ ]*[(]([\t]*[ ]*[*]?[ ]?[a-zA-Z0-9_](\\[([0-9]+)?\\])*[,]?[ ]*[\n]?)*([,]?[ ]*[\n]?[.][.][.])?[)]([ ]*[\n][\t]*|[ ]|[\n])*{" SKETCH_PROTOTYPES ${SKETCH_SOURCE})

         # Write function prototypes
         file(APPEND ${SKETCH_CPP} "\n//=== START Forward: ${SKETCH_SOURCE_PATH}\n")


CMake: don't eliminate dependencies on SwiftPrivate
... when building the overlay separately

We required this hack previously because we were not rebuilding
SwiftPrivate as a part of the overlay.

Swift SVN r28554

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1177,7 +1177,7 @@
   if((NOT "${SWIFT_BUILD_STDLIB}") AND
      (NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS}" STREQUAL ""))
     list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
-        Core SwiftPrivate)
+        Core)
   endif()

   translate_flags(SWIFTLIB "${SWIFTLIB_options}")
@@ -1580,7 +1580,7 @@

   if(NOT "${SWIFT_BUILD_STDLIB}")
     list(REMOVE_ITEM SWIFTEXE_TARGET_LINK_FAT_LIBRARIES
-        swiftCore swiftSwiftPrivate)
+        swiftCore)
   endif()

   foreach(sdk ${SWIFT_SDKS})


build: remove outdated documentation (NFC)

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1353,11 +1353,8 @@
 #   add_swift_host_library(name
 #     [SHARED]
 #     [STATIC]
-#     [SWIFT_MODULE_DEPENDS dep1 ...]
 #     [LLVM_COMPONENT_DEPENDS comp1 ...]
 #     [FILE_DEPENDS target1 ...]
-#     [INSTALL]
-#     INSTALL_IN_COMPONENT comp
 #     source1 [source2 source3 ...])
 #
 # name
@@ -1374,9 +1371,6 @@
 #
 # FILE_DEPENDS
 #   Additional files this library depends on.
-#
-# INSTALL_IN_COMPONENT comp
-#   The Swift installation component that this library belongs to.
 #
 # source1 ...
 #   Sources to add into this library.


Fixed boost-cpp>1.68 for linux

Fixed boost-cpp>1.68 for linux

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -46,9 +46,15 @@
  else ()
      if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "^(Apple)?Clang$")
          set(TUDAT_BUILD_CLANG ON)
+         set(TUDAT_BUILD_GNU OFF)
+         set(TUDAT_BUILD_MSVC OFF)
      elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+         set(TUDAT_BUILD_CLANG OFF)
          set(TUDAT_BUILD_GNU ON)
+         set(TUDAT_BUILD_MSVC OFF)
      elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+         set(TUDAT_BUILD_CLANG OFF)
+         set(TUDAT_BUILD_GNU OFF)
          set(TUDAT_BUILD_MSVC ON)
      endif ()
  endif ()


Add note regarding interface libraries (#339)

Signed-off-by: Bjar Ne <2e665755474b96a4fedf1e722325f080cc4a057e@users.noreply.github.com>

Co-authored-by: Bjar Ne <2e665755474b96a4fedf1e722325f080cc4a057e@users.noreply.github.com>

--- ament_cmake_export_libraries/cmake/ament_export_libraries.cmake
+++ ament_cmake_export_libraries/cmake/ament_export_libraries.cmake
@@ -18,6 +18,7 @@
 # :param ARGN: a list of libraries.
 #   Each element might either be an absolute path to a library, a
 #   CMake library target, or a CMake imported libary target.
+#   Note that this macro is not needed for interface library targets.
 #   If a plain library name is passed it will be redirected to
 #   ament_export_library_names().
 # :type ARGN: list of strings


version bump

version bump

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,4 +1,4 @@
 set (LIBDNF_MAJOR_VERSION 0)
 set (LIBDNF_MINOR_VERSION 12)
-set (LIBDNF_MICRO_VERSION 0)
+set (LIBDNF_MICRO_VERSION 1)
 set (LIBDNF_VERSION ${LIBDNF_MAJOR_VERSION}.${LIBDNF_MINOR_VERSION}.${LIBDNF_MICRO_VERSION})


Fix ASIO setup for Jenkins (again)

Fix ASIO setup for Jenkins (again)

--- cmake/jenkins.cmake
+++ cmake/jenkins.cmake
@@ -1,14 +1,14 @@
 set(LABEL_EXPR "$ENV{label_exp}")
 if ("${LABEL_EXPR}" MATCHES "gcc")
   message(STATUS "Set CXX to g++ based on label_expr content")
-  set(CMAKE_C_COMPILER "gcc" CACHE PATH "c++ compiler option")
-  set(CMAKE_CXX_COMPILER "g++" CACHE PATH "c++ compiler option")
+  set(CMAKE_C_COMPILER "gcc" CACHE PATH "C compiler option")
+  set(CMAKE_CXX_COMPILER "g++" CACHE PATH "C++ compiler option")
 elseif ("${LABEL_EXPR}" MATCHES "clang")
   message(STATUS "Set CXX to clang++ based on label_expr content")
-  set(CMAKE_C_COMPILER "clang" CACHE STRING "c++ compiler option")
-  set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "c++ compiler option")
+  set(CMAKE_C_COMPILER "clang" CACHE STRING "C compiler option")
+  set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "C++ compiler option")
 endif()
 if ("${LABEL_EXPR}" MATCHES "asio")
   message(STATUS "Set define to use boost asio for the multiplexer")
-  set(CAF_USE_ASIO yes)
+  set(CAF_USE_ASIO yes CACHE STRING "Enable ASIO in CAF")
 endif()


Update library cmake script to disable red-zone

--- cmake/library.cmake
+++ cmake/library.cmake
@@ -37,7 +37,7 @@
 # Various global defines
 # * OS_TERMINATE_ON_CONTRACT_VIOLATION provides classic assert-like output from Expects / Ensures
 # * _GNU_SOURCE enables POSIX-extensions in newlib, such as strnlen. ("everything newlib has", ref. cdefs.h)
-set(CAPABS "${CAPABS} -fstack-protector-strong -DOS_TERMINATE_ON_CONTRACT_VIOLATION -D_GNU_SOURCE")
+set(CAPABS "${CAPABS} -mno-red-zone -fstack-protector-strong -DOS_TERMINATE_ON_CONTRACT_VIOLATION -D_GNU_SOURCE")
 set(WARNS  "-Wall -Wextra") #-pedantic

 # configure options


Fix inverted logic in profile.cmake

Fix inverted logic in profile.cmake

--- cmake/profile.cmake
+++ cmake/profile.cmake
@@ -1,6 +1,6 @@
 check_library_exists (gcov __gcov_flush  ""  HAVE_GCOV)

-if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
     set(ENABLE_GCOV_DEFAULT ON)
 else()
     set(ENABLE_GCOV_DEFAULT OFF)


Added Doxyfile configuration to update the version number

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -15,3 +15,7 @@
 set(PROJECT_VERSION
     "${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}.${FL_BUILD_VERSION}")

+# update version in documentation config
+configure_file(
+    ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
+    ${PROJECT_BINARY_DIR}/Doxyfile @ONLY)


add config header definition

add config header definition

--- modules/CMakeMacro.cmake
+++ modules/CMakeMacro.cmake
@@ -24,6 +24,11 @@
 	if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/matcha/${name}/bits/")
 		file(GLOB bits_headers "include/matcha/${name}/bits/*.hpp")
 		install(FILES ${bits_headers} DESTINATION "include/matcha/${name}/bits")
+	endif()
+	if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/include/matcha/${name}/config.hpp")
+		install(FILES
+			${CMAKE_CURRENT_BINARY_DIR}/include/matcha/${name}/config.hpp
+			DESTINATION "include/matcha/${name}")
 	endif()
 endmacro()


working on cuda

working on cuda

--- util/cmake/load_cuda.cmake
+++ util/cmake/load_cuda.cmake
@@ -6,7 +6,7 @@
 	set(CUDA_PROPAGATE_HOST_FLAGS off) # if flags are passed with -Xcompiler, they also affect NVCC which doesn't understand all g++ flags we use
 	set(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER}) # without this, cc is used instead of CC and all include paths have to be specified manually
 	string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPER)
-	set(CUDA_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lssl -lcusparse -Wno-vla ${CMAKE_CXX_FLAGS_${BUILD_TYPE_UPPER}}") # add flags specific to build type
+	set(CUDA_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -lssl -lcusparse -Wno-vla ${CMAKE_CXX_FLAGS_${BUILD_TYPE_UPPER}}") # add flags specific to build type
 	string(REPLACE "-std=c++11" "" CUDA_CXX_FLAGS ${CUDA_CXX_FLAGS}) # remove C++11 from options
 	string(REPLACE "-std=c++0x" "" CUDA_CXX_FLAGS ${CUDA_CXX_FLAGS}) # remove C++0x from options
 	string(REPLACE "-Wall" "" CUDA_CXX_FLAGS ${CUDA_CXX_FLAGS}) # remove Wall from options


Removed SnapCI (EOL).

Removed SnapCI (EOL).

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -118,9 +118,6 @@
 elseif(DEFINED ENV{SHIPPABLE})
     set(CTEST_SITE "Shippable CI")
     set(CTEST_SOURCE_DIRECTORY "$ENV{SHIPPABLE_REPO_DIR}")
-elseif(DEFINED ENV{SNAP_CI})
-    set(CTEST_SITE "Snap CI")
-    set(CTEST_SOURCE_DIRECTORY "$ENV{SNAP_WORKING_DIR}")
 elseif(DEFINED ENV{TRAVIS})
     set(CTEST_SITE "Travis CI")
     set(CTEST_SOURCE_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}")


ffmpeg: update 3.3.4

ffmpeg: update 3.3.4

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,8 +1,8 @@
-# Binary branch name: ffmpeg/master_20170704
-# Binaries were created for OpenCV: f670a9927026629a4083e05a1612f0adcad7727e
-set(FFMPEG_BINARIES_COMMIT "a86e53eb35737a50e5100e26af3aa1d29e810890")
-set(FFMPEG_FILE_HASH_BIN32 "79c35cc654778e66237444bc562afbca")
-set(FFMPEG_FILE_HASH_BIN64 "0dc72775ec3c14d1e049f51dc1280dbb")
+# Binary branch name: ffmpeg/master_20171009
+# Binaries were created for OpenCV: 8ac2c5d620b467d3f22802e96c88ddde6da707af
+set(FFMPEG_BINARIES_COMMIT "66b1fed06cf3510235f367f96aa26da5cb234a15")
+set(FFMPEG_FILE_HASH_BIN32 "3ae76b105113d944984b2351c61e21c6")
+set(FFMPEG_FILE_HASH_BIN64 "cf3bb5bc9d393b022ea7a42eb63e794d")
 set(FFMPEG_FILE_HASH_CMAKE "ec59008da403fb18ab3c1ed66aed583b")

 function(download_win_ffmpeg script_var)


- name of expat library changed in current libexpat soruces

--- cmake-set-dependencies.cmake
+++ cmake-set-dependencies.cmake
@@ -1,3 +1,8 @@
+# Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
+# University of Virginia, University of Heidelberg, and University
+# of Connecticut School of Medicine.
+# All rights reserved.
+
 # Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
 # Properties, Inc., University of Heidelberg, and University of
 # of Connecticut School of Medicine.
@@ -111,13 +116,13 @@
 set (LIBEXPAT_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "expat include directory" FORCE)
 endif()
 if (NOT EXISTS ${LIBEXPAT_LIBRARY})
-set (LIBEXPAT_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/expat.lib CACHE FILEPATH "expat library" FORCE)
+set (LIBEXPAT_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libexpat.lib CACHE FILEPATH "expat library" FORCE)
 endif()
 if (NOT EXISTS ${EXPAT_INCLUDE_DIR})
 set (EXPAT_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "expat include directory" FORCE)
 endif()
 if (NOT EXISTS ${EXPAT_LIBRARY})
-set (EXPAT_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/expat.lib CACHE FILEPATH "expat library" FORCE)
+set (EXPAT_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libexpat.lib CACHE FILEPATH "expat library" FORCE)
 endif()

 # mml


remove duplicated check for MAYBE_UNINITIALIZED

for some reason GREATER 4.4 on 4.4 is true?

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -59,10 +59,6 @@

 		message (STATUS "GCC detected")
 	endif(WIN32)
-
-	if (GCC_VERSION VERSION_GREATER 4.4)
-		set (COMMON_FLAGS "${COMMON_FLAGS} -Wmaybe-uninitialized")
-	endif ()
 endif (CMAKE_COMPILER_IS_GNUCXX)

 if (WIN32)


Loosen compiler warning level due to Qt header files

--- cmake/PlatformLinuxGCC.cmake
+++ cmake/PlatformLinuxGCC.cmake
@@ -47,10 +47,10 @@
       -fPIC         # -> use position independent code

       -Wreturn-type
-      -Wfloat-equal
+    # -Wfloat-equal
       -Wshadow      # -> e.g. when a parameter is named like a member, too many warnings, disabled for now
       -Wcast-align
-      -Wconversion
+    # -Wconversion

     # -Werror=return-type -> missing returns in functions and methods are handled as errors which stops the compilation


Added Boost to Appveyor

Added Boost to Appveyor

--- cmake/configs/Appveyor.cmake
+++ cmake/configs/Appveyor.cmake
@@ -6,7 +6,7 @@
 # build only selected libraries for now
 set(BUILD_ZLIB ON CACHE BOOL "" FORCE)
 set(BUILD_HDF5 ON CACHE BOOL "" FORCE)
-set(BUILD_BOOST OFF CACHE BOOL "" FORCE)
+set(BUILD_BOOST ON CACHE BOOL "" FORCE)
 # build selected boost components
 set(BOOST_COMPONENTS atomic chrono date_time filesystem python system thread CACHE STRING "" FORCE)
 set(BUILD_LEVELDB OFF CACHE BOOL "" FORCE)


Fix BUILD_SHARED_LIBS for clang which broke in D61909

llvm_add_library ignores `BUILD_SHARED_LIBS` `STATIC` is explicitly specified. This restores the `BUILD_SHARED_LIBS` behavior to the clang build.

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

--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -83,7 +83,13 @@
   if(ARG_SHARED)
     set(LIBTYPE SHARED)
   else()
-    set(LIBTYPE STATIC OBJECT)
+    # llvm_add_library ignores BUILD_SHARED_LIBS if STATIC is explicitly set,
+    # so we need to handle it here.
+    if(BUILD_SHARED_LIBS)
+      set(LIBTYPE SHARED OBJECT)
+    else()
+      set(LIBTYPE STATIC OBJECT)
+    endif()
     set_property(GLOBAL APPEND PROPERTY CLANG_STATIC_LIBS ${name})
   endif()
   llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs})


FindNodejs: extend search path to detect ubuntu provided nodejs

Signed-off-by: Mihai Tudor Panu <a27de6130c5d32f5817bf40bb8b348582f37a8af@intel.com>

--- cmake/modules/FindNode.cmake
+++ cmake/modules/FindNode.cmake
@@ -22,7 +22,7 @@

 # Now look for node. Flag an error if not found
 find_path (NODE_ROOT_DIR
-    NAMES node.h
+    NAMES node.h src/node.h
     PATH_SUFFIXES node node4 node5 node6 node7 node8 nodejs
     PATHS /usr/include /usr/local/include)


Check for INTERFACE library type in add_library function … (#1034)

* Check for INTERFACE library type in add_library function defined in windows.cmake

* Change tabs to space in windows.cmake

--- cmake/platform/windows.cmake
+++ cmake/platform/windows.cmake
@@ -43,8 +43,9 @@
       # Check if its an external, imported library (e.g. boost libs via cmake module definition)
       list(FIND ARGN "IMPORTED" FIND_IMPORTED)
       list(FIND ARGN "ALIAS" FIND_ALIAS)
+      list(FIND ARGN "INTERFACE" FIND_INTERFACE)
       _add_library(${ARGV0} ${ARGN})
-      if(${FIND_IMPORTED} EQUAL -1 AND ${FIND_ALIAS} EQUAL -1)
+      if(${FIND_IMPORTED} EQUAL -1 AND ${FIND_ALIAS} EQUAL -1 AND ${FIND_INTERFACE} EQUAL -1)
         set_target_properties(${ARGV0}
           PROPERTIES
               RUNTIME_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_BIN_DESTINATION}


Fixed boost-cpp>1.68 for linux

Fixed boost-cpp>1.68 for linux

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -126,7 +126,10 @@
      add_compile_definitions(TUDAT_BUILD_MSVC)
      add_definitions( "-D_ENABLE_EXTENDED_ALIGNED_STORAGE" )
      message(STATUS "Using MSVC compiler.")
-     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /Ox /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
+     # problem: https://dev.azure.com/tudat-team/feedstock-builds/_build/results?buildId=95&view=logs&j=00f5923e-fdef-5026-5091-0d5a0b3d5a2c&t=3cc4a9ed-60e1-5810-6eb3-5f9cd4a26dba
+     # solution: https://stackoverflow.com/questions/1091662/vc-internal-compiler-error
+#     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /Ox /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
      if (TUDAT_FORCE_DYNAMIC_RUNTIME)
          # This is needed for conda builds, as the prebuilt libraries are MD.
          foreach (flag_var


build: Update TBB

build: Update TBB

Build with TBB 4.3 Update 6

--- contrib/tbb.cmake
+++ contrib/tbb.cmake
@@ -13,7 +13,7 @@
 ExternalProject_Add(tbb
     PREFIX ${tbb_PREFIX}
     GIT_REPOSITORY "https://github.com/nsubtil/tbb.git"
-    GIT_TAG "4.3-20140724"
+    GIT_TAG "4.3-20150611"
     BUILD_IN_SOURCE 1
     PATCH_COMMAND ${TBB_PATCH_COMMAND}
     CONFIGURE_COMMAND ""


removed CMake GLUT message for Apple builds.

--- cmake/glut.cmake
+++ cmake/glut.cmake
@@ -10,7 +10,6 @@
 	FIND_PACKAGE(GLUT REQUIRED)
 	FIND_PACKAGE(OpenGL REQUIRED)
 	INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR})
-message("APPLE: Glut in ${GLUT_INCLUDE_DIR}")
 ELSE(APPLE)
 	SET (OPENGL_LIBRARY GL)
 	FIND_PACKAGE(GLUT)


Add core to BUILD_ONLY option

Add core to BUILD_ONLY option

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -17,7 +17,8 @@

 if(BUILD_ONLY)
     set(SDK_BUILD_LIST ${BUILD_ONLY})
-
+    # core is a must
+    list(APPEND BUILD_LIST "core")
     foreach(TARGET IN LISTS BUILD_ONLY)
         message(STATUS "Considering ${TARGET}")
         get_dependencies_for_sdk(${TARGET} DEPENDENCY_LIST)


Fix cache datatype typo when caching the URHO3D_LIB_TYPE. Credit to hsnabn. Close #1513.

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -286,7 +286,7 @@
                     endif ()
                 endif ()
                 set (URHO3D_64BIT ${ABI_64BIT} CACHE BOOL "Enable 64-bit build, the value is auto-discovered based on the found Urho3D library" FORCE) # Force it as it is more authoritative than user-specified option
-                set (URHO3D_LIB_TYPE ${URHO3D_LIB_TYPE} CACHE BOOL "Urho3D library type, the value is auto-discovered based on the found Urho3D library" FORCE) # Use the Force, Luke
+                set (URHO3D_LIB_TYPE ${URHO3D_LIB_TYPE} CACHE STRING "Urho3D library type, the value is auto-discovered based on the found Urho3D library" FORCE) # Use the Force, Luke
                 foreach (VAR ${AUTO_DISCOVER_VARS})
                     if (TRY_RUN_OUT MATCHES "#define ${VAR}")
                         set (AUTO_DISCOVERED_${VAR} 1)


Make sure the correct resource path is inserted into config files when building the OS X SDK.

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -26,7 +26,7 @@
     set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
     set(OGRE_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}")
   else()
-    if(OGRE_INSTALL_SAMPLES)
+    if(OGRE_INSTALL_SAMPLES_SOURCE)
       set(OGRE_MEDIA_PATH "media")
       set(OGRE_MEDIA_DIR_REL "../../../${OGRE_MEDIA_PATH}")
       set(OGRE_MEDIA_DIR_DBG "../../../${OGRE_MEDIA_PATH}")


FindOIS.cmake fixes: - Respect OGRE_DEPENDENCIES_DIR (useful if used outside of OGRE) - On Win32 define names of the OIS DLLs so they can be copied from wherever they are found

--- CMake/Packages/FindOIS.cmake
+++ CMake/Packages/FindOIS.cmake
@@ -13,6 +13,7 @@
 #  OIS_FOUND - system has OIS
 #  OIS_INCLUDE_DIRS - the OIS include directories
 #  OIS_LIBRARIES - link these to use OIS
+#  OIS_BINARY_REL / OIS_BINARY_DBG - DLL names (windows only)

 include(FindPkgMacros)
 findpkg_begin(OIS)
@@ -22,9 +23,11 @@
 getenv_path(OGRE_SDK)
 getenv_path(OGRE_HOME)
 getenv_path(OGRE_SOURCE)
+getenv_path(OGRE_DEPENDENCIES_DIR)

 # construct search paths
 set(OIS_PREFIX_PATH ${OIS_HOME} ${ENV_OIS_HOME}
+  ${OGRE_DEPENDENCIES_DIR} ${ENV_OGRE_DEPENDENCIES_DIR}
   ${OGRE_SOURCE}/iPhoneDependencies ${ENV_OGRE_SOURCE}/iPhoneDependencies
   ${OGRE_SOURCE}/Dependencies ${ENV_OGRE_SOURCE}/Dependencies
   ${OGRE_SDK} ${ENV_OGRE_SDK}
@@ -61,6 +64,19 @@
 find_library(OIS_LIBRARY_DBG NAMES ${OIS_LIBRARY_NAMES_DBG} HINTS ${OIS_LIB_SEARCH_PATH} ${OIS_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
 make_library_set(OIS_LIBRARY)

+if (WIN32)
+	set(OIS_BIN_SEARCH_PATH ${OIS_HOME}/dll ${ENV_OIS_HOME}/dll
+		${OGRE_DEPENDENCIES_DIR}/bin ${ENV_OGRE_DEPENDENCIES_DIR}/bin
+		${OGRE_SOURCE}/Dependencies/bin ${ENV_OGRE_SOURCE}/Dependencies/bin
+		${OGRE_SDK}/bin ${ENV_OGRE_SDK}/bin
+		${OGRE_HOME}/bin ${ENV_OGRE_HOME}/bin)
+	find_file(OIS_BINARY_REL NAMES "OIS.dll" HINTS ${OIS_BIN_SEARCH_PATH}
+	  PATH_SUFFIXES "" release relwithdebinfo minsizerel)
+	find_file(OIS_BINARY_DBG NAMES "OIS_d.dll" HINTS ${OIS_BIN_SEARCH_PATH}
+	  PATH_SUFFIXES "" debug )
+endif()
+mark_as_advanced(OIS_BINARY_REL OIS_BINARY_DBG)
+

 findpkg_finish(OIS)


Detect x64 kernels in the suite and disable x64 builds for ia32 kernels

On Linux, we could try to support building an x64 package from an ia32
system, but for now it's unsupported.

Review URL: https://codereview.appspot.com/6709050

SVN-Revision: 1669

--- suite/runsuite_common_pre.cmake
+++ suite/runsuite_common_pre.cmake
@@ -259,6 +259,38 @@
 set(CTEST_CMAKE_COMMAND "${CMAKE_EXECUTABLE_NAME}")
 # outer file should set CTEST_PROJECT_NAME
 set(CTEST_COMMAND "${CTEST_EXECUTABLE_NAME}")
+
+# Detect if the kernel is ia32 or x64.  If the kernel is ia32, there's no sense
+# in trying to run any x64 code.  On Windows, the x64 toolchain is built as x64
+# code, so we can't even build.  On Linux, it's possible to have an ia32
+# toolchain that targets x64, but we don't currently support it.
+if (NOT DEFINED KERNEL_IS_X64)  # Allow variable override.
+  if (WIN32)
+    # Check both PROCESSOR_ARCHITECTURE and PROCESSOR_ARCHITEW6432 in case CMake
+    # was built x64.
+    if ("$ENV{PROCESSOR_ARCHITECTURE}" MATCHES "AMD64" OR
+        "$ENV{PROCESSOR_ARCHITEW6432}" MATCHES "AMD64")
+      set(KERNEL_IS_X64 ON)
+    else ()
+      set(KERNEL_IS_X64 OFF)
+    endif ()
+  else ()
+    # uname -m is what the kernel supports.
+    execute_process(COMMAND uname -m
+      OUTPUT_VARIABLE machine
+      RESULT_VARIABLE cmd_result)
+    # If for some reason uname fails (not on PATH), assume the kernel is x64
+    # anyway.
+    if (cmd_result OR "${machine}" MATCHES "x86_64")
+      set(KERNEL_IS_X64 ON)
+    else ()
+      set(KERNEL_IS_X64 OFF)
+    endif ()
+  endif ()
+endif ()
+if (NOT KERNEL_IS_X64)
+  message("WARNING: Kernel is not x64, skipping x64 builds")
+endif ()

 if (arg_use_ninja)
   set(CTEST_CMAKE_GENERATOR "Ninja")
@@ -352,6 +384,12 @@
 function(testbuild_ex name is64 initial_cache test_only_in_long
     add_to_package build_args)
   set(CTEST_BUILD_NAME "${name}")
+
+  # Skip x64 builds on a true ia32 machine.
+  if (is64 AND NOT KERNEL_IS_X64)
+    return()
+  endif ()
+
   if (NOT arg_use_nmake AND NOT arg_use_make AND NOT arg_use_ninja)
     # we need a separate generator for 64-bit as well as the PATH
     # env var changes below (since we run cl directly)


-fixed bug in 'rez_install_python' cmake build rule

--- src/rezplugins/build_system/cmake_files/InstallPython.cmake
+++ src/rezplugins/build_system/cmake_files/InstallPython.cmake
@@ -29,9 +29,9 @@

 macro (install_python)

-	#
+	# --------------------------------------------------------------------------
 	# parse args
-	#
+	# --------------------------------------------------------------------------

 	parse_arguments(INSTPY "FILES;DESTINATION;RELATIVE;BIN" "" ${ARGN})

@@ -56,61 +56,55 @@

 	list(GET INSTPY_BIN 0 py_bin)

-	#
-	# install .py's
-	#
+
+	# --------------------------------------------------------------------------
+	# install .py's and .pyc's
+	# --------------------------------------------------------------------------
+
 	if(py_bin)
 		foreach(f ${INSTPY_FILES})
-
 			set(fabs ${f})
 			if(NOT IS_ABSOLUTE ${f})
 				set(fabs ${CMAKE_CURRENT_SOURCE_DIR}/${f})
 			endif(NOT IS_ABSOLUTE ${f})

 			get_target_filepath(${fabs} ${rel_dir} ${dest_dir} target_fpath)
+			get_filename_component(target_path ${target_fpath} PATH)
 			set(local_f ${label}/${target_fpath})
-
-			# can't work out how to implement a preinstall hook in cmake, so just copying
-			# the py files as a custom install and doing the compile as part of that.
+			set(local_fc "${local_f}c")
 			get_filename_component(pycopy_path ${local_f} PATH)

+
+			# ------------------------------------------------------------------
+			# py file
+			# ------------------------------------------------------------------
+
+			install(FILES ${fabs} DESTINATION ${target_path})
+
+
+			# ------------------------------------------------------------------
+			# pyc file
+			# ------------------------------------------------------------------
+
 			add_custom_command(
-				OUTPUT ${local_f}
+				OUTPUT ${local_fc}
 				COMMAND ${CMAKE_COMMAND} -E make_directory ${pycopy_path}
-				COMMAND ${CMAKE_COMMAND} -E copy ${fabs} ${pycopy_path}
-				COMMAND ${py_bin} -c 'import py_compile \; py_compile.compile(\"${local_f}\", None, None, True)'
+				COMMAND ${py_bin} -c 'import py_compile \; py_compile.compile(\"${local_f}\", \"${local_fc}\", None, True)'
+				DEPENDS ${fabs}
 			)

-			get_filename_component(target_path ${target_fpath} PATH)
-			install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${local_f} DESTINATION ${target_path})
+			install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${local_fc} DESTINATION ${target_path})
+			list(APPEND pycfiles ${CMAKE_CURRENT_BINARY_DIR}/${local_fc})

-			STRING(  REGEX REPLACE "[.]py" ".pyc" local_fc ${local_f} )
-			install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${local_fc} DESTINATION ${target_path})
-
-			list(APPEND pyfiles ${CMAKE_CURRENT_BINARY_DIR}/${local_f})
 		endforeach(f ${INSTPY_FILES})

-		add_custom_target ( ${label} ALL DEPENDS ${pyfiles} )
+		add_custom_target ( ${label} ALL DEPENDS ${pyfiles} ${pycfiles} )

 	else(py_bin)
 		install_files_(${INSTPY_FILES} RELATIVE ${rel_dir} DESTINATION ${dest_dir})
 	endif(py_bin)

 endmacro (install_python)
-
-
-
-
-
-
-
-
-
-
-
-
-
-


[cmake] added macro axl_apply_compiler_flag_setting_list to conveniently override more than one flag


Remove dashes in macros

Remove dashes in macros

Signed-off-by: Dario Freddi <drf@kde.org>

svn path=/trunk/kdesupport/polkit-qt-1/; revision=1065158

--- polkitqt1version.h.cmake
+++ polkitqt1version.h.cmake
@@ -24,16 +24,16 @@
 #include "export.h"

 /// @brief PolkitQt-1 version as string at compile time.
-#define POLKITQT-1_VERSION_STRING "${CMAKE_POLKITQT-1_VERSION_STRING}"
+#define POLKITQT1_VERSION_STRING "${CMAKE_POLKITQT-1_VERSION_STRING}"

 /// @brief The major PolkitQt-1 version number at compile time
-#define POLKITQT-1_VERSION_MAJOR ${CMAKE_MAJOR_POLKITQT-1_VERSION}
+#define POLKITQT1_VERSION_MAJOR ${CMAKE_MAJOR_POLKITQT-1_VERSION}

 /// @brief The minor PolkitQt-1 version number at compile time
-#define POLKITQT-1_VERSION_MINOR ${CMAKE_MINOR_POLKITQT-1_VERSION}
+#define POLKITQT1_VERSION_MINOR ${CMAKE_MINOR_POLKITQT-1_VERSION}

 /// @brief The PolkitQt-1 release version number at compile time
-#define POLKITQT-1_VERSION_RELEASE ${CMAKE_RELEASE_POLKITQT-1_VERSION}
+#define POLKITQT1_VERSION_RELEASE ${CMAKE_RELEASE_POLKITQT-1_VERSION}

 /**
  * \brief Create a unique number from the major, minor and release number of a %PolkitQt-1 version
@@ -41,7 +41,7 @@
  * This function can be used for preprocessing. For version information at runtime
  * use the version methods in the PolkitQt-1 namespace.
  */
-#define POLKITQT-1_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
+#define POLKITQT1_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))

 /**
  * \brief %PolkitQt-1 Version as a unique number at compile time
@@ -50,8 +50,8 @@
  * through POLKITQT1_IS_VERSION in preprocessing. For version information at runtime
  * use the version methods in the PolkitQt-1 namespace.
  */
-#define POLKITQT-1_VERSION \
-    POLKITQT-1_MAKE_VERSION(POLKITQT-1_VERSION_MAJOR,POLKITQT-1_VERSION_MINOR,POLKITQT-1_VERSION_RELEASE)
+#define POLKITQT1_VERSION \
+    POLKITQT1_MAKE_VERSION(POLKITQT1_VERSION_MAJOR,POLKITQT1_VERSION_MINOR,POLKITQT1_VERSION_RELEASE)

 /**
  * \brief Check if the %PolkitQt-1 version matches a certain version or is higher
@@ -68,7 +68,7 @@
  * For version information at runtime
  * use the version methods in the PolkitQt-1 namespace.
  */
-#define POLKITQT-1_IS_VERSION(a,b,c) ( POLKITQT-1_VERSION >= POLKITQT-1_MAKE_VERSION(a,b,c) )
+#define POLKITQT1_IS_VERSION(a,b,c) ( POLKITQT1_VERSION >= POLKITQT1_MAKE_VERSION(a,b,c) )

 namespace PolkitQt1 {


COMP: avoid warning with CMake 3.12 and newer regarding policy CMP0075

-- Performing Other Test STDC_HEADERS - Success
CMake Warning (dev) at /Applications/CMake.app/Contents/share/cmake-3.12/Modules/CheckIncludeFiles.cmake:110 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    m;dl

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/ConfigureChecks.cmake:203 (CHECK_INCLUDE_FILES)
  Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/ConfigureChecks.cmake:212 (CHECK_INCLUDE_FILE_CONCAT)
  Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake:16 (include)
  Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt:407 (include)

Change-Id: I77b0ff79555926ef16618eb13a7349eeada893f2

--- Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/ConfigureChecks.cmake
+++ Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -25,6 +25,10 @@
 if (CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER_LOADED)
   include (TestForSTDNamespace)
 endif ()
+
+if(POLICY CMP0075)
+  cmake_policy(SET CMP0075 NEW)
+endif()

 #-----------------------------------------------------------------------------
 # APPLE/Darwin setup


fix link error on Linux machines with older versions of libusb by always linking against the bundled version of libusb

--- thirdparty/thirdparty.cmake
+++ thirdparty/thirdparty.cmake
@@ -406,7 +406,7 @@
   # this would find the libUSB module that is installed on the system.
   # It requires "sudo apt-get install libusb-1.0-0-dev"
   pkg_check_modules(USB_pkg libusb-1.0)
-  if(USB_pkg_FOUND)
+  if(0) # if(USB_pkg_FOUND) - force using the bundled libusb - older versions may not work with the ZWO ASI camera SDK
     include_directories(${USB_pkg_INCLUDE_DIRS})
     set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${USB_pkg_LIBRARIES})
     set(USB_build FALSE)
@@ -424,7 +424,8 @@
      # platform specific implementation
      ${libusb_dir}/os/linux_usbfs.c
      ${libusb_dir}/os/linux_usbfs.h
-
+     ${libusb_dir}/os/linux_netlink.c
+
      ${libusb_dir}/os/threads_posix.h
      ${libusb_dir}/os/threads_posix.c


cmake: make doc more clear

cmake: make doc more clear

--- CMakeModules/FindFFTW3.cmake
+++ CMakeModules/FindFFTW3.cmake
@@ -21,7 +21,7 @@
 #

 find_package(PkgConfig)
-set_package_properties(PkgConfig PROPERTIES TYPE RECOMMENDED PURPOSE "Used to detect packages")
+set_package_properties(PkgConfig PROPERTIES TYPE RECOMMENDED PURPOSE "Used to detect fftw package")

 pkg_check_modules(PC_FFTW3 fftw3)
 find_path(FFTW3_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3_INCLUDE_DIRS})


fixed header

fixed header

--- src/cmake/httpppConfig.cmake
+++ src/cmake/httpppConfig.cmake
@@ -1,15 +1,2 @@
-include(CMakeFindDependencyMacro)
-find_dependency(OpenSSL 1.0.0)
+include("${CMAKE_CURRENT_LIST_DIR}/httpppTargets.cmake")

-include("${CMAKE_CURRENT_LIST_DIR}/httpppTargets.cmake")
-include("${CMAKE_CURRENT_LIST_DIR}/httpppMacros.cmake")
-
-set(_supported_components Plot Table)
-
-foreach(_comp ${httppp_FIND_COMPONENTS})
-  if (NOT ";${_supported_components};" MATCHES _comp)
-    set(httppp_FOUND False)
-    set(httppp_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
-  endif()
-  include("${CMAKE_CURRENT_LIST_DIR}/httppp${_comp}Targets.cmake")
-endforeach()


Fix VisualTests using glut library for Debug builds.

The VisualTests rely on the release version of glut, but our
FindGlutFromOsg gives us the debug library of glut when building
Debug.  Since we never use the debug library, this commit ensures
that we always link to the release library.

--- CMake/FindGlutFromOsg.cmake
+++ CMake/FindGlutFromOsg.cmake
@@ -29,7 +29,7 @@

 	osg_find_library(OSG_GLUT glut32)
 	if(OSG_GLUT_LIBRARIES)
-		set(GLUT_glut_LIBRARY ${OSG_GLUT_LIBRARIES}
+		set(GLUT_glut_LIBRARY ${OSG_GLUT_LIBRARY_RELEASE}
 			CACHE FILEPATH "GLUT main library." FORCE)
 	endif(OSG_GLUT_LIBRARIES)
 endif(OPENSCENEGRAPH_FOUND)


Cmake cleanups

Cmake cleanups

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -30,10 +30,6 @@
 set(CPACK_RESOURCE_FILE_LICENSE ${Equalizer_SOURCE_DIR}/LICENSE.txt)
 set(CPACK_RESOURCE_FILE_README ${Equalizer_SOURCE_DIR}/RELNOTES.txt)

-if(EQUALIZER_NIGHTLY)
-  set(CPACK_PACKAGE_VERSION_PATCH
-      ${CPACK_PACKAGE_VERSION_PATCH}-${EQUALIZER_BUILD_ARCH})
-endif()
 if(EQUALIZER_PACKAGE_VERSION)
   set(CPACK_PACKAGE_VERSION_PATCH
       ${CPACK_PACKAGE_VERSION_PATCH}-${EQUALIZER_PACKAGE_VERSION})


Added cmake 3.4.0 objective C compiler include fix

--- .cmake/Modules/CMakeObjectiveCInformation.cmake
+++ .cmake/Modules/CMakeObjectiveCInformation.cmake
@@ -156,8 +156,13 @@

 # compile a C file into an object file
 if(NOT CMAKE_ObjectiveC_COMPILE_OBJECT)
-  set(CMAKE_ObjectiveC_COMPILE_OBJECT
-    "<CMAKE_ObjectiveC_COMPILER> <DEFINES> <FLAGS> -o <OBJECT>   -c <SOURCE>")
+  if("${CMAKE_VERSION}" VERSION_GREATER 3.3.2)
+    set(CMAKE_ObjectiveC_COMPILE_OBJECT
+        "<CMAKE_ObjectiveC_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>   -c <SOURCE>")
+  else ()
+    set(CMAKE_ObjectiveC_COMPILE_OBJECT
+        "<CMAKE_ObjectiveC_COMPILER> <DEFINES> <FLAGS> -o <OBJECT>   -c <SOURCE>")
+  endif ()
 endif()

 if(NOT CMAKE_ObjectiveC_LINK_EXECUTABLE)


Set _WIN32_WINNT=0x0600 since we are going to use some new APIs available on Vista and later.

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -414,7 +414,7 @@
         add_definitions(-DWIN32_LEAN_AND_MEAN)
         add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
         add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS=1)
-        add_definitions(-D_WIN32_WINNT=0x0501)
+        add_definitions(-D_WIN32_WINNT=0x0600)
         add_definitions(-D_UNICODE)
         add_definitions(-DUNICODE)
         add_compile_options(-MP)


Fix bug where rosidl_runtime_cpp wasn't depended upon (#660)

Signed-off-by: Shane Loretz <7fde345e8e2e22c78a1570a4807e4629866dc7de@osrfoundation.org>

--- rosidl_generator_cpp/cmake/rosidl_generator_cpp_generate_interfaces.cmake
+++ rosidl_generator_cpp/cmake/rosidl_generator_cpp_generate_interfaces.cmake
@@ -11,6 +11,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
+find_package(rosidl_runtime_cpp REQUIRED)
+
 set(_output_path
   "${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp/${PROJECT_NAME}")
 set(_generated_headers "")
@@ -115,7 +118,7 @@
 endforeach()
 target_link_libraries(
   ${rosidl_generate_interfaces_TARGET}${_target_suffix} INTERFACE
-  ${rosidl_runtime_cpp_TARGETS})
+  rosidl_runtime_cpp::rosidl_runtime_cpp)

 if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
   if(NOT _generated_headers STREQUAL "")


Added error check for missing resources for embedded assets on MSVC.

--- embed_assets.cmake
+++ embed_assets.cmake
@@ -28,10 +28,15 @@
 		string(TOUPPER "${ID}" RES_ID)
 		set(PLATFORM_EMBED_SRC
 "#include <windows.h>
+#include <stdexcept>

 static auto create_asset() -> mirrage::asset::Embedded_asset {
 	auto handle = GetModuleHandle(NULL);
 	auto res = FindResource(handle, \"${RES_ID}\", RT_RCDATA);
+
+	if(!res){
+		throw std::runtime_error(\"Couldn't find ressource ${RES_ID}.\");
+	}

 	return mirrage::asset::Embedded_asset(\"${target}\",
 		gsl::span<const gsl::byte>{reinterpret_cast<const gsl::byte*>(LockResource(LoadResource(handle, res))),


Use OPENNI2_INCLUDE64 environment variable. (Set on windows with install from http://structure.io/openni).

--- cmake/OpenCVFindOpenNI2.cmake
+++ cmake/OpenCVFindOpenNI2.cmake
@@ -17,7 +17,7 @@
         find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI2 c++ interface header")
         find_library(OPENNI2_LIBRARY "OpenNI2" PATHS $ENV{OPENNI2_LIB} DOC "OpenNI2 library")
     else()
-        find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS "$ENV{OPEN_NI_INSTALL_PATH64}Include" DOC "OpenNI2 c++ interface header")
+        find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE64} "$ENV{OPEN_NI_INSTALL_PATH64}Include" DOC "OpenNI2 c++ interface header")
         find_library(OPENNI2_LIBRARY "OpenNI2" PATHS $ENV{OPENNI2_LIB64} DOC "OpenNI2 library")
     endif()
 elseif(UNIX OR APPLE)


Tweak message spelling.
Fix DEFAULT_NO_BINDINGS logic.

svn path=/trunk/; revision=7673

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -69,24 +69,24 @@
   )
 endif(PLD_wxwidgets)

-if(PLD_wxwidgets)
-  if(DEFAULT_NO_BINDINGS)
-    option(ENABLE_wxwidgets "Enable wxwidgets bindings" OFF)
-  else(DEFAULT_NO_BINDINGS)
-    option(ENABLE_wxwidgets "Enable wxwidgets bindings" ON)
-  endif(DEFAULT_NO_BINDINGS)
-else(PLD_wxwidgets)
+if(DEFAULT_NO_BINDINGS)
+  option(ENABLE_wxwidgets "Enable wxwidgets bindings" OFF)
+else(DEFAULT_NO_BINDINGS)
+  option(ENABLE_wxwidgets "Enable wxwidgets bindings" ON)
+endif(DEFAULT_NO_BINDINGS)
+
+if(ENABLE_wxwidgets AND NOT PLD_wxwidgets)
   message(STATUS
   "WARNING: PLD_wxwidgets is OFF so "
-  "Setting ENABLE_wxwidgets to OFF."
+  "setting ENABLE_wxwidgets to OFF."
   )
   set(ENABLE_wxwidgets OFF CACHE BOOL "Enable wxwidgets bindings" FORCE)
-endif(PLD_wxwidgets)
+endif(ENABLE_wxwidgets AND NOT PLD_wxwidgets)

 if(ENABLE_wxwidgets AND NOT ENABLE_cxx)
   message(STATUS
   "WARNING: ENABLE_cxx is OFF so "
-  "Setting ENABLE_wxwidgets to OFF."
+  "setting ENABLE_wxwidgets to OFF."
   )
   set(ENABLE_wxwidgets OFF CACHE BOOL "Enable wxwidgets bindings" FORCE)
 endif(ENABLE_wxwidgets AND NOT ENABLE_cxx)


Updated FW - ImageManip rounding fix

Updated FW - ImageManip rounding fix

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "eef12eeeff0152ef565180bbe0e71e19da23aacf")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "5b6abbe617695d431568ab01fa27e3fa7468da69")

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


Fix default temporal/spatial filter values when subpixel is enabled

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "fbbd61aaa70e094d40800e8e6cbb23548ecc24af")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "456246cec6c17358f9eda61a41f45059c6ec7a2b")

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


Fix overwriting of unity files in reconfiguration.

One flaw in the unity build system is that it always generates the unity
inclusion files when the build system is (re)configured. This results in a lot
of extra compilation.

This patch fixes the issue by first writing to a temporary file and then
moving it only if it is not equal to the current unity file.

--- cmake/macros/macro_setup_unity_target.cmake
+++ cmake/macros/macro_setup_unity_target.cmake
@@ -46,6 +46,8 @@

   FOREACH(_unity_prefix ${_unity_prefixes})
     SET(_unity_file_name "${CMAKE_CURRENT_BINARY_DIR}/${_unity_prefix}.cc")
+    SET(_tmp_unity_file_name "${CMAKE_CURRENT_BINARY_DIR}/${_unity_prefix}_tmp.cc")
+
     #
     # Note the CMake weirdness: _output_src is actually a string containing the
     # variable name since we are in a macro...
@@ -54,13 +56,21 @@
       ${${_output_src}}
       ${_unity_file_name}
       )
-    FILE(WRITE "${_unity_file_name}"
+    FILE(WRITE "${_tmp_unity_file_name}"
 "// This file was automatically generated by the deal.II CMake configuration as
 // part of the unity build subsystem. Please do not edit this file directly;
 // instead, make appropriate changes to the relevant CMakeLists.txt file.\n\n"
       )
     FOREACH(_unity_file ${${_unity_prefix}})
-      FILE(APPEND "${_unity_file_name}" "#include \"${_unity_file}\"\n")
+      FILE(APPEND "${_tmp_unity_file_name}" "#include \"${_unity_file}\"\n")
     ENDFOREACH()
+
+    #
+    # CMake regenerates all unity files as part of the configuration process,
+    # even though they usually have not changed. Avoid some recompilation by
+    # using the CONFIGURE_FILE command, which won't update the time stamp unless
+    # the content has changed.
+    #
+    CONFIGURE_FILE(${_tmp_unity_file_name} ${_unity_file_name} COPYONLY)
   ENDFOREACH()
 ENDMACRO()


Use custom target to create symlinks for Vc/VecCore headers

Using execute_process() fails to create the symlink on a clean
build directory, because ${CMAKE_BINARY_DIR}/include does not
exist yet at configuration time.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1343,8 +1343,10 @@
   # FIXME: This is a workaround to let ROOT find the headers at runtime if
   # they are in the build directory. This is necessary until we decide how to
   # treat externals with headers used by ROOT
-  execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
+  add_custom_target(VC_SYMLINK COMMAND ${CMAKE_COMMAND} -E create_symlink
     ${Vc_INCLUDE_DIR}/Vc ${CMAKE_BINARY_DIR}/include/Vc)
+  add_dependencies(VC VC_SYMLINK)
+  # end of workaround

   install(DIRECTORY ${Vc_ROOTDIR}/ DESTINATION ".")
 endif()
@@ -1427,8 +1429,10 @@
   # FIXME: This is a workaround to let ROOT find the headers at runtime if
   # they are in the build directory. This is necessary until we decide how to
   # treat externals with headers used by ROOT
-  execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
+  add_custom_target(VECCORE_SYMLINK COMMAND ${CMAKE_COMMAND} -E create_symlink
     ${VecCore_ROOTDIR}/include/VecCore ${CMAKE_BINARY_DIR}/include/VecCore)
+  add_dependencies(VECCORE VECCORE_SYMLINK)
+  # end of workaround

   install(DIRECTORY ${VecCore_ROOTDIR}/ DESTINATION ".")
 endif()


added the necessary INSTALL command for zorba core requirements

--- cmake_modules/Windows/ProxyFindModule.cmake
+++ cmake_modules/Windows/ProxyFindModule.cmake
@@ -243,10 +243,14 @@
       LIST (APPEND paths "${NATIVE_PATH}")
       MESSAGE (STATUS "Added dll to ZORBA_REQUIRED_DLLS cache variable: ${TMP_DLL_VAR}")

-      IF (NOT ${PROJECT_NAME} STREQUAL "zorba")
+      IF (${PROJECT_NAME} STREQUAL "zorba")
+        # for zorba core requirements, install this DLL
+        INSTALL (PROGRAMS ${TMP_DLL_VAR} DESTINATION bin)
+      ELSE (${PROJECT_NAME} STREQUAL "zorba")
+        # for zorba non-core requirements, install this DLL only if the component is spcified
         STRING (REPLACE "-" "_"  component_name ${PROJECT_NAME})
         INSTALL (PROGRAMS ${TMP_DLL_VAR} DESTINATION bin COMPONENT ${component_name})
-      ENDIF (NOT ${PROJECT_NAME} STREQUAL "zorba")
+      ENDIF (${PROJECT_NAME} STREQUAL "zorba")

       # we break the loop if we found one DLL
       BREAK ()


minor fix

minor fix

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -515,6 +515,7 @@
 endfunction()

 macro(cmaki2_gtest)
+	cmaki_find_package(google-gtest)
 	cmaki_find_package(google-gmock)
 	cmaki2_test(${ARGV})
 endmacro()


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -528,7 +528,7 @@
 	endforeach()
 	add_test(
 		NAME ${_TEST_NAME}_exe
-		COMMAND ${_TEST_NAME}_exe
+		COMMAND ${_TEST_NAME}_exe --gtest_repeat=100 --gtest_break_on_failure --gtest_shuffle
 		WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE})
 	generate_vcxproj_user(${_TEST_NAME})


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -402,7 +402,7 @@
 		ADD_EXECUTABLE(${_EXECUTABLE_NAME} ${_SOURCES})
 	endif()
 	target_link_libraries(${_EXECUTABLE_NAME} ${_DEPENDS})
-	echo_targets(${_EXECUTABLE_NAME})
+	# echo_targets(${_EXECUTABLE_NAME})
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_EXECUTABLE_NAME} ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})
@@ -434,7 +434,7 @@
 	endif()
 	add_library(${_LIBRARY_NAME} SHARED ${_SOURCES})
 	target_link_libraries(${_LIBRARY_NAME} ${_DEPENDS})
-	echo_targets(${_LIBRARY_NAME})
+	# echo_targets(${_LIBRARY_NAME})
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_LIBRARY_NAME} ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})
@@ -466,7 +466,7 @@
 	endif()
 	add_library(${_LIBRARY_NAME} STATIC ${_SOURCES})
 	target_link_libraries(${_LIBRARY_NAME} ${_DEPENDS})
-	echo_targets(${_LIBRARY_NAME})
+	# echo_targets(${_LIBRARY_NAME})
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_LIBRARY_NAME} ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})
@@ -495,7 +495,7 @@
 	endif()
 	add_executable(${_TEST_NAME}_exe ${_SOURCES})
 	target_link_libraries(${_TEST_NAME}_exe ${_DEPENDS})
-	echo_targets(${_TEST_NAME}_exe)
+	# echo_targets(${_TEST_NAME}_exe)
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_TEST_NAME}_exe ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})


ilastik.cmake: Update lazyflow submodules when pulling from git.

--- ilastik.cmake
+++ ilastik.cmake
@@ -47,11 +47,14 @@

 if("${ILASTIK_VERSION}" STREQUAL "master")

-    set(ILASTIK_UPDATE_COMMAND cd lazyflow && git checkout master && git pull && cd .. && cd volumina && git checkout master && git pull && cd .. && cd ilastik && git checkout master && git pull && cd ..)
+    set(ILASTIK_UPDATE_COMMAND git checkout master && git pull && git submodule update --init --recursive
+                               cd lazyflow && git checkout master && git pull && git submodule update && cd .. &&
+                               cd volumina && git checkout master && git pull && cd .. &&
+                               cd ilastik && git checkout master && git pull && cd ..)

 else()

-    set(ILASTIK_UPDATE_COMMAND git checkout ${ILASTIK_VERSION} && git submodule update)
+    set(ILASTIK_UPDATE_COMMAND git checkout ${ILASTIK_VERSION} && git submodule update --init --recursive)

 endif()


coverage should ignore /opt/rh

coverage should ignore /opt/rh

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

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -2079,6 +2079,9 @@
       if(DEFINED externpro_DIR AND EXISTS ${externpro_DIR})
         list(APPEND XP_COVERAGE_RM '${externpro_DIR}/*')
       endif()
+      if(EXISTS /opt/rh AND IS_DIRECTORY /opt/rh)
+        list(APPEND XP_COVERAGE_RM '/opt/rh/*')
+      endif()
       if(EXISTS /usr AND IS_DIRECTORY /usr)
         list(APPEND XP_COVERAGE_RM '/usr/*')
       endif()


removed comments

removed comments

--- SuperBuild/External_CCPi-Framework.cmake
+++ SuperBuild/External_CCPi-Framework.cmake
@@ -42,11 +42,9 @@
   ### --- Project specific additions here
   set(libcilreg_Install_Dir ${SUPERBUILD_INSTALL_DIR})

-  #message(STATUS "HDF5_ROOT in External_SIRF: " ${HDF5_ROOT})
   set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR})
   set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR})

-  set(ENV{CIL_VERSION} ${CIL_VERSION})
   message("CIL URL " ${${proj}_URL}  )
   message("CIL TAG " ${${proj}_TAG}  )


Update compiler_flags.cmake

Update compiler_flags.cmake

Removed the CMake changes. Will update the cmake in another PR.

--- cmake/compiler_flags.cmake
+++ cmake/compiler_flags.cmake
@@ -152,7 +152,8 @@
   string(FIND "${CMAKE_CXX_FLAGS}" "${preproc_def}" PREPROC_DEF_FOUND)

   if (${PREPROC_DEF_FOUND} EQUAL -1)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${preproc_def}" PARENT_SCOPE)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D${preproc_def}" CACHE STRING ""
+        FORCE)
   endif ()
 endfunction ()


fixed a bug in FindLibUSB.cmake

fixed a bug in FindLibUSB.cmake

--- cmake-modules/FindLibUSB.cmake
+++ cmake-modules/FindLibUSB.cmake
@@ -42,6 +42,7 @@
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #

+message (STATUS "Checking for LibUSB...")

 if (LIBUSB_LIBRARIES AND LIBUSB_INCLUDE_DIRS)
   # in cache already
@@ -89,9 +90,7 @@
 	  message(STATUS " - Libraries: ${LIBUSB_LIBRARIES}")
     endif (NOT LIBUSB_FIND_QUIETLY)
   else (LIBUSB_FOUND)
-    if (LIBUSB_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find libusb")
-    endif (LIBUSB_FIND_REQUIRED)
+    message(FATAL_ERROR "Could not find libusb")
   endif (LIBUSB_FOUND)

   # show the LIBUSB_INCLUDE_DIRS and LIBUSB_LIBRARIES variables only in the advanced view


fix copy paste error

fix copy paste error

--- cmake/GTClangDefinitions.cmake
+++ cmake/GTClangDefinitions.cmake
@@ -36,8 +36,8 @@
 # Git version string
 dawn_get_git_head_revision(git_refspec git_hash)
 string(SUBSTRING "${git_hash}" 0 7 git_hash_short)
-if(NOT DEFINED DAWN_GIT_HASH OR NOT "${DAWN_GIT_HASH}" STREQUAL "${git_hash_short}")
-  set(DAWN_GIT_HASH "${git_hash_short}" CACHE INTERNAL "git hash (short) of current head" FORCE)
+if(NOT DEFINED GTCLANG_GIT_HASH OR NOT "${GTCLANG_GIT_HASH}" STREQUAL "${git_hash_short}")
+  set(GTCLANG_GIT_HASH "${git_hash_short}" CACHE INTERNAL "git hash (short) of current head" FORCE)
 endif()

 # Assemble full version string
@@ -46,7 +46,7 @@
 string(TOLOWER ${CMAKE_CXX_COMPILER_ID} compiler)
 set(compiler "${compiler}-${CMAKE_CXX_COMPILER_VERSION}")
 set(GTCLANG_FULL_VERSION
-    "${GTCLANG_VERSION_STRING}-${SGTCLANG_GIT_HASH}-${architecture}-${platform}-${compiler}"
+    "${GTCLANG_VERSION_STRING}-${GTCLANG_GIT_HASH}-${architecture}-${platform}-${compiler}"
     CACHE STRING "Full version string of gtclang" FORCE)

 # Building configs


Tweak OS X compilation

Tweak OS X compilation

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -6,7 +6,7 @@
 # OPENNI_INCLUDE_DIRS - Directories containing the OPENNI include files.
 # OPENNI_LIBRARIES - Libraries needed to use OPENNI.
 # OPENNI_DEFINITIONS - Compiler flags for OPENNI.
-#
+#
 # For libusb-1.0, add USB_10_ROOT if not found

 find_package(PkgConfig QUIET)
@@ -19,21 +19,21 @@
             PATH_SUFFIXES libusb-1.0)

   find_library(USB_10_LIBRARY
-               NAMES usb-1.0
+               NAMES usb-1.0
                HINTS ${PC_USB_10_LIBDIR} ${PC_USB_10_LIBRARY_DIRS} "${USB_10_ROOT}" "$ENV{USB_10_ROOT}"
                PATH_SUFFIXES lib)
-
+
   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(USB_10 DEFAULT_MSG USB_10_LIBRARY USB_10_INCLUDE_DIR)
-
+
   if(NOT USB_10_FOUND)
-    message(STATUS "OpenNI disabled because libusb-1.0 not found.")
+    message(STATUS "OpenNI disabled because libusb-1.0 not found.")
     return()
   else()
     include_directories(SYSTEM ${USB_10_INCLUDE_DIR})
   endif()
 endif(NOT WIN32)
-
+
 if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
   pkg_check_modules(PC_OPENNI openni-dev)
 else()
@@ -49,11 +49,11 @@

 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
-          HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni /usr/include/ni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
+          HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni /usr/include/ni /opt/local/include/ni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
           PATHS "$ENV{OPEN_NI_INSTALL_PATH${OPENNI_SUFFIX}}/Include"
           PATH_SUFFIXES openni include Include)
 #add a hint so that it can find it without the pkg-config
-find_library(OPENNI_LIBRARY
+find_library(OPENNI_LIBRARY
              NAMES OpenNI${OPENNI_SUFFIX}
              HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
              PATHS "$ENV{OPEN_NI_LIB${OPENNI_SUFFIX}}"
@@ -67,12 +67,11 @@

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(OpenNI DEFAULT_MSG OPENNI_LIBRARY OPENNI_INCLUDE_DIR)
-
+
 mark_as_advanced(OPENNI_LIBRARY OPENNI_INCLUDE_DIR)

-if(OPENNI_FOUND)
+if(OPENNI_FOUND)
   # Add the include directories
-  set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
+  set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
   message(STATUS "OpenNI found (include: ${OPENNI_INCLUDE_DIRS}, lib: ${OPENNI_LIBRARY})")
 endif(OPENNI_FOUND)
-


From Gerri:
Make sure that XROOTD_PRIVATE_INCLUDE_DIR is not undefined.

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

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


Update comment for NO_CXXMODULE *_rdict.pcm installation case

Co-Authored-By: Vassil Vassilev <f915f672c022cdf6813dfb14770fe81f267d8587@gmail.com>

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -428,7 +428,7 @@
     endif(ARG_MULTIDICT)

     if(runtime_cxxmodules)
-      # Currently we are not able to build R C++ module, so we still need to be able to install it's _rdict.pcm.
+      # If we specify NO_CXXMODULE we should be able to still install the produced _rdict.pcm file.
       if(NOT ARG_NO_CXXMODULE)
         set(pcm_name)
       endif()


[cxxmodules] Support both sysv and gnu hash for bloom filter

By default, libraries didn't have .gnu.hash section when compiled by old
compilers like gcc6. We need .gnu.hash section for bloomfilter to
quickly check symbols in the given library.

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -119,7 +119,7 @@
   set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
   set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")

-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--hash-style=\"both\"")

   # Select flags.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")


CMake fix: cfg files were not placed properly in the build dir for Linux

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40557

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -93,15 +93,27 @@
 elseif (APPLE)
   # TODO
 endif ()
-# create resources.cfg
-configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/debug/resources.cfg)
-configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/release/resources.cfg)
-# create plugins.cfg
-configure_file(${OGRE_TEMPLATES_DIR}/plugins_d.cfg.in ${OGRE_BINARY_DIR}/bin/debug/plugins.cfg)
-configure_file(${OGRE_TEMPLATES_DIR}/plugins.cfg.in ${OGRE_BINARY_DIR}/bin/release/plugins.cfg)
-# create media.cfg
-configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/debug/media.cfg)
-configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/release/media.cfg)
-# create quake3settings.cfg
-configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/debug/quake3settings.cfg)
-configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/release/quake3settings.cfg)
+if (WIN32)
+  # create resources.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/debug/resources.cfg)
+  configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/release/resources.cfg)
+  # create plugins.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/plugins_d.cfg.in ${OGRE_BINARY_DIR}/bin/debug/plugins.cfg)
+  configure_file(${OGRE_TEMPLATES_DIR}/plugins.cfg.in ${OGRE_BINARY_DIR}/bin/release/plugins.cfg)
+  # create media.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/debug/media.cfg)
+  configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/release/media.cfg)
+  # create quake3settings.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/debug/quake3settings.cfg)
+  configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/release/quake3settings.cfg)
+else() # other OS only need one cfg file
+  # create resources.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/resources.cfg)
+  # create plugins.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/plugins_d.cfg.in ${OGRE_BINARY_DIR}/bin/plugins.cfg)
+  # create media.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/media.cfg)
+  # create quake3settings.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/quake3settings.cfg)
+
+


Set label on PythonQt decorators associated with CTK libraries

The associated label corresponds to the associated CTK library name

--- CMake/ctkMacroBuildLib.cmake
+++ CMake/ctkMacroBuildLib.cmake
@@ -176,6 +176,8 @@
     IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
       SET_TARGET_PROPERTIES(${lib_name}PythonQt PROPERTIES COMPILE_FLAGS "-fPIC")
     ENDIF()
+    # Set labels associated with the target.
+    SET_TARGET_PROPERTIES(${lib_name}PythonQt PROPERTIES LABELS ${lib_name})

     # Update list of libraries wrapped with PythonQt
     SET(CTK_WRAPPED_LIBRARIES_PYTHONQT


COMP: Since PythonQt wrapper library are static, make sure the flag -fPIC is passed.

That will avoid the classic compilation problem: relocation R_X86_64_32 against
`a local symbol' can not be used when making a shared object.

--- CMake/ctkMacroBuildLib.cmake
+++ CMake/ctkMacroBuildLib.cmake
@@ -136,6 +136,9 @@
       KIT_PYTHONQT_SRCS "${MY_SRCS}" ${CTK_WRAP_PYTHONQT_FULL})
     ADD_LIBRARY(${lib_name}PythonQt STATIC ${KIT_PYTHONQT_SRCS})
     TARGET_LINK_LIBRARIES(${lib_name}PythonQt ${lib_name})
+    IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+      SET_TARGET_PROPERTIES(${lib_name}PythonQt PROPERTIES COMPILE_FLAGS "-fPIC")
+    ENDIF()

     # Update list of libraries wrapped with PythonQt
     SET(CTK_WRAPPED_LIBRARIES_PYTHONQT


Fixes T19271

Fixes T19271

Copy the required qt plugin for icon switching.

--- CMake/mitkInstallRules.cmake
+++ CMake/mitkInstallRules.cmake
@@ -73,6 +73,9 @@
     install(FILES "${_qmake_path}/../plugins/imageformats/qsvg.dll"
             DESTINATION "bin/plugins/imageformats"
             CONFIGURATIONS Release)
+    install(FILES "${_qmake_path}/../plugins/iconengines/qsvgicon.dll"
+            DESTINATION "bin/plugins/iconengines"
+            CONFIGURATIONS Release)
     if(MITK_USE_QT_WEBENGINE)
       MITK_INSTALL( FILES "${_qmake_path}/QtWebEngineProcess.exe")
     endif()
@@ -87,6 +90,9 @@
             CONFIGURATIONS Debug)
     install(FILES "${_qmake_path}/../plugins/imageformats/qsvgd.dll"
             DESTINATION "bin/plugins/imageformats"
+            CONFIGURATIONS Debug)
+    install(FILES "${_qmake_path}/../plugins/iconengines/qsvgicond.dll"
+            DESTINATION "bin/plugins/iconengines"
             CONFIGURATIONS Debug)
     install(DIRECTORY "${_qmake_path}/../resources/"
             DESTINATION "bin/resources/"


Fixed pattern expression for Qt plug-ins for Windows installer.

--- CMake/mitkInstallRules.cmake
+++ CMake/mitkInstallRules.cmake
@@ -21,8 +21,8 @@
     endif()

     if(NOT CMAKE_CFG_INTDIR STREQUAL ".")
-      set(_matching_pattern_release FILES_MATCHING PATTERN \"*Release*\")
-      set(_matching_pattern_debug FILES_MATCHING PATTERN \"*Debug*\")
+      set(_matching_pattern_release FILES_MATCHING PATTERN "*Release*")
+      set(_matching_pattern_debug FILES_MATCHING PATTERN "*Debug*")
     else()
       set(_matching_pattern_release )
       set(_matching_pattern_debug )


STYLE: Better custom command message for vtkWrapHierarchy.

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -129,7 +129,7 @@
       COMMAND ${CMAKE_COMMAND}
       "-E" "touch" "${quote}${OUTPUT_DIR}/${TARGET}.target${quote}"

-      COMMENT "Hierarchy Wrapping - checking vtk${KIT}Hierarchy.txt"
+      COMMENT "Hierarchy Wrapping - updating vtk${KIT}Hierarchy.txt"
       ${verbatim}
       )

@@ -153,7 +153,7 @@
       "${quote}${OUTPUT_DIR}/${TARGET}.data${quote}"
       ${OTHER_HIERARCHY_FILES}

-      COMMENT "Hierarchy Wrapping - checking vtk${KIT}Hierarchy.txt"
+      COMMENT "Hierarchy Wrapping - updating vtk${KIT}Hierarchy.txt"
       ${verbatim}
       )
   ELSE(NOT CMAKE_GENERATOR MATCHES "Visual Studio.*")
@@ -168,7 +168,7 @@
       "${quote}${OUTPUT_DIR}/${TARGET}.data${quote}"
       ${OTHER_HIERARCHY_FILES}

-      COMMENT "Hierarchy Wrapping - checking vtk${KIT}Hierarchy.txt"
+      COMMENT "Hierarchy Wrapping - updating vtk${KIT}Hierarchy.txt"
       ${verbatim}
       SOURCES ${INPUT_FILES}
       )


make fc_optional.cmake ready for ccache

make fc_optional.cmake ready for ccache

--- modules/fc_optional.cmake
+++ modules/fc_optional.cmake
@@ -31,9 +31,9 @@
 #   docopt: --fc=<FC> Fortran compiler [default: gfortran].
 #           --extra-fc-flags=<EXTRA_FCFLAGS> Extra Fortran compiler flags [default: ''].
 #           --fc-support=<FC_SUPPORT> Toggle Fortran language support (ON/OFF) [default: ON].
-#   export: 'FC=%s' % arguments['--fc']
-#   define: '-DEXTRA_FCFLAGS="%s"' % arguments['--extra-fc-flags']
-#           '-DENABLE_FC_SUPPORT="%s"' % arguments['--fc-support']
+#   export: 'FC="{0}"'.format(arguments['--fc'])
+#   define: '-DEXTRA_FCFLAGS="{0}"'.format(arguments['--extra-fc-flags'])
+#           '-DENABLE_FC_SUPPORT="{0}"'.format(arguments['--fc-support'])

 option(ENABLE_FC_SUPPORT "Enable Fortran language support" ON)


better assimp find, that hopefully handles more studios

--- cmake-modules/Findassimp.cmake
+++ cmake-modules/Findassimp.cmake
@@ -16,8 +16,31 @@
             ${ASSIMP_ROOT_DIR}/include
     )

-    # todo: determine version based on the compiler settings...
-    set(ASSIMP_MSVC_VERSION "vc142")
+    # code block stolen from assimp cmake file
+    if( MSVC70 OR MSVC71 )
+      set(MSVC_PREFIX "vc70")
+    elseif( MSVC80 )
+      set(MSVC_PREFIX "vc80")
+    elseif( MSVC90 )
+      set(MSVC_PREFIX "vc90")
+    elseif( MSVC10 )
+      set(MSVC_PREFIX "vc100")
+    elseif( MSVC11 )
+      set(MSVC_PREFIX "vc110")
+    elseif( MSVC12 )
+      set(MSVC_PREFIX "vc120")
+    elseif( MSVC_VERSION LESS 1910)
+      set(MSVC_PREFIX "vc140")
+    elseif( MSVC_VERSION LESS 1920)
+      set(MSVC_PREFIX "vc141")
+    elseif( MSVC_VERSION LESS 1930)
+      set(MSVC_PREFIX "vc142")
+    else()
+      MESSAGE(WARNING "unknown msvc version ${MSVC_VERSION}")
+      set(MSVC_PREFIX "vc150")
+    endif()
+
+    set(ASSIMP_MSVC_VERSION "${MSVC_PREFIX}")

     message(STATUS "CMAKE assimp msvc version ${ASSIMP_MSVC_VERSION}")


remove fPIC for mingw #68

remove fPIC for mingw #68

--- cmake/PlatformWindowsGCC.cmake
+++ cmake/PlatformWindowsGCC.cmake
@@ -46,7 +46,7 @@
       -Wall         # ->
       -Wextra       # ->
       -Werror       # ->
-      -fPIC         # -> use position independent code
+    # -fPIC         # -> use position independent code
       -Wreturn-type
       -Wfloat-equal
       -Wcast-align


specify python 2

specify python 2

--- cmake/TestForPythonEmbed.cmake
+++ cmake/TestForPythonEmbed.cmake
@@ -3,6 +3,7 @@
 #
 #  PYTHON_EMBEDABLE - True if embedable

+set(PythonLibs_FIND_VERSION "2")
 find_package(PythonLibs)
 if(UNIX OR LINUX)
     # Some systems require these libs to be added explicitly


Shouldn't have commited that

Shouldn't have commited that

svn path=/trunk/KDE/kdenetwork/cmake/modules/FindLibmsn.cmake; revision=884584

--- cmake/modules/FindLibmsn.cmake
+++ cmake/modules/FindLibmsn.cmake
@@ -15,8 +15,6 @@
 FIND_PATH(LIBMSN_INCLUDE_DIR msn.h
     PATHS ${CMAKE_INSTALL_PREFIX}
     PATH_SUFFIXES msn )
-
-MESSAGE(STATUS "blablabla ${LIBMSN_INCLUDE_DIR} ${CMAKE_INSTALL_PREFIX}")

 FIND_LIBRARY(LIBMSN_LIBRARIES NAMES msn libmsn
     PATHS ${CMAKE_INSTALL_PREFIX}


Process some link components that map to other expandable components
before the main loop. This is necessary because the loop ignores the
items added to `link_components' after it is entered.

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

--- cmake/modules/LLVMConfig.cmake
+++ cmake/modules/LLVMConfig.cmake
@@ -61,6 +61,19 @@
   set( link_components ${ARGN} )
   get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
   string(TOUPPER "${llvm_libs}" capitalized_libs)
+
+  # Expand some keywords:
+  list(FIND link_components "engine" engine_required)
+  if( engine_required )
+    # TODO: as we assume we are on X86, this is `jit'.
+    list(APPEND link_components "jit")
+    list(APPEND link_components "native")
+  endif()
+  list(FIND link_components "native" native_required)
+  if( native_required )
+    list(APPEND link_components "X86")
+  endif()
+
   # Translate symbolic component names to real libraries:
   foreach(c ${link_components})
     # add codegen, asmprinter, asmparser, disassembler
@@ -94,14 +107,13 @@
         list(APPEND expanded_components "LLVM${c}Disassembler")
       endif()
     elseif( c STREQUAL "native" )
-      list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
+      # already processed
     elseif( c STREQUAL "nativecodegen" )
       list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
     elseif( c STREQUAL "backend" )
       # same case as in `native'.
     elseif( c STREQUAL "engine" )
-      # TODO: as we assume we are on X86, this is `jit'.
-      list(APPEND expanded_components "LLVMJIT")
+      # already processed
     elseif( c STREQUAL "all" )
       list(APPEND expanded_components ${llvm_libs})
     else( NOT idx LESS 0 )


Tweak CMake component lookup, I misunderstood what was happening here.though. :(

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

--- cmake/modules/LLVMConfig.cmake
+++ cmake/modules/LLVMConfig.cmake
@@ -65,7 +65,6 @@
   foreach(c ${link_components})
     # add codegen/asmprinter
     list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
-    list(APPEND expanded_components "LLVM${c}Info")
     if( NOT idx LESS 0 )
       list(FIND llvm_libs "LLVM${c}CodeGen" idx)
       if( NOT idx LESS 0 )
@@ -81,6 +80,10 @@
       list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx)
       if( NOT asmidx LESS 0 )
         list(APPEND expanded_components "LLVM${c}AsmPrinter")
+      endif()
+      list(FIND llvm_libs "LLVM${c}Info" asmidx)
+      if( NOT asmidx LESS 0 )
+        list(APPEND expanded_components "LLVM${c}Info")
       endif()
     elseif( c STREQUAL "native" )
       # TODO: we assume ARCH is X86. In this case, we must use nativecodegen


[cmake] set variable in parent scope at very end

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -196,10 +196,6 @@
   IF(TARGET ${dictionary})
     target_sources(${dictionary} PRIVATE ${gensrcdict})
   ENDIF()
-  # FIXME: Do not set gensrcdict variable to the outer scope but use an argument to
-  # REFLEX_GENERATE_DICTIONARY passed from the outside. Note this would be a
-  # breaking change for roottest and other external users.
-  set(gensrcdict ${dictionary}.cxx PARENT_SCOPE)

   #---roottest compability---------------------------------
   if(CMAKE_ROOTTEST_DICT)
@@ -214,6 +210,11 @@
     # well before the dependent libraries of the dictionary are build
     add_custom_target(${targetname} ALL DEPENDS ${gensrcdict})
   endif()
+
+  # FIXME: Do not set gensrcdict variable to the outer scope but use an argument to
+  # REFLEX_GENERATE_DICTIONARY passed from the outside. Note this would be a
+  # breaking change for roottest and other external users.
+  set(gensrcdict ${dictionary}.cxx PARENT_SCOPE)

 endfunction()


Fix issue with overwriting CMAKE_<LANG>_FLAGS

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -354,15 +354,15 @@
 endif()

 set(CMAKE_C_FLAGS
-"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} -fobjc-abi-version=2 ${FOBJC_ARC} ${C_FLAGS}")
+"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_C_FLAGS}")
 # Hidden visibilty is required for C++ on iOS.
 set(CMAKE_CXX_FLAGS
-"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} -fvisibility-inlines-hidden -fobjc-abi-version=2 ${FOBJC_ARC} ${CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os -ffast-math ${BITCODE} ${CXX_FLAGS_MINSIZEREL}")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -DNDEBUG -O2 -g -ffast-math ${BITCODE} ${CXX_FLAGS_RELWITHDEBINFO}")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O3 -ffast-math ${BITCODE} ${CXX_FLAGS_RELEASE}")
-set(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${C_LINK_FLAGS}")
-set(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS}  -Wl,-search_paths_first ${CXX_LINK_FLAGS}")
+"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} -fvisibility-inlines-hidden -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_CXX_FLAGS}")
+set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_MINSIZEREL}")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -DNDEBUG -O2 -g -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O3 -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELEASE}")
+set(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
+set(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS}  -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")

 # In order to ensure that the updated compiler flags are used in try_compile()
 # tests, we have to forcibly set them in the CMake cache, not merely set them


updates models hash for testing

updates models hash for testing

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -16,7 +16,7 @@

 set(CTEST_PROJECT_NAME "Embree")
 set(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")
-set(TEST_MODELS_HASH f8dbe2a191be663d4fb5dc9d18c9f208ce147158)
+set(TEST_MODELS_HASH adeef7f50767e144cfa0b45af58f53bbcb615829)

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")


Bump version of develop branch

Bump version of develop branch

--- cmake/build-version.cmake
+++ cmake/build-version.cmake
@@ -19,7 +19,7 @@
   endif( )
   if( POLICY CMP0048 )
     cmake_policy( SET CMP0048 NEW )
-    project( ${PV_NAME} VERSION 0.2.0.0 LANGUAGES ${PV_LANGUAGES} )
+    project( ${PV_NAME} VERSION 0.3.0.0 LANGUAGES ${PV_LANGUAGES} )

   else( )
     project( ${PV_NAME} ${PV_LANGUAGES} )
@@ -29,7 +29,7 @@
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_MINOR )
-      set( ${PV_NAME}_VERSION_MINOR 2 )
+      set( ${PV_NAME}_VERSION_MINOR 3 )
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_PATCH )