Use CMake CXX_STANDARD property

Use CMake CXX_STANDARD property

--- CMake/Utilities.cmake
+++ CMake/Utilities.cmake
@@ -1,6 +1,7 @@
 # Useful CMake utility functions
 # Last Updated: 2/8/2016
 # Copyright (c) 2015-16 David Avedissian (git@davedissian.com)
+cmake_minimum_required(VERSION 3.1)

 # Create a vcproj userfile which correctly runs the binary in a specified working directory when debugging
 function(create_vcproj_userfile TARGETNAME)
@@ -59,7 +60,8 @@
 # Enable C++11
 macro(enable_cpp11 TARGET)
     if(UNIX)
-        target_compile_options(${TARGET} PUBLIC -std=c++11)
+        set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD 11)
+        set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD_REQUIRED TRUE)
         util_enable_libcpp(${TARGET})
     endif()
 endmacro()
@@ -67,13 +69,8 @@
 # Enable C++14
 macro(enable_cpp14 TARGET)
     if(UNIX)
-        if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
-            target_compile_options(${TARGET} PUBLIC -std=c++1y)
-        elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
-            target_compile_options(${TARGET} PUBLIC -std=c++1y)
-        else()
-            target_compile_options(${TARGET} PUBLIC -std=c++14)
-        endif()
+        set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD 14)
+        set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD_REQUIRED TRUE)
         util_enable_libcpp(${TARGET})
     endif()
 endmacro()


ConfigureChecks.cmake: Check for poll.h, poll(), pipe() and pipe2().

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -30,6 +30,7 @@
 check_include_files(stdlib.h      LOG4CPLUS_HAVE_STDLIB_H )
 check_include_files(time.h        LOG4CPLUS_HAVE_TIME_H )
 check_include_files(wchar.h       LOG4CPLUS_HAVE_WCHAR_H )
+check_include_files(poll.h        LOG4CPLUS_HAVE_POLL_H )

 check_include_files(inttypes.h    HAVE_INTTYPES_H )
@@ -55,6 +56,9 @@
 check_function_exists(localtime_r   LOG4CPLUS_HAVE_LOCALTIME_R )
 check_function_exists(gettimeofday  LOG4CPLUS_HAVE_GETTIMEOFDAY )
 check_function_exists(getpid        LOG4CPLUS_HAVE_GETPID )
+check_function_exists(poll          LOG4CPLUS_HAVE_POLL )
+check_function_exists(pipe          LOG4CPLUS_HAVE_PIPE )
+check_function_exists(pipe2         LOG4CPLUS_HAVE_PIPE2 )
 check_function_exists(ftime         LOG4CPLUS_HAVE_FTIME )
 check_function_exists(stat          LOG4CPLUS_HAVE_STAT )
 check_function_exists(lstat         LOG4CPLUS_HAVE_LSTAT )


Update exclude from all and module dependencies

--- itk-module.cmake
+++ itk-module.cmake
@@ -2,6 +2,13 @@
 # re-used it for documentation here
 get_filename_component( MY_CURENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
 file( READ "${MY_CURENT_DIR}/README" DOCUMENTATION )
+
+# ITK version 4.5 changed it from EXCLUDE_FROM_ALL to EXCLUDE_FROM_DEFAULT
+set( _EXCLUDE "EXCLUDE_FROM_ALL" )
+if (NOT "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_MINOR_PATCH}" VERSION_LESS "4.5")
+  set( _EXCLUDE "EXCLUDE_FROM_DEFAULT" )
+endif()
+

 # itk_module() defines the module dependencies in ITKStreamingSinc
 # ITKStreamingSinc depends on ITKCommon
@@ -21,9 +28,11 @@
     ITKImageFilterBase
     ITKStatistics
     ITKImageStatistics
+    ITKImageGrid
   TEST_DEPENDS
     ITKTestKernel
     ITKStatistics
+    ITKSmoothing
   DESCRIPTION
     "${DOCUMENTATION}"
   ${_EXCLUDE}


ENH: put vtk libraries and executables in a common directory

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -105,3 +105,9 @@
 IF (UNIX)
   LINK_LIBRARIES(${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS} -lm)
 ENDIF (UNIX)
+
+IF (WIN32)
+  SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/lib/ CACHE PATH "Single output directory for building all libraries.")
+  SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")
+ENDIF (WIN32)
+


Avoid warnings about non-existing include directories with Embarcadero compiler

--- adm/cmake/BuildToolkit.cmake
+++ adm/cmake/BuildToolkit.cmake
@@ -160,7 +160,10 @@
 	endif(OCE_ADD_HEADERS)

 	set(TOOLKIT_HEADER_FILES ${TOOLKIT_HEADER_FILES} ${header_files})
-	set(OCE_${TOOLKIT}_INCLUDE_DIRECTORIES ${OCE_${TOOLKIT}_INCLUDE_DIRECTORIES} ${OCE_SOURCE_DIR}/src/${MODULE} ${OCE_SOURCE_DIR}/drv/${MODULE})
+	set(OCE_${TOOLKIT}_INCLUDE_DIRECTORIES ${OCE_${TOOLKIT}_INCLUDE_DIRECTORIES} ${OCE_SOURCE_DIR}/src/${MODULE})
+	if(IS_DIRECTORY ${OCE_SOURCE_DIR}/drv/${MODULE})
+	    set(OCE_${TOOLKIT}_INCLUDE_DIRECTORIES ${OCE_${TOOLKIT}_INCLUDE_DIRECTORIES} ${OCE_SOURCE_DIR}/drv/${MODULE})
+	endif(IS_DIRECTORY ${OCE_SOURCE_DIR}/drv/${MODULE})

 	if (WIN32)
 		# For compilers under Windows a define must be set per file to correctly set the export macro


SVN_SILENT made messages (.desktop file)

--- plasma/plasma-applet-kscreen.desktop.cmake
+++ plasma/plasma-applet-kscreen.desktop.cmake
@@ -1,5 +1,6 @@
 [Desktop Entry]
 Name=Quick Display Configuration
+Name[bs]=Brza konfiguracija ekrana
 Name[ca]=Configuració ràpida de la pantalla
 Name[cs]=Rychlé nastavení zobrazení
 Name[da]=Hurtig konfiguration af skærme
@@ -28,6 +29,7 @@
 Name[zh_CN]=快捷显示管理
 Name[zh_TW]=快速顯示設定
 Comment=Quick configuration of a new display
+Comment[bs]=Brza konfiguracija novog ekrana
 Comment[ca]=Configuració ràpida d'una nova pantalla
 Comment[cs]=Rychlé nastavení nového zobrazení
 Comment[da]=Hurtig konfiguration af en ny skærm


REFAC: enable tiff and curl in proj, and update to 7.1.0 (compilation error, see proj issue #2073)

--- SuperBuild/CMake/External_proj.cmake
+++ SuperBuild/CMake/External_proj.cmake
@@ -23,23 +23,25 @@
 SETUP_SUPERBUILD(PROJ)

 # declare dependencies
-ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(PROJ SQLITE)
+ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(PROJ SQLITE TIFF CURL)

 ExternalProject_Add(PROJ
   DEPENDS ${PROJ_DEPENDENCIES}
   PREFIX PROJ
-  URL "https://download.osgeo.org/proj/proj-7.0.0.tar.gz"
-  URL_MD5 5b546675935b930a6266449228c82635
+  URL "https://download.osgeo.org/proj/proj-7.1.0.tar.gz"
+  URL_MD5 1da6227c30b683d43f1c6d267224a262
   BINARY_DIR ${PROJ_SB_SRC}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   CMAKE_CACHE_ARGS
   ${SB_CMAKE_CACHE_ARGS}
-  -DBUILD_LIBPROJ_SHARED:BOOL=TRUE
+  -DBUILD_SHARED_LIBS:BOOL=TRUE
   -DBUILD_FRAMEWORKS_AND_BUNDLE:BOOL=FALSE
   -DPROJ_LIB_SUBDIR:STRING=lib
   -DPROJ_INCLUDE_SUBDIR:STRING=include
   -DBUILD_TESTING:BOOL=OFF
+  -DENABLE_TIFF:BOOL=ON
+  -DENABLE_CURL:BOOL=ON
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   LOG_DOWNLOAD 1
   LOG_CONFIGURE 1


BUGsFIX: Slicer Extension Building

BUGsFIX: Slicer Extension Building

--- SuperBuild/External_QtToCppXML.cmake
+++ SuperBuild/External_QtToCppXML.cmake
@@ -41,12 +41,18 @@
   #message(STATUS "${__indent}Adding project ${proj}")
   # Set dependency list

+  set(${proj}_DEPENDENCIES)
+
+  if(NOT DEFINED SlicerExecutionModel_DIR)
+    set(${proj}_DEPENDENCIES ${${proj}_DEPENDENCIES} SlicerExecutionModel )
+  endif()
+
   IF(Qt4_SUPPORT)
     set(QT_VERSION 4)
-    set(${proj}_DEPENDENCIES SlicerExecutionModel Qt4 )
+    set(${proj}_DEPENDENCIES ${${proj}_DEPENDENCIES} Qt4 )
   ELSE()
     set(QT_VERSION 5)
-    set(${proj}_DEPENDENCIES SlicerExecutionModel Qt5 )
+    set(${proj}_DEPENDENCIES ${${proj}_DEPENDENCIES} Qt5 )
   ENDIF()

   # Include dependent projects if any


cmake: fix wrong variable

cmake: fix wrong variable

We should use build system name instead of host system name.

--- config.h.cmake
+++ config.h.cmake
@@ -3,8 +3,8 @@
 /* general constants */
 #define CONFIGURE_OPTIONS    "${CONFIGURE_OPTIONS}"

-#define HOST_CPU             "${CMAKE_HOST_SYSTEM_PROCESSOR}"
-#define HOST_OS              "${CMAKE_HOST_SYSTEM_NAME}"
+#define HOST_CPU             "${CMAKE_SYSTEM_PROCESSOR}"
+#define HOST_OS              "${CMAKE_SYSTEM_NAME}"

 #define VERSION              "${VERSION}"
 #define PACKAGE              "${PROJECT_NAME}"


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


Fixed 64-bit nvidia library paths on Windows

--- CMake/FindOpenCL.cmake
+++ CMake/FindOpenCL.cmake
@@ -85,7 +85,7 @@
         if(SIZEOF_VOID_P EQUAL 4)
           set(OPENCL_LIBRARY_ROOT ${OPENCL_ROOT}/lib/Win32)
         else()
-          set(OPENCL_LIBRARY_ROOT ${OPENCL_ROOT}/lib/Win64)
+          set(OPENCL_LIBRARY_ROOT ${OPENCL_ROOT}/lib/x64)
         endif()
       else()
         if(SIZEOF_VOID_P EQUAL 4)


fixed: missing D suffix on windows

fixed: missing D suffix on windows

git-svn-id: 6c7e10cdde2c115f53707ba8ec4efe535f92d362@2045 4683daeb-ad0f-0410-a623-93161e962ae5

--- CMake/FindOpenSG.cmake
+++ CMake/FindOpenSG.cmake
@@ -277,13 +277,13 @@
             PATH_SUFFIXES "release" "relwithdbg" "opt"
         )

-        FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG
-            NAMES  ${COMPONENT}
-            HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}
-            PATH_SUFFIXES "debug" "dbg"
-        )
-
         IF(WIN32)
+          FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG
+              NAMES  "${COMPONENT}D"
+              HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}
+              PATH_SUFFIXES "debug" "dbg"
+          )
+
           FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASENOOPT
               NAMES  "${COMPONENT}RN"
               HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}
@@ -294,6 +294,12 @@
               NAMES  "${COMPONENT}DO"
               HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}
               PATH_SUFFIXES "debugopt"
+          )
+        ELSE(WIN32)
+          FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG
+              NAMES  ${COMPONENT}
+              HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}
+              PATH_SUFFIXES "debug" "dbg"
           )
         ENDIF(WIN32)


ENH: Build OTB with OTB_USE_EXTERNAL_FLTK=ON by default

--- CMake/ImportFLTK.cmake
+++ CMake/ImportFLTK.cmake
@@ -34,7 +34,11 @@
         #-------------------------------
         # FLTK Library
         #-------------------------------
-        OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." OFF)
+
+        # Use an external version of FLTK by default
+        # FLTK is now packaged on most systems
+        # Internal FLTK version is 1.1 and there is some issue Monteverdi
+        OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." ON)
         MARK_AS_ADVANCED(OTB_USE_EXTERNAL_FLTK)

         IF(OTB_USE_EXTERNAL_FLTK)


DOC: update warning messages in ImportGDAL

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -174,10 +174,11 @@
             CHECK_GDALOPEN_SYMBOL
             )
   IF(NOT CHECK_GDALOPEN_SYMBOL)
-    MESSAGE(WARNING "CHECK_GDALOPEN_SYMBOL test failed : your platform exhibits a gdal/geotiff conflict. "
-    "Opening a TIF file may generate a crash. This is most probably because the gdal library you configured "
-    "embeds its own libgeotiff and is compiled with --with-hide-internal-symbols=yes.\n"
-    "You might consider building GDAL yourself without using --with-hide-internal-symbols" )
+    MESSAGE(WARNING "CHECK_GDALOPEN_SYMBOL test failed : your platform exhibits a gdal/geotiff conflict.\n"
+    "Opening a TIF file may generate a crash. This is most probably because the gdal library you configured\n"
+    "embeds its own version of libgeotiff and is ABI incompatible with the system libgeotiff\n"
+    "You might consider building GDAL yourself without using --with-hide-internal-symbols\n"
+    "and pointing GEOTIFF_INCLUDE_DIRS to the geotiff headers included in gdal sources" )
   ENDIF(NOT CHECK_GDALOPEN_SYMBOL)

   # This test is known to fail with the Ubuntu gdal package
