qt-tools: fix regression: qt4_wrap functions were not defined at install

When we run `qibuild install`, we set CMAKE_INSTALL_PREFIX to "/"
and _QIBUILD_QT_TOOLS is in cache so we don't go through
Qt4Macros.cmake, and everything breaks ...

So here we remove the 'header guards', and also, we don't use
include("${QT_USE_FILE}") because this file calls 'include_directories'
and we don't want to add every Qt include dirs several times
(which was the reason behind the 'header guards')

Change-Id: I365029be268a10024eeadfb5f25dd04e22f79b49
Reviewed-on: http://gerrit.aldebaran.lan:8080/1433
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/modules/qt-tools.cmake
+++ cmake/qibuild/modules/qt-tools.cmake
@@ -11,10 +11,6 @@
 # Note: when cross-compiling, you should set QT_USE_QMAKE
 # to false so that we do not use qmake from the system.

-if(DEFINED _QIBUILD_QT_TOOLS)
-  return()
-endif()
-
 if(NOT DEFINED QT_USE_QMAKE)
   find_program(QT_QMAKE qmake)
   if(QT_QMAKE)
@@ -27,7 +23,7 @@
 if(QT_USE_QMAKE)
   # Use upstream cmake files:
   find_package(Qt4 COMPONENTS "")
-  include("${QT_USE_FILE}")
+  include(Qt4Macros)
   return()
 endif()

@@ -42,5 +38,3 @@
 endif()

 include(Qt4Macros)
-
-qi_set_global(_QIBUILD_QT_TOOLS TRUE)


CMake: fix Clang detection

CMake: fix Clang detection

--- modules/acore/cmake/platform/unix/settings.cmake
+++ modules/acore/cmake/platform/unix/settings.cmake
@@ -37,7 +37,7 @@
   include(${CMAKE_SOURCE_DIR}/modules/acore/cmake/compiler/gcc/settings.cmake)
 elseif(CMAKE_C_COMPILER MATCHES "icc")
   include(${CMAKE_SOURCE_DIR}/modules/acore/cmake/compiler/icc/settings.cmake)
-elseif(CMAKE_C_COMPILER MATCHES "clang")
+elseif(CMAKE_C_COMPILER MATCHES "clang" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
   include(${CMAKE_SOURCE_DIR}/modules/acore/cmake/compiler/clang/settings.cmake)
 else()
 add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- KTp/Logger/plugins/tplogger/ktploggerplugin_tplogger.desktop.cmake
+++ KTp/Logger/plugins/tplogger/ktploggerplugin_tplogger.desktop.cmake
@@ -42,7 +42,7 @@
 Comment=Provides integration with Telepathy Logger
 Comment[bs]=Obavlja integraciju s Telepathy dnevnikom
 Comment[ca]=Aquest connector proporciona integració amb l'enregistrador del Telepathy
-Comment[ca@valencia]=Aquest connector proporciona integració amb l'enregistrador del Telepathy
+Comment[ca@valencia]=Este connector proporciona integració amb l'enregistrador del Telepathy
 Comment[cs]=Poskytuje integraci se zaznamenáváním Telepathy
 Comment[da]=Giver integration med Telepathy Logger
 Comment[de]=Stellt Integration mit Telepathy-Protokollen zur Verfügung


Updating ITK Superbuild to 4.7.2

Updating ITK Superbuild to 4.7.2

Addresses compilation issue due to code merge.

Change-Id: If7463bc290bf23625e9cfa7b98d8230bcf8ecfd0

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 3260c917254b52382edda14733ca262debaaeff5) # after v4.7.1 release
+set(ITK_TAG_COMMAND GIT_TAG 8e99a65d74e86fa2b564b04e64d04c55c4572ae3) # after v4.7.1 release

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


BUG: Add Svg package in qt5 for superbuild

--- SuperBuild/External_Qt5.cmake
+++ SuperBuild/External_Qt5.cmake
@@ -36,7 +36,7 @@
 # Include dependent projects if any
 SlicerMacroCheckExternalProjectDependency(${proj})

-find_package(${proj} ${${extProjName}_REQUIRED_VERSION} COMPONENTS Core Gui Network Xml REQUIRED )
+find_package(${proj} ${${extProjName}_REQUIRED_VERSION} COMPONENTS Core Gui Network Xml Svg REQUIRED )
 # The project is provided using ${extProjName}_DIR, nevertheless since other
 # project may depend on ${extProjName}, let's add an 'empty' one
 SlicerMacroEmptyExternalProject(${proj} "${${proj}_DEPENDENCIES}")
