Make the CMake/Android toolchain file compatible with NDK 13c.

--- CMake/Toolchains/Android.cmake
+++ CMake/Toolchains/Android.cmake
@@ -396,7 +396,11 @@
             # TODO: Remove this once libgcc.a is not being used
             set (GCC_FIX "-Wl,-z,muldefs")
             set (STL_LIBRARY_DIR ${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_NDK_ABI_NAME})
-            set (STL_INCLUDE_DIRS ${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include ${ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include ${ANDROID_NDK}/sources/android/support/include)
+            if (EXISTS ${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx)
+                set (LIBCXX libcxx/)
+                set (LIBCXXABI libcxxabi/)
+            endif ()
+            set (STL_INCLUDE_DIRS ${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/${LIBCXX}include ${ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/${LIBCXXABI}include ${ANDROID_NDK}/sources/android/support/include)
         endif ()
         file (GLOB SHARED_LIBS ${CMAKE_BINARY_DIR}/libs/${ANDROID_NDK_ABI_NAME}/lib*_shared.so)
         if (SHARED_LIBS)


Use OS specific python path

Use OS specific python path

--- CMakeExternals/SimpleITK.cmake
+++ CMakeExternals/SimpleITK.cmake
@@ -110,13 +110,15 @@

       if(WIN32)
         STRING(REPLACE "/" "\\\\" _install_dir ${_install_dir})
+        set(_additional_pythonpath $<SEMICOLON>${ep_prefix}/Lib/site-packages)
       else()
         # escape spaces in the install path for linux
         STRING(REPLACE " " "\ " _install_dir ${_install_dir})
+        set(_additional_pythonpath )
       endif()

       ExternalProject_Add_Step(${proj} sitk_python_install_step
-        COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_pythonpath}$<SEMICOLON>${ep_prefix}/Lib/site-packages ${PYTHON_EXECUTABLE} Packaging/setup.py install --prefix=${_install_dir}
+        COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_pythonpath}${_additional_pythonpath} ${PYTHON_EXECUTABLE} Packaging/setup.py install --prefix=${_install_dir}
         DEPENDEES install
         WORKING_DIRECTORY ${_sitk_build_dir}/SimpleITK-build/Wrapping/Python/
       )


Fixed line ending

Fixed line ending

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -34,7 +34,7 @@
     SET(COLLADA_BOOST_BUILDNAME "vc141")
 ELSEIF(MSVC_VERSION EQUAL 1900)
     SET(COLLADA_BUILDNAME "vc14")
-    SET(COLLADA_BOOST_BUILDNAME "vc140")
+    SET(COLLADA_BOOST_BUILDNAME "vc140")
 ELSEIF(MSVC_VERSION EQUAL 1800)
     SET(COLLADA_BUILDNAME "vc12")
     SET(COLLADA_BOOST_BUILDNAME "vc120")


bump version to 0.11 in preparation for release

--- CMakeModules/OMPLVersion.cmake
+++ CMakeModules/OMPLVersion.cmake
@@ -1,7 +1,7 @@
 # set the version in a way CMake can use
 set(OMPL_MAJOR_VERSION 0)
-set(OMPL_MINOR_VERSION 10)
-set(OMPL_PATCH_VERSION 2)
+set(OMPL_MINOR_VERSION 11)
+set(OMPL_PATCH_VERSION 0)
 set(OMPL_VERSION "${OMPL_MAJOR_VERSION}.${OMPL_MINOR_VERSION}.${OMPL_PATCH_VERSION}")

 # increment this when we have ABI changes


PKG: missing system dll for windows

PKG: missing system dll for windows

--- Packaging/PackageGlobals.cmake
+++ Packaging/PackageGlobals.cmake
@@ -48,6 +48,7 @@
   crypt32.dll
   dnsapi.dll
   dwmapi.dll
+  dwrite.dll
   d2d1.dll
   d3d9.dll
   d3d11.dll


Changed name of variable to set the Qt version in PythonQt to match present naming convention

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -42,7 +42,7 @@
   endif()

   # Set desired qt version for PythonQt
-  list(APPEND ep_PythonQt_args -DDESIRED_QT_VERSION:STRING=${CTK_QT_VERSION})
+  list(APPEND ep_PythonQt_args -DPythonQt_QT_VERSION:STRING=${CTK_QT_VERSION})

   foreach(qtlib All ${qtlibs})
     string(TOUPPER ${qtlib} qtlib_uppercase)


Add extra cmake args for Python

Add extra cmake args for Python

--- projects/python.cmake
+++ projects/python.cmake
@@ -7,3 +7,9 @@
   PROCESS_ENVIRONMENT CFLAGS -I${CMAKE_OSX_SYSROOT}/usr/include
   )
 set (pv_python_executable "${install_location}/bin/python3" CACHE INTERNAL "" FORCE)
+
+add_extra_cmake_args(
+  -DPYTHON_EXECUTABLE:FILEPATH=<INSTALL_DIR>/bin/python3
+  -DPYTHON_INCLUDE_DIR:PATH=<INSTALL_DIR>/include/python3.6m
+  -DPYTHON_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/libpython3.6m.dylib
+  -DVTK_PYTHON_VERSION:STRING=3)


several fixes to FindScorec.cmake

several fixes to FindScorec.cmake

--- cmake/FindScorec.cmake
+++ cmake/FindScorec.cmake
@@ -29,17 +29,17 @@

 find_library(ZOLTAN_LIBRARY zoltan)
 if (NOT EXISTS "${ZOLTAN_LIBRARY}")
-  message(FATAL ERROR "ZOLTAN library not found")
+  message(FATAL_ERROR "ZOLTAN library not found")
 endif()

-find_library(METIS_LIBRARY parmetis)
+find_library(PARMETIS_LIBRARY parmetis)
 if (NOT EXISTS "${PARMETIS_LIBRARY}")
-  message(FATAL ERROR "PARMETIS library not found")
+  message(FATAL_ERROR "PARMETIS library not found")
 endif()

 find_library(METIS_LIBRARY metis)
 if (NOT EXISTS "${METIS_LIBRARY}")
-  message(FATAL ERROR "METIS library not found")
+  message(FATAL_ERROR "METIS library not found")
 endif()

 set(SCOREC_LIBS "")


simplify intermediate target names

simplify intermediate target names

--- cmake/LLVMIRUtil.cmake
+++ cmake/LLVMIRUtil.cmake
@@ -10,8 +10,8 @@

 set(LLVM_IR_UTIL_VERSION_MAJOR "2")
-set(LLVM_IR_UTIL_VERSION_MINOR "0")
-set(LLVM_IR_UTIL_VERSION_PATCH "2")
+set(LLVM_IR_UTIL_VERSION_MINOR "3")
+set(LLVM_IR_UTIL_VERSION_PATCH "3")

 string(CONCAT LLVM_IR_UTIL_VERSION
   ${LLVM_IR_UTIL_VERSION_MAJOR} "."
@@ -149,7 +149,7 @@
   foreach(IN_LLVMIR_FILE ${IN_LLVMIR_FILES})
     get_filename_component(OUTFILE ${IN_LLVMIR_FILE} NAME_WE)
     set(INFILE "${IN_LLVMIR_DIR}/${IN_LLVMIR_FILE}")
-    set(OUT_LLVMIR_FILE "${OUTFILE}-${OUT_TRGT}.${LLVMIR_BINARY_FMT_SUFFIX}")
+    set(OUT_LLVMIR_FILE "${OUTFILE}.${LLVMIR_BINARY_FMT_SUFFIX}")
     set(FULL_OUT_LLVMIR_FILE "${WORK_DIR}/${OUT_LLVMIR_FILE}")

     add_custom_command(OUTPUT ${FULL_OUT_LLVMIR_FILE}


Removed generating an official separate project for a lightweight app type subproject

--- cmake/RecoModule.cmake
+++ cmake/RecoModule.cmake
@@ -77,7 +77,7 @@
 macro(reco_add_subproject _name)
     set(subproject_name ${global_project_name}_${_name})

-    project(${subproject_name})
+

 #----------------------------------PARSE ARGUMENTS-------------------------------------------------#

@@ -149,10 +149,13 @@
         message(FATAL_ERROR "Type of module not set. Expecting one of [${subproject_types}] as argument.")
     endif()

-    if(${_subproject_type} STREQUAL "${lightweight_app_type}" AND _qt)
+    if(${_subproject_type} STREQUAL ${lightweight_app_type} AND _qt)
         message(FATAL_ERROR "LIGHTWEIGHT_APPLICATION and QT arguments to the reco_add_subproject are incompatible.")
     endif()
-
+#---------------------------- PROJECT NAME --------------------------------------------------------#
+    if(NOT ${_subproject_type} STREQUAL ${lightweight_app_type})
+        project(${subproject_name})
+    endif()
 #-----------------------------CHECK DEPENDENCIES AND REQUIREMENTS----------------------------------#

  #depends


cmake: `zephyr_linker_dts_memory` auto-name

Update the linker script generator to automatically derive memory
region names from the devicetree node according to the same logic in
`devicetree_regions.h`.

Signed-off-by: Jordan Yates <d74a90e280bbad1cc3646781a4e234b467b60fe1@data61.csiro.au>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -3377,9 +3377,14 @@

   dt_reg_addr(addr PATH ${DTS_MEMORY_PATH})
   dt_reg_size(size PATH ${DTS_MEMORY_PATH})
+  dt_prop(name PATH ${DTS_MEMORY_PATH} PROPERTY "memory-region")
+  if (NOT DEFINED name)
+    # Fallback to the node path
+    set(name ${DTS_MEMORY_PATH})
+  endif()

   zephyr_linker_memory(
-    NAME  ${DTS_MEMORY_NAME}
+    NAME  ${name}
     START ${addr}
     SIZE  ${size}
     FLAGS ${DTS_MEMORY_FLAGS}


cmake: Don't propagate zephyr_library_compile_options

zephyr_library_compile_options will apply compile options to a library
with high priority. Due to bug #8438 these compile options have been
applied not only to the library, but also to it's public interface and
therefore to any library that has been linking with the library.

To resolve #8438 we use PRIVATE linking instead of PUBLIC linking.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -473,7 +473,7 @@
   add_library(           ${lib_name} INTERFACE)
   target_compile_options(${lib_name} INTERFACE ${item} ${ARGN})

-  target_link_libraries(${ZEPHYR_CURRENT_LIBRARY} PUBLIC ${lib_name})
+  target_link_libraries(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${lib_name})
 endfunction()

 function(zephyr_library_cc_option)


Allow for gccxy instead for gcc-x.y

Allow for gccxy instead for gcc-x.y

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -6,8 +6,8 @@
 #
 # This script:
 #   * Checks the version of default gcc
-#   * If CUDA 4.x, we look for gcc-4.4
-#   * If not found or CUDA<4, we look for gcc-4.3 on the system
+#   * If CUDA 4.x, we look for gcc-4.4 or gcc44
+#   * If not found or CUDA<4, we look for gcc-4.3 or gcc43 on the system
 #   * If found we tell nvcc to use it
 #   * If not found, fatal error
 ######################################################################
@@ -15,26 +15,30 @@
 # This function searches for gcc version x.y (arguments 2 and 3 of the macro)
 # Return the result in argument 1, empty if not found
 FUNCTION(FIND_GCC GCC_PATH GCC_MAJOR GCC_MINOR)
-
   # Search for gcc-x.y
   FIND_PROGRAM(EXACT_GCC "gcc-${GCC_MAJOR}.${GCC_MINOR}")
   IF(EXACT_GCC)
     SET(GCC_PATH "${EXACT_GCC}" PARENT_SCOPE)
   ELSE(EXACT_GCC)
-    # gcc-x.y not found, check default gcc
-    FIND_PROGRAM(DEFAULT_GCC gcc)
-    EXEC_PROGRAM(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
-
-    # Get major and minor revs
-    STRING(REGEX REPLACE "^([0-9]+)\\..*" "\\1" GCCVER_MAJOR "${GCCVER}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" GCCVER_MINOR "${GCCVER}")
-
-    # Check that adequate
-    IF("${GCCVER_MAJOR}" MATCHES "${GCC_MAJOR}" AND "${GCCVER_MINOR}" MATCHES "${GCC_MINOR}")
-      SET(GCC_PATH ${DEFAULT_GCC} PARENT_SCOPE)
-    ENDIF()
+    # Search for gccxy
+    FIND_PROGRAM(EXACT_GCC2 "gcc${GCC_MAJOR}${GCC_MINOR}")
+    IF(EXACT_GCC2)
+      SET(GCC_PATH "${EXACT_GCC2}" PARENT_SCOPE)
+    ELSE(EXACT_GCC2)
+      # gcc-x.y not found, check default gcc
+      FIND_PROGRAM(DEFAULT_GCC gcc)
+      EXEC_PROGRAM(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
+
+      # Get major and minor revs
+      STRING(REGEX REPLACE "^([0-9]+)\\..*" "\\1" GCCVER_MAJOR "${GCCVER}")
+      STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" GCCVER_MINOR "${GCCVER}")
+
+      # Check that adequate
+      IF("${GCCVER_MAJOR}" MATCHES "${GCC_MAJOR}" AND "${GCCVER_MINOR}" MATCHES "${GCC_MINOR}")
+        SET(GCC_PATH ${DEFAULT_GCC} PARENT_SCOPE)
+      ENDIF()
+    ENDIF(EXACT_GCC2)
   ENDIF(EXACT_GCC)
-
 ENDFUNCTION(FIND_GCC)

 # Main code dealing with each version of cuda


Modifying FindclFFT.cmake to look in clFFT build directory

--- common/FindclFFT.cmake
+++ common/FindclFFT.cmake
@@ -35,9 +35,19 @@
     set (CLFFT_FIND_QUIETLY TRUE)
 ENDIF (CLFFT_INCLUDE_DIRS)

+FIND_PATH(CLFFT_SOURCE_DIR
+        NAMES src/include/clFFT.h
+        HINTS ${CMAKE_SOURCE_DIR}/clFFT ${CMAKE_SOURCE_DIR}/../clFFT ${CMAKE_SOURCE_DIR}/../../clFFT
+        DOC "clFFT source directory.")
+
+FIND_PATH(CLFFT_BUILD_DIR
+        NAMES ./install_manifest.txt
+        HINTS ${CLFFT_SOURCE_DIR}/build ${CLFFT_SOURCE_DIR}/src/build
+        DOC "clFFT build directory.")
+
 FIND_PATH(CLFFT_ROOT_DIR
     NAMES include/clFFT.h
-    HINTS /usr/local/ $ENV{CLFFT_ROOT} ${CMAKE_SOURCE_DIR}/..  ${CMAKE_SOURCE_DIR}/../..
+    HINTS /usr/local/ $ENV{CLFFT_ROOT} ${CMAKE_SOURCE_DIR}/..  ${CMAKE_SOURCE_DIR}/../.. ${CLFFT_BUILD_DIR}/package
     DOC "clFFT root directory.")

 FIND_PATH(_CLFFT_INCLUDE_DIRS


ENH: Bump WikiExamples remote module version

Mainly changes to SyncRepoWithWiki.sh to handle error conditions.

Change-Id: Ic49c2a3a08d2944aaa2fcc59dd59474802a8343c

--- Modules/Remote/WikiExamples.remote.cmake
+++ Modules/Remote/WikiExamples.remote.cmake
@@ -4,8 +4,8 @@

 # If the environment var RemoteGitTag exists, use it
 if (NOT DEFINED ENV{RemoteGitTag})
-  # May 22, 2016
-  set(GIT_TAG 1a2a68ca98966bff35ba9332619ffbb9a278d0e9)
+  # October 19, 2016
+  set(GIT_TAG 8958c5b37a7c16794e69aafa9389253098021809)
 else()
   set(GIT_TAG $ENV{RemoteGitTag})
 endif()


Update boost_python version again

Update boost_python version again

--- Superbuild/UseBoost.cmake
+++ Superbuild/UseBoost.cmake
@@ -35,7 +35,7 @@
       if(WIN32)
 		    set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${CMAKE_STATIC_LIBRARY_SUFFIX}")
       else()
-        if (${USER_PYTHON_VERSION} VERSION_GREATER "3.5")
+        if (${USER_PYTHON_VERSION} VERSION_GREATER "3.7")
           set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${CMAKE_STATIC_LIBRARY_SUFFIX}")
         else()
           set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python3-mt${CMAKE_STATIC_LIBRARY_SUFFIX}")


+ fix cmake issue caused by patch

+ fix cmake issue caused by patch

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -242,8 +242,8 @@
                 set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
             else(${ARGC} STREQUAL 4)
                 set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
-            endif(${ARGC} STREQUAL 4)
-        endif(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2)$")
+            endif()
+        endif()
     endif(WIN32)
 ENDMACRO(SET_BIN_DIR)


remove unused option from user_option template


update openjpeg version

update openjpeg version

--- SuperBuild/CMake/External_openjpeg.cmake
+++ SuperBuild/CMake/External_openjpeg.cmake
@@ -38,8 +38,8 @@

 ExternalProject_Add(OPENJPEG
   PREFIX OPENJPEG
-  URL "https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz"
-  URL_MD5 6a1f8aaa1fe55d2088e3a9c942e0f698
+  URL "https://github.com/uclouvain/openjpeg/archive/v2.3.1.tar.gz"
+  URL_MD5 3b9941dc7a52f0376694adb15a72903f
   BINARY_DIR ${OPENJPEG_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


Cleanup config.h.in.cmake

Cleanup config.h.in.cmake

--- config.h.in.cmake
+++ config.h.in.cmake
@@ -4,19 +4,10 @@
 #cmakedefine BUILD_BASIC
 #cmakedefine BUILD_PTHREAD

-#cmakedefine ENABLE_HOST_CPU_DEVICES
-
 #define BUILDDIR "@BUILDDIR@"

 /* "Build with ICD" */
 #cmakedefine BUILD_ICD
-
-#define CLANG "@CLANG@"
-
-#define CLANG_RESOURCE_DIR "@CLANG_RESOURCE_DIR@"
-
-/* clang++ executable */
-#define CLANGXX "@CLANGXX@"

 #define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"

@@ -29,6 +20,8 @@

 #cmakedefine ENABLE_HWLOC

+#cmakedefine ENABLE_HOST_CPU_DEVICES
+
 #cmakedefine ENABLE_POCL_BUILDING

 #cmakedefine ENABLE_POCL_FLOAT_CONVERSION
@@ -69,39 +62,75 @@

 #cmakedefine HAVE_UTIME

+#cmakedefine OCS_AVAILABLE
+
+/* this is used all over the runtime code */
+#define HOST_CPU_CACHELINE_SIZE @HOST_CPU_CACHELINE_SIZE@
+
+
+
+#ifdef ENABLE_HOST_CPU_DEVICES
+
+#define HOST_AS_FLAGS  "@HOST_AS_FLAGS@"
+
+#define HOST_CLANG_FLAGS  "@HOST_CLANG_FLAGS@"
+
+#define HOST_DEVICE_EXTENSIONS "@HOST_DEVICE_EXTENSIONS@"
+
+#cmakedefine HOST_CPU_FORCED
+
+#define HOST_LD_FLAGS  "@HOST_LD_FLAGS@"
+
+#define HOST_LLC_FLAGS  "@HOST_LLC_FLAGS@"
+
+#cmakedefine HOST_FLOAT_SOFT_ABI
+
+#define HOST_DEVICE_BUILD_HASH "@HOST_DEVICE_BUILD_HASH@"
+
+#endif
+
+
+
+#ifdef ENABLE_HSA
+
 #cmakedefine HAVE_HSA_EXT_AMD_H

 #define AMD_HSA @AMD_HSA@

-#define HOST  "@HOST@"
-
-#define HOST_AS_FLAGS  "@HOST_AS_FLAGS@"
-
-#define HOST_CLANG_FLAGS  "@HOST_CLANG_FLAGS@"
-
-#define HOST_DEVICE_EXTENSIONS "@HOST_DEVICE_EXTENSIONS@"
-
-#cmakedefine HOST_CPU_FORCED
-
-#define HOST_CPU_CACHELINE_SIZE @HOST_CPU_CACHELINE_SIZE@
-
-#define HOST_LD_FLAGS  "@HOST_LD_FLAGS@"
-
-#define HOST_LLC_FLAGS  "@HOST_LLC_FLAGS@"
-
-#cmakedefine HOST_FLOAT_SOFT_ABI
-
-#define HOST_DEVICE_BUILD_HASH "@HOST_DEVICE_BUILD_HASH@"
-
 #define HSA_DEVICE_EXTENSIONS "@HSA_DEVICE_EXTENSIONS@"

 #define HSAIL_ASM "@HSAIL_ASM@"

 #define HSAIL_ENABLED @HSAIL_ENABLED@

+#endif
+
+
+
+
+
+#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
+
+#define LINK_COMMAND "@LINK_COMMAND@"
+
+#cmakedefine LINK_WITH_CLANG
+
+
+
+
+
+
+#ifdef OCS_AVAILABLE
+
 #define KERNELLIB_HOST_CPU_VARIANTS "@KERNELLIB_HOST_CPU_VARIANTS@"

 #cmakedefine KERNELLIB_HOST_DISTRO_VARIANTS
+
+#define CLANG "@CLANG@"
+
+#define CLANG_RESOURCE_DIR "@CLANG_RESOURCE_DIR@"
+
+#define CLANGXX "@CLANGXX@"

 #define LLVM_LLC "@LLVM_LLC@"

@@ -140,9 +169,10 @@
 #define LLVM_VERSION "@LLVM_VERSION_FULL@"
 #endif

-#define LINK_COMMAND "@LINK_COMMAND@"
-
-#cmakedefine LINK_WITH_CLANG
+
+#endif
+
+

 /* Defined to greatest expected alignment for extended types, in bytes. */
 #define MAX_EXTENDED_ALIGNMENT @MAX_EXTENDED_ALIGNMENT@
@@ -151,8 +181,6 @@
 #define OCL_KERNEL_TARGET  "@OCL_KERNEL_TARGET@"
 #define OCL_KERNEL_TARGET_CPU  "@OCL_KERNEL_TARGET_CPU@"

-#cmakedefine OCS_AVAILABLE
-
 #define PACKAGE_VERSION "@PACKAGE_VERSION@"

 #define POCL_KCACHE_SALT "@POCL_KCACHE_SALT@"


Adding support for easybuild modules

Adding support for easybuild modules

Former-commit-id: 02d8f11b57afc9b26a782ba5a394baeffd879877

--- cmake-modules/Fetch_Glog.cmake
+++ cmake-modules/Fetch_Glog.cmake
@@ -1,21 +1,17 @@

-if(NOT TARGET glog::glog)
-    message(STATUS "Searching for glog 0.4.x")
-    find_package(glog 0.4 PATHS ${INSTALL_DIRECTORY}/glog $ENV{EBROOTGLOG} $ENV{GLOG_DIR} NO_DEFAULT_PATH)
-    if(TARGET glog::glog)
-        get_target_property(GLOG_LIBRARIES   glog::glog INTERFACE_LINK_LIBRARIES)
-        message(STATUS "Searching for glog 0.4.x - Success: ${GLOG_LIBRARIES}")
-    else()
-        message(STATUS "Searching for glog 0.4.x - failed")
-    endif()
-endif()
+message(STATUS "Searching for glog 0.4.x")
+find_package(glog 0.4 PATHS ${INSTALL_DIRECTORY}/glog $ENV{EBROOTGLOG} $ENV{GLOG_DIR} NO_DEFAULT_PATH)
+
+
 if(TARGET glog::glog)
+    message(STATUS "Searching for glog 0.4.x - Success: ${GLOG_LIBRARIES}")
     get_target_property(GLOG_INCLUDE_DIR glog::glog INTERFACE_INCLUDE_DIRECTORIES)
     get_target_property(GLOG_LIBRARIES   glog::glog INTERFACE_LINK_LIBRARIES)
     set_target_properties(glog::glog PROPERTIES INTERFACE_LINK_LIBRARIES "${INSTALL_DIRECTORY}/glog/lib/libglog${CUSTOM_SUFFIX}")
     set_target_properties(glog::glog PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIR}")
     message(STATUS "glog FOUND IN SYSTEM: ${GLOG_INCLUDE_DIR}")
 else()
+    message(STATUS "Searching for glog 0.4.x - failed")
     message(STATUS "glog will be installed into ${INSTALL_DIRECTORY}/glog on first build.")

     include(ExternalProject)


Fix: include libusb-1.0 headers only on non windows plateform

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -61,6 +61,8 @@
   message(STATUS "OpeNI disabled because libusb-1.0 not found.")
   set(HAVE_OPENNI OFF)
   return()
+else(NOT WIN32 AND NOT USB_10_FOUND)
+	include_directories(${USB_10_INCLUDE_DIR})
 endif(NOT WIN32 AND NOT USB_10_FOUND)

 if(OPENNI_FOUND)
@@ -68,7 +70,6 @@
   # Add the include directories
   set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIRS})
   include_directories(${OPENNI_INCLUDE_DIRS})
-	include_directories(${USB_10_INCLUDE_DIR})
   message(STATUS "OpenNI found (include: ${OPENNI_INCLUDE_DIRS}, lib: ${OPENNI_LIBRARY})")
 endif(OPENNI_FOUND)


gtest: fix linking

gtest: fix linking

do not link against gtest twice
link against thread library later (fix #737)

--- cmake/Modules/LibAddTest.cmake
+++ cmake/Modules/LibAddTest.cmake
@@ -30,13 +30,14 @@
 	target_link_libraries (${source}
 		${ARG_LINK_LIBRARIES})

+	if (NOT ARG_NO_MAIN)
+		target_link_libraries (${source} gtest_main)
+	else (NOT ARG_NO_MAIN)
+		target_link_libraries (${source} gtest)
+	endif (NOT ARG_NO_MAIN)
+
 	target_link_libraries(${source}
 		${CMAKE_THREAD_LIBS_INIT})
-
-	target_link_libraries(${source} gtest)
-	if (NOT ARG_NO_MAIN)
-		target_link_libraries (${source} gtest_main)
-	endif (NOT ARG_NO_MAIN)

 	include_directories (SYSTEM ${GOOGLETEST_ROOT}/include)
 	include_directories (${CMAKE_SOURCE_DIR}/tests/gtest-framework)


Fixed python version issue #1903

Fixed python version issue #1903

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -20,8 +20,8 @@

 if(PYTHON_EXECUTABLE)
   if(PYTHON_VERSION_STRING)
-    set(PYTHON_VERSION_FULL "${PYTHON_VERSION_STRING}")
     set(PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
+    string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" PYTHON_VERSION_FULL "${PYTHON_VERSION_STRING}")
   else()
     execute_process(COMMAND ${PYTHON_EXECUTABLE} --version
       ERROR_VARIABLE PYTHON_VERSION_FULL


nodejs: Fixed cmake bug in v8 and uv detection logic

Signed-off-by: Henry Bruce <57ea958cad66de244404958c9a01f7a4ad51b29e@intel.com>
Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- cmake/modules/FindNodejs.cmake
+++ cmake/modules/FindNodejs.cmake
@@ -36,14 +36,14 @@
 endif()

 # Check that v8.h is in NODEJS_INCLUDE_DIRS
-find_path (V8_ROOT_DIR "v8.h" PATHS NODEJS_INCLUDE_DIRS)
+find_path (V8_ROOT_DIR "v8.h" PATHS ${NODEJS_INCLUDE_DIRS})
 if (NOT V8_ROOT_DIR)
   unset(NODEJS_INCLUDE_DIRS)
   message(ERROR " - v8.h not found")
 endif()

 # Check that uv.h is in NODEJS_INCLUDE_DIRS
-find_path (UV_ROOT_DIR "uv.h" PATHS NODEJS_INCLUDE_DIRS)
+find_path (UV_ROOT_DIR "uv.h" PATHS ${NODEJS_INCLUDE_DIRS})
 if (NOT UV_ROOT_DIR)
   unset(NODEJS_INCLUDE_DIRS)
   message(ERROR " - uv.h not found")


FindOracle.cmake: do not overwrite ${bindir}

root-config.in uses @bindir@ to get the value for the bindir directory
at configuration time, so setting it here overwrites that and generates
wrong values in RConfigure.in.

--- cmake/modules/FindOracle.cmake
+++ cmake/modules/FindOracle.cmake
@@ -75,8 +75,8 @@
       ${ORACLE_HOME}/bin
     )
     IF(SQLPLUS_EXECUTABLE)
-       get_filename_component(bindir ${SQLPLUS_EXECUTABLE} PATH)         # sqlplus executable needs its shared libraries
-       set(ENV{LD_LIBRARY_PATH} ${bindir}/../lib:$ENV{LD_LIBRARY_PATH})
+      get_filename_component(_bindir ${SQLPLUS_EXECUTABLE} PATH) # sqlplus executable needs its shared libraries
+      set(ENV{LD_LIBRARY_PATH} ${_bindir}/../lib:$ENV{LD_LIBRARY_PATH})
       EXECUTE_PROCESS(COMMAND ${SQLPLUS_EXECUTABLE} -version OUTPUT_VARIABLE sqlplus_out)
       STRING(REGEX MATCH "([0-9.]+)" sqlplus_version ${sqlplus_out})
       MESSAGE(STATUS "Found sqlplus version: ${sqlplus_version}")


Only build Python if not found

Only build Python if not found

This prevents adding the Python target multiple times. Still execute the library find multiple times though, since it might need to find with different arguments if you run this script multiple times from different places.

--- cmake/modules/FindPython.cmake
+++ cmake/modules/FindPython.cmake
@@ -4,23 +4,25 @@
 option(BUILD_PYTHON "Build the Python dependency from source. If you build this, the newly-built version will get used by Luna. If not, it will search for a pre-installed version on your system." FALSE)

 if(BUILD_PYTHON)
-	if(WIN32)
-		message(WARNING "Building Python on Windows is not supported at the moment. You will probably run into problems.")
+	if(NOT PYTHON_FOUND)
+		if(WIN32)
+			message(WARNING "Building Python on Windows is not supported at the moment. You will probably run into problems.")
+		endif()
+		message(STATUS "Building Python from source.")
+		include(ExternalProject)
+		ExternalProject_Add(Python
+			URL https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
+			URL_HASH SHA512=248B3EF2DEFEE7C013E8AC7472B9F2828B1C5B07A2F091EAD46EBDF209BE11DD37911978B590367699D9FAD50F1B98B998BCEEC34FA8369BA30950D3A5FB596F
+			CONFIGURE_COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX} --enable-shared --with-threads
+			BUILD_IN_SOURCE 1
+		)
+		set(PYTHON_EXECUTABLE ${CMAKE_INSTALL_PREFIX}/bin/python3)
+		set(PYTHON_VERSION_STRING "3.5.2")
+		set(PYTHON_VERSION_MAJOR 3)
+		set(PYTHON_VERSION_MINOR 5)
+		set(PYTHON_VERSION_PATCH 2)
+		set(PYTHON_FOUND TRUE)
 	endif()
-	message(STATUS "Building Python from source.")
-	include(ExternalProject)
-	ExternalProject_Add(Python
-		URL https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
-		URL_HASH SHA512=248B3EF2DEFEE7C013E8AC7472B9F2828B1C5B07A2F091EAD46EBDF209BE11DD37911978B590367699D9FAD50F1B98B998BCEEC34FA8369BA30950D3A5FB596F
-		CONFIGURE_COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX} --enable-shared --with-threads
-		BUILD_IN_SOURCE 1
-	)
-	set(PYTHON_EXECUTABLE ${CMAKE_INSTALL_PREFIX}/bin/python3)
-	set(PYTHON_VERSION_STRING "3.5.2")
-	set(PYTHON_VERSION_MAJOR 3)
-	set(PYTHON_VERSION_MINOR 5)
-	set(PYTHON_VERSION_PATCH 2)
-	set(PYTHON_FOUND TRUE)
 else() #Just find it on the system.
 	if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED") #Pass the REQUIRED parameter on to the script. Perhaps also do other parameters?
 		find_package(PythonInterp 3.4.0 REQUIRED)


build: only search for the needed python type

Windows has different types of runtime libraries which are ABI
incompatible with one another.  This requires that the debug build of
lldb link against the debug build of python.  Adjust the python search
to search for only the required type of python.  This permits building a
release build of lldb against just the release build of python.

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

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -153,83 +153,39 @@
   endif()

   file(TO_CMAKE_PATH "${PYTHON_HOME}" PYTHON_HOME)
-  file(TO_CMAKE_PATH "${PYTHON_HOME}/python_d.exe" PYTHON_DEBUG_EXE)
-  file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}_d.lib" PYTHON_DEBUG_LIB)
-  file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}_d.dll" PYTHON_DEBUG_DLL)
-
-  file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_RELEASE_EXE)
-  file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}.lib" PYTHON_RELEASE_LIB)
-  file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}.dll" PYTHON_RELEASE_DLL)
-
-  if (NOT EXISTS ${PYTHON_DEBUG_EXE})
-    message("Unable to find ${PYTHON_DEBUG_EXE}")
-    unset(PYTHON_DEBUG_EXE)
-  endif()
-
-  if (NOT EXISTS ${PYTHON_RELEASE_EXE})
-    message("Unable to find ${PYTHON_RELEASE_EXE}")
-    unset(PYTHON_RELEASE_EXE)
-  endif()
-
-  if (NOT EXISTS ${PYTHON_DEBUG_LIB})
-    message("Unable to find ${PYTHON_DEBUG_LIB}")
-    unset(PYTHON_DEBUG_LIB)
-  endif()
-
-  if (NOT EXISTS ${PYTHON_RELEASE_LIB})
-    message("Unable to find ${PYTHON_RELEASE_LIB}")
-    unset(PYTHON_RELEASE_LIB)
-  endif()
-
-  if (NOT EXISTS ${PYTHON_DEBUG_DLL})
-    message("Unable to find ${PYTHON_DEBUG_DLL}")
-    unset(PYTHON_DEBUG_DLL)
-  endif()
-
-  if (NOT EXISTS ${PYTHON_RELEASE_DLL})
-    message("Unable to find ${PYTHON_RELEASE_DLL}")
-    unset(PYTHON_RELEASE_DLL)
-  endif()
-
-  if (NOT (PYTHON_DEBUG_EXE AND PYTHON_RELEASE_EXE AND PYTHON_DEBUG_LIB AND PYTHON_RELEASE_LIB AND PYTHON_DEBUG_DLL AND PYTHON_RELEASE_DLL))
-    message("Python installation is corrupt. Python support will be disabled for this build.")
+  # TODO(compnerd) when CMake Policy `CMP0091` is set to NEW, we should use
+  # if(CMAKE_MSVC_RUNTIME_LIBRARY MATCHES MultiThreadedDebug)
+  if(CMAKE_BUILD_TYPE STREQUAL Debug)
+    file(TO_CMAKE_PATH "${PYTHON_HOME}/python_d.exe" PYTHON_EXE)
+    file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}_d.lib" PYTHON_LIB)
+    file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}_d.dll" PYTHON_DLL)
+  else()
+    file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_EXE)
+    file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}.lib" PYTHON_LIB)
+    file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}.dll" PYTHON_DLL)
+  endif()
+
+  foreach(component PYTHON_EXE;PYTHON_LIB;PYTHON_DLL)
+    if(NOT EXISTS ${${component}})
+      message("unable to find ${component}")
+      unset(${component})
+    endif()
+  endforeach()
+
+  if (NOT PYTHON_EXE OR NOT PYTHON_LIB OR NOT PYTHON_DLL)
+    message("Unable to find all Python components.  Python support will be disabled for this build.")
     set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
     return()
   endif()