@@ -190,9 +191,10 @@
             )
   IF(NOT CHECK_XTIFFOPEN_SYMBOL)
     MESSAGE(WARNING "CHECK_XTIFFOPEN_SYMBOL test failed : your platform exhibits a gdal/geotiff conflict. "
-    "Opening a TIF file may generate a crash. This is most probably because the gdal library you configured "
-    "embeds its own libgeotiff and is compiled with --with-hide-internal-symbols=yes.\n"
-    "You might consider building GDAL yourself without using --with-hide-internal-symbols" )
+    "Opening a TIF file may generate a crash. This is most probably because the gdal library you configured"
+    "embeds its own version of libgeotiff and is ABI incompatible with the system libgeotiff\n"
+    "You might consider building GDAL yourself without using --with-hide-internal-symbols"
+    "and pointing GEOTIFF_INCLUDE_DIRS to the geotiff headers included in gdal sources" )
   ENDIF(NOT CHECK_XTIFFOPEN_SYMBOL)

   # This test is known to fail with gdal build with some versions of hdf library


ENH: Bump the ITK CMake version to 5.1.0

--- CMake/itkVersion.cmake
+++ CMake/itkVersion.cmake
@@ -1,4 +1,4 @@
 # ITK version number components.
 set(ITK_VERSION_MAJOR "5")
-set(ITK_VERSION_MINOR "0")
+set(ITK_VERSION_MINOR "1")
 set(ITK_VERSION_PATCH "0")


search in env var CUDA_NPP_ROOT

search in env var CUDA_NPP_ROOT

--- modules/gpu/FindNPP.cmake
+++ modules/gpu/FindNPP.cmake
@@ -55,12 +55,13 @@
 	endif()
 endif(${CMAKE_SIZEOF_VOID_P} EQUAL 4)

-if(NOT CUDA_NPP_LIBRARY_ROOT_DIR)
-	find_path(CUDA_NPP_LIBRARY_ROOT_DIR common/npp/include/npp.h DOC "NPP root directory." NO_DEFAULT_PATH)
+if(NOT CUDA_NPP_LIBRARY_ROOT_DIR)
+	set(CUDA_NPP_LIBRARY_ROOT_DIR $ENV{CUDA_NPP_ROOT} CACHE PATH "NPP root directory." FORCE)
+	find_path(CUDA_NPP_LIBRARY_ROOT_DIR "common/npp/include/npp.h" PATHS ENV CUDA_NPP_ROOT DOC "NPP root directory.")
 endif (NOT CUDA_NPP_LIBRARY_ROOT_DIR)

 # Search includes in our own paths.
-find_path(CUDA_NPP_INCLUDES npp.h PATHS "${CUDA_NPP_LIBRARY_ROOT_DIR}/common/npp/include" NO_DEFAULT_PATH)
+find_path(CUDA_NPP_INCLUDES npp.h PATHS "${CUDA_NPP_LIBRARY_ROOT_DIR}/common/npp/include")
 # Search default search paths, after we search our own set of paths.
 find_path(CUDA_NPP_INCLUDES device_functions.h)
 mark_as_advanced(CUDA_NPP_INCLUDES)
@@ -69,8 +70,7 @@
 find_library(CUDA_NPP_LIBRARIES
 	NAMES npp${NPP_SUFFIX} libnpp${NPP_SUFFIX}
 	PATHS "${CUDA_NPP_LIBRARY_ROOT_DIR}/common/lib"
-	DOC "NPP library"
-	NO_DEFAULT_PATH
+	DOC "NPP library"
 	)

 # Search default search paths, after we search our own set of paths.


Tests: Fix FindCheck on MinGW

Tests: Fix FindCheck on MinGW

--- tools/cmake/FindCheck.cmake
+++ tools/cmake/FindCheck.cmake
@@ -16,7 +16,7 @@
 find_path(CHECK_INCLUDE_DIRS check.h "${CHECK_PREFIX_INC}")
 find_library(CHECK_LIBRARY check HINTS "${CHECK_PREFIX_LIB}")

-if(MSVC)
+if(WIN32)

     find_library(COMPAT_LIBRARY compat HINTS "${CHECK_PREFIX_LIB}")
     set(CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}")
@@ -65,7 +65,7 @@
                     MESSAGE( STATUS "Could NOT find CHECK" )
                 ENDIF ( NOT Check_FIND_QUIETLY )
             ENDIF ( Check_FIND_REQUIRED )
-        ENDIF ( CHECK_INCLUDE_DIRS AND CHECK_LIBRARIES )
+        ENDIF ( CHECK_INCLUDE_DIRS AND CHECK_LIBRARY )
     ENDIF( NOT CHECK_FOUND AND NOT PKG_CONFIG_FOUND )

     # Hide advanced variables from CMake GUIs


Undo manual variable alignment

Undo manual variable alignment

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -99,8 +99,11 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(
   CAF
-  FOUND_VAR CAF_FOUND
-  REQUIRED_VARS CAF_LIBRARIES CAF_INCLUDE_DIRS
+  FOUND_VAR
+  CAF_FOUND
+  REQUIRED_VARS
+  CAF_LIBRARIES
+  CAF_INCLUDE_DIRS
   HANDLE_COMPONENTS)

 # final step to tell CMake we're done


Use "cegui_find_package_handle_standard_args" to find OIS so that debug libraries are taken into account.

--- cmake/FindOIS.cmake
+++ cmake/FindOIS.cmake
@@ -33,8 +33,7 @@

 mark_as_advanced(OIS_H_PATH OIS_LIB OIS_LIB_DBG)

-find_package_handle_standard_args(OIS DEFAULT_MSG OIS_LIB OIS_H_PATH)
-
+cegui_find_package_handle_standard_args(OIS OIS_LIB OIS_H_PATH)

 # set up output vars
 if (OIS_FOUND)


minheadless: FileAttributesPlugin needs to be internal on MacOS

--- cmake/Plugins.cmake
+++ cmake/Plugins.cmake
@@ -79,6 +79,7 @@

 # Basic internal plugins
 add_vm_plugin_auto(FilePlugin INTERNAL)
+add_vm_plugin_auto(FileAttributesPlugin INTERNAL)
 add_vm_plugin_auto(LargeIntegers INTERNAL)
 add_vm_plugin_auto(LocalePlugin INTERNAL)
 add_vm_plugin_auto(MiscPrimitivePlugin INTERNAL)
@@ -99,7 +100,6 @@

 # Basic external plugins
 add_vm_plugin_auto(SurfacePlugin EXTERNAL)
-add_vm_plugin_auto(FileAttributesPlugin EXTERNAL)

 # Drop plugin
 add_vm_plugin_sources(DropPlugin INTERNAL


Those shouldnt be there

Those shouldnt be there

--- cmake/add_pch.cmake
+++ cmake/add_pch.cmake
@@ -16,10 +16,8 @@
   FOREACH(arg ${ARGN})
     IF(arg STREQUAL FORCEINCLUDE)
       SET(FORCEINCLUDE ON)
-	  message(">>>>>FORCEINCLUDE TURNED ON!")
     ELSE(arg STREQUAL FORCEINCLUDE)
       SET(FORCEINCLUDE OFF)
-	  message(">>>>>FORCEINCLUDE TURNED OFF!")
     ENDIF(arg STREQUAL FORCEINCLUDE)
   ENDFOREACH(arg)

@@ -37,7 +35,6 @@
 		  SET(PCH_COMPILE_FLAGS "${PCH_COMPILE_FLAGS} /Yu${_input}")
 		  IF(FORCEINCLUDE)
 			SET(PCH_COMPILE_FLAGS "${PCH_COMPILE_FLAGS} /FI${_input}")
-			message(">>>>>USING /FI OPTION!")
 		  ENDIF(FORCEINCLUDE)
 		ENDIF(_sourceWe STREQUAL ${_inputWe})
 		SET_SOURCE_FILES_PROPERTIES(${_source} PROPERTIES COMPILE_FLAGS "${PCH_COMPILE_FLAGS}")


Fix set FBT

Fix set FBT

--- cmake/cluster.cmake
+++ cmake/cluster.cmake
@@ -22,7 +22,6 @@
     set(ALLREDUCE.RECURSIVE.DOUBLING ON)
     set(RECURSIVE.DOUBLING.BLOCKING 4 CACHE STRING "Set Recursive Doubling blocking factor.")
     set(RECURSIVE.DOUBLING.FBT ON CACHE BOOL "Enable optimization for 1D FBT with four blocks.")
-    set(RECURSIVE.DOUBLING.FBT ON)
     if(QPACE2.WARN.TOPOLOGY)
         add_definitions(-DQPACE2_WARN_TOPOLOGY)
     endif()


Also install bench script

Also install bench script

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

 INCLUDE(GNUInstallDirs)

+SET(CMAKE_INSTALL_SCRIPTDIR scripts)
 IF (OSPRAY_ZIP_MODE)
   # in tgz / zip let's have relative RPath
   SET(CMAKE_SKIP_INSTALL_RPATH OFF)
@@ -40,6 +41,7 @@
   IF (NOT WIN32)
     # for RPMs install docu in versioned folder
     SET(CMAKE_INSTALL_DOCDIR ${CMAKE_INSTALL_DOCDIR}-${OSPRAY_VERSION})
+    SET(CMAKE_INSTALL_SCRIPTDIR ${CMAKE_INSTALL_DATAROOTDIR}/OSPRay-${OSPRAY_VERSION}/scripts)
   ENDIF()
 ENDIF()

@@ -61,6 +63,12 @@
 INSTALL(FILES ${PROJECT_SOURCE_DIR}/CHANGELOG.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
 INSTALL(FILES ${PROJECT_SOURCE_DIR}/README.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
 INSTALL(FILES ${PROJECT_SOURCE_DIR}/readme.pdf DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib OPTIONAL)
+
+##############################################################
+# install documentation
+##############################################################
+
+INSTALL(PROGRAMS ${PROJECT_SOURCE_DIR}/scripts/bench/run_benchmark.py DESTINATION ${CMAKE_INSTALL_SCRIPTDIR} COMPONENT apps)

 ##############################################################
 # CPack specific stuff


erthink-cmake: enable CMP0054, CMP0068, CMP0069, CMP0075 for testing.cmake.

--- cmake/testing.cmake
+++ cmake/testing.cmake
@@ -17,6 +17,15 @@
 include(CTest)
 if(BUILD_TESTING)
   cmake_policy(PUSH)
+
+  cmake_policy(SET CMP0054 NEW)
+  if(NOT CMAKE_VERSION VERSION_LESS 3.9)
+    cmake_policy(SET CMP0068 NEW)
+    cmake_policy(SET CMP0069 NEW)
+  endif()
+  if(NOT CMAKE_VERSION VERSION_LESS 3.12)
+    cmake_policy(SET CMP0075 NEW)
+  endif()

   # Expected GTest was already found and/or pointed via ${gtest_root},
   # otherwise will search at ${gtest_paths} locations, if defined or default ones.


update test list

update test list

--- eugenics/test_list.cmake
+++ eugenics/test_list.cmake
@@ -1,9 +1,11 @@
 # Unit Tests
 add_executable("test-getopts" src/test_getopts.cc ${SRCS})
 add_executable("test-circuit" src/test_circuit.cc ${SRCS})
+add_executable("test-jv_algorithm" src/test_jv_algorithm.cc ${SRCS})
 # add_executable("test-algorithm" src/test_algorithm.cc ${SRCS})

 # linking
 target_link_libraries("test-getopts" gtest gtest_main)
 target_link_libraries("test-circuit" gtest gtest_main)
+target_link_libraries("test-jv_algorithm" gtest gtest_main)
 # target_link_libraries("test-algorithm" gtest gtest_main)


Bugfix

Bugfix

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@27051 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/checks/check_for_compiler_bugs.cmake
+++ deal.II/cmake/checks/check_for_compiler_bugs.cmake
@@ -128,12 +128,13 @@

 #
-# Disable shared libraries on cygwin targets for the moment. Shared
-# libraries on Windows are a bit buggy atm.
+# Disable shared libraries on CYGWIN and Windows targets for the moment.
+# Our support for shared libraries on Windows is a bit buggy atm..
 #
 # - Matthias Maier, 2012
 #
-IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+IF( CMAKE_SYSTEM_NAME MATCHES "CYGWIN" OR
+    CMAKE_SYSTEM_NAME MATCHES "Windows" )
   MESSAGE(WARNING "\n"
     "BUILD_SHARED_LIBS forced to OFF\n\n"
     )


comment how to use a custom python version

--- README.cmake
+++ README.cmake
@@ -37,3 +37,6 @@
 # specify a different compiler (from CMake FAQ http://www.cmake.org/Wiki/CMake_FAQ "How do I use a different compiler?")
 # You might have to delete the build directory or clear the cmake cache otherwise for this to work
 CC=/path/to/gcc CXX=/path/to/g++ cmake ..
+
+# use a custom python installation for python bindings (here 2.7.1 installed in path/to/python
+cmake -DPYTHON_INCLUDE_DIR=/path/to/python/include/python2.7 -DPYTHON_LIBRARY=path/to/python/python-2.7.1/lib/python2.7 ..


Recursively search for Qt modules, with module suffix

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -134,8 +134,8 @@
     endif()

     set(GLOBBED_QT_PLUGINS )
-    if(CMAKE_SHARED_MODULE_SUFFIX AND NOT CMAKE_SHARED_MODULE_SUFFIX STREQUAL CMAKE_SHARED_LIBRARY_SUFFIX)
-      file(GLOB_RECURSE GLOBBED_QT_PLUGINS \"\${CMAKE_INSTALL_PREFIX}/${${_target_location}_qt_plugins_install_dir}/plugins/*${CMAKE_SHARED_MODULE_SUFFIX}\")
+    if(NOT \"${CMAKE_SHARED_MODULE_SUFFIX}\" STREQUAL \"\" AND NOT \"${CMAKE_SHARED_MODULE_SUFFIX}\" STREQUAL \"${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+      file(GLOB_RECURSE GLOBBED_QT_PLUGINS \"\${CMAKE_INSTALL_PREFIX}/${${_target_location}_qt_plugins_install_dir}/plugins/*/*${CMAKE_SHARED_MODULE_SUFFIX}\")
     endif()

     set(PLUGINS )


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

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

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -20,6 +20,7 @@
 Name[hu]=Azonnali üzenetküldés
 Name[ia]=Messageria instantanee
 Name[it]=Messaggistica istantanea
+Name[ka]=ჩატი
 Name[kk]=Лезде хабарласу
 Name[ko]=인스턴트 메시지
 Name[lt]=Tikralaikiai pokalbiai
@@ -65,6 +66,7 @@
 Comment[hu]=Csevegés indítása az azonnali üzenetküldési partnerei valamelyikével vagy az azonnali üzenetküldési állapotának módosítása
 Comment[ia]=Initia conversation con qualcunque de tu contactos de IM o modifica tu status de IM
 Comment[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI
+Comment[ka]=დაელაპარაკეთ თქვენს ნებისმიერ კონტაქტს ან შეცვალეთ თქვენი სტატუსი
 Comment[kk]=Кез-келген лезде хабарласу контактыңызбен чат-әңгімені бастау не күй-жайын өзгерту
 Comment[ko]=IM 대화 상대와 대화를 시작하거나 상태 바꾸기
 Comment[lt]=Pradėti pokalbį su bet kuriuo TP kontaktu arba pakeiskite savo TP būseną


Fix for CMake versions < 2.8.3

Fix for CMake versions < 2.8.3

--- Common.cmake
+++ Common.cmake
@@ -3,12 +3,13 @@
 enable_testing()
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 list(APPEND CMAKE_PREFIX_PATH ${SystemDrive}:/cygwin/bin)
+
+if(CMAKE_VERSION VERSION_LESS 2.8.3)
+  get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) # WAR bug
+  list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/2.8.3)
+endif()
 if(CMAKE_VERSION VERSION_LESS 2.8)
-  list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/2.8)
-endif()
-if(CMAKE_VERSION VERSION_LESS 2.8.3)
-  list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/2.8.3)
-  get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) # WAR bug
+  list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/2.8)
 endif()

 if(NOT CMAKE_BUILD_TYPE)
