pthread was not inserted into mkl on subsequent cmake call

Code was short-circuited.
Moved all codes into separate macros that are called only if necessary.

--- modules/FindCBLAS.cmake
+++ modules/FindCBLAS.cmake
@@ -1,118 +1,135 @@
 # First attempts using pkg-config. It is not unlikely to work and should be
 # quite reliable on linuxes.
+
+#####
+#####  Macros corresponding to each step are defined first
+#####  And the actual code exectution is below the macros
+#####
 macro(found_or_not_found_blas)
     if(NOT CBLAS_FIND_QUIETLY)
         if(BLAS_LIBRARIES)
-            list(GET BLAS_LIBRARIES 0 first_blas)
-            message(STATUS "Found blas libraries ${first_blas}")
+            message(STATUS "Found blas libraries ${BLAS_LIBRARIES}")
         endif()
         if(BLAS_INCLUDE_DIR)
             message(STATUS "Found blas include ${BLAS_INCLUDE_DIR}")
         endif()
     endif()
     if(CBLAS_FIND_REQUIRED)
-      if(NOT BLAS_LIBRARIES AND NOT BLAS_INCLUDE_DIR)
-          message(FATAL_ERROR "Could not find a blas library")
-      elseif(NOT BLAS_LIBRARIES)
-          message(FATAL_ERROR "Could not figure out blas library")
-      elseif(NOT BLAS_INCLUDE_DIR AND NOT BLAS_INCLUDE_DIR_OPTIONAL)
-          message(FATAL_ERROR "Could not figure out blas include dir")
-      endif()
+        if(NOT BLAS_LIBRARIES AND NOT BLAS_INCLUDE_DIR)
+            message(FATAL_ERROR "Could not find a blas library")
+        elseif(NOT BLAS_LIBRARIES)
+            message(FATAL_ERROR "Could not figure out blas library")
+        elseif(NOT BLAS_INCLUDE_DIR AND NOT BLAS_INCLUDE_DIR_OPTIONAL)
+            message(FATAL_ERROR "Could not figure out blas include dir")
+        endif()
     endif()
 endmacro()

-if(BLAS_LIBRARIES AND BLAS_INCLUDE_DIR)
-    found_or_not_found_blas()
-    return()
-endif()
-include(FindPkgConfig)
-pkg_search_module(CBLAS cblas)
-if(NOT CBLAS_FOUND AND PKG_CONFIG_FOUND)
-    pkg_search_module(ATLAS atlas)
-else()
-    set(BLAS_LIBRARIES ${CBLAS_LIBRARIES})
-    set(BLAS_INCLUDE_DIR ${CBLAS_INCLUDE_DIRS})
+macro(_look_for_blas_libraries)
+    include(FindPkgConfig)
+    pkg_search_module(CBLAS cblas)
+    if(NOT CBLAS_FOUND AND PKG_CONFIG_FOUND)
+        pkg_search_module(ATLAS atlas)
+    else()
+        set(BLAS_LIBRARIES ${CBLAS_LIBRARIES})
+        set(BLAS_INCLUDE_DIR ${CBLAS_INCLUDE_DIRS})
+    endif()
+
+    # include -pthread so MKL can be included on Ubuntu + enthought
+    if(use_pthread_flag)
+        set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+        set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -pthread")
+    endif()
+    find_package(BLAS QUIET)
+    if(use_pthread_flag)
+        set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+        set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -pthread")
+    endif()
+
+    # Figures out atlas if necessary
+    if(BLAS_atlas_LIBRARY)
+        get_filename_component(atlas_dir "${BLAS_atlas_LIBRARY}" PATH)
+        get_filename_component(atlas_ext "${BLAS_atlas_LIBRARY}" EXT)
+        find_library(BLAS_atlas_cblas_LIBRARY NAMES libcblas${atlas_ext}
+            HINTS "${atlas_dir}"
+        )
+        if(BLAS_atlas_cblas_LIBRARY)
+            set(BLAS_FOUND TRUE)
+            set(BLAS_LIBRARIES
+                "${BLAS_atlas_cblas_LIBRARY}"
+                "${BLAS_atlas_LIBRARY}"
+            )
+        endif()
+    endif()
+endmacro()
+
+macro(_look_for_include_directories)
+    # Adds BLAS_INCLUDE_DIR
+    function(include_directories_from_library_paths OUTVAR)
+        set(results)
+        foreach(path ${ARGN})
+            string(REGEX REPLACE
+                "(.*)/lib(64)?/.*" "\\1/include" current "${path}")
+            if(NOT "${current}" STREQUAL "/include"
+                AND IS_DIRECTORY "${current}")
+                list(APPEND results "${current}")
+            endif()
+        endforeach()
+        if(NOT "${results}" STREQUAL "")
+            list(REMOVE_DUPLICATES results)
+            set(${OUTVAR} ${results} PARENT_SCOPE)
+        endif()
+    endfunction()
+    # find_package blas does not look for cblas.h
+    include_directories_from_library_paths(directories ${BLAS_LIBRARIES})
+    find_path(BLAS_INCLUDE_DIR NAMES cblas.h mkl.h HINTS ${directories})
+endmacro()
+
+
+macro(_slot_pthread_into_mkl)
+    if(use_pthread_flag AND "${BLAS_LIBRARIES}" MATCHES "mkl")
+        if(NOT CMAKE_LIB_THREADS_INIT)
+            find_library(PTHREAD_LIBRARY pthread)
+            if(PTHREAD_LIBRARY)
+                set(CMAKE_THREAD_LIBS_INIT ${PTHREAD_LIBRARY})
+            endif()
+        endif()
+        # Add -pthread to CMAKE_C(XX)_FLAGS
+        set(BLAS_CMAKE_C_FLAGS -pthread)
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+        # Add CMAKE_THREAD_LIBS_INIT right before iomp5
+        set(index 0)
+        foreach(library ${BLAS_LIBRARIES})
+            if("${library}" MATCHES "iomp5")
+                list(INSERT BLAS_LIBRARIES ${index} "${CMAKE_THREAD_LIBS_INIT}")
+                break()
+            elseif("${library}" STREQUAL "${CMAKE_THREAD_LIBS_INIT}")
+                break()
+            endif()
+            math(EXPR index "${index} + 1")
+        endforeach()
+    endif()
+endmacro()
+
+#####
+#####  The following code is executed when this file is included
+#####
+if(NOT DEFINED use_pthread_flag)
+    include(CheckCCompilerFlag)
+    check_c_compiler_flag(-pthread use_pthread_flag)
+    set(use_pthread_flag ${use_pthread_flag} CACHE INTERNAL "")
 endif()

-# include -pthread so MKL can be included on Ubuntu + enthought
-include(CheckCCompilerFlag)
-check_c_compiler_flag(-pthread use_pthread_flag)
-if(use_pthread_flag)
-    set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -pthread")
-endif()
-find_package(BLAS QUIET)
-if(use_pthread_flag)
-    set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -pthread")
+if(NOT BLAS_LIBRARIES)
+  _look_for_blas_libraries()
 endif()

-# Adds pthread if necessary
-if("${BLAS_LIBRARIES}" MATCHES "mkl"
-    AND "${BLAS_LIBRARIES}" MATCHES "thread"
-    AND NOT "${CMAKE_THREAD_LIBS_INIT}" STREQUAL "")
-    list(APPEND BLAS_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
-endif()
-
-# Figures out atlas if necessary
-if(BLAS_atlas_LIBRARY)
-    get_filename_component(atlas_dir "${BLAS_atlas_LIBRARY}" PATH)
-    get_filename_component(atlas_ext "${BLAS_atlas_LIBRARY}" EXT)
-    find_library(BLAS_atlas_cblas_LIBRARY NAMES libcblas${atlas_ext}
-        HINTS "${atlas_dir}"
-    )
-    if(BLAS_atlas_cblas_LIBRARY)
-        set(BLAS_FOUND TRUE)
-        set(BLAS_LIBRARIES
-            "${BLAS_atlas_cblas_LIBRARY}"
-            "${BLAS_atlas_LIBRARY}"
-        )
+if(BLAS_LIBRARIES)
+    _slot_pthread_into_mkl()
+    if(NOT BLAS_INCLUDE_DIR)
+        _look_for_include_directories()
     endif()
 endif()

-
-# Adds BLAS_INCLUDE_DIR
-function(include_directories_from_library_paths OUTVAR)
-    set(results)
-    foreach(path ${ARGN})
-        string(REGEX REPLACE "(.*)/lib(64)?/.*" "\\1/include" current "${path}")
-        if(NOT "${current}" STREQUAL "/include" AND IS_DIRECTORY "${current}")
-            list(APPEND results "${current}")
-        endif()
-    endforeach()
-    if(NOT "${results}" STREQUAL "")
-        list(REMOVE_DUPLICATES results)
-        set(${OUTVAR} ${results} PARENT_SCOPE)
-    endif()
-endfunction()
-# find_package blas does not look for cblas.h
-if(NOT BLAS_INCLUDE_DIR AND BLAS_LIBRARIES)
-    include_directories_from_library_paths(directories ${BLAS_LIBRARIES})
-    find_path(BLAS_INCLUDE_DIR NAMES cblas.h mkl.h HINTS ${directories})
-endif()
-
-if(use_pthread_flag)
-    if(NOT CMAKE_LIB_THREADS_INIT)
-        find_library(PTHREAD_LIBRARY pthread)
-        if(PTHREAD_LIBRARY)
-            set(CMAKE_THREAD_LIBS_INIT ${PTHREAD_LIBRARY})
-        endif()
-    endif()
-    # Add -pthread to CMAKE_C(XX)_FLAGS
-    set(BLAS_CMAKE_C_FLAGS -pthread)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
-    # Add CMAKE_THREAD_LIBS_INIT right before iomp5
-    set(index 0)
-    foreach(library ${BLAS_LIBRARIES})
-        if("${library}" MATCHES "iomp5")
-            list(INSERT BLAS_LIBRARIES ${index} "${CMAKE_THREAD_LIBS_INIT}")
-            break()
-        elseif("${library}" STREQUAL "${CMAKE_THREAD_LIBS_INIT}")
-            break()
-        endif()
-        math(EXPR index "${index} + 1")
-    endforeach()
-endif()
-
 found_or_not_found_blas()


also look for Darwin15clang7.0 on OS X

also look for Darwin15clang7.0 on OS X

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -107,11 +107,15 @@
     endif()
     # If this is Darwin, only accept Darwin
     if(APPLE)
-      # Only match binaries for x64Darwin14clang6.0.
-      # As this is the only binary that is known to work.
-      string(FIND "${library}" "x64Darwin14clang6.0" _found)
-      if(${_found} EQUAL -1)
-        set(match FALSE)
+      set(match FALSE)
+      string(FIND "${library}" "x64Darwin15clang7.0" _found)
+      if(NOT ${_found} EQUAL -1)
+        set(match TRUE)
+      else()
+        string(FIND "${library}" "x64Darwin14clang6.0" _found)
+        if(NOT ${_found} EQUAL -1)
+          set(match TRUE)
+        endif()
       endif()
     endif()
     if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)


[cmake] add commented options for -std=++11

--- cmake/CXXCompilerSetup.cmake
+++ cmake/CXXCompilerSetup.cmake
@@ -50,6 +50,7 @@
   # --- Clang ----
   #add_cxx_options("-Weverything" Clang) # like Wall and more
   add_cxx_options("-Werror=unreachable-code" "Clang")
+  #add_cxx_options("-std=c++11" "Clang")
   # --- All compilers but MSVC (Microsoft Visual C) ---
   if(NOT MSVC)
     add_cxx_options("-Wall")


* #267

* #267

--- cmake/Modules/AddIOWOW.cmake
+++ cmake/Modules/AddIOWOW.cmake
@@ -17,9 +17,9 @@
 endif()

 if (IOS)
+  set(BYPRODUCT "${CMAKE_BINARY_DIR}/lib/libiowow-1.a")
+else()
   set(BYPRODUCT "${CMAKE_BINARY_DIR}/src/extern_iowow-build/src/libiowow-1.a")
-else()
-  set(BYPRODUCT "${CMAKE_BINARY_DIR}/lib/libiowow-1.a")
 endif()

 set(CMAKE_ARGS  -DOWNER_PROJECT_NAME=${PROJECT_NAME}


Fix for Mac OS X

Fix for Mac OS X

It's the other way around, pkg_check_modules first parameter is the prefix that should be uppercase and the second is the module

--- cmake/Modules/FindGLEW.cmake
+++ cmake/Modules/FindGLEW.cmake
@@ -50,7 +50,7 @@
     SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX")
   else (${CMAKE_SYSTEM_VERSION} VERSION_LESS "13.0.0")
     find_package(PkgConfig)
-    pkg_check_modules(glew GLEW)
+    pkg_check_modules(GLEW glew)
     SET(GLEW_GLEW_LIBRARY ${GLEW_LIBRARIES} CACHE STRING "GLEW library for OSX")
   endif (${CMAKE_SYSTEM_VERSION} VERSION_LESS "13.0.0")
     SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")


Update FindSDL2.cmake.

Update FindSDL2.cmake.

Some linux distros failes if SDL2MAIN.lib is used. Only Windows uses
SDL2MAIN.lib.

--- cmake/Modules/FindSDL2.cmake
+++ cmake/Modules/FindSDL2.cmake
@@ -24,14 +24,18 @@
     PATHS ${SDL2_SEARCH_PATHS}
 )