@@ -50,5 +50,7 @@
 _expand_external_project_vars()
 set(COMMON_EXTERNAL_PROJECT_ARGS ${${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_ARGS})

+set(QT_LIBRARIES ${Qt5_Widgets_LIBRARIES} Qt5::Svg CACHE INTERNAL "Qt5 libraries")
+
 ProjectDependancyPop(CACHED_extProjName extProjName)
 ProjectDependancyPop(CACHED_proj proj)


BUG : put back VTK_USE_GL2PS and add VTK_Group_Qt for VTK6

- We accidentaly removed the GL2PS when updating the external_VTK.cmake
- We put VTK_Group_Qt on ON for VTKv6, since there is no more VTK_USE_QT that we had in VTKv5

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -98,7 +98,7 @@
   if(${PRIMARY_PROJECT_NAME}_USE_QT)
     if(USE_VTKv6)
       set(VTK_QT_ARGS
-        -DModule_vtkGUISupportQt:BOOL=ON
+        -DVTK_Group_Qt:BOOL=ON
         )
     else()
       set(VTK_QT_ARGS)
@@ -178,6 +178,7 @@
       -DBUILD_EXAMPLES:BOOL=OFF
       -DBUILD_TESTING:BOOL=OFF
       -DVTK_USE_PARALLEL:BOOL=ON
+      -DVTK_USE_GL2PS:BOOL=ON
       -DVTK_DEBUG_LEAKS:BOOL=${${PROJECT_NAME}_USE_VTK_DEBUG_LEAKS}
       -DVTK_LEGACY_REMOVE:BOOL=OFF
       -DVTK_WRAP_TCL:BOOL=${VTK_WRAP_TCL}


updated template for the unistd.h and pthread.h checks

git-svn-id: e98c317c6679dcf055eb388f05b44c3a6d6b38c6@1826 152afb58-edef-0310-8abb-c4023f1b3aa9

--- src/config.h.cmake
+++ src/config.h.cmake
@@ -20,6 +20,8 @@
 #cmakedefine  HAVE_SYS_WAIT_H
 #cmakedefine HAVE_SYS_TIME_H
 #cmakedefine HAVE_TIME_H
+#cmakedefine HAVE_UNISTD_H
+#cmakedefine HAVE_PTHREAD_H
 #cmakedefine HAVE_INET_ATON

 /* XATTR */


-nicer indentation in ConfigureChecks.cmake

Alex

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -6,32 +6,32 @@

 check_include_files(dlfcn.h  HAVE_DLFCN_H )

-check_include_files(errno.h      LOG4CPLUS_HAVE_ERRNO_H )
-check_include_files(iconv.h      LOG4CPLUS_HAVE_ICONV_H )
-check_include_files(limits.h     LOG4CPLUS_HAVE_LIMITS_H )
-check_include_files(sys/types.h  LOG4CPLUS_HAVE_SYS_TYPES_H )
-check_include_files(sys/socket.h LOG4CPLUS_HAVE_SYS_SOCKET_H )
+check_include_files(errno.h       LOG4CPLUS_HAVE_ERRNO_H )
+check_include_files(iconv.h       LOG4CPLUS_HAVE_ICONV_H )
+check_include_files(limits.h      LOG4CPLUS_HAVE_LIMITS_H )
+check_include_files(sys/types.h   LOG4CPLUS_HAVE_SYS_TYPES_H )
+check_include_files(sys/socket.h  LOG4CPLUS_HAVE_SYS_SOCKET_H )
 check_include_files(sys/syscall.h LOG4CPLUS_HAVE_SYS_SYSCALL_H )
-check_include_files(sys/time.h   LOG4CPLUS_HAVE_SYS_TIME_H )
-check_include_files(sys/timeb.h  LOG4CPLUS_HAVE_SYS_TIMEB_H )
-check_include_files(sys/stat.h   LOG4CPLUS_HAVE_SYS_STAT_H )
-check_include_files(syslog.h     LOG4CPLUS_HAVE_SYSLOG_H )
-check_include_files(netinet/in.h LOG4CPLUS_HAVE_NETINET_IN_H )
+check_include_files(sys/time.h    LOG4CPLUS_HAVE_SYS_TIME_H )
+check_include_files(sys/timeb.h   LOG4CPLUS_HAVE_SYS_TIMEB_H )
+check_include_files(sys/stat.h    LOG4CPLUS_HAVE_SYS_STAT_H )
+check_include_files(syslog.h      LOG4CPLUS_HAVE_SYSLOG_H )
+check_include_files(netinet/in.h  LOG4CPLUS_HAVE_NETINET_IN_H )
 check_include_files(netinet/tcp.h LOG4CPLUS_HAVE_NETINET_TCP_H )
-check_include_files(netdb.h      LOG4CPLUS_HAVE_NETDB_H )
-check_include_files(unistd.h     LOG4CPLUS_HAVE_UNISTD_H )
-check_include_files(stdio.h      LOG4CPLUS_HAVE_STDIO_H )
-check_include_files(stdarg.h     LOG4CPLUS_HAVE_STDARG_H )
-check_include_files(stdlib.h     LOG4CPLUS_HAVE_STDLIB_H )
-check_include_files(time.h       LOG4CPLUS_HAVE_TIME_H )
-check_include_files(wchar.h      LOG4CPLUS_HAVE_WCHAR_H )
+check_include_files(netdb.h       LOG4CPLUS_HAVE_NETDB_H )
+check_include_files(unistd.h      LOG4CPLUS_HAVE_UNISTD_H )
+check_include_files(stdio.h       LOG4CPLUS_HAVE_STDIO_H )
+check_include_files(stdarg.h      LOG4CPLUS_HAVE_STDARG_H )
+check_include_files(stdlib.h      LOG4CPLUS_HAVE_STDLIB_H )
+check_include_files(time.h        LOG4CPLUS_HAVE_TIME_H )
+check_include_files(wchar.h       LOG4CPLUS_HAVE_WCHAR_H )

-check_include_files(inttypes.h   HAVE_INTTYPES_H )
-check_include_files(memory.h     HAVE_MEMORY_H )
-check_include_files(stdint.h     HAVE_STDINT_H )
-check_include_files(strings.h    HAVE_STRINGS_H )
-check_include_files(string.h     HAVE_STRING_H )
+check_include_files(inttypes.h    HAVE_INTTYPES_H )
+check_include_files(memory.h      HAVE_MEMORY_H )
+check_include_files(stdint.h      HAVE_STDINT_H )
+check_include_files(strings.h     HAVE_STRINGS_H )
+check_include_files(string.h      HAVE_STRING_H )

 check_include_files("stdlib.h;stdio.h;stdarg.h;string.h;float.h" STDC_HEADERS )
@@ -84,7 +84,6 @@
 # clock_gettime() needs -lrt here
 check_function_exists(clock_gettime LOG4CPLUS_HAVE_CLOCK_GETTIME ) # TODO AC says this exists

-
 check_function_exists(gethostbyname_r LOG4CPLUS_HAVE_GETHOSTBYNAME_R) # TODO more complicated test in AC
 check_function_exists(getaddrinfo     LOG4CPLUS_HAVE_GETADDRINFO ) # TODO more complicated test in AC

@@ -129,40 +128,40 @@
 path_to_have(LIBWS2_32)

-set(HAVE_STDLIB_H ${LOG4CPLUS_HAVE_STDLIB_H} )
-set(HAVE_SYS_STAT_H ${LOG4CPLUS_HAVE_SYS_STAT_H} )
-set(HAVE_SYS_TYPES_H ${LOG4CPLUS_HAVE_SYS_TYPES_H} )
-set(HAVE_UNISTD_H ${LOG4CPLUS_HAVE_UNISTD_H} )
+set(HAVE_STDLIB_H              ${LOG4CPLUS_HAVE_STDLIB_H} )
+set(HAVE_SYS_STAT_H            ${LOG4CPLUS_HAVE_SYS_STAT_H} )
+set(HAVE_SYS_TYPES_H           ${LOG4CPLUS_HAVE_SYS_TYPES_H} )
+set(HAVE_UNISTD_H              ${LOG4CPLUS_HAVE_UNISTD_H} )

-set(HAVE_FTIME  ${LOG4CPLUS_HAVE_FTIME} )
-set(HAVE_GETPID ${LOG4CPLUS_HAVE_GETPID} )
-set(HAVE_GETTIMEOFDAY ${LOG4CPLUS_HAVE_GETTIMEOFDAY} )
-set(HAVE_GETADDRINFO  ${LOG4CPLUS_HAVE_GETADDRINFO} )
-set(HAVE_GETHOSTBYNAME_R ${LOG4CPLUS_HAVE_GETHOSTBYNAME_R} )
-set(HAVE_GMTIME_R ${LOG4CPLUS_HAVE_GMTIME_R} )
-set(HAVE_HTONL ${LOG4CPLUS_HAVE_HTONL} )
-set(HAVE_HTONS ${LOG4CPLUS_HAVE_HTONS} )
-set(HAVE_ICONV_OPEN    ${LOG4CPLUS_HAVE_ICONV_OPEN} )
-set(HAVE_ICONV_CLOSE   ${LOG4CPLUS_HAVE_ICONV_CLOSE} )
-set(HAVE_ICONV         ${LOG4CPLUS_HAVE_ICONV} )
-set(HAVE_LSTAT ${LOG4CPLUS_HAVE_LSTAT} )
-set(HAVE_LOCALTIME_R ${LOG4CPLUS_HAVE_LOCALTIME_R} )
-set(HAVE_NTOHL ${LOG4CPLUS_HAVE_NTOHL} )
-set(HAVE_NTOHS ${LOG4CPLUS_HAVE_NTOHS} )
-set(HAVE_STAT  ${LOG4CPLUS_HAVE_STAT} )
+set(HAVE_FTIME                 ${LOG4CPLUS_HAVE_FTIME} )
+set(HAVE_GETPID                ${LOG4CPLUS_HAVE_GETPID} )
+set(HAVE_GETTIMEOFDAY          ${LOG4CPLUS_HAVE_GETTIMEOFDAY} )
+set(HAVE_GETADDRINFO           ${LOG4CPLUS_HAVE_GETADDRINFO} )
+set(HAVE_GETHOSTBYNAME_R       ${LOG4CPLUS_HAVE_GETHOSTBYNAME_R} )
+set(HAVE_GMTIME_R              ${LOG4CPLUS_HAVE_GMTIME_R} )
+set(HAVE_HTONL                 ${LOG4CPLUS_HAVE_HTONL} )
+set(HAVE_HTONS                 ${LOG4CPLUS_HAVE_HTONS} )
+set(HAVE_ICONV_OPEN            ${LOG4CPLUS_HAVE_ICONV_OPEN} )
+set(HAVE_ICONV_CLOSE           ${LOG4CPLUS_HAVE_ICONV_CLOSE} )
+set(HAVE_ICONV                 ${LOG4CPLUS_HAVE_ICONV} )
+set(HAVE_LSTAT                 ${LOG4CPLUS_HAVE_LSTAT} )
+set(HAVE_LOCALTIME_R           ${LOG4CPLUS_HAVE_LOCALTIME_R} )
+set(HAVE_NTOHL                 ${LOG4CPLUS_HAVE_NTOHL} )
+set(HAVE_NTOHS                 ${LOG4CPLUS_HAVE_NTOHS} )
+set(HAVE_STAT                  ${LOG4CPLUS_HAVE_STAT} )

-set(HAVE_VFPRINTF_S    ${LOG4CPLUS_HAVE_VFPRINTF_S} )
-set(HAVE_VFWPRINTF_S   ${LOG4CPLUS_HAVE_VFWPRINTF_S} )
-set(HAVE_VSNPRINTF     ${LOG4CPLUS_HAVE_VSNPRINTF} )
-set(HAVE_VSPRINTF_S    ${LOG4CPLUS_HAVE_VSPRINTF_S} )
-set(HAVE_VSWPRINTF_S   ${LOG4CPLUS_HAVE_VSWPRINTF_S} )
-set(HAVE__VSNPRINTF    ${LOG4CPLUS_HAVE__VSNPRINTF} )
-set(HAVE__VSNPRINTF_S  ${LOG4CPLUS_HAVE__VSNPRINTF_S} )
-set(HAVE__VSNWPRINTF_S ${LOG4CPLUS_HAVE__VSNWPRINTF_S} )
+set(HAVE_VFPRINTF_S            ${LOG4CPLUS_HAVE_VFPRINTF_S} )
+set(HAVE_VFWPRINTF_S           ${LOG4CPLUS_HAVE_VFWPRINTF_S} )
+set(HAVE_VSNPRINTF             ${LOG4CPLUS_HAVE_VSNPRINTF} )
+set(HAVE_VSPRINTF_S            ${LOG4CPLUS_HAVE_VSPRINTF_S} )
+set(HAVE_VSWPRINTF_S           ${LOG4CPLUS_HAVE_VSWPRINTF_S} )
+set(HAVE__VSNPRINTF            ${LOG4CPLUS_HAVE__VSNPRINTF} )
+set(HAVE__VSNPRINTF_S          ${LOG4CPLUS_HAVE__VSNPRINTF_S} )
+set(HAVE__VSNWPRINTF_S         ${LOG4CPLUS_HAVE__VSNWPRINTF_S} )

-set(HAVE_FUNCTION_MACRO ${LOG4CPLUS_HAVE_FUNCTION_MACRO} )
+set(HAVE_FUNCTION_MACRO        ${LOG4CPLUS_HAVE_FUNCTION_MACRO} )
 set(HAVE_PRETTY_FUNCTION_MACRO ${LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO} )

-set(HAVE___SYNC_ADD_AND_FETCH ${LOG4CPLUS_HAVE___SYNC_ADD_AND_FETCH} )
-set(HAVE___SYNC_SUB_AND_FETCH ${LOG4CPLUS_HAVE___SYNC_SUB_AND_FETCH} )
+set(HAVE___SYNC_ADD_AND_FETCH  ${LOG4CPLUS_HAVE___SYNC_ADD_AND_FETCH} )
+set(HAVE___SYNC_SUB_AND_FETCH  ${LOG4CPLUS_HAVE___SYNC_SUB_AND_FETCH} )


add depth option for FindConfigurePackage.cmake

--- project/cmake/modules/FindConfigurePackage.cmake
+++ project/cmake/modules/FindConfigurePackage.cmake
@@ -137,6 +137,10 @@
     set(FindConfigurePackageCMakeBuildMultiJobs "--" "/m" CACHE INTERNAL "Build options for multi-jobs")
 endif()

+if (NOT FindConfigurePackageGitFetchDepth)
+    set (FindConfigurePackageGitFetchDepth 100 CACHE STRING "Defalut depth of git clone/fetch")
+endif ()
+
 macro (FindConfigurePackage)
     include(CMakeParseArguments)
     set(optionArgs BUILD_WITH_CONFIGURE BUILD_WITH_CMAKE BUILD_WITH_SCONS BUILD_WITH_CUSTOM_COMMAND CMAKE_INHIRT_BUILD_ENV)
@@ -227,7 +231,7 @@
                         if (NOT FindConfigurePackage_GIT_BRANCH)
                             set(FindConfigurePackage_GIT_BRANCH master)
                         endif()
-                        execute_process(COMMAND ${GIT_EXECUTABLE} clone --depth=1 -b ${FindConfigurePackage_GIT_BRANCH} ${FindConfigurePackage_GIT_URL} ${FindConfigurePackage_SRC_DIRECTORY_NAME}
+                        execute_process(COMMAND ${GIT_EXECUTABLE} clone "--depth=${FindConfigurePackageGitFetchDepth}" -b ${FindConfigurePackage_GIT_BRANCH} ${FindConfigurePackage_GIT_URL} ${FindConfigurePackage_SRC_DIRECTORY_NAME}
                             WORKING_DIRECTORY ${FindConfigurePackage_WORKING_DIRECTORY}
                         )
                     else()


ensure that ament_package() was called before finding ament_lint_auto

--- ament_lint_auto/ament_lint_auto-extras.cmake
+++ ament_lint_auto/ament_lint_auto-extras.cmake
@@ -14,6 +14,10 @@

 # copied from ament_lint_auto/ament_lint_auto-extras.cmake

+if(_${PROJECT_NAME}_AMENT_PACKAGE)
+  message(FATAL_ERROR "find_package(ament_lint_auto) must be called before ament_package()")
+endif()
+
 find_package(ament_cmake_core QUIET REQUIRED)
 find_package(ament_cmake_test QUIET REQUIRED)


Download virgil-sdk-cpp lib v3.2.0

Download virgil-sdk-cpp lib v3.2.0

--- ext/virgil_sdk/virgil_sdk.cmake
+++ ext/virgil_sdk/virgil_sdk.cmake
@@ -52,8 +52,8 @@

 ExternalProject_Add (${PROJECT_NAME}
     DOWNLOAD_DIR "@VIRGIL_DEPENDS_PACKAGE_DOWNLOAD_DIR@"
-    URL "https://github.com/VirgilSecurity/virgil-sdk-cpp/archive/633930229a9ac8bdb929944c4738fb4a092c63c5.tar.gz"
-    URL_HASH SHA1=1b2d87310c0d2b9890f0b051196254a177dba1df
+    URL "https://github.com/VirgilSecurity/virgil-sdk-cpp/archive/v3.2.0.tar.gz"
+    URL_HASH SHA1=402d510b32f738f6e53c25d75c565ad1d245342b
     PREFIX "@VIRGIL_DEPENDS_PACKAGE_BUILD_DIR@"
     CMAKE_ARGS "@VIRGIL_DEPENDS_CMAKE_ARGS@"
 )


cakepkg: enable GROUP/GROUPS option

cakepkg: enable GROUP/GROUPS option

--- Modules/CakePkg.cmake
+++ Modules/CakePkg.cmake
@@ -687,20 +687,20 @@

 # CAKE_PKG_REGISTRY_<NAME> = URL [DEFINITIONS]
 # CLONE:
-# - CLONE URL [DESTINATION] [NAME] [GROUP]
-# - CLONE NAME [DESTINATION] [GROUP]
+# - CLONE URL [DESTINATION] [NAME] [GROUPS]
+# - CLONE NAME [DESTINATION] [GROUPS]
 # INSTALL single:
-# - INSTALL URL [DESTINATION] [NAME] [GROUP] [DEFINITIONS]
-# - INSTALL NAME [DESTINATION] [GROUP] [DEFINITIONS]
+# - INSTALL URL [DESTINATION] [NAME] [GROUPS] [DEFINITIONS]
+# - INSTALL NAME [DESTINATION] [GROUPS] [DEFINITIONS]
 # INSTALL batch:
-# - INSTALL ALL^(GROUP|IF)
+# - INSTALL ALL^(GROUPS|IF)
 # REPORT single:
 # - STATUS|DIFFLOG|COMMAND|CMDC|SHC NAME
 # REPORT batch:
-# - STATUS|DIFFLOG|COMMAND|CMDC|SHC ALL^(GROUP|IF)
+# - STATUS|DIFFLOG|COMMAND|CMDC|SHC ALL^(GROUPS|IF)
 # REMOVE single
-# - REMOVE NAME|(ALL^(GROUP|IF))
-# - LIST NAME|(ALL^(GROUP|IF))
+# - REMOVE NAME|(ALL^(GROUPS|IF))
+# - LIST NAME|(ALL^(GROUPS|IF))
   function(cake_pkg)

     set(option_commands CLONE INSTALL STATUS DIFFLOG REMOVE LIST)
@@ -710,7 +710,7 @@
     cmake_parse_arguments(ARG
       "${option_commands}"
       "URL;DESTINATION;NAME;GROUP"
-      "${mv_commands};IF;DEFINITIONS"
+      "${mv_commands};IF;DEFINITIONS;GROUPS"
       ${ARGV})

     set(count 0)
@@ -764,7 +764,7 @@
         list(REMOVE_DUPLICATES defs)
         _cake_pkg_install("${pk}" "${defs}")
       endif()
-    elseif(ARG_STATUS OR ARG_DIFFLOG OR ARG_COMMAND OR ARG_CMDC OR ARG_SHC)
+    elseif(ARG_STATUS OR ARG_DIFFLOG OR ARG_COMMAND OR ARG_CMDC OR ARG_SHC OR ARG_LIST)
       if(ARG_NAME)
         message(FATAL_ERROR "[cake_pkg] this option is not implemented")
       else()
@@ -777,114 +777,139 @@
         elseif(ARG_SHC)
           string(REPLACE \; " " v "${ARG_SHC}")
           set(command sh -c "${v}")
-        elseif(ARG_STATUS)
-        elseif(ARG_DIFFLOG)
+        elseif(ARG_STATUS OR ARG_DIFFLOG OR ARG_LIST)
+          # nothing to do
         else()
           message(FATAL_ERROR "[cake_pkg] internal error while assembling command")
         endif()
         string(REGEX MATCHALL "\t[0-9]+cid=" pks "${CAKE_REPO_DB}")
         string(REGEX MATCHALL "[0-9]+" pks "${pks}")
         cake_list_to_command_line_like_string(s "${command}")
+        list(APPEND ARG_GROUPS "${ARG_GROUP}")
         foreach(pk ${pks})
-          cake_repo_db_get_field_by_pk(destination "${pk}")
-          set(destination "${ans}")
-          cake_repo_db_get_field_by_pk(branch "${pk}")
-          set(branch "${ans}")
+          set(needed 1)
           cake_repo_db_get_field_by_pk(group "${pk}")
           set(group "${ans}")
-          cake_repo_db_get_project_title("${pk}")
-          set(title "${ans}")
-          if(CMAKE_SCRIPT_MODE_FILE AND CAKE_CURRENT_DIRECTORY)
-            file(RELATIVE_PATH relpath "${CAKE_CURRENT_DIRECTORY}" "${destination}")
-          else()
-            set(relpath "${destination}")
+          if(ARG_GROUPS)
+            list(FIND ARG_GROUPS "${group}" gidx)
+            if(gidx LESS 0)
+              set(needed 0)
+            endif()
           endif()
-          if(command)
-            message(STATUS "cd ${destination}")
-            execute_process(COMMAND ${command}
-              WORKING_DIRECTORY "${destination}"
-              RESULT_VARIABLE r)
-            if(r)
-              message(FATAL_ERROR "[cake_pkg] Result: ${r}")
+          if(needed)
+            cake_repo_db_get_field_by_pk(destination "${pk}")
+            set(destination "${ans}")
+            cake_repo_db_get_field_by_pk(branch "${pk}")
+            set(branch "${ans}")
+            cake_repo_db_get_project_title("${pk}")
+            set(title "${ans}")
+            if(CMAKE_SCRIPT_MODE_FILE AND CAKE_CURRENT_DIRECTORY)
+              file(RELATIVE_PATH relpath "${CAKE_CURRENT_DIRECTORY}" "${destination}")
+            else()
+              set(relpath "${destination}")
             endif()
-          elseif(ARG_STATUS OR ARG_DIFFLOG)
-            execute_process(COMMAND ${GIT_EXECUTABLE} status -s
-              WORKING_DIRECTORY "${destination}"
-              OUTPUT_VARIABLE o_gs
-              ERROR_VARIABLE e
-              RESULT_VARIABLE r)
-            if(r)
-              message(FATAL_ERROR "[cake_pkg] 'git status -s' failed: ${r} (${e})")
-            endif()
-            execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline origin/${branch}..HEAD
-              WORKING_DIRECTORY "${destination}"
-              OUTPUT_VARIABLE o_before
-              ERROR_VARIABLE e
-              RESULT_VARIABLE r)
-            if(r)
-              message(FATAL_ERROR "[cake_pkg] 'git log --oneline origin/${branch}..HEAD' failed: ${r} (${e})")
-            endif()
-            execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline HEAD..origin/${branch}
-              WORKING_DIRECTORY "${destination}"
-              OUTPUT_VARIABLE o_behind
-              ERROR_VARIABLE e
-              RESULT_VARIABLE r)
-            if(r)
-              message(FATAL_ERROR "[cake_pkg] 'git log --oneline HEAD..origin/${branch}' failed: ${r} (${e})")
-            endif()
-            string(REGEX REPLACE "[^\n]" "" o_before "${o_before}")
-            string(REGEX REPLACE "[^\n]" "" o_behind "${o_behind}")
-            string(LENGTH "${o_before}" o_before)
-            string(LENGTH "${o_behind}" o_behind)
-            if(ARG_STATUS)
-              if(NOT o_before EQUAL 0 OR NOT o_behind EQUAL 0 OR o_gs)
+            if(command)
+              message(STATUS "cd ${destination}")
+              execute_process(COMMAND ${command}
+                WORKING_DIRECTORY "${destination}"
+                RESULT_VARIABLE r)
+              if(r)
+                message(FATAL_ERROR "[cake_pkg] Result: ${r}")
+              endif()
+            elseif(ARG_LIST)
+              cake_repo_db_get_field_by_pk(name "${pk}")
+              set(name "${ans}")
+              cake_repo_db_get_field_by_pk(url "${pk}")
+              set(url "${ans}")
+              if(name)
+                set(s "[${name}] ")
+              else()
                 set(s "")
-                if(o_before EQUAL 0 AND o_behind EQUAL 0)
-                  set(s "up to date with origin/${branch}")
-                else()
-                  if(o_before EQUAL 0)
-                    set(s "${o_behind} to pull from")
-                  elseif(o_behind EQUAL 0)
-                    set(s "${o_before} to push to")
+              endif()
+              set(s "${s}group: ${group}, branch: ${branch}")
+              message("")
+              message(STATUS "${url}")
+              message("\t${s}")
+              message("\tpath: ${destination}")
+            elseif(ARG_STATUS OR ARG_DIFFLOG)
+              execute_process(COMMAND ${GIT_EXECUTABLE} status -s
+                WORKING_DIRECTORY "${destination}"
+                OUTPUT_VARIABLE o_gs
+                ERROR_VARIABLE e
+                RESULT_VARIABLE r)
+              if(r)
+                message(FATAL_ERROR "[cake_pkg] 'git status -s' failed: ${r} (${e})")
+              endif()
+              execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline origin/${branch}..HEAD
+                WORKING_DIRECTORY "${destination}"
+                OUTPUT_VARIABLE o_before
+                ERROR_VARIABLE e
+                RESULT_VARIABLE r)
+              if(r)
+                message(FATAL_ERROR "[cake_pkg] 'git log --oneline origin/${branch}..HEAD' failed: ${r} (${e})")
+              endif()
+              execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline HEAD..origin/${branch}
+                WORKING_DIRECTORY "${destination}"
+                OUTPUT_VARIABLE o_behind
+                ERROR_VARIABLE e
+                RESULT_VARIABLE r)
+              if(r)
+                message(FATAL_ERROR "[cake_pkg] 'git log --oneline HEAD..origin/${branch}' failed: ${r} (${e})")
+              endif()
+              string(REGEX REPLACE "[^\n]" "" o_before "${o_before}")
+              string(REGEX REPLACE "[^\n]" "" o_behind "${o_behind}")
+              string(LENGTH "${o_before}" o_before)
+              string(LENGTH "${o_behind}" o_behind)
+              if(ARG_STATUS)
+                if(NOT o_before EQUAL 0 OR NOT o_behind EQUAL 0 OR o_gs)
+                  set(s "")
+                  if(o_before EQUAL 0 AND o_behind EQUAL 0)
+                    set(s "up to date with origin/${branch}")
                   else()
-                    set(s "diverged (-${o_behind}/+${o_before}) from")
+                    if(o_before EQUAL 0)
+                      set(s "${o_behind} to pull from")
+                    elseif(o_behind EQUAL 0)
+                      set(s "${o_before} to push to")
+                    else()
+                      set(s "diverged (-${o_behind}/+${o_before}) from")
+                    endif()
+                    set(s "${s} origin/${branch}")
                   endif()
