Revert "Disable imt option rather than enabling builtin_tbb by default"

This partially reverts commit aad5a3bb7ab8ea3df1dc27205c3cae26aacf631b.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1138,19 +1138,30 @@
 endif()

 #---Check for TBB---------------------------------------------------------------------
-if(imt AND NOT builtin_tbb)
-  message(STATUS "Looking for TBB")
-  if(fail-on-missing)
-    find_package(TBB 4.3 REQUIRED)
-  else()
-    find_package(TBB 4.3)
+if(imt)
+  if(NOT builtin_tbb)
+    message(STATUS "Looking for TBB")
+    find_package(TBB)
+    if(TBB_FOUND)
+      if(${TBB_VERSION} VERSION_LESS 4.3)
+        if(fail-on-missing)
+          message(FATAL_ERROR "TBB version < 4.3. You can enable the option 'builtin_tbb' to build the library internally")
+        else()
+          message(STATUS "TBB version < 4.3. Switching on builtin_tbb option")
+          set(builtin_tbb ON CACHE BOOL "" FORCE)
+        endif()
+      endif()
+    endif()
     if(NOT TBB_FOUND)
-      message(STATUS "TBB not found. Switching of imt option")
-      set(imt OFF CACHE BOOL "" FORCE)
+      if(fail-on-missing)
+        message(FATAL_ERROR "TBB not found. You can enable the option 'builtin_tbb' to build the library internally")
+      else()
+        message(STATUS "TBB not found. Switching on builtin_tbb option")
+        set(builtin_tbb ON CACHE BOOL "" FORCE)
+      endif()
     endif()
   endif()
 endif()
-
 if(builtin_tbb)
   set(tbb_version 2017_U5)
   if(CMAKE_CXX_COMPILER_ID MATCHES Clang)


Changed FIND_PACKAGE_DLL_WIN32 added SKIP_INSTALL option to avoid installing dlls that are not supposed to be installed but added to  ZORBA_REQUIRED_DLL and ZORBA_REQUIRED_DLL_PATHS Approved: Chris Hillery, Juan Zacarias

--- cmake_modules/Windows/ProxyFindModule.cmake
+++ cmake_modules/Windows/ProxyFindModule.cmake
@@ -265,13 +265,15 @@
   IF (NOT WIN32)
     MESSAGE (FATAL_ERROR "This macro is intended only for Windows platforms.")
   ENDIF (NOT WIN32)
-
+
+  PARSE_ARGUMENTS(ARG "" "" "SKIP_INSTALL" ${ARGN})
+
   # get the current DLLs and their paths
   SET (dlls "${ZORBA_REQUIRED_DLLS}")
   SET (paths "${ZORBA_REQUIRED_DLL_PATHS}")
-
-  FOREACH (NAME ${ARGN})
-
+
+  FOREACH (NAME ${ARG_DEFAULT_ARGS})
+
     # first delete the cache entry used during FIND_FILE to make sure the correct file is chosen
     UNSET (TMP_DLL_VAR CACHE)

@@ -291,8 +293,13 @@
       FILE (TO_NATIVE_PATH ${PATH} NATIVE_PATH)
       LIST (APPEND paths "${NATIVE_PATH}")
       MESSAGE (STATUS "Added dll to ZORBA_REQUIRED_DLLS cache variable: ${TMP_DLL_VAR}")
-      INSTALL_DLL (${TMP_DLL_VAR})
-
+
+      IF(ARG_SKIP_INSTALL)
+        MESSAGE(STATUS "Skip installation of ${NAME}.dll")
+      ELSE (ARG_SKIP_INSTALL)
+        INSTALL_DLL (${TMP_DLL_VAR})
+      ENDIF(ARG_SKIP_INSTALL)
+
       # we break the loop if we found one DLL
       BREAK ()

@@ -302,7 +309,7 @@

   # we report a warning if the DLL could not be found
   IF (NOT TMP_DLL_VAR)
-    MESSAGE (WARNING "None of the names provided (${ARGN}) points to a DLL in: ${LIBRARY_LOCATION}. Zorba will not run properly unless you have it in the path.")
+    MESSAGE (WARNING "None of the names provided (${ARG_DEFAULT_ARGS}) points to a DLL in: ${LIBRARY_LOCATION}. Zorba will not run properly unless you have it in the path.")
   ENDIF (NOT TMP_DLL_VAR)

   # make sure we don't leave garbage in the cache and don't influence other logic with this


Format issue for make targets

Format issue for make targets

--- cmake/BALLTargets.cmake
+++ cmake/BALLTargets.cmake
@@ -15,8 +15,8 @@
 		COMMAND ${CMAKE_COMMAND} -E echo " (c) Documentation:"
 		COMMAND ${CMAKE_COMMAND} -E echo "    doc             builds the html documentation"
 		COMMAND ${CMAKE_COMMAND} -E echo "    doc_tidy        builds the xhtml compliant documentation"
-		COMMAND ${CMAKE_COMMAND} -E echo "    doc_dot         builds the doxygen DOT documentation"
-		COMMAND ${CMAKE_COMMAND} -E echo "    doc_tutorial		builds the BALL pdf tutorial"
+		COMMAND ${CMAKE_COMMAND} -E echo "    doc_dot        	builds the doxygen DOT documentation"
+		COMMAND ${CMAKE_COMMAND} -E echo "    doc_tutorial    builds the BALL pdf tutorial"
 		COMMAND ${CMAKE_COMMAND} -E echo ""
 		COMMAND ${CMAKE_COMMAND} -E echo " (d) Tests:"
 		COMMAND ${CMAKE_COMMAND} -E echo "    build_tests     builds the unit tests"
@@ -44,7 +44,7 @@
 		COMMAND ${CMAKE_COMMAND} -E echo "    doc             builds the html documentation"
 		COMMAND ${CMAKE_COMMAND} -E echo "    doc_tidy        builds the xhtml compliant documentation"
 		COMMAND ${CMAKE_COMMAND} -E echo "    doc_dot         builds the doxygen DOT documentation"
-		COMMAND ${CMAKE_COMMAND} -E echo "    doc_tutorial		builds the BALL pdf tutorial"
+		COMMAND ${CMAKE_COMMAND} -E echo "    doc_tutorial    builds the BALL pdf tutorial"
 		COMMAND ${CMAKE_COMMAND} -E echo ""
 		COMMAND ${CMAKE_COMMAND} -E echo " (d) Tests:"
 		COMMAND ${CMAKE_COMMAND} -E echo "    build_tests     builds the unit tests"


link to dl on unix systems when supporting matio+hdf5

--- cmake/DetectMATIO.cmake
+++ cmake/DetectMATIO.cmake
@@ -66,6 +66,11 @@

             list(APPEND ${ROOT_PROJECT}_LIBS ${HDF5_LIBS})

+            if(UNIX)
+                # HDF5 on Unix systems references to dlclose()
+                list(APPEND ${ROOT_PROJECT}_LIBS dl)
+            endif(UNIX)
+
         endif(NOT ${HDF5_LIBS} STREQUAL HDF5_LIBS-NOTFOUND)

 #LINK_DIRECTORIES(${HDF5_DIR}/lib)


CMake: mark FASTJET vars as advanced

CMake: mark FASTJET vars as advanced

--- cmake/FindFASTJET.cmake
+++ cmake/FindFASTJET.cmake
@@ -36,6 +36,7 @@
     if(NOT FASTJET_CONFIG)
         message(FATAL_ERROR "Could not find fastjet-config executable")
     endif(NOT FASTJET_CONFIG)
+    mark_as_advanced(FASTJET_CONFIG)

     # Check for header installation
     find_path(FASTJETHH include/fastjet/PseudoJet.hh PATHS ${FASTJET})
@@ -43,6 +44,7 @@
     if (FASTJETHH-NOTFOUND)
         message(FATAL_ERROR "Header file fastjet/PseudoJet.hh not found in ${FASTJET}/include. Please check your FASTJET installation")
     endif(FASTJETHH-NOTFOUND)
+    mark_as_advanced(FASTJETHH)

     # FastJet version
     execute_process(COMMAND ${FASTJET_CONFIG} --version OUTPUT_VARIABLE FASTJET_VERSION ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )


in find_library() and find_paths(), use HINTS and not PATHS to locate stuff.
now finding stuff using pkg-config can really work.

btw, it might be nice to unify this with the FindLibXml2.cmake in kdelibs

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

--- cmake/FindLibXml2.cmake
+++ cmake/FindLibXml2.cmake
@@ -25,8 +25,8 @@
    SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags})
 ENDIF (NOT WIN32)

-FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
-   PATHS
+FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
+   HINTS
    ${_LibXml2IncDir}
    PATH_SUFFIXES libxml2
    )
@@ -34,7 +34,7 @@
 SET(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIR} ${_LibXml2IncDir} )

 FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
-   PATHS
+   HINTS
    ${_LibXml2LinkDir}
    )


fixed building issue on freeBSD when log4cxx is enabled

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

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

 IF(LOG4CXX_INCLUDE_DIR AND LOG4CXX_LIBRARIES)
   SET(Log4cxx_FOUND 1)
+  #remove last /log4cxx string
+  STRING(REGEX REPLACE "/log4cxx" "" LOG4CXX_INCLUDE_DIR_SUP_LEVEL ${LOG4CXX_INCLUDE_DIR})
+  SET (LOG4CXX_INCLUDE_DIR ${LOG4CXX_INCLUDE_DIR_SUP_LEVEL} ${LOG4CXX_INCLUDE_DIR} )
   if(NOT Log4cxx_FIND_QUIETLY)
    message(STATUS "Found log4cxx: ${LOG4CXX_LIBRARIES}")
   endif(NOT Log4cxx_FIND_QUIETLY)


Bump to v1.1.0

Bump to v1.1.0

Signed-off-by: Gopal, Puunithaaraj <10308ab826b56f8bbce1ec0c10bd609cace363da@intel.com>

--- cmake/ProjectInfo.cmake
+++ cmake/ProjectInfo.cmake
@@ -1,5 +1,5 @@
 set(GstMfx_VERSION_MAJOR   1)
-set(GstMfx_VERSION_MINOR   0)
+set(GstMfx_VERSION_MINOR   1)
 set(GstMfx_VERSION_PATCH   0)
 set(GstMfx_PACKAGE         "gstmfx")
 set(GstMfx_PACKAGE_NAME    "GStreamer Media SDK")


tools: Fix Cmake arguments for IDF Monitor

SERIAL_TOOL_ARGS is post-processed with the spaces2list cmake function.
Therefore, it should be a list of arguments because spaces are replaced
with semicolons.

Regression of b77addea2fc44d1a336070e156d1c4deb50f752e and
c425ac7bed1a63bb9332bd83a6e075499a244078.

Closes https://github.com/espressif/esp-idf/issues/6946

--- components/esptool_py/project_include.cmake
+++ components/esptool_py/project_include.cmake
@@ -49,7 +49,7 @@

 if(min_rev)
     list(APPEND esptool_elf2image_args --min-rev ${min_rev})
-    set(monitor_rev_args --revision ${min_rev})
+    set(monitor_rev_args "--revision;${min_rev}")
     unset(min_rev)
 endif()

@@ -155,7 +155,7 @@
     COMMAND ${CMAKE_COMMAND}
     -D IDF_PATH="${idf_path}"
     -D SERIAL_TOOL="${ESPMONITOR}"
-    -D SERIAL_TOOL_ARGS="--target ${target} ${monitor_rev_args} ${elf_dir}/${elf}"
+    -D SERIAL_TOOL_ARGS="--target;${target};${monitor_rev_args};${elf_dir}/${elf}"
     -D WORKING_DIRECTORY="${build_dir}"
     -P run_serial_tool.cmake
     WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}


bugfix in INCLUDE_DIRECTORIES_ISPC macro

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -36,7 +36,10 @@
   SET(ISPC_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${ISPC_TARGET_DIR})

-  STRING(REGEX REPLACE ";" ";-I;" ISPC_INCLUDE_DIR_PARMS "${ISPC_INCLUDE_DIR}")
+  IF(ISPC_INCLUDE_DIR)
+    STRING(REGEX REPLACE ";" ";-I;" ISPC_INCLUDE_DIR_PARMS "${ISPC_INCLUDE_DIR}")
+    SET(ISPC_INCLUDE_DIR_PARMS "-I" ${ISPC_INCLUDE_DIR_PARMS})
+  ENDIF()

   IF (__XEON__)
     STRING(REGEX REPLACE "," ";" target_list "${targets}")
@@ -87,7 +90,7 @@
       OUTPUT ${results} ${outdirh}/${fname}_ispc.h
       COMMAND mkdir -p ${outdir} \; ispc
       -I ${CMAKE_CURRENT_SOURCE_DIR}
-      -I ${ISPC_INCLUDE_DIR_PARMS}
+      ${ISPC_INCLUDE_DIR_PARMS}
       --pic
       -O3
       --target=${ISPC_TARGETS}


Fix gh-705 Slow compiles of generated stubs

The _esp files that are generated from scm take forever to compile in release
mode. I don't believe that these files are speed critical, so turn off
optimizaton in the interests of actually being able to build the system in
a realistic time.

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- esp/scm/smcscm.cmake
+++ esp/scm/smcscm.cmake
@@ -55,6 +55,9 @@
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.int PROPERTIES GENERATED TRUE)
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.ipp PROPERTIES GENERATED TRUE)
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.cpp PROPERTIES GENERATED TRUE)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.cpp PROPERTIES COMPILE_FLAGS "-O0")
+    endif ()
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.ipp PROPERTIES GENERATED TRUE)
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.xml PROPERTIES GENERATED TRUE)
     set ( ESP_GENERATED_INCLUDES ${ESP_GENERATED_INCLUDES} ${ESPSCM_GENERATED_DIR}/${result}.esp ${ESPSCM_GENERATED_DIR}/${result}.hpp ${ESPSCM_GENERATED_DIR}/${result}.int ${ESPSCM_GENERATED_DIR}/${result}.ipp ${ESPSCM_GENERATED_DIR}/${result}_esp.ipp ${ESPSCM_GENERATED_DIR}/${result}.xml )


BUG: Adding missing install directory include lines.  Somehow these got removed by Bill's changes.

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -77,6 +77,18 @@
   ${ITK_INSTALL_INCLUDE_DIR}/Utilities/DICOMParser
 )

+IF(VXL_FROM_UTILITIES)
+  SET(ITK_INCLUDE_DIRS_INSTALL_TREE ${ITK_INCLUDE_DIRS_INSTALL_TREE}
+    ${ITK_INSTALL_INCLUDE_DIR}/Utilities/vxl/vcl
+    ${ITK_INSTALL_INCLUDE_DIR}/Utilities/vxl
+  )
+ELSE(VXL_FROM_UTILITIES)
+  SET(ITK_INCLUDE_DIRS_INSTALL_TREE ${ITK_INCLUDE_DIRS_INSTALL_TREE}
+    ${ITK_INSTALL_INCLUDE_DIR}/Numerics/vxl
+    ${ITK_INSTALL_INCLUDE_DIR}/Numerics/vxl/vcl
+  )
+ENDIF(VXL_FROM_UTILITIES)
+
 # Include directory for stdlib.
 IF(NOT ITK_USE_SYSTEM_STDLIB)
   SET(ITK_INCLUDE_DIRS_INSTALL_TREE ${ITK_INCLUDE_DIRS_INSTALL_TREE}


Document all the possible output variables. [ci skip]

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -34,6 +34,8 @@
 #  URHO3D_VERSION
 #  URHO3D_64BIT (may be used as input variable for multilib-capable compilers; must be anyway specified for MSVC due to CMake/VS generator limitation)
 #  URHO3D_LIB_TYPE (may be used as input variable as well to limit the search of library type)
+#  URHO3D_OPENGL
+#  URHO3D_SSE
 #
 # WIN32 only:
 #  URHO3D_LIBRARIES_REL
@@ -41,6 +43,7 @@
 #  URHO3D_DLL
 #  URHO3D_DLL_REL
 #  URHO3D_DLL_DBG
+#  URHO3D_D3D11
 #

 set (PATH_SUFFIX Urho3D)


CMake: Better define required windows version.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -64,7 +64,8 @@
     set (DEST_LIBRARY_DIR_CONFIG ${DEST_LIBRARY_DIR}/$<CONFIG>)
 endif ()
 if (WIN32)
-    add_definitions(-D_WIN32_WINNT=0x0601)
+    set (WINVER 0x0601)
+    add_definitions(-DWINVER=${WINVER} -D_WIN32_WINNT=${WINVER} -D_WIN32_WINDOWS=${WINVER})
 endif ()

 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEST_BIN_DIR})


Removing unnecessary dependencies.

Removing unnecessary dependencies.

Change-Id: I80c8f007e7222a7facc17f7c959848856251cce1

--- Views/Infovis/module.cmake
+++ Views/Infovis/module.cmake
@@ -13,6 +13,4 @@
     vtkTestingRendering
     vtkIOInfovis
     vtkIOSQL
-    vtkRenderingQt
-    vtkRenderingFreeTypeOpenGL
   )


Added another hook into target creation.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -43,6 +43,10 @@
     set(SOURCES ${CURRENT_SOURCES} ${HEADERS})
   else ()
     set(SOURCES ${ARGN})
+  endif ()
+
+  if (COMMAND on_enumerate_target_sources)
+    on_enumerate_target_sources()
   endif ()

   if (${is_executable} AND ANDROID)
@@ -81,6 +85,8 @@

 macro(create_library target)
   create_target(${target} FALSE)
+  string(TOUPPER "${CURRENT_TARGET}" UPPER_CURRENT_TARGET)
+  add_definitions("-D${UPPER_CURRENT_TARGET}_LIB")
 endmacro(create_library)

 macro(create_executable target)


fixed: find correct libs if 32 and 64 bit versions are installed

--- Source/Contrib/CgFXMaterial/CMake/FindCg.cmake
+++ Source/Contrib/CgFXMaterial/CMake/FindCg.cmake
@@ -26,25 +26,31 @@
         PATHS ${CG_ROOT} ENV CG_ROOT
         PATH_SUFFIXES include)

+    IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      SET(_OSG_CG_PATH_SUFFIXES lib64 lib.x64 lib)
+    ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      SET(_OSG_CG_PATH_SUFFIXES lib)
+    ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+
     SET(CG_NAMES_RELEASE ${CG_NAMES_RELEASE} Cg)
     FIND_LIBRARY(CG_LIBRARY_RELEASE NAMES ${CG_NAMES_RELEASE}
         PATHS ${CG_ROOT} ENV CG_ROOT
-        PATH_SUFFIXES lib64 lib.x64 lib)
+        PATH_SUFFIXES ${_OSG_CG_PATH_SUFFIXES})

     SET(CG_NAMES_DEBUG ${CG_NAMES_DEBUG} Cgd)
     FIND_LIBRARY(CG_LIBRARY_DEBUG NAMES ${CG_NAMES_DEBUG}
         PATHS ${CG_ROOT} ENV CG_ROOT
-        PATH_SUFFIXES lib64 lib.x64 lib)
+        PATH_SUFFIXES ${_OSG_CG_PATH_SUFFIXES})

     SET(CG_GL_NAMES_RELEASE ${CG_GL_NAMES_RELEASE} CgGL)
     FIND_LIBRARY(CG_GL_LIBRARY_RELEASE NAMES ${CG_GL_NAMES_RELEASE}
         PATHS ${CG_ROOT} ENV CG_ROOT
-        PATH_SUFFIXES lib64 lib.x64 lib)
+        PATH_SUFFIXES ${_OSG_CG_PATH_SUFFIXES})

     SET(CG_GL_NAMES_DEBUG ${CG_GL_NAMES_DEBUG} CgGLd)
     FIND_LIBRARY(CG_GL_LIBRARY_DEBUG NAMES ${CG_GL_NAMES_DEBUG}
         PATHS ${CG_ROOT} ENV CG_ROOT
-        PATH_SUFFIXES lib64 lib.x64 lib)
+        PATH_SUFFIXES ${_OSG_CG_PATH_SUFFIXES})
 ENDIF (APPLE)


remove extra space

remove extra space

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -24,7 +24,7 @@

         if (_cuda_min_arch LESS 60)
             message(SEND_ERROR "HOOMD requires compute 6.0 or newer")
-        endif ()
+        endif()

         # only generate ptx code for the maximum supported CUDA_ARCH (saves on file size)
         list(REVERSE _cuda_arch_list_sorted)


Remove the SIMD project and thus remove the dependency on NASM

--- support/cmake/support_macros.cmake
+++ support/cmake/support_macros.cmake
@@ -165,27 +165,45 @@
     set(SGCT_BUILD_CSHARP_PROJECTS OFF CACHE BOOL "" FORCE)
     set(SGCT_LIGHT_ONLY ON CACHE BOOL "" FORCE)
     set(SGCT_CUSTOMOUTPUTDIRS OFF CACHE BOOL "" FORCE)
+    set(JPEG_TURBO_WITH_SIMD OFF CACHE BOOL "" FORCE)

     add_subdirectory(${OPENSPACE_EXT_DIR}/sgct)
     target_include_directories(libOpenSpace SYSTEM PUBLIC ${OPENSPACE_EXT_DIR}/sgct/include)
     target_link_libraries(
         libOpenSpace
-        # sgct
         sgct_light glew glfw png16_static quat tinyxml2static turbojpeg-static
         vrpn
         ${GLFW_LIBRARIES}
     )

     set_property(TARGET sgct_light PROPERTY FOLDER "External")
-    set_property(TARGET glew PROPERTY FOLDER "External/SGCT")
-    set_property(TARGET glfw PROPERTY FOLDER "External/SGCT")
-    set_property(TARGET png16_static PROPERTY FOLDER "External/SGCT")
-    set_property(TARGET quat PROPERTY FOLDER "External/SGCT")
-    set_property(TARGET simd PROPERTY FOLDER "External/SGCT")
-    set_property(TARGET tinyxml2static PROPERTY FOLDER "External/SGCT")
-    set_property(TARGET turbojpeg-static PROPERTY FOLDER "External/SGCT")
-    set_property(TARGET vrpn PROPERTY FOLDER "External/SGCT")
-    set_property(TARGET zlibstatic PROPERTY FOLDER "External/SGCT")
+    if (TARGET glew)
+        set_property(TARGET glew PROPERTY FOLDER "External/SGCT")
+    endif ()
+    if (TARGET glfw)
+        set_property(TARGET glfw PROPERTY FOLDER "External/SGCT")
+    endif ()
+    if (TARGET png16_static)
+        set_property(TARGET png16_static PROPERTY FOLDER "External/SGCT")
+    endif ()
+    if (TARGET quat)
+        set_property(TARGET quat PROPERTY FOLDER "External/SGCT")
+    endif ()
+    if (TARGET simd)
+        set_property(TARGET simd PROPERTY FOLDER "External/SGCT")
+    endif ()
+    if (TARGET tinyxml2static)
+        set_property(TARGET tinyxml2static PROPERTY FOLDER "External/SGCT")
+    endif ()
+    if (TARGET turbojpeg-static)
+        set_property(TARGET turbojpeg-static PROPERTY FOLDER "External/SGCT")
+    endif ()
+    if (TARGET vrpn)
+        set_property(TARGET vrpn PROPERTY FOLDER "External/SGCT")
+    endif ()
+    if (TARGET zlibstatic)
+        set_property(TARGET zlibstatic PROPERTY FOLDER "External/SGCT")
+    endif ()

     if (UNIX AND (NOT APPLE))
         target_link_libraries(libOpenSpace Xcursor Xinerama X11)


Added strip option to cpack

Added strip option to cpack

--- src/CPackConfig.cmake
+++ src/CPackConfig.cmake
@@ -46,6 +46,7 @@
 SET(CPACK_INSTALL_CMAKE_PROJECTS "${CUR_SOURCE_DIR}/build;src;ALL;/")
 SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")

+SET(CPACK_STRIP_FILES "1")
 #SET (${VERSION} CPACK_DEBIAN_PACKAGE_VERSION)
 SET (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
 SET (CPACK_DEBIAN_PACKAGE_SECTION "graphics")


Only add visibility flags if compiling with gcc

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -38,10 +38,12 @@
   if (OGRE_STATIC)
     # add static prefix, if compiling static version
     set_target_properties(${LIBNAME} PROPERTIES OUTPUT_NAME ${LIBNAME}Static)
-  else ()
-    # add GCC visibility flags to shared library build
-    set_target_properties(${LIBNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
-  endif ()
+  else (OGRE_STATIC)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      # add GCC visibility flags to shared library build
+      set_target_properties(${LIBNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
+	endif (CMAKE_COMPILER_IS_GNUCXX)
+  endif (OGRE_STATIC)
   install(TARGETS ${LIBNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}"
       CONFIGURATIONS Release MinSizeRel RelWithDebInfo None


COMP: Fix test properties

COMP: Fix test properties

--- CMake/mitkTestProjectTemplate.cmake
+++ CMake/mitkTestProjectTemplate.cmake
@@ -26,7 +26,7 @@
   add_test(mitkProjectTemplateBuildTest
            ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --target MITK-ProjectTemplateBuildTest)
   set_tests_properties(mitkProjectTemplateBuildTest PROPERTIES
-                       LABELS MITK BlueBerry)
+                       LABELS "MITK;BlueBerry")

   add_custom_target(MITK-ProjectTemplatePackageTest
@@ -43,7 +43,7 @@

   set_tests_properties(mitkProjectTemplatePackageTest PROPERTIES
                        DEPENDS mitkProjectTemplateBuildTest
-                       LABELS MITK BlueBerry)
+                       LABELS "MITK;BlueBerry")

 endif()


Convert tabs to spaces in IWYUTargetSourcesVerify

--- test/IWYUTargetSourcesVerify.cmake
+++ test/IWYUTargetSourcesVerify.cmake
@@ -8,6 +8,6 @@
 set (BUILD_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/BUILD.output)

 assert_file_has_line_matching (${BUILD_OUTPUT}
-	                           "^.*include-what-you-use.*Source.cpp.*$")
+                               "^.*include-what-you-use.*Source.cpp.*$")
 assert_file_has_line_matching (${BUILD_OUTPUT}
-	                           "^.*include-what-you-use.*Header.h.*$")+                               "^.*include-what-you-use.*Header.h.*$")


- Fix asm.js builds by adding correct build flags

--- cmake/Toolchains/js-emscripten.toolchain.cmake
+++ cmake/Toolchains/js-emscripten.toolchain.cmake
@@ -22,14 +22,27 @@

 set( EMSCRIPTEN ON CACHE BOOL "" )

-option ( COFFEE_GENERATE_HTML "Generate HTML wrapper document for Emscripten" ON )
-option ( COFFEE_GENERATE_WASM "Generate WASM version of code, not asm.js" OFF )
+option ( COFFEE_GENERATE_HTML
+    "Generate HTML wrapper document for Emscripten" ON )
+option ( COFFEE_GENERATE_WASM
+    "Generate WASM version of code, not asm.js" OFF )

 if(COFFEE_GENERATE_WASM)
     message ( STATUS "Generating WASM assembly" )
-    set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -s WASM=1 -O2" CACHE STRING "" )
-    set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -s WASM=1 -O2" CACHE STRING "" )
-    set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -s WASM=1 -O2" CACHE STRING "" )
+    set ( CMAKE_CXX_FLAGS
+        "${CMAKE_CXX_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -s WASM=1 -O2" CACHE STRING "" )
+    set ( CMAKE_C_FLAGS
+        "${CMAKE_C_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -s WASM=1 -O2" CACHE STRING "" )
+    set ( CMAKE_EXE_LINKER_FLAGS
+        "${CMAKE_EXE_LINKER_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -s WASM=1 -O2" CACHE STRING "" )
+else()
+    message ( STATUS "Generating asm.js assembly" )
+    set ( CMAKE_CXX_FLAGS
+        "${CMAKE_CXX_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -O2" CACHE STRING "" )
+    set ( CMAKE_C_FLAGS
+        "${CMAKE_C_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -O2" CACHE STRING "" )
+    set ( CMAKE_EXE_LINKER_FLAGS
+        "${CMAKE_EXE_LINKER_FLAGS} -s DEMANGLE_SUPPORT=1 -s USE_SDL=2 -O2" CACHE STRING "" )
 endif()

 set(CMAKE_CROSSCOMPILING TRUE)


added support for toolchain-specific files

--- src/cmake/flags.cmake
+++ src/cmake/flags.cmake
@@ -22,7 +22,6 @@
   #endif()
 endif()

-
 # fix for gmock/gtest issue...
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function")

@@ -35,3 +34,7 @@
   set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") # strip binaries for GCC
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") # remove nonhelpful warning
 endif()
+
+# include toolchain-specific flags (if present)
+get_filename_component(TC_FILE "${CMAKE_TOOLCHAIN_FILE}" NAME)
+include(cmake/flags/${TC_FILE} OPTIONAL)


BUG: Upgrade pip in the superbuild virtual environment

The newest version to support the latest manylinux version, etc.

--- Superbuild/External-Python.cmake
+++ Superbuild/External-Python.cmake
@@ -11,7 +11,7 @@

 ExternalProject_Add(ITKPython
   DOWNLOAD_COMMAND ""
-  CONFIGURE_COMMAND ""
-  BUILD_COMMAND ${PYTHON_EXECUTABLE} -m venv "${_itk_venv}"
+  CONFIGURE_COMMAND ${PYTHON_EXECUTABLE} -m venv "${_itk_venv}"
+  BUILD_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --upgrade pip
   INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --ignore-installed itk>=5.2rc2 sphinx==3.0.4 six
   )


Use a simpler approach to detecting the version of Mono which also doesn't cause any CMake policy warnings.

--- build/modules/FindMono.cmake
+++ build/modules/FindMono.cmake
@@ -98,7 +98,8 @@
       SET(MONO_SUBMINOR_VERSION 0)

       EXEC_PROGRAM(${MONO_EXECUTABLE} ARGS --version OUTPUT_VARIABLE MONO_STRING_VERSION)
-      STRING(REGEX REPLACE ".*([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1 \\2 \\3 \\4" MONO_VERSION ${MONO_STRING_VERSION})
+      STRING(REGEX MATCH "([0-9]+)(\\.([0-9]+))+" MONO_VERSION ${MONO_STRING_VERSION})
+      STRING(REPLACE "." " " MONO_VERSION ${MONO_VERSION})
       SEPARATE_ARGUMENTS(MONO_VERSION)
       LIST(LENGTH MONO_VERSION MONO_VERSION_LENGTH)
       IF(MONO_VERSION_LENGTH EQUAL 4)
@@ -108,12 +109,8 @@

           LIST(GET MONO_VERSION 0 MONO_MAJOR_VERSION)
           LIST(GET MONO_VERSION 1 MONO_MINOR_VERSION)
-          LIST(GET MONO_VERSION 2 MONO_SUBMINOR_VERSION)
-      ELSE()
-        STRING(REGEX REPLACE ".*([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1 \\2 \\3" MONO_VERSION ${MONO_STRING_VERSION})
-        SEPARATE_ARGUMENTS(MONO_VERSION)
-        LIST(LENGTH MONO_VERSION MONO_VERSION_LENGTH)
-        IF(MONO_VERSION_LENGTH EQUAL 3)
+          LIST(GET MONO_VERSION 2 MONO_SUBMINOR_VERSION)
+      ELSEIF(MONO_VERSION_LENGTH EQUAL 3)
           SET(MONO_MAJOR_VERSION)
           SET(MONO_MINOR_VERSION)
           SET(MONO_SUBMINOR_VERSION)
@@ -121,18 +118,12 @@
           LIST(GET MONO_VERSION 0 MONO_MAJOR_VERSION)
           LIST(GET MONO_VERSION 1 MONO_MINOR_VERSION)
           LIST(GET MONO_VERSION 2 MONO_SUBMINOR_VERSION)
-        ELSE()
-          STRING(REGEX REPLACE ".*([0-9]+)\\.([0-9]+).*" "\\1 \\2" MONO_VERSION ${MONO_STRING_VERSION})
-          SEPARATE_ARGUMENTS(MONO_VERSION)
-          LIST(LENGTH MONO_VERSION MONO_VERSION_LENGTH)
-          IF(MONO_VERSION_LENGTH EQUAL 2)
-            SET(MONO_MAJOR_VERSION)
-            SET(MONO_MINOR_VERSION)
-
-            LIST(GET MONO_VERSION 0 MONO_MAJOR_VERSION)
-            LIST(GET MONO_VERSION 1 MONO_MINOR_VERSION)
-          ENDIF()
-        ENDIF()
+      ELSEIF(MONO_VERSION_LENGTH EQUAL 2)
+          SET(MONO_MAJOR_VERSION)
+          SET(MONO_MINOR_VERSION)
+
+          LIST(GET MONO_VERSION 0 MONO_MAJOR_VERSION)
+          LIST(GET MONO_VERSION 1 MONO_MINOR_VERSION)
       ENDIF()
 #MESSAGE("${MONO_MAJOR_VERSION} ${MONO_MINOR_VERSION} ${MONO_SUBMINOR_VERSION}")
 #


Update Toolchain file

Update Toolchain file

Signed-off-by: Uilian Ries <d4bad57018205bdda203549c36d3feb0bfe416a7@gmail.com>

--- Toolchain-bbb-arm.cmake
+++ Toolchain-bbb-arm.cmake
@@ -2,15 +2,17 @@
 SET(CMAKE_SYSTEM_NAME Linux)
 #this one not so much
 SET(CMAKE_SYSTEM_VERSION 1)
+# ARM arch
+SET(CMAKE_SYSTEM_PROCESSOR arm)

 SET(TOOLCHAIN_PATH /opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf)

 # specify the cross compiler
-SET(CMAKE_C_COMPILER   ${TOOLCHAIN_PATH}/bin/arm-linux-gnueabihf-gcc)
-SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_PATH}/bin/arm-linux-gnueabihf-g++)
+SET(CMAKE_C_COMPILER   arm-linux-gnueabihf-gcc)
+SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)

 # where is the target environment
-SET(CMAKE_FIND_ROOT_PATH "${TOOLCHAIN_PATH} ${TOOLCHAIN_PATH}/include")
+SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_PATH})

 # search for programs in the build host directories
 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)


Reset version to 0.0.0

Reset version to 0.0.0

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -43,7 +43,7 @@
   # ----------------------------------------------------------------------------
   # meta-data
   NAME        "Deformable"
-  VERSION     "1.1.0" # version of this module
+  VERSION     "0.0.0" # version of this module
   SOVERSION   "0"     # API yet unstable
   PACKAGE     "MIRTK"
   AUTHORS     "Andreas Schuh"


- Fix release-mode build

- Fix release-mode build

--- cmake/Packaging/WindowsImageBuild.cmake
+++ cmake/Packaging/WindowsImageBuild.cmake
@@ -143,6 +143,13 @@
 		#	)
 		execute_process ( COMMAND cmake -E make_directory ${APPX_DIR} )
 		foreach(var ${INCLUDED_LIBS})
+			set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/AppX" )
+			configure_file(
+				"${var}"
+				${APPX_DIR}/
+				COPYONLY
+				)
+			set ( APPX_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/AppX" )
 			configure_file(
 				"${var}"
 				${APPX_DIR}/


[FIX] The build system sets the architecture to i586 when using MinGW now.

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


ASAN: Add workaround for GCC on Ubuntu

ASAN: Add workaround for GCC on Ubuntu

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -108,6 +108,8 @@
 	endif ()

 	if (CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
+		# Work around error “unrecognized option '--push-state'”
+		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fuse-ld=gold")
 		set (CMAKE_SHARED_LINKER_FLAGS "-fsanitize=address ${CMAKE_SHARED_LINKER_FLAGS}")
 		# this is needed because of wrong pthread detection https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69443
 		find_package(Threads)


updated default parameters for CUDA CC in CMake:

* removed 2.0 PTX from default parameters since it has become obsolete
* added 3.5 BIN to prevent JIT compilation for super-Kepler

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -96,7 +96,11 @@
   if(CUDA_GENERATION STREQUAL "Fermi")
     set(__cuda_arch_bin "2.0 2.1(2.0)")
   elseif(CUDA_GENERATION STREQUAL "Kepler")
-    set(__cuda_arch_bin "3.0")
+    if(${CUDA_VERSION} VERSION_LESS "5.0")
+      set(__cuda_arch_bin "3.0")
+    else()
+      set(__cuda_arch_bin "3.0 3.5")
+    endif()
   elseif(CUDA_GENERATION STREQUAL "Auto")
     execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
                      WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
@@ -110,8 +114,12 @@
   endif()

   if(NOT DEFINED __cuda_arch_bin)
-    set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
-    set(__cuda_arch_ptx "2.0 3.0")
+    if(${CUDA_VERSION} VERSION_LESS "5.0")
+      set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
+    else()
+      set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
+    endif()
+    set(__cuda_arch_ptx "3.0")
   endif()

   set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")


[cmake] add -Wno-incompatible-ms-struct warning suppression

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -250,6 +250,13 @@
 		"-Wmissing-braces" "-Wno-missing-braces"
 		)

+	axl_create_c_cxx_flag_setting (
+		GCC_FLAG_INCOMPATIBLE_MS_STRUCT
+		"GNU C++ shows warnings on potentially MSVC-incompatible structs"
+		"-Wno-incompatible-ms-struct"
+		"-Wincompatible-ms-struct" "-Wno-incompatible-ms-struct"
+		)
+
 	axl_create_setting (
 		GCC_SANITIZER
 		"-fsanitize=address"


build: hoist architecture independent variables (NFC)

Hoist out the some of the architecture independent variables outside of
the inner loop.  This should simplify the logic for the function and
improve generation times.  (NFC)

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1606,6 +1606,98 @@

       set(THIN_INPUT_TARGETS)

+      # Collect architecture agnostic SDK module dependencies
+      set(swiftlib_module_depends_flattened ${SWIFTLIB_SWIFT_MODULE_DEPENDS})
+      if(${sdk} STREQUAL OSX)
+        list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_OSX})
+      elseif(${sdk} STREQUAL IOS OR ${sdk} STREQUAL IOS_SIMULATOR)
+        list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_IOS})
+      elseif(${sdk} STREQUAL TVOS OR ${sdk} STREQUAL TVOS_SIMULATOR)
+        list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_TVOS})
+      elseif(${sdk} STREQUAL WATCHOS OR ${sdk} STREQUAL WATCHOS_SIMULATOR)
+        list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_WATCHOS})
+      elseif(${sdk} STREQUAL FREEBSD)
+        list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_FREEBSD})
+      elseif(${sdk} STREQUAL LINUX OR ${sdk} STREQUAL ANDROID)
+        list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_LINUX})
+      elseif(${sdk} STREQUAL CYGWIN)
+        list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_CYGWIN})
+      elseif(${sdk} STREQUAL HAIKU)
+        list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_HAIKU})
+      endif()
+
+      # Collect architecture agnostic SDK framework dependencies
+      set(swiftlib_framework_depends_flattened ${SWIFTLIB_FRAMEWORK_DEPENDS})
+      if(${sdk} STREQUAL OSX)
+        list(APPEND swiftlib_framework_depends_flattened
+             ${SWIFTLIB_FRAMEWORK_DEPENDS_OSX})
+      elseif(${sdk} STREQUAL IOS OR ${sdk} STREQUAL IOS_SIMULATOR OR
+             ${sdk} STREQUAL TVOS OR ${sdk} STREQUAL TVOS_SIMULATOR)
+        list(APPEND swiftlib_framework_depends_flattened
+             ${SWIFTLIB_FRAMEWORK_DEPENDS_IOS_TVOS})
+      endif()
+
+      # Collect architecutre agnostic compiler flags
+      set(swiftlib_swift_compile_flags_all ${SWIFTLIB_SWIFT_COMPILE_FLAGS})
+      if(${sdk} STREQUAL OSX)
+        list(APPEND swiftlib_swift_compile_flags_all
+             ${SWIFTLIB_SWIFT_COMPILE_FLAGS_OSX})
+      elseif(${sdk} STREQUAL IOS OR ${sdk} STREQUAL IOS_SIMULATOR)
+        list(APPEND swiftlib_swift_compile_flags_all
+             ${SWIFTLIB_SWIFT_COMPILE_FLAGS_IOS})
+      elseif(${sdk} STREQUAL TVOS OR ${sdk} STREQUAL TVOS_SIMULATOR)
+        list(APPEND swiftlib_swift_compile_flags_all
+             ${SWIFTLIB_SWIFT_COMPILE_FLAGS_TVOS})
+      elseif(${sdk} STREQUAL WATCHOS OR ${sdk} STREQUAL WATCHOS_SIMULATOR)
+        list(APPEND swiftlib_swift_compile_flags_all
+             ${SWIFTLIB_SWIFT_COMPILE_FLAGS_WATCHOS})
+      elseif(${sdk} STREQUAL WINDOWS)
+        # FIXME(SR2005) static and shared are not mutually exclusive; however
+        # since we do a single build of the sources, this doesn't work for
+        # building both simultaneously.  Effectively, only shared builds are
+        # supported on windows currently.
+        if(SWIFTLIB_SHARED)
+          list(APPEND swiftlib_swift_compile_flags_all -D_USRDLL)
+          if(SWIFTLIB_IS_STDLIB_CORE)
+            list(APPEND swiftlib_swift_compile_flags_all -DswiftCore_EXPORTS)
+          endif()
+        elseif(SWIFTLIB_STATIC)
+          list(APPEND swiftlib_swift_compile_flags_all -D_LIB)
+        endif()
+      endif()
+
+
+      # Collect architecture agnostic SDK linker flags
+      set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})
+      if(${sdk} STREQUAL IOS_SIMULATOR)
+        if(${name} STREQUAL swiftMediaPlayer)
+          # message("DISABLING AUTOLINK FOR swiftMediaPlayer")
+          list(APPEND swiftlib_link_flags_all "-Xlinker" "-ignore_auto_link")
+        endif()
+      endif()
+
+      # We unconditionally removed "-z,defs" from CMAKE_SHARED_LINKER_FLAGS in
+      # swift_common_standalone_build_config_llvm within
+      # SwiftSharedCMakeConfig.cmake, where it was added by a call to
+      # HandleLLVMOptions.
+      #
+      # Rather than applying it to all targets and libraries, we here add it
+      # back to supported targets and libraries only.  This is needed for ELF
+      # targets only; however, RemoteMirror needs to build with undefined
+      # symbols.
+      if(${SWIFT_SDK_${sdk}_OBJECT_FORMAT} STREQUAL ELF AND
+         NOT ${name} STREQUAL swiftRemoteMirror)
+        list(APPEND swiftlib_link_flags_all "-Wl,-z,defs")
+      endif()
+
       # For each architecture supported by this SDK
       foreach(arch ${SWIFT_SDK_${sdk}_ARCHITECTURES})
         # Configure variables for this subdirectory.
@@ -1623,33 +1715,6 @@
             list(APPEND swiftlib_link_libraries "${lib}")
           endif()
         endforeach()
-
-        set(swiftlib_module_depends_flattened ${SWIFTLIB_SWIFT_MODULE_DEPENDS})
-        if("${sdk}" STREQUAL "OSX")
-          list(APPEND swiftlib_module_depends_flattened
-              ${SWIFTLIB_SWIFT_MODULE_DEPENDS_OSX})
-        elseif("${sdk}" STREQUAL "IOS" OR "${sdk}" STREQUAL "IOS_SIMULATOR")
-          list(APPEND swiftlib_module_depends_flattened
-              ${SWIFTLIB_SWIFT_MODULE_DEPENDS_IOS})
-        elseif("${sdk}" STREQUAL "TVOS" OR "${sdk}" STREQUAL "TVOS_SIMULATOR")
-          list(APPEND swiftlib_module_depends_flattened
-              ${SWIFTLIB_SWIFT_MODULE_DEPENDS_TVOS})
-        elseif("${sdk}" STREQUAL "WATCHOS" OR "${sdk}" STREQUAL "WATCHOS_SIMULATOR")
-          list(APPEND swiftlib_module_depends_flattened
-              ${SWIFTLIB_SWIFT_MODULE_DEPENDS_WATCHOS})
-        elseif("${sdk}" STREQUAL "FREEBSD")
-          list(APPEND swiftlib_module_depends_flattened
-               ${SWIFTLIB_SWIFT_MODULE_DEPENDS_FREEBSD})
-        elseif("${sdk}" STREQUAL "LINUX" OR "${sdk}" STREQUAL "ANDROID")
-          list(APPEND swiftlib_module_depends_flattened
-              ${SWIFTLIB_SWIFT_MODULE_DEPENDS_LINUX})
-        elseif("${sdk}" STREQUAL "CYGWIN")
-          list(APPEND swiftlib_module_depends_flattened
-               ${SWIFTLIB_SWIFT_MODULE_DEPENDS_CYGWIN})
-        elseif("${sdk}" STREQUAL "HAIKU")
-          list(APPEND swiftlib_module_depends_flattened
-               ${SWIFTLIB_SWIFT_MODULE_DEPENDS_HAIKU})
-        endif()

         # Swift compiles depend on swift modules, while links depend on
         # linked libraries.  Find targets for both of these here.
@@ -1692,69 +1757,10 @@
           endif()
         endforeach()

-        set(swiftlib_framework_depends_flattened ${SWIFTLIB_FRAMEWORK_DEPENDS})
-        if("${sdk}" STREQUAL "OSX")
-          list(APPEND swiftlib_framework_depends_flattened
-              ${SWIFTLIB_FRAMEWORK_DEPENDS_OSX})
-        elseif("${sdk}" STREQUAL "IOS" OR "${sdk}" STREQUAL "IOS_SIMULATOR" OR "${sdk}" STREQUAL "TVOS" OR "${sdk}" STREQUAL "TVOS_SIMULATOR")
-          list(APPEND swiftlib_framework_depends_flattened
-              ${SWIFTLIB_FRAMEWORK_DEPENDS_IOS_TVOS})
+        # Add PrivateFrameworks, rdar://28466433
+        if(SWIFTLIB_IS_SDK_OVERLAY)
+          set(swiftlib_swift_compile_private_frameworks_flag "-Fsystem" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/System/Library/PrivateFrameworks/")
         endif()
-
-        # Collect compiler flags
-        set(swiftlib_swift_compile_flags_all ${SWIFTLIB_SWIFT_COMPILE_FLAGS})
-        if("${sdk}" STREQUAL "OSX")
-          list(APPEND swiftlib_swift_compile_flags_all
-              ${SWIFTLIB_SWIFT_COMPILE_FLAGS_OSX})
-        elseif("${sdk}" STREQUAL "IOS" OR "${sdk}" STREQUAL "IOS_SIMULATOR")
-          list(APPEND swiftlib_swift_compile_flags_all
-              ${SWIFTLIB_SWIFT_COMPILE_FLAGS_IOS})
-        elseif("${sdk}" STREQUAL "TVOS" OR "${sdk}" STREQUAL "TVOS_SIMULATOR")
-          list(APPEND swiftlib_swift_compile_flags_all
-              ${SWIFTLIB_SWIFT_COMPILE_FLAGS_TVOS})
-        elseif("${sdk}" STREQUAL "WATCHOS" OR "${sdk}" STREQUAL "WATCHOS_SIMULATOR")
-          list(APPEND swiftlib_swift_compile_flags_all
-              ${SWIFTLIB_SWIFT_COMPILE_FLAGS_WATCHOS})
-        elseif("${sdk}" STREQUAL "WINDOWS")
-          # FIXME(SR2005) static and shared are not mutually exclusive; however
-          # since we do a single build of the sources, this doesn't work for
-          # building both simultaneously.  Effectively, only shared builds are
-          # supported on windows currently.
-          if(SWIFTLIB_SHARED)
-            list(APPEND swiftlib_swift_compile_flags_all -D_USRDLL)
-            if(SWIFTLIB_IS_STDLIB_CORE)
-              list(APPEND swiftlib_swift_compile_flags_all -DswiftCore_EXPORTS)
-            endif()
-          elseif(SWIFTLIB_STATIC)
-            list(APPEND swiftlib_swift_compile_flags_all -D_LIB)
-          endif()
-        endif()
-
-        # Add PrivateFrameworks, rdar://28466433
-        set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})
-        if(SWIFTLIB_IS_SDK_OVERLAY)
-          list(APPEND swiftlib_swift_compile_flags_all "-Fsystem" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/System/Library/PrivateFrameworks/")
-        endif()
-
-       if("${sdk}" STREQUAL "IOS_SIMULATOR")
-         if("${name}" STREQUAL "swiftMediaPlayer")
-           message("DISABLING AUTOLINK FOR swiftMediaPlayer")
-           list(APPEND swiftlib_link_flags_all "-Xlinker" "-ignore_auto_link")
-         endif()
-       endif()
-
-       # We unconditionally removed "-z,defs" from CMAKE_SHARED_LINKER_FLAGS in
-       # swift_common_standalone_build_config_llvm within SwiftSharedCMakeConfig.cmake,
-       # where it was added by a call to HandleLLVMOptions.
-       #
-       # Rather than applying it to all targets and libraries, we here add it back to
-       # supported targets and libraries only.
-       # This is needed for ELF targets only; however, RemoteMirror needs to build
-       # with undefined symbols.
-       if("${SWIFT_SDK_${LFLAGS_SDK}_OBJECT_FORMAT}" STREQUAL "ELF"
-          AND NOT "${name}" STREQUAL "swiftRemoteMirror")
-          list(APPEND swiftlib_link_flags_all "-Wl,-z,defs")
-       endif()

         # Add this library variant.
         _add_swift_library_single(
@@ -1774,7 +1780,7 @@
           LLVM_COMPONENT_DEPENDS ${SWIFTLIB_LLVM_COMPONENT_DEPENDS}
           FILE_DEPENDS ${SWIFTLIB_FILE_DEPENDS} ${swiftlib_module_dependency_targets}
           C_COMPILE_FLAGS ${SWIFTLIB_C_COMPILE_FLAGS}
-          SWIFT_COMPILE_FLAGS ${swiftlib_swift_compile_flags_all}
+          SWIFT_COMPILE_FLAGS ${swiftlib_swift_compile_flags_all} ${swiftlib_swift_compile_private_frameworks_flag}
           LINK_FLAGS ${swiftlib_link_flags_all}
           PRIVATE_LINK_LIBRARIES ${swiftlib_private_link_libraries_targets}
           INCORPORATE_OBJECT_LIBRARIES ${SWIFTLIB_INCORPORATE_OBJECT_LIBRARIES}


[cmake] Allow for host libraries to be object libraries by letting add_swift_host_library take an OBJECT parameter.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -389,6 +389,7 @@
 #   add_swift_host_library(name
 #     [SHARED]
 #     [STATIC]
+#     [OBJECT]
 #     [LLVM_LINK_COMPONENTS comp1 ...]
 #     source1 [source2 source3 ...])
 #
@@ -401,6 +402,9 @@
 # STATIC
 #   Build a static library.
 #
+# OBJECT
+#   Build an object library
+#
 # LLVM_LINK_COMPONENTS
 #   LLVM components this library depends on.
 #
@@ -409,7 +413,8 @@
 function(add_swift_host_library name)
   set(options
         SHARED
-        STATIC)
+        STATIC
+        OBJECT)
   set(single_parameter_options)
   set(multiple_parameter_options
         LLVM_LINK_COMPONENTS)
@@ -423,8 +428,8 @@

   translate_flags(ASHL "${options}")

-  if(NOT ASHL_SHARED AND NOT ASHL_STATIC)
-    message(FATAL_ERROR "Either SHARED or STATIC must be specified")
+  if(NOT ASHL_SHARED AND NOT ASHL_STATIC AND NOT ASHL_OBJECT)
+    message(FATAL_ERROR "One of SHARED/STATIC/OBJECT must be specified")
   endif()

   if(XCODE)
@@ -449,6 +454,8 @@
     set(libkind SHARED)
   elseif(ASHL_STATIC)
     set(libkind STATIC)
+  elseif(ASHL_OBJECT)
+    set(libkind OBJECT)
   endif()

   add_library(${name} ${libkind} ${ASHL_SOURCES})


Pass -G argument to cmake with the same generator's name as used for the
initial cmake invocation.

Patch reviewed by Reid Kleckner.

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -66,7 +66,8 @@

   add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt
     COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release
-                             -DLLVM_BUILD_POLLY=OFF ${CMAKE_SOURCE_DIR}
+                             -DLLVM_BUILD_POLLY=OFF
+                             -G "${CMAKE_GENERATOR}" ${CMAKE_SOURCE_DIR}
     WORKING_DIRECTORY ${CX_NATIVE_TG_DIR}
     DEPENDS ${CX_NATIVE_TG_DIR}
     COMMENT "Configuring native TableGen...")


Remove remnant of no-longer-used preprocessor define

--- cmake/platform/android.cmake
+++ cmake/platform/android.cmake
@@ -235,8 +235,7 @@
     if(NOT NDK_RELEASE_NUMBER LESS "13000")
         if(ANDROID_TOOLCHAIN_NAME STREQUAL "standalone" AND ANDROID_STL MATCHES "libc" AND ANDROID_STANDALONE_TOOLCHAIN)
             set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/4.9.x")
-            add_definitions(-DNDK_13_HACK)
-        endif()
-    endif()
-endmacro()
-
+        endif()
+    endif()
+endmacro()
+


revert flags.cmake test=develop (#21437)

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -148,6 +148,7 @@
     -Wno-unused-parameter
     -Wno-unused-function
     -Wno-error=literal-suffix
+    -Wno-error=sign-compare
     -Wno-error=unused-local-typedefs
     -Wno-error=parentheses-equality # Warnings in pybind11
     -Wno-error=ignored-attributes  # Warnings in Eigen, gcc 6.3
@@ -182,6 +183,7 @@
     -Wdelete-non-virtual-dtor
     -Wno-unused-parameter
     -Wno-unused-function
+    -Wno-error=sign-compare
     -Wno-error=literal-suffix
     -Wno-error=unused-local-typedefs
     -Wno-error=unused-function  # Warnings in Numpy Header.


Removed -ldl and -fPIC from build flags Removed DEFAULT condition from build output definition file

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -4,7 +4,7 @@

     else(MSVC)
 		if(CMAKE_BUILD_TYPE MATCHES DEBUG)
-			set(CMAKE_CXX_FLAGS_DEBUG "-g -Wl,--no-as-needed -std=c++11  -D_GLIBCXX_USE_CXX11_ABI=0")
+			set(CMAKE_CXX_FLAGS_DEBUG "-Wl,--no-as-needed -std=c++11  -D_GLIBCXX_USE_CXX11_ABI=0")
 		elseif(CMAKE_BUILD_TYPE MATCHES RELEASE)
 			set(CMAKE_CXX_FLAGS_RELEASE "-g -Wl,--no-as-needed -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0")
 		else()
@@ -13,10 +13,10 @@
 	endif(MSVC)
 else()
 		if(CMAKE_BUILD_TYPE MATCHES DEBUG)
-		    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -Wl,--no-as-needed -std=c++11 -pthread -fPIC -ldl -D_GLIBCXX_USE_CXX11_ABI=0")
+		    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -Wl,--no-as-needed -std=c++11 -pthread -D_GLIBCXX_USE_CXX11_ABI=0")
 		elseif(CMAKE_BUILD_TYPE MATCHES RELEASE)
-		    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -Wl,--no-as-needed -std=c++11 -pthread -fPIC -ldl -D_GLIBCXX_USE_CXX11_ABI=0")
+		    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -Wl,--no-as-needed -std=c++11 -pthread -D_GLIBCXX_USE_CXX11_ABI=0")
 		else()
-    		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wl,--no-as-needed -std=c++11 -pthread -fPIC -ldl -D_GLIBCXX_USE_CXX11_ABI=0")
+    		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wl,--no-as-needed -std=c++11 -pthread  -D_GLIBCXX_USE_CXX11_ABI=0")
 		endif()
 endif()


removed Caffe2 from build all configuration

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -20,6 +20,7 @@
 set(_package_excludes
   ${_apple_package_excludes}
   ${_python_excludes}
+  Caffe2
   OpenCL
   SYSTEM_Boost
   Boost_LIBRARIES


From Torben Dannhauer, "originally I posted the addendum of 'freetype244MT', but that was wrong.
I updated it to the correct addendum of 'freetype244' yesterday, but supposedly that was not forwarded to you by the forum-to-mail-gateway.

Find attached the corrected CMake module. "

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -59,7 +59,7 @@

 MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
         FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D" "_i")
-        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244MT;" ${OSG_3RDPARTY_BIN} "d" "")
+        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244;" ${OSG_3RDPARTY_BIN} "d" "")
         IF(FREETYPE_FOUND)
             #forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
             SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)


GLES2 render system: Fixed win32 GLES2+EGL lib find.

--- CMake/Packages/FindOpenGLES2.cmake
+++ CMake/Packages/FindOpenGLES2.cmake
@@ -31,7 +31,8 @@
       SET (OPENGLES2_gl_LIBRARY import32 CACHE STRING "OpenGL ES 2.x library for win32")
     ELSE(BORLAND)
 	  #MS compiler - todo - fix the following line:
-      SET (OPENGLES_gl_LIBRARY ${OGRE_SOURCE_DIR}/Dependencies/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32")
+      SET (OPENGLES2_gl_LIBRARY ${OGRE_DEPENDENCIES_DIR}/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32")
+      SET (EGL_egl_LIBRARY      ${OGRE_DEPENDENCIES_DIR}/lib/release/libEGL.lib CACHE STRING "EGL library for win32")
     ENDIF(BORLAND)

   ENDIF (CYGWIN)


make FindConnext less strict on required vars

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -244,14 +244,12 @@
 endif()

 include(FindPackageHandleStandardArgs)
+# Connext_HOME, Connext_LIBRARY_DIRS, and Connext_LIBRARY_DIR are not always set, depending on the source of Connext.
 find_package_handle_standard_args(Connext
   FOUND_VAR Connext_FOUND
   REQUIRED_VARS
     Connext_INCLUDE_DIRS
-    Connext_HOME
     Connext_LIBRARIES
-    Connext_LIBRARY_DIRS
-    Connext_LIBRARY_DIR
     Connext_DEFINITIONS
     Connext_DDSGEN2
 )


Update Mosaic remote module GIT_TAG

Update Mosaic remote module GIT_TAG

--- Modules/Remote/Mosaic.remote.cmake
+++ Modules/Remote/Mosaic.remote.cmake
@@ -5,5 +5,5 @@
 https://github.com/remicres/otb-mosaic
 "
   GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
-  GIT_TAG 516dfa7e7b91aa0263e495ee6b3878a03ced9173
+  GIT_TAG master
 )


The FindAssimp.cmake script in the Assimp repo was broken. :-(

--- cmake/Modules/FindAssimp.cmake
+++ cmake/Modules/FindAssimp.cmake
@@ -7,7 +7,7 @@

 include( FindPackageHandleStandardArgs )

-FIND_PATH( ASSIMP_INCLUDE_DIR NAMES postprocess.h scene.h version.h config.h cimport.h
+FIND_PATH( ASSIMP_INCLUDE_DIR assimp/mesh.h
 	${ASSIMP_ROOT_DIR}/include
   /usr/include
   /usr/local/include


fixed find include on windows

fixed find include on windows

--- cmake/modules/FindLIBVLC.cmake
+++ cmake/modules/FindLIBVLC.cmake
@@ -29,7 +29,7 @@
   c:/msys/local/include
   NO_DEFAULT_PATH
   )
-FIND_PATH(LIBVLC_INCLUDE_DIR vlc.h)
+FIND_PATH(LIBVLC_INCLUDE_DIR PATHS "${CMAKE_INCLUDE_PATH}/vlc" NAMES vlc.h)

 #Put here path to custom location
 #example: /home/user/vlc/lib etc..


Remove private FindOpenGL.cmake module to use the one coming from CMake it self. It was failing to find the OpenGL headers in MacOSX 10.9.

--- cmake/modules/FindOpenGL.cmake
+++ cmake/modules/FindOpenGL.cmake
@@ -1,159 +0,0 @@
-# - Try to find OpenGL
-# Once done this will define
-#
-#  OPENGL_FOUND        - system has OpenGL
-#  OPENGL_XMESA_FOUND  - system has XMESA
-#  OPENGL_GLU_FOUND    - system has GLU
-#  OPENGL_INCLUDE_DIR  - the GL include directory
-#  OPENGL_LIBRARIES    - Link these to use OpenGL and GLU
-#
-# If you want to use just GL you can use these values
-#  OPENGL_gl_LIBRARY   - Path to OpenGL Library
-#  OPENGL_glu_LIBRARY  - Path to GLU Library
-#
-# On OSX default to using the framework version of opengl
-# People will have to change the cache values of OPENGL_glu_LIBRARY
-# and OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX
-
-#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-IF (WIN32)
-  IF (CYGWIN)
-
-    FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h )
-
-    FIND_LIBRARY(OPENGL_gl_LIBRARY opengl32 )
-
-    FIND_LIBRARY(OPENGL_glu_LIBRARY glu32 )
-
-  ELSE (CYGWIN)
-
-    IF(BORLAND)
-      SET (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32")
-      SET (OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32")
-    ELSE(BORLAND)
-      SET (OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32")
-      SET (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32")
-    ENDIF(BORLAND)
-
-  ENDIF (CYGWIN)
-
-ELSE (WIN32)
-
-  IF (APPLE)
-
-    FIND_LIBRARY(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX")
-    FIND_LIBRARY(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX")
-    FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h DOC "Include for OpenGL on OSX")
-
-  ELSE(APPLE)
-    # Handle HP-UX cases where we only want to find OpenGL in either hpux64
-    # or hpux32 depending on if we're doing a 64 bit build.
-    IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
-      SET(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
-    ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
-      SET(HPUX_IA_OPENGL_LIB_PATH
-        /opt/graphics/OpenGL/lib/hpux64/
-        /opt/graphics/OpenGL/lib/pa20_64)
-    ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
-
-    # The first line below is to make sure that the proper headers
-    # are used on a Linux machine with the NVidia drivers installed.
-    # They replace Mesa with NVidia's own library but normally do not
-    # install headers and that causes the linking to
-    # fail since the compiler finds the Mesa headers but NVidia's library.
-    # Make sure the NVIDIA directory comes BEFORE the others.
-    #  - Atanas Georgiev <atanas@cs.columbia.edu>
-
-    FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h
-      /usr/share/doc/NVIDIA_GLX-1.0/include
-      /usr/openwin/share/include
-      /opt/graphics/OpenGL/include /usr/X11R6/include
-    )
-
-    FIND_PATH(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
-      /usr/share/doc/NVIDIA_GLX-1.0/include
-      /usr/openwin/share/include
-      /opt/graphics/OpenGL/include /usr/X11R6/include
-    )
-
-    FIND_LIBRARY(OPENGL_gl_LIBRARY
-      NAMES GL MesaGL
-      PATHS /opt/graphics/OpenGL/lib
-            /usr/openwin/lib
-            /usr/shlib /usr/X11R6/lib
-            ${HPUX_IA_OPENGL_LIB_PATH}
-    )
-
-    # On Unix OpenGL most certainly always requires X11.
-    # Feel free to tighten up these conditions if you don't
-    # think this is always true.
-    # It's not true on OSX.
-
-    IF (OPENGL_gl_LIBRARY)
-      IF(NOT X11_FOUND)
-        INCLUDE(FindX11)
-      ENDIF(NOT X11_FOUND)
-      IF (X11_FOUND)
-        IF (NOT APPLE)
-          SET (OPENGL_LIBRARIES ${X11_LIBRARIES})
-        ENDIF (NOT APPLE)
-      ENDIF (X11_FOUND)
-    ENDIF (OPENGL_gl_LIBRARY)
-
-    FIND_LIBRARY(OPENGL_glu_LIBRARY
-      NAMES GLU MesaGLU
-      PATHS ${OPENGL_gl_LIBRARY}
-            /opt/graphics/OpenGL/lib
-            /usr/openwin/lib
-            /usr/shlib /usr/X11R6/lib
-    )
-
-  ENDIF(APPLE)
-ENDIF (WIN32)
-
-SET( OPENGL_FOUND "NO" )
-IF(OPENGL_gl_LIBRARY)
-
-    IF(OPENGL_xmesa_INCLUDE_DIR)
-      SET( OPENGL_XMESA_FOUND "YES" )
-    ELSE(OPENGL_xmesa_INCLUDE_DIR)
-      SET( OPENGL_XMESA_FOUND "NO" )
-    ENDIF(OPENGL_xmesa_INCLUDE_DIR)
-
-    SET( OPENGL_LIBRARIES  ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
-    IF(OPENGL_glu_LIBRARY)
-      SET( OPENGL_GLU_FOUND "YES" )
-      SET( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} )
-    ELSE(OPENGL_glu_LIBRARY)
-      SET( OPENGL_GLU_FOUND "NO" )
-    ENDIF(OPENGL_glu_LIBRARY)
-
-    SET( OPENGL_FOUND "YES" )
-
-    # This deprecated setting is for backward compatibility with CMake1.4
-
-    SET (OPENGL_LIBRARY ${OPENGL_LIBRARIES})
-
-ENDIF(OPENGL_gl_LIBRARY)
-
-# This deprecated setting is for backward compatibility with CMake1.4
-SET(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
-
-MARK_AS_ADVANCED(
-  OPENGL_INCLUDE_DIR
-  OPENGL_xmesa_INCLUDE_DIR
-  OPENGL_glu_LIBRARY
-  OPENGL_gl_LIBRARY
-)


ISSUE #278 - FindAWSSDK.cmake change

ISSUE #278 - FindAWSSDK.cmake change

--- cmake_modules/FindAWSSDK.cmake
+++ cmake_modules/FindAWSSDK.cmake
@@ -25,7 +25,7 @@
 if(DEFINED ENV{AWSSDK_ROOT})
 	set(AWSSDK_ROOT $ENV{AWSSDK_ROOT})
 	message(STATUS "$AWSSDK_ROOT defined: ${AWSSDK_ROOT}")
-	find_path(AWSSDK_INCLUDE_DIR aws
+	find_path(AWSSDK_INCLUDE_DIR aws/core aws/kms aws/s3 aws/s3-encryption aws/transfer
 		${AWSSDK_ROOT}/include
 		)
 	foreach(libName ${AWSSDK_LIB_NAMES})


Update superbuild version of OpenThreads to 3.4.1

--- SuperBuild/CMake/External_openthreads.cmake
+++ SuperBuild/CMake/External_openthreads.cmake
@@ -24,8 +24,8 @@

 ExternalProject_Add(OPENTHREADS
   PREFIX OPENTHREADS
-  URL "http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-3.4.0/source/OpenSceneGraph-3.4.0.zip"
-  URL_MD5 a5e762c64373a46932e444f6f7332496
+  URL "https://github.com/openscenegraph/OpenSceneGraph/archive/refs/tags/OpenSceneGraph-3.4.1.zip"
+  URL_MD5 b60a03352a1dd5fbd283d2e342396fb0
   SOURCE_DIR ${OPENTHREADS_SB_SRC}
   BINARY_DIR ${OPENTHREADS_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


[flags]: switch to c++17

[flags]: switch to c++17

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -15,7 +15,7 @@

 # some gcc/clang flags
 if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
-  set(PROJ_FLAGS "${PROJ_FLAGS} -std=gnu++14 -Wall -Wextra -Wno-unused-function")
+  set(PROJ_FLAGS "${PROJ_FLAGS} -std=gnu++1z -Wall -Wextra -Wno-unused-function")

   if (CMAKE_BUILD_TYPE STREQUAL "Debug")
     set(PROJ_FLAGS "${PROJ_FLAGS} -Og -fno-inline")
@@ -26,7 +26,7 @@
   endif()

 elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-  set(PROJ_FLAGS "${PROJ_FLAGS} -std=c++14 -Wall -Wextra -Wno-unused-function")
+  set(PROJ_FLAGS "${PROJ_FLAGS} -std=c++1z -Wall -Wextra -Wno-unused-function")

   if (CMAKE_BUILD_TYPE STREQUAL "Debug")
     set(PROJ_FLAGS "${PROJ_FLAGS}")


Use (public) interface link libraries

Use (public) interface link libraries

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -268,7 +268,7 @@
 		if (_index LESS 0)
 			list (APPEND _targetLinkLibraries ${_library})
 			# process transitive libraries
-			get_target_property(_libraries ${_library} LINK_LIBRARIES)
+			get_target_property(_libraries ${_library} INTERFACE_LINK_LIBRARIES)
 			if (_libraries)
 				list (APPEND _librariesToProcess ${_libraries})
 			endif()


Allow to organize by priority prefix header file

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -1054,7 +1054,8 @@
 function (cotire_scan_includes _includesVar)
 	set(_options "")
 	set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE UNPARSED_LINES)
-	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS)
+	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS,
+		INCLUDE_PRIORITY_PATH)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
 	if (NOT _option_LANGUAGE)
@@ -1104,6 +1105,21 @@
 		"${_option_IGNORE_EXTENSIONS}"
 		_includes _unparsedLines
 		${_sourceFiles})
+
+	if (_option_INCLUDE_PRIORITY_PATH)
+		set (_sortedIncludes "")
+		foreach (_priorityPath ${_option_INCLUDE_PRIORITY_PATH})
+			foreach (_include ${_includes})
+				string (FIND ${_include} ${_priorityPath} _position)
+				if (_position GREATER -1)
+					list (APPEND _sortedIncludes ${_include})
+				endif()
+			endforeach()
+		endforeach()
+		list (INSERT _includes 0 "${_sortedIncludes}")
+		list (REMOVE_DUPLICATES _includes)
+	endif()
+
 	set (${_includesVar} ${_includes} PARENT_SCOPE)
 	if (_option_UNPARSED_LINES)
 		set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE)
@@ -1255,7 +1271,8 @@
 	set(_options "")
 	set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG)
 	set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS
-		INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS)
+		INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS
+		INCLUDE_PRIORITY_PATH)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	if (_option_DEPENDS)
 		cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS})
@@ -1292,6 +1309,7 @@
 		IGNORE_PATH ${_option_IGNORE_PATH}
 		INCLUDE_PATH ${_option_INCLUDE_PATH}
 		IGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS}
+		INCLUDE_PRIORITY_PATH ${_option_INCLUDE_PRIORITY_PATH}
 		UNPARSED_LINES _unparsedLines)
 	cotire_generate_unity_source("${_prefixFile}"
 		PROLOGUE ${_prologue} EPILOGUE ${_epilogue} LANGUAGE "${_option_LANGUAGE}" ${_selectedHeaders})
@@ -1951,6 +1969,7 @@
 	get_target_property(COTIRE_TARGET_PRE_UNDEFS ${_target} COTIRE_UNITY_SOURCE_PRE_UNDEFS)
 	get_target_property(COTIRE_TARGET_POST_UNDEFS ${_target} COTIRE_UNITY_SOURCE_POST_UNDEFS)
 	get_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
+	get_target_property(COTIRE_TARGET_INCLUDE_PRIORITY_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH)
 	cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${COTIRE_TARGET_SOURCES})
 	cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${COTIRE_TARGET_SOURCES})
 	string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" COTIRE_INCLUDE_SYSTEM_FLAG)
@@ -2359,6 +2378,10 @@
 	get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH SET)
 	if (NOT _isSet)
 		set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH "")
+	endif()
+	get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH SET)
+	if (NOT _isSet)
+		set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH "")
 	endif()
 	get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS SET)
 	if (NOT _isSet)
@@ -3145,6 +3168,7 @@
 			IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}"
 			INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH}
 			IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}"
+			INCLUDE_PRIORITY_PATH "${COTIRE_TARGET_INCLUDE_PRIORITY_PATH}"
 			INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}"
 			INCLUDE_DIRECTORIES ${_includeDirs}
 			SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}
@@ -3383,6 +3407,13 @@
 	)

 	define_property(
+		DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH"
+		BRIEF_DOCS "Header path matching one of these directories is put at the top of prefix header."
+		FULL_DOCS
+			"See target property COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH."
+	)
+
+	define_property(
 		DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS"
 		BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each source file."
 		FULL_DOCS
@@ -3469,6 +3500,18 @@
 	)

 	define_property(
+		TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH"
+		BRIEF_DOCS "Header path matching one of these directories is put at the top of prefix header."
+		FULL_DOCS
+			"The property can be set to a list of directories."
+			"Headers files paths matching one of these directories will appear at the begin of generated prefix header."
+			"Order is kept from the property path order."
+			"If not set, this property is initialized to the empty list."
+	)
+
+
+
+	define_property(
 		TARGET PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" INHERITED
 		BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each target source file."
 		FULL_DOCS


using 50000 port for cdash submission

using 50000 port for cdash submission

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -8,6 +8,6 @@
 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "jwein2.iue.tuwien.ac.at")
+set(CTEST_DROP_SITE "jwein2.iue.tuwien.ac.at:50000")
 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ViennaData")
 set(CTEST_DROP_SITE_CDASH TRUE)


SK: -TEST: Turn on automatic server authentication in the dashboard script.

--- src/Testing/Dashboard/elxDashboardCommon.cmake
+++ src/Testing/Dashboard/elxDashboardCommon.cmake
@@ -94,12 +94,9 @@
     AND NOT DEFINED CTEST_CHECKOUT_COMMAND
     AND CTEST_UPDATE_COMMAND )

-  #  set( CTEST_CHECKOUT_COMMAND
-  #  "\"${CTEST_UPDATE_COMMAND}\" --non-interactive --trust-server-cert co --username elastixguest --password elastixguest \"${dashboard_url}\" ${CTEST_DASHBOARD_ROOT}" )
-
-  # --trust-server-cert is only supported in newer subversions
+  # checkout command; NB: --trust-server-cert is only supported in newer subversions;
    set( CTEST_CHECKOUT_COMMAND
-     "\"${CTEST_UPDATE_COMMAND}\" --non-interactive co --username elastixguest --password elastixguest \"${dashboard_url}\" ${CTEST_DASHBOARD_ROOT}" )
+     "\"${CTEST_UPDATE_COMMAND}\" --non-interactive --trust-server-cert co --username elastixguest --password elastixguest \"${dashboard_url}\" ${CTEST_DASHBOARD_ROOT}" )

   # CTest delayed initialization is broken, so we copy the
   # CTestConfig.cmake info here.


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -22,6 +22,10 @@
 Name[ru]=Система обмена сообщениями
 Name[sk]=Priama komunikácia
 Name[sl]=Hipno sporočanje
+Name[sr]=Брзо гласништво
+Name[sr@ijekavian]=Брзо гласништво
+Name[sr@ijekavianlatin]=Brzo glasništvo
+Name[sr@latin]=Brzo glasništvo
 Name[sv]=Direktmeddelanden
 Name[tr]=Anında Mesajlaşma
 Name[uk]=Миттєвий обмін повідомленнями
@@ -51,6 +55,10 @@
 Comment[ru]=Начать общение с любым вашим контактом или изменить ваш статус в системе обмена сообщениями
 Comment[sk]=Spustiť rozhovor s nejakým z vašich IM kontaktov alebo zmeniť váš IM stav
 Comment[sl]=Začnite klepet s katerimkoli izmed vaših stikov hipnega sporočanja ali spremenite vaše stanje
+Comment[sr]=Започните ћаскање преко ИМ контакта или измените своје ИМ стање
+Comment[sr@ijekavian]=Започните ћаскање преко ИМ контакта или измените своје ИМ стање
+Comment[sr@ijekavianlatin]=Započnite ćaskanje preko IM kontakta ili izmenite svoje IM stanje
+Comment[sr@latin]=Započnite ćaskanje preko IM kontakta ili izmenite svoje IM stanje
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
 Comment[tr]=IM kişilerinizden biriyle sohbete başlayın veya IM durumunuzu değiştirin
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями


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

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

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -1,7 +1,6 @@
 [Desktop Entry]
 Name=Instant Messaging
 Name[ar]=التّراسل المباشر
-Name[ast]=Mensaxería nel intre
 Name[bs]=Brze poruke
 Name[ca]=Missatgeria instantània
 Name[ca@valencia]=Missatgeria instantània
@@ -46,7 +45,6 @@
 Name[zh_TW]=即時訊息
 Comment=Start a chat with any of your IM contacts or change your IM status
 Comment[ar]=ابدأ محادثة بأيّ من متراسلي ت‌م أو غيّر حالة ت‌م
-Comment[ast]=Entama a charrar con cualesquier contautu MI de to o camuda la to presencia
 Comment[bs]=Pokrenite ćaskanje s bilo kojim od vaših IM kontakta ili promijenite svoj IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat a la MI
 Comment[ca@valencia]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat a la MI


cmake: sitl_gazebo build limit to 2 cores (-j2)

--- platforms/posix/cmake/sitl_target.cmake
+++ platforms/posix/cmake/sitl_target.cmake
@@ -44,6 +44,7 @@
 	USES_TERMINAL_BUILD true
 	EXCLUDE_FROM_ALL true
 	BUILD_ALWAYS 1
+	BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> -- -j2
 )

 ExternalProject_Add(mavsdk_tests


Cleanup

Cleanup

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -100,11 +100,9 @@
 endif()
 add_dependencies(doxygen_html ${PROJECT_NAME}_doxygen_html)

-if(COVERAGE)
-  # CoverageReport generated in this case
-  add_custom_target(${PROJECT_NAME}_doxygen DEPENDS ${PROJECT_NAME}_doxygen_html tests)
-else()
-  add_custom_target(${PROJECT_NAME}_doxygen DEPENDS ${PROJECT_NAME}_doxygen_html)
+add_custom_target(${PROJECT_NAME}_doxygen DEPENDS ${PROJECT_NAME}_doxygen_html)
+if(COVERAGE) # CoverageReport generated by "tests" in this case
+  add_dependencies(${PROJECT_NAME}_doxygen tests)
 endif()

 if(NOT TARGET doxygen)


add_dependency(): support 'git subtree'

add_dependency(): support 'git subtree'

--- ModularDeps.cmake
+++ ModularDeps.cmake
@@ -5,45 +5,47 @@
 find_package(Git REQUIRED)

 function(add_dependency AD_NAME)
-  # Parse the options.
-  set(options)
-  set(oneValueArgs REPO BRANCH COMMIT)
-  cmake_parse_arguments(AD "${options}" "${oneValueArgs}" "" ${ARGN})
-
-  # Repo could come from cache variables, or from function option. Cached variable overrides the
-  # function argument.
-  if(DEPENDENCY_${AD_NAME}_REPO)
-    message(STATUS "Setting the repository for dependency '${AD_NAME}' to the value from cache '${DEPENDENCY_${AD_NAME}_REPO}'.")
-    set(AD_REPO "${DEPENDENCY_${AD_NAME}_REPO}")
-  elseif(AD_REPO)
-    message(STATUS "Setting the repository for dependency '${AD_NAME}' to the value '${AD_REPO}' specified to the add_dependency() call.")
-  else()
-    message(FATAL_ERROR "The repository of the dependency was not specified in the add_dependency() call, nor it was found in the cached variables.")
-  endif()
-  # Check the branch and commit arguments.
-  if(AD_BRANCH AND AD_COMMIT)
-    message(FATAL_ERROR "At most one of branch and commit must be specified when using add_dependency().")
-  endif()
+  message(STATUS "Adding dependency '${AD_NAME}'.")

   # Determine if the dependency has already been satisfied.
   if(DEPENDENCY_${AD_NAME}_SATISFIED)
-    message(STATUS "The dependency '${AD_NAME}' is already satisfied.")
+    message(STATUS "... already satisfied.")
     return()
   endif()
-  message(STATUS "Adding the dependency '${AD_NAME}'.")

   # Create the deps/ directory if it does not exist already.
-  if(EXISTS "${PROJECT_SOURCE_DIR}/deps")
-    message(STATUS "The '${PROJECT_SOURCE_DIR}/deps' directory already exists.")
-  else()
-    message(STATUS "The '${PROJECT_SOURCE_DIR}/deps' directory does not exist, creating it.")
+  if(NOT EXISTS "${PROJECT_SOURCE_DIR}/deps")
+    message(STATUS "Directory '${PROJECT_SOURCE_DIR}/deps' does not exist, creating it.")
     file(MAKE_DIRECTORY "${PROJECT_SOURCE_DIR}/deps")
   endif()

-  # Try to check out the dependency.
+  # Check if the deps/${AD_NAME} already exists.
   if(EXISTS "${PROJECT_SOURCE_DIR}/deps/${AD_NAME}")
-    message(STATUS "The '${AD_NAME}' dir exists already.")
+    message(STATUS "Directory '${PROJECT_SOURCE_DIR}/deps/${AD_NAME}' exists. Assuming")
+    message(STATUS "dependency '${AD_NAME}' is satisfied via 'git subtree' or similar.")
   else()
+
+    # Parse the options.
+    set(options)
+    set(oneValueArgs REPO BRANCH COMMIT)
+    cmake_parse_arguments(AD "${options}" "${oneValueArgs}" "" ${ARGN})
+
+    # Repo could come from cache variables, or from function option. Cached variable overrides the
+    # function argument.
+    if(DEPENDENCY_${AD_NAME}_REPO)
+      message(STATUS "Setting the repository for dependency '${AD_NAME}' to the value from cache '${DEPENDENCY_${AD_NAME}_REPO}'.")
+      set(AD_REPO "${DEPENDENCY_${AD_NAME}_REPO}")
+    elseif(AD_REPO)
+      message(STATUS "Setting the repository for dependency '${AD_NAME}' to the value '${AD_REPO}' specified to the add_dependency() call.")
+    else()
+      message(FATAL_ERROR "The repository of the dependency was not specified in the add_dependency() call, nor it was found in the cached variables.")
+    endif()
+    # Check the branch and commit arguments.
+    if(AD_BRANCH AND AD_COMMIT)
+      message(FATAL_ERROR "At most one of branch and commit must be specified when using add_dependency().")
+    endif()
+
+    # Try to check out the dependency.
     message(STATUS "Cloning the '${AD_NAME}' dependency.")
     execute_process(COMMAND "${GIT_EXECUTABLE}" "clone" "${AD_REPO}" "${AD_NAME}"
       WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/deps"
@@ -56,14 +58,17 @@
     message(STATUS "'${AD_NAME}' was successfully cloned. The git clone is located at '${PROJECT_SOURCE_DIR}/deps/${AD_NAME}'")
   endif()

+
   # Add the subdirectory of the dependency.
   add_subdirectory("${PROJECT_SOURCE_DIR}/deps/${AD_NAME}")

   # Store dependency info as cached variables.
   set(DEPENDENCY_${AD_NAME}_SATISFIED YES CACHE INTERNAL "")
   mark_as_advanced(DEPENDENCY_${AD_NAME}_SATISFIED)
-  set(DEPENDENCY_${AD_NAME}_REPO "${AD_REPO}" CACHE STRING "")
-  mark_as_advanced(DEPENDENCY_${AD_NAME}_REPO)
+  if(AD_REPO)
+    set(DEPENDENCY_${AD_NAME}_REPO "${AD_REPO}" CACHE STRING "")
+    mark_as_advanced(DEPENDENCY_${AD_NAME}_REPO)
+  endif()
   if(AD_BRANCH)
     set(DEPENDENCY_${AD_NAME}_BRANCH "${AD_BRANCH}" CACHE STRING "")
     mark_as_advanced(DEPENDENCY_${AD_NAME}_BRANCH)


Fix for when BLAS is not present

Fix for when BLAS is not present

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1524,7 +1524,11 @@
 endif()

 if(NOT BLAS_FOUND)
-  set(tmva-cpu OFF CACHE BOOL "" FORCE)
+  if (tmva AND mathmore AND imt)
+    message(STATUS "Using GSL CBLAS for optional parts of TMVA")
+  else()
+    set(tmva-cpu OFF CACHE BOOL "" FORCE)
+  endif()
 endif()
 if(NOT CUDA_FOUND)
   set(tmva-gpu OFF CACHE BOOL "" FORCE)


We do depend on tablegenned files.

We do depend on tablegenned files.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -975,7 +975,7 @@
   #---These are the libraries that we link ROOT with CLING---------------------------
   set(CLING_LIBRARIES clingInterpreter clingMetaProcessor clingUtils)
   add_custom_target(CLING)
-  add_dependencies(CLING ${CLING_LIBRARIES} clang-headers)
+  add_dependencies(CLING ${CLING_LIBRARIES} clang-headers intrinsics_gen)
 endif()

 #---Check for gfal-------------------------------------------------------------------


fixes

fixes

--- cxx11_check.cmake
+++ cxx11_check.cmake
@@ -10,7 +10,7 @@
             set( ${VAR_ENABLED} 0 )
         endif( )

-    elseif( CMAKE_COMPILER_IS_GNUCXX )                  ### CNU
+    elseif( CMAKE_COMPILER_IS_GNUCXX )                  ### GNU

         if( ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.6 )
             set( ${VAR_ENABLED} 0 )
@@ -32,7 +32,7 @@

         set( ${COMMAND_VAR} "" )

-    elseif( CMAKE_COMPILER_IS_GNUCXX )                  ### CNU
+    elseif( CMAKE_COMPILER_IS_GNUCXX )                  ### GNU

         set( ${COMMAND_VAR} "-std=c++11" )

@@ -50,7 +50,7 @@

         set( ${MACRO_VAR} __declspec\(thread\) )

-    elseif( CMAKE_COMPILER_IS_GNUCXX )                  ### CNU
+    elseif( CMAKE_COMPILER_IS_GNUCXX )                  ### GNU

         if( ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8 )
             set( ${MACRO_VAR} __thread )


Warn about missing override

Warn about missing override

--- build_settings.cmake
+++ build_settings.cmake
@@ -17,7 +17,7 @@
 set(AUTORUN_UNIT_TESTS FALSE CACHE BOOL "If TRUE, tests will be run immediately after linking the test executable")

 # Warnings
-set(WARN_OPTS "-Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
+set(WARN_OPTS "-Wsuggest-override -Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")

 # C and C++ compiler flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel ${EXTRA_C_FLAGS}")


SuperBuild: openssl: save logs to file (TODO: replace this with libressl)

--- SuperBuild/CMake/External_openssl.cmake
+++ SuperBuild/CMake/External_openssl.cmake
@@ -51,6 +51,10 @@
     perl Configure ${OPENSSL_BUILD_ARCH} no-asm  --prefix=${CMAKE_WIN_INSTALL_PREFIX} --openssldir=${CMAKE_WIN_INSTALL_PREFIX}
     BUILD_COMMAND ms/do_ms.bat
     INSTALL_COMMAND nmake -f ms/ntdll.mak install
+    LOG_DOWNLOAD 1
+    LOG_CONFIGURE 1
+    LOG_BUILD 1
+    LOG_INSTALL 1
     )

 else(UNIX)
@@ -68,7 +72,12 @@
     ${CMAKE_COMMAND} -E chdir ${OPENSSL_SB_BUILD_DIR} ./config ${OPENSSL_BUILD_ARCH}
     --prefix=${SB_INSTALL_PREFIX} shared zlib zlib-dynamic -I${SB_INSTALL_PREFIX}/include -L${SB_INSTALL_PREFIX}/lib
     BUILD_COMMAND $(MAKE)
-    INSTALL_COMMAND $(MAKE) install)
+    INSTALL_COMMAND $(MAKE) install
+    LOG_DOWNLOAD 1
+    LOG_CONFIGURE 1
+    LOG_BUILD 1
+    LOG_INSTALL 1
+    )

   ExternalProject_Add_Step(OPENSSL remove_static
     COMMAND ${CMAKE_COMMAND} -E remove


also set _SYSTEM_FOUND to false, with recursive calls the inner might fail and the outer succeed!

Change-Id: I5a286565233b0de64b3412eb87b7932dffd5ba95

--- VigraAddDep.cmake
+++ VigraAddDep.cmake
@@ -285,9 +285,16 @@
 function(vad_system_default _VAD_NAME)
   message(STATUS "Invoking the default implementation of vad_system() for dependency ${_VAD_NAME}.")
   find_package_plus(${_VAD_NAME} ${ARGN})
+endfunction()
+
+function(vad_system_call _VAD_NAME)
+  vad_system(${_VAD_NAME} ${ARGN})
   # Check the FOUND flag.
   if(NOT ${_VAD_NAME}_FOUND)
     set(VAD_${_VAD_NAME}_SYSTEM_NOT_FOUND TRUE CACHE INTERNAL "")
+  else()
+    # for recursive calls the inner might fail and the outer succeed
+    set(VAD_${_VAD_NAME}_SYSTEM_NOT_FOUND FALSE CACHE INTERNAL "")
   endif()
 endfunction()

@@ -456,7 +463,7 @@
     # endless recursion protection vad system might call find_package again...
     string(LENGTH "${_vigra_add_dep_running_${_VAD_NAME}_ARGS}" _vad_add_dep_prot_args_len)
     list(APPEND _vigra_add_dep_running_${_VAD_NAME}_ARGS "VAD_PROT_REC_START${ARGN}VAD_PROT_REC_STOP")
-    vad_system(${_VAD_NAME} ${ARG_VAD_${_VAD_NAME}_UNPARSED_ARGUMENTS})
+    vad_system_call(${_VAD_NAME} ${ARG_VAD_${_VAD_NAME}_UNPARSED_ARGUMENTS})
     string(SUBSTRING "${_vigra_add_dep_running_${_VAD_NAME}_ARGS}" 0 ${_vad_add_dep_prot_args_len} _vigra_add_dep_running_${_VAD_NAME}_ARGS)

     if(VAD_${_VAD_NAME}_SYSTEM_NOT_FOUND)


Updating dependency of CAPU to official v0.14.0 version

Change-Id: I16aaba1eb8c1e63f55fec8f610b9a82484fe18bf

git-svn-id: 413dc58a15145b085e84d1a9a38cb4ab1fc93382@1584586 13f79535-47bb-0310-9956-ffa450edef68

--- binding-cpp/runtime/FindCapu.cmake
+++ binding-cpp/runtime/FindCapu.cmake
@@ -38,7 +38,7 @@

         ExternalProject_Add(
             Capu
-            URL https://github.com/bmwcarit/capu/zipball/master/bmwcarit-capu-v0.13.0-34-g0ca0967.zip
+            URL https://github.com/bmwcarit/capu/archive/v0.14.0.zip
             SOURCE_DIR "${CAPU_PROJECT_DIR}"
             BINARY_DIR "${CAPU_CMAKE_BUILD_DIR}"
             INSTALL_DIR "${CAPU_BUILD_DIR}/deliverable"


typo. Fixes #2

typo. Fixes #2

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -26,7 +26,7 @@
 		NAMES GLFW/glfw3.h
 		PATHS
 		$ENV{PROGRAMFILES}/include
-		${GLEW_ROOT_DIR}/include
+		${GLFW_ROOT_DIR}/include
 		DOC "The directory where GLFW/glfw.h resides")

 	# Use glfw3.lib for static library
@@ -42,7 +42,7 @@
 		NAMES ${GLFW_LIBRARY_NAME}
 		PATHS
 		$ENV{PROGRAMFILES}/lib
-		${GLEW_ROOT_DIR}/lib)
+		${GLFW_ROOT_DIR}/lib)

 	unset(GLFW_LIBRARY_NAME)
 else()
@@ -83,4 +83,4 @@
 endif()

 # Hide some variables
-mark_as_advanced(GLFW_INCLUDE_DIR GLFW_LIBRARY)+mark_as_advanced(GLFW_INCLUDE_DIR GLFW_LIBRARY)


Fix GLFW find script

Fix GLFW find script

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -4,6 +4,8 @@
 # GLFW_LIBRARY

 # GLFW_BINARY (win32 only)
+
+include(FindPackageHandleStandardArgs)

 find_path(GLFW_INCLUDE_DIR GLFW/glfw3.h


CMake: Do not explicitly require libpq

CMake: Do not explicitly require libpq

It should be sufficient to require libpqxx that should use proper
libpq by its own.

--- cmake/FindPQXX.cmake
+++ cmake/FindPQXX.cmake
@@ -1,13 +1,12 @@
 if(NOT PQXX_FOUND)
   find_path(PQXX_INCLUDE_DIR pqxx/pqxx)
   find_library(PQXX_LIBRARY pqxx)
-  find_library(PQ_LIBRARY pq)
-  mark_as_advanced(PQXX_INCLUDE_DIR PQXX_LIBRARY PQ_LIBRARY)
+  mark_as_advanced(PQXX_INCLUDE_DIR PQXX_LIBRARY)

   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(PQXX DEFAULT_MSG
-    PQXX_LIBRARY PQ_LIBRARY PQXX_INCLUDE_DIR)
+    PQXX_LIBRARY PQXX_INCLUDE_DIR)

   set(PQXX_INCLUDE_DIRS ${PQXX_INCLUDE_DIR})
-  set(PQXX_LIBRARIES ${PQXX_LIBRARY} ${PQ_LIBRARY})
+  set(PQXX_LIBRARIES ${PQXX_LIBRARY})
 endif(NOT PQXX_FOUND)


Fix auto-detecting SKIA_LIBRARY when only SKIA_DIR is given

--- cmake/FindSkia.cmake
+++ cmake/FindSkia.cmake
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020  Igara Studio S.A.
+# Copyright (C) 2019-2021  Igara Studio S.A.
 #
 # This file is released under the terms of the MIT license.
 # Read LICENSE.txt for more information.
@@ -7,9 +7,9 @@
 if(NOT SKIA_DIR)
   set(SKIA_LIBRARY_DIR "" CACHE PATH "Skia library directory (where libskia.a is located)")
 else()
-  if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
+  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
     set(SKIA_ARCH "x64")
-  else()
+  elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
     set(SKIA_ARCH "x86")
   endif()
   if(CMAKE_BUILD_TYPE STREQUAL Debug)


Added lcov evaluation

Added lcov evaluation

--- cmake/Findgcov.cmake
+++ cmake/Findgcov.cmake
@@ -65,6 +65,11 @@
 	if (GCOV_FOUND)
 		add_gcov_target(${TNAME})
 	endif (GCOV_FOUND)
+
+	# add lcov evaluation
+	if (LCOV_FOUND)
+		add_lcov_target(${TNAME})
+	endif (LCOV_FOUND)
 endfunction(add_coverage)

@@ -137,7 +142,7 @@

 #
 # Modules for parsing the collected data and output it in a readable format
-# (like gcov).
+# (like gcov and lcov).
 #
 include(FindPackageHandleStandardArgs)

@@ -191,3 +196,102 @@
 		add_dependencies(gcov ${TNAME}-gcov)
 	endfunction (add_gcov_target)
 endif (GCOV_FOUND)
+
+
+
+#
+# lcov
+#
+
+# Search for required lcov binaries.
+find_program(LCOV_BIN lcov)
+find_program(GENINFO_BIN geninfo)
+find_program(GENHTML_BIN genhtml)
+find_package_handle_standard_args(lcov
+	REQUIRED_VARS LCOV_BIN GENINFO_BIN GENHTML_BIN
+)
+
+
+# Add a new global target for all lcov targets. This target could be used to
+# generate the lcov html output for the whole project instead of calling
+# <TARGET>-geninfo and <TARGET>-html for each target. It will also be used to
+# generate a html site for all project data together instead of one for each
+# target.
+if (LCOV_FOUND)
+	if (NOT TARGET lcov-geninfo)
+		add_custom_target(lcov-geninfo)
+	endif (NOT TARGET lcov-geninfo)
+
+	if (NOT TARGET lcov-genhtml)
+		add_custom_target(lcov-genhtml
+			WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+			COMMAND ${GENHTML_BIN}
+				-t ${CMAKE_PROJECT_NAME}
+				-o ${CMAKE_BINARY_DIR}/lcov/project
+				`find . -name \"*.info\"`
+				> /dev/null
+		)
+	endif (NOT TARGET lcov-genhtml)
+
+	if (NOT TARGET lcov)
+		add_custom_target(lcov
+			DEPENDS lcov-geninfo lcov-genhtml
+		)
+	endif ()
+endif ()
+
+
+if (LCOV_FOUND)
+	# This function will add lcov evaluation for target <TNAME>. Only sources of
+	# this target will be evaluated and no dependencies will be added. It will
+	# call geninfo on any source file of <TNAME> once and store the info file in
+	# the same directory.
+	function (add_lcov_target TARGET)
+		set(TDIR ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TNAME}.dir)
+
+		get_target_property(TSOURCES ${TNAME} SOURCES)
+		set(GENINFO_FILES "")
+		set(LCOV_ARGS "")
+		foreach(FILE ${TSOURCES})
+			get_filename_component(FILE_PATH "${TDIR}/${FILE}" PATH)
+
+			# call geninfo
+			add_custom_command(OUTPUT ${TDIR}/${FILE}.gcda.info
+				COMMAND ${GENINFO_BIN} ${TDIR}/${FILE}.gcda > /dev/null
+				DEPENDS ${TNAME} ${TDIR}/${FILE}.gcda
+				WORKING_DIRECTORY ${FILE_PATH}
+			)
+
+			list(APPEND GENINFO_FILES ${TDIR}/${FILE}.gcda.info)
+			list(APPEND LCOV_ARGS -a ${TDIR}/${FILE}.gcda.info)
+		endforeach()
+
+		# concatenate all files generated by geninfo to a single file per target
+		add_custom_command(OUTPUT ${TDIR}/${TNAME}.tgt.info
+			COMMAND ${LCOV_BIN}
+				${LCOV_ARGS} -o ${TDIR}/${TNAME}.tgt.info
+				> /dev/null
+			DEPENDS ${GENINFO_FILES}
+		)
+
+		# add target for geninfo file for <TNAME>
+		add_custom_target(${TNAME}-geninfo DEPENDS ${TDIR}/${TNAME}.tgt.info)
+
+		# add geninfo file generation to global lcov-geninfo target
+		add_dependencies(lcov-geninfo ${TNAME}-geninfo)
+
+
+		# add target for generating html output for this target only. Output of
+		# genhtml will be stored in own HTML directory lcov/<TNAME> in
+		# CMAKE_BINARY_DIR.
+		add_custom_target(${TNAME}-genhtml
+			WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+			COMMAND ${GENHTML_BIN}
+				-t ${CMAKE_PROJECT_NAME}
+				-o ${CMAKE_BINARY_DIR}/lcov/${TNAME}
+				${TDIR}/${TNAME}.tgt.info
+				> /dev/null
+			DEPENDS ${TNAME}-geninfo
+		)
+	endfunction (add_lcov_target)
+endif (LCOV_FOUND)


Fixing valgrind include (noticed by Barry Smith).

--- cmake/config.h.cmake
+++ cmake/config.h.cmake
@@ -76,7 +76,7 @@

 #cmakedefine ELEM_HAVE_VALGRIND
 #if defined(ELEM_HAVE_VALGRIND)
-# include <valgrind/valgrind.h>
+# include "valgrind.h"
 # define ELEM_RUNNING_ON_VALGRIND RUNNING_ON_VALGRIND
 #else
 # define ELEM_RUNNING_ON_VALGRIND 0


Properly set Linux electron binary suffix.

--- cmake/electron.cmake
+++ cmake/electron.cmake
@@ -18,7 +18,7 @@

 if(WIN32)
     set(SUFFIX "win32-x64")
-elseif(LINUX)
+elseif(UNIX)
     set(SUFFIX "linux-x64")
 endif()


cmake: enable --ethernet to generate common param metadata

This will add the MAV_x_BROADCAST params.

--- cmake/metadata.cmake
+++ cmake/metadata.cmake
@@ -50,7 +50,7 @@
 add_custom_target(metadata_parameters
 	COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
 	COMMAND ${PYTHON_EXECUTABLE}
-	${PX4_SOURCE_DIR}/Tools/serial/generate_config.py --all-ports --params-file ${PX4_SOURCE_DIR}/src/generated_serial_params.c --config-files ${yaml_config_files}
+	${PX4_SOURCE_DIR}/Tools/serial/generate_config.py --all-ports --ethernet --params-file ${PX4_SOURCE_DIR}/src/generated_serial_params.c --config-files ${yaml_config_files}
 	COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
 		--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
 		--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml


added libcec6 to deb dependency list

added libcec6 to deb dependency list

--- cmake/packages.cmake
+++ cmake/packages.cmake
@@ -58,7 +58,7 @@
 # https://cmake.org/Wiki/CMake:CPackPackageGenerators
 # .deb files for apt
 SET ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/preinst;${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/postinst;${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/prerm" )
-SET ( CPACK_DEBIAN_PACKAGE_DEPENDS "libcec4" )
+SET ( CPACK_DEBIAN_PACKAGE_DEPENDS "libcec6 | libcec4" )
 SET ( CPACK_DEBIAN_PACKAGE_SECTION "Miscellaneous" )

 # .rpm for rpm


cmake/compiler/intel: we can't include GccCompatible relatively

--- cmake/Compiler/Intel.cmake
+++ cmake/Compiler/Intel.cmake
@@ -1,4 +1,4 @@
-include(GccCompatible.cmake)
+include(${CMAKE_COMPILER_PATH}/GccCompatible.cmake)

 # add gcc compatibility flag on Linux systems
 if(LINUX)


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

3c115a5 Add test to check

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

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

 ENDMACRO()


Allow compilation when only qmake-qt4 is in the path

If Qt5 is found via cmake we do not need to find the qmake
executable. This fixes builds when only qmake4 is available in the path.

Reviewed-by: David Edmundson

--- cmake/modules/FindQt.cmake
+++ cmake/modules/FindQt.cmake
@@ -7,22 +7,33 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-IF(NOT QT_QMAKE_EXECUTABLE)
-  FIND_PROGRAM(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake qmake4 qmake-qt4 qmake5 qmake-qt5
-               PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
-  SET(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "Qt qmake program.")
-ENDIF(NOT QT_QMAKE_EXECUTABLE)
+IF(DESIRED_QT_VERSION MATCHES 5)
+    # Qt5 was explicitly requested, so use its CMakeConfig instead of qmake which may not be at a global location
+    find_package(Qt5Core QUIET)
+    IF( Qt5Core_DIR )
+        SET(QT5_INSTALLED TRUE)
+    ENDIF( Qt5Core_DIR )
+ENDIF(DESIRED_QT_VERSION MATCHES 5)

-# now find qmake
-IF(QT_QMAKE_EXECUTABLE)
-  EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
-  IF(QTVERSION MATCHES "4.*")
-    SET(QT4_INSTALLED TRUE)
-  ENDIF(QTVERSION MATCHES "4.*")
-  IF(QTVERSION MATCHES "5.*")
-    SET(QT5_INSTALLED TRUE)
-  ENDIF(QTVERSION MATCHES "5.*")
-ENDIF(QT_QMAKE_EXECUTABLE)
+#Otherwise search for installed qmakes
+IF(NOT QT5_INSTALLED)
+    IF(NOT QT_QMAKE_EXECUTABLE)
+        FIND_PROGRAM(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake qmake4 qmake-qt4 qmake5 qmake-qt5
+            PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
+        SET(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "Qt qmake program.")
+    ENDIF(NOT QT_QMAKE_EXECUTABLE)
+
+    # now find qmake
+    IF(QT_QMAKE_EXECUTABLE)
+        EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
+        IF(QTVERSION MATCHES "4.*")
+            SET(QT4_INSTALLED TRUE)
+        ENDIF(QTVERSION MATCHES "4.*")
+        IF(QTVERSION MATCHES "5.*")
+            SET(QT5_INSTALLED TRUE)
+        ENDIF(QTVERSION MATCHES "5.*")
+    ENDIF(QT_QMAKE_EXECUTABLE)
+ENDIF(NOT QT5_INSTALLED)

 IF(NOT DESIRED_QT_VERSION)
   IF(QT4_INSTALLED)


always enable build-type options for ccmake and cmake-gui

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -50,8 +50,8 @@
 ELSE()
   IF(NOT CMAKE_BUILD_TYPE)
     SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type." FORCE)
-    SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CONFIGURATION_TYPES})
   ENDIF()
+  SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CONFIGURATION_TYPES})
 ENDIF()

 IF("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")


removed serialization until we have it in the binaries too - will add separately to each module that needs it for now

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -12,7 +12,7 @@
 endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)

 #find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams serialization mpi)
-find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams serialization)
+find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)


Scripts: print_warnings deps fix

Scripts: print_warnings deps fix

--- cmake/print_warnings.cmake
+++ cmake/print_warnings.cmake
@@ -21,5 +21,17 @@
   WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
 ADD_CUSTOM_TARGET(print_warnings ALL
   COMMAND bash -c '[ -f compile.warnings ] && { echo "Warnings found:" \; cat compile.warnings \; echo "" \; } \; true'
-  DEPENDS mysql udf_example rm_compile.warnings
+  DEPENDS mysqld rm_compile.warnings
   WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
+
+IF(TARGET explain_filename-t)
+  ADD_DEPENDENCIES(print_warnings explain_filename-t)
+ENDIF()
+
+IF(TARGET mysql_client_test)
+  ADD_DEPENDENCIES(print_warnings mysql_client_test)
+ENDIF()
+
+IF(TARGET udf_example)
+  ADD_DEPENDENCIES(print_warnings udf_example)
+ENDIF()


updates to FindTBB.cmake

updates to FindTBB.cmake

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -32,8 +32,8 @@
   SET(TBB_ROOT /opt/intel/composerxe/tbb/ CACHE STRING "Root of TBB installation")

   FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include)
-  FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib/intel64/gcc4.4)
-  FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib/intel64/gcc4.4)
+  FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib ${TBB_ROOT}/lib/intel64/gcc4.4)
+  FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib ${TBB_ROOT}/lib/intel64/gcc4.4)

   FIND_PATH(TBB_INCLUDE_DIR_MIC tbb/task_scheduler_init.h NO_DEFAULT_PATH PATHS ${TBB_ROOT}/include)
   FIND_LIBRARY(TBB_LIBRARY_MIC tbb NO_DEFAULT_PATH PATHS ${TBB_ROOT}/lib/mic)


Update FindSDL2 to take SDL2 as an arg as well

--- cmake/FindSDL2.cmake
+++ cmake/FindSDL2.cmake
@@ -106,6 +106,7 @@
 FIND_PATH(SDL2_INCLUDE_DIR SDL.h
 	HINTS
 	$ENV{SDL2}
+	${SDL2}
 	PATH_SUFFIXES include/SDL2 include SDL2
 	i686-w64-mingw32/include/SDL2
 	x86_64-w64-mingw32/include/SDL2
@@ -125,6 +126,7 @@
 	FIND_LIBRARY(SDL2_LIBRARY_TEMP SDL2
 		HINTS
 		$ENV{SDL2}
+		${SDL2}
 		PATH_SUFFIXES lib64 lib
 		lib/x64
 		x86_64-w64-mingw32/lib
@@ -139,6 +141,7 @@
 	FIND_LIBRARY(SDL2_LIBRARY_TEMP SDL2
 		HINTS
 		$ENV{SDL2}
+		${SDL2}
 		PATH_SUFFIXES lib
 		lib/x86
 		i686-w64-mingw32/lib
@@ -177,6 +180,7 @@
 				NAMES SDL2main
 				HINTS
 				$ENV{SDL2}
+				${SDL2}
 				PATH_SUFFIXES lib
 				lib/x86
 				i686-w64-mingw32/lib


cmake

cmake

--- cmake/LNCommon.cmake
+++ cmake/LNCommon.cmake
@@ -82,9 +82,9 @@

 		# MSVC Runtime library.
 		if (LN_MSVC_LINK_MULTI_THREAD_STATIC_RUNTIME)
-			set(postfix "${postfix}_MT")
+			set(postfix "${postfix}MT")
 		else()
-			set(postfix "${postfix}_MD")
+			set(postfix "${postfix}MD")
 		endif()

 		set(${outPostfix} ${postfix} PARENT_SCOPE)


fptu: enable '-Werror' for CI.

fptu: enable '-Werror' for CI.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -467,7 +467,7 @@

   # Only add -Werror if it's a debug build, done by developers.
   # Release builds should not cause extra trouble.
-  if(CC_HAS_WERROR AND (CMAKE_BUILD_TYPE STREQUAL "Debug")
+  if(CC_HAS_WERROR AND (CI OR CMAKE_BUILD_TYPE STREQUAL "Debug")
       AND HAVE_STD_C11 AND HAVE_STD_CXX11)
     add_compile_flags("C;CXX" "-Werror")
   endif()


Fixed newlines in values.

Fixed newlines in values.

--- cmake/easytest.cmake
+++ cmake/easytest.cmake
@@ -128,6 +128,7 @@
 		foreach(LINE ${TMP})
 			string(REGEX REPLACE ".*${KEY}:(.*)$" "\\1" LINE "${LINE}")
 			string(STRIP "${LINE}" LINE)
+			string(REPLACE "\\n" "\n" LINE "${LINE}")
 			string(CONFIGURE "${LINE}" LINE @ONLY)
 			set(BUFFER "${BUFFER} ${LINE}")
 		endforeach()


fix build error

fix build error

--- cmake/get-sdl2.cmake
+++ cmake/get-sdl2.cmake
@@ -24,6 +24,4 @@
     #CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${DEPENDENCY_INSTALL_DIR}
     INSTALL_DIR ${DEPENDENCY_INSTALL_DIR}
     CMAKE_ARGS ${SDL2_CMAKE_ARGS}
-  )
-
-endif()
+)


ENH: deactivate openssl on apple

ENH: deactivate openssl on apple

--- SuperBuild/CMake/External_curl.cmake
+++ SuperBuild/CMake/External_curl.cmake
@@ -11,7 +11,11 @@
   message(STATUS "  Using cURL SuperBuild version")

   # declare dependencies
-  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(CURL ZLIB OPENSSL)
+  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(CURL ZLIB)
+
+  if(NOT APPLE)
+    ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENSSL)
+  endif()

   if(USE_SYSTEM_GEOS) #why geos here?. discuss with GP.
     ADD_SUPERBUILD_CMAKE_VAR(ZLIB_ROOT)


SuperBuild: update macro call. unused args

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -124,8 +124,7 @@
   INSTALL_COMMAND ${GDAL_INSTALL_COMMAND}
   )

-#avoid/fixup  second arg "GDAL-custom-patch" in macro
-SUPERBUILD_PATCH_SOURCE(GDAL "GDAL-custom-patch")
+SUPERBUILD_PATCH_SOURCE(GDAL)

 set(_SB_GDAL_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
 if(WIN32)


ENH: upgrade SuperBuild GDAL to 3.2.1

ENH: upgrade SuperBuild GDAL to 3.2.1

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -112,10 +112,10 @@
     ${GDAL_SB_EXTRA_OPTIONS}
     )

-  # For now gdal is built if Superbuild has find python... And only on UNIX
+  # For now gdal is built if Superbuild has find python... And only on UNIX
   # That might be a problem
   # User will not be able to override this...
-  if ( OTB_WRAP_PYTHON AND PYTHON_EXECUTABLE)
+  if(OTB_WRAP_PYTHON AND PYTHON_EXECUTABLE)
     list(APPEND GDAL_CONFIGURE_COMMAND "--with-python=${PYTHON_EXECUTABLE}")
   endif()

@@ -128,11 +128,11 @@
   foreach(opt_line ${GDAL_SB_EXTRA_OPTIONS})
     file(APPEND "${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt" "${opt_line}\r\n")
   endforeach()
-
+
   if(OTB_TARGET_SYSTEM_ARCH_IS_X64)
     file(APPEND "${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt" "WIN64=YES\r\n")
   endif()
-
+
   set(GDAL_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E touch  ${CMAKE_BINARY_DIR}/configure)
   set(GDAL_BUILD_COMMAND nmake
     /f ${GDAL_SB_SRC}/makefile.vc
@@ -149,8 +149,8 @@

 ExternalProject_Add(GDAL
   PREFIX GDAL
-  URL "http://download.osgeo.org/gdal/3.1.0/gdal-3.1.0.tar.gz"
-  URL_MD5 bda0f002cd63b51c8d2f1b1400daffa9
+  URL "https://download.osgeo.org/gdal/3.2.1/gdal-3.2.1.tar.xz"
+  URL_MD5 cf7fe042403e73ad991aa5797247b586
   SOURCE_DIR ${GDAL_SB_SRC}
   BINARY_DIR ${GDAL_SB_SRC}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


fixed rosunit script location

fixed rosunit script location

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -295,12 +295,12 @@
   rosbuild_invoke_rospack("" rosunit path find rosunit)

   # Record where we're going to put test results (#2003)
-  execute_process(COMMAND ${rosunit_path}/bin/test_results_dir.py
+  execute_process(COMMAND ${rosunit_path}/scripts/test_results_dir.py
                   OUTPUT_VARIABLE rosbuild_test_results_dir
                   RESULT_VARIABLE _test_results_dir_failed
                   OUTPUT_STRIP_TRAILING_WHITESPACE)
   if(_test_results_dir_failed)
-    message(FATAL_ERROR "Failed to invoke rosunit/bin/test_results_dir.py")
+    message(FATAL_ERROR "Failed to invoke rosunit/scripts/test_results_dir.py")
   endif(_test_results_dir_failed)

   # The 'tests' target builds the test program


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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