Squashed '3rdparty/github/cmake-utils-remote/' changes from f60f488..4522e8e

4522e8e Fix CMAKE_MODULE_PATH

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: 4522e8ea91899a6bae2837cd7f7830e13003aa42

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -34,11 +34,11 @@
   #
   # Paths
   #
-  SET (CMAKE_MODULE_PATH      "${PROJECT_SOURCE_DIR}/cmake" "${PROJECT_SOURCE_DIR}/3rdparty/github/cmake-utils/cmake") # General module search path
-  SET (INCLUDE_OUTPUT_PATH    "${PROJECT_SOURCE_DIR}/output/include")                                                  # General include output path
-  SET (LIBRARY_OUTPUT_PATH    "${PROJECT_SOURCE_DIR}/output/lib")                                                      # General library output path
-  SET (BINARY_OUTPUT_PATH     "${PROJECT_SOURCE_DIR}/output/bin")                                                      # General binary output path
-  SET (3RDPARTY_OUTPUT_PATH   "${PROJECT_SOURCE_DIR}/output/3rdparty")                                                 # General 3rdparty output path
+  SET (CMAKE_MODULE_PATH      "${PROJECT_SOURCE_DIR}/cmake" "${PROJECT_SOURCE_DIR}/3rdparty/github/cmake-utils-remote/cmake") # General module search path
+  SET (INCLUDE_OUTPUT_PATH    "${PROJECT_SOURCE_DIR}/output/include")                                                         # General include output path
+  SET (LIBRARY_OUTPUT_PATH    "${PROJECT_SOURCE_DIR}/output/lib")                                                             # General library output path
+  SET (BINARY_OUTPUT_PATH     "${PROJECT_SOURCE_DIR}/output/bin")                                                             # General binary output path
+  SET (3RDPARTY_OUTPUT_PATH   "${PROJECT_SOURCE_DIR}/output/3rdparty")                                                        # General 3rdparty output path
   #
   # Output directories
   # C.f. http://stackoverflow.com/questions/7747857/in-cmake-how-do-i-work-around-the-debug-and-release-directories-visual-studio-2


Comment out debugging messages.

Comment out debugging messages.

svn path=/trunk/; revision=10797

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -91,7 +91,7 @@
 # Filter all CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES list elements from
 # rpath_in list.
 function(filter_rpath rpath)
-  message("DEBUG: ${rpath} = ${${rpath}}")
+  #message("DEBUG: ${rpath} = ${${rpath}}")
   set(internal_rpath ${${rpath}})
   if(internal_rpath)
     list(REMOVE_DUPLICATES internal_rpath)
@@ -99,7 +99,7 @@
       list(REMOVE_ITEM internal_rpath ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES})
     endif(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES)
   endif(internal_rpath)
-  message("DEBUG: (filtered) ${rpath} = ${internal_rpath}")
+  #message("DEBUG: (filtered) ${rpath} = ${internal_rpath}")
   set(${rpath} ${internal_rpath} PARENT_SCOPE)
 endfunction(filter_rpath)


modified nosetest target name suffixes (#381)

--- cmake/test/nosetests.cmake
+++ cmake/test/nosetests.cmake
@@ -55,21 +55,15 @@
     set(_covarg " --with-coverage")
   endif()

-  # strip PROJECT_BINARY_DIR from output_file_name
+  # strip PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR prefix from output_file_name
   set(output_file_name ${path})
-  string(LENGTH "${PROJECT_BINARY_DIR}/" prefix_length)
-  string(LENGTH "${output_file_name}" var_length)
-  if(${var_length} GREATER ${prefix_length})
-    string(SUBSTRING "${output_file_name}" 0 ${prefix_length} var_prefix)
-    if("${var_prefix}" STREQUAL "${PROJECT_BINARY_DIR}/")
-      # passing length -1 does not work for CMake < 2.8.5
-      # http://public.kitware.com/Bug/view.php?id=10740
-      string(LENGTH "${output_file_name}" _rest)
-      math(EXPR _rest "${_rest} - ${prefix_length}")
-      string(SUBSTRING "${output_file_name}" ${prefix_length} ${_rest} output_file_name)
-    endif()
+  _strip_path_prefix(output_file_name "${output_file_name}" "${PROJECT_SOURCE_DIR}")
+  _strip_path_prefix(output_file_name "${output_file_name}" "${PROJECT_BINARY_DIR}")
+  if("${output_file_name}" STREQUAL "")
+    set(output_file_name ".")
   endif()
   string(REPLACE "/" "." output_file_name ${output_file_name})
+  string(REPLACE ":" "." output_file_name ${output_file_name})

   set(output_path ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME})
   set(cmd "${CMAKE_COMMAND} -E make_directory ${output_path}")
@@ -95,3 +89,23 @@
 if(NOT NOSETESTS)
   message(WARNING "nosetests not found, Python tests can not be run (try installing package 'python-nose')")
 endif()
+
+macro(_strip_path_prefix var value prefix)
+  if("${value}" STREQUAL "${prefix}" OR "${value}" STREQUAL "${prefix}/")
+    set(${var} "")
+  else()
+    set(${var} "${value}")
+    string(LENGTH "${prefix}/" prefix_length)
+    string(LENGTH "${value}" var_length)
+    if(${var_length} GREATER ${prefix_length})
+      string(SUBSTRING "${value}" 0 ${prefix_length} var_prefix)
+      if("${var_prefix}" STREQUAL "${prefix}/")
+        # passing length -1 does not work for CMake < 2.8.5
+        # http://public.kitware.com/Bug/view.php?id=10740
+        string(LENGTH "${value}" _rest)
+        math(EXPR _rest "${_rest} - ${prefix_length}")
+        string(SUBSTRING "${value}" ${prefix_length} ${_rest} ${var})
+      endif()
+    endif()
+  endif()
+endmacro()


Misleading comment

Misleading comment

--- cmake/ArangoDBMacros.cmake
+++ cmake/ArangoDBMacros.cmake
@@ -12,7 +12,6 @@
   INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT} DESTINATION bin COMPONENT Libraries)
 endif()

-# This stuff here is only required for Windows7. later versions seem to handle / paths correctly
 file(TO_NATIVE_PATH "${CMAKE_INSTALL_FULL_SYSCONFDIR}" ETCDIR_NATIVE)
 STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ETCDIR_ESCAPED "${ETCDIR_NATIVE}")

@@ -420,4 +419,4 @@
   install (FILES "${SSL_EAY_RELEASE_DLL}"
     DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
     COMPONENT Libraries)
-endif()+endif()


Re-enable RTTI for GCC and Clang

Re-enable RTTI for GCC and Clang

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -94,7 +94,6 @@
     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
     PRIVATE
         -fno-exceptions
-        -fno-rtti

         -Wall
         -Wextra


Add more dynamic memory for precompiled headers on MSVC

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -76,6 +76,8 @@
         /wd4592       # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation)
         # /wd4201     # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
         /wd4127       # -> disable warning: conditional expression is constant (caused by Qt)
+
+        /Zm200        # Enable more memory for precompiled headers

         #$<$<CONFIG:Debug>:
         #/RTCc         # -> value is assigned to a smaller data type and results in a data loss


Fix comment in CMake file for BDB.

Fix comment in CMake file for BDB.

--- cmake/FindBerkeleyDB.cmake
+++ cmake/FindBerkeleyDB.cmake
@@ -2,6 +2,7 @@
 # variables:
 #   BERKELEY_DB_INCLUDE_DIR
 #   BERKELEY_DB_FOUND
+#   BERKELEY_DB_LIBRARIES

 find_path(BERKELEY_DB_INCLUDE_DIR db.h
     /opt/local/include/db47


Add some debugging output to FindQScintilla

--- cmake/FindQScintilla.cmake
+++ cmake/FindQScintilla.cmake
@@ -58,6 +58,9 @@

       set(QSCINTILLA_BREW_INCLUDE_DIR "${QSCINTILLA_BREW_ROOT}/include")
       set(QSCINTILLA_BREW_LIBRARY "${QSCINTILLA_BREW_ROOT}/lib")
+
+      message(STATUS "QSCINTILLA_BREW_INCLUDE_DIR: ${QSCINTILLA_BREW_INCLUDE_DIR}")
+      message(STATUS "QSCINTILLA_BREW_LIBRARY: ${QSCINTILLA_BREW_LIBRARY}")
     else()
       message(WARNING "Couldn't find the qscintilla2 formula.")
     endif()


Squashed '3rdparty/github/cmake-utils-remote/' changes from aaa7c50..3c115a5

3c115a5 Add test to check

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: 3c115a5a4bd38cf32637fee5aecba21c5da9ce63

--- cmake/MyPackageCheck.cmake
+++ cmake/MyPackageCheck.cmake
@@ -37,6 +37,7 @@
     ADD_TEST (NAME ${_name}
       COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" ${_name}
       WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH})
+    ADD_DEPENDENCIES(check ${_name})
   ENDFOREACH ()

 ENDMACRO()


Remove old debug message in RunFixupBundle

--- cmake/RunFixupBundle.cmake
+++ cmake/RunFixupBundle.cmake
@@ -16,7 +16,6 @@

 set(THIS_FILE ${CMAKE_CURRENT_LIST_FILE})
 function(run_fixup _target _libs _dirs)
-	message(${THIS_FILE})
 	add_custom_command(
 		TARGET ${_target} POST_BUILD
 		COMMAND ${CMAKE_COMMAND} -DRUN_IT:BOOL=ON -DTO_FIXUP_FILE=$<TARGET_FILE:${_target}> -DTO_FIXUP_LIBS=${_libs} -DTO_FIXUP_DIRS=${_dirs} -P ${THIS_FILE}


Change install name tool line

Change install name tool line

--- cmake/ThirdPartyZlib.cmake
+++ cmake/ThirdPartyZlib.cmake
@@ -56,8 +56,9 @@
         )

     IF (APPLE)
+        MESSAGE(STATUS ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR})
         EXTERNALPROJECT_ADD_STEP(zlib-1.2.7 patch-install-path
-            COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change ${TPDIST}/lib/libz.1.2.7.dylib ${NEKTAR_LIB_DIR}/libz.1.2.7.dylib
+            COMMAND ${CMAKE_INSTALL_NAME_TOOL} -id ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR}/libz.1.2.7.dylib ${TPDIST}/lib/libz.1.2.7.dylib
             DEPENDEES install)
     ENDIF ()