-                  set(s "${s} origin/${branch}")
-                endif()
-                if(o_gs)
-                  set(s "${s} + local changes")
-                endif()
-                message("")
-                message(STATUS "${relpath}")
-                message("\t${s}")
-                execute_process(COMMAND ${GIT_EXECUTABLE} status -sb
-                  WORKING_DIRECTORY ${destination}
-                  RESULT_VARIABLE r)
-                if(r)
-                  message(FATAL_ERROR "[cake_pkg] 'git status -sb' returned ${r} (${e})")
-                endif()
-              endif()
-            else()
-              # DIFFLOG
-              if(NOT o_before EQUAL 0 OR NOT o_behind EQUAL 0)
-                message("")
-                message(STATUS "${relpath}")
-                if(NOT o_behind EQUAL 0)
-                  message("\t${o_behind} to pull from [origin/${branch}]:")
-                  execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline HEAD..origin/${branch}
+                  if(o_gs)
+                    set(s "${s} + local changes")
+                  endif()
+                  message("")
+                  message(STATUS "${relpath}")
+                  message("\t${s}")
+                  execute_process(COMMAND ${GIT_EXECUTABLE} status -sb
                     WORKING_DIRECTORY ${destination}
                     RESULT_VARIABLE r)
                   if(r)
-                    message(FATAL_ERROR "[cake_pkg] 'git log --oneline HEAD..origin/${branch}' returned ${r} (${e})")
+                    message(FATAL_ERROR "[cake_pkg] 'git status -sb' returned ${r} (${e})")
                   endif()
                 endif()
-                if(NOT o_before EQUAL 0)
-                  message("\t${o_before} to push to origin/${branch}:")
-                  execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline origin/${branch}..HEAD
-                    WORKING_DIRECTORY ${destination}
-                    RESULT_VARIABLE r)
-                  if(r)
-                    message(FATAL_ERROR "[cake_pkg] 'git log --oneline origin/${branch}..HEAD' returned ${r} (${e})")
+              else()
+                # DIFFLOG
+                if(NOT o_before EQUAL 0 OR NOT o_behind EQUAL 0)
+                  message("")
+                  message(STATUS "${relpath}")
+                  if(NOT o_behind EQUAL 0)
+                    message("\t${o_behind} to pull from [origin/${branch}]:")
+                    execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline HEAD..origin/${branch}
+                      WORKING_DIRECTORY ${destination}
+                      RESULT_VARIABLE r)
+                    if(r)
+                      message(FATAL_ERROR "[cake_pkg] 'git log --oneline HEAD..origin/${branch}' returned ${r} (${e})")
+                    endif()
+                  endif()
+                  if(NOT o_before EQUAL 0)
+                    message("\t${o_before} to push to origin/${branch}:")
+                    execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline origin/${branch}..HEAD
+                      WORKING_DIRECTORY ${destination}
+                      RESULT_VARIABLE r)
+                    if(r)
+                      message(FATAL_ERROR "[cake_pkg] 'git log --oneline origin/${branch}..HEAD' returned ${r} (${e})")
+                    endif()
                   endif()
                 endif()
               endif()


Refine the filter_rpath function a little more by removing empty
elements from the rpath list.

svn path=/trunk/; revision=12877

--- cmake/modules/plplot_functions.cmake
+++ cmake/modules/plplot_functions.cmake
@@ -201,7 +201,9 @@
   #message("DEBUG: ${rpath} = ${${rpath}}")
   set(internal_rpath ${${rpath}})
   if(internal_rpath)
+    # Remove duplicates and empty elements.
     list(REMOVE_DUPLICATES internal_rpath)
+    list(REMOVE_ITEM internal_rpath "")
     set(directories_to_be_removed
       ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}
       ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}


Suppress -Wuser-defined-warnings

Suppress -Wuser-defined-warnings

--- tools/VoltDBCompilation.cmake
+++ tools/VoltDBCompilation.cmake
@@ -199,6 +199,9 @@
     # related to the LLVM versioning numbers.
     VOLTDB_ADD_COMPILE_OPTIONS(-Wno-unused-local-typedefs -Wno-absolute-value)
   ENDIF()
+  IF ( "9.1.0" VERSION_LESS ${CMAKE_CXX_COMPILER_VERSION} )
+    VOLTDB_ADD_COMPILE_OPTIONS(-Wno-user-defined-warnings)
+  ENDIF()
 ELSE()
   MESSAGE (FATAL_ERROR "Unknown compiler family ${CMAKE_CXX_COMPILER_ID}.  We only support GNU and Clang.")
 ENDIF ()


Fix SANITIZE=ON for GCC 6

Fix SANITIZE=ON for GCC 6

GCC on Ubuntu does not switch to the "gold" linker when the fsanitize
switch is used, so add the relevant linker flags manually:
http://stackoverflow.com/questions/37603238/fsanitize-not-using-gold-linker-in-gcc-6-1

--- tools/cmake/FindOptions.cmake
+++ tools/cmake/FindOptions.cmake
@@ -1,6 +1,15 @@
+macro(append var string)
+  set(${var} "${${var}} ${string}")
+endmacro(append)
+
 set(SANITIZE_FLAGS "")
 if(SANITIZE)
   set(SANITIZE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined")
+  if (CMAKE_COMPILER_IS_GNUCC)
+    # Ubuntu bug for GCC 5.0+ (safe for all versions)
+    append(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=gold")
+    append(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=gold")
+  endif()
 endif()

 set(OPT_FLAGS "-march=native")


Fix tesseract.pc from cmake to match autotools

--- tesseract.pc.cmake
+++ tesseract.pc.cmake
@@ -7,6 +7,7 @@
 Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
 URL: https://github.com/tesseract-ocr/tesseract
 Version: @tesseract_VERSION@
+Requires.private: lept
 Libs: -L${libdir} -l@tesseract_OUTPUT_NAME@ @libarchive_LIBS@ @libcurl_LIBS@ @TENSORFLOW_LIBS@
 Libs.private:
 Cflags: -I${includedir}


Switched to git protocol for 3rd party libraries

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -647,7 +647,7 @@
   ${ARABICA_TARGET}
   PREFIX ${ARABICA_PREFIX}
   DOWNLOAD_COMMAND
-      ${GIT} clone --depth 1 https://github.com/QuentinFiard/arabica.git
+      ${GIT} clone --depth 1 git://github.com/QuentinFiard/arabica.git
           ${ARABICA_TARGET}
   CMAKE_ARGS
       -DBOOST_ROOT=${BOOST_PREFIX}
@@ -782,7 +782,7 @@
   ${BSDIFF_TARGET}
   PREFIX ${BSDIFF_PREFIX}
   DOWNLOAD_COMMAND
-      ${GIT} clone --depth 1 https://github.com/QuentinFiard/bsdiff.git
+      ${GIT} clone --depth 1 git://github.com/QuentinFiard/bsdiff.git
   CMAKE_ARGS
       -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
       -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
@@ -822,7 +822,7 @@
   DOWNLOAD_COMMAND
       # Patch file is specific to revision 199104, a missing header leads to an
       # undefined symbol without it. Might be unnecessary in the near future.
-      ${GIT} clone --depth 1 https://github.com/QuentinFiard/llvm ${CLANG_TARGET} &&
+      ${GIT} clone --depth 1 git://github.com/QuentinFiard/llvm ${CLANG_TARGET} &&
       ${SVN} export --force http://llvm.org/svn/llvm-project/compiler-rt/trunk ${CLANG_TARGET}/projects/compiler-rt &&
       ${SVN} export --force http://llvm.org/svn/llvm-project/cfe/trunk ${CLANG_TARGET}/tools/clang
   CMAKE_ARGS
@@ -875,7 +875,7 @@
   ${CURL_ASIO_TARGET}
   PREFIX ${CURL_ASIO_PREFIX}
   DOWNLOAD_COMMAND
-      ${GIT} clone --depth 1 https://github.com/QuentinFiard/curl-asio.git
+      ${GIT} clone --depth 1 git://github.com/QuentinFiard/curl-asio.git
           ${CURL_ASIO_TARGET}
   CMAKE_ARGS
       -DBOOST_ROOT=${BOOST_PREFIX}
@@ -1259,7 +1259,7 @@
   ${HTTPXX_TARGET}
   PREFIX ${HTTPXX_PREFIX}
   DOWNLOAD_COMMAND
-      ${GIT} clone --recursive --depth 1 https://github.com/QuentinFiard/httpxx.git
+      ${GIT} clone --recursive --depth 1 git://github.com/QuentinFiard/httpxx.git
           ${HTTPXX_TARGET}
   CMAKE_ARGS
       -DBUILD_EXAMPLES=OFF
@@ -1882,7 +1882,7 @@
     ${DOWNLOAD_TARGET}
     PREFIX ${NJK_WEB_VIEW_PROGRESS_PREFIX}
     DOWNLOAD_COMMAND
-        ${GIT} clone --depth 1 https://github.com/QuentinFiard/NJKWebViewProgress
+        ${GIT} clone --depth 1 git://github.com/QuentinFiard/NJKWebViewProgress
             ${DOWNLOAD_TARGET}
     CONFIGURE_COMMAND ${NOP}
     BUILD_COMMAND ${NOP}
@@ -2312,7 +2312,7 @@
   ${SHARK_TARGET}
   PREFIX ${SHARK_PREFIX}
   DOWNLOAD_COMMAND
-      ${GIT} clone --depth 1 https://github.com/QuentinFiard/shark.git ${SHARK_TARGET}
+      ${GIT} clone --depth 1 git://github.com/QuentinFiard/shark.git ${SHARK_TARGET}
   CONFIGURE_COMMAND
       BOOST_ROOT=${BOOST_PREFIX} ${CMAKE_COMMAND} <SOURCE_DIR>
           -DOPT_MAKE_TESTS=OFF
@@ -2349,7 +2349,7 @@
     ${SSTOOLKIT_TARGET}
     PREFIX ${SSTOOLKIT_PREFIX}
     DOWNLOAD_COMMAND
-        ${GIT} clone --depth 1 https://github.com/soffes/sstoolkit.git
+        ${GIT} clone --depth 1 git://github.com/soffes/sstoolkit.git
             ${SSTOOLKIT_TARGET}
     CONFIGURE_COMMAND ${NOP}
     BUILD_COMMAND
@@ -2370,7 +2370,7 @@
     ${DOWNLOAD_TARGET}
     PREFIX ${SW_REVEAL_VIEW_CONTROLLER_PREFIX}
     DOWNLOAD_COMMAND
-        ${GIT} clone --depth 1 https://github.com/John-Lluch/SWRevealViewController.git
+        ${GIT} clone --depth 1 git://github.com/John-Lluch/SWRevealViewController.git
             ${DOWNLOAD_TARGET}
     CONFIGURE_COMMAND echo ""
     BUILD_COMMAND echo ""


partial rollback of #620 to stop win-side pop ups

--- Tools/CMake/basics.cmake
+++ Tools/CMake/basics.cmake
@@ -364,10 +364,10 @@
 endmacro()

 macro(setupVersionNumbers)
-    set(TORQUE_APP_VERSION_MAJOR 1 CACHE INTEGER "")
-    set(TORQUE_APP_VERSION_MINOR 0 CACHE INTEGER "")
-    set(TORQUE_APP_VERSION_PATCH 0 CACHE INTEGER "")
-    set(TORQUE_APP_VERSION_TWEAK 0 CACHE INTEGER "")
+    set(TORQUE_APP_VERSION_MAJOR 1 CACHE STRING "")
+    set(TORQUE_APP_VERSION_MINOR 0 CACHE STRING "")
+    set(TORQUE_APP_VERSION_PATCH 0 CACHE STRING "")
+    set(TORQUE_APP_VERSION_TWEAK 0 CACHE STRING "")
     mark_as_advanced(TORQUE_APP_VERSION_TWEAK)
     MATH(EXPR TORQUE_APP_VERSION "${TORQUE_APP_VERSION_MAJOR} * 1000 + ${TORQUE_APP_VERSION_MINOR} * 100 + ${TORQUE_APP_VERSION_PATCH} * 10 + ${TORQUE_APP_VERSION_TWEAK}")
     set(TORQUE_APP_VERSION_STRING "${TORQUE_APP_VERSION_MAJOR}.${TORQUE_APP_VERSION_MINOR}.${TORQUE_APP_VERSION_PATCH}.${TORQUE_APP_VERSION_TWEAK}")
@@ -436,11 +436,11 @@
     endif()
 else()
     # TODO: improve default settings on other platforms
-    set(TORQUE_CXX_FLAGS_EXECUTABLES "" CACHE TYPE STRING)
+    set(TORQUE_CXX_FLAGS_EXECUTABLES "" CACHE STRING "")
     mark_as_advanced(TORQUE_CXX_FLAGS_EXECUTABLES)
-    set(TORQUE_CXX_FLAGS_LIBS "" CACHE TYPE STRING)
+    set(TORQUE_CXX_FLAGS_LIBS "" CACHE STRING "")
     mark_as_advanced(TORQUE_CXX_FLAGS_LIBS)
-    set(TORQUE_CXX_FLAGS_COMMON "" CACHE TYPE STRING)
+    set(TORQUE_CXX_FLAGS_COMMON "" CACHE STRING "")
     mark_as_advanced(TORQUE_CXX_FLAGS)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORQUE_CXX_FLAGS}")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")


added libxml2 dependency

added libxml2 dependency

--- vtk.cmake
+++ vtk.cmake
@@ -29,7 +29,7 @@
 include_directories (${BUILDEM_DIR}/include/vtk-5.10)

 ExternalProject_Add(${vtk_NAME}
-    DEPENDS             ${python_NAME} ${qt4_NAME} ${sip_NAME} ${pyqt4_NAME}
+    DEPENDS             ${python_NAME} ${qt4_NAME} ${sip_NAME} ${pyqt4_NAME} ${libxml2_NAME}
     PREFIX              ${BUILDEM_DIR}
     URL                 ${vtk_URL}
     URL_MD5             ${vtk_MD5}


qt-camera: More dependencies

qt-camera: More dependencies

--- examples/qt-camera/config.cmake
+++ examples/qt-camera/config.cmake
@@ -24,6 +24,9 @@
       xdamage
       xext
       xfixes
+      xi
+      xinerama
+      xrandr
       xrender
       xshmfence
       xxf86vm


Update FindGLFW.cmake

Update FindGLFW.cmake

--- CMake/FindGLFW.cmake
+++ CMake/FindGLFW.cmake
@@ -232,7 +232,7 @@

     endif()

-    if(${GLFW_VERSION_MAJOR} OR ${GLFW_VERSION_MINOR} OR ${GLFW_VERSION_REVISION})
+    if("${GLFW_VERSION_MAJOR}" OR "${GLFW_VERSION_MINOR}" OR "${GLFW_VERSION_REVISION}")
         set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}.${GLFW_VERSION_REVISION}")
         set(GLFW_VERSION_STRING "${GLFW_VERSION}")
         mark_as_advanced(GLFW_VERSION)
@@ -255,4 +255,4 @@
         GLFW_LIBRARIES
         GLFW_glfw_LIBRARY
         GLFW_cocoa_LIBRARY
-)+)


cmake: linenoise is c++ now

cmake: linenoise is c++ now

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -156,7 +156,7 @@
 IF (LINENOISE)
 	ADD_DEFINITIONS(-DHAVE_LINENOISE)
 	INCLUDE_DIRECTORIES(${OLXROOTDIR}/libs/linenoise)
-	SET(ALL_SRCS ${OLXROOTDIR}/libs/linenoise/linenoise.c ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/libs/linenoise/linenoise.cpp ${ALL_SRCS})
 ENDIF (LINENOISE)

 IF (DISABLE_JOYSTICK)


SDL mixer not used anymore (we switched to OpenAL in 0.59)

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -438,11 +438,9 @@

 IF (NOT DEDICATED_ONLY)
 	if(APPLE)
-		FIND_PACKAGE(SDL_mixer REQUIRED)
-		SET(LIBS ${LIBS} ${SDLMIXER_LIBRARY})
 		SET(LIBS ${LIBS} "-framework UnixImageIO" "-framework GD")
 	elseif(UNIX)
