KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Add cppan_grpc cmake function.

Add cppan_grpc cmake function.

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -1180,8 +1180,32 @@
             ${BDIR}/${n}.pb.h
         COMMAND
             pvt.cppan.demo.google.protobuf.protoc ${f} --cpp_out=${BDIR}/${d2} -I ${d}
+        DEPENDS ${f}
     )
     set(src ${src} ${BDIR}/${n}.pb.cc ${BDIR}/${n}.pb.h)
+endmacro()
+
+########################################
+# MACRO cppan_grpc
+########################################
+
+macro(cppan_grpc f)
+    cppan_genpb(${f})
+
+    get_filename_component(n ${f} NAME_WE)
+    get_filename_component(d ${f} DIRECTORY)
+    string(REPLACE "${SDIR}" "" d2 "${d}")
+    set(n ${d2}/${n})
+    add_custom_command(
+        OUTPUT
+            ${BDIR}/${n}.grpc.pb.cc
+            ${BDIR}/${n}.grpc.pb.h
+        COMMAND
+            pvt.cppan.demo.google.protobuf.protoc ${f} --grpc_out=${BDIR}/${d2} -I ${d}
+            --plugin=protoc-gen-grpc=$<TARGET_FILE:${grpc_cpp_plugin}>
+        DEPENDS ${f}
+    )
+    set(src ${src} ${BDIR}/${n}.grpc.pb.cc ${BDIR}/${n}.grpc.pb.h)
 endmacro()

 ########################################


BUG: fix mantis 1188

BUG: fix mantis 1188


Added _labeled variants of test declaration macros

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -512,14 +512,18 @@
   _rosbuild_add_gtest(${ARGV})
   # Create a legal target name, in case the target name has slashes in it
   string(REPLACE "/" "_" _testname ${exe})
-
-  # Redeclaration of target is to workaround bug in 2.4.6
   add_custom_target(test)
   add_dependencies(test test_${_testname})
-
   # Register check for test output
   _rosbuild_check_rostest_xml_result(test_${_testname} $ENV{ROS_ROOT}/test/test_results/${PROJECT_NAME}/${_testname}.xml)
 endmacro(rosbuild_add_gtest)
