fix building of FLTK widget opcodes with VS

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -57,7 +57,7 @@
 set(USE_COMPILER_OPTIMIZATIONS 1)
 set(USE_COREMIDI 0) # N/A
 set(USE_DOUBLE 1)
-set(USE_FLTK 0)
+set(USE_FLTK 1)
 set(USE_GETTEXT	0)
 set(USE_IPMIDI 1)
 set(USE_JACK 0) # N/A


* check: add checking bash-completion module;

--- check.cmake
+++ check.cmake
@@ -58,6 +58,9 @@
 # dependencies
 find_package(PkgConfig REQUIRED)

+# check bash-completion
+pkg_check_modules(BASH_COMPL bash-completion)
+
 # check libcap
 pkg_check_modules(CAP libcap)


BUG: Improve Python baseline comparison test image construction

Do not substitute other "."'s than the one in the file extension that may
be in the testing directory path.

--- CMake/ITKExamplesMacros.cmake
+++ CMake/ITKExamplesMacros.cmake
@@ -142,7 +142,10 @@

   if(ITK_WRAP_PYTHON AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/Code.py")
     set(python_test_name ${test_name}Python)
-    string(REPLACE . "Python." test_image "${test_image}")
+    get_filename_component(test_image_we "${test_image}" NAME_WE)
+    get_filename_component(test_image_dir "${test_image}" DIRECTORY)
+    get_filename_component(test_image_ext "${test_image}" EXT)
+    set(test_image "${test_image_dir}/${test_image_we}Python${test_image_ext}")

     # Add the comparison for the Python test output
     # Use the same baseline image as for the c++ output


Only warn when the source version is not available.

The SimpleITK version expects to be able to determine the version from
a git repository or from saved information from the repository. This
patch not produces a only a warning when the version information is
not properly available. The version will fallback to a non specific
"dev" without a number. This will test less thank any other version,
since it's not a proper version of SimpleITK.

--- CMake/sitkSourceVersion.cmake
+++ CMake/sitkSourceVersion.cmake
@@ -34,9 +34,16 @@
 # if there is not git directory we should be in a distributed package
 # which should contain this additional cmake file with the
 # _GIT_VERSION variables
-if(_GIT_VERSION_HASH STREQUAL "GITDIR-NOTFOUND")
+if(_GIT_VERSION_HASH STREQUAL "GITDIR-NOTFOUND" AND
+    EXISTS "${CMAKE_CURRENT_LIST_DIR}/sitkSourceVersionVars.cmake" )
   include( "${CMAKE_CURRENT_LIST_DIR}/sitkSourceVersionVars.cmake" )
   return()
+else()
+  message(WARNING "Unable to determine source version!\n
+Please use the git repository or an official source distribution.\n")
+  set(_GIT_VERSION_DEV "")
+  return()
+
 endif()

 if(_GIT_VERSION_HASH MATCHES "[a-fA-F0-9]+")


upgraded PythonQt.cmake to use PythonQt3 in the superbuild with Qt5 and 4

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -33,13 +33,6 @@

   # Enable Qt libraries PythonQt wrapping if required
   if (CTK_QT_VERSION VERSION_GREATER "4")
-    message(FATAL_ERROR "To build CTK with Qt >= 5 and wrapping enabled, you "
-                        "are currently required to provide your own PythonQt "
-                        "by re-configuring CTK with option "
-                        "-DPYTHONQT_INSTALL_DIR:PATH=/path/to/PythonQt-30-install")
-    list(APPEND ep_PythonQt_args
-      -DPythonQt_QT_VERSION:STRING=${CTK_QT_VERSION}
-      )
     set(qtlibs Core Gui Widgets Network OpenGL PrintSupport Sql Svg UiTools WebKit WebKitWidgets Xml)
   else()
     list(APPEND ep_PythonQt_args
@@ -47,6 +40,10 @@
       )
     set(qtlibs core gui network opengl sql svg uitools webkit xml)
   endif()
+
+  # Set desired qt version for PythonQt
+  list(APPEND ep_PythonQt_args -DDESIRED_QT_VERSION:STRING=${CTK_QT_VERSION})
+
   foreach(qtlib All ${qtlibs})
     string(TOUPPER ${qtlib} qtlib_uppercase)
     list(APPEND ep_PythonQt_args -DPythonQt_Wrap_Qt${qtlib}:BOOL=${CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QT${qtlib_uppercase}})


cmake BUGFIX ssh_threads linking

cmake BUGFIX ssh_threads linking

Fixes #627

--- CMakeModules/FindLibSSH.cmake
+++ CMakeModules/FindLibSSH.cmake
@@ -90,15 +90,15 @@

             if(LIBSSH_VERSION VERSION_LESS 0.8.0)
                 # libssh_threads also needs to be linked for these versions
-                string(REPLACE "libssh.so" ""
+                string(REPLACE "libssh.so" "libssh_threads.so"
                     LIBSSH_THREADS_LIBRARY
                     ${LIBSSH_LIBRARY}
                 )
-                string(REPLACE "libssh.dylib" ""
+                string(REPLACE "libssh.dylib" "libssh_threads.dylib"
                     LIBSSH_THREADS_LIBRARY
                     ${LIBSSH_THREADS_LIBRARY}
                 )
-                string(REPLACE "ssh.so" ""
+                string(REPLACE "ssh.so" "ssh_threads.so"
                     LIBSSH_THREADS_LIBRARY
                     ${LIBSSH_THREADS_LIBRARY}
                 )


Updated device side

Updated device side

--- 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 "705d0edc11d3cd5309055511aaeaf55f9fb578ec")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "bde814c917d27dd0e3b11fffe7c21bb44b1650cf")

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


Update FW before merge

Update FW before merge

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "bfb509700962dc4d8d78de9be30a49efa98e25f8")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "b2f48737e039cc1179e1a51e51ca3c3a4d4b5c13")

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


[ROOT-10636]Enable exception support in TBB

In MVSC it is enabled automatically. More about: https://software.intel.com/en-us/blogs/2014/08/28/exact-exception-propagation-in-the-intel-threading-building-blocks-library-and-c11

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1172,7 +1172,7 @@
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       PATCH_COMMAND sed -i -e "/clang -v/s@-v@--version@" build/macos.inc
       CONFIGURE_COMMAND ""
-      BUILD_COMMAND make ${_tbb_compiler} "CXXFLAGS=${_tbb_cxxflags}" CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}
+      BUILD_COMMAND make ${_tbb_compiler} cpp0x=1 "CXXFLAGS=${_tbb_cxxflags}" CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}
       INSTALL_COMMAND ${CMAKE_COMMAND} -Dinstall_dir=<INSTALL_DIR> -Dsource_dir=<SOURCE_DIR>
                                        -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
       INSTALL_COMMAND ""


Update builtin version of openssl to 1.0.2o

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -576,7 +576,7 @@
 #---Check for OpenSSL------------------------------------------------------------------
 if(ssl OR builtin_openssl)
   if(builtin_openssl)
-    set(OPENSSL_VERSION 1.0.2d)
+    set(OPENSSL_VERSION 1.0.2o)
     message(STATUS "Downloading and building OpenSSL version ${OPENSSL_VERSION}")
     if(APPLE)
       set(openssl_config_cmd ./Configure darwin64-x86_64-cc)
@@ -587,7 +587,7 @@
     ExternalProject_Add(
       OPENSSL
       URL ${lcgpackages}/openssl-${OPENSSL_VERSION}.tar.gz
-      URL_HASH SHA256=671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8
+      URL_HASH SHA256=ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d
       CONFIGURE_COMMAND ${openssl_config_cmd} no-shared --prefix=<INSTALL_DIR>
       BUILD_COMMAND make -j1 CC=${CMAKE_C_COMPILER}\ -fPIC
       INSTALL_COMMAND make install_sw


opentracing-cpp 1.6.0 SHA1 change to lowercase (#126)

--- cmake/projects/opentracing-cpp/hunter.cmake
+++ cmake/projects/opentracing-cpp/hunter.cmake
@@ -52,7 +52,7 @@
     PACKAGE_NAME opentracing-cpp
     VERSION "1.6.0"
     URL "https://github.com/opentracing/opentracing-cpp/archive/v1.6.0.tar.gz"
-    SHA1 "F5DCCF21DC05CDDB6205164A8FD3CF210926EF6C")
+    SHA1 "f5dccf21dc05cddb6205164a8fd3cf210926ef6c")

 hunter_cmake_args(opentracing-cpp CMAKE_ARGS
     BUILD_TESTING=OFF ENABLE_LINTING=OFF)


-BUG: missing }

-BUG: missing }

--- Testing/Dashboard/pxDashboardCommon.cmake
+++ Testing/Dashboard/pxDashboardCommon.cmake
@@ -129,7 +129,7 @@

   # Assume git version 1.6.5 or higher, which has git clone -b option.
   set( CTEST_CHECKOUT_COMMAND
-     "\"${CTEST_GIT_COMMAND}\" clone -b ${dashboard_git_branch} \"${dashboard_git_url}\" \"${CTEST_ITKTOOLS_DIRECTORY\"" )
+     "\"${CTEST_GIT_COMMAND}\" clone -b ${dashboard_git_branch} \"${dashboard_git_url}\" \"${CTEST_ITKTOOLS_DIRECTORY}\"" )

   # CTest delayed initialization is broken, so we copy the
   # CTestConfig.cmake info here.


set CPACK_DEBIAN_PACKAGE_REPLACES and CPACK_RPM_PACKAGE_OBSOLETES.

--- packaging/linux/LinuxPackaging.cmake
+++ packaging/linux/LinuxPackaging.cmake
@@ -51,9 +51,11 @@
 if(${DISTRIBUTOR_ID} MATCHES fc|fedora|Fedora|Centos|centos|SUSE|Suse|suse)
   set(CPACK_GENERATOR RPM)
   set(CPACK_RPM_PACKAGE_REQUIRES "qt, qtwebkit")
+  set(CPACK_RPM_PACKAGE_OBSOLETES medinria-all)
 else()
   set(CPACK_GENERATOR DEB)
   set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-sql-sqlite, libqt4-webkit")
+  set(CPACK_DEBIAN_PACKAGE_REPLACES medinria-all)
 endif()

 set(CPACK_GENERATOR "${CPACK_GENERATOR}" CACHE STRING "Type of package to build")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   03)
+SET(KWSYS_DATE_STAMP_DAY   04)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   20)
+SET(KWSYS_DATE_STAMP_DAY   21)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   04)
+SET(KWSYS_DATE_STAMP_DAY   05)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   24)
+SET(KWSYS_DATE_STAMP_DAY   25)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   14)
+SET(KWSYS_DATE_STAMP_DAY   15)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   12)
+SET(KWSYS_DATE_STAMP_DAY   13)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


Include targets from all configurations

Include targets from all configurations

Signed-off-by: Ralph Giles <65585f72bf62a11d2f4105aa30c20fe94efea46f@thaumas.net>
Signed-off-by: evpobr <5e0e5824270792833773a279da5678ebbd548119@gmail.com>

--- opusfileConfig.cmake
+++ opusfileConfig.cmake
@@ -4,5 +4,11 @@
   Opus
 )

-# TODO: include(...opusfileTargets-debug.cmake)?
 include("${CMAKE_CURRENT_LIST_DIR}/opusfileTargets.cmake")
+
+# Load information for each installed configuration.
+get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+file(GLOB CONFIG_FILES "${_DIR}/opusfileTargets-*.cmake")
+foreach(f ${CONFIG_FILES})
+  include(${f})
+endforeach()


Fix visibility

Fix visibility

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -127,7 +127,7 @@

             -Wreturn-stack-address
         >
-
+    PUBLIC
         $<$<PLATFORM_ID:Darwin>:
             -pthread
         >


changed abstract target naming

changed abstract target naming

Use output file base name instead of replacing full path by "___", as
full path may contain comma in volume part, which is invalid to be used
as a abstract target name.

--- cmake/FindCOMPRESSOR.cmake
+++ cmake/FindCOMPRESSOR.cmake
@@ -10,20 +10,21 @@

 #
 # usage: ZIP_FILES(output_file input [input2 input3 ...])
+# the output file will be created at cmake_current_binary_dir
 #
 function(ZIP_FILES OUTPUT_FILE)
     foreach(curr_file ${ARGN})
         if(IS_ABSOLUTE ${curr_file})
-            list(APPEND input_files ${curr_file})
+            list(APPEND input_files_full ${curr_file})
         else()
-            list(APPEND input_files ${CMAKE_CURRENT_SOURCE_DIR}/${curr_file})
+            list(APPEND input_files_full ${CMAKE_CURRENT_SOURCE_DIR}/${curr_file})
         endif()
     endforeach(curr_file)

     if(IS_ABSOLUTE ${OUTPUT_FILE})
-        set(output_file_use ${OUTPUT_FILE})
+        set(output_file_full ${OUTPUT_FILE})
     else()