-		SET(LIBS ${LIBS} SDL_mixer gd)
+                SET(LIBS ${LIBS} gd)
 	endif(APPLE)
 ENDIF (NOT DEDICATED_ONLY)


utils/vlog: created target to update golden reference

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- v2x_tests.cmake
+++ v2x_tests.cmake
@@ -43,6 +43,9 @@
   diff(NAME ${V2X_GENERIC_TEST_NAME}_${V2X_GENERIC_TEST_TYPE}_diff GOLDEN ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.golden.xml ACTUAL ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.actual.xml)

   add_dependencies(all_v2x_tests ${V2X_GENERIC_TEST_NAME}_${V2X_GENERIC_TEST_TYPE}_diff)
+
+  # TODO This has to be completed in order update the golden pb_type/model accordingly
+  add_custom_target(${V2X_GENERIC_TEST_NAME}_update_golden_${V2X_GENERIC_TEST_TYPE})
 endfunction(V2X_GENERIC_TEST)

 function(V2X_TEST_MODEL)


Find numpy also in /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy as last resort

--- python_module/cmake/add_python_export_library.cmake
+++ python_module/cmake/add_python_export_library.cmake
@@ -77,12 +77,14 @@
     # The apple framework headers don't include the numpy headers for some reason.
     GET_FILENAME_COMPONENT(REAL_PYTHON_INCLUDE ${PYTHON_INCLUDE_DIRS} REALPATH)
     IF( ${REAL_PYTHON_INCLUDE} MATCHES Python.framework)
-      message("Trying to find extra headers for numpy from ${REAL_PYTHON_INCLUDE}.")
-      message("Looking in ${REAL_PYTHON_INCLUDE}/../../Extras/lib/python/numpy/core/include/numpy")
-      FIND_PATH(NUMPY_INCLUDE_DIR arrayobject.h
-	${REAL_PYTHON_INCLUDE}/../../Extras/lib/python/numpy/core/include/numpy
-	${REAL_PYTHON_INCLUDE}/numpy
-	)
+      message("Trying to find extra headers for numpy.")
+      set(NUMPY_INCLUDE_HINTS
+        ${REAL_PYTHON_INCLUDE}/../../Extras/lib/python/numpy/core/include/numpy
+        ${REAL_PYTHON_INCLUDE}/numpy
+        /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy
+      )
+      message("Looking in ${NUMPY_INCLUDE_HINTS}")
+      FIND_PATH(NUMPY_INCLUDE_DIR arrayobject.h ${NUMPY_INCLUDE_HINTS})
       IF(${NUMPY_INCLUDE_DIR} MATCHES NOTFOUND)
 	message("Unable to find numpy include directories: ${NUMPY_INCLUDE_DIR}")
       ELSE()


disabled USE_CURL for mingw64 until static lib can be made (can override by passing -DUSE_CURL=1 to build.sh)

--- mingw64/Custom-mingw64.cmake
+++ mingw64/Custom-mingw64.cmake
@@ -9,3 +9,6 @@
 set(NEED_PORTTIME OFF)
 set(TCL_VERSION 8.5)
 set(USE_OPEN_MP OFF)
+
+#Turning off use of CURL until a static library can be used
+set(USE_CURL OFF)


fixed misspelled ENABLE

fixed misspelled ENABLE

--- builder/ConfTargets.cmake
+++ builder/ConfTargets.cmake
@@ -112,7 +112,7 @@

 cmake_dependent_option(
   MFX_ENABLE_MCTF "Build with MCTF support?"  ${MFX_1_25_OPTIONS_ALLOWED}
-  "MFX_ENABE_ASC;MFX_ENABE_KERNELS" OFF)
+  "MFX_ENABLE_ASC;MFX_ENABLE_KERNELS" OFF)

 # Now we will include config file which may overwrite default values of the
 # options and options which user provided in a command line.


Activate WITH_MACAUDIO flag if the build is for OS X

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -72,6 +72,8 @@
 cmake_dependent_option(WITH_CLIENT_CHANNELS "Build virtual channel plugins" ON
 	"WITH_CLIENT_COMMON;WITH_CHANNELS" OFF)

+cmake_dependent_option(WITH_MACAUDIO "Enable OSX sound backend" ON "APPLE;NOT IOS" OFF)
+
 if(WITH_SERVER AND WITH_CHANNELS)
 	option(WITH_SERVER_CHANNELS "Build virtual channel plugins" ON)
 endif()


Make DawnCMakeInit more robust

Make DawnCMakeInit more robust

--- cmake/DawnCMakeInit.cmake
+++ cmake/DawnCMakeInit.cmake
@@ -17,11 +17,12 @@
 # ---------------
 #
 # Add the necessary paths to ``CMAKE_MODULE_PATH`` to use the functions, macros and modules of the
-# ``dawn`` project. To find the ``dawn`` modules the following directories are searched:
+# ``Dawn`` project. To find the ``Dawn`` modules the following directories are searched:
 #
-#  1. CMake variable ``DAWN_ROOT`` and corresponding environment variable
-#  2. CMake variable ``Dawn_DIR`` and corresponding environment variable
-#  3. ``${CMAKE_CURRENT_LIST_DIR}/../dawn``
+#  1. Check for ``DAWN_ROOT`` (pointing to the root folder of the installation)
+#  2. Check for ``Dawn_DIR`` (pointing to the directory containing ``DawnConfig.cmake``, equivalent
+#     to ``${CMAKE_ROOT}/cmake``).
+#  3. Check ``${CMAKE_CURRENT_LIST_DIR}/../dawn``
 #
 # where ``CMAKE_CURRENT_LIST_DIR`` is the directory of the listfile currently being processed. Note
 # that this only checks for the CMake directory in thus also usuable with the source directory Dawn.
@@ -32,27 +33,33 @@
 #  dawn_cmake_init()
 #
 macro(dawn_cmake_init)
-  set(dawn_dir)
+  set(dawn_cmake_dir)

+  # If Dawn_DIR points to the root directory (instead of <dawn-dir>/cmake), we correct this here
+  get_filename_component(dawn_config_file "${Dawn_DIR}/cmake/DawnConfig.cmake" ABSOLUTE)
+  if(DEFINED Dawn_DIR AND EXISTS "${dawn_config_file}")
+    set(Dawn_DIR "${Dawn_DIR}/cmake" CACHE PATH "Path to DawnConfig.cmake" FORCE)
+  endif()
+
   if(DEFINED DAWN_ROOT)
-    set(dawn_dir ${DAWN_ROOT})
+    set(dawn_cmake_dir "${DAWN_ROOT}/cmake/modules")
   elseif(NOT "$ENV{DAWN_ROOT}" STREQUAL "")
-    set(dawn_dir $ENV{DAWN_ROOT})
+    set(dawn_cmake_dir "$ENV{DAWN_ROOT}/cmake/modules")
   elseif(DEFINED Dawn_DIR)
-    set(dawn_dir ${Dawn_DIR})
+    set(dawn_cmake_dir "${Dawn_DIR}/modules")
   elseif(NOT "$ENV{Dawn_DIR}" STREQUAL "")
-    set(dawn_dir $ENV{Dawn_DIR})
+    set(dawn_cmake_dir "$ENV{Dawn_DIR}/modules")
   elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../dawn")
-    set(dawn_dir ${CMAKE_CURRENT_LIST_DIR}/../dawn)
+    set(dawn_cmake_dir "${CMAKE_CURRENT_LIST_DIR}/../dawn/cmake/modules")
     message(FATAL_ERROR "Could NOT find Dawn. (Try setting DAWN_ROOT in the env)")
   endif()

-  get_filename_component(dawn_dir ${dawn_dir} ABSOLUTE)
+  get_filename_component(dawn_cmake_dir ${dawn_cmake_dir} ABSOLUTE)

   # Sanity check the CMake directory
-  if(NOT EXISTS ${dawn_dir})
-    message(FATAL_ERROR "Invalid Dawn directory: ${dawn_dir} (missing dawn/cmake/modules)")
+  if(NOT EXISTS ${dawn_cmake_dir})
+    message(FATAL_ERROR "Invalid Dawn directory: ${dawn_cmake_dir} (missing dawn/cmake/modules)")
   endif()

-  list(APPEND CMAKE_MODULE_PATH "${dawn_dir}/cmake/modules")
+  list(APPEND CMAKE_MODULE_PATH "${dawn_cmake_dir}")
 endmacro()


Improving ScaLAPACK detection to avoid an MKL oddity.

--- cmake/ElemMathTests.cmake
+++ cmake/ElemMathTests.cmake
@@ -81,10 +81,12 @@

 # Check for ScaLAPACK support
 # ===========================
-check_function_exists(pdpotrf  ELEM_HAVE_PDPOTRF)
-check_function_exists(pdpotrf_ ELEM_HAVE_PDPOTRF_POST)
+# NOTE: pdsyngst was chosen because MKL's ScaLAPACK only defines pdsyngst_,
+#       but not pdsyngst, despite defining both pdpotrf and pdpotrf_.
+check_function_exists(pdsyngst  ELEM_HAVE_PDSYNGST)
+check_function_exists(pdsyngst_ ELEM_HAVE_PDSYNGST_POST)
 check_function_exists(Csys2blacs_handle ELEM_HAVE_CSYS2BLACS)
-if(ELEM_HAVE_PDPOTRF)
+if(ELEM_HAVE_PDSYNGST)
   check_function_exists(pdlaqr0 ELEM_HAVE_PDLAQR0)
   check_function_exists(pdlaqr1 ELEM_HAVE_PDLAQR1)
   if(NOT ELEM_HAVE_PDLAQR0 OR NOT ELEM_HAVE_PDLAQR1 OR
@@ -96,7 +98,7 @@
   endif()
   set(ELEM_SCALAPACK_POST FALSE)
   set(ELEM_SCALAPACK_DEFS "")
-elseif(ELEM_HAVE_PDPOTRF_POST)
+elseif(ELEM_HAVE_PDSYNGST_POST)
   check_function_exists(pdlaqr0_ ELEM_HAVE_PDLAQR0_POST)
   check_function_exists(pdlaqr1_ ELEM_HAVE_PDLAQR1_POST)
   if(NOT ELEM_HAVE_PDLAQR0_POST OR NOT ELEM_HAVE_PDLAQR1_POST OR


Fix a typo.

Fix a typo.

wierd -> weird

--- cmake/FindLIBFABRIC.cmake
+++ cmake/FindLIBFABRIC.cmake
@@ -8,7 +8,7 @@

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

-# This is a bit of a wierd pattern but it allows to bypass pkg-config and
+# This is a bit of a weird pattern but it allows to bypass pkg-config and
 # manually specify library information
 if(NOT (PC_LIBFABRIC_FOUND STREQUAL "IGNORE"))
   find_package(PkgConfig)


build: windows: enable ECS filter (#6268)

Signed-off-by: Wesley Pettit <78c973ed9c1462fe35634d4fce92367e57ac034c@amazon.com>

--- cmake/windows-setup.cmake
+++ cmake/windows-setup.cmake
@@ -97,6 +97,7 @@
   set(FLB_FILTER_REWRITE_TAG    Yes)
   set(FLB_FILTER_GEOIP2         Yes)
   set(FLB_FILTER_AWS            Yes)
+  set(FLB_FILTER_ECS            Yes)
   set(FLB_FILTER_WASM           No)
 endif()


update dependencies core

update dependencies core

--- cmake/Dependencies_core.cmake
+++ cmake/Dependencies_core.cmake
@@ -26,7 +26,7 @@

-find_package(glfw3 CONFIG )
+find_package(glfw3 CONFIG QUIET )
 if(NOT TARGET glfw)
   message("=================================")
   message("Adding Submodule glfw")
@@ -50,7 +50,7 @@
   SET(SAIGA_USE_ZLIB 1)
 elseif(SAIGA_USE_SUBMODULES)
   message("=================================")
-  message("Building Submodule ZLIB")
+  message("Adding Submodule ZLIB")
   add_subdirectory(submodules/zlib)
   PackageHelperTarget(zlib ZLIB_FOUND)
   SET(SAIGA_USE_ZLIB 1)
@@ -64,7 +64,7 @@
   SET(SAIGA_USE_PNG 1)
 elseif(SAIGA_USE_SUBMODULES)
   message("=================================")
-  message("Building Submodule libPNG")
+  message("Adding Submodule libPNG")
   set(PNG_BUILD_ZLIB ON CACHE INTERNAL "")
   set(PNG_STATIC OFF CACHE INTERNAL "")
   set(PNG_EXECUTABLES OFF CACHE INTERNAL "")
@@ -84,10 +84,11 @@
   SET(SAIGA_USE_ASSIMP 1)
 elseif(SAIGA_USE_SUBMODULES)
   message("=================================")
-  message("Building Submodule assimp")
+  message("Adding Submodule assimp")
   add_subdirectory(submodules/assimp)
   PackageHelperTarget(assimp ASSIMP_FOUND)
   SET(SAIGA_USE_ASSIMP 1)
+  message("=================================")
 endif()


DISPATCH-1667 - Make 2.4.2 as the minimum required version of LibWebSockets. This closes #742.

--- cmake/FindLibWebSockets.cmake
+++ cmake/FindLibWebSockets.cmake
@@ -51,7 +51,7 @@
   unset(lws_version_str)
 endif()

-set(lws_required "2.1.0")
+set(lws_required "2.4.2")
 if (LIBWEBSOCKETS_VERSION_STRING AND (LIBWEBSOCKETS_VERSION_STRING VERSION_LESS lws_required))
   message(STATUS "Found libwebsockets version ${LIBWEBSOCKETS_VERSION_STRING} but need at least ${lws_required}")
 else()


Use pkg-config to find Flann

Use pkg-config to find Flann

--- cmake/Modules/FindFLANN.cmake
+++ cmake/Modules/FindFLANN.cmake
@@ -19,41 +19,41 @@

 find_package(PkgConfig QUIET)
 if (FLANN_FIND_VERSION)
-    pkg_check_modules(PC_FLANN flann>=${FLANN_FIND_VERSION})
+    pkg_check_modules(FLANN flann>=${FLANN_FIND_VERSION})
 else(FLANN_FIND_VERSION)
-    pkg_check_modules(PC_FLANN flann)
+    pkg_check_modules(FLANN flann)
 endif(FLANN_FIND_VERSION)

-set(FLANN_DEFINITIONS ${PC_FLANN_CFLAGS_OTHER})
+if(NOT FLANN_FOUND)
+    find_path(FLANN_INCLUDE_DIR flann/flann.hpp
+              HINTS "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
+              PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
+              PATH_SUFFIXES include)

-find_path(FLANN_INCLUDE_DIR flann/flann.hpp
-          HINTS ${PC_FLANN_INCLUDEDIR} ${PC_FLANN_INCLUDE_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
-          PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
-          PATH_SUFFIXES include)
+    find_library(FLANN_LIBRARY
+                 NAMES ${FLANN_RELEASE_NAME}
+                 HINTS "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
+                 PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
+                 PATH_SUFFIXES lib)

-find_library(FLANN_LIBRARY
-             NAMES ${FLANN_RELEASE_NAME}
-             HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
-             PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
-             PATH_SUFFIXES lib)
+    find_library(FLANN_LIBRARY_DEBUG
+                 NAMES ${FLANN_DEBUG_NAME} ${FLANN_RELEASE_NAME}
+                 HINTS "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
+                 PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
+                 PATH_SUFFIXES lib debug/lib)

-find_library(FLANN_LIBRARY_DEBUG
-             NAMES ${FLANN_DEBUG_NAME} ${FLANN_RELEASE_NAME}
-             HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
-             PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
-             PATH_SUFFIXES lib debug/lib)
+    if(NOT FLANN_LIBRARY_DEBUG)
+      set(FLANN_LIBRARY_DEBUG ${FLANN_LIBRARY})
+    endif(NOT FLANN_LIBRARY_DEBUG)

-if(NOT FLANN_LIBRARY_DEBUG)
-  set(FLANN_LIBRARY_DEBUG ${FLANN_LIBRARY})
-endif(NOT FLANN_LIBRARY_DEBUG)
+    set(FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIR})
+    set(FLANN_LIBRARIES optimized ${FLANN_LIBRARY} debug ${FLANN_LIBRARY_DEBUG})

-set(FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIR})
-set(FLANN_LIBRARIES optimized ${FLANN_LIBRARY} debug ${FLANN_LIBRARY_DEBUG})
+    include(FindPackageHandleStandardArgs)
+    find_package_handle_standard_args(FLANN DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIR)

-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(FLANN DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIR)
-
-mark_as_advanced(FLANN_LIBRARY FLANN_LIBRARY_DEBUG FLANN_INCLUDE_DIR)
+    mark_as_advanced(FLANN_LIBRARY FLANN_LIBRARY_DEBUG FLANN_INCLUDE_DIR)
+endif()

 if(FLANN_FOUND)
   message(STATUS "FLANN found (include: ${FLANN_INCLUDE_DIRS}, lib: ${FLANN_LIBRARIES})")


Add new gtest path

Add new gtest path

--- cmake/Modules/FindGtest.cmake
+++ cmake/Modules/FindGtest.cmake
@@ -24,6 +24,7 @@
     HINTS "${GTEST_ROOT}" "$ENV{GTEST_ROOT}"
     PATHS "$ENV{PROGRAMFILES}/gtest" "$ENV{PROGRAMW6432}/gtest"
     PATHS "$ENV{PROGRAMFILES}/gtest-1.7.0" "$ENV{PROGRAMW6432}/gtest-1.7.0"
+    PATH /usr/src/googletest/googletest
     PATH /usr/src/gtest
     PATH_SUFFIXES gtest usr/src/gtest)


fix bug when use extern_openblas and generator is ninja (#39428)

* fix bug when use extern_openblas and generator is ninja

* modify according to zhouwei's comment

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -55,6 +55,7 @@
         INSTALL_COMMAND     make install NO_SHARED=1 NO_LAPACK=1 PREFIX=<INSTALL_DIR>
         UPDATE_COMMAND      ""
         CONFIGURE_COMMAND   ""
+        BUILD_BYPRODUCTS    ${CBLAS_LIBRARIES}
     )
 ELSE(NOT WIN32)
     SET(CBLAS_LIBRARIES
@@ -83,6 +84,8 @@
         CMAKE_CACHE_ARGS    -DCMAKE_INSTALL_PREFIX:PATH=${CBLAS_INSTALL_DIR}
                             -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
                             -DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
+        # ninja need to know where openblas.lib comes from
+        BUILD_BYPRODUCTS    ${CBLAS_LIBRARIES}
         )
     SET(OPENBLAS_SHARED_LIB  ${CBLAS_INSTALL_DIR}/bin/openblas${CMAKE_SHARED_LIBRARY_SUFFIX})
 ENDIF(NOT WIN32)


Pass _GLIBCXX_USE_CXX11_ABI to protobuf (#4088)

* Pass _GLIBCXX_USE_CXX11_ABI to protobuf

- this change allows building nGraph with newer GLIBC: v5.1+

* Specify _GLIBCXX_USE_CXX11_ABI only when NGRAPH_USE_CXX_ABI is defined

--- cmake/external_protobuf.cmake
+++ cmake/external_protobuf.cmake
@@ -77,6 +77,12 @@
         EXCLUDE_FROM_ALL TRUE
         )
 else()
+    if (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()
+
     ExternalProject_Add(
         ext_protobuf
         PREFIX protobuf
@@ -85,7 +91,7 @@
         UPDATE_COMMAND ""
         PATCH_COMMAND ""
         CONFIGURE_COMMAND ./autogen.sh COMMAND ./configure --prefix=${EXTERNAL_PROJECTS_ROOT}/protobuf --disable-shared CXX=${CMAKE_CXX_COMPILER}
-        BUILD_COMMAND $(MAKE) "CXXFLAGS=-std=c++${NGRAPH_CXX_STANDARD} -fPIC"
+        BUILD_COMMAND $(MAKE) "${BUILD_FLAGS}"
         TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/tmp"
         STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/stamp"
         DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/download"


fix 'check' test for cmake > 2.4

fix 'check' test for cmake > 2.4

--- cmake/modules/FindCheck.cmake
+++ cmake/modules/FindCheck.cmake
@@ -9,13 +9,13 @@
 # Look for the library.
 FIND_LIBRARY(CHECK_LIBRARY NAMES check)

-IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4)
+IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
   # handle the QUIETLY and REQUIRED arguments and set CHECK_FOUND to TRUE if
   # all listed variables are TRUE
   INCLUDE(FindPackageHandleStandardArgs)

   FIND_PACKAGE_HANDLE_STANDARD_ARGS(Check "Please install 'check' and 'check-devel' packages" CHECK_LIBRARY CHECK_INCLUDE_DIR)
-ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4)
+ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)

 IF(CHECK_FOUND)
   SET( CHECK_LIBRARIES ${CHECK_LIBRARY} )