+
+# A version of add_gtest that checks a label against ROS_BUILD_TEST_LABEL
+macro(rosbuild_add_gtest_labeled label)
+  if("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
+    rosbuild_add_gtest(${ARGN})
+  endif("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
+endmacro(rosbuild_add_gtest_labeled)

 # A helper to create test programs that are expected to fail for the near
 # future.  It calls rosbuild_add_executable() to
@@ -540,11 +544,21 @@
 macro(rosbuild_add_rostest file)
   string(REPLACE "/" "_" _testname ${file})
   _rosbuild_add_rostest(${file})
-  # Redeclaration of target is to workaround bug in 2.4.6
-  add_custom_target(test)
-  add_dependencies(test rostest_${_testname})
+  # Check for agreement of optional label and environment variable
+  if("${ARGN}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
+    # Redeclaration of target is to workaround bug in 2.4.6
+    add_custom_target(test)
+    add_dependencies(test rostest_${_testname})
+  endif("${ARGN}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
   _rosbuild_check_rostest_result(rostest_${_testname} ${PROJECT_NAME} ${file})
 endmacro(rosbuild_add_rostest)
+
+# A version of add_rostest that checks a label against ROS_BUILD_TEST_LABEL
+macro(rosbuild_add_rostest_labeled label)
+  if("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
+    rosbuild_add_rostest(${ARGN})
+  endif("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
+endmacro(rosbuild_add_rostest_labeled)

 # A helper to run rostests that are expected to fail for the near future.
 # It generates a command to run rostest on
@@ -570,6 +584,13 @@
   # internally. TODO
   #_rosbuild_check_rostest_xml_result(pyunit_${_testname} $ENV{ROS_ROOT}/test/test_results/${PROJECT_NAME}/${_testname}.xml)
 endmacro(rosbuild_add_pyunit)
+
+# A version of add_pyunit that checks a label against ROS_BUILD_TEST_LABEL
+macro(rosbuild_add_pyunit_labeled label)
+  if("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
+    rosbuild_add_pyunit(${ARGN})
+  endif("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
+endmacro(rosbuild_add_pyunit_labeled)

 # A helper to run Python unit tests that are expected to fail for the near
 # future. It generates a command to run python


replace cmake escape character with double backslash

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -21,10 +21,17 @@
 # Standard regression test
 function(of_regression testname LABELS)
   file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" PYTHON_EXECUTABLE)
+
   file(TO_NATIVE_PATH "${CMAKE_CURRENT_LIST_DIR}/executeOpenfastRegressionCase.py" TEST_SCRIPT)
   file(TO_NATIVE_PATH "${CTEST_OPENFAST_EXECUTABLE}" OPENFAST_EXECUTABLE)
   file(TO_NATIVE_PATH "${CMAKE_CURRENT_LIST_DIR}/.." SOURCE_DIRECTORY)
   file(TO_NATIVE_PATH "${CTEST_BUILD_DIR}/openfast" BUILD_DIRECTORY)
+
+  string(REPLACE "\\" "\\\\" TEST_SCRIPT ${TEST_SCRIPT})
+  string(REPLACE "\\" "\\\\" OPENFAST_EXECUTABLE ${OPENFAST_EXECUTABLE})
+  string(REPLACE "\\" "\\\\" SOURCE_DIRECTORY ${SOURCE_DIRECTORY})
+  string(REPLACE "\\" "\\\\" BUILD_DIRECTORY ${BUILD_DIRECTORY})
+
   add_test(
     ${testname} ${PYTHON_EXECUTABLE}
        ${TEST_SCRIPT}


reference ts module with test-specific functionalities (e.g custom assertions)

--- cmake/BuildTests.cmake
+++ cmake/BuildTests.cmake
@@ -27,12 +27,12 @@
             add_definitions(-DPYTHON_USE_NUMPY=1)
             add_dependencies( ${test_project} python )
             include_directories( ${BIND_PYTHON_INCLUDE_DIRS} )
-            target_link_libraries(${test_project} ${${ROOT_PROJECT}_LIBS} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} ${BIND_PYTHON_LIBS} python)
+            target_link_libraries(${test_project} ${${ROOT_PROJECT}_LIBS} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} ts ${BIND_PYTHON_LIBS} python)

         else(BUILD_python)

             add_dependencies (${test_project} ${${ROOT_PROJECT}_MODULES})
-            target_link_libraries (${test_project} ${${ROOT_PROJECT}_LIBS} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} ${${ROOT_PROJECT}_MODULES})
+            target_link_libraries (${test_project} ${${ROOT_PROJECT}_LIBS} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} ts ${${ROOT_PROJECT}_MODULES})

         endif (BUILD_python)


Fix build error setting --enable-auto-import flag only for MINGW

--- cmake/Extensions.cmake
+++ cmake/Extensions.cmake
@@ -118,8 +118,12 @@
         if(WIN32)
             list(APPEND ADD_PYTHON_EXTENSION_DEFINITIONS Py_NO_ENABLE_SHARED)
             target_link_libraries(${target_name} libpython-shared)
+			if(MINGW)
+			    set_target_properties(${target_name} PROPERTIES
+					LINK_FLAGS -Wl,--enable-auto-import
+				)
+			endif(MINGW)
             set_target_properties(${target_name} PROPERTIES
-                LINK_FLAGS -Wl,--enable-auto-import
                 SUFFIX .pyd
             )
         endif(WIN32)


CMake: Fix syntax errors incompatible with CMake 3.1

--- cmake/FindGASNet.cmake
+++ cmake/FindGASNet.cmake
@@ -108,12 +108,11 @@
   string(REGEX MATCHALL "(^| +)${FLAG}([^ ]*)" OUTTMP "${INVAR2}")
   foreach(OPT IN LISTS OUTTMP)
     string(REGEX REPLACE "(^| +)${FLAG}([^ ]*)" "\\2" OPT "${OPT}")
-    if(OPT STREQUAL "NDEBUG") # NDEBUG should not get propogated
-      continue()
-    endif()
-    list(FIND ${OUTVAR} "${OPT}" _I)
-    if(_I EQUAL -1)
-      list(APPEND ${OUTVAR} "${OPT}")
+    if(NOT (OPT STREQUAL "NDEBUG")) # NDEBUG should not get propogated
+      list(FIND ${OUTVAR} "${OPT}" _I)
+      if(_I EQUAL -1)
+        list(APPEND ${OUTVAR} "${OPT}")
+      endif()
     endif()
   endforeach()
 endmacro()
@@ -167,13 +166,35 @@
   endif()
 endfunction()

+# Needed for backwards compatibility with older cmake
+macro(list_filter_include varname re)
+  set(tmp_${varname})
+  foreach(item IN LISTS ${varname})
+    if(item MATCHES "${re}")
+      list(APPEND tmp_${varname} ${item})
+    endif()
+  endforeach()
+  set(${varname} ${tmp_${varname}})
+  unset(tmp_${varname})
+endmacro()
+macro(list_filter_exclude varname re)
+  set(tmp_${varname})
+  foreach(item IN LISTS ${varname})
+    if(NOT (item MATCHES "${re}"))
+      list(APPEND tmp_${varname} ${item})
+    endif()
+  endforeach()
+  set(${varname} ${tmp_${varname}})
+  unset(tmp_${varname})
+endmacro()
+
 # This function takes an input list in the variable LVAR and a preferences list
 # in PVAR, and sorts the list in LVAR by the items in PVAR
 function(_sort_list_by_preference LVAR PVAR)
   string(REPLACE ";" "|" L_RE "${${LVAR}}")
-  list(FILTER ${PVAR} INCLUDE REGEX "${L_RE}")
+  list_filter_include(${PVAR} "${L_RE}")
   string(REPLACE ";" "|" P_RE "${${PVAR}}")
-  list(FILTER ${LVAR} EXCLUDE REGEX "${P_RE}")
+  list_filter_exclude(${LVAR} "${P_RE}")
   set(L)
   list(APPEND L ${${PVAR}})
   list(APPEND L ${${LVAR}})


add import targets to findlibvlc

add import targets to findlibvlc

so it can be used more idiomatically

--- cmake/FindLIBVLC.cmake
+++ cmake/FindLIBVLC.cmake
@@ -101,6 +101,18 @@
     message(STATUS "Found LibVLC version: ${LIBVLC_VERSION} (searched for: ${LIBVLC_MIN_VERSION})")
 endif (NOT LIBVLC_FIND_QUIETLY)

-if (NOT LIBVLC_FOUND AND LIBVLC_FIND_REQUIRED)
-    message(FATAL_ERROR "Could not find LibVLC/LibVLCcore")
-endif ()
+if(LIBVLC_FOUND AND NOT TARGET LibVLC::LibVLC)
+    add_library(LibVLC::LibVLC UNKNOWN IMPORTED)
+    set_target_properties(LibVLC::LibVLC PROPERTIES
+        IMPORTED_LOCATION "${LIBVLC_LIBRARY}"
+        INTERFACE_INCLUDE_DIRECTORIES "${LIBVLC_INCLUDE_DIR}"
+    )
+endif()
+
+if(LIBVLC_FOUND AND NOT TARGET LibVLC::Core)
+    add_library(LibVLC::Core UNKNOWN IMPORTED)
+    set_target_properties(LibVLC::Core PROPERTIES
+        IMPORTED_LOCATION "${LIBVLCCORE_LIBRARY}"
+        INTERFACE_INCLUDE_DIRECTORIES "${LIBVLC_INCLUDE_DIR}"
+    )
+endif()


CMake: ZeroMQ - removing mandatory requirement for static library

FindZMQ: removing mandatory requirement for static library,
SLC 6 development package does not contain it

--- cmake/FindZeroMQ.cmake
+++ cmake/FindZeroMQ.cmake
@@ -17,7 +17,6 @@
 # ZeroMQ custom installation can be pointed using -DZEROMQ
 #       - ZEROMQ_INCLUDE_DIR - Where to find zeromq include sub-directory.
 #       - ZEROMQ_LIBRARIES   - List of libraries when using zeromq.
-#       - ZEROMQ_LIBRARIES_STATIC   - List of static libraries when using zeromq.
 #       - ZEROMQ_FOUND       - True if zeromq found.

 message(STATUS "Checking for ZeroMQ ${ZEROMQ}")
@@ -32,12 +31,6 @@
                 DOC "Path to libzmq)"
             )

-    find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
-                PATHS ${ZEROMQ}/lib
-                NO_DEFAULT_PATH
-                DOC "Path to libzmq)"
-            )
-
     find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.h zmq_utils.h zmq.hpp}
                 PATHS ${ZEROMQ}/include
                 NO_DEFAULT_PATH
@@ -46,10 +39,6 @@
 else(ZEROMQ)
     # Check is the library is installed on the system
     find_library(ZEROMQ_LIBRARIES NAMES zmq
-                DOC "Path to libzmq)"
-            )
-
-    find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
                 DOC "Path to libzmq)"
             )

@@ -65,17 +54,12 @@
     set(ZEROMQ_DISABLED TRUE)
 endif()

-if(NOT ZEROMQ_LIBRARIES_STATIC AND NOT ZEROMQ_DISABLED)
-    message(STATUS "ZeroMQ static library not found. Disabling ZeroMQ support")
-    set(ZEROMQ_DISABLED TRUE)
-endif()
-
 if(NOT ZEROMQ_INCLUDE_DIR AND NOT ZEROMQ_DISABLED)
     message(STATUS "ZeroMQ headers not found. Please install development package + cppzmq interface. Disabling ZeroMQ support")
     set(ZEROMQ_DISABLED TRUE)
 endif()

-if(ZEROMQ_LIBRARIES AND ZEROMQ_LIBRARIES_STATIC AND ZEROMQ_INCLUDE_DIR)
+if(ZEROMQ_LIBRARIES AND ZEROMQ_INCLUDE_DIR)
     message(STATUS "Found ZeroMQ ${ZEROMQ_LIBRARIES}")
     set(ZEROMQ_FOUND TRUE)
 endif()


cmake: create zephyr_build_string

cmake: create zephyr_build_string

This commit creates a new `zephyr_build_string()` function.

`zephyr_build_string()` provides a common way of constructing a build
string based on board name, board revision, and build type.

Having this as a function facilitate creation of names in a common way
and thus helps to ensure naming consistency, especially if newer info
is later embedded into the build string.

Initially the build string will be used to lookup configuration
fragments and devicetree overlay files.

This function is used by `zephyr_file(CONF_FILES ...)`.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -1307,6 +1307,66 @@
   math(EXPR ${n} "${${n}} | (${${n}} >> 32)")
   math(EXPR ${n} "${${n}} + 1")
   set(${n} ${${n}} PARENT_SCOPE)
+endfunction()
+
+# Function to create a build string based on BOARD, BOARD_REVISION, and BUILD
+# type.
+#
+# This is a common function to ensure that build strings are always created
+# in a uniform way.
+#
+# Usage:
+#   zephyr_build_string(<out-variable>
+#                       BOARD <board>
+#                       [BOARD_REVISION <revision>]
+#                       [BUILD <type>]
+#   )
+#
+# <out-variable>:            Output variable where the build string will be returned.
+# BOARD <board>:             Board name to use when creating the build string.
+# BOARD_REVISION <revision>: Board revision to use when creating the build string.
+# BUILD <type>:              Build type to use when creating the build string.
+#
+# Examples
+# calling
+#   zephyr_build_string(build_string BOARD alpha BUILD debug)
+# will return the string `alpha_debug` in `build_string` parameter.
+#
+# calling
+#   zephyr_build_string(build_string BOARD alpha BOARD_REVISION 1.0.0 BUILD debug)
+# will return the string `alpha_1_0_0_debug` in `build_string` parameter.
+#
+function(zephyr_build_string outvar)
+  set(single_args BOARD BOARD_REVISION BUILD)
+
+  cmake_parse_arguments(BUILD_STR "" "${single_args}" "" ${ARGN})
+  if(BUILD_STR_UNPARSED_ARGUMENTS)
+    message(FATAL_ERROR
+      "zephyr_build_string(${ARGV0} <val> ...) given unknown arguments:"
+      " ${BUILD_STR_UNPARSED_ARGUMENTS}"
+    )
+  endif()
+
+  if(DEFINED BUILD_STR_BOARD_REVISION AND NOT BUILD_STR_BOARD)
+    message(FATAL_ERROR
+      "zephyr_build_string(${ARGV0} <list> BOARD_REVISION ${BUILD_STR_BOARD_REVISION} ...)"
+      " given without BOARD argument, please specify BOARD"
+    )
+  endif()
+
+  set(${outvar} ${BUILD_STR_BOARD})
+
+  if(DEFINED BUILD_STR_BOARD_REVISION)
+    string(REPLACE "." "_" revision_string ${BUILD_STR_BOARD_REVISION})
+    set(${outvar} "${${outvar}}_${revision_string}")
+  endif()
+
+  if(BUILD_STR_BUILD)
+    set(${outvar} "${${outvar}}_${BUILD_STR_BUILD}")
+  endif()
+
+  # This updates the provided outvar in parent scope (callers scope)
+  set(${outvar} ${${outvar}} PARENT_SCOPE)
 endfunction()

 ########################################################
@@ -2075,6 +2135,8 @@
 #                          Issue an error for any relative path not specified
 #                          by user with `-D<path>`
 #
+# returns an updated list of absolute paths
+#
 # CONF_FILES <path>: Find all configuration files in path and return them in a
 #                    list. Configuration files will be:
 #                    - DTS:       Overlay files (.overlay)
@@ -2096,7 +2158,6 @@
 #                                  BUILD debug, will look for <board>_debug.conf
 #                                  and <board>_debug.overlay, instead of <board>.conf
 #
-# returns an updated list of absolute paths
 function(zephyr_file)
   set(file_options APPLICATION_ROOT CONF_FILES)
   if((ARGC EQUAL 0) OR (NOT (ARGV0 IN_LIST file_options)))
@@ -2112,7 +2173,7 @@

   cmake_parse_arguments(FILE "" "${single_args}" "" ${ARGN})
   if(FILE_UNPARSED_ARGUMENTS)
-      message(FATAL_ERROR "zephyr_file(${ARGV0} <path> ...) given unknown arguments: ${FILE_UNPARSED_ARGUMENTS}")
+      message(FATAL_ERROR "zephyr_file(${ARGV0} <val> ...) given unknown arguments: ${FILE_UNPARSED_ARGUMENTS}")
   endif()

@@ -2167,15 +2228,22 @@
       endif()
     endif()

-    set(FILENAMES ${FILE_BOARD})
-
-    if(DEFINED FILE_BOARD_REVISION)
-      string(REPLACE "." "_" revision_string ${FILE_BOARD_REVISION})
-      list(APPEND FILENAMES "${FILE_BOARD}_${revision_string}")
-    endif()
+    zephyr_build_string(filename
+                        BOARD ${FILE_BOARD}
+                        BUILD ${FILE_BUILD}
+    )
+    set(filename_list ${filename})
+
+    zephyr_build_string(filename
+                        BOARD ${FILE_BOARD}
+                        BOARD_REVISION ${FILE_BOARD_REVISION}
+                        BUILD ${FILE_BUILD}
+    )
+    list(APPEND filename_list ${filename})
+    list(REMOVE_DUPLICATES filename_list)

     if(FILE_DTS)
-      foreach(filename ${FILENAMES})
+      foreach(filename ${filename_list})
         if(EXISTS ${FILE_CONF_FILES}/${filename}.overlay)
           list(APPEND ${FILE_DTS} ${FILE_CONF_FILES}/${filename}.overlay)
         endif()
@@ -2186,11 +2254,7 @@
     endif()

     if(FILE_KCONF)
-      foreach(filename ${FILENAMES})
-        if(FILE_BUILD)
-          set(filename "${filename}_${FILE_BUILD}")
-        endif()
-
+      foreach(filename ${filename_list})
         if(EXISTS ${FILE_CONF_FILES}/${filename}.conf)
           list(APPEND ${FILE_KCONF} ${FILE_CONF_FILES}/${filename}.conf)
         endif()


Fix gtest-not-found bug from #1022. (#1040)

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -212,8 +212,9 @@
 # Google recommends distributing GTest and GMock as source only, to be built with the same
 # flags as that which is being tested.
 #
-# :param[in] include_path: Path to search for Google Test includes
-# :param[in] src_path: Path to search for Google Test sources
+# :param[in] gtest_path: Base path to search for gtest sources and includes, eg /usr
+# :param[in] googletest_path: Base path to search for googletest-packaged gtest/gmock,
+#                             eg, /usr/src/googletest
 # :param[out] gtest_found: Whether or not GTest was found in the paths provided
 # :param[out] gtest_include_dir: The include path to access GTest's headers
 # :param[out] gtest_lib_dir: The library path to access GTest's libraries
@@ -226,16 +227,19 @@
 # :param[out] gmock_main_libs: GMock's main libraries
 # :param[out] base_dir: The base directory containing Google Test and/or GMock CMakeLists.txt
 #
-function(catkin_find_google_test_source include_path src_path
+function(catkin_find_google_test_source gtest_path googletest_path
   gtest_found gtest_include_dir gtest_lib_dir gtest_libs gtest_main_libs
   gmock_found gmock_include_dir gmock_lib_dir gmock_libs gmock_main_libs
   base_dir
 )
-  #Find GTest
-  set(_gtest_include_paths "${include_path}/gtest")
-  set(_gtest_source_paths "${src_path}/gtest/src")
-  list(APPEND _gtest_include_paths "${include_path}/googletest/googletest/include/gtest")
-  list(APPEND _gtest_source_paths "${src_path}/googletest/googletest/src")
+  # Path to gtest from the libgtest-dev Debian package.
+  set(_gtest_include_paths "${gtest_path}/include/gtest")
+  set(_gtest_source_paths "${gtest_path}/src/gtest/src")
+
+  # Path to gtest from the googletest Debian package.
+  list(APPEND _gtest_include_paths "${googletest_path}/googletest/include/gtest")
+  list(APPEND _gtest_source_paths "${googletest_path}/googletest/googletest/src")
+
   if(CATKIN_TOPLEVEL)
     # Ensure current workspace is searched before system path
     list(INSERT _gtest_include_paths 0 "${CMAKE_SOURCE_DIR}/googletest/googletest/include/gtest")
@@ -254,11 +258,14 @@
   set(${gtest_main_libs} ${_gtest_main_libs} PARENT_SCOPE)
   set(${base_dir} ${_gtest_base_dir} PARENT_SCOPE)

-  #Find GMock
-  set(_gmock_include_paths "${include_path}/gmock")
-  set(_gmock_source_paths "${src_path}/gmock/src")
-  list(APPEND _gmock_include_paths "${include_path}/googletest/googlemock/include/gmock")
-  list(APPEND _gmock_source_paths "${src_path}/googletest/googlemock/src")
+  # Path to gmock from the google-mock Debian package before v1.8.0.
+  set(_gmock_include_paths "${gtest_path}/include/gmock")
+  set(_gmock_source_paths "${gtest_path}/src/gmock/src")
+
+  # Path to gmock from the googletest Debian package.
+  list(APPEND _gmock_include_paths "${googletest_path}/googlemock/include/gmock")
+  list(APPEND _gmock_source_paths "${googletest_path}/googlemock/src")
+
   if(CATKIN_TOPLEVEL)
     # Ensure current workspace is searched before system path
     list(INSERT _gmock_include_paths 0 "${CMAKE_SOURCE_DIR}/googletest/googlemock/include/gmock")
@@ -281,9 +288,9 @@
     set(${base_dir} ${_gmock_base_dir} PARENT_SCOPE)
   endif()

-  #In googletest 1.8, gmock and gtest where merged inside googletest
-  #In this case, including gmock builds gmock twice, so instead we need to include googletest
-  #which will include gtest and gmock once
+  # In googletest 1.8, gmock and gtest were merged inside googletest
+  # In this case, including gmock builds gmock twice, so instead we need to include googletest
+  # which will include gtest and gmock once
   if(_gtest_found)
     get_filename_component(_gtest_base_dir_realpath ${_gtest_base_dir} REALPATH)
     get_filename_component(_global_base_dir ${_gtest_base_dir_realpath} PATH)
@@ -299,11 +306,13 @@
   # If we find one but not the other, see if we can get both from source
   # only add gmock/gtest directory once per workspace
   if(NOT TARGET gtest AND NOT TARGET gmock)
-    # Fall back to system-installed gmock source (e.g. Ubuntu)
-    set(_include_paths "/usr/include" "/usr/src")
-    set(_source_paths "/usr/src")
-
-    catkin_find_google_test_source("${_include_paths}" "${_source_paths}" gtest_found
+    # Path to base of legacy libgtest-dev and google-mock packages.
+    set(_gtest_path "/usr")
+
+    # Path to base of new googletest package, which includes both gtest and gmock.
+    set(_googletest_path "/usr/src/googletest")
+
+    catkin_find_google_test_source("${_gtest_path}" "${_googletest_path}" gtest_found
                                    gtest_include_dir gtest_lib_dir gtest_libs gtest_main_libs
                                    gmock_found gmock_include_dir gmock_lib_dir gmock_libs
                                    gmock_main_libs base_dir)


Temporary fix to #914 (#917)

Temporary fix to #914 (#917)

--- simdjson-flags.cmake
+++ simdjson-flags.cmake
@@ -74,10 +74,11 @@

 option(SIMDJSON_ENABLE_THREADS "Enable threaded operation" ON)
 if(SIMDJSON_ENABLE_THREADS)
-  find_package(Threads REQUIRED)
   set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
   set(THREADS_PREFER_PTHREAD_FLAG TRUE)
-  target_link_libraries(simdjson-flags INTERFACE ${CMAKE_THREAD_LIBS_INIT} )
+  find_package(Threads REQUIRED)
+  target_link_libraries(simdjson-flags INTERFACE ${CMAKE_THREAD_LIBS_INIT})
+  target_compile_options(simdjson-flags INTERFACE ${CMAKE_THREAD_LIBS_INIT})
 endif()

 option(SIMDJSON_SANITIZE "Sanitize addresses" OFF)


Skip install of .pdb files for hdf5 on windows

This failed at least in configuration RelWithDebInfo due to a mismatch
between the expected location of the .pdb file and the actual.  No
other parts of VTK install the .pdb files, so removing the install of
the hdf5 .pdb files for consistency.

Change-Id: I0227678c9687cc9ff335653fb04784788b46fae3

--- ThirdParty/hdf5/vtkhdf5/config/cmake/HDFMacros.cmake
+++ ThirdParty/hdf5/vtkhdf5/config/cmake/HDFMacros.cmake
@@ -46,14 +46,14 @@
 MACRO (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
   if (WIN32 AND MSVC)
     get_target_property (target_name ${libtarget} RELWITHDEBINFO_OUTPUT_NAME)
-    install (
-      FILES
-          ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb
-      DESTINATION
-          ${targetdestination}
-      CONFIGURATIONS RelWithDebInfo
-      COMPONENT ${targetcomponent}
-  )
+  #   install (
+  #     FILES
+  #         ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb
+  #     DESTINATION
+  #         ${targetdestination}
+  #     CONFIGURATIONS RelWithDebInfo
+  #     COMPONENT ${targetcomponent}
+  # )
   endif (WIN32 AND MSVC)
 ENDMACRO (INSTALL_TARGET_PDB)


Typographical and grammar corrections - updated this file as there is no .kcfg (strange this is the only .kcfg.cmake file in the whole of the KDE repository)

svn path=/trunk/KDE/kdepim/; revision=946367

--- kmail/kmail.kcfg.cmake
+++ kmail/kmail.kcfg.cmake
@@ -173,13 +173,13 @@

       <entry name="LegacyBodyInvites" type="Bool">
         Send groupware invitations in the mail body
-        <whatsthis>Microsoft Outlook has a number of shortcomings  in its implementation of the iCalendar standard; this option works around one of them. If you have problems with Outlook users not being able to get your invitations, try setting this option.</whatsthis>
+        <whatsthis>Microsoft Outlook has a number of shortcomings in its implementation of the iCalendar standard; this option works around one of them. If you have problems with Outlook users not being able to get your invitations, try setting this option.</whatsthis>
         <default>false</default>
       </entry>

      <entry name="ExchangeCompatibleInvitations" type="Bool">
         Exchange-compatible invitation naming
-        <whatsthis>Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a problem understanding standards-compliant groupware e-mail. Turn this option on to send groupware invitations in a way that Microsoft Exchange understands.</whatsthis>
+        <whatsthis>Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a problem understanding standards-compliant groupware email. Turn this option on to send groupware invitations in a way that Microsoft Exchange understands.</whatsthis>
         <default>false</default>
       </entry>


update cmake to support CMake 3.9+

update cmake to support CMake 3.9+

--- cmake/BoilerPlate.cmake
+++ cmake/BoilerPlate.cmake
@@ -89,10 +89,17 @@

     set(BIN_RPATH "@executable_path/../Frameworks")

-    set(CMAKE_SKIP_BUILD_RPATH              TRUE)
-    set(CMAKE_BUILD_WITH_INSTALL_RPATH      TRUE)
-    set(CMAKE_INSTALL_RPATH                 ${BIN_RPATH})
-    set(CMAKE_INSTALL_RPATH_USE_LINK_PATH   FALSE)
+    if (POLICY CMP0068)
+        cmake_policy(SET CMP0068 NEW)
+        set(CMAKE_INSTALL_NAME_DIR "")
+        set(CMAKE_INSTALL_RPATH ${BIN_RPATH})
+        set(CMAKE_BUILD_RPATH ${BIN_RPATH})
+    else()
+        set(CMAKE_SKIP_BUILD_RPATH              TRUE)
+        set(CMAKE_BUILD_WITH_INSTALL_RPATH      TRUE)
+        set(CMAKE_INSTALL_RPATH                 ${BIN_RPATH})
+        set(CMAKE_INSTALL_RPATH_USE_LINK_PATH   FALSE)
+    endif()

     ### Enable SSE4 instructions
     if(ENABLE_SSE4)


revert previous

revert previous

--- cmake/ExternalQt5.cmake
+++ cmake/ExternalQt5.cmake
@@ -12,7 +12,7 @@
             -confirm-license;
             -release;
             -no-compile-examples;
-	-no-openssl;
+            -no-openssl;
             -no-libproxy;
             -no-qml-debug;
             -nomake tools;
@@ -56,10 +56,10 @@
         PREFIX ${FAST_EXTERNAL_BUILD_DIR}/qt5
         BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/qt5
         URL ${URL}
-	URL_HASH ${URL_HASH}
+        URL_HASH ${URL_HASH}
         CONFIGURE_COMMAND
-            "${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/configure"
-            -prefix "${FAST_EXTERNAL_INSTALL_DIR}";
+            ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/configure
+            -prefix ${FAST_EXTERNAL_INSTALL_DIR};
             ${OPTIONS}
         BUILD_COMMAND
             ${BUILD_COMMAND}
@@ -69,22 +69,20 @@
 )

 if(WIN32)
-set(Qt5Gui_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/Qt5Gui.lib)
-set(Qt5Core_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/Qt5Core.lib)
-set(Qt5Widgets_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/Qt5Widgets.lib)
-set(Qt5OpenGL_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/Qt5OpenGL.lib)
+    set(Qt5Gui_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/Qt5Gui.lib)
+    set(Qt5Core_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/Qt5Core.lib)
+    set(Qt5Widgets_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/Qt5Widgets.lib)
+    set(Qt5OpenGL_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/Qt5OpenGL.lib)
 else()
-set(Qt5Gui_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}Qt5Gui${CMAKE_SHARED_LIBRARY_SUFFIX})
-set(Qt5Core_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}Qt5Core${CMAKE_SHARED_LIBRARY_SUFFIX})
-set(Qt5Widgets_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}Qt5Widgets${CMAKE_SHARED_LIBRARY_SUFFIX})
-set(Qt5OpenGL_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}Qt5OpenGL${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(Qt5Gui_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}Qt5Gui${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(Qt5Core_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}Qt5Core${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(Qt5Widgets_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}Qt5Widgets${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(Qt5OpenGL_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}Qt5OpenGL${CMAKE_SHARED_LIBRARY_SUFFIX})
 endif()
 list(APPEND LIBRARIES ${Qt5Core_LIBRARY})
 list(APPEND LIBRARIES ${Qt5Gui_LIBRARY})
 list(APPEND LIBRARIES ${Qt5Widgets_LIBRARY})
 list(APPEND LIBRARIES ${Qt5OpenGL_LIBRARY})
-#list(APPEND LIBRARIES Qt5::Widgets)
-#list(APPEND LIBRARIES Qt5::OpenGL)
 list(APPEND FAST_INCLUDE_DIRS ${FAST_EXTERNAL_INSTALL_DIR}/include/QtWidgets)
 list(APPEND FAST_INCLUDE_DIRS ${FAST_EXTERNAL_INSTALL_DIR}/include/QtOpenGL)
 list(APPEND FAST_INCLUDE_DIRS ${FAST_EXTERNAL_INSTALL_DIR}/include/QtCore)


setting stack size to 4MB under windows

setting stack size to 4MB under windows

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -34,6 +34,7 @@
 SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} /MP")
 SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} ${ADDITIONAL_CXX_FLAGS}")
 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${ADDITIONAL_CXX_FLAGS}")
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:4000000")

 # optionally use static runtime library
 OPTION(USE_STATIC_RUNTIME "Use the static version of the C/C++ runtime library." OFF)


Honour DESTDIR when installing LLDB python module

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

--- scripts/lldb_python_module.cmake
+++ scripts/lldb_python_module.cmake
@@ -8,7 +8,7 @@
 SET(PYTHON_DIRECTORY python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})

 SET(lldb_module_src ${CMAKE_CURRENT_BINARY_DIR}/lib/${PYTHON_DIRECTORY})