Attempt to fix RPM support-files directory.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -114,7 +114,7 @@
 SET(INSTALL_MYSQLTESTDIR_RPM "mysql-test")
 SET(INSTALL_SQLBENCHROOTDIR_RPM "")
 SET(INSTALL_DOCREADMEDIR_RPM "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
-SET(INSTALL_SUPPORTFILESDIR_RPM "")
+SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql")
 SET(INSTALL_MYSQLDATADIR_RPM "var")

 # SVR4 layout


Style and indentation changes to make this module easier to understand.

svn path=/trunk/; revision=8212

--- cmake/modules/FindGD.cmake
+++ cmake/modules/FindGD.cmake
@@ -9,112 +9,126 @@
 #  GD_SUPPORTS_PNG, GD_SUPPORTS_JPEG, GD_SUPPORTS_GIF, test
 #  support for image formats in GD.

-FIND_PATH(GD_INCLUDE_DIR gd.h
+find_path(GD_INCLUDE_DIR gd.h
 /usr/local/include
 /usr/include
 )

 if(WIN32 AND NOT CYGWIN)
-  SET(GD_NAMES ${GD_NAMES} bgd)
+  set(GD_NAMES ${GD_NAMES} bgd)
 else(WIN32)
-  SET(GD_NAMES ${GD_NAMES} gd)
+  set(GD_NAMES ${GD_NAMES} gd)
 endif(WIN32 AND NOT CYGWIN)

-FIND_LIBRARY(GD_LIBRARY
+find_library(GD_LIBRARY
   NAMES ${GD_NAMES}
   PATHS /usr/lib /usr/local/lib
   )

-IF (GD_LIBRARY AND GD_INCLUDE_DIR)
-    SET(GD_LIBRARIES ${GD_LIBRARY})
-    SET(GD_FOUND "YES")
-ELSE (GD_LIBRARY AND GD_INCLUDE_DIR)
-  SET(GD_FOUND "NO")
-ENDIF (GD_LIBRARY AND GD_INCLUDE_DIR)
+if(GD_LIBRARY AND GD_INCLUDE_DIR)
+  set(GD_LIBRARIES ${GD_LIBRARY})
+  set(GD_FOUND "YES")
+else(GD_LIBRARY AND GD_INCLUDE_DIR)
+  set(GD_FOUND "NO")
+endif(GD_LIBRARY AND GD_INCLUDE_DIR)

-IF (GD_FOUND)
-  IF (WIN32 AND NOT CYGWIN)
-    SET(GD_SUPPORTS_PNG ON)
-    SET(GD_SUPPORTS_JPEG ON)
-    SET(GD_SUPPORTS_GIF ON)
+if(GD_FOUND)
+  if(WIN32 AND NOT CYGWIN)
+    set(GD_SUPPORTS_PNG ON)
+    set(GD_SUPPORTS_JPEG ON)
+    set(GD_SUPPORTS_GIF ON)
     get_filename_component(GD_LIBRARY_DIR ${GD_LIBRARY} PATH)
-  ELSE (WIN32 AND NOT CYGWIN)
-    INCLUDE(CheckLibraryExists)
-    GET_FILENAME_COMPONENT(GD_LIB_PATH ${GD_LIBRARY} PATH)
-    GET_FILENAME_COMPONENT(GD_LIB ${GD_LIBRARY} NAME)
+  else(WIN32 AND NOT CYGWIN)
+    include(CheckLibraryExists)
+    get_filename_component(GD_LIB_PATH ${GD_LIBRARY} PATH)
+    get_filename_component(GD_LIB ${GD_LIBRARY} NAME)

-    CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImagePng" "${GD_LIB_PATH}" GD_SUPPORTS_PNG)
-    IF (GD_SUPPORTS_PNG)
-     find_package(PNG)
-     IF (PNG_FOUND)
-       SET(GD_LIBRARIES ${GD_LIBRARIES} ${PNG_LIBRARIES})
-       SET(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${PNG_INCLUDE_DIR})
-     ELSE (PNG_FOUND)
-       SET(GD_SUPPORTS_PNG "NO")
-     ENDIF (PNG_FOUND)
-    ENDIF (GD_SUPPORTS_PNG)
+    check_library_exists(
+    "${GD_LIBRARY}"
+    "gdImagePng"
+    "${GD_LIB_PATH}"
+    GD_SUPPORTS_PNG
+    )
+    if(GD_SUPPORTS_PNG)
+      find_package(PNG)
+      if(PNG_FOUND)
+        set(GD_LIBRARIES ${GD_LIBRARIES} ${PNG_LIBRARIES})
+        set(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${PNG_INCLUDE_DIR})
+      else(PNG_FOUND)
+        set(GD_SUPPORTS_PNG "NO")
+      endif(PNG_FOUND)
+    endif(GD_SUPPORTS_PNG)

-    CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageJpeg" "${GD_LIB_PATH}" GD_SUPPORTS_JPEG)
-    IF (GD_SUPPORTS_JPEG)
-     find_package(JPEG)
-     IF (JPEG_FOUND)
-       SET(GD_LIBRARIES ${GD_LIBRARIES} ${JPEG_LIBRARIES})
-       SET(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
-     ELSE (JPEG_FOUND)
-       SET(GD_SUPPORTS_JPEG "NO")
-     ENDIF (JPEG_FOUND)
-    ENDIF (GD_SUPPORTS_JPEG)
+    check_library_exists(
+    "${GD_LIBRARY}"
+    "gdImageJpeg"
+    "${GD_LIB_PATH}"
+    GD_SUPPORTS_JPEG
+    )
+    if(GD_SUPPORTS_JPEG)
+      find_package(JPEG)
+      if(JPEG_FOUND)
+        set(GD_LIBRARIES ${GD_LIBRARIES} ${JPEG_LIBRARIES})
+        set(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
+      else(JPEG_FOUND)
+        set(GD_SUPPORTS_JPEG "NO")
+      endif(JPEG_FOUND)
+    endif(GD_SUPPORTS_JPEG)

-    CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageGif" "${GD_LIB_PATH}" GD_SUPPORTS_GIF)
+    check_library_exists(
+    "${GD_LIBRARY}"
+    "gdImageGif"
+    "${GD_LIB_PATH}"
+    GD_SUPPORTS_GIF)

     # Trim the list of include directories
-    SET(GDINCTRIM)
-    FOREACH(GD_DIR ${GD_INCLUDE_DIR})
-    SET(GD_TMP_FOUND OFF)
-    FOREACH(GD_TRIMMED ${GDINCTRIM})
-      IF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
-    SET(GD_TMP_FOUND ON)
-      ENDIF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
-    ENDFOREACH(GD_TRIMMED ${GDINCTRIM})
-    IF (NOT GD_TMP_FOUND)
-      SET(GDINCTRIM "${GDINCTRIM}" "${GD_DIR}")
-    ENDIF (NOT GD_TMP_FOUND)
-    ENDFOREACH(GD_DIR ${GD_INCLUDE_DIR})
-    SET(GD_INCLUDE_DIR ${GDINCTRIM})
+    set(GDINCTRIM)
+    foreach(GD_DIR ${GD_INCLUDE_DIR})
+      set(GD_TMP_FOUND OFF)
+      foreach(GD_TRIMMED ${GDINCTRIM})
+        if("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
+          set(GD_TMP_FOUND ON)
+        endif("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
+      endforeach(GD_TRIMMED ${GDINCTRIM})
+      if(NOT GD_TMP_FOUND)
+        set(GDINCTRIM "${GDINCTRIM}" "${GD_DIR}")
+      endif(NOT GD_TMP_FOUND)
+    endforeach(GD_DIR ${GD_INCLUDE_DIR})
+    set(GD_INCLUDE_DIR ${GDINCTRIM})

-    SET(GD_LIBRARY_DIR)
+    set(GD_LIBRARY_DIR)
     # Generate trimmed list of library directories and list of libraries
-    FOREACH(GD_LIB ${GD_LIBRARIES})
-    GET_FILENAME_COMPONENT(GD_NEXTLIBDIR ${GD_LIB} PATH)
-    SET(GD_TMP_FOUND OFF)
-    FOREACH(GD_LIBDIR ${GD_LIBRARY_DIR})
-      IF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
-    SET(GD_TMP_FOUND ON)
-      ENDIF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
-    ENDFOREACH(GD_LIBDIR ${GD_LIBRARIES})
-    IF (NOT GD_TMP_FOUND)
-      SET(GD_LIBRARY_DIR "${GD_LIBRARY_DIR}" "${GD_NEXTLIBDIR}")
-    ENDIF (NOT GD_TMP_FOUND)
-    ENDFOREACH(GD_LIB ${GD_LIBRARIES})
-  ENDIF (WIN32 AND NOT CYGWIN)
-ENDIF (GD_FOUND)
+    foreach(GD_LIB ${GD_LIBRARIES})
+      get_filename_component(GD_NEXTLIBDIR ${GD_LIB} PATH)
+      set(GD_TMP_FOUND OFF)
+      foreach(GD_LIBDIR ${GD_LIBRARY_DIR})
+        if("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
+          set(GD_TMP_FOUND ON)
+        endif("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
+      endforeach(GD_LIBDIR ${GD_LIBRARIES})
+      if(NOT GD_TMP_FOUND)
+        set(GD_LIBRARY_DIR "${GD_LIBRARY_DIR}" "${GD_NEXTLIBDIR}")
+      endif(NOT GD_TMP_FOUND)
+    endforeach(GD_LIB ${GD_LIBRARIES})
+  endif(WIN32 AND NOT CYGWIN)
+endif(GD_FOUND)

-IF (GD_FOUND)
-   IF (NOT GD_FIND_QUIETLY)
-      MESSAGE(STATUS "Found GD: ${GD_LIBRARY}")
-   ENDIF (NOT GD_FIND_QUIETLY)
-ELSE (GD_FOUND)
-   IF (GD_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find GD library")
-   ENDIF (GD_FIND_REQUIRED)
-ENDIF (GD_FOUND)
+if(GD_FOUND)
+   if(NOT GD_FIND_QUIETLY)
+      message(STATUS "Found GD: ${GD_LIBRARY}")
+   endif(NOT GD_FIND_QUIETLY)
+else(GD_FOUND)
+   if(GD_FIND_REQUIRED)
+      message(FATAL_ERROR "Could not find GD library")
+   endif(GD_FIND_REQUIRED)
+endif(GD_FOUND)

-MARK_AS_ADVANCED(
-  GD_LIBRARY
-  GD_LIBRARIES
-  GD_INCLUDE_DIR
-  GD_LIBRARY_DIR
-  GD_SUPPORTS_PNG
-  GD_SUPPORTS_JPEG
-  GD_SUPPORTS_GIF
-  )
+mark_as_advanced(
+GD_LIBRARY
+GD_LIBRARIES
+GD_INCLUDE_DIR
+GD_LIBRARY_DIR
+GD_SUPPORTS_PNG
+GD_SUPPORTS_JPEG
+GD_SUPPORTS_GIF
+)


Allow a user option of PREBUILD_DIST to pre-build all components required
for distribution and copy them back to the source tree.
Note, this option is only available for Linux systems since the copyback
operation uses some Linuxisms for the docbook part of the copyback.

svn path=/trunk/; revision=7129

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -53,6 +53,13 @@
 include(instdirs)
 include(rpath)
 option(BUILD_TEST "Compile examples in the build tree and enable ctest" OFF)
+option(PREBUILD_DIST "Pre-build all components required for distribution" OFF)
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
+  set(
+  PREBUILD_DIST OFF CACHE INTERNAL
+  "Pre-build all components required for distribution"
+  )
+endif(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")

 # =======================================================================
 # Headers


Bump version

Bump version

--- cmake/ospray_version.cmake
+++ cmake/ospray_version.cmake
@@ -3,7 +3,7 @@

 set(OSPRAY_VERSION_MAJOR 2)
 set(OSPRAY_VERSION_MINOR 7)
-set(OSPRAY_VERSION_PATCH 0)
+set(OSPRAY_VERSION_PATCH 1)
 set(OSPRAY_SOVERSION 2)
 set(OSPRAY_VERSION_GITHASH 0)
 set(OSPRAY_VERSION_NOTE "")


cmake: compile executables with -fPIE on linux

Required when compiling with qt5

Change-Id: Idad21acf27bdd5ec662119bcf24014167d7ea4da

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -83,6 +83,10 @@
   qi_glob(_SRC ${ARG_SRC})

   add_executable("${name}" ${_SRC})
+
+  if(UNIX AND NOT APPLE)
+    set_target_properties("${name}" PROPERTIES COMPILE_FLAGS "-fPIE")
+  endif()

   if (NOT "${ARG_DEPENDS}" STREQUAL "")
     qi_use_lib("${name}" ${ARG_DEPENDS})


Repair mismatched cmake _LIBRAR{Y,IES} variable.

This was breaking the build on Darwin. I don't know how it wasn't doing so on Linux
too; perhaps Linux triggers HAVE_ICONV_IN_LIBC so it never came up?

cmake wants all instances of this sort of variable to be named
> Xxx_LIBRARIES
>    The libraries to link against to use Xxx. These should include full paths. This should not be a cache entry.
- https://cmake.org/cmake/help/v3.0/manual/cmake-developer.7.html#find-modules

--- cmake/FindModules/FindIconv.cmake
+++ cmake/FindModules/FindIconv.cmake
@@ -20,7 +20,7 @@
     DOC "Iconv include directory")
   set(ICONV_INCLUDE_DIR "${ICONV_INCLUDE_DIR}" PARENT_SCOPE)

-  find_library(ICONV_LIBRARY
+  find_library(ICONV_LIBRARIES
     NAMES
       iconv
       libiconv
@@ -28,18 +28,18 @@
     HINTS ${iconv_roots}
     PATH_SUFFIXES ${iconv_library_suffixes}
     DOC "Iconv library")
-  set(ICONV_LIBRARY "${ICONV_LIBRARY}" PARENT_SCOPE)
+  set(ICONV_LIBRARIES "${ICONV_LIBRARIES}" PARENT_SCOPE)

-  if(ICONV_INCLUDE_DIR AND NOT ICONV_LIBRARY)
+  if(ICONV_INCLUDE_DIR AND NOT ICONV_LIBRARIES)
     include(CheckFunctionExists)
     check_function_exists(iconv HAVE_ICONV_IN_LIBC)
     if(HAVE_ICONV_IN_LIBC)
       set(HAVE_ICONV_IN_LIBC "${HAVE_ICONV_IN_LIBC}" PARENT_SCOPE)
-      set(ICONV_LIBRARY "integrated in standard library" PARENT_SCOPE)
+      set(ICONV_LIBRARIES "integrated in standard library" PARENT_SCOPE)
     endif()
   endif()

-  if(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
+  if(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
     set(ICONV_FOUND ON PARENT_SCOPE)
   endif()
 endfunction()
@@ -63,7 +63,7 @@

   if(NOT HAVE_ICONV_IN_LIBC)
     set_target_properties(Iconv::Iconv PROPERTIES
-      IMPORTED_LOCATION "${ICONV_LIBRARY}")
+      IMPORTED_LOCATION "${ICONV_LIBRARIES}")
   endif()

   unset(_lib_type)
@@ -73,4 +73,4 @@
   endif()
 endif()

-mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR)
+mark_as_advanced(ICONV_LIBRARIES ICONV_INCLUDE_DIR)


Improve on dependencies of dictionaries across subdirectories

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -433,6 +433,9 @@
   include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/inc)
   include_directories(AFTER ${CMAKE_BINARY_DIR}/include)
   add_library( ${library} OBJECT ${lib_srcs})
+  if(lib_srcs MATCHES "(^|/)(G__[^.]*)[.]cxx.*")
+     add_dependencies(${library} ${CMAKE_MATCH_2})
+  endif()
 endfunction()

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


fix cmake config files install destination

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -461,20 +461,19 @@
 	endif()

 	if (WIN32)
-    set(dstDir cmake)
-  else()
-    set(dstDir share/mrpt-${name})
-  endif()
+		set(dstDir cmake)
+	else()
+		set(dstDir lib/cmake/mrpt-${name})
+	endif()
 	# mrpt-xxx-config.cmake file:
 	# Makes the project importable from installed dir:
-	# 1/3: autogenerated target file:
 	install(
 		EXPORT mrpt-${name}-targets
 		DESTINATION ${dstDir}
 		NAMESPACE mrpt::
 	)
-	# 2/3: config file with manual list of dependencies:
-	# 3/3: version file:
+	# - autogenerated target file +our custom *-config files,
+	# - version file
 	install(
 		FILES
 			"${CMAKE_BINARY_DIR}/mrpt-${name}-config.cmake"


Update common.cmake to link CoreFoundation on Apple to allow debug tooling

--- common.cmake
+++ common.cmake
@@ -21,6 +21,11 @@
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
     endif()
 endif()
+
+IF (APPLE)
+    FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation )
+    set(LIBS ${LIBS} ${COREFOUNDATION_LIBRARY})
+ENDIF (APPLE)

 if (${CXX11} MATCHES "ON")
     # Compiler-specific C++11 activation.


Remove default cmake INSTALL and EXPORT commands from common.cmake

--- common.cmake
+++ common.cmake
@@ -106,14 +106,4 @@
    endforeach(item)
 endif()

-INSTALL(TARGETS ${PROJECT} DESTINATION "lib" EXPORT ${PROJECT}-exports.cmake )

-EXPORT(TARGETS ${PROJECT} FILE ${PROJECT}-exports.cmake )
-
-INSTALL(FILES
-   ${PROJECT_INCLUDES}
-   DESTINATION include
-)
-
-install(EXPORT ${PROJECT}-exports.cmake DESTINATION "lib"  )
-


Update the SimpleITK Examples superbuild sitk directory

--- SuperBuild/External_SimpleITKExamples.cmake
+++ SuperBuild/External_SimpleITKExamples.cmake
@@ -21,7 +21,7 @@
       -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
       ${ep_common_args}
       -DITK_DIR:PATH=${ITK_DIR}
-      -DSimpleITK_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/SimpleITK-1.1/
+      -DSimpleITK_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/SimpleITK-1.3/
       -DCMAKE_SKIP_RPATH:BOOL=ON
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
     BUILD_COMMAND ${BUILD_COMMAND_STRING}


[GL3+] Mark GL3+ as experimental in the feature summary.

--- CMake/FeatureSummary.cmake
+++ CMake/FeatureSummary.cmake
@@ -79,7 +79,7 @@
 	set(_rendersystems "${_rendersystems}  + OpenGL\n")
 endif ()
 if (OGRE_BUILD_RENDERSYSTEM_GL3PLUS)
-	set(_rendersystems "${_rendersystems}  + OpenGL 3+\n")
+	set(_rendersystems "${_rendersystems}  + OpenGL 3+ (EXPERIMENTAL)\n")
 endif ()
 if (OGRE_BUILD_RENDERSYSTEM_GLES)
 	set(_rendersystems "${_rendersystems}  + OpenGL ES 1.x\n")


revert

revert

--- configurationdemo/source/cc32xx/platform/cc32xx/cc32xx.cmake
+++ configurationdemo/source/cc32xx/platform/cc32xx/cc32xx.cmake
@@ -25,21 +25,15 @@
 message("## Kaa arm toolchain path: " ${KAA_ARM_TOOLCHAIN})
 message("## CC32XX SDK path: " ${CC32XX_SDK})

-if(DEFINED WIN32)
-  set(EXECUTABLE_SUFFIX .exe)
-else()
-  set(EXECUTABLE_SUFFIX)
-endif()
-
-set(CMAKE_C_COMPILER   "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-gcc${EXECUTABLE_SUFFIX}")
-set(CMAKE_CXX_COMPILER "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-g++${EXECUTABLE_SUFFIX}")
-set(CMAKE_AR           "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-ar${EXECUTABLE_SUFFIX}")
-set(CMAKE_LINKER       "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-ld${EXECUTABLE_SUFFIX}")
-set(CMAKE_OBJCOPY      "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-objcopy${EXECUTABLE_SUFFIX}")
-set(CMAKE_OBJDUMP      "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-objdump${EXECUTABLE_SUFFIX}")
-set(CMAKE_NM           "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-nm${EXECUTABLE_SUFFIX}")
-set(CMAKE_RANLIB       "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-ranlib${EXECUTABLE_SUFFIX}")
-set(CMAKE_STRIP        "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-strip${EXECUTABLE_SUFFIX}")
+set(CMAKE_C_COMPILER   "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-gcc")
+set(CMAKE_CXX_COMPILER "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-g++")
+set(CMAKE_AR           "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-ar")
+set(CMAKE_LINKER       "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-ld")
+set(CMAKE_OBJCOPY      "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-objcopy")
+set(CMAKE_OBJDUMP      "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-objdump")
+set(CMAKE_NM           "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-nm")
+set(CMAKE_RANLIB       "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-ranlib")
+set(CMAKE_STRIP        "${KAA_ARM_TOOLCHAIN}/bin/arm-none-eabi-strip")

 set(CMAKE_C_FLAGS "-mthumb -mcpu=cortex-m4 -ffunction-sections -fdata-sections -MD -O0 "  CACHE STRING "" FORCE)


MSVC warning level 3

MSVC warning level 3

issue https://github.com/smanders/externpro/issues/303

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -2035,6 +2035,8 @@
   xpStringAppendIfDne(CMAKE_CXX_FLAGS "/bigobj")
   # Treat Warnings As Errors
   xpStringAppendIfDne(CMAKE_CXX_FLAGS "/WX")
+  # Warning level 3
+  xpStringAppendIfDne(CMAKE_CXX_FLAGS "/W3")
   # Treat the following warnings as errors (above and beyond Warning Level 3)
   xpStringAppendIfDne(CMAKE_CXX_FLAGS "/we4238") # don't take address of temporaries
   xpStringAppendIfDne(CMAKE_CXX_FLAGS "/we4239") # don't bind temporaries to non-const references


using default CMAKE_INSTALL_NAME_DIR

using default CMAKE_INSTALL_NAME_DIR

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -10,7 +10,6 @@

 # use full absolute path as install name
 IF (NOT EMBREE_ZIP_MODE)
-  SET(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR})
   SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
 ELSE()
   IF(APPLE)


set octomap external to a fork

set octomap external to a fork

This brings in a build fix to octovis.  The change has been opened
upstream as a pull request here:

  https://github.com/OctoMap/octomap/pull/108

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -57,8 +57,8 @@
     )
 endif()

-set(octomap_url https://github.com/OctoMap/octomap.git)
-set(octomap_revision 5ba840e58a35e2d14c40d0af807da879a1a2fd83)
+set(octomap_url https://github.com/patmarion/octomap.git)
+set(octomap_revision 57d2db5e5024fd2697f98177d6902f23dc27968e)
 set(octomap_depends)
 set(octomap_external_args
   CMAKE_CACHE_ARGS


Fix iOS dynamic framework referencing its local build path (#2125)

When INSTALL_PATH uses its default value, the framework stores a dependency to its local build path, causing the dynamic linker to fail when the framework is embedded on another device.

--- platforms/ios/config.cmake
+++ platforms/ios/config.cmake
@@ -120,6 +120,9 @@
   # This property is necessary for downstream consumers of the framework. Set it here for Xcode to
   # populate the 'Bundle Identifier' fields and substitute the placeholder value in our Info.plist.
   XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${TANGRAM_BUNDLE_IDENTIFIER}"
+  # This ensures that the dynamic linker loads the framework from its embedded path in an app, not
+  # from the location it was originally built.
+  XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
 )
 # Other properties that are common to dynamic and static framework targets are set below.


Removal of MSVC TP compilation flag

Removal of MSVC TP compilation flag

--- CommonCompilerConfig.cmake
+++ CommonCompilerConfig.cmake
@@ -240,7 +240,7 @@

 if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
   # MS Visual C
-  set(shared_compile_flags "${shared_compile_flags} /TP /Zc:wchar_t /Gm- /fp:precise /errorReport:prompt /W1 /WX- /GR /Gd /GS /Oy- /EHs /analyze- /nologo")
+  set(shared_compile_flags "${shared_compile_flags} /Zc:wchar_t /Gm- /fp:precise /errorReport:prompt /W1 /WX- /GR /Gd /GS /Oy- /EHs /analyze- /nologo")
   set(shared_linker_flags_unoptimized "${shared_linker_flags_unoptimized} /NOLOGO /SAFESEH:NO /NODEFAULTLIB:LIBCMT")
   if("${BITNESS}" STREQUAL "32")
     set(shared_linker_flags_unoptimized "${shared_linker_flags_unoptimized} /MACHINE:X86")


Remove default /EHsc compiler flag

Remove default /EHsc compiler flag

This prevents warning D9025 (one command-line option overrides
another) on MSVC builds: some test targets are built with
the /EHs-c- which conflicts with /EHsc.

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -38,6 +38,11 @@
       # We prefer more strict warning checking for building Google Test.
       # Replaces /W3 with /W4 in defaults.
       string(REPLACE "/W3" "/W4" ${flag_var} "${${flag_var}}")
+
+      # Prevent D9025 warning for targets that have exception handling
+      # turned off (/EHs-c- flag). Where required, exceptions are explicitly
+      # re-enabled using the cxx_exception_flags variable.
+      string(REPLACE "/EHsc" "" ${flag_var} "${${flag_var}}")
     endforeach()
   endif()
 endmacro()


Support OS X Command Line tools without Xcode (#296)

--- os/osx.cmake
+++ os/osx.cmake
@@ -53,11 +53,32 @@
 endif()

 set(
+    __osx_sysroot_suggestion_1
+    "${XCODE_DEVELOPER_ROOT}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk"
+)
+
+# With a full Xcode install, typically `xcode-select -print-path` is something like:
+#     /Applications/Xcode.app/Contents/Developer
+#
+# But with just Xcode command line tools installed, the path is:
+#     /Library/Developer/CommandLineTools
+#
+# In the CommandLineTools case, the SDKs folder is at a different relative path.
+set(
+    __osx_sysroot_suggestion_2
+    "${XCODE_DEVELOPER_ROOT}/SDKs/MacOSX${OSX_SDK_VERSION}.sdk"
+)
+
+if(EXISTS "${__osx_sysroot_suggestion_1}")
+  set(__osx_sysroot "${__osx_sysroot_suggestion_1}")
+elseif(EXISTS "${__osx_sysroot_suggestion_2}")
+  set(__osx_sysroot "${__osx_sysroot_suggestion_2}")
+else()
+  polly_fatal_error("OS X SDK does not exist at ${__osx_sysroot_suggestion_1} or ${__osx_sysroot_suggestion_2}")
+endif()
+
+set(
     CMAKE_OSX_SYSROOT
-    "${XCODE_DEVELOPER_ROOT}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk"
+    "${__osx_sysroot}"
     CACHE STRING "System root for OSX" FORCE
 )
-
-if(NOT EXISTS "${CMAKE_OSX_SYSROOT}")
-  polly_fatal_error("${CMAKE_OSX_SYSROOT} not exists")
-endif()


Fix path of SimpleITK documents files with language build

An erroneous CMake variable was being used.

Change-Id: I349d535ffd766d1e478c90e744a19dde100afcc3

--- CMake/sitkProjectLanguageCommon.cmake
+++ CMake/sitkProjectLanguageCommon.cmake
@@ -56,9 +56,9 @@
 # TODO these should be moved into UseSimpleITK
 if(NOT SimpleITK_DOC_FILES)
   set ( SimpleITK_DOC_FILES
-    "${SimpleITK_SOURCE_SOURCE_DIR}/LICENSE"
-    "${SimpleITK_SOURCE_SOURCE_DIR}/NOTICE"
-    "${SimpleITK_SOURCE_SOURCE_DIR}/Readme.md"
+    "${SimpleITK_SOURCE_DIR}/LICENSE"
+    "${SimpleITK_SOURCE_DIR}/NOTICE"
+    "${SimpleITK_SOURCE_DIR}/Readme.md"
   )
 endif()


Fix for manylinux1 openssl compatilibility (#6486 related)

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -869,14 +869,16 @@
 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libcgroup/0.37)

 	# globus is an odd *beast* which requires a bit more config.
-	if (LINUX)
+	# old globus builds on manylinux1 (centos5 docker image)
+	if (LINUX AND NOT ${SYSTEM_NAME} MATCHES "centos5.11")
 		add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/globus/6.0)
 	else()
 		add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/globus/5.2.5)
 	endif()
 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/blahp/1.16.5.1)
-    # voms held back for MacOS (config issues) (2.1.0 needed for OpenSSL 1.1)
-    if (LINUX)
+	# voms held back for MacOS (config issues) (2.1.0 needed for OpenSSL 1.1)
+	# old voms also builds on manylinux1 (centos5 docker image)
+    if (LINUX AND NOT ${SYSTEM_NAME} MATCHES "centos5.11")
         add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/voms/2.1.0)
     else()
         add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/voms/2.0.13)


xpClassifiedRepo curl -k

xpClassifiedRepo curl -k

when checking that the url is valid (via curl), use -k option
secure room doesn't have certificates in use

from 'curl --manual':
-k, --insecure By default every SSL connection curl makes is verified to
be secure. This option allows curl to proceed and operate even for
server connections otherwise considered insecure.

issue https://github.com/smanders/externpro/issues/337

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1562,7 +1562,7 @@
     if(DEFINED CURL_EXE)
       get_target_property(curlExe ${CURL_EXE} IMPORTED_LOCATION_RELEASE)
       execute_process(
-        COMMAND ${curlExe} -s -o /dev/null -w "%{http_code}" https://${P_PATH_URL}/${P_REPO}
+        COMMAND ${curlExe} -k -s -o /dev/null -w "%{http_code}" https://${P_PATH_URL}/${P_REPO}
         OUTPUT_VARIABLE statusCode ERROR_QUIET
         )
       if(statusCode EQUAL 200)


Revert: [compiler-rt] r323626 - [cmake] [compiler-rt] Remove duplicate CMAKE_CXX_FLAGS.

Looks like it broke a bot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/7195
Reverting until I have a chance to investigate.

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -64,7 +64,7 @@
     endif()

     set_target_compile_flags(${libname}
-      ${extra_cflags_${libname}} ${target_flags})
+      ${CMAKE_CXX_FLAGS} ${extra_cflags_${libname}} ${target_flags})
     set_property(TARGET ${libname} APPEND PROPERTY
       COMPILE_DEFINITIONS ${LIB_DEFS})
     set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Libraries")


From Brett Viren:
fix gcc version detection.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@44252 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -25,9 +25,19 @@
 #---Obtain the major and minor version of the GNU compiler-------------------------------------------
 if (CMAKE_COMPILER_IS_GNUCXX)
   exec_program(${CMAKE_C_COMPILER} ARGS "-dumpversion" OUTPUT_VARIABLE _gcc_version_info)
-  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\1" GCC_MAJOR "${_gcc_version_info}")
-  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\2" GCC_MINOR "${_gcc_version_info}")
-  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\3" GCC_PATCH "${_gcc_version_info}")
+  string(REGEX REPLACE "^([0-9]+).*$"                   "\\1" GCC_MAJOR ${_gcc_version_info})
+  string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*$"          "\\1" GCC_MINOR ${_gcc_version_info})
+  string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" GCC_PATCH ${_gcc_version_info})
+
+  if(GCC_PATCH MATCHES "\\.+")
+    set(GCC_PATCH "")
+  endif()
+  if(GCC_MINOR MATCHES "\\.+")
+    set(GCC_MINOR "")
+  endif()
+  if(GCC_MAJOR MATCHES "\\.+")
+    set(GCC_MAJOR "")
+  endif()
   message(STATUS "Found GCC. Major version ${GCC_MAJOR}, minor version ${GCC_MINOR}")
   set(COMPILER_VERSION gcc${GCC_MAJOR}${GCC_MINOR}${GCC_PATCH})
 else()


Add hipFFT include directory (transitional step) before ROCm. (#5992)

hipFFT is transitioning to a separate repository (away from being
included in rocFFT).  During this transition, using the hipFFT version
of hipfft.h won't produce a deprecation warning.

--- cmake/onnxruntime_providers.cmake
+++ cmake/onnxruntime_providers.cmake
@@ -1071,7 +1071,8 @@
   if (HAS_NO_UNDEFINED_VAR_TEMPLATE)
     target_compile_options(onnxruntime_providers_rocm PRIVATE -Wno-undefined-var-template)
   endif()
-  target_include_directories(onnxruntime_providers_rocm PRIVATE ${onnxruntime_ROCM_HOME}/include ${onnxruntime_ROCM_HOME}/include/hipcub ${onnxruntime_ROCM_HOME}/include/hiprand ${onnxruntime_ROCM_HOME}/include/rocrand)
+  # During transition to separate hipFFT repo, put hipfft/include early
+  target_include_directories(onnxruntime_providers_rocm PRIVATE ${onnxruntime_ROCM_HOME}/hipfft/include ${onnxruntime_ROCM_HOME}/include ${onnxruntime_ROCM_HOME}/include/hipcub ${onnxruntime_ROCM_HOME}/include/hiprand ${onnxruntime_ROCM_HOME}/include/rocrand)
   target_include_directories(onnxruntime_providers_rocm PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/amdgpu/onnxruntime ${MPI_INCLUDE_DIRS} ${SAFEINT_INCLUDE_DIR} ${ONNXRUNTIME_ROOT}/../cmake/external/eigen)

   if (onnxruntime_ENABLE_TRAINING)


From Hady: Fix spelling of CppUnit in CMake build file.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@24750 27541ba8-7e3a-0410-8455-c3a389f83636

--- cint/reflex/cmake/modules/FindCppUnit.cmake
+++ cint/reflex/cmake/modules/FindCppUnit.cmake
@@ -16,15 +16,15 @@
 IF (CPPUNIT_FOUND)

    # show which CppUnit was found only if not quiet
-   IF (NOT CPPUNIT_FIND_QUIETLY)
+   IF (NOT CppUnit_FIND_QUIETLY)
       MESSAGE(STATUS "Found CppUnit: ${CPPUNIT_LIBRARY}")
-   ENDIF (NOT CPPUNIT_FIND_QUIETLY)
+   ENDIF (NOT CppUnit_FIND_QUIETLY)

 ELSE (CPPUNIT_FOUND)

    # fatal error if CppUnit is required but not found
-   IF (CPPUNIT_FIND_REQUIRED)
+   IF (CppUnit_FIND_REQUIRED)
       MESSAGE(FATAL_ERROR "Could not find CppUnit")
-   ENDIF (CPPUNIT_FIND_REQUIRED)
+   ENDIF (CppUnit_FIND_REQUIRED)

 ENDIF (CPPUNIT_FOUND)


pluginprocess-improvements: reformat cmake

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -126,7 +126,7 @@
 		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=integer")
 		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize-blacklist=\"${CMAKE_SOURCE_DIR}/tests/sanitizer.blacklist\"")
 		# on some systems clang does not link the asan/ubsan libraries, so enforce it
-		set (CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -lubsan")
+		set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lubsan")
 	endif ()

 	if (CMAKE_COMPILER_IS_GNUCXX)


cmake: add comment for readability

cmake: add comment for readability

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -117,6 +117,9 @@
 	set (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
 endif ()

+#
+# ASAN
+#
 if (ENABLE_ASAN)
 	set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer")
 	set (ASAN_LIBRARY "-lasan") # this is needed for GIR to put asan in front


Fix standalone build on RHEL6.

Fix standalone build on RHEL6.

Differential revision: http://reviews.llvm.org/D19991

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

--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -195,6 +195,7 @@
   runtimedyld
   option
   support
+  coverage
   )

 if ( NOT LLDB_DISABLE_PYTHON )


trying to make glfw find the autobuilt version of itself before any other versions already installed on the system

--- cmake/Modules/FindGLFW.cmake
+++ cmake/Modules/FindGLFW.cmake
@@ -1,15 +1,23 @@
-

 find_path(GLFW_INCLUDE_DIR
     GLFW/glfw3.h
+  NO_DEFAULT_PATH
   HINTS
     ${CMAKE_INSTALL_PREFIX}/include
     ${CMAKE_INSTALL_PREFIX}/include/GLFW
-    $ENV{GLFW_ROOT}/include
-    $ENV{GLFW_ROOT}/include/GLFW
-    /usr/local/include
-    /usr/local/include/GLFW
 )
+if (NOT GLFW_INCLUDE_DIR)
+    find_path(GLFW_INCLUDE_DIR
+        GLFW/glfw3.h
+      HINTS
+        ${CMAKE_INSTALL_PREFIX}/include
+        ${CMAKE_INSTALL_PREFIX}/include/GLFW
+        $ENV{GLFW_ROOT}/include
+        $ENV{GLFW_ROOT}/include/GLFW
+        /usr/local/include
+        /usr/local/include/GLFW
+    )
+endif()

 find_library(GLFW_OPT_LIBRARIES
@@ -17,11 +25,22 @@
     libglfw3.a
     glfw3.lib
     glfw3
+  NO_DEFAULT_PATH
   HINTS
     ${CMAKE_INSTALL_PREFIX}/lib
-    $ENV{GLFW_ROOT}/lib
-    /usr/local/lib
 )
+if (NOT GLFW_OPT_LIBRARIES)
+    find_library(GLFW_OPT_LIBRARIES
+      NAMES
+        libglfw3.a
+        glfw3.lib
+        glfw3
+      HINTS
+        ${CMAKE_INSTALL_PREFIX}/lib
+        $ENV{GLFW_ROOT}/lib
+        /usr/local/lib
+    )
+endif()

 find_library(GLFW_DEBUG_LIBRARIES
@@ -29,11 +48,22 @@
     libglfw3d.a
     glfw3d.lib
     glfw3d
+  NO_DEFAULT_PATH
   HINTS
     ${CMAKE_INSTALL_PREFIX}/lib
-    $ENV{GLFW_ROOT}/lib
-    /usr/local/lib
 )
+if (NOT GLFW_DEBUG_LIBRARIES)
+    find_library(GLFW_DEBUG_LIBRARIES
+      NAMES
+        libglfw3d.a
+        glfw3d.lib
+        glfw3d
+      HINTS
+        ${CMAKE_INSTALL_PREFIX}/lib
+        $ENV{GLFW_ROOT}/lib
+        /usr/local/lib
+    )
+endif()

 if (GLFW_OPT_LIBRARIES AND GLFW_DEBUG_LIBRARIES)
@@ -75,4 +105,7 @@
     GLFW_OPT_LIBRARIES
     GLFW_DEBUG_LIBRARIES
     GLFW_LIBRARIES
+    GLFW_cocoa_LIBRARY
+    GLFW_iokit_LIBRARY
+    GLFW_corevideo_LIBRARY
 )


cleanup

cleanup

--- cmake/SetupCompilerPre.cmake
+++ cmake/SetupCompilerPre.cmake
@@ -24,7 +24,6 @@
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -pipe")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wall -Wextra")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wpointer-arith")
-  SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wno-unused-parameter")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fmessage-length=0")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fdiagnostics-show-option")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -ferror-limit=5")
@@ -49,32 +48,6 @@

   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GLOBAL_COMPILER_FLAGS}")

-  # linker flags
-  IF("Release" STREQUAL "${CMAKE_BUILD_TYPE}")
-    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-O1")
-  ENDIF()
-
-  SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--demangle")
-  SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--fatal-warnings")
-
-  # BOOST
-  SET(Boost_DEBUG               FALSE)
-  # SET(Boost_USE_STATIC_LIBS     ON)
-  SET(Boost_USE_MULTITHREAD     ON)
-  ADD_DEFINITIONS(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-  ADD_DEFINITIONS("-DBOOST_ALL_DYN_LINK")
-
-  # GLM
-  ADD_DEFINITIONS("-DGLM_FORCE_CXX11")
-  # doesn't work if '__attribute__((always_inline))' is used without 'inline'
-  # ADD_DEFINITIONS("-DGLM_FORCE_INLINE")
-  # ADD_DEFINITIONS("-DGLM_FORCE_ONLY_XYZW")
-  ADD_DEFINITIONS("-DGLM_FORCE_RADIANS")
-  # ADD_DEFINITIONS("-DGLM_MESSAGES")
-  ADD_DEFINITIONS("-DGLM_PRECISION_MEDIUMP_INT")
-  ADD_DEFINITIONS("-DGLM_PRECISION_MEDIUMP_FLOAT")
-  ADD_DEFINITIONS("-DGLM_SWIZZLE")
-
 ENDIF()

 IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
@@ -84,14 +57,9 @@
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -pipe")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wall -Wextra")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wpointer-arith")
-  SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wno-ignored-qualifiers")
-  SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wno-unused-parameter")
-  SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wno-unused-but-set-variable")
-
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fmessage-length=0")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fdiagnostics-show-location=once")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fdiagnostics-show-option")
-  # SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -save-temps")

   IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "4.6")
     SET(GLOBAL_COMPILER_FLAGS "-std=c++11 ${GLOBAL_COMPILER_FLAGS}")