-  # Generator expressions are evaluated in the context of each build configuration generated
-  # by CMake. Here we use the $<CONFIG:Debug>:VALUE logical generator expression to ensure
-  # that the debug Python library, DLL, and executable are used in the Debug build configuration.
-  #
-  # Generator expressions can be difficult to grok at first so here's a breakdown of the one
-  # used for PYTHON_LIBRARY:
-  #
-  # 1. $<CONFIG:Debug> evaluates to 1 when the Debug configuration is being generated,
-  #    or 0 in all other cases.
-  # 2. $<$<CONFIG:Debug>:${PYTHON_DEBUG_LIB}> expands to ${PYTHON_DEBUG_LIB} when the Debug
-  #    configuration is being generated, or nothing (literally) in all other cases.
-  # 3. $<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_LIB}> expands to ${PYTHON_RELEASE_LIB} when
-  #    any configuration other than Debug is being generated, or nothing in all other cases.
-  # 4. The conditionals in 2 & 3 are mutually exclusive.
-  # 5. A logical expression with a conditional that evaluates to 0 yields no value at all.
-  #
-  # Due to 4 & 5 it's possible to concatenate 2 & 3 to obtain a single value specific to each
-  # build configuration. In this example the value will be ${PYTHON_DEBUG_LIB} when generating the
-  # Debug configuration, or ${PYTHON_RELEASE_LIB} when generating any other configuration.
-  # Note that it's imperative that there is no whitespace between the two expressions, otherwise
-  # CMake will insert a semicolon between the two.
-  set (PYTHON_EXECUTABLE $<$<CONFIG:Debug>:${PYTHON_DEBUG_EXE}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_EXE}>)
-  set (PYTHON_LIBRARY $<$<CONFIG:Debug>:${PYTHON_DEBUG_LIB}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_LIB}>)
-  set (PYTHON_DLL $<$<CONFIG:Debug>:${PYTHON_DEBUG_DLL}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_DLL}>)
-
-  set (PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} PARENT_SCOPE)
-  set (PYTHON_LIBRARY ${PYTHON_LIBRARY} PARENT_SCOPE)
+  set (PYTHON_EXECUTABLE ${PYTHON_EXE} PARENT_SCOPE)
+  set (PYTHON_LIBRARY ${PYTHON_LIB} PARENT_SCOPE)
   set (PYTHON_DLL ${PYTHON_DLL} PARENT_SCOPE)
   set (PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR} PARENT_SCOPE)