-        set(output_file_use ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE})
+        set(output_file_full ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE})
     endif()

     get_filename_component(compressor_basename ${COMPRESSOR_EXECUTABLE} NAME_WE)
@@ -31,27 +32,26 @@
     # create zip archive using 7-zip
     if(compressor_basename STREQUAL 7z OR compressor_basename STREQUAL 7za)
         add_custom_command(
-            DEPENDS ${input_files}
-            OUTPUT ${output_file_use}
-            COMMAND ${COMPRESSOR_EXECUTABLE} a -tzip ${output_file_use} ${ARGN}
+            DEPENDS ${input_files_full}
+            OUTPUT ${output_file_full}
+            COMMAND ${COMPRESSOR_EXECUTABLE} a -tzip ${output_file_full} ${ARGN}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         )
     # create zip archive using zip
     elseif(compressor_basename STREQUAL zip)
         add_custom_command(
-            DEPENDS ${input_files}
-            OUTPUT ${output_file_use}
-            COMMAND ${COMPRESSOR_EXECUTABLE} ${output_file_use} ${ARGN}
+            DEPENDS ${input_files_full}
+            OUTPUT ${output_file_full}
+            COMMAND ${COMPRESSOR_EXECUTABLE} ${output_file_full} ${ARGN}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         )
     else()
         message(FATAL_ERROR "invalid compressor program base name: ${compressor_basename}")
     endif()

-    string(REPLACE "/" "___" zip_target ${output_file_use})
-    add_custom_target(ZIP_TARGET_${zip_target} ALL
-        DEPENDS ${output_file_use}
-        SOURCES ${input_files}
+    add_custom_target(${OUTPUT_FILE} ALL
+        DEPENDS ${output_file_full}
+        SOURCES ${input_files_full}
     )
 endfunction()


Support file locking on windows

Support file locking on windows

Former-commit-id: f76be35d6df5f8ec3cc7eb47e23e5a628bdb439e

--- cmake/InstallPackage.cmake
+++ cmake/InstallPackage.cmake
@@ -26,8 +26,11 @@
 # by running cmake in a subprocess. The current CMake configuration is transmitted
 # by setting the flags manually.
 function(install_package pkg_name)
-    file(LOCK $ENV{HOME}/cmake.${PROJECT_NAME}.lock GUARD FUNCTION TIMEOUT 600)
-
+    if(DEFINED ENV{HOME})
+        file(LOCK $ENV{HOME}/cmake.${PROJECT_NAME}.lock GUARD FUNCTION TIMEOUT 600)
+    elseif(DEFINED ENV{USERPROFILE})
+        file(LOCK $ENV{USERPROFILE}/cmake.${PROJECT_NAME}.lock GUARD FUNCTION TIMEOUT 600)
+    endif()
     set(options CONFIG MODULE CHECK QUIET DEBUG INSTALL_PREFIX_PKGNAME)
     set(oneValueArgs VERSION INSTALL_DIR BUILD_DIR FIND_NAME TARGET_NAME)
     set(multiValueArgs HINTS PATHS PATH_SUFFIXES COMPONENTS DEPENDS CMAKE_ARGS LIBRARY_NAMES TARGET_HINTS)


Make ${PROFILE} as multi-value parameter

--- cmake/Modules/UseODB.cmake
+++ cmake/Modules/UseODB.cmake
@@ -19,9 +19,8 @@
 		HEADER_PROLOGUE INLINE_PROLOGUE SOURCE_PROLOGUE
 		HEADER_EPILOGUE INLINE_EPILOGUE SOURCE_EPILOGUE
 		MULTI_DATABASE
-		PROFILE
 		X_CPP_OPTION)
-	set(multiValueParams FILES INCLUDE DB)
+	set(multiValueParams FILES INCLUDE DB PROFILE)

 	cmake_parse_arguments(PARAM "${options}" "${oneValueParams}" "${multiValueParams}" ${ARGN})

@@ -104,9 +103,9 @@
 		list(APPEND ODB_ARGS --cxx-epilogue-file "${PARAM_SOURCE_EPILOGUE}")
 	endif()

-	if(PARAM_PROFILE)
-		list(APPEND ODB_ARGS --profile "${PARAM_PROFILE}")
-	endif()
+	foreach(profile ${PARAM_PROFILE})
+		list(APPEND ODB_ARGS --profile "${profile}")
+	endforeach()

 	if(PARAM_X_CPP_OPTION)
 		list(APPEND ODB_ARGS -x "${PARAM_X_CPP_OPTION}")


Remove flag to disable warning.

Remove flag to disable warning.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -132,9 +132,7 @@
     # Propagate MSVC build flags.
     set(CMAKE_SUBBUILD_OPTIONS
         ${CMAKE_SUBBUILD_OPTIONS}
-        -A "${CMAKE_GENERATOR_PLATFORM}"
-        -DCMAKE_C_FLAGS="-wd4065"
-        -DCMAKE_CXX_FLAGS="-wd4065")
+        -A "${CMAKE_GENERATOR_PLATFORM}")
     if(MSVC_RUNTIME_LIBRARY_STATIC)
       set(CMAKE_SUBBUILD_OPTIONS
           ${CMAKE_SUBBUILD_OPTIONS}


Fix Windows build

Fix Windows build

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -40,6 +40,8 @@
     IF(CMAKE_GENERATOR MATCHES "Visual Studio")
       STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
     ENDIF()
+
+    set(comp "")
     IF(ARG_COMPONENT STREQUAL "Server")
       IF(target MATCHES "mysqld" OR type MATCHES "MODULE")
         #MESSAGE("PDB: ${targets}")
@@ -52,11 +54,12 @@
         OR ARG_COMPONENT MATCHES SharedLibraries
         OR ARG_COMPONENT MATCHES Embedded)
         SET(comp Debuginfo)
-      ELSE()
-        SET(comp Debuginfo_archive_only) # not in MSI
-      ENDIF()
-    ENDIF()
-
+      ENDIF()
+    ENDIF()
+
+    IF(NOT comp)
+      SET(comp Debuginfo_archive_only) # not in MSI
+    ENDIF()
     INSTALL(FILES ${pdb_location} DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
   ENDFOREACH()
   ENDIF()


fix clang errors

fix clang errors

--- cmake/megamol_config.cmake
+++ cmake/megamol_config.cmake
@@ -35,8 +35,9 @@
   # nothing to do
 elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
   add_compile_options("-fsized-deallocation") # TODO git history suggests this was required for cuda in 2019, still required?
+  add_compile_options("-Wno-narrowing" "-Wno-non-pod-varargs") # Prevent build fail.
 elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
-  add_compile_options("/MP /permissive- /Zc:twoPhase- /utf-8")
+  add_compile_options("/MP" "/permissive-" "/Zc:twoPhase-" "/utf-8")
   add_compile_definitions("NOMINMAX")
 else ()
   message(FATAL_ERROR "Unsupported compiler specified: '${CMAKE_CXX_COMPILER_ID}'")


chore(cmake/modules): refine sysdig cmake for minimal build

Signed-off-by: Leonardo Grasso <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@leonardograsso.com>

--- cmake/modules/sysdig.cmake
+++ cmake/modules/sysdig.cmake
@@ -17,8 +17,14 @@
 # this needs to be here at the top
 if(USE_BUNDLED_DEPS)
   # explicitly force this dependency to use the bundled OpenSSL
-  set(USE_BUNDLED_OPENSSL ON)
+  if(NOT MINIMAL_BUILD)
+    set(USE_BUNDLED_OPENSSL ON)
+  endif()
   set(USE_BUNDLED_JQ ON)
+endif()
+
+if(MINIMAL_BUILD)
+  set(MUSL_OPTIMIZED_BUILD ON)
 endif()

 file(MAKE_DIRECTORY ${SYSDIG_CMAKE_WORKING_DIR})


Support generator expr and old approach to listing package files.

--- pkg/CMakeCommon.cmake
+++ pkg/CMakeCommon.cmake
@@ -1,8 +1,12 @@
-function (find_lib_files PKG_INSTALL_LIBS PKG_INSTALL_LIBS_FILES)
+function (write_lib_files PKG_INSTALL_LIBS OUTPUT_FILE)
     # Find library file and add the versioned form of each library
     set(PKG_INSTALL_LIBS_FILES)
     foreach(l ${PKG_INSTALL_LIBS})
-        SET(TARGET_LOCATION $<TARGET_LINKER_FILE:${l}>)
+        IF(${CMAKE_MAJOR_VERSION} LESS 3)
+            get_target_property(TARGET_LOCATION ${l} LOCATION)
+        ELSE ()
+            SET(TARGET_LOCATION $<TARGET_LINKER_FILE:${l}>)
+        ENDIF()
         if (NOT TARGET_LOCATION)
             message(FATAL_ERROR "Target '${l}' could not be found.")
         endif ()
@@ -15,20 +19,28 @@
                         ${TARGET_LOCATION}.${NEKTAR_VERSION})
         endif()
     endforeach()
-    set(PKG_INSTALL_LIBS_FILES ${PKG_INSTALL_LIBS_FILES} PARENT_SCOPE)
+
+    # Output the list of files to be installed in the package
+    file(GENERATE OUTPUT "${OUTPUT_FILE}" CONTENT "${PKG_INSTALL_LIBS_FILES}")
 endfunction ()

-function (find_bin_files PKG_INSTALL_BINS PKG_INSTALL_BINS_FILES)
+function (write_bin_files PKG_INSTALL_BINS OUTPUT_FILE)
     # Find binary files
     set(PKG_INSTALL_BINS_FILES)
     foreach(b ${PKG_INSTALL_BINS})
-        SET(TARGET_LOCATION $<TARGET_FILE:${b}>)
+        IF(${CMAKE_MAJOR_VERSION} LESS 3)
+            get_target_property(TARGET_LOCATION ${b} LOCATION)
+        ELSE ()
+            SET(TARGET_LOCATION $<TARGET_FILE:${b}>)
+        ENDIF ()
         if (NOT TARGET_LOCATION)
             message(FATAL_ERROR "Target '${b}' could not be found.")
         endif ()
         list(APPEND PKG_INSTALL_BINS_FILES ${TARGET_LOCATION})
     endforeach()
-    set(PKG_INSTALL_BINS_FILES ${PKG_INSTALL_BINS_FILES} PARENT_SCOPE)
+
+    # Output the list of files to be installed in the package
+    file(GENERATE OUTPUT "${OUTPUT_FILE}" CONTENT "${PKG_INSTALL_BINS_FILES}")
 endfunction ()

 macro (add_deb_package)
@@ -41,15 +53,11 @@

         set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PKG_NAME}-deb)

-        find_lib_files("${PKG_INSTALL_LIBS}" PKG_INSTALL_LIBS_FILES)
-        find_bin_files("${PKG_INSTALL_BINS}" PKG_INSTALL_BINS_FILES)
-
-        # Output the list of files to be installed in the package
         file(MAKE_DIRECTORY "${BUILD_DIR}/targets")
-        file(GENERATE OUTPUT "${BUILD_DIR}/targets/install_libs.txt"
-             CONTENT "${PKG_INSTALL_LIBS_FILES}")
-        file(GENERATE OUTPUT "${BUILD_DIR}/targets/install_bins.txt"
-             CONTENT "${PKG_INSTALL_BINS_FILES}")
+        write_lib_files("${PKG_INSTALL_LIBS}"
+                        "${BUILD_DIR}/targets/install_libs.txt")
+        write_bin_files("${PKG_INSTALL_BINS}"
+                        "${BUILD_DIR}/targets/install_bins.txt")

         # Configure project for this package
         configure_file(CMakeListsDpkg.txt.in
@@ -80,15 +88,11 @@

         set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PKG_NAME}-rpm)

-        find_lib_files("${PKG_INSTALL_LIBS}" PKG_INSTALL_LIBS_FILES)
-        find_bin_files("${PKG_INSTALL_BINS}" PKG_INSTALL_BINS_FILES)
-
-        # Output the list of files to be installed in the package
         file(MAKE_DIRECTORY "${BUILD_DIR}/targets")
-        file(GENERATE OUTPUT "${BUILD_DIR}/targets/install_libs.txt"
-             CONTENT "${PKG_INSTALL_LIBS_FILES}")
-        file(GENERATE OUTPUT "${BUILD_DIR}/targets/install_bins.txt"
-             CONTENT "${PKG_INSTALL_BINS_FILES}")
+        write_lib_files("${PKG_INSTALL_LIBS}"
+                        "${BUILD_DIR}/targets/install_libs.txt")
+        write_bin_files("${PKG_INSTALL_BINS}"
+                        "${BUILD_DIR}/targets/install_bins.txt")

         configure_file(CMakeListsRpm.txt.in
                 ${BUILD_DIR}/CMakeLists.txt @ONLY)
@@ -116,15 +120,11 @@

     set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PKG_NAME}-tgz)