@@ -116,7 +117,7 @@
     set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W3 /Zm500 /EHsc /GR /WX")
   endif()
 elseif(EXISTS ${CMAKE_SOURCE_DIR}/CMake/${CMAKE_PROJECT_NAME}.in.spec)
-  configure_file(${CMAKE_SOURCE_DIR}/CMake/${CMAKE_PROJECT_NAME}.in.spec
+  configure_file(${CMAKE_SOURCE_DIR}/CMake/${CMAKE_PROJECT_NAME}.in.spec
     ${CMAKE_SOURCE_DIR}/CMake/${CMAKE_PROJECT_NAME}.spec @ONLY)
 endif()


[cmake] fixup logger define

[cmake] fixup logger define

--- config.h.cmake
+++ config.h.cmake
@@ -39,13 +39,14 @@

 #ifdef MS_TIMED_LOGGER
     #define MS_LOG         Dune::Stuff::Common::TimedLogger().get("msfem")
+    #define MS_LOG_ERROR   MS_LOG.warn()
 #else
     #define MS_LOG         Dune::Stuff::Common::Logger()
+    #define MS_LOG_ERROR   MS_LOG.error()
 #endif

 #define MS_LOG_INFO    MS_LOG.info()
 #define MS_LOG_DEBUG   MS_LOG.debug()
-#define MS_LOG_ERROR   MS_LOG.warn()
 #define MS_LOG_DEVNULL DSC_LOG.devnull()
 #define MS_LOG_INFO_0  \
     (Dune::MPIHelper::getCollectiveCommunication().rank() == 0 ? MS_LOG_INFO  : DSC_LOG.devnull())


refactor definition of CMake CXX flags

refactor definition of CMake CXX flags

--- build_env/cmake/common.cmake
+++ build_env/cmake/common.cmake
@@ -7,15 +7,33 @@
 add_definitions(-DUNICODE)
 add_definitions(-D_UNICODE)

-set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
 if(MSVC)
 	set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
 elseif(CMAKE_COMPILER_IS_GNUCXX)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -pthread")
+	# set required C++11 standard for CMake >= 3.1
+	if(CMAKE_VERSION VERSION_EQUAL "3.1" OR CMAKE_VERSION VERSION_GREATER "3.1")
+		set(CMAKE_CXX_STANDARD 11)
+		set(CMAKE_CXX_STANDARD_REQUIRED ON)
+	# set required C++11 standard for CMake < 3.1
+	else()
+		include(CheckCXXCompilerFlag)
+
+		CHECK_CXX_COMPILER_FLAG("-std=c++11" compilerFlag)
+
+		if(compilerFlag)
+			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+		else()
+			CHECK_CXX_COMPILER_FLAG("-std=c++0x" compilerFlag)
+
+			if(compilerFlag)
+				set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+			else()
+				message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+			endif()
+		endif()
+	endif()
 else()
 	message(FATAL_ERROR "only MSVC and GCC compilers are supported")
 endif()


Fixed precompiled headeds for non-windows systems.

--- OpenCVPCHSupport.cmake
+++ OpenCVPCHSupport.cmake
@@ -68,15 +68,27 @@
 MACRO(_PCH_WRITE_PCHDEP_CXX _targetName _include_file _dephelp)

     SET(${_dephelp} ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch_dephelp.cxx)
-    ADD_CUSTOM_COMMAND(
-      OUTPUT "${${_dephelp}}"
-      COMMAND ${CMAKE_COMMAND} -E echo "#include \\\"${_include_file}\\\"" >  "${${_dephelp}}"
-      COMMAND ${CMAKE_COMMAND} -E echo "int testfunction()"                >> "${${_dephelp}}"
-      COMMAND ${CMAKE_COMMAND} -E echo "{"                                 >> "${${_dephelp}}"
-      COMMAND ${CMAKE_COMMAND} -E echo "    return 0;"                     >> "${${_dephelp}}"
-      COMMAND ${CMAKE_COMMAND} -E echo "}"                                 >> "${${_dephelp}}"
-      DEPENDS "${_include_file}"
-      )
+    IF(CMAKE_HOST_WIN32)
+        ADD_CUSTOM_COMMAND(
+          OUTPUT "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "#include \\\"${_include_file}\\\"" >  "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "int testfunction()"                  >> "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "{"                                 >> "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "    return 0;"                     >> "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "}"                                 >> "${${_dephelp}}"
+          DEPENDS "${_include_file}"
+          )
+    else()
+        ADD_CUSTOM_COMMAND(
+          OUTPUT "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "#include \\\"${_include_file}\\\"" >  "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "int testfunction\\(\\)"            >> "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "{"                                 >> "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "    return 0;"                     >> "${${_dephelp}}"
+          COMMAND ${CMAKE_COMMAND} -E echo "}"                                 >> "${${_dephelp}}"
+          DEPENDS "${_include_file}"
+          )
+    endif()

 ENDMACRO(_PCH_WRITE_PCHDEP_CXX )


Remove GMM meta example if LAPACK is not available

--- cmake/FindMetaExamples.cmake
+++ cmake/FindMetaExamples.cmake
@@ -14,7 +14,10 @@
 	ENDIF()

 	IF(NOT HAVE_LAPACK)
-		LIST(REMOVE_ITEM META_EXAMPLE_LISTINGS ${CMAKE_SOURCE_DIR}/examples/meta/src/regression/linear_ridge_regression.sg)
+		LIST(REMOVE_ITEM META_EXAMPLE_LISTINGS
+			${CMAKE_SOURCE_DIR}/examples/meta/src/regression/linear_ridge_regression.sg
+			${CMAKE_SOURCE_DIR}/examples/meta/src/clustering/gmm.sg
+			)
 	ENDIF()

 	IF(NOT USE_SVMLIGHT)


Refactored in preparation for RViz plugins.

--- catkin.cmake
+++ catkin.cmake
@@ -25,7 +25,9 @@

 catkin_package(
     INCLUDE_DIRS include
-    LIBRARIES ${PROJECT_NAME}
+    LIBRARIES
+        ${PROJECT_NAME}
+        ${PROJECT_NAME}_markers
     CATKIN_DEPENDS
         geometry_msgs
         interactive_markers
@@ -39,11 +41,8 @@
 include_directories(include/${PROJECT_NAME})
 include(DetectCXX11Flags)

-# Helper library that implements core functionality. This includes the OpenRAVE
-# viewer plugins.
-add_library(${PROJECT_NAME} SHARED
-    src/or_interactivemarker.cpp
-    #src/or_rviz.cpp
+# Helper library that implements core functionality.
+add_library(${PROJECT_NAME}_markers SHARED
     src/markers/JointMarker.cpp
     src/markers/KinBodyJointMarker.cpp
     src/markers/KinBodyLinkMarker.cpp
@@ -52,9 +51,36 @@
     src/markers/ManipulatorMarker.cpp
     src/util/or_conversions.cpp
 )
-target_link_libraries(${PROJECT_NAME}
+target_link_libraries(${PROJECT_NAME}_markers
     ${catkin_LIBRARIES}
 )
+
+# OpenRAVE viewer classes.
+qt4_wrap_cpp(MOC_FILES
+    include/${PROJECT_NAME}/or_rviz.h
+    src/rviz/EnvironmentDisplay.h
+    src/rviz/KinBodyVisual.h
+)
+
+add_library(${PROJECT_NAME} SHARED
+    src/or_interactivemarker.cpp
+    src/or_rviz.cpp
+    ${MOC_FILES}
+)
+target_link_libraries(${PROJECT_NAME}
+    ${PROJECT_NAME}_markers
+    ${catkin_LIBRARIES}
+    ${OGRE_LIBRARIES}
+    ${QT_LIBRARIES}
+)
+
+# RViz viewer plugins.
+add_library(${PROJECT_NAME}_rviz SHARED
+    src/rviz/EnvironmentDisplay.cpp
+    src/rviz/KinBodyVisual.cpp
+    src/rviz/LinkVisual.cpp
+)
+message(STATUS "MOC Files: ${MOC_FILES}")

 # Stub library that registers the plugins with OpenRAVE.
 openrave_plugin(${PROJECT_NAME}_plugin


CMake: if USE_EXTERNAL_USB, build libusb even if we have one

--- CMake/libusb_config.cmake
+++ CMake/libusb_config.cmake
@@ -3,7 +3,7 @@
     find_path(LIBUSB_INC libusb.h HINTS PATH_SUFFIXES libusb-1.0)
     include(FindPackageHandleStandardArgs)
     find_package_handle_standard_args(usb "libusb not found; using internal version" LIBUSB_LIB LIBUSB_INC)
-    if (USB_FOUND)
+    if (USB_FOUND AND NOT USE_EXTERNAL_USB)
         add_library(usb INTERFACE)
         target_include_directories(usb INTERFACE ${LIBUSB_INC})
         target_link_libraries(usb INTERFACE ${LIBUSB_LIB})


Use GCC 11 on Darwin.

Use GCC 11 on Darwin.

--- default_build_settings.cmake
+++ default_build_settings.cmake
@@ -302,8 +302,8 @@
   unset(DEFAULT_CMAKE_CXX_COMPILER)
   if(NOT DEFINED VESPA_COMPILER_VARIANT OR VESPA_COMPILER_VARIANT STREQUAL "gcc")
     if(APPLE)
-      set(DEFAULT_CMAKE_C_COMPILER "/usr/local/bin/gcc-10")
-      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/bin/g++-10")
+      set(DEFAULT_CMAKE_C_COMPILER "/usr/local/bin/gcc-11")
+      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/bin/g++-11")
     elseif(VESPA_OS_DISTRO_COMBINED STREQUAL "amzn 2")
       set(DEFAULT_CMAKE_C_COMPILER "/usr/bin/gcc10-gcc")
       set(DEFAULT_CMAKE_CXX_COMPILER "/usr/bin/gcc10-g++")


Change paraview subproject url from git to https for auth issues

--- Superbuild/versions.cmake
+++ Superbuild/versions.cmake
@@ -38,7 +38,7 @@

 set(PARAVIEW_VERSION 5.1)
 add_revision(paraview
-  GIT_REPOSITORY git@gitlab.kitware.com:bjacquet/paraview.git
+  GIT_REPOSITORY https://gitlab.kitware.com/bjacquet/paraview.git
   GIT_TAG origin/veloview)

 add_revision(veloview


Dependencies: fix relwithdebinfo bullet build on msvc

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -180,6 +180,7 @@
         -DBUILD_EGL=OFF
         -DBUILD_ENET=OFF
         -DBUILD_UNIT_TESTS=OFF
+        -DCMAKE_RELWITHDEBINFO_POSTFIX= # fixes FindBullet on MSVC
         -DBUILD_CLSOCKET=OFF
         ${PROJECT_BINARY_DIR}/bullet3-3.24
         WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/bullet3-3.24)


Fix configuration of ptrace on FreeBSD.

Fix configuration of ptrace on FreeBSD.

This closes https://github.com/dotnet/coreclr/issues/625

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -844,6 +844,9 @@
 }" FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL)
 set(CMAKE_REQUIRED_DEFINITIONS)

+set(SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1)
+set(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1)
+
 if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
   set(HAVE_COREFOUNDATION 1)
   set(HAVE__NSGETENVIRON 1)
@@ -854,14 +857,29 @@
   set(PAL_PT_READ_D PT_READ_D)
   set(PAL_PT_WRITE_D PT_WRITE_D)
   set(USE_SIGNALS_FOR_THREAD_SUSPENSION 0)
-  set(SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1)
   set(JA_JP_LOCALE_NAME ja_JP.SJIS)
   set(KO_KR_LOCALE_NAME ko_KR.eucKR)
   set(ZH_TW_LOCALE_NAME zh_TG.BIG5)
-  set(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1)
   set(HAS_FTRUNCATE_LENGTH_ISSUE 1)
   set(UNWIND_CONTEXT_IS_UCONTEXT_T 0)
-else()
+elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+  if(NOT HAVE_LIBUNWIND_H)
+    unset(HAVE_LIBUNWIND_H CACHE)
+    message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8 and libunwind8-dev (or the appropriate packages for your platform)")
+  endif()
+  set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
+  set(PAL_PTRACE "ptrace((cmd), (pid), (caddr_t)(addr), (data))")
+  set(PAL_PT_ATTACH PT_ATTACH)
+  set(PAL_PT_DETACH PT_DETACH)
+  set(PAL_PT_READ_D PT_READ_D)
+  set(PAL_PT_WRITE_D PT_WRITE_D)
+  set(USE_SIGNALS_FOR_THREAD_SUSPENSION 1)
+  set(JA_JP_LOCALE_NAME ja_JP_LOCALE_NOT_FOUND)
+  set(KO_KR_LOCALE_NAME ko_KR_LOCALE_NOT_FOUND)
+  set(ZH_TW_LOCALE_NAME zh_TW_LOCALE_NOT_FOUND)
+  set(HAS_FTRUNCATE_LENGTH_ISSUE 0)
+  set(UNWIND_CONTEXT_IS_UCONTEXT_T 1)
+else() # Anything else is Linux
   if(NOT HAVE_LIBUNWIND_H)
     unset(HAVE_LIBUNWIND_H CACHE)
     message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8 and libunwind8-dev (or the appropriate packages for your platform)")
@@ -873,11 +891,9 @@
   set(PAL_PT_READ_D PTRACE_PEEKDATA)
   set(PAL_PT_WRITE_D PTRACE_POKEDATA)
   set(USE_SIGNALS_FOR_THREAD_SUSPENSION 1)
-  set(SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1)
   set(JA_JP_LOCALE_NAME ja_JP_LOCALE_NOT_FOUND)
   set(KO_KR_LOCALE_NAME ko_KR_LOCALE_NOT_FOUND)
   set(ZH_TW_LOCALE_NAME zh_TW_LOCALE_NOT_FOUND)
-  set(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1)
   set(HAS_FTRUNCATE_LENGTH_ISSUE 0)
   set(UNWIND_CONTEXT_IS_UCONTEXT_T 1)
 endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)


revision.cmake custom build warning fixed

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

--- modules/revision.cmake
+++ modules/revision.cmake
@@ -53,10 +53,11 @@
   set(xpRevision "Unknown-revision")
   message(AUTHOR_WARNING "Not a git repository? Using revision: ${xpRevision}.")
 endif()
+set(revision_txt ${CMAKE_BINARY_DIR}/revision.txt)
 # write a txt file with only the revision, so other cmake can get it:
 #  file(READ ${CMAKE_BINARY_DIR}/revision.txt revNum)
 #  string(STRIP ${revNum} revNum)
-file(WRITE ${CMAKE_BINARY_DIR}/revision.txt
+file(WRITE ${revision_txt}
   "${xpRevision}\n"
   )
 # write a file with the SCM_REV_NUM define
@@ -71,7 +72,7 @@
 ################################################################################
 # do the following at cmake-time so the Revision_hpp target exists at build-time
 if(NOT TARGET Revision_hpp AND DEFINED CMAKE_SYSTEM_NAME)
-  add_custom_command(OUTPUT revision_cmake
+  add_custom_command(OUTPUT ${revision_txt}
     COMMAND ${CMAKE_COMMAND}
       -DxpSourceDir:FILEPATH="${xpSourceDir}"
       -DxpRelBranch:STRING="${xpRelBranch}"
@@ -81,7 +82,7 @@
     )
   add_custom_target(Revision_hpp
     SOURCES ${CMAKE_CURRENT_LIST_FILE}
-    DEPENDS revision_cmake
+    DEPENDS ${revision_txt}
     )
   set_property(TARGET Revision_hpp PROPERTY FOLDER CMakeTargets)
 endif()


Update libtbag cmake library path.

Update libtbag cmake library path.

--- cmake/TbagFindPackage/FindTbag.cmake
+++ cmake/TbagFindPackage/FindTbag.cmake
@@ -17,7 +17,9 @@

 if (IS_DIRECTORY "$ENV{TBAG_HOME}")
     set (Tbag_ROOT_INCLUDE_PATHS "$ENV{TBAG_HOME}")
-    set (Tbag_ROOT_LIBRARY_PATHS "$ENV{TBAG_HOME}/build")
+    set (Tbag_ROOT_LIBRARY_PATHS "$ENV{TBAG_HOME}/build"
+                                 "$ENV{TBAG_HOME}/cmake-build-debug"
+                                 "$ENV{TBAG_HOME}/cmake-build-release")
 endif ()

 include (TbagSimpleFindLibrary)


Special treatment of RPATH for MacOSX

Special treatment of RPATH for MacOSX

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -230,7 +230,6 @@
   set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) # install LIBDIR
   set(CMAKE_SKIP_INSTALL_RPATH FALSE)          # don't skip the full RPATH for the install tree
 elseif(APPLE)
-  set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
   set(CMAKE_INSTALL_NAME_DIR "@rpath")
   set(CMAKE_INSTALL_RPATH "@loader_path/../lib")    # self relative LIBDIR
   set(CMAKE_SKIP_INSTALL_RPATH FALSE)          # don't skip the full RPATH for the install tree


Change the default for alien option

Change the default for alien option

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -62,7 +62,7 @@

 ROOT_BUILD_OPTION(afdsmgrd OFF "Dataset manager for PROOF-based analysis facilities")
 ROOT_BUILD_OPTION(afs OFF "AFS support, requires AFS libs and objects")
-ROOT_BUILD_OPTION(alien ON "AliEn support, requires libgapiUI from ALICE")
+ROOT_BUILD_OPTION(alien OFF "AliEn support, requires libgapiUI from ALICE")
 ROOT_BUILD_OPTION(asimage ON "Image processing support, requires libAfterImage")
 ROOT_BUILD_OPTION(astiff ON "Include tiff support in image processing")
 ROOT_BUILD_OPTION(bonjour ON "Bonjour support, requires libdns_sd and/or Avahi")


[cxxmodules] Make C++ modules default on OSX for c++11.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -306,7 +306,9 @@
   set(xrootd_defvalue OFF)
 elseif(APPLE)
   set(cocoa_defvalue ON)
-  set(runtime_cxxmodules_defvalue OFF)
+  if (CMAKE_CXX_STANDARD GREATER 11)
+    set(runtime_cxxmodules_defvalue OFF)
+  endif()
   set(x11_defvalue OFF)
 endif()


Updated LLVM dependency.

Updated LLVM dependency.

--- cmake/third_party/llvm-project.cmake
+++ cmake/third_party/llvm-project.cmake
@@ -37,8 +37,8 @@
   message(STATUS "Fetching LLVM")
   FetchContent_Declare(
     llvm-project
-    URL https://github.com/plaidml/llvm-project/archive/c64378c1ec6c0325ee1fc1abac89884657738657.tar.gz
-    URL_HASH SHA256=583f481050872e1ce8f90b101f3e10ec0fdc6b16dbb9d9ede8b68aaa891c4c83
+    URL https://github.com/plaidml/llvm-project/archive/14732dd95a9eff28d4afbbb2a52083c9773fa350.tar.gz
+    URL_HASH SHA256=6caf34fbb54d77b21706fa5ccfac6bf4d27be6bc5208aba6f896bb69b7f5aa42
   )
   # Check if population has already been performed
   FetchContent_GetProperties(llvm-project)


Use ITK compiled with Intel

Use ITK compiled with Intel

--- shiitake_suse_intel.cmake
+++ shiitake_suse_intel.cmake
@@ -4,7 +4,7 @@
 set(CTEST_BUILD_CONFIGURATION Release)
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 set(dashboard_binary_name "RTK_lin64_intel")
-set(ENV{ITK_DIR} "/home/srit/src/itk/lin64")
+set(ENV{ITK_DIR} "/home/srit/src/itk/lin64-intel")

 # Set intel compiler
 set(ENV{CC}  /opt/intel/bin/icc)   # C compiler


PS-7622: Improve prepend_cflags_if_supported cmake macro

https://jira.percona.com/browse/PS-7622

Compilation on some platforms fails because of unsupported
no-suggest-override flag.
Improve prepend_cflags_if_supported macro to remove unsupported
flag from CMAKE_C_FLAGS or CMAKE_CXX_FLAGS in case it is present
there already.
Rename the macro to prepend_cflags_if_supported_remove_unsupported
to clearly show its purpose.

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -86,8 +86,9 @@
   CMAKE_POP_CHECK_STATE()
 ENDMACRO()

-## prepends a compiler flag if the compiler supports it
-MACRO (prepend_cflags_if_supported)
+## prepends a compiler flag if the compiler supports it or removes it in case
+## flag isn't supported and already set somewhere else
+MACRO (prepend_cflags_if_supported_remove_unsupported)
   FOREACH (flag ${ARGN})
     # Create a result variable per flag to avoid reusing the same cached result
     STRING(REGEX REPLACE "[-,= +]" "_" FLAG2 ${flag})
@@ -96,15 +97,19 @@
     TOKUDB_CHECK_C_COMPILER_FLAG(${flag} ${VAR_RES})
     IF(${VAR_RES})
       SET (CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}")
+    ELSEIF(CMAKE_C_FLAGS MATCHES ${flag})
+      STRING(REGEX REPLACE "${flag}( |$)" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
     ENDIF()

     SET(VAR_RES "CXX_RESULT_${FLAG2}")
     TOKUDB_CHECK_CXX_COMPILER_FLAG(${flag} ${VAR_RES})
     IF(${VAR_RES})
       SET (CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}")
+    ELSEIF(CMAKE_CXX_FLAGS MATCHES ${flag})
+      STRING(REGEX REPLACE "${flag}( |$)" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
     ENDIF()
   ENDFOREACH (flag)
-ENDMACRO (prepend_cflags_if_supported)
+ENDMACRO (prepend_cflags_if_supported_remove_unsupported)

 ## adds a linker flag if the compiler supports it
 macro(set_ldflags_if_supported)
@@ -118,8 +123,9 @@
 endmacro(set_ldflags_if_supported)

 ## disable some warnings
-prepend_cflags_if_supported(
+prepend_cflags_if_supported_remove_unsupported(
   -Wno-missing-field-initializers
+  -Wno-suggest-override
   -Wstrict-null-sentinel
   -Winit-self
   -Wswitch
@@ -140,14 +146,14 @@

 ## Clang has stricter POD checks.  So, only enable this warning on our other builds (Linux + GCC)
 if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
-  prepend_cflags_if_supported(
+  prepend_cflags_if_supported_remove_unsupported(
     -Wpacked
     )
 endif ()

 option (PROFILING "Allow profiling and debug" ON)
 if (PROFILING)
-  prepend_cflags_if_supported(
+  prepend_cflags_if_supported_remove_unsupported(
     -fno-omit-frame-pointer
   )
 endif ()
@@ -189,7 +195,7 @@
 endif ()

 ## set warnings
-prepend_cflags_if_supported(
+prepend_cflags_if_supported_remove_unsupported(
   -Wextra
   -Wbad-function-cast
   -Wno-missing-noreturn
@@ -212,7 +218,7 @@

 if (NOT CMAKE_CXX_COMPILER_ID STREQUAL Clang)
   # Disabling -Wcast-align with clang.  TODO: fix casting and re-enable it, someday.
-  prepend_cflags_if_supported(-Wcast-align)
+  prepend_cflags_if_supported_remove_unsupported(-Wcast-align)
 endif ()

 ## always want these


Fix luajit header install

Fix luajit header install

Some headers were missing.

--- external/luajit/luajit.cmake
+++ external/luajit/luajit.cmake
@@ -75,7 +75,7 @@

 install(DIRECTORY ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/${INSTALL_FULLDIR}/lib DESTINATION ${INSTALL_DIR})
 install(DIRECTORY ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/${INSTALL_FULLDIR}/share DESTINATION ${INSTALL_DIR})
-install(FILES ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/src/lua.h ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/src/luaconf.h ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/src/lualib.h DESTINATION ${HAKA_INSTALL_PREFIX}/include)
+install(DIRECTORY ${LUA_INCLUDE_DIR}/ DESTINATION ${INSTALL_DIR}/include)

 set(HAKA_LUAJIT 1)
 set(HAKA_LUA51 1)


Make symlinked heaptrack shell script work properly.

--- heaptrack.sh.cmake
+++ heaptrack.sh.cmake
@@ -106,7 +106,7 @@
 output=$(pwd)/heaptrack.$(basename "$client").$$

 # find preload library and interpreter executable using relative paths
-EXE_PATH=$(readlink -f $(dirname $0))
+EXE_PATH=$(readlink -f $(dirname $(readlink -f $0)))
 LIB_REL_PATH="@LIB_REL_PATH@"
 LIBEXEC_REL_PATH="@LIBEXEC_REL_PATH@"


proper options for linux build

proper options for linux build

--- ice40/family.cmake
+++ ice40/family.cmake
@@ -51,7 +51,7 @@
                 DEPENDS ${DEV_TXT_DB} ${DB_PY}
         )
         add_custom_command(OUTPUT ${DEV_CC_DB}
-                COMMAND bbasm -c ${DEV_CC_BBA_DB} ${DEV_CC_DB}.new
+                COMMAND bbasm --c ${DEV_CC_BBA_DB} ${DEV_CC_DB}.new
                 COMMAND mv ${DEV_CC_DB}.new ${DEV_CC_DB}
                 DEPENDS bbasm ${DEV_CC_BBA_DB}
         )


Adding a CMake ExternalProject to download capnp win32 compiler tools

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -35,7 +35,7 @@
 if (NOT CAPNP_FOUND)
   # Build Cap'n Proto from source.
   if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-    set(CAPNP_DEFINITIONS "-DCAPNP_LITE=1")
+    set(CAPNP_DEFINITIONS "-DCAPNP_LITE=1 -DEXTERNAL_CAPNP=1")
     set(CAPNP_CXX_FLAGS "-m${BITNESS}")
   else()
     set(CAPNP_DEFINITIONS "-DCAPNP_LITE=0")
@@ -44,7 +44,7 @@
   ExternalProject_Add(
     CapnProto
     GIT_REPOSITORY https://github.com/sandstorm-io/capnproto.git
-    GIT_TAG v0.5.2
+    GIT_TAG v0.5.3
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND
         ${CMAKE_COMMAND}
@@ -56,6 +56,22 @@
         -G "${CMAKE_GENERATOR}"
         ${EP_BASE}/Source/CapnProto/c++
   )
+
+  if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+    # Download and install Cap'n Proto compilers
+    ExternalProject_Add(
+      CapnProtoTools
+      DEPENDS CapnProto
+      URL https://capnproto.org/capnproto-c++-win32-0.5.3.zip
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND
+        ${CMAKE_COMMAND} -E make_directory ${BIN_PRE}
+      INSTALL_COMMAND
+        ${CMAKE_COMMAND} -E copy_directory
+          "${EP_BASE}/Source/CapnProtoTools/capnproto-tools-win32-0.5.3"
+          ${BIN_PRE}
+    )
+  endif()

   set(LIB_KJ ${LIB_PRE}/${STATIC_PRE}kj${STATIC_SUF})
   set(LIB_CAPNP ${LIB_PRE}/${STATIC_PRE}capnp${STATIC_SUF})
@@ -99,5 +115,10 @@
   install(DIRECTORY ${INCLUDE_DIR}/capnp
           DESTINATION include/)
 endforeach ()
-install(FILES ${CAPNP_LIBRARIES}
-        DESTINATION lib/)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+  install(FILES ${CAPNP_LIBRARIES_LITE}
+          DESTINATION lib/)
+else()
+  install(FILES ${CAPNP_LIBRARIES}
+          DESTINATION lib/)
+endif()


cmake update

cmake update

--- cmake/FindArnold.cmake
+++ cmake/FindArnold.cmake
@@ -51,7 +51,7 @@
 # variable) before calling FIND_PACKAGE.
 #
 # E.g.
-#   SET( Arnold_INSTALL_PATH "/usr/local/arnold-4.0.5.0" )
+#   SET( Arnold_INSTALL_PATH "/usr/local/arnold-4.2.8.0” )
 #   FIND_PACKAGE( Arnold REQUIRED )
 #
 #==========


start moving away rfom some variables

start moving away rfom some variables

--- cmake/ectoMacros.cmake
+++ cmake/ectoMacros.cmake
@@ -58,6 +58,7 @@
 set(ECTO_PYTHON_BUILD_PATH ${CMAKE_BINARY_DIR}/gen/py/)
 set(ECTO_PYTHON_INSTALL_PATH ${INSTALLED_PYTHONPATH})
 endif()
+

 #
 # :param NAME: the name of your ecto module
@@ -128,15 +129,28 @@
     ${ecto_LIBRARIES}
     )

+if (ROS_GROOVY_OR_ABOVE_FOUND)
   set_target_properties(${NAME}_ectomodule PROPERTIES
-                        LIBRARY_OUTPUT_DIRECTORY ${ecto_module_PYTHON_OUTPUT}
+                        LIBRARY_OUTPUT_DIRECTORY ${CATKIN_BUILD_PREFIX}/${CATKIN_GLOBAL_PYTHON_DESTINATION}/${ARGS_DESTINATION}
   )
+else()
+  set_target_properties(${NAME}_ectomodule PROPERTIES
+                        LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/gen/py/${ARGS_DESTINATION}
+  )
+endif()

   if (ARGS_INSTALL)
+if (ROS_GROOVY_OR_ABOVE_FOUND)
     install(TARGETS ${NAME}_ectomodule
-            DESTINATION ${ecto_module_PYTHON_INSTALL}
+            DESTINATION ${CATKIN_GLOBAL_PYTHON_DESTINATION}/${ARGS_DESTINATION}
             COMPONENT main
     )
+else()
+    install(TARGETS ${NAME}_ectomodule
+            DESTINATION ${INSTALLED_PYTHONPATH}/${ARGS_DESTINATION}
+            COMPONENT main
+    )
+endif()
   endif()
 endmacro()


Fix for FindCBlas.cmake on debian based OS

--- common/FindCBLAS.cmake
+++ common/FindCBLAS.cmake
@@ -3,7 +3,7 @@

 # - Find CBLAS library
 #
-# This module finds an installed fortran library that implements the CBLAS
+# This module finds an installed fortran library that implements the CBLAS
 # linear-algebra interface (see http://www.netlib.org/blas/), with CBLAS
 # interface.
 #
@@ -26,14 +26,14 @@
   SET(CBLAS_INCLUDE_FILE "mkl_cblas.h")
 ENDIF (MKL_FOUND AND NOT CBLAS_LIBRARIES)

-# Old CBLAS search
+# Old CBLAS search
 SET(_verbose TRUE)
 INCLUDE(CheckFunctionExists)
 INCLUDE(CheckIncludeFile)

 MACRO(CHECK_ALL_LIBRARIES LIBRARIES _prefix _name _flags _list _include _search_include)
   # This macro checks for the existence of the combination of fortran libraries
-  # given by _list.  If the combination is found, this macro checks (using the
+  # given by _list.  If the combination is found, this macro checks (using the
   # Check_Fortran_Function_Exists macro) whether can link against that library
   # combination using the name of a routine given by _name using the linker
   # flags given by _flags.  If the combination of libraries is found and passes
@@ -60,19 +60,29 @@
     SET(_combined_name ${_combined_name}_${_library})
     # did we find all the libraries in the _list until now?
     # (we stop at the first unfound one)
-    IF(_libraries_work)
-      IF(APPLE)
+    IF(_libraries_work)
+      IF(APPLE)
         FIND_LIBRARY(${_prefix}_${_library}_LIBRARY
           NAMES ${_library}
-          PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV
-          DYLD_LIBRARY_PATH
+          PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV
+          DYLD_LIBRARY_PATH
           )
       ELSE(APPLE)
         FIND_LIBRARY(${_prefix}_${_library}_LIBRARY
           NAMES ${_library}
-          PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 /usr/lib64/atlas /usr/lib/atlas ENV
-          LD_LIBRARY_PATH
+          PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV
+          LD_LIBRARY_PATH
+          PATH_SUFFIXES atlas
           )
+        IF(NOT ${_prefix}_${library}_LIBRARY)
+            LIST(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".so.3")
+            FIND_LIBRARY(${_prefix}_${_library}_LIBRARY
+              NAMES ${_library}
+              PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV
+              LD_LIBRARY_PATH
+              PATH_SUFFIXES atlas
+              )
+          ENDIF(NOT ${_prefix}_${library}_LIBRARY)
       ENDIF(APPLE)
       MARK_AS_ADVANCED(${_prefix}_${_library}_LIBRARY)
       IF(${_prefix}_${_library}_LIBRARY)


Fixed incorrect variables

Fixed incorrect variables

--- FindTensorFlow.cmake
+++ FindTensorFlow.cmake
@@ -2,9 +2,10 @@
 # Connor Weeks
 # Locates the tensorFlow include directories and library.

+include(FindPackageHandleStandardArgs)
 unset(TensorFlow_FOUND)

-find_path(TensorFlow_INCLUDE_DIRS
+find_path(TensorFlow_INCLUDE_DIR
         NAMES
         tensorflow/core
         tensorflow/cc
@@ -20,6 +21,15 @@

 set(TensorFlow_LIBS ${TensorFlow_LIBRARY})

-if(TesorFlow_LIBS AND TensorFlow_INCLUDE_DIRS)
-    set(TensorFlow_FOUND 1)
+
+# handle the QUIETLY and REQUIRED arguments and set LOGGING_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(TensorFlow DEFAULT_MSG TensorFlow_INCLUDE_DIR TensorFlow_LIBRARY)
+
+if (TensorFlow_FOUND)
+    set(TensorFlow_LIBRARIES ${TensorFlow_LIBRARY} )
+    set(TensorFlow_INCLUDE_DIRS ${TensorFlow_INCLUDE_DIR} )
+    set(TensorFlow_DEFINITIONS )
 endif()
+
+mark_as_advanced(TensorFlow_INCLUDE_DIR TensorFlow_LIBRARY)


android: update toolchain file to support ndk 10c

Toolchain update from https://github.com/taka-no-me/android-cmake/pull/23

--- cmake/AndroidToolchain.cmake
+++ cmake/AndroidToolchain.cmake
@@ -85,9 +85,15 @@
 #        "armeabi-v7a with VFPV3" - same as armeabi-v7a, but
 #            sets VFPV3 as floating-point unit (has 32 registers instead of 16).
 #        "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP.
+#        "arm64-v8a" - matches to the NDK ABI with the same name.
+#           See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #        "x86" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
+#        "x86_64" - matches to the NDK ABI with the same name.
+#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #        "mips" - matches to the NDK ABI with the same name.
+#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
+#        "mips64" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #
 #    ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for.
@@ -181,13 +187,13 @@
 #    ANDROID and BUILD_ANDROID will be set to true, you may test any of these
 #    variables to make necessary Android-specific configuration changes.
 #
-#    Also ARMEABI or ARMEABI_V7A or X86 or MIPS will be set true, mutually
+#    Also ARMEABI or ARMEABI_V7A or ARM64_V8A or X86 or X86_64 or MIPS or MIPS64 will be set true, mutually
 #    exclusive. NEON option will be set true if VFP is set to NEON.
 #
 #    LIBRARY_OUTPUT_PATH_ROOT should be set in cache to determine where Android
 #    libraries will be installed.
 #    Default is ${CMAKE_SOURCE_DIR}, and the android libs will always be
-#    under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}
+#    under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_OUTPUT_ABI_NAME}
 #    (depending on the target ABI). This is convenient for Android packaging.
 #
 #  Change Log:
@@ -303,6 +309,9 @@
 #     [~] fix copying of shared STL
 #   - April 2014
 #     [+] updated for NDK r9d
+#   - July 2014
+#     [+] updated for NDK r10
+#     [+] arm64_v8a, x86_64, mips64 toolchain support (experimental)
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -335,7 +344,7 @@
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -350,12 +359,18 @@
 endif()

 set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" )
+set( ANDROID_SUPPORTED_ABIS_arm64 "arm64-v8a" )
 set( ANDROID_SUPPORTED_ABIS_x86 "x86" )
+set( ANDROID_SUPPORTED_ABIS_x86_64 "x86_64" )
 set( ANDROID_SUPPORTED_ABIS_mipsel "mips" )
+set( ANDROID_SUPPORTED_ABIS_mips64el "mips64" )

 set( ANDROID_DEFAULT_NDK_API_LEVEL 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_arm64 "L" )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_x86_64 "L" )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_mips64 "L" )

 macro( __LIST_FILTER listvar regex )
@@ -609,6 +624,9 @@
  # try to detect change of NDK
  if( CMAKE_AR )
   string( LENGTH "${ANDROID_NDK_TOOLCHAINS_PATH}" __length )
+	message("${CMAKE_AR}")
+	message("${__length}")
+	message("${ANDROID_NDK_TOOLCHAINS_PATH}")
   string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidNdkPreviousPath )
   if( NOT __androidNdkPreviousPath STREQUAL ANDROID_NDK_TOOLCHAINS_PATH )
    message( FATAL_ERROR "It is not possible to change the path to the NDK on subsequent CMake run. You must remove all generated files from your build folder first.
@@ -659,10 +677,16 @@
    string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
    if( __machine MATCHES i686 )
     set( __arch "x86" )
+   elseif( __machine MATCHES x86_64 )
+    set( __arch "x86_64" )
    elseif( __machine MATCHES arm )
     set( __arch "arm" )
+   elseif( __machine MATCHES aarch64 )
+    set( __arch "arm64" )
    elseif( __machine MATCHES mipsel )
     set( __arch "mipsel" )
+   elseif( __machine MATCHES mips64el )
+    set( __arch "mips64el" )
    endif()
    list( APPEND __availableToolchainMachines "${__machine}" )
    list( APPEND __availableToolchainArchs "${__arch}" )
@@ -746,6 +770,13 @@
  set( ANDROID_ARCH_FULLNAME "x86" )
  set( ANDROID_LLVM_TRIPLE "i686-none-linux-android" )
  set( CMAKE_SYSTEM_PROCESSOR "i686" )
+elseif( ANDROID_ABI STREQUAL "x86_64" )
+ set( X86_64 true )
+ set( ANDROID_NDK_ABI_NAME "x86_64" )
+ set( ANDROID_ARCH_NAME "x86_64" )
+ set( ANDROID_ARCH_FULLNAME "x86_64" )
+ set( ANDROID_LLVM_TRIPLE "x86_64-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "x86_64" )
 elseif( ANDROID_ABI STREQUAL "mips" )
  set( MIPS true )
  set( ANDROID_NDK_ABI_NAME "mips" )
@@ -753,6 +784,13 @@
  set( ANDROID_ARCH_FULLNAME "mipsel" )
  set( ANDROID_LLVM_TRIPLE "mipsel-none-linux-android" )
  set( CMAKE_SYSTEM_PROCESSOR "mips" )
+elseif( ANDROID_ABI STREQUAL "mips64" )
+ set( MIPS64 true )
+ set( ANDROID_NDK_ABI_NAME "mips64" )
+ set( ANDROID_ARCH_NAME "mips64" )
+ set( ANDROID_ARCH_FULLNAME "mips64el" )
+ set( ANDROID_LLVM_TRIPLE "mips64el-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "mips64" )
 elseif( ANDROID_ABI STREQUAL "armeabi" )
  set( ARMEABI true )
  set( ANDROID_NDK_ABI_NAME "armeabi" )
@@ -793,8 +831,23 @@
  set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
  set( VFPV3 true )
  set( NEON true )
+elseif( ANDROID_ABI STREQUAL "arm64-v8a" )
+ set( ARM64_V8A true )
+ set( ANDROID_NDK_ABI_NAME "arm64-v8a" )
+ set( ANDROID_ARCH_NAME "arm64" )
+ set( ANDROID_ARCH_FULLNAME "arm64" )
+ set( ANDROID_LLVM_TRIPLE "armv8-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "aarch64" )
+ set( VFPV3 true )
+ set( NEON true )
 else()
  message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." )
+endif()
+
+if( X86_64 )
+ set( ANDROID_NDK_OUTPUT_ABI_NAME "x86-64" )
+else()
+ set( ANDROID_NDK_OUTPUT_ABI_NAME ${ANDROID_NDK_ABI_NAME} )
 endif()

 if( CMAKE_BINARY_DIR AND EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" )
@@ -862,38 +915,40 @@

 # choose native API level
 __INIT_VARIABLE( ANDROID_NATIVE_API_LEVEL ENV_ANDROID_NATIVE_API_LEVEL ANDROID_API_LEVEL ENV_ANDROID_API_LEVEL ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME} ANDROID_DEFAULT_NDK_API_LEVEL )
-string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" )
-# adjust API level
-set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} )
-foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
- if( NOT __level GREATER ANDROID_NATIVE_API_LEVEL AND NOT __level LESS __real_api_level )
-  set( __real_api_level ${__level} )
- endif()
-endforeach()
-if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level )
- message( STATUS "Adjusting Android API level 'android-${ANDROID_NATIVE_API_LEVEL}' to 'android-${__real_api_level}'")
- set( ANDROID_NATIVE_API_LEVEL ${__real_api_level} )
-endif()
-unset(__real_api_level)
-# validate
-list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx )
-if( __levelIdx EQUAL -1 )
- message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." )
-else()
- if( BUILD_WITH_ANDROID_NDK )
-  __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" )
-  if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL )
-   message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." )
-  endif()
-  unset( __realApiLevel )
- endif()
- set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE )
- if( CMAKE_VERSION VERSION_GREATER "2.8" )
-  list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
-  set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
- endif()
-endif()
-unset( __levelIdx )
+if( NOT ANDROID_NATIVE_API_LEVEL STREQUAL "L" )
+  string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" )
+  # adjust API level
+  set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} )
+  foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+   if( NOT __level GREATER ANDROID_NATIVE_API_LEVEL AND NOT __level LESS __real_api_level )
+    set( __real_api_level ${__level} )
+   endif()
+  endforeach()
+  if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level )
+   message( STATUS "Adjusting Android API level 'android-${ANDROID_NATIVE_API_LEVEL}' to 'android-${__real_api_level}'")
+   set( ANDROID_NATIVE_API_LEVEL ${__real_api_level} )
+    endif()
+  unset(__real_api_level)
+  # validate
+  list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx )
+  if( __levelIdx EQUAL -1 )
+   message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." )
+  else()
+   if( BUILD_WITH_ANDROID_NDK )
+    __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" )
+    if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL )
+     message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." )
+    endif()
+    unset( __realApiLevel )
+   endif()
+   set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE )
+   if( CMAKE_VERSION VERSION_GREATER "2.8" )
+    list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
+    set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+   endif()
+  endif()
+  unset( __levelIdx )
+endif()

 # remember target ABI
@@ -1214,7 +1269,11 @@
  set( CMAKE_C_COMPILER_ID Clang)
 endif()
 set( CMAKE_C_PLATFORM_ID Linux )
-set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+if( ARM64_V8A OR X86_64 OR MIPS64 )
+ set( CMAKE_C_SIZEOF_DATA_PTR 8 )
+else()
+ set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+endif()
 set( CMAKE_C_HAS_ISYSROOT 1 )
 set( CMAKE_C_COMPILER_ABI ELF )
 CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
@@ -1222,7 +1281,11 @@
  set( CMAKE_CXX_COMPILER_ID Clang)
 endif()
 set( CMAKE_CXX_PLATFORM_ID Linux )
-set( CMAKE_CXX_SIZEOF_DATA_PTR 4 )
+if( ARM64_V8A OR X86_64 OR MIPS64 )
+ set( CMAKE_CXX_SIZEOF_DATA_PTR 8 )
+else()
+ set( CMAKE_CXX_SIZEOF_DATA_PTR 4 )
+endif()
 set( CMAKE_CXX_HAS_ISYSROOT 1 )
 set( CMAKE_CXX_COMPILER_ABI ELF )
 set( CMAKE_CXX_SOURCE_FILE_EXTENSIONS cc cp cxx cpp CPP c++ C )
@@ -1279,7 +1342,7 @@
    set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
   endif()
  endif()
-elseif( X86 )
+elseif( X86 OR X86_64 )
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
  if( NOT ANDROID_COMPILER_IS_CLANG )
   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
@@ -1288,7 +1351,7 @@
  endif()
  set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" )
  set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer -fno-strict-aliasing" )
-elseif( MIPS )
+elseif( MIPS OR MIPS64 )
  set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0" )
  set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer" )
  set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer" )
@@ -1325,6 +1388,8 @@
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) # vfp == vfpv2
 elseif( ARMEABI )
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv5te -mtune=xscale -msoft-float" )
+elseif( ARM64_V8A )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv8-a" )
 endif()

 if( ANDROID_STL MATCHES "gnustl" AND (EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}") )
@@ -1558,11 +1623,11 @@

 if(NOT _CMAKE_IN_TRY_COMPILE)
  if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" )
-  set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" )
+  set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_OUTPUT_ABI_NAME}" CACHE PATH "Output directory for applications" )
  else()
   set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" )
  endif()
