Adaptation to allow gcc 4.4 with cuda 4

Adaptation to allow gcc 4.4 with cuda 4

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -1,52 +1,56 @@
-# James Shackleford
-# Date: 08.24.2010
-# File: PLM_nvcc-check.cmake
+######################################################################
+# Based on a script by James Shackleford in Plastimatch.org
+# Modified by Simon Rit
 #
-# Currently, nvcc only works with gcc-4.3
+# Currently, nvcc works with gcc-4.3 and gcc-4.4 for CUDA 4.x
 #
 # This script:
 #   * Checks the version of default gcc
-#   * If not 4.3, we look for gcc-4.3 on the system
+#   * If CUDA 4.x, we look for gcc-4.4
+#   * If not found or CUDA<4, we look for gcc-4.3 on the system
 #   * If found we tell nvcc to use it
-#   * If not found, we kill CMake and tell user to install gcc-4.3
-#
-# NOTE: If nvcc tries to use gcc-4.4 (for example) the build simply
-#       fails.  Ending things at CMake with a request for gcc-4.3
-#       is the most graceful failure I could provide.
+#   * If not found, fatal error
 ######################################################################
-IF(CUDA_FOUND)
-    IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-        IF(CMAKE_COMPILER_IS_GNUCC)

-            # Get the gcc version number
-            EXEC_PROGRAM(gcc ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
+# This function searches for gcc version x.y (arguments 2 and 3 of the macro)
+# Return the result in argument 1, empty if not found
+FUNCTION(FIND_GCC GCC_PATH GCC_MAJOR GCC_MINOR)
+  # Search for gcc-x.y
+  FIND_PROGRAM(EXACT_GCC "gcc-${GCC_MAJOR}.${GCC_MINOR}")
+  IF(EXACT_GCC)
+    SET(GCC_PATH "${EXACT_GCC}" PARENT_SCOPE)
+  ELSE(EXACT_GCC)
+    # gcc-x.y not found, check default gcc
+    FIND_PROGRAM(DEFAULT_GCC gcc)
+    EXEC_PROGRAM(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)

-            # Get major and minor revs
-            STRING(REGEX REPLACE "([0-9]+).[0-9]+.[0-9]+" "\\1" GCCVER_MAJOR "${GCCVER}")
-            STRING(REGEX REPLACE "[0-9]+.([0-9]+).[0-9]+" "\\1" GCCVER_MINOR "${GCCVER}")
-            STRING(REGEX REPLACE "[0-9]+.[0-9]+.([0-9]+)" "\\1" GCCVER_PATCH "${GCCVER}")
+    # Get major and minor revs
+    STRING(REGEX REPLACE "([0-9]+).[0-9]+.[0-9]+" "\\1" GCCVER_MAJOR "${GCCVER}")
+    STRING(REGEX REPLACE "[0-9]+.([0-9]+).[0-9]+" "\\1" GCCVER_MINOR "${GCCVER}")
+    STRING(REGEX REPLACE "[0-9]+.[0-9]+.([0-9]+)" "\\1" GCCVER_PATCH "${GCCVER}")

-#            MESSAGE(STATUS "nvcc-check: GCC Version is ${GCCVER_MAJOR}.${GCCVER_MINOR}.${GCCVER_PATCH}")
+    # Check that adequate
+    IF(GCCVER_MAJOR MATCHES "${GCC_MAJOR}" AND GCCVER_MINOR MATCHES "${GCC_MINOR}")
+        SET(GCC_PATH ${DEFAULT_GCC} PARENT_SCOPE)
+    ENDIF(GCCVER_MAJOR MATCHES "${GCC_MAJOR}" AND GCCVER_MINOR MATCHES "${GCC_MINOR}")
+  ENDIF(EXACT_GCC)
+ENDFUNCTION(FIND_GCC)

-            IF(GCCVER_MAJOR MATCHES "4")
-                IF(GCCVER_MINOR MATCHES "3")
-                    MESSAGE(STATUS "nvcc-check: Found gcc-${GCCVER_MAJOR}.${GCCVER_MINOR}... success.")
-                ELSE(GCCVER_MINOR MATCHES "3")
-                    MESSAGE(STATUS "nvcc-check: Found gcc-${GCCVER_MAJOR}.${GCCVER_MINOR}... searching for gcc-4.3")
-                    EXEC_PROGRAM(which ARGS "gcc-4.3" OUTPUT_VARIABLE GCC43)
+# Main code dealing with each version of cuda
+IF(CUDA_FOUND AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+  SET(GCC_PATH "")
+  IF(CUDA_VERSION_MAJOR MATCHES "4")
+    FIND_GCC(GCC_PATH "4" "4")
+  ENDIF(CUDA_VERSION_MAJOR MATCHES "4")
+  IF(NOT GCC_PATH OR CUDA_VERSION_MAJOR LESS "3")
+    FIND_GCC(GCC_PATH "4" "3")
+  ENDIF(NOT GCC_PATH OR CUDA_VERSION_MAJOR LESS "3")

-                    IF(GCC43 STREQUAL "")
-                        MESSAGE(FATAL_ERROR "nvcc-check: Please install gcc-4.3, it is needed by nvcc \(CUDA\).\nNote that gcc-4.3 can be installed side-by-side with your current version of gcc (${GCCVER_MAJOR}.${GCCVER_MINOR}.${GCCVER_PATCH}).\nYou need not replace your current version of gcc; just make gcc-4.3 available as well so that nvcc can use it.\nDebian/Ubuntu users with root privilages may simply enter the following at a terminal prompt:\n  sudo apt-get install gcc-4.3 g++-4.3\n")
-                    ELSE(GCC43 STREQUAL "")
-                        MESSAGE(STATUS "nvcc-check: Found gcc-4.3... telling nvcc to use it!")
-                        MESSAGE(STATUS "nvcc-check: CUDA_NVCC_FLAGS set to \"${CUDA_NVCC_FLAGS} --compiler-bindir=${GCC43}\"")
-                        SET (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --compiler-bindir=${GCC43})
-                    ENDIF(GCC43 STREQUAL "")
+  IF(GCC_PATH)
+    MESSAGE(STATUS "nvcc-check: Found adequate gcc (${GCC_PATH})... telling nvcc to use it!")
+    SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --compiler-bindir=${GCC_PATH})
+  ELSE(GCC_PATH)
+    MESSAGE(FATAL_ERROR "nvcc-check: Please install adequate gcc for cuda (gcc-4.3 or gcc-4.4 for Cuda 4).\nNote that gcc-4.x can be installed side-by-side with your current version of gcc.\n")
+  ENDIF(GCC_PATH)
+ENDIF(CUDA_FOUND AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)

-                ENDIF(GCCVER_MINOR MATCHES "3")
-            ENDIF(GCCVER_MAJOR MATCHES "4")
-
-
-        ENDIF(CMAKE_COMPILER_IS_GNUCC)
-    ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-ENDIF(CUDA_FOUND)


Made the changes as per Kent/wlad to include http://lists.mysql.com/commits/111802

--- cmake/ssl.cmake
+++ cmake/ssl.cmake
@@ -25,7 +25,7 @@
   SET(SSL_LIBRARIES  yassl taocrypt)
   SET(SSL_INCLUDE_DIRS ${INC_DIRS})
   SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
-  SET(SSL_DEFINES"-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
+  SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
   CHANGE_SSL_SETTINGS("bundled")
   #Remove -fno-implicit-templates
   #(yassl sources cannot  be compiled with  it)


fix: Make OTHER_DIRS absolute [Basis]

fix: Make OTHER_DIRS absolute [Basis]

--- CMake/Basis/ProjectTools.cmake
+++ CMake/Basis/ProjectTools.cmake
@@ -431,9 +431,18 @@
   list (GET PROJECT_INCLUDE_DIRS 0 PROJECT_INCLUDE_DIR)
   list (GET PROJECT_CODE_DIRS    0 PROJECT_CODE_DIR)
   list (GET PROJECT_TOOLS_DIRS   0 PROJECT_TOOLS_DIR)
-  # deprecated SUBDIRS argument -- use OTHER_DIRS instead
-  list (APPEND PROJECT_OTHER_DIRS ${PROJECT_SUBDIRS})
+  # make OTHER_DIRS paths absolute and append deprecated SUBDIRS argument
+  set (_OTHER_DIRS)
+  foreach (_PATH IN LISTS PROJECT_OTHER_DIRS PROJECT_SUBDIRS)
+    if (NOT IS_ABSOLUTE "${_PATH}")
+      set (_PATH "${PROJECT_SOURCE_DIR}/${_PATH}")
+    endif ()
+    list (APPEND _OTHER_DIRS "${_PATH}")
+  endforeach ()
+  set (PROJECT_OTHER_DIRS ${_OTHER_DIRS})
   unset(PROJECT_SUBDIRS)
+  unset(_OTHER_DIRS)
+  unset(_PATH)
   # let basis_project_begin() know that basis_project() was called
   set (BASIS_basis_project_CALLED TRUE)
 endmacro ()


Generate PCH deps file using a naming convention expected by Clion. Fix #2047.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -396,6 +396,11 @@
     foreach (OPT URHO3D_TESTING URHO3D_LUAJIT URHO3D_DATABASE_ODBC)
         set (${OPT} 0)
     endforeach ()
+endif ()
+
+# Coverity scan does not support PCH
+if ($ENV{COVERITY_SCAN_BRANCH})
+    set (URHO3D_PCH 0)
 endif ()

 # Enable testing
@@ -1221,35 +1226,32 @@
                 endif ()
                 # Make sure the precompiled headers are not stale by creating custom rules to re-compile the header as necessary
                 file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PCH_FILENAME})