@@ -118,6 +86,9 @@

   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GLOBAL_COMPILER_FLAGS}")

+ENDIF()
+
+IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
   # linker flags
   IF("Release" STREQUAL "${CMAKE_BUILD_TYPE}")
     SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-O1")
@@ -140,8 +111,8 @@
   # ADD_DEFINITIONS("-DGLM_FORCE_ONLY_XYZW")
   ADD_DEFINITIONS("-DGLM_FORCE_RADIANS")
   # ADD_DEFINITIONS("-DGLM_MESSAGES")
-  ADD_DEFINITIONS("-DGLM_PRECISION_MEDIUMP_INT")
-  ADD_DEFINITIONS("-DGLM_PRECISION_MEDIUMP_FLOAT")
+  ADD_DEFINITIONS("-DGLM_PRECISION_HIGHP_INT")
+  ADD_DEFINITIONS("-DGLM_PRECISION_HIGHP_FLOAT")
   ADD_DEFINITIONS("-DGLM_SWIZZLE")

 ENDIF()


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/puffin-stream/hunter.cmake
+++ cmake/projects/puffin-stream/hunter.cmake
@@ -26,4 +26,6 @@
     BUILD_TESTS=NO
 )

+hunter_cacheable(puffin-stream)
+
 hunter_download(PACKAGE_NAME puffin-stream)


