More fixes for cross-compiling ARM64 targets

Fixed core naming for DYNAMIC_ARCH. Corrected GEMM_DEFAULT entries and added SYMV_P. Replaced outdated VULCAN define for ThunderX2T99 with ARMV8 to get basic definitions back. For issue #1908

--- cmake/prebuild.cmake
+++ cmake/prebuild.cmake
@@ -87,13 +87,18 @@
 # Cannot run getarch on target if we are cross-compiling
 if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSSTORE"))
   # Write to config as getarch would
+  if (DEFINED TARGET_CORE)
+  set(TCORE ${TARGET_CORE})
+  else()
+  set(TCORE ${CORE})
+  endif()

   # TODO: Set up defines that getarch sets up based on every other target
   # Perhaps this should be inside a different file as it grows larger
   file(APPEND ${TARGET_CONF_TEMP}
-    "#define ${CORE}\n"
-    "#define CHAR_CORENAME \"${CORE}\"\n")
-  if ("${CORE}" STREQUAL "ARMV7")
+    "#define ${TCORE}\n"
+    "#define CHAR_CORENAME \"${TCORE}\"\n")
+  if ("${TCORE}" STREQUAL "ARMV7")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_DATA_SIZE\t65536\n"
       "#define L1_DATA_LINESIZE\t32\n"
@@ -108,7 +113,7 @@
     set(SGEMM_UNROLL_N 4)
     set(DGEMM_UNROLL_M 4)
     set(DGEMM_UNROLL_N 4)
-  elseif ("${CORE}" STREQUAL "ARMV8")
+  elseif ("${TCORE}" STREQUAL "ARMV8")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_DATA_SIZE\t32768\n"
       "#define L1_DATA_LINESIZE\t64\n"
@@ -118,9 +123,16 @@
       "#define DTB_SIZE\t4096\n"
       "#define L2_ASSOCIATIVE\t32\n"
       "#define ARMV8\n")
-    set(SGEMM_UNROLL_M 4)
-    set(SGEMM_UNROLL_N 4)
-  elseif ("${CORE}" STREQUAL "CORTEXA57" OR "${CORE}" STREQUAL "CORTEXA53")
+    set(SGEMM_UNROLL_M 16)
+    set(SGEMM_UNROLL_N 4)
+    set(DGEMM_UNROLL_M 8)
+    set(DGEMM_UNROLL_N 4)
+    set(CGEMM_UNROLL_M 8)
+    set(CGEMM_UNROLL_N 4)
+    set(ZGEMM_UNROLL_M 4)
+    set(ZGEMM_UNROLL_N 4)
+    set(SYMV_P 16)
+  elseif ("${TCORE}" STREQUAL "CORTEXA57" OR "${TCORE}" STREQUAL "CORTEXA53")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_CODE_SIZE\t32768\n"
       "#define L1_CODE_LINESIZE\t64\n"
@@ -144,9 +156,10 @@
     set(DGEMM_UNROLL_N 4)
     set(CGEMM_UNROLL_M 8)
     set(CGEMM_UNROLL_N 4)
-    set(ZGEMM_UNROLL_M 8)
-    set(ZGEMM_UNROLL_N 4)
-  elseif ("${CORE}" STREQUAL "CORTEXA72" OR "${CORE}" STREQUAL "CORTEXA73")
+    set(ZGEMM_UNROLL_M 4)
+    set(ZGEMM_UNROLL_N 4)
+    set(SYMV_P 16)
+  elseif ("${TCORE}" STREQUAL "CORTEXA72" OR "${TCORE}" STREQUAL "CORTEXA73")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_CODE_SIZE\t49152\n"
       "#define L1_CODE_LINESIZE\t64\n"
@@ -170,9 +183,10 @@
     set(DGEMM_UNROLL_N 4)
     set(CGEMM_UNROLL_M 8)
     set(CGEMM_UNROLL_N 4)
-    set(ZGEMM_UNROLL_M 8)
-    set(ZGEMM_UNROLL_N 4)
-  elseif ("${CORE}" STREQUAL "FALKOR")
+    set(ZGEMM_UNROLL_M 4)
+    set(ZGEMM_UNROLL_N 4)
+    set(SYMV_P 16)
+  elseif ("${TCORE}" STREQUAL "FALKOR")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_CODE_SIZE\t65536\n"
       "#define L1_CODE_LINESIZE\t64\n"
@@ -196,9 +210,10 @@
     set(DGEMM_UNROLL_N 4)
     set(CGEMM_UNROLL_M 8)
     set(CGEMM_UNROLL_N 4)
-    set(ZGEMM_UNROLL_M 8)
-    set(ZGEMM_UNROLL_N 4)
-  elseif ("${CORE}" STREQUAL "THUNDERX")
+    set(ZGEMM_UNROLL_M 4)
+    set(ZGEMM_UNROLL_N 4)
+    set(SYMV_P 16)
+  elseif ("${TCORE}" STREQUAL "THUNDERX")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_CODE_SIZE\t32768\n"
       "#define L1_CODE_LINESIZE\t64\n"
@@ -224,7 +239,8 @@
     set(CGEMM_UNROLL_N 2)
     set(ZGEMM_UNROLL_M 2)
     set(ZGEMM_UNROLL_N 2)
-  elseif ("${CORE}" STREQUAL "THUNDERX2T99")
+    set(SYMV_P 16)
+  elseif ("${TCORE}" STREQUAL "THUNDERX2T99")
     file(APPEND ${TARGET_CONF_TEMP}
       "#define L1_CODE_SIZE\t32768\n"
       "#define L1_CODE_LINESIZE\t64\n"
@@ -240,15 +256,16 @@
       "#define L3_ASSOCIATIVE\t32\n"
       "#define DTB_DEFAULT_ENTRIES\t64\n"
       "#define DTB_SIZE\t4096\n"
-      "#define VULCAN\n")
-    set(SGEMM_UNROLL_M 16)
-    set(SGEMM_UNROLL_N 4)
-    set(DGEMM_UNROLL_M 8)
-    set(DGEMM_UNROLL_N 4)
-    set(CGEMM_UNROLL_M 8)
-    set(CGEMM_UNROLL_N 4)
-    set(ZGEMM_UNROLL_M 4)
-    set(ZGEMM_UNROLL_N 4)
+      "#define ARMV8\n")
+    set(SGEMM_UNROLL_M 16)
+    set(SGEMM_UNROLL_N 4)
+    set(DGEMM_UNROLL_M 8)
+    set(DGEMM_UNROLL_N 4)
+    set(CGEMM_UNROLL_M 8)
+    set(CGEMM_UNROLL_N 4)
+    set(ZGEMM_UNROLL_M 4)
+    set(ZGEMM_UNROLL_N 4)
+    set(SYMV_P 16)
   endif()

   # Or should this actually be NUM_CORES?


CMake: Sphinx: simplifying Win32 command

--- salome_adm/cmake_files/FindSalomeSphinx.cmake
+++ salome_adm/cmake_files/FindSalomeSphinx.cmake
@@ -38,7 +38,7 @@
 # Ensure the command is run with the given PYTHONPATH
 IF(WIN32 AND NOT CYGWIN)
    MESSAGE(WARNING "Sphinx windows command not re-tested.")
-   SET(SPHINX_EXECUTABLE set PYTHONPATH="${SPHINX_PYTHONPATH};%PYTHONPATH%" && ${SPHINX_EXECUTABLE})
+   SET(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE})
 ELSE()
    SET(SPHINX_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$$PYTHONPATH" ${SPHINX_EXECUTABLE})
 ENDIF()


cmake: Default to RelWithDebugInfo.

cmake: Default to RelWithDebugInfo.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -34,6 +34,10 @@
 OPTION( ENABLE_VLM             "Enable vlm" ON )
 OPTION( ENABLE_DYNAMIC_PLUGINS "Enable dynamic plugin" ON )
 OPTION( ENABLE_NO_SYMBOL_CHECK "Don't check symbols of modules against libvlc. (Enabling this option speeds up compilation)" ON )
+
+IF (NOT CMAKE_BUILD_TYPE)
+    SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING  "build type determining compiler flags" FORCE )
+endif(NOT CMAKE_BUILD_TYPE )

 set( HAVE_DYNAMIC_PLUGINS ${ENABLE_DYNAMIC_PLUGINS})
 set( LIBEXT ${CMAKE_SHARED_MODULE_SUFFIX})


Try simplifying FindFLINT.cmake.

Try simplifying FindFLINT.cmake.

--- cmake/FindFLINT.cmake
+++ cmake/FindFLINT.cmake
@@ -45,7 +45,7 @@
 # NOTE: this has been adapted from CMake's FindPNG.cmake.
 if(FLINT_FOUND AND NOT TARGET FLINT::FLINT)
     add_library(FLINT::FLINT UNKNOWN IMPORTED)
-    set_target_properties(FLINT::FLINT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FLINT_INCLUDE_DIR};${FLINT_INCLUDE_DIR}/flint"
+    set_target_properties(FLINT::FLINT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FLINT_INCLUDE_DIR}"
         IMPORTED_LINK_INTERFACE_LANGUAGES "C"
         IMPORTED_LOCATION "${FLINT_LIBRARY}")
 endif()


Fix find path mysql libs

Fix find path mysql libs

--- cmake/FindMySQL.cmake
+++ cmake/FindMySQL.cmake
@@ -4,6 +4,7 @@
 )
 find_library(MYSQL_LIBRARIES
     NAMES mysqlclient_r
+    PATH_SUFFIXES mysql
 )

 if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)


find_package(petsc) should not cause cmake to exit/fail

--- cmake/FindPetsc.cmake
+++ cmake/FindPetsc.cmake
@@ -10,16 +10,12 @@
 #         include/*.h
 #         lib/*.a

-macro(petscLibCheck libs isRequired)
+macro(petscLibCheck libs)
   foreach(lib ${libs})
     unset(petsclib CACHE)
     find_library(petsclib "${lib}" PATHS ${PETSC_LIB_DIR})
     if(petsclib MATCHES "^petsclib-NOTFOUND$")
-      if(${isRequired})
-        message(FATAL_ERROR "PETSC library ${lib} not found in ${PETSC_LIB_DIR}")
-      else()
-        message("PETSC library ${lib} not found in ${PETSC_LIB_DIR}")
-      endif()
+      message("PETSC library ${lib} not found in ${PETSC_LIB_DIR}")
     else()
       set("PETSC_${lib}_FOUND" TRUE CACHE INTERNAL "PETSC library present")
       set(PETSC_LIBS ${PETSC_LIBS} ${petsclib})
@@ -75,13 +71,13 @@
   )
 endif()

-petscLibCheck("${PETSC_LIB_NAMES}" TRUE)
+petscLibCheck("${PETSC_LIB_NAMES}")

 find_path(PETSC_INCLUDE_DIR
   NAMES petsc.h
   PATHS ${PETSC_INCLUDE_DIR})
 if(NOT EXISTS "${PETSC_INCLUDE_DIR}")
-  message(FATAL_ERROR "PETSC include dir not found")
+  message("PETSC include dir not found")
 endif()

 set(PETSC_LIBRARIES ${PETSC_LIBS} )


add link directories to use_pkg() cmake macro

--- cmake/dd-macros.cmake
+++ cmake/dd-macros.cmake
@@ -33,4 +33,7 @@

   set_target_properties(${target} PROPERTIES COMPILE_FLAGS ${_cflags_str})
   set_target_properties(${target} PROPERTIES LINK_FLAGS ${_ldflags_str})
+  link_directories(${${cachevar}_pkgconfig_LIBRARY_DIRS})
+  target_link_libraries(${target} ${${cachevar}_pkgconfig_LIBRARIES})
+
 endmacro()


forgot to disable more of GTest

forgot to disable more of GTest

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

--- cmake/pcl_tests.cmake
+++ cmake/pcl_tests.cmake
@@ -23,17 +23,17 @@
     endif(REASON)
 elseif(NOT ${BUILD_TESTS})
     message(STATUS "Tests will not be built: Disabled manually")
-else(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})
-    if(GTEST_FOUND)
-        message(STATUS "Tests will be built")
-    else(GTEST_FOUND)
-        set (BUILD_TESTS OFF CACHE BOOL "Tests can not be built!" FORCE)
-    endif(GTEST_FOUND)
+    #else(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})
+#    if(GTEST_FOUND)
+#        message(STATUS "Tests will be built")
+#    else(GTEST_FOUND)
+#        set (BUILD_TESTS OFF CACHE BOOL "Tests can not be built!" FORCE)
+#    endif(GTEST_FOUND)
 endif(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})

 # Set up for testing if tests are enabled
 if(BUILD_TESTS)
     enable_testing()
-    include_directories(${GTEST_INCLUDE_DIRS})
+#    include_directories(${GTEST_INCLUDE_DIRS})
 endif(BUILD_TESTS)


use last CIL stable version

use last CIL stable version

--- version_config.cmake
+++ version_config.cmake
@@ -164,13 +164,14 @@
   set(DEFAULT_ACE_TAG origin/master)

   # CCPi CIL
-  set(CIL_VERSION "19.06")
+  set(CIL_VERSION "v19.07")
+  set(RGL_VERSION "19.06")
   set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git)
-  set(DEFAULT_CCPi-Framework_TAG origin/master)
+  set(DEFAULT_CCPi-Framework_TAG ${CIL_VERSION})
   set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git )
-  set(DEFAULT_CCPi-RGL_TAG "${CIL_VERSION}")
+  set(DEFAULT_CCPi-RGL_TAG "${RGL_VERSION}")
   set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
-  set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)
+  set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}")
 else()
   # set(DEFAULT_SIRF_TAG v2.0.0)
   set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes)


[brief] Adds compiler settings for Intel.

[detailed]
- Minor fix on the way the compilers are recognized.
- Adds warning suppression for Atlas library code for Windows. Linux
  soon to follow.

--- config/Compiler.cmake
+++ config/Compiler.cmake
@@ -3,7 +3,7 @@
 #================================

 # First identify the compiler we're using.
-if (MSVC)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
     if ((MSVC_VERSION VERSION_GREATER 1800))
         set(ATLAS_COMPILER_MSVC 1)
         message(STATUS "Using MSVC ${MSVC_VERSION}...")