Run the tutorials out of the tutorials directory to avoid clashes and pollution with the sources.

--- cmake/modules/RootCTest.cmake
+++ cmake/modules/RootCTest.cmake
@@ -30,5 +30,17 @@

 get_property(test_dirs GLOBAL PROPERTY ROOT_TEST_SUBDIRS)
 foreach(d ${test_dirs})
-  add_subdirectory(${d})
+  list(APPEND test_list ${d})
 endforeach()
+
+if(test_list)
+  list(SORT test_list)
+endif()
+
+foreach(d ${test_list})
+  if(d STREQUAL tutorials)
+    add_subdirectory(${d} runtutorials)  # to avoid clashes with the tutorial sources copied to binary tree
+  else()
+    add_subdirectory(${d})
+  endif()
+endforeach()


Build system: wxwidgets: more verbose reporting of wxwidgets find results

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -47,6 +47,12 @@
     set(wxWidgets_USE_STATIC ON)
   endif(FORCE_EXTERNAL_STATIC)
   find_package(wxWidgets COMPONENTS base core QUIET)
+  message(STATUS "wxWidgets_FOUND           : ${wxWidgets_FOUND}")
+  message(STATUS "wxWidgets_INCLUDE_DIRS    : ${wxWidgets_INCLUDE_DIRS}")
+  message(STATUS "wxWidgets_LIBRARY_DIRS    : ${wxWidgets_LIBRARY_DIRS}")
+  message(STATUS "wxWidgets_LIBRARIES       : ${wxWidgets_LIBRARIES}")
+  message(STATUS "wxWidgets_CXX_FLAGS       : ${wxWidgets_CXX_FLAGS}")
+  message(STATUS "wxWidgets_USE_FILE        : ${wxWidgets_USE_FILE}")
   # Convert wxWidgets_LIBRARIES to full pathname form.
   cmake_link_flags(wxwidgets_LINK_FLAGS "${wxWidgets_LIBRARIES}")
   if(NOT wxWidgets_FOUND OR NOT wxwidgets_LINK_FLAGS)
@@ -83,7 +89,6 @@
     ${wxwidgets_COMPILE_FLAGS}
     " ${wxWidgets_DEFINITIONS_wD} ${wxWidgets_DEFINITIONS_DEBUG_wD}"
     )
-  message(STATUS "wxWidgets found")
   message(STATUS "wxwidgets_COMPILE_FLAGS = ${wxwidgets_COMPILE_FLAGS}")
   message(STATUS "wxwidgets_LINK_FLAGS = ${wxwidgets_LINK_FLAGS}")
   set(wxwidgets_RPATH ${wxWidgets_LIBRARY_DIRS})


check both c++11/c99 maths

check both c++11/c99 maths

--- cmake/vSMCFindCXX11Math.cmake
+++ cmake/vSMCFindCXX11Math.cmake
@@ -24,12 +24,10 @@
     CHECK_CXX_SOURCE_RUNS ("${VSMC_CXX11_MATH_TEST_SOURCE}"
         VSMC_CXX11_MATH_STD_FOUND)
 ENDIF (VSMC_ENABLE_CXX11)
-IF (NOT VSMC_CXX11_MATH_STD_FOUND)
-    SET (CMAKE_REQUIRED_DEFINITIONS ${SAFE_CMAKE_REQUIRED_DEFINITIONS}
-        -DVSMC_HAS_C99LIB_MATH=1 -DVSMC_HAS_CXX11LIB_CMATH=0)
-    CHECK_CXX_SOURCE_RUNS ("${VSMC_CXX11_MATH_TEST_SOURCE}"
-        VSMC_CXX11_MATH_C99_FOUND)
-ENDIF (NOT VSMC_CXX11_MATH_STD_FOUND)
+SET (CMAKE_REQUIRED_DEFINITIONS ${SAFE_CMAKE_REQUIRED_DEFINITIONS}
+    -DVSMC_HAS_C99LIB_MATH=1 -DVSMC_HAS_CXX11LIB_CMATH=0)
+CHECK_CXX_SOURCE_RUNS ("${VSMC_CXX11_MATH_TEST_SOURCE}"
+    VSMC_CXX11_MATH_C99_FOUND)
 IF (NOT VSMC_CXX11_MATH_STD_FOUND AND NOT VSMC_CXX11_MATH_C99_FOUND)
     SET (CMAKE_REQUIRED_DEFINITIONS ${SAFE_CMAKE_REQUIRED_DEFINITIONS}
         -DVSMC_HAS_C99LIB_MATH=0 -DVSMC_HAS_CXX11LIB_CMATH=0)


Windows: fixed linker errors. Minor stylistic changes.

--- toolchains/android-studio.toolchain.cmake
+++ toolchains/android-studio.toolchain.cmake
@@ -26,9 +26,11 @@
     include( "${CMAKE_CURRENT_LIST_DIR}/clang.cmake" )

     # Implementation note:
-    # This currently breaks with linker errors "undefined reference to '__asan_report_load1', etc.
-    # For now, just disable sanitization on Android. I will investigate this later.
-    #                                        ( 11.08.2016. Nenad Miksa )
+    # This currently breaks with linker errors "undefined reference to
+    # '__asan_report_load1', etc.
+    # For now, just disable sanitization on Android. I will investigate this
+    # later.
+    #                                         (11.08.2016. Nenad Miksa)
     unset( TNUN_compiler_runtime_sanity_checks )
     unset( TNUN_linker_runtime_sanity_checks )
 else()
@@ -58,7 +60,12 @@

 # apparently gold is not supported on mips
 if( NOT ( ANDROID_ABI STREQUAL "mips" OR ANDROID_ABI STREQUAL "mips64" ) )
-    link_libraries( -fuse-ld=gold )
+    # Implementation note: https://github.com/android-ndk/ndk/issues/75
+    #                                         (01.03.2017. Domagoj Saric)
+    if ( WIN32 )
+        set( gold_suffix ".exe" )
+    endif()
+    link_libraries( -fuse-ld=gold${gold_suffix} )
     link_libraries( $<$<CONFIG:RELEASE>:-Wl,--icf=all>     ) # http://research.google.com/pubs/pub36912.html Safe ICF: Pointer Safe and Unwinding Aware Identical Code Folding in Gold
 endif()


STYLE: use IF(NOT ) instead of IF() ELSE()

Alex

--- CMake/vtkDependentOption.cmake
+++ CMake/vtkDependentOption.cmake
@@ -17,16 +17,17 @@
         SET(${option}_AVAILABLE 0)
       ENDIF(NOT ${d})
     ENDFOREACH(d)
+
     IF(${option}_AVAILABLE)
       OPTION(${option} "${doc}" "${default}")
       SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
     ELSE(${option}_AVAILABLE)
-      IF(${option} MATCHES "^${option}$")
-      ELSE(${option} MATCHES "^${option}$")
+      IF(NOT ${option} MATCHES "^${option}$")
         SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
-      ENDIF(${option} MATCHES "^${option}$")
+      ENDIF(NOT ${option} MATCHES "^${option}$")
       SET(${option} ${force})
     ENDIF(${option}_AVAILABLE)
+
   ELSE(${option}_ISSET MATCHES "^${option}_ISSET$")
     SET(${option} "${${option}_ISSET}")
   ENDIF(${option}_ISSET MATCHES "^${option}_ISSET$")


CI: enable doxygen only for develop and release profiles

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -47,7 +47,7 @@

 # set pipelines to enable documentation
 set(ci_cookbook_profiles mr develop release)
-set(ci_doxygen_profiles mr develop release)
+set(ci_doxygen_profiles develop release)
 list(FIND ci_cookbook_profiles ${ci_profile} ci_do_cookbook)
 list(FIND ci_doxygen_profiles ${ci_profile} ci_do_doxygen)


Changes to match the specification given in tracker item 3242.  https://tracker.physiomeproject.org/show_bug.cgi?id=3242

--- core/source/configure/cmiss_shared_object.h.cmake
+++ core/source/configure/cmiss_shared_object.h.cmake
@@ -2,27 +2,30 @@
 #ifndef CMISS_SHARED_OBJECT_H
 #define CMISS_SHARED_OBJECT_H

+// Handle the exporting of symbols from a dynamic shared object
+// across different oses.
+
 #if defined _WIN32 || defined __CYGWIN__
-  #define ZINC_DLL_IMPORT __declspec(dllimport)
-  #define ZINC_DLL_EXPORT __declspec(dllexport)
+  #define ZINC_DSO_IMPORT __declspec(dllimport)
+  #define ZINC_DSO_EXPORT __declspec(dllexport)
 #else
   #if __GNUC__ >= 4
-    #define ZINC_DLL_IMPORT __attribute__ ((visibility ("default")))
-    #define ZINC_DLL_EXPORT __attribute__ ((visibility ("default")))
+    #define ZINC_DSO_IMPORT __attribute__ ((visibility ("default")))
+    #define ZINC_DSO_EXPORT __attribute__ ((visibility ("default")))
   #else
-    #define ZINC_DLL_IMPORT
-    #define ZINC_DLL_EXPORT
+    #define ZINC_DSO_IMPORT
+    #define ZINC_DSO_EXPORT
   #endif
 #endif

 // Now we use the generic helper definitions above to define ZINC_API.
-// ZINC_API is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build)
+// ZINC_API is used for the public API symbols. It either DSO imports or DSO exports (or does nothing for static build)

 #ifdef ZINC_SHARED_OBJECT // defined if Zinc is compiled as a shared object
-  #ifdef ZINC_EXPORTS // defined if we are building the Zinc DLL (instead of using it)
-    #define ZINC_API ZINC_DLL_EXPORT
+  #ifdef ZINC_EXPORTS // defined if we are building the Zinc DSO (instead of using it)
+    #define ZINC_API ZINC_DSO_EXPORT
   #else
-    #define ZINC_API ZINC_DLL_IMPORT
+    #define ZINC_API ZINC_DSO_IMPORT
   #endif // ZINC_EXPORTS
 #else // ZINC_SHARED_OBJECT is not defined: this means Zinc is a static lib.
   #define ZINC_API


Add newline

Add newline


nm

nm

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -146,7 +146,7 @@
     #
     target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     PCL_LINK_OPENMP(${_exename})
-	add_test(${_name} ${_exename} ${PCL_ADD_TEST_ARGUMENTS})
+  	add_test(${_name} ${_exename} ${PCL_ADD_TEST_ARGUMENTS})
 endmacro(PCL_ADD_TEST)


Revert "fix the GTest with catkin again" to ease applying working copy

This reverts commit e8e5da3afec0371a570011b889c5cae8ebeaca80.

--- cmake/tools/gtest.cmake
+++ cmake/tools/gtest.cmake
@@ -34,15 +34,9 @@
 set(GTEST_FOUND ${GTEST_FOUND} CACHE INTERNAL "")
 if(NOT GTEST_FOUND)
   if (EXISTS "/usr/src/gtest")
-    message(INFO "Building GTest from source.")
     # for now, this would only work on Ubuntu
     add_subdirectory("/usr/src/gtest/" ${CMAKE_BINARY_DIR}/gtest)
     set(CATKIN_GTEST_SRC_FOUND TRUE)
-    set(GTEST_LIBRARIES "gtest;gtest_main")
-    find_path(GTEST_INCLUDE_DIRS gtest/gtest.h)
-    set(GTEST_MAIN_LIBRARIES ${GTEST_LIBRARIES})
-    set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES})
-    set(GTEST_FOUND TRUE)
   else()
     message(WARNING "GTest not found; C++ tests will fail to build.")
   endif()