-  message("-- LLDB Found PythonExecutable: ${PYTHON_RELEASE_EXE} and ${PYTHON_DEBUG_EXE}")
-  message("-- LLDB Found PythonLibs: ${PYTHON_RELEASE_LIB} and ${PYTHON_DEBUG_LIB}")
-  message("-- LLDB Found PythonDLL: ${PYTHON_RELEASE_DLL} and ${PYTHON_DEBUG_DLL}")
+  message("-- LLDB Found PythonExecutable: ${PYTHON_EXE}}")
+  message("-- LLDB Found PythonLibs: ${PYTHON_LIB}")
+  message("-- LLDB Found PythonDLL: ${PYTHON_DLL}")
   message("-- LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIR}")
 endfunction(find_python_libs_windows)


Simplified LLVMConfig.

Simplified LLVMConfig.

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

--- cmake/modules/LLVMConfig.cmake
+++ cmake/modules/LLVMConfig.cmake
@@ -59,6 +59,8 @@

 function(explicit_map_components_to_libraries out_libs)
   set( link_components ${ARGN} )
+  string(TOUPPER "${llvm_libs}" capitalized_libs)
+  # Translate symbolic component names to real libraries:
   foreach(c ${link_components})
     # add codegen, asmprinter, asmparser, disassembler
     list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
@@ -102,39 +104,48 @@
     elseif( c STREQUAL "all" )
       list(APPEND expanded_components ${llvm_libs})
     else( NOT idx LESS 0 )