-    find_lib_files("${PKG_INSTALL_LIBS}" PKG_INSTALL_LIBS_FILES)
-    find_bin_files("${PKG_INSTALL_BINS}" PKG_INSTALL_BINS_FILES)
-
-    # Output the list of files to be installed in the package
     file(MAKE_DIRECTORY "${BUILD_DIR}/targets")
-    file(GENERATE OUTPUT "${BUILD_DIR}/targets/install_libs.txt"
-         CONTENT "${PKG_INSTALL_LIBS_FILES}")
-    file(GENERATE OUTPUT "${BUILD_DIR}/targets/install_bins.txt"
-         CONTENT "${PKG_INSTALL_BINS_FILES}")
+    write_lib_files("${PKG_INSTALL_LIBS}"
+                    "${BUILD_DIR}/targets/install_libs.txt")
+    write_bin_files("${PKG_INSTALL_BINS}"
+                    "${BUILD_DIR}/targets/install_bins.txt")

     configure_file(CMakeListsTgz.txt.in
                 ${BUILD_DIR}/CMakeLists.txt @ONLY)


xpSourceListAppend improvement: .devcontainer link

issue https://github.com/smanders/externpro/issues/338#issuecomment-1063110681

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1061,7 +1061,7 @@
         list(APPEND masterSrcList ${crFiles})
       endif()
       if(EXISTS ${_dir}/.devcontainer)
-        file(GLOB_RECURSE dcFiles "${_dir}/.devcontainer/*")
+        file(GLOB_RECURSE dcFiles "${_dir}/.devcontainer" "${_dir}/.devcontainer/*")
         source_group(".devcontainer" FILES ${dcFiles})
         list(APPEND masterSrcList ${dcFiles})
       endif()


can't use TARGET_FILE in 'make format' command without targets file

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -878,7 +878,7 @@
       list(LENGTH fmtFiles lenFmtFiles)
       xpGetPkgVar(clangformat EXE)
       add_custom_command(OUTPUT format_cmake
-        COMMAND $<TARGET_FILE:clang-format> -style=file -i ${fmtFiles}
+        COMMAND ${CLANGFORMAT_EXE} -style=file -i ${fmtFiles}
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
         COMMENT "Running clang-format on ${lenFmtFiles} files..."
         )


Reverted changes in version_config to point to sirf/master

--- version_config.cmake
+++ version_config.cmake
@@ -178,12 +178,10 @@
 # with devel build it uses latest version of upstream packages
 # otherwise uses the versions for current SIRF

-#set(DEFAULT_SIRF_URL https://github.com/SyneRBI/SIRF )
-set(DEFAULT_SIRF_URL https://github.com/johannesmayer/SIRF.git )
+set(DEFAULT_SIRF_URL https://github.com/SyneRBI/SIRF )
 if (DEVEL_BUILD)

-  #set (DEFAULT_SIRF_TAG origin/master)
-  set (DEFAULT_SIRF_TAG origin/rpe-encoding)
+  set (DEFAULT_SIRF_TAG origin/master)
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
   set(DEFAULT_STIR_TAG origin/master)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   08)
+SET(KWSYS_DATE_STAMP_DAY   09)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   12)
+SET(KWSYS_DATE_STAMP_DAY   13)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   08)
+SET(KWSYS_DATE_STAMP_DAY   09)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   08)
+SET(KWSYS_DATE_STAMP_DAY   09)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   09)
+SET(KWSYS_DATE_STAMP_DAY   10)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   25)
+SET(KWSYS_DATE_STAMP_DAY   26)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   04)
+SET(KWSYS_DATE_STAMP_DAY   05)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   13)
+SET(KWSYS_DATE_STAMP_DAY   14)


Upgrade to using ITK version 5.1b01

Upgrade to using ITK version 5.1b01

ITKV4 compatibility is enabled, along with not removing deprecated
code.

The goal of migration to ITKv5 for SimpleITK is to maintain a
compatible SimpleITK interface and provide as little disruption as
possible to the algorithms.

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

-set(_DEFAULT_ITK_GIT_TAG "28fd1cb66a77441e0a7999128c16e97e1b7291ff") # after 4.13.2 along release-4.13
+set(_DEFAULT_ITK_GIT_TAG "v5.1b01")
 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}")
@@ -77,7 +77,8 @@
 if( ITK_GIT_TAG STREQUAL _DEFAULT_ITK_GIT_TAG )
   # only remove legacy with the tested, and predefined version of ITK
   list( APPEND ep_itk_args
-    "-DITK_LEGACY_REMOVE:BOOL=ON"
+    "-DITK_LEGACY_REMOVE:BOOL=OFF"
+    "-DITKV4_COMPATIBILITY:BOOL=ON"
     )
 endif()


fix darwin cannot find libc++

fix darwin cannot find libc++

--- arcbuild/toolchains/android-ndk.cmake
+++ arcbuild/toolchains/android-ndk.cmake
@@ -207,6 +207,9 @@
   set(SDK_TOOLCHAIN clang)
   message(STATUS "No TOOLCHAIN is set, default is clang")
 endif()
+if(SDK_TOOLCHAIN STREQUAL "clang")
+  set(SDK_TOOLCHAIN_NAME "llvm")
+else()
 if(SDK_PROCESSOR STREQUAL "arm64")
   set(SDK_TOOLCHAIN_PREFIX "aarch64")
 elseif(SDK_PROCESSOR STREQUAL "amd64")
@@ -226,6 +229,7 @@
     break()
   endif()
 endforeach()
+endif()
 message(STATUS "Use the latest gcc toolchain '${SDK_TOOLCHAIN_NAME}'")
 file(GLOB SDK_TOOLCHAIN_ROOT "${SDK_ROOT}/toolchains/${SDK_TOOLCHAIN_NAME}/prebuilt/*")

@@ -291,7 +295,7 @@
                            "${SDK_STL_ROOT}/include" "${SDK_STL_ROOT}/libcxx/include"
                            "${SDK_ROOT}/sources/cxx-stl/llvm-libc++abi/include"
                            "${SDK_ROOT}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include")
-  set(SDK_STL_LDFLAGS      "-L${SDK_STL_ROOT}/libs/${SDK_ARCH_ABI}")
+  set(SDK_STL_LDFLAGS      "-L${SDK_STL_ROOT}/libs/${SDK_ARCH_ABI} -L${SDK_TOOLCHAIN_ROOT}/sysroot/usr/lib/${SDK_HEADER_TRIPLE}/${SDK_API_VERSION}")
   set(SDK_STL_LIB          "-l${SDK_STL} -lc++abi")
 else()
   message(FATAL_ERROR "Unknown NDK STL: ${SDK_STL}")
@@ -398,7 +402,7 @@
   -fstack-protector-strong
   -no-canonical-prefixes
   -Wa,--noexecstack
-  -Wformat -Werror=format-security)
+  -Wformat -Werror=format-security)

 # combine
 string(REPLACE ";" " " SDK_C_FLAGS          "${SDK_C_FLAGS}")


FIXME: disable a200t binaries installation

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

--- common/cmake/install.cmake
+++ common/cmake/install.cmake
@@ -29,6 +29,12 @@
   endif()

   set(INSTALL_FILES)
+
+  # FIXME: do not install a200t
+  if(${DEVICE} STREQUAL "xc7a200t")
+    message(STATUS "FIXME: Skipping device files installation for ${DEVICE}-${PACKAGE} type: ${DEVICE_TYPE}")
+    return()
+  endif()

   # Get files to be installed
   get_target_property_required(HAS_LOOKAHEAD ${DEVICE} "${PACKAGE}_HAS_LOOKAHEAD_CACHE")


only installing tutorial models if EMBREE_TUTORIAL is enabled

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -39,6 +39,7 @@
 ##############################################################
 # Install Headers
 ##############################################################
+
 INSTALL(DIRECTORY include/embree3 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel)
 IF (NOT WIN32)
   INSTALL(DIRECTORY man/man3 DESTINATION ${CMAKE_INSTALL_MANDIR} COMPONENT devel)
@@ -47,7 +48,10 @@
 ##############################################################
 # Install Models
 ##############################################################