-SET(lldb_module_dest ${CMAKE_INSTALL_PREFIX}/lib)
+SET(lldb_module_dest "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib")

 MESSAGE(STATUS "Installing LLDB python module from: ${lldb_module_src} to ${lldb_module_dest}")
 FILE(COPY "${lldb_module_src}" DESTINATION "${lldb_module_dest}")


fix finding Connext

fix finding Connext

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -70,6 +70,7 @@
   "rticonnextmsgcpp"
 )

+set(_expected_library_names "")
 foreach(_base_name IN LISTS _expected_library_base_names)
   if(WIN32)
     list(APPEND _expected_library_names "${_base_name}.lib")
@@ -92,7 +93,6 @@

   set(_search_library_paths "")
   foreach(_library_name ${_expected_library_names})
-    list(APPEND _search_library_paths "${_lib_path}/*/${_library_name}")
     list(APPEND _search_library_paths "${_lib_path}/${_library_name}")
   endforeach()


fptu-cmake: check GNUCXX version.

fptu-cmake: check GNUCXX version.

--- cmake.fptu/compiler.cmake
+++ cmake.fptu/compiler.cmake
@@ -33,9 +33,16 @@
 # only in version 4.5 https://gcc.gnu.org/projects/cxx0x.html
 #
 if(CMAKE_COMPILER_IS_GNUCC)