@@ -29,6 +29,16 @@
         )
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ZI")
+elseif(ATLAS_COMPILER_INTEL)
+    message(STATUS "Here")
+    if(WIN32)
+        message(STATUS "Over here")
+        add_definitions(
+            /Qdiag-disable:82,3346,3280,1879
+            )
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ZI")
+    endif()
 else()
     set(CMAKE_CXX_FLAGS_DEBUG "-g")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++14")


"make TOOL" does currently not work -> comment out

--- cmake/BALLTargets.cmake
+++ cmake/BALLTargets.cmake
@@ -8,7 +8,7 @@
 		COMMAND ${CMAKE_COMMAND} -E echo " (a) Libraries:"
 		COMMAND ${CMAKE_COMMAND} -E echo "    BALL            builds the BALL library"
 		COMMAND ${CMAKE_COMMAND} -E echo "    VIEW            builds the VIEW library"
-                COMMAND ${CMAKE_COMMAND} -E echo "    TOOLS           builds BALLs tools"
+		#	COMMAND ${CMAKE_COMMAND} -E echo "    TOOLS           builds BALLs tools"
 		COMMAND ${CMAKE_COMMAND} -E echo ""
 		COMMAND ${CMAKE_COMMAND} -E echo " (b) Applications:"
 		COMMAND ${CMAKE_COMMAND} -E echo "    BALLView        builds the viewer/modeller BALLView"
@@ -38,7 +38,7 @@
 		COMMAND ${CMAKE_COMMAND} -E echo " (a) Libraries:"
 		COMMAND ${CMAKE_COMMAND} -E echo "    BALL            builds the BALL library"
 		COMMAND ${CMAKE_COMMAND} -E echo "    VIEW            builds the VIEW library"
-                COMMAND ${CMAKE_COMMAND} -E echo "    TOOLS           builds BALLs tools"
+		#	COMMAND ${CMAKE_COMMAND} -E echo "    TOOLS           builds BALLs tools"
 		COMMAND ${CMAKE_COMMAND} -E echo ""
 		COMMAND ${CMAKE_COMMAND} -E echo " (b) Applications:"
 		COMMAND ${CMAKE_COMMAND} -E echo "    BALLView        builds the viewer/modeller BALLView"


better atomic check

better atomic check