- set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" )
+ set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_OUTPUT_ABI_NAME}" CACHE PATH "path for android libs" )
 endif()

 # copy shaed stl library to build directory
@@ -1639,10 +1704,16 @@
   set( ${VAR} "armeabi" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI_V7A" )
   set( ${VAR} "armeabi-v7a" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARM64_V8A" )
+  set( ${VAR} "arm64-v8a" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86" )
   set( ${VAR} "x86" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86_64" )
+  set( ${VAR} "x86_64" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS" )
   set( ${VAR} "mips" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS64" )
+  set( ${VAR} "mips64" )
  else()
   set( ${VAR} "unknown" )
  endif()
@@ -1709,7 +1780,7 @@

 # Variables controlling behavior or set by cmake toolchain:
-#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips"
+#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "arm64-v8a", "x86", "x86_64", "mips", "mips64"
 #   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (depends on NDK version)
 #   ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none
 #   ANDROID_FORBID_SYGWIN : ON/OFF
@@ -1743,16 +1814,19 @@
 #   ARMEABI : TRUE for arm v6 and older devices
 #   ARMEABI_V6 : TRUE for arm v6
 #   ARMEABI_V7A : TRUE for arm v7a
+#   ARM64_V8A : TRUE for arm64 v8a
 #   NEON : TRUE if NEON unit is enabled
 #   VFPV3 : TRUE if VFP version 3 is enabled
 #   X86 : TRUE if configured for x86
+#   X86_64 : TRUE if configured for x86_64
 #   MIPS : TRUE if configured for mips
+#   MIPS64 : TRUE if configured for mips64
 #   BUILD_ANDROID : always TRUE
 #   BUILD_WITH_ANDROID_NDK : TRUE if NDK is used
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d; set only for NDK
+#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d, r10; set only for NDK
 #   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform


Added reader so/DLLs for OpenVINO which are now needed to load models

--- cmake/ExternalOpenVINO.cmake
+++ cmake/ExternalOpenVINO.cmake
@@ -42,7 +42,11 @@
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/inference_engine_transformations.lib ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/inference_engine_lp_transformations.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/inference_engine_lp_transformations.lib ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
-            ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/clDNNPlugin.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/inference_engine_ir_reader.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/inference_engine_ir_v7_reader.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/inference_engine_onnx_reader.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/onnx_importer.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/clDNNPlugin.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/MKLDNNPlugin.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/myriadPlugin.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/ngraph.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
@@ -54,7 +58,7 @@
 ExternalProject_Add(OpenVINO
         PREFIX ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO
         GIT_REPOSITORY "https://github.com/openvinotoolkit/openvino.git"
-        GIT_TAG "2020.3.0"
+        GIT_TAG "2021.1"
         UPDATE_COMMAND
             git submodule update --init --recursive
         CMAKE_ARGS
@@ -84,7 +88,11 @@
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libinference_engine_legacy.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libinference_engine_transformations.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libinference_engine_lp_transformations.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
-            ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libclDNNPlugin.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libinference_engine_ir_reader.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libinference_engine_ir_v7_reader.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libinference_engine_onnx_reader.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libonnx_importer.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
+			${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libclDNNPlugin.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libMKLDNNPlugin.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libmyriadPlugin.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
             ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Release/lib/libngraph.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND


Disabled PCH support for gcc >= 6.0.0

Disabled PCH support for gcc >= 6.0.0

Command line generation routine uses "-isystem" to include headers outside of "<opencv>/modules" folder, but GCC 6 does not work when passed "-isystem /usr/include" option.

--- cmake/OpenCVPCHSupport.cmake
+++ cmake/OpenCVPCHSupport.cmake
@@ -19,7 +19,7 @@
         ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
         OUTPUT_VARIABLE gcc_compiler_version)
     #MESSAGE("GCC Version: ${gcc_compiler_version}")
-    IF(gcc_compiler_version VERSION_GREATER "4.2.-1")
+    IF(gcc_compiler_version VERSION_GREATER "4.2.-1" AND gcc_compiler_version VERSION_LESS "6.0.0")
         SET(PCHSupport_FOUND TRUE)
     ENDIF()


Add option to firmware target allowing complete exclusion of Arduino libraries so that only native AVR functionality is used

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -9,7 +9,8 @@
 #      [SERIAL serial_cmd]
 #      [PROGRAMMER programmer_id]
 #      [AFLAGS flags]
-#      [NO_AUTOLIBS])
+#      [NO_AUTOLIBS]
+#      [NATIVE_AVR])
 #=============================================================================#
 #
 #   generaters firmware and libraries for Arduino devices
@@ -27,6 +28,7 @@
 #      PROGRAMMER     # Programmer id (enables programmer support)
 #      AFLAGS         # Avrdude flags for target
 #      NO_AUTOLIBS    # Disables Arduino library detection
+#      NATIVE_AVR     # (Advanced) Only use AVR Libc/Includes
 #
 # Here is a short example for a target named test:
 #
@@ -254,7 +256,7 @@

     add_library(${INPUT_NAME} ${ALL_SRCS})

-    get_arduino_flags(ARDUINO_COMPILE_FLAGS ARDUINO_LINK_FLAGS  ${INPUT_BOARD})
+    get_arduino_flags(ARDUINO_COMPILE_FLAGS ARDUINO_LINK_FLAGS  ${INPUT_BOARD} FALSE)

     set_target_properties(${INPUT_NAME} PROPERTIES
                 COMPILE_FLAGS "${ARDUINO_COMPILE_FLAGS} ${COMPILE_FLAGS} ${LIB_DEP_INCLUDES}"
@@ -270,7 +272,7 @@
 function(GENERATE_ARDUINO_FIRMWARE INPUT_NAME)
     message(STATUS "Generating ${INPUT_NAME}")
     parse_generator_arguments(${INPUT_NAME} INPUT
-                              "NO_AUTOLIBS"                         # Options
+                              "NO_AUTOLIBS;NATIVE_AVR"              # Options
                               "BOARD;PORT;SKETCH;SERIAL;PROGRAMMER" # One Value Keywords
                               "SRCS;HDRS;LIBS;AFLAGS"               # Multi Value Keywords
                               ${ARGN})
@@ -287,13 +289,18 @@
     if(NOT INPUT_PROGRAMMER)
         set(INPUT_SERIAL ${ARDUINO_DEFAULT_PROGRAMMER})
     endif()
+    if(NOT INPUT_NATIVE_AVR)
+        set(INPUT_NATIVE_AVR FALSE)
+    endif()
     required_variables(VARS INPUT_BOARD MSG "must define for target ${INPUT_NAME}")

     set(ALL_LIBS)
     set(ALL_SRCS ${INPUT_SRCS} ${INPUT_HDRS})
     set(LIB_DEP_INCLUDES)

-    setup_arduino_core(CORE_LIB ${INPUT_BOARD})
+    if(NOT INPUT_NATIVE_AVR)
+      setup_arduino_core(CORE_LIB ${INPUT_BOARD})
+    endif()

     if(NOT "${INPUT_SKETCH}" STREQUAL "")
         get_filename_component(INPUT_SKETCH "${INPUT_SKETCH}" ABSOLUTE)
@@ -313,8 +320,8 @@
     endif()

     list(APPEND ALL_LIBS ${CORE_LIB} ${INPUT_LIBS})
-
-    setup_arduino_target(${INPUT_NAME} ${INPUT_BOARD} "${ALL_SRCS}" "${ALL_LIBS}" "${LIB_DEP_INCLUDES}" "")
+
+    setup_arduino_target(${INPUT_NAME} ${INPUT_BOARD} "${ALL_SRCS}" "${ALL_LIBS}" "${LIB_DEP_INCLUDES}" "" "${INPUT_NATIVE_AVR}")

     if(INPUT_PORT)
         setup_arduino_upload(${INPUT_BOARD} ${INPUT_NAME} ${INPUT_PORT} "${INPUT_PROGRAMMER}" "${INPUT_AFLAGS}")
@@ -379,7 +386,7 @@

     list(APPEND ALL_LIBS ${CORE_LIB} ${INPUT_LIBS})

-    setup_arduino_target(${TARGET_NAME} ${INPUT_BOARD}  "${ALL_SRCS}" "${ALL_LIBS}" "${LIB_DEP_INCLUDES}" "")
+    setup_arduino_target(${TARGET_NAME} ${INPUT_BOARD}  "${ALL_SRCS}" "${ALL_LIBS}" "${LIB_DEP_INCLUDES}" "" FALSE)

     if(INPUT_PORT)
         #TODO fill in options (AFLAGS)
@@ -470,16 +477,18 @@
 #=============================================================================#
 # [PRIVATE/INTERNAL]
 #
-# get_arduino_flags(COMPILE_FLAGS LINK_FLAGS BOARD_ID)
+# get_arduino_flags(COMPILE_FLAGS LINK_FLAGS BOARD_ID NATIVE_AVR)
 #
 #       COMPILE_FLAGS_VAR -Variable holding compiler flags
 #       LINK_FLAGS_VAR - Variable holding linker flags
 #       BOARD_ID - The board id name
+#       NATIVE_AVR - (Advanced) Only use AVR Libc/Includes
 #
 # Configures the the build settings for the specified Arduino Board.
 #
 #=============================================================================#
-function(get_arduino_flags COMPILE_FLAGS_VAR LINK_FLAGS_VAR BOARD_ID)
+function(get_arduino_flags COMPILE_FLAGS_VAR LINK_FLAGS_VAR BOARD_ID NATIVE_AVR)
+
     set(BOARD_CORE ${${BOARD_ID}.build.core})
     if(BOARD_CORE)
         if(ARDUINO_SDK_VERSION MATCHES "([0-9]+)[.]([0-9]+)")
@@ -498,11 +507,16 @@
         endif()

         # output
-        set(COMPILE_FLAGS "-DF_CPU=${${BOARD_ID}.build.f_cpu} -DARDUINO=${ARDUINO_VERSION_DEFINE} -mmcu=${${BOARD_ID}.build.mcu} -I${ARDUINO_CORES_PATH}/${BOARD_CORE} -I${ARDUINO_LIBRARIES_PATH}")
+        set(COMPILE_FLAGS "-DF_CPU=${${BOARD_ID}.build.f_cpu} -DARDUINO=${ARDUINO_VERSION_DEFINE} -mmcu=${${BOARD_ID}.build.mcu}")
+        if(NOT NATIVE_AVR)
+          set(COMPILE_FLAGS "${COMPILE_FLAGS} -I${ARDUINO_CORES_PATH}/${BOARD_CORE} -I${ARDUINO_LIBRARIES_PATH}")
+        endif()
         set(LINK_FLAGS "-mmcu=${${BOARD_ID}.build.mcu}")
         if(ARDUINO_SDK_VERSION VERSION_GREATER 1.0 OR ARDUINO_SDK_VERSION VERSION_EQUAL 1.0)
             set(PIN_HEADER ${${BOARD_ID}.build.variant})
-            set(COMPILE_FLAGS "${COMPILE_FLAGS} -I${ARDUINO_VARIANTS_PATH}/${PIN_HEADER}")
+            if(NOT NATIVE_AVR)
+              set(COMPILE_FLAGS "${COMPILE_FLAGS} -I${ARDUINO_VARIANTS_PATH}/${PIN_HEADER}")
+            endif()
         endif()

         # output
@@ -536,7 +550,7 @@
             # Debian/Ubuntu fix
             list(REMOVE_ITEM CORE_SRCS "${BOARD_CORE_PATH}/main.cxx")
             add_library(${CORE_LIB_NAME} ${CORE_SRCS})
-            get_arduino_flags(ARDUINO_COMPILE_FLAGS ARDUINO_LINK_FLAGS ${BOARD_ID})
+            get_arduino_flags(ARDUINO_COMPILE_FLAGS ARDUINO_LINK_FLAGS ${BOARD_ID} FALSE)
             set_target_properties(${CORE_LIB_NAME} PROPERTIES
                 COMPILE_FLAGS "${ARDUINO_COMPILE_FLAGS}"
                 LINK_FLAGS "${ARDUINO_LINK_FLAGS}")
@@ -641,7 +655,7 @@
             arduino_debug_msg("Generating Arduino ${LIB_NAME} library")
             add_library(${TARGET_LIB_NAME} STATIC ${LIB_SRCS})

-            get_arduino_flags(ARDUINO_COMPILE_FLAGS ARDUINO_LINK_FLAGS ${BOARD_ID})
+            get_arduino_flags(ARDUINO_COMPILE_FLAGS ARDUINO_LINK_FLAGS ${BOARD_ID} FALSE)

             find_arduino_libraries(LIB_DEPS "${LIB_SRCS}")

@@ -697,7 +711,7 @@
 #=============================================================================#
 # [PRIVATE/INTERNAL]
 #
-# setup_arduino_target(TARGET_NAME ALL_SRCS ALL_LIBS COMPILE_FLAGS LINK_FLAGS)
+# setup_arduino_target(TARGET_NAME ALL_SRCS ALL_LIBS COMPILE_FLAGS LINK_FLAGS NATIVE_AVR)
 #
 #        TARGET_NAME - Target name
 #        BOARD_ID    - Arduino board ID
@@ -705,16 +719,17 @@
 #        ALL_LIBS    - All libraries
 #        COMPILE_FLAGS - Compile flags
 #        LINK_FLAGS    - Linker flags
+#        NATIVE_AVR - (Advanced) Only use AVR Libc/Includes
 #
 # Creates an Arduino firmware target.
 #
 #=============================================================================#
-function(setup_arduino_target TARGET_NAME BOARD_ID ALL_SRCS ALL_LIBS COMPILE_FLAGS LINK_FLAGS)
+function(setup_arduino_target TARGET_NAME BOARD_ID ALL_SRCS ALL_LIBS COMPILE_FLAGS LINK_FLAGS NATIVE_AVR)

     add_executable(${TARGET_NAME} ${ALL_SRCS})
     set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".elf")

-    get_arduino_flags(ARDUINO_COMPILE_FLAGS ARDUINO_LINK_FLAGS  ${BOARD_ID})
+    get_arduino_flags(ARDUINO_COMPILE_FLAGS ARDUINO_LINK_FLAGS  ${BOARD_ID} ${NATIVE_AVR})

     set_target_properties(${TARGET_NAME} PROPERTIES
                 COMPILE_FLAGS "${ARDUINO_COMPILE_FLAGS} ${COMPILE_FLAGS}"


Fix for PHP finding on Windows Approved: Rodolfo Ochoa, Juan Zacarias

--- cmake_modules/FindPHP5.cmake
+++ cmake_modules/FindPHP5.cmake
@@ -157,16 +157,18 @@
 ENDIF(PHP5_VERSION LESS 5)

 ELSE (NOT WIN32 OR CYGWIN)
-MESSAGE(STATUS "Windows Environment Configuration...")
-#On Windows, set PHP5_INCLUDE_DIR with -D
-MESSAGE(STATUS "Path to source: " ${PHP5_INCLUDE_DIR})
-SET(PHP5_INCLUDES ${PHP5_INCLUDE_DIR})
-#SET(PHP5_EXTENSION_DIR "" CACHE PATH "Path to the ext subdir in binary PHP5")
-ENDIF (NOT WIN32 OR CYGWIN)
-
+
+################  WINDOWS CONFIG
+
 IF(NOT PHP5_INCLUDE_DIR )
   SET (PHP5_INCLUDE_DIR ${CMAKE_PREFIX_PATH})
 ENDIF(NOT PHP5_INCLUDE_DIR )
+
+MESSAGE(STATUS "Windows Environment Configuration.")
+MESSAGE(STATUS "PHP Path: " ${PHP5_INCLUDE_DIR})
+SET(PHP5_INCLUDES ${PHP5_INCLUDE_DIR})
+
+ENDIF (NOT WIN32 OR CYGWIN)

 set(PHP5_MAIN_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/main)
 set(PHP5_TSRM_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/TSRM)
@@ -176,8 +178,6 @@
 set(PHP5_DATE_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/ext/date/lib)
 set(PHP5_STANDARD_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/ext/standard)

-MESSAGE(STATUS ${PHP5_MAIN_INCLUDE_DIR})
-
 IF(PHP5_EXECUTABLE AND PHP5_INCLUDES)
     SET(PHP5_FOUND "yes")
     MESSAGE(STATUS "Found PHP5-Version ${PHP5_VERSION}")


workaround for VS2015 compiler crash

workaround for VS2015 compiler crash

--- common/cmake/msvc_post.cmake
+++ common/cmake/msvc_post.cmake
@@ -21,3 +21,6 @@
   STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
   STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
 ENDIF()
+
+# remove define NDEBUG and instead set define DEBUG for config RelWithDebInfo
+STRING(REPLACE "NDEBUG" "DEBUG" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})


Add corrected SpirePM.cmake file.

Add corrected SpirePM.cmake file.

--- src/CMake/SpirePM.cmake
+++ src/CMake/SpirePM.cmake
@@ -251,7 +251,7 @@
   _spm_parse_arguments(Spire_AddCore _SPM_ "${ARGN}")

   # Setup any defaults that the user provided.
-  if (_SPM_PREFIX)
+  if (DEFINED _SPM_PREFIX)
     set(_ep_prefix "PREFIX" "${_SPM_PREFIX}")
   else()
     set(_ep_prefix "PREFIX" "${CMAKE_CURRENT_BINARY_DIR}/spire-core")
@@ -259,30 +259,30 @@
     set(_SPM_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/spire-core")
   endif()

-  if (_SPM_GIT_TAG)
+  if (DEFINED _SPM_GIT_TAG)
     set(_ep_git_tag "GIT_TAG" ${_SPM_GIT_TAG})
   else()
     set(_ep_git_tag "GIT_TAG" "master")
   endif()

-  if (_SPM_GIT_REPOSITORY)
+  if (DEFINED _SPM_GIT_REPOSITORY)
     set(_ep_git_repo "GIT_REPOSITORY" ${_SPM_GIT_REPOSITORY})
   else()
     set(_ep_git_repo "GIT_REPOSITORY" "https://github.com/SCIInstitute/spire.git")
   endif()

-  if (_SPM_SOURCE_DIR)
+  if (DEFINED _SPM_SOURCE_DIR)
     set(_ep_source_dir "SOURCE_DIR" "${_SPM_SOURCE_DIR}")
     # Clear git repo or git tag, if any.
     set(_ep_git_repo)
     set(_ep_git_tag)
   endif()

-  if (_SPM_BINARY_DIR)
+  if (DEFINED _SPM_BINARY_DIR)
     set(_ep_bin_dir "BINARY_DIR" $_SPM_BINARY_DIR)
   endif()

-  if (_SPM_USE_STD_THREADS)
+  if (DEFINED _SPM_USE_STD_THREADS)
     set(_ep_spire_use_threads "-DUSE_STD_THREADS:BOOL=${_SPM_USE_STD_THREADS}")
   else()
     set(_ep_spire_use_threads "-DUSE_STD_THREADS:BOOL=ON")
@@ -338,12 +338,12 @@
   set_target_properties(${name} PROPERTIES SPIRE_BASE_MODULE_SRC_DIR "${PREFIX}/module_src/SpireExt")

   # Set output directory for assets if the user passed the variable in.
-  if (_SPM_ASSET_OUTPUT_DIR)
+  if (DEFINED _SPM_ASSET_OUTPUT_DIR)
     set_target_properties(${name} PROPERTIES ASSET_OUTPUT_DIR "${_SPM_ASSET_OUTPUT_DIR}")
   endif()

   # Set output directory for shaders if the user passed the variable in.
-  if (_SPM_SHADER_OUTPUT_DIR)
+  if (DEFINED _SPM_SHADER_OUTPUT_DIR)
     set_target_properties(${name} PROPERTIES SHADER_OUTPUT_DIR "${_SPM_SHADER_OUTPUT_DIR}")
   endif()

@@ -386,7 +386,7 @@

   # If the user specified the source directory then don't automatically generate
   # it for them and wipe out all git / download info.
-  if (_SPM_SOURCE_DIR)
+  if (DEFINED _SPM_SOURCE_DIR)
     set(_ep_source_dir "SOURCE_DIR" "${_SPM_SOURCE_DIR}")
     # Clear git repo or git tag, if any.
     set(_ep_git_repo)
@@ -409,12 +409,12 @@
     set(SPIRE_MODULE_INCLUDE_DIRS ${SPIRE_MODULE_INCLUDE_DIRS} ${MODULE_PREFIX} PARENT_SCOPE)
   endif()

-  if (_SPM_SHADER_DIR)
+  if (DEFINED _SPM_SHADER_DIR)
     # Set appropriate shader variable in PARENT_SCOPE.
     set(SPIRE_SHADER_DIRS ${SPIRE_SHADER_DIRS} ${_SPM_SHADER_DIR} PARENT_SCOPE)
   endif()

-  if (_SPM_ASSET_DIR)
+  if (DEFINED _SPM_ASSET_DIR)
     # Set appropriate asset variable in PARENT_SCOPE.
     set(SPIRE_ASSET_DIRS ${SPIRE_ASSET_DIRS} ${_SPM_ASSET_DIR} PARENT_SCOPE)
   endif()


fix(tools): don't link atomic library with Apple clang

--- cmake/CMakeCompiler.cmake
+++ cmake/CMakeCompiler.cmake
@@ -69,7 +69,7 @@
 		endif()

 		# Link against the atomic library with x86 clang 4 and 5
-		if(CPU_INSTRUCTION_SET MATCHES "x86" AND CLANG_VERSION_MAJOR VERSION_LESS 5)
+		if(CPU_INSTRUCTION_SET MATCHES "x86" AND CLANG_VERSION_MAJOR VERSION_LESS 5 AND NOT PLATFORM_OSX)
 			target_link_libraries(${_project_name} PRIVATE "-latomic")
 		endif()
 	endif()


Bump C++ standard to 17

Bump C++ standard to 17

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -2,7 +2,7 @@
 set(TEMP_GPP_WARNINGS "-Wall -Wextra -pedantic -Wpointer-arith -Wcast-align -Wwrite-strings -Wredundant-decls -Winline -Wno-long-long -Wconversion -Wno-sign-compare -Wzero-as-null-pointer-constant")

 set(CMAKE_C_STANDARD 11)
-set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD 17)

 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TEMP_GCC_WARNINGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TEMP_GPP_WARNINGS}")


cmake: keep duplicate dependencies in order to fix gcc link order problems

--- cmake/oryol_private.cmake
+++ cmake/oryol_private.cmake
@@ -60,9 +60,12 @@
     foreach(dep ${input})
         oryol_recurse_deps(${dep} resolvedDeps)
     endforeach()
-    if (resolvedDeps)
-       list(REMOVE_DUPLICATES resolvedDeps)
-    endif()
+
+# NOTE: we do NOT remove dups, this simplifies the tricy linker order
+# requirements on GCC
+#    if (resolvedDeps)
+#       list(REMOVE_DUPLICATES resolvedDeps)
+#    endif()
     message("${target} Dependencies: ${resolvedDeps}")
     target_link_libraries(${target} ${resolvedDeps})
 endmacro()
@@ -251,4 +254,4 @@
     else()
         message("WARNING: Python not found, skipping XML generators!")
     endif()
-endmacro()+endmacro()


use glob

use glob

--- cmake/packages/snap.cmake
+++ cmake/packages/snap.cmake
@@ -7,7 +7,7 @@
 if(SNAPCRAFT_FOUND)
   set(SNAPCRAFT_TEMPLATE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Installation/Ubuntu")
   set(SNAPCRAFT_SOURCE_DIR "${CMAKE_BINARY_DIR}/_CPack_Packages/SNAP")
-  set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${ARANGODB_PACKAGE_ARCHITECTURE}.snap")
+  set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_*${ARANGODB_PACKAGE_ARCHITECTURE}.snap")

   message(STATUS "Creating snap package")


Squashed '3rdparty/github/cmake-utils/' changes from c219386..372b25c

372b25c MyPackageCheck.cmake: Support of eventual TARGET_TEST_CMAKE_COMMAND

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 372b25c607b531fd93f9c12d2a1c89f32a97d320


Also try MSVC_RUNTIME_LIBRARY

Also try MSVC_RUNTIME_LIBRARY


mpv: enable encoding mode

mpv: enable encoding mode

This got disabled by default upstream because it’s using deprecated
FFmpeg APIs, but it should still work. For now.

--- packages/mpv.cmake
+++ packages/mpv.cmake
@@ -33,6 +33,7 @@
         --disable-manpage-build
         --enable-libmpv-shared
         --enable-gpl3
+        --enable-encoding
         --disable-egl-angle
         --enable-lua
         --enable-libarchive


CMake: remove BLENDER_SORTED_LIBS

CMake: remove BLENDER_SORTED_LIBS

Use CMake's target_link_libraries instead of manually maintaining
library dependencies in a single list.

In practice adding new libraries often ended up being guess-work,
now each library lists the libraries it uses.

This was used for the game player executable so libraries
could optionally link to stubs.

If we need this functionality it can be done using target-properties
as described in T46725.

--- src/cmake/macros.cmake
+++ src/cmake/macros.cmake
@@ -236,10 +236,8 @@

 macro(cycles_add_library target library_deps)
 	add_library(${target} ${ARGN})
-	if(DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS)
-		if(NOT ("${library_deps}" STREQUAL ""))
-			target_link_libraries(${target} "${library_deps}")
-		endif()
+	if(NOT ("${library_deps}" STREQUAL ""))
+		target_link_libraries(${target} "${library_deps}")
 	endif()
 	cycles_set_solution_folder(${target})
 endmacro()


Resolve linker issues with Threads meta package

--- cmake/modules/VisionarayUsePackage.cmake
+++ cmake/modules/VisionarayUsePackage.cmake
@@ -1,7 +1,6 @@
 #---------------------------------------------------------------------------------------------------
 # visionaray_use_package(name)
 #
-

 function(visionaray_use_package name)
     string(TOUPPER ${name} upper_name)
@@ -43,6 +42,13 @@
         endif()
     endif()

+    #
+    # some special treatment for CMake Threads meta package..
+    #
+    if(${upper_name} STREQUAL "THREADS")
+        set(pkg_LIBS ${CMAKE_THREAD_LIBS_INIT} ${pkg_LIBS})
+    endif()
+
     set(__VSNRAY_LINK_LIBRARIES ${__VSNRAY_LINK_LIBRARIES} ${pkg_LIBS} PARENT_SCOPE)

     add_definitions(-DVSNRAY_HAVE_${upper_name}=1)


Be sure that package relative path is at least ".", not an empty string.

--- cmake/install_cmake_infrastructure.cmake
+++ cmake/install_cmake_infrastructure.cmake
@@ -51,6 +51,9 @@
   log(2 "Writing config to ${_cfgout}")

   file(RELATIVE_PATH PACKAGE_RELATIVE_PATH ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+  if(PACKAGE_RELATIVE_PATH STREQUAL "")
+    set(PACKAGE_RELATIVE_PATH ".")
+  endif()
   file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/etc)
   safe_execute_process(COMMAND ${catkin_EXTRAS_DIR}/update_index.py
     ${CMAKE_BINARY_DIR}/etc/packages.yaml


[cmake] use same petsc test on all platforms

--- cmake/modules/DuneMultiscaleMacros.cmake
+++ cmake/modules/DuneMultiscaleMacros.cmake
@@ -1,7 +1,3 @@
 message(AUTHOR_WARNING "TODO: Implement module test.")

-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-  find_package(PETSc COMPONENTS CXX REQUIRED)
-else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-  find_package(PETSc REQUIRED)
-endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+find_package(PETSc COMPONENTS CXX REQUIRED)


- GCOV_FLAGS

- GCOV_FLAGS

--- cmake_modules/SetupCompilerOptions.cmake
+++ cmake_modules/SetupCompilerOptions.cmake
@@ -21,9 +21,9 @@
     set(CFLAGS_COMMON
       "-Wall -Wextra -Werror")# -Wno-ignored-qualifiers -Wfatal-errors")

-    set(CFLAGS_REL      "-O3 ${CFLAGS_COMMON} ${GCOV_FLAGS} -DNDEBUG")
-    set(CFLAGS_DBG      "-O0 -ggdb3 ${CFLAGS_COMMON} ${GCOV_FLAGS} -DDEBUG")
-    set(CFLAGS_DBGREL   "-O2 -g ${CFLAGS_COMMON} ${GCOV_FLAGS} -DNDEBUG")
+    set(CFLAGS_REL      "-O3 ${CFLAGS_COMMON} -DNDEBUG")
+    set(CFLAGS_DBG      "-O0 -ggdb3 ${CFLAGS_COMMON} -DDEBUG")
+    set(CFLAGS_DBGREL   "-O2 -g ${CFLAGS_COMMON} -DNDEBUG")

     ###
     execute_process(


Updating ITK Superbuild version to include CMP0063 fix for vxl

Change-Id: I84443320a077ebe171194bd028544b3e1f3f232e

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -40,7 +40,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 0ab6b7b7dbcca3b91a4a4c3a57975d297046ef61 ) # just before 4.10.1 release
+set(ITK_TAG_COMMAND GIT_TAG 80178ae516db87aa50d2883c4e090da92c4a502d ) # just before 4.10.1 release

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


tweak cmake module search path order

tweak cmake module search path order

git-svn-id: 7720f8ced686bbe1e9a8fc98aef2dd4d5d9a3e92@50 995b7d7e-cf50-0410-b6c9-9f4ebe303554

--- CMakeModules/FindlibSquish.cmake
+++ CMakeModules/FindlibSquish.cmake
@@ -3,8 +3,8 @@
 #  LIBSQUISH_INCLUDE_DIR
 #  LIBSQUISH_LIBRARIES

-FIND_PATH(LIBSQUISH_INCLUDE_DIR squish.h PATHS . .. squish ../squish DOC "Directory containing libSquish headers")
-FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . .. squish ../squish DOC "Path to libSquish library")
+FIND_PATH(LIBSQUISH_INCLUDE_DIR squish.h PATHS . squish .. ../squish DOC "Directory containing libSquish headers")
+FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . squish .. ../squish DOC "Path to libSquish library")

 SET(LIBSQUISH_LIBRARIES ${LIBSQUISH_LIBRARY})


ffmpeg for linux needs libz

ffmpeg for linux needs libz

* fixes some undefined references at link time
* see issue https://github.com/smanders/externpro/issues/17

--- projects/use/usexp-ffmpeg-config.cmake
+++ projects/use/usexp-ffmpeg-config.cmake
@@ -39,6 +39,8 @@
     avutil${ver}
     swresample${ver}
     swscale${ver}
+    z # TODO this shouldn't be hard-coded
+    # https://stackoverflow.com/questions/27366433/linking-libavcodec-and-libavformat-undefined-references
     )
   link_directories(${XP_ROOTDIR}/lib)
   list(APPEND reqVars ${PRJ}_LIBRARIES)


Fix cmake build for legacy_seq2seq

Fix cmake build for legacy_seq2seq

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -310,6 +310,8 @@
 add_python_module("tensorflow/contrib/learn/python/learn/tests/dataframe")
 add_python_module("tensorflow/contrib/learn/python/learn/utils")
 add_python_module("tensorflow/contrib/legacy_seq2seq")
+add_python_module("tensorflow/contrib/legacy_seq2seq/python")
+add_python_module("tensorflow/contrib/legacy_seq2seq/python/ops")
 add_python_module("tensorflow/contrib/linalg")
 add_python_module("tensorflow/contrib/linalg/python")
 add_python_module("tensorflow/contrib/linalg/python/ops")


revert accidental checkin.

revert accidental checkin.

--- build_settings.cmake
+++ build_settings.cmake
@@ -53,14 +53,11 @@
 endif()

 # Find ccache and use it if it is found
-find_program(CCACHE_EXECUTABLE time)
+find_program(CCACHE_EXECUTABLE ccache)
 if(CCACHE_EXECUTABLE)
     set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_EXECUTABLE})
     set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_EXECUTABLE})
 endif()
-
-set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE /usr/bin/time)
-set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK /usr/bin/time)

 # Check for valgrind and set flags
 find_program(VALGRIND_EXECUTABLE valgrind)