Update FindAPRUtil-ACCRE

Update FindAPRUtil-ACCRE

--- src/toolbox/cmake/FindAPRUtil-ACCRE.cmake
+++ src/toolbox/cmake/FindAPRUtil-ACCRE.cmake
@@ -54,7 +54,7 @@
 list(GET APU_LIBTOOL 0 APU_LIBTOOL_ARG0)

 get_filename_component(APU_LIBTOOL_BASE ${APU_LIBTOOL_ARG0} PATH )
-FIND_LIBRARY(APU_LIBRARY NAMES apr-accre-1 aprutil-ACCRE-1 PATHS ${APU_LIBTOOL_BASE})
+FIND_LIBRARY(APU_LIBRARY NAMES aprutil-accre-1 aprutil-ACCRE-1 PATHS ${APU_LIBTOOL_BASE})

 # compatibility, allow this CMake module to work with the various CMakeList.txt files
 set(APRUTIL_INCLUDE_DIR "${APU_INCLUDES}")


New version: 0.5.0

New version: 0.5.0

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
-SET(HAWKEY_MINOR "4")
-SET(HAWKEY_PATCH "19")
+SET(HAWKEY_MINOR "5")
+SET(HAWKEY_PATCH "0")


Bump cmake version to 1.12.0

Bump cmake version to 1.12.0

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
-SET(LIBREPO_MINOR "11")
-SET(LIBREPO_PATCH "3")
+SET(LIBREPO_MINOR "12")
+SET(LIBREPO_PATCH "0")


show CMAKE_CXX_COMPILER CMake variable normally to better understand build

--- cmake/ospray.cmake
+++ cmake/ospray.cmake
@@ -25,6 +25,9 @@

 MARK_AS_ADVANCED(OSPRAY_TILE_SIZE)
 MARK_AS_ADVANCED(OSPRAY_PIXELS_PER_JOB)
+
+# unhide compiler to make it easier for users to see what they are using
+MARK_AS_ADVANCED(CLEAR CMAKE_CXX_COMPILER)

 # project-wide OpenMP flags for all compilers
 find_package(OpenMP QUIET)


Disable hidden visibility for mex

Disable hidden visibility for mex

Our mex code has problems turning on hidden visibility. While we really
should fix this eventually (we'll have to if we are ever to move away
from mex.cmake to using the upstream mex support from FindMatlab.cmake),
it's non-trivial, so just work around it for now.

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -324,7 +324,9 @@
     add_library(${target} ${ARGV})
     set_target_properties(${target} PROPERTIES
       COMPILE_FLAGS "${MEX_COMPILE_FLAGS}"
-      OUTPUT_NAME ${mexfilename})
+      OUTPUT_NAME ${mexfilename}
+      CXX_VISIBILITY_PRESET "default"
+      VISIBILITY_INLINES_HIDDEN 0)
     if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
       target_link_libraries(${target} liblast)
     else()
@@ -352,6 +354,8 @@
       ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
       LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
       OUTPUT_NAME ${mexfilename}
+      CXX_VISIBILITY_PRESET "default"
+      VISIBILITY_INLINES_HIDDEN 0
       )
     foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
       string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )


[build] Remove redundant block applying '-mcx16' flag again for Android x86_64

--- stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -270,21 +270,6 @@
       list(APPEND result /clang:-mcx16)
     else()
       list(APPEND result -mcx16)
-    endif()
-  endif()
-
-  if(${CFLAGS_SDK} STREQUAL ANDROID)
-    if(${CFLAGS_ARCH} STREQUAL x86_64)
-      # NOTE(compnerd) Android NDK 21 or lower will generate library calls to
-      # `__sync_val_compare_and_swap_16` rather than lowering to the CPU's
-      # `cmpxchg16b` instruction as the `cx16` feature is disabled due to a bug
-      # in Clang.  This is being fixed in the current master Clang and will
-      # hopefully make it into Clang 9.0.  In the mean time, workaround this in
-      # the build.
-      if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_VERSION
-          VERSION_LESS 9.0.0)
-        list(APPEND result -mcx16)
-      endif()
     endif()
   endif()


ev-io binding: cmake reformatting

ev-io binding: cmake reformatting

--- cmake/Modules/FindLibEv.cmake
+++ cmake/Modules/FindLibEv.cmake
@@ -1,31 +1,24 @@
+# ~~~
 # Try to find libev
 # Once done, this will define
 #
 # LIBEV_FOUND        - system has libev
 # LIBEV_INCLUDE_DIRS - libev include directories
 # LIBEV_LIBRARIES    - libraries needed to use libev
+# ~~~

-if(LIBEV_INCLUDE_DIRS AND LIBEV_LIBRARIES)
-  set(LIBEV_FIND_QUIETLY TRUE)
-else()
-  find_path(
-    LIBEV_INCLUDE_DIR
-    NAMES ev.h
-    HINTS ${LIBEV_ROOT_DIR}
-    PATH_SUFFIXES include)
+if (LIBEV_INCLUDE_DIRS AND LIBEV_LIBRARIES)
+	set (LIBEV_FIND_QUIETLY TRUE)
+else ()
+	find_path (LIBEV_INCLUDE_DIR NAMES ev.h HINTS ${LIBEV_ROOT_DIR} PATH_SUFFIXES include)

-  find_library(
-    LIBEV_LIBRARY
-    NAME ev
-    HINTS ${LIBEV_ROOT_DIR}
-    PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR})
+	find_library (LIBEV_LIBRARY NAME ev HINTS ${LIBEV_ROOT_DIR} PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR})

-  set(LIBEV_INCLUDE_DIRS ${LIBEV_INCLUDE_DIR})
-  set(LIBEV_LIBRARIES ${LIBEV_LIBRARY})
+	set (LIBEV_INCLUDE_DIRS ${LIBEV_INCLUDE_DIR})
+	set (LIBEV_LIBRARIES ${LIBEV_LIBRARY})

-  include(FindPackageHandleStandardArgs)
-  find_package_handle_standard_args(
-    libev DEFAULT_MSG LIBEV_LIBRARY LIBEV_INCLUDE_DIR)
+	include (FindPackageHandleStandardArgs)
+	find_package_handle_standard_args (libev DEFAULT_MSG LIBEV_LIBRARY LIBEV_INCLUDE_DIR)

-  mark_as_advanced(LIBEV_LIBRARY LIBEV_INCLUDE_DIR)
-endif()
+	mark_as_advanced (LIBEV_LIBRARY LIBEV_INCLUDE_DIR)
+endif ()


Patch script as a bash file

Patch script as a bash file

Because execute_process does not accept pipes, it would seem.

--- scripts/PatchScript.cmake
+++ scripts/PatchScript.cmake
@@ -2,6 +2,7 @@
 # This script does not fail on errors. It ensures that we can "apply" patches over and over again.
 include(CMakeParseArguments)
 find_program(PATCH_EXECUTABLE patch)
+find_program(BASH_EXECUTABLE bash)
 function(create_patch_script NAME OUTVAR)
     if(NOT PATCH_EXECUTABLE)
         message(FATAL_ERROR "Could not find the patch program")
@@ -20,19 +21,23 @@
     endif()

     # Create patcher script
-    file(WRITE "${PROJECT_BINARY_DIR}/patches/${NAME}.cmake"
-        "execute_process(\n"
+    set(script_file "${PROJECT_BINARY_DIR}/CMakeFiles/patches/noperms/${NAME}.sh")
+    file(WRITE "${script_file}"
+        "#!${BASH_EXECUTABLE}\n"
+        "cd ${patcher_WORKING_DIRECTORY}\n"
     )
     foreach(filename ${patcher_UNPARSED_ARGUMENTS})
         get_filename_component(filename "${filename}" ABSOLUTE)
-        file(APPEND "${PROJECT_BINARY_DIR}/patches/${NAME}.cmake"
-            "   COMMAND ${PATCH_EXECUTABLE} -N ${patcher_CMDLINE} < ${filename}\n"
+        file(APPEND "${script_file}"
+            "${PATCH_EXECUTABLE} -N ${patcher_CMDLINE} < ${filename}\n"
         )
     endforeach()
-    file(APPEND "${PROJECT_BINARY_DIR}/patches/${NAME}.cmake"
-        "   WORKING_DIRECTORY ${patcher_WORKING_DIRECTORY}\n"
-        ")\n"
+    file(APPEND "${script_file}" "true\n")
+
+    file(COPY "${script_file}"
+        DESTINATION "${PROJECT_BINARY_DIR}/CMakeFiles/patches/"
+        FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
     )

-    set(${OUTVAR} "${PROJECT_BINARY_DIR}/patches/${NAME}.cmake" PARENT_SCOPE)
+    set(${OUTVAR} "${PROJECT_BINARY_DIR}/CMakeFiles/patches/${NAME}.sh" PARENT_SCOPE)
 endfunction()


cmake: reverted -flto since it may not work on all compilers and all situations

--- src/cmake/common-settings.cmake
+++ src/cmake/common-settings.cmake
@@ -228,7 +228,7 @@
 	endif()

 	# link
-	compile_flag("-flto"  FLTO  DEBUG RELEASE RELWITHDEBINFO)
+	#compile_flag("-flto"  FLTO  DEBUG RELEASE RELWITHDEBINFO)

 	# debugging symbols
 	compile_flag("-g"     DEBUG_G     DEBUG RELWITHDEBINFO)


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -2,6 +2,7 @@
 Name=Instant Messaging
 Name[bs]=Brze poruke
 Name[ca]=Missatgeria instantània
+Name[cs]=Instant Messaging
 Name[de]=Instant-Messaging
 Name[fr]=Messagerie instantanée
 Name[it]=Messaggistica istantanea
@@ -14,6 +15,7 @@
 Comment=Start a chat with any of your IM contacts or change your IM status
 Comment[bs]=Počnite ćaskanje s nekim od IM kontakta ili promijenite vaš IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
+Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
 Comment[de]=Chats mit ihren Kontakten starten oder Ihren IM-Status ändern
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
 Comment[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI


[Config] Back to ZeroMQ CMake initial configuration

--- config/FindZeroMQ.cmake
+++ config/FindZeroMQ.cmake
@@ -18,14 +18,14 @@
 #  ZeroMQ_INCLUDE_DIR        The location of ZeroMQ headers

 find_path (ZeroMQ_ROOT_DIR
-  NAMES include/zmq.h)
+  NAMES include/zmq.hpp)

 find_library (ZeroMQ_LIBRARIES
   NAMES zmq
   HINTS ${ZeroMQ_ROOT_DIR}/lib)

 find_path (ZeroMQ_INCLUDE_DIR
-  NAMES zmq.h
+  NAMES zmq.hpp
   HINTS ${ZeroMQ_ROOT_DIR}/include)

 #


[fix] Add VV User guide to OSX bundle

[fix] Add VV User guide to OSX bundle

--- Superbuild/Projects/apple/lidarview.bundle.cmake
+++ Superbuild/Projects/apple/lidarview.bundle.cmake
@@ -14,3 +14,9 @@
         DESTINATION "${lidarview_appname}/Contents/Resources"
         COMPONENT superbuild)
 unset(shared_files)
+
+#Install Veloview User Guide
+install(FILES "${superbuild_install_location}/bin/${lidarview_appname}/Contents/Resources/VeloView_User_Guide.pdf"
+  DESTINATION "doc"
+  COMPONENT superbuild
+)


cmake-unit: Fix typo

cmake-unit: Fix typo

--- CMakeUnit.cmake
+++ CMakeUnit.cmake
@@ -881,7 +881,7 @@
 # NAMESPACE: The namespace to register.
 function (cmake_unit_register_matcher_namespace NAMESPACE)

-    set_property (GLOBAL APPEND PROPERTY "_CMAKE_UNIT_MATCHER_NAMEPSPACE"
+    set_property (GLOBAL APPEND PROPERTY "_CMAKE_UNIT_MATCHER_NAMESPACE"
                   "${NAMESPACE}")

 endfunction ()
@@ -904,7 +904,7 @@
                                           ARGN ${ARGN})

     get_property (MATCHER_NAMESPACES GLOBAL PROPERTY
-                  "_CMAKE_UNIT_MATCHER_NAMEPSPACE")
+                  "_CMAKE_UNIT_MATCHER_NAMESPACE")
     list (REVERSE MATCHER_NAMESPACES)

     foreach (NAMESPACE ${MATCHER_NAMESPACES})


refien generic_cmake_ (#13457)

refien generic_cmake_ (#13457)

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -211,7 +211,7 @@
       set(libfiles ${libfiles} $<TARGET_FILE:${lib}>)
       #endif()
     endforeach()
-
+
     # windows cmd return error in clean env.
     # COMMAND del "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${TARGET_NAME}.lib"
     add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
@@ -255,7 +255,7 @@
       target_link_libraries(${TARGET_NAME} ${cc_library_DEPS})
       add_dependencies(${TARGET_NAME} ${cc_library_DEPS})
     endif()
-
+
     # cpplint code style
     foreach(source_file ${cc_library_SRCS})
       string(REGEX REPLACE "\\.[^.]*$" "" source ${source_file})
@@ -298,11 +298,10 @@
              WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
     if (${cc_test_SERIAL})
         set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1)
-
+    endif()
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true)
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
-    endif()
   endif()
 endfunction(cc_test)

@@ -366,11 +365,10 @@
     add_test(${TARGET_NAME} ${TARGET_NAME})
     if (nv_test_SERIAL)
         set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1)
-
+    endif()
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true)
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
-    endif()
   endif()
 endfunction(nv_test)

@@ -558,26 +556,26 @@
   set(${HDRS})

   if (MOBILE_INFERENCE)
-      set(EXTRA_FLAG "lite:")
+      set(EXTRA_FLAG "lite:")
   else()
-      set(EXTRA_FLAG "")
+      set(EXTRA_FLAG "")
   endif()

   foreach(FIL ${ARGN})
     get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
     get_filename_component(FIL_WE ${FIL} NAME_WE)
-
+
     set(_protobuf_protoc_src "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc")
     set(_protobuf_protoc_hdr "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h")
     list(APPEND ${SRCS} "${_protobuf_protoc_src}")
     list(APPEND ${HDRS} "${_protobuf_protoc_hdr}")
-
+
     add_custom_command(
       OUTPUT "${_protobuf_protoc_src}"
              "${_protobuf_protoc_hdr}"

       COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}"
-      COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
+      COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
       -I${CMAKE_CURRENT_SOURCE_DIR}
       --cpp_out "${EXTRA_FLAG}${CMAKE_CURRENT_BINARY_DIR}" ${ABS_FIL}
       DEPENDS ${ABS_FIL} protoc