+  if(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
+    message(FATAL_ERROR "
+      Your GCC version is ${CMAKE_C_COMPILER_VERSION}, please update")
+  endif()
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCXX)
   if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
     message(FATAL_ERROR "
-      Your GCC version is ${CMAKE_CXX_COMPILER_VERSION}, please update")
+      Your G++ version is ${CMAKE_CXX_COMPILER_VERSION}, please update")
   endif()
 endif()


Include GNU and Clang compilers for flags

Make sure we include Apple's clang by using MATCHES rather than
STREQUAL.

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -10,7 +10,7 @@
   endif()
 endif()

-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")

   include(CheckCXXCompilerFlag)


set GSTREAMER_VERSION

set GSTREAMER_VERSION

--- cmake/FindGStreamer.cmake
+++ cmake/FindGStreamer.cmake
@@ -5,6 +5,7 @@
 #  GSTREAMER_INCLUDE_DIR - the GStreamer include directory
 #  GSTREAMER_LIBRARIES - the libraries needed to use GStreamer
 #  GSTREAMER_DEFINITIONS - Compiler switches required for using GStreamer
+#  GSTREAMER_VERSION - the version of GStreamer

 # Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
 #  (c)2006, Tim Beaulen <tbscope@gmail.com>
@@ -25,6 +26,7 @@
    # in the FIND_PATH() and FIND_LIBRARY() calls
    # don't make this check required - otherwise you can't use macro_optional_find_package on this one
    PKG_CHECK_MODULES(PKG_GSTREAMER gstreamer-0.10)
+   SET(GSTREAMER_VERSION ${PKG_GSTREAMER_VERSION})
    SET(GSTREAMER_DEFINITIONS ${PKG_GSTREAMER_CFLAGS})
 ENDIF (NOT WIN32)


Updated CMake script to find Oculus library on Win64 platform.

--- cmake/FindOculusSDK.cmake
+++ cmake/FindOculusSDK.cmake
@@ -60,14 +60,14 @@
 MARK_AS_ADVANCED(OCULUS_MSVC_DIR)

 # Look for the library.
-FIND_LIBRARY(OCULUS_SDK_LIBRARY NAMES libovr ovr HINTS ${OCULUS_SDK_ROOT_DIR}
+FIND_LIBRARY(OCULUS_SDK_LIBRARY NAMES libovr libovr64 ovr HINTS ${OCULUS_SDK_ROOT_DIR}
                                                       ${OCULUS_SDK_ROOT_DIR}/LibOVR/Lib/${OCULUS_SDK_LIB_ARCH}/${OCULUS_MSVC_DIR}
                                                       ${OCULUS_SDK_ROOT_DIR}/LibOVR/Lib/Linux/Release/${OCULUS_SDK_LIB_ARCH}
                                                     )

 # This will find release lib on Linux if no debug is available - on Linux this is no problem and avoids
 # having to compile in debug when not needed
-FIND_LIBRARY(OCULUS_SDK_LIBRARY_DEBUG NAMES libovr${CMAKE_DEBUG_POSTFIX} ovr${CMAKE_DEBUG_POSTFIX} ovr HINTS
+FIND_LIBRARY(OCULUS_SDK_LIBRARY_DEBUG NAMES libovr${CMAKE_DEBUG_POSTFIX} libovr64${CMAKE_DEBUG_POSTFIX} ovr${CMAKE_DEBUG_POSTFIX} ovr HINTS
                                                       ${OCULUS_SDK_ROOT_DIR}/LibOVR/Lib/${OCULUS_SDK_LIB_ARCH}/${OCULUS_MSVC_DIR}
                                                       ${OCULUS_SDK_ROOT_DIR}/LibOVR/Lib/Linux/Debug/${OCULUS_SDK_LIB_ARCH}
                                                       ${OCULUS_SDK_ROOT_DIR}/LibOVR/Lib/Linux/Release/${OCULUS_SDK_LIB_ARCH}


Исправлена генерация версии

Исправлена генерация версии

--- cmake/build.version.cmake
+++ cmake/build.version.cmake
@@ -17,7 +17,7 @@
         static const std::string g_site   ("${ORG_WEBSITE}");

 #ifdef RDOSIM_COMPATIBLE
-        static const std::string g_comp("-comp");
+        static const std::string g_comp("comp-");
 #else
         static const std::string g_comp("");
 #endif
@@ -50,7 +50,7 @@
         static const std::string g_limitRes("");
 #endif

-        static const std::string g_versionName = boost::str(boost::format("%1% %2%-version %3% %4%-%5%%6%")
+        static const std::string g_versionName = boost::str(boost::format("%1% %2%version %3% %4%-%5%%6%")
             % g_appName
             % g_comp
             % g_version


Disable performance warnings for ISPC to reduce clutter

--- cmake/compiler/ispc.cmake
+++ cmake/compiler/ispc.cmake
@@ -99,7 +99,9 @@

 macro (ispc_compile)
   set(ISPC_ADDITIONAL_ARGS "")
-  if (NOT OSPRAY_STRICT_BUILD)
+  if (OSPRAY_STRICT_BUILD)
+    list(APPEND ISPC_ADDITIONAL_ARGS --wno-perf)
+  else()
     list(APPEND ISPC_ADDITIONAL_ARGS --woff)
   endif()


Rename Glog to glog in external/glog.cmake

--- cmake/external/glog.cmake
+++ cmake/external/glog.cmake
@@ -1,16 +1,16 @@
-SET(GLOG_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/glog_project/src/glog/)
-LIST(APPEND GLOG_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/glog_project/src/glog/src/)
-SET(GLOG_URL https://github.com/google/glog)
+SET(glog_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/glog_project/src/glog/)
+LIST(APPEND glog_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/glog_project/src/glog/src/)
+SET(glog_URL https://github.com/google/glog)

 IF(NOT gflags_FOUND)
     ExternalProject_Get_Property(gflags_project SOURCE_DIR)
-    SET(GLOG_EXTRA_ARGS "-DCMAKE_PREFIX_PATH=${SOURCE_DIR}")
+    SET(glog_EXTRA_ARGS "-DCMAKE_PREFIX_PATH=${SOURCE_DIR}")
 ENDIF()

-ExternalProject_Add(GLOG_project
-        PREFIX GLOG
-        GIT_REPOSITORY ${GLOG_URL}
-        GIT_TAG "v${GLOG_VERSION}"
+ExternalProject_Add(glog_project
+        PREFIX glog
+        GIT_REPOSITORY ${glog_URL}
+        GIT_TAG "v${glog_VERSION}"
         DOWNLOAD_DIR "${DOWNLOAD_LOCATION}"
         UPDATE_COMMAND ""
         PATCH_COMMAND git am -3 ${CMAKE_SOURCE_DIR}/patches/glog_includedir_fix.patch
@@ -20,7 +20,7 @@
         -DWITH_GFLAGS=ON
         -DBUILD_TESTING=OFF
         -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-        ${GLOG_EXTRA_ARGS}
+        ${glog_EXTRA_ARGS}
         INSTALL_COMMAND ""
         CMAKE_CACHE_ARGS
         -DCMAKE_BUILD_TYPE:STRING=Release
@@ -28,11 +28,11 @@
         -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON)

 IF(NOT gflags_FOUND)
-    ADD_DEPENDENCIES(GLOG_project gflags_project)
+    ADD_DEPENDENCIES(glog_project gflags_project)
 ENDIF()

-ADD_LIBRARY(GLOG STATIC IMPORTED)
-SET_PROPERTY(TARGET GLOG PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/glog_project/src/glog/libglog.a)
-ADD_DEPENDENCIES(GLOG GLOG_project)
-SET(GLOG_LIBRARIES "")
-LIST(APPEND GLOG_LIBRARIES GLOG)
+ADD_LIBRARY(glog STATIC IMPORTED)
+SET_PROPERTY(TARGET glog PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/glog_project/src/glog/libglog.a)
+ADD_DEPENDENCIES(glog glog_project)
+SET(glog_LIBRARIES "")
+LIST(APPEND glog_LIBRARIES glog)


Set CPACK_PACKAGE_CONTACT, required for .deb

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -106,6 +106,7 @@
 IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
   SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-${VERSION}")
 ENDIF()
+SET(CPACK_PACKAGE_CONTACT "MySQL Build Team <build@mysql.com>")
 SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc")
 SET(CPACK_SOURCE_GENERATOR "TGZ")
 INCLUDE(cpack_source_ignore_files)


cmake: Use "set" instead of "option" for LLVM_ENABLE_LTO

Apparently option is for bools and cmake-gui will display this
strangely with option.

Pointed out by edward-san - thanks!

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


COMP: Do not depend on castxml target when using system version

_castxml_depends already adds this dependency per:

https://github.com/InsightSoftwareConsortium/ITK/blob/ca9917d1501b56cdf4ab49402cc5cacd7377a5df/Wrapping/macro_files/itk_auto_load_submodules.cmake#L12-L15

--- Wrapping/macro_files/itk_auto_load_submodules.cmake
+++ Wrapping/macro_files/itk_auto_load_submodules.cmake
@@ -124,7 +124,6 @@
     # @CASTXML_INCLUDES@, @WRAPPER_MODULE_NAME@, @CASTXML_TYPEDEFS@, @CASTXML_FORCE_INSTANTIATE@
     configure_file("${ITK_WRAP_CASTXML_SOURCE_DIR}/wrap_.cxx.in" "${cxx_file}" @ONLY)
     unset(CASTXML_INCLUDES)
-    unset(_castxml_depends)

     # ====== Get list of include files that may trigger needing a re-write of castxml files
     set(_include ${${WRAPPER_LIBRARY_NAME}_SOURCE_DIR}/include)
@@ -152,7 +151,7 @@
             @${castxml_inc_file}
             ${cxx_file}
             VERBATIM
-            DEPENDS ${_castxml_depends} ${cxx_file} ${castxml_inc_file} ${_hdrs} castxml
+            DEPENDS ${_castxml_depends} ${cxx_file} ${castxml_inc_file} ${_hdrs}
     )
     unset(cxx_file)
     unset(castxml_inc_file)


BUG: Correcting CLAPACK linking error in linux

--- spharm-pdm.cmake
+++ spharm-pdm.cmake
@@ -22,11 +22,12 @@
 #-----------------------------------------------------------------------------

 set(CLAPACK_LIBRARY_DIRECTORIES
-  ${CLAPACK_DIR}/SRC
-  ${CLAPACK_DIR}/BLAS/SRC
+  #${CLAPACK_DIR}/SRC
+  #${CLAPACK_DIR}/BLAS/SRC
   ${CLAPACK_DIR}/F2CLIBS/libf2c)
 set(CLAPACK_LIBRARIES lapack blas f2c)

+link_directories( ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} )
 link_directories(${CLAPACK_LIBRARY_DIRECTORIES})
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Libraries/Shape/IO)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Libraries/Shape/SpatialObject)


MDEV-4544 - update MSI to include HeidiSQL 8.0

--- win/packaging/heidisql.cmake
+++ win/packaging/heidisql.cmake
@@ -1,4 +1,4 @@
-SET(HEIDISQL_BASE_NAME "HeidiSQL_7.0_Portable")
+SET(HEIDISQL_BASE_NAME "HeidiSQL_8.0_Portable")
 SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
 SET(HEIDISQL_URL "http://heidisql.googlecode.com/files/${HEIDISQL_ZIP}")
 SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})


[DOC] Making the implications of Debug clearer.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@12857 e6417c60-b987-48fd-844e-b20f0fcc1017

--- seqan/util/cmake/FeatureSummary.cmake
+++ seqan/util/cmake/FeatureSummary.cmake
@@ -94,11 +94,13 @@
 message("Build Type - ${CMAKE_BUILD_TYPE}")
 message("")
 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-message("             Programs will be built in DEBUG mode.  Debug mode is meant for ")
-message("             DEVELOPMENT only.  Debug symbols and assertions will be enabled.")
-message("             The code is compiled with DISABLED OPTIMIZATIONS.")
+message("             Programs will be built in DEBUG mode.  Debug symbols and")
+message("             assertions will be enabled.  The code is compiled with DISABLED")
+message("             OPTIMIZATIONS")
 message("")
-message("             For PRODUCTIVE USAGE, you should compile in Release mode. To")
+message("                  /!\\ DEBUG mode will result in BAD PERFORMANCE /!\\")
+message("")
+message("             For PRODUCTION USAGE, you should compile in Release mode. To")
 message("             enable the release mode, pass -DCMAKE_BUILD_TYPE=Release to the")
 message("             cmake call.")
 elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")


- Try to fix exported properties

- Try to fix exported properties

--- toolchain/cmake/Modules/GitDependencies.cmake
+++ toolchain/cmake/Modules/GitDependencies.cmake
@@ -145,12 +145,12 @@
         )

     foreach ( DEP ${LINK_DEPENDENCIES} )
-        get_property ( PROPERTY_EXISTS TARGET "${LINK_TARGET}" PROPERTY GIT_DEPS SET )
+        get_property ( PROPERTY_EXISTS TARGET "${LINK_TARGET}" PROPERTY git_deps SET )

         if(PROPERTY_EXISTS)
-            get_property ( GIT_DEPS TARGET "${LINK_TARGET}" PROPERTY GIT_DEPS )
+            get_property ( GIT_DEPS TARGET "${LINK_TARGET}" PROPERTY git_deps )
             set_property ( TARGET "${LINK_TARGET}" PROPERTY
-                GIT_DEPS
+                git_deps
                 ${GIT_DEPS}
                 "${DEP},${GIT_DEPENDENCIES_${DEP}_VERSION},${GIT_DEPENDENCIES_${DEP}_SOURCE},${GIT_DEPENDENCIES_${DEP}_EXTENSION}"
                 )
@@ -162,14 +162,14 @@
         endif()
     endforeach()

+    set_property ( TARGET "${LINK_TARGET}" PROPERTY
+        EXPORT_PROPERTIES
+            git_deps
+        )
+
     get_property ( EXPORT_PROPS TARGET "${LINK_TARGET}" PROPERTY EXPORT_PROPERTIES )
-    set_property ( TARGET "${LINK_TARGET}" PROPERTY
-        EXPORT_PROPERTIES "${EXPORT_PROPS};GIT_DEPS"
-        )
-
-    get_property ( EXPORT_PROPS TARGET "${LINK_TARGET}" PROPERTY EXPORT_PROPERTIES )
-
-    message ( "Export Props: ${EXPORT_PROPS}" )
+
+    message ( "Export props: ${EXPORT_PROPS}" )

 endfunction()

@@ -192,10 +192,10 @@
         get_target_property( "LIB_TYPE" "${RES_TARGET}" TYPE )

         if(NOT "${LIB_TYPE}" STREQUAL "INTERFACE_LIBRARY")
-            get_property ( GIT_DEPS_DEFINED TARGET "${RES_TARGET}" PROPERTY GIT_DEPS SET )
+            get_property ( GIT_DEPS_DEFINED TARGET "${RES_TARGET}" PROPERTY git_deps SET )

             if(GIT_DEPS_DEFINED)
-                get_property ( GIT_DEPS TARGET "${RES_TARGET}" PROPERTY GIT_DEPS )
+                get_property ( GIT_DEPS TARGET "${RES_TARGET}" PROPERTY git_deps )
                 message ( "---- Deps: ${GIT_DEPS}" )
                 foreach( DEP ${GIT_DEPS} )
                     if("${DEP}" STREQUAL "")


XP_CMAKE_REPO_INSYNC option mark_as_advanced

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1104,6 +1104,7 @@
       else()
         option(XP_CMAKE_REPO_INSYNC "cmake error if repo and cmake are not in sync" OFF)
       endif()
+      mark_as_advanced(XP_CMAKE_REPO_INSYNC)
       if(repoFiles)
         string(REPLACE ";" "\n" repoFilesTxt "${repoFiles}")
         file(WRITE ${CMAKE_BINARY_DIR}/notincmake.txt ${repoFilesTxt}\n)


cmake may specify platform separate from generator

issue https://github.com/smanders/externpro/issues/274#issuecomment-658285087

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -361,6 +361,9 @@
   endif()
   if(WIN32)
     set(XP_CONFIGURE_GEN ${CMAKE_GENERATOR})
+    if(NOT CMAKE_GENERATOR_PLATFORM STREQUAL "")
+      set(XP_CONFIGURE_GEN_PLATFORM CMAKE_GENERATOR_PLATFORM ${CMAKE_GENERATOR_PLATFORM})
+    endif()
     set(XP_CONFIGURE_CMD
       -DCMAKE_MODULE_PATH:PATH=${MODULES_DIR}
       -DCMAKE_INSTALL_PREFIX:PATH=${STAGE_DIR}
@@ -424,7 +427,10 @@
       message(STATUS "target ${XP_TARGET}${XP_BUILD_CONFIGS_MSG}")
       xpVerboseListing("[CONFIGURE]" "${XP_CONFIGURE_CMD}")
       if(NOT "${XP_CONFIGURE_GEN}" STREQUAL "")
-        xpVerboseListing("[GEN]" "${XP_CONFIGURE_GEN}")
+        xpVerboseListing("[CMAKE_GENERATOR]" "${XP_CONFIGURE_GEN}")
+      endif()
+      if(NOT "${XP_CONFIGURE_GEN_PLATFORM}" STREQUAL "")
+        xpVerboseListing("[CMAKE_GENERATOR_PLATFORM]" "${CMAKE_GENERATOR_PLATFORM}")
       endif()
       if(NOT "${ADDITIONAL_DEPENDS}" STREQUAL "")
         xpVerboseListing("[DEPS]" "${ADDITIONAL_DEPENDS}")
@@ -436,7 +442,7 @@
     ExternalProject_Add(${XP_TARGET} DEPENDS ${XP_DEPS} ${ADDITIONAL_DEPENDS}
       DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR}
       SOURCE_DIR ${SOURCE_DIR}
-      CMAKE_GENERATOR ${XP_CONFIGURE_GEN} CMAKE_ARGS ${XP_CONFIGURE_CMD}
+      CMAKE_GENERATOR ${XP_CONFIGURE_GEN} ${XP_CONFIGURE_GEN_PLATFORM} CMAKE_ARGS ${XP_CONFIGURE_CMD}
       BUILD_COMMAND ${XP_BUILD_CMD}
       INSTALL_COMMAND ${XP_INSTALL_CMD} INSTALL_DIR ${NULL_DIR}
       )


Use Lua 5.2 debug libraries for debug when available.

--- cmake/Modules/FindLua52.cmake
+++ cmake/Modules/FindLua52.cmake
@@ -60,7 +60,7 @@
   /opt
 )

-FIND_LIBRARY(LUA_LIBRARY
+FIND_LIBRARY(_LUA_LIBRARY_RELEASE
   NAMES lua52 lua5.2 lua-5.2 lua
   HINTS
   $ENV{LUA_DIR}
@@ -74,16 +74,41 @@
   /opt
 )

-IF(LUA_LIBRARY)
-  # include the math library for Unix
+FIND_LIBRARY(_LUA_LIBRARY_DEBUG
+  NAMES lua52-d lua5.2-d lua-5.2-d lua-d
+  HINTS
+  $ENV{LUA_DIR}
+  PATH_SUFFIXES lib64 lib
+  PATHS
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /sw
+  /opt/local
+  /opt/csw
+  /opt
+)
+
+IF(_LUA_LIBRARY_RELEASE OR _LUA_LIBRARY_DEBUG)
+  IF(_LUA_LIBRARY_RELEASE AND _LUA_LIBRARY_DEBUG)
+    SET(_LUA_LIBRARY optimized ${_LUA_LIBRARY_RELEASE}
+                     debug     ${_LUA_LIBRARY_DEBUG})
+  ELSEIF(_LUA_LIBRARY_RELEASE)
+    SET(_LUA_LIBRARY ${_LUA_LIBRARY_RELEASE})
+  ELSE()
+    SET(_LUA_LIBRARY ${_LUA_LIBRARY_DEBUG})
+  ENDIF()
+
   IF(UNIX AND NOT APPLE)
-    FIND_LIBRARY(LUA_MATH_LIBRARY m)
-    SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
-  # For Windows and Mac, don't need to explicitly include the math library
-  ELSE(UNIX AND NOT APPLE)
-    SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
+    FIND_LIBRARY(_LUA_MATH_LIBRARY m)
   ENDIF(UNIX AND NOT APPLE)
-ENDIF(LUA_LIBRARY)
+   # For Windows and Mac, don't need to explicitly include the math library
+ENDIF()
+
+IF(_LUA_LIBRARY)
+    SET(LUA_LIBRARIES
+        "${_LUA_LIBRARY}" "${_LUA_MATH_LIBRARY}" CACHE STRING "Lua 5.2 Libraries")
+ENDIF(_LUA_LIBRARY)
+

 IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
   FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")


Fetch protobuf (#4837)

Fetch protobuf (#4837)

* Try to simplifiy Protobuf logic.

* Try updating WIN32 build.

* Fix macos build issue.

* Cleanup unused arg.

Co-authored-by: Robert Kimball <f8f4fb0160c4e961c3d6afdbdcc40cfc21344ca8@intel.com>

--- cmake/external_protobuf.cmake
+++ cmake/external_protobuf.cmake
@@ -14,8 +14,8 @@
 # limitations under the License.
 # ******************************************************************************

-# Enable ExternalProject CMake module
-include(ExternalProject)
+# Enable FetchContent CMake module
+include(FetchContent)

 #------------------------------------------------------------------------------
 # Download and install Google Protobuf ...
@@ -25,6 +25,10 @@
 set(NGRAPH_PROTOBUF_GIT_REPO_URL "https://github.com/protocolbuffers/protobuf")

 if(CMAKE_CROSSCOMPILING)
+    # Cross Compiling
+    # Protobuf source version has to match system protoc version
+    # Find system protoc and version
+    # Setup extra protobuf build flags for cross compiling
     find_program(SYSTEM_PROTOC protoc PATHS ENV PATH)

     if(SYSTEM_PROTOC)
@@ -49,151 +53,67 @@

 set(NGRAPH_PROTOBUF_GIT_TAG "v${PROTOC_VERSION}")

-set(Protobuf_INSTALL_PREFIX ${EXTERNAL_PROJECTS_ROOT}/protobuf)
-set(Protobuf_PROTOC_EXECUTABLE ${Protobuf_INSTALL_PREFIX}/bin/protoc)
-set(Protobuf_INCLUDE_DIR ${Protobuf_INSTALL_PREFIX}/include)
-if (WIN32)
-    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-        set(Protobuf_LIBRARY ${Protobuf_INSTALL_PREFIX}/lib/libprotobufd.lib)
-    else()
-        set(Protobuf_LIBRARY ${Protobuf_INSTALL_PREFIX}/lib/libprotobuf.lib)
-    endif()
-else()
-    set(Protobuf_LIBRARY ${Protobuf_INSTALL_PREFIX}/lib/libprotobuf.a)
+FetchContent_Declare(
+    ext_protobuf
+    GIT_REPOSITORY ${NGRAPH_PROTOBUF_GIT_REPO_URL}
+    GIT_TAG        ${NGRAPH_PROTOBUF_GIT_TAG}
+)
+
+FetchContent_GetProperties(ext_protobuf)
+if(NOT ext_protobuf_POPULATED)
+    FetchContent_Populate(ext_protobuf)
 endif()

-if ("${CMAKE_GENERATOR}" STREQUAL "Ninja")
-    set(MAKE_UTIL make)
-else()
-    set(MAKE_UTIL $(MAKE))
+include(ProcessorCount)
+ProcessorCount(N)
+if(N EQUAL 0)
+    set(N 8)
 endif()

-if (WIN32)
-    ExternalProject_Add(
-        ext_protobuf
-        PREFIX protobuf
-        GIT_REPOSITORY ${NGRAPH_PROTOBUF_GIT_REPO_URL}
-        GIT_TAG ${NGRAPH_PROTOBUF_GIT_TAG}
-        UPDATE_COMMAND ""
-        PATCH_COMMAND ""
-        CMAKE_GENERATOR ${CMAKE_GENERATOR}
-        CMAKE_GENERATOR_PLATFORM ${CMAKE_GENERATOR_PLATFORM}
-        CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET}
-        CMAKE_ARGS
-            ${NGRAPH_FORWARD_CMAKE_ARGS}
-            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-            -DCMAKE_CXX_FLAGS=${CMAKE_ORIGINAL_CXX_FLAGS}
-            -Dprotobuf_MSVC_STATIC_RUNTIME=OFF
-            -Dprotobuf_WITH_ZLIB=OFF
-            -Dprotobuf_BUILD_TESTS=OFF
-            -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/protobuf
-        TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/tmp"
-        STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/stamp"
-        DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/download"
-        SOURCE_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/src"
-        SOURCE_SUBDIR "cmake"
-        BINARY_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/build"
-        INSTALL_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf"
-        EXCLUDE_FROM_ALL TRUE
-        BUILD_BYPRODUCTS ${Protobuf_PROTOC_EXECUTABLE} ${Protobuf_LIBRARY}
-    )
-elseif (APPLE)
-    # Don't manually set compiler on macos since it causes compile error on macos >= 10.14
-    ExternalProject_Add(
-        ext_protobuf
-        PREFIX protobuf
-        GIT_REPOSITORY ${NGRAPH_PROTOBUF_GIT_REPO_URL}
-        GIT_TAG ${NGRAPH_PROTOBUF_GIT_TAG}
-        UPDATE_COMMAND ""
-        PATCH_COMMAND ""
-        CONFIGURE_COMMAND ./autogen.sh COMMAND ./configure --prefix=${EXTERNAL_PROJECTS_ROOT}/protobuf --disable-shared
-        BUILD_COMMAND ${MAKE_UTIL} "CXXFLAGS=-std=c++${NGRAPH_CXX_STANDARD} -fPIC"
-        TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/tmp"
-        STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/stamp"
-        DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/download"
-        SOURCE_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/src"
-        BINARY_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/src"
-        INSTALL_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf"
-        EXCLUDE_FROM_ALL TRUE
-        BUILD_BYPRODUCTS ${Protobuf_PROTOC_EXECUTABLE} ${Protobuf_LIBRARY}
-        )
+# Two ways for building protobuf
+# 1. CMake ( WIN32 or cross compiling )
+# 2. autogen.sh -> configure -> make
+if(WIN32 OR (NOT WIN32 AND NOT APPLE AND (PROTOC_VERSION VERSION_GREATER "3.0") AND CMAKE_CROSSCOMPILING))
+    set(PROTOBUF_CMAKE_ARGS
+        ${NGRAPH_FORWARD_CMAKE_ARGS}
+        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+        -DCMAKE_CXX_FLAGS=${CMAKE_ORIGINAL_CXX_FLAGS}
+        -Dprotobuf_MSVC_STATIC_RUNTIME=OFF
+        -Dprotobuf_WITH_ZLIB=OFF
+        -Dprotobuf_BUILD_TESTS=OFF
+        -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/protobuf)
+    execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}"
+        -DCMAKE_GENERATOR_PLATFORM:STRING=${CMAKE_GENERATOR_PLATFORM}
+        -DCMAKE_GENERATOR_TOOLSET:STRING=${CMAKE_GENERATOR_TOOLSET}
+        ${PROTOBUF_CMAKE_ARGS}
+        "${ext_protobuf_SOURCE_DIR}/cmake"
+        WORKING_DIRECTORY "${ext_protobuf_BINARY_DIR}")
+    if("${CMAKE_GENERATOR}" STREQUAL "Unix Makefiles")
+        execute_process(COMMAND "${CMAKE_COMMAND}" --build . -- -j${N}
+            WORKING_DIRECTORY "${ext_protobuf_BINARY_DIR}")
+    else()
+        execute_process(COMMAND "${CMAKE_COMMAND}" --build .
+            WORKING_DIRECTORY "${ext_protobuf_BINARY_DIR}")
+    endif()
+    set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${EXTERNAL_PROJECTS_ROOT}/protobuf)
 else()
-    if (DEFINED NGRAPH_USE_CXX_ABI)
+    if ((NOT APPLE) AND DEFINED NGRAPH_USE_CXX_ABI)
         set(BUILD_FLAGS "CXXFLAGS=-std=c++${NGRAPH_CXX_STANDARD} -fPIC -D_GLIBCXX_USE_CXX11_ABI=${NGRAPH_USE_CXX_ABI}")
     else()
         set(BUILD_FLAGS "CXXFLAGS=-std=c++${NGRAPH_CXX_STANDARD} -fPIC")
     endif()
-
-    if(PROTOC_VERSION VERSION_GREATER "3.0" AND CMAKE_CROSSCOMPILING)
-        ExternalProject_Add(
-            ext_protobuf
-            PREFIX protobuf
-            GIT_REPOSITORY ${NGRAPH_PROTOBUF_GIT_REPO_URL}
-            GIT_TAG ${NGRAPH_PROTOBUF_GIT_TAG}
-            UPDATE_COMMAND ""
-            PATCH_COMMAND ""
-            CMAKE_GENERATOR ${CMAKE_GENERATOR}
-            CMAKE_GENERATOR_PLATFORM ${CMAKE_GENERATOR_PLATFORM}
-            CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET}
-            CMAKE_ARGS
-                ${NGRAPH_FORWARD_CMAKE_ARGS}
-                -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-                -DCMAKE_CXX_FLAGS=${CMAKE_ORIGINAL_CXX_FLAGS}
-                -Dprotobuf_WITH_ZLIB=OFF
-                -Dprotobuf_BUILD_TESTS=OFF
-                -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/protobuf
-            TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/tmp"
-            STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/stamp"
-            DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/download"
-            SOURCE_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/src"
-            SOURCE_SUBDIR "cmake"
-            BINARY_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/build"
-            INSTALL_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf"
-            EXCLUDE_FROM_ALL TRUE
-            BUILD_BYPRODUCTS ${Protobuf_PROTOC_EXECUTABLE} ${Protobuf_LIBRARY}
-            )
+    execute_process(COMMAND ./autogen.sh WORKING_DIRECTORY ${ext_protobuf_SOURCE_DIR})
+    # Don't manually set compiler on macos since it causes compile error on macos >= 10.14
+    if (APPLE)
+        execute_process(COMMAND ${ext_protobuf_SOURCE_DIR}/configure ${PROTOBUF_SYSTEM_PROTOC} ${PROTOBUF_SYSTEM_PROCESSOR} SDKROOT=${CMAKE_OSX_SYSROOT} --prefix=${ext_protobuf_BINARY_DIR} --disable-shared WORKING_DIRECTORY ${ext_protobuf_BINARY_DIR})
+        execute_process(COMMAND make -j${N} SDKROOT=${CMAKE_OSX_SYSROOT} "${BUILD_FLAGS}" install WORKING_DIRECTORY ${ext_protobuf_BINARY_DIR})
     else()