-FIND_LIBRARY(SDL2MAIN_LIBRARY
-    NAMES SDL2main
-	HINTS $ENV{SDL2DIR}
-	PATH_SUFFIXES lib64 lib lib/x86
-    PATHS ${SDL2_SEARCH_PATHS}
-)
+IF (WIN32)
+	FIND_LIBRARY(SDL2MAIN_LIBRARY
+		NAMES SDL2main
+		HINTS $ENV{SDL2DIR}
+		PATH_SUFFIXES lib64 lib lib/x86
+		PATHS ${SDL2_SEARCH_PATHS}
+	)
+	SET(SDL2_LIBRARIES ${SDL2_LIBRARY} ${SDL2MAIN_LIBRARY})
+ELSE (WIN32)
+	SET(SDL2_LIBRARIES ${SDL2_LIBRARY})
+ENDIF (WIN32)

-SET(SDL2_LIBRARIES ${SDL2_LIBRARY} ${SDL2MAIN_LIBRARY})
 SET(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})

 INCLUDE(FindPackageHandleStandardArgs)
@@ -41,4 +45,6 @@
 find_package_handle_standard_args(SDL2 DEFAULT_MSG SDL2_LIBRARY SDL2_INCLUDE_DIR)

 MARK_AS_ADVANCED(SDL2_INCLUDE_DIR SDL2_LIBRARY)
-MARK_AS_ADVANCED(SDL2_INCLUDE_DIR SDL2MAIN_LIBRARY)
+IF (WIN32)
+	MARK_AS_ADVANCED(SDL2_INCLUDE_DIR SDL2MAIN_LIBRARY)
+ENDIF (WIN32)


FindOpenSSL windows: check OPENSSL_ROOT cmake variable [skip ci]

--- cmake/find/FindOpenSSL.cmake
+++ cmake/find/FindOpenSSL.cmake
@@ -32,6 +32,7 @@
 if (WIN32)
   # http://www.slproweb.com/products/Win32OpenSSL.html
   set(_OPENSSL_ROOT_HINTS
+    "${OPENSSL_ROOT}"
     "${OPENSSL_ROOT_DIR}"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"


automatic discovery of visual studio installation directory

--- cmake/findVisualStudio.cmake
+++ cmake/findVisualStudio.cmake
@@ -1,6 +1,19 @@
 cmake_minimum_required(VERSION 2.8)

-set(MSVC_UNIT_TEST_DIR "C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/UnitTest/")#TODO make it discoverable
+set(CUTI_VS_PATH_PREFIX "C:/Program Files (x86)/Microsoft Visual Studio ")
+set(CUTI_VS_PATH_SUFIX "/VC/UnitTest/")
+
+if(EXISTS ${CUTI_VS_PATH_PREFIX}14.0${CUTI_VS_PATH_SUFIX})
+	set(CUTI_VS_VERSION 14.0)
+elseif(EXISTS ${CUTI_VS_PATH_PREFIX}12.0${CUTI_VS_PATH_SUFIX})
+	set(CUTI_VS_VERSION 12.0)
+elseif(EXISTS ${CUTI_VS_PATH_PREFIX}11.0${CUTI_VS_PATH_SUFIX})
+	set(CUTI_VS_VERSION 11.0)
+else()
+	message(FATAL_ERROR "CUTI : Visual studio install directory not found or unsupported version")
+endif()
+
+set(MSVC_UNIT_TEST_DIR ${CUTI_VS_PATH_PREFIX}${CUTI_VS_VERSION}${CUTI_VS_PATH_SUFIX})

 include_directories(${MSVC_UNIT_TEST_DIR}/include)
 link_directories(${MSVC_UNIT_TEST_DIR}lib/)


Bug 775: propagate generator when workingaround cmake bug 9220

--- cmake/language_support.cmake
+++ cmake/language_support.cmake
@@ -33,7 +33,7 @@
   file(WRITE ${CMAKE_BINARY_DIR}/language_tests/${language}/CMakeLists.txt
     ${text})
   execute_process(
-    COMMAND ${CMAKE_COMMAND} .
+    COMMAND ${CMAKE_COMMAND} . -G "${CMAKE_GENERATOR}"
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}
     RESULT_VARIABLE return_code
     OUTPUT_QUIET
@@ -64,3 +64,4 @@
 #message("CXX_language_works = ${CXX_language_works}")
 #workaround_9220(CXXp CXXp_language_works)
 #message("CXXp_language_works = ${CXXp_language_works}")
+


build: remove `TARGET_LIBRARY` from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -754,9 +754,7 @@
         NOSWIFTRT
         OBJECT_LIBRARY
         SHARED
-        STATIC
-        TARGET_LIBRARY
-        INSTALL_WITH_SHARED)
+        STATIC)
   set(SWIFTLIB_SINGLE_single_parameter_options
         ARCHITECTURE
         DEPLOYMENT_VERSION_IOS
@@ -955,12 +953,6 @@
   endforeach()

   set(SWIFTLIB_SINGLE_XCODE_WORKAROUND_SOURCES)
-  if(XCODE AND SWIFTLIB_SINGLE_TARGET_LIBRARY)
-    set(SWIFTLIB_SINGLE_XCODE_WORKAROUND_SOURCES
-        # Note: the dummy.cpp source file provides no definitions. However,
-        # it forces Xcode to properly link the static library.
-        ${SWIFT_SOURCE_DIR}/cmake/dummy.cpp)
-  endif()

   set(INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS ${SWIFTLIB_INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS})
   if(${libkind} STREQUAL "SHARED")
@@ -973,28 +965,6 @@
               ${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}
               ${INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS}
               ${SWIFTLIB_SINGLE_XCODE_WORKAROUND_SOURCES})
-  if(("${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "ELF" OR
-      "${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "COFF") AND
-     SWIFTLIB_SINGLE_TARGET_LIBRARY)
-    if("${libkind}" STREQUAL "SHARED" AND NOT SWIFTLIB_SINGLE_NOSWIFTRT)
-      # TODO(compnerd) switch to the generator expression when cmake is upgraded
-      # to a version which supports it.
-      # target_sources(${target}
-      #                PRIVATE
-      #                  $<TARGET_OBJECTS:swiftImageRegistrationObject${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}-${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}>)
-      if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS)
-        set(extension .obj)
-      else()
-        set(extension .o)
-      endif()
-      target_sources(${target}
-                     PRIVATE
-                       "${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/swiftrt${extension}")
-      set_source_files_properties("${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/swiftrt${extension}"
-                                  PROPERTIES
-                                    GENERATED 1)
-    endif()
-  endif()
   _set_target_prefix_and_suffix("${target}" "${libkind}" "${SWIFTLIB_SINGLE_SDK}")

   if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")
@@ -1033,23 +1003,6 @@
         SUFFIX ${LLVM_PLUGIN_EXT})
   endif()

-  if(SWIFTLIB_SINGLE_TARGET_LIBRARY)
-    # Install runtime libraries to lib/swift instead of lib. This works around
-    # the fact that -isysroot prevents linking to libraries in the system
-    # /usr/lib if Swift is installed in /usr.
-    set_target_properties("${target}" PROPERTIES
-      LIBRARY_OUTPUT_DIRECTORY ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}
-      ARCHIVE_OUTPUT_DIRECTORY ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR})
-
-    foreach(config ${CMAKE_CONFIGURATION_TYPES})
-      string(TOUPPER ${config} config_upper)
-      escape_path_for_xcode("${config}" "${SWIFTLIB_DIR}" config_lib_dir)
-      set_target_properties(${target} PROPERTIES
-        LIBRARY_OUTPUT_DIRECTORY_${config_upper} ${config_lib_dir}/${SWIFTLIB_SINGLE_SUBDIR}
-        ARCHIVE_OUTPUT_DIRECTORY_${config_upper} ${config_lib_dir}/${SWIFTLIB_SINGLE_SUBDIR})
-    endforeach()
-  endif()
-
   if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
     set(install_name_dir "@rpath")

@@ -1074,13 +1027,6 @@
       PROPERTIES
       INSTALL_RPATH "$ORIGIN:/usr/lib/swift/cygwin")
   elseif("${SWIFTLIB_SINGLE_SDK}" STREQUAL "ANDROID")
-    # CMake generates an incorrect rule `$SONAME_FLAG $INSTALLNAME_DIR$SONAME`
-    # for an Android cross-build from a macOS host. Construct the proper linker
-    # flags manually in add_swift_target_library instead, see there with
-    # variable `swiftlib_link_flags_all`.
-    if(SWIFTLIB_SINGLE_TARGET_LIBRARY)
-      set_target_properties("${target}" PROPERTIES NO_SONAME TRUE)
-    endif()
     # Only set the install RPATH if cross-compiling the host tools, in which
     # case both the NDK and Sysroot paths must be set.
     if(NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "" AND
@@ -1098,12 +1044,6 @@
       PROPERTIES
       # Library name (without the variant information)
       OUTPUT_NAME ${name})
-
-  # Don't build standard libraries by default.  We will enable building
-  # standard libraries that the user requested; the rest can be built on-demand.
-  if(SWIFTLIB_SINGLE_TARGET_LIBRARY)
-    set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL TRUE)
-  endif()

   # Handle linking and dependencies.
   add_dependencies_multiple_targets(
@@ -1141,10 +1081,8 @@
     target_link_libraries(${target} PUBLIC "-weak_framework ${FRAMEWORK}")
   endforeach()

-  if(NOT SWIFTLIB_SINGLE_TARGET_LIBRARY)
-    # Call llvm_config() only for libraries that are part of the compiler.
-    swift_common_llvm_config("${target}" ${SWIFTLIB_SINGLE_LLVM_LINK_COMPONENTS})
-  endif()
+  # Call llvm_config() only for libraries that are part of the compiler.
+  swift_common_llvm_config("${target}" ${SWIFTLIB_SINGLE_LLVM_LINK_COMPONENTS})

   # Collect compile and link flags for the static and non-static targets.
   # Don't set PROPERTY COMPILE_FLAGS or LINK_FLAGS directly.
@@ -1166,18 +1104,10 @@
   endif()

   # Add variant-specific flags.
-  if(SWIFTLIB_SINGLE_TARGET_LIBRARY)
-    set(build_type "${SWIFT_STDLIB_BUILD_TYPE}")
-    set(enable_assertions "${SWIFT_STDLIB_ASSERTIONS}")
-  else()
-    set(build_type "${CMAKE_BUILD_TYPE}")
-    set(enable_assertions "${LLVM_ENABLE_ASSERTIONS}")
-    set(analyze_code_coverage "${SWIFT_ANALYZE_CODE_COVERAGE}")
-  endif()
-
-  if (NOT SWIFTLIB_SINGLE_TARGET_LIBRARY)
-    set(lto_type "${SWIFT_TOOLS_ENABLE_LTO}")
-  endif()
+  set(build_type "${CMAKE_BUILD_TYPE}")
+  set(enable_assertions "${LLVM_ENABLE_ASSERTIONS}")
+  set(analyze_code_coverage "${SWIFT_ANALYZE_CODE_COVERAGE}")
+  set(lto_type "${SWIFT_TOOLS_ENABLE_LTO}")

   _add_variant_c_compile_flags(
     SDK "${SWIFTLIB_SINGLE_SDK}"
@@ -1217,35 +1147,6 @@

   # Configure plist creation for OS X.
   set(PLIST_INFO_PLIST "Info.plist" CACHE STRING "Plist name")
-  if("${SWIFTLIB_SINGLE_SDK}" IN_LIST SWIFT_APPLE_PLATFORMS AND FALSE)
-    set(PLIST_INFO_NAME ${name})
-    set(PLIST_INFO_UTI "com.apple.dt.runtime.${name}")
-    set(PLIST_INFO_VERSION "${SWIFT_VERSION}")
-    if (SWIFT_COMPILER_VERSION)
-      set(PLIST_INFO_BUILD_VERSION
-        "${SWIFT_COMPILER_VERSION}")
-    endif()
-
-    set(PLIST_INFO_PLIST_OUT "${PLIST_INFO_PLIST}")
-    list(APPEND link_flags
-         "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/${PLIST_INFO_PLIST_OUT}")
-    configure_file(
-        "${SWIFT_SOURCE_DIR}/stdlib/${PLIST_INFO_PLIST}.in"
-        "${PLIST_INFO_PLIST_OUT}"
-        @ONLY
-        NEWLINE_STYLE UNIX)
-
-    # If Application Extensions are enabled, pass the linker flag marking
-    # the dylib as safe.
-    if (CXX_SUPPORTS_FAPPLICATION_EXTENSION AND (NOT DISABLE_APPLICATION_EXTENSION))
-      list(APPEND link_flags "-Wl,-application_extension")
-    endif()
-
-    set(PLIST_INFO_UTI)
-    set(PLIST_INFO_NAME)
-    set(PLIST_INFO_VERSION)
-    set(PLIST_INFO_BUILD_VERSION)
-  endif()

   # Set compilation and link flags.
   if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS)


Specify '-resource-dir' when compiling Swift libraries, so we can find libraries for the destination host when cross-compiling.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -180,7 +180,8 @@

   list(APPEND result
       "-sdk" "${SWIFT_SDK_${sdk}_PATH}"
-      "-target" "${SWIFT_SDK_${sdk}_ARCH_${arch}_TRIPLE}")
+      "-target" "${SWIFT_SDK_${sdk}_ARCH_${arch}_TRIPLE}"
+      "-resource-dir" "${SWIFTLIB_DIR}")

   if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
     list(APPEND result


gfal2 really needs glib2. Be helpful to users by REQUIRE-ing it.

--- cmake/modules/FindGFAL.cmake
+++ cmake/modules/FindGFAL.cmake
@@ -20,7 +20,7 @@
 if(GFAL_LIBRARY MATCHES gfal2)
   # use pkg-config to get the directories for glib and then use these values
   find_package(PkgConfig)
-  pkg_check_modules(GLIB2 glib-2.0)
+  pkg_check_modules(GLIB2 REQUIRED glib-2.0)
   list(APPEND GFAL_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS})
 endif()