-INSTALL(DIRECTORY tutorials/models DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
+
+IF (EMBREE_TUTORIALS)
+  INSTALL(DIRECTORY tutorials/models DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
+ENDIF()

 ##############################################################
 # Install Documentation


Remove bogus dependencies in syscall lib cmake file.

--- build/cmake/macros/CondorStdExeTest.cmake
+++ build/cmake/macros/CondorStdExeTest.cmake
@@ -36,14 +36,14 @@

 		#here is where cmake is not so good you can not easily access the object files :-( so rip them out
 		command_target( arx_${_CNDR_TARGET} ar "-x;lib${_CNDR_TARGET}.a" "${objs_${_CNDR_TARGET}}")
-		add_dependencies( arx_${_CNDR_TARGET} ${_CNDR_TARGET} ${_SRCS})
+		add_dependencies( arx_${_CNDR_TARGET} ${_CNDR_TARGET} )

 		# call condor compile, you will need to verify that make install has passed.
 		command_target( cc_${_CNDR_TARGET} ${CONDOR_COMPILE} "-condor_lib;${STDU_LIB_LOC};-condor_ld_dir;${STDU_LIB_LOC};${_COMPILER};-o;${CMAKE_CURRENT_BINARY_DIR}/${_CNDR_TARGET}.cndr.exe;${objs_${_CNDR_TARGET}};${_LINK_FLAGS}" "${CMAKE_CURRENT_BINARY_DIR}/${_CNDR_TARGET}.cndr.exe" )
-		add_dependencies( cc_${_CNDR_TARGET} arx_${_CNDR_TARGET} ${_SRCS})
+		add_dependencies( cc_${_CNDR_TARGET} arx_${_CNDR_TARGET} )

 		command_target( ca_${_CNDR_TARGET} ${CONDOR_ARCH_LINK} "${_CNDR_TARGET}.cndr.exe" "${CMAKE_CURRENT_BINARY_DIR}/${_CNDR_TARGET}.cndr.exe.LINUX.INTEL")
-		add_dependencies( ca_${_CNDR_TARGET} cc_${_CNDR_TARGET} ${_SRCS})
+		add_dependencies( ca_${_CNDR_TARGET} cc_${_CNDR_TARGET} )

 		append_var(CONDOR_TESTS ca_${_CNDR_TARGET})
 		set_target_properties( cc_${_CNDR_TARGET} ca_${_CNDR_TARGET} arx_${_CNDR_TARGET} PROPERTIES EXCLUDE_FROM_ALL TRUE)


cmake: Check that gbm is not enabled on Mac

Checks for GLX, EGL, and Wayland were present. GBM was the only check
missing.

Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

--- cmake/Modules/WaffleValidateOptions.cmake
+++ cmake/Modules/WaffleValidateOptions.cmake
@@ -53,6 +53,9 @@
                 "waffle_has_x11_egl, waffle_has_gbm.")
     endif()
 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+    if(waffle_has_gbm)
+        message(FATAL_ERROR "Option is not supported on Darwin: waffle_has_gbm.")
+    endif()
     if(waffle_has_glx)
         message(FATAL_ERROR "Option is not supported on Darwin: waffle_has_glx.")
     endif()


CMake, when a subdirectory name contain '/', this is change by '-'.

	* build-aux/cmake/modules/UModule.cmake: Here.

--- build-aux/cmake/modules/UModule.cmake
+++ build-aux/cmake/modules/UModule.cmake
@@ -99,12 +99,20 @@
     parse_arguments(UMODULE "DEPENDS" "" ${ARGN})
     list(LENGTH UMODULE_DEFAULT_ARGS args_length)
     list(GET UMODULE_DEFAULT_ARGS 0 UMODULE_DIR)
+    set(UMODULE_SOURCE_DIR ${UMODULE_DIR})
     if(args_length GREATER 1)
       list(GET UMODULE_DEFAULT_ARGS 1 UMODULE_BINARY_DIR)
+      set(UMODULE_DIR ${UMODULE_BINARY_DIR})
     else()
       set(UMODULE_BINARY_DIR)
     endif()
     set(UMODULE_LINKS)
+
+    # Change all '/' from UMODULE_DIR variable because it use to create
+    # target and output file, but we can't create file with '/' in his
+    # filename. So, this replace all '/' by '-'.
+    # FIXME: do this for Win32 directory separator (\)
+    string(REPLACE "/" "-" UMODULE_DIR ${UMODULE_DIR})

     foreach(i ${UMODULE_INSTALL_TYPES})
         set(${UMODULE_DIR}_${i}_SHARED_LIBRARIES)
@@ -134,7 +142,7 @@
         endforeach(UMODULE_DEPENDS_DIR)
     endif(UMODULE_DEPENDS)

-    add_subdirectory(${UMODULE_DIR} ${UMODULE_BINARY_DIR})
+    add_subdirectory(${UMODULE_SOURCE_DIR} ${UMODULE_BINARY_DIR})

 ENDMACRO(add_umodule)


revert CMINPACK_IS_STATIC cmake option for windows

non patched CMinpack cmake script doesn't add _s suffix when cminpack is static

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

--- cmake/Modules/FindCMinpack.cmake
+++ cmake/Modules/FindCMinpack.cmake
@@ -62,8 +62,13 @@
   message(STATUS "CMinPack found (include: ${CMINPACK_INCLUDE_DIRS}, libs: ${CMINPACK_LIBRARIES})")
   if(WIN32)
     get_filename_component(cminpack_lib ${CMINPACK_LIBRARY} NAME_WE)
+    set(CMINPACK_IS_STATIC_DEFAULT OFF)
     if("${cminpack_lib}" STREQUAL "cminpack_s")
+      set(CMINPACK_IS_STATIC_DEFAULT ON)
+    endif("${cminpack_lib}" STREQUAL "cminpack_s")
+    option(CMINPACK_IS_STATIC "Set to OFF if you use shared cminpack library." ${CMINPACK_IS_STATIC_DEFAULT})
+    if(CMINPACK_IS_STATIC)
       add_definitions(-DCMINPACK_NO_DLL)
-    endif("${cminpack_lib}" STREQUAL "cminpack_s")
+    endif(CMINPACK_IS_STATIC)
   endif(WIN32)
 endif(CMINPACK_FOUND)


Find Discount: Reformat CMake code

Find Discount: Reformat CMake code

--- cmake/Modules/FindDiscount.cmake
+++ cmake/Modules/FindDiscount.cmake
@@ -1,5 +1,5 @@
-
-#-------------------------------------------------------------------------------
+# ~~~
+# -------------------------------------------------------------------------------
 # Copyright (c) 2013-2013, Lars Baehren <lbaehren@gmail.com>
 # All rights reserved.
 #
@@ -22,8 +22,10 @@
 # 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.
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
+# ~~~

+# ~~~
 # DISCOUNT is a implementation of John Gruber's Markdown markup language.
 #
 # DISCOUNT is free software written by David Parsons <orc@pell.chi.il.us>;
@@ -36,71 +38,55 @@
 #  DISCOUNT_INCLUDES   = Include path for the header files of DISCOUNT
 #  DISCOUNT_LIBRARIES  = Link these to use DISCOUNT
 #  DISCOUNT_LFLAGS     = Linker flags (optional)
+# ~~~

 if (NOT DISCOUNT_FOUND)

-  if (NOT DISCOUNT_ROOT_DIR)
-    set (DISCOUNT_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
-  endif (NOT DISCOUNT_ROOT_DIR)
+	if (NOT DISCOUNT_ROOT_DIR)
+		set (DISCOUNT_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
+	endif (NOT DISCOUNT_ROOT_DIR)

-  ##____________________________________________________________________________
-  ## Check for the header files
+	# ____________________________________________________________________________
+	# Check for the header files

-  find_path (DISCOUNT_INCLUDES
-    NAMES mkdio.h
-    HINTS ${DISCOUNT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX}
-    PATH_SUFFIXES include
-    )
+	find_path (DISCOUNT_INCLUDES NAMES mkdio.h HINTS ${DISCOUNT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES include)

-  ##____________________________________________________________________________
-  ## Check for the library
+	# ____________________________________________________________________________
+	# Check for the library

-  find_library (DISCOUNT_LIBRARIES markdown
-    HINTS ${DISCOUNT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX}
-    PATH_SUFFIXES lib
-    )
+	find_library (DISCOUNT_LIBRARIES markdown HINTS ${DISCOUNT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES lib)

-  ##____________________________________________________________________________
-  ## Check for the executable
+	# ____________________________________________________________________________
+	# Check for the executable

-  find_program (MARKDOWN_EXECUTABLE markdown
-    HINTS ${DISCOUNT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX}
-    PATH_SUFFIXES bin
-    )
+	find_program (MARKDOWN_EXECUTABLE markdown HINTS ${DISCOUNT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES bin)

-  ##____________________________________________________________________________
-  ## Actions taken when all components have been found
+	# ____________________________________________________________________________
+	# Actions taken when all components have been found

-  find_package_handle_standard_args (DISCOUNT DEFAULT_MSG
-      DISCOUNT_LIBRARIES DISCOUNT_INCLUDES MARKDOWN_EXECUTABLE
-      )
+	find_package_handle_standard_args (DISCOUNT DEFAULT_MSG DISCOUNT_LIBRARIES DISCOUNT_INCLUDES MARKDOWN_EXECUTABLE)

-  if (DISCOUNT_FOUND)
-      ## Update DISCOUNT_ROOT DIR
-      get_filename_component (_name ${MARKDOWN_EXECUTABLE} NAME)
-      string (REGEX REPLACE "/bin/${_name}" "" DISCOUNT_ROOT_DIR ${MARKDOWN_EXECUTABLE})
-      ## Display variables
-      if (NOT DISCOUNT_FIND_QUIETLY)
-          message (STATUS "Found components for DISCOUNT")
-          message (STATUS "DISCOUNT_ROOT_DIR   = ${DISCOUNT_ROOT_DIR}")
-          message (STATUS "DISCOUNT_INCLUDES   = ${DISCOUNT_INCLUDES}")
-          message (STATUS "DISCOUNT_LIBRARIES  = ${DISCOUNT_LIBRARIES}")
-          message (STATUS "MARKDOWN_EXECUTABLE = ${MARKDOWN_EXECUTABLE}")
-      endif (NOT DISCOUNT_FIND_QUIETLY)
-  else (DISCOUNT_FOUND)
-      if (DISCOUNT_FIND_REQUIRED)
-          message (FATAL_ERROR "Could not find DISCOUNT!")
-      endif (DISCOUNT_FIND_REQUIRED)
-  endif (DISCOUNT_FOUND)
+	if (DISCOUNT_FOUND)

-  ##____________________________________________________________________________
-  ## Mark advanced variables
+		# Update DISCOUNT_ROOT DIR
+		get_filename_component (_name ${MARKDOWN_EXECUTABLE} NAME)
+		string (REGEX REPLACE "/bin/${_name}" "" DISCOUNT_ROOT_DIR ${MARKDOWN_EXECUTABLE}) # Display variables
+		if (NOT DISCOUNT_FIND_QUIETLY)
+			message (STATUS "Found components for DISCOUNT")
+			message (STATUS "DISCOUNT_ROOT_DIR   = ${DISCOUNT_ROOT_DIR}")
+			message (STATUS "DISCOUNT_INCLUDES   = ${DISCOUNT_INCLUDES}")
+			message (STATUS "DISCOUNT_LIBRARIES  = ${DISCOUNT_LIBRARIES}")
+			message (STATUS "MARKDOWN_EXECUTABLE = ${MARKDOWN_EXECUTABLE}")
+		endif (NOT DISCOUNT_FIND_QUIETLY)
+	else (DISCOUNT_FOUND)
+		if (DISCOUNT_FIND_REQUIRED)
+			message (FATAL_ERROR "Could not find DISCOUNT!")
+		endif (DISCOUNT_FIND_REQUIRED)
+	endif (DISCOUNT_FOUND)

-  mark_as_advanced (
-    DISCOUNT_ROOT_DIR
-    DISCOUNT_INCLUDES
-    DISCOUNT_LIBRARIES
-    MARKDOWN_EXECUTABLE
-    )
+	# ____________________________________________________________________________
+	# Mark advanced variables
+
+	mark_as_advanced (DISCOUNT_ROOT_DIR DISCOUNT_INCLUDES DISCOUNT_LIBRARIES MARKDOWN_EXECUTABLE)

 endif (NOT DISCOUNT_FOUND)


[cmake] Move CMAKE_(C|CXX)_COMPILER variables before CROSS_TOOLCHAIN_FLAGS so
they can be overridden when cross compiling.

Summary:
Since CROSS_TOOLCHAN_FLAGS can set CMAKE_(C|CXX)_COMPILER
variables, move the compiler variables up front so they can be
overridden.

This is a followup to https://reviews.llvm.org/D40229 committed in rL319620.

Thanks to Pavel Labath for reporting this issue.

Reviewers: labath, beanz

Subscribers: mgorny, llvm-commits

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

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -32,10 +32,10 @@

   add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
     COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
+        -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+        -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
         ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
         -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
-        -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-        -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
         -DLLVM_TARGETS_TO_BUILD=Native
         ${build_type_flags} ${linker_flag} ${external_clang_dir}
     WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}


avoid PPA build errors w/o assimp

avoid PPA build errors w/o assimp

--- cmakemodules/script_assimp.cmake
+++ cmakemodules/script_assimp.cmake
@@ -28,7 +28,7 @@
 	ENDIF (ASSIMP_FOUND)
 ENDIF(PKG_CONFIG_FOUND)

-IF (NOT ASSIMP_FOUND)
+IF (NOT ASSIMP_FOUND AND EXISTS "${MRPT_SOURCE_DIR}/otherlibs/assimp/")
 	SET(BUILD_ASSIMP ON CACHE BOOL "Build an embedded version of Assimp (3D models importer)")
 	IF (BUILD_ASSIMP)

@@ -84,7 +84,7 @@
 			)

 	ENDIF (BUILD_ASSIMP)
-ENDIF(NOT ASSIMP_FOUND)
+ENDIF()

 IF (ASSIMP_FOUND_VIA_CMAKE)
 	# override wrong target libs in -config.cmake file:


Updated xnnpack to commit f0cb70a1ae68c4b99047b7c5d26c40fa3a65f0e4 for cmake build.

Update for fp16 downloading path.

--- tensorflow/lite/tools/cmake/modules/fp16_headers.cmake
+++ tensorflow/lite/tools/cmake/modules/fp16_headers.cmake
@@ -24,7 +24,7 @@
   fp16_headers
   GIT_REPOSITORY https://github.com/Maratyszcza/FP16
   # GIT_TAG must keep in sync with https://github.com/google/XNNPACK/blob/master/cmake/DownloadFP16.cmake
-  GIT_TAG 3c54eacb74f6f5e39077300c5564156c424d77ba
+  GIT_TAG 0a92994d729ff76a58f692d3028ca1b64b145d91
   GIT_PROGRESS TRUE
   PREFIX "${CMAKE_BINARY_DIR}"
   SOURCE_DIR "${CMAKE_BINARY_DIR}/fp16_headers"


Fixed OgreInstallDependencies.cmake to copy the GLES DLL only if the GLES render system is selected.

--- Dependencies/OgreInstallDependencies.cmake
+++ Dependencies/OgreInstallDependencies.cmake
@@ -65,21 +65,45 @@
     ${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
 	  DESTINATION bin/minsizerel CONFIGURATIONS MinSizeRel
   )
+
+  # install GLES dlls
+  if (OGRE_BUILD_RENDERSYSTEM_GLES)
+	  install(FILES
+		${OGRE_DEP_BIN_DIR}/debug/libgles_cm.dll
+		  DESTINATION bin/debug CONFIGURATIONS Debug
+	  )
+	  install(FILES
+		${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
+		  DESTINATION bin/release CONFIGURATIONS Release None ""
+	  )
+	  install(FILES
+		${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
+		  DESTINATION bin/relwithdebinfo CONFIGURATIONS RelWithDebInfo
+	  )
+	  install(FILES
+		${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
+		  DESTINATION bin/minsizerel CONFIGURATIONS MinSizeRel
+	  )
+  endif ()
 endif ()

 # copy the required DLLs to the build directory (configure_file is the only copy-like op I found in CMake)
 configure_file(${OGRE_DEP_BIN_DIR}/debug/cg.dll ${OGRE_BINARY_DIR}/bin/debug/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/debug/OIS_d.dll ${OGRE_BINARY_DIR}/bin/debug/OIS_d.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/debug/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/debug/libgles_cm.dll COPYONLY)

 configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/release/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/release/OIS.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/release/libgles_cm.dll COPYONLY)

 configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/OIS.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/libgles_cm.dll COPYONLY)

 configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/minsizerel/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/minsizerel/OIS.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/minsizerel/libgles_cm.dll COPYONLY)
+
+if (OGRE_BUILD_RENDERSYSTEM_GLES)
+	configure_file(${OGRE_DEP_BIN_DIR}/debug/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/debug/libgles_cm.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/release/libgles_cm.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/libgles_cm.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/minsizerel/libgles_cm.dll COPYONLY)
+endif ()
+


Backport of (part of) bug #11760838 to 5.5. Enabled the ABI check to run on MacOSX.

--- cmake/abi_check.cmake
+++ cmake/abi_check.cmake
@@ -19,8 +19,16 @@
 # plugin_audit.h and plugin_ftparser.h.
 #
 # We use gcc specific preprocessing command and sed/diff, so it will
-# only be run  on Unix and only if gcc is used.
-IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME MATCHES "Linux")
+# only be run  on Unix and only if gcc is used. On some Unixes,
+# (Solaris) sed or diff might act differently from GNU, so we run only
+# on systems we can trust.
+IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Linux")
+ SET(RUN_ABI_CHECK 1)
+ELSE()
+ SET(RUN_ABI_CHECK 0)
+ENDIF()
+
+IF(CMAKE_COMPILER_IS_GNUCC AND RUN_ABI_CHECK)
   IF(CMAKE_C_COMPILER MATCHES "ccache$")
     SET(COMPILER ${CMAKE_C_COMPILER_ARG1})
     STRING(REGEX REPLACE "^ " "" COMPILER ${COMPILER})


VS2008 use FIXME_CMAKE_ABSOLUTE dev+

VS2008 use FIXME_CMAKE_ABSOLUTE dev+

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -17,6 +17,7 @@
   -DWIN32:BOOL=${WIN32}
   -DTARGET_TEST_SYSTEM:STRING=${TARGET_TEST_SYSTEM}
   -DTARGET_TEST_CMAKE_COMMAND:STRING=${TARGET_TEST_SYSTEM_COMMAND}
+  -DCMAKE_PROJECT_pcre2_INCLUDE=${FIXME_CMAKE_ABSOLUTE}
   )

 #


cmake: add checks for other X11 libraries

--- cmake/DPF-plugin.cmake
+++ cmake/DPF-plugin.cmake
@@ -445,7 +445,23 @@
     target_include_directories(dgl-system-libs INTERFACE "${X11_INCLUDE_DIR}")
     target_link_libraries(dgl-system-libs INTERFACE "${X11_X11_LIB}")
     target_compile_definitions(dgl-system-libs-definitions INTERFACE "HAVE_X11")
-  endif()
+    if(X11_Xext_FOUND)
+      target_link_libraries(dgl-system-libs INTERFACE "${X11_Xext_LIB}")
+      target_compile_definitions(dgl-system-libs-definitions INTERFACE "HAVE_XEXT")
+    endif()
+    if(X11_XSync_FOUND)
+      target_link_libraries(dgl-system-libs INTERFACE "${X11_XSync_LIB}")
+      target_compile_definitions(dgl-system-libs-definitions INTERFACE "HAVE_XSYNC")
+    endif()
+    if(X11_Xrandr_FOUND)
+      target_link_libraries(dgl-system-libs INTERFACE "${X11_Xrandr_LIB}")
+      target_compile_definitions(dgl-system-libs-definitions INTERFACE "HAVE_XRANDR")
+    endif()
+    #if(X11_Xcursor_FOUND)
+    #  target_link_libraries(dgl-system-libs INTERFACE "${X11_Xcursor_LIB}")
+    #  target_compile_definitions(dgl-system-libs-definitions INTERFACE "HAVE_XCURSOR")
+    #endif()
+   endif()
   target_link_libraries(dgl-system-libs INTERFACE dgl-system-libs-definitions)
 endfunction()


Possibility to set the geant3 location via GEANT3DIR

--- cmake/FindGEANT3.cmake
+++ cmake/FindGEANT3.cmake
@@ -5,19 +5,20 @@

 cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

+set(GEANT3DIR $ENV{GEANT3DIR})
 ALICE_RootConfig(GEANT3_PLATFORM --arch)

-find_path(GEANT3_SYSTEM_DIR NAMES TGeant3 PATHS ${ALICE}/geant3)
+find_path(GEANT3_SYSTEM_DIR NAMES TGeant3 PATHS ${ALICE}/geant3 ${GEANT3DIR})
 message(STATUS "GEANT3 system directory: ${GEANT3_SYSTEM_DIR}")

-find_path(GEANT3_INCLUDE_DIR NAMES TGeant3.h PATHS ${ALICE}/geant3/TGeant3)
+find_path(GEANT3_INCLUDE_DIR NAMES TGeant3.h PATHS ${ALICE}/geant3/TGeant3 ${GEANT3DIR}/TGeant3)
 message(STATUS "GEANT3 include directory: ${GEANT3_INCLUDE_DIR}")
 set(GEANT3_ROOT ${GEANT3_INCLUDE_DIR})

-find_path(GEANT3_LIBRARY_DIR NAMES libgeant321.so PATHS ${ALICE}/geant3/lib/tgt_${GEANT3_PLATFORM})
+find_path(GEANT3_LIBRARY_DIR NAMES libgeant321.so PATHS ${ALICE}/geant3/lib/tgt_${GEANT3_PLATFORM} ${GEANT3DIR}/lib/tgt_${GEANT3_PLATFORM})
 message(STATUS "GEANT3 library directory: ${GEANT3_LIBRARY_DIR}")

-find_library(GEANT3_LIB NAMES geant321 PATHS ${ALICE}/geant3/lib/tgt_${GEANT3_PLATFORM})
+find_library(GEANT3_LIB NAMES geant321 PATHS ${ALICE}/geant3/lib/tgt_${GEANT3_PLATFORM} ${GEANT3DIR}/lib/tgt_${GEANT3_PLATFORM})

 if (GEANT3_INCLUDE_DIR AND GEANT3_LIB AND GEANT3_SYSTEM_DIR)
    set(GEANT3_FOUND TRUE)


Updated FindRTFact macros

Updated FindRTFact macros

--- cmake/FindRTfact.cmake
+++ cmake/FindRTfact.cmake
@@ -23,7 +23,8 @@
 	## Now, try to find the rtfact library itself.
 	FIND_LIBRARY(RTFACT_OPT_LIBRARY
 		NAMES RTfactRemote
-		PATHS ${RTFACT_POSSIBLE_ROOT_DIRS} ${RTFACT_POSSIBLE_ROOT_DIRS}/remote/build ${RTFACT_POSSIBLE_ROOT_DIRS}/remote/build/Release
+		PATHS ${RTFACT_POSSIBLE_ROOT_DIRS} ${RTFACT_POSSIBLE_ROOT_DIRS}/remote/build ${RTFACT_POSSIBLE_ROOT_DIRS} ${RTFACT_POSSIBLE_ROOT_DIRS}/remote/build/lib ${RTFACT_POSSIBLE_ROOT_DIRS}/remote/build/Release ${RTFACT_POSSIBLE_ROOT_DIRS}/remote/build/lib/Release
+
 		PATH_SUFFIXES lib
 		DOC "RTfact library, optimized")


Update HunterGate

Update HunterGate

--- cmake/HunterGate.cmake
+++ cmake/HunterGate.cmake
@@ -44,10 +44,10 @@

 option(HUNTER_ENABLED "Enable Hunter package manager support" ON)
 if(HUNTER_ENABLED)
-    if(CMAKE_VERSION VERSION_LESS "3.0")
-        message(FATAL_ERROR "At least CMake version 3.0 required for hunter dependency management."
-            " Update CMake or set HUNTER_ENABLED to OFF.")
-    endif()
+  if(CMAKE_VERSION VERSION_LESS "3.0")
+    message(FATAL_ERROR "At least CMake version 3.0 required for hunter dependency management."
+      " Update CMake or set HUNTER_ENABLED to OFF.")
+  endif()
 endif()

 include(CMakeParseArguments) # cmake_parse_arguments
@@ -58,471 +58,483 @@
 set(HUNTER_WIKI "https://github.com/ruslo/hunter/wiki")

 function(hunter_gate_status_print)
-    foreach(print_message ${ARGV})
-        if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)
-            message(STATUS "[hunter] ${print_message}")
-        endif()
-    endforeach()
+  foreach(print_message ${ARGV})
+    if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)
+      message(STATUS "[hunter] ${print_message}")
+    endif()
+  endforeach()
 endfunction()

 function(hunter_gate_status_debug)