-      list(APPEND expanded_components LLVM${c})
+      # Canonize the component name:
+      string(TOUPPER "${c}" capitalized)
+      list(FIND capitalized_libs LLVM${capitalized} lib_idx)
+      if( lib_idx LESS 0 )
+	# The component is unkown. Maybe is an ommitted target?
+	is_llvm_target_library(${c} iltl_result)
+	if( NOT iltl_result )
+	  message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.")
+	endif()
+      else( lib_idx LESS 0 )
+	list(GET llvm_libs ${lib_idx} canonical_lib)
+	list(APPEND expanded_components ${canonical_lib})
+      endif( lib_idx LESS 0 )
     endif( NOT idx LESS 0 )
   endforeach(c)
-  # We must match capitalization.
-  string(TOUPPER "${llvm_libs}" capitalized_libs)
-  list(REMOVE_DUPLICATES expanded_components)
+  # Expand dependencies while topologically sorting the list of libraries:
   list(LENGTH expanded_components lst_size)
-  set(result "")
-  while( 0 LESS ${lst_size} )
-    list(GET expanded_components 0 c)
-    string(TOUPPER "${c}" capitalized)
-    list(FIND capitalized_libs ${capitalized} idx)
-    set(add_it ON)
-    if( idx LESS 0 )
-      # The library is unkown. Maybe is an ommitted target?
-      is_llvm_target_library(${c} iltl_result)
-      if( NOT iltl_result )
-	message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.")
-      endif()
-      set(add_it OFF)
-    endif( idx LESS 0 )
-    list(GET llvm_libs ${idx} canonical_lib)
-    list(REMOVE_ITEM result ${canonical_lib})
-    foreach(c ${MSVC_LIB_DEPS_${canonical_lib}})
-      list(REMOVE_ITEM expanded_components ${c})
-    endforeach()
-    if( add_it )
-      list(APPEND result ${canonical_lib})
-      list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}})
+  set(cursor 0)
+  set(processed)
+  while( cursor LESS lst_size )
+    list(GET expanded_components ${cursor} lib)
+    list(APPEND expanded_components ${MSVC_LIB_DEPS_${lib}})
+    # Remove duplicates at the front:
+    list(REVERSE expanded_components)
+    list(REMOVE_DUPLICATES expanded_components)
+    list(REVERSE expanded_components)
+    list(APPEND processed ${lib})
+    # Find the maximum index that doesn't have to be re-processed:
+    while(NOT "${expanded_components}" MATCHES "^${processed}.*" )
+      list(REMOVE_AT processed -1)
+    endwhile()
+    list(LENGTH processed cursor)
+    list(LENGTH expanded_components lst_size)
+  endwhile( cursor LESS lst_size )
+  # Return just the libraries included in this build:
+  set(result)
+  foreach(c ${expanded_components})
+    list(FIND llvm_libs ${c} lib_idx)
+    if( NOT lib_idx LESS 0 )
+      set(result ${result} ${c})
     endif()
-    list(REMOVE_AT expanded_components 0)
-    list(LENGTH expanded_components lst_size)
-  endwhile( 0 LESS ${lst_size} )
+  endforeach(c)
   set(${out_libs} ${result} PARENT_SCOPE)
 endfunction(explicit_map_components_to_libraries)

@@ -151,13 +162,13 @@

 # The format generated by GenLibDeps.pl

-# libLLVMARMAsmPrinter.a: libLLVMMC.a libLLVMSupport.a
+# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a

 # is translated to:

-# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
+# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget)

-# It is necessary to remove the `lib' prefix and the `.a' suffix.
+# It is necessary to remove the `lib' prefix and the `.a'.

 # This 'sed' script should do the trick:
 # sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: # #' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt


Default to "Debug" for subdir detection if CMAKE_BINARY_DIR unset.

--- FindGoogleMock.cmake
+++ FindGoogleMock.cmake
@@ -222,7 +222,15 @@

     if (${CMAKE_GENERATOR} STREQUAL "Xcode")

-        set (${SUFFIX} ${CMAKE_BUILD_TYPE} PARENT_SCOPE)
+        if (CMAKE_BUILD_TYPE)
+
+            set (${SUFFIX} ${CMAKE_BUILD_TYPE} PARENT_SCOPE)
+
+        else (CMAKE_BUILD_TYPE)
+
+            set (${SUFFIX} "Debug" PARENT_SCOPE)
+
+        endif (CMAKE_BUILD_TYPE)

     endif (${CMAKE_GENERATOR} STREQUAL "Xcode")


Fixed CMake error for newer CMake versions.

--- library/cmake/Modules/FindR.cmake
+++ library/cmake/Modules/FindR.cmake
@@ -39,7 +39,7 @@
 			OUTPUT_VARIABLE R_VERSION
 			OUTPUT_STRIP_TRAILING_WHITESPACE
 	)
-	string(REGEX REPLACE "[a-zA-Z]|[(].*|[ ]" "" R_VERSION ${R_VERSION})
+	string(REGEX REPLACE "[a-zA-Z]|[(].*|[ ]" "" R_VERSION "${R_VERSION}")

 	set(R_LIBRARY_DIR "${R_HOME_DIR}/bin/x64")
 	if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")


Remove unneeded Python development configuration passed to ITK project

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -34,9 +34,6 @@

 list(APPEND ITK_VARS
   PYTHON_EXECUTABLE
-  PYTHON_INCLUDE_DIR
-  PYTHON_LIBRARY
-  PYTHON_DEBUG_LIBRARY
   )

 VariableListToCache( ITK_VARS  ep_itk_cache )


hunter_pack_git_self: Fix files location

--- cmake/modules/hunter_pack_git_self.cmake
+++ cmake/modules/hunter_pack_git_self.cmake
@@ -245,6 +245,10 @@
   endif()

   set(head_file "${output}")
+  if(NOT IS_ABSOLUTE "${head_file}")
+    set(head_file ${top_git_directory}/${head_file})
+  endif()
+
   if(NOT EXISTS "${head_file}")
     hunter_internal_error("File not found: '${head_file}'")
   endif()
@@ -288,6 +292,9 @@
   endif()

   set(ref_file "${output}")
+  if(NOT IS_ABSOLUTE "${ref_file}")
+    set(ref_file "${top_git_directory}/${ref_file}")
+  endif()
   if(NOT EXISTS "${ref_file}")
     hunter_internal_error("File not fond: ${ref_file}")
   endif()


Update select_compute_arch.cmake from upstream (#20369)

Upstream commit 92854bf29eb4e8e0e3977358a3ab40bc2059f1b2

--- cmake/upstream/select_compute_arch.cmake
+++ cmake/upstream/select_compute_arch.cmake
@@ -35,9 +35,9 @@
 #       - "Auto" detects local machine GPU compute arch at runtime.
 #       - "Common" and "All" cover common and entire subsets of architectures
 #      ARCH_AND_PTX : NAME | NUM.NUM | NUM.NUM(NUM.NUM) | NUM.NUM+PTX
-#      NAME: Fermi Kepler Maxwell Kepler+Tegra Kepler+Tesla Maxwell+Tegra Pascal Volta Turing
+#      NAME: Fermi Kepler Maxwell Kepler+Tegra Kepler+Tesla Maxwell+Tegra Pascal Volta Turing Ampere
 #      NUM: Any number. Only those pairs are currently accepted by NVCC though:
-#            2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 7.0 7.2 7.5
+#            2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 7.0 7.2 7.5 8.0 8.6
 #      Returns LIST of flags to be added to CUDA_NVCC_FLAGS in ${out_variable}
 #      Additionally, sets ${out_variable}_readable to the resulting numeric list
 #      Example:
@@ -55,58 +55,84 @@
 endif()

 # See: https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list
-
-# This list will be used for CUDA_ARCH_NAME = All option
-set(CUDA_KNOWN_GPU_ARCHITECTURES  "Fermi" "Kepler" "Maxwell")
-
-# This list will be used for CUDA_ARCH_NAME = Common option (enabled by default)
-set(CUDA_COMMON_GPU_ARCHITECTURES "3.0" "5.0")
-
-if(CUDA_VERSION VERSION_LESS "7.0")
-  set(CUDA_LIMIT_GPU_ARCHITECTURE "5.2")
-endif()
-
-# This list is used to filter CUDA archs when autodetecting
-set(CUDA_ALL_GPU_ARCHITECTURES "3.0" "3.2" "3.5" "5.0")
-
-if(CUDA_VERSION VERSION_GREATER_EQUAL "7.0")
-  list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Kepler+Tegra" "Kepler+Tesla" "Maxwell+Tegra")
-  list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "5.2")
-
-  if(CUDA_VERSION VERSION_LESS "8.0")
-    set(CUDA_LIMIT_GPU_ARCHITECTURE "6.0")
-  endif()
-endif()
+# Additions, deprecations, and removals can be found in the release notes:
+# https://developer.nvidia.com/cuda-toolkit-archive
+
+# The initial status here is for CUDA 7.0
+set(CUDA_KNOWN_GPU_ARCHITECTURES  "Fermi" "Kepler" "Maxwell" "Kepler+Tegra" "Kepler+Tesla" "Maxwell+Tegra")
+set(CUDA_COMMON_GPU_ARCHITECTURES "2.0" "2.1" "3.0" "3.5" "5.0" "5.3")
+set(CUDA_LIMIT_GPU_ARCHITECTURE "6.0")
+set(CUDA_ALL_GPU_ARCHITECTURES "2.0" "2.1" "3.0" "3.2" "3.5" "3.7" "5.0" "5.2" "5.3")
+set(_CUDA_MAX_COMMON_ARCHITECTURE "5.2+PTX")
+

 if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0")
   list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Pascal")
   list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "6.0" "6.1")
   list(APPEND CUDA_ALL_GPU_ARCHITECTURES "6.0" "6.1" "6.2")

-  if(CUDA_VERSION VERSION_LESS "9.0")
-    set(CUDA_LIMIT_GPU_ARCHITECTURE "7.0")
-  endif()
+  set(_CUDA_MAX_COMMON_ARCHITECTURE "6.2+PTX")
+  set(CUDA_LIMIT_GPU_ARCHITECTURE "7.0")
+
+  list(REMOVE_ITEM CUDA_COMMON_GPU_ARCHITECTURES "2.0" "2.1")
 endif ()

 if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
   list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Volta")
   list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.0")
-  list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.0" "7.0+PTX" "7.2" "7.2+PTX")
-
-  if(CUDA_VERSION VERSION_LESS "10.0")
-    set(CUDA_LIMIT_GPU_ARCHITECTURE "8.0")
-  endif()
+  list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.0" "7.2")
+
+  set(_CUDA_MAX_COMMON_ARCHITECTURE "7.2+PTX")
+  set(CUDA_LIMIT_GPU_ARCHITECTURE "8.0")
+
+  list(REMOVE_ITEM CUDA_KNOWN_GPU_ARCHITECTURES "Fermi")
+  list(REMOVE_ITEM CUDA_ALL_GPU_ARCHITECTURES "2.0" "2.1")
 endif()

 if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
   list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Turing")
   list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.5")
-  list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.5" "7.5+PTX")
-
-  if(CUDA_VERSION VERSION_LESS "11.0")
-    set(CUDA_LIMIT_GPU_ARCHITECTURE "9.0")
-  endif()
-endif()
+  list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.5")
+
+  set(_CUDA_MAX_COMMON_ARCHITECTURE "7.5+PTX")
+  set(CUDA_LIMIT_GPU_ARCHITECTURE "8.0")
+
+  list(REMOVE_ITEM CUDA_COMMON_GPU_ARCHITECTURES "3.0")
+endif()
+
+# https://docs.nvidia.com/cuda/archive/11.0/cuda-toolkit-release-notes/index.html#cuda-general-new-features
+# https://docs.nvidia.com/cuda/archive/11.0/cuda-toolkit-release-notes/index.html#deprecated-features
+if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
+  list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Ampere")
+  list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "8.0")
+  list(APPEND CUDA_ALL_GPU_ARCHITECTURES "8.0")
+
+  set(_CUDA_MAX_COMMON_ARCHITECTURE "8.0+PTX")
+  set(CUDA_LIMIT_GPU_ARCHITECTURE "8.6")
+
+  list(REMOVE_ITEM CUDA_COMMON_GPU_ARCHITECTURES "3.5" "5.0")
+  list(REMOVE_ITEM CUDA_ALL_GPU_ARCHITECTURES "3.0" "3.2")
+endif()
+
+if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
+  list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "8.6")
+  list(APPEND CUDA_ALL_GPU_ARCHITECTURES "8.6")
+
+  set(_CUDA_MAX_COMMON_ARCHITECTURE "8.6+PTX")
+  set(CUDA_LIMIT_GPU_ARCHITECTURE "9.0")
+endif()
+
+list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "${_CUDA_MAX_COMMON_ARCHITECTURE}")
+
+# Check with: cmake -DCUDA_VERSION=7.0 -P select_compute_arch.cmake
+if(DEFINED CMAKE_SCRIPT_MODE_FILE)
+  include(CMakePrintHelpers)
+  cmake_print_variables(CUDA_KNOWN_GPU_ARCHITECTURES)
+  cmake_print_variables(CUDA_COMMON_GPU_ARCHITECTURES)
+  cmake_print_variables(CUDA_LIMIT_GPU_ARCHITECTURE)
+  cmake_print_variables(CUDA_ALL_GPU_ARCHITECTURES)
+endif()
+

 ################################################################################################
 # A function for automatic detection of GPUs installed  (if autodetection is enabled)
@@ -242,6 +268,9 @@
       elseif(${arch_name} STREQUAL "Turing")
         set(arch_bin 7.5)
         set(arch_ptx 7.5)