COMP: The FlatStructuring element has a single template parameter. It is       more like the calculators than the image filters.

--- Wrapping/WrapITK/Modules/Base/wrap_itkFlatStructuringElement.cmake
+++ Wrapping/WrapITK/Modules/Base/wrap_itkFlatStructuringElement.cmake
@@ -1,5 +1,5 @@
 WRAP_CLASS("itk::FlatStructuringElement")
-  WRAP_IMAGE_FILTER_USIGN_INT(2)
-  WRAP_IMAGE_FILTER_SIGN_INT(2)
-  WRAP_IMAGE_FILTER_REAL(2)
+  WRAP_IMAGE_FILTER_USIGN_INT(1)
+  WRAP_IMAGE_FILTER_SIGN_INT(1)
+  WRAP_IMAGE_FILTER_REAL(1)
 END_WRAP_CLASS()


cmake: Remove deprecated crtn/crti steps

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -37,8 +37,6 @@

 set(NAME_STUB "${CONAN_INCLUDEOS_ROOT}/src/service_name.cpp")
-set(CRTN ${CONAN_LIB_DIRS_MUSL}/crtn.o)
-set(CRTI ${CONAN_LIB_DIRS_MUSL}/crti.o)

 set(TRIPLE "${ARCH}-pc-linux-elf")

@@ -100,9 +98,9 @@
 # linker stuff
 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) # this removed -rdynamic from linker output
 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-  set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> -o <TARGET> <LINK_FLAGS> <OBJECTS> ${CRTI} --start-group <LINK_LIBRARIES> --end-group ${CRTN}")
+  set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> -o <TARGET> <LINK_FLAGS> <OBJECTS> --start-group <LINK_LIBRARIES> --end-group")
 else()
-  set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> -S -o <TARGET> <LINK_FLAGS> <OBJECTS> ${CRTI} --start-group <LINK_LIBRARIES> --end-group ${CRTN}")
+  set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> -S -o <TARGET> <LINK_FLAGS> <OBJECTS> --start-group <LINK_LIBRARIES> --end-group")
 endif()

 set(CMAKE_SKIP_RPATH ON)


:white_check_mark: add test for JSON_SystemInclude flag

--- cmake/ci.cmake
+++ cmake/ci.cmake
@@ -755,7 +755,7 @@
     )
 endif()

-set(JSON_CMAKE_FLAGS "JSON_BuildTests;JSON_Install;JSON_MultipleHeaders;JSON_Sanitizer;JSON_Valgrind;JSON_NoExceptions;JSON_Coverage;JSON_Diagnostics")
+set(JSON_CMAKE_FLAGS "JSON_BuildTests;JSON_Install;JSON_MultipleHeaders;JSON_ImplicitConversions;JSON_Sanitizer;JSON_Valgrind;JSON_NoExceptions;JSON_Coverage;JSON_Diagnostics;JSON_SystemInclude")

 foreach(JSON_CMAKE_FLAG ${JSON_CMAKE_FLAGS})
     string(TOLOWER "ci_cmake_flag_${JSON_CMAKE_FLAG}" JSON_CMAKE_FLAG_TARGET)


remove tons of warnings from moderngpu

remove tons of warnings from moderngpu

[git-p4: depot-paths = "//sw/gpgpu/nvbio/main/": change = 18081486]

--- cmake-local/gcc.cmake
+++ cmake-local/gcc.cmake
@@ -1,8 +1,8 @@
 if (CMAKE_COMPILER_IS_GNUCC)
     # common GCC compiler flags
     # we add -Wno-unknown-pragmas because of nvcc's #pragma unroll
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unknown-pragmas")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unknown-pragmas -Wstrict-aliasing=0")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas -Wstrict-aliasing=0")

     if(WERROR)
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")


remove FindEigen

remove FindEigen

--- cmake/FindEigen.cmake
+++ cmake/FindEigen.cmake
@@ -1,39 +0,0 @@
-# ============================================================================
-#  cmake/FindEigen.cmake
-# ----------------------------------------------------------------------------
-#
-#                          vSMC: Scalable Monte Carlo
-#
-#  This file is distribured under the 2-clauses BSD License.
-#  See LICENSE for details.
-# ============================================================================
-
-# Find Eigen support
-#
-# This module can be used to find Eigen headers
-#
-# The following variables are set
-#
-# EIGEN_FOUND          - TRUE if Eigen headers are found
-# Eigen_INCLUDE_DIR    - The directory containing OpenCL headers
-#
-# The following variables affect the behavior of this module
-#
-# Eigen_INC_PATH - The path CMake shall try to find headers first
-
-IF (DEFINED EIGEN_FOUND)
-    RETURN ()
-ENDIF (DEFINED EIGEN_FOUND)
-
-IF (NOT DEFINED Eigen_INCLUDE_DIR)
-    FIND_PATH (Eigen_INCLUDE_DIR Eigen/Eigen
-        PATHS ${Eigen_INC_PATH} ENV CPATH NO_DEFAULT_PATH)
-    FIND_PATH (Eigen_INCLUDE_DIR Eigen/Eigen)
-    IF (Eigen_INCLUDE_DIR)
-        MESSAGE (STATUS "Found Eigen headers: ${Eigen_INCLUDE_DIR}")
-        SET (EIGEN_FOUND TRUE CACHE BOOL "Found Eigen")
-    ELSE (Eigen_INCLUDE_DIR)
-        MESSAGE (STATUS "NOT Found Eigen headers")
-        SET (EIGEN_FOUND FALSE CACHE BOOL "Not Found Eigen")
-    ENDIF (Eigen_INCLUDE_DIR)
-ENDIF (NOT DEFINED Eigen_INCLUDE_DIR)


[cmake] MUMPS: check also for header

[cmake] MUMPS: check also for header

--- cmake/FindMUMPS.cmake
+++ cmake/FindMUMPS.cmake
@@ -42,8 +42,19 @@
   FIND_LIBRARY(PORD_LIBRARY pord)
 ENDIF(MUMPS_LIBRARY_DIRECTORY)

+IF(NOT MUMPS_INCLUDE_DIR)
+  GET_FILENAME_COMPONENT(MUMPS_LIBRARY_DIR ${MUMPS_LIBRARY} PATH)
+  GET_FILENAME_COMPONENT(MUMPS_LIBRARY_DIR_DIR ${MUMPS_LIBRARY_DIR} PATH)
+
+  find_path(MUMPS_INCLUDE_DIR dmumps_c.h
+    HINTS
+    ${MUMPS_LIBRARY_DIR_DIR}/include
+    )
+ENDIF()
+
+
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUMPS
-  REQUIRED_VARS MUMPS_LIBRARY)
+  REQUIRED_VARS MUMPS_LIBRARY MUMPS_INCLUDE_DIR)

 IF(MUMPS_LIBRARY)
   GET_FILENAME_COMPONENT(MUMPS_LIBRARY_DIRS ${MUMPS_LIBRARY} PATH)
@@ -57,10 +68,7 @@
     SET(MUMPS_LIBRARIES ${MUMPS_LIBRARIES} ${PORD_LIBRARY})
   ENDIF()

-  IF(NOT MUMPS_INCLUDE_DIRS)
-    GET_FILENAME_COMPONENT(MUMPS_LIBRARY_DIRS_DIR ${MUMPS_LIBRARY_DIRS} PATH)
-    SET(MUMPS_INCLUDE_DIRS ${MUMPS_LIBRARY_DIRS_DIR}/include)
-  ENDIF()
+  SET(MUMPS_INCLUDE_DIRS ${MUMPS_INCLUDE_DIR})

 ELSE(MUMPS_LIBRARY)
   IF(MUMPS_FIND_REQUIRED)


fixed QT4 CMake file

fixed QT4 CMake file

--- cmake/V4RFindQt.cmake
+++ cmake/V4RFindQt.cmake
@@ -1,4 +1,4 @@
-if(WITH_QT)
+if(WITH_QT4)
   find_package(Qt4 )
   if(Qt4_FOUND)
     set(QT4_LIBRARIES "${QT_LIBRARIES}")


[cmake] bugfix: axl_import failed if import_xxx.cmake was not found — even when import is optional

--- cmake/axl_utils.cmake
+++ cmake/axl_utils.cmake
@@ -3,7 +3,7 @@
 # aligned variable list printing helpers

 macro (
-axl_calc_max_string_length
+axl_calc_max_string_length
 	_RESULT
 	# ...
 	)
@@ -17,8 +17,8 @@
 			set (_MAX_LENGTH ${_LENGTH})
 		endif ()
 	endforeach ()
-
-	set (${_RESULT} ${_MAX_LENGTH})
+
+	set (${_RESULT} ${_MAX_LENGTH})
 endmacro ()

 macro (
@@ -64,19 +64,19 @@
 		if (_MATCH)
 			list (APPEND _FILTERED_LIST ${_ITEM})
 		endif ()
-	endforeach ()
-
-	set (${_RESULT} ${_FILTERED_LIST})
-endmacro ()
-
-#..............................................................................
-
-# create a template file in form
-#
+	endforeach ()
+
+	set (${_RESULT} ${_FILTERED_LIST})
+endmacro ()
+
+#..............................................................................
+
+# create a template file in form
+#
 # set (SETTING1 SETTING1-NOTFOUND)
 # set (SETTING2 SETTING2-NOTFOUND)
 # ...
-#
+#

 macro (
 	axl_create_empty_setting_file
@@ -364,13 +364,13 @@

 	axl_append_target_string_property (
 		${_TARGET}
-		COMPILE_FLAGS
+		COMPILE_FLAGS
 		"/Yu\"${_PCH_H}\" /Fp\"${_PCH_BIN}\""
 		)

 	axl_append_source_file_string_property (
 		${_PCH_CPP}
-		COMPILE_FLAGS
+		COMPILE_FLAGS
 		"/Yc\"${_PCH_H}\" /Fp\"${_PCH_BIN}\""
 		)

@@ -391,7 +391,7 @@
 	foreach (_FILE ${_FILE_LIST})
 		axl_append_source_file_string_property (
 			${_FILE}
-			COMPILE_FLAGS
+			COMPILE_FLAGS
 			"/Y-"
 			)
 	endforeach ()
@@ -409,7 +409,7 @@
 	set (_PCH_BIN "${CMAKE_CURRENT_BINARY_DIR}/${_PCH_H}.gcc.gch")

 	# get directory flags, defines, includes
-
+
 	get_property (
 		_DIR_CXX_FLAGS
 		DIRECTORY
@@ -429,7 +429,7 @@
 		)

 	# get target flags, defines, includes
-
+
 	get_target_property (
 		_TARGET_CXX_DEFINES
 		${_TARGET}
@@ -458,7 +458,7 @@
 	endif ()

 	# append directory flags, defines, includes
-
+
 	if (_DIR_CXX_FLAGS)
 		string (REPLACE " " ";" _DIR_CXX_FLAGS ${_DIR_CXX_FLAGS})
 		list (APPEND _CXX_FLAGS ${_DIR_CXX_FLAGS})
@@ -496,7 +496,7 @@
 	endif ()

 	# append extra flags passed in vararg
-
+
 	if (_EXTRA_FLAG_LIST)
 		list (APPEND _CXX_FLAGS "${_EXTRA_FLAG_LIST}")
 	endif ()
@@ -585,7 +585,7 @@
 	_FILE_NAME
 	# ...
 	)
-
+
 	set (_DIR_LIST ${ARGN})

 	set (_FILE_PATH ${_FILE_NAME}-NOTFOUND)
@@ -594,7 +594,7 @@
 		if (EXISTS ${_DIR}/${_FILE_NAME})
 			set (_FILE_PATH ${_DIR}/${_FILE_NAME})
 			break ()
-		endif ()
+		endif ()
 	endforeach ()

 	set (${_RESULT} ${_FILE_PATH})
@@ -614,14 +614,14 @@
 			set (_FILE_PATH ${_DIR}/${_FILE_NAME})
 			break ()
 		endif ()
-
+
 		get_filename_component (_PARENT_DIR "${_DIR}/.." ABSOLUTE)

 		if (${_DIR} STREQUAL ${_PARENT_DIR})
 			set (_FILE_PATH ${_FILE_NAME}-NOTFOUND)
 			break ()
-		endif ()
-
+		endif ()
+
 		set (_DIR ${_PARENT_DIR})
 	endwhile ()

@@ -662,10 +662,10 @@
 	_SRC_FILE_NAME
 	_DST_FILE_NAME
 	)
-
+
 	add_custom_command (
-		TARGET ${_TARGET}
-		POST_BUILD
+		TARGET ${_TARGET}
+		POST_BUILD
 		COMMAND ${CMAKE_COMMAND} -E copy_if_different
 			"${_SRC_FILE_NAME}"
 			"${_DST_FILE_NAME}"
@@ -679,7 +679,7 @@
 	_DST_DIR
 	# ...
 	)
-
+
 	set (_FILE_NAME_LIST ${ARGN})

 	foreach (_FILE_NAME ${_FILE_NAME_LIST})
@@ -697,7 +697,7 @@
 	_DST_FILE
 	# ...
 	)
-
+
 	set (_PERMISSION_LIST ${ARGN})
 	set (_TMP_FILE ${CMAKE_CURRENT_BINARY_DIR}/tmp/${_DST_FILE})

@@ -717,10 +717,10 @@
 	_RESULT
 	_DIR
 	)