-    foreach(print_message ${ARGV})
-        if(HUNTER_STATUS_DEBUG)
-            string(TIMESTAMP timestamp)
-            message(STATUS "[hunter *** DEBUG *** ${timestamp}] ${print_message}")
-        endif()
-    endforeach()
+  foreach(print_message ${ARGV})
+    if(HUNTER_STATUS_DEBUG)
+      string(TIMESTAMP timestamp)
+      message(STATUS "[hunter *** DEBUG *** ${timestamp}] ${print_message}")
+    endif()
+  endforeach()
 endfunction()

 function(hunter_gate_wiki wiki_page)
-    message("------------------------------ WIKI -------------------------------")
-    message("    ${HUNTER_WIKI}/${wiki_page}")
-    message("-------------------------------------------------------------------")
-    message("")
-    message(FATAL_ERROR "")
+  message("------------------------------ WIKI -------------------------------")
+  message("    ${HUNTER_WIKI}/${wiki_page}")
+  message("-------------------------------------------------------------------")
+  message("")
+  message(FATAL_ERROR "")
 endfunction()

 function(hunter_gate_internal_error)
-    message("")
-    foreach(print_message ${ARGV})
-        message("[hunter ** INTERNAL **] ${print_message}")
-    endforeach()
-    message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
-    message("")
-    hunter_gate_wiki("error.internal")
+  message("")
+  foreach(print_message ${ARGV})
+    message("[hunter ** INTERNAL **] ${print_message}")
+  endforeach()
+  message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
+  message("")
+  hunter_gate_wiki("error.internal")
 endfunction()

 function(hunter_gate_fatal_error)
-    cmake_parse_arguments(hunter "" "WIKI" "" "${ARGV}")
-    string(COMPARE EQUAL "${hunter_WIKI}" "" have_no_wiki)
-    if(have_no_wiki)
-        hunter_gate_internal_error("Expected wiki")
-    endif()
-    message("")
-    foreach(x ${hunter_UNPARSED_ARGUMENTS})
-        message("[hunter ** FATAL ERROR **] ${x}")
-    endforeach()
-    message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
-    message("")
-    hunter_gate_wiki("${hunter_WIKI}")
+  cmake_parse_arguments(hunter "" "WIKI" "" "${ARGV}")
+  string(COMPARE EQUAL "${hunter_WIKI}" "" have_no_wiki)
+  if(have_no_wiki)
+    hunter_gate_internal_error("Expected wiki")
+  endif()
+  message("")
+  foreach(x ${hunter_UNPARSED_ARGUMENTS})
+    message("[hunter ** FATAL ERROR **] ${x}")
+  endforeach()
+  message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
+  message("")
+  hunter_gate_wiki("${hunter_WIKI}")
 endfunction()

 function(hunter_gate_user_error)
-    hunter_gate_fatal_error(${ARGV} WIKI "error.incorrect.input.data")
+  hunter_gate_fatal_error(${ARGV} WIKI "error.incorrect.input.data")
 endfunction()

 function(hunter_gate_self root version sha1 result)
-    string(COMPARE EQUAL "${root}" "" is_bad)
-    if(is_bad)
-        hunter_gate_internal_error("root is empty")
-    endif()
-
-    string(COMPARE EQUAL "${version}" "" is_bad)
-    if(is_bad)
-        hunter_gate_internal_error("version is empty")
-    endif()
-
-    string(COMPARE EQUAL "${sha1}" "" is_bad)
-    if(is_bad)
-        hunter_gate_internal_error("sha1 is empty")
-    endif()
-
-    string(SUBSTRING "${sha1}" 0 7 archive_id)
-
-    if(EXISTS "${root}/cmake/Hunter")
-        set(hunter_self "${root}")
-    else()
-        set(
-            hunter_self
-            "${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked"
-        )
-    endif()
-
-    set("${result}" "${hunter_self}" PARENT_SCOPE)
+  string(COMPARE EQUAL "${root}" "" is_bad)
+  if(is_bad)
+    hunter_gate_internal_error("root is empty")
+  endif()
+
+  string(COMPARE EQUAL "${version}" "" is_bad)
+  if(is_bad)
+    hunter_gate_internal_error("version is empty")
+  endif()
+
+  string(COMPARE EQUAL "${sha1}" "" is_bad)
+  if(is_bad)
+    hunter_gate_internal_error("sha1 is empty")
+  endif()
+
+  string(SUBSTRING "${sha1}" 0 7 archive_id)
+
+  if(EXISTS "${root}/cmake/Hunter")
+    set(hunter_self "${root}")
+  else()
+    set(
+        hunter_self
+        "${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked"
+    )
+  endif()
+
+  set("${result}" "${hunter_self}" PARENT_SCOPE)
 endfunction()

 # Set HUNTER_GATE_ROOT cmake variable to suitable value.
 function(hunter_gate_detect_root)