-        ExternalProject_Add(
-            ext_protobuf
-            PREFIX protobuf
-            GIT_REPOSITORY ${NGRAPH_PROTOBUF_GIT_REPO_URL}
-            GIT_TAG ${NGRAPH_PROTOBUF_GIT_TAG}
-            UPDATE_COMMAND ""
-            PATCH_COMMAND ""
-            CONFIGURE_COMMAND ./autogen.sh COMMAND ./configure ${PROTOBUF_SYSTEM_PROTOC} ${PROTOBUF_SYSTEM_PROCESSOR} CXX=${CMAKE_CXX_COMPILER} --prefix=${EXTERNAL_PROJECTS_ROOT}/protobuf --disable-shared
-            BUILD_COMMAND ${MAKE_UTIL} "${BUILD_FLAGS}"
-            TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/tmp"
-            STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/stamp"
-            DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/download"
-            SOURCE_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/src"
-            BINARY_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/src"
-            INSTALL_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf"
-            EXCLUDE_FROM_ALL TRUE
-            BUILD_BYPRODUCTS ${Protobuf_PROTOC_EXECUTABLE} ${Protobuf_LIBRARY}
-            )
+        execute_process(COMMAND ${ext_protobuf_SOURCE_DIR}/configure ${PROTOBUF_SYSTEM_PROTOC} ${PROTOBUF_SYSTEM_PROCESSOR} CXX=${CMAKE_CXX_COMPILER} --prefix=${ext_protobuf_BINARY_DIR} --disable-shared WORKING_DIRECTORY ${ext_protobuf_BINARY_DIR})
+        execute_process(COMMAND make -j${N} "${BUILD_FLAGS}" install WORKING_DIRECTORY ${ext_protobuf_BINARY_DIR})
     endif()