+                set (ABS_PATH_PCH ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME})
                 foreach (CONFIG ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})   # These two vars are mutually exclusive
                     # Generate *.rsp containing configuration specific compiler flags
                     string (TOUPPER ${CONFIG} UPPERCASE_CONFIG)
-                    file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new "${COMPILE_DEFINITIONS} ${SYSROOT_FLAGS} ${CLANG_${LANG}_FLAGS} ${CMAKE_${LANG}_FLAGS} ${CMAKE_${LANG}_FLAGS_${UPPERCASE_CONFIG}} ${COMPILER_HIDDEN_VISIBILITY_FLAGS} ${COMPILER_HIDDEN_INLINE_VISIBILITY_FLAGS} ${PIC_FLAGS} ${INCLUDE_DIRECTORIES} -c -x ${LANG_H}")
-                    execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp)
-                    file (REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new)
-                    # Determine the dependency list
-                    execute_process (COMMAND ${CMAKE_${LANG}_COMPILER} @${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp -MTdeps -MM -o ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps ${ABS_HEADER_PATHNAME} RESULT_VARIABLE ${LANG}_COMPILER_EXIT_CODE)
-                    if (NOT ${LANG}_COMPILER_EXIT_CODE EQUAL 0)
-                        message (FATAL_ERROR "Could not generate dependency list for PCH. There is something wrong with your compiler toolchain. "
-                            "Ensure its bin path is in the PATH environment variable or ensure CMake can find CC/CXX in your build environment.")
+                    file (WRITE ${ABS_PATH_PCH}.${CONFIG}.pch.rsp.new "${COMPILE_DEFINITIONS} ${SYSROOT_FLAGS} ${CLANG_${LANG}_FLAGS} ${CMAKE_${LANG}_FLAGS} ${CMAKE_${LANG}_FLAGS_${UPPERCASE_CONFIG}} ${COMPILER_HIDDEN_VISIBILITY_FLAGS} ${COMPILER_HIDDEN_INLINE_VISIBILITY_FLAGS} ${PIC_FLAGS} ${INCLUDE_DIRECTORIES} -c -x ${LANG_H}")
+                    execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ABS_PATH_PCH}.${CONFIG}.pch.rsp.new ${ABS_PATH_PCH}.${CONFIG}.pch.rsp)
+                    file (REMOVE ${ABS_PATH_PCH}.${CONFIG}.pch.rsp.new)
+                    if (NOT ${TARGET_NAME}_PCH_DEPS)
+                        # Determine the dependency list
+                        execute_process (COMMAND ${CMAKE_${LANG}_COMPILER} @${ABS_PATH_PCH}.${CONFIG}.pch.rsp -MTdeps -MM -MF ${ABS_PATH_PCH}.d -o ${ABS_PATH_PCH} ${ABS_HEADER_PATHNAME} RESULT_VARIABLE ${LANG}_COMPILER_EXIT_CODE)
+                        if (NOT ${LANG}_COMPILER_EXIT_CODE EQUAL 0)
+                            message (FATAL_ERROR "Could not generate dependency list for PCH. There is something wrong with your compiler toolchain. "
+                                "Ensure its bin path is in the PATH environment variable or ensure CMake can find CC/CXX in your build environment.")
+                        endif ()
+                        file (STRINGS ${ABS_PATH_PCH}.d ${TARGET_NAME}_PCH_DEPS)
+                        string (REGEX REPLACE "^deps: *| *\\; *" ";" ${TARGET_NAME}_PCH_DEPS ${${TARGET_NAME}_PCH_DEPS})
+                        string (REGEX REPLACE "\\\\ " "\ " ${TARGET_NAME}_PCH_DEPS "${${TARGET_NAME}_PCH_DEPS}")    # Need to stringify the second time to preserve the semicolons
                     endif ()
-                    file (STRINGS ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps DEPS)
-                    string (REGEX REPLACE "^deps: *| *\\; *" ";" DEPS ${DEPS})
-                    string (REGEX REPLACE "\\\\ " "\ " DEPS "${DEPS}")  # Need to stringify the second time to preserve the semicolons
                     # Create the rule that depends on the included headers
                     add_custom_command (OUTPUT ${HEADER_FILENAME}.${CONFIG}.pch.trigger
-                        COMMAND ${CMAKE_${LANG}_COMPILER} @${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp -o ${PCH_FILENAME}/${PCH_FILENAME}.${CONFIG} ${ABS_HEADER_PATHNAME}
+                        COMMAND ${CMAKE_${LANG}_COMPILER} @${ABS_PATH_PCH}.${CONFIG}.pch.rsp -o ${PCH_FILENAME}/${PCH_FILENAME}.${CONFIG} ${ABS_HEADER_PATHNAME}
                         COMMAND ${CMAKE_COMMAND} -E touch ${HEADER_FILENAME}.${CONFIG}.pch.trigger
-                        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp ${DEPS}
+                        DEPENDS ${ABS_PATH_PCH}.${CONFIG}.pch.rsp ${${TARGET_NAME}_PCH_DEPS}
                         COMMENT "Precompiling header file '${HEADER_FILENAME}' for ${CONFIG} configuration")
                 endforeach ()
                 # Using precompiled header file
-                if ($ENV{COVERITY_SCAN_BRANCH})
-                    # Coverity scan does not support PCH so workaround by including the actual header file
-                    set (ABS_PATH_PCH ${ABS_HEADER_PATHNAME})
-                else ()
-                    set (ABS_PATH_PCH ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME})
-                endif ()
                 set (CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} -include \"${ABS_PATH_PCH}\"")
                 unset (${TARGET_NAME}_HEADER_PATHNAME)
             else ()


CMake: Fix samples build error with URHO3D_WIN32_CONSOLE enabled.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -160,10 +160,13 @@

 macro (add_sample TARGET)
     file (GLOB SOURCE_FILES *.cpp *.h)
+    if (NOT URHO3D_WIN32_CONSOLE)
+        set (TARGET_TYPE WIN32)
+    endif ()
     if (ANDROID)
         add_library(${TARGET} SHARED ${SOURCE_FILES})
     else ()
-        add_executable (${TARGET} WIN32 ${SOURCE_FILES})
+        add_executable (${TARGET} ${TARGET_TYPE} ${SOURCE_FILES})
     endif ()
     target_link_libraries (${TARGET} Urho3D)
     target_include_directories(${TARGET} PRIVATE ..)


ENH: Allow forcing of options without showing in cmake gui

--- CMake/vtkDependentOption.cmake
+++ CMake/vtkDependentOption.cmake
@@ -10,17 +10,21 @@
 # retains its old value.
 #
 MACRO(VTK_DEPENDENT_OPTION option doc default depends force)
-  SET(${option}_AVAILABLE 1)
-  FOREACH(d ${depends})
-    IF(NOT ${d})
-      SET(${option}_AVAILABLE 0)
-    ENDIF(NOT ${d})
-  ENDFOREACH(d)
-  IF(${option}_AVAILABLE)
-    OPTION(${option} "${doc}" "${default}")
-    SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
-  ELSE(${option}_AVAILABLE)
-    SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
-    SET(${option} ${force})
-  ENDIF(${option}_AVAILABLE)
+  IF(${option}_FORCE MATCHES "^${option}_FORCE")
+    SET(${option}_AVAILABLE 1)
+    FOREACH(d ${depends})
+      IF(NOT ${d})
+        SET(${option}_AVAILABLE 0)
+      ENDIF(NOT ${d})
+    ENDFOREACH(d)
+    IF(${option}_AVAILABLE)
+      OPTION(${option} "${doc}" "${default}")
+      SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
+    ELSE(${option}_AVAILABLE)
+      SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
+      SET(${option} ${force})
+    ENDIF(${option}_AVAILABLE)
+  ELSE(${option}_FORCE MATCHES "^${option}_FORCE")
+    SET(${option} "${${option}_FORCE}")
+  ENDIF(${option}_FORCE MATCHES "^${option}_FORCE")
 ENDMACRO(VTK_DEPENDENT_OPTION)


FindGROMACS.cmake: don't cache GROMACS_DEFINITIONS GROMACS_VERSION, remove GROMACS_DEP_LIBRARIES

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -44,54 +44,30 @@

 find_library(GROMACS_LIBRARY NAMES ${GROMACS_LIBRARY_NAME} HINTS ${PC_GROMACS_LIBRARY_DIRS} )
 if (GROMACS_LIBRARY)