-
+
 	file (GLOB _FILE_LIST RELATIVE ${_DIR} ${_DIR}/*)
 	set (_DIR_LIST)
-
+
 	foreach (_FILE ${_FILE_LIST})
 		if (IS_DIRECTORY ${_DIR}/${_FILE})
 			LIST (APPEND _DIR_LIST ${_FILE})
@@ -736,7 +736,7 @@
 # target & source file property helpers

 macro (
-axl_append_target_string_property
+axl_append_target_string_property
 	_TARGET
 	_PROPERTY
 	_VALUE
@@ -758,11 +758,11 @@
 		${_TARGET}
 		PROPERTIES
 		${_PROPERTY} ${_NEW_VALUE}
-		)
-endmacro ()
-
-macro (
-axl_append_source_file_string_property
+		)
+endmacro ()
+
+macro (
+axl_append_source_file_string_property
 	_FILE
 	_PROPERTY
 	_VALUE
@@ -784,18 +784,18 @@
 		${_FILE}
 		PROPERTIES
 		${_PROPERTY} ${_NEW_VALUE}
-		)
-endmacro ()
-
-macro (
-axl_append_target_list_property
+		)
+endmacro ()
+
+macro (
+axl_append_target_list_property
 	_TARGET
 	_PROPERTY
 	#...
 	)

 	set (_VALUE_LIST ${ARGN})
-
+
 	get_target_property (
 		_OLD_VALUE_LIST
 		${_TARGET}
@@ -814,18 +814,18 @@
 		${_TARGET}
 		PROPERTIES
 		${_PROPERTY} "${_NEW_VALUE_LIST}"
-		)
-endmacro ()
-
-macro (
-axl_append_source_file_list_property
+		)
+endmacro ()
+
+macro (
+axl_append_source_file_list_property
 	_FILE
 	_PROPERTY
 	#...
 	)

 	set (_VALUE_LIST ${ARGN})
-
+
 	get_source_file_property (
 		_OLD_VALUE_LIST
 		${_FILE}
@@ -844,12 +844,12 @@
 		${_FILE}
 		PROPERTIES
 		${_PROPERTY} "${_NEW_VALUE_LIST}"
-		)
-endmacro ()
-
-#..............................................................................
-
-# imports -- CMake' find_package replacement with support for manual override
+		)
+endmacro ()
+
+#..............................................................................
+
+# imports -- CMake' find_package replacement with support for manual override

 set (AXL_STD_IMPORT_DIR ${CMAKE_CURRENT_LIST_DIR})

@@ -862,7 +862,7 @@
 	set (${_IMPORT}_FOUND FALSE)

 	# use AXL_IMPORT_DIR_LIST first (to allow overriding)
-
+
 	foreach (_IMPORT_DIR ${AXL_IMPORT_DIR_LIST})
 		unset (_IMPORT_FILE_PATH)

@@ -871,22 +871,22 @@
 			break ()
 		endif ()
 	endforeach ()
-
+
 	# fallback to standard import_*.cmake
-
-	if (NOT _IMPORT_FILE_PATH)
-		if (EXISTS ${AXL_STD_IMPORT_DIR}/import_${_IMPORT}.cmake)
-			set (_IMPORT_FILE_PATH ${AXL_STD_IMPORT_DIR}/import_${_IMPORT}.cmake)
-		else ()
-			message (FATAL_ERROR "import_${_IMPORT}.cmake not found (use AXL_IMPORT_DIR_LIST in dependencies.cmake)")
-		endif ()
-	endif ()
-
-	include (${_IMPORT_FILE_PATH})
-
-	string (TOUPPER ${_IMPORT} _IMPORT_UC)
-	if (NOT ${_IMPORT_UC}_FOUND AND NOT _IS_OPTIONAL)
-		message (FATAL_ERROR "${_IMPORT} is required but not found, check paths.cmake")
+
+	if (NOT _IMPORT_FILE_PATH AND EXISTS ${AXL_STD_IMPORT_DIR}/import_${_IMPORT}.cmake)
+		set (_IMPORT_FILE_PATH ${AXL_STD_IMPORT_DIR}/import_${_IMPORT}.cmake)
+	endif ()
+
+	if (_IMPORT_FILE_PATH)
+		include (${_IMPORT_FILE_PATH})
+
+		string (TOUPPER ${_IMPORT} _IMPORT_UC)
+		if (NOT ${_IMPORT_UC}_FOUND AND NOT _IS_OPTIONAL)
+			message (FATAL_ERROR "${_IMPORT} is required but not found, check paths.cmake")
+		endif ()
+	elseif (NOT _IS_OPTIONAL)
+		message (FATAL_ERROR "import_${_IMPORT}.cmake not found (use AXL_IMPORT_DIR_LIST in dependencies.cmake)")
 	endif ()
 endmacro ()

@@ -897,7 +897,7 @@

 	set (_IMPORT_LIST ${ARGN})
 	set (_IS_OPTIONAL FALSE)
-
+
 	foreach (_IMPORT ${_IMPORT_LIST})
 		if ("${_IMPORT}" STREQUAL "REQUIRED")
 			set (_IS_OPTIONAL FALSE)
@@ -907,9 +907,9 @@
 			axl_include_import_file (
 				${_IMPORT}
 				_IS_OPTIONAL
-				)
-		endif ()
-	endforeach ()
-endmacro ()
-
-#..............................................................................
+				)
+		endif ()
+	endforeach ()
+endmacro ()
+
+#..............................................................................


[CMake][PowerPC] Recognize LLVM_NATIVE_TARGET="ppc64le" as PowerPC

Summary:
This value is derived from the host triple, which on the machine
I'm currently using is `ppc64le-linux-redhat`. This change makes
LLVM compile.

Reviewers: nemanjai
Differential Revision: https://reviews.llvm.org/D57118

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -392,6 +392,8 @@
 elseif (LLVM_NATIVE_ARCH MATCHES "sparc")
   set(LLVM_NATIVE_ARCH Sparc)
 elseif (LLVM_NATIVE_ARCH MATCHES "powerpc")
+  set(LLVM_NATIVE_ARCH PowerPC)
+elseif (LLVM_NATIVE_ARCH MATCHES "ppc64le")
   set(LLVM_NATIVE_ARCH PowerPC)
 elseif (LLVM_NATIVE_ARCH MATCHES "aarch64")
   set(LLVM_NATIVE_ARCH AArch64)


Revert "[MSan] Enable on PowerPC64."

Revert "[MSan] Enable on PowerPC64."

This reverts commit r269522.

This broke dtls_test.c on ppc64le buildbots.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -183,7 +183,7 @@
     ${MIPS32} ${MIPS64} ${PPC64})
 set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
 set(ALL_LSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
-set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})
+set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
 set(ALL_PROFILE_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${PPC64}
     ${MIPS32} ${MIPS64})
 set(ALL_TSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})


Build lua_sandbox before rust-protobuf so the lib directory will exist

--- cmake/externals.cmake
+++ cmake/externals.cmake
@@ -25,4 +25,5 @@
     CONFIGURE_COMMAND ""
     INSTALL_COMMAND ${CMAKE_COMMAND} -E copy libprotobuf.rlib "${PROJECT_PATH}/lib/" && ${CMAKE_COMMAND} -E make_directory "${PROJECT_PATH}/bin/" && ${CMAKE_COMMAND} -E copy protoc-gen-rust "${PROJECT_PATH}/bin/"
     UPDATE_COMMAND "" # comment out to enable updates
+    DEPENDS lua_sandbox
 )


Minor packing optimization

Minor packing optimization

--- cmake/packaging.cmake
+++ cmake/packaging.cmake
@@ -188,7 +188,9 @@
 endif()
 endif()

-install(DIRECTORY ${IVW_ROOT_DIR}/data/help DESTINATION data COMPONENT qt_editor)
+install(FILES ${IVW_ROOT_DIR}/data/help/inviwo.qch DESTINATION data/help COMPONENT qt_editor)
+install(FILES ${IVW_ROOT_DIR}/data/help/inviwo.qhc DESTINATION data/help COMPONENT qt_editor)
+install(FILES ${IVW_ROOT_DIR}/data/help/inviwo.qhcp DESTINATION data/help COMPONENT qt_editor)
 install(DIRECTORY ${IVW_ROOT_DIR}/data/images DESTINATION data COMPONENT images)
 install(DIRECTORY ${IVW_ROOT_DIR}/data/scripts DESTINATION data COMPONENT scripts)
 install(DIRECTORY ${IVW_ROOT_DIR}/data/volumes DESTINATION data COMPONENT volumes)


Update UseDUnittest.cmake

Update UseDUnittest.cmake

added add_target_unittest macro

--- cmake-d/UseDUnittest.cmake
+++ cmake-d/UseDUnittest.cmake
@@ -6,6 +6,31 @@
 #
 # See LICENSE for details.
 #
+
+macro(target_add_unittests _target _sourceFiles)
+    set(_testname "test_${_target}")
+    set(main_unittest "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/unittest.d")
+
+    if(NOT EXISTS ${main_unittest})
+        file(WRITE ${main_unittest} "// Generated by UseDUnittest.cmake\nint main() { return 0; }")
+    endif()
+
+    set(SOURCEFILES )
+    foreach(source ${_sourceFiles})
+        list(APPEND SOURCEFILES "${CMAKE_CURRENT_SOURCE_DIR}/${source}")
+    endforeach()
+
+    get_target_property(include_dirs ${_target} INCLUDE_DIRECTORIES)
+    set(INCLUDES )
+    foreach(include_dir ${include_dirs})
+        list(APPEND INCLUDES "${CMAKE_INCLUDE_FLAG_D}${include_dir}")
+    endforeach()
+
+    separate_arguments(CMAKE_D_FLAGS)
+
+    add_test(NAME ${_testname}
+        COMMAND ${CMAKE_D_COMPILER} ${CMAKE_D_FLAGS} ${INCLUDES} -unittest -main ${SOURCEFILES})
+endmacro()

 macro(add_unittests _sourcefile)


add ZMQ version check script

add ZMQ version check script

--- cmake/modules/zeromq.cmake
+++ cmake/modules/zeromq.cmake
@@ -16,8 +16,28 @@
 ### ZeroMQ ###

 # TODO(legend): check zeromq version?
-find_path(ZMQ_INCLUDE_DIR NAMES zmq.hpp PATHS ${ZMQ_SEARCH_PATH})
+# find_path(ZMQ_INCLUDE_DIR NAMES zmq.hpp PATHS ${ZMQ_SEARCH_PATH})
+find_path(ZMQ_INCLUDE_DIR NAMES zmq.h PATHS ${ZMQ_SEARCH_PATH})
 find_library(ZMQ_LIBRARY NAMES zmq PATHS ${ZMQ_SEARCH_PATH})
+
+if (ZMQ_INCLUDE_DIR)
+  set(_ZeroMQ_H ${ZMQ_INCLUDE_DIR}/zmq.h)
+
+  function(_zmqver_EXTRACT _ZeroMQ_VER_COMPONENT _ZeroMQ_VER_OUTPUT)
+    set(CMAKE_MATCH_1 "0")
+    set(_ZeroMQ_expr "^[ \\t]*#define[ \\t]+${_ZeroMQ_VER_COMPONENT}[ \\t]+([0-9]+)$")
+    file(STRINGS "${_ZeroMQ_H}" _ZeroMQ_ver REGEX "${_ZeroMQ_expr}")
+    string(REGEX MATCH "${_ZeroMQ_expr}" ZeroMQ_ver "${_ZeroMQ_ver}")
+    set(${_ZeroMQ_VER_OUTPUT} "${CMAKE_MATCH_1}" PARENT_SCOPE)
+  endfunction()
+
+  _zmqver_EXTRACT("ZMQ_VERSION_MAJOR" ZeroMQ_VERSION_MAJOR)
+  _zmqver_EXTRACT("ZMQ_VERSION_MINOR" ZeroMQ_VERSION_MINOR)
+  _zmqver_EXTRACT("ZMQ_VERSION_PATCH" ZeroMQ_VERSION_PATCH)
+
+  message(STATUS "ZeroMQ version: ${ZeroMQ_VERSION_MAJOR}.${ZeroMQ_VERSION_MINOR}.${ZeroMQ_VERSION_PATCH}")
+
+endif()

 if(ZMQ_INCLUDE_DIR AND ZMQ_LIBRARY)
     set(ZMQ_FOUND true)
@@ -39,10 +59,11 @@
             UPDATE_COMMAND ""
             CONFIGURE_COMMAND ""
             BUILD_COMMAND ""
-            INSTALL_COMMAND cp ${THIRDPARTY_DIR}/src/cppzmq/zmq.hpp ${PROJECT_BINARY_DIR}/include/zmq.hpp
+            INSTALL_COMMAND mkdir -p ${PROJECT_BINARY_DIR}/include && cp ${THIRDPARTY_DIR}/src/cppzmq/zmq.hpp ${PROJECT_BINARY_DIR}/include/zmq.hpp
         )
         list(APPEND external_project_dependencies cppzmq)
-
+        # add_dependencies(cppzmq libzmq)
+        set(ZMQ_INCLUDE_DIR "${PROJECT_BINARY_DIR}/include")
     endif(NOT ZMQ_INCLUDE_DIR)
     if(NOT ZMQ_LIBRARY)
         ExternalProject_Add(
@@ -55,14 +76,13 @@
             CMAKE_ARGS -DZMQ_BUILD_TESTS=OFF
         )
         list(APPEND external_project_dependencies libzmq)
-        add_dependencies(cppzmq libzmq)
+        if(WIN32)
+            set(ZMQ_LIBRARY "${PROJECT_BINARY_DIR}/lib/libzmq.lib")
+        else(WIN32)
+            set(ZMQ_LIBRARY "${PROJECT_BINARY_DIR}/lib/libzmq.so")
+        endif(WIN32)
     endif(NOT ZMQ_LIBRARY)
-    set(ZMQ_INCLUDE_DIR "${PROJECT_BINARY_DIR}/include")
-    if(WIN32)
-        set(ZMQ_LIBRARY "${PROJECT_BINARY_DIR}/lib/libzmq.lib")
-    else(WIN32)
-        set(ZMQ_LIBRARY "${PROJECT_BINARY_DIR}/lib/libzmq-static.a")
-    endif(WIN32)
+
     message (STATUS "  (Headers should be)       ${ZMQ_INCLUDE_DIR}")
     message (STATUS "  (Library should be)       ${ZMQ_LIBRARY}")
     set(ZEROMQ_FOUND true)


"fix" nsis image ^VUe2999e^VUe29998

"fix" nsis image ^VUe2999e^VUe29998

--- packages/pack-template.cmake
+++ packages/pack-template.cmake
@@ -65,11 +65,20 @@
     set(CPACK_PACKAGE_ICON                  "${CMAKE_SOURCE_DIR}/packages/logo.bmp")
     set(CPACK_PACKAGE_RELOCATABLE           OFF)

-
     # NSIS package information

 	if(WIN32)
-		file(TO_NATIVE_PATH ${CPACK_PACKAGE_ICON} CPACK_PACKAGE_ICON)
+        # NOTE: for using MUI (UN)WELCOME images we suggest to replace nsis defaults,
+        # since there is currently no way to do so without manipulating the installer template (which we won't).
+        # http://public.kitware.com/pipermail/cmake-developers/2013-January/006243.html
+
+        # SO the following only works for the installer icon, not for the welcome image.
+
+        # NSIS requires "\\" - escaped backslash to work properly. We probably won't rely on this feature,
+        # so just replacing / with \\ manually.
+
+		#file(TO_NATIVE_PATH "${CPACK_PACKAGE_ICON}" CPACK_PACKAGE_ICON)
+        string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON ${CPACK_PACKAGE_ICON})
 	endif()

     if(X64)
@@ -120,12 +129,6 @@
     # Package name

     set(CPACK_PACKAGE_FILE_NAME "${package_name}-${CPACK_PACKAGE_VERSION}")
-
-    # NOTE: for using MUI (UN)WELCOME images and installer icon we suggest to replace nsis defaults,
-    # since there is currently no way to do so without manipulating the installer template (which we won't).
-
-    #string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON ${CPACK_PACKAGE_ICON})
-

     # Optional Preliminaries (i.e., silent Visual Studio Redistributable install)


NetBSD: CHAR_BIT as defined by POSIX in limits.h

Reference:

    limits.h - implementation-defined constants

    Numerical Limits
        {CHAR_BIT} Number of bits in a type char.

--- http://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html

There is no such file as sys/limits.h in NetBSD.

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -96,7 +96,7 @@

 check_cxx_symbol_exists(SYS_yield sys/syscall.h HAVE_YIELD_SYSCALL)
 check_cxx_symbol_exists(INFTIM poll.h HAVE_INFTIM)
-check_cxx_symbol_exists(CHAR_BIT sys/limits.h HAVE_CHAR_BIT)
+check_cxx_symbol_exists(CHAR_BIT limits.h HAVE_CHAR_BIT)
 check_cxx_symbol_exists(_DEBUG sys/user.h USER_H_DEFINES_DEBUG)
 check_cxx_symbol_exists(_SC_PHYS_PAGES unistd.h HAVE__SC_PHYS_PAGES)
 check_cxx_symbol_exists(_SC_AVPHYS_PAGES unistd.h HAVE__SC_AVPHYS_PAGES)


Replace #cmakedefine VAR by #define VAR "${VAR}" when specific values need
to be configured, e.g., #define VERSION "${VERSION}"

svn path=/trunk/; revision=6731

--- config.h.cmake
+++ config.h.cmake
@@ -7,19 +7,19 @@
  * to have access to the configured symbol.*/

 /* Location of executables */
-#cmakedefine BIN_DIR
+#define BIN_DIR "${BIN_DIR}"

 /* isnan is in math.h but not cmath */
 #cmakedefine BROKEN_ISNAN_CXX

 /* Location of Build tree */
-#cmakedefine BUILD_DIR
+#define BUILD_DIR "${BUILD_DIR}"

 /* Location of package data files */
-#cmakedefine DATA_DIR
+#define DATA_DIR "${DATA_DIR}"

 /* Location of dynamically loaded drivers */
-#cmakedefine DRV_DIR
+#define DRV_DIR "${DRV_DIR}"

 /* Define if there is support for dynamically loaded drivers */
 #cmakedefine ENABLE_DYNDRIVERS
@@ -167,7 +167,7 @@
 #cmakedefine NO_MINUS_C_MINUS_O

 /* Name of package */
-#cmakedefine PACKAGE
+#define PACKAGE "${PACKAGE}"

 /* Define to the address where bug reports for this package should be sent. */
 #cmakedefine PACKAGE_BUGREPORT
@@ -402,13 +402,13 @@
 #cmakedefine STDC_HEADERS

 /* Location of Tcl stuff */
-#cmakedefine TCL_DIR
+#define TCL_DIR "${TCL_DIR}"

 /* Define if C++ compiler accepts using namespace */
 #cmakedefine USE_NAMESPACE

 /* Version number of package */
-#cmakedefine VERSION
+#define VERSION "${VERSION}"

 /* Define if csa is desired */
 #cmakedefine WITH_CSA


i#1955: Remove CMake CMP0058 policy setting (#3884)

I cannot reproduce the problem with CMP0058 and Ninja on CMake 3.3+ so
I'm removing the setting of that policy to OLD, as that causes
warnings on CMake 3.13+.

Fixes #1955

--- make/policies.cmake
+++ make/policies.cmake
@@ -28,12 +28,6 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 # DAMAGE.

-if ("${CMAKE_VERSION}" VERSION_EQUAL "3.3" OR
-    "${CMAKE_VERSION}" VERSION_GREATER "3.3")
-  # XXX i#1955: update our code to satisfy the changes in 3.3
-  cmake_policy(SET CMP0058 OLD)
-endif ()
-
 # XXX i#1718: update our code to satisfy the changes in 3.x
 cmake_policy(SET CMP0054 OLD)


MDEV-8243 configure defines to empty string, not 1

--- config.h.cmake
+++ config.h.cmake
@@ -203,7 +203,7 @@
 #cmakedefine HAVE_MADVISE 1
 #cmakedefine HAVE_DECL_MADVISE 1
 #cmakedefine HAVE_DECL_TGOTO 1
-#cmakedefine HAVE_DECL_MHA_MAPSIZE_VA
+#cmakedefine HAVE_DECL_MHA_MAPSIZE_VA 1
 #cmakedefine HAVE_MALLINFO 1
 #cmakedefine HAVE_MEMCPY 1
 #cmakedefine HAVE_MEMMOVE 1
@@ -396,7 +396,7 @@

 #cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@

-#cmakedefine HAVE_MBSTATE_T
+#cmakedefine HAVE_MBSTATE_T 1

 #define MAX_INDEXES 64

@@ -431,15 +431,15 @@
 #cmakedefine HAVE_WCTYPE_H 1
 #cmakedefine HAVE_WCHAR_H 1
 #cmakedefine HAVE_LANGINFO_H 1
-#cmakedefine HAVE_MBRLEN
-#cmakedefine HAVE_MBSCMP
-#cmakedefine HAVE_MBSRTOWCS
-#cmakedefine HAVE_WCRTOMB
-#cmakedefine HAVE_MBRTOWC
-#cmakedefine HAVE_WCSCOLL
-#cmakedefine HAVE_WCSDUP
-#cmakedefine HAVE_WCWIDTH
-#cmakedefine HAVE_WCTYPE
+#cmakedefine HAVE_MBRLEN 1
+#cmakedefine HAVE_MBSCMP 1
+#cmakedefine HAVE_MBSRTOWCS 1
+#cmakedefine HAVE_WCRTOMB 1
+#cmakedefine HAVE_MBRTOWC 1
+#cmakedefine HAVE_WCSCOLL 1
+#cmakedefine HAVE_WCSDUP 1
+#cmakedefine HAVE_WCWIDTH 1
+#cmakedefine HAVE_WCTYPE 1
 #cmakedefine HAVE_ISWLOWER 1
 #cmakedefine HAVE_ISWUPPER 1
 #cmakedefine HAVE_TOWLOWER 1
@@ -453,7 +453,7 @@
 #cmakedefine HAVE_STRCASECMP 1
 #cmakedefine HAVE_STRNCASECMP 1
 #cmakedefine HAVE_STRDUP 1
-#cmakedefine HAVE_LANGINFO_CODESET
+#cmakedefine HAVE_LANGINFO_CODESET  1
 #cmakedefine HAVE_TCGETATTR 1
 #cmakedefine HAVE_FLOCKFILE 1


ENH: update dashboard name with new gcc version

--- Testing/Dashboard/pxDashboard_LKEB_linux64_gcc.cmake
+++ Testing/Dashboard/pxDashboard_LKEB_linux64_gcc.cmake
@@ -18,7 +18,7 @@

 # Client maintainer: m.staring@lumc.nl
 set( CTEST_SITE "LKEB.goliath" )
-set( CTEST_BUILD_NAME "Linux-64bit-gcc4.6.3" )
+set( CTEST_BUILD_NAME "Linux-64bit-gcc4.8.2" )
 set( CTEST_BUILD_FLAGS "-j6" ) # parallel build for makefiles
 set( CTEST_TEST_ARGS PARALLEL_LEVEL 6 ) # parallel testing
 set( CTEST_BUILD_CONFIGURATION Debug )


[AVR] Allow AVR to be explicitly set as the default target triple

This extends the CMake cross compilation logic so that AVR can be set as
the default target triple, and thus the generic codegen tests can be
run.

This used to be possible on AVR; the CMake configuration files have
since been changed.

With this patch, 'cmake -DLLVM_DEFAULT_TARGET_TRIPLE=avr-unknown-unknown' can
be passed on the command line, making the `-mcpu` argument redundant to
'llc' and friends.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -392,6 +392,8 @@
   set(LLVM_NATIVE_ARCH AArch64)
 elseif (LLVM_NATIVE_ARCH MATCHES "arm")
   set(LLVM_NATIVE_ARCH ARM)
+elseif (LLVM_NATIVE_ARCH MATCHES "avr")
+  set(LLVM_NATIVE_ARCH AVR)
 elseif (LLVM_NATIVE_ARCH MATCHES "mips")
   set(LLVM_NATIVE_ARCH Mips)
 elseif (LLVM_NATIVE_ARCH MATCHES "xcore")


Revert "[CMake] Use __libc_start_main rather than fopen when checking for C library"

This reverts commit r352341: it broke the build on macOS which doesn't
seem to provide __libc_start_main in its C library.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -12,7 +12,7 @@
   cmake_pop_check_state()
 endfunction()

-check_library_exists(c __libc_start_main "" COMPILER_RT_HAS_LIBC)
+check_library_exists(c fopen "" COMPILER_RT_HAS_LIBC)
 if (COMPILER_RT_USE_BUILTINS_LIBRARY)
   include(HandleCompilerRT)
   find_compiler_rt_library(builtins COMPILER_RT_BUILTINS_LIBRARY)


Close if statement in config-ix.cmake while checking for i686 arch.

Reapply "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"

This reverts commit e7400d7cbc2b7539de3aa7a20adc8f4ee0cb7bef.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -159,7 +159,7 @@
   find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
   set(LLVM_LIBXML2_ENABLED 0)
   set(LIBXML2_FOUND 0)
-  if((LLVM_ENABLE_LIBXML2) AND (CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) AND (NOT LLVM_NATIVE_ARCH MATCHES "i686"))
+  if((LLVM_ENABLE_LIBXML2) AND (CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) AND (NOT LLVM_ARCH_I686))
     find_package(LibXml2)
     if (LIBXML2_FOUND)
       set(LLVM_LIBXML2_ENABLED 1)
@@ -382,6 +382,11 @@
 if( LLVM_NATIVE_ARCH STREQUAL "host" )
   string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOST_TRIPLE})
 endif ()