--- cmake/CheckAtomic.cmake
+++ cmake/CheckAtomic.cmake
@@ -2,10 +2,18 @@
 include(CheckCSourceCompiles)

 check_c_source_compiles("
+#include <stdio.h>
+#include <stdlib.h>

 int main() {
-  int val = 0;
-  __sync_lock_test_and_set(&val, 1);
+  static volatile unsigned long val = 0;
+  unsigned long u =  __sync_add_and_fetch(&val, 1);
+
+  if(u - 1 == 0) {
+    return 0;
+  }
+
+  return 1;
 }

 " HAVE_ATOMIC_BUILTIN)


cursesw cmake configuration corrections.

--- cmake/FindCursesW.cmake
+++ cmake/FindCursesW.cmake
@@ -128,12 +128,16 @@
 MARK_AS_ADVANCED(
   CURSESW_INCLUDE_PATH
   CURSESW_LIBRARY
+  CURSESW_HAVE_CURSESW_CURSES_H
+  CURSESW_CURSESW_H_PATH
   CURSESW_CURSESW_INCLUDE_PATH
   CURSESW_CURSESW_LIBRARY
+  CURSESW_HAVE_NCURSESW_NCURSES_H
+  CURSESW_HAVE_NCURSESW_CURSES_H
   CURSESW_NCURSESW_INCLUDE_PATH
   CURSESW_NCURSESW_LIBRARY
   CURSESW_EXTRA_LIBRARY
-  FORM_LIBRARY
+  CURSESW_FORM_LIBRARY
   CURSESW_LIBRARIES
   CURSESW_INCLUDE_DIR
   CURSESW_CURSES_HAS_WSYNCUP


Fix typo

Fix typo

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

--- cmake/FindLog4cxx.cmake
+++ cmake/FindLog4cxx.cmake
@@ -10,9 +10,9 @@

 IF(LOG4CXX_INCLUDE_DIR AND LOG4CXX_LIBRARIES)
   SET(Log4cxx_FOUND 1)
-  if(NOT LOG4CXX_FIND_QUIETLY)
+  if(NOT Log4cxx_FIND_QUIETLY)
    message(STATUS "Found log4cxx: ${LOG4CXX_LIBRARIES}")
-  endif(NOT LOG4CXX_FIND_QUIETLY)
+  endif(NOT Log4cxx_FIND_QUIETLY)
 ELSE(LOG4CXX_INCLUDE_DIR AND LOG4CXX_LIBRARIES)
   SET(Log4cxx_FOUND 0 CACHE BOOL "Not found log4cxx library")
   message(STATUS "NOT Found log4cxx, disabling it")


FindPackageHandleStandardArgs.cmake is distributed with CMake

--- cmake/FindSQLite3.cmake
+++ cmake/FindSQLite3.cmake
@@ -48,7 +48,6 @@
     unset(_ver_line)
 endif()

-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 find_package_handle_standard_args(SQLite3
     REQUIRED_VARS SQLite3_INCLUDE_DIR SQLite3_LIBRARY
     VERSION_VAR SQLite3_VERSION)


cmake: support Linux and Apple to embed file

--- cmake/embed_files.cmake
+++ cmake/embed_files.cmake
@@ -8,8 +8,15 @@
         file(RELATIVE_PATH rel_path_with_file ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${in_f})
         get_filename_component(rel_path ${rel_path_with_file} DIRECTORY)
         file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${rel_path})
+
+        if (APPLE)
+            set(binary_options -sectcreate binary)
+        else()
+            set(binary_options -b binary)
+        endif()
+
         add_custom_command(OUTPUT ${out_f}
-            COMMAND ld -r -b binary -o ${out_f} ${CMAKE_CURRENT_SOURCE_DIR}/${in_f}
+            COMMAND ld -r ${binary_options} -o ${out_f} ${CMAKE_CURRENT_SOURCE_DIR}/${in_f}
             DEPENDS ${in_f}
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
             COMMENT "Adding resource ${in_f}"


r9338/sofa : UPDATE: [CMake] makes probably more sense to remove SOFA_DEBUG compilation flag when compiling in release with debug info.

Former-commit-id: 30a90cb029445819d25ae9a7178891c870410165

--- cmake/environment.cmake
+++ cmake/environment.cmake
@@ -40,6 +40,6 @@
     list(APPEND GLOBAL_COMPILER_DEFINES "NDEBUG")
 endif()

-if(CMAKE_BUILD_TYPE MATCHES "Debug" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
+if(CMAKE_BUILD_TYPE MATCHES "Debug")
     list(APPEND GLOBAL_COMPILER_DEFINES "SOFA_DEBUG")
 endif()


Add macro to generate subsystem centric documentation

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -539,26 +539,65 @@
     endforeach(subdir)
 endmacro()

-macro(PCL_DISABLE_DEPENDIES subsys)
-    string(TOUPPER "pcl_${subsys}_dependies" PCL_SUBSYS_DEPENDIES)
+########################################################################################
+# Macro to disable subsystem dependies
+# _subsys IN subsystem name
+macro(PCL_DISABLE_DEPENDIES _subsys)
+    string(TOUPPER "pcl_${_subsys}_dependies" PCL_SUBSYS_DEPENDIES)
     if(NOT ("${${PCL_SUBSYS_DEPENDIES}}" STREQUAL ""))
         foreach(dep ${${PCL_SUBSYS_DEPENDIES}})
-            PCL_SET_SUBSYS_HYPERSTATUS(${subsys} ${dep} AUTO_OFF "Automatically disabled.")
+            PCL_SET_SUBSYS_HYPERSTATUS(${_subsys} ${dep} AUTO_OFF "Automatically disabled.")
             set(BUILD_${dep} OFF CACHE BOOL "Automatically disabled ${dep}" FORCE)
         endforeach(dep)
     endif(NOT ("${${PCL_SUBSYS_DEPENDIES}}" STREQUAL ""))
 endmacro(PCL_DISABLE_DEPENDIES subsys)

-macro(PCL_ENABLE_DEPENDIES subsys)
-    string(TOUPPER "pcl_${subsys}_dependies" PCL_SUBSYS_DEPENDIES)
+########################################################################################
+# Macro to enable subsystem dependies
+# _subsys IN subsystem name
+macro(PCL_ENABLE_DEPENDIES _subsys)
+    string(TOUPPER "pcl_${_subsys}_dependies" PCL_SUBSYS_DEPENDIES)
     if(NOT ("${${PCL_SUBSYS_DEPENDIES}}" STREQUAL ""))
         foreach(dep ${${PCL_SUBSYS_DEPENDIES}})
-            PCL_GET_SUBSYS_HYPERSTATUS(dependee_status ${subsys} ${dep})
+            PCL_GET_SUBSYS_HYPERSTATUS(dependee_status ${_subsys} ${dep})
             if("${dependee_status}" STREQUAL "AUTO_OFF")
-                PCL_SET_SUBSYS_HYPERSTATUS(${subsys} ${dep} AUTO_ON)
+                PCL_SET_SUBSYS_HYPERSTATUS(${_subsys} ${dep} AUTO_ON)
                 GET_IN_MAP(desc PCL_SUBSYS_DESC ${dep})
                 set(BUILD_${dep} ON CACHE BOOL "${desc}" FORCE)
             endif("${dependee_status}" STREQUAL "AUTO_OFF")
         endforeach(dep)
     endif(NOT ("${${PCL_SUBSYS_DEPENDIES}}" STREQUAL ""))
 endmacro(PCL_ENABLE_DEPENDIES subsys)
+
+########################################################################################
+# Macro to build subsystem centric documentation
+# _subsys IN the name of the subsystem to generate documentation for
+macro (PCL_ADD_DOC _subsys)
+  string(TOUPPER "${_subsys}" SUBSYS)
+  set(doc_subsys "doc_${_subsys}")
+  GET_IN_MAP(dependencies PCL_SUBSYS_DEPS ${_subsys})
+  if(DOXYGEN_FOUND)
+    if(HTML_HELP_COMPILER)
+      set(DOCUMENTATION_HTML_HELP YES)
+    else(HTML_HELP_COMPILER)
+      set(DOCUMENTATION_HTML_HELP NO)
+    endif(HTML_HELP_COMPILER)
+    if(NOT "${dependencies}" STREQUAL "")
+      set(STRIPPED_HEADERS "${PCL_SOURCE_DIR}/${dependencies}/include")
+      string(REPLACE ";" "/include \\\n\t\t\t\t\t\t\t\t\t\t\t\t ${PCL_SOURCE_DIR}/"
+             STRIPPED_HEADERS "${STRIPPED_HEADERS}")
+    endif(NOT "${dependencies}" STREQUAL "")
+    set(DOC_SOURCE_DIR "\"${CMAKE_CURRENT_SOURCE_DIR}\"\\")
+    foreach(dep ${dependencies})
+      set(DOC_SOURCE_DIR
+          "${DOC_SOURCE_DIR}\n\t\t\t\t\t\t\t\t\t\t\t\t \"${PCL_SOURCE_DIR}/${dep}\"\\")
+    endforeach(dep)
+    file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")
+    set(doxyfile "${CMAKE_CURRENT_BINARY_DIR}/doxyfile")
+    configure_file("${PCL_SOURCE_DIR}/doc/doxygen/doxyfile.in" ${doxyfile})
+    add_custom_target(${doc_subsys} ${DOXYGEN_EXECUTABLE} ${doxyfile})
+    # if(USE_PROJECT_FOLDERS)
+    #   set_target_properties(${doc_subsys} PROPERTIES FOLDER "Documentation")
+    # endif(USE_PROJECT_FOLDERS)
+  endif(DOXYGEN_FOUND)
+endmacro(PCL_ADD_DOC)


Remove FIPS_EMSCRIPTEN_USE_CWRAP, this doesn't seem to be necessary anymore

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -47,7 +47,6 @@
 set(FIPS_POSIX 1)

 # tweakable options
-option(FIPS_EMSCRIPTEN_USE_CWRAP "emscripten: enable cwrap/ccall functions" OFF)
 option(FIPS_EMSCRIPTEN_USE_FS "emscripten: enable FS module" OFF)
 option(FIPS_EMSCRIPTEN_USE_DFE "emscripten: enable Duplicate Function Elimination" OFF)
 option(FIPS_EMSCRIPTEN_USE_WASM "emscripten: enable WebAssembly (experimental)" OFF)
@@ -90,9 +89,6 @@
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
 endif()

-if (FIPS_EMSCRIPTEN_USE_CWRAP)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['cwrap','ccall']\"")
-endif()
 if (FIPS_EMSCRIPTEN_USE_WASM_TRAP_MODE_CLAMP)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s \"BINARYEN_TRAP_MODE='clamp'\"")
 endif()


Fix libpf not found

Fix libpf not found

--- cmake/FindPF.cmake
+++ cmake/FindPF.cmake
@@ -13,9 +13,9 @@
 find_library(PF_LIBRARY_MV2 NAMES mv2_d1280_640)
 find_library(PF_LIBRARY_PFCAM NAMES pfcam)

+set(PF_LIBRARIES ${PF_LIBRARY_MV2} ${PF_LIBRARY_PFCAM} ${PF_LIBRARY_COMDLL})
+
 find_package_handle_standard_args(PF DEFAULT_MSG PF_LIBRARIES PF_INCLUDE_DIRS)
-
-set(PF_LIBRARIES ${PF_LIBRARY_MV2} ${PF_LIBRARY_PFCAM} ${PF_LIBRARY_COMDLL})

 mark_as_advanced(
     PF_INCLUDE_DIRS


Clang-Tidy: only show issues for libCellML's headers.

I.e. we don't want to see issues for automatically generated header files or third-party header files.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -161,8 +161,16 @@
     if(LIBCELLML_TREAT_WARNINGS_AS_ERRORS)
       set(_CLANG_TIDY_WARNINGS_AS_ERRORS ";-warnings-as-errors=${_CLANG_TIDY_WARNINGS}")
     endif()
+
+    file(RELATIVE_PATH _RELATIVE_SOURCE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src)
+    set(_RELATIVE_SOURCE_PATH "${CMAKE_BINARY_DIR}/${_RELATIVE_SOURCE_PATH}")
+    string(REPLACE "." "\\\."
+           _RELATIVE_SOURCE_PATH "${_RELATIVE_SOURCE_PATH}")
+    string(REPLACE "/" "\\\/"
+           _RELATIVE_SOURCE_PATH "${_RELATIVE_SOURCE_PATH}")
+
     set_target_properties(${_TARGET} PROPERTIES
-      CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-checks=${_CLANG_TIDY_WARNINGS};-header-filter=.*${_CLANG_TIDY_WARNINGS_AS_ERRORS}"
+      CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-checks=${_CLANG_TIDY_WARNINGS};-header-filter=${_RELATIVE_SOURCE_PATH}\\\/.*${_CLANG_TIDY_WARNINGS_AS_ERRORS}"
     )
   endif()
 endfunction()


ARC: MWDT: add C++14, C++17 standards support

Add missing properties for C++14, C++17 standards support

Signed-off-by: Eugeniy Paltsev <ec089b543c2604b626d7ce60c03e4d074ed102c7@synopsys.com>
Signed-off-by: Evgeniy Paltsev <7de4ab8b01334d64e4e84734c688a8a936513edc@gmail.com>

--- cmake/compiler/arcmwdt/compiler_flags.cmake
+++ cmake/compiler/arcmwdt/compiler_flags.cmake
@@ -125,10 +125,10 @@
 # C++ std options
 set_property(TARGET compiler-cpp PROPERTY dialect_cpp98 "-std=c++98")
 set_property(TARGET compiler-cpp PROPERTY dialect_cpp11 "-std=c++11")
+set_property(TARGET compiler-cpp PROPERTY dialect_cpp14 "-std=c++14")
+set_property(TARGET compiler-cpp PROPERTY dialect_cpp17 "-std=c++17")

-#no support of C++14, C++17, C++2a, C++20, C++2b
-set_property(TARGET compiler-cpp PROPERTY dialect_cpp14 "")
-set_property(TARGET compiler-cpp PROPERTY dialect_cpp17 "")
+#no support of C++2a, C++20, C++2b
 set_property(TARGET compiler-cpp PROPERTY dialect_cpp2a "")
 set_property(TARGET compiler-cpp PROPERTY dialect_cpp20 "")
 set_property(TARGET compiler-cpp PROPERTY dialect_cpp2b "")


Detect CentOS 7 in CMake

Detect CentOS 7 in CMake

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -21,6 +21,7 @@
         SET(MACOS_VERSION ${VERSION})
         SET(HOST_SYSTEM "macosx")
     ELSE(APPLE)
+
         IF(EXISTS "/etc/issue")
             FILE(READ "/etc/issue" LINUX_ISSUE)
             IF(LINUX_ISSUE MATCHES "CentOS")
@@ -31,6 +32,14 @@
                 SET(HOST_SYSTEM "ubuntu")
             ENDIF()
         ENDIF(EXISTS "/etc/issue")
+
+        IF(EXISTS "/etc/redhat-release")
+            FILE(READ "/etc/redhat-release" LINUX_ISSUE)
+            IF(LINUX_ISSUE MATCHES "CentOS")
+                SET(HOST_SYSTEM "centos")
+            ENDIF()
+        ENDIF(EXISTS "/etc/redhat-release")
+
     ENDIF(APPLE)
 ENDIF(WIN32)


px4fmu-v2_default disable lis3mdl

px4fmu-v2_default disable lis3mdl

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -51,7 +51,7 @@
 	#drivers/iridiumsbd
 	#drivers/irlock
 	drivers/magnetometer/hmc5883
-	drivers/magnetometer/lis3mdl
+	#drivers/magnetometer/lis3mdl
 	#drivers/mb12xx
 	#drivers/mkblctrl
 	#drivers/oreoled


px4fmu-v2_default disable ms5525

px4fmu-v2_default disable ms5525

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -30,7 +30,7 @@
 	#drivers/camera_trigger
 	#drivers/differential_pressure/ets
 	drivers/differential_pressure/ms4525
-	drivers/differential_pressure/ms5525
+	#drivers/differential_pressure/ms5525
 	#drivers/differential_pressure/sdp3x
 	drivers/distance_sensor/ll40ls
 	#drivers/distance_sensor/mb12xx


Use system freetype library if found

Use system freetype library if found

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -142,32 +142,35 @@
     execute_process(COMMAND ${CMAKE_COMMAND}
         --build ${PROJECT_BINARY_DIR}/ZZIPlib-master ${BUILD_COMMAND_OPTS})

-    message(STATUS "Building freetype")
-    file(DOWNLOAD
-        https://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.gz
-        ${PROJECT_BINARY_DIR}/freetype-2.9.tar.gz)
-    execute_process(COMMAND ${CMAKE_COMMAND}
-        -E tar xf freetype-2.9.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
-    # patch toolchain for iOS
-    execute_process(COMMAND ${CMAKE_COMMAND} -E copy
-        ${PROJECT_SOURCE_DIR}/CMake/toolchain/ios.toolchain.xcode.cmake
-        freetype-2.9/builds/cmake/iOS.cmake
-		WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
-    execute_process(COMMAND ${CMAKE_COMMAND}
-        -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
-        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-        -DBUILD_SHARED_LIBS=${OGREDEPS_SHARED}
-        -DWITH_PNG=OFF
-        -DWITH_BZip2=OFF # tries to use it on iOS otherwise
-        # workaround for broken iOS toolchain in freetype
-        -DPROJECT_SOURCE_DIR=${PROJECT_BINARY_DIR}/freetype-2.9
-        ${CROSS}
-        -G ${CMAKE_GENERATOR}
-        -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-        ${PROJECT_BINARY_DIR}/freetype-2.9
-        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/freetype-2.9/objs)
-    execute_process(COMMAND ${CMAKE_COMMAND}
-        --build ${PROJECT_BINARY_DIR}/freetype-2.9/objs ${BUILD_COMMAND_OPTS})
+    find_package(Freetype)
+    if (NOT FREETYPE_FOUND)
+        message(STATUS "Building freetype")
+        file(DOWNLOAD
+            https://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.gz
+            ${PROJECT_BINARY_DIR}/freetype-2.9.tar.gz)
+        execute_process(COMMAND ${CMAKE_COMMAND}
+            -E tar xf freetype-2.9.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
+        # patch toolchain for iOS
+        execute_process(COMMAND ${CMAKE_COMMAND} -E copy
+            ${PROJECT_SOURCE_DIR}/CMake/toolchain/ios.toolchain.xcode.cmake
+            freetype-2.9/builds/cmake/iOS.cmake
+            WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
+        execute_process(COMMAND ${CMAKE_COMMAND}
+            -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
+            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+            -DBUILD_SHARED_LIBS=${OGREDEPS_SHARED}
+            -DWITH_PNG=OFF
+            -DWITH_BZip2=OFF # tries to use it on iOS otherwise
+            # workaround for broken iOS toolchain in freetype
+            -DPROJECT_SOURCE_DIR=${PROJECT_BINARY_DIR}/freetype-2.9
+            ${CROSS}
+            -G ${CMAKE_GENERATOR}
+            -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
+            ${PROJECT_BINARY_DIR}/freetype-2.9
+            WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/freetype-2.9/objs)
+        execute_process(COMMAND ${CMAKE_COMMAND}
+            --build ${PROJECT_BINARY_DIR}/freetype-2.9/objs ${BUILD_COMMAND_OPTS})
+    endif()

     if(MSVC OR MINGW) # other platforms dont need this
         message(STATUS "Building SDL2")


Disabling X11 check for all Apple platforms. Because it may not always be available on the system.

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -72,7 +72,7 @@
 macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" TRUE "" "")

 # Find X11
-if (UNIX AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+if (UNIX AND NOT APPLE)
   find_package(X11)
   macro_log_feature(X11_FOUND "X11" "X Window system" "http://www.x.org" TRUE "" "")
   macro_log_feature(X11_Xt_FOUND "Xt" "X Toolkit" "http://www.x.org" TRUE "" "")


STYLE: ExternalData: Quote string(SUBSTRING) input argument

Ensure the input argument exists even when the ${output} is empty.

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -238,7 +238,7 @@
     # TODO: Errors
     execute_process(COMMAND "${CMAKE_COMMAND}" -E md5sum "${file}"
       OUTPUT_VARIABLE output)
-    string(SUBSTRING ${output} 0 32 hash)
+    string(SUBSTRING "${output}" 0 32 hash)
     set("${var_hash}" "${hash}" PARENT_SCOPE)
   else()
     # TODO: Other hashes.


fix finding pthreads cmake macro

fix finding pthreads cmake macro

--- CMake/FindPThreads.cmake
+++ CMake/FindPThreads.cmake
@@ -3,15 +3,15 @@
 # PThreads_INCLUDE_DIRS - the PThreads include directory
 # PThreads_LIBRARIES - Libraries needed to use PThreads

-if (PThreads_INCLUDE_DIR AND PThreads_LIBRARIES)
+if (PThreads_INCLUDE_DIRS AND PThreads_LIBRARIES)
 		# Already in cache, be silent
 		set(PThreads_FIND_QUIETLY TRUE)
-endif (PThreads_INCLUDE_DIR AND PThreads_LIBRARIES)
+endif (PThreads_INCLUDE_DIRS AND PThreads_LIBRARIES)

-find_path(PThreads_INCLUDE_DIR NAMES pthread.h )
+find_path(PThreads_INCLUDE_DIRS NAMES pthread.h )
 find_library(PThreads_LIBRARIES NAMES pthreads libpthreads )

 include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PThreads DEFAULT_MSG PThreads_INCLUDE_DIR PThreads_LIBRARIES)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PThreads DEFAULT_MSG PThreads_INCLUDE_DIRS PThreads_LIBRARIES)

-mark_as_advanced(PThreads_INCLUDE_DIR PThreads_LIBRARIES)+mark_as_advanced(PThreads_INCLUDE_DIRS PThreads_LIBRARIES)


Adapted CTK external project script for Qt4 and Qt5.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -53,6 +53,14 @@
           )
     endif()

+    set (ctk_qt_args -DCTK_QT_VERSION:STRING=${DESIRED_QT_VERSION})
+
+    if (DESIRED_QT_VERSION MATCHES "5")
+      list(APPEND ctk_qt_args -DQT5_INSTALL_PREFIX:FILEPATH=${QT5_INSTALL_PREFIX})
+    else()
+      list(APPEND ctk_qt_args -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
+    endif()
+
     FOREACH(type RUNTIME ARCHIVE LIBRARY)
       IF(DEFINED CTK_PLUGIN_${type}_OUTPUT_DIRECTORY)
         LIST(APPEND mitk_optional_cache_args -DCTK_PLUGIN_${type}_OUTPUT_DIRECTORY:PATH=${CTK_PLUGIN_${type}_OUTPUT_DIRECTORY})
@@ -71,8 +79,7 @@
       CMAKE_ARGS
         ${ep_common_args}
         ${ctk_optional_cache_args}
-        -DDESIRED_QT_VERSION:STRING=${DESIRED_QT_VERSION}
-        -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+        ${ctk_qt_args}
         -DGit_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
         -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
         -DCTK_LIB_CommandLineModules/Backend/LocalProcess:BOOL=ON


Use new CTK for command line module support.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag f25f19e5)
+    set(revision_tag 4e6ac62e)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -49,7 +49,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 70fadbc62ec5c7d83a6e672fd5be36b1
+      URL_MD5 dc553f3da6591d490b4175fb66892276
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


Supressed a new clang-warning in latest emscripten (-Wno-expansion-to-defined)

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -181,13 +181,13 @@
 set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include")

 # c++ compiler flags
-set(CMAKE_CXX_FLAGS "${EMSC_COMMON_FLAGS} ${EMSC_CXX_FLAGS} -std=c++11 -stdlib=libc++ -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override -Wno-warn-absolute-paths")
+set(CMAKE_CXX_FLAGS "${EMSC_COMMON_FLAGS} ${EMSC_CXX_FLAGS} -std=c++11 -stdlib=libc++ -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override -Wno-warn-absolute-paths -Wno-expansion-to-defined")
 set(CMAKE_CXX_FLAGS_RELEASE "${EMSCRIPTEN_OPT} -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
 set(CMAKE_CXX_FLAGS_PROFILING "${EMSCRIPTEN_OPT} -DNDEBUG --profiling")

 # c compiler flags
-set(CMAKE_C_FLAGS "${EMSC_COMMON_FLAGS} -fstrict-aliasing -Wall -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-warn-absolute-paths")
+set(CMAKE_C_FLAGS "${EMSC_COMMON_FLAGS} -fstrict-aliasing -Wall -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-warn-absolute-paths -Wno-expansion-to-defined")
 set(CMAKE_C_FLAGS_RELEASE "${EMSCRIPTEN_OPT} -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
 set(CMAKE_C_FLAGS_PROFILING "${EMSCRIPTEN_OPT} -DNDEBUG --profiling")


COMP Fixed itk patch filename

COMP Fixed itk patch filename

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -51,7 +51,7 @@
   set(vcl_constexpr_patch)
   if(GCC_VERSION VERSION_LESS 4.7 AND GCC_VERSION VERSION_GREATER 4)
     set(vcl_constexpr_patch
-      COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/ITK-4.7777777.1-gcc-4.6.patch
+      COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/ITK-4.7.1-gcc-4.6.patch
     )
   endif()


Update FW: IMX577 proper support (0577 sensor ID)

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "25e22d27838d599121d1b6d9fc131456efc49a46")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "90da733dd5519e805ac5563d13cc4b0516ddb5c3")

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


Update FW with rgb-depth sync

Update FW with rgb-depth sync

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "58b9f5633728f6c3f6b36cc1d06c707d076f85a2")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "6d99fda9ff265548d22f76e1d775f3a8936f0179")

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


Fixed NN bug

Fixed NN bug

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "e944a7737a6209e91d9cadaf8897dabc93fcf255")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "97b0219c954de22149a28fe31c373ee2bb0655a8")

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


Do not test for rand_r on cygwin platforms