+    set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${ext_protobuf_BINARY_DIR})
 endif()
-
-# -----------------------------------------------------------------------------
-# Use the interface of FindProtobuf.cmake
-# -----------------------------------------------------------------------------
-
-if (NOT TARGET protobuf::libprotobuf)
-    add_library(protobuf::libprotobuf UNKNOWN IMPORTED)
-    set_target_properties(protobuf::libprotobuf PROPERTIES
-        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}"
-        IMPORTED_LOCATION "${Protobuf_LIBRARY}")
-    add_dependencies(protobuf::libprotobuf ext_protobuf)
+find_package(Protobuf ${PROTOC_VERSION} REQUIRED)
+if (NOT Protobuf_FOUND)
+    message(FATAL_ERROR "Protobuf is needed but was not found")
 endif()
-set(Protobuf_LIBRARIES protobuf::libprotobuf)
-
-if (NOT TARGET protobuf::protoc)
-    add_executable(protobuf::protoc IMPORTED)
-    set_target_properties(protobuf::protoc PROPERTIES
-        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Protobuf_PROTOC_EXECUTABLE}"
-        IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}")
-    add_dependencies(protobuf::protoc ext_protobuf)
-endif()
-
-set(Protobuf_FOUND TRUE)
-set(PROTOBUF_FOUND TRUE)


[cmake] define ENABLE_ALUGRID unconditionally if alugrid was found

--- cmake/modules/GridUtils.cmake
+++ cmake/modules/GridUtils.cmake
@@ -60,10 +60,6 @@

 endif(CMAKE_WITH_AUTOTOOLS)

-
-if(${GRIDTYPE} MATCHES "ALUGRID")
-  if(NOT ALUGRID_FOUND)
-    message( FATAL_ERROR "Gridtype ${GRIDTYPE} requested, but alugrid was not found!" )
-  endif(NOT ALUGRID_FOUND)
+if(ALUGRID_FOUND)
   add_definitions("-DENABLE_ALUGRID=1")
-endif(${GRIDTYPE} MATCHES "ALUGRID")
+endif(ALUGRID_FOUND)


Install segwayrmp_gui when it is built

Install segwayrmp_gui when it is built

--- cmake/segwayrmp_targets.cmake
+++ cmake/segwayrmp_targets.cmake
@@ -1,7 +1,13 @@
 ## This file setups the targets like install and uninstall

+set(${PROJECT_NAME}_targets_to_install segwayrmp)
+# If the GUI is built, install it
+if (TARGET segwayrmp_gui)
+  list(APPEND ${PROJECT_NAME}_targets_to_install segwayrmp_gui)
+endif()
+
 install(
-  TARGETS segwayrmp
+  TARGETS ${${PROJECT_NAME}_targets_to_install}
   RUNTIME DESTINATION bin
   LIBRARY DESTINATION lib
   ARCHIVE DESTINATION lib
@@ -18,7 +24,7 @@
   @ONLY
 )
 install(
-  FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/libsegwayrmpConfig.cmake
+  FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/libsegwayrmpConfig.cmake
   DESTINATION share/libsegwayrmp
 )


Add OpenMeshTool library in OPENMESH_LIBRARIES

--- cmake/submoduleOpenMesh.cmake
+++ cmake/submoduleOpenMesh.cmake
@@ -1,21 +1,29 @@
 if(${RADIUM_SUBMODULES_BUILD_TYPE} MATCHES Debug)
     set(OPENMESHLIBNAME OpenMeshCored)
+    set(OPENMESHTOOLLIBNAME OpenMeshToold)
 else()
     set(OPENMESHLIBNAME OpenMeshCore)