pkg-config generation : add "--no-as-needed" in pkg-config file

--- common/CommonAPICodeGenCommonConfig.cmake
+++ common/CommonAPICodeGenCommonConfig.cmake
@@ -19,6 +19,7 @@
 	set(LIBRARY_NAME ${interface}_CommonAPI)
 	STRING(REGEX REPLACE "/" "_" LIBRARY_NAME ${LIBRARY_NAME})
 	set ( ${variableName} ${LIBRARY_NAME})
+
 	message ("Library name : ${${variableName}} ")
 endmacro()

@@ -62,7 +63,7 @@
     pkg_check_modules(${PKGCONFIG_FILENAME}_PKG REQUIRED ${PKGCONFIG_FILENAME})
     add_definitions(${${PKGCONFIG_FILENAME}_PKG_CFLAGS})
     link_directories(${${PKGCONFIG_FILENAME}_PKG_LIBRARY_DIRS})
-    set(${variableName}_LIBRARIES -Wl,--no-as-needed ${${PKGCONFIG_FILENAME}_PKG_LIBRARIES} -Wl,--as-needed)
+    set(${variableName}_LIBRARIES ${${PKGCONFIG_FILENAME}_PKG_LIBRARIES})
     set(${variableName}_PKGCONFIG_FILENAME ${PKGCONFIG_FILENAME})

     message("CommonAPI libraries for ${interface} : ${${variableName}_LIBRARIES}")
@@ -88,11 +89,11 @@
 libdir=\${prefix}/lib
 includedir=\${prefix}/include

-Name: Common-API Service
-Description: Common-API Service
+Name: ${interface} Common-API Service
+Description: ${interface} Common-API Service
 Version: 1
 Requires: CommonAPI
-Libs: -l${LIBRARY_NAME}_Backend @DEVELOPMENT_LIBRARY_PATH@
+Libs: -Wl,--no-as-needed,-l${LIBRARY_NAME}_Backend,-Wl,--as-needed @DEVELOPMENT_LIBRARY_PATH@
 Cflags: @DEVELOPMENT_INCLUDE_PATH@ -I\${includedir}/CommonAPIServices
 ")


Rolling back luaposix upgrade.

Rolling back luaposix upgrade.

Rolling back upgrade from 09362ca5fc8412450f29d2a8375bd0340a683684.
Looks like there's some lua path issues in the new version. Since we
don't really need this upgrade, let's just rollback for now.

--- build/cmake/versions.cmake
+++ build/cmake/versions.cmake
@@ -39,8 +39,8 @@
 set(LUAROCK_LIBCIDR_HASH b6bdc9431cb488de8b58a83117107f7a)
 set(LUAROCK_LUACHECK_VERSION 0.20.0-1)
 set(LUAROCK_LUACHECK_HASH 356f70417be92c2aa8fd704f5175e6da)
-set(LUAROCK_LUAPOSIX_VERSION 34.0.1-1)
-set(LUAROCK_LUAPOSIX_HASH d2e577cc8fc06de68fd13f22bde76ea6)
+set(LUAROCK_LUAPOSIX_VERSION 33.4.0-1)
+set(LUAROCK_LUAPOSIX_HASH e413e0b9a680a040d8fb1adfa0dc4c11)
 set(LUAROCK_LUATZ_VERSION 0.3-1)
 set(LUAROCK_LUATZ_HASH fccc3d10d83e0994fedf061776508881)
 set(LUAROCK_LUSTACHE_VERSION 1.3.1-0)


Fix still image output in RGB postprocessing

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "30d8539b9a7b6b056cdb9d3deab5036542204dd2")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "4edb4923933e4cf2750f1958e4dee77de2cdca3f")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Fixed deprecated dereference in checkfunctionexistsmath.cmake