--- cmake/checks/check_02_system_features.cmake
+++ cmake/checks/check_02_system_features.cmake
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2014 by the deal.II authors
+## Copyright (C) 2012 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -52,7 +52,9 @@
 CHECK_CXX_SYMBOL_EXISTS("gethostname" "unistd.h" DEAL_II_HAVE_GETHOSTNAME)
 CHECK_CXX_SYMBOL_EXISTS("getpid" "unistd.h" DEAL_II_HAVE_GETPID)

-CHECK_CXX_SYMBOL_EXISTS("rand_r" "stdlib.h" DEAL_II_HAVE_RAND_R)
+IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+  CHECK_CXX_SYMBOL_EXISTS("rand_r" "stdlib.h" DEAL_II_HAVE_RAND_R)
+ENDIF()

 #
 # Do we have the Bessel function jn?


only build libcmaes lib with no exe when build from ROOT cmake

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -490,7 +490,7 @@
       PREFIX cma
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       URL https://github.com/beniz/libcmaes/archive/master.tar.gz
-      CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=<INSTALL_DIR> --with-eigen3-include=${CMAKE_BINARY_DIR}/include/eigen3
+      CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=<INSTALL_DIR> --with-eigen3-include=${CMAKE_BINARY_DIR}/include/eigen3 --enable-onlylib
       BUILD_IN_SOURCE 1
       )
     set(LIBCMAES_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include/libcmaes ${CMAKE_BINARY_DIR}/include/eigen3)


Fix bug in `darwin_test_archs()` when the cache variable is set but empty.

Summary:
If the cache variable named in `${valid_archs}` (e.g. `DARWIN_osx_BUILTIN_ARCHS`)
is set in the cache but is empty then the cache check
`if(${valid_archs})` will be false so the function will probe the
compiler but the `set(...)` command at the end of the function to update
the cache variable will be a no-op. This is because `set(...)` will not
update an existing cache variable unless the `FORCE` argument is
provided.

To fix this this patch adds `FORCE` so the cache is always updated.

rdar://problem/55323665

Reviewers: vsk, kubamracek

Subscribers: mgorny, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D67530

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -113,7 +113,7 @@
     endif()
   endforeach()
   set(${valid_archs} ${working_archs}
-    CACHE STRING "List of valid architectures for platform ${os}.")
+    CACHE STRING "List of valid architectures for platform ${os}." FORCE)
 endfunction()

 # This function checks the host cpusubtype to see if it is post-haswell. Haswell


Add `vtkCommonColor` to `vtkChartsCoreCxxTests`.

Change-Id: Idefe07403bdd8c55a293e3a770d20292fc1bc978

--- Charts/Core/module.cmake
+++ Charts/Core/module.cmake
@@ -6,6 +6,7 @@
     vtkRenderingContext2D
     vtkInfovisCore # Needed for plot parallel coordinates vtkStringToCategory
   TEST_DEPENDS
+    vtkCommonColor
     vtkTestingCore
     vtkTestingRendering
     vtkViewsContext2D


ADD: Filter that extracts an arbitrary oriented plane out of a 3D or 4D image. Returns a 2D mitk::Image. Does mostly the same as ImageMapper2D with rotated planes.

--- Core/Algorithms/files.cmake
+++ Core/Algorithms/files.cmake
@@ -14,6 +14,7 @@
   mitkDiffImageApplier.cpp
   mitkDopplerToStrainRateFilter.cpp
   mitkExtractImageFilter.cpp
+  mitkExtractDirectedPlaneImageFilter.cpp
   mitkGeometry2DDataToSurfaceFilter.cpp
   mitkGeometryClipImageFilter.cpp
   mitkGeometryDataSource.cpp


COMP: Find Qt5Widgets.

COMP: Find Qt5Widgets.

--- Applications/PluginGenerator/ProjectTemplate/CMakeExternals/MITK.cmake
+++ Applications/PluginGenerator/ProjectTemplate/CMakeExternals/MITK.cmake
@@ -64,6 +64,8 @@
   if(MITK_USE_Qt4)
     # Look for Qt at the superbuild level, to catch missing Qt libs early
     find_package(Qt4 4.7 REQUIRED)
+  elseif(MITK_USE_Qt5)
+    find_package(Qt5Widgets REQUIRED)
   endif()

   set(additional_mitk_cmakevars )


ARROW-4831: [C++] CMAKE_AR is not passed to ZSTD thirdparty dependency

Test it via docker.

1. Start an interactive shell in the conda container:

```bash
docker run -it --rm -v /local/path/to/arrow:/arrow ursalab/amd64-ubuntu-18.04-conda-python-3.6:worker bash
```

2. Execute the following build from `/arrow` withing the container:

```bash
export ARROW_BUILD_TYPE=debug
export ARROW_BUILD_TOOLCHAIN=$CONDA_PREFIX
export ARROW_HOME=$CONDA_PREFIX
export PARQUET_HOME=$CONDA_PREFIX
export PYARROW_CMAKE_GENERATOR=Ninja

mkdir -p cpp/build
pushd cpp/build

cmake -GNinja \
      -DCMAKE_BUILD_TYPE=$ARROW_BUILD_TYPE \
      -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
      -DARROW_PYTHON=ON \
      -DCMAKE_AR=${AR} \
      -DCMAKE_RANLIB=${RANLIB} \
      ..
ninja
ninja install

popd

pushd python

python setup.py build_ext --inplace --build-type=$ARROW_BUILD_TYPE
py.test -sv pyarrow

popd
```

Author: Krisztián Szűcs <szucs.krisztian@gmail.com>

Closes #3885 from kszucs/ARROW-4831 and squashes the following commits:

e97e34962 <Krisztián Szűcs> pass CMAKE_AR to ZSTD thirdparty

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1209,8 +1209,9 @@
     set(ZSTD_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/zstd_ep-install")
     set(ZSTD_INCLUDE_DIR "${ZSTD_PREFIX}/include")

-    set(ZSTD_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+    set(ZSTD_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS}
       "-DCMAKE_INSTALL_PREFIX=${ZSTD_PREFIX}"
+      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
       -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
       -DZSTD_BUILD_PROGRAMS=off
       -DZSTD_BUILD_SHARED=off


ARROW-5838: [C++] Delegate OPENSSL_ROOT_DIR to bundled gRPC

Author: Sutou Kouhei <kou@clear-code.com>

Closes #4795 from kou/cpp-macos-grpc-openssl and squashes the following commits:

6014d4573 <Sutou Kouhei>  Delegate OPENSSL_ROOT_DIR to bundled gRPC

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2140,6 +2140,9 @@
       -DCMAKE_INSTALL_LIBDIR=lib
       "-DProtobuf_PROTOC_LIBRARY=${GRPC_Protobuf_PROTOC_LIBRARY}"
       -DBUILD_SHARED_LIBS=OFF)
+  if(OPENSSL_ROOT_DIR)
+    list(APPEND GRPC_CMAKE_ARGS -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR})
+  endif()

   # XXX the gRPC git checkout is huge and takes a long time
   # Ideally, we should be able to use the tarballs, but they don't contain


ARROW-12382: [C++] Bundle xsimd if runtime SIMD level is set

This should fix nightly Conda builds (or at least let them progress).

Closes #10029 from lidavidm/arrow-12382

Authored-by: David Li <dc24f9cfc84fb1675ce65c8444a2c3e2f0e5f297@gmail.com>
Signed-off-by: David Li <dc24f9cfc84fb1675ce65c8444a2c3e2f0e5f297@gmail.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1938,8 +1938,8 @@
   set(XSIMD_VENDORED TRUE)
 endmacro()

-# For now xsimd is always bundled from upstream
-if(NOT ARROW_SIMD_LEVEL STREQUAL "NONE")
+if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE")
+   OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE"))
   set(xsimd_SOURCE "BUNDLED")
   resolve_dependency(xsimd)
   # TODO: Don't use global includes but rather target_include_directories


Prefix variable with underscore. Remove duplicated code

--- rosidl_generator_dds_idl/cmake/rosidl_generate_dds_interfaces.cmake
+++ rosidl_generator_dds_idl/cmake/rosidl_generate_dds_interfaces.cmake
@@ -40,15 +40,14 @@
   set(_generated_files "")
   foreach(_idl_file ${_ARG_IDL_FILES})
     get_filename_component(_extension "${_idl_file}" EXT)
+    get_filename_component(_name "${_idl_file}" NAME_WE)
     if("${_extension}" STREQUAL ".msg")
-      get_filename_component(name "${_idl_file}" NAME_WE)
-      list(APPEND _generated_files "${_output_path}/${name}_.idl")
+      list(APPEND _generated_files "${_output_path}/${_name}_.idl")
     elseif("${_extension}" STREQUAL ".srv")
-      get_filename_component(name "${_idl_file}" NAME_WE)
-      list(APPEND _generated_files "${_output_path}/Sample${name}Request_.idl")
-      list(APPEND _generated_files "${_output_path}/Sample${name}Response_.idl")
-      list(APPEND _generated_files "${_output_path}/WriteSample${name}Request_.idl")
-      list(APPEND _generated_files "${_output_path}/WriteSample${name}Response_.idl")
+      list(APPEND _generated_files "${_output_path}/Sample${_name}Request_.idl")
+      list(APPEND _generated_files "${_output_path}/Sample${_name}Response_.idl")
+      list(APPEND _generated_files "${_output_path}/WriteSample${_name}Request_.idl")
+      list(APPEND _generated_files "${_output_path}/WriteSample${_name}Response_.idl")
     endif()
   endforeach()


Fix for ROOT-6628

Fix for ROOT-6628

--- etc/cmake/FindROOT.cmake
+++ etc/cmake/FindROOT.cmake
@@ -69,13 +69,11 @@
   #---Get the list of header files-------------------------
   set(headerfiles)
   foreach(fp ${ARG_UNPARSED_ARGUMENTS})
-    file(GLOB files ${fp})
-    if(files)
+    if(${fp} MATCHES "[*?]") # Is this header a globbing expression?
+      file(GLOB files ${fp})
       foreach(f ${files})
-        if(NOT f MATCHES LinkDef)
-          find_file(headerFile ${f} PATHS ${incdirs})
-          set(headerfiles ${headerfiles} ${headerFile})
-          unset(headerFile CACHE)
+        if(NOT f MATCHES LinkDef) # skip LinkDefs from globbing result
+          set(headerfiles ${headerfiles} ${f})
         endif()
       endforeach()
     else()


Fix SWIG version for Python 2

Fix SWIG version for Python 2

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -132,7 +132,7 @@
     ELSE()
         FIND_PACKAGE(PythonLibs 2.7 REQUIRED)
         FIND_PACKAGE(PythonInterp 2.7 REQUIRED)
-	FIND_PACKAGE(SWIG 3.0.10 REQUIRED)
+	FIND_PACKAGE(SWIG 3.0.8 REQUIRED)
     ENDIF()
 ENDIF()


use runtest.sh script iif /bin/bash does exist

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -2,6 +2,9 @@
 option(EIGEN_DEBUG_ASSERTS "Enable advanced debuging of assertions" OFF)

 include(CheckCXXSourceCompiles)
+
+# check whether /bin/bash exists
+find_file(EIGEN_BIN_BASH_EXISTS "/bin/bash" PATHS "/" NO_DEFAULT_PATH)

 macro(ei_add_property prop value)
   get_property(previous GLOBAL PROPERTY ${prop})
@@ -61,15 +64,11 @@
     endif()
   endif()

-  if(WIN32)
-    if(CYGWIN)
-      add_test(${testname_with_suffix} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname_with_suffix}")
-    else(CYGWIN)
-      add_test(${testname_with_suffix} "${targetname}")
-    endif(CYGWIN)
-  else(WIN32)
+  if(EIGEN_BIN_BASH_EXISTS)
     add_test(${testname_with_suffix} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname_with_suffix}")
-  endif(WIN32)
+  else()
+    add_test(${testname_with_suffix} "${targetname}")
+  endif()

 endmacro(ei_add_test_internal)


HIP: fix missing fast math compiler option

For HIP-clang setting fast math is ignored because no the option is not
given to the compiler.

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -674,6 +674,10 @@
                     MESSAGE(FATAL_ERROR "Could not find rocRAND (also searched in: HIP_ROOT_DIR=${HIP_ROOT_DIR}/rocrand).")
                 endif()

+                if(ALPAKA_HIP_FAST_MATH)
+                    list(APPEND HIP_HIPCC_FLAGS -ffast-math)
+                endif()
+
                 # possible architectures can be found https://github.com/llvm/llvm-project/blob/master/clang/lib/Basic/Cuda.cpp#L65
                 # 900 -> AMD Vega64
                 # 902 -> AMD Vega 10


bugfix: files without extension will crash python on line 237

--- cmake/fips_private.cmake
+++ cmake/fips_private.cmake
@@ -232,7 +232,7 @@
         # add to current source group
         source_group("${CurGroup}" FILES ${cur_file})

-        if (FIPS_OSX)
+        if (FIPS_OSX AND ${f_ext})
             # mark .m as .c file for older cmake versions (bug is fixed in cmake 3.1+)
             if (${f_ext} STREQUAL ".m")
                 set_source_files_properties(${cur_file} PROPERTIES LANGUAGE C)


CMake Qt5 linking fix. Linking to Qt5 lobs from modules should now work better/properly.

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -1140,11 +1140,23 @@
       #--------------------------------------------------------------------
       # Qt5
        if(DESIRED_QT_VERSION MATCHES 5)
-           if(${package} STREQUAL "InviwoOpenGLQtModule")
-                qt5_use_modules(${_projectName} OpenGL)
-           endif()
+            set(Qt5DependLibs "")
+            foreach (package_lib ${${u_package}_LIBRARIES})
+               string(LENGTH "${package_lib}" package_lib_length)
+                if(${package_lib_length} GREATER 5)
+                    string(SUBSTRING "${package_lib}" 0 5 package_lib_start)
+                    string(SUBSTRING "${package_lib}" 5 -1 package_lib_end)
+                    if(${package_lib_start} STREQUAL "Qt5::")
+                         list(APPEND Qt5DependLibs ${package_lib_end})
+                    endif()
+                endif()
+            endforeach()
+            remove_duplicates(uniqueQt5DependLibs ${Qt5DependLibs})
+            foreach (uniqueQt5Lib ${uniqueQt5DependLibs})
+               qt5_use_modules(${_projectName} ${uniqueQt5Lib})
+            endforeach()
        endif()