+    set(OPENMESHTOOLLIBNAME OpenMeshTool)
 endif()

 # ----------------------------------------------------------------------------------------------------------------------
 set( OPENMESH_INCLUDE_DIR ${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/include )
 if( APPLE )
-    set( OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshCore.dylib")
+    set( OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshCore.dylib"
+                            "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshTools.dylib")
 elseif ( UNIX )
-    set( OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshCore.so")
+    set( OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshCore.so"
+                            "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshTools.so")
 elseif (MINGW)
-    set( OPENMESH_DLL "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/libOpenMeshCore.dll")
-    set( OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshCore.dll.a")
+    set( OPENMESH_DLL "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/libOpenMeshCore.dll"
+                      "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshTools.dll")
+    set( OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshCore.dll.a"
+                            "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshTools.dll.a")
 elseif( MSVC )
-    set(OPENMESH_DLL "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/${OPENMESHLIBNAME}.dll")
-    set(OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/${OPENMESHLIBNAME}.lib")
+    set(OPENMESH_DLL "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/${OPENMESHLIBNAME}.dll"
+                     "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/${OPENMESHTOOLLIBNAME}.dll")
+    set(OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/${OPENMESHLIBNAME}.lib"
+                           "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/${OPENMESHTOOLLIBNAME}.lib")
 endif()


Quiet search for VTK

Quiet search for VTK

--- cmakemodules/script_vtk.cmake
+++ cmakemodules/script_vtk.cmake
@@ -5,7 +5,7 @@
 OPTION(DISABLE_VTK "Force not using VTK libs" "OFF")
 MARK_AS_ADVANCED(DISABLE_VTK)
 IF(NOT DISABLE_VTK)
-	FIND_PACKAGE(VTK)
+	FIND_PACKAGE(VTK QUIET)
 	IF (VTK_FOUND)
 		SET(CMAKE_MRPT_HAS_VTK 1)
 	ENDIF()


Fix testing macros.

Fix testing macros.

add_test_python() and add_test_python1() had incorrect logic due to which even
when the macros were called with no baseline directory specified, they would
still add arguments to check baselines. That was causing some new tests (viz.
pointsPrecisions) to fail since they didn't expect those command line arguments.
This address that issue.

Change-Id: Idd558afc8bdacb25ff928460efb482716097d347

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -166,7 +166,8 @@
     get_filename_component(TName ${ARGV0} NAME_WE)
     string (REPLACE "vtk" "" _baselinedname ${vtk-module})
     # Check if data root and second parameter is present
-    if(VTK_DATA_ROOT AND NOT ARGV1)
+    set (base_dir "${ARGV1}")
+    if(VTK_DATA_ROOT AND base_dir)
       add_test(NAME ${vtk-module}Python-${TName}
         COMMAND ${VTK_PYTHON_EXE}
         ${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py/rtImageTest.py
@@ -203,7 +204,8 @@
     get_filename_component(TName ${ARGV0} NAME_WE)
     string (REPLACE "vtk" "" _baselinedname ${vtk-module})
     # Check if data root and second parameter is present
-    if(VTK_DATA_ROOT AND NOT ARGV1)
+    set (base_dir "${ARGV1}")
+    if(VTK_DATA_ROOT AND base_dir)
       add_test(NAME ${vtk-module}Python-${TName}
         COMMAND ${VTK_PYTHON_EXE}
         ${CMAKE_CURRENT_SOURCE_DIR}/${TName}.py
@@ -231,7 +233,8 @@
     get_filename_component(TName ${ARGV0} NAME_WE)
     string (REPLACE "vtk" "" _baselinedname ${vtk-module})
     # Check if data root and second parameter is present
-    if(VTK_DATA_ROOT AND NOT ARGV1)
+    set (base_dir "${ARGV1}")
+    if(VTK_DATA_ROOT AND base_dir)
       add_test(NAME ${vtk-module}Tcl-${TName}
         COMMAND ${VTK_TCL_EXE}
         ${vtkTestingRendering_SOURCE_DIR}/rtImageTest.tcl


Remove un-needed code.

Remove un-needed code.

--- lib/OpenCogAtomTypes.cmake
+++ lib/OpenCogAtomTypes.cmake
@@ -36,17 +36,8 @@
 ENDIF (NOT PYTHON_FILE)

-# Check if this is for opencog/atomspace directory. If so, do not reference opencog::classserver()
-# to avoid infinit recursivity in ClassServer constructor.
-STRING(REGEX MATCH ".*/opencog/atomspace" OPENCOG_ATOMSPACE_MATCHED "${CMAKE_CURRENT_SOURCE_DIR}")
-IF (OPENCOG_ATOMSPACE_MATCHED)
-    SET(CLASSSERVER_REFERENCE "")
-    SET(CLASSSERVER_INSTANCE "")
-ELSE (OPENCOG_ATOMSPACE_MATCHED)
-    SET(CLASSSERVER_REFERENCE "opencog::classserver().")
-    SET(CLASSSERVER_INSTANCE "opencog::classserver()")
-ENDIF (OPENCOG_ATOMSPACE_MATCHED)
-#MESSAGE(STATUS "CLASSSERVER_REFERENCE=${CLASSSERVER_REFERENCE}")
+SET(CLASSSERVER_REFERENCE "opencog::classserver().")
+SET(CLASSSERVER_INSTANCE "opencog::classserver()")

 FILE(WRITE "${HEADER_FILE}" "/* File automatically generated by the macro OPENCOG_ADD_ATOM_TYPES. Do not edit */\n")
 FILE(APPEND "${HEADER_FILE}"  "#include <opencog/atoms/base/types.h>\nnamespace opencog\n{\n")


huge bug correction: MKL multithreading problem when confusing iomp5 & gomp

--- lib/TH/cmake/FindMKL.cmake
+++ lib/TH/cmake/FindMKL.cmake
@@ -47,14 +47,15 @@
   SET(iccvers "ia32")
   SET(mkl64s)
 ENDIF ("${SIZE_OF_VOIDP}" EQUAL 8)
-IF (CMAKE_COMPILER_IS_GNUCC)
+IF(CMAKE_COMPILER_IS_GNUCC)
   SET(mklthreads "mkl_gnu_thread" "mkl_intel_thread")
   SET(mklifaces  "gf" "intel")
-ELSE (CMAKE_COMPILER_IS_GNUCC)
+  SET(mklrtls)
+ELSE(CMAKE_COMPILER_IS_GNUCC)
   SET(mklthreads "mkl_intel_thread")
   SET(mklifaces  "intel")
+  SET(mklrtls "iomp5" "guide")
 ENDIF (CMAKE_COMPILER_IS_GNUCC)
-SET(mklrtls "iomp5" "guide")

 # Kernel libraries dynamically loaded
 SET(mklkerlibs "mc" "mc3" "nc" "p4n" "p4m" "p4m3" "p4p" "def")
@@ -140,7 +141,7 @@
 IF (NOT MKL_LIBRARIES)
   SET(MKL_VERSION 1011)
 ENDIF (NOT MKL_LIBRARIES)
-FOREACH(mklrtl ${mklrtls})
+FOREACH(mklrtl ${mklrtls} "")
   FOREACH(mkliface ${mklifaces})
     FOREACH(mkl64 ${mkl64s} "")
       FOREACH(mklthread ${mklthreads})
@@ -152,7 +153,7 @@
     ENDFOREACH(mkl64)
   ENDFOREACH(mkliface)
 ENDFOREACH(mklrtl)
-FOREACH(mklrtl ${mklrtls})
+FOREACH(mklrtl ${mklrtls} "")
   FOREACH(mkliface ${mklifaces})
     FOREACH(mkl64 ${mkl64s} "")
       IF (NOT MKL_LIBRARIES)
@@ -165,7 +166,7 @@
     ENDFOREACH(mkl64)
   ENDFOREACH(mkliface)
 ENDFOREACH(mklrtl)
-FOREACH(mklrtl ${mklrtls})
+FOREACH(mklrtl ${mklrtls} "")
   FOREACH(mkliface ${mklifaces})
     FOREACH(mkl64 ${mkl64s} "")
       FOREACH(mklthread ${mklthreads})


fixing avx checks

fixing avx checks


updated test data hash tag

updated test data hash tag

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag e44055a4)
+  set(revision_tag 5e38bebf)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Use HTTPS protocol instead of SSH

Use HTTPS protocol instead of SSH

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -18,7 +18,7 @@

   ExternalProject_Add(${proj}
     SOURCE_DIR ${proj}
-    GIT_REPOSITORY ssh://git@phabricator.mitk.org:2222/diffusion/MD/mitk-data.git
+    GIT_REPOSITORY https://phabricator.mitk.org/source/mitkdata.git
     GIT_TAG ${revision_tag}
 #   URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/mitk-data_${revision_tag}.tar.gz
     UPDATE_COMMAND ""


Fix symbol defines in config.h.cmake

Fix symbol defines in config.h.cmake

These were incorrectly pointing to HAVE_LOG despite being checked for
correctly in config-ix.cmake.

Patch by James Lyon!

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -129,13 +129,13 @@
 #cmakedefine HAVE_LOG10 ${HAVE_LOG10}

 /* Define to 1 if you have the `exp' function. */
-#cmakedefine HAVE_EXP ${HAVE_LOG}
+#cmakedefine HAVE_EXP ${HAVE_EXP}

 /* Define to 1 if you have the `exp2' function. */
-#cmakedefine HAVE_EXP2 ${HAVE_LOG2}
+#cmakedefine HAVE_EXP2 ${HAVE_EXP2}

 /* Define to 1 if you have the `exp10' function. */
-#cmakedefine HAVE_EXP10 ${HAVE_LOG10}
+#cmakedefine HAVE_EXP10 ${HAVE_EXP10}

 /* Define to 1 if you have the `fmodf' function. */
 #cmakedefine HAVE_FMODF ${HAVE_FMODF}


stop using legacy pre-cxx11 ABI on GCC Linux

--- toolchains/linux.toolchain.cmake
+++ toolchains/linux.toolchain.cmake
@@ -41,11 +41,6 @@
         add_compile_options( -static )
         link_libraries( -static-libstdc++ -static-libgcc )
     endif()
-
-    add_definitions(
-        -D__STDC_FORMAT_MACROS
-        -D_GLIBCXX_USE_CXX11_ABI=0
-    )
 endif()

 set( TNUN_arch_include_dir "${CMAKE_CURRENT_LIST_DIR}/linux" )


disable output compression since this feature seems to be broken

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -146,7 +146,7 @@
 endif(NOT EIGEN_NO_UPDATE)

 # which ctest command to use for running the dashboard
-SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE}")
+SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE} --no-compress-output")
 if($ENV{EIGEN_CTEST_ARGS})
 SET (CTEST_COMMAND "${CTEST_COMMAND} $ENV{EIGEN_CTEST_ARGS}")
 endif($ENV{EIGEN_CTEST_ARGS})


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -4,6 +4,7 @@
 Comment[bs]=Korisnički interfejs za konfiguraciju korisničkih naloga koristeći sipzmenadžer konekcja.
 Comment[ca]=Interfície d'usuari de configuració de compte personalitzat per comptes que utilitzen el gestor de connexions Sipe.
 Comment[cs]=Vlastní uživatelské rozhraní nastavení účtů pro účty používající správce spojení sipe.
+Comment[da]=Brugerflade til brugertilpasset kontokonfiguration til konti der bruger forbindelseshåndteringen Sipe.
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Sipe-Verbindungsverwaltung verwenden.
 Comment[fi]=Sipe-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
 Comment[fr]=Interface utilisateur personnalisée pour la configuration de comptes en utilisant le gestionnaire de connexions « sipe ».
@@ -16,6 +17,10 @@
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Sipe.
 Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Sipe.
 Comment[sl]=Uporabniški vmesnik za prilagoditev računov, ki uporabljajo upravljalnik povezav Sipe.
+Comment[sr]=Корисничко сучеље за подешавање посебних налога под менаџером везе Сајп.
+Comment[sr@ijekavian]=Корисничко сучеље за подешавање посебних налога под менаџером везе Сајп.
+Comment[sr@ijekavianlatin]=Korisničko sučelje za podešavanje posebnih naloga pod menadžerom veze SIPE.
+Comment[sr@latin]=Korisničko sučelje za podešavanje posebnih naloga pod menadžerom veze SIPE.
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Sipe.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями sipe.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the sipe connection manager.xx
@@ -24,6 +29,7 @@
 Name[bs]=Korisnički interfejs za konfiguraciju korisničkih naloga Sipe
 Name[ca]=Interfície d'usuari de configuració de compte de Sipe
 Name[cs]=Uživatelské rozhraní nastavení účtu Sipe
+Name[da]=Brugerflade til Sipe kontokonfiguration
 Name[de]=Benutzeroberfläche zur Einrichtung von Sipe-Zugängen
 Name[fi]=Sipe-tilinmäärityksen käyttöliittymä
 Name[fr]=Interface utilisateur pour la configuration de comptes « sipe ».
@@ -36,6 +42,10 @@
 Name[pt_BR]=Interface de configuração de contas do Sipe
 Name[sk]=Používateľské rozhranie konfigurácie účtu Sipe
 Name[sl]=Uporabniški vmesnik za nastavitev računov Sipe
+Name[sr]=Корисничко сучеље за подешавање налога под Сајпом
+Name[sr@ijekavian]=Корисничко сучеље за подешавање налога под Сајпом
+Name[sr@ijekavianlatin]=Korisničko sučelje za podešavanje naloga pod SIPE‑om
+Name[sr@latin]=Korisničko sučelje za podešavanje naloga pod SIPE‑om
 Name[sv]=Användargränssnitt för inställning av Sipe-konton
 Name[uk]=Інтерфейс користувача для налаштовування sipe
 Name[x-test]=xxSipe Account Configuration User Interfacexx


Applied all macro to all compilers macro

--- build/macros.cmake
+++ build/macros.cmake
@@ -255,11 +255,9 @@
 macro(replace_or_append_all_flag_compilers _vc_regex_str _gcc_regex_str _vc_flag_str _gcc_flag_str)
 	get_compiler_name(COMPILER)
 	if(COMPILER MATCHES "vc")
-		replace_or_append_compiler_flag(CMAKE_CXX_FLAGS ${_vc_regex_str} ${_vc_flag_str})
-		replace_or_append_compiler_flag(CMAKE_C_FLAGS ${_vc_regex_str} ${_vc_flag_str})
-	elseif(COMPILER MATCHES "gcc")
-		replace_or_append_compiler_flag(CMAKE_CXX_FLAGS ${_gcc_regex_str} ${_gcc_flag_str})
-		replace_or_append_compiler_flag(CMAKE_C_FLAGS ${_gcc_regex_str} ${_gcc_flag_str})
+		replace_or_append_all_flag(${_vc_regex_str} ${_vc_flag_str})
+	elseif(COMPILER MATCHES "gcc")
+		replace_or_append_all_flag(${_gcc_regex_str} ${_gcc_flag_str})
 	else()
 		message(FATAL_ERROR "Error: Only MSVC and GCC supported")
 	endif()


--- 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[ca@valencia]=Missatgeria instantània
 Name[cs]=Instant Messaging
 Name[da]=Instant messaging
 Name[de]=Instant-Messaging
@@ -26,6 +27,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[ca@valencia]=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[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
 Comment[de]=Chats mit ihren Kontakten starten oder Ihren IM-Status ändern


dts: tell compiler the name of dependency file for output

When generating the dependency file for DTS (${BOARD}.dts.pre.d),
some toolchains would use the source file for the file name stem.
So, the resulting dependency file is empty_file.d instead of one
with the board name. Fix this by passing -MF to explicitly tell
the compiler the name of the dependency file.

Signed-off-by: Daniel Leung <d94e04d205b5962d7873a139ef298b03c1717f72@intel.com>

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -126,6 +126,7 @@
     -P
     -E   # Stop after preprocessing
     -MD  # Generate a dependency file as a side-effect
+    -MF ${BOARD}.dts.pre.d
     -o ${BOARD}.dts.pre.tmp
     ${ZEPHYR_BASE}/misc/empty_file.c
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}


fixed matlab check

fixed matlab check

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

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -25,7 +25,7 @@
   #    as well as all of the mexopts

   find_program(matlab matlab)
-  if ( matlab-NOTFOUND )
+  if ( NOT matlab )
      message(FATAL_ERROR "Could not find matlab executable")
   endif()
   execute_process(COMMAND ${matlab} -n COMMAND grep -e "MATLAB \\+=" COMMAND cut -d "=" -f2 OUTPUT_VARIABLE _matlab_root)


added support for MKL SDL link

added support for MKL SDL link

--- lib/TH/cmake/FindMKL.cmake
+++ lib/TH/cmake/FindMKL.cmake
@@ -136,6 +136,11 @@
   ENDIF(_libraries_work)
 ENDMACRO(CHECK_ALL_LIBRARIES)

+# SDL
+IF (NOT MKL_LIBRARIES)
+  CHECK_ALL_LIBRARIES(MKL_LIBRARIES cblas_sgemm
+    "mkl_rt;iomp5" "")
+ENDIF (NOT MKL_LIBRARIES)

 # Check for version 10/11
 IF (NOT MKL_LIBRARIES)


cflags

cflags

--- cmake/CFlags.cmake
+++ cmake/CFlags.cmake
@@ -1,6 +1,9 @@
 set(CMAKE_CXX_FLAGS "-std=c++0x -ftemplate-depth=500 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall -pedantic ${CMAKE_CXX_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS "-lprotobuf ${CMAKE_EXE_LINKER_FLAGS}")
+set(CMAKE_C_FLAGS "-std=c11 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall -pedantic ${CMAKE_C_FLAGS}")

+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lprotobuf -lz -lpthread")
+
+set(CMAKE_C_FLAGS_DEBUG "-g -fsanitize=address -fsanitize=memory -Qunused-arguments ${CMAKE_CXX_FLAGS_DEBUG}")
 set(CMAKE_CXX_FLAGS_DEBUG "-g -fsanitize=address -fsanitize=memory -Qunused-arguments ${CMAKE_CXX_FLAGS_DEBUG}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-fsanitize=address -fsanitize=memory ${CMAKE_EXE_LINKER_FLAGS_DEBUG}")


Minor tidy up for clang-tidy around CMake if statements.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -74,7 +74,7 @@
 endfunction()

 function(CONFIGURE_CLANG_AND_CLANG_TIDY_SETTINGS _TARGET)
-  if(   "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"
+  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"
      OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
     # The full list of diagnostic flags in Clang can be found at
     # https://clang.llvm.org/docs/DiagnosticsReference.html
@@ -102,7 +102,7 @@
     )
   endif()

-  if(CLANG_TIDY_EXE)
+  if(CLANG_TIDY_AVAILABLE)
     if(NOT "${_TARGET}" STREQUAL "cellml")
         set(_NO_CPPCOREGUIDELINES_PRO_TYPE_VARARG -cppcoreguidelines-pro-type-vararg)
         set(_NO_CPPCOREGUIDELINES_SPECIAL_MEMBER_FUNCTIONS -cppcoreguidelines-special-member-functions)


Add detect redhat and unknown in CMake

Add detect redhat and unknown in CMake

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -30,6 +30,10 @@
                 SET(HOST_SYSTEM "debian")
             ELSEIF(LINUX_ISSUE MATCHES "Ubuntu")
                 SET(HOST_SYSTEM "ubuntu")
+            ELSEIF(LINUX_ISSUE MATCHES "Red Hat")
+                SET(HOST_SYSTEM "redhat")
+            ELSEIF(LINUX_ISSUE MATCHES "Fedora")
+                SET(HOST_SYSTEM "fedora")
             ENDIF()
         ENDIF(EXISTS "/etc/issue")

@@ -39,6 +43,10 @@
                 SET(HOST_SYSTEM "centos")
             ENDIF()
         ENDIF(EXISTS "/etc/redhat-release")
+
+        IF(NOT HOST_SYSTEM)
+            SET(HOST_SYSTEM "unknown")
+        ENDIF()

     ENDIF(APPLE)
 ENDIF(WIN32)


BUG: Compute default values for OSX vars by detecting qmake libs

--- CMake/TubeTKBlockSetCMakeOSXVariables.cmake
+++ CMake/TubeTKBlockSetCMakeOSXVariables.cmake
@@ -97,22 +97,14 @@
     string(REGEX MATCH "MacOSX([0-9]+\\.[0-9]+)\\.sdk" _match "${CMAKE_OSX_SYSROOT}")
     set(SDK_VERSION "${CMAKE_MATCH_1}")
     if( "${SDK_VERSION}" VERSION_GREATER "10.8" )
-      # add to cache to allow interactive editing after fatal error
-      set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE PATH "Deployment target needs to be explicitly set." FORCE)
-      message(FATAL_ERROR
-        "The OSX_SYSROOT is set to version ${SDK_VERSION} (>10.8) and OSX_DEPLOYMENT_TARGET is not explicitly set!\n"
-        "Since:\n"
-        " (1) the default runtime associated with >=10.9 deployment target is 'libc++'.[1]\n"
-        " (2) the default runtime associated with <=10.8 deployment target is 'libstdc++'.\n"
-        " (3) Qt support for 'macx-clang-libc++' is listed as 'unsupported' mkspecs.\n"
-        " (4) Qt binaries may be build against 'libstdc++' or 'libc++'.\n"
-        " (5) Mixing the two different runtime in binaries is unstable.\n"
-        "  [1]http://stackoverflow.com/questions/19637164/c-linking-error-after-upgrading-to-mac-os-x-10-9-xcode-5-0-1/19637199#19637199\n"
-        "--------------------------------\n"
-        "Run '$otool -L $(which qmake) |grep lib.\\*c++' to check what library Qt is built against:\n"
-        " (1) if it is libstdc++ then add '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.8' (or older) to the cmake command line.\n"
-        " (2) if it is libc++ then add '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9' (or newer) to the cmake command line.\n"
-        )
+      execute_process( COMMAND "otool -L $QT_QMAKE_COMMAND | grep stdc"
+        OUTPUT_VARIABLE QMAKE_USE_STDC
+        OUTPUT_STRIP_TRAILING_WHITESPACE )
+      if( "x${QMAKE_USE_STDC}x" strequal "xx" )
+        set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE PATH "Deployment target needs to be explicitly set." FORCE)
+      else()
+        set(CMAKE_OSX_DEPLOYMENT_TARGET "${SDK_VERSION}" CACHE PATH "Deployment target needs to be explicitly set." FORCE)
+      endif()
     endif()
   endif()


[sourcekitd] Use add_llvm_symbol_exports instead of our old copy

Reduces duplication with llvm and, more importantly, gives us Linux
support via a linker script. This will let us link libsourcekitdInProc
in binaries that have their own copy of llvm symbols on Linux, and let
sourcekit-lsp stop using dlopen with `RTLD_DEEPBIND`, which fixes
running with asan among other things.

--- tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
+++ tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
@@ -1,41 +1,3 @@
-
-function(add_sourcekit_symbol_exports target_name export_file)
-  # Makefile.rules contains special cases for different platforms.
-  # We restrict ourselves to Darwin for the time being.
-  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
-    add_custom_command(OUTPUT symbol.exports
-      COMMAND sed -e "s/^/_/" < ${export_file} > symbol.exports
-      DEPENDS ${export_file}
-      VERBATIM
-      COMMENT "Creating export file for ${target_name}")
-    add_custom_target(${target_name}_exports DEPENDS symbol.exports)
-    set_property(DIRECTORY APPEND
-      PROPERTY ADDITIONAL_MAKE_CLEAN_FILES symbol.exports)
-    set_target_properties(${target_name}_exports PROPERTIES
-      FOLDER "SourceKit libraries")
-
-    get_property(srcs TARGET ${target_name} PROPERTY SOURCES)
-    foreach(src ${srcs})
-      get_filename_component(extension ${src} EXT)
-      if(extension STREQUAL ".cpp")
-        set(first_source_file ${src})
-        break()
-      endif()
-    endforeach()
-
-    # Force re-linking when the exports file changes. Actually, it
-    # forces recompilation of the source file. The LINK_DEPENDS target
-    # property only works for makefile-based generators.
-    set_property(SOURCE ${first_source_file} APPEND PROPERTY
-      OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/symbol.exports)
-
-    set_property(TARGET ${target_name} APPEND_STRING PROPERTY
-                 LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/symbol.exports")
-
-    add_dependencies(${target_name} ${target_name}_exports)
-  endif()
-endfunction()
-
 # Add default compiler and linker flags to 'target'.
 #
 # FIXME: this is a HACK.  All SourceKit CMake code using this function should be
@@ -155,7 +117,7 @@
   swift_common_llvm_config(${name} ${SOURCEKITLIB_LLVM_LINK_COMPONENTS})

   if(SOURCEKITLIB_SHARED AND EXPORTED_SYMBOL_FILE)
-    add_sourcekit_symbol_exports(${name} ${EXPORTED_SYMBOL_FILE})
+    add_llvm_symbol_exports(${name} ${EXPORTED_SYMBOL_FILE})
   endif()

   if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
@@ -302,7 +264,7 @@
   swift_common_llvm_config(${name} ${SOURCEKITFW_LLVM_LINK_COMPONENTS})

   if (EXPORTED_SYMBOL_FILE)
-    add_sourcekit_symbol_exports(${name} ${EXPORTED_SYMBOL_FILE})
+    add_llvm_symbol_exports(${name} ${EXPORTED_SYMBOL_FILE})
   endif()

   if(SOURCEKITFW_MODULEMAP)


Fix find OSS CMake module.

Fix find OSS CMake module.

--- CMake/Modules/FindOSS.cmake
+++ CMake/Modules/FindOSS.cmake
@@ -33,6 +33,6 @@
 find_file (OSS_USE_WORKAROUND_HEADER NAMES soundcard.h DOC "OSS use workaround header")

 include (FindPackageHandleStandardArgs)
-find_package_handle_standard_args (OSS REQUIRED_VARS OSS_INCLUDE_DIRS FAIL_MESSAGE "Could NOT find OSS development library")
+find_package_handle_standard_args (OSS REQUIRED_VARS OSS_LIBRARIES OSS_INCLUDE_DIRS FAIL_MESSAGE "Could NOT find OSS development library")

 mark_as_advanced (OSS_INCLUDE_DIRS OSS_LIBRARIES OSS_USE_WORKAROUND_HEADER)


Avoid trigging new builds of internal libusb

--- CMake/external_libusb.cmake
+++ CMake/external_libusb.cmake
@@ -6,7 +6,7 @@
     GIT_REPOSITORY "https://github.com/libusb/libusb.git"
     GIT_TAG "2a7372db54094a406a755f0b8548b614ba8c78ec" # "v1.0.22" + Mac get_device_list hang fix

-    UPDATE_COMMAND ${CMAKE_COMMAND} -E copy
+    UPDATE_COMMAND ${CMAKE_COMMAND} -E copy_if_different
             ${CMAKE_CURRENT_SOURCE_DIR}/third-party/libusb/CMakeLists.txt
             ${CMAKE_CURRENT_BINARY_DIR}/third-party/libusb/CMakeLists.txt
     PATCH_COMMAND ""


修复一处warning

修复一处warning

--- Template/CompilerOption.cmake
+++ Template/CompilerOption.cmake
@@ -19,7 +19,7 @@
 set(CXX_FLAGS_IN_ONE_COMMON "")

 # 编译器选项 (仅做了GCC、VC和Clang兼容)
-if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+if( ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
         add_definitions(-Wall -Werror -rdynamic -fPIC -D_POSIX_MT_ -D_FILE_OFFSET_BITS=64)

 	# gcc 4.9 编译输出颜色支持
@@ -40,7 +40,7 @@
                 message(STATUS "GCC Version ${CMAKE_CXX_COMPILER_VERSION} , using -std=gnu++0x.")
         endif()

-elseif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
         add_definitions(-Wall -Werror -fPIC -D_POSIX_MT_ -D_FILE_OFFSET_BITS=64)
         set(CXX_FLAGS_IN_ONE_COMMON "${C_FLAGS_IN_ONE_COMMON} -std=c++11")
         message(STATUS "CLang Version ${CMAKE_CXX_COMPILER_VERSION} , using -std=c++11.")


COMP: corrected md5 hash for windows

COMP: corrected md5 hash for windows

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -51,7 +51,7 @@
     endif()

     set(opencv_url ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/opencv-2.4.6.1.tar.gz)
-    set(opencv_url_md5 d756bfa460891697571d5c90050e1cfe)
+    set(opencv_url_md5 d41d8cd98f00b204e9800998ecf8427e)

     ExternalProject_Add(${proj}
       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src


set python versions according to MITK versions in internal python build

--- CMakeExternals/Python.cmake
+++ CMakeExternals/Python.cmake
@@ -139,6 +139,10 @@

     set(Python_DIR "${ep_prefix}")

+    # set versions, override
+    set(PYTHON_VERSION_MAJOR ${MITK_PYTHON_MAJOR_VERSION})
+    set(PYTHON_VERSION_MINOR ${MITK_PYTHON_MINOR_VERSION})
+
     if(UNIX)
       set(PYTHON_EXECUTABLE "${Python_DIR}/bin/python${CMAKE_EXECUTABLE_SUFFIX}")
       set(PYTHON_INCLUDE_DIR "${Python_DIR}/include/python${MITK_PYTHON_MAJOR_VERSION}.${MITK_PYTHON_MINOR_VERSION}")


--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -4,6 +4,7 @@
 Comment[cs]=Vlastní uživatelské rozhraní nastavení účtů pro účty používající správce spojení sipe.
 Comment[da]=Brugerflade til brugertilpasset kontokonfiguration til konti der bruger forbindelseshåndteringen sipe.
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Sipe-Verbindungsverwaltung verwenden.
+Comment[es]=Interfaz de configuración de cuentas personalizadas para las cuentas que usen el gestor de conexiones sipe.
 Comment[fi]=Sipe-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
 Comment[hu]=Egyedi beállítófelület a sipe kapcsolatkezelőt használó azonosítókhoz.
 Comment[ia]=Interfacie de usator pro configuration de conto personalisate pro contos usante le gerente de connexion Sipe.
@@ -26,6 +27,7 @@
 Name[cs]=Uživatelské rozhraní nastavení účtu Sipe
 Name[da]=Brugerflade til konfiguration af sipe-konto
 Name[de]=Benutzeroberfläche zur Einrichtung von Sipe-Zugängen
+Name[es]=Interfaz de configuración de cuentas Sipe
 Name[fi]=Sipe-tilinmäärityksen käyttöliittymä
 Name[hu]=Sipe azonosítóbeállító felület
 Name[ia]=Interfacie de usator de configuration de conto de Sipe


--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -6,6 +6,7 @@
 Comment[fi]=Sipe-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
 Comment[fr]=Interface utilisateur personnalisée pour la configuration de comptes en utilisant le gestionnaire de connexions « sipe ».
 Comment[lt]=Savito paskyros konfigūravimo naudotojo sąsaja paskyroms naudojant sipe ryšio tvarkyklę.
+Comment[nb]=Brukerflate for å sette opp egendefinerte kontoer ved bruk av sipe tilkoblingsbehandler.
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Sipe verbindingenbeheerder gebruiken.
 Comment[pl]=Własny interfejsu użytkownika konfiguracji kont dla kont wykorzystujących menadżera połączeń sipe.
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Sipe.
@@ -21,6 +22,7 @@
 Name[fi]=Sipe-tilinmäärityksen käyttöliittymä
 Name[fr]=Interface utilisateur pour la configuration de comptes « sipe ».
 Name[lt]=Sipe paskyros konfigūravimo naudotojo sąsaja
+Name[nb]=Brukerflate for å sette opp Sipe-konto
 Name[nl]=Gebruikersinterface voor Sipe accountconfiguratie
 Name[pl]=Interfejs użytkownika konfiguracji konta Sipe
 Name[pt]=Interface de Configuração de Contas do Sipe


Fixed a readability optimization in CMake code that broke IPv6 support.

--- configure.cmake
+++ configure.cmake
@@ -95,6 +95,14 @@
   CHECK_TYPE_SIZE("${type}" SIZEOF_${defbase})
   IF(SIZEOF_${defbase})
     SET(HAVE_${defbase} 1 PARENT_SCOPE)
+  ENDIF()
+ENDFUNCTION()
+
+# Same for structs, setting HAVE_STRUCT_<name> instead
+FUNCTION(MY_CHECK_STRUCT_SIZE type defbase)
+  CHECK_TYPE_SIZE("struct ${type}" SIZEOF_${defbase})
+  IF(SIZEOF_${defbase})
+    SET(HAVE_STRUCT_${defbase} 1 PARENT_SCOPE)
   ENDIF()
 ENDFUNCTION()

@@ -991,8 +999,8 @@
   SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} winsock2.h ws2ipdef.h)
 ENDIF()

-MY_CHECK_TYPE_SIZE("struct sockaddr_in6" SOCKADDR_IN6)
-MY_CHECK_TYPE_SIZE("struct in6_addr" IN6_ADDR)
+MY_CHECK_STRUCT_SIZE("sockaddr_in6" SOCKADDR_IN6)
+MY_CHECK_STRUCT_SIZE("in6_addr" IN6_ADDR)

 IF(HAVE_STRUCT_SOCKADDR_IN6 OR HAVE_STRUCT_IN6_ADDR)
   SET(HAVE_IPV6 TRUE CACHE INTERNAL "")


Fix cmake syntax mistake (#1208)

Fix cmake syntax mistake (#1208)

--- examples/humanJointLimits/InSourceBuild.cmake
+++ examples/humanJointLimits/InSourceBuild.cmake
@@ -16,8 +16,11 @@
   return()
 endif()

-find_package(Threads)
-if(NOT Threads_FOUND QUIET)
+find_package(Threads QUIET)
+if(NOT Threads_FOUND)
+  if(DART_VERBOSE)
+    message(STATUS "Failed to find Threads. humanJointLimits is disabled.")
+  endif()
   return()
 endif()


Define some settings for GCC 4.9

Define some settings for GCC 4.9

--- _cmake/compilers/gcc49.cmake
+++ _cmake/compilers/gcc49.cmake
@@ -18,6 +18,6 @@

 if(${CMAKE_BUILD_TYPE} MATCHES "Release")
     add_definitions(
-	-O4
+	-O3
     )
 endif()


Try to enable G-API build on Android

Try to enable G-API build on Android

--- modules/gapi/cmake/DownloadADE.cmake
+++ modules/gapi/cmake/DownloadADE.cmake
@@ -1,8 +1,3 @@
-if(ANDROID)
-  # FIXME: Android build will be enabled separately
-  return()
-endif()
-
 set(ade_src_dir "${OpenCV_BINARY_DIR}/3rdparty/ade")
 set(ade_filename "v0.1.1f.zip")
 set(ade_subdir "ade-0.1.1f")


define CMAKE_BUILD_TYPE

define CMAKE_BUILD_TYPE

--- SuperBuild/External_CCPi-Regularisation-Toolkit.cmake
+++ SuperBuild/External_CCPi-Regularisation-Toolkit.cmake
@@ -81,6 +81,7 @@
       # external projects
       CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${${proj}_TAG} ${CMAKE_COMMAND} ${${proj}_SOURCE_DIR}
         -DCMAKE_INSTALL_PREFIX:PATH=${${proj}_INSTALL_DIR}
+        -DCMAKE_BUILD_TYPE:STRING=Release
         -DBUILD_PYTHON_WRAPPER:BOOL=ON
         -DBUILD_CUDA:BOOL=${${proj}_USE_CUDA} -DCONDA_BUILD:BOOL=OFF
         -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}