-    # Check CMake variable
-    string(COMPARE NOTEQUAL "${HUNTER_ROOT}" "" not_empty)
-    if(not_empty)
-        set(HUNTER_GATE_ROOT "${HUNTER_ROOT}" PARENT_SCOPE)
-        hunter_gate_status_debug("HUNTER_ROOT detected by cmake variable")
-        return()
-    endif()
-
-    # Check environment variable
-    string(COMPARE NOTEQUAL "$ENV{HUNTER_ROOT}" "" not_empty)
-    if(not_empty)
-        set(HUNTER_GATE_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE)
-        hunter_gate_status_debug("HUNTER_ROOT detected by environment variable")
-        return()
-    endif()
-
-    # Check HOME environment variable
-    string(COMPARE NOTEQUAL "$ENV{HOME}" "" result)
+  # Check CMake variable
+  string(COMPARE NOTEQUAL "${HUNTER_ROOT}" "" not_empty)
+  if(not_empty)
+    set(HUNTER_GATE_ROOT "${HUNTER_ROOT}" PARENT_SCOPE)
+    hunter_gate_status_debug("HUNTER_ROOT detected by cmake variable")
+    return()
+  endif()
+
+  # Check environment variable
+  string(COMPARE NOTEQUAL "$ENV{HUNTER_ROOT}" "" not_empty)
+  if(not_empty)
+    set(HUNTER_GATE_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE)
+    hunter_gate_status_debug("HUNTER_ROOT detected by environment variable")
+    return()
+  endif()
+
+  # Check HOME environment variable
+  string(COMPARE NOTEQUAL "$ENV{HOME}" "" result)
+  if(result)
+    set(HUNTER_GATE_ROOT "$ENV{HOME}/.hunter" PARENT_SCOPE)
+    hunter_gate_status_debug("HUNTER_ROOT set using HOME environment variable")
+    return()
+  endif()
+
+  # Check SYSTEMDRIVE and USERPROFILE environment variable (windows only)
+  if(WIN32)
+    string(COMPARE NOTEQUAL "$ENV{SYSTEMDRIVE}" "" result)
     if(result)
-        set(HUNTER_GATE_ROOT "$ENV{HOME}/.hunter" PARENT_SCOPE)
-        hunter_gate_status_debug("HUNTER_ROOT set using HOME environment variable")
-        return()
-    endif()
-
-    # Check SYSTEMDRIVE and USERPROFILE environment variable (windows only)
-    if(WIN32)
-        string(COMPARE NOTEQUAL "$ENV{SYSTEMDRIVE}" "" result)
-        if(result)
-            set(HUNTER_GATE_ROOT "$ENV{SYSTEMDRIVE}/.hunter" PARENT_SCOPE)
-            hunter_gate_status_debug(
-                "HUNTER_ROOT set using SYSTEMDRIVE environment variable"
-            )
-            return()
-        endif()
-
-        string(COMPARE NOTEQUAL "$ENV{USERPROFILE}" "" result)
-        if(result)
-            set(HUNTER_GATE_ROOT "$ENV{USERPROFILE}/.hunter" PARENT_SCOPE)
-            hunter_gate_status_debug(
-                "HUNTER_ROOT set using USERPROFILE environment variable"
-            )
-            return()
-        endif()
-    endif()
-
+      set(HUNTER_GATE_ROOT "$ENV{SYSTEMDRIVE}/.hunter" PARENT_SCOPE)
+      hunter_gate_status_debug(
+          "HUNTER_ROOT set using SYSTEMDRIVE environment variable"
+      )
+      return()
+    endif()
+
+    string(COMPARE NOTEQUAL "$ENV{USERPROFILE}" "" result)
+    if(result)
+      set(HUNTER_GATE_ROOT "$ENV{USERPROFILE}/.hunter" PARENT_SCOPE)
+      hunter_gate_status_debug(
+          "HUNTER_ROOT set using USERPROFILE environment variable"
+      )
+      return()
+    endif()
+  endif()
+
+  hunter_gate_fatal_error(
+      "Can't detect HUNTER_ROOT"
+      WIKI "error.detect.hunter.root"
+  )
+endfunction()
+
+macro(hunter_gate_lock dir)
+  if(NOT HUNTER_SKIP_LOCK)
+    if("${CMAKE_VERSION}" VERSION_LESS "3.2")
+      hunter_gate_fatal_error(
+          "Can't lock, upgrade to CMake 3.2 or use HUNTER_SKIP_LOCK"
+          WIKI "error.can.not.lock"
+      )
+    endif()
+    hunter_gate_status_debug("Locking directory: ${dir}")
+    file(LOCK "${dir}" DIRECTORY GUARD FUNCTION)
+    hunter_gate_status_debug("Lock done")
+  endif()
+endmacro()
+
+function(hunter_gate_download dir)
+  string(
+      COMPARE
+      NOTEQUAL
+      "$ENV{HUNTER_DISABLE_AUTOINSTALL}"
+      ""
+      disable_autoinstall
+  )
+  if(disable_autoinstall AND NOT HUNTER_RUN_INSTALL)
     hunter_gate_fatal_error(
-        "Can't detect HUNTER_ROOT"
-        WIKI "error.detect.hunter.root"
-    )
-endfunction()
-
-macro(hunter_gate_lock dir)
-    if(NOT HUNTER_SKIP_LOCK)
-        if("${CMAKE_VERSION}" VERSION_LESS "3.2")
-            hunter_gate_fatal_error(
-                "Can't lock, upgrade to CMake 3.2 or use HUNTER_SKIP_LOCK"
-                WIKI "error.can.not.lock"
-            )
-        endif()
-        hunter_gate_status_debug("Locking directory: ${dir}")
-        file(LOCK "${dir}" DIRECTORY GUARD FUNCTION)
-        hunter_gate_status_debug("Lock done")
-    endif()
-endmacro()
-
-function(hunter_gate_download dir)
-    string(
-        COMPARE
-        NOTEQUAL
-        "$ENV{HUNTER_DISABLE_AUTOINSTALL}"
-        ""
-        disable_autoinstall
-    )
-    if(disable_autoinstall AND NOT HUNTER_RUN_INSTALL)
-        hunter_gate_fatal_error(
-            "Hunter not found in '${dir}'"
-            "Set HUNTER_RUN_INSTALL=ON to auto-install it from '${HUNTER_GATE_URL}'"
-            "Settings:"
-            "  HUNTER_ROOT: ${HUNTER_GATE_ROOT}"
-            "  HUNTER_SHA1: ${HUNTER_GATE_SHA1}"
-            WIKI "error.run.install"
-        )
-    endif()
-    string(COMPARE EQUAL "${dir}" "" is_bad)
-    if(is_bad)
-        hunter_gate_internal_error("Empty 'dir' argument")
-    endif()
-
-    string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" is_bad)
-    if(is_bad)
-        hunter_gate_internal_error("HUNTER_GATE_SHA1 empty")
-    endif()
-
-    string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" is_bad)
-    if(is_bad)
-        hunter_gate_internal_error("HUNTER_GATE_URL empty")
-    endif()
-
-    set(done_location "${dir}/DONE")
-    set(sha1_location "${dir}/SHA1")
-
-    set(build_dir "${dir}/Build")
-    set(cmakelists "${dir}/CMakeLists.txt")
-
-    hunter_gate_lock("${dir}")
-    if(EXISTS "${done_location}")
-        # while waiting for lock other instance can do all the job
-        hunter_gate_status_debug("File '${done_location}' found, skip install")
-        return()
-    endif()
-
-    file(REMOVE_RECURSE "${build_dir}")
-    file(REMOVE_RECURSE "${cmakelists}")
-
-    file(MAKE_DIRECTORY "${build_dir}") # check directory permissions
-
-    # Disabling languages speeds up a little bit, reduces noise in the output
-    # and avoids path too long windows error
-    file(
-        WRITE
-        "${cmakelists}"
-        "cmake_minimum_required(VERSION 3.0)\n"
-        "project(HunterDownload LANGUAGES NONE)\n"
-        "include(ExternalProject)\n"
-        "ExternalProject_Add(\n"
-        "    Hunter\n"
-        "    URL\n"
-        "    \"${HUNTER_GATE_URL}\"\n"
-        "    URL_HASH\n"
-        "    SHA1=${HUNTER_GATE_SHA1}\n"
-        "    DOWNLOAD_DIR\n"
-        "    \"${dir}\"\n"
-        "    SOURCE_DIR\n"
-        "    \"${dir}/Unpacked\"\n"
-        "    CONFIGURE_COMMAND\n"
-        "    \"\"\n"
-        "    BUILD_COMMAND\n"
-        "    \"\"\n"
-        "    INSTALL_COMMAND\n"
-        "    \"\"\n"
-        ")\n"
-    )
-
-    if(HUNTER_STATUS_DEBUG)
-        set(logging_params "")
-    else()
-        set(logging_params OUTPUT_QUIET)
-    endif()
-
-    hunter_gate_status_debug("Run generate")
-
-    # Need to add toolchain file too.
-    # Otherwise on Visual Studio + MDD this will fail with error:
-    # "Could not find an appropriate version of the Windows 10 SDK installed on this machine"
-    if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
-        set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
-    else()
-        # 'toolchain_arg' can't be empty
-        set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=")
-    endif()
-
-    string(COMPARE EQUAL "${CMAKE_MAKE_PROGRAM}" "" no_make)
-    if(no_make)
-        set(make_arg "")
-    else()
-        # Test case: remove Ninja from PATH but set it via CMAKE_MAKE_PROGRAM
-        set(make_arg "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}")
-    endif()
-
-    execute_process(
-        COMMAND
-        "${CMAKE_COMMAND}"
-        "-H${dir}"
-        "-B${build_dir}"
-        "-G${CMAKE_GENERATOR}"
-        "${toolchain_arg}"
-        ${make_arg}
-        WORKING_DIRECTORY "${dir}"
-        RESULT_VARIABLE download_result
-        ${logging_params}
-    )
-
-    if(NOT download_result EQUAL 0)
-        hunter_gate_internal_error("Configure project failed")
-    endif()
-
-    hunter_gate_status_print(
-        "Initializing Hunter workspace (${HUNTER_GATE_SHA1})"
-        "  ${HUNTER_GATE_URL}"
-        "  -> ${dir}"
-    )
-    execute_process(
-        COMMAND "${CMAKE_COMMAND}" --build "${build_dir}"
-        WORKING_DIRECTORY "${dir}"
-        RESULT_VARIABLE download_result
-        ${logging_params}
-    )
-
-    if(NOT download_result EQUAL 0)
-        hunter_gate_internal_error("Build project failed")
-    endif()
-
-    file(REMOVE_RECURSE "${build_dir}")
-    file(REMOVE_RECURSE "${cmakelists}")
-
-    file(WRITE "${sha1_location}" "${HUNTER_GATE_SHA1}")
-    file(WRITE "${done_location}" "DONE")
-
-    hunter_gate_status_debug("Finished")
+        "Hunter not found in '${dir}'"
+        "Set HUNTER_RUN_INSTALL=ON to auto-install it from '${HUNTER_GATE_URL}'"
+        "Settings:"
+        "  HUNTER_ROOT: ${HUNTER_GATE_ROOT}"
+        "  HUNTER_SHA1: ${HUNTER_GATE_SHA1}"
+        WIKI "error.run.install"
+    )
+  endif()
+  string(COMPARE EQUAL "${dir}" "" is_bad)
+  if(is_bad)
+    hunter_gate_internal_error("Empty 'dir' argument")
+  endif()
+
+  string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" is_bad)
+  if(is_bad)
+    hunter_gate_internal_error("HUNTER_GATE_SHA1 empty")
+  endif()
+
+  string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" is_bad)
+  if(is_bad)
+    hunter_gate_internal_error("HUNTER_GATE_URL empty")
+  endif()
+
+  set(done_location "${dir}/DONE")
+  set(sha1_location "${dir}/SHA1")
+
+  set(build_dir "${dir}/Build")
+  set(cmakelists "${dir}/CMakeLists.txt")
+
+  hunter_gate_lock("${dir}")
+  if(EXISTS "${done_location}")
+    # while waiting for lock other instance can do all the job
+    hunter_gate_status_debug("File '${done_location}' found, skip install")
+    return()
+  endif()
+
+  file(REMOVE_RECURSE "${build_dir}")
+  file(REMOVE_RECURSE "${cmakelists}")
+
+  file(MAKE_DIRECTORY "${build_dir}") # check directory permissions
+
+  # Disabling languages speeds up a little bit, reduces noise in the output
+  # and avoids path too long windows error
+  file(
+      WRITE
+      "${cmakelists}"
+      "cmake_minimum_required(VERSION 3.0)\n"
+      "project(HunterDownload LANGUAGES NONE)\n"
+      "include(ExternalProject)\n"
+      "ExternalProject_Add(\n"
+      "    Hunter\n"
+      "    URL\n"
+      "    \"${HUNTER_GATE_URL}\"\n"
+      "    URL_HASH\n"
+      "    SHA1=${HUNTER_GATE_SHA1}\n"
+      "    DOWNLOAD_DIR\n"
+      "    \"${dir}\"\n"
+      "    SOURCE_DIR\n"
+      "    \"${dir}/Unpacked\"\n"
+      "    CONFIGURE_COMMAND\n"
+      "    \"\"\n"
+      "    BUILD_COMMAND\n"
+      "    \"\"\n"
+      "    INSTALL_COMMAND\n"
+      "    \"\"\n"
+      ")\n"
+  )
+
+  if(HUNTER_STATUS_DEBUG)
+    set(logging_params "")
+  else()
+    set(logging_params OUTPUT_QUIET)
+  endif()
+
+  hunter_gate_status_debug("Run generate")
+
+  # Need to add toolchain file too.
+  # Otherwise on Visual Studio + MDD this will fail with error:
+  # "Could not find an appropriate version of the Windows 10 SDK installed on this machine"
+  if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
+    get_filename_component(absolute_CMAKE_TOOLCHAIN_FILE "${CMAKE_TOOLCHAIN_FILE}" ABSOLUTE)
+    set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=${absolute_CMAKE_TOOLCHAIN_FILE}")
+  else()
+    # 'toolchain_arg' can't be empty
+    set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=")
+  endif()
+
+  string(COMPARE EQUAL "${CMAKE_MAKE_PROGRAM}" "" no_make)
+  if(no_make)
+    set(make_arg "")
+  else()
+    # Test case: remove Ninja from PATH but set it via CMAKE_MAKE_PROGRAM
+    set(make_arg "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}")
+  endif()
+
+  execute_process(
+      COMMAND
+      "${CMAKE_COMMAND}"
+      "-H${dir}"
+      "-B${build_dir}"
+      "-G${CMAKE_GENERATOR}"
+      "${toolchain_arg}"
+      ${make_arg}
+      WORKING_DIRECTORY "${dir}"
+      RESULT_VARIABLE download_result
+      ${logging_params}
+  )
+
+  if(NOT download_result EQUAL 0)
+    hunter_gate_internal_error("Configure project failed")
+  endif()
+
+  hunter_gate_status_print(
+      "Initializing Hunter workspace (${HUNTER_GATE_SHA1})"
+      "  ${HUNTER_GATE_URL}"
+      "  -> ${dir}"
+  )
+  execute_process(
+      COMMAND "${CMAKE_COMMAND}" --build "${build_dir}"
+      WORKING_DIRECTORY "${dir}"
+      RESULT_VARIABLE download_result
+      ${logging_params}
+  )
+
+  if(NOT download_result EQUAL 0)
+    hunter_gate_internal_error("Build project failed")
+  endif()
+
+  file(REMOVE_RECURSE "${build_dir}")
+  file(REMOVE_RECURSE "${cmakelists}")
+
+  file(WRITE "${sha1_location}" "${HUNTER_GATE_SHA1}")
+  file(WRITE "${done_location}" "DONE")
+
+  hunter_gate_status_debug("Finished")
 endfunction()

 # Must be a macro so master file 'cmake/Hunter' can
 # apply all variables easily just by 'include' command
 # (otherwise PARENT_SCOPE magic needed)
 macro(HunterGate)