-
+
     endforeach()
 endmacro()


Tweak commentary about library suffix.

Tweak commentary about library suffix.

svn path=/trunk/; revision=7195

--- cmake/modules/java.cmake
+++ cmake/modules/java.cmake
@@ -69,9 +69,9 @@
   # JNI .so files.
   set(JAVAWRAPPER_DIR ${LIB_DIR}/jni)
   get_filename_component(JAVAWRAPPER_HARDDIR ${JAVAWRAPPER_DIR} ABSOLUTE)
-  # Library name will be system dependent. For now assume .so
-  # We're not currently using libtool so we can't use the autotools
-  # trick to guess.
-  # This will definitely need changing for windows.
+  # Library name suffix is system dependent.  Tests have shown
+  # that ${CMAKE_SHARED_LIBRARY_SUFFIX} gives the correct suffix on both
+  # Linux and windows, and from CMAKEPREFIX/share/cmake-2.4/Modules/Platform
+  # it appears this CMake variable is defined on Mac OS X and other platforms.
   set(PLPLOTJAVAC_WRAP_DLL plplotjavac_wrap${CMAKE_SHARED_LIBRARY_SUFFIX})
 endif(ENABLE_java)


Upstream MIPS 32bit-build-on-64bit patch from Debian Bug#838914

From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838914

Fixes CMake so that when building a 32-bit mips binary on a 64-bit
mips machine, the target is not set as 32-bit, which apparently
confused some tests in mroonga.

--- cmake/package_name.cmake
+++ cmake/package_name.cmake
@@ -28,6 +28,10 @@
     SET(DEFAULT_MACHINE  ${CMAKE_SYSTEM_PROCESSOR})
     IF(SIZEOF_VOIDP EQUAL 8)
       SET(64BIT 1)
+    ENDIF()
+
+    IF(NOT 64BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64")
+      SET(DEFAULT_MACHINE "mips")
     ENDIF()

     IF(CMAKE_SYSTEM_NAME MATCHES "Windows")


add missing ops

add missing ops

--- tensorflow/contrib/cmake/tf_core_ops.cmake
+++ tensorflow/contrib/cmake/tf_core_ops.cmake
@@ -15,7 +15,7 @@
 set(tf_op_lib_names
     "audio_ops"
     "array_ops"
-		"batch_ops"
+	"batch_ops"
     "bitwise_ops"
     "candidate_sampling_ops"
     "checkpoint_ops"
@@ -23,11 +23,12 @@
     "ctc_ops"
     "data_flow_ops"
     "dataset_ops"
+    "function_ops"
     "functional_ops"
     "image_ops"
     "io_ops"
     "linalg_ops"
-		"list_ops"
+	"list_ops"
     "lookup_ops"
     "logging_ops"
     "math_ops"
@@ -46,8 +47,9 @@
     "state_ops"
     "stateless_random_ops"
     "string_ops"
-		"summary_ops"
+	"summary_ops"
     "training_ops"
+    "word2vec_ops"
 )

 foreach(tf_op_lib_name ${tf_op_lib_names})


set linker language of fortran_test to fortran

--- cmake/custom/test.cmake
+++ cmake/custom/test.cmake
@@ -63,6 +63,8 @@
             ${BALBOA_LIBS}
             )

+        set_target_properties(fortran_test PROPERTIES LINKER_LANGUAGE Fortran)
+
         add_test(fortran_test ${PROJECT_BINARY_DIR}/bin/fortran_test ${PROJECT_SOURCE_DIR}/test)
     endif()
 endif()


address sanitizer is now not enabled by default as it interferes with valgrind.

--- cmake/modes/debug.cmake
+++ cmake/modes/debug.cmake
@@ -1,3 +1,5 @@
 add_compile_options(-g3 -ggdb)
-add_compile_options(-fsanitize=address)
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address -lasan")
+if("${SANITIZE}" STREQUAL "address")
+  add_compile_options(-fsanitize=address)
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address -lasan")
+endif()


added macr PCL_CUDA_ADD_EXECUTABLE

added macr PCL_CUDA_ADD_EXECUTABLE

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -152,6 +152,31 @@
         COMPONENT ${_component})
 endmacro(PCL_ADD_EXECUTABLE)

+
+###############################################################################
+# Add an executable target.
+# _name The executable name.
+# _component The part of PCL that this library belongs to.
+# ARGN the source files for the library.
+macro(PCL_CUDA_ADD_EXECUTABLE _name _component)
+    cuda_add_executable(${_name} ${ARGN})
+    # must link explicitly against boost.
+    target_link_libraries(${_name} ${Boost_LIBRARIES})
+    #
+    # Only link if needed
+    if(WIN32 AND MSVC)
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX})
+    elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+    else()
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
+    endif()
+    #
+    set(PCL_EXECUTABLES ${PCL_EXECUTABLES} ${_name})
+    install(TARGETS ${_name} RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+        COMPONENT ${_component})
+endmacro(PCL_CUDA_ADD_EXECUTABLE)
+
 ###############################################################################
 # Add a test target.
 # _name The test name.


hsa: check for clang -target hsail64

hsa: check for clang -target hsail64

--- cmake/HSA.cmake
+++ cmake/HSA.cmake
@@ -32,7 +32,16 @@
   if(RESULT)
     message(FATAL_ERROR "LLVM support for amdgcn--amdhsa target is required")
   endif()
-  set(HSAIL_ENABLED 1)
+  # test that Clang supports the hsail64 target
+  message(CHECK_START "Check if Clang accepts -target hsail64")
+  custom_try_compile_clangxx("" "return 0;" RESULT "-target" "hsail64" "-emit-llvm" "-S")
+  if(RESULT)
+    message(CHECK_FAIL "no")
+    set(HSAIL_ENABLED 0)
+  else()
+    message(CHECK_PASS "yes")
+    set(HSAIL_ENABLED 1)
+  endif()
 endif()

 if (NOT DEFINED AMD_HSA)


pw_build/cmake: Add missing TODO

pw_build/cmake: Add missing TODO

Bug: 232141950
Change-Id: I3a561c2bb8ac67f8fced134b00675a09c72ad400
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/94121
Pigweed-Auto-Submit: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>
Reviewed-by: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>
Commit-Queue: Auto-Submit <14637eda5603879df170705285bf30f5996692f0@pigweed.google.com.iam.gserviceaccount.com>

--- pw_build/pigweed.cmake
+++ pw_build/pigweed.cmake
@@ -320,6 +320,8 @@
     HEADERS
       ${arg_HEADERS}
     PUBLIC_DEPS
+      # TODO(pwbug/232141950): Apply compilation options that affect ABI
+      # globally in the CMake build instead of injecting them into libraries.
       pw_build
       ${arg_PUBLIC_DEPS}
     PRIVATE_DEPS


bugfix

bugfix

--- common/cmake/test.cmake
+++ common/cmake/test.cmake
@@ -59,9 +59,9 @@
   ENDIF()

   IF (WIN32)
-    SET(MY_PROJECT_BINARY_DIR "${PROJECT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
+    SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
   ELSE()
-    SET(MY_PROJECT_BINARY_DIR "${PROJECT_BINARY_DIR}")
+    SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
   ENDIF()

   MACRO (ADD_EMBREE_MODEL_TEST name reference executable args model)


ENH: Set the variable CMAKE_INSTALL_PREFIX to have the right to install statismo

--- SuperBuild/External_statismo.cmake
+++ SuperBuild/External_statismo.cmake
@@ -51,7 +51,7 @@
       )
   endif()
   set(${proj}_CMAKE_OPTIONS
-#-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install
+      -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install
       -DBUILD_EXAMPLES:BOOL=OFF
       -DBUILD_TESTING:BOOL=OFF
       -DBUILD_SHARED_LIBS:BOOL=OFF


Update FW: support for up to 3x IMX378/IMX477 or 3x OV9782 color cameras. Note: configs for Left and Right sockets must be identical for now

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "000fc415c51bd7838432bcfc79d43dcc611d084b")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "f6926cb5bca9962ba690cea0f371b13baf2f18ec")

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


Update FW

Update FW

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "93fe14716c77589c8f5e522d525471a24110f918")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "556f8039152a857b8087591eae30ede1f3fb34de")

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


Avoid copying Vc and VecCore headers to binary directory

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1288,14 +1288,9 @@
       set(vc OFF CACHE BOOL "" FORCE)
     endif()
   endif()
-  if(Vc_FOUND)
-    # FIXME - The altenative is to add include_dirs to all packages that include any Math headers
-    execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include)
-    execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${Vc_INCLUDE_DIR}/Vc ${CMAKE_BINARY_DIR}/include/Vc)
-  endif()
-endif()
-
-if(vc AND NOT Vc_FOUND AND NOT (veccore OR builtin_veccore))
+endif()
+
+if(vc AND NOT Vc_FOUND)
   set(Vc_VERSION "1.3.2")
   set(Vc_PROJECT "Vc-${Vc_VERSION}")
   set(Vc_SRC_URI "${lcgpackages}/${Vc_PROJECT}.tar.gz")
@@ -1303,7 +1298,7 @@
   set(Vc_DESTDIR "${CMAKE_BINARY_DIR}/VC-prefix/install")
   set(Vc_ROOTDIR "${Vc_DESTDIR}/${CMAKE_INSTALL_PREFIX}")
   set(Vc_LIBNAME "${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  set(Vc_LIBRARY "${Vc_ROOTDIR}/${_LIBDIR_DEFAULT}/${Vc_LIBNAME}")
+  set(Vc_LIBRARY "${Vc_ROOTDIR}/lib/${Vc_LIBNAME}")

   ExternalProject_Add(VC
     URL     ${Vc_SRC_URI}
@@ -1321,14 +1316,21 @@
     INSTALL_COMMAND env DESTDIR=${Vc_DESTDIR} ${CMAKE_COMMAND} --build . --target install
   )

-  set(VC_TARGET VC)
-  add_library(Vc STATIC IMPORTED)
-  set_property(TARGET Vc PROPERTY IMPORTED_LOCATION ${Vc_LIBRARY})
-  add_dependencies(Vc VC)
-
+  set(VC_TARGET Vc)
   set(Vc_LIBRARIES Vc)
   set(Vc_INCLUDE_DIR "${Vc_ROOTDIR}/include")
-  set(Vc_CMAKE_MODULES_DIR "${Vc_ROOTDIR}/${_LIBDIR_DEFAULT}/cmake/Vc")
+  set(Vc_CMAKE_MODULES_DIR "${Vc_ROOTDIR}/lib/cmake/Vc")
+
+  add_library(VcExt STATIC IMPORTED)
+  set_property(TARGET VcExt PROPERTY IMPORTED_LOCATION ${Vc_LIBRARY})
+  add_dependencies(VcExt VC)
+
+  add_library(Vc INTERFACE)
+  target_include_directories(Vc SYSTEM BEFORE INTERFACE $<BUILD_INTERFACE:${Vc_INCLUDE_DIR}>)
+  target_link_libraries(Vc INTERFACE VcExt)
+
+  # propagate build-time include directories to rootcling
+  set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${Vc_INCLUDE_DIR})

   find_package_handle_standard_args(Vc
     FOUND_VAR Vc_FOUND
@@ -1344,11 +1346,6 @@
 endif()

 #---Check for VecCore--------------------------------------------------------------------
-if(veccore AND NOT builtin_veccore AND builtin_vc)
-  message(WARNING "Vc is not relocatable, so 'builtin_vc' requires 'builtin_veccore' to set up Vc properly.")
-  set(builtin_veccore ON CACHE BOOL "" FORCE)
-endif()
-
 if(builtin_veccore)
   unset(VecCore_FOUND)
   unset(VecCore_FOUND CACHE)
@@ -1367,11 +1364,6 @@
       set(veccore OFF CACHE BOOL "" FORCE)
     endif()
   endif()
-  if(VecCore_FOUND)
-    # FIXME - The altenative is to add include_dirs to all packages that include any Math headers
-    execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include)
-    execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${VecCore_INCLUDE_DIR}/VecCore ${CMAKE_BINARY_DIR}/include/VecCore)
-  endif()
 endif()

 if(veccore AND NOT VecCore_FOUND)
@@ -1382,17 +1374,10 @@
   set(VecCore_DESTDIR "${CMAKE_BINARY_DIR}/VECCORE-prefix/install")
   set(VecCore_ROOTDIR "${VecCore_DESTDIR}/${CMAKE_INSTALL_PREFIX}")

-  if(builtin_vc)
-    set(Vc_VERSION "1.3.2") # version built by VecCore
-    set(Vc_LIBNAME "${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    set(Vc_LIBRARY "${VecCore_ROOTDIR}/lib/${Vc_LIBNAME}")
-  endif()
-
   ExternalProject_Add(VECCORE
     URL     ${VecCore_SRC_URI}
     URL_MD5 ${VecCore_SRC_MD5}
     BUILD_IN_SOURCE 0
-    BUILD_BYPRODUCTS ${Vc_LIBRARY}
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
     CMAKE_ARGS -G ${CMAKE_GENERATOR}
                -DBUILD_TESTING=OFF -DBUILD_VC=${builtin_vc}
@@ -1405,55 +1390,32 @@
     INSTALL_COMMAND env DESTDIR=${VecCore_DESTDIR} ${CMAKE_COMMAND} --build . --target install
   )

-  set(VECCORE_TARGET VECCORE)
-
-  if(builtin_vc)
-    add_library(Vc STATIC IMPORTED)
-    set_property(TARGET Vc PROPERTY IMPORTED_LOCATION ${Vc_LIBRARY})
-    add_dependencies(Vc VECCORE)
-
-    set(Vc_LIBRARIES Vc)
-    set(Vc_INCLUDE_DIR ${VecCore_ROOTDIR}/include)
-    set(Vc_INCLUDE_DIRS ${VecCore_ROOTDIR}/include)
-    set(Vc_CMAKE_MODULES_DIR "${VecCore_ROOTDIR}/lib/cmake/Vc")
-
-    find_package_handle_standard_args(Vc
-      FOUND_VAR Vc_FOUND
-      REQUIRED_VARS Vc_INCLUDE_DIR Vc_LIBRARIES Vc_CMAKE_MODULES_DIR
-      VERSION_VAR Vc_VERSION)
-  endif()
-
-  if (vc OR builtin_vc)
+  set(VECCORE_TARGET VecCore)
+  set(VecCore_LIBRARIES VecCore)
+  set(VecCore_INCLUDE_DIRS ${VecCore_INCLUDE_DIRS} ${VecCore_ROOTDIR}/include)
+
+  add_library(VecCore INTERFACE)
+  target_include_directories(VecCore SYSTEM INTERFACE $<BUILD_INTERFACE:${VecCore_ROOTDIR}/include>)
+  add_dependencies(VecCore VECCORE)
+
+  # propagate build-time include directories to rootcling
+  set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${VecCore_ROOTDIR}/include)
+
+  if (Vc_FOUND)
     set(VecCore_Vc_FOUND True)
     set(VecCore_Vc_DEFINITIONS -DVECCORE_ENABLE_VC)
     set(VecCore_Vc_INCLUDE_DIR ${Vc_INCLUDE_DIR})
     set(VecCore_Vc_LIBRARIES ${Vc_LIBRARIES})