--- cmake/modules/CheckFunctionExistsMath.cmake
+++ cmake/modules/CheckFunctionExistsMath.cmake
@@ -26,7 +26,7 @@
 #=============================================================================

 MACRO(CHECK_FUNCTION_EXISTS_MATH FUNCTION VARIABLE)
-  IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
+  IF(${VARIABLE} MATCHES "^${VARIABLE}$")
     SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
     MESSAGE(STATUS "Looking for ${FUNCTION}")
@@ -63,5 +63,5 @@
         "Determining if the function ${FUNCTION} exists failed with the following output:\n"
         "${OUTPUT}\n\n")
     ENDIF(${VARIABLE})
-  ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
+  ENDIF(${VARIABLE} MATCHES "^${VARIABLE}$")
 ENDMACRO(CHECK_FUNCTION_EXISTS_MATH)


From Pere:
CMake: put liblzma.dll into bin directory, so we can run root.exe from the build (F5).

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@40351 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -74,9 +74,9 @@
 	  PREFIX LZMA
 	  INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND "" BUILD_COMMAND ""
-	  INSTALL_COMMAND cmake -E copy lib/liblzma.dll <INSTALL_DIR>/bin
+	  INSTALL_COMMAND cmake -E copy lib/liblzma.dll <INSTALL_DIR>/bin/${CMAKE_CFG_INTDIR}
 	  BUILD_IN_SOURCE 1)
-    install(FILES ${CMAKE_BINARY_DIR}/bin/liblzma.dll DESTINATION bin)
+    install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION bin)
     set(LZMA_LIBRARIES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.lib)
     set(LZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/include)
   else()


Remove unnecessary slash.

Remove unnecessary slash.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -736,7 +736,7 @@
         IF(${_item} STREQUAL "LD_LIBRARY_PATH")
           SET(_item PATH)
         ENDIF()
-        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val}\;%${_item}%\n")
+        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")
         SET(_ext "bat")
         SET(_call_cmd "call")
       ELSE(WIN32)


ronn: try to fix

ronn: try to fix

see #2883