@@ -646,7 +644,7 @@
   get_filename_component(PROTO_PATH ${ABS_PROTO} PATH)

   #FIXME(putcn): the follwoing line is supposed to generate *.pb.h and cc, but
-  # somehow it didn't. line 602 to 604 is to patching this. Leaving this here
+  # somehow it didn't. line 602 to 604 is to patching this. Leaving this here
   # for now to enable dist CI.
   protobuf_generate_cpp(grpc_proto_srcs grpc_proto_hdrs "${ABS_PROTO}")
   set(grpc_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/${PROTO_WE}.grpc.pb.cc")


version: fix version handling without extra_version set

Without extra_version, we had an extra - at the end of the version
string.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -42,5 +42,9 @@
 set(KERNEL_VERSION_MAJOR      ${PROJECT_VERSION_MAJOR})
 set(KERNEL_VERSION_MINOR      ${PROJECT_VERSION_MINOR})
 set(KERNEL_PATCHLEVEL         ${PROJECT_VERSION_PATCH})
+if(PROJECT_VERSION_EXTRA)
 set(KERNEL_VERSION_STRING     "\"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}-${PROJECT_VERSION_EXTRA}\"")
+else()
+set(KERNEL_VERSION_STRING     "\"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}\"")
+endif()


Fix typo

Fix typo

svn path=/trunk/kdesupport/strigi/; revision=648071

--- cmake/FindSha.cmake
+++ cmake/FindSha.cmake
@@ -16,9 +16,9 @@

 IF(SHA_FOUND)
-   IF(NOT OpenSSL_FIND_QUIETLY)
+   IF(NOT Sha_FIND_QUIETLY)
       MESSAGE(STATUS "Found Sha: ${SHA_LIBRARIES}")
-   ENDIF(NOT OpenSSL_FIND_QUIETLY)
+   ENDIF(NOT Sha_FIND_QUIETLY)
 ELSE(SHA_FOUND)
    IF(Sha_FIND_REQUIRED)
       MESSAGE(FATAL_ERROR "Could not find SHA1. Please install OpenSSL Development libraries")


update PROJ_ROOT

update PROJ_ROOT

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -411,7 +411,7 @@
     set(multiValueArgs SRCS DEPS)
     cmake_parse_arguments(py_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
     add_test(NAME ${TARGET_NAME}
-             COMMAND env PYTHONPATH=${CMAKE_SOURCE_DIR}/python:${CMAKE_SOURCE_DIR}/paddle:${PADDLE_PYTHON_PACKAGE_DIR}
+             COMMAND env PYTHONPATH=${PROJ_ROOT}/python:${PROJ_ROOT}/paddle:${PADDLE_PYTHON_PACKAGE_DIR}
              python2 ${py_test_SRCS}
              WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
   endif()


remove unnessesary cc_test link

remove unnessesary cc_test link

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -192,7 +192,7 @@
     set(multiValueArgs SRCS DEPS)
     cmake_parse_arguments(cc_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
     add_executable(${TARGET_NAME} ${cc_test_SRCS})
-    target_link_libraries(${TARGET_NAME} ${cc_test_DEPS} gtest gtest_main -lstdc++ -lm)
+    target_link_libraries(${TARGET_NAME} ${cc_test_DEPS} gtest gtest_main)
     add_dependencies(${TARGET_NAME} ${cc_test_DEPS} gtest gtest_main)
     add_test(NAME ${TARGET_NAME} COMMAND ${TARGET_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
   endif()
@@ -285,7 +285,7 @@
   add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
     COMMAND rm "${${TARGET_NAME}_LIB_PATH}"
     # Golang build source code
-    COMMAND env LIBRARY_PATH=${CMAKE_BINARY_DIR}/go/pserver/client/c/:$ENV{LIBRARY_PATH} GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build ${BUILD_MODE}
+    COMMAND GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build ${BUILD_MODE}
     -o "${${TARGET_NAME}_LIB_PATH}"
     "./${CMAKE_CURRENT_SOURCE_REL_DIR}/${GO_SOURCE}"
     # must run under GOPATH


debian packaging fixes

debian packaging fixes

early return prevents LIBMARIADB_STATIC_NAME from being set

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -21,10 +21,6 @@
 # INSTALL_BINDIR    location of binaries (mariadb_config)
 # INSTALL_LIBDIR    location of libraries
 # INSTALL_PLUGINDIR location of plugins
-
-IF(DEFINED INSTALL_BINDIR AND DEFINED INSTALL_LIBDIR AND DEFINED INSTALL_INCLUDEDIR AND DEFINED INSTALL_DOCDIR AND DEFINED INSTALL_PLUGINDIR)
-  RETURN()
-ENDIF()

 IF(NOT INSTALL_LAYOUT)
   SET(INSTALL_LAYOUT "DEFAULT")


use hunter_append_component instead of macro

--- cmake/modules/hunter_get_boost_libs.cmake
+++ cmake/modules/hunter_get_boost_libs.cmake
@@ -4,6 +4,7 @@
 include(CMakeParseArguments) # cmake_parse_arguments

 include(hunter_test_string_not_empty)
+include(hunter_append_component)

 function(hunter_get_boost_libs)
   set(function_name "hunter_get_boost_libs")
@@ -44,69 +45,41 @@
     endif()
   endforeach()

-  # check boost component valid version range, add to 'boost_libs' if valid
-  # - version_since: first boost version the component is included
-  # - version_until: first boost version the component isn't included anymore
-  macro(boost_component)
-    # parse arguments
-    set(_one_value_args COMPONENT SINCE UNTIL)
-    cmake_parse_arguments(_y "" "${_one_value_args}" "" ${ARGV})
-
-    foreach(_arg COMPONENT SINCE)
-      string(COMPARE EQUAL "${_y_${_arg}}" "" _is_empty)
-      if(_is_empty)
-        hunter_internal_error(
-          "'boost_component' incorrect usage,"
-          " option '${_arg}' with one argument is mandatory."
-          " Synopsis: boost_component(COMPONENT name SINCE version_since [UNTIL version_until])"
-        )
-      endif()
-    endforeach()
-
-    if(NOT x_VERSION VERSION_LESS _y_SINCE)
-      # check until only if set
-      string(COMPARE EQUAL "${_y_UNTIL}" "" _is_empty)
-      if(_is_empty)
-        list(APPEND boost_libs ${_y_COMPONENT})
-      elseif(x_VERSION VERSION_LESS _y_UNTIL)
-        list(APPEND boost_libs ${_y_COMPONENT})
-      endif()
-    endif()
-  endmacro()
-
   # list of all boost components valid for given version
   set(boost_libs)
-  boost_component(COMPONENT atomic          SINCE 1.53.0)
-  boost_component(COMPONENT chrono          SINCE 1.47.0)
-  boost_component(COMPONENT container       SINCE 1.56.0)
-  boost_component(COMPONENT context         SINCE 1.51.0)
-  boost_component(COMPONENT coroutine       SINCE 1.53.0)
-  boost_component(COMPONENT coroutine2      SINCE 1.60.0  UNTIL 1.65.0)
-  boost_component(COMPONENT date_time       SINCE 1.29.0)
-  boost_component(COMPONENT exception       SINCE 1.36.0)
-  boost_component(COMPONENT fiber           SINCE 1.62.0)
-  boost_component(COMPONENT filesystem      SINCE 1.30.0)
-  boost_component(COMPONENT graph           SINCE 1.18.0)
-  boost_component(COMPONENT graph_parallel  SINCE 1.18.0)
-  boost_component(COMPONENT iostreams       SINCE 1.33.0)
-  boost_component(COMPONENT locale          SINCE 1.48.0)
-  boost_component(COMPONENT log             SINCE 1.54.0)
-  boost_component(COMPONENT math            SINCE 1.23.0)
-  boost_component(COMPONENT metaparse       SINCE 1.61.0)
-  boost_component(COMPONENT mpi             SINCE 1.35.0)
-  boost_component(COMPONENT program_options SINCE 1.32.0)
-  boost_component(COMPONENT python          SINCE 1.19.0)
-  boost_component(COMPONENT random          SINCE 1.15.0)
-  boost_component(COMPONENT regex           SINCE 1.18.0)
-  boost_component(COMPONENT serialization   SINCE 1.32.0)
-  boost_component(COMPONENT signals         SINCE 1.29.0)
-  boost_component(COMPONENT stacktrace      SINCE 1.65.0)
-  boost_component(COMPONENT system          SINCE 1.35.0)
-  boost_component(COMPONENT test            SINCE 1.21.0)
-  boost_component(COMPONENT thread          SINCE 1.25.0)
-  boost_component(COMPONENT timer           SINCE 1.9.0)
-  boost_component(COMPONENT type_erasure    SINCE 1.60.0)
-  boost_component(COMPONENT wave            SINCE 1.33.0)
+  # common arguments for hunter_append_component
+  set(common_args LIST boost_libs VERSION ${x_VERSION})
+  hunter_append_component(${common_args} COMPONENT atomic          SINCE 1.53.0)
+  hunter_append_component(${common_args} COMPONENT chrono          SINCE 1.47.0)
+  hunter_append_component(${common_args} COMPONENT container       SINCE 1.56.0)
+  hunter_append_component(${common_args} COMPONENT context         SINCE 1.51.0)
+  hunter_append_component(${common_args} COMPONENT coroutine       SINCE 1.53.0)
+  hunter_append_component(${common_args} COMPONENT coroutine2      SINCE 1.60.0  UNTIL 1.65.0)
+  hunter_append_component(${common_args} COMPONENT date_time       SINCE 1.29.0)
+  hunter_append_component(${common_args} COMPONENT exception       SINCE 1.36.0)
+  hunter_append_component(${common_args} COMPONENT fiber           SINCE 1.62.0)
+  hunter_append_component(${common_args} COMPONENT filesystem      SINCE 1.30.0)
+  hunter_append_component(${common_args} COMPONENT graph           SINCE 1.18.0)
+  hunter_append_component(${common_args} COMPONENT graph_parallel  SINCE 1.18.0)
+  hunter_append_component(${common_args} COMPONENT iostreams       SINCE 1.33.0)
+  hunter_append_component(${common_args} COMPONENT locale          SINCE 1.48.0)
+  hunter_append_component(${common_args} COMPONENT log             SINCE 1.54.0)
+  hunter_append_component(${common_args} COMPONENT math            SINCE 1.23.0)
+  hunter_append_component(${common_args} COMPONENT metaparse       SINCE 1.61.0)
+  hunter_append_component(${common_args} COMPONENT mpi             SINCE 1.35.0)
+  hunter_append_component(${common_args} COMPONENT program_options SINCE 1.32.0)
+  hunter_append_component(${common_args} COMPONENT python          SINCE 1.19.0)
+  hunter_append_component(${common_args} COMPONENT random          SINCE 1.15.0)
+  hunter_append_component(${common_args} COMPONENT regex           SINCE 1.18.0)
+  hunter_append_component(${common_args} COMPONENT serialization   SINCE 1.32.0)
+  hunter_append_component(${common_args} COMPONENT signals         SINCE 1.29.0)
+  hunter_append_component(${common_args} COMPONENT stacktrace      SINCE 1.65.0)
+  hunter_append_component(${common_args} COMPONENT system          SINCE 1.35.0)
+  hunter_append_component(${common_args} COMPONENT test            SINCE 1.21.0)
+  hunter_append_component(${common_args} COMPONENT thread          SINCE 1.25.0)
+  hunter_append_component(${common_args} COMPONENT timer           SINCE 1.9.0)
+  hunter_append_component(${common_args} COMPONENT type_erasure    SINCE 1.60.0)
+  hunter_append_component(${common_args} COMPONENT wave            SINCE 1.33.0)

   # set output_var to found definition
   set(${x_LIBS} ${boost_libs} PARENT_SCOPE)


zeromq: add dependency on RT for linux

zeromq: add dependency on RT for linux

Change-Id: Ic33500b4213ab6f06a524303a373a6d3dfdd3fb2

--- cmake/qibuild/modules/zeromq-config.cmake
+++ cmake/qibuild/modules/zeromq-config.cmake
@@ -14,7 +14,11 @@
 endif()

 if(UNIX)
-  qi_set_global(ZEROMQ_DEPENDS "UUID")
+  if(APPLE)
+    qi_set_global(ZEROMQ_DEPENDS "UUID")
+  else()
+    qi_set_global(ZEROMQ_DEPENDS "UUID" "RT")
+  endif()
 else()
   qi_set_global(ZEROMQ_DEPENDS "WSA" "RPCRT")
 endif()


Updated FindPhoebus.cmake when Phoebus is missing

--- src/ibp/cmake/FindPhoebus.cmake
+++ src/ibp/cmake/FindPhoebus.cmake
@@ -10,8 +10,6 @@
 # Find the include path

 find_path(PHOEBUS_INCLUDE_DIR liblsl_client.h)
-
-set(APR_NAMES ${APR_NAMES} apr-1)
 find_library(PHOEBUS_LIBRARY NAMES lsl_client dl)

 if (PHOEBUS_LIBRARY AND PHOEBUS_INCLUDE_DIR)
@@ -23,6 +21,8 @@
    message(STATUS "Found Phoebus: ${PHOEBUS_LIBRARY} ${PHOEBUS_INCLUDE_DIR}")
 else (PHOEBUS_FOUND)
    message(STATUS "Could not find Phoebus library")
+   set(PHOEBUS_LIBRARY "")
+   set(PHOEBUS_INCLUDE_DIR "")
 endif (PHOEBUS_FOUND)


CMake: Added version info for APR needed to build Windows.

Review: https://reviews.apache.org/r/38551

--- 3rdparty/cmake/Versions.cmake
+++ 3rdparty/cmake/Versions.cmake
@@ -3,6 +3,7 @@
 set(GLOG_VERSION        "0.3.3")
 set(GMOCK_VERSION       "1.7.0")
 set(HTTP_PARSER_VERSION "1c3624a")
+set(LIBAPR_VERSION      "1.5.2")
 set(LIBEV_VERSION       "4.15")
 # TODO(hausdorff): (MESOS-3529) transition this back to a non-beta version.
 set(LIBEVENT_VERSION    "2.1.5-beta")


FindOGRE.cmake fixes: - Use OGRE_DEPENDENCIES_DIR if defined (external dependencies) - Find media in the OGRE_SOURCE folder correctly - Use a zip file common to 1.6 and 1.7 to detect media (OgreCore.zip doesn't exist anymore in 1.7+)

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -58,6 +58,7 @@
 getenv_path(OGRE_SDK)
 getenv_path(OGRE_SOURCE)
 getenv_path(OGRE_BUILD)
+getenv_path(OGRE_DEPENDENCIES_DIR)
 getenv_path(PROGRAMFILES)

@@ -99,6 +100,7 @@
 # If both OGRE_BUILD and OGRE_SOURCE are set, prepare to find Ogre in a build dir
 set(OGRE_PREFIX_SOURCE ${OGRE_SOURCE} ${ENV_OGRE_SOURCE})
 set(OGRE_PREFIX_BUILD ${OGRE_BUILD} ${ENV_OGRE_BUILD})
+set(OGRE_PREFIX_DEPENDENCIES_DIR ${OGRE_DEPENDENCIES_DIR} ${ENV_OGRE_DEPENDENCIES_DIR})
 if (OGRE_PREFIX_SOURCE AND OGRE_PREFIX_BUILD)
   foreach(dir ${OGRE_PREFIX_SOURCE})
     set(OGRE_INC_SEARCH_PATH ${dir}/OgreMain/include ${dir}/Dependencies/include ${dir}/iPhoneDependencies/include ${OGRE_INC_SEARCH_PATH})
@@ -111,6 +113,12 @@
     set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
 	set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
   endforeach(dir)
+
+  if (OGRE_PREFIX_DEPENDENCIES_DIR)
+    set(OGRE_INC_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/include ${OGRE_INC_SEARCH_PATH})
+    set(OGRE_LIB_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/lib ${OGRE_LIB_SEARCH_PATH})
+    set(OGRE_BIN_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/bin ${OGRE_BIN_SEARCH_PATH})
+  endif()
 else()
   set(OGRE_PREFIX_SOURCE "NOTFOUND")
   set(OGRE_PREFIX_BUILD "NOTFOUND")
@@ -493,6 +501,7 @@

 # look for the media directory
 set(OGRE_MEDIA_SEARCH_PATH
+  ${OGRE_SOURCE}
   ${OGRE_LIBRARY_DIR_REL}/..
   ${OGRE_LIBRARY_DIR_DBG}/..
   ${OGRE_LIBRARY_DIR_REL}/../..
@@ -500,12 +509,13 @@
   ${OGRE_PREFIX_SOURCE}
 )
 set(OGRE_MEDIA_SEARCH_SUFFIX
+  Samples/Media
   Media
   media
   share/OGRE/media
-  Samples/Media
 )
+
 clear_if_changed(OGRE_PREFIX_WATCH OGRE_MEDIA_DIR)
-find_path(OGRE_MEDIA_DIR NAMES packs/OgreCore.zip HINTS ${OGRE_MEDIA_SEARCH_PATH}
+find_path(OGRE_MEDIA_DIR NAMES packs/cubemapsJS.zip HINTS ${OGRE_MEDIA_SEARCH_PATH}
   PATHS ${OGRE_PREFIX_PATH} PATH_SUFFIXES ${OGRE_MEDIA_SEARCH_SUFFIX})


COMP: Added a check for the -Werror=return-type GCC flag.

This flag causes GCC to fail with an error when a non-void function does not
return, but it is not present on all versions of GCC.

--- CMake/vtkCompilerExtras.cmake
+++ CMake/vtkCompilerExtras.cmake
@@ -4,7 +4,13 @@

   # Addtional warnings for GCC
   set(CMAKE_CXX_FLAGS_WARN "-Wnon-virtual-dtor -Wno-long-long -ansi -Wcast-align -Wchar-subscripts -Wall -Wextra -Wpointer-arith -Wformat-security -Woverloaded-virtual -Wshadow -Wunused-parameter -fno-check-new -fno-common")
-  set(CMAKE_CXX_FLAGS_ERROR "-Werror=return-type")
+
+  # This flag is useful as not returning from a non-void function is an error
+  # with MSVC, but it is not supported on all GCC compiler versions
+  check_cxx_compiler_flag(-Werror=return-type HAVE_GCC_ERROR_RETURN_TYPE)
+  if(HAVE_GCC_ERROR_RETURN_TYPE)
+    set(CMAKE_CXX_FLAGS_ERROR "-Werror=return-type")
+  endif()

   # If we are compiling on Linux then set some extra linker flags too
   if(CMAKE_SYSTEM_NAME MATCHES Linux)


Use a different location for the initial cache file.

The file was written before the nightly clients start cleaning the
build tree.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -81,7 +81,7 @@
 # This can be used to provide variables which are not passed through the
 # superbuild process to the MITK configure step)
 if(MITK_INITIAL_CACHE)
-  set(mitk_cache_file "${CTEST_BINARY_DIRECTORY}/mitk_initial_cache.txt")
+  set(mitk_cache_file "${CTEST_SCRIPT_DIRECTORY}/mitk_initial_cache.txt")
   file(WRITE "${mitk_cache_file}" "${MITK_INITIAL_CACHE}")
   set(INITIAL_CMAKECACHE_OPTIONS "${INITIAL_CMAKECACHE_OPTIONS}
 MITK_INITIAL_CACHE_FILE::INTERNAL=${mitk_cache_file}


RPI - Use vanila GLES2 library for RPI4.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -588,11 +588,11 @@
                 if (RPI_ABI MATCHES ^RPI0|1)
                     set (ARM_CFLAGS "${ARM_CFLAGS} -mcpu=arm1176jzf-s -mfpu=vfp")
                 else ()
-                    if (RPI_ABI MATCHES ^RPI2)
+                    if (RPI_ABI STREQUAL RPI2)
                         set (ARM_CFLAGS "${ARM_CFLAGS} -mcpu=cortex-a7")
-                    elseif (RPI_ABI MATCHES ^RPI3)
+                    elseif (RPI_ABI STREQUAL RPI3)
                         set (ARM_CFLAGS "${ARM_CFLAGS} -mcpu=cortex-a53")
-                    elseif (RPI_ABI MATCHES ^RPI4)
+                    elseif (RPI_ABI STREQUAL RPI4)
                         set (ARM_CFLAGS "${ARM_CFLAGS} -mcpu=cortex-a72")
                     endif ()
                     if (NOT URHO3D_64BIT)   # Enable NEON by default but only need to do it explicitly on ARM (32-bit) arch
@@ -936,7 +936,11 @@
             elseif (WIN32)
                 list (APPEND LIBS opengl32)
             elseif (RPI)
-                list (APPEND LIBS brcmGLESv2)
+                if (RPI_ABI STREQUAL RPI4)
+                    list (APPEND LIBS GLESv2)
+                else ()
+                    list (APPEND LIBS brcmGLESv2)
+                endif ()
             elseif (ANDROID OR ARM)
                 list (APPEND LIBS GLESv1_CM GLESv2)
             else ()


CMake: Set variables for easy detection of clang and gcc compilers.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -114,6 +114,14 @@
     set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g4 -s DISABLE_EXCEPTION_CATCHING=1")
     set (CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} -g4 -s DISABLE_EXCEPTION_CATCHING=1")
 endif ()
+
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    set (CLANG ON)
+    set (GNU ON)
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+    set (GCC ON)
+    set (GNU ON)
+endif()

 # Macro for setting symbolic link on platform that supports it
 macro (create_symlink SOURCE DESTINATION)


cmake: remove needless continuous line

cmake: remove needless continuous line

--- config.h.cmake
+++ config.h.cmake
@@ -10,8 +10,7 @@

 #define GRN_DEFAULT_DB_KEY "${GRN_DEFAULT_DB_KEY}"
 #define GRN_DEFAULT_ENCODING "${GRN_DEFAULT_ENCODING}"
-#define GRN_DEFAULT_MATCH_ESCALATION_THRESHOLD \
-  ${GRN_DEFAULT_MATCH_ESCALATION_THRESHOLD}
+#define GRN_DEFAULT_MATCH_ESCALATION_THRESHOLD ${GRN_DEFAULT_MATCH_ESCALATION_THRESHOLD}

 #define GRN_PLUGINS_DIR "${GRN_PLUGINS_DIR}"
 #define GRN_PLUGIN_SUFFIX "${GRN_PLUGIN_SUFFIX}"


* Fixes libcurl, xmlrpc in the works

* Fixes libcurl, xmlrpc in the works

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1303 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/ModuleSetup.cmake
+++ CMakeModules/ModuleSetup.cmake
@@ -278,8 +278,7 @@
         COMPONENTS xmlrpc xmlrpcepi xmlrpc-epi
         PREFIXES ${ENV_NAALI_DEP_PATH}
         ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/src
-        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/Release
-        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/Debug)
+        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi)

     find_debug_libraries (XMLRPC "d")

@@ -288,7 +287,7 @@
 macro (configure_curl)
     sagase_configure_package (CURL
         NAMES Curl curl libcurl
-        COMPONENTS curl_imp
+        COMPONENTS curl libcurl libcurl_imp
         PREFIXES ${ENV_NAALI_DEP_PATH}
         ${ENV_NAALI_DEP_PATH}/libcurl/lib/DLL-Debug
         ${ENV_NAALI_DEP_PATH}/libcurl/lib/DLL-Release)


Search qtdir before other paths, since the qmake in the host path has broken query variables

--- ntoarm.cmake
+++ ntoarm.cmake
@@ -7,7 +7,7 @@

 # where is the target environment
-SET(CMAKE_FIND_ROOT_PATH $ENV{QNX_HOST} $ENV{QTDIR} $ENV{QNX_TARGET} $ENV{QNX_TARGET}/armle-v7)
+SET(CMAKE_FIND_ROOT_PATH $ENV{QTDIR} $ENV{QNX_HOST} $ENV{QNX_TARGET} $ENV{QNX_TARGET}/armle-v7)

 SET(CMAKE_STATIC_LIBRARY_PREFIX "")
 SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")


only_folders macro in main CMakeLists.txt

--- Coda/src/common_includes.cmake
+++ Coda/src/common_includes.cmake
@@ -6,31 +6,47 @@
 file(GLOB headers "*.h" "*/*.h" "*/*/*.h")
 file(GLOB sourceheaders "*.hpp" "*/*.hpp" "*/*/*.hpp")

-file(GLOB tools_subfolders
-    ${PROJECT_ROOT_DIR}/nlp-stack/tools/*/
-    ${PROJECT_ROOT_DIR}/nlp-stack/tools/*/*/
-    ${PROJECT_ROOT_DIR}/nlp-stack/tools/*/*/*/)
+macro(only_folders files result)
+    set(cleaned_list "")
+    foreach(file ${files})
+        if(IS_DIRECTORY ${file})
+            list(APPEND cleaned_list ${file})
+        endif()
+    endforeach()
+    SET(${result} ${cleaned_list})
+endmacro()

-file(GLOB crf_subfolders
+file(GLOB tools_subfiles
+    ${PROJECT_ROOT_DIR}/utils/Tools/*/
+    ${PROJECT_ROOT_DIR}/utils/Tools/*/*/
+    ${PROJECT_ROOT_DIR}/utils/Tools/*/*/*/)
+only_folders("${tools_subfiles}" tools_subfolders)
+
+file(GLOB crf_subfiles
     ${PROJECT_ROOT_DIR}/algorithms/CRF/*/
     ${PROJECT_ROOT_DIR}/algorithms/CRF/*/*/)
+only_folders("${crf_subfiles}" crf_subfolders)

-file(GLOB disambiguator_subfolders
+file(GLOB disambiguator_subfiles
     ${PROJECT_ROOT_DIR}/nlp-stack/Disambiguator/*/
     ${PROJECT_ROOT_DIR}/nlp-stack/Disambiguator/*/*/)
+only_folders("${disambiguator_subfiles}" disambiguator_subfolders)

-file(GLOB tokenizer_subfolders
+file(GLOB tokenizer_subfiles
     ${PROJECT_ROOT_DIR}/nlp-stack/Tokenizer/*/
     ${PROJECT_ROOT_DIR}/nlp-stack/Tokenizer/*/*/)
+only_folders("${tokenizer_subfiles}" tokenizer_subfolders)

-file(GLOB sentence_splitter_subfolders
+file(GLOB sentence_splitter_subfiles
     ${PROJECT_ROOT_DIR}/nlp-stack/SentenceSplitter/*/
     ${PROJECT_ROOT_DIR}/nlp-stack/SentenceSplitter/*/*/)
+only_folders("${sentence_splitter_subfiles}" sentence_splitter_subfolders)

-file(GLOB syntax_parser_subfolders
+file(GLOB syntax_parser_subfiles
     ${PROJECT_ROOT_DIR}/nlp-stack/SyntaxParser/*/
     ${PROJECT_ROOT_DIR}/nlp-stack/SyntaxParser/*/*/
     ${PROJECT_ROOT_DIR}/nlp-stack/SyntaxParser/*/*/*/)
+only_folders("${syntax_parser_subfiles}" syntax_parser_subfolders)

 ADD_DEFINITIONS("-Wall" "-fPIC")


Fix FindLibUBE.cmake

Fix FindLibUBE.cmake

...at least to match the current recommendations on the cmake wiki.

--- cmake/FindLibUBE.cmake
+++ cmake/FindLibUBE.cmake
@@ -8,20 +8,19 @@
 #

 #
-# Try to find Libube
+# Try to find LibUBE; see
+#  https://cmake.org/Wiki/CMake:How_To_Find_Libraries
 # Once done this will define
 #  LIBUBE_FOUND          - System has libube
-#  LIBUBE_INCLUDE_DIR    - The libube include directory
+#  LIBUBE_INCLUDE_DIRS   - The libube include directory
 #  LIBUBE_LIBRARIES      - The libraries needed to use Libube
 #  LIBUBE_DEFINITIONS    - Compiler switches required for using libube
-#  LIBUBE_VERSION_STRING - the version of libube found
 #

 find_package(PkgConfig)
 pkg_check_modules(PC_LIBUBE QUIET libube)

 set(LIBUBE_DEFINITIONS ${PC_LIBUBE_CFLAGS_OTHER})
-set(LIBUBE_VERSION_STRING ${PC_LIBUBE_VERSION})

 find_path(
   LIBUBE_INCLUDE_DIR lube.h
@@ -30,16 +29,17 @@
 )

 find_library(
-  LIBUBE_LIBRARIES ube
+  LIBUBE_LIBRARY ube
   HINTS ${PC_LIBUBE_LIBDIR} ${PC_LIBUBE_LIBRARY_DIRS}
 )
-list(APPEND LIBUBE_LIBRARIES ${CMAKE_DL_LIBS})
+
+set(LIBUBE_LIBRARIES ${LIBUBE_LIBRARY} ${CMAKE_DL_LIBS})
+set(LIBUBE_INCLUDE_DIRS ${LIBUBE_INCLUDE_DIR})

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(
-  Libube
-  REQUIRED_VARS LIBUBE_LIBRARIES LIBUBE_INCLUDE_DIR
-  VERSION_VAR LIBUBE_VERSION_STRING
+  LibUBE DEFAULT_MSG
+  LIBUBE_LIBRARY LIBUBE_INCLUDE_DIR
 )

-mark_as_advanced(LIBUBE_INCLUDE_DIR LIBUBE_LIBRARIES)
+mark_as_advanced(LIBUBE_INCLUDE_DIR LIBUBE_LIBRARY)


detect sphinx with suffix 2.7

detect sphinx with suffix 2.7

--- cmake/FindSphinx.cmake
+++ cmake/FindSphinx.cmake
@@ -1,4 +1,4 @@
-find_program(SPHINX_EXECUTABLE NAMES sphinx-build
+find_program(SPHINX_EXECUTABLE NAMES sphinx-build sphinx-build-2.7
     HINTS
     $ENV{SPHINX_DIR}
     PATH_SUFFIXES bin


renode: fix dependencies for renode platforms

Make renode platforms run target depend on zephyr ELF.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/emu/renode.cmake
+++ cmake/emu/renode.cmake
@@ -17,5 +17,6 @@
   ${RENODE_FLAGS}
   -e '$$bin=@${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}\; include @${RENODE_SCRIPT}\; s'
   WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
+  DEPENDS ${logical_target_for_zephyr_elf}
   USES_TERMINAL
   )


using -xssse3 as SSE2 flag on MacOSX for ICC, as SSE2 not supported by ICC on MacOSX

--- common/cmake/icc.cmake
+++ common/cmake/icc.cmake
@@ -40,7 +40,11 @@

 ELSE()

-  SET(FLAGS_SSE2   "-xsse2")
+  IF (APPLE)
+    SET(FLAGS_SSE2   "-xssse3") # in MacOSX ICC does not support SSE2
+  ELSE()
+    SET(FLAGS_SSE2   "-xsse2")
+  ENDIF()
   SET(FLAGS_SSE42  "-xsse4.2")
   SET(FLAGS_AVX    "-xAVX")
   SET(FLAGS_AVX2   "-xCORE-AVX2")


Version: Update development date

Version: Update development date

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 2)
-set(CastXML_VERSION_PATCH 20190418)
+set(CastXML_VERSION_PATCH 20190805)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


Format comments

Format comments

--- CMake/OTBModuleExternal.cmake
+++ CMake/OTBModuleExternal.cmake
@@ -33,17 +33,17 @@
 endif()
 if(NOT EXISTS ${OTB_CMAKE_DIR}/OTBModuleMacros.cmake)
   if(NOT OTB_BUILD_MODULE_AS_STANDALONE)
-    message(FATAL_ERROR "Modules can only be built against an OTB build tree; \
-they cannot be built against an OTB install tree. You can build your module \
-as a standalone CMake project instead, by activating the \
-BUILD_MODULE_AS_STANDALONE option. Beware that dependency between remote \
-modules will NOT be tracked.")
+    message(FATAL_ERROR "Modules can only be built against an OTB build tree; "
+            "they cannot be built against an OTB install tree. You can build "
+            "your module as a standalone CMake project instead, by activating "
+            "the BUILD_MODULE_AS_STANDALONE option. Beware that dependency "
+            "between remote modules will NOT be tracked.")
   endif()
 endif()

 if(OTB_BUILD_MODULE_AS_STANDALONE)
-  message(STATUS "You are building this module as a standalone CMake project. \
-    Beware that dependencies to other remote modules will not be tracked.")
+  message(STATUS "You are building this module as a standalone CMake project. "
+          "Beware that dependencies to other remote modules will not be tracked.")
   include(OTBStandaloneModuleMacros)
   otb_module_impl()
 else()


fixup warning for macro redefine

fixup warning for macro redefine

--- deps/lpeg.cmake
+++ deps/lpeg.cmake
@@ -12,6 +12,6 @@

 set(EXTRA_LIBS ${EXTRA_LIBS} LPEGLIB)

-add_definitions(-DLUA_LIB -DWITH_LPEG)
+set_target_properties(LPEGLIB PROPERTIES COMPILE_FLAGS "-DWITH_LPEG")
 remove_definitions(-DNDEBUG)
 remove_definitions(-DVERSION)


Ditto.

Ditto.

--- TIFF_repo.cmake
+++ TIFF_repo.cmake
@@ -1,6 +1,6 @@
 #message(STATUS "Forcing static build of libtiff.")
 #set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
-add_subdirectory("${DEPS_EXTERNAL_ROOT}/TIFF" "${DEPS_EXTERNAL_ROOT}/TIFF/build_external_dep")
+add_subdirectory("${DEPS_EXTERNAL_ROOT}/TIFF" "${DEPS_EXTERNAL_ROOT}/TIFF/build_external_dep" EXCLUDE_FROM_ALL)

 if(NOT TARGET TIFF::TIFF)
   add_library(TIFF INTERFACE)


fix CMake for multiplatform versioning

fix CMake for multiplatform versioning

--- src/version.cmake
+++ src/version.cmake
@@ -6,7 +6,12 @@
     configure_file("src/version.h.in" "${TO}")
 else()
 	message(STATUS "You are currently on commit ${COMMIT}")
-	execute_process(COMMAND "${GIT}" show-ref --tags -d --abbrev COMMAND awk "END{print $1}" RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
+	execute_process(COMMAND "${GIT}" show-ref --tags -d --abbrev RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMITOUT OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+	string(REPLACE " refs/" "\n" TAGGEDCOMMITOUT2 ${TAGGEDCOMMITOUT})
+	string(REPLACE "\n" ";" TAGGEDCOMMITLIST ${TAGGEDCOMMITOUT2})
+	list(GET TAGGEDCOMMITLIST -2 TAGGEDCOMMIT)
+
 	if(RET OR NOT TAGGEDCOMMIT)
 	    message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
 	    set(VERSIONTAG "${COMMIT}")


Fixing the name of the disabled test. (#13593)

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -229,7 +229,7 @@
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cholesky_op_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/diag_op_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/linalg_ops_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/ops/init_ops.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/init_ops_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/self_adjoint_eig_op_test.py"
       # misc
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/variable_scope_test.py"


Rename one C++11 test for compatibility

Rename one C++11 test for compatibility

--- TestCPP11.cmake
+++ TestCPP11.cmake
@@ -1,7 +1,7 @@
 # Copyright (c) 2013 ahmet.bilgili@epfl.ch
 #               2013 Stefan.Eilemann@epfl.ch

-set(TESTS_CPP11 sharedptr tuple auto nullptr array override)
+set(TESTS_CPP11 sharedptr tuple auto nullptr array final_override)

 file(WRITE ${CMAKE_BINARY_DIR}/cpp11_sharedptr.cpp
 "#include <memory>
@@ -45,7 +45,7 @@
    return 0;
 }")

-file(WRITE ${CMAKE_BINARY_DIR}/cpp11_override.cpp
+file(WRITE ${CMAKE_BINARY_DIR}/cpp11_final_override.cpp
 "class Foo
 {
 public:


Fixes issue 1421

Fixes issue 1421

Set both VC/bin and VC/bin/amd64 on the path in order to correctly
build with VS2013 64-bit in the test suite, due to cmake using the
cross-compiler.

SVN-Revision: 2655

--- suite/runsuite_common_pre.cmake
+++ suite/runsuite_common_pre.cmake
@@ -480,7 +480,12 @@
         if (NOT "$ENV{LIB}" MATCHES "[Aa][Mm][Dd]64")
           # Note that we can't set ENV{PATH} as the output var of the replace:
           # it has to be its own set().
-          string(REGEX REPLACE "VC([/\\\\])([Bb][Ii][Nn])" "VC\\1\\2\\1amd64"
+          #
+          # i#1421: VS2013 needs base VC/bin on the path (for cross-compiler
+          # used by cmake) so we duplicate and put amd64 first.  Older VS needs
+          # Common7/IDE instead which should already be elsewhere on path.
+          string(REGEX REPLACE "((^|;)[^;]*)VC([/\\\\])([Bb][Ii][Nn])"
+            "\\1VC\\3\\4\\3amd64;\\1VC\\3\\4"
             newpath "$ENV{PATH}")
           # VS2008's SDKs/Windows/v{6.0A,7.0} uses "x64" instead of "amd64"
           string(REGEX REPLACE "(v[^/\\\\]*)([/\\\\])([Bb][Ii][Nn])" "\\1\\2\\3\\2x64"
@@ -513,8 +518,9 @@
       else (is64)
         set(ENV{ASM} "ml")
         if ("$ENV{LIB}" MATCHES "[Aa][Mm][Dd]64")
-          string(REGEX REPLACE "(VC[/\\\\][Bb][Ii][Nn][/\\\\])[Aa][Mm][Dd]64" "\\1"
-            newpath "$ENV{PATH}")
+          # Remove the duplicate we added (see i#1421 comment above).
+          string(REGEX REPLACE "((^|;)[^;]*)VC[/\\\\][Bb][Ii][Nn][/\\\\][Aa][Mm][Dd]64"
+            "" newpath "$ENV{PATH}")
           if (arg_verbose)
             message("Env setup: setting PATH to ${newpath}")
           endif ()


Adapt to changed boost src urls

Adapt to changed boost src urls

--- deps/Boost/Boost.cmake
+++ deps/Boost/Boost.cmake
@@ -119,7 +119,7 @@

 ExternalProject_Add(
     dep_Boost
-    URL "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz"
+    URL "https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.gz"
     URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
     DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
     CONFIGURE_COMMAND "${_bootstrap_cmd}"


fix to make allow cmake -DGPERF=y

fix to make allow cmake -DGPERF=y

--- Utilities.cmake
+++ Utilities.cmake
@@ -66,7 +66,7 @@
     efu_common)

   if(GPERF)
-    target_link_libraries(${exec_name} ${GPERFTOOLS_PROFILER})
+    target_link_libraries(${exec_name} PUBLIC ${GPERFTOOLS_PROFILER})
   endif()

   set_target_properties(${exec_name} PROPERTIES


Add a message if IPO is supported

Add a message if IPO is supported

--- cmake/LTO.cmake
+++ cmake/LTO.cmake
@@ -14,11 +14,11 @@
 #
 # Then to enable LTO for your target use
 #
-# 		target_enable_lto(mytarget general)
+#       target_enable_lto(mytarget general)
 #
 # It is however recommended to use it only for non debug builds the following way :
 #
-# 		target_enable_lto(mytarget optimized)
+#       target_enable_lto(mytarget optimized)
 #
 # WARNING for cmake versions older than 3.9 :
 # This module will override CMAKE_AR CMAKE_RANLIB and CMAKE_NM by the gcc versions if found when building with gcc
@@ -215,6 +215,8 @@
           check_ipo_supported(RESULT __IPO_SUPPORTED OUTPUT output)
 		  if(NOT __IPO_SUPPORTED)
 			message(WARNING "IPO is not supported: ${output}")
+          else()
+            message(STATUS "IPO is supported !")
 		  endif()
       endif()
 	  if(__IPO_SUPPORTED)


MDEV-12125 Use FIND_PACKAGE(OpenSSL) to find openssl

--- cmake/ssl.cmake
+++ cmake/ssl.cmake
@@ -119,55 +119,19 @@
          WITH_SSL STREQUAL "yes" OR
          WITH_SSL_PATH
          )
-    # First search in WITH_SSL_PATH.
-    FIND_PATH(OPENSSL_ROOT_DIR
-      NAMES include/openssl/ssl.h
-      NO_CMAKE_PATH
-      NO_CMAKE_ENVIRONMENT_PATH
-      HINTS ${WITH_SSL_PATH}
-    )
-    # Then search in standard places (if not found above).
-    FIND_PATH(OPENSSL_ROOT_DIR
-      NAMES include/openssl/ssl.h
-    )
-
-    FIND_PATH(OPENSSL_INCLUDE_DIR
-      NAMES openssl/ssl.h
-      HINTS ${OPENSSL_ROOT_DIR}/include
-    )
-
-    IF (WIN32)
-      FIND_FILE(OPENSSL_APPLINK_C
-        NAMES openssl/applink.c
-        HINTS ${OPENSSL_ROOT_DIR}/include
-      )
-      MESSAGE_ONCE(OPENSSL_APPLINK_C "OPENSSL_APPLINK_C ${OPENSSL_APPLINK_C}")
+    IF(NOT OPENSSL_ROOT_DIR)
+      IF(WITH_SSL_PATH)
+        SET(OPENSSL_ROOT_DIR ${WITH_SSL_PATH})
+      ENDIF()
     ENDIF()
-
-    # On mac this list is <.dylib;.so;.a>
-    # We prefer static libraries, so we revert it here.
-    IF (WITH_SSL_PATH)
-      LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
-    ENDIF()
-    FIND_LIBRARY(OPENSSL_SSL_LIBRARY
-                 NAMES ssl ssleay32 ssleay32MD
-                 HINTS ${OPENSSL_ROOT_DIR}/lib)
-    FIND_LIBRARY(OPENSSL_CRYPTO_LIBRARY
-                 NAMES crypto libeay32
-                 HINTS ${OPENSSL_ROOT_DIR}/lib)
-    MARK_AS_ADVANCED(OPENSSL_CRYPTO_LIBRARY OPENSSL_SSL_LIBRARY OPENSSL_ROOT_DIR
-      OPENSSL_INCLUDE_DIR)
-    IF (WITH_SSL_PATH)
-      LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
-    ENDIF()
-
-    INCLUDE(CheckSymbolExists)
-    SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
-    CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
-                        HAVE_SHA512_DIGEST_LENGTH)
-    SET(CMAKE_REQUIRED_INCLUDES)
-    IF(OPENSSL_INCLUDE_DIR AND OPENSSL_SSL_LIBRARY   AND
-       OPENSSL_CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
+    FIND_PACKAGE(OpenSSL)
+    IF(OPENSSL_FOUND)
+      SET(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY})
+      INCLUDE(CheckSymbolExists)
+      SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+      CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
+                          HAVE_SHA512_DIGEST_LENGTH)
+      SET(CMAKE_REQUIRED_INCLUDES)
       SET(SSL_SOURCES "")
       SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
       IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
@@ -176,16 +140,6 @@
       IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
         SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBDL})
       ENDIF()
-
-      # Verify version number. Version information looks like:
-      #   #define OPENSSL_VERSION_NUMBER 0x1000103fL
-      # Encoded as MNNFFPPS: major minor fix patch status
-      FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
-           OPENSSL_VERSION_TEXT
-           REGEX "^# *define[\t ]+OPENSSL_VERSION_TEXT[\t ]+")
-      STRING(REGEX REPLACE
-             "^.*OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL ([-0-9a-z.]+).*$" "\\1"
-             OPENSSL_VERSION "${OPENSSL_VERSION_TEXT}")

       MESSAGE_ONCE(OPENSSL_INCLUDE_DIR "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
       MESSAGE_ONCE(OPENSSL_SSL_LIBRARY "OPENSSL_SSL_LIBRARY = ${OPENSSL_SSL_LIBRARY}")


reduce noise in release build by removing compiler timing information

--- toolchains/msvc.toolchain.cmake
+++ toolchains/msvc.toolchain.cmake
@@ -16,7 +16,7 @@
 #                                             (01.06.2016.) (Domagoj Saric)
 set( TNUN_compiler_debug_symbols          -Zi                                                 )
 set( TNUN_compiler_debug_flags            -DDEBUG -Od -MDd                                    )
-set( TNUN_compiler_release_flags          -DNDEBUG -Bt -Ox -Ob2 -Oy -GF -Gw -Gm- -GS- -Gy -MD )
+set( TNUN_compiler_release_flags          -DNDEBUG -Ox -Ob2 -Oy -GF -Gw -Gm- -GS- -Gy -MD     )
 set( TNUN_linker_debug_symbols            -DEBUG                                              )
 set( TNUN_compiler_LTO                    -GL                                                 )
 set( TNUN_linker_LTO                      -LTCG                                               )


ENH: new macro MITK_MULTIPLEX_TYPE

ENH: new macro MITK_MULTIPLEX_TYPE

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -61,3 +61,18 @@
   ENDIF(R)
 ENDMACRO(CHECK_AND_SET)

+# file should be named mitkMyAlgo-TYPE.cpp
+# in the file, every occurence of @TYPE@ is replaced by the
+# datatype. For each datatype, a new file mitkMyAlgo-datatype.cpp
+# is generated and added to FILES_CPP
+
+MACRO(MITK_MULTIPLEX_PICTYPE file)
+  SET(TYPES "double;float;int;unsigned int;short;unsigned short;char;unsigned char")
+  FOREACH(TYPE ${TYPES})
+    # create filename for destination
+    STRING(REPLACE " " "_" quoted_type "${TYPE}")
+    STRING(REPLACE TYPE ${quoted_type} quoted_file ${file})
+    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}/${quoted_file} @ONLY)
+    SET(CPP_FILES ${CPP_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${quoted_file})
+  ENDFOREACH(TYPE)
+ENDMACRO(MITK_MULTIPLEX_PICTYPE)


Detect old CCache to prevent spurious failures (#1105)

--- build/cmake/CCache.cmake
+++ build/cmake/CCache.cmake
@@ -1,22 +1,44 @@
 #[[
-    This module enables CCache support by inserting a ccache executable as
+    This module enables Ccache support by inserting a ccache executable as
     the compiler launcher for C and C++ if there is a ccache executable availbale
     on the system.

-    CCache support will be automatically enabled if it is found on the system.
-    CCache can be forced on or off by setting the MONGO_USE_CCACHE CMake option to
+    Ccache support will be automatically enabled if it is found on the system.
+    Ccache can be forced on or off by setting the MONGO_USE_CCACHE CMake option to
     ON or OFF.
 ]]

 # Find and enable ccache for compiling
 find_program (CCACHE_EXECUTABLE ccache)
-if (CCACHE_EXECUTABLE)
-    message (STATUS "Found ccache: ${CCACHE_EXECUTABLE}")
-    option (MONGO_USE_CCACHE "Use CCache when compiling" ON)
+
+if (CCACHE_EXECUTABLE AND NOT DEFINED MONGO_USE_CCACHE)
+    message (STATUS "Found Ccache: ${CCACHE_EXECUTABLE}")
+    execute_process(
+        COMMAND "${CCACHE_EXECUTABLE}" --version
+        OUTPUT_VARIABLE _out
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+        )
+    set (_enable TRUE)
+    # Avoid spurious "ccache.conf: No such file or directory" errors due to
+    # ccache being invoked in parallel, which was patched in ccache version 3.4.3.
+    if (_out MATCHES "^ccache version ([0-9]+\\.[0-9]+\\.[0-9]+)")
+        set (_version "${CMAKE_MATCH_1}")
+        message (STATUS "Detected Ccache version: ${_version}")
+        if (_version VERSION_LESS "3.4.3")
+            message (STATUS "Not using Ccache: Detected Ccache version ${_version} "
+                            "is less than 3.4.3, which may lead to spurious failures "
+                            "when run in parallel. See https://github.com/ccache/ccache/issues/260 "
+                            "for more information.")
+            set (_enable FALSE)
+        endif ()
+    else ()
+        message (STATUS "Note: Unable to automatically detect Ccache from from output: [[${_out}]]")
+    endif ()
+    option (MONGO_USE_CCACHE "Use Ccache when compiling" "${_enable}")
 endif ()

 if (MONGO_USE_CCACHE)
-    message (STATUS "Compiling with CCache enabled. Disable by setting MONGO_USE_CCACHE to OFF")
+    message (STATUS "Compiling with Ccache enabled. Disable by setting MONGO_USE_CCACHE to OFF")
     set (CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
     set (CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
 endif ()


changed compile parameters for qt target to work under Ubuntu 17.04

--- toolchains/qt.cmake
+++ toolchains/qt.cmake
@@ -6,11 +6,11 @@
 RESULT_VARIABLE _INCLUDED_MULTIARCH_TOOLCHAIN_FILE)
 endif()

-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fPIC")
-
 # global compile options
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++1y -fPIC")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
@@ -36,12 +36,6 @@

 # compile definitions (adds -DPLATFORM_QT)
 set(CORE_COMPILE_DEFS PLATFORM_QT)
-
-# if (USE_EXTERNAL_LIBS)
-#   include(${EXTERNAL_LIBS_DIR}/core-dependencies.cmake)
-# else()
-#   add_subdirectory(${PROJECT_SOURCE_DIR}/external)
-# endif()

 # load core library
 add_subdirectory(${PROJECT_SOURCE_DIR}/core)


[fix] siwtch two of the flags; behaviour unrelated to linux/freebsd

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -158,7 +158,7 @@
         else (APPLE)
             set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")

-            # make sure -Wl,-Bdynamic isn't added automatically
+            # make sure -rdynamic isn't added automatically
             set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
             # make sure -fPIC isn't added automatically
             set(CMAKE_SHARED_LIBRARY_CXX_FLAGS)
@@ -168,13 +168,10 @@
             # .so when building DEVELOP. In the latter case it also encloses the
             # static libs with -Bdynamic which turns static off for system libs.
             # Here we remove these (so statics works), but only for NON-DEVELOP
-            # on non-linux.
-
-            # this one must not be unset on FreeBSD if not building APPs individually
-            if ((CMAKE_SYSTEM_NAME MATCHES "Linux") OR (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP"))
-                # make sure -rdynamic isn't added automatically
+            if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
+                # make sure -Wl,-Bdynamic isn't added automatically
                 set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
-            endif ((CMAKE_SYSTEM_NAME MATCHES "Linux") OR (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP"))
+            endif (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
         endif (APPLE)
     endif (SEQAN_STATIC_APPS AND (NOT CMAKE_SYSTEM_NAME MATCHES "Windows"))


develop -> dev in the nightly script

develop -> dev in the nightly script

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -287,4 +287,4 @@
   check_tracking_branch("${BRANCH}" "${CONFIGURE_OPTIONS}" CHECK_ERR)
 endforeach()

-try_merge(master develop "${CONFIGURE_OPTIONS}" ${ALLOWED_WARNINGS})
+try_merge(master dev "${CONFIGURE_OPTIONS}" ${ALLOWED_WARNINGS})


Extend the Boost_ADDITIONAL_VERSIONS hack to help CMake on Windows.


From Sherman Wilcox, added serach for freetype234

git-svn-id: 23b6355f2bb369032457de4eb5f713ee134f73a8@7048 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -52,7 +52,7 @@

 MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
         FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D")
-        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype219;freetype234MT" ${OSG_3RDPARTY_BIN} "_D")
+        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype219;freetype234;freetype234MT" ${OSG_3RDPARTY_BIN} "_D")
         IF(FREETYPE_FOUND)
             #forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
             SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "")


update vendor/cget

update vendor/cget

--- tests/vendor/cget/pkg/catchorg__Catch2/install/lib/cmake/Catch2/Catch2ConfigVersion.cmake
+++ tests/vendor/cget/pkg/catchorg__Catch2/install/lib/cmake/Catch2/Catch2ConfigVersion.cmake
@@ -40,7 +40,7 @@

 # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
 if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "" STREQUAL "")
-   return()
+  return()
 endif()

 # check that the installed version has the same 32/64bit-ness as the one which is currently searching:


remove cmd command.

remove cmd command.

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -82,7 +82,7 @@
         message(STATUS "Downloading intel mkl...")
         if(WIN32)
             execute_process(
-                COMMAND cmd ${INTEL_MKLDNN_ROOT}/scripts/prepare_mkl.bat
+                COMMAND ${INTEL_MKLDNN_ROOT}/scripts/prepare_mkl.bat
                 )
         else()
             execute_process(


making parasails a required dependency for now

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -2,7 +2,7 @@
 SET(LIB_OPTIONAL_DEP_PACKAGES Epetra EpetraExt Ifpack Thyra Stratimikos)
 SET(TEST_REQUIRED_DEP_PACKAGES)
 SET(TEST_OPTIONAL_DEP_PACKAGES)
-SET(LIB_REQUIRED_DEP_TPLS SPRNG Boost)
-SET(LIB_OPTIONAL_DEP_TPLS ParaSails)
+SET(LIB_REQUIRED_DEP_TPLS SPRNG Boost ParaSails)
+SET(LIB_OPTIONAL_DEP_TPLS)
 SET(TEST_REQUIRED_DEP_TPLS)
 SET(TEST_OPTIONAL_DEP_TPLS)


debug cmake variable

debug cmake variable

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -83,11 +83,17 @@
     # Define OpenCV_LIBRARY_DIR if missing
     if(NOT DEFINED OpenCV_LIBRARY_DIR)

+    message(STATUS "a")
         if(DEFINED OpenCV_LIBDIR)
+
+    message(STATUS "b")
             set(OpenCV_LIBRARY_DIR ${OpenCV_LIBDIR})
         else(DEFINED OpenCV_LIBDIR)
+
+    message(STATUS "c")
             # Append lib to prefix
             file(TO_CMAKE_PATH ${OpenCV_PREFIX}/lib OpenCV_LIBRARY_DIR)
+    message(STATUS "OpenCV_LIBRARY_DIR=${OpenCV_LIBRARY_DIR}")
         endif(DEFINED OpenCV_LIBDIR)

     endif(NOT DEFINED OpenCV_LIBRARY_DIR)


check ldflags content

check ldflags content

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -39,9 +39,15 @@
         #message(STATUS "OpenCV_LDFLAGS_OTHER=${OpenCV_LDFLAGS_OTHER}") # <XPREFIX>_LDFLAGS_OTHER...all other linker flags
         #message(STATUS "OpenCV_LIBDIR=${OpenCV_LIBDIR}")               # <XPREFIX>_LIBDIR...lib-dir of the module

-        message(STATUS "Prepending linker flags with ${OpenCV_LDFLAGS}")
-        set(CMAKE_EXE_LINKER_FLAGS "${OpenCV_LDFLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
-        set(CMAKE_MODULE_LINKER_FLAGS "${OpenCV_LDFLAGS} ${CMAKE_MODULE_LINKER_FLAGS}")
+        #message(STATUS "Prepending linker flags with ${OpenCV_LDFLAGS}")
+        #set(CMAKE_EXE_LINKER_FLAGS "${OpenCV_LDFLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
+        #set(CMAKE_MODULE_LINKER_FLAGS "${OpenCV_LDFLAGS} ${CMAKE_MODULE_LINKER_FLAGS}")
+        foreach(LDFLAGS_ITEM ${OpenCV_LDFLAGS})
+            if(LDFLAGS_ITEM MATCHES ".so$")
+
+                message(STATUS "is .so ${LDFLAGS_ITEM}")
+            endif(LDFLAGS_ITEM MATCHES ".so$")
+        endforeach()

         list(APPEND OpenCV_LIBS ${OpenCV_LIBRARIES})


fix detection of ICC version

fix detection of ICC version

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -316,7 +316,7 @@
       string( REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1.\\2.\\3"
               eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
     elseif(eigen_cxx_compiler_name MATCHES "icpc|clang")
-      string( REGEX REPLACE ".* ([0-9]*)\\.([0-9]*) .*" "\\1.\\2"
+      string( REGEX REPLACE ".* ([0-9]+\\.[0-9]+\\.[0-9]+|[0-9]+\\.[0-9]+).*" "\\1"
               eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
     else()
       set(eigen_cxx_compiler_version "_")


feat: if available use compile features to request C++ >= 11 (#9104)

As long as CMake >= 3.8, this will automatically require C++ >= 11 to
compile the library and their dependencies.  This is only relevant with
Apple Clang, the last compiler we support that defaults to C++98 (and
apparently will always default to C++98).  All other compilers we
support default to C++14 or higher.

While this only works for CMake >= 3.8, I expect this is almost always
the case on macOS.  In other words, this can fail to automate things in
theory, but should work well in practice.

--- cmake/EnableWerror.cmake
+++ cmake/EnableWerror.cmake
@@ -40,6 +40,13 @@

 function (google_cloud_cpp_add_common_options target)
     google_cloud_cpp_silence_warnings_in_deps(${target})
+    # Require C++ >= 11.  Unfortunately CMake can only express such requirements
+    # starting with CMake == 3.8.0. Note that this is a *minimum* requirement.
+    # It is still possible to compile the library (and its dependencies) with
+    # C++14 or higher.
+    if (NOT ("${CMAKE_VERSION}" VERSION_LESS 3.8))
+        target_compile_features(${target} PUBLIC cxx_std_11)
+    endif ()
     if (MSVC)
         target_compile_options(${target} PRIVATE "/W3")
         if (GOOGLE_CLOUD_CPP_ENABLE_WERROR)


Fix typo

Fix typo

--- cmake/FindLibEvent.cmake
+++ cmake/FindLibEvent.cmake
@@ -4,7 +4,7 @@
 FIND_PATH(LibEvent_INCLUDE_DIR NAMES event2/event.h)
 FIND_LIBRARY(LibEvent_LIBRARY NAMES event)
 FIND_LIBRARY(LibEvent_CORE_LIBRARY NAMES event_core)
-FIND_LIBRARY(LibEvent_EXTRA_LIBRARY NAMES event_extras)
+FIND_LIBRARY(LibEvent_EXTRA_LIBRARY NAMES event_extra)

 if (NOT WIN32)
   # Not present on Windows libevent builds


opensles detection: fail required but not found

--- cmake/FindOpenSLES.cmake
+++ cmake/FindOpenSLES.cmake
@@ -28,7 +28,10 @@
 if(OPENSLES_FOUND)
 	set(OPENSLES_LIBRARIES ${OPENSLES_LIBRARY})
 else(OPENSLES_FOUND)
-	set(OPENSLES_LIBRARIES)
+	message("${OPENSLES_FIND_REQUIRED}")
+	if (OpenSLES_FIND_REQUIRED)
+		message(FATAL_ERROR "Could NOT find OPENSLES")
+	endif()
 endif(OPENSLES_FOUND)

 mark_as_advanced(OPENSLES_INCLUDE_DIR OPENSLES_LIBRARY)


[cmake] fix bug in exclude files

[cmake] fix bug in exclude files

--- cmake/SiconosTools.cmake
+++ cmake/SiconosTools.cmake
@@ -3,7 +3,7 @@
 #

 # Collect source files.
-#
+#
 # Usage:
 #
 # get_sources(<COMPONENT> DIRS <dirs list> EXCLUDE <files list>)
@@ -14,9 +14,9 @@
 #
 # Remarks:
 # - dir1, dir2 ... are relative to CMAKE_CURRENT_SOURCE_DIR
-#
+#
 function(get_sources COMPONENT)
-
+
   set(multiValueArgs DIRS EXCLUDE)
   cmake_parse_arguments(source "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

@@ -53,19 +53,21 @@

   # Check if some sources are to be excluded from build
   foreach(_FILE IN LISTS source_EXCLUDE)
-    if(${CMAKE_VERSION} VERSION_GREATER "3.12.0")
-      file(GLOB _GFILE CONFIGURE_DEPENDS ${_FILE})
-    else()
-      file(GLOB _GFILE ${_FILE})
-    endif()
-
-    if(_GFILE)
-      list(REMOVE_ITEM SOURCES_FILES ${_GFILE})
-    else()
-      message(WARNING "file to be excluded NOT FOUND : ${_FILE}")
-    endif()
+    # if(${CMAKE_VERSION} VERSION_GREATER "3.12.0")
+    #   file(GLOB _GFILE CONFIGURE_DEPENDS ${_FILE})
+    # else()
+    #   file(GLOB _GFILE ${_FILE})
+    # endif()
+    # MESSAGE("_GFILE::" ${_GFILE})
+    # MESSAGE("SOURCES_FILES::" ${SOURCES_FILES})
+    # if(_GFILE)
+    #   list(REMOVE_ITEM SOURCES_FILES ${_GFILE})
+    # else()
+    #   message(WARNING "file to be excluded NOT FOUND : ${_FILE}")
+    #endif()
+    list(REMOVE_ITEM SOURCES_FILES ${_FILE})
   endforeach()
-
+
   set(${COMPONENT}_SRCS ${SOURCES_FILES} PARENT_SCOPE)
 endfunction()

@@ -101,7 +103,7 @@
   IF (NOT DEFINED ${VAR})
     MESSAGE( FATAL_ERROR "ASSERTION ERROR : ${VAR} UNSET" )
   ENDIF()
-ENDMACRO()
+ENDMACRO()

 # -------------------------------
@@ -115,7 +117,7 @@
 # while
 # cmake -DWITH_kernel_DOCUMENTATION=ON
 # will set WITH_DOCUMENTATION=ON and WITH_other_components=OFF
-#
+#
 # This will work (I hope ...) in standard cases but will probably
 # failed after several cmake . with schizophrenic options
 # like
@@ -156,12 +158,12 @@

 # Try to provide some hints for a find_package call.
-#
+#
 # Usage:
 #
 # set_find_package_hints(NAME <name> MODULE <mod>)
 #
-#
+#
 # Result : set (parent scope) _<NAME>_SEARCH_OPTS and _<NAME>_INC_SEARCH_OPTS
 # that can be used in find_path (INC_SEARCH) and find_library calls.
 #
@@ -169,7 +171,7 @@
 # or using pkg-config information, if available.
 #
 # See examples of use in FindCPPUNIT.cmake or FindSuperLU.cmake.
-#
+#
 function(set_find_package_hints)
   set(oneValueArgs NAME MODULE)

@@ -192,7 +194,7 @@
       HINTS ${PKGC_${pkg_NAME}_LIBRARY_DIRS} ENV LD_LIBRARY_PATH ENV DYLD_LIBRARY_PATH
       PARENT_SCOPE)
   endif()
-
+
 endfunction()

 # ------------------------------------
@@ -215,19 +217,19 @@
 #
 # This is useful for packages with
 # an 'old-way' find_package cmake routine.
-#
+#
 # Usage:
-#
+#
 # find_package(<name>)
 # create_target(NAME <name> LIBRARIES <list of libs>  INCLUDE_DIR <list of includes>)
 # target_link_libraries(some_other_target PRIVATE name)
-#
+#
 # Result : create a target <name>.
 # some_other_target will be linked with <list of libs> and use <list of includes>
 # to search for headers.
 #
 # See example in mechanics/CMakeLists.txt, for Bullet setup.
-#
+#
 function(create_target)
   set(oneValueArgs NAME)
   set(multiValueArgs LIBRARIES INCLUDE_DIRS)
@@ -247,7 +249,7 @@
 # Apply sanitizer options onto a given target
 #
 # Depends on user-defined variable USE_SANITIZER.
-#
+#
 # Might be:
 # - asan : fast memory error detector
 # - leaks : detects memory leaks
@@ -258,7 +260,7 @@
 #
 # Warning : do not combine options and notice that some of them may fail
 # on MacOs ...
-#
+#
 # Ref :
 # - http://www.stablecoder.ca/2018/10/30/full-cmake-helper-suite.html
 # - https://clang.llvm.org/docs/AddressSanitizer.html
@@ -297,9 +299,9 @@
 # Apply compiler options onto a given target
 #
 # Depends on the diagnostics level required.
-#
+#
 # Usage :
-#
+#
 #     apply_compiler_options(numerics DIAGNOSTICS_LEVEL ${WARNINGS_LEVEL})
 #
 # * This function must be called inside create_siconos_component function.
@@ -307,15 +309,15 @@
 # (-DUSER_OPTIONS_FILE=configfile.cmake)
 # * to be more specific on a given target, use target_compile_... functions
 #   Check in externals/CMakeLists.txt for an example.
-#
+#
 function(apply_compiler_options COMPONENT)
   set(oneValueArgs DIAGNOSTICS_LEVEL)
   cmake_parse_arguments(COMP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

   unset(COMP_OPTIONS)   # C and C++ options. Append options there by default.
-
+
   # -- Compiler options common to all setups --
-
+
   # Warn about types with virtual methods where code quality would be improved if the type were declared with the C++11 final specifier, or, if possible, declared in an anonymous namespace.
   #list(APPEND COMP_OPTIONS "-Wsuggest-final-types"). GNU/CXX ONLY. ## NOTE FP : too many warnings, activate this later
   # list(APPEND COMP_OPTIONS
@@ -331,14 +333,14 @@
   # Intel specific
   list(APPEND COMP_OPTIONS $<$<CXX_COMPILER_ID:Intel>:"-diag-disable 654">)
   list(APPEND COMP_OPTIONS $<$<CXX_COMPILER_ID:Intel>:"-D__aligned__=ignored">)
-  # LLVM Static analyser ? Where do we ask to set this LLVM_ANALYSE ?
+  # LLVM Static analyser ? Where do we ask to set this LLVM_ANALYSE ?
   if(LLVM_ANALYSE)
     target_compile_options(${COMPONENT} PRIVATE "-emit-llvm")
   endif()
   # Clang++ specific
   list(APPEND COMP_OPTIONS
     $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-string-plus-int>)
-
+
   # -- Dev mode options --
   if(COMP_DIAGNOSTICS_LEVEL GREATER 0)
     # -- options working with both C and C++ --
@@ -401,7 +403,7 @@
     list(APPEND COMP_OPTIONS -Werror=overloaded-virtual)
     # Warn when a class has virtual functions and an accessible non-virtual destructor itself
     list(APPEND COMP_OPTIONS -Werror=non-virtual-dtor)
-
+
     # Clang specific, C/C++
     # Error when option does not exist ...
     list(APPEND COMP_OPTIONS
@@ -409,12 +411,12 @@
     list(APPEND COMP_OPTIONS
       $<$<OR:$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Werror=unreachable-code>)
   endif()
-
+
   # -- Paranoid mode  options --
   if(COMP_DIAGNOSTICS_LEVEL GREATER 1)
     # Give an error whenever the base standard (see -Wpedantic) requires a diagnostic,
     list(APPEND COMP_OPTIONS -pedantic-errors)
-
+
     # implicit conversions that may alter a value
     list(APPEND COMP_OPTIONS -Werror=conversion)

@@ -431,11 +433,11 @@
      set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${_LIBCXX_FLAGS_TO_ADD}")
      set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${_LIBCXX_FLAGS_TO_ADD}")
    endif()
-
+
   # --- Apply options to the current target ---
   if(COMP_OPTIONS)
     target_compile_options(${COMPONENT}
       PRIVATE
-      $<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:C>>:${COMP_OPTIONS}>)
-  endif()
-endfunction()
+      $<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:C>>:${COMP_OPTIONS}>)
+  endif()
+endfunction()


small fix

small fix

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -166,7 +166,7 @@

 # Build folder (defaults inside the script directory)
 if(NOT DEFINED CTEST_BINARY_DIRECTORY)
-set(CTEST_BINARY_DIRECTORY ${CTEST_SCRIPT_DIRECTORY}/build_${CTEST_TEST_MODEL}${CTEST_CONFIGURATION_TYPE}_${CXXNAME})
+set(CTEST_BINARY_DIRECTORY ${CTEST_SCRIPT_DIRECTORY}/build_${CTEST_TEST_MODEL}${CTEST_CONFIGURATION_TYPE}_${CNAME})
 endif()

 # Empty previous directory before building (otherwise builds are incremental)
@@ -296,7 +296,7 @@
 find_program(UNAME NAMES uname)
 execute_process(COMMAND "${UNAME}" "-s" OUTPUT_VARIABLE osname OUTPUT_STRIP_TRAILING_WHITESPACE)
 execute_process(COMMAND "${UNAME}" "-m" OUTPUT_VARIABLE "cpu" OUTPUT_STRIP_TRAILING_WHITESPACE)
-set(CTEST_BUILD_NAME "${osname}-${cpu} ${CTEST_CMAKE_GENERATOR}-${CTEST_CONFIGURATION_TYPE}-${CXXNAME}")
+set(CTEST_BUILD_NAME "${osname}-${cpu} ${CTEST_CMAKE_GENERATOR}-${CTEST_CONFIGURATION_TYPE}-${CNAME}")
 endif()

 if(NOT CTEST_BUILD_JOBS)


add xpu_base_url parameter (#37712)

add xpu_base_url parameter (#37712)

* 添加xpu指定url参数

--- cmake/external/xpu.cmake
+++ cmake/external/xpu.cmake
@@ -34,8 +34,13 @@
   SET(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
 ENDIF()

-SET(XPU_BASE_URL_WITHOUT_DATE "https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev")
-SET(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20211129")
+if(NOT DEFINED XPU_BASE_URL)
+  SET(XPU_BASE_URL_WITHOUT_DATE "https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev")
+  SET(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20211129")
+else()
+  SET(XPU_BASE_URL "${XPU_BASE_URL}")
+endif()
+
 SET(XPU_XRE_URL  "${XPU_BASE_URL}/${XPU_XRE_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)
 SET(XPU_XDNN_URL "${XPU_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)
 SET(XPU_XCCL_URL "${XPU_BASE_URL_WITHOUT_DATE}/20210623/${XPU_XCCL_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)


git-download: Refactored, and added option whether download should be skipped all together (speeds up generation when dl is not required)

--- cmake/git-download.cmake
+++ cmake/git-download.cmake
@@ -1,9 +1,13 @@
 find_package(Git REQUIRED)

+option(DOWNLOAD_ENABLED "If disabled, all repos will appear as up-to-date." ON)
+
 function(execute_git)
     set(oneValueArgs
         WORKING_DIRECTORY
         OUTPUT_VARIABLE
+        CONTINUE_ON_FAIL
+        RETURN_CODE
     )
     set(multiValueArgs
         COMMAND
@@ -14,7 +18,7 @@
         set(args_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
     endif()

-    message("Running git-command: git ${args_COMMAND}")
+    #message("Running git-command: git ${args_COMMAND}")

     execute_process(
         COMMAND ${GIT_EXECUTABLE} ${args_COMMAND}
@@ -24,11 +28,12 @@
         WORKING_DIRECTORY ${args_WORKING_DIRECTORY}
     )

-    if(NOT "${RETURN_CODE}" STREQUAL "0")
+    if(NOT args_CONTINUE_ON_FAIL AND NOT "${RETURN_CODE}" STREQUAL "0")
         message(FATAL_ERROR "Failed to run 'git ${args_COMMAND}' \n\tError code ${RETURN_CODE}: ${GIT_ERROR}")
     endif()

     set(${args_OUTPUT_VARIABLE} ${GIT_RESULT} PARENT_SCOPE)
+    set(${args_RETURN_CODE} ${RETURN_CODE} PARENT_SCOPE)
 endfunction()

 function(get_repo_head)
@@ -50,6 +55,26 @@
     set(${args_OUTPUT_VARIABLE} ${REMOTE_HEAD} PARENT_SCOPE)
 endfunction()

+function(check_if_git_repo)
+    set(oneValueArgs
+        DIR
+        OUTPUT_VARIABLE
+    )
+    cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+    execute_git(
+        COMMAND rev-parse --is-inside-git-dir
+        CONTINUE_ON_FAIL TRUE
+        RETURN_CODE RESULT
+    )
+
+    if("${RESULT}" STREQUAL "0")
+        set(${args_OUTPUT_VARIABLE} TRUE PARENT_SCOPE)
+    else()
+        set(${args_OUTPUT_VARIABLE} FALSE PARENT_SCOPE)
+    endif()
+endfunction()
+
 function(check_if_up_to_date)
     set(oneValueArgs
         URL
@@ -60,7 +85,21 @@
     cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

     set(${args_OUTPUT_VARIABLE} "FALSE" PARENT_SCOPE)
-
+
+    # Check if this is even inside a git-repo, skip if not
+    check_if_git_repo(
+        DIR ${CMAKE_CURRENT_SOURCE_DIR}
+        OUTPUT_VARIABLE IS_REPO
+    )
+    if(NOT DOWNLOAD_ENABLED)
+        set(${args_OUTPUT_VARIABLE} "TRUE" PARENT_SCOPE)
+        return()
+    elseif(NOT IS_REPO)
+        set(${args_OUTPUT_VARIABLE} "TRUE" PARENT_SCOPE)
+        message(WARNING "This is not a git-repo. Skipping download...")
+        return()
+    endif()
+
     get_repo_head(
         ${ARGV}
         OUTPUT_VARIABLE REMOTE_HEAD
@@ -70,12 +109,9 @@
     set(META_PATH "${args_CLONE_DIR}_meta")
     if(EXISTS "${META_PATH}")
         file(READ "${META_PATH}" CURRENT_HEAD)
-    else()
-        return()
-    endif()
-
-    if(${CURRENT_HEAD} STREQUAL ${REMOTE_HEAD})
-        set(${args_OUTPUT_VARIABLE} "TRUE" PARENT_SCOPE)
+        if(${CURRENT_HEAD} STREQUAL ${REMOTE_HEAD})
+            set(${args_OUTPUT_VARIABLE} "TRUE" PARENT_SCOPE)
+        endif()
     endif()
 endfunction()

@@ -106,6 +142,7 @@

 endfunction()

+
 function(download_repo)
     set(options "")
     set(oneValueArgs
@@ -118,14 +155,24 @@
     )
     cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

-    # Merge message used by git subtree add/pull
-    set(MERGE_MESSAGE "Merged branch ${args_TAG} in repository ${args_URL}.")
-
     # If no tag is specified, default to master
     if(NOT args_TAG)
         set(args_TAG master)
     endif()

+    # Compare HEAD on remote URL:TAG with local (if any), skip download if up-to-date
+    check_if_up_to_date(
+        ${ARGV}
+        OUTPUT_VARIABLE IS_UP_TO_DATE
+    )
+    if(IS_UP_TO_DATE)
+        message("Already up-to-date with branch '${args_TAG}' on ${args_URL}")
+        return()
+    endif()
+
+    # Merge message used by git subtree add/pull
+    set(MERGE_MESSAGE "Merged branch ${args_TAG} in repository ${args_URL}.")
+
     execute_git(
         COMMAND rev-parse --show-toplevel
         OUTPUT_VARIABLE GIT_ROOT
@@ -137,16 +184,6 @@
     string(REPLACE ${GIT_ROOT}/ "" RELATIVE_CLONE_DIR ${args_CLONE_DIR})

     message("Cloning branch ${args_TAG} from ${args_URL} into relative directory ${RELATIVE_CLONE_DIR}...")
-
-    # Compare HEAD on remote URL:TAG with local (if any), skip download if up-to-date
-    check_if_up_to_date(
-        ${ARGV}
-        OUTPUT_VARIABLE IS_UP_TO_DATE
-    )
-    if(IS_UP_TO_DATE)
-        message("Already up-to-date with branch '${args_TAG}' on ${args_URL}\n\tSkipping download.")
-        return()
-    endif()

     # Submodules can't be pulled with git subtree, so in this case clone normally to temp-dir,
     # download specified submodules and set git-url to this instead of remote.


Version update to 0.9.5 and NoPCH default on OSX, closes inviwo/inviwo-dev#1037

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -27,10 +27,10 @@
  #
  #################################################################################

-set(IVW_VERSION 0.9.4dev)
+set(IVW_VERSION 0.9.5)
 set(IVW_MAJOR_VERSION 0)
 set(IVW_MINOR_VERSION 9)
-set(IVW_PATCH_VERSION 4dev)
+set(IVW_PATCH_VERSION 5)

 set_property(GLOBAL PROPERTY USE_FOLDERS On)
 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER cmake)
@@ -283,7 +283,11 @@
     add_definitions(-D_DEBUG_POSTFIX)
 endif(DEBUG_POSTFIX)

-option(PRECOMPILED_HEADERS "Create and use precompilied headers" ON)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+    option(PRECOMPILED_HEADERS "Create and use precompilied headers" OFF)
+else()
+    option(PRECOMPILED_HEADERS "Create and use precompilied headers" ON)
+endif()

 #--------------------------------------------------------------------
 # Specify build-based defintions


fix: Setting of PythonInterp_DIR in FindPythonInterp module [BASIS]

--- CMake/Basis/FindPythonInterp.cmake
+++ CMake/Basis/FindPythonInterp.cmake
@@ -200,6 +200,7 @@
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)

 if (PYTHON_EXECUTABLE)
-  string (REGEX REPLACE "/bin/python.*" "" PythonInterp_DIR "${PYTHON_EXECUTABLE}")
+  string (REGEX REPLACE "/+[Pp]ython[^/]*(\\.exe)?$" "" PythonInterp_DIR "${PYTHON_EXECUTABLE}")
+  string (REGEX REPLACE "/+[Bb]in$"                  "" PythonInterp_DIR "${PythonInterp_DIR}")
 endif ()
 mark_as_advanced(PYTHON_EXECUTABLE)


GLES2 render system: Fixed win32 GLES2+EGL lib find.

--- CMake/Packages/FindOpenGLES2.cmake
+++ CMake/Packages/FindOpenGLES2.cmake
@@ -31,7 +31,8 @@
       SET (OPENGLES2_gl_LIBRARY import32 CACHE STRING "OpenGL ES 2.x library for win32")
     ELSE(BORLAND)
 	  #MS compiler - todo - fix the following line:
-      SET (OPENGLES_gl_LIBRARY ${OGRE_SOURCE_DIR}/Dependencies/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32")
+      SET (OPENGLES2_gl_LIBRARY ${OGRE_DEPENDENCIES_DIR}/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32")
+      SET (EGL_egl_LIBRARY      ${OGRE_DEPENDENCIES_DIR}/lib/release/libEGL.lib CACHE STRING "EGL library for win32")
     ENDIF(BORLAND)

   ENDIF (CYGWIN)


COMP: Bump ITK to address CMP0074 Zlib warnings

--- Superbuild/External-ITK.cmake
+++ Superbuild/External-ITK.cmake
@@ -2,8 +2,8 @@
 # Get and build itk

 if(NOT ITK_TAG)
-  # 2018-09-24
-  set(ITK_TAG "48ff8821533ef4a4fac7b81e2800e796132a1216")
+  # 2018-09-26
+  set(ITK_TAG "b784f6355a88650f13345025ece292dd60a0d98c")
 endif()

 set(_vtk_args)


ENH: Bump the Superbuild ITK version.

ENH: Bump the Superbuild ITK version.

Upstream ITK includes a fix from Arnaud for the ObserveEvent
test.  These was also a change in the Otsu threshold behavior, which
we need to keep the baselines consistent.

Change-Id: I8c958b1ecb45d316f6b165a00096ae1636321d79

--- Superbuild/External-ITK.cmake
+++ Superbuild/External-ITK.cmake
@@ -2,7 +2,8 @@
 # Get and build itk

 if( NOT ITK_TAG )
-  set( ITK_TAG "v4.3.1" )
+  # ITK master 2013-07-09
+  set( ITK_TAG "d73c465ed4b65d1c81e00b4e68ef4c859a1f7e10" )
 endif()

 ExternalProject_Add( ITK


cmake: Make Release default build type

cmake: Make Release default build type

The polybar executable with RelWithDebInfo gets over 100MB. And there
really isn't any reason to have users install such huge executables.

Release build type gives you approx. 3.6M executables

Fixes #1497

--- cmake/01-core.cmake
+++ cmake/01-core.cmake
@@ -13,8 +13,8 @@

 # Set default build type if not specified
 if(NOT CMAKE_BUILD_TYPE)
-  message_colored(STATUS "No build type specified; using RelWithDebInfo" 33)
-  set(CMAKE_BUILD_TYPE "RelWithDebInfo")
+  set(CMAKE_BUILD_TYPE "Release")
+  message_colored(STATUS "No build type specified; using ${CMAKE_BUILD_TYPE}" 33)
 endif()
 string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)


Fix location of build_config.hpp

Fix location of build_config.hpp

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -71,7 +71,7 @@
         message(WARNING "Found all.hpp for CAF core, but not build_config.hpp")
         set(CAF_${comp}_FOUND false)
       else()
-        list(APPEND CAF_INCLUDE_DIRS "${caf_build_header_path}")
+        list(APPEND CAF_INCLUDE_DIR_${UPPERCOMP} "${caf_build_header_path}")
       endif()
     endif()
     list(APPEND CAF_INCLUDE_DIRS "${CAF_INCLUDE_DIR_${UPPERCOMP}}")


Update FindNDI.cmake

Update FindNDI.cmake

fix typo

--- cmake/FindNDI.cmake
+++ cmake/FindNDI.cmake
@@ -2,7 +2,7 @@
 set(NDI_SDK_LIBRARY_PATH "" CACHE PATH "NDI SDK library path")

 if(NOT (NDI_SDK_INCLUDE_PATH AND NDI_SDK_LIBRARY_PATH))
-  message(FATAL_ERROR "NDI SDK: Please povide NDI_SDK_INCLUDE_PATH and NDI_SDK_LIBRARY_PATH!")
+  message(FATAL_ERROR "NDI SDK: Please provide NDI_SDK_INCLUDE_PATH and NDI_SDK_LIBRARY_PATH!")
 endif()

 find_path(NDI_INCLUDE_DIR
@@ -50,4 +50,4 @@
 mark_as_advanced(
   NDI_INCLUDE_DIR
   NDI_LIBRARY
-)+)


Fixing FindSDL

Fixing FindSDL

--- cmake/FindSDL.cmake
+++ cmake/FindSDL.cmake
@@ -171,7 +171,7 @@
   unset(SDL_VERSION_PATCH)
 endif()

-include(FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL
                                   REQUIRED_VARS SDL_LIBRARY SDL_INCLUDE_DIR


Target should be built before target tag

--- Modules/ManageSourceVersionControl.cmake
+++ Modules/ManageSourceVersionControl.cmake
@@ -26,6 +26,9 @@
 	    COMMENT "Pre-tagging check"
 	    )

+	IF(TARGET test)
+	    ADD_DEPENDENCIES(tag_pre test)
+	ENDIF(TARGET test)
     ENDMACRO(MANAGE_SOURCE_VERSION_CONTROL_COMMON)

     MACRO(MANAGE_SOURCE_VERSION_CONTROL_GIT)


BUG: Address use of CMake variables in CMakeLists.txt.

Use the variables referenced for that purpose in the `if/else` block in
order to pick the appropriate commit hash from git.

Change-Id: Ieac69918eb51bc90bc4591c0e709d441d80ab53f

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

 # If the environment var WikiExamplesTag exists, use it
 if (NOT DEFINED ENV{WikiExamplesTag})
-  set(GIT_TAG ee85e99ab3cdd0dd4bedbdd7893c48a09cab0244
-     )
+  set(GIT_TAG ee85e99ab3cdd0dd4bedbdd7893c48a09cab0244)
 else()
-  set(GIT_TAG ee85e99ab3cdd0dd4bedbdd7893c48a09cab0244
-     )
+  set(GIT_TAG $ENV{WikiExamplesTag})
 endif()

 itk_fetch_module(WikiExamples
   "A collection of examples that illustrate how to use ITK."
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
-  GIT_TAG ee85e99ab3cdd0dd4bedbdd7893c48a09cab0244
+  GIT_TAG ${GIT_TAG}
   )


This does hopefully really raise the warning/error limit.

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -164,6 +164,10 @@
 # should ctest wipe the binary tree before running
 SET(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)

+# raise the warning/error limit
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "33331")
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "33331")
+
 # this is the initial cache to use for the binary tree, be careful to escape
 # any quotes inside of this string if you use it
 if(WIN32 AND NOT UNIX)


Removed redundant fpic invocation

Removed redundant fpic invocation

--- cmake/Cuda.cmake
+++ cmake/Cuda.cmake
@@ -139,10 +139,6 @@

   endforeach()

-  if(UNIX OR APPLE)
-    list(APPEND CUDA_NVCC_FLAGS -Xcompiler -fPIC)
-  endif()
-
   if(APPLE)
     list(APPEND CUDA_NVCC_FLAGS -Xcompiler -Wno-unused-function)
   endif()


CMake: Fix building with prebuilt LLVM via LLVM_DIR

--- cmake/llvm.cmake
+++ cmake/llvm.cmake
@@ -12,13 +12,23 @@
     if (LLVM_DIR)
         find_package(LLVM REQUIRED CONFIG)
         llvm_map_components_to_libnames(LIBS mcjit ipo x86codegen)
-        # Try to get location of MCJIT lib on Windows (Release build)
-        get_property(MAIN_LIB TARGET LLVMMCJIT PROPERTY IMPORTED_LOCATION_RELEASE)
-        if (NOT MAIN_LIB)
-            # On Unix fallback to non-config location
-            get_property(MAIN_LIB TARGET LLVMMCJIT PROPERTY IMPORTED_LOCATION)
+
+        # To create a fake imported library later on we need to know the
+        # location of some library
+        list(GET LIBS 0 MAIN_LIB)
+        get_property(CONFIGS TARGET ${MAIN_LIB} PROPERTY IMPORTED_CONFIGURATIONS)
+        list(GET CONFIGS 0 CONFIG)  # Just get the first one. Usually there is only one.
+        if (CONFIG)
+            get_property(MAIN_LIB TARGET ${MAIN_LIB} PROPERTY IMPORTED_LOCATION_${CONFIG})
+        else()
+            set(CONFIG Unknown)
+            get_property(MAIN_LIB TARGET ${MAIN_LIB} PROPERTY IMPORTED_LOCATION)
         endif()
-        message(STATUS "LLVM ${LLVM_VERSION} (${LLVM_DIR})")
+        message(STATUS "LLVM ${LLVM_VERSION} (${CONFIG}; ${LLVM_ENABLE_ASSERTIONS}; ${LLVM_DIR})")
+        if (NOT EXISTS ${MAIN_LIB})
+            # Add some diagnostics to detect issues before building.
+            message(FATAL_ERROR "LLVM library not found: ${MAIN_LIB}")
+        endif()
     else()
         # List of required LLVM libs.
         # Generated with `llvm-config --libs mcjit ipo x86codegen`
@@ -40,11 +50,6 @@
             set(SYSTEM_LIBS pthread z m curses)
         elseif (UNIX)
             set(SYSTEM_LIBS pthread z m tinfo dl)
-        endif()
-
-        if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-            # Clang needs this to build LLVM. Weird that the GCC does not.
-            set(DEFINES __STDC_LIMIT_MACROS __STDC_CONSTANT_MACROS)
         endif()

         include(ExternalProject)
@@ -79,11 +84,18 @@
         set(LIBS ${LIBFILES} ${SYSTEM_LIBS})
     endif()

+    if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+        # Clang needs this to build LLVM. Weird that the GCC does not.
+        set(DEFINES __STDC_LIMIT_MACROS __STDC_CONSTANT_MACROS)
+    endif()
+
     # Create the target representing
     add_library(${TARGET_NAME} STATIC IMPORTED)
     set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_COMPILE_DEFINITIONS ${DEFINES})
     set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LLVM_INCLUDE_DIRS})
     set_property(TARGET ${TARGET_NAME} PROPERTY IMPORTED_LOCATION ${MAIN_LIB})
     set_property(TARGET ${TARGET_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES ${LIBS})
-    add_dependencies(${TARGET_NAME} llvm-project)
+    if (TARGET llvm-project)
+        add_dependencies(${TARGET_NAME} llvm-project)
+    endif()
 endfunction()


hide GTK_VER_RECORDED in cmake cache

hide GTK_VER_RECORDED in cmake cache

--- projects/wx.cmake
+++ projects/wx.cmake
@@ -20,6 +20,7 @@
       if(NOT GTK_VER_RECORDED)
         file(APPEND ${XP_INFOFILE} "gtk3 version: ${GTK3_VERSION}\n")
         set(GTK_VER_RECORDED TRUE CACHE BOOL "gtk version recorded" FORCE)
+        set_property(CACHE GTK_VER_RECORDED PROPERTY TYPE INTERNAL)
       endif()
     else()
       pkg_check_modules(GTK2 gtk+-2.0)
@@ -28,6 +29,7 @@
         if(NOT GTK_VER_RECORDED)
           file(APPEND ${XP_INFOFILE} "gtk2 version: ${GTK2_VERSION}\n")
           set(GTK_VER_RECORDED TRUE CACHE BOOL "gtk version recorded" FORCE)
+          set_property(CACHE GTK_VER_RECORDED PROPERTY TYPE INTERNAL)
         endif()
       else()
         message(FATAL_ERROR "\n"


* check: don't check setcap;

* check: don't check setcap;

--- check.cmake
+++ check.cmake
@@ -34,14 +34,6 @@
 	EXECUTE_PROCESS(COMMAND ${AWK} -V OUTPUT_VARIABLE AWK_VERSION)
 	string(REGEX REPLACE "^GNU Awk ([^\n]+)\n.*" "\\1" AWK_VERSION "${AWK_VERSION}")
 	message("-- Found awk ${AWK_VERSION}")
-endif()
-
-# check setcap
-find_program(SETCAP setcap)
-if (NOT SETCAP)
-	message(FATAL_ERROR "*** setcap not found! ***")
-else()
-	message("-- Found setcap")
 endif()

 # check gperf


fixed checkstyle scripts

fixed checkstyle scripts

--- contrib/tiglmacros.cmake
+++ contrib/tiglmacros.cmake
@@ -4,6 +4,7 @@

     add_custom_command(
         OUTPUT ${dir}_checkstyle-report
+        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/filefilter.txt
         WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
         COMMAND ${PYTHON_EXECUTABLE}
         ARGS ${PROJECT_SOURCE_DIR}/thirdparty/nsiqcppstyle/nsiqcppstyle.py ${CMAKE_CURRENT_SOURCE_DIR}
@@ -12,17 +13,17 @@
     add_custom_command(
         OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/filefilter.txt
         COMMAND ${CMAKE_COMMAND}
-        ARGS -E copy ${PROJECT_SOURCE_DIR}/contrib/filefilter.txt ${CMAKE_CURRENT_SOURCE_DIR}
+        ARGS -E copy ${PROJECT_SOURCE_DIR}/contrib/filefilter.txt ${CMAKE_CURRENT_SOURCE_DIR}/
     )

     add_custom_target(
         checkstyle_${dir}
         DEPENDS ${dir}_checkstyle-report
-        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/filefilter.txt
+
     )

     add_dependencies(checkstyle checkstyle_${dir})

-  endif(PYTHONINTTERP_FOUND)
+  endif(PYTHONINTERP_FOUND)
 endfunction()


Fix Qt5Network linking errors on OSX

Fix Qt5Network linking errors on OSX

--- scripts/Qt5Network_ZZZ_HunterPlugin.cmake
+++ scripts/Qt5Network_ZZZ_HunterPlugin.cmake
@@ -55,5 +55,11 @@
   # Fix linking errors
   if(IOS)
     _hunter_plugin_add_interface(Qt5::Network "-framework Security")
+  elseif(APPLE)
+    # _SCDynamicStoreCopyProxies
+    _hunter_plugin_add_interface(Qt5::Network "-framework SystemConfiguration")
+
+    # _SecKeychainFindInternetPassword
+    _hunter_plugin_add_interface(Qt5::Network "-framework Security")
   endif()
 endif()


mpich requires "./" before exe

mpich requires "./" before exe

--- test/testing.cmake
+++ test/testing.cmake
@@ -172,7 +172,7 @@
 set(MDIR ${MESHES}/upright)
 add_test(parallel_meshgen
   ${MPIRUN} ${MPIRUN_PROCFLAG} 4
-  generate
+  ./generate
   "${MDIR}/upright.smd"
   "67k")
 add_test(adapt_meshgen


replace splitfun with mpi_test macro

replace splitfun with mpi_test macro

--- test/testing.cmake
+++ test/testing.cmake
@@ -7,16 +7,6 @@
     COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} ${PROCS} ${VALGRIND} ${VALGRIND_ARGS} ${EXE} ${ARGN}
   )
 endmacro(mpi_test)
-macro(splitfun TESTNAME PROG MODEL IN OUT PARTS FACTOR)
-  math(EXPR OUTPARTS "${PARTS} * ${FACTOR}")
-  add_test("${TESTNAME}"
-    ${MPIRUN} ${MPIRUN_PROCFLAG} ${OUTPARTS}
-    "${PROG}"
-    "${MODEL}"
-    "${IN}"
-    "${OUT}"
-    ${FACTOR})
-endmacro()
 macro(cook TESTNAME PROG PARTS FACTOR WORKDIR)
   math(EXPR OUTPARTS "${PARTS} * ${FACTOR}")
   add_test(NAME "${TESTNAME}"
@@ -44,12 +34,12 @@
   "${MDIR}/inviscid_egg.b8.ugrid"
   "${MDIR}/inviscid_egg.dmg"
   "${MDIR}/inviscid_egg.smb")
-splitfun(inviscid_split
+mpi_test(inviscid_split 4
   ./split
   "${MDIR}/inviscid_egg.dmg"
   "${MDIR}/inviscid_egg.smb"
   "${MDIR}/4/"
-  1 4)
+  4)
 mpi_test(inviscid_ghost 4
   ./ghost
   "${MDIR}/inviscid_egg.dmg"
@@ -79,12 +69,12 @@
 else()
   set(MESHFILE "pipe_2_.smb")
 endif()
-splitfun(split_2
+mpi_test(split_2 2
   ./split
   "${MDIR}/pipe.dmg"
   "pipe.smb"
   ${MESHFILE}
-  1 2)
+  2)
 mpi_test(refineX 2
   ./refine2x
   "${MDIR}/pipe.dmg"
@@ -92,19 +82,19 @@
   0
   "refXpipe/")
 if(ENABLE_ZOLTAN)
-  splitfun(split_4
+  mpi_test(split_4 4
     ./zsplit
     "${MDIR}/pipe.dmg"
     ${MESHFILE}
     "pipe_4_.smb"
-    2 2)
+    2)
 else()
-  splitfun(split_4
+  mpi_test(split_4 4
     ./split
     "${MDIR}/pipe.dmg"
     ${MESHFILE}
     "pipe_4_.smb"
-    2 2)
+    2)
 endif()
 mpi_test(verify_parallel 4
   ./verify
@@ -219,12 +209,12 @@
   ./verify
   "${MDIR}/nonmanifold.dmg"
   "${MDIR}/nonmanifold.smb")
-splitfun(nonmanif_split
+mpi_test(nonmanif_split 2
   ./split
   "${MDIR}/nonmanifold.dmg"
   "${MDIR}/nonmanifold.smb"
   "nonmanifold_2_.smb"
-  1 2)
+  2)
 mpi_test(nonmanif_verify2 2
   ./verify
   "${MDIR}/nonmanifold.dmg"
@@ -234,12 +224,12 @@
   ./mkmodel
   "${MDIR}/fusion.smb"
   "fusion.dmg")
-splitfun(split_fusion
+mpi_test(split_fusion 2
   ./split
   "fusion.dmg"
   "${MDIR}/fusion.smb"
   "fusion_2_.smb"
-  1 2)
+  2)
 # the part count mismatch is intentional,
 # this test runs on half its procs
 if(ENABLE_ZOLTAN)


Make heaptrack.sh shell script work with dash.

--- heaptrack.sh.cmake
+++ heaptrack.sh.cmake
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh

 #
 # Copyright 2014 Milian Wolff <mail@milianw.de>
@@ -91,7 +91,7 @@
             exit 0
             ;;
         *)
-            if [[ "$1" == "--" ]]; then
+            if [ "$1" = "--" ]; then
                 shift 1
             fi
             if [ ! -x "$(which "$1" 2> /dev/null)" ]; then
@@ -145,13 +145,13 @@
 "$INTERPRETER" < $pipe | gzip -c > "$output" &
 debuggee=$!

-function cleanup {
+cleanup() {
     rm -f "$pipe"
     kill "$debuggee" 2> /dev/null

     echo "Heaptrack finished! Now run the following to investigate the data:"
     echo
-    if [[ "$(which heaptrack_gui 2> /dev/null)" != "" ]]; then
+    if [ "$(which heaptrack_gui 2> /dev/null)" != "" ]; then
         echo "  heaptrack_gui \"$output\""
     else
         echo "  heaptrack_print \"$output\" | less"


switch this to always build in shared mode

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -10,15 +10,19 @@
   if(MSVC)
     add_library(${RDKLIB_NAME} ${RDKLIB_SOURCES})
   else(MSVC)
-    IF(RDKLIB_SHARED)
+    # we're going to always build in shared mode since we
+    # need exceptions to be (correctly) catchable across
+    # boundaries. As of now (June 2010), this doesn't work
+    # with g++ unless libraries are shared.
+    #IF(RDKLIB_SHARED)
       add_library(${RDKLIB_NAME} SHARED ${RDKLIB_SOURCES})
       INSTALL(TARGETS ${RDKLIB_NAME}
               DESTINATION ${RDKit_BinDir}/${RDKLIB_DEST})
-    ELSE(RDKLIB_SHARED)
-      add_library(${RDKLIB_NAME} ${RDKLIB_SOURCES})
-      INSTALL(TARGETS ${RDKLIB_NAME}
-              DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
-    ENDIF(RDKLIB_SHARED)
+    #ELSE(RDKLIB_SHARED)
+    #  add_library(${RDKLIB_NAME} ${RDKLIB_SOURCES})
+    #  INSTALL(TARGETS ${RDKLIB_NAME}
+    #          DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
+    #ENDIF(RDKLIB_SHARED)
     IF(RDKLIB_LINK_LIBRARIES)
       target_link_libraries(${RDKLIB_NAME} ${RDKLIB_LINK_LIBRARIES})
     ENDIF(RDKLIB_LINK_LIBRARIES)


Change CONAN_COMMAND argument to take multiple parameters

--- conan.cmake
+++ conan.cmake
@@ -145,8 +145,8 @@

 macro(parse_arguments)
   set(options BASIC_SETUP CMAKE_TARGETS)
-  set(oneValueArgs BUILD CONAN_COMMAND CONANFILE)
-  set(multiValueArgs REQUIRES OPTIONS IMPORTS)
+  set(oneValueArgs BUILD CONANFILE)
+  set(multiValueArgs REQUIRES OPTIONS IMPORTS CONAN_COMMAND)
   cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 endmacro()


change to c++14

change to c++14

--- cmake/DefaultConfigTypes.cmake
+++ cmake/DefaultConfigTypes.cmake
@@ -4,9 +4,9 @@
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release)
 endif()

-set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -pedantic -O2 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "-std=c++14 -pedantic -O2 -DNDEBUG")
 set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -pedantic -g  -O0 -DDEBUG -D_DEBUG")
+set(CMAKE_CXX_FLAGS_DEBUG "-std=c++14 -pedantic -g  -O0 -DDEBUG -D_DEBUG")
 set(CMAKE_C_FLAGS_DEBUG "-g -O0 -DDEBUG -D_DEBUG")
 # Handle some compile flag options
 option(DEBUG_FLAG_GLIBCXX_DEBUG "use gcc flag -D_GLIBCXX_DEBUG when CMAKE_BUILD_TYPE is Debug" OFF)


update FindOpenNI.cmake : pick the right OpenNI lib when both 32- and 64bit OpenNI are installed

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -40,16 +40,21 @@

 set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})

+set(OPENNI_SUFFIX)
+if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(OPENNI_SUFFIX 64)
+endif(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+
 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
           HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni /usr/include/ni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
-          PATHS "$ENV{PROGRAMFILES}/OpenNI/Include" "$ENV{PROGRAMW6432}/OpenNI/Include"
+          PATHS "$ENV{OPEN_NI_INSTALL_PATH${OPENNI_SUFFIX}}/Include"
           PATH_SUFFIXES openni include Include)
 #add a hint so that it can find it without the pkg-config
 find_library(OPENNI_LIBRARY
-             NAMES OpenNI64 OpenNI
+             NAMES OpenNI${OPENNI_SUFFIX}
              HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
-             PATHS "$ENV{PROGRAMFILES}/OpenNI/Lib" "$ENV{PROGRAMW6432}/OpenNI/Lib64"
+             PATHS "$ENV{OPEN_NI_LIB${OPENNI_SUFFIX}}"
              PATH_SUFFIXES lib Lib Lib64)

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})


clean up

clean up

svn path=/trunk/kdesupport/akonadi/; revision=1107675

--- cmake/modules/FindSqlite.cmake
+++ cmake/modules/FindSqlite.cmake
@@ -4,7 +4,6 @@
 #  SQLITE_FOUND - system has Sqlite
 #  SQLITE_INCLUDE_DIR - the Sqlite include directory
 #  SQLITE_LIBRARIES - Link these to use Sqlite
-#  SQLITE_DEFINITIONS - Compiler switches required for using Sqlite
 #  SQLITE_MIN_VERSION - The minimum SQLite version
 #
 # Redistribution and use is allowed according to the terms of the BSD license.


Fix for Apple Silicon M1 - gfortran does not accept -m64

--- cmake/modules/SetUpMacOS.cmake
+++ cmake/modules/SetUpMacOS.cmake
@@ -49,6 +49,7 @@
        else()
           MESSAGE(STATUS "Found an x86_64 system")
           set(ROOT_ARCHITECTURE macosx64)
+          SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
        endif()

        SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
@@ -56,7 +57,6 @@
        SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -m64")
        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
-       SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
     else()
        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")