-    set(VecCore_DEFINITIONS -DVECCORE_ENABLE_VC)
-    set(VecCore_INCLUDE_DIRS ${Vc_INCLUDE_DIR})
-    set(VecCore_LIBRARIES ${Vc_LIBRARIES})
-  endif()
-
-  set(VecCore_INCLUDE_DIRS ${VecCore_INCLUDE_DIRS} ${VecCore_ROOTDIR}/include)
+    set(VecCore_DEFINITIONS ${VecCore_Vc_DEFINITIONS})
+    set(VecCore_INCLUDE_DIRS ${VecCore_Vc_INCLUDE_DIR} ${VecCore_INCLUDE_DIRS})
+    target_link_libraries(VecCore INTERFACE ${Vc_LIBRARIES})
+  endif()

   find_package_handle_standard_args(VecCore
     FOUND_VAR VecCore_FOUND
-    REQUIRED_VARS VecCore_INCLUDE_DIRS
+    REQUIRED_VARS VecCore_INCLUDE_DIRS VecCore_LIBRARIES
     VERSION_VAR VecCore_VERSION)
-
-  # The following few lines are a temporary fix for a breakage introduced
-  # recently in math/mathcore VecCore integration. Once the proper solution
-  # is found, the lines below should be removed from here and added to the
-  # proper targets.
-  add_definitions(${VecCore_DEFINITIONS})
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VecCore_DEFINITIONS}")
-  include_directories(SYSTEM BEFORE ${VecCore_INCLUDE_DIRS})
-
-  # Copy Vc and VecCore headers to build directory, otherwise dictionary generation breaks
-  add_custom_command(TARGET VECCORE POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${VecCore_INCLUDE_DIRS}/ ${CMAKE_BINARY_DIR}/include)
-
-  ### End of temporary fix

   install(DIRECTORY ${VecCore_ROOTDIR}/ DESTINATION ".")
 endif()


Removed Fortran support from MunkeiAddCompileFlags

--- MunkeiAddCompileFlags.cmake
+++ MunkeiAddCompileFlags.cmake
@@ -24,7 +24,6 @@

 include( CheckCCompilerFlag       )
 include( CheckCXXCompilerFlag     )
-include( CheckFortranCompilerFlag )
 include( CMakeParseArguments      )

 function( add_compile_flags )
@@ -58,8 +57,6 @@
           check_c_compiler_flag( "${flag}" supported )
         elseif( "${lang}" STREQUAL CXX )
           check_cxx_compiler_flag( "${flag}" supported )
-        elseif( "${lang}" STREQUAL FORTRAN )
-          check_fortran_compiler_flag( "${flag}" supported )
         else()
           message( FATAL_ERROR
             "[MunkeiAddCompileFlags] Unsupported language ‘${lang}’"


COMP: Update MorphologicalContourInterpolation to 2017-09-22

 Matt McCormick (10):
       COMP: Expand slice set assignment
       COMP: Use std::abs
       ENH: Add wrapping configuration
       ENH: Add TravisCI configuration
       ENH: Add Appveyor configuration
       ENH: Update CircleCI config to include Python packaging
       COMP: Specify std:: prefix for pow
       COMP: Replace std::abs with itk::Math::abs
       COMP: sqrt disambiguation
       DOC: Add IJ article link, Python package installation instructions

Change-Id: Id88c68970ae4d922e0005be8304c317a88e7a66f

--- Modules/Remote/MorphologicalContourInterpolation.remote.cmake
+++ Modules/Remote/MorphologicalContourInterpolation.remote.cmake
@@ -14,5 +14,5 @@
 This work is supported by NIH grant R01 EB014346
 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'."
   GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKMorphologicalContourInterpolation.git
-  GIT_TAG 19f256a3de5e7f93865b33eb37fa6b0f9fc9adb5
+  GIT_TAG 3a036898fea21ad1e9f463de28328fa763b62a22
   )


fixup configure_ros_middleware_library cmake macro

--- ros_middleware_interface/cmake/configure_ros_middleware_library.cmake
+++ ros_middleware_interface/cmake/configure_ros_middleware_library.cmake
@@ -23,7 +23,7 @@
      "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     # Set the visibility of symbols to hidden by default for gcc and clang
     # (this is already the default on Windows)