+      elseif(${arch_name} STREQUAL "Ampere")
+        set(arch_bin 8.0)
+        set(arch_ptx 8.0)
       else()
         message(SEND_ERROR "Unknown CUDA Architecture Name ${arch_name} in CUDA_SELECT_NVCC_ARCH_FLAGS")
       endif()


Switch jenkins build to nightly dashboard model

--- Testing/jenkins_mercury.cmake
+++ Testing/jenkins_mercury.cmake
@@ -8,7 +8,7 @@
 set(MERCURY_BUILD_CONFIGURATION "Debug")

 # MERCURY_DASHBOARD_MODEL=Experimental | Nightly | Continuous
-set(MERCURY_DASHBOARD_MODEL "Continuous")
+set(MERCURY_DASHBOARD_MODEL "Nightly")

 # Disable loop when MERCURY_DASHBOARD_MODEL=Continuous
 message("Disabling looping (if applicable)")


Add another pattern to the boost python library naming scheme.

--- config/FindVIGRANUMPY_DEPENDENCIES.cmake
+++ config/FindVIGRANUMPY_DEPENDENCIES.cmake
@@ -93,6 +93,7 @@
     IF(Boost_FOUND)
         FIND_LIBRARY(Boost_PYTHON_LIBRARY
                      NAMES boost_python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}   # Linux with multiple Python versions
+                           boost_python-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
                            boost_python-mt                                                 # Mac
                            boost_python                                                    # default
                      HINTS "${Boost_LIBRARY_DIR}"


CPP-882 - Correct pthread compiler flag for older CMake versions (#11)

--- cpp-driver/cmake/modules/CppDriver.cmake
+++ cpp-driver/cmake/modules/CppDriver.cmake
@@ -420,13 +420,13 @@
     message(FATAL_ERROR "Unable to Locate libuv: libuv v1.0.0+ is required")
   endif()

-  if (LIBUV_VERSION VERSION_LESS "1.0")
+  if(LIBUV_VERSION VERSION_LESS "1.0")
     message(FATAL_ERROR "Libuv version ${LIBUV_VERSION} is not "
       " supported. Please updgrade to libuv version 1.0 or greater in order to "
       "utilize the driver.")
   endif()

-  if (LIBUV_VERSION VERSION_LESS "1.6")
+  if(LIBUV_VERSION VERSION_LESS "1.6")
     message(WARNING "Libuv version ${LIBUV_VERSION} does not support custom "
     "memory allocators (version 1.6 or greater required)")
   endif()
@@ -436,10 +436,16 @@
   set(CASS_LIBS ${CASS_LIBS} ${LIBUV_LIBRARIES})

   # libuv and gtests require thread library
-  set (THREADS_PREFER_PTHREAD_FLAG 1)
+  set(CMAKE_THREAD_PREFER_PTHREAD 1)
+  set(THREADS_PREFER_PTHREAD_FLAG 1)
   find_package(Threads REQUIRED)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
+  if(NOT WIN32 AND ${CMAKE_VERSION} VERSION_LESS "3.1.0")
+    # FindThreads in CMake versions < v3.1.0 do not have the THREADS_PREFER_PTHREAD_FLAG to prefer -pthread
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+  endif()
 endmacro()

 #------------------------


testing interpolation

testing interpolation

--- modules/fc_optional.cmake
+++ modules/fc_optional.cmake
@@ -28,8 +28,9 @@
 #
 # autocmake.yml configuration::
 #
+#   foo: "hey ho"
 #   docopt:
-#     - "--fc=<FC> Fortran compiler [default: gfortran]."
+#     - "--fc=<FC> %(foo) compiler [default: gfortran]."
 #     - "--extra-fc-flags=<EXTRA_FCFLAGS> Extra Fortran compiler flags [default: '']."
 #     - "--fc-support=<FC_SUPPORT> Toggle Fortran language support (ON/OFF) [default: ON]."
 #   export: "'FC={0}'.format(arguments['--fc'])"


SVN_SILENT made messages (.desktop file)

--- plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
+++ plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
@@ -1,6 +1,7 @@
 [Desktop Entry]
 Encoding=UTF-8
 Comment=Custom account configuration user interface for accounts using the Morse connection manager.
+Comment[ca]=Interfície d'usuari de configuració de compte personalitzat per comptes que utilitzen el gestor de connexions Morse.
 Comment[cs]=Vlastní uživatelské rozhraní nastavení účtů pro účty používající správce spojení Morse.
 Comment[da]=Brugerflade til brugertilpasset kontokonfiguration til konti der bruger forbindelseshåndteringen Morse.
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Morse-Verbindungsverwaltung verwenden.


Require GCC >= 5.0 for C++14

Require GCC >= 5.0 for C++14

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -24,8 +24,8 @@
     COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
     OUTPUT_VARIABLE GCC_VERSION
     )
-  if (NOT (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9))
-    MESSAGE(FATAL_ERROR "Requires GCC >= 4.9.")
+  if (NOT (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0))
+    message(FATAL_ERROR "Requires GCC >= 5.0.")
   endif()
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
   execute_process(


We need multiple component specifications in install command

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@959 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -94,10 +94,9 @@
         SOVERSION ${PCL_MAJOR_VERSION}
         DEFINE_SYMBOL "PCLAPI_EXPORTS")
     install(TARGETS ${_name}
-        RUNTIME DESTINATION ${BIN_INSTALL_DIR}
-        LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-        ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-        COMPONENT ${_component})
+        RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT ${_component}
+        LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component}
+        ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component})
 endmacro(PCL_ADD_LIBRARY)


glowl external targetting original repo and version v0.4e

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -60,8 +60,8 @@
     endif()

     add_external_headeronly_project(glowl
-      GIT_REPOSITORY https://github.com/gralkapk/glowl.git
-      GIT_TAG "b015b536f59c471691079dac8aeea146e7b4a627"
+      GIT_REPOSITORY https://github.com/invor/glowl.git
+      GIT_TAG "v0.4e"
       INCLUDE_DIR "include")

   # json


Updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -85,6 +85,31 @@
 # DLL is not found, fatal error message is printed.
 #

+#
+#   This file is part of Corrade.
+#
+#   Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013
+#             Vladimír Vondruš <mosra@centrum.cz>
+#
+#   Permission is hereby granted, free of charge, to any person obtaining a
+#   copy of this software and associated documentation files (the "Software"),
+#   to deal in the Software without restriction, including without limitation
+#   the rights to use, copy, modify, merge, publish, distribute, sublicense,
+#   and/or sell copies of the Software, and to permit persons to whom the
+#   Software is furnished to do so, subject to the following conditions:
+#
+#   The above copyright notice and this permission notice shall be included
+#   in all copies or substantial portions of the Software.
+#
+#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+#   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+#   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+#   DEALINGS IN THE SOFTWARE.
+#
+
 # Libraries
 find_library(CORRADE_INTERCONNECT_LIBRARY CorradeInterconnect)
 find_library(CORRADE_UTILITY_LIBRARY CorradeUtility)


modules: updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -63,7 +63,10 @@
 # The macro adds preprocessor directive CORRADE_DYNAMIC_PLUGIN. Additional
 # libraries can be linked in via target_link_libraries(plugin_name ...). If
 # install_dir is set to CMAKE_CURRENT_BINARY_DIR (e.g. for testing purposes),
-# the files are copied directly, without need to run `make install`.
+# the files are copied directly, without the need to run `make install`. Note
+# that the files are actually put into configuration-based subdirectory, i.e.
+# ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}. See documentation of
+# CMAKE_CFG_INTDIR variable for more information.
 #
 #
 # Add static plugin.
@@ -152,13 +155,13 @@
 file(READ ${CORRADE_INCLUDE_DIR}/corradeConfigure.h _corradeConfigure)

 # Compatibility?
+string(FIND "${_corradeConfigure}" "#define CORRADE_GCC47_COMPATIBILITY" _GCC47_COMPATIBILITY)
+if(NOT _GCC47_COMPATIBILITY EQUAL -1)
+    set(CORRADE_GCC47_COMPATIBILITY 1)
+endif()
 string(FIND "${_corradeConfigure}" "#define CORRADE_GCC46_COMPATIBILITY" _GCC46_COMPATIBILITY)
 if(NOT _GCC46_COMPATIBILITY EQUAL -1)
     set(CORRADE_GCC46_COMPATIBILITY 1)
-endif()
-string(FIND "${_corradeConfigure}" "#define CORRADE_GCC47_COMPATIBILITY" _GCC47_COMPATIBILITY)
-if(NOT _GCC47_COMPATIBILITY EQUAL -1)
-    set(CORRADE_GCC47_COMPATIBILITY 1)
 endif()
 string(FIND "${_corradeConfigure}" "#define CORRADE_BUILD_DEPRECATED" _BUILD_DEPRECATED)
 if(NOT _BUILD_DEPRECATED EQUAL -1)
@@ -191,8 +194,8 @@
 set(CORRADE_TESTSUITE_LIBRARIES ${CORRADE_TESTSUITE_LIBRARY} ${CORRADE_UTILITY_LIBRARIES})

 # At least static build needs this
-if((UNIX OR CORRADE_TARGET_NACL) AND NOT CORRADE_TARGET_NACL_NEWLIB)
-    set(CORRADE_PLUGINMANAGER_LIBRARIES ${CORRADE_PLUGINMANAGER_LIBRARIES} dl)
+if(UNIX OR CORRADE_TARGET_NACL_GLIBC)
+    set(CORRADE_PLUGINMANAGER_LIBRARIES ${CORRADE_PLUGINMANAGER_LIBRARIES} ${CMAKE_DL_LIBS})
 endif()

 mark_as_advanced(CORRADE_UTILITY_LIBRARY


cmake: macos: use /usr/local/include

cmake: macos: use /usr/local/include

--- python/cmake/GlobalConfig.cmake
+++ python/cmake/GlobalConfig.cmake
@@ -22,7 +22,8 @@

 # Fix linking on 10.14+. See https://stackoverflow.com/questions/54068035
 if(APPLE)
-	LINK_DIRECTORIES(/usr/local/lib)
+	link_directories(/usr/local/lib)
+	include_directories(/usr/local/include)
 endif()

 # Macros


revert dot support (cairo output has some bug)

--- src/Doxyfile.cmake
+++ src/Doxyfile.cmake
@@ -788,32 +788,43 @@
                          *.cxx \
                          *.cpp \
                          *.c++ \
-                         *.d \
                          *.java \
                          *.ii \
                          *.ixx \
                          *.ipp \
                          *.i++ \
                          *.inl \
+                         *.idl \
+                         *.ddl \
+                         *.odl \
                          *.h \
                          *.hh \
                          *.hxx \
                          *.hpp \
                          *.h++ \
-                         *.idl \
-                         *.odl \
                          *.cs \
+                         *.d \
                          *.php \
-                         *.php3 \
+                         *.php4 \
+                         *.php5 \
+                         *.phtml \
                          *.inc \
                          *.m \
+                         *.markdown \
+                         *.md \
                          *.mm \
                          *.dox \
                          *.py \
                          *.f90 \
                          *.f \
+                         *.for \
+                         *.tcl \
                          *.vhd \
-                         *.vhdl
+                         *.vhdl \
+                         *.ucf \
+                         *.qsf \
+                         *.as \
+                         *.js

 # The RECURSIVE tag can be used to specify whether or not subdirectories should
 # be searched for input files as well.
@@ -2127,7 +2138,7 @@
 # set to NO
 # The default value is: YES.

-HAVE_DOT               = NO
+HAVE_DOT               = YES

 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
 # to run in parallel. When set to 0 doxygen will base this on the number of
@@ -2283,7 +2294,7 @@
 # The default value is: png.
 # This tag requires that the tag HAVE_DOT is set to YES.

-DOT_IMAGE_FORMAT       = png
+DOT_IMAGE_FORMAT       = png:gd

 # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
 # enable generation of interactive SVG images that allow zooming and panning.


Make sure gbenchmark always defined

Make sure gbenchmark always defined

--- modules/FindGBenchmark.cmake
+++ modules/FindGBenchmark.cmake
@@ -3,22 +3,21 @@
 # - GBENCHMARK_FOUND if the library is found
 # - GBENCHMARK_LIBRARY is the path to the library
 # - GBENCHMARK_INCLUDE_DIR is the path to the include directory
-if(GBENCHMARK_FOUND)
-  return()
+if(NOT GBENCHMARK_FOUND)
+  find_library(GBENCHMARK_LIBRARY benchmark DOC "Path to the google benchmark library")
+  find_path(
+      GBENCHMARK_INCLUDE_DIR benchmark/benchmark.h
+      DOC "Path to google benchmark include directory"
+      PATHS "${casapath}"
+  )
+
+  include(FindPackageHandleStandardArgs)
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+      GBENCHMARK
+      REQUIRED_VARS GBENCHMARK_LIBRARY GBENCHMARK_INCLUDE_DIR
+  )
 endif()

-find_library(GBENCHMARK_LIBRARY benchmark DOC "Path to the google benchmark library")
-find_path(
-  GBENCHMARK_INCLUDE_DIR benchmark/benchmark.h
-  DOC "Path to google benchmark include directory"
-  PATHS "${casapath}"
-)
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(
-  GBENCHMARK
-  REQUIRED_VARS GBENCHMARK_LIBRARY GBENCHMARK_INCLUDE_DIR
-)
 if(GBENCHMARK_FOUND)
   if(GBENCHMARK_LIBRARY MATCHES "\\.a$")
     add_library(gbenchmark STATIC IMPORTED GLOBAL)
@@ -26,6 +25,7 @@
     add_library(gbenchmark SHARED IMPORTED GLOBAL)
   endif()
   set_target_properties(gbenchmark PROPERTIES
-    IMPORTED_LOCATION "${GBENCHMARK_LIBRARY}"
-    INTERFACE_INCLUDE_DIRECTORIES "${GBENCHMARK_INCLUDE_DIR}")
+      IMPORTED_LOCATION "${GBENCHMARK_LIBRARY}"
+      INTERFACE_INCLUDE_DIRECTORIES "${GBENCHMARK_INCLUDE_DIR}"
+  )
 endif()


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 09)

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


update openssl to 1.1.1 branch (#196)

update openssl to 1.1.1 branch (#196)

further info:

* https://github.com/luvit/luvi/pull/193#issuecomment-470867151

--- deps/openssl.cmake
+++ deps/openssl.cmake
@@ -27,8 +27,8 @@

   ExternalProject_Add(openssl
       PREFIX            openssl
-      URL               https://www.openssl.org/source/openssl-1.1.0i.tar.gz
-      URL_HASH          SHA256=ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99
+      URL               https://www.openssl.org/source/openssl-1.1.1b.tar.gz
+      URL_HASH          SHA256=5c557b023230413dfb0756f3137a13e6d726838ccd1430888ad15bfb2b43ea4b
       LOG_BUILD         ON
       BUILD_IN_SOURCE   YES
       BUILD_COMMAND     ${OPENSSL_BUILD_COMMAND}


Refactored some logging in code-coverage.cmake

--- src/cmake/code-coverage.cmake
+++ src/cmake/code-coverage.cmake
@@ -5,24 +5,24 @@
 # Verify if code coverage is possible

 if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-    message("Current compiler is ${CMAKE_CXX_COMPILER_ID}. Code-coverage only available for GCC.\n")
+    message("- Current compiler is ${CMAKE_CXX_COMPILER_ID}. Code-coverage only available for GCC.")
     set(SKIP_COVERAGE true)
 elseif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
-    message("Code-coverage only available when building for Debug.\n")
+    message("- Code-coverage only available when building for Debug.")
     set(SKIP_COVERAGE true)
 else()
     if(NOT GCOV)
-        message(WARNING "Gcov not found.")
+        message(WARNING "- Gcov not found.")
         set(SKIP_COVERAGE true)
     endif()

     if(NOT LCOV)
-        message(WARNING "Lcov not found.")
+        message(WARNING "- Lcov not found.")
         set(SKIP_COVERAGE true)
     endif()

     if(NOT GENHTML)
-        message(WARNING "Genhtml not found.")
+        message(WARNING "- Genhtml not found.")
         set(SKIP_COVERAGE true)
     endif()
 endif()
@@ -96,7 +96,7 @@

     install(
         DIRECTORY "${TARGET_BINARY_DIR}/${TARGET_COVERAGE}"
-        DESTINATION "code-analysis"
+        DESTINATION ./code-analysis
         OPTIONAL
     )


[NFC] PFM: actually report package as found, and advertise description

This slightly prettifies the CMake's `feature_summary()` output,
should the library be built as part of some project that then prints
the CMake summary.

--- cmake/Modules/FindPFM.cmake
+++ cmake/Modules/FindPFM.cmake
@@ -4,6 +4,11 @@
 include(CheckIncludeFile)
 include(CheckLibraryExists)
 enable_language(C)
+
+set_package_properties(PFM PROPERTIES
+                       URL http://perfmon2.sourceforge.net/
+                       DESCRIPTION "a helper library to develop monitoring tools"
+                       PURPOSE "Used to program specific performance monitoring events")

 check_library_exists(libpfm.a pfm_initialize "" HAVE_LIBPFM_INITIALIZE)
 if(HAVE_LIBPFM_INITIALIZE)
@@ -13,6 +18,7 @@
   if(HAVE_PERFMON_PERF_EVENT_H AND HAVE_PERFMON_PFMLIB_H AND HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
     message("Using Perf Counters.")
     set(HAVE_LIBPFM 1)
+    set(PFM_FOUND 1)
   endif()
 else()
   message("Perf Counters support requested, but was unable to find libpfm.")


Didn't work so well, restore default to off

We can look at enabling the required modules through the command
line/in the CMake code itself.

Signed-off-by: Marcus D. Hanwell <cf7042e2e8eee958b5bcde1ae2cbefef82efc184@kitware.com>

--- cmake/ParaViewModules.cmake
+++ cmake/ParaViewModules.cmake
@@ -103,7 +103,7 @@
     set(${cm-project}_DEPENDS_ANY "")
     set(${cm-project}_DEPENDS_OPTIONAL "")
     set(${cm-project}_CAN_USE_SYSTEM 0)
-    set(${cm-project}_ENABLED_DEFAULT ON)
+    set(${cm-project}_ENABLED_DEFAULT OFF)
     set (doing "")

     set (project_arguments "${ARGN}") #need quotes to keep empty list items


[CMake] For Darwin rpath $ORIGIN should be @loader_path

This allows lldb builds on darwin with CMake to have the correct rpath.

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -101,7 +101,13 @@
 macro(add_lldb_executable name)
   add_llvm_executable(${name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
   set_target_properties(${name} PROPERTIES FOLDER "lldb executables")
-  set_target_properties(${name} PROPERTIES INSTALL_RPATH "$ORIGIN/../lib")
+  # $ORIGIN is only
+  if(APPLE)
+    set(rpath_prefix "@loader_path")
+  else()
+    set(rpath_prefix "$ORIGIN")
+  endif()
+  set_target_properties(${name} PROPERTIES INSTALL_RPATH "${rpath_prefix}/../lib")
 endmacro(add_lldb_executable)

 # Support appending linker flags to an existing target.


Change version to 0.13.0-alpha

Change version to 0.13.0-alpha

--- version.cmake
+++ version.cmake
@@ -14,5 +14,6 @@
 # limitations under the License.

 set(TCAM_VERSION_MAJOR 0)
-set(TCAM_VERSION_MINOR 12)
+set(TCAM_VERSION_MINOR 13)
 set(TCAM_VERSION_PATCH 0)
+set(TCAM_VERSION_MODIFIER "-alpha")


Updated Doxygen configuration file

Updated Doxygen configuration file

--- doc/Doxyfile.cmake
+++ doc/Doxyfile.cmake
@@ -1,8 +1,10 @@
-# Doxyfile 1.8.3.1
+# Doxyfile 1.8.4

 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project.
 #
+# All text after a double hash (##) is considered a comment and is placed
+# in front of the TAG it is preceding .
 # All text after a hash (#) is considered a comment and will be ignored.
 # The format is:
 #       TAG = value [value, ...]
@@ -70,9 +72,9 @@
 # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
 # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
 # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+# messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian,
+# Persian, Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic,
+# Slovak, Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.

 OUTPUT_LANGUAGE        = English

@@ -252,10 +254,10 @@

 MARKDOWN_SUPPORT       = YES

-# When enabled doxygen tries to link words that correspond to documented classes,
-# or namespaces to their corresponding documentation. Such a link can be
-# prevented in individual cases by by putting a % sign in front of the word or
-# globally by setting AUTOLINK_SUPPORT to NO.
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.

 AUTOLINK_SUPPORT       = YES

@@ -311,11 +313,11 @@
 INLINE_GROUPED_CLASSES = NO

 # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
+# unions with only public data fields or simple typedef fields will be shown
+# inline in the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO (the default), structs, classes, and unions are shown on a separate
+# page (for HTML and Man pages) or section (for LaTeX and RTF).

 INLINE_SIMPLE_STRUCTS  = NO

@@ -329,30 +331,14 @@

 TYPEDEF_HIDES_STRUCT   = NO

-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE      = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can
+# be an expensive process and often the same symbol appear multiple times in
+# the code, doxygen keeps a cache of pre-resolved symbols. If the cache is too
+# small doxygen will become slower. If the cache is too large, memory is wasted.
+# The cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid
+# range is 0..9, the default is 0, corresponding to a cache size of 2^16 = 65536
+# symbols.

 LOOKUP_CACHE_SIZE      = 0

@@ -363,7 +349,7 @@
 # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
 # documentation are documented, even if no documentation was available.
 # Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+# the EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES

 EXTRACT_ALL            = NO

@@ -757,8 +743,10 @@
 # is the value of the INPUT_FILTER tag, and <input-file> is the name of an
 # input file. Doxygen will then use the output that the filter program writes
 # to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
+# If FILTER_PATTERNS is specified, this tag will be ignored.
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.

 INPUT_FILTER           =

@@ -788,9 +776,9 @@
 FILTER_SOURCE_PATTERNS =

 # If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page (index.html).
-# This can be useful if you have a project on for instance GitHub and want reuse
-# the introduction page also for the doxygen output.
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want reuse the introduction page also for the doxygen output.

 USE_MDFILE_AS_MAINPAGE = README.md

@@ -935,7 +923,7 @@
 # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
 # other source files which should be copied to the HTML output directory. Note
 # that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
 # files. In the HTML_STYLESHEET file, use the file name only. Also note that
 # the files will be copied as-is; there are no commands or markers available.

@@ -949,13 +937,13 @@
 # 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
 # The allowed range is 0 to 359.

-HTML_COLORSTYLE_HUE    =
+HTML_COLORSTYLE_HUE    = 220

 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
 # the colors in the HTML output. For a value of 0 the output will use
 # grayscales only. A value of 255 will produce the most vivid colors.

-HTML_COLORSTYLE_SAT    =
+HTML_COLORSTYLE_SAT    = 100

 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
 # the luminance component of the colors in the HTML output. Values below
@@ -964,7 +952,7 @@
 # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
 # and 100 does not change the gamma.

-HTML_COLORSTYLE_GAMMA  =
+HTML_COLORSTYLE_GAMMA  = 80

 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
 # page will contain the date and time when the page was generated. Setting
@@ -1204,7 +1192,7 @@
 USE_MATHJAX            = NO

 # When MathJax is enabled you can set the default output format to be used for
-# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
+# the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
 # SVG. The default value is HTML-CSS, which is slower, but has the best
 # compatibility.

@@ -1227,6 +1215,11 @@

 MATHJAX_EXTENSIONS     =

+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript
+# pieces of code that will be used on startup of the MathJax code.
+
+MATHJAX_CODEFILE       =
+
 # When the SEARCHENGINE tag is enabled doxygen will generate a search box
 # for the HTML output. The underlying search engine uses javascript
 # and DHTML and should work on any modern browser. Note that when using
@@ -1252,8 +1245,8 @@
 # which needs to be processed by an external indexer. Doxygen will invoke an
 # external search engine pointed to by the SEARCHENGINE_URL option to obtain
 # the search results. Doxygen ships with an example indexer (doxyindexer) and
-# search engine (doxysearch.cgi) which are based on the open source search engine
-# library Xapian. See the manual for configuration details.
+# search engine (doxysearch.cgi) which are based on the open source search
+# engine library Xapian. See the manual for configuration details.

 EXTERNAL_SEARCH        = NO

@@ -1324,7 +1317,7 @@

 # The PAPER_TYPE tag can be used to set the paper type that is used
 # by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
+# executive. If left blank a4 will be used.

 PAPER_TYPE             = a4wide

@@ -1346,6 +1339,13 @@
 # standard footer. Notice: only use this tag if you know what you are doing!

 LATEX_FOOTER           =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images
+# or other source files which should be copied to the LaTeX output directory.
+# Note that the files will be copied as-is; there are no commands or markers
+# available.
+
+LATEX_EXTRA_FILES      =

 # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
 # is prepared for conversion to pdf (using ps2pdf). The pdf file will
@@ -1490,6 +1490,21 @@
 # enabling this will significantly increase the size of the XML output.

 XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES Doxygen will generate DOCBOOK files
+# that can be used to generate PDF.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the DOCBOOK pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it. If left blank docbook will be used as the default path.
+
+DOCBOOK_OUTPUT         = docbook

 #---------------------------------------------------------------------------
 # configuration options for the AutoGen Definitions output
@@ -1640,6 +1655,12 @@

 EXTERNAL_GROUPS        = YES

+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed
+# in the related pages index. If set to NO, only the current project's
+# pages will be listed.
+
+EXTERNAL_PAGES         = YES
+
 # The PERL_PATH should be the absolute path and name of the perl script
 # interpreter (i.e. the result of `which perl').

@@ -1736,7 +1757,7 @@
 # the class node. If there are many fields or methods and many nodes the
 # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
 # threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
+# manageable. Set this to 0 for no limit. Note that the threshold may be
 # exceeded by 50% before the limit is enforced.

 UML_LIMIT_NUM_FIELDS   = 10


remove old references

remove old references

--- projA/CMake/CPackConfig.cmake
+++ projA/CMake/CPackConfig.cmake
@@ -13,7 +13,7 @@
 endif()

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Example project")
-set(CPACK_PACKAGE_CONTACT "Barthelemy von Haller <barthelemy.von.haller@cern.ch>")
+set(CPACK_PACKAGE_CONTACT "Person name <name@example.com>")
 set(CPACK_PACKAGE_VERSION ${VERSION})
 set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
 set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})


x86: reduce RAM available to QEMU

x86: reduce RAM available to QEMU

--- build/cmake/arch-x86.cmake
+++ build/cmake/arch-x86.cmake
@@ -20,7 +20,7 @@
 set(QEMU_CMD_BASE
   qemu-system-i386
     -cpu core2duo
-    -m 1024
+    -m 256
     -net nic,model=pcnet
 )


In Windows link against libuv dependencies

When building against a shared libuv, link against Windows libraries.

--- cmake/Modules/FindLibuv.cmake
+++ cmake/Modules/FindLibuv.cmake
@@ -7,5 +7,12 @@
 FIND_PATH(LIBUV_INCLUDE_DIR NAMES uv.h)
 FIND_LIBRARY(LIBUV_LIBRARIES NAMES uv libuv)

+if(WIN32)
+  list(APPEND LIBUV_LIBRARIES iphlpapi)
+  list(APPEND LIBUV_LIBRARIES psapi)
+  list(APPEND LIBUV_LIBRARIES userenv)
+  list(APPEND LIBUV_LIBRARIES ws2_32)
+endif()
+
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUV DEFAULT_MSG LIBUV_LIBRARIES LIBUV_INCLUDE_DIR)


Correct the definition of PROTOBUF_VERSION.

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -75,6 +75,7 @@
     LIST(APPEND external_project_dependencies ${TARGET_NAME} PARENT_SCOPE)
 ENDFUNCTION()

+SET(PROTOBUF_VERSION 3.1)
 IF(NOT CMAKE_CROSSCOMPILING)
     FIND_PACKAGE(Protobuf ${PROTOBUF_VERSION})

@@ -91,7 +92,6 @@
         CACHE FILEPATH "protobuf executable." FORCE)
 ENDIF()

-SET(PROTOBUF_VERSION 3.1)
 IF(NOT PROTOBUF_FOUND)
     build_protobuf(protobuf FALSE)
     SET(PROTOBUF_INCLUDE_DIR ${protobuf_INCLUDE_DIR}


build: Now possible to use os libs without writing full path

--- etc/service.cmake
+++ etc/service.cmake
@@ -146,6 +146,14 @@

 # add all extra libs
 foreach(LIBR ${LIBRARIES})
+  # if relative path but not local, use includeos lib.
+  if(NOT IS_ABSOLUTE ${LIBR} AND NOT EXISTS ${LIBR})
+    set(OS_LIB "$ENV{INCLUDEOS_PREFIX}/includeos/lib/${LIBR}")
+    if(EXISTS ${OS_LIB})
+      message(STATUS "Cannot find local ${LIBR}; using ${OS_LIB} instead")
+      set(LIBR ${OS_LIB})
+    endif()
+  endif()
   get_filename_component(LNAME ${LIBR} NAME_WE)
   add_library(libr_${LNAME} STATIC IMPORTED)
   set_target_properties(libr_${LNAME} PROPERTIES LINKER_LANGUAGE CXX)


Add information for msvc on appveyor

Add information for msvc on appveyor

--- cmake/External_gtest.cmake
+++ cmake/External_gtest.cmake
@@ -51,6 +51,24 @@

 add_dependencies(gmock googletest-${gtest_version})

+# variables defining the import location properties for the generated gtest and
+# gtestmain libraries
+if (MSVC)
+    set(GTEST_IMPORTED_LOCATION
+        IMPORTED_LOCATION_DEBUG     "${GTEST_DIR}/Debug/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        IMPORTED_LOCATION_RELEASE   "${GTEST_DIR}/Release/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        )
+    set(GTESTMAIN_IMPORTED_LOCATION
+        IMPORTED_LOCATION_DEBUG     "${GTEST_DIR}/Debug/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        IMPORTED_LOCATION_RELEASE   "${GTEST_DIR}/Release/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        )
+else()
+    set(GTEST_IMPORTED_LOCATION
+        IMPORTED_LOCATION           "${GTEST_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
+    set(GTESTMAIN_IMPORTED_LOCATION
+        IMPORTED_LOCATION           "${GTEST_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
+endif()
+
 # Create a libgtest target to be used as a dependency by test programs
 add_library(libgtest IMPORTED SHARED GLOBAL)
 add_dependencies(libgtest gtest)


Fix typo in FindRubyNArray.cmake

Fix typo in FindRubyNArray.cmake

--- cmake/FindRubyNArray.cmake
+++ cmake/FindRubyNArray.cmake
@@ -5,7 +5,7 @@
 	ERROR_QUIET)

 # find vendor arch dir
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir']".
+EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir']"
     OUTPUT_VARIABLE RUBY_VENDOR_ARCH_DIR
     ERROR_QUIET)


fixed: lib/archive && non-exisiting header-path handling

--- cmake/SetupFunctions.cmake
+++ cmake/SetupFunctions.cmake
@@ -154,12 +154,20 @@

   TARGET_LINK_LIBRARIES(${LIB_NAME} ${LIB_DEPENDENCIES})

-  INSTALL(TARGETS ${LIB_NAME}
-    LIBRARY DESTINATION ${DCSC08961_LIBRARY_DIRECTORY}
-    ARCHIVE DESTINATION ${DCSC08961_LIBRARY_DIRECTORY}
+  IF(${CMAKE_LIBRARY_TYPE} STREQUAL "SHARED")
+    SET(INST_DST_TYPE "LIBRARY")
+  ELSE()
+    SET(INST_DST_TYPE "ARCHIVE")
+  ENDIF()
+
+  INSTALL(TARGETS ${LIB_NAME} ${INST_DST_TYPE} DESTINATION ${DCSC08961_LIBRARY_DIRECTORY}
     COMPONENT lib)
-  INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/${LIB_NAME} DESTINATION ${DCSC08961_HEADER_DIRECTORY}
-    COMPONENT hdr)
+
+  IF(EXISTS "${CMAKE_SOURCE_DIR}/inc/${LIB_NAME}" AND
+      IS_DIRECTORY "${CMAKE_SOURCE_DIR}/inc/${LIB_NAME}")
+    INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/${LIB_NAME} DESTINATION ${DCSC08961_HEADER_DIRECTORY}
+      COMPONENT hdr)
+  ENDIF()
 ENDFUNCTION()

 # TEST_SETUP(PREFIX SOURCES .. [DEPENDENCIES ..] [DEBUG])


Bump zlib version

Bump zlib version

--- cmake/build_external.cmake
+++ cmake/build_external.cmake
@@ -25,8 +25,8 @@
         #likely, some of the things here are unnecessary
         ExternalProject_Add(ZLIB
             SOURCE_DIR ${ZLIB_SOURCE_DIR}
-            URL http://zlib.net/zlib-1.2.10.tar.gz
-            URL_HASH "SHA256=8d7e9f698ce48787b6e1c67e6bff79e487303e66077e25cb9784ac8835978017"
+            URL http://zlib.net/zlib-1.2.11.tar.gz
+            URL_HASH "SHA256=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
             PATCH_COMMAND ""
             CMAKE_ARGS
             -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}


add openfast label to openfast regression tests

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -65,32 +65,32 @@
 #===============================================================================

 # OpenFAST regression tests
-of_Regression(Test01 "elastodyn;aerodyn14;servodyn")
-of_Regression(Test02 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test03 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test04 "elastodyn;aerodyn14;servodyn")
-of_Regression(Test05 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test06 "elastodyn;aerodyn14;servodyn")
-of_Regression(Test07 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test08 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test09 "elastodyn;aerodyn14;servodyn")
-of_Regression(Test10 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test11 "elastodyn;aerodyn14;servodyn")
-of_Regression(Test12 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test13 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test14 "elastodyn;aerodyn15")
-of_Regression(Test15 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test16 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test17 "elastodyn;aerodyn14;servodyn")
-of_Regression(Test18 "elastodyn;aerodyn15;servodyn")
-of_Regression(Test19 "elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
-of_Regression(Test20 "elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
-of_Regression(Test21 "elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
-of_Regression(Test22 "elastodyn;aerodyn14;servodyn;hydrodyn;map")
-of_Regression(Test23 "elastodyn;aerodyn15;servodyn;hydrodyn;map")
-of_Regression(Test24 "elastodyn;aerodyn15;servodyn;hydrodyn;map")
-of_Regression(Test25 "elastodyn;aerodyn15;servodyn;hydrodyn;moordyn")
-of_Regression(Test26 "beamdyn;aerodyn15;servodyn")
+of_Regression(Test01 "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression(Test02 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test03 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test04 "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression(Test05 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test06 "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression(Test07 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test08 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test09 "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression(Test10 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test11 "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression(Test12 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test13 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test14 "openfast;elastodyn;aerodyn15")
+of_Regression(Test15 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test16 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test17 "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression(Test18 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression(Test19 "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
+of_Regression(Test20 "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
+of_Regression(Test21 "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
+of_Regression(Test22 "openfast;elastodyn;aerodyn14;servodyn;hydrodyn;map")
+of_Regression(Test23 "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;map")
+of_Regression(Test24 "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;map")
+of_Regression(Test25 "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;moordyn")
+of_Regression(Test26 "openfast;beamdyn;aerodyn15;servodyn")

 # BeamDyn regression tests
 bd_regression(bd_isotropic_rollup)


Dependencies: fix assimp in debug builds

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -157,10 +157,6 @@
           WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/assimp-5.1.6)
       execute_process(COMMAND ${CMAKE_COMMAND}
         --build ${PROJECT_BINARY_DIR}/assimp-5.1.6 ${BUILD_COMMAND_OPTS})
-      # RelWithDebInfo has Release ABI
-      if(NOT OGRE_DEBUG_MODE)
-        file(REMOVE ${OGREDEPS_PATH}/lib/cmake/assimp-5.1/assimpTargets-debug.cmake)
-      endif()
     endif()
 endif()


Updated CTK

Updated CTK

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag bdc8caca)
+    set(revision_tag fd697c69)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -81,7 +81,7 @@
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
       #GIT_REPOSITORY https://github.com/commontk/CTK.git
       #GIT_TAG origin/master
-      URL_MD5 47fec8ee5eb3259808de435ed335d14d
+      URL_MD5 7e15f7916a823bce189fdc994e770591
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}
@@ -104,7 +104,7 @@
         -DCTK_PLUGIN_org.commontk.configadmin:BOOL=ON
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_DCMTK_085525e6.tar.gz
-        -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_4293694a.tar.gz
+        -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_c5e4c2a7.tar.gz
         # See bug 19073
         -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_36ab9c7c.tar.gz
       CMAKE_CACHE_ARGS


COMP: Help VTK find the right HDF5 libraries on Windows.

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -83,6 +83,12 @@
   set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/VTK-6.1.0+74f4888.tar.gz)
   set(VTK_URL_MD5 1f19dae22c42c032109bd3cf91c4e8c9)

+  if(MITK_USE_HDF5 AND WIN32)
+    list(APPEND additional_cmake_args
+      -DHDF5_C_LIBRARY:FILEPATH=${ep_prefix}/lib/hdf5.lib
+      -DHDF5_CXX_LIBRARY:FILEPATH=${ep_prefix}/lib/hdf5_cpp.lib)
+  endif()
+
   ExternalProject_Add(${proj}
     LIST_SEPARATOR ${sep}
     URL ${VTK_URL}


Added SGCT CMake Linux support

Added SGCT CMake Linux support

--- ext/FindSGCT.cmake
+++ ext/FindSGCT.cmake
@@ -47,8 +47,19 @@
     	"/usr/include/sgct"
     	"/opt/local"
     	"/usr/local"
+		"/usr"
 	)
-	find_library(SGCT_LIBRARY NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}sgct_cpp11${CMAKE_STATIC_LIBRARY_SUFFIX}
+    if(NOT SGCT_ROOT_DIR)
+        message(FATAL_ERROR "Could not locate SGCT!")
+    endif(NOT SGCT_ROOT_DIR)
+
+	if (APPLE)
+		set(SGCT_NAME "sgct_cpp11")
+	else(APPLE)
+		set(SGCT_NAME "sgct")
+	endif(APPLE)
+
+	find_library(SGCT_LIBRARY NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}${SGCT_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
                  HINTS "${SGCT_ROOT_DIR}/lib")

 endif()
@@ -114,4 +125,4 @@
 #   )

 #add_subdirectory(${SGCT_ROOT_DIR})
-#set(DEPENDENT_LIBS ${DEPENDENT_LIBS} SGCT)+#set(DEPENDENT_LIBS ${DEPENDENT_LIBS} SGCT)


cutting build times by another 25%

cutting build times by another 25%

--- build/build.cmake
+++ build/build.cmake
@@ -54,7 +54,7 @@
     ${root}/build/build.cmake
 )

-add_library(graphics OBJECT
+add_library(graphics
 	${PUBLIC_HDRS}
 	${SRCS}
 	${SRCS_SHADERS}
@@ -63,6 +63,10 @@

 settingsCR(graphics)
 createPCH(graphics)
+
+target_precompile_headers(graphics PRIVATE
+	${root}/src/VulkanWindows.h
+)

 target_include_directories(graphics PUBLIC
 	"${root}/inc"
@@ -104,7 +108,7 @@
 )

 settingsCR(graphics_tests)
-createPCH(graphics_tests)
+usePCH(graphics_tests core)

 target_include_directories(graphics_tests PRIVATE
 	"${root}/src"
@@ -179,4 +183,6 @@

 add_custom_command(TARGET graphics_tests POST_BUILD
     COMMAND $<TARGET_FILE:TextureProcessor> -i ${root}/tests/data/question -o $<TARGET_FILE_DIR:graphics_tests>/question -p
-)+)
+
+set_property(TARGET graphics_tests APPEND PROPERTY FOLDER tests)


Use the CMAKE_EXECUTABLE_SUFFIX cmake macro.

--- external/External.cmake
+++ external/External.cmake
@@ -837,8 +837,8 @@

 set (flatbuffers_EXT_SOURCE_DIR  "${CMAKE_SOURCE_DIR}/external/flatbuffers")
 set (flatbuffers_EXT_BIN_DIR     "${EXT_INSTALL_DIR}/bin")
-set (flatbuffers_EXT_COMPILER    "${flatbuffers_EXT_BIN_DIR}/flatc")
-set (flatbuffers_EXT_HASH        "${flatbuffers_EXT_BIN_DIR}/flathash")
+set (flatbuffers_EXT_COMPILER    "${flatbuffers_EXT_BIN_DIR}/flatc${CMAKE_EXECUTABLE_SUFFIX}")
+set (flatbuffers_EXT_HASH        "${flatbuffers_EXT_BIN_DIR}/flathash${CMAKE_EXECUTABLE_SUFFIX}")
 set (flatbuffers_EXT_INCLUDE_DIR "${EXT_INSTALL_DIR}/include/flatbuffers")
 set (flatbuffers_EXT_HEADER      "${flatbuffers_EXT_INCLUDE_DIR}/flatbuffers.h")
 set (flatbuffers_EXT_STATIC_LIB  "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}flatbuffers${CMAKE_STATIC_LIBRARY_SUFFIX}")


Graph Control 6.0.0-rc3 Release Candidate 3

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 2 )
+set ( HPCC_SEQUENCE 3 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Fixed URL hash

Fixed URL hash

--- cmake/SOIL2.cmake
+++ cmake/SOIL2.cmake
@@ -52,7 +52,6 @@
 ExternalProject_Add(
   SOIL2_dl
   URL "https://bitbucket.org/SpartanJ/soil2/get/default.zip"
-  URL_HASH SHA1=6be2b8d2995c6b95cd43cf4cd0ddd52a150d1eca
   DOWNLOAD_NO_PROGRESS 1
   PREFIX ${CMAKE_BINARY_DIR}/SOIL2
   PATCH_COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_BINARY_DIR}/SOIL2_build.cmake <SOURCE_DIR>/src/SOIL2/CMakeLists.txt


Disable test detection in cross compilation setup

CMake's GoogleTest integration calls the test executable to obtain a
list of all the included tests. Afterwards every test can be executed in
isolation by CTest.

This fails in a cross compilation scenario because the test executable
can't be executed. Previously we solved that by just not running the
tests, but this won't work with the new GoogleTest integration since the
test executable will be called as a part of the build process - to
enumerate all the tests.

We resolve that problem by not registering the test executable at all
when in a cross compilation scenario.

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -5,6 +5,10 @@
 include(${CMAKE_SOURCE_DIR}/third_party/cmake/Modules/GoogleTest.cmake)

 function(register_test TEST_TARGET)
+  if(CMAKE_CROSSCOMPILING)
+    return()
+  endif()
+
   cmake_parse_arguments(ARGS "" "" "PROPERTIES" ${ARGN})
   set(TESTRESULTS_DIRECTORY "${CMAKE_BINARY_DIR}/testresults")


Cygwin support: Modify path for PCAP includes and library name

--- build/FindPCAP.cmake
+++ build/FindPCAP.cmake
@@ -7,7 +7,12 @@
 include(FindPackageHandleStandardArgs)
 include(CheckCSourceCompiles)

-find_path(PCAP_INCLUDE_DIR NAMES pcap.h)
-find_library(PCAP_LIBRARY NAMES pcap)
+if(NOT (CYGWIN))
+	find_path(PCAP_INCLUDE_DIR NAMES pcap.h)
+	find_library(PCAP_LIBRARY NAMES pcap)
+else()
+	find_path(PCAP_INCLUDE_DIR NAMES pcap/pcap.h)
+	find_library(PCAP_LIBRARY NAMES wpcap)
+endif()

 find_package_handle_standard_args(PCAP REQUIRED_VARS PCAP_LIBRARY PCAP_INCLUDE_DIR)


Turn off gcc 12 compiler warning about lack of support for instrumenting std::atomic_thread_fence with thread sanitizer

--- build_settings.cmake
+++ build_settings.cmake
@@ -31,6 +31,13 @@
     # don't happen during normal, non-instrumented compilation.
 else()
     set(C_WARN_OPTS "-Winline ${C_WARN_OPTS}")
+endif()
+if (VESPA_USE_SANITIZER)
+  if (VESPA_USE_SANITIZER STREQUAL "thread" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)
+    # Turn off warning about std::atomic_thread_fence not being supported by
+    # address sanitizer.
+    set(C_WARN_OPTS "${C_WARN_OPTS} -Wno-tsan")
+  endif()
 endif()

 # Warnings that are specific to C++ compilation


Add required header only: false setting.

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -905,6 +905,7 @@
     else()
         set_source_files_properties(${src2} PROPERTIES LANGUAGE CXX)
     endif()
+    set_source_files_properties(${src2} PROPERTIES HEADER_FILE_ONLY False)
     #set(src ${src} ${src2} PARENT_SCOPE)
 endfunction()


Allow MacPorts without dependencies

Allow MacPorts without dependencies

--- MacPorts.cmake
+++ MacPorts.cmake
@@ -5,10 +5,6 @@
 endif()
 if(NOT CPACK_MACPORTS_CATEGORY)
   message("Missing CPACK_MACPORTS_CATEGORY for MacPorts generation")
-  return()
-endif()
-if(NOT CPACK_MACPORTS_DEPENDS)
-  message("Missing CPACK_MACPORTS_DEPENDS for MacPorts generation")
   return()
 endif()


:unamused: Add NUMPY_FOUND when numpy found

Closes #57

--- modules/FindNumpy.cmake
+++ modules/FindNumpy.cmake
@@ -2,9 +2,8 @@
 # This module finds if NumPy is installed, and sets the following variables
 # indicating where it is.
 #
-# TODO: Update to provide the libraries and paths for linking npymath lib.
-#
 #  NUMPY_FOUND               - was NumPy found
+#  NumpyLibrary_FOUND        - were Numpy and its headers found
 #  NUMPY_VERSION             - the version of NumPy found as a string
 #  NUMPY_VERSION_MAJOR       - the major version number of NumPy
 #  NUMPY_VERSION_MINOR       - the minor version number of NumPy
@@ -43,6 +42,8 @@
     endif()
     set(NUMPY_FOUND FALSE)
     return()
+else()
+    set(NUMPY_FOUND TRUE)
 endif()

 # Convert the process output into a list


cmake: Fix USE_SCIP=OFF

cmake: Fix USE_SCIP=OFF

--- cmake/cpp.cmake
+++ cmake/cpp.cmake
@@ -219,7 +219,7 @@
   gflags::gflags
   glog::glog
   protobuf::libprotobuf
-  libscip
+  $<$<BOOL:${USE_SCIP}>:libscip>
   ${COINOR_DEPS}
   ${CPLEX_DEP}
   ${XPRESS_DEP}


implemented a more robust way to compare compiler executable strings

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@6944 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -170,18 +170,36 @@

 endfunction()

+# tries to be a more robust version of find_program (which supports xcrun, etc)
+function(find_compiler_program var str)
+
+string(STRIP ${str} str)
+string(FIND ${str} xcrun XCRUN)
+if (XCRUN GREATER -1)
+   find_program(xcrun xcrun)
+   string(REPLACE xcrun "" COMPILER ${str})
+   separate_arguments(xcrun_args UNIX_COMMAND ${COMPILER})
+   list(INSERT xcrun_args 0 "-find")
+   execute_process(COMMAND ${xcrun} ${xcrun_args} OUTPUT_VARIABLE COMPILER OUTPUT_STRIP_TRAILING_WHITESPACE)
+else()
+   find_program(COMPILER ${str})
+endif()
+
+set(${var} ${COMPILER} PARENT_SCOPE)
+
+endfunction()
+

 mex_setup()

-
-find_program(MEX_C_COMPILER ${MEX_CC})
-if (NOT ${CMAKE_C_COMPILER} STREQUAL ${MEX_C_COMPILER})
-   message(WARNING "Your cmake C compiler is: ${CMAKE_C_COMPILER} but your mex options were setup for: ${MEX_CC} .  Consider rerunning 'mex -setup' in  Matlab.")
+find_compiler_program(MEX_C_COMPILER ${MEX_CC})
+if (NOT ${CMAKE_C_COMPILER} STREQUAL "${MEX_C_COMPILER}")
+   message(WARNING "Your cmake C compiler is: ${CMAKE_C_COMPILER} but your mex options end up pointing to: ${MEX_C_COMPILER} .  Consider rerunning 'mex -setup' in  Matlab.")
 endif()

-find_program(MEX_CXX_COMPILER ${MEX_CXX})
+find_compiler_program(MEX_CXX_COMPILER ${MEX_CXX})
 if (NOT ${CMAKE_CXX_COMPILER} STREQUAL ${MEX_CXX_COMPILER})
-   message(WARNING "Your cmake CXX compiler is: ${CMAKE_CXX_COMPILER} but your mex options were setup for: ${MEX_CXX} .  Consider rerunning 'mex -setup' in Matlab.")
+   message(WARNING "Your cmake CXX compiler is: ${CMAKE_CXX_COMPILER} but your mex options end up pointing to: ${MEX_CXX_COMPILER} .  Consider rerunning 'mex -setup' in Matlab.")
 endif()

 # NOTE:  would like to check LD also, but it appears to be difficult with cmake  (there is not explicit linker executable variable, only the make rule), and  even my mex code assumes that LD==LDCXX for simplicity.


Add fake verion of clang-tidy when not found

--- cmake/ClangTidy.cmake
+++ cmake/ClangTidy.cmake
@@ -23,6 +23,7 @@

 if( NOT CLANG_TIDY_EXE )
     message( STATUS "Clang tidy not found" )
+    set(CLANG_TIDY_VERSION "0.0")
 else()
     find_clang_tidy_version(CLANG_TIDY_VERSION)
     message( STATUS "Clang tidy found: ${CLANG_TIDY_VERSION}")


FindBlosc.cmake: Threads

FindBlosc.cmake: Threads

Blosc depends unconditionally on threads.
If we are not using the config package, we need to re-add the
pthreads flags or we will get linker errors.

We are sometimes lucky at the moment that in some build configs
pthread flags land in the right order on the commands line, but
generally we should declare this dependency.

--- cmake/FindBlosc.cmake
+++ cmake/FindBlosc.cmake
@@ -54,6 +54,24 @@
     endif()
   endif()

+  # Blosc depends on pthreads
+  # https://github.com/Blosc/c-blosc/blob/master/blosc/CMakeLists.txt
+  # https://github.com/Blosc/c-blosc/pull/318
+  set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+  if(WIN32)
+    # try to use the system library
+    find_package(Threads)
+    if(NOT Threads_FOUND)
+      message(STATUS "Blosc: used the internal pthread library for win32 systems.")
+      set(BLOSC_LIBRARIES)
+    else()
+      set(BLOSC_LIBRARIES Threads::Threads)
+    endif()
+  else()
+    find_package(Threads REQUIRED)
+    set(BLOSC_LIBRARIES Threads::Threads)
+  endif()
+
   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(Blosc
     FOUND_VAR BLOSC_FOUND
@@ -68,6 +86,7 @@
       set_target_properties(Blosc::Blosc PROPERTIES
         IMPORTED_LOCATION             "${BLOSC_LIBRARY}"
         INTERFACE_INCLUDE_DIRECTORIES "${BLOSC_INCLUDE_DIR}"
+        INTERFACE_LINK_LIBRARIES      "${BLOSC_LIBRARIES}"
       )
     endif()
   endif()


Properly set the CEGUI_INCLUDE_DIRS variable.

Hl: Enter commit message.  Lines beginning with 'HG:' are removed.

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -493,7 +493,7 @@
 # its parent rather than directly the subdirectory. Otherwise we'll get compiler errors.
 if ("${CEGUI_VERSION}" VERSION_GREATER "0.8.0")
     add_parent_dir(CEGUI_INCLUDE_DIRS_TEMP CEGUI_INCLUDE_DIR)
-    set(${CEGUI_INCLUDE_DIRS} ${CEGUI_INCLUDE_DIRS_TEMP})
+    set(CEGUI_INCLUDE_DIRS ${CEGUI_INCLUDE_DIRS_TEMP})
 endif()
 set(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS})


FindHWLOC.cmake: fix syntax error

FindHWLOC.cmake: fix syntax error

--- cmake/FindHWLOC.cmake
+++ cmake/FindHWLOC.cmake
@@ -28,7 +28,7 @@
     # Save the existing prefix options
     set(_CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH})
     set(_CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH})
-    set(CMAKE_PREFIX_PATH ${HWLOC_ROOT_DIR}
+    set(CMAKE_PREFIX_PATH ${HWLOC_ROOT_DIR})
     unset(CMAKE_LIBRARY_PATH)
     set(_HWLOC_FIND_OPTS
       NO_CMAKE_ENVIRONMENT_PATH