Fix Intel OpenCL SDK search path for Windows (#8301)

Co-authored-by: Andrey Malyshev <e41f427266f8f4353d946f3b42fc86f1f6ac6735@gmail.com>

--- cmake/utils/FindOpenCL.cmake
+++ cmake/utils/FindOpenCL.cmake
@@ -50,7 +50,7 @@
      if (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY STREQUAL "ONLY")
        set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
      endif()
-     find_library(OpenCL_LIBRARIES NAMES OpenCL PATHS ${__opencl_sdk}/lib ${__opencl_sdk}/lib64)
+     find_library(OpenCL_LIBRARIES NAMES OpenCL PATHS ${__opencl_sdk}/lib ${__opencl_sdk}/lib64 ${__opencl_sdk}/lib/x64/)
      if(OpenCL_LIBRARIES)
        set(OpenCL_FOUND TRUE)
      endif()


CPP-584 - win: Produce error message if using Boost v1.66.0+ (#108)

* CPP-584 - win: Produce error message if using Boost v1.66.0+

An error message will be presented during the CMake configuration
process if integration tests are being built and the provided Boost
version is v1.66.0+ and the CMake version is not v3.11.0+.

--- cpp-driver/cmake/modules/CppDriver.cmake
+++ cpp-driver/cmake/modules/CppDriver.cmake
@@ -545,6 +545,21 @@

   # Determine if Boost components are available for test executables
   if(CASS_BUILD_INTEGRATION_TESTS)
+    # Handle new required version of CMake for Boost v1.66.0 (Windows only)
+    if(WIN32)
+      find_package(Boost)
+      if (Boost_FOUND)
+        if(Boost_VERSION GREATER 106600 OR Boost_VERSION EQUAL 106600)
+          # Ensure CMake version is v3.11.0+
+          if (CMAKE_VERSION VERSION_LESS 3.11.0)
+            message(FATAL_ERROR "Boost v${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} requires CMake v3.11.0+."
+              "Updgrade CMake or downgrade Boost to v${CASS_MINIMUM_BOOST_VERSION} - v1.65.1.")
+          endif()
+        endif()
+      endif()
+    endif()
+
+    # Ensure Boost components are available
     find_package(Boost ${CASS_MINIMUM_BOOST_VERSION} COMPONENTS chrono system thread unit_test_framework)
     if(NOT Boost_FOUND)
       # Ensure Boost was not found due to minimum version requirement


Increase executable stack size to 16MB on Windows

Fixes ethereum/cpp-ethereum#1313

--- cmake/EthCompilerSettings.cmake
+++ cmake/EthCompilerSettings.cmake
@@ -43,7 +43,8 @@
 	set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
 	# warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification
 	# warning LNK4099: pdb was not found with lib
-	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099,4075")
+	# stack size 16MB
+	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099,4075 /STACK:16777216")
 	# windows likes static
 	set(ETH_STATIC 1)


More variables in cmake/MyPackagePrintSetup.cmake

--- cmake/MyPackagePrintSetup.cmake
+++ cmake/MyPackagePrintSetup.cmake
@@ -3,12 +3,19 @@
   # Print Setup
   #
   MESSAGE(STATUS "================================")
-  MESSAGE(STATUS "${PROJECT_NAME} Setup:")
-  MESSAGE(STATUS "                        VERSION: ${${PROJECT_NAME}_VERSION}")
-  MESSAGE(STATUS "                  VERSION_MAJOR: ${${PROJECT_NAME}_VERSION_MAJOR}")
-  MESSAGE(STATUS "                  VERSION_MINOR: ${${PROJECT_NAME}_VERSION_MINOR}")
-  MESSAGE(STATUS "                  VERSION_PATCH: ${${PROJECT_NAME}_VERSION_PATCH}")
+  MESSAGE(STATUS "${PROJECT_NAME} ${${PROJECT_NAME}_VERSION} Setup:")
+  GET_DIRECTORY_PROPERTY (DirDefs COMPILE_DEFINITIONS)
+  FOREACH (d ${DirDefs})
+    MESSAGE(STATUS "            COMPILE_DEFINITIONS: ${d}")
+  ENDFOREACH()
+  MESSAGE(STATUS "                  CMAKE_COMMAND: ${CMAKE_COMMAND}")
+  MESSAGE(STATUS "                  CMAKE_VERSION: ${CMAKE_VERSION}")
+  MESSAGE(STATUS "                     CMAKE_ROOT: ${CMAKE_ROOT}")
+  MESSAGE(STATUS "                CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
+  MESSAGE(STATUS "          CMAKE_EXTRA_GENERATOR: ${CMAKE_EXTRA_GENERATOR}")
   MESSAGE(STATUS "                   CMAKE_SYSTEM: ${CMAKE_SYSTEM}")
+  MESSAGE(STATUS "             CMAKE_TEST_COMMAND: ${CMAKE_TEST_COMMAND}")
+  MESSAGE(STATUS "           CMAKE_CROSSCOMPILING: ${CMAKE_CROSSCOMPILING}")
   MESSAGE(STATUS "         CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
   MESSAGE(STATUS "               CMAKE_CFG_INTDIR: ${CMAKE_CFG_INTDIR}")
   MESSAGE(STATUS "               CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
@@ -20,9 +27,18 @@
   MESSAGE(STATUS "          CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
   MESSAGE(STATUS "                CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
   MESSAGE(STATUS "                   CMAKE_LINKER: ${CMAKE_LINKER}")
+  MESSAGE(STATUS "                  CMAKE_DL_LIBS: ${CMAKE_DL_LIBS}")
   MESSAGE(STATUS "         CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}")
+  MESSAGE(STATUS "        CMAKE_EXECUTABLE_SUFFIX: ${CMAKE_EXECUTABLE_SUFFIX}")
   MESSAGE(STATUS "                       CMAKE_AR: ${CMAKE_AR}")
   MESSAGE(STATUS "                   CMAKE_RANLIB: ${CMAKE_RANLIB}")
+  MESSAGE(STATUS "       CMAKE_STANDARD_LIBRARIES: ${CMAKE_STANDARD_LIBRARIES}")
+  MESSAGE(STATUS "      CMAKE_LINK_LIBRARY_SUFFIX: ${CMAKE_LINK_LIBRARY_SUFFIX}")
+  MESSAGE(STATUS "    CMAKE_SHARED_LIBRARY_PREFIX: ${CMAKE_SHARED_LIBRARY_PREFIX}")
+  MESSAGE(STATUS "    CMAKE_SHARED_LIBRARY_SUFFIX: ${CMAKE_SHARED_LIBRARY_SUFFIX}")
+  MESSAGE(STATUS "    CMAKE_STATIC_LIBRARY_PREFIX: ${CMAKE_STATIC_LIBRARY_PREFIX}")
+  MESSAGE(STATUS "    CMAKE_STATIC_LIBRARY_SUFFIX: ${CMAKE_STATIC_LIBRARY_SUFFIX}")
+  MESSAGE(STATUS "           CMAKE_HOME_DIRECTORY: ${CMAKE_HOME_DIRECTORY}")
   MESSAGE(STATUS "               CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
   MESSAGE(STATUS "               CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
   MESSAGE(STATUS "       CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
@@ -31,9 +47,5 @@
   MESSAGE(STATUS " CMAKE_ARCHIVE_OUTPUT_DIRECTORY: ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
   MESSAGE(STATUS " CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
   MESSAGE(STATUS " CMAKE_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
-  GET_DIRECTORY_PROPERTY (DirDefs COMPILE_DEFINITIONS)
-  FOREACH (d ${DirDefs})
-    MESSAGE(STATUS "            COMPILE_DEFINITIONS: ${d}")
-  ENDFOREACH()
   MESSAGE(STATUS "================================")
 ENDMACRO()


Only use NO_DEFAULT_PATH in find_file when auto detect houdini ABI

Setting that infers that the others are set.

Signed-off-by: Fredrik Salomonsson <94092975b04047b37821994781a0b9ea8d41c3ff@d2.com>

--- cmake/OpenVDBHoudiniSetup.cmake
+++ cmake/OpenVDBHoudiniSetup.cmake
@@ -338,12 +338,7 @@
 else()
   find_file(_houdini_openvdb_version_file "openvdb/version.h"
     PATHS ${HOUDINI_INCLUDE_DIR}
-    NO_DEFAULT_PATH
-    NO_PACKAGE_ROOT_PATH
-    NO_CMAKE_PATH
-    NO_CMAKE_ENVIRONMENT_PATH
-    NO_SYSTEM_ENVIRONMENT_PATH
-    NO_CMAKE_SYSTEM_PATH)
+    NO_DEFAULT_PATH)
   if(NOT ${_houdini_openvdb_version_file} EQUAL "_houdini_openvdb_version_file-NOTFOUND")
     file(STRINGS ${_houdini_openvdb_version_file} _houdini_openvdb_version)
     foreach(line ${_houdini_openvdb_version})


fix msvc

fix msvc

--- cmake/PlatformWindowsMSVC.cmake
+++ cmake/PlatformWindowsMSVC.cmake
@@ -45,6 +45,9 @@

     # /MD           # -> runtime library: multithreaded dll
     # /MDd          # -> Runtime Library: Multithreaded Debug DLL
+
+      /bigobj       # -> an object file can hold up to 65,536 (2^16) addressable sections,
+                    #    /bigobj increases that address capacity to 4,294,967,296 (2^32).
 )

 # http://support.microsoft.com/kb/154419


Added optional library recursion.

Added optional library recursion.

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -279,7 +279,7 @@
     set(BOARD_CORE ${${BOARD_ID}.build.core})
     if(BOARD_CORE AND NOT TARGET ${CORE_LIB_NAME})
         set(BOARD_CORE_PATH ${ARDUINO_CORES_PATH}/${BOARD_CORE})
-        find_sources(CORE_SRCS ${BOARD_CORE_PATH})
+        find_sources(CORE_SRCS ${BOARD_CORE_PATH} True)
 		list(REMOVE_ITEM CORE_SRCS "${BOARD_CORE_PATH}/main.cxx")
         add_library(${CORE_LIB_NAME} ${CORE_SRCS})
         set(${VAR_NAME} ${CORE_LIB_NAME} PARENT_SCOPE)
@@ -340,12 +340,23 @@
 #
 # Creates an Arduino library, with all it's library dependencies.
 #
+#		"LIB_NAME"_RECURSE controls if the library will recurse
+# 		when looking for source files
+#
+
+# For known libraries can list recurse here
+set(Wire_RECURSE True)
 function(setup_arduino_library VAR_NAME BOARD_ID LIB_PATH)
     set(LIB_TARGETS)
     get_filename_component(LIB_NAME ${LIB_PATH} NAME)
     set(TARGET_LIB_NAME ${BOARD_ID}_${LIB_NAME})
     if(NOT TARGET ${TARGET_LIB_NAME})
-        find_sources(LIB_SRCS ${LIB_PATH})
+		string(REGEX REPLACE ".*/" "" LIB_SHORT_NAME ${LIB_NAME})
+		#message(STATUS "short name: ${LIB_SHORT_NAME} recures: ${${LIB_SHORT_NAME}_RECURSE}")
+		if (NOT DEFINED ${LIB_SHORT_NAME}_RECURSE)
+			set(${LIB_SHORT_NAME}_RECURSE False)
+		endif()
+		find_sources(LIB_SRCS ${LIB_PATH} ${${LIB_SHORT_NAME}_RECURSE})
         if(LIB_SRCS)

             message(STATUS "Generating Arduino ${LIB_NAME} library")
@@ -448,21 +459,29 @@
     add_dependencies(upload ${TARGET_NAME}-upload)
 endfunction()

-# find_sources(VAR_NAME LIB_PATH)
+# find_sources(VAR_NAME LIB_PATH RECURSE)
 #
 #        VAR_NAME - Variable name that will hold the detected sources
 #        LIB_PATH - The base path
+#        RECURSE  - Whether or not to recurse
 #
 # Finds all C/C++ sources located at the specified path.
 #
-function(find_sources VAR_NAME LIB_PATH)
-    file(GLOB_RECURSE LIB_FILES ${LIB_PATH}/*.cpp
-                                ${LIB_PATH}/*.c
-                                ${LIB_PATH}/*.cc
-                                ${LIB_PATH}/*.cxx
-                                ${LIB_PATH}/*.h
-                                ${LIB_PATH}/*.hh
-                                ${LIB_PATH}/*.hxx)
+function(find_sources VAR_NAME LIB_PATH RECURSE)
+	set(FILE_SEARCH_LIST
+		${LIB_PATH}/*.cpp
+		${LIB_PATH}/*.c
+		${LIB_PATH}/*.cc
+		${LIB_PATH}/*.cxx
+		${LIB_PATH}/*.h
+		${LIB_PATH}/*.hh
+		${LIB_PATH}/*.hxx)
+	if (RECURSE)
+		file(GLOB_RECURSE LIB_FILES ${FILE_SEARCH_LIST})
+	else()
+		file(GLOB LIB_FILES ${FILE_SEARCH_LIST})
+	endif()
+	#message(STATUS "${LIB_PATH} recurse: ${RECURSE}")
     if(LIB_FILES)
         set(${VAR_NAME} ${LIB_FILES} PARENT_SCOPE)
     endif()


Update CMake library dependencies.

Update CMake library dependencies.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -60,6 +60,7 @@
 set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport LLVMX86Utils)
 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMX86AsmPrinter LLVMX86Info LLVMX86Utils)
+set(MSVC_LIB_DEPS_LLVMX86Desc LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMX86Utils LLVMCore LLVMSupport)


cpp: added missing cmake module for older cmake versions

--- cpp/cmake/FindValgrind.cmake
+++ cpp/cmake/FindValgrind.cmake
@@ -8,6 +8,8 @@
     include
 )

+include(FindPackageHandleStandardArgs)
+
 find_package_handle_standard_args(VALGRIND
   DEFAULT_MSG
   VALGRIND_INCLUDE_DIR


Added quadratic equation solver.

Added quadratic equation solver.

--- cmake/fb.cmake
+++ cmake/fb.cmake
@@ -5,7 +5,7 @@
 message("      FB_KARAT=n        The number of Karatsuba levels.")
 message("      FB_TRINO=[off|on] Prefer trinomials over pentanomials.\n")

-message("   ** Available binary field arithmetic methods (default = LODAH;TABLE;QUICK;BASIC;QUICK;EXGCD):")
+message("   ** Available binary field arithmetic methods (default = LODAH;TABLE;QUICK;BASIC;QUICK;EXGCD;QUICK):")
 message("      FB_METHD=BASIC    Right-to-left shift-and-add multiplication.")
 message("      FB_METHD=INTEG    Integrated modular multiplication.")
 message("      FB_METHD=RCOMB    Right-to-left comb multiplication.")
@@ -24,6 +24,9 @@

 message("      FB_METHD=BASIC    Trace computation by repeated squaring.")
 message("      FB_METHD=QUICK    Fast trace computation.\n")
+
+message("      FB_METHD=BASIC    Solve a quadratic equation by half-trace computation.")
+message("      FB_METHD=QUICK    Fast solving with precomputed half-traces.\n")

 message("      FB_METHD=BASIC    Shift-and-add inversion.")
 message("      FB_METHD=EXGCD    Inversion by the Extended Euclidean algorithm.")
@@ -46,17 +49,19 @@

 # Choose the arithmetic methods.
 if (NOT FB_METHD)
-	set(FB_METHD "LODAH;TABLE;QUICK;BASIC;QUICK;EXGCD")
+	set(FB_METHD "LODAH;TABLE;QUICK;BASIC;QUICK;QUICK;EXGCD")
 endif(NOT FB_METHD)
 list(LENGTH FB_METHD FB_LEN)
-if (FB_LEN LESS 6)
+if (FB_LEN LESS 7)
 	message(FATAL_ERROR "Incomplete FB_METHD specification: ${FB_METHD}")
-endif(FB_LEN LESS 6)
+endif(FB_LEN LESS 7)

 list(GET FB_METHD 0 FB_MUL)
 list(GET FB_METHD 1 FB_SQR)
 list(GET FB_METHD 2 FB_RDC)
 list(GET FB_METHD 3 FB_SRT)
 list(GET FB_METHD 4 FB_TRC)
-list(GET FB_METHD 5 FB_INV)
+list(GET FB_METHD 5 FB_SLV)
+list(GET FB_METHD 6 FB_INV)
+
 set(FB_METHD ${FB_METHD} CACHE STRING "Binary field arithmetic method")


[config.h] disable further -Wundef warnings

--- config.h.cmake
+++ config.h.cmake
@@ -31,7 +31,23 @@

 #ifndef HAVE_DUNE_FEM
 # define HAVE_FUNE_FEM 0
-# endif
+#endif
+
+#ifndef HAVE_DUNE_PYMOR
+# define HAVE_DUNE_PYMOR 0
+#endif
+
+#ifndef HAVE_DUNE_GRID_MULTISCALE
+# define HAVE_DUNE_GRID_MULTISCALE 0
+#endif
+
+#ifndef HAVE_DUNE_GDT
+# define HAVE_DUNE_GDT 0
+#endif
+
+#ifndef HAVE_DUNE_HDD
+# define HAVE_DUNE_HDD 0
+#endif

 #ifndef HAVE_EMPLACE
 # define HAVE_EMPLACE 0
@@ -65,6 +81,10 @@
 # define HAVE_MPI 0
 #endif

+#ifndef HAVE_FASP
+# define HAVE_FASP 0
+#endif
+
 #ifndef HAVE_CONSTEXPR
 # define HAVE_CONSTEXPR 0
 #endif


[CMake] [macho_embedded] Only set sys root if the variable is set, this prevents passing empty -isysroot arguments

This is a minor cleanup to the macho_embedded builtins.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@252619 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -161,8 +161,11 @@
     ${ARGN})
   set(libname "${name}.${suffix}_${LIB_ARCH}_${LIB_OS}")
   add_library(${libname} STATIC ${LIB_SOURCES})
+  if(DARWIN_${LIB_OS}_SYSROOT)
+    set(sysroot_flag -isysroot ${DARWIN_${LIB_OS}_SYSROOT})
+  endif()
   set_target_compile_flags(${libname}
-    -isysroot ${DARWIN_${LIB_OS}_SYSROOT}
+    ${sysroot_flag}
     ${DARWIN_${LIB_OS}_BUILTIN_MIN_VER_FLAG}
     ${LIB_CFLAGS})
   set_property(TARGET ${libname} APPEND PROPERTY
@@ -409,6 +412,7 @@
         set(float_flag)
         if(${arch} MATCHES "^arm")
           set(DARWIN_macho_embedded_SYSROOT ${DARWIN_ios_SYSROOT})
+          set(DARWIN_macho_embedded_BUILTIN_MIN_VER_FLAG ${DARWIN_ios_BUILTIN_MIN_VER_FLAG})
           # x86 targets are hard float by default, but the complain about the
           # float ABI flag, so don't pass it unless we're targeting arm.
           set(float_flag ${${float_type}_FLOAT_FLAG})


now also installing include directories of external libraries

--- cmake/External.cmake
+++ cmake/External.cmake
@@ -187,7 +187,9 @@
     get_target_property(IMPORTED_IMPLIB_RELEASE ${target} IMPORTED_IMPLIB_RELEASE)
     get_target_property(IMPORTED_LOCATION_DEBUG ${target} IMPORTED_LOCATION_DEBUG)
     get_target_property(IMPORTED_LOCATION_RELEASE ${target} IMPORTED_LOCATION_RELEASE)
-
+    get_target_property(INTERFACE_INCLUDE_DIRECTORIES ${target} INTERFACE_INCLUDE_DIRECTORIES)
+
+    install(DIRECTORY ${INTERFACE_INCLUDE_DIRECTORIES}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${target})
     if(WIN32)
       install(FILES ${IMPORTED_IMPLIB_DEBUG} DESTINATION "lib" OPTIONAL)
       install(FILES ${IMPORTED_IMPLIB_RELEASE} DESTINATION "lib" OPTIONAL)


Update Coin library names

Update Coin library names

--- cmake/FindCoin.cmake
+++ cmake/FindCoin.cmake
@@ -128,7 +128,7 @@
 find_library(
 	Coin_LIBRARY_DEBUG
 	NAMES
-	Coind coin2d coin3d Coin4d Inventord
+	Coind coin2d coin3d Coin4d
 	HINTS
 	${Coin_LIBRARY_HINTS}
 	PATHS
@@ -138,7 +138,7 @@
 find_library(
 	Coin_LIBRARY_RELEASE
 	NAMES
-	Coin coin2 coin3 Coin4 Inventor
+	Coin coin2 coin3 Coin4
 	HINTS
 	${Coin_LIBRARY_HINTS}
 	PATHS


fix FindDAOS.cmake so it finds daos dependent libraries correctly

--- cmake/FindDAOS.cmake
+++ cmake/FindDAOS.cmake
@@ -36,8 +36,6 @@
     )
 endif()

-
-message(STATUS "DAOS_ROOT is : ${DAOS_ROOT}")
 find_path(DAOS_INCLUDE_DIR daos_api.h ${DAOS_INCLUDE_OPTS})
 find_library(DAOS_LIBRARY libdaos.so ${DAOS_LIBRARY_OPTS})
 find_library(DFS_LIBRARY libdfs.so ${DAOS_LIBRARY_OPTS})
@@ -45,7 +43,7 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(DAOS
   FOUND_VAR DAOS_FOUND
-  REQUIRED_VARS DAOS_LIBRARY DAOS_INCLUDE_DIR
+  REQUIRED_VARS DAOS_LIBRARY DFS_LIBRARY DAOS_INCLUDE_DIR
 )

 if(DAOS_FOUND)


Merging request #54.

Merging request #54.

--- cmake/dtkBuild.cmake
+++ cmake/dtkBuild.cmake
@@ -4,9 +4,9 @@
 ## Copyright (C) 2008 - Julien Wintz, Inria.
 ## Created: Fri Apr  2 09:05:55 2010 (+0200)
 ## Version: $Id$
-## Last-Updated: Mon May 23 12:26:46 2011 (+0200)
+## Last-Updated: Mon May 23 14:36:15 2011 (+0200)
 ##           By: Julien Wintz
-##     Update #: 178
+##     Update #: 179
 ######################################################################
 ##
 ### Commentary:
@@ -66,15 +66,9 @@
 include_directories(${PROJECT_SOURCE_DIR}/src)
 include_directories(${PROJECT_BINARY_DIR})

-if(WIN32)
-  set(${PROJECT_NAME}_ARCHIVE_OUTPUT_DIRECTORY lib)
-  set(${PROJECT_NAME}_RUNTIME_OUTPUT_DIRECTORY bin)
-  set(${PROJECT_NAME}_LIBRARY_OUTPUT_DIRECTORY bin)
-else()
-  set(${PROJECT_NAME}_ARCHIVE_OUTPUT_DIRECTORY lib)
-  set(${PROJECT_NAME}_RUNTIME_OUTPUT_DIRECTORY bin)
-  set(${PROJECT_NAME}_LIBRARY_OUTPUT_DIRECTORY lib)
-endif()
+set(${PROJECT_NAME}_ARCHIVE_OUTPUT_DIRECTORY lib)
+set(${PROJECT_NAME}_RUNTIME_OUTPUT_DIRECTORY bin)
+set(${PROJECT_NAME}_LIBRARY_OUTPUT_DIRECTORY bin)

 set(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_LIBRARY_OUTPUT_DIRECTORY})
 set(ARCHIVE_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_ARCHIVE_OUTPUT_DIRECTORY})


fixed glew download url

fixed glew download url

--- cmake/get-glew.cmake
+++ cmake/get-glew.cmake
@@ -16,7 +16,7 @@
       PREFIX              ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
       #URL                 https://github.com/nigels-com/glew/releases/download/glew-${GLEW_VERSION}/glew-${GLEW_VERSION}-win32.zip Download link is broken
-      URL                 http://downloads.sourceforge.net/project/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}/glew-${GLEW_VERSION}-win32.zip
+      URL                 https://downloads.sourceforge.net/project/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}-win32.zip
       URL_MD5             32a72e6b43367db8dbea6010cd095355
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""


Use $PROJECT_NAME var in platform options

--- cmake/platform.cmake
+++ cmake/platform.cmake
@@ -13,15 +13,15 @@

   # ARCH_32 and ARCH_64 are not presently used here, but are reserved for future
   # consistency with the other supported platforms.
-  option ( ARCH_32 "Compile nomlib as a 32-bit library" off )
-  option ( ARCH_64 "Compile nomlib as a 64-bit library" on )
+  option ( ARCH_32 "Compile ${PROJECT_NAME} as a 32-bit library" off )
+  option ( ARCH_64 "Compile ${PROJECT_NAME} as a 64-bit library" on )

   message ( STATUS "Platform: Linux" )
 elseif ( CMAKE_SYSTEM_NAME STREQUAL "Windows" )
   set ( PLATFORM_WINDOWS true )

-  option ( ARCH_32 "Compile nomlib as a 32-bit library" off )
-  option ( ARCH_64 "Compile nomlib as a 64-bit library" on )
+  option ( ARCH_32 "Compile ${PROJECT_NAME} as a 32-bit library" off )
+  option ( ARCH_64 "Compile ${PROJECT_NAME} as a 64-bit library" on )

   message ( STATUS "Platform: Windows" )
 else () # Not Linux nor OSX


ENH: Wrap ZeroCrossingBasedEdgeDetectionImageFilter - it has been turned off a long time ago because of a bug which seem to have disapear now. The current code is based on Dan's Mueller code, probably from ManagedITK.

--- Wrapping/WrapITK/Modules/EdgesAndContours/wrap_itkZeroCrossingBasedEdgeDetectionImageFilter.cmake
+++ Wrapping/WrapITK/Modules/EdgesAndContours/wrap_itkZeroCrossingBasedEdgeDetectionImageFilter.cmake
@@ -1,8 +1,6 @@
-# and again, this boring problem of FixedArray typemap with python
+WRAP_CLASS("itk::ZeroCrossingBasedEdgeDetectionImageFilter" POINTER)

-# WRAP_CLASS("itk::ZeroCrossingBasedEdgeDetectionImageFilter" POINTER)
-#
-#   WRAP_IMAGE_FILTER_SIGN_INT(2)
-#   WRAP_IMAGE_FILTER_REAL(2)
-#
-# END_WRAP_CLASS()
+  WRAP_IMAGE_FILTER_REAL(2 2+)
+
+END_WRAP_CLASS()
+


Don't install sample dlls unless OGRE_INSTALL_SAMPLES is true

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -288,7 +288,9 @@
     # disable "lib" prefix on Unix
     set_target_properties(${SAMPLENAME} PROPERTIES PREFIX "")
   endif (CMAKE_COMPILER_IS_GNUCXX)
-  ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
+  if (OGRE_INSTALL_SAMPLES)
+	ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
+  endif()

 endfunction(ogre_config_sample_common)


Add mpi2 target to the test driver

Add mpi2 target to the test driver

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -468,7 +468,7 @@
 		cuda)
 			generate_translation_configurations_cuda
 			;;
-		mpi)
+		mpi|mpi2)
 			generate_translation_configurations_mpi
 			;;
 		mpi-cuda)
@@ -570,14 +570,16 @@
 				return 1
 			fi
 			;;
-		mpi)
+		mpi|mpi2)
 			if [ "@MPI_ENABLED@" != "TRUE" ]; then
 				echo "[COMPILE] Skipping MPI compilation (not supported)"
 				return 0
 			fi
 			local src_file="$src_file_base".c
 			cc -c $src_file -I@CMAKE_SOURCE_DIR@/include $MPI_CFLAGS $CFLAGS &&
-			mpic++ "$src_file_base".o -lphysis_rt_mpi $LDFLAGS -o $exe_name
+			local lib_name=physis_rt_mpi
+			if [ $target = "mpi2" ]; then lib_name=physis_rt_mpi2; fi
+			mpic++ "$src_file_base".o -l$lib_name $LDFLAGS -o $exe_name
 			;;
 		mpi-cuda)
 			if [ "@MPI_ENABLED@" != "TRUE" -o "@CUDA_ENABLED@" != "TRUE" ]; then
@@ -648,8 +650,7 @@
     local src_name=${1%%.*}
     local target=$2
     case $target in
-
-		mpi)
+		mpi|mpi2)
 			target=ref
 			;;
 		mpi-cuda)
@@ -730,7 +731,7 @@
 		cuda)
 			./$exename $TRACE > $exename.out 2> $exename.err
 			;;
-		mpi)
+		mpi|mpi2)
 			do_mpirun $3 $4 "$MPI_MACHINEFILE" ./$exename $TRACE > $exename.out 2> $exename.err
 			;;
 		mpi-cuda)
@@ -865,7 +866,7 @@
 {
 	if is_module_test $1; then
 		case "$2" in
-			mpi|mpi-cuda|opencl|mpi-opencl|mpi-openmp|mpi-openmp-numa)
+			mpi|mpi2|mpi-cuda|opencl|mpi-opencl|mpi-openmp|mpi-openmp-numa)
 				return 0
 		esac
 	fi
@@ -1031,7 +1032,7 @@
 				if [ "$STAGE" = "COMPILE" ]; then continue; fi

 				case "$TARGET" in
-					mpi|mpi-*)
+					mpi|mpi2|mpi-*)
 						np_target=$MPI_PROC_DIM
 						;;
 					*)


Make MITK compatible with Python 3.10

Make MITK compatible with Python 3.10

Also change the download method of PythonQt to Git clone.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -47,6 +47,11 @@

     mitk_query_custom_ep_vars()

+    set(pythonqt_location_args
+      "-DPythonQt_GIT_REPOSITORY:STRING=https://github.com/MITK/PythonQt.git"
+      -DPythonQt_REVISION_TAG:STRING=patched-10-patched
+    )
+
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       GIT_REPOSITORY https://github.com/MITK/CTK.git
@@ -73,9 +78,8 @@
         -DCTK_LIB_XNAT/Core:BOOL=ON
         -DCTK_PLUGIN_org.commontk.eventadmin:BOOL=ON
         -DCTK_PLUGIN_org.commontk.configadmin:BOOL=ON
-        -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_DIR:PATH=${DCMTK_DIR}
-        -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_fae23012.tar.gz
+        ${pythonqt_location_args}
         ${${proj}_CUSTOM_CMAKE_ARGS}
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}


GCC 4.9: Do not add -G on Debug

GCC 4.9: Do not add -G on Debug

For alpaka supported GCC versions less then 5.X, do not automatically
add device debug symbols with `-G`.

This also warns the user verbosely when tried.

--- alpakaConfig.cmake
+++ alpakaConfig.cmake
@@ -366,8 +366,17 @@

                 SET(CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}")

-                if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
-                    LIST(APPEND CUDA_NVCC_FLAGS "-g" "-G")
+                IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+                    LIST(APPEND CUDA_NVCC_FLAGS "-g")
+                    # https://github.com/ComputationalRadiationPhysics/alpaka/issues/428
+                    IF(CMAKE_COMPILER_IS_GNUCXX AND
+                       CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND
+                       CUDA_VERSION VERSION_EQUAL 8.0)
+                        MESSAGE(WARNING "GCC 4.9 does not support -G with CUDA8! "
+                                        "Device debug symbols NOT added.")
+                    ELSE()
+                        LIST(APPEND CUDA_NVCC_FLAGS "-G")
+                    ENDIF()
                 ENDIF()

                 IF(ALPAKA_CUDA_FAST_MATH)


"ar" and zero or several 'm' matches also to "sparc". Adding '^' at the begiinning seems like the safest option.

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -6,7 +6,7 @@
 elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "i386") AND (CMAKE_SIZEOF_VOID_P EQUAL 8) AND (APPLE))
 	# Mac is weird like that.
 	set(TARGET_ARCH "x64")
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm*")
 	set(TARGET_ARCH "ARM")
 endif()


Fix GitVersioning,cmake on Windows

Fix GitVersioning,cmake on Windows

--- cmake/GitVersioning.cmake
+++ cmake/GitVersioning.cmake
@@ -6,7 +6,7 @@
         )
     FILE(WRITE ${CMAKE_BINARY_DIR}/GitVersioning/version.cmake
     "  EXECUTE_PROCESS(
-        COMMAND ${GIT_EXECUTABLE} describe
+        COMMAND \"${GIT_EXECUTABLE}\" describe
         RESULT_VARIABLE GIT_RESULT
         OUTPUT_VARIABLE GIT_REPO_VERSION
         ERROR_VARIABLE  GIT_ERROR
@@ -14,7 +14,7 @@
         )
     IF( NOT \${GIT_RESULT} EQUAL 0 )
         EXECUTE_PROCESS(
-            COMMAND ${GIT_EXECUTABLE} describe --all
+            COMMAND \"${GIT_EXECUTABLE}\" describe --all
             RESULT_VARIABLE GIT_RESULT
             OUTPUT_VARIABLE GIT_REPO_VERSION
             ERROR_VARIABLE  GIT_ERROR


install dependencies only on windows and install plugins into correct dir

--- cmake/MapnikInstall.cmake
+++ cmake/MapnikInstall.cmake
@@ -12,6 +12,8 @@
         )
     elseif(NOT ${MAPNIK_INSTALL_ALREADY_INSTALLED} AND ${MAPNIK_INSTALL_IS_PLUGIN})
         install(TARGETS ${MAPNIK_INSTALL_TARGET}
+            LIBRARY DESTINATION ${PLUGINS_INSTALL_DIR}
+            ARCHIVE DESTINATION ${PLUGINS_INSTALL_DIR}
             RUNTIME DESTINATION ${PLUGINS_INSTALL_DIR}
         )
     endif()
@@ -32,7 +34,7 @@

 function(mapnik_install_targets)
-    if(INSTALL_DEPENDENCIES)
+    if(INSTALL_DEPENDENCIES AND WIN32)
         # https://cmake.org/cmake/help/latest/policy/CMP0087.html
         cmake_policy(SET CMP0087 NEW)
         get_property(MAPNIK_INSTALLED_TARGETS GLOBAL PROPERTY TARGETS)


Add path for plugins

Add path for plugins

--- cmake/AddSourceDirectories.cmake
+++ cmake/AddSourceDirectories.cmake
@@ -19,6 +19,19 @@
 set(CP_PATH_BIN               ${CP_PATH_CMAKE}/../bin)

 #-------------------------------------------------------------------------------------------------------
+# path for plugins
+# Windows: bin/plugins
+# Linux  : bin/plugins
+# macOS  : bin/CANpieServer.app/Contents/PlugIns
+#
+if(APPLE)
+   set(CP_PATH_PLUGINS        ${CP_PATH_BIN}/CANpieServer.app/Contents/PlugIns)
+else()
+   set(CP_PATH_PLUGINS        ${CP_PATH_BIN}/PlugIns)
+endif()
+
+
+#-------------------------------------------------------------------------------------------------------
 # general source path
 #
 set(CP_PATH_SOURCE            ${CP_PATH_CMAKE}/../source)
@@ -32,6 +45,9 @@
 set(CP_PATH_QCAN              ${CP_PATH_SOURCE}/qcan)

 set(CP_PATH_TEST              ${CP_PATH_CMAKE}/../test)
+
+
+

 list(
     APPEND CP_FILE_CANPIE


Quickfix + changed rootdir of dependencies.

--- cmake/DownloadDependencies.cmake
+++ cmake/DownloadDependencies.cmake
@@ -1,5 +1,8 @@

 include(FetchContent)
+set(FETCHCONTENT_BASE_DIR ${CMAKE_SOURCE_DIR}/deps)
+set(FETCHCONTENT_QUIET FALSE)
+set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
 FetchContent_Declare(
         nana
         GIT_REPOSITORY "https://github.com/cnjinhao/nana.git"
@@ -11,7 +14,6 @@
         BUILD_COMMAND ""
         INSTALL_COMMAND ""
         TEST_COMMAND ""
-        LOG_DOWNLOAD TRUE
 )
 FetchContent_Declare(
         poco
@@ -24,7 +26,6 @@
         BUILD_COMMAND ""
         INSTALL_COMMAND ""
         TEST_COMMAND ""
-        LOG_DOWNLOAD TRUE
 )
 FetchContent_Declare(
         json
@@ -37,7 +38,6 @@
         BUILD_COMMAND ""
         INSTALL_COMMAND ""
         TEST_COMMAND ""
-        LOG_DOWNLOAD TRUE
 )

 if(WIN32)
@@ -53,9 +53,8 @@
         BUILD_COMMAND ""
         INSTALL_COMMAND ""
         TEST_COMMAND ""
-        LOG_DOWNLOAD TRUE
 )
 FetchContent_Populate(nana)
 FetchContent_Populate(poco)
 FetchContent_Populate(json)
-FetchContent_Populate(bass)+FetchContent_Populate(bass)


support both openblas.lib and libopenblas.dll.a

--- cmake/Modules/FindOpenBLAS.cmake
+++ cmake/Modules/FindOpenBLAS.cmake
@@ -1,5 +1,10 @@

-file(TO_CMAKE_PATH $ENV{OpenBLAS_HOME} OpenBLAS_HOME)
+IF($ENV{OpenBLAS_HOME})
+	file(TO_CMAKE_PATH $ENV{OpenBLAS_HOME} OpenBLAS_HOME)
+ENDIF()
+IF($ENV{OpenBLAS})
+	file(TO_CMAKE_PATH $ENV{OpenBLAS} OpenBLAS_DIR)
+ENDIF()

 SET(Open_BLAS_INCLUDE_SEARCH_PATHS
   /usr/include
@@ -27,17 +32,16 @@
         /opt/OpenBLAS/lib
         ${PROJECT_SOURCE_DIR}/3rdparty/OpenBLAS/lib
         ${PROJECT_SOURCE_DIR}/thirdparty/OpenBLAS/lib
-        $ENV{OpenBLAS}cd
-        $ENV{OpenBLAS}/lib
+	${OpenBLAS_DIR}
+	${OpenBLAS_DIR}/lib
         ${OpenBLAS_HOME}
         ${OpenBLAS_HOME}/lib
  )

 FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS})
-IF(MSVC)
+FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
+IF(NOT OpenBLAS_LIB)
 	FIND_FILE(OpenBLAS_LIB NAMES libopenblas.dll.a PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
-ELSE(MSVC)
-	FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
 ENDIF()

 SET(OpenBLAS_FOUND ON)


Fix configure with Boost TPL installed from system package manager

--- cmake/TPLs/FindTPLBoostOrg.cmake
+++ cmake/TPLs/FindTPLBoostOrg.cmake
@@ -8,6 +8,6 @@
   )

 # Use CMake FindBoost module to check version is sufficient
-SET(BOOST_INCLUDEDIR "${BoostOrg_INCLUDE_DIRS}")
+SET(BOOST_INCLUDEDIR ${TPL_BoostOrg_INCLUDE_DIRS})
 SET(Boost_NO_SYSTEM_PATHS ON)
 FIND_PACKAGE(Boost 1.61.0 REQUIRED)


Ignore generated code in coverage report.

--- cmake/modules/CodeCoverage.cmake
+++ cmake/modules/CodeCoverage.cmake
@@ -142,7 +142,7 @@

         # Capturing lcov counters and generating report
         COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-        COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+        COMMAND ${LCOV_PATH} --remove ${_outputname}.info '*_tests.cpp' '*generated*' '/usr/*' --output-file ${_outputname}.info.cleaned
         COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
         COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned


Make 'half' cacheable

Make 'half' cacheable

--- cmake/projects/half/hunter.cmake
+++ cmake/projects/half/hunter.cmake
@@ -8,6 +8,7 @@
 endif()

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_download)
 include(hunter_pick_scheme)

@@ -23,4 +24,5 @@
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
+hunter_cacheable(half)
 hunter_download(PACKAGE_NAME half)


Add a comment about BOOST_MANGLED_NAMESPACE

--- cmake/snippets/boost_tests.cmake
+++ cmake/snippets/boost_tests.cmake
@@ -34,6 +34,8 @@
     CMAKE_FLAGS         "-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIRS}"
     RUN_OUTPUT_VARIABLE boost_detect_mangle_namespace)
   string(STRIP "${boost_detect_mangle_namespace}" boost_detect_mangle_namespace)
+  # The mangled namespace is detected, so make the value INTERNAL to prevent
+  # accidentally changing in in a GUI.
   set(BOOST_MANGLE_NAMESPACE "${boost_detect_mangle_namespace}"
     CACHE INTERNAL "The detected mangled boost namespace")
 endif ()


SVN_SILENT made messages (.desktop file)

--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -21,6 +21,7 @@
 Name[et]=DirectShow9
 Name[hu]=DirectShow9
 Name[it]=DirectShow9
+Name[kk]=DirectShow9
 Name[nb]=DirectShow9
 Name[nds]=DirectShow9
 Name[nl]=DirectShow9
@@ -53,6 +54,7 @@
 Comment[et]=Phononi DirectShow9 taustaprogramm
 Comment[hu]=Phonon DirectShow9-modul
 Comment[it]=Motore DirectShow9 di Phonon
+Comment[kk]=Phonon DirectShow9 тетігі
 Comment[nb]=Phonon-motor for DirectShow9
 Comment[nds]=DirectShow9-Hülpprogramm för Phonon
 Comment[nl]=DirectShow9-backend van Phonon


CMake: Add PATH_SUFFIXES to second include file

--HG--
branch : v2-0


[CMAKE] fix a typo in FindMiniUPnPC

[CMAKE] fix a typo in FindMiniUPnPC

Summary: as per title

Test Plan:
```
cmake .. -GNinja
ninja && ninja check
```

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D12085

--- cmake/modules/FindMiniUPnPc.cmake
+++ cmake/modules/FindMiniUPnPc.cmake
@@ -25,7 +25,7 @@
 find_brew_prefix(_MiniUPnPc_BREW_HINT miniupnpc)

 find_package(PkgConfig)
-pkg_check_modules(PC_MiniUPnPc QUIET libqrencode)
+pkg_check_modules(PC_MiniUPnPc QUIET miniupnpc)

 find_path(MiniUPnPc_INCLUDE_DIR
 	NAMES miniupnpc.h


Move rootcling dictionary options after include directories

If ${ARG_OPTIONS} is used to propagate extra include directories to
rootcling and the extra directories contain another ROOT installation,
then ROOT headers will come from the external ROOT and break the build.
We need to make sure that headers from the current build take precedence
over any external installation of ROOT by moving definitions and include
directories towards the beginning of the command line for rootcling.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -421,7 +421,7 @@
   #---call rootcint------------------------------------------
   add_custom_command(OUTPUT ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file}
                      COMMAND ${command} -v2 -f  ${dictionary}.cxx ${newargs} ${excludepathsargs} ${rootmapargs}
-                                        ${ARG_OPTIONS} ${definitions} ${includedirs} ${headerfiles} ${_linkdef}
+                                        ${definitions} ${includedirs} ${ARG_OPTIONS} ${headerfiles} ${_linkdef}
                      IMPLICIT_DEPENDS ${_implicitdeps}
                      DEPENDS ${_list_of_header_dependencies} ${_linkdef} ${ROOTCINTDEP} ${ARG_DEPENDENCIES})
   get_filename_component(dictname ${dictionary} NAME)


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/vmime/hunter.cmake
+++ cmake/projects/vmime/hunter.cmake
@@ -3,6 +3,13 @@
 include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)
+
+hunter_add_version(
+	PACKAGE_NAME vmime
+	VERSION "0.9.2.1"
+	URL "https://github.com/designerror/vmime/archive/v0.9.2.1.tar.gz"
+	SHA1 71a23b9a281201ebbb46aecbcfd2cf136b2818cb
+)

 hunter_add_version(
 	PACKAGE_NAME vmime


cmake: compat: add copy_with_depend

cmake: compat: add copy_with_depend

--- cmake/qibuild/compat/compat.cmake
+++ cmake/qibuild/compat/compat.cmake
@@ -379,3 +379,27 @@
 function(add_python_test _name _pythonFile)
  add_test(${_name}  ${PYTHON_EXCUTABLE} ${_pythonFile} ${ARGN})
 endfunction()
+
+#copy file with dependency (if the file change in source => update the output)
+function(copy_with_depend _src _dest)
+  get_filename_component(_sname "${_src}"  NAME)
+  get_filename_component(_dname "${_dest}" NAME)
+
+  if (NOT EXISTS ${_src})
+    if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_src})
+      set(_src ${CMAKE_CURRENT_SOURCE_DIR}/${_src})
+    endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_src})
+  endif (NOT EXISTS ${_src})
+
+  #append the filename to the output filepath if necessary
+  if (_dname STREQUAL "")
+    set(_dest "${_dest}/${_sname}")
+  endif (_dname STREQUAL "")
+
+  get_filename_component(_dirname "${_dest}" PATH)
+  make_directory("${SDK_DIR}/${_dirname}/")
+
+  configure_file("${_src}" "${SDK_DIR}/${_dest}" COPYONLY)
+endfunction(copy_with_depend _src _dest)
+
+


Doxygen settings

Doxygen settings

--- fluidsynth/doc/Doxyfile.cmake
+++ fluidsynth/doc/Doxyfile.cmake
@@ -1,258 +1,245 @@
-# Doxyfile 1.5.6
+# Doxyfile 1.6

 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
-DOXYFILE_ENCODING      = UTF-8
-PROJECT_NAME           = libfluidsynth
-PROJECT_NUMBER         = @VERSION@
-OUTPUT_DIRECTORY       = api
-CREATE_SUBDIRS         = NO
-OUTPUT_LANGUAGE        = English
-BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = YES
-ABBREVIATE_BRIEF       = "The $name class" \
-                         "The $name widget" \
-                         "The $name file" \
-                         is \
-                         provides \
-                         specifies \
-                         contains \
-                         represents \
-                         a \
-                         an \
-                         the
-ALWAYS_DETAILED_SEC    = NO
-INLINE_INHERITED_MEMB  = NO
-FULL_PATH_NAMES        = NO
-STRIP_FROM_PATH        = @CMAKE_SOURCE_DIR@/
-STRIP_FROM_INC_PATH    = @CMAKE_SOURCE_DIR@/include/
-SHORT_NAMES            = NO
-JAVADOC_AUTOBRIEF      = YES
-QT_AUTOBRIEF           = NO
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = libfluidsynth
+PROJECT_NUMBER = @VERSION@
+OUTPUT_DIRECTORY = api
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" "The $name widget" "The $name file" is provides specifies contains represents a an the
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@/
+STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/include/
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = YES
+QT_AUTOBRIEF = NO
 MULTILINE_CPP_IS_BRIEF = NO
-INHERIT_DOCS           = YES
-SEPARATE_MEMBER_PAGES  = NO
-TAB_SIZE               = 8
-ALIASES                =
-OPTIMIZE_OUTPUT_FOR_C  = YES
-OPTIMIZE_OUTPUT_JAVA   = NO
-OPTIMIZE_FOR_FORTRAN   = NO
-OPTIMIZE_OUTPUT_VHDL   = NO
-BUILTIN_STL_SUPPORT    = NO
-CPP_CLI_SUPPORT        = NO
-SIP_SUPPORT            = NO
-IDL_PROPERTY_SUPPORT   = YES
-DISTRIBUTE_GROUP_DOC   = NO
-SUBGROUPING            = NO
-TYPEDEF_HIDES_STRUCT   = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = YES
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+BUILTIN_STL_SUPPORT = NO
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = NO
+TYPEDEF_HIDES_STRUCT = NO
 #---------------------------------------------------------------------------
 # Build related configuration options
 #---------------------------------------------------------------------------
-EXTRACT_ALL            = NO
-EXTRACT_PRIVATE        = NO
-EXTRACT_STATIC         = NO
-EXTRACT_LOCAL_CLASSES  = NO
-EXTRACT_LOCAL_METHODS  = NO
-EXTRACT_ANON_NSPACES   = NO
-HIDE_UNDOC_MEMBERS     = YES
-HIDE_UNDOC_CLASSES     = YES
-HIDE_FRIEND_COMPOUNDS  = NO
-HIDE_IN_BODY_DOCS      = NO
-INTERNAL_DOCS          = NO
-CASE_SENSE_NAMES       = YES
-HIDE_SCOPE_NAMES       = NO
-SHOW_INCLUDE_FILES     = NO
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = NO
-SORT_BRIEF_DOCS        = NO
-SORT_GROUP_NAMES       = NO
-SORT_BY_SCOPE_NAME     = NO
-GENERATE_TODOLIST      = NO
-GENERATE_TESTLIST      = NO
-GENERATE_BUGLIST       = NO
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS       =
-MAX_INITIALIZER_LINES  = 30
-SHOW_USED_FILES        = YES
-SHOW_DIRECTORIES       = NO
-SHOW_FILES             = YES
-SHOW_NAMESPACES        = YES
-FILE_VERSION_FILTER    =
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = NO
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = YES
+HIDE_UNDOC_CLASSES = YES
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = NO
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = NO
+SORT_BRIEF_DOCS = NO
+SORT_GROUP_NAMES = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = NO
+GENERATE_TESTLIST = NO
+GENERATE_BUGLIST = NO
+GENERATE_DEPRECATEDLIST = YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = NO
+SHOW_FILES = YES
+SHOW_NAMESPACES = YES
+FILE_VERSION_FILTER =
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_NO_PARAMDOC       = YES
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           =
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = YES
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
-INPUT                  = @CMAKE_SOURCE_DIR@/doc/fluidsynth-v11-devdoc.txt \
-                         @CMAKE_SOURCE_DIR@/include \
-                         @CMAKE_SOURCE_DIR@/include/fluidsynth \
-                         @CMAKE_SOURCE_DIR@/src
-INPUT_ENCODING         = UTF-8
-FILE_PATTERNS          = *.c *.h
-RECURSIVE              = NO
-EXCLUDE                =
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       =
-EXCLUDE_SYMBOLS        =
-EXAMPLE_PATH           = @CMAKE_SOURCE_DIR@/doc
-EXAMPLE_PATTERNS       = *.c
-EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             =
-INPUT_FILTER           =
-FILTER_PATTERNS        =
-FILTER_SOURCE_FILES    = NO
+INPUT = @CMAKE_SOURCE_DIR@/doc/fluidsynth-v11-devdoc.txt @CMAKE_SOURCE_DIR@/include @CMAKE_SOURCE_DIR@/include/fluidsynth @CMAKE_SOURCE_DIR@/src
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS = *.c *.h
+RECURSIVE = YES
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/doc
+EXAMPLE_PATTERNS = *.c
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
 #---------------------------------------------------------------------------
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
-SOURCE_BROWSER         = NO
-INLINE_SOURCES         = NO
-STRIP_CODE_COMMENTS    = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION    = NO
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
 REFERENCES_LINK_SOURCE = YES
-USE_HTAGS              = NO
-VERBATIM_HEADERS       = NO
+USE_HTAGS = NO
+VERBATIM_HEADERS = NO
 #---------------------------------------------------------------------------
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = YES
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          =
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
-GENERATE_HTML          = YES
-HTML_OUTPUT            = html
-HTML_FILE_EXTENSION    = .html
-HTML_HEADER            =
-HTML_FOOTER            =
-HTML_STYLESHEET        =
-HTML_ALIGN_MEMBERS     = YES
-GENERATE_HTMLHELP      = NO
-GENERATE_DOCSET        = NO
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-HTML_DYNAMIC_SECTIONS  = NO
-CHM_FILE               =
-HHC_LOCATION           =
-GENERATE_CHI           = NO
-CHM_INDEX_ENCODING     =
-BINARY_TOC             = NO
-TOC_EXPAND             = NO
-DISABLE_INDEX          = NO
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = NO
-TREEVIEW_WIDTH         = 250
-FORMULA_FONTSIZE       = 10
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_BUNDLE_ID = org.doxygen.Project
+HTML_DYNAMIC_SECTIONS = YES
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
+FORMULA_FONTSIZE = 10
 #---------------------------------------------------------------------------
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
-GENERATE_LATEX         = NO
-LATEX_OUTPUT           = latex
-LATEX_CMD_NAME         = latex
-MAKEINDEX_CMD_NAME     = makeindex
-COMPACT_LATEX          = NO
-PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         =
-LATEX_HEADER           =
-PDF_HYPERLINKS         = YES
-USE_PDFLATEX           = YES
-LATEX_BATCHMODE        = NO
-LATEX_HIDE_INDICES     = NO
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = YES
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
 #---------------------------------------------------------------------------
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
-GENERATE_RTF           = NO
-RTF_OUTPUT             = rtf
-COMPACT_RTF            = NO
-RTF_HYPERLINKS         = NO
-RTF_STYLESHEET_FILE    =
-RTF_EXTENSIONS_FILE    =
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
 #---------------------------------------------------------------------------
 # configuration options related to the man page output
 #---------------------------------------------------------------------------
-GENERATE_MAN           = NO
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-MAN_LINKS              = NO
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
 #---------------------------------------------------------------------------
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
-GENERATE_XML           = NO
-XML_OUTPUT             = xml
-XML_SCHEMA             =
-XML_DTD                =
-XML_PROGRAMLISTING     = YES
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
 #---------------------------------------------------------------------------
 # configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF   = NO
+GENERATE_AUTOGEN_DEF = NO
 #---------------------------------------------------------------------------
 # configuration options related to the Perl module output
 #---------------------------------------------------------------------------
-GENERATE_PERLMOD       = NO
-PERLMOD_LATEX          = NO
-PERLMOD_PRETTY         = YES
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
 PERLMOD_MAKEVAR_PREFIX =
 #---------------------------------------------------------------------------
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           =
-INCLUDE_FILE_PATTERNS  =
-PREDEFINED             =
-EXPAND_AS_DEFINED      =
-SKIP_FUNCTION_MACROS   = YES
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
 #---------------------------------------------------------------------------
 # Configuration::additions related to external references
 #---------------------------------------------------------------------------
-TAGFILES               =
-GENERATE_TAGFILE       =
-ALLEXTERNALS           = NO
-EXTERNAL_GROUPS        = YES
-PERL_PATH              = /usr/bin/perl
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
 #---------------------------------------------------------------------------
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
-CLASS_DIAGRAMS         = YES
-MSCGEN_PATH            =
-HIDE_UNDOC_RELATIONS   = YES
-HAVE_DOT               = NO
-DOT_FONTNAME           = FreeSans
-DOT_FONTPATH           =
-CLASS_GRAPH            = YES
-COLLABORATION_GRAPH    = YES
-GROUP_GRAPHS           = YES
-UML_LOOK               = NO
-TEMPLATE_RELATIONS     = YES
-INCLUDE_GRAPH          = YES
-INCLUDED_BY_GRAPH      = YES
-CALL_GRAPH             = NO
-CALLER_GRAPH           = NO
-GRAPHICAL_HIERARCHY    = YES
-DIRECTORY_GRAPH        = YES
-DOT_IMAGE_FORMAT       = png
-DOT_PATH               =
-DOTFILE_DIRS           =
-DOT_GRAPH_MAX_NODES    = 50
-MAX_DOT_GRAPH_DEPTH    = 1000
-DOT_TRANSPARENT        = YES
-DOT_MULTI_TARGETS      = NO
-GENERATE_LEGEND        = YES
-DOT_CLEANUP            = YES
+CLASS_DIAGRAMS = NO
+MSCGEN_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+DOT_FONTNAME = FreeSans
+DOT_FONTPATH =
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 1000
+DOT_TRANSPARENT = YES
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
 #---------------------------------------------------------------------------
 # Configuration::additions related to the search engine
 #---------------------------------------------------------------------------
-SEARCHENGINE           = NO
+SEARCHENGINE = NO


[CMake] Adding some missing CMake includes. NFC.

This happens to be working now because the includes exist in another CMake file that is included before this one. That will change with upcoming refactoring.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@267912 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CompilerRTUtils.cmake
+++ cmake/Modules/CompilerRTUtils.cmake
@@ -1,3 +1,6 @@
+include(CMakePushCheckState)
+include(CheckSymbolExists)
+
 # Because compiler-rt spends a lot of time setting up custom compile flags,
 # define a handy helper function for it. The compile flags setting in CMake
 # has serious issues that make its syntax challenging at best.


OFA: for ICC, look at march list instead of vector units

This adds support for building with -xMIC-AVX512 and -xCORE-AVX512

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

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -17,7 +17,7 @@
 # macro will consequently disable the relevant features via compiler flags.

 #=============================================================================
-# Copyright 2010-2015 Matthias Kretz <kretz@kde.org>
+# Copyright 2010-2016 Matthias Kretz <kretz@kde.org>
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
@@ -443,54 +443,33 @@
             add_definitions("-D${_flag}")
          endforeach(_flag)
       elseif(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc)$") # ICC (on Linux)
-         _my_find(_available_vector_units_list "avx2"    _found)
-         if(_found)
-            AddCompilerFlag("-xCORE-AVX2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-         else(_found)
-            _my_find(_available_vector_units_list "f16c"    _found)
-            if(_found)
-               AddCompilerFlag("-xCORE-AVX-I" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-            else(_found)
-               _my_find(_available_vector_units_list "avx"    _found)
-               if(_found)
-                  AddCompilerFlag("-xAVX" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-               else(_found)
-                  _my_find(_available_vector_units_list "sse4.2" _found)
-                  if(_found)
-                     AddCompilerFlag("-xSSE4.2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-                  else(_found)
-                     _my_find(_available_vector_units_list "sse4.1" _found)
-                     if(_found)
-                        AddCompilerFlag("-xSSE4.1" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-                     else(_found)
-                        _my_find(_available_vector_units_list "ssse3"  _found)
-                        if(_found)
-                           AddCompilerFlag("-xSSSE3" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-                        else(_found)
-                           _my_find(_available_vector_units_list "sse3"   _found)
-                           if(_found)
-                              # If the target host is an AMD machine then we still want to use -xSSE2 because the binary would refuse to run at all otherwise
-                              _my_find(_march_flag_list "barcelona" _found)
-                              if(NOT _found)
-                                 _my_find(_march_flag_list "k8-sse3" _found)
-                              endif(NOT _found)
-                              if(_found)
-                                 AddCompilerFlag("-xSSE2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-                              else(_found)
-                                 AddCompilerFlag("-xSSE3" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-                              endif(_found)
-                           else(_found)
-                              _my_find(_available_vector_units_list "sse2"   _found)
-                              if(_found)
-                                 AddCompilerFlag("-xSSE2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-                              endif(_found)
-                           endif(_found)
-                        endif(_found)
-                     endif(_found)
-                  endif(_found)
-               endif(_found)
-            endif(_found)
-         endif(_found)
+         set(OFA_map_knl "-xMIC-AVX512")
+         set(OFA_map_cannonlake "-xCORE-AVX512")
+         set(OFA_map_skylake-avx512 "-xCORE-AVX512")
+         set(OFA_map_skylake "-xCORE-AVX2")
+         set(OFA_map_broadwell "-xCORE-AVX2")
+         set(OFA_map_haswell "-xCORE-AVX2")
+         set(OFA_map_ivybridge "-xCORE-AVX-I")
+         set(OFA_map_sandybridge "-xAVX")
+         set(OFA_map_westmere "-xSSE4.2")
+         set(OFA_map_nehalem "-xSSE4.2")
+         set(OFA_map_penryn "-xSSSE3")
+         set(OFA_map_merom "-xSSSE3")
+         set(OFA_map_core2 "-xSSE3")
+         set(_ok FALSE)
+         foreach(arch ${_march_flag_list})
+            if(DEFINED OFA_map_${arch})
+               AddCompilerFlag(${OFA_map_${arch}} CXX_FLAGS Vc_ARCHITECTURE_FLAGS CXX_RESULT _ok)
+               if(_ok)
+                  break()
+               endif()
+            endif()
+         endforeach()
+         if(NOT _ok)
+            # This is the Intel compiler, so SSE2 is a very reasonable baseline.
+            message(STATUS "Did not recognize the requested architecture flag, falling back to SSE2")
+            AddCompilerFlag("-xSSE2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+         endif()
       else() # not MSVC and not ICC => GCC, Clang, Open64
          foreach(_flag ${_march_flag_list})
             AddCompilerFlag("-march=${_flag}" CXX_RESULT _good CXX_FLAGS Vc_ARCHITECTURE_FLAGS)


Update libprotobuf-mutator revision

Update libprotobuf-mutator revision

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

--- cmake/modules/ProtobufMutator.cmake
+++ cmake/modules/ProtobufMutator.cmake
@@ -6,7 +6,7 @@
 ExternalProject_Add(${PBM_PREFIX}
   PREFIX ${PBM_PREFIX}
   GIT_REPOSITORY https://github.com/google/libprotobuf-mutator.git
-  GIT_TAG 34287f8
+  GIT_TAG 17789d1
   CONFIGURE_COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR}
     -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
     -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}


eds-M!68 - SetupBuildFlags.cmake: Correct testing of two compiler/linker build flags

Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/68

--- cmake/modules/SetupBuildFlags.cmake
+++ cmake/modules/SetupBuildFlags.cmake
@@ -20,7 +20,7 @@
 		-Wundef
 		-Wwrite-strings
 		-Wno-cast-function-type
-		-no-undefined
+		-Wl,--no-undefined
 		-fno-strict-aliasing
 	)

@@ -34,7 +34,7 @@
 	else(${_maintainer_mode})
 		list(APPEND proposed_flags
 			-Wno-deprecated-declarations
-			-Wno-missing-include-dir)
+			-Wno-missing-include-dirs)
 	endif(${_maintainer_mode})

 	list(APPEND proposed_c_flags


Fixed reading of flags.cmake

Fixed reading of flags.cmake

--- cmake_modules/CMakeRunTargets.cmake
+++ cmake_modules/CMakeRunTargets.cmake
@@ -2,11 +2,6 @@
 #if(NOT (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})) # use only if cmake was run from the root directory
 #    message(FATAL_ERROR "Error: The run script must be called from the source root directory." )
 #endif(NOT (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}))
-
-
-if(EXISTS "${SOURCE_DIR}/flags.cmake")
-    include("${SOURCE_DIR}/flags.cmake")
-endif()

 string(REGEX MATCH ".*\\*.*" match "${CMAKE_CURRENT_SOURCE_DIR}")
 IF(NOT ${match} STREQUAL "")
@@ -31,6 +26,9 @@

 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build/bin)

+if(EXISTS "${SOURCE_DIR}/flags.cmake")
+    include("${SOURCE_DIR}/flags.cmake")
+endif()

 add_executable("${APP_NAME}" EXCLUDE_FROM_ALL "${ALLOPROJECT_APP_SRC}")


Deactivated JSONiq.

Deactivated JSONiq.

--- include/zorba/config.h.cmake
+++ include/zorba/config.h.cmake
@@ -157,7 +157,7 @@
 #cmakedefine ZORBA_WITH_BIG_INTEGER
 #cmakedefine ZORBA_WITH_DEBUGGER
 #cmakedefine ZORBA_WITH_FILE_ACCESS
-#cmakedefine ZORBA_WITH_JSON
+// #cmakedefine ZORBA_WITH_JSON
 #cmakedefine ZORBA_WITH_LIBXML2_SAX

 // Zorba parser configuration


git-svn-id: https://localhost/igvc@1056 b8439097-6f30-0410-869d-b57f63bf1bb9

--- 2011/software/standardPCOpts.cmake
+++ 2011/software/standardPCOpts.cmake
@@ -1,8 +1,9 @@

 IF((${ROBOT_REV} MATCHES "candiiidbg") OR (${ROBOT_REV} MATCHES "jeannidbg"))
 	SET(CMAKE_C_FLAGS  "-march=native -pipe -Wall -Wstrict-prototypes -Wextra -g3 -O0 -pthread")
-	SET(CMAKE_CXX_FLAGS "-march=native -pipe -std=gnu++0x -Wall -Wextra -g3 -O0 -pthread")
+	SET(CMAKE_CXX_FLAGS "-march=native -pipe -Wall -Wextra -g3 -O0 -pthread")
 ELSEIF( (${ROBOT_REV} MATCHES "candiii") OR (${ROBOT_REV} MATCHES "jeanni"))
 	SET(CMAKE_C_FLAGS  "-march=native -pipe -Wall -Wstrict-prototypes -Wextra -Wuninitialized -Werror=uninitialized -g3 -O2 -pthread")
-	SET(CMAKE_CXX_FLAGS "-march=native -pipe -std=gnu++0x -Wall -Wextra -Wuninitialized -Werror=uninitialized -g3 -O2 -pthread")
+#	SET(CMAKE_CXX_FLAGS "-march=native -pipe -std=gnu++0x -Wall -Wextra -Wuninitialized -Werror=uninitialized -g3 -O2 -pthread")
+	SET(CMAKE_CXX_FLAGS "-march=native -pipe -Wall -Wextra -Wuninitialized -Werror=uninitialized -g3 -O2 -pthread")
 ENDIF((${ROBOT_REV} MATCHES "candiiidbg") OR (${ROBOT_REV} MATCHES "jeannidbg"))


Updated CPackConfig

Updated CPackConfig

--- src/CPackConfig.cmake
+++ src/CPackConfig.cmake
@@ -41,7 +41,7 @@

 SET (CPACK_PACKAGE_NAME "openalpr")

-SET(CPACK_PACKAGE_VERSION "1.1.1")
+SET(CPACK_PACKAGE_VERSION "1.2.1")

 SET(CPACK_INSTALL_CMAKE_PROJECTS "${CUR_SOURCE_DIR}/build;src;ALL;/")
 SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
@@ -49,9 +49,9 @@
 SET(CPACK_STRIP_FILES "1")
 #SET (${VERSION} CPACK_DEBIAN_PACKAGE_VERSION)
 SET (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
-SET (CPACK_DEBIAN_PACKAGE_SECTION "graphics")
+SET (CPACK_DEBIAN_PACKAGE_SECTION "video")
 SET (CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
-SET (CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.1.3), libgcc1 (>= 4.1.1), libtesseract3 (>= 3.0.3), libopencv-core2.4 (>= 2.4.8), libopencv-objdetect2.4 (>= 2.4.8), libopencv-highgui2.4 (>= 2.4.8), libopencv-imgproc2.4 (>= 2.4.8), libopencv-flann2.4 (>= 2.4.8), libopencv-features2d2.4 (>= 2.4.8)")
+SET (CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.1.3), libgcc1 (>= 4.1.1), libtesseract3 (>= 3.0.3), libopencv-core2.4 (>= 2.4.8), libopencv-objdetect2.4 (>= 2.4.8), libopencv-highgui2.4 (>= 2.4.8), libopencv-imgproc2.4 (>= 2.4.8), libopencv-flann2.4 (>= 2.4.8), libopencv-features2d2.4 (>= 2.4.8), libzmq1, libleptonica, liblog4cplus, libcurl3, beanstalkd")

 SET (CPACK_RESOURCE_FILE_LICENSE "${CUR_SOURCE_DIR}/../LICENSE")
 SET (CPACK_PACKAGE_DESCRIPTION "OpenALPR - Open Source Automatic License Plate Recognition")


Forgot that in a test, we might want to link to the plugin for which the test is done!

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -438,7 +438,7 @@

                 # OpenCOR dependencies

-                FOREACH(OPENCOR_DEPENDENCY ${OPENCOR_DEPENDENCIES})
+                FOREACH(OPENCOR_DEPENDENCY ${OPENCOR_DEPENDENCIES} ${PLUGIN_NAME})
                     TARGET_LINK_LIBRARIES(${TEST_NAME}
                         ${OPENCOR_DEPENDENCY}Plugin
                     )


Optionally add ReLAPACK to LIB_COMPONENTS

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -386,6 +386,9 @@
   set(LIB_COMPONENTS "${LIB_COMPONENTS} LAPACK")
   if (NOT NO_LAPACKE)
     set(LIB_COMPONENTS "${LIB_COMPONENTS} LAPACKE")
+  endif ()
+  if (BUILD_RELAPACK)
+    set(LIB_COMPONENTS "${LIB_COMPONENTS} ReLAPACK")
   endif ()
 endif ()


-march=cooperlake requires gcc10

-march=cooperlake requires gcc10

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -46,7 +46,14 @@

 if (DEFINED TARGET)
   if (${TARGET} STREQUAL "COOPERLAKE" AND NOT NO_AVX512)
-    set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake")
+    if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
+      execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+        if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL10.1)
+          set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake")
+        else()
+          set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
+        endif()
+    endif()
   endif()
   if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512)
     set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")


Fix #1224: allow build to proceed if pthread_setname_np not found

--- cmake/thread.cmake
+++ cmake/thread.cmake
@@ -26,11 +26,6 @@
         ${INCLUDE_MISC_PTHREAD_HEADERS}
         int main() { pthread_set_name_np(pthread_self(), \"\"); }
         " HAVE_PTHREAD_SET_NAME_NP)
-    if (NOT (HAVE_PTHREAD_SETNAME_NP OR
-             HAVE_PTHREAD_SETNAME_NP_1 OR
-             HAVE_PTHREAD_SET_NAME_NP))
-        message(FATAL_ERROR "No suitable function for setting thread names found")
-    endif ()
 endfunction (do_pthread_checks)
 do_pthread_checks()


renaming coverage properties to allow cmake-gui to group them properly

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -26,19 +26,19 @@
     return()
 endif()

-find_program(GCOV_EXE gcov)
-find_program(LCOV_EXE lcov)
-find_program(GENHTML_EXE genhtml)
+find_program(COVERAGE_GCOV gcov)
+find_program(COVERAGE_LCOV lcov)
+find_program(COVERAGE_GENHTML genhtml)

-if(NOT GCOV_EXE)
+if(NOT COVERAGE_GCOV)
     message(FATAL_ERROR "gcov not found! Aborting...")
 endif()

-if(NOT LCOV_EXE)
+if(NOT COVERAGE_LCOV)
     message(FATAL_ERROR "lcov not found! Aborting...")
 endif()

-if(NOT GENHTML_EXE)
+if(NOT COVERAGE_GENHTML)
     message(FATAL_ERROR "genhtml not found! Aborting...")
 endif()

@@ -75,7 +75,7 @@
     add_custom_command(
         TARGET coverage
         POST_BUILD
-        COMMAND ${GENHTML_EXE} -o coverage *.info
+        COMMAND ${COVERAGE_GENHTML} -o coverage *.info
         COMMAND ${CMAKE_COMMAND} -E remove *.info
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     )
@@ -90,12 +90,12 @@
 macro(add_coverage NAME EXE)
     add_custom_target(coverage_${NAME}
         # Cleanup lcov
-        ${LCOV_EXE} --directory . --zerocounters
+        ${COVERAGE_LCOV} --directory . --zerocounters
         # Run tests
         COMMAND ${EXE} ${ARGV3}
         # Capturing lcov counters and generating report
-        COMMAND ${LCOV_EXE} --directory . --capture --output-file ${NAME}.tmp.info
-        COMMAND ${LCOV_EXE} --remove ${NAME}.tmp.info 'tests/*' 'gtest/*' '/usr/*' --output-file ${NAME}.info -q
+        COMMAND ${COVERAGE_LCOV} --directory . --capture --output-file ${NAME}.tmp.info
+        COMMAND ${COVERAGE_LCOV} --remove ${NAME}.tmp.info 'tests/*' 'gtest/*' '/usr/*' --output-file ${NAME}.info -q
         COMMAND ${CMAKE_COMMAND} -E remove ${NAME}.tmp.info

         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}


cmake: do not make mac os x installs fail

for #844

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -273,7 +273,11 @@
 		"Full path to common prefix of build+source directory"
     )

-option (INSTALL_SYSTEM_FILES "Install files to system directories" ON)
+if (APPLE)
+	option (INSTALL_SYSTEM_FILES "Install files to system directories" OFF)
+else ()
+	option (INSTALL_SYSTEM_FILES "Install files to system directories" ON)
+endif ()

 option (INSTALL_BUILD_TOOLS "Install build tools for cross-compilation" OFF)


gcov: don't elide source prefix. breaks sonarqube

--- cmake/Modules/GCOV.cmake
+++ cmake/Modules/GCOV.cmake
@@ -15,7 +15,8 @@
 set(GCOV_OPTS "-pb")

 if(NOT APPLE)
-  set(GCOV_OPTS --source-prefix "${CMAKE_SOURCE_DIR}" ${GCOV_OPTS} -arflu)
+  # DONT elide source prefix.
+  set(GCOV_OPTS ${GCOV_OPTS} -aflu)
 endif()

 add_custom_target(


minor fix

minor fix

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -39,6 +39,8 @@
 ## #################################################################
 ## Configuration
 ## #################################################################
+
+set(CTEST_USE_LAUNCHERS 1)

 # Test type (Nightly, Continuous, Experimental)
 set(test_model "Experimental")
@@ -59,8 +61,8 @@
 #set(CTEST_CMAKE_GENERATOR "CodeBlocks")
 #set(CTEST_CMAKE_GENERATOR "Sublime Text 2")
 #set(CTEST_CMAKE_GENERATOR "Eclipse CDT4")
-#set(CTEST_BUILD_JOBS "8")
-#set(CTEST_TEST_JOBS  "10")
+#set(CTEST_BUILD_JOBS 8)
+#set(CTEST_TEST_JOBS 10)

 # Set environment/compiler
 #set(ENV{MAKEFLAGS} "-j12")
@@ -173,14 +175,15 @@
 endif()

 macro(run_ctests)
+  ctest_submit(PARTS Update)
   ctest_configure(OPTIONS "${gismo_build_options}")
-  ctest_submit(PARTS Update Notes Configure)
+  ctest_submit(PARTS Configure)
   ctest_build(TARGET gsUnitTest) # for older versions of ninja
   ctest_submit(PARTS Build)
   ctest_build()
   ctest_build(TARGET unittests APPEND)
   ctest_submit(PARTS Build)
-  ctest_test(PARALLEL LEVEL ${CTEST_TEST_JOBS})
+  ctest_test(PARALLEL_LEVEL ${CTEST_TEST_JOBS})
   ctest_submit(PARTS Test)

   if(test_coverage)


USE_ROS OFF by default

USE_ROS OFF by default

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

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

 if(ENV{ROS_ROOT})
-    option(USE_ROS "Integrate with ROS rather than using native files" ON)
+    option(USE_ROS "Integrate with ROS rather than using native files" OFF)
     message(STATUS "Found ROS; USE_ROS is ${USE_ROS}")
     if(USE_ROS)
         set(_ros_pkgs std_msgs sensor_msgs roscpp_serialization cpp_common rostime


remove extra space in test command

remove extra space in test command

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -71,7 +71,7 @@
     set(_pyunit_TIMEOUT 60.0)
   endif()
   if(_pyunit_WORKING_DIRECTORY)
-    set(_chdir_prefix "bash -c \"cd ${_pyunit_WORKING_DIRECTORY} &&")
+    set(_chdir_prefix "bash -c \"cd ${_pyunit_WORKING_DIRECTORY} && ")
     set(_chdir_suffix "\"")
   endif()

@@ -100,7 +100,7 @@
   # Create a legal test name, in case the target name has slashes in it
   string(REPLACE "/" "_" _testname ${file})
   # We use rostest to call the executable to get process control, #1629
-  append_test_to_cache(catkin-tests "${_chdir_prefix} ${ROSUNIT_EXE} --name=${_testname} --time-limit=${_pyunit_TIMEOUT} --package=${PROJECT_NAME} -- ${_file_name} ${_covarg} ${_chdir_suffix}")
+  append_test_to_cache(catkin-tests "${_chdir_prefix}${ROSUNIT_EXE} --name=${_testname} --time-limit=${_pyunit_TIMEOUT} --package=${PROJECT_NAME} -- ${_file_name} ${_covarg}${_chdir_suffix}")
   append_test_to_cache(catkin-tests "${ROSUNIT_CHECK_TEST_RAN_EXE} ${CMAKE_BINARY_DIR}/test_results/${PROJECT_NAME}/TEST-${_testname}.xml")
 endfunction()


cmake: llvm: Invalidate toolchain capability cache

Invalidate toolchain capability cache on toolchain configuration.

Signed-off-by: Oleg Zhurakivskyy <cdb82bfa180f8df716a77d2c2557196a597a233c@intel.com>

--- cmake/toolchain/llvm/generic.cmake
+++ cmake/toolchain/llvm/generic.cmake
@@ -1,4 +1,12 @@
 # SPDX-License-Identifier: Apache-2.0
+
+find_appropriate_cache_directory(USER_CACHE_DIR)
+
+if((NOT "${USER_CACHE_DIR}" STREQUAL "") AND (EXISTS "${USER_CACHE_DIR}"))
+  message(STATUS "Invalidating toolchain capability cache in ${USER_CACHE_DIR}")
+  execute_process(COMMAND
+    ${CMAKE_COMMAND} -E remove_directory "${USER_CACHE_DIR}")
+endif()

 if(DEFINED $ENV{CLANG_ROOT_DIR})
   set(TOOLCHAIN_HOME ${CLANG_ROOT}/bin/)


fix c/p typo

fix c/p typo

--- linux/x86_64/Toolchain.cmake
+++ linux/x86_64/Toolchain.cmake
@@ -9,8 +9,8 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

-set(JAVA_AWT_LIBRARY /usr/local/jvm/openjdk-1.8.0-internal/jre/lib/arm/)
-set(JAVA_JVM_LIBRARY /usr/local/jvm/openjdk-1.8.0-internal/jre/lib/arm/)
+set(JAVA_AWT_LIBRARY /usr/local/jvm/openjdk-1.8.0-internal/jre/lib/amd64/)
+set(JAVA_JVM_LIBRARY /usr/local/jvm/openjdk-1.8.0-internal/jre/lib/amd64/)
 set(JAVA_INCLUDE_PATH /usr/local/jvm/openjdk-1.8.0-internal/include/)
 set(JAVA_INCLUDE_PATH2 /usr/local/jvm/openjdk-1.8.0-internal/include/linux/)
 set(JAVA_AWT_INCLUDE_PATH /usr/local/jvm/openjdk-1.8.0-internal/include/)


fix clang compiler warnings

fix clang compiler warnings

--- CMakeModules/CompilerSettings.cmake
+++ CMakeModules/CompilerSettings.cmake
@@ -7,7 +7,7 @@
     set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}")
 endif(CMAKE_COMPILER_IS_GNUCXX)
 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    add_definitions(-W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-unused-parameter -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual -Wno-unknown-pragmas -Qunused-arguments)
+    add_definitions(-W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-unused-parameter -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual -Wno-unknown-pragmas -Qunused-arguments -Wno-c++11-extensions)
     # prepend optimizion flag (in case the default setting doesn't include one)
     set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}")
 endif()


Fix for the OSX installer

Fix for the OSX installer

--- CMakeModules/osx_install/OSXInstaller.cmake
+++ CMakeModules/osx_install/OSXInstaller.cmake
@@ -97,6 +97,7 @@
     STRING(SUBSTRING ${FORGE_VERSION} 0 1 FORGE_VERSION_MAJOR) # Will return x

     ADD_CUSTOM_TARGET(OSX_INSTALL_SETUP_FORGE_LIB)
+    SET(FORGE_LIB "${CMAKE_INSTALL_PREFIX}/lib/libforge.${FORGE_VERSION}.dylib")
     FOREACH(SRC ${FORGE_LIB})
         FILE(RELATIVE_PATH SRC_REL ${CMAKE_INSTALL_PREFIX} ${SRC})
         ADD_CUSTOM_COMMAND(TARGET OSX_INSTALL_SETUP_FORGE_LIB PRE_BUILD


PKG: at least the Qt5 libs are required

PKG: at least the Qt5 libs are required

--- Modules/ThirdParty/Qt/otb-module-init.cmake
+++ Modules/ThirdParty/Qt/otb-module-init.cmake
@@ -18,9 +18,9 @@
 # limitations under the License.
 #

-find_package(Qt5Core)
-find_package(Qt5Gui)
-find_package(Qt5Widgets)
-find_package(Qt5OpenGL)
+find_package(Qt5Core REQUIRED)
+find_package(Qt5Gui REQUIRED)
+find_package(Qt5Widgets REQUIRED)
+find_package(Qt5OpenGL REQUIRED)
 find_package(Qt5LinguistTools)
 mark_as_advanced( QT_QMAKE_EXECUTABLE )