-    set_target_properties(library_target
+    set_target_properties(${library_target}
       PROPERTIES
         COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden -std=c++11"
     )
@@ -31,7 +31,7 @@
   if(WIN32)
     # Causes the visibility macros to use dllexport rather than dllimport
     # which is appropriate when building the dll but not consuming it.
-    set_target_properties(library_target
+    set_target_properties(${library_target}
       PROPERTIES COMPILE_FLAGS "-DRMW_BUILDING_DLL")
   endif()
 endmacro()


ARROW-17511: [C++] Add support for xsimd 9.0.0 (#13958)

Authored-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -227,7 +227,12 @@

 macro(resolve_dependency DEPENDENCY_NAME)
   set(options)
-  set(one_value_args HAVE_ALT IS_RUNTIME_DEPENDENCY REQUIRED_VERSION USE_CONFIG)
+  set(one_value_args
+      FORCE_ANY_NEWER_VERSION
+      HAVE_ALT
+      IS_RUNTIME_DEPENDENCY
+      REQUIRED_VERSION
+      USE_CONFIG)
   set(multi_value_args COMPONENTS PC_PACKAGE_NAMES)
   cmake_parse_arguments(ARG
                         "${options}"
@@ -247,7 +252,7 @@
     set(PACKAGE_NAME ${DEPENDENCY_NAME})
   endif()
   set(FIND_PACKAGE_ARGUMENTS ${PACKAGE_NAME})
-  if(ARG_REQUIRED_VERSION)
+  if(ARG_REQUIRED_VERSION AND NOT ARG_FORCE_ANY_NEWER_VERSION)
     list(APPEND FIND_PACKAGE_ARGUMENTS ${ARG_REQUIRED_VERSION})
   endif()
   if(ARG_USE_CONFIG)
@@ -258,7 +263,16 @@
   endif()
   if(${DEPENDENCY_NAME}_SOURCE STREQUAL "AUTO")
     find_package(${FIND_PACKAGE_ARGUMENTS})
-    if(${${PACKAGE_NAME}_FOUND})
+    set(COMPATIBLE ${${PACKAGE_NAME}_FOUND})
+    if(COMPATIBLE
+       AND ARG_FORCE_ANY_NEWER_VERSION
+       AND ARG_REQUIRED_VERSION)
+      if(${${PACKAGE_NAME}_VERSION} VERSION_LESS ${ARG_REQUIRED_VERSION})
+        message(DEBUG "Couldn't find ${DEPENDENCY_NAME} >= ${ARG_REQUIRED_VERSION}")
+        set(COMPATIBLE FALSE)
+      endif()
+    endif()
+    if(COMPATIBLE)
       set(${DEPENDENCY_NAME}_SOURCE "SYSTEM")
     else()
       build_dependency(${DEPENDENCY_NAME})
@@ -268,6 +282,11 @@
     build_dependency(${DEPENDENCY_NAME})
   elseif(${DEPENDENCY_NAME}_SOURCE STREQUAL "SYSTEM")
     find_package(${FIND_PACKAGE_ARGUMENTS} REQUIRED)
+    if(ARG_FORCE_ANY_NEWER_VERSION AND ARG_REQUIRED_VERSION)
+      if(${${PACKAGE_NAME}_VERSION} VERSION_LESS ${ARG_REQUIRED_VERSION})
+        message(FATAL_ERROR "Couldn't find ${DEPENDENCY_NAME} >= ${ARG_REQUIRED_VERSION}")
+      endif()
+    endif()
   endif()
   if(${DEPENDENCY_NAME}_SOURCE STREQUAL "SYSTEM" AND ARG_IS_RUNTIME_DEPENDENCY)
     provide_find_module(${PACKAGE_NAME})
@@ -2253,7 +2272,11 @@
 endif()

 if(ARROW_USE_XSIMD)
-  resolve_dependency(xsimd REQUIRED_VERSION "8.1.0")
+  resolve_dependency(xsimd
+                     REQUIRED_VERSION
+                     "8.1.0"
+                     FORCE_ANY_NEWER_VERSION
+                     TRUE)

   if(xsimd_SOURCE STREQUAL "BUNDLED")
     add_library(xsimd INTERFACE IMPORTED)


Provide support for CMake on Android studio 2.2.

Change-Id: Ib3508c20a220b29d42f963cf154cd9ab5236ed6e

--- cmake/cpu.cmake
+++ cmake/cpu.cmake
@@ -1,27 +1,7 @@
 ## Check for SIMD extensions.
-set(WEBP_SIMD_FLAGS "SSE2;SSE41;AVX2")
-set(WEBP_SIMD_FILE_EXTENSIONS "_sse2.c;_sse41.c;_avx2.c")
-if(MSVC)
-  # MSVC does not have a SSE4 flag but AVX2 support implies
-  # SSE4 support.
-  set(SIMD_ENABLE_FLAGS "/arch:SSE2;/arch:AVX2;/arch:AVX2")
-  set(SIMD_DISABLE_FLAGS)
-else()
-  set(SIMD_ENABLE_FLAGS "-msse2;-msse4.1;-mavx2")
-  set(SIMD_DISABLE_FLAGS "-mno-sse2;-mno-sse4.1;-mno-avx2")
-endif()

-set(WEBP_SIMD_FILES_TO_NOT_INCLUDE)
-set(WEBP_SIMD_FILES_TO_INCLUDE)
-set(WEBP_SIMD_FLAGS_TO_INCLUDE)
-
-list(LENGTH WEBP_SIMD_FLAGS WEBP_SIMD_FLAGS_LENGTH)
-math(EXPR WEBP_SIMD_FLAGS_RANGE "${WEBP_SIMD_FLAGS_LENGTH} - 1")
-
-foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
-  list(GET WEBP_SIMD_FLAGS ${I_SIMD} WEBP_SIMD_FLAG)
-  list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
-  set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
+function(webp_check_compiler_flag WEBP_SIMD_FLAG)
+  unset(WEBP_HAVE_FLAG_LOCAL CACHE)
   check_c_source_compiles("
       #include \"${CMAKE_CURRENT_LIST_DIR}/../src/dsp/dsp.h\"
       int main(void) {
@@ -30,10 +10,60 @@
         #endif
         return 0;
       }
-    "
-    WEBP_HAVE_${WEBP_SIMD_FLAG}
+    " WEBP_HAVE_FLAG_LOCAL
   )
+  if(WEBP_HAVE_FLAG_LOCAL)
+    set(WEBP_HAVE_${WEBP_SIMD_FLAG} 1 PARENT_SCOPE)
+  else()
+    set(WEBP_HAVE_${WEBP_SIMD_FLAG} 0 PARENT_SCOPE)
+  endif()
+endfunction()

+# those are included in the names of WEBP_USE_* in c++ code.
+set(WEBP_SIMD_FLAGS "SSE2;SSE41;AVX2;MIPS32;MIPS_DSP_R2;NEON;MSA")
+set(WEBP_SIMD_FILE_EXTENSIONS "_sse2.c;_sse41.c;_avx2.c;_mips32.c;_mips_dsp_r2.c;_neon.c;_msa.c")
+if(MSVC)
+  # MSVC does not have a SSE4 flag but AVX2 support implies
+  # SSE4 support.
+  set(SIMD_ENABLE_FLAGS "/arch:SSE2;/arch:AVX2;/arch:AVX2;;;;")
+  set(SIMD_DISABLE_FLAGS)
+else()
+  set(SIMD_ENABLE_FLAGS "-msse2;-msse4.1;-mavx2;-mips32;-mdspr2;-mfpu=neon;-mmsa")
+  set(SIMD_DISABLE_FLAGS "-mno-sse2;-mno-sse4.1;-mno-avx2;;-mno-dspr2;;-mno-msa")
+endif()
+
+set(WEBP_SIMD_FILES_TO_NOT_INCLUDE)
+set(WEBP_SIMD_FILES_TO_INCLUDE)
+set(WEBP_SIMD_FLAGS_TO_INCLUDE)
+
+if(${ANDROID})
+  if(${ANDROID_ABI} STREQUAL "armeabi-v7a")
+    # This is because Android studio uses the configuration
+    # "-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
+    # that does not trigger neon optimizations but should
+    # (as this configuration does not exist anymore).
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon ")
+  endif()
+endif()
+
+list(LENGTH WEBP_SIMD_FLAGS WEBP_SIMD_FLAGS_LENGTH)
+math(EXPR WEBP_SIMD_FLAGS_RANGE "${WEBP_SIMD_FLAGS_LENGTH} - 1")
+
+foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
+  list(GET WEBP_SIMD_FLAGS ${I_SIMD} WEBP_SIMD_FLAG)
+
+  # First try with no extra flag added as the compiler might have default flags
+  # (especially on Android).
+  unset(WEBP_HAVE_${WEBP_SIMD_FLAG} CACHE)
+  set(CMAKE_REQUIRED_FLAGS)
+  webp_check_compiler_flag(${WEBP_SIMD_FLAG})
+  if(NOT WEBP_HAVE_${WEBP_SIMD_FLAG})
+    list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
+    set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
+    webp_check_compiler_flag(${WEBP_SIMD_FLAG})
+  else()
+    set(SIMD_COMPILE_FLAG " ")
+  endif()
   # Check which files we should include or not.
   list(GET WEBP_SIMD_FILE_EXTENSIONS ${I_SIMD} WEBP_SIMD_FILE_EXTENSION)
   file(GLOB SIMD_FILES "${CMAKE_CURRENT_LIST_DIR}/../"
@@ -54,9 +84,12 @@
     if(SIMD_DISABLE_FLAGS)
       list(GET SIMD_DISABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
       include(CheckCCompilerFlag)
-      check_c_compiler_flag(${SIMD_COMPILE_FLAG} HAS_COMPILE_FLAG)
-      if(HAS_COMPILE_FLAG)
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SIMD_COMPILE_FLAG}")
+      if(SIMD_COMPILE_FLAG)
+        unset(HAS_COMPILE_FLAG CACHE)
+        check_c_compiler_flag(${SIMD_COMPILE_FLAG} HAS_COMPILE_FLAG)
+        if(HAS_COMPILE_FLAG)
+          set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SIMD_COMPILE_FLAG}")
+        endif()
       endif()
     endif()
   endif()


got rid of matlab_cpu dependency (since it's hard to get on windows, and wasn't actually being used!)

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -21,7 +21,7 @@
 endmacro()

 function(mex_setup)
-  # sets the variables: MATLAB_ROOT, MATLAB_CPU, MEX, MEX_EXT
+  # sets the variables: MATLAB_ROOT, MEX, MEX_EXT
   #    as well as all of the mexopts

   find_program(matlab matlab)
@@ -34,22 +34,13 @@
   endif()
   string(STRIP ${_matlab_root} MATLAB_ROOT)

-  execute_process(COMMAND ${matlab} -n COMMAND grep "ARCH" COMMAND cut -d "=" -f2 OUTPUT_VARIABLE _matlab_cpu)
-  if (NOT _matlab_cpu)
-    message(FATAL_ERROR "Failed to extract MATLAB_CPU from running matlab -n")
-  endif()
-  string(STRIP ${_matlab_cpu} MATLAB_CPU)
-
   execute_process(COMMAND ${MATLAB_ROOT}/bin/mexext OUTPUT_VARIABLE MEX_EXT OUTPUT_STRIP_TRAILING_WHITESPACE)

-  if (NOT MATLAB_ROOT OR NOT MATLAB_CPU OR NOT MEX_EXT)
+  if (NOT MATLAB_ROOT OR NOT MEX_EXT)
      message(FATAL_ERROR "could not find MATLAB root")
   endif()

-#  set(MATLAB_BIN ${MATLAB_ROOT}/bin/${MATLAB_CPU})
-
   set(MATLAB_ROOT ${MATLAB_ROOT} PARENT_SCOPE)
-  set(MATLAB_CPU ${MATLAB_CPU} PARENT_SCOPE)
   set(MEX ${MATLAB_ROOT}/bin/mex PARENT_SCOPE)
   set(MEX_EXT ${MEX_EXT} PARENT_SCOPE)

@@ -95,8 +86,8 @@
   list(GET ARGV 0 target)
   list(REMOVE_AT ARGV 0)

-  if (NOT MATLAB_ROOT OR NOT MATLAB_CPU OR NOT MEX_EXT)
-     message(FATAL_ERROR "MATLAB not found (or MATLAB_ROOT/MATLAB_CPU not properly parsed)")
+  if (NOT MATLAB_ROOT OR NOT MEX_EXT)
+     message(FATAL_ERROR "MATLAB not found (or MATLAB_ROOT not properly parsed)")
   endif()

   include_directories( ${MATLAB_ROOT}/extern/include ${MATLAB_ROOT}/simulink/include )


Undo of project-template changes. Use the state of the current master again

--- Applications/PluginGenerator/ProjectTemplate/CMakeExternals/MITK.cmake
+++ Applications/PluginGenerator/ProjectTemplate/CMakeExternals/MITK.cmake
@@ -115,7 +115,7 @@

   set(MITK_SOURCE_DIR "" CACHE PATH "MITK source code location. If empty, MITK will be cloned from MITK_GIT_REPOSITORY")
   set(MITK_GIT_REPOSITORY "http://git.mitk.org/MITK.git" CACHE STRING "The git repository for cloning MITK")
-  set(MITK_GIT_TAG "v2015.05.2" CACHE STRING "The git tag/hash to be used when cloning from MITK_GIT_REPOSITORY")
+  set(MITK_GIT_TAG "releases/master" CACHE STRING "The git tag/hash to be used when cloning from MITK_GIT_REPOSITORY")
   mark_as_advanced(MITK_SOURCE_DIR MITK_GIT_REPOSITORY MITK_GIT_TAG)

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


Bump the version of CUB in cmake build. (#17310)

--- tensorflow/contrib/cmake/external/cub.cmake
+++ tensorflow/contrib/cmake/external/cub.cmake
@@ -14,8 +14,8 @@
 # ==============================================================================
 include (ExternalProject)

-set(cub_URL https://mirror.bazel.build/github.com/NVlabs/cub/archive/1.7.4.zip)
-set(cub_HASH SHA256=20a1a39fd97e5da7f40f5f2e7fd73fd2ea59f9dc4bb8a6c5f228aa543e727e31)
+set(cub_URL https://mirror.bazel.build/github.com/NVlabs/cub/archive/1.8.0.zip)
+set(cub_HASH SHA256=6bfa06ab52a650ae7ee6963143a0bbc667d6504822cbd9670369b598f18c58c3)
 set(cub_BUILD ${CMAKE_CURRENT_BINARY_DIR}/cub/src/cub)
 set(cub_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cub/src/cub)
 set(cub_ARCHIVE_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/cub_archive)


debian path

debian path

git-svn-id: 53a346f67f76028cd3290d0c97fdb7682ad2a994@11602 358b74ad-2626-0410-af80-f4c3c349ae55

--- imageutilities/cmake/FindCUDASparse.cmake
+++ imageutilities/cmake/FindCUDASparse.cmake
@@ -25,7 +25,7 @@
 find_library(CUDA_SPARSE_LIBRARY
   NAMES cusparse
   PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
-  PATH_SUFFIXES "/lib64" "/lib"
+  PATH_SUFFIXES "/lib64" "/lib" "/lib/x86_64-linux-gnu"
   DOC "Location of sparse library"
   NO_DEFAULT_PATH
 )


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -6,6 +6,7 @@
 Name[cs]=Instant Messaging
 Name[da]=Instant messaging
 Name[de]=Instant-Messaging
+Name[el]=Στιγμιαία μηνύματα
 Name[es]=Mensajería instantánea
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
@@ -43,6 +44,7 @@
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
 Comment[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
 Comment[de]=Chats mit ihren Kontakten starten oder Ihren IM-Status ändern
+Comment[el]=Έναρξη συνομιλίας με οποιαδήποτε επαφή στιγμιαίων μηνυμάτων ή αλλαγή της κατάστασής σας
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci


build

build

--- modules/fmt.cmake
+++ modules/fmt.cmake
@@ -3,7 +3,11 @@
   # Module library
   file(GLOB SOURCE_FILES "fmt/src/*.cc")
   add_library(fmt ${SOURCE_FILES})
-  set_target_properties(fmt PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}")
+  if(MSVC)
+    set_target_properties(fmt PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}")
+  else()
+    set_target_properties(zlib PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-shadow")
+  endif()
   target_include_directories(fmt PUBLIC "fmt/include")
   target_link_libraries(fmt)


Add missing "exports"

Add missing "exports"

Fix bug in CMake helper function where various output variables were not
being passed back to the caller.

--- lcm-cmake/lcmUtilities.cmake
+++ lcm-cmake/lcmUtilities.cmake
@@ -236,4 +236,8 @@

   # Set output files in parent scope
   _lcm_export(_C_SOURCES)
-endfunction()
+  _lcm_export(_C_HEADERS)
+  _lcm_export(_CPP_SOURCES)
+  _lcm_export(_CPP_HEADERS)
+  _lcm_export(_PYTHON_SOURCES)
+endfunction()


fix check if DEPENDS was found

fix check if DEPENDS was found

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -144,7 +144,7 @@
     endif()
     if("${second_item}" STREQUAL "COMPONENTS")
       list(GET depend_list 0 depend_name)
-      if(NOT ${${depend_name}_FOUND})
+      if(NOT ${depend_name}_FOUND)
         message(FATAL_ERROR "catkin_package() DEPENDS on '${depend}' which must be find_package()-ed before")
       endif()
       message(WARNING "catkin_package() DEPENDS on '${depend}' which is deprecated. find_package() it before and only DEPENDS on '${depend_name}' instead")
@@ -157,7 +157,7 @@
           #message(WARNING "catkin_package() DEPENDS on catkin package '${depend_name}' which is deprecated. Use CATKIN_DEPENDS for catkin packages instead.")
           list(APPEND _PROJECT_CATKIN_DEPENDS ${depend_name})
         else()
-          if(NOT ${${depend_name}_FOUND})
+          if(NOT ${depend_name}_FOUND)
             message(FATAL_ERROR "catkin_package() DEPENDS on '${depend_name}' which must be find_package()-ed before. If it is a catkin package it can be declared as CATKIN_DEPENDS instead without find_package()-ing it.")
           endif()
           list(APPEND PROJECT_DEPENDENCIES_INCLUDE_DIRS ${${depend_name}_INCLUDE_DIRS})


Remove duplicates in the X11_INCLUDE_DIR list since those screw up certain
of our modules and also slow down compilation if any of those duplicates
leak through to the compile -I options.

N.B. this logic should be changed to a macro if we ever want to remove
duplicates from other lists.

svn path=/trunk/; revision=7775

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -141,9 +141,9 @@
       check_dirsymbol_exists("sys/types.h;ndir.h" HAVE_NDIR_H)
       if(NOT HAVE_NDIR_H AND UNIX)
         message(FATAL_ERROR
-	"FATAL_ERROR for plplot.cmake: "
-	"DIR symbol must be defined by Unix system headers."
-	)
+        "FATAL_ERROR for plplot.cmake: "
+        "DIR symbol must be defined by Unix system headers."
+        )
       endif(NOT HAVE_NDIR_H AND UNIX)
     endif(NOT HAVE_SYS_DIR_H)
   endif(NOT HAVE_SYS_NDIR_H)
@@ -234,6 +234,39 @@
 # Find X headers, libraries, and library directory (required by xwin device
 # driver and also everything that is Tk related).
 find_package(X11)
+if(X11_INCLUDE_DIR)
+  # remove duplicates in the X11_INCLUDE_DIR list since those screw up
+  # certain of our modules and also slow down compilation if any of
+  # those duplicates leak through to the compile -I options.
+  list(SORT X11_INCLUDE_DIR)
+  set(copy_X11_INCLUDE_DIR ${X11_INCLUDE_DIR})
+  set(listindex 0)
+  set(listindexplus 1)
+  foreach(copy_listelement ${copy_X11_INCLUDE_DIR})
+    # need to get list elements corresponding to list indices.
+    list(LENGTH X11_INCLUDE_DIR listlength)
+    if(listindexplus LESS ${listlength})
+      list(GET X11_INCLUDE_DIR ${listindex} listelement)
+      list(GET X11_INCLUDE_DIR ${listindexplus} listelementplus)
+    else(listindexplus LESS ${listlength})
+      set(listelement)
+      set(listelementplus)
+    endif(listindexplus LESS ${listlength})
+    if(copy_listelement STREQUAL "${listelement}" AND
+    copy_listelement STREQUAL "${listelementplus}"
+    )
+      list(REMOVE_AT X11_INCLUDE_DIR ${listindex})
+    else(copy_listelement STREQUAL "${listelement}" AND
+    copy_listelement STREQUAL "${listelementplus}"
+    )
+      # update list indices
+      math(EXPR listindex "${listindex} + 1")
+      math(EXPR listindexplus "${listindex} + 1")
+    endif(copy_listelement STREQUAL "${listelement}" AND
+    copy_listelement STREQUAL "${listelementplus}"
+    )
+  endforeach(copy_listelement ${copy_X11_INCLUDE_DIR})
+endif(X11_INCLUDE_DIR)
 message(STATUS "X11_FOUND = ${X11_FOUND}")
 message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
 message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}")


strip PROJECT_BINARY_DIR from nosetests target names

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

+  # strip PROJECT_BINARY_DIR from output_file_name
+  set(output_file_name ${path})
+  string(LENGTH "${PROJECT_BINARY_DIR}/" prefix_length)
+  string(LENGTH "${output_file_name}" var_length)
+  if(${var_length} GREATER ${prefix_length})
+    string(SUBSTRING "${output_file_name}" 0 ${prefix_length} var_prefix)
+    if("${var_prefix}" STREQUAL "${PROJECT_BINARY_DIR}/")
+      # passing length -1 does not work for CMake < 2.8.5
+      # http://public.kitware.com/Bug/view.php?id=10740
+      string(LENGTH "${output_file_name}" _rest)
+      math(EXPR _rest "${_rest} - ${prefix_length}")
+      string(SUBSTRING "${output_file_name}" ${prefix_length} ${_rest} output_file_name)
+    endif()
+  endif()
+  string(REPLACE "/" "." output_file_name ${output_file_name})
+
   set(output_path ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME})
-  string(REPLACE "/" "." output_file_name ${path})
   set(cmd "${CMAKE_COMMAND} -E make_directory ${output_path}")
   if(IS_DIRECTORY ${_path_name})
     set(tests "--where=${_path_name}")


update FindGflags.cmake to work on CentOS 8.x (#1409)

Summary:
Update FindGflags.cmake to work on recent CentOS and RedHat distributions.

On these distributions the CMake package configuration installed by the
gflags-devel RPM is slightly broken, and sets `gflags_INCLUDE_DIR` to a
directory that does not exist.  This happens because `/lib64` is symlinked to
`/usr/lib64`, and CMake ends up searching `/lib64` before `/usr/lib64` by
default when searching for packages.  Therefore it finds `gflags-config.cmake`
via the `/lib64` symlink.  However, `gflags-config.cmake` computes the include
directory relative to where its config file was found, and this relative path
computation only works when using the actual `/usr/lib64` path where it was
installed.  When found via `/lib64` it returns a bogus `//include` path that
does not exist.

This updates `FindGflags.cmake` to verify if the `gflags_INCLUDE_DIR` path
actually exists, and set it to a sane location instead.

This also updates the code to use the `gflags-shared` target that is exported
by the default gflags package configuration if it was only built as a shared
library.

Pull Request resolved: https://github.com/facebook/folly/pull/1409

Reviewed By: yfeldblum

Differential Revision: D23588288

fbshipit-source-id: b68a717953ae0521f568d7bcfd05ca33cd6dc578

--- build/fbcode_builder/CMake/FindGflags.cmake
+++ build/fbcode_builder/CMake/FindGflags.cmake
@@ -41,6 +41,16 @@
   # Re-export the config-specified libs with our local names
   set(LIBGFLAGS_LIBRARY ${gflags_LIBRARIES})
   set(LIBGFLAGS_INCLUDE_DIR ${gflags_INCLUDE_DIR})
+  if(NOT EXISTS "${gflags_INCLUDE_DIR}")
+    # The gflags-devel RPM on recent RedHat-based systems is somewhat broken.
+    # RedHat symlinks /lib64 to /usr/lib64, and this breaks some of the
+    # relative path computation performed in gflags-config.cmake.  The package
+    # config file ends up being found via /lib64, but the relative path
+    # computation it does only works if it was found in /usr/lib64.
+    # If gflags_INCLUDE_DIR does not actually exist, simply default it to
+    # /usr/include on these systems.
+    set(LIBGFLAGS_INCLUDE_DIR "/usr/include")
+  endif()
   set(LIBGFLAGS_FOUND ${gflags_FOUND})
   # cmake module compat
   set(GFLAGS_FOUND ${gflags_FOUND})
@@ -76,6 +86,20 @@
 # Compat with the gflags CONFIG based detection
 if (LIBGFLAGS_FOUND AND NOT TARGET gflags)
   add_library(gflags UNKNOWN IMPORTED)
-  set_target_properties(gflags PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}")
-  set_target_properties(gflags PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}")
+  if(TARGET gflags-shared)
+    # If the installed gflags CMake package config defines a gflags-shared
+    # target but not gflags, just make the gflags target that we define
+    # depend on the gflags-shared target.
+    target_link_libraries(gflags INTERFACE gflags-shared)
+    # Export LIBGFLAGS_LIBRARY as the gflags-shared target in this case.
+    set(LIBGFLAGS_LIBRARY gflags-shared)
+  else()
+    set_target_properties(
+      gflags
+      PROPERTIES
+        IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+        IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}"
+        INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}"
+    )
+  endif()
 endif()


Hotfix FW: revert increased memory consumption

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "33ff0b2b5287df25573690438374f44a59529429")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "6c7d5206dca68fde22314bc97c0e437b00930b70")

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


FMUv1: Build camera trigger

FMUv1: Build camera trigger

--- cmake/configs/nuttx_px4fmu-v1_default.cmake
+++ cmake/configs/nuttx_px4fmu-v1_default.cmake
@@ -36,7 +36,8 @@
 	drivers/meas_airspeed
 	drivers/frsky_telemetry
 	modules/sensors
-	#drivers/mkblctrl
+	drivers/camera_trigger
+	drivers/mkblctrl
 	drivers/px4flow

 	#


[cmake] Reduce the copy-paste boilerplate code in setting up gtest.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1530,16 +1530,16 @@
 #---Download googletest--------------------------------------------------------------
 if (testing)
   # FIXME: Remove our version of gtest in roottest. We can reuse this one.
-  # Add gtest
+  # Add googletest
   # http://stackoverflow.com/questions/9689183/cmake-googletest

-  set(_byproduct_binary_dir
+  set(_gtest_byproduct_binary_dir
     ${CMAKE_CURRENT_BINARY_DIR}/googletest-prefix/src/googletest-build/googlemock/)
-  set(_byproducts
-    ${_byproduct_binary_dir}/gtest/libgtest.a
-    ${_byproduct_binary_dir}/gtest/libgtest_main.a
-    ${_byproduct_binary_dir}/libgmock.a
-    ${_byproduct_binary_dir}/libgmock_main.a
+  set(_gtest_byproducts
+    ${_gtest_byproduct_binary_dir}/gtest/libgtest.a
+    ${_gtest_byproduct_binary_dir}/gtest/libgtest_main.a
+    ${_gtest_byproduct_binary_dir}/libgmock.a
+    ${_gtest_byproduct_binary_dir}/libgmock_main.a
     )

   ExternalProject_Add(
@@ -1562,7 +1562,7 @@
                   -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
     # Disable install step
     INSTALL_COMMAND ""
-    BUILD_BYPRODUCTS ${_byproducts}
+    BUILD_BYPRODUCTS ${_gtest_byproducts}
     # Wrap download, configure and build steps in a script to log output
     LOG_DOWNLOAD ON
     LOG_CONFIGURE ON
@@ -1577,25 +1577,15 @@
   ExternalProject_Get_Property(googletest binary_dir)
   set(_G_LIBRARY_PATH ${binary_dir}/googlemock/)

-  # gtest
-  add_library(gtest IMPORTED STATIC GLOBAL)
+  # Register gtest, gtest_main, gmock, gmock_main
+  foreach (lib gtest gtest_main gmock gmock_main)
+    add_library(${lib} IMPORTED STATIC GLOBAL)
+    add_dependencies(${lib} googletest)
+  endforeach()
   set_property(TARGET gtest PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/gtest/libgtest.a)
-  add_dependencies(gtest googletest)
-
-  # gtest_main
-  add_library(gtest_main IMPORTED STATIC GLOBAL)
   set_property(TARGET gtest_main PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/gtest/libgtest_main.a)
-  add_dependencies(gtest_main googletest)
-
-  # gmock
-  add_library(gmock IMPORTED STATIC GLOBAL)
   set_property(TARGET gmock PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/libgmock.a)
-  add_dependencies(gmock googletest)
-
-  # gmock_main
-  add_library(gmock_main IMPORTED STATIC GLOBAL)
   set_property(TARGET gmock_main PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/libgmock_main.a)
-  add_dependencies(gmock_main googletest)

 endif()


ROOT-7405 - File downloaded as part of build need to have a resilient address

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1,6 +1,7 @@
 #---Check for installed packages depending on the build options/components eamnbled -
 include(ExternalProject)
 include(FindPackageHandleStandardArgs)
+set(repository_tarfiles http://service-spi.web.cern.ch/service-spi/external/tarFiles)

 #---On MacOSX, try to find frameworks after standard libraries or headers------------
 set(CMAKE_FIND_FRAMEWORK LAST)
@@ -88,7 +89,7 @@
     ExternalProject_Add(
      LZMA
      URL ${CMAKE_SOURCE_DIR}/core/lzma/src/xz-${lzma_version}-win32.tar.gz
-#      URL_MD5  65693dc257802b6778c28ed53ecca678
+     #URL_MD5  65693dc257802b6778c28ed53ecca678
      PREFIX LZMA
      INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND "" BUILD_COMMAND ""
@@ -219,7 +220,8 @@
     message(STATUS "Downloading and building GSL version ${gsl_version}")
     ExternalProject_Add(
       GSL
-      URL http://mirror.switch.ch/ftp/mirror/gnu/gsl/gsl-${gsl_version}.tar.gz
+      # http://mirror.switch.ch/ftp/mirror/gnu/gsl/gsl-${gsl_version}.tar.gz
+      URL ${repository_tarfiles}/gsl-${gsl_version}.tar.gz
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR> --enable-shared=no CFLAGS=${CMAKE_C_FLAGS}
     )
@@ -530,7 +532,7 @@
   message(STATUS "Downloading and building FFTW version ${FFTW_VERSION}")
   ExternalProject_Add(
     FFTW3
-    URL http://service-spi.web.cern.ch/service-spi/external/tarFiles/fftw-${FFTW_VERSION}.tar.gz
+    URL ${repository_tarfiles}/fftw-${FFTW_VERSION}.tar.gz
     INSTALL_DIR ${CMAKE_BINARY_DIR}
     CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR>
     BUILD_COMMAND make CFLAGS=-fPIC
@@ -548,7 +550,8 @@
     message(STATUS "Downloading and building CFITSIO version ${cfitsio_version}")
     ExternalProject_Add(
       CFITSIO
-      URL ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio${cfitsio_version_no_dots}.tar.gz
+      # ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio${cfitsio_version_no_dots}.tar.gz
+      URL ${repository_tarfiles}/cfitsio${cfitsio_version_no_dots}.tar.gz
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR>
       BUILD_IN_SOURCE 1
@@ -627,7 +630,8 @@
   ROOT_ADD_CXX_FLAG(__cxxflags -Wno-format-security)
   ExternalProject_Add(
     XROOTD
-    URL http://xrootd.org/download/v${xrootd_version}/xrootd-${xrootd_version}.tar.gz
+    # http://xrootd.org/download/v${xrootd_version}/xrootd-${xrootd_version}.tar.gz
+    URL ${repository_tarfiles}/xrootd-${xrootd_version}.tar.gz
     INSTALL_DIR ${CMAKE_BINARY_DIR}
     CMAKE_ARGS -DENABLE_PERL=FALSE
                -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
@@ -839,7 +843,8 @@
     ExternalProject_Add(
       DAVIX
       PREFIX DAVIX
-      URL http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/tar/davix/davix-embedded-${DAVIX_VERSION}.tar.gz
+      # http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/tar/davix/davix-embedded-${DAVIX_VERSION}.tar.gz
+      URL ${repository_tarfiles}/davix-embedded-${DAVIX_VERSION}.tar.gz
       INSTALL_DIR ${CMAKE_BINARY_DIR}/DAVIX-install
       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
                  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
@@ -925,7 +930,7 @@
     set(tbb_version 42_20140122)
     ExternalProject_Add(
       TBB
-      URL http://service-spi.web.cern.ch/service-spi/external/tarFiles/tbb${tbb_version}oss_src.tgz
+      URL ${repository_tarfiles}/tbb${tbb_version}oss_src.tgz
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND ""
       BUILD_COMMAND make CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}


Fix problem introduced on Windows that enabled vc when it shouldn't

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -838,18 +838,18 @@

 #---Check for vc and its compatibility-----------------------------------------------
 if(vc)
-  if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
       message(STATUS "VC requires GCC version >= 4.5; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
     endif()
-  elseif (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
+  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
       message(STATUS "VC requires Clang version >= 4.0; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
     endif()
-  elseif (CMAKE_CXX_COMPILER_ID STREQUAL MSVC)
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1600)  # equivalent to MSVC 2010
+  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0)  # equivalent to MSVC 2010
       message(STATUS "VC requires MSVC version >= 2010; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
     endif()


Minor boost & ilmbase version build cleanup

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -46,8 +46,13 @@

 find_package (IlmBase REQUIRED)

-include_directories ("${ILMBASE_INCLUDE_DIR}")
-include_directories ("${ILMBASE_INCLUDE_DIR}/OpenEXR")
+if (ILMBASE_FOUND)
+    include_directories ("${ILMBASE_INCLUDE_DIR}")
+    include_directories ("${ILMBASE_INCLUDE_DIR}/OpenEXR")
+    message (STATUS "ILMBASE_INCLUDE_DIR=${ILMBASE_INCLUDE_DIR}")
+else ()
+    message (STATUS "ILMBASE not found!")
+endif ()

 macro (LINK_ILMBASE target)
     target_link_libraries (${target} ${ILMBASE_LIBRARIES})
@@ -62,7 +67,8 @@

 message (STATUS "BOOST_ROOT ${BOOST_ROOT}")

-set (Boost_ADDITIONAL_VERSIONS "1.49" "1.48" "1.47" "1.46" "1.45"
+set (Boost_ADDITIONAL_VERSIONS "1.51" "1.50" "1.49" "1.48"
+                               "1.47" "1.46" "1.45"
                                "1.44" "1.43" "1.42" "1.41" "1.40")
 #set (Boost_USE_STATIC_LIBS   ON)
 set (Boost_USE_MULTITHREADED ON)
@@ -74,7 +80,7 @@
         list (APPEND Boost_COMPONENTS wave)
     endif ()

-    find_package (Boost 1.34 REQUIRED
+    find_package (Boost 1.40 REQUIRED
                   COMPONENTS ${Boost_COMPONENTS}
                  )
 endif ()


Fix boost detection on windows.

Fix boost detection on windows.

--- cmake/BALLConfigBoost.cmake
+++ cmake/BALLConfigBoost.cmake
@@ -1,5 +1,9 @@
-SET(BALL_BOOST_COMPONENTS system thread iostreams asio)
-FIND_PACKAGE(Boost COMPONENTS ${BALL_BOOST_COMPONENTS} QUIET)
+SET(BALL_BOOST_COMPONENTS system thread iostreams)
+SET(Boost_USE_STATIC_LIBS ON)
+SET(Boost_ADDITIONAL_VERSIONS "1.39" "1.39.0" "1.40" "1.40.0" "1.41" "1.41.0"
+	"1.42" "1.42.0" "1.43" "1.43.0")
+SET(Boost_DETAILED_FAILURE_MSG ON)
+FIND_PACKAGE(Boost COMPONENTS ${BALL_BOOST_COMPONENTS})

 IF (NOT Boost_VERSION) ## we cannot test for Boost_FOUND since this requires all components
 	MESSAGE(SEND_ERROR "Could not find a suitable boost installation! This is a required dependency for BALL! Try setting BOOST_ROOT in ccmake!")


Fix for ROOT-7480 - improvement of the occincdir search in configure

--- cmake/modules/FindOCC.cmake
+++ cmake/modules/FindOCC.cmake
@@ -11,7 +11,7 @@

 find_path(OCC_INCLUDE_DIR
           NAMES Standard_Real.hxx
-          HINTS ${_occdirs} /usr/include/opencascade
+          HINTS ${_occdirs} /usr/include/opencascade /usr/include/oce
           PATH_SUFFIXES inc
           DOC "Specify the directory containing Standard_Real.hxx")