-  if("${GROMACS_LIBRARY}" MATCHES "lib(gmx|gromacs)[^;]*\\.a")
-    if(PC_GROMACS_LIBRARIES)
-      list(REMOVE_ITEM PC_GROMACS_LIBRARIES ${GROMACS_LIBRARY_NAME})
-      foreach (LIB ${PC_GROMACS_LIBRARIES})
-        find_library(GROMACS_${LIB} NAMES ${LIB} HINTS ${PC_GROMACS_LIBRARY_DIRS} )
-        list(APPEND GMX_DEP_LIBRARIES ${GROMACS_${LIB}})
-        unset(GROMACS_${LIB} CACHE)
-      endforeach(LIB)
-    endif(PC_GROMACS_LIBRARIES)
-    if(PC_GROMACS_CFLAGS_OTHER)
-      foreach(LIB ${PC_GROMACS_CFLAGS_OTHER})
-        if (${LIB} MATCHES "thread")
-  	find_package(Threads REQUIRED)
-  	list(APPEND GMX_DEP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
-        endif (${LIB} MATCHES "thread")
-      endforeach(LIB)
-    endif(PC_GROMACS_CFLAGS_OTHER)
-    set(GROMACS_DEP_LIBRARIES "${GMX_DEP_LIBRARIES}" CACHE FILEPATH "gromacs depency libs (only needed for static (.a) libgmx")
-  endif("${GROMACS_LIBRARY}" MATCHES "lib(gmx|gromacs)[^;]*\\.a")
   include(CheckLibraryExists)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" GromacsVersion "" FOUND_GROMACS_VERSION)
+  check_library_exists("${GROMACS_LIBRARY}" GromacsVersion "" FOUND_GROMACS_VERSION)
   if(NOT FOUND_GROMACS_VERSION)
-    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY and GROMACS_DEP_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so' -DGROMACS_DEP_LIBRARIES='/path/to/libblas.so;/path/to/libm.so')!")
+    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so;/path/to/libblas.so;/path/to/libm.so')!")
   endif(NOT FOUND_GROMACS_VERSION)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" init_mtop "" FOUND_GROMACS_INIT_MTOP)
+  check_library_exists("${GROMACS_LIBRARY}" init_mtop "" FOUND_GROMACS_INIT_MTOP)
   if(NOT FOUND_GROMACS_INIT_MTOP)
     message(FATAL_ERROR "Could not find init_mtop in the gromacs library, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. This most likely means that your gromacs version is too old, we need at least gromacs 4.0.7.")
   endif(NOT FOUND_GROMACS_INIT_MTOP)
   set(GMX_VERSION 40)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" output_env_init "" FOUND_GROMACS_OUTPUT_ENV_INIT)
+  check_library_exists("${GROMACS_LIBRARY}" output_env_init "" FOUND_GROMACS_OUTPUT_ENV_INIT)
   if(FOUND_GROMACS_OUTPUT_ENV_INIT)
     set(GMX_VERSION 45)
   endif(FOUND_GROMACS_OUTPUT_ENV_INIT)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" init_domdec_vsites "" FOUND_GROMACS_INIT_DOMDEC_VSITES)
+  check_library_exists("${GROMACS_LIBRARY}" init_domdec_vsites "" FOUND_GROMACS_INIT_DOMDEC_VSITES)
   if(FOUND_GROMACS_INIT_DOMDEC_VSITES)
     set(GMX_VERSION 50)
   endif(FOUND_GROMACS_INIT_DOMDEC_VSITES)
-  set(GROMACS_VERSION ${GMX_VERSION} CACHE STRING "Gromacs lib interface version")
-
-  if( ( (    ${GROMACS_LIBRARY} MATCHES "lib[^/]*_d\\.[^.]*$") AND (NOT "${GROMACS_PKG}" MATCHES "_d$") ) OR
-      ( (NOT ${GROMACS_LIBRARY} MATCHES "lib[^/]*_d\\.[^.]*$") AND (    "${GROMACS_PKG}" MATCHES "_d$") ) )
-      message(WARNING "You are using ${GROMACS_LIBRARY}, but GROMACS_PKG was ${GROMACS_PKG}. There seems to be a mismatch in precision, single vs double, no ending vs. _d. If this is not the case ignore this warning otherwise enable set GROMACS_PKG correctly using -DGROMACS_PKG_OVERWRITE=lib(gmx|gromacs)(_d).")
-  endif()
+  set(GROMACS_VERSION ${GMX_VERSION})

   #Only set GROMACS_DEFINITIONS if GROMACS_LIBRARY was found
-  if ("${GROMACS_PKG}" MATCHES "_d$")
+  if ("${GROMACS_LIBRARY}" MATCHES "lib[^/]*_d\\.[^.]*$")
     list(APPEND GMX_DEFS "-DGMX_DOUBLE")
-  endif ("${GROMACS_PKG}" MATCHES "_d$")
+  endif ("${GROMACS_LIBRARY}" MATCHES "lib[^/]*_d\\.[^.]*$")
   if (PC_GROMACS_CFLAGS_OTHER)
     foreach(DEF ${PC_GROMACS_CFLAGS_OTHER})
       if (${DEF} MATCHES "^-D")
@@ -100,7 +76,7 @@
     endforeach(DEF)
     list(REMOVE_DUPLICATES GMX_DEFS)
   endif (PC_GROMACS_CFLAGS_OTHER)
-  set(GROMACS_DEFINITIONS "${GMX_DEFS}" CACHE STRING "extra GROMACS definitions")
+  set(GROMACS_DEFINITIONS "${GMX_DEFS}")

 else(GROMACS_LIBRARY)
   set(GMX_VERSION 45)
@@ -116,7 +92,7 @@
   find_path(GROMACS_INCLUDE_DIR gromacs/fileio/tpxio.h HINTS ${PC_GROMACS_INCLUDE_DIRS})
 endif("${GROMACS_PKG}" MATCHES "libgmx")

-set(GROMACS_LIBRARIES "${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" )
+set(GROMACS_LIBRARIES "${GROMACS_LIBRARY}" )
 set(GROMACS_INCLUDE_DIRS ${GROMACS_INCLUDE_DIR} )

 include(FindPackageHandleStandardArgs)
@@ -124,4 +100,4 @@
 # if all listed variables are TRUE
 find_package_handle_standard_args(GROMACS DEFAULT_MSG GROMACS_LIBRARY GROMACS_INCLUDE_DIR)

-mark_as_advanced(GROMACS_INCLUDE_DIR GROMACS_LIBRARY GROMACS_DEFINITIONS GROMACS_PKG GROMACS_VERSION GROMACS_DEP_LIBRARIES)
+mark_as_advanced(GROMACS_INCLUDE_DIR GROMACS_LIBRARY GROMACS_PKG)


- add dependency dir

- add dependency dir

--- CMakeModules/FindLIBSBML.cmake
+++ CMakeModules/FindLIBSBML.cmake
@@ -27,9 +27,13 @@
           /opt/lib/cmake
           /opt/local/lib/cmake
           /sw/lib/cmake
+          ${LIBSEDML_DEPENDENCY_DIR}
+          ${LIBSEDML_DEPENDENCY_DIR}/lib/cmake
+          ${LIBSEDML_DEPENDENCY_DIR}/lib64/cmake
           ${CONAN_LIB_DIRS_LIBSBML}
           ${CONAN_LIB_DIRS_LIBSBML}/cmake
           ${CONAN_LIB_DIRS_LIBSBML}/lib/cmake
+          ${CONAN_LIB_DIRS_LIBSBML}/lib64/cmake
   )
 endif()

@@ -94,6 +98,7 @@
           $ENV{LIBSBML_DIR}
           ${LIBSEDML_DEPENDENCY_DIR}
           ${LIBSEDML_DEPENDENCY_DIR}/lib
+          ${LIBSEDML_DEPENDENCY_DIR}/lib64
           ${CONAN_LIB_DIRS_LIBSBML}
           ~/Library/Frameworks
           /Library/Frameworks


cmake: fix FindFilesystem with gcc9

cmake: fix FindFilesystem with gcc9

Quote the variable's value, so the assignment works even if the
value is empty, rather then complaining about a missing operand.

--- cmake/FindStdFilesystem.cmake
+++ cmake/FindStdFilesystem.cmake
@@ -78,5 +78,5 @@

   set_target_properties (StdFilesystem::filesystem
     PROPERTIES
-      INTERFACE_LINK_LIBRARIES ${StdFilesystem_LIBRARIES})
+      INTERFACE_LINK_LIBRARIES "${StdFilesystem_LIBRARIES})"
 endif ()


Fix for tinyxml on OSX.

Fix for tinyxml on OSX.

--- cmake/ThirdPartyTinyxml.cmake
+++ cmake/ThirdPartyTinyxml.cmake
@@ -24,12 +24,11 @@
                 ${TPSRC}/src/tinyxml-2.4.3/tinyxml.h
                 ${TPSRC}/dist/include/tinyxml.h
     )
-    SET(TINYXML_LIB ${TPSRC}/dist/lib/libtinyxml.so CACHE FILEPATH
+    SET(TINYXML_LIB tinyxml CACHE FILEPATH
         "Tinyxml library" FORCE)
     MARK_AS_ADVANCED(TINYXML_LIB)
     LINK_DIRECTORIES(${TPSRC}/dist/lib)
     INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
-    MESSAGE(STATUS "Build TinyXML: ${TPSRC}/dist/lib/lib${TINYXML_LIB}.so")
 ELSE (THIRDPARTY_BUILD_TINYXML)
     INCLUDE (FindTinyXml)
 ENDIF (THIRDPARTY_BUILD_TINYXML)


[appveyor] fix lib path for gtest

[appveyor] fix lib path for gtest

--- cmake/modules/FindGMock.cmake
+++ cmake/modules/FindGMock.cmake
@@ -183,8 +183,10 @@
 set(GTEST_INCLUDE_DIR ${source_dir}/gtest/include)
 mark_as_advanced(GTEST_INCLUDE_DIR)

-set(GTEST_LIBRARY "${binary_dir}/gtest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${Suffix}")
-set(GTEST_MAIN_LIBRARY "${binary_dir}/gtest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${Suffix}")
+set(GTEST_LIB_DIR "${binary_dir}/gtest/")
+if(MSVC) set(GTEST_LIB_DIR "${GTEST_LIB_DIR}/Release") endif()
+set(GTEST_LIBRARY "${GTEST_LIB_DIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${Suffix}")
+set(GTEST_MAIN_LIBRARY "${GTEST_LIB_DIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${Suffix}")
 set(GMOCK_LIBRARY "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gmock${Suffix}")
 set(GMOCK_MAIN_LIBRARY "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gmock_main${Suffix}")


Test generation of binary release with CPack

--- cmake/modules/RootCPack.cmake
+++ cmake/modules/RootCPack.cmake
@@ -155,4 +155,4 @@
     DESCRIPTION "These are needed to do any test and tutorial"
      INSTALL_TYPES full developer)