+
+set(LLVM_ARCH_I686 0)
+if (LLVM_NATIVE_ARCH MATCHES "i686")
+  set(LLVM_ARCH_I686 1)
+endif()

 if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86")
   set(LLVM_NATIVE_ARCH X86)


Fixes detection for Clang compiler

Fixes detection for Clang compiler

--- config/Compiler.cmake
+++ config/Compiler.cmake
@@ -11,10 +11,10 @@
     else()
         message(FATAL_ERROR "Atlas requires Visual Studio 12 or 14 to run.")
     endif()
-elseif(CMAKE_CXX_COMPILER_ID EQUAL "Clang")
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     set(ATLAS_COMPILER_CLANG 1)
     message(STATUS "Using Clang...")
-elseif(CMAKE_CXX_COMPILER_ID EQUAL "Intel")
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
     set(ATLAS_COMPILER_INTEL 1)
     message(STATUS "Using icc...")
 else()


Filters now behave correctly in Visual Studio

Fixes #27

--- CMake/mz_project_wrapper.cmake
+++ CMake/mz_project_wrapper.cmake
@@ -8,12 +8,12 @@

 	set(${MZ_PREFIX}${EXECUTABLE_NAME}_INCLUDE ${PATH}/include CACHE PATH "Include path for module: ${EXECUTABLE_NAME}" FORCE)

-	file(GLOB_RECURSE HEADERS include/ *.hpp)
-	file(GLOB_RECURSE SOURCES src/ *.cpp)
+	file(GLOB_RECURSE HEADERS "${PATH}/include/" *.hpp)
+	file(GLOB_RECURSE SOURCES "${PATH}/src" *.cpp)

 	if(WIN32)
-		create_source_group("Header Files" "${PATH}/hpp" ${HEADERS})
-		create_source_group("Source Files" "${PATH}/cpp" ${SOURCES})
+		create_source_group("Header Files" "${PATH}/include" ${HEADERS})
+		create_source_group("Source Files" "${PATH}/src" ${SOURCES})
 	endif(WIN32)

 	set(INCLUDE_DIRECTORIES ${PATH}/include/)
@@ -38,12 +38,12 @@

 	set(${MZ_PREFIX}${LIBRARY_NAME}_INCLUDE ${PATH}/include CACHE PATH "Include path for module: ${LIBRARY_NAME}" FORCE)

-	file(GLOB_RECURSE HEADERS include/ *.hpp)
-	file(GLOB_RECURSE SOURCES src/ *.cpp)
+	file(GLOB_RECURSE HEADERS "${PATH}/include/" *.hpp)
+	file(GLOB_RECURSE SOURCES "${PATH}/src" *.cpp)

 	if(WIN32)
-		create_source_group("Header Files" "${PATH}/hpp" ${HEADERS})
-		create_source_group("Source Files" "${PATH}/cpp" ${SOURCES})
+		create_source_group("Header Files" "${PATH}/include" ${HEADERS})
+		create_source_group("Source Files" "${PATH}/src" ${SOURCES})
 	endif(WIN32)

 	set(INCLUDE_DIRECTORIES ${PATH}/include/)


fixed a problem with dependency in a linked directory and relative paths

--- CMake/WkBuild.cmake
+++ CMake/WkBuild.cmake
@@ -24,8 +24,8 @@
 	ELSE (CMAKE_BUILD_TYPE STREQUAL Release)
 		# To get the actual commands used
 		SET(CMAKE_VERBOSE_MAKEFILE ON CACHE INTERNAL "Verbose build commands enabled for Non Release build." FORCE)
-		# To have more readable filepaths used with the compiler.
-		SET (CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL "Relative paths used in makefiles and projects for Non Release build." FORCE)
+		# To have more readable filepaths used with the compiler. However this make a dependency in a symbolic linked directory fail.
+		#SET (CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL "Relative paths used in makefiles and projects for Non Release build." FORCE)
 	ENDIF (CMAKE_BUILD_TYPE STREQUAL Release)

 	IF(${project_type} STREQUAL "LIBRARY")
@@ -64,6 +64,7 @@
 				MESSAGE ( STATUS "==" )
 				MESSAGE ( STATUS "Cmake'ing dependency : ${looparg}" )
 				#building in separate build directory in case the father project is built in source...
+				# TODO : BEWARE of circular dependencies...
 				ADD_SUBDIRECTORY(ext/${looparg} ext/${looparg}_build EXCLUDE_FROM_ALL)
 				MESSAGE ( STATUS "Cmake'ing ${looparg} : Done." )
 				MESSAGE ( STATUS "==" )


Attempt to get cache copy dependency right

--- CacheDownload.cmake
+++ CacheDownload.cmake
@@ -15,10 +15,11 @@
 if (TEST_DOWNLOAD_CACHE_DIR)
 	message ("Will cache downloads for ${${ABBREV}_NAME}.")
 	add_custom_command (
-	    TARGET ${${ABBREV}_NAME}
-	    POST_BUILD
+	    OUTPUT ${TEST_DOWNLOAD_CACHE_DIR}/${BASEFILE}
+	    DEPENDS ${FLYEM_BUILD_DIR}/src/${BASEFILE} ${${ABBREV}_NAME}
 	    COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_DOWNLOAD_CACHE_DIR}
 	    COMMAND ${CMAKE_COMMAND} -E copy ${FLYEM_BUILD_DIR}/src/${BASEFILE} ${TEST_DOWNLOAD_CACHE_DIR})
+		COMMENT "Copied ${FLYEM_BUILD_DIR}/src/${BASEFILE} to ${TEST_DOWNLOAD_CACHE_DIR}"
 endif ()

 endmacro (cache_download)


consider LOCATION property if IMPORTED_LOCATION is not set

--- ament_cmake_export_libraries/cmake/ament_export_libraries.cmake
+++ ament_cmake_export_libraries/cmake/ament_export_libraries.cmake
@@ -93,6 +93,20 @@
                 list(APPEND _imported_libraries ${_imported_location_${_cfg}})
               endif()
             endforeach()
+            if(NOT _imported_libraries)
+              get_target_property(_location "${_lib}" LOCATION)
+              if(_location)
+                list(APPEND _imported_libraries ${_location})
+              else()
+                foreach(_cfg ${_imported_configurations})
+                  get_target_property(_location_${_cfg} "${_lib}"
+                    LOCATION_${_cfg})
+                  if(_location_${cfg})
+                    list(APPEND _imported_libraries ${_location_${_cfg}})
+                  endif()
+                endforeach()
+              endif()
+            endif()
           endif()
           foreach(_imported_library ${_imported_libraries})
             # verify that imported library is an existing absolute path


Add the ability to initialize the database from a client test

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -97,6 +97,7 @@
   #     "tests.web_client_test"
   # SETUP_MODULES: colon-separated list of python scripts to import at test setup time
   #     for side effects such as mocking, adding API routes, etc.
+  # SETUP_DATABASE: An absolute path to a database initialization spec
   # REQUIRED_FILES: A list of files required to run the test.
   # ENVIRONMENT: A list of key=value pairs to add to the test's runtime environment
   if (NOT BUILD_JAVASCRIPT_TESTS)
@@ -107,7 +108,7 @@

   set(_options NOCOVERAGE)
   set(_args PLUGIN ASSETSTORE WEBSECURITY BASEURL PLUGIN_DIR TIMEOUT TEST_MODULE REQUIRED_FILES
-            SETUP_MODULES ENVIRONMENT EXTERNAL_DATA)
+            SETUP_MODULES ENVIRONMENT EXTERNAL_DATA SETUP_DATABASE)
   set(_multival_args RESOURCE_LOCKS ENABLEDPLUGINS)
   cmake_parse_arguments(fn "${_options}" "${_args}" "${_multival_args}" ${ARGN})

@@ -153,6 +154,10 @@
     endforeach()
     girder_ExternalData_expand_arguments("${testname}_data" _tmp ${_data_files})
     girder_ExternalData_add_target("${testname}_data")
+  endif()
+
+  if(fn_SETUP_DATABASE)
+    set(setup_database_env "GIRDER_TEST_DATABASE_CONFIG=${fn_SETUP_DATABASE}")
   endif()

   add_test(
@@ -181,6 +186,7 @@
     "GIRDER_PORT=${web_client_port}"
     "MONGOD_EXECUTABLE=${MONGOD_EXECUTABLE}"
     "GIRDER_TEST_DATA_PREFIX=${GIRDER_EXTERNAL_DATA_ROOT}"
+    "${setup_database_env}"
     "${fn_ENVIRONMENT}"
   )
   math(EXPR next_web_client_port "${web_client_port} + 1")


phonon-ds9 builds fine with directx sdk and platform sdk

--- ds9/ConfigureChecks.cmake
+++ ds9/ConfigureChecks.cmake
@@ -40,5 +40,5 @@
 if (BUILD_PHONON_DS9)
    message(STATUS "Found DirectShow 9 support: $ENV{DXSDK_DIR}")
 else (BUILD_PHONON_DS9)
-   message(FATAL_ERROR "DirectShow 9 support NOT found")
+   message(FATAL_ERROR "DirectShow 9 support NOT found, try installing DirectX SDK and Platform SDK")
 endif (BUILD_PHONON_DS9)