--- scripts/cmake/Modules/LibAddMacros.cmake
+++ scripts/cmake/Modules/LibAddMacros.cmake
@@ -556,9 +556,11 @@
 		if (RONN_LOC)
 			add_custom_command (OUTPUT ${OUTFILE}
 					    DEPENDS ${MDFILE}
-					    COMMAND export
-						    RUBYOPT="-Eutf-8"
-						    &&
+					    COMMAND ${CMAKE_COMMAND}
+						    -E
+						    env
+						    RUBYOPT="-Eutf-8:utf-8"
+						    LC_ALL="C.utf-8"
 						    ${RONN_LOC}
 						    ARGS
 						    -r


Fix build break: Bump pybind11 required version to 2.6.1 (#1228)

* Disable unneeded clang submodules

Signed-off-by: Michael Dolan <688080ba093bba32b8050b0536b1c7a964e2656e@gmail.com>

* Bump pybind11 required version to 2.6.1

Signed-off-by: Michael Dolan <688080ba093bba32b8050b0536b1c7a964e2656e@gmail.com>

--- share/cmake/modules/FindExtPackages.cmake
+++ share/cmake/modules/FindExtPackages.cmake
@@ -61,7 +61,7 @@

     # pybind11
     # https://github.com/pybind/pybind11
-    find_package(pybind11 2.4.3 REQUIRED)
+    find_package(pybind11 2.6.1 REQUIRED)
 endif()

 if(OCIO_BUILD_DOCS)


Improve the test script

Improve the test script

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30833 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -14,6 +14,7 @@
 ##
 ## ---------------------------------------------------------------------

+
 ########################################################################
 #                                                                      #
 #                             Test setup:                              #
@@ -21,29 +22,82 @@
 ########################################################################

 #
-# Configuration options:
-#
-# CTEST_SOURCE_DIRECTORY
-# CTEST_BINARY_DIRECTORY
-# CTEST_CMAKE_GENERATOR
-#
-# TRACK
-#
-# NO_JOBS
-# CONFIG_FILE
-#
-# TEST_DIFF
-# TEST_TIME_LIMIT
-# TEST_PICKUP_REGEX
-# NUMDIFF_DIR
-#
-#
+# This is the test script for running the testsuite.
+#
+# Invoke it in a _build directory_ (or designated build directory) via:
+#
+#   ctest -S <...>/run_testsuite.cmake
+#
+# The following configuration variables can be overriden with
+#
+#   ctest -D<variable>=<value> [...]
+#
+#
+#   CTEST_SOURCE_DIRECTORY
+#     - The source directory of deal.II (usually ending in "[...]/deal.II"
+#       (equivalent to https://svn.dealii.org/trunk/deal.II)
+#       Note: This is _not_ the test directory ending in "[...]/tests"
+#     - If unspecified, "../deal.II" relative to the location of this
+#       script is used. If this is not a source directory, an error is
+#       thrown.
+#
+#   CTEST_BINARY_DIRECTORY
+#     - The designated build directory (already configured, empty, or non
+#       existent - see the information about TRACKs what will happen)
+#     - If unspecified the current directory is used. If the current
+#       directory is equal to CTEST_SOURCE_DIRECTORY or the "tests"
+#       directory, an error is thrown.
+#
+#   CTEST_CMAKE_GENERATOR
+#     - The CMake Generator to use (e.g. "Unix Makefiles", or "Ninja", see
+#       $ man cmake)
+#     - If unspecified the generator of a configured build directory will
+#       be used. If this information is not available, an error is thrown.
+#
+#   TRACK
+#     - TODO (defaults to "Experimental")
+#
+#   NO_JOBS
+#     - The number of concurrent build and test jobs (defaults to 1).
+#
+#   CONFIG_FILE
+#     - A configuration file (see ../deal.II/docs/development/Config.sample)
+#       that will be used during the configuration stage (invokes
+#       # cmake -C ${CONFIG_FILE}). This only has an effect if
+#       CTEST_BINARY_DIRECTORY is empty.
+#
+# Furthermore, the following variables controlling the testsuite can be set
+# and will be automatically handed down to cmake:
+#
+#   TEST_DIFF
+#   TEST_TIME_LIMIT
+#   TEST_PICKUP_REGEX
+#   NUMDIFF_DIR
+#
+# For details, consult the ./README file.
+#
+

 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 MESSAGE("-- This is CTest ${CTEST_VERSION}")

 #
-# CTEST_SOURCE_DIR:
+# TRACK: Default to Experimental:
+#
+
+IF("${TRACK}" STREQUAL "")
+  SET(TRACK "Experimental")
+ENDIF()
+
+IF( NOT "${TRACK}" STREQUAL "Experimental"
+    AND NOT "${TRACK}" STREQUAL "Build Tests" )
+  MESSAGE(FATAL_ERROR "TODO: Unknown TRACK \"${TRACK}\"")
+ENDIF()
+
+MESSAGE("-- TRACK:                  ${TRACK}")
+
+#
+# CTEST_SOURCE_DIRECTORY:
 #

 IF("${CTEST_SOURCE_DIRECTORY}" STREQUAL "")
@@ -69,23 +123,35 @@
 MESSAGE("-- CTEST_SOURCE_DIRECTORY: ${CTEST_SOURCE_DIRECTORY}")

 #
-# CTEST_BINARY_DIR:
+# CTEST_BINARY_DIRECTORY:
 #

 IF("${CTEST_BINARY_DIRECTORY}" STREQUAL "")
   #
   # If CTEST_BINARY_DIRECTORY is not set we just use the current directory
-  # except it is equal to CTEST_SOURCE_DIRECTORY in which case we fail.
+  # except if it is equal to CTEST_SOURCE_DIRECTORY in which case we fail.
   #
   SET(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

-  IF("${CTEST_BINARY_DIRECTORY}" STREQUAL "${CTEST_SOURCE_DIR}")
-    MESSAGE(FATAL_ERROR "
-ctest was invoked in the source directory and CTEST_BINARY_DIRECTORY is not set.
+  IF( "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CTEST_SOURCE_DIR}"
+      OR "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}" )
+    MESSAGE(FATAL_ERROR "
+ctest was invoked in the source directory (or test source directory) and CTEST_BINARY_DIRECTORY is not set.
 Please either call ctest from within a designated build directory, or set CTEST_BINARY_DIRECTORY accordingly.
 "
       )
   ENDIF()
+ENDIF()
+
+# Make sure that for a build test the directory is empty:
+FILE(GLOB _test ${CTEST_BINARY_DIRECTORY}/*)
+IF( "${TRACK}" STREQUAL "Build Tests"
+    AND NOT "${_test}" STREQUAL "" )
+    MESSAGE(FATAL_ERROR "
+TRACK was set to \"Build Tests\" which require an empty build directory.
+But files werer found in \"${CTEST_BINARY_DIRECTORY}\"
+"
+      )
 ENDIF()

 MESSAGE("-- CTEST_BINARY_DIRECTORY: ${CTEST_BINARY_DIRECTORY}")
@@ -126,14 +192,15 @@
 ENDIF()

 #
-# NO_JOBS:
-#
-
-IF("${NO_JOBS}" STREQUAL "")
-  SET(NO_JOBS "1")
-ENDIF()
-
-MESSAGE("-- NO_JOBS: ${NO_JOBS}")
+# CTEST_UPDATE_COMMAND:
+#
+
+FIND_PACKAGE(Subversion QUIET)
+IF(SUBVERSION_FOUND)
+  SET(CTEST_UPDATE_COMMAND ${Subversion_SVN_EXECUTABLE})
+ENDIF()
+
+MESSAGE("-- CTEST_UPDATE_COMMAND:   ${CTEST_UPDATE_COMMAND}")

 #
 # CTEST_SITE:
@@ -143,64 +210,11 @@
 EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname)
 SET(CTEST_SITE "${_hostname}")

-#
-# CTEST_UPDATE_COMMAND
-#
-
-FIND_PACKAGE(Subversion QUIET)
-IF(SUBVERSION_FOUND)
-  SET(CTEST_UPDATE_COMMAND ${Subversion_SVN_EXECUTABLE})
-ENDIF()
-
-#
-# CTEST_BUILD_NAME
-#
-
-SET(CTEST_BUILD_NAME
-  "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}"
-  )
-
-# Append compiler information if available...
-IF(EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log)
-  FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/detailed.log _compiler_id
-    REGEX "CMAKE_CXX_COMPILER:"
-    )
-  STRING(REGEX REPLACE
-    "^.*CMAKE_CXX_COMPILER:     \(.*\) on platform.*$" "\\1"
-    _compiler_id ${_compiler_id}
-    )
-  STRING(REGEX REPLACE " " "-" _compiler_id ${_compiler_id})
-  IF( NOT "${_compiler_id}" STREQUAL "" OR
-      _compiler_id MATCHES "CMAKE_CXX_COMPILER" )
-    SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_compiler_id}")
-  ENDIF()
-ENDIF()
-
-IF(NOT TRACK MATCHES "Foobar") #TODO: Exclude Continuous TRACKS
-  #Append subversion revision:
-  IF(SUBVERSION_FOUND)
-    EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} info
-      ${CTEST_SOURCE_DIRECTORY} RESULT_VARIABLE _result
-      )
-    IF(${_result} EQUAL 0)
-      Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn)
-      STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
-      STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
-      STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
-      SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}-r${_svn_WC_REVISION}")
-    ENDIF()
-  ENDIF()
-ENDIF()
-
-#
-# Finalize:
-#
-
-SET(CTEST_NOTES_FILES
-  ${CTEST_BINARY_DIRECTORY}/revision.log
-  ${CTEST_BINARY_DIRECTORY}/summary.log
-  ${CTEST_BINARY_DIRECTORY}/detailed.log
-  )
+MESSAGE("-- CTEST_SITE:             ${CTEST_SITE}")
+
+#
+# Assemble configuration options, we need it now:
+#

 IF(NOT "${CONFIG_FILE}" STREQUAL "")
   SET(_options "-C${CONFIG_FILE}")
@@ -216,42 +230,134 @@
   ENDIF()
 ENDFOREACH()

+#
+# CTEST_BUILD_NAME:
+#
+
+SET(CTEST_BUILD_NAME
+  "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}"
+  )
+
+#
+# Append compiler information to CTEST_BUILD_NAME:
+#
+
+IF(NOT EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log)
+  # Apparently, ${CTEST_BINARY_DIRECTORY} is not a configured build
+  # directory. In this case we need a trick: set up a dummy project and
+  # query it for the compiler information.
+  FILE(WRITE ${CTEST_BINARY_DIRECTORY}/query_for_compiler/CMakeLists.txt "
+FILE(WRITE ${CTEST_BINARY_DIRECTORY}/detailed.log
+  \"#        CMAKE_CXX_COMPILER:     \${CMAKE_CXX_COMPILER_ID} \${CMAKE_CXX_COMPILER_VERSION} on platform \${CMAKE_SYSTEM_NAME} \${CMAKE_SYSTEM_PROCESSOR}\"
+  )"
+    )
+  EXECUTE_PROCESS(
+    COMMAND ${CMAKE_COMMAND} ${_options} "-G${CTEST_CMAKE_GENERATOR}" .
+    OUTPUT_QUIET ERROR_QUIET
+    WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}/query_for_compiler
+    )
+  FILE(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY}/query_for_compiler)
+ENDIF()
+
+IF(EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log)
+  FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/detailed.log _compiler_id
+    REGEX "CMAKE_CXX_COMPILER:"
+    )
+  STRING(REGEX REPLACE
+    "^.*CMAKE_CXX_COMPILER:     \(.*\) on platform.*$" "\\1"
+    _compiler_id ${_compiler_id}
+    )
+  STRING(REGEX REPLACE " " "-" _compiler_id ${_compiler_id})
+  IF( NOT "${_compiler_id}" STREQUAL "" OR
+      _compiler_id MATCHES "CMAKE_CXX_COMPILER" )
+    SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_compiler_id}")
+  ENDIF()
+ENDIF()
+
+#
+# Append subversion information to CTEST_BUILD_NAME:
+#
+
+IF(NOT TRACK MATCHES "Foobar" AND SUBVERSION_FOUND) #TODO: Exclude Continuous TRACKS
+  EXECUTE_PROCESS(
+    COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY}
+    OUTPUT_QUIET ERROR_QUIET
+    RESULT_VARIABLE _result
+    )
+  IF(${_result} EQUAL 0)
+    Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn)
+    STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
+    STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
+    STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
+    SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}-r${_svn_WC_REVISION}")
+  ENDIF()
+ENDIF()
+
+MESSAGE("-- CTEST_BUILD_NAME:       ${CTEST_BUILD_NAME}")
+
+#
+# Write revision log:
+#
+
+IF(DEFINED _svn_WC_REVISION)
+  FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
+"###
+#
+#  SVN information:
+#        SVN_WC_URL:               ${SVN_WC_URL}
+#        SVN_WC_REVISION:          ${_svn_WC_REVISION}
+#        SVN_WC_LAST_CHANGED_DATE: ${_svn_WC_LAST_CHANGED_DATE}
+#
+###"
+    )
+ELSE()
+  FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
+"###
+#
+#  No SVN information available.
+#
+###"
+    )
+ENDIF()
+
+#
+# NO_JOBS:
+#
+
+IF("${NO_JOBS}" STREQUAL "")
+  SET(NO_JOBS "1")
+ENDIF()
+
+MESSAGE("-- NO_JOBS:                ${NO_JOBS}")
+
+#
+# Declare files that should be submitted as notes:
+#
+
+SET(CTEST_NOTES_FILES
+  ${CTEST_BINARY_DIRECTORY}/revision.log
+  ${CTEST_BINARY_DIRECTORY}/summary.log
+  ${CTEST_BINARY_DIRECTORY}/detailed.log
+  )
+
+
 ########################################################################
 #                                                                      #
 #                          Run the testsuite:                          #
 #                                                                      #
 ########################################################################

-IF("${TRACK}" STREQUAL "Experimental")
-
-  #
-  # TRACK Experimental:
-  #
-  # It is assumed that the build directory is already configured
-  #
-  # - Run the configure, build and test stages and submit the results to
-  #   the "Experimental" track
-  #
-  # - No cleanup is done
-  #
-
-  CTEST_START(Experimental TRACK Experimental)
-
-  CTEST_CONFIGURE(OPTIONS "${_options}")
-
-  CTEST_BUILD(TARGET) # run all target
-
-  # TODO: Run this during the BUILD stage...
-  EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
-    --build ${CTEST_BINARY_DIRECTORY} --target setup_test
-    )
-
-  CTEST_TEST(PARALLEL_LEVEL ${NO_JOBS})
-
-  CTEST_SUBMIT()
-
-ELSE()
-
-  MESSAGE(FATAL_ERROR "TRACK has to be set TODO")
-
-ENDIF()
+CTEST_START(Experimental TRACK ${TRACK})
+
+CTEST_CONFIGURE(OPTIONS "${_options}")
+
+CTEST_BUILD(TARGET) # run all target
+
+# TODO: Run this during the BUILD stage...
+EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
+  --build ${CTEST_BINARY_DIRECTORY} --target setup_test
+  )
+
+CTEST_TEST(PARALLEL_LEVEL ${NO_JOBS})
+
+CTEST_SUBMIT()


modules: updated FindCorrade.cmake.

modules: updated FindCorrade.cmake.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -26,8 +26,6 @@
 # Features of found Corrade library are exposed in these variables:
 #  CORRADE_GCC47_COMPATIBILITY  - Defined if compiled with compatibility
 #   mode for GCC 4.7
-#  CORRADE_GCC46_COMPATIBILITY  - Defined if compiled with compatibility
-#   mode for GCC 4.6
 #  CORRADE_BUILD_DEPRECATED     - Defined if compiled with deprecated APIs
 #   included
 #  CORRADE_BUILD_STATIC         - Defined if compiled as static libraries
@@ -196,10 +194,6 @@
 if(NOT _GCC47_COMPATIBILITY EQUAL -1)
     set(CORRADE_GCC47_COMPATIBILITY 1)
 endif()
-string(FIND "${_corradeConfigure}" "#define CORRADE_GCC46_COMPATIBILITY" _GCC46_COMPATIBILITY)
-if(NOT _GCC46_COMPATIBILITY EQUAL -1)
-    set(CORRADE_GCC46_COMPATIBILITY 1)
-endif()
 string(FIND "${_corradeConfigure}" "#define CORRADE_BUILD_DEPRECATED" _BUILD_DEPRECATED)
 if(NOT _BUILD_DEPRECATED EQUAL -1)
     set(CORRADE_BUILD_DEPRECATED 1)


Added CLang AddressSanitizer support

Added CLang AddressSanitizer support

--- src/cmake/BuzzBuildFlags.cmake
+++ src/cmake/BuzzBuildFlags.cmake
@@ -26,3 +26,17 @@
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG    ${BUZZ_FLAGS_DEBUG})
 set(CMAKE_MODULE_LINKER_FLAGS_DEBUG ${BUZZ_FLAGS_DEBUG})
 set(CMAKE_SHARED_LINKER_FLAGS_DEBUG ${BUZZ_FLAGS_DEBUG})
+
+if(APPLE)
+  # Add address sanitizer support for CLang
+  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -fno-optimize-sibling-calls -fno-omit-frame-pointer")
+  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fno-optimize-sibling-calls -fno-omit-frame-pointer")
+  set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS_RELEASE}")
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG}")
+  set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} -fsanitize=address")
+  set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fsanitize=address")
+  set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address")
+  set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} ${CMAKE_MODULE_LINKER_FLAGS_DEBUG}")
+  set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}")
+  set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
+endif(APPLE)


capture stderr instead of stdout

capture stderr instead of stdout

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -761,11 +761,12 @@

   execute_process(COMMAND "rosboost-cfg" "--libs" ${_libs}
                   OUTPUT_VARIABLE BOOST_LIBS
+		  ERROR_VARIABLE _boostcfg_error
                   RESULT_VARIABLE _boostcfg_failed
                   OUTPUT_STRIP_TRAILING_WHITESPACE)

   if (_boostcfg_failed)
-    message(FATAL_ERROR "[rosboost-cfg --libs ${_libs}] failed with output: ${BOOST_LIBS}")
+    message(FATAL_ERROR "[rosboost-cfg --libs ${_libs}] failed with error: ${_boostcfg_error}")
   endif(_boostcfg_failed)

   separate_arguments(BOOST_LIBS)


Cleanup and provide some more output

Cleanup and provide some more output

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@31283 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/scripts/run_testsuite.cmake
+++ deal.II/cmake/scripts/run_testsuite.cmake
@@ -218,6 +218,8 @@
   ENDIF()
 ENDIF()

+MESSAGE("-- CTEST_CMAKE_GENERATOR:  ${CTEST_CMAKE_GENERATOR}")
+
 #
 # CTEST_SITE:
 #
@@ -398,6 +400,8 @@
   SET(CTEST_COVERAGE_COMMAND "${GCOV_COMMAND}")
 ENDIF()

+MESSAGE("-- COVERAGE:               ${COVERAGE}")
+

 ########################################################################
 #                                                                      #
@@ -411,16 +415,19 @@

 CTEST_START(Experimental TRACK ${TRACK})

+MESSAGE("-- Running CTEST_CONFIGURE()")
 CTEST_CONFIGURE(OPTIONS "${_options}" RETURN_VALUE _res)

 IF("${_res}" STREQUAL "0")
   # Only run the build stage if configure was successful:

+  MESSAGE("-- Running CTEST_BUILD()")
   CTEST_BUILD(TARGET NUMBER_ERRORS _res)

   IF("${_res}" STREQUAL "0")
     # Only run tests if the build was successful:

+    MESSAGE("-- Running make setup_tests")
     EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
       --build ${CTEST_BINARY_DIRECTORY} --target setup_tests
       OUTPUT_QUIET RESULT_VARIABLE _res
@@ -432,9 +439,11 @@
         )
     ENDIF()

+    MESSAGE("-- Running CTEST_TESTS()")
     CTEST_TEST()

     IF(COVERAGE)
+      MESSAGE("-- Running CTEST_COVERAGE()")
       CTEST_COVERAGE()
     ENDIF(COVERAGE)

@@ -484,6 +493,11 @@
 # And finally submit:
 #

-CTEST_SUBMIT()
-
-# .oO( This script is freaky 457 lines long... )
+MESSAGE("-- Running CTEST_SUBMIT()")
+CTEST_SUBMIT(RETURN_VALUE _res)
+
+IF("${_res}" STREQUAL "0")
+  MESSAGE("-- Submission successful. Goodbye!")
+ENDIF()
+
+# .oO( This script is freaky 503 lines long... )


Update FW to latest develop

Update FW to latest develop

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "5e256e60d6c3552f9ce24a1df364abd3a11045ef")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "0ea4495f759d6baae338ff6fad9cc576802f41f7")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Fix a potential crash with `DEPTHAI_WATCHDOG=0`

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "0f02e98b07c988a0bcf95da20046b87f3fa8df7a")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "31be3c3f138f11050b6a3d6ab6ad7f686f86e18f")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Hotfix: Fix mobilenet detection network

Hotfix: Fix mobilenet detection network

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "9a5b24699ef3c80e5022aa056510044ce89df059")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "138d95c71e6291c7be792ba5b29fc3498489c3d2")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


px4fmu-v2 disable tfmini distance sensor

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -27,7 +27,7 @@
 	drivers/distance_sensor/sf1xx
 	drivers/distance_sensor/srf02
 	drivers/distance_sensor/teraranger
-	drivers/distance_sensor/tfmini
+	#drivers/distance_sensor/tfmini
 	#drivers/distance_sensor/ulanding
 	#drivers/frsky_telemetry
 	drivers/gps


px4fmu-v5:Add ist8310 to build for FMUv5

--- cmake/configs/nuttx_px4fmu-v5_default.cmake
+++ cmake/configs/nuttx_px4fmu-v5_default.cmake
@@ -28,6 +28,7 @@
 	drivers/hott/hott_sensors
 	drivers/hott/hott_telemetry
 	drivers/iridiumsbd
+	drivers/ist8310
 	drivers/led
 	drivers/lis3mdl
 	drivers/ll40ls


cosmetics

cosmetics

--- cmake_modules/Windows/ProxyFindModule.cmake
+++ cmake_modules/Windows/ProxyFindModule.cmake
@@ -124,7 +124,7 @@
   # print some help
   IF (NOT LIST_CMAKE_PREFIX_PATH)
     MESSAGE (STATUS "No candidate ${MODULE_NAME} directory was found in the paths: ${SEARCH_PATHS};%PATH%")
-    MESSAGE (STATUS "You might wanna check:")
+    MESSAGE (STATUS "You might want to check the following:")
     MESSAGE (STATUS "  1. Did you set ZORBA_THIRD_PARTY_REQUIREMENTS properly?")
     MESSAGE (STATUS "  2. Is your ${MODULE_NAME} directory matching one of the search names: ${SEARCH_NAMES} ?")
     MESSAGE (STATUS "  3. Is ${MODULE_NAME} or its \"bin\" directory in the PATH environment variable?")


Wrong order for gtest library

Wrong order for gtest library

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@627 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/FindGoogleTest.cmake
+++ cmake/FindGoogleTest.cmake
@@ -42,8 +42,8 @@
   else(GTEST_PREFIX)
     find_path(_GTEST_INCLUDE_DIR "gtest/gtest.h"
       PATHS
+      ~/sw/gtest/include
       /ACG/acgdev/gcc-4.7-x86_64/gtest/include
-      ~/sw/gtest/include
       /opt/local/include
       /usr/local/include
       /usr/include
@@ -51,8 +51,8 @@
       NO_DEFAULT_PATH )
     find_library(_GTEST_LIBRARY gtest
       PATHS
+      ~/sw/gtest/lib
       /ACG/acgdev/gcc-4.7-x86_64/gtest/lib
-      ~/sw/gtest/lib
       /opt/local/lib
       /usr/local/lib
       /usr/include
@@ -60,8 +60,8 @@
       NO_DEFAULT_PATH )
     find_library(_GTEST_MAIN_LIBRARY gtest_main
       PATHS
+      ~/sw/gtest/lib
       /ACG/acgdev/gcc-4.7-x86_64/gtest/lib
-      ~/sw/gtest/lib
       /opt/local/lib
       /usr/local/lib
       /usr/include


Clean up cmake dependency handling

Clean up cmake dependency handling

Former-commit-id: 41068165c3846bec5ddfbb85908edb8d1bdd79af

--- cmake/InstallPackage.cmake
+++ cmake/InstallPackage.cmake
@@ -85,7 +85,7 @@
     set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)

     if(PKG_MODULE)
-        find_package(${pkg_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS} REQUIRED)
+        find_package(${pkg_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS})
     else()
         find_package(${pkg_name} ${PKG_VERSION}
                 HINTS ${PKG_HINTS}


Fall back to C99 when C11 isn't available

--- cmake/Modules/cflags.cmake
+++ cmake/Modules/cflags.cmake
@@ -2,24 +2,39 @@
 	cmake_policy(SET CMP0054 NEW)
 endif()

+include(CheckCCompilerFlag)
+
+macro(test_c11)
+	check_c_compiler_flag("-std=c11" HAVE_C11)
+	if(HAVE_C11)
+		set(SGHERM_C_STANDARD "-std=c11")
+	else()
+		set(SGHERM_C_STANDARD "-std=c99")
+		message(WARNING "Your compiler does not support C11.  Things may break.")
+	endif()
+endmacro()
+
 macro(set_cflags)
 	if(${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
 		set(HAVE_COMPILER_CLANG "1")
-		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wpedantic -Wall -Wextra")
+		test_c11()
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SGHERM_C_STANDARD} -Wpedantic -Wall -Wextra")
 		if(HAVE_POSIX)
 			set(CMAKE_CXX_FLAGS_DEBUG, "${CMAKE_CXX_FLAGS_DEBUG} -g3")
 			set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g3")
 		endif()
 	elseif(${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
 		set(HAVE_COMPILER_GCC "1")
-		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -pedantic -Wall -Wextra")
+		test_c11()
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SGHERM_C_STANDARD} -pedantic -Wall -Wextra")
 		if(HAVE_POSIX)
 			set(CMAKE_CXX_FLAGS_DEBUG, "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")
 			set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ggdb")
 		endif()
 	elseif(${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
 		set(HAVE_COMPILER_INTEL "1")
-		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall -Wextra")
+		test_c11()
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SGHERM_C_STANDARD} -Wall -Wextra")
 		if(HAVE_POSIX)
 			set(CMAKE_CXX_FLAGS_DEBUG, "${CMAKE_CXX_FLAGS_DEBUG} -g")
 			set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g")


enable cfg extras with absolute path, allow having a cfg extra file for one space and not bail about a missing file for the other space

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -36,7 +36,8 @@
 # :param CFG_EXTRAS: a CMake file containing extra stuff that should
 #   be accessible to users of this package after
 #   ``find_package``\ -ing it.  This file must live in the
-#   subdirectory ``cmake``.  Various additional extension are possible:
+#   subdirectory ``cmake`` or be an absolute path.  Various additional
+#   file extension are possible:
 #   for a plain cmake file just ``.cmake``, for files expanded using
 #   CMake's ``configure_file()`` use ``.cmake.in`` or for files expanded
 #   by empy use ``.cmake.em``.  The templates can distinguish between
@@ -304,7 +305,12 @@
   # generate devel space cfg-extras for project
   set(PKG_CFG_EXTRAS "")
   foreach(extra ${${PROJECT_NAME}_CFG_EXTRAS} ${PROJECT_CFG_EXTRAS})
-    set(base ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra})
+    if(IS_ABSOLUTE ${extra})
+      set(base ${extra})
+      get_filename_component(extra ${extra} NAME)
+    else()
+      set(base ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra})
+    endif()
     if(EXISTS ${base}.em OR EXISTS ${base}.develspace.em)
       if(EXISTS ${base}.develspace.em)
         set(em_template ${base}.develspace.em)
@@ -329,8 +335,8 @@
       list(APPEND PKG_CFG_EXTRAS ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
     elseif(EXISTS ${base})
       list(APPEND PKG_CFG_EXTRAS ${base})
-    else()
-      message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file.  Either 'cmake/${extra}', 'cmake/${extra}.em', 'cmake/${extra}.develspace.em' or 'cmake/${extra}.in' must exist.")
+    elseif(NOT EXISTS ${base}.installspace.em AND NOT EXISTS ${base}.installspace.in)
+      message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file.  Either 'cmake/${extra}.develspace.em', 'cmake/${extra}.em', 'cmake/${extra}.develspace.in', 'cmake/${extra}.in', 'cmake/${extra}' or a variant specific to the installspace must exist.")
     endif()
   endforeach()

@@ -393,7 +399,12 @@
   set(PKG_CFG_EXTRAS "")
   set(installable_cfg_extras "")
   foreach(extra ${${PROJECT_NAME}_CFG_EXTRAS} ${PROJECT_CFG_EXTRAS})
-    set(base ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra})
+    if(IS_ABSOLUTE ${extra})
+      set(base ${extra})
+      get_filename_component(extra ${extra} NAME)
+    else()
+      set(base ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra})
+    endif()
     if(EXISTS ${base}.em OR EXISTS ${base}.installspace.em)
       if(EXISTS ${base}.installspace.em)
         set(em_template ${base}.installspace.em)
@@ -405,6 +416,7 @@
         ${em_template}
         ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
       list(APPEND installable_cfg_extras ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
+      list(APPEND PKG_CFG_EXTRAS ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
     elseif(EXISTS ${base}.in OR EXISTS ${base}.installspace.in)
       if(EXISTS ${base}.installspace.in)
         set(in_template ${base}.installspace.in)
@@ -416,12 +428,13 @@
         @ONLY
       )
       list(APPEND installable_cfg_extras ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
+      list(APPEND PKG_CFG_EXTRAS ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
     elseif(EXISTS ${base})
       list(APPEND installable_cfg_extras ${base})
-    else()
-      message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file.  Either 'cmake/${extra}', 'cmake/${extra}.em', 'cmake/${extra}.installspace.em' or 'cmake/${extra}.in' must exist.")
-    endif()
-    list(APPEND PKG_CFG_EXTRAS ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+      list(APPEND PKG_CFG_EXTRAS ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+    elseif(NOT EXISTS ${base}.develspace.em AND NOT EXISTS ${base}.develspace.in)
+      message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file.  Either 'cmake/${extra}.installspace.em', 'cmake/${extra}.em', 'cmake/${extra}.installspace.in', 'cmake/${extra}.in', 'cmake/${extra}'or a variant specific to the develspace must exist.")
+    endif()
   endforeach()
   install(FILES
     ${installable_cfg_extras}


CMake: typo fix

CMake: typo fix

--- cmake/compileoptions.cmake
+++ cmake/compileoptions.cmake
@@ -64,8 +64,7 @@
             if(MSVC_VERSION GREATER_EQUAL 1910)
                 list(APPEND comp_opts "/w35038") # class member reorder
                 if(NOT OpenMP_ON)
-                    #list(APPEND comp_opts "/permissive-")
-                    #list(APPEND comp_opts "/Zc:twoPhase-") # disable two phase lookup for now https://developercommunity.visualstudio.com/content/problem/185399/error-c2760-in-combaseapih-with-windows-sdk-81-and.html
+                    list(APPEND comp_opts "/permissive-")
                 endif()
                 list(APPEND comp_opts "/std:c++latest")
                 #list(APPEND comp_opts "/diagnostics:caret") not supporeted by cmake yet... https://developercommunity.visualstudio.com/content/problem/9385/cmakeliststxt-cannot-override-diagnosticsclassic-d.html


compiler-flags: forgot to pass --coverage to executable link

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -38,7 +38,7 @@
     CACHE STRING "Flags used by the C compiler during coverage builds."
      FORCE )
 SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    "${coverage_compilation}"
+    "${coverage_compilation} ${coverage_link}"
     CACHE STRING "Flags used for linking binaries during coverage builds."
     FORCE )
 SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE


bugfix to embree-config.cmake, embree library is now called embree3

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -94,11 +94,11 @@

 # why does this have to be so complicated...
 IF (WIN32)
-  SET(EMBREE_LIBRARY_NAME ${CMAKE_IMPORT_LIBRARY_PREFIX}embree${CMAKE_IMPORT_LIBRARY_SUFFIX})
+  SET(EMBREE_LIBRARY_NAME ${CMAKE_IMPORT_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX})
 ELSEIF (APPLE)
-  SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree.${EMBREE_CONFIG_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX})
-ELSE()
-  SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree${CMAKE_SHARED_LIBRARY_SUFFIX}.${EMBREE_CONFIG_VERSION})
+  SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}.${EMBREE_CONFIG_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX})
+ELSE()
+  SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}.${EMBREE_CONFIG_VERSION})
 ENDIF()

 IF (WIN32 OR EMBREE_ZIP_MODE)
@@ -128,7 +128,7 @@
 #SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png)
 #SET(CPACK_PACKAGE_RELOCATABLE TRUE)
 SET(CPACK_STRIP_FILES TRUE) # do not disable, stripping symbols is important for security reasons
-SET(CMAKE_STRIP "${PROJECT_SOURCE_DIR}/scripts/strip.sh") # needs this to properly strip under MacOSX
+SET(CMAKE_STRIP "${PROJECT_SOURCE_DIR}/scripts/strip.sh") # need this to properly strip under MacOSX

 SET(CPACK_PACKAGE_VERSION_MAJOR ${EMBREE_VERSION_MAJOR})
 SET(CPACK_PACKAGE_VERSION_MINOR ${EMBREE_VERSION_MINOR})


cmake-modules:
 * FindThirdPartyUSBFirstAmpAPI.cmake : added the path to default install directory of the API on windows 7 (suffix "x86").

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3085 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyUSBFirstAmpAPI.cmake
+++ trunk/cmake-modules/FindThirdPartyUSBFirstAmpAPI.cmake
@@ -4,7 +4,7 @@
 # Adds include path
 # ---------------------------------
 IF(WIN32)
-	FIND_PATH(PATH_USBFirstAmpAPI FirstAmp.h PATHS "C:/Program Files/FaSDK" $ENV{OpenViBE_dependencies})
+	FIND_PATH(PATH_USBFirstAmpAPI FirstAmp.h PATHS "C:/Program Files/FaSDK" "C:/Program Files (x86)/FaSDK" $ENV{OpenViBE_dependencies})
 	IF(PATH_USBFirstAmpAPI)
 		MESSAGE(STATUS "  Found FirstAmp API...")
 		INCLUDE_DIRECTORIES(${PATH_USBFirstAmpAPI})
@@ -27,6 +27,6 @@

 		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyUSBFirstAmpAPI)
 	ELSE(PATH_USBFirstAmpAPI)
-		MESSAGE(STATUS "  FAILED to find FirstAmp API - cmake looked in 'C:/Program Files/FaSDK' and '$ENV{OpenViBE_dependencies}'")
+		MESSAGE(STATUS "  FAILED to find FirstAmp API - cmake looked in 'C:/Program Files/FaSDK' and 'C:/Program Files (x86)/FaSDK'")
 	ENDIF(PATH_USBFirstAmpAPI)
 ENDIF(WIN32)


Fix bot_core_lcmtypes build under Ubuntu

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -12,7 +12,7 @@
 endif()

 set(bot_core_lcmtypes_url https://github.com/openhumanoids/bot_core_lcmtypes.git)
-set(bot_core_lcmtypes_revision e873dd4c088fddbbcec88d64fa8aa4bb278d361c)
+set(bot_core_lcmtypes_revision c29cd6076d13ca2a3ecc23ffcbe28a0a1ab46314)
 set(bot_core_lcmtypes_depends ${lcm_proj})

 set(libbot_url https://github.com/openhumanoids/libbot.git)


Back off on 3 readers kill test

Back off on 3 readers kill test

--- testing/adios2/engine/sst/TestSSTMxN.cmake
+++ testing/adios2/engine/sst/TestSSTMxN.cmake
@@ -66,11 +66,11 @@
     -nw 3 -nr 5 -v -p TestSst -arg 'RendezvousReaderCount:0,QueueLimit:3' -arg '--expect_time_gap')
 set_tests_properties(ADIOSSstDelayedReaderWithBlockingTest.3x5 PROPERTIES TIMEOUT 30 RUN_SERIAL 1)

-add_test(
-  NAME ADIOSSstKillReadersTest.3ReaderMax
-  COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run_multi_test -test_protocol kill_readers
-    -verbose -nw 3 -nr 2 -max_readers 3 -warg 'RendezvousReaderCount:0' -rarg '--ignore_time_gap')
-set_tests_properties(ADIOSSstKillReadersTest.3ReaderMax PROPERTIES TIMEOUT 300 RUN_SERIAL 1)
+#add_test(
+#  NAME ADIOSSstKillReadersTest.3ReaderMax
+#  COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run_multi_test -test_protocol kill_readers
+#    -verbose -nw 3 -nr 2 -max_readers 3 -warg 'RendezvousReaderCount:0' -rarg '--ignore_time_gap')
+#set_tests_properties(ADIOSSstKillReadersTest.3ReaderMax PROPERTIES TIMEOUT 300 RUN_SERIAL 1)

 if(ADIOS2_HAVE_ZFP)
   add_test(


More YACMA bits.

More YACMA bits.

--- cmake/yacma/YACMACompilerLinkerSettings.cmake
+++ cmake/yacma/YACMACompilerLinkerSettings.cmake
@@ -82,6 +82,8 @@
     # Configuration bits specific for GCC.
     if(YACMA_COMPILER_IS_GNUCXX)
         _YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
+        # New in GCC 9.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Waddress-of-packed-member)
     endif()

     # Configuration bits specific for clang.
@@ -90,7 +92,26 @@
         # for the time being.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
         # Clang is better at this flag than GCC.
-        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Werror)
+        # NOTE: enable unconditionally, as it seems like the CMake
+        # machinery for detecting this fails. Perhaps the source code
+        # used for checking the flag emits warnings?
+        list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror")
+        # New warnings in clang 8.
+        # NOTE: a few issues with macros here, let's disable for now.
+        # _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra-semi-stmt)
+        # New warnings in clang 10.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wtautological-overlap-compare)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wtautological-compare)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wtautological-bitwise-compare)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wbitwise-conditional-parentheses)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wrange-loop-analysis)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wmisleading-indentation)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wc99-designator)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wreorder-init-list)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsizeof-pointer-div)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsizeof-array-div)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wxor-used-as-pow)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wfinal-dtor-non-final-class)
     endif()

     # Common configuration for GCC, clang and Intel.


pw_build/cmake: add explicit INTERFACE support to pw_add_library

Adds explicit INTERFACE <type> type support to pw_add_library to
remove ambiguity in downstream projects when using the function.
The implicit conversion to INTERFACE was confusing between OBJECT
and STATIC libraries which were in fact just INTERFACE libraries.

pw_add_module_library was updated to automatically switch between
STATIC and INTERFACE for continued backwards compatibility.

Extra error messages were added in case sources were
inappropriately set compared to the library type as the CMake error
messages alone were not user friendly nor constructive.

Change-Id: I2cea0d26355d8f17034f718c3e596afbc400bd79
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/94062
Commit-Queue: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>
Reviewed-by: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>

--- pw_build/pigweed.cmake
+++ pw_build/pigweed.cmake
@@ -165,9 +165,8 @@
 # Required Args:
 #
 #   <name> - The name of the library target to be created.
-#   <type> - The library type which must be OBJECT, STATIC, SHARED, or MODULE.
-#            Note that INTERFACE is not supported and is implicitly used if no
-#            sources are provided.
+#   <type> - The library type which must be INTERFACE, OBJECT, STATIC, SHARED,
+#            or MODULE.
 #
 # Optional Args:
 #
@@ -192,16 +191,22 @@
       pw_add_library "${num_positional_args}" "${option_args}"
       "${one_value_args}" "${multi_value_args}")

+  add_library("${NAME}" "${TYPE}" EXCLUDE_FROM_ALL)
   # Instead of forking all of the code below or injecting an empty source file,
-  # conditionally select PUBLIC vs INTERFACE depending on whether there are
-  # sources to compile.
-  if(NOT "${arg_SOURCES}" STREQUAL "")
-    add_library("${NAME}" "${TYPE}" EXCLUDE_FROM_ALL)
+  # conditionally select PUBLIC vs INTERFACE depending on the type.
+  if("${TYPE}" STREQUAL "INTERFACE")
+    set(public_or_interface INTERFACE)
+    if(NOT "${arg_SOURCES}" STREQUAL "")
+      message(
+        SEND_ERROR "${NAME} cannot have sources as it's an INTERFACE library")
+    endif(NOT "${arg_SOURCES}" STREQUAL "")
+  else()  # ${TYPE} != INTERFACE
     set(public_or_interface PUBLIC)
-  else("${arg_SOURCES}" STREQUAL "")
-    add_library("${NAME}" INTERFACE EXCLUDE_FROM_ALL)
-    set(public_or_interface INTERFACE)
-  endif(NOT "${arg_SOURCES}" STREQUAL "")
+    if("${arg_SOURCES}" STREQUAL "")
+      message(
+        SEND_ERROR "${NAME} must have SOURCES as it's not an INTERFACE library")
+    endif("${arg_SOURCES}" STREQUAL "")
+  endif("${TYPE}" STREQUAL "INTERFACE")

   target_sources("${NAME}" PRIVATE ${arg_SOURCES} ${arg_HEADERS})

@@ -298,7 +303,18 @@
     )
   endif()

-  pw_add_library(${NAME} STATIC
+  # Use STATIC libraries if sources are provided, else instantiate an INTERFACE
+  # library. Also conditionally select PUBLIC vs INTERFACE depending on this
+  # selection.
+  if(NOT "${arg_SOURCES}" STREQUAL "")
+    set(type STATIC)
+    set(public_or_interface PUBLIC)
+  else("${arg_SOURCES}" STREQUAL "")
+    set(type INTERFACE)
+    set(public_or_interface INTERFACE)
+  endif(NOT "${arg_SOURCES}" STREQUAL "")
+
+  pw_add_library(${NAME} ${type}
     SOURCES
       ${arg_SOURCES}
     HEADERS
@@ -327,14 +343,6 @@
       ${arg_PRIVATE_LINK_OPTIONS}
   )

-  # Conditionally select PUBLIC vs INTERFACE depending on whether there are
-  # sources to compile.
-  if(NOT "${arg_SOURCES}" STREQUAL "")
-    set(public_or_interface PUBLIC)
-  else("${arg_SOURCES}" STREQUAL "")
-    set(public_or_interface INTERFACE)
-  endif(NOT "${arg_SOURCES}" STREQUAL "")
-
   # TODO(pwbug/601): Deprecate this legacy implicit PUBLIC_INCLUDES.
   if("${arg_PUBLIC_INCLUDES}" STREQUAL "")
     target_include_directories("${NAME}" ${public_or_interface} public)


mark nedmalloc deprecated

mark nedmalloc deprecated

--- CMake/FeatureSummary.cmake
+++ CMake/FeatureSummary.cmake
@@ -183,11 +183,11 @@
 if (OGRE_CONFIG_ALLOCATOR EQUAL 1)
 	set(_allocator "standard")
 elseif (OGRE_CONFIG_ALLOCATOR EQUAL 2)
-	set(_allocator "nedmalloc")
+	set(_allocator "nedmalloc [DEPRECATED]")
 elseif (OGRE_CONFIG_ALLOCATOR EQUAL 3)
 	set(_allocator "user")
 else ()
-    set(_allocator "nedmalloc (pooling)")
+    set(_allocator "nedmalloc (pooling) [DEPRECATED]")
 endif()
 # assert settings
 if (OGRE_ASSERT_MODE EQUAL 0)


BUG: Always use ".pyd" suffix on Win32 (except cygwin).

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -130,6 +130,9 @@

     IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
       SET_TARGET_PROPERTIES(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
+      IF(WIN32 AND NOT CYGWIN)
+        SET_TARGET_PROPERTIES(${_NAME} PROPERTIES SUFFIX ".pyd")
+      ENDIF(WIN32 AND NOT CYGWIN)
     ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)

   ENDIF(PYTHON_ENABLE_MODULE_${_NAME})


Adapt url and md5 value to thirdparty download folder.

--- CMakeExternals/DCMQI.cmake
+++ CMakeExternals/DCMQI.cmake
@@ -24,9 +24,8 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      #TODO MITK-Data
-      URL https://dl.dropbox.com/s/1rye5oewqxx4zn5/dcmqi-src-org.tar.gz
-      URL_MD5 dbcf44cb0176b2452fd8a3d7b4fba76b
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/dcmqi_3867f503.tar.gz
+      URL_MD5 d535f2c74861a6fd96014c23b7fb6554
       PATCH_COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/DCMQI.patch
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""


fix osg search path

fix osg search path

--- CMakeModules/FindOSG.cmake
+++ CMakeModules/FindOSG.cmake
@@ -11,7 +11,11 @@
 #
 # Created by Robert Osfield. Modified by Roger James 05/03/09

-SET(OSG_INSTALL_DIR "c:/Program Files/OpenSceneGraph" CACHE PATH "OpenSceneGraph install directory")
+IF (WIN32)
+    SET(OSG_INSTALL_DIR "c:/Program Files/OpenSceneGraph" CACHE PATH "OpenSceneGraph WIN32 install directory")
+ELSE (WIN32)
+    SET(OSG_INSTALL_DIR "/usr/local/openscenegraph" CACHE PATH "OpenSceneGraph UNIX install directory")
+ENDIF (WIN32)

 SET(OSG_LIBRARY_NAMES
     osg


Enable Trilinos warnings in recent versions. At least for my local copy (11.12.1) GCC does not raise any warnings.

--- cmake/configure/configure_2_trilinos.cmake
+++ cmake/configure/configure_2_trilinos.cmake
@@ -193,11 +193,13 @@
   SET(DEAL_II_EXPAND_TRILINOS_MPI_VECTOR "TrilinosWrappers::MPI::Vector")

   #
-  # Disable a bunch of warnings caused by Trilinos headers:
+  # Disable a bunch of warnings caused by Trilinos headers in older versions:
   #
-  ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-unused")
-  ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-extra")
-  ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-overloaded-virtual")
+  IF(TRILINOS_VERSION VERSION_LESS "11.12")
+    ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-unused")
+    ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-extra")
+    ENABLE_IF_SUPPORTED(TRILINOS_CXX_FLAGS "-Wno-overloaded-virtual")
+  ENDIF()
 ENDMACRO()


fix find external libraries

fix find external libraries

--- cmake/macros/macro_configure_feature.cmake
+++ cmake/macros/macro_configure_feature.cmake
@@ -193,14 +193,6 @@
         )
     ENDIF()
   ENDFOREACH()
-
-  #
-  # Obey the user overrides:
-  #
-  IF( (NOT DEFINED D2K_WITH_${_feature}) )
-    PURGE_FEATURE(${_feature})
-    SET_CACHED_OPTION(${_feature} OFF)
-  ENDIF()

   #
   # Only try to configure ${_feature} if we have to, i.e.


unset boost cache variables

unset boost cache variables

--- projects/use/usexp-boost-config.cmake
+++ projects/use/usexp-boost-config.cmake
@@ -47,10 +47,11 @@
   # with link=shared and runtime-link=shared and using ldd
 endif()
 unset(Boost_INCLUDE_DIR CACHE)
-unset(Boost_LIBRARY_DIRS CACHE)
+unset(Boost_LIBRARY_DIR CACHE)
 foreach(lib ${Boost_LIBS})
   string(TOUPPER ${lib} UPPERLIB)
-  unset(Boost_${UPPERLIB}_LIBRARY CACHE)
+  unset(Boost_${UPPERLIB}_LIBRARY_DEBUG CACHE)
+  unset(Boost_${UPPERLIB}_LIBRARY_RELEASE CACHE)
 endforeach()
 string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1.\\2" BOOST_VER2 ${BOOST_VER})
 set(Boost_ADDITIONAL_VERSIONS ${BOOST_VER} ${BOOST_VER2})


Allow documentation table customization

Allow documentation table customization

--- Doxygit.cmake
+++ Doxygit.cmake
@@ -52,6 +52,8 @@
   "
Project	Versions	")

 foreach(PROJECT ${PROJECTS})
+  string(REPLACE "[PROJECT]" "${PROJECT}" GITHUB_PROJECT_EXTRA_
+    ${GITHUB_PROJECT_EXTRA})
   file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
     "
\n"
     "
${PROJECT}	")
@@ -66,6 +68,10 @@
       list(APPEND GIT_DOCUMENTATION_INSTALL ${ENTRY})
     endif()
   endforeach()
+  if(GITHUB_PROJECT_EXTRA_)
+    file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+      "${GITHUB_PROJECT_EXTRA_}	")
+  endif()
 endforeach()

 execute_process(COMMAND "${GIT_EXECUTABLE}" add images ${ENTRIES}


[CMake] Build Python protos after core protos

Ensures that the generated code for the core protos has been generated before compiling the generated code for the Python-specific protos.

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -131,7 +131,7 @@
 )

 add_library(tf_python_protos_cc ${PROTO_SRCS} ${PROTO_HDRS})
-
+add_dependencies(tf_python_protos_cc tf_protos_cc)

 # tf_python_touchup_modules adds empty __init__.py files to all
 # directories containing Python code, so that Python will recognize


One more OpenJPEG rename that I missed in #2979

--- src/cmake/modules/FindOpenJPEG.cmake
+++ src/cmake/modules/FindOpenJPEG.cmake
@@ -153,7 +153,7 @@
 endif ()

 # Use the standard function to handle OPENJPEG_FOUND
-FIND_PACKAGE_HANDLE_STANDARD_ARGS (OpenJpeg
+FIND_PACKAGE_HANDLE_STANDARD_ARGS (OpenJPEG
   VERSION_VAR OPENJPEG_VERSION
   REQUIRED_VARS OPENJPEG_INCLUDE_DIR ${OpenJpeg_libvars})


Do not use C++11 for gtest: Mavericks fix

--- reactor/cmake_modules/FindGTest.cmake
+++ reactor/cmake_modules/FindGTest.cmake
@@ -21,7 +21,7 @@
 ExternalProject_Add(
     googletest
     PREFIX ${EXTERNAL_ROOT}
-    SVN_REPOSITORY http://googletest.googlecode.com/svn/tags/release-1.6.0/
+    SVN_REPOSITORY http://googletest.googlecode.com/svn/tags/release-1.7.0/
     TIMEOUT 10
     # Force separate output paths for debug and release builds to allow easy
     # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands
@@ -30,8 +30,6 @@
     INSTALL_COMMAND ""
     # Wrap download, configure and build steps in a script to log output
     )
-
-add_definitions(-DGTEST_LANG_CXX11)

 macro(cxx_test name source)


Minor fix

Minor fix

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

--- libkcal/ical_file.cmake
+++ libkcal/ical_file.cmake
@@ -30,7 +30,8 @@
 FILE(APPEND ${KDE_FILE_H_FILE} "extern \"C\" {\n")
 FILE(APPEND ${KDE_FILE_H_FILE} "#endif\n")
 FILE(APPEND ${KDE_FILE_H_FILE} "/*\n")
-FILE(APPEND ${KDE_FILE_H_FILE} " $$''Id''$$\n")
+FILE(APPEND ${KDE_FILE_H_FILE} " $Id$\n")
+
 FILE(APPEND ${KDE_FILE_H_FILE} "*/\n")

 foreach (_current_FILE ${COMBINEDHEADERSICAL})


Print error if GMP could not be found.

Print error if GMP could not be found.

--- cmake/gmp.cmake
+++ cmake/gmp.cmake
@@ -44,6 +44,8 @@

 if(GMP_FOUND)
 	message(STATUS "Configured GMP: ${GMP_LIBRARIES}")
+else(GMP_FOUND)
+	message(STATUS "Could NOT find GMP")
 endif(GMP_FOUND)

 mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES)


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/puffin-buffer/hunter.cmake
+++ cmake/projects/puffin-buffer/hunter.cmake
@@ -10,7 +10,7 @@
     PACKAGE_NAME
     puffin-buffer
     VERSION
-    "0.2.0.1"
+    "0.3.0.0"
     URL
     "https://github.com/designerror/puffin-buffer/archive/v0.2.0.1.tar.gz"
     SHA1


Added CPack include explicitly. ref#281

Added CPack include explicitly. ref#281

git-svn-id: 1001b6e0dd469eaa302a741812f7f5d223cf35f7@1724 ff5d1e40-2be0-497f-93bd-dc18237bd3c7

--- cmake_include/nexus_package_details.cmake
+++ cmake_include/nexus_package_details.cmake
@@ -1,17 +1,18 @@

+include(CPack)
 set (CPACK_PACKAGE_NAME "NeXus")
 set (CPACK_PACKAGE_VENDOR "Science and Technology Facilities Council")
 set (CPACK_PACKAGE_VERSION_MAJOR "4")
 set (CPACK_PACKAGE_VERSION_MINOR "2")
 set (CPACK_PACKAGE_VERSION_PATCH "1")
-set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR/cmake_include}/nexus_description.txt")
+set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/cmake_include/nexus_description.txt")
 set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "NeXus - a common format for neutron and X-ray scattering data http://www.nexusformat.org/")
 set (CPACK_PACKAGE_FILE_NAME "nexus-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}-${CPACK_PACKAGE_VERSION_PATCH}")
 set (CPACK_PACKAGE_INSTALL_DIRECTORY "nexus")
 #set (CPACK_PROJECT_CONFIG_FILE)
 set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
 #set (CPACK_RESOURCE_FILE_README)
-set (CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR/cmake_include}/WELCOME")
+set (CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/cmake_include/WELCOME")
 #set (CPACK_MONOLITHIC_INSTALL)
 if(UNIX)
     set (CPACK_GENERATOR ${CPACK_GENERATOR};STGZ;TGZ)


Remove spurious endif() in UseLocale.cmake

--- gpkg/cmake/UseLocale.cmake
+++ gpkg/cmake/UseLocale.cmake
@@ -88,7 +88,6 @@
       }"
       LOCALE_USE_SET_LOCALE
     )
-    endif()

     set( ___LOCALE ${LOCALE_USE_SET_LOCALE} )
     if (${LOCALE_USE_SET_LOCALE})