-    if(HUNTER_GATE_DONE)
-        # variable HUNTER_GATE_DONE set explicitly for external project
-        # (see `hunter_download`)
-        set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
-    endif()
-
-    # First HunterGate command will init Hunter, others will be ignored
-    get_property(_hunter_gate_done GLOBAL PROPERTY HUNTER_GATE_DONE SET)
-
-    if(NOT HUNTER_ENABLED)
-        # Empty function to avoid error "unknown function"
-        function(hunter_add_package)
-        endfunction()
-    elseif(_hunter_gate_done)
-        hunter_gate_status_debug("Secondary HunterGate (use old settings)")
-        hunter_gate_self(
-            "${HUNTER_CACHED_ROOT}"
-            "${HUNTER_VERSION}"
-            "${HUNTER_SHA1}"
-            _hunter_self
+  if(HUNTER_GATE_DONE)
+    # variable HUNTER_GATE_DONE set explicitly for external project
+    # (see `hunter_download`)
+    set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
+  endif()
+
+  # First HunterGate command will init Hunter, others will be ignored
+  get_property(_hunter_gate_done GLOBAL PROPERTY HUNTER_GATE_DONE SET)
+
+  if(NOT HUNTER_ENABLED)
+    # Empty function to avoid error "unknown function"
+    function(hunter_add_package)
+    endfunction()
+
+    set(
+        _hunter_gate_disabled_mode_dir
+        "${CMAKE_CURRENT_LIST_DIR}/cmake/Hunter/disabled-mode"
+    )
+    if(EXISTS "${_hunter_gate_disabled_mode_dir}")
+      hunter_gate_status_debug(
+          "Adding \"disabled-mode\" modules: ${_hunter_gate_disabled_mode_dir}"
+      )
+      list(APPEND CMAKE_PREFIX_PATH "${_hunter_gate_disabled_mode_dir}")
+    endif()
+  elseif(_hunter_gate_done)
+    hunter_gate_status_debug("Secondary HunterGate (use old settings)")
+    hunter_gate_self(
+        "${HUNTER_CACHED_ROOT}"
+        "${HUNTER_VERSION}"
+        "${HUNTER_SHA1}"
+        _hunter_self
+    )
+    include("${_hunter_self}/cmake/Hunter")
+  else()
+    set(HUNTER_GATE_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
+
+    string(COMPARE NOTEQUAL "${PROJECT_NAME}" "" _have_project_name)
+    if(_have_project_name)
+      hunter_gate_fatal_error(
+          "Please set HunterGate *before* 'project' command. "
+          "Detected project: ${PROJECT_NAME}"
+          WIKI "error.huntergate.before.project"
+      )
+    endif()
+
+    cmake_parse_arguments(
+        HUNTER_GATE "LOCAL" "URL;SHA1;GLOBAL;FILEPATH" "" ${ARGV}
+    )
+
+    string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" _empty_sha1)
+    string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" _empty_url)
+    string(
+        COMPARE
+        NOTEQUAL
+        "${HUNTER_GATE_UNPARSED_ARGUMENTS}"
+        ""
+        _have_unparsed
+    )
+    string(COMPARE NOTEQUAL "${HUNTER_GATE_GLOBAL}" "" _have_global)
+    string(COMPARE NOTEQUAL "${HUNTER_GATE_FILEPATH}" "" _have_filepath)
+
+    if(_have_unparsed)
+      hunter_gate_user_error(
+          "HunterGate unparsed arguments: ${HUNTER_GATE_UNPARSED_ARGUMENTS}"
+      )
+    endif()
+    if(_empty_sha1)
+      hunter_gate_user_error("SHA1 suboption of HunterGate is mandatory")
+    endif()
+    if(_empty_url)
+      hunter_gate_user_error("URL suboption of HunterGate is mandatory")
+    endif()
+    if(_have_global)
+      if(HUNTER_GATE_LOCAL)
+        hunter_gate_user_error("Unexpected LOCAL (already has GLOBAL)")
+      endif()
+      if(_have_filepath)
+        hunter_gate_user_error("Unexpected FILEPATH (already has GLOBAL)")
+      endif()
+    endif()
+    if(HUNTER_GATE_LOCAL)
+      if(_have_global)
+        hunter_gate_user_error("Unexpected GLOBAL (already has LOCAL)")
+      endif()
+      if(_have_filepath)
+        hunter_gate_user_error("Unexpected FILEPATH (already has LOCAL)")
+      endif()
+    endif()
+    if(_have_filepath)
+      if(_have_global)
+        hunter_gate_user_error("Unexpected GLOBAL (already has FILEPATH)")
+      endif()
+      if(HUNTER_GATE_LOCAL)
+        hunter_gate_user_error("Unexpected LOCAL (already has FILEPATH)")
+      endif()
+    endif()
+
+    hunter_gate_detect_root() # set HUNTER_GATE_ROOT
+
+    # Beautify path, fix probable problems with windows path slashes
+    get_filename_component(
+        HUNTER_GATE_ROOT "${HUNTER_GATE_ROOT}" ABSOLUTE
+    )
+    hunter_gate_status_debug("HUNTER_ROOT: ${HUNTER_GATE_ROOT}")
+    if(NOT HUNTER_ALLOW_SPACES_IN_PATH)
+      string(FIND "${HUNTER_GATE_ROOT}" " " _contain_spaces)
+      if(NOT _contain_spaces EQUAL -1)
+        hunter_gate_fatal_error(
+            "HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces."
+            "Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error"
+            "(Use at your own risk!)"
+            WIKI "error.spaces.in.hunter.root"
         )
-        include("${_hunter_self}/cmake/Hunter")
+      endif()
+    endif()
+
+    string(
+        REGEX
+        MATCH
+        "[0-9]+\\.[0-9]+\\.[0-9]+[-_a-z0-9]*"
+        HUNTER_GATE_VERSION
+        "${HUNTER_GATE_URL}"
+    )
+    string(COMPARE EQUAL "${HUNTER_GATE_VERSION}" "" _is_empty)
+    if(_is_empty)
+      set(HUNTER_GATE_VERSION "unknown")
+    endif()
+
+    hunter_gate_self(
+        "${HUNTER_GATE_ROOT}"
+        "${HUNTER_GATE_VERSION}"
+        "${HUNTER_GATE_SHA1}"
+        _hunter_self
+    )
+
+    set(_master_location "${_hunter_self}/cmake/Hunter")
+    if(EXISTS "${HUNTER_GATE_ROOT}/cmake/Hunter")
+      # Hunter downloaded manually (e.g. by 'git clone')
+      set(_unused "xxxxxxxxxx")
+      set(HUNTER_GATE_SHA1 "${_unused}")
+      set(HUNTER_GATE_VERSION "${_unused}")
     else()
-        set(HUNTER_GATE_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
-
-        string(COMPARE NOTEQUAL "${PROJECT_NAME}" "" _have_project_name)
-        if(_have_project_name)
-            hunter_gate_fatal_error(
-                "Please set HunterGate *before* 'project' command. "
-                "Detected project: ${PROJECT_NAME}"
-                WIKI "error.huntergate.before.project"
-            )
-        endif()
-
-        cmake_parse_arguments(
-            HUNTER_GATE "LOCAL" "URL;SHA1;GLOBAL;FILEPATH" "" ${ARGV}
+      get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE)
+      set(_done_location "${_archive_id_location}/DONE")
+      set(_sha1_location "${_archive_id_location}/SHA1")
+
+      # Check Hunter already downloaded by HunterGate
+      if(NOT EXISTS "${_done_location}")
+        hunter_gate_download("${_archive_id_location}")
+      endif()
+
+      if(NOT EXISTS "${_done_location}")
+        hunter_gate_internal_error("hunter_gate_download failed")
+      endif()
+
+      if(NOT EXISTS "${_sha1_location}")
+        hunter_gate_internal_error("${_sha1_location} not found")
+      endif()
+      file(READ "${_sha1_location}" _sha1_value)
+      string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal)
+      if(NOT _is_equal)
+        hunter_gate_internal_error(
+            "Short SHA1 collision:"
+            "  ${_sha1_value} (from ${_sha1_location})"
+            "  ${HUNTER_GATE_SHA1} (HunterGate)"
         )
-
-        string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" _empty_sha1)
-        string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" _empty_url)
-        string(
-            COMPARE
-            NOTEQUAL
-            "${HUNTER_GATE_UNPARSED_ARGUMENTS}"
-            ""
-            _have_unparsed
+      endif()
+      if(NOT EXISTS "${_master_location}")
+        hunter_gate_user_error(
+            "Master file not found:"
+            "  ${_master_location}"
+            "try to update Hunter/HunterGate"
         )
-        string(COMPARE NOTEQUAL "${HUNTER_GATE_GLOBAL}" "" _have_global)
-        string(COMPARE NOTEQUAL "${HUNTER_GATE_FILEPATH}" "" _have_filepath)
-
-        if(_have_unparsed)
-            hunter_gate_user_error(
-                "HunterGate unparsed arguments: ${HUNTER_GATE_UNPARSED_ARGUMENTS}"
-            )
-        endif()
-        if(_empty_sha1)
-            hunter_gate_user_error("SHA1 suboption of HunterGate is mandatory")
-        endif()
-        if(_empty_url)
-            hunter_gate_user_error("URL suboption of HunterGate is mandatory")
-        endif()
-        if(_have_global)
-            if(HUNTER_GATE_LOCAL)
-                hunter_gate_user_error("Unexpected LOCAL (already has GLOBAL)")
-            endif()
-            if(_have_filepath)
-                hunter_gate_user_error("Unexpected FILEPATH (already has GLOBAL)")
-            endif()
-        endif()
-        if(HUNTER_GATE_LOCAL)
-            if(_have_global)
-                hunter_gate_user_error("Unexpected GLOBAL (already has LOCAL)")
-            endif()
-            if(_have_filepath)
-                hunter_gate_user_error("Unexpected FILEPATH (already has LOCAL)")
-            endif()
-        endif()
-        if(_have_filepath)
-            if(_have_global)
-                hunter_gate_user_error("Unexpected GLOBAL (already has FILEPATH)")
-            endif()
-            if(HUNTER_GATE_LOCAL)
-                hunter_gate_user_error("Unexpected LOCAL (already has FILEPATH)")
-            endif()
-        endif()
-
-        hunter_gate_detect_root() # set HUNTER_GATE_ROOT
-
-        # Beautify path, fix probable problems with windows path slashes
-        get_filename_component(
-            HUNTER_GATE_ROOT "${HUNTER_GATE_ROOT}" ABSOLUTE
-        )
-        hunter_gate_status_debug("HUNTER_ROOT: ${HUNTER_GATE_ROOT}")
-        if(NOT HUNTER_ALLOW_SPACES_IN_PATH)
-            string(FIND "${HUNTER_GATE_ROOT}" " " _contain_spaces)
-            if(NOT _contain_spaces EQUAL -1)
-                hunter_gate_fatal_error(
-                    "HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces."
-                    "Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error"
-                    "(Use at your own risk!)"
-                    WIKI "error.spaces.in.hunter.root"
-                )
-            endif()
-        endif()
-
-        string(
-            REGEX
-            MATCH
-            "[0-9]+\\.[0-9]+\\.[0-9]+[-_a-z0-9]*"
-            HUNTER_GATE_VERSION
-            "${HUNTER_GATE_URL}"
-        )
-        string(COMPARE EQUAL "${HUNTER_GATE_VERSION}" "" _is_empty)
-        if(_is_empty)
-            set(HUNTER_GATE_VERSION "unknown")
-        endif()
-
-        hunter_gate_self(
-            "${HUNTER_GATE_ROOT}"
-            "${HUNTER_GATE_VERSION}"
-            "${HUNTER_GATE_SHA1}"
-            _hunter_self
-        )
-
-        set(_master_location "${_hunter_self}/cmake/Hunter")
-        if(EXISTS "${HUNTER_GATE_ROOT}/cmake/Hunter")
-            # Hunter downloaded manually (e.g. by 'git clone')
-            set(_unused "xxxxxxxxxx")
-            set(HUNTER_GATE_SHA1 "${_unused}")
-            set(HUNTER_GATE_VERSION "${_unused}")
-        else()
-            get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE)
-            set(_done_location "${_archive_id_location}/DONE")
-            set(_sha1_location "${_archive_id_location}/SHA1")
-
-            # Check Hunter already downloaded by HunterGate
-            if(NOT EXISTS "${_done_location}")
-                hunter_gate_download("${_archive_id_location}")
-            endif()
-
-            if(NOT EXISTS "${_done_location}")
-                hunter_gate_internal_error("hunter_gate_download failed")
-            endif()
-
-            if(NOT EXISTS "${_sha1_location}")
-                hunter_gate_internal_error("${_sha1_location} not found")
-            endif()
-            file(READ "${_sha1_location}" _sha1_value)
-            string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal)
-            if(NOT _is_equal)
-                hunter_gate_internal_error(
-                    "Short SHA1 collision:"
-                    "  ${_sha1_value} (from ${_sha1_location})"
-                    "  ${HUNTER_GATE_SHA1} (HunterGate)"
-                )
-            endif()
-            if(NOT EXISTS "${_master_location}")
-                hunter_gate_user_error(
-                    "Master file not found:"
-                    "  ${_master_location}"
-                    "try to update Hunter/HunterGate"
-                )
-            endif()
-        endif()
-        include("${_master_location}")
-        set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
-    endif()
-endmacro()+      endif()
+    endif()
+    include("${_master_location}")
+    set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
+  endif()
+endmacro()


skip header files

skip header files

--- cmake/LLVMIRUtil.cmake
+++ cmake/LLVMIRUtil.cmake
@@ -111,9 +111,44 @@
   # compile lang flags
   llvmir_extract_lang_flags(IN_LANG_FLAGS ${LINKER_LANGUAGE})

-  ## main operations
+  set(header_exts ".h;.hh;.hpp;.h++;.hxx")
+  set(temp_include_dirs "")
+
+  # Find all header files in the source
   foreach(IN_FILE ${IN_FILES})
-    get_filename_component(OUTFILE ${IN_FILE} NAME_WE)
+    get_filename_component(FILE_EXT ${IN_FILE} LAST_EXT)
+    get_filename_component(FILE_DIR ${IN_FILE} DIRECTORY)
+    string(TOLOWER ${FILE_EXT} FILE_EXT)
+    list(FIND header_exts ${FILE_EXT} _index)
+
+    if(${_index} GREATER -1)
+      message(WARNING "A header file ${IN_FILE} is found in source files! Please add header directories using target_include_directories() instead.")
+
+      # Add to include list
+      list(APPEND temp_include_dirs "-I${FILE_DIR}")
+    endif()
+  endforeach()
+
+  if(temp_include_dirs)
+    list(REMOVE_DUPLICATES temp_include_dirs)
+    message(WARNING "\"${temp_include_dirs}\" added to include directories.")
+
+    list(APPEND IN_INCLUDES ${temp_include_dirs})
+    list(REMOVE_DUPLICATES IN_INCLUDES)
+  endif()
+
+  # main operations
+  foreach(IN_FILE ${IN_FILES})
+    # Skip header files
+    get_filename_component(FILE_EXT ${IN_FILE} LAST_EXT)
+    string(TOLOWER ${FILE_EXT} FILE_EXT)
+
+    list (FIND header_exts ${FILE_EXT} _index)
+    if(${_index} GREATER -1)
+      continue()
+    endif()
+
+    get_filename_component(OUTFILE ${IN_FILE} NAME)
     get_filename_component(INFILE ${IN_FILE} ABSOLUTE)
     set(OUT_LLVMIR_FILE "${OUTFILE}.${LLVMIR_BINARY_FMT_SUFFIX}")
     set(FULL_OUT_LLVMIR_FILE "${WORK_DIR}/${OUT_LLVMIR_FILE}")


Fix DragonFlyBSD linkage issue.

Fix DragonFlyBSD linkage issue.

environ global failed on LTO linkage step.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -138,7 +138,8 @@
 # build might work on ELF but fail on MachO/COFF.
 if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
         ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
-        ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
+	${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" OR
+	${CMAKE_SYSTEM_NAME} MATCHES "DragonFly") AND
    NOT LLVM_USE_SANITIZER)
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
 endif()


Remove unused variables from Android configuration

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -62,13 +62,6 @@
     endif()
   endif()
   message(STATUS "  Object Format: ${SWIFT_SDK_${prefix}_OBJECT_FORMAT}")
-  foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
-    if(SWIFT_SDK_${prefix}_ARCH_${arch}_LINKER)
-      message(STATUS "  Linker (${arch}): ${SWIFT_SDK_${prefix}_ARCH_${arch}_LINKER}")
-    else()
-      message(STATUS "  Linker (${arch}): ${CMAKE_LINKER}")
-    endif()
-  endforeach()

   foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
     message(STATUS
@@ -205,11 +198,6 @@
       endif()
       set(SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH
           "${SWIFT_ANDROID_NDK_PATH}/toolchains/${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE}-${SWIFT_ANDROID_NDK_GCC_VERSION}/prebuilt/${_swift_android_prebuilt_build}")
-
-      # Resolve the correct linker based on the file name of CMAKE_LINKER (being 'ld' or 'ld.gold' the options)
-      get_filename_component(SWIFT_ANDROID_LINKER_NAME "${CMAKE_LINKER}" NAME)
-      set(SWIFT_SDK_ANDROID_ARCH_${arch}_LINKER
-          "${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH}/bin/${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE}-${SWIFT_ANDROID_LINKER_NAME}")
     else()
       if(NOT SWIFT_SDK_${prefix}_ARCH_${arch}_PATH)
         set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "/")


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -20,6 +20,7 @@
 Name[el]=GStreamer
 Name[en_GB]=GStreamer
 Name[es]=GStreamer
+Name[et]=GStreamer
 Name[eu]=GStreamer
 Name[fa]=GStreamer
 Name[fi]=GStreamer
@@ -76,6 +77,7 @@
 Comment[el]=Σύστημα υποστήριξης GStreamer του Phonon
 Comment[en_GB]=Phonon GStreamer backend
 Comment[es]=Motor GStreamer para Phonon
+Comment[et]=Phononi GStreameri taustaprogramm
 Comment[eu]=Phonon-en GStreamer bizkarraldekoa
 Comment[fa]=پسانه‌ی جی‌استریمر برای فنون (Phonon GStreamer backend)
 Comment[fi]=Phonon GStreamer -taustajärjestelmä


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   23)
+SET(KWSYS_DATE_STAMP_DAY   24)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   13)
+SET(KWSYS_DATE_STAMP_DAY   14)


Bug 967: Automatically add cxx11 suffix when building in C++11 mode

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -502,6 +502,10 @@
     set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-64bit)
   endif()

+  if(EIGEN_TEST_CXX11)
+    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-cxx11)
+  endif()
+
   if(EIGEN_BUILD_STRING_SUFFIX)
     set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-${EIGEN_BUILD_STRING_SUFFIX})
   endif()


Memory tests work if build path contains spaces

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -366,7 +366,7 @@
     )

 set(MEMORYCHECK_SUPPRESSIONS_FILE
-		${CMAKE_SOURCE_DIR}/tests/valgrind.suppression
+		"${CMAKE_SOURCE_DIR}/tests/valgrind.suppression"
 		CACHE FILEPATH
 		"Full path to suppression file for valgrind")


Update date.

Update date.

--- cmake/FindPrimitiv.cmake
+++ cmake/FindPrimitiv.cmake
@@ -22,7 +22,7 @@
 #
 # Author: Yusuke Oda (odashi) <yus.takara@gmail.com>
 # Created: 2017/08/13
-# Updated: 2017/12/15
+# Updated: 2017/12/16
 #
 # This script is provided as a part of the primitiv core library.
 # Redistributing and using this script is allowed according to


Reduce verbosity.

Reduce verbosity.

--- cmake/FindQuadmath.cmake
+++ cmake/FindQuadmath.cmake
@@ -52,7 +52,6 @@
     # The associated variable is Quadmath_INCLUDE_DIR.
     list(APPEND _Quadmath_FPHSA_ARGS Quadmath_INCLUDE_DIR)

-    message(STATUS "Attempting to locate quadmath.h.")
     find_path(Quadmath_INCLUDE_DIR NAMES quadmath.h)

     if(NOT Quadmath_INCLUDE_DIR)
@@ -82,7 +81,6 @@
     # The associated variable is Quadmath_LIBRARY.
     list(APPEND _Quadmath_FPHSA_ARGS Quadmath_LIBRARY)

-    message(STATUS "Attempting to locate libquadmath.")
     find_library(Quadmath_LIBRARY NAMES quadmath)

     if(NOT Quadmath_LIBRARY)


cmake: fix build process of OpenCL kernels

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -720,11 +720,16 @@
   if(cl_kernels)
     set(OCL_NAME opencl_kernels_${name})
     add_custom_command(
-      OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.hpp" "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp"
+      OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp"  # don't add .hpp file here to optimize build process
       COMMAND ${CMAKE_COMMAND} "-DMODULE_NAME=${name}" "-DCL_DIR=${CMAKE_CURRENT_LIST_DIR}/src/opencl" "-DOUTPUT=${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" -P "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake"
-      DEPENDS ${cl_kernels} "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake")
+      DEPENDS ${cl_kernels} "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake"
+      COMMENT "Processing OpenCL kernels (${name})"
+    )
     ocv_source_group("Src\\opencl\\kernels" FILES ${cl_kernels})
     ocv_source_group("Src\\opencl\\kernels\\autogenerated" FILES "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.hpp")
+    set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.hpp"
+        PROPERTIES GENERATED TRUE
+    )
     list(APPEND lib_srcs ${cl_kernels} "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.hpp")
   endif()


omp5: Fix version comments in alpakaCommon.cmake

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -241,7 +241,7 @@
     if(OpenMP_CXX_FOUND)
         if(ALPAKA_ACC_ANY_BT_OMP5_ENABLED)
             if(OpenMP_CXX_VERSION VERSION_LESS 4.0)
-                message(FATAL_ERROR "ALPAKA_ACC_ANY_BT_OMP5_ENABLE requires compiler support for OpenMP at lease 4.0, 5.0 is recommended.")
+                message(FATAL_ERROR "ALPAKA_ACC_ANY_BT_OMP5_ENABLE requires compiler support for OpenMP at least 4.0, 5.0 is recommended.")
             elseif(OpenMP_CXX_VERSION VERSION_LESS 5.0)
                 message(WARNING "OpenMP < 5.0, for ALPAKA_ACC_ANY_BT_OMP5_ENABLE 5.0 is recommended.")
             endif()
@@ -249,7 +249,7 @@

         target_link_libraries(alpaka INTERFACE OpenMP::OpenMP_CXX)

-        # Clang versions starting from 3.9 support OpenMP 5.0 only when given the corresponding flag
+        # Clang versions starting from 3.9 support OpenMP 4.0 and higher only when given the corresponding flag
         if(ALPAKA_ACC_ANY_BT_OMP5_ENABLE)
             target_link_options(alpaka INTERFACE $<$<CXX_COMPILER_ID:AppleClang,Clang>:-fopenmp-version=40>)
         endif()