-
+add_test(NAME package COMMAND ${CMAKE_CPACK_COMMAND})


no more BEFORE

no more BEFORE

--- compcmake/joedbc.cmake
+++ compcmake/joedbc.cmake
@@ -64,7 +64,7 @@
 function(target_uses_joedb target)
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  add_dependencies(${target} all_joedbc)
- target_include_directories(${target} BEFORE PUBLIC ${JOEDB_DIR}/../src)
+ target_include_directories(${target} PUBLIC ${JOEDB_DIR}/../src)
  target_link_libraries(${target} ${JOEDB_LIB})
  if (libssh_FOUND)
   target_link_libraries(${target} ${LIBSSH_LIBRARIES})


fbcode_builder: minor fixup to normalize python installation paths

Summary:
This just strips off a trailing '/' from the `INSTALL_DIR` property that we
set on python targets, to avoid having double-slashes in the paths that we use
during installation.  This shouldn't really have any material difference other
than cleaning up the paths that get printed during the installation phase.

Reviewed By: chadaustin

Differential Revision: D17089207

fbshipit-source-id: ab36bb76c19fa60fe037f7a5290ccfd6bdbf13b0

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -326,6 +326,7 @@
   if(NOT IS_ABSOLUTE "${abs_install_dir}")
     set(abs_install_dir "${CMAKE_INSTALL_PREFIX}/${abs_install_dir}")
   endif()
+  string(REGEX REPLACE "/$" "" abs_install_dir "${abs_install_dir}")
   set_target_properties(
     "${LIB_NAME}.py_lib_install"
     PROPERTIES


ENH: Update SimpleITKFilters remote module

f885603 Merge pull request #15 from blowekamp/UpdateITK5.3
ad91905 Change testing data to sha512 uploaded to data.kitware
c1ab584 Update to ITK 5.3rc2

--- Modules/Remote/SimpleITKFilters.remote.cmake
+++ Modules/Remote/SimpleITKFilters.remote.cmake
@@ -49,5 +49,5 @@
   contains a discrete hessian, and a composite filter to compute objectness."
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSimpleITKFilters.git
-  GIT_TAG 73ecf38d355a228866154fdafbb9dfc43fa132b1
+  GIT_TAG f885603b630619a20155c03a5baca2f684b9a6a7
   )


Split off 8.4.44

Split off 8.4.44

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 4 )
-set ( HPCC_POINT 43 )
+set ( HPCC_POINT 45 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Graph Control 4.0.2-rc1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 2 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Bumped version number

Bumped version number

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(autowiring_VERSION 0.4.4)
+set(autowiring_VERSION 0.4.5)


Split off 7.12.42

Split off 7.12.42

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 12 )
-set ( HPCC_POINT 41 )
+set ( HPCC_POINT 43 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.12.34

Split off 7.12.34

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 12 )
-set ( HPCC_POINT 33 )
+set ( HPCC_POINT 35 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.6

Split off 8.0.6

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 5 )
+set ( HPCC_POINT 7 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Add custom config file support for clang-format (#153)

* Add custom config file support for clang-format

Signed-off-by: John Shepherd <f2eddb5f3eba2e7aa76cdcf5ad3c033799787fbd@yahoo.com>

* Add global arg into cmake function, update documentation

Signed-off-by: John Shepherd <f2eddb5f3eba2e7aa76cdcf5ad3c033799787fbd@yahoo.com>


Glog previously used STIR version tag instead of its own.

--- SuperBuild/External_glog.cmake
+++ SuperBuild/External_glog.cmake
@@ -51,7 +51,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY ${${proj}_URL}
-    GIT_TAG ${STIR_TAG}
+    GIT_TAG ${${proj}_TAG}
     SOURCE_DIR ${${proj}_SOURCE_DIR}
     BINARY_DIR ${${proj}_BINARY_DIR}
     DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}


Allow specification of destination  (#265)

--- cmake/gsFetch.cmake
+++ cmake/gsFetch.cmake
@@ -13,6 +13,7 @@
   set(GF_NAME "${ARGV0}")
   set(oneValueArgs
     # Protect the following options
+    DESTINATION
     SOURCE_DIR
     BINARY_DIR
     CONFIGURE_COMMAND
@@ -22,15 +23,15 @@
   cmake_parse_arguments(GF "${GF_NAME}" "${oneValueArgs}" "" ${ARGN})
   #message( GF_UNPARSED_ARGUMENTS "= ${GF_UNPARSED_ARGUMENTS}")

-  if( EXISTS "${gismo_SOURCE_DIR}/extensions/${GF_NAME}/CMakeLists.txt")
+  if( EXISTS "${gismo_SOURCE_DIR}/${GF_DESTINATION}/${GF_NAME}/CMakeLists.txt")
     message(STATUS "Enabling remote module ${GF_NAME} - found")
     return()
   endif()

   message(STATUS "Enabling remote module ${GF_NAME}")
-  set(GF_SOURCE_DIR   "${gismo_SOURCE_DIR}/extensions/${GF_NAME}")
-  set(GF_BINARY_DIR   "${gismo_BINARY_DIR}/extensions/${GF_NAME}_fetch")
-  set(GF_DOWNLOAD_DIR "${gismo_BINARY_DIR}/extensions/${GF_NAME}_fetch")
+  set(GF_SOURCE_DIR   "${gismo_SOURCE_DIR}/${GF_DESTINATION}/${GF_NAME}")
+  set(GF_BINARY_DIR   "${gismo_BINARY_DIR}/${GF_DESTINATION}/${GF_NAME}_fetch")
+  set(GF_DOWNLOAD_DIR "${gismo_BINARY_DIR}/${GF_DESTINATION}/${GF_NAME}_fetch")
   set(${GF_NAME}_SOURCE_DIR "${GF_SOURCE_DIR}" PARENT_SCOPE)
   set(${GF_NAME}_BINARY_DIR "${GF_BINARY_DIR}" PARENT_SCOPE)
   file(REMOVE "${GF_DOWNLOAD_DIR}/CMakeCache.txt")
@@ -57,7 +58,7 @@
     message(SEND_ERROR "Build step for ${GF_NAME} failed: ${result}")
   endif()

-  if(NOT EXISTS "${gismo_SOURCE_DIR}/extensions/${GF_NAME}/CMakeLists.txt")
+  if(NOT EXISTS "${gismo_SOURCE_DIR}/${GF_DESTINATION}/${GF_NAME}/CMakeLists.txt")
     message(SEND_ERROR "Enabling remote module ${GF_NAME} - not found")
   else()
     message(STATUS "Enabling remote module ${GF_NAME} - downloaded")
@@ -84,7 +85,7 @@
     #elseif("x${GISMO_FETCH_PROT}" STREQUAL "xhttps")
     #  set(git_repo https://github.com/gismo/${ARGV0}.git)
     #endif()
-    # gismo_fetch_directory(${ARGN} GIT_REPOSITORY  ${git_repo})
+    # gismo_fetch_directory(${ARGN} GIT_REPOSITORY  ${git_repo} DESTINATION  extensions)

     if(NOT EXISTS "${gismo_SOURCE_DIR}/extensions/${ARGV0}/CMakeLists.txt")
       message(STATUS "Initializing remote submodule ${ARGV0}")
@@ -102,10 +103,13 @@
       SVN_USERNAME ${GISMO_UNAME} # Username for Subversion checkout and update
       SVN_PASSWORD ${GISMO_PASS}  # Password for Subversion checkout and update
       SVN_TRUST_CERT 1            # Trust the Subversion server site certificate
+      DESTINATION  extensions
       )
   else()
     gismo_fetch_directory(${ARGN}
-      URL https://github.com/gismo/${ARGV0}/archive/master.zip)
+      URL https://github.com/gismo/${ARGV0}/archive/master.zip
+      DESTINATION  extensions
+      )
   endif()

   if(EXISTS "${gismo_SOURCE_DIR}/extensions/${ARGN}/CMakeLists.txt")


use the simmetrix model for all pipe tests

--- test/testing.cmake
+++ test/testing.cmake
@@ -2,49 +2,49 @@
 set(MDIR ${MESHES}/pipe)
 add_test(verify_serial
   verify
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "${MDIR}/pipe.smb")
 add_test(uniform_serial
   uniform
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "${MDIR}/pipe.smb"
   "pipe.smb")
 add_test(ma_serial
   ma_test
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "pipe.smb")
 add_test(tet_serial
   tetrahedronize
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "pipe.smb"
   "tet.smb")
 add_test(split_2
   split
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "pipe.smb"
   "pipe_2_.smb"
   2)
 add_test(split_4
   ${MPIRUN} ${MPIRUN_PROCFLAG} 2
   zsplit
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "pipe_2_.smb"
   "pipe_4_.smb"
   2)
 add_test(verify_parallel
   ${MPIRUN} ${MPIRUN_PROCFLAG} 4
   ma_test
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "pipe_4_.smb")
 add_test(ma_parallel
   ${MPIRUN} ${MPIRUN_PROCFLAG} 4
   ma_test
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "pipe_4_.smb")
 add_test(tet_parallel
   ${MPIRUN} ${MPIRUN_PROCFLAG} 4
   tetrahedronize
-  "${MDIR}/pipe.dmg"
+  "${MDIR}/pipe.smd"
   "pipe_4_.smb"
   "tet.smb")
 set(MDIR ${MESHES}/mpas)


COMP: install application launcher scripts

--- CMake/OTBApplicationMacros.cmake
+++ CMake/OTBApplicationMacros.cmake
@@ -62,12 +62,10 @@
                DESTINATION ${APPLICATION_BINARY_PATH}
                FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

-          if (OTB_INSTALL_BIN_DIR)
-              # Install a version of this script if we are inside the OTB build
-              install(PROGRAMS ${SCRIPT_CLI_INSTALLABLE}
-                      DESTINATION ${OTB_INSTALL_BIN_DIR}
-                      COMPONENT RuntimeLibraries)
-          endif()
+          # Install a version of this script if we are inside the OTB build
+          install(PROGRAMS ${SCRIPT_CLI_INSTALLABLE}
+                  DESTINATION ${OTB_INSTALL_RUNTIME_DIR}
+                  COMPONENT Runtime)
       endif()

       if (WIN32)
@@ -91,12 +89,10 @@
                DESTINATION ${APPLICATION_BINARY_PATH}
                FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

-          if (OTB_INSTALL_BIN_DIR)
-              # Install a version of this script if we are inside the OTB build
-              install(PROGRAMS ${SCRIPT_GUI_INSTALLABLE}
-                      DESTINATION ${OTB_INSTALL_BIN_DIR}
-                      COMPONENT RuntimeLibraries)
-          endif()
+          # Install a version of this script if we are inside the OTB build
+          install(PROGRAMS ${SCRIPT_GUI_INSTALLABLE}
+                  DESTINATION ${OTB_INSTALL_RUNTIME_DIR}
+                  COMPONENT Runtime)
       endif()
    #endif()


Update flag setting code from ITK upstream

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -19,8 +19,8 @@
 #  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNING_FLAGS}")

-include(ITK_CheckCCompilerFlag)
-include(ITK_CheckCXXCompilerFlag)
+include(CheckCXXCompilerFlag)
+include(CheckCCompilerFlag)
 if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14.0)
   include(CheckPIESupported)
   check_pie_supported()
@@ -31,7 +31,7 @@
   set(flag_list "${ARGN}")
   foreach(flag IN LISTS flag_list)
     string(REPLACE "=" "_" flag_var ${flag} )
-    ITK_CHECK_C_COMPILER_FLAG(${flag} C_HAS_WARNING${flag_var})
+    check_c_compiler_flag(${flag} C_HAS_WARNING${flag_var})
     if(${C_HAS_WARNING${flag_var}})
       set(local_c_flags "${local_c_flags} ${flag}")
     endif()
@@ -45,7 +45,7 @@
   set(flag_list "${ARGN}")
   foreach(flag IN LISTS flag_list)
     string(REPLACE "=" "_" flag_var ${flag} )
-    ITK_CHECK_CXX_COMPILER_FLAG(${flag} CXX_HAS_WARNING${flag_var})
+    check_cxx_compiler_flag(${flag} CXX_HAS_WARNING${flag_var})
     if(${CXX_HAS_WARNING${flag_var}})
       set(local_cxx_flags "${local_cxx_flags} ${flag}")
     endif()
@@ -145,7 +145,15 @@
   if(MSVC)
       set(InstructionSetOptimizationFlags
          # https://docs.microsoft.com/en-us/cpp/build/reference/arch-x64?view=vs-2015
-         /arch:SSE /arch:SSE2 /arch:/AVX ) # /arch:/AVX2 AVX2 circa 2013
+         /arch:AVX ) # AVX support circa 2013 hardware
+      if(MSVC_VERSION GREATER_EQUAL 1800)
+         list(APPEND InstructionSetOptimizationFlags
+              /arch:AVX2) # AVX support circa 2013 hardware
+      endif()
+      if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+         list(APPEND InstructionSetOptimizationFlags
+              /arch:SSE /arch:SSE2)
+      endif()
   else()
     if (${CMAKE_C_COMPILER} MATCHES "icc.*$")
       set(USING_INTEL_ICC_COMPILER TRUE)
@@ -154,7 +162,7 @@
       set(USING_INTEL_ICC_COMPILER TRUE)
     endif()
     if(USING_INTEL_ICC_COMPILER)
-      set(InstructionSetOptimizationFlags "" )
+      set(InstructionSetOptimizationFlags "")
     else()
       set(InstructionSetOptimizationFlags "")
     endif ()
@@ -188,7 +196,7 @@
   # warnings
   if(WIN32)
        if(NOT MINGW)
-         if(NOT ITK_ENABLE_VISUAL_STUDIO_DEPRECATED_C_WARNINGS)
+         if(NOT ${PROJECT_NAME}_ENABLE_VISUAL_STUDIO_DEPRECATED_C_WARNINGS)
            add_definitions(
              -D_CRT_FAR_MAPPINGS_NO_DEPRECATE
              -D_CRT_IS_WCTYPE_NO_DEPRECATE
@@ -216,7 +224,7 @@
     # Some libraries (e.g. vxl libs) have no dllexport markup, so we can
     # build full shared libraries only with the GNU toolchain. For non
     # gnu compilers on windows, only a few libraries are built shared.
-    # This is controlled with ITK_LIBRARY_BUILD_TYPE used in the add_library
+    # This is controlled with ${PROJECT_NAME}_LIBRARY_BUILD_TYPE used in the add_library
     # call. This allows for plugin type applications to use a dll for
     # ITKCommon which will contain the static for Modified time.
     if(CMAKE_COMPILER_IS_GNUCXX)
@@ -239,7 +247,7 @@
         else()
           set(${PROJECT_NAME}_LIBRARY_BUILD_TYPE "STATIC")
         endif()
-        # turn off BUILD_SHARED_LIBS as ITK_LIBRARY_BUILD_TYPE
+        # turn off BUILD_SHARED_LIBS as ${PROJECT_NAME}_LIBRARY_BUILD_TYPE
         # is used on the libraries that have markup.
         set(BUILD_SHARED_LIBS OFF)
       endif()
@@ -355,12 +363,12 @@
   check_compiler_warning_flags(C_WARNING_FLAGS CXX_WARNING_FLAGS)
 endif()

-if(NOT ${PROJECT_NAME}_C_WARNING_FLAGS) #Not set on cmake command line option -DITK_C_WARNING_FLAGS:STRING=""
+if(NOT ${PROJECT_NAME}_C_WARNING_FLAGS) #Not set on cmake command line option -D${PROJECT_NAME}_C_WARNING_FLAGS:STRING=""
   set(${PROJECT_NAME}_C_WARNING_FLAGS ${C_WARNING_FLAGS})
 endif()
 set(${PROJECT_NAME}_C_WARNING_FLAGS ${${PROJECT_NAME}_C_WARNING_FLAGS} CACHE STRING "ITK C compiler warning flags. Modify to suit your needs.")

-if(NOT ${PROJECT_NAME}_CXX_WARNING_FLAGS) #Not set on cmake command line option -DITK_CXX_WARNING_FLAGS:STRING=""
+if(NOT ${PROJECT_NAME}_CXX_WARNING_FLAGS) #Not set on cmake command line option -D${PROJECT_NAME}_CXX_WARNING_FLAGS:STRING=""
   set(${PROJECT_NAME}_CXX_WARNING_FLAGS ${CXX_WARNING_FLAGS})
 endif()
 set(${PROJECT_NAME}_CXX_WARNING_FLAGS ${${PROJECT_NAME}_CXX_WARNING_FLAGS} CACHE STRING "ITK CXX compiler warning flags. Modify to suit your needs.")
@@ -376,7 +384,7 @@
   #Check the set of warning flags the compiler supports
   check_compiler_optimization_flags(C_OPTIMIZATION_FLAGS CXX_OPTIMIZATION_FLAGS)
 endif()
-if(NOT ${PROJECT_NAME}_C_OPTIMIZATION_FLAGS) #Not set on cmake command line option -DITK_C_OPTIMIZATION_FLAGS:STRING=""
+if(NOT ${PROJECT_NAME}_C_OPTIMIZATION_FLAGS) #Not set on cmake command line option -D${PROJECT_NAME}_C_OPTIMIZATION_FLAGS:STRING=""
   set(${PROJECT_NAME}_C_OPTIMIZATION_FLAGS ${C_OPTIMIZATION_FLAGS} CACHE STRING "ITK C Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.")
 else()
   set(${PROJECT_NAME}_C_OPTIMIZATION_FLAGS ${${PROJECT_NAME}_C_OPTIMIZATION_FLAGS} CACHE STRING "ITK C Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.")
@@ -396,7 +404,7 @@
 check_compiler_platform_flags()

 # Append ITK warnings to the CMake flags.
-# We do not set them in ITK_REQUIRED FLAGS because all project which
+# We do not set them in ${PROJECT_NAME}_REQUIRED FLAGS because all project which
 # use ITK don't require these flags .

 string(REPLACE " " ";" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${PROJECT_NAME}_C_OPTIMIZATION_FLAGS} ${${PROJECT_NAME}_C_WARNING_FLAGS}")


Update hunter gate

Update hunter gate

--- HunterGate.cmake
+++ HunterGate.cmake
@@ -14,8 +14,8 @@

 cmake_minimum_required(VERSION 2.8.10)

-set(HUNTER_MINIMUM_VERSION "0.3.3")
-set(HUNTER_MINIMUM_VERSION_HASH 2c94192b1fedca076888ed83261ffd51c735219b)
+set(HUNTER_MINIMUM_VERSION "0.3.5")
+set(HUNTER_MINIMUM_VERSION_HASH 8048d54d542cb1f0892bba1d62ed2807e98a40f9)

 # Set HUNTER_ROOT cmake variable to suitable value.
 # Info about variable can be found in HUNTER_ROOT_INFO.


Make user choose SSH or HTTPS for private repo

Updated CppSdl2

--- ExternalFetchContent.cmake
+++ ExternalFetchContent.cmake
@@ -4,7 +4,7 @@
 	GIT_REPOSITORY
 		https://github.com/mwthinker/CppSdl2.git
 	GIT_TAG
-		fc9204d21ff741bd29df07c6235e036cc9fedc3e
+		e47fdfd75cbd7e9f8baa2ddb8bb17aa593fb3151
 )
 FetchContent_MakeAvailable(CppSdl2)

@@ -27,13 +27,21 @@
 )
 include(${CmakeAuxiliary_SOURCE_DIR}/auxiliary.cmake)

-message(STATUS "Download private date repository is available to add: -DZombieData_PrivateRepo=1")
-option(ZombieData_PrivateRepo "Add ZombieData_PrivateRepo to project." OFF)
-if (ZombieData_PrivateRepo)
+message(STATUS "Download private date repository is available to add: -DZombieData_PrivateRepo_SSH=1")
+message(STATUS "Download private date repository is available to add: -DZombieData_PrivateRepo_HTTPS=1")
+option(ZombieData_PrivateRepo_SSH "Add ZombieData_PrivateRepo_SSH to project." OFF)
+option(ZombieData_PrivateRepo_HTTPS "Add ZombieData_PrivateRepo_HTTPS to project." OFF)
+
+if (ZombieData_PrivateRepo_SSH OR ZombieData_PrivateRepo_HTTPS)
+	set(ZombieData_PrivateRepo OFF)
+	set(ZombieData_PrivateRepo_HTTPS "https://github.com/mwthinker/ZombieData.git")
+	if (ZombieData_PrivateRepo_SSH)
+		set(ZombieData_PrivateRepo_SSH "git@github.com:mwthinker/Zombie.git")
+	endif ()
 	# Load data.
 	FetchContent_Declare(ZombieData
 		GIT_REPOSITORY
-			https://github.com/mwthinker/ZombieData.git
+			${ZombieData_PrivateRepo_SSH}
 		GIT_TAG
 			28fa5d69bb07b8963f9c7d2d65434350bd36d1db
 	)
@@ -42,4 +50,4 @@
 		SOURCE_DIR
 			ZombieData_SOURCE_DIR
 	)
-endif()
+endif ()


Superproject improvements

Superproject improvements

--- SubProject.cmake
+++ SubProject.cmake
@@ -92,7 +92,8 @@
         include_directories(${${NAME}_INCLUDE_DIRS})
       endif()
     endif()
-    if(${name}_IS_SUBPROJECT OR __included)
+    get_property(__included GLOBAL PROPERTY ${name}_IS_SUBPROJECT)
+    if(__included)
       list(APPEND __subprojects "${name} ${url} ${tag}")
     endif()
   endif()


Use exclude option of ament_execute_extensions in ament_lint_auto (#133)

Signed-off-by: Juan Pablo Samper <2a85767837cb6bdeb6ab9df34ca4358d2f954e5d@apex.ai>

--- ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake
+++ ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake
@@ -12,4 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-ament_execute_extensions(ament_lint_auto)
+# Use the AMENT_LINT_AUTO_EXCLUDE variable to exclude linter packages from
+# running using the ament_lint_auto hook.
+# It is still possible, however, to use the linter by calling it explicitly.
+#
+# :variable AMENT_LINT_AUTO_EXCLUDE: List of strings (package names)
+
+ament_execute_extensions(ament_lint_auto EXCLUDE "${AMENT_LINT_AUTO_EXCLUDE}")


Make the previous commit generic due to split 64 folders on windows

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -49,11 +49,11 @@
 		file (COPY ${CMAKE_CURRENT_SOURCE_DIR}/msconfig DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 	endif()

-    # means user did not specify, so change the default.
-    if ( ${CMAKE_INSTALL_PREFIX} STREQUAL "C:/Program Files/CONDOR" )
-        # mimic *nix for consistency
-        set( CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/release_dir")
-    endif()
+	# means user did not specify, so change the default.
+	if ( ${CMAKE_INSTALL_PREFIX} MATCHES "Program Files" )
+		# mimic *nix for consistency
+		set( CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/release_dir")
+	endif()

 	dprint("TODO FEATURE-> Z:TANNENBA:TJ:TSTCLAIR Update registry + paths to use this prefixed debug loc (test_install)")


cmake: Align the DT build logs with Kconfig

Align how DT and Kconfig print log output to be more consistent.

For instance, Kconfig does not state which header file it generates,
so we remove this from DT.

Also, Kconfig states which sources it uses, which is useful to know
when there is a build failure, so we align with Kconfig by printing
the DT source and overlay files.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -56,8 +56,6 @@
   endforeach()
 endforeach()

-message(STATUS "Generating zephyr/include/generated/generated_dts_board.h")
-
 if(CONFIG_HAS_DTS)

   if(DTC_OVERLAY_FILE)
@@ -69,10 +67,19 @@
       )
   endif()

+  set(i 0)
   unset(DTC_INCLUDE_FLAG_FOR_DTS)
   foreach(dts_file ${dts_files})
     list(APPEND DTC_INCLUDE_FLAG_FOR_DTS
          -include ${dts_file})
+
+	if(i EQUAL 0)
+	  message(STATUS "Loading ${dts_file} as base")
+	else()
+	  message(STATUS "Overlaying ${dts_file}")
+	endif()
+
+	math(EXPR i "${i}+1")
   endforeach()

   # TODO: Cut down on CMake configuration time by avoiding


merging libabi

merging libabi

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -1,5 +1,14 @@
 find_package(JsonCPP REQUIRED)
 find_package(Boost COMPONENTS system thread REQUIRED)
+find_package(CryptoPP)
+
+
+if(CRYPTOPP_INCLUDE_DIR)
+    set(ABI_ENALED TRUE)
+    add_definitions(-D__ABI_ENABLED__)
+    add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/abi)
+endif()
+

 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/CopyHeaders.cmake)

@@ -25,8 +34,37 @@

 CopyHeaders()

+if(ABI_ENALED)
+    include_directories(${CMAKE_CURRENT_BINARY_DIR}/abi/include)
+endif()
+

 add_library(ethrpc STATIC ${SOURCES})
+
+if(ABI_ENALED)
+    add_dependencies(ethrpc abi)
+
+    if (WIN32 AND NOT MINGW)
+        set_property (TARGET ethrpc APPEND PROPERTY STATIC_LIBRARY_FLAGS $<TARGET_OBJECTS:abi>)
+    elseif (${CMAKE_GENERATOR} STREQUAL "Xcode")
+        set_property (TARGET ethrpc APPEND PROPERTY STATIC_LIBRARY_FLAGS $<TARGET_OBJECTS:abi>)
+    else()
+        set(LIB_OBJ_DIR ${CMAKE_CURRENT_BINARY_DIR}/obj)
+        set(ETHRPC_LIBRARY_PATH $<TARGET_FILE:ethrpc>)
+        set(ABI_LIBRARY_PATH $<TARGET_FILE:abi>)
+        make_directory (${LIB_OBJ_DIR})
+
+        ADD_CUSTOM_COMMAND(TARGET ethrpc
+              POST_BUILD
+              COMMAND echo "packing libethrpc.a"
+              COMMAND ${CMAKE_AR} x  ${ABI_LIBRARY_PATH} WORKING_DIRECTORY ${LIB_OBJ_DIR}
+              COMMAND ${CMAKE_AR} x  ${ETHRPC_LIBRARY_PATH} WORKING_DIRECTORY ${LIB_OBJ_DIR}
+              COMMAND ${CMAKE_AR} rcs  ${ETHRPC_LIBRARY_PATH} ${LIB_OBJ_DIR}/*.o
+              COMMAND rm -fr ${LIB_OBJ_DIR}
+        )
+    endif ()
+    file(COPY ${CMAKE_CURRENT_BINARY_DIR}/abi/include/abi DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/ethrpc)
+endif()

 install(DIRECTORY ${PROJECT_BINARY_DIR}/include/ethrpc DESTINATION include)
 install (TARGETS ethrpc ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)


build: Clean up the find-module for ragel

--- cmake/Findragel.cmake
+++ cmake/Findragel.cmake
@@ -24,6 +24,8 @@
   ragel_RAGEL_EXECUTABLE
   ragel)

+mark_as_advanced (ragel_RAGEL_EXECUTABLE)
+
 set (_ragel_version_pattern "[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?")

 if (ragel_RAGEL_EXECUTABLE)
@@ -39,8 +41,5 @@
 endif ()

 find_package_handle_standard_args (ragel
-  FOUND_VAR ragel_FOUND
   REQUIRED_VARS ragel_RAGEL_EXECUTABLE
   VERSION_VAR ragel_VERSION)
-
-mark_as_advanced (ragel_RAGEL_EXECUTABLE)


[cmake] define GRIDTYPE and GRIDDIM unconditionally

--- cmake/GridUtils.cmake
+++ cmake/GridUtils.cmake
@@ -9,15 +9,8 @@
 	"2" CACHE STRING
 	"GRIDDIM" )

-if(${GRIDTYPE} MATCHES "YASPGRID")
-	add_definitions( "-D${GRIDTYPE}" )
-	add_definitions( "-DGRIDDIM=${GRIDDIM}" )
-endif(${GRIDTYPE} MATCHES "YASPGRID")
-
-if(${GRIDTYPE} MATCHES "SGRID")
-	add_definitions( "-D${GRIDTYPE}" )
-	add_definitions( "-DGRIDDIM=${GRIDDIM}" )
-endif(${GRIDTYPE} MATCHES "SGRID")
+add_definitions( "-D${GRIDTYPE}" )
+add_definitions( "-DGRIDDIM=${GRIDDIM}" )

 set( ENABLE_UG OFF )
 if( ${GRIDTYPE} MATCHES "UGGRID" )
@@ -30,8 +23,6 @@
   # because those listed in lubug.pc are wrong
   set( GRIDLIBS ugS2 ugS3 devS m )
   add_definitions( "-DENABLE_UG=1" )
-	add_definitions( "-D${GRIDTYPE}" )
-	add_definitions( "-DGRIDDIM=${GRIDDIM}" )
 endif( ${GRIDTYPE} MATCHES "UGGRID" )

 SET( ENABLE_ALUGRID OFF )
@@ -48,8 +39,6 @@
 		include_sys_dir( ${ALUGRID_BASE_PATH}/include/parallel )
 	endif( ENABLE_MPI )
 	add_definitions( "-DENABLE_ALUGRID=1" )
-	add_definitions( "-D${GRIDTYPE}" )
-	add_definitions( "-DGRIDDIM=${GRIDDIM}" )
 endif( ${GRIDTYPE} MATCHES "ALUGRID" )

 #SET( ENABLE_ALBERTA OFF )


Revert part of r240623 (Enable memory sanitizer for PPC64) because the
buildbots are still failing in check-ubsan.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -251,8 +251,7 @@
   x86_64 i386 i686 powerpc64 powerpc64le arm mips mipsel mips64 mips64el)
 filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
 filter_available_targets(LSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
-filter_available_targets(MSAN_SUPPORTED_ARCH x86_64 mips64 mips64el
-  powerpc64 powerpc64le)
+filter_available_targets(MSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
 filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64
   mipsel mips64el aarch64 powerpc64 powerpc64le)
 filter_available_targets(TSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)


remove questionable compiler option

remove questionable compiler option

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -7,7 +7,7 @@
         require_cpp14()

         # set flags
-        set(CMAKE_CXX_FLAGS                     "-std=c++14 -pedantic -ffunction-sections")
+        set(CMAKE_CXX_FLAGS                     "-std=c++14 -pedantic")
 if(NANO_WITH_TUNE_NATIVE)
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
 endif()


Don't require Qt5Gui just yet.

Don't require Qt5Gui just yet.

--- cmake/deps.cmake
+++ cmake/deps.cmake
@@ -15,7 +15,6 @@
 set(CMAKE_INCLUDE_CURRENT_DIR ON)

 find_package(Qt5Core REQUIRED)
-find_package(Qt5Gui REQUIRED)

 # OpenCV
 find_package(OpenCV REQUIRED)


cmake: external_dependencies: fix fmt and spdlog on Ubuntu 20.04

--- cmake/external_dependencies.cmake
+++ cmake/external_dependencies.cmake
@@ -1,9 +1,10 @@
+
 include(CheckCXXSourceCompiles)
 include(FetchContent)

 function(setup_library SOURCE_TO_TEST)
     set(boolArgs HEADER_ONLY)
-    set(oneValueArgs NAME GIT_REPOSITORY GIT_TAG TEST_DEFINITIONS TEST_LINK_LIBS)
+    set(oneValueArgs NAME CXX_FLAGS GIT_REPOSITORY GIT_TAG TEST_DEFINITIONS TEST_LINK_LIBS)
     set(multiValueArgs WHEN)
     cmake_parse_arguments(LIB_SETUP "${boolArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

@@ -36,6 +37,7 @@
         set(SRCDIR "${LIB_SETUP_NAME}_SOURCE_DIR")
         set(BINDIR "${LIB_SETUP_NAME}_BINARY_DIR")

+        string(APPEND CMAKE_CXX_FLAGS " ${LIB_SETUP_CXX_FLAGS}")
         add_subdirectory(${${SRCDIR}} ${${BINDIR}} EXCLUDE_FROM_ALL)
         message("-- Using external ${LIB_SETUP_NAME}")
     endif()
@@ -72,6 +74,9 @@
 function(setup_fmt)
     set(CHECK_SOURCE "#include <fmt/format.h>
         #include <string_view>
+
+        template<typename... Args>
+        using format_string_t = fmt::format_string<Args...>; // required by spdlog

         int main()
         {
@@ -152,6 +157,9 @@
     set(SPDLOG_FMT_EXTERNAL OFF)
     set(SPDLOG_FMT_EXTERNAL_HO ON)
     set(CHECK_SOURCE "#include <spdlog/spdlog.h>
+        #if !__has_include(<spdlog/cfg/env.h>) // required by verboseness level setting
+        #error libspdlog 1.9 or newer is required
+        #endif
         int main()
         {
             spdlog::info(\"hello\");
@@ -169,6 +177,7 @@
                   GIT_TAG v1.x
                   TEST_DEFINITIONS -DSPDLOG_FMT_EXTERNAL
                   TEST_LINK_LIBS ${FMT_TARGET_NAME}
+                  CXX_FLAGS "-Wno-attributes"
                   )
 endfunction()


start updating TelepathyQt to use newer farstream

--- cmake/modules/FindFarstream.cmake
+++ cmake/modules/FindFarstream.cmake
@@ -23,9 +23,9 @@
     # in the find_path() and find_library() calls
     find_package(PkgConfig)
     if (FARSTREAM_MIN_VERSION)
-        PKG_CHECK_MODULES(PC_FARSTREAM farstream-0.1>=${FARSTREAM_MIN_VERSION})
+        PKG_CHECK_MODULES(PC_FARSTREAM farstream-0.2>=${FARSTREAM_MIN_VERSION})
     else (FARSTREAM_MIN_VERSION)
-        PKG_CHECK_MODULES(PC_FARSTREAM farstream-0.1)
+        PKG_CHECK_MODULES(PC_FARSTREAM farstream-0.2)
     endif (FARSTREAM_MIN_VERSION)
     set(FARSTREAM_DEFINITIONS ${PC_FARSTREAM_CFLAGS_OTHER})
 endif (NOT WIN32)
@@ -34,10 +34,10 @@
    PATHS
    ${PC_FARSTREAM_INCLUDEDIR}
    ${PC_FARSTREAM_INCLUDE_DIRS}
-   PATH_SUFFIXES farstream-0.1
+   PATH_SUFFIXES farstream-0.2
    )

-find_library(FARSTREAM_LIBRARIES NAMES farstream-0.1
+find_library(FARSTREAM_LIBRARIES NAMES farstream-0.2
    PATHS
    ${PC_FARSTREAM_LIBDIR}
    ${PC_FARSTREAM_LIBRARY_DIRS}


Accept a pattern for windows_dll spec in cmake builds

This is necessary for OpenSSL library for example because it could be libssl-1.1.dll or libssl-1.1-x64.dll

--- cmake/ThirdPartyDependenciesMacros.cmake
+++ cmake/ThirdPartyDependenciesMacros.cmake
@@ -170,7 +170,7 @@
         set(InstallLibraryGlobPatterns ${ARTIFACT_KIND_MAC_LIBRARIES_SYMLINK_PATTERNS})
     elseif(WIN32)
         set(InstallLibrarySourceFolder bin)
-        set(InstallLibraryFileNames ${ARTIFACT_KIND_WINDOWS_DLLS})
+        set(InstallLibraryGlobPaterns ${ARTIFACT_KIND_WINDOWS_DLLS})
     else()
         set(InstallLibraryFileNames ${ARTIFACT_KIND_LINUX_LIBRARIES})
         set(InstallLibraryGlobPatterns ${ARTIFACT_KIND_LINUX_LIBRARIES_SYMLINK_PATTERNS})


bug fixed in regular expression for dereferencing links

--- FindJAVA.cmake
+++ FindJAVA.cmake
@@ -75,7 +75,7 @@
                         STRING( REGEX MATCH " symbolic link to " java_link_found "${out_tmp}" )
                         IF( java_link_found )
                             # get the file to where the link points to
-                            STRING( REGEX REPLACE ".* symbolic link to (.*)" "\\1" out_regex "${out_tmp}" )
+                            STRING( REGEX REPLACE ".* symbolic link to[^/]+([^'`]+).*" "\\1" out_regex "${out_tmp}" )
                             IF( NOT JAVA_FIND_QUIETLY )
                                 MESSAGE( STATUS "Java binary ${java_bin} is a symbolic link to ${out_regex}" )
                             ENDIF()


Update file for Boost 1.63

Update file for Boost 1.63

--- cmake-local/BoostTargets.cmake
+++ cmake-local/BoostTargets.cmake
@@ -23,8 +23,8 @@
 endif()

 find_package(Boost ${OSVR_MIN_BOOST} COMPONENTS ${required_boost_components} REQUIRED)
-if(Boost_VERSION GREATER 106200)
-    # Current max code-reviewed version: Boost 1.62
+if(Boost_VERSION GREATER 106300)
+    # Current max code-reviewed version: Boost 1.63
     # When this is updated - source code must also be updated!
     message(SEND_ERROR "Using an unreviewed Boost version - inspect the Boost Interprocess release notes/changelog/diffs to see if any ABI breaks took place as they may affect client/server interoperability.")
     message(SEND_ERROR "The corresponding source file to update is src/osvr/Common/IPCRingBuffer.cpp")


cmake: Document GSSAPI_FLAVOR_MIT and GSSAPI_FLAVOR_HEIMDAL.

--- cmake/Modules/FindGSSAPI.cmake
+++ cmake/Modules/FindGSSAPI.cmake
@@ -5,6 +5,8 @@
 #  GSSAPI_ROOT_DIR - Set this variable to the root installation of GSSAPI
 #
 # Read-Only variables:
+#  GSSAPI_FLAVOR_MIT - set to TURE if MIT Kerberos has been found
+#  GSSAPI_FLAVOR_HEIMDAL - set to TRUE if Heimdal Keberos has been found
 #  GSSAPI_FOUND - system has GSSAPI
 #  GSSAPI_INCLUDE_DIR - the GSSAPI include directory
 #  GSSAPI_LIBRARIES - Link these to use GSSAPI


Update FindOpenCL.cmake

Update FindOpenCL.cmake

Add path to ROCm OpenCL as possible location in cmake script

--- cmake/Modules/FindOpenCL.cmake
+++ cmake/Modules/FindOpenCL.cmake
@@ -37,6 +37,7 @@
   /opt/intel/opencl
   /usr
   /usr/local
+  /opt/rocm/opencl
 )

 # Finds the include directories


remove the OpenCL Dir finding in CMake

remove the OpenCL Dir finding in CMake

--- cmake/OpenCVDetectOpenCL.cmake
+++ cmake/OpenCVDetectOpenCL.cmake
@@ -4,7 +4,7 @@
   set(OPENCL_INCLUDE_DIR "" CACHE STRING "OpenCL include directory")
   mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY)
 else(APPLE)
-  find_package(OpenCL QUIET)
+  #find_package(OpenCL QUIET)

   if (NOT OPENCL_FOUND)
     find_path(OPENCL_ROOT_DIR


Linking hdf5 in trusty

Linking hdf5 in trusty

Former-commit-id: 6ba7dac859d8a5c6d187795b6c2ab87cac903d23

--- cmake_modules/Fetch_HDF5.cmake
+++ cmake_modules/Fetch_HDF5.cmake
@@ -40,6 +40,16 @@
     set(HDF5_CXX_LIBRARIES     ${HDF5_CXX_LIBRARY_hdf5_cpp})
     set(HDF5_HL_CXX_LIBRARIES  ${HDF5_CXX_LIBRARY_hdf5_hl_cpp})

+
+    set(HDF5_LINKER_FLAGS ${HDF5_CXX_LIBRARY_NAMES})
+    list(REMOVE_ITEM HDF5_LINKER_FLAGS hdf5_cpp hdf5)
+
+    add_definitions(${HDF5_DEFINITIONS})
+    # Add convenience libraries
+    add_library(hdf5::hdf5           STATIC IMPORTED)
+    add_library(hdf5::hdf5_hl        STATIC IMPORTED)
+    add_library(hdf5::hdf5_cpp       STATIC IMPORTED)
+    add_library(hdf5::hdf5_hl_cpp    STATIC IMPORTED)
     get_cmake_property(_variableNames VARIABLES)
     foreach (_variableName ${_variableNames})
         if("${_variableName}" MATCHES "HDF5" OR "${_variableName}" MATCHES "hdf5")
@@ -47,13 +57,6 @@
         endif()
     endforeach()

-    set(HDF5_LINKER_FLAGS $HDF5_CXX_LIBRARY_NAMES})
-    add_definitions(${HDF5_DEFINITIONS})
-    # Add convenience libraries
-    add_library(hdf5::hdf5           STATIC IMPORTED)
-    add_library(hdf5::hdf5_hl        STATIC IMPORTED)
-    add_library(hdf5::hdf5_cpp       STATIC IMPORTED)
-    add_library(hdf5::hdf5_hl_cpp    STATIC IMPORTED)
 else()
     message(STATUS "HDF5 will be installed into ${INSTALL_DIRECTORY}/hdf5 on first build.")


Fixed clang compile

Fixed clang compile

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -184,8 +184,13 @@
 		string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG     "${CMAKE_C_FLAGS_DEBUG}")
 		add_flags_cxx("-Wall -Wextra")

-		#we support non-IEEE 754 fpus so can make no guarentees about error
+		# we support non-IEEE 754 fpus so can make no guarentees about error
 		add_flags_cxx("-ffast-math")
+
+		# clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
+		if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+			add_flags_cxx("-D__extern_always_inline=inline")
+		endif()
 	endif()

 endmacro()


Add CTK and CTK external library dirs to the search path.

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -99,18 +99,16 @@
     list(APPEND _dir_candidates "${MITK_PMD_SDK_DIR}/plugins")
   endif()

+  if(MITK_USE_CTK)
+    list(APPEND _dir_candidates "${CTK_LIBRARY_DIRS}")
+    foreach(_ctk_library ${CTK_LIBRARIES})
+      if(${_ctk_library}_LIBRARY_DIRS)
+        list(APPEND _dir_candidates "${${_ctk_library}_LIBRARY_DIRS}")
+      endif()
+    endforeach()
+  endif()
+
   if(MITK_USE_BLUEBERRY)
-    # quick-fix for Bug 16606 : the CTK_RUNTIME_LIB_DIRS variable was removed
-    # so check if the variable is empty, otherwise compose the path to CTK starting
-    if(NOT "${CTK_RUNTIME_LIBRARY_DIRS}" STREQUAL "")
-      list(APPEND _dir_candidates ${CTK_RUNTIME_LIBRARY_DIRS})
-    else()
-      if(MBILOG_ENABLE_DEBUG_MESSAGES)
-        message(STATUS "CTK Runtime library not set, composing hard-coded path")
-        message(STATUS "Using candidate: ${CTK_DIR}/CTK-build/bin" )
-      endif()
-      list(APPEND _dir_candidates "${CTK_DIR}/CTK-build/bin" )
-    endif()
     if(DEFINED CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY)
       if(IS_ABSOLUTE "${CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY}")
         list(APPEND _dir_candidates "${CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY}")


CMake: Edition accumulation of LD_LIBRARY_PATH and PATH

--- salome_adm/cmake_files/FindSalomePaco.cmake
+++ salome_adm/cmake_files/FindSalomePaco.cmake
@@ -26,7 +26,7 @@
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Paco PACO_INCLUDE_DIRS 1)
 #MARK_AS_ADVANCED()

-IF(SALOMEPACO_FOUND)
+IF(SALOMEPACO_FOUND)
+  SALOME_ACCUMULATE_HEADERS(PACO_INCLUDE_DIRS)
   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PACO_LIBRARIES})
-  SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${PACO_LIBRARIES})
 ENDIF()


set SIRF_TAG to v3.1.0

set SIRF_TAG to v3.1.0

[travis skip]

--- version_config.cmake
+++ version_config.cmake
@@ -2,8 +2,8 @@
 # Author: Edoardo Pasca
 # Author: Benjamin A Thomas
 # Author: Kris Thielemans
-# Copyright 2017-2020 University College London
-# Copyright 2017-2020 Science Technology Facilities Council
+# Copyright 2017-2021 University College London
+# Copyright 2017-2021 Science Technology Facilities Council
 #
 # This file is part of the CCP SyneRBI (formerly PETMR) Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
 #
@@ -190,7 +190,7 @@
   set(DEFAULT_CCPi-Regularisation-Toolkit_TAG origin/master)

 else()
-  set(DEFAULT_SIRF_TAG "ce6c26c6de6ad6b11a57b4b12fc97170ef4ad26e")
+  set(DEFAULT_SIRF_TAG v3.1.0)

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )


Increase timeout for cppcheck runs. (#229)

On some platforms the cppcheck for the test_rclcpp package is hitting
the timeout. Bumping the timeout on those platforms shows that the build
takes about 130 seconds. So 180 should be sufficient room to grow
without raising it too high.

Signed-off-by: Steven! Ragnarök <4068f0880b399410602d694b3cc711c8a8f4727e@nuclearsandwich.com>

--- ament_cmake_cppcheck/cmake/ament_cppcheck.cmake
+++ ament_cmake_cppcheck/cmake/ament_cppcheck.cmake
@@ -55,7 +55,7 @@
   ament_add_test(
     "${ARG_TESTNAME}"
     COMMAND ${cmd}
-    TIMEOUT 120
+    TIMEOUT 180
     OUTPUT_FILE "${CMAKE_BINARY_DIR}/ament_cppcheck/${ARG_TESTNAME}.txt"
     RESULT_FILE "${result_file}"
     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"