Fix indentation.

Fix indentation.

Make DEFAULT_ALL_DEVICES ON prevail over DEFAULT_NO_DEVICES.

Implement DEFAULT_NO_QT_DEVICES and DEFAULT_NO_CAIRO_DEVICES.

svn path=/trunk/; revision=10092

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -40,26 +40,57 @@
 # and drivers.  This will be inspected to build up the set of drivers
 # to be compiled based on which devices are selected.

+option(DEFAULT_ALL_DEVICES
+  "Enable all devices by default (ON) or enable devices individually by default (OFF)"
+  OFF
+  )
+
 option(DEFAULT_NO_DEVICES
-"Disable all (ON) or enable individually (OFF) devices by default"
-OFF
-)
-
-option(DEFAULT_ALL_DEVICES
-"Enable all (ON) or enable individually (OFF) devices by default"
-OFF
-)
-
-if(DEFAULT_NO_DEVICES AND DEFAULT_ALL_DEVICES)
+  "Disable all devices by default (ON) or enable devices individually by default (OFF)"
+  OFF
+  )
+
+if(DEFAULT_ALL_DEVICES AND DEFAULT_NO_DEVICES)
   message(STATUS
-  "WARNING. DEFAULT_NO_DEVICES ON supersedes DEFAULT_ALL_DEVICES ON.")
-  set(DEFAULT_ALL_DEVICES OFF
-  CACHE BOOL
-  "Enable all (ON) or enable individually (OFF) devices by default"
-  FORCE
-  )
-endif(DEFAULT_NO_DEVICES AND DEFAULT_ALL_DEVICES)
-
+    "WARNING. DEFAULT_ALL_DEVICES ON supersedes DEFAULT_NO_DEVICES ON.")
+  set(DEFAULT_NO_DEVICES OFF
+    CACHE BOOL
+    "Disable all devices by default (ON) or enable devices individually by default (OFF)"
+    FORCE
+    )
+endif(DEFAULT_ALL_DEVICES AND DEFAULT_NO_DEVICES)
+
+option(DEFAULT_NO_QT_DEVICES
+  "Disable all qt devices by default (ON) or enable qt devices individually by default (OFF)"
+  OFF
+  )
+
+option(DEFAULT_NO_CAIRO_DEVICES
+  "Disable all cairo devices by default (ON) or enable cairo devices individually by default (OFF)"
+  OFF
+  )
+
+if(DEFAULT_ALL_DEVICES)
+  if(DEFAULT_NO_QT_DEVICES)
+    message(STATUS
+      "WARNING. DEFAULT_ALL_DEVICES ON supersedes DEFAULT_NO_QT_DEVICES ON.")
+    set(DEFAULT_NO_QT_DEVICES OFF
+      CACHE BOOL
+      "Disable all qt devices by default (ON) or enable qt devices individually by default (OFF)"
+      FORCE
+      )
+  endif(DEFAULT_NO_QT_DEVICES)
+
+  if(DEFAULT_NO_CAIRO_DEVICES)
+    message(STATUS
+      "WARNING. DEFAULT_ALL_DEVICES ON supersedes DEFAULT_NO_CAIRO_DEVICES ON.")
+    set(DEFAULT_NO_CAIRO_DEVICES OFF
+      CACHE BOOL
+      "Disable all cairo devices by default (ON) or enable cairo devices individually by default (OFF)"
+      FORCE
+      )
+  endif(DEFAULT_NO_CAIRO_DEVICES)
+endif(DEFAULT_ALL_DEVICES)

 # The DRIVERS_DEVICE_LIST defined below is a list of
 # <device>:<drive>:<enable_default> items.  <enable_default> should be
@@ -71,107 +102,111 @@
 # consumption, but this is not necessary.

 set(DRIVERS_DEVICE_LIST
-"aqt:aqt:ON"
-# memcairo does not work so turn it off by default.
-# The remaining cairo devices work well so turn them on by default.
-"memcairo:cairo:OFF"
-"extcairo:cairo:ON"
-"pdfcairo:cairo:ON"
-"pngcairo:cairo:ON"
-"pscairo:cairo:ON"
-"svgcairo:cairo:ON"
-"xcairo:cairo:ON"
-"cgm:cgm:ON"
-"dg300:dg300:OFF"
-"epsqt:qt:ON"
-"pdfqt:qt:ON"
-"qtwidget:qt:ON"
-"bmpqt:qt:ON"
-"jpgqt:qt:ON"
-"pngqt:qt:ON"
-"ppmqt:qt:ON"
-"tiffqt:qt:ON"
-"extqt:qt:ON"
-# Currently does not validate at http://validator.w3.org/, but that appears
-# to be a result of the validator being unfamiliar with SVG-1.2 (a draft
-# SVG standard that has not been finalized yet) which is produced
-# by Qt4.  The validation errors
-# referred to the version number (1.2) and one attribute (vector-effect)
-# which is clearly documented in the 1.2 draft.  Also, text offset issues
-# which were in SVG results produced by QT-4.4.3 are gone for QT-4.5.0.
-# Therefore, the conclusion is to enable svgqt by default.
-"svgqt:qt:ON"
-# gd related devices are not maintained.
-"gif:gd:OFF"
-"jpeg:gd:OFF"
-"png:gd:OFF"
-# gcw is not maintained.
-"gcw:gcw:OFF"
-# Do not implement gnome which is superseded by gcw
-#"gnome:gnome:OFF"
-# Produces ton of "Invalid pen selection." messages
-"hp7470:hpgl:OFF"
-# Produces ton of "Invalid pen selection." messages
-"hp7580:hpgl:OFF"
-# Segfaults.
-"lj_hpgl:hpgl:OFF"
-"imp:impress:OFF"
-# Default off because poorly maintained (colours are incorrect)
-# must use software fill, and must run as root.
-"linuxvga:linuxvga:OFF"
-"ljii:ljii:OFF"
-"ljiip:ljiip:OFF"
-"mem:mem:ON"
-"ntk:ntk:OFF"
-"null:null:ON"
-# glibc detects double free
-"pbm:pbm:OFF"
-"pdf:pdf:OFF"
-# (2007-09-01) As discussed on list, don't enable plmeta until we sort
-# out the known issues (e.g., strings, aspect ratio, and TrueType fonts).
-# This is going to take time/energy for some volunteer who has not volunteered
-# yet.... :-)
-"plmeta:plmeta:OFF"
-"ps:ps:ON"
-# No longer segfaults, but still default OFF because cleaner/better ways
-# (psttf and pscairo) to get modern fonts for postscript results.
-"pstex:pstex:OFF"
-"psttf:psttf:ON"
-"svg:svg:ON"
-"conex:tek:OFF"
-"mskermit:tek:OFF"
-"tek4010:tek:OFF"
-"tek4010f:tek:OFF"
-"tek4107:tek:OFF"
-"tek4107f:tek:OFF"
-"versaterm:tek:OFF"
-"vlt:tek:OFF"
-"xterm:tek:OFF"
-"tk:tk:ON"
-"tkwin:tkwin:ON"
-"wingcc:wingcc:ON"
-"wxwidgets:wxwidgets:ON"
-"wxpng:wxwidgets:OFF"
-"xfig:xfig:ON"
-"xwin:xwin:ON"
-)
-
-set(PRESET_DEFAULT OFF)
+  "aqt:aqt:ON"
+  # memcairo does not work so turn it off by default.
+  # The remaining cairo devices work well so turn them on by default.
+  "memcairo:cairo:OFF"
+  "extcairo:cairo:ON"
+  "pdfcairo:cairo:ON"
+  "pngcairo:cairo:ON"
+  "pscairo:cairo:ON"
+  "svgcairo:cairo:ON"
+  "xcairo:cairo:ON"
+  "cgm:cgm:ON"
+  "dg300:dg300:OFF"
+  "epsqt:qt:ON"
+  "pdfqt:qt:ON"
+  "qtwidget:qt:ON"
+  "bmpqt:qt:ON"
+  "jpgqt:qt:ON"
+  "pngqt:qt:ON"
+  "ppmqt:qt:ON"
+  "tiffqt:qt:ON"
+  "extqt:qt:ON"
+  # Currently does not validate at http://validator.w3.org/, but that appears
+  # to be a result of the validator being unfamiliar with SVG-1.2 (a draft
+  # SVG standard that has not been finalized yet) which is produced
+  # by Qt4.  The validation errors
+  # referred to the version number (1.2) and one attribute (vector-effect)
+  # which is clearly documented in the 1.2 draft.  Also, text offset issues
+  # which were in SVG results produced by QT-4.4.3 are gone for QT-4.5.0.
+  # Therefore, the conclusion is to enable svgqt by default.
+  "svgqt:qt:ON"
+  # gd related devices are not maintained.
+  "gif:gd:OFF"
+  "jpeg:gd:OFF"
+  "png:gd:OFF"
+  # gcw is not maintained.
+  "gcw:gcw:OFF"
+  # Do not implement gnome which is superseded by gcw
+  #"gnome:gnome:OFF"
+  # Produces ton of "Invalid pen selection." messages
+  "hp7470:hpgl:OFF"
+  # Produces ton of "Invalid pen selection." messages
+  "hp7580:hpgl:OFF"
+  # Segfaults.
+  "lj_hpgl:hpgl:OFF"
+  "imp:impress:OFF"
+  # Default off because poorly maintained (colours are incorrect)
+  # must use software fill, and must run as root.
+  "linuxvga:linuxvga:OFF"
+  "ljii:ljii:OFF"
+  "ljiip:ljiip:OFF"
+  "mem:mem:ON"
+  "ntk:ntk:OFF"
+  "null:null:ON"
+  # glibc detects double free
+  "pbm:pbm:OFF"
+  "pdf:pdf:OFF"
+  # (2007-09-01) As discussed on list, don't enable plmeta until we sort
+  # out the known issues (e.g., strings, aspect ratio, and TrueType fonts).
+  # This is going to take time/energy for some volunteer who has not volunteered
+  # yet.... :-)
+  "plmeta:plmeta:OFF"
+  "ps:ps:ON"
+  # No longer segfaults, but still default OFF because cleaner/better ways
+  # (psttf and pscairo) to get modern fonts for postscript results.
+  "pstex:pstex:OFF"
+  "psttf:psttf:ON"
+  "svg:svg:ON"
+  "conex:tek:OFF"
+  "mskermit:tek:OFF"
+  "tek4010:tek:OFF"
+  "tek4010f:tek:OFF"
+  "tek4107:tek:OFF"
+  "tek4107f:tek:OFF"
+  "versaterm:tek:OFF"
+  "vlt:tek:OFF"
+  "xterm:tek:OFF"
+  "tk:tk:ON"
+  "tkwin:tkwin:ON"
+  "wingcc:wingcc:ON"
+  "wxwidgets:wxwidgets:ON"
+  "wxpng:wxwidgets:OFF"
+  "xfig:xfig:ON"
+  "xwin:xwin:ON"
+  )

 if(DEFAULT_ALL_DEVICES)
   set(DEFAULT ON)
   set(PRESET_DEFAULT ON)
-endif(DEFAULT_ALL_DEVICES)
-
-if(DEFAULT_NO_DEVICES)
+elseif(DEFAULT_NO_DEVICES)
   set(DEFAULT OFF)
   set(PRESET_DEFAULT ON)
-endif(DEFAULT_NO_DEVICES)
+else(DEFAULT_ALL_DEVICES)
+  set(PRESET_DEFAULT OFF)
+endif(DEFAULT_ALL_DEVICES)

 foreach(DRIVERS_DEVICE ${DRIVERS_DEVICE_LIST})
   string(REGEX REPLACE "^(.*):.*:.*$" "\\1" DEVICE ${DRIVERS_DEVICE})
   if(NOT PRESET_DEFAULT)
-    string(REGEX REPLACE "^.*:.*:(.*)$" "\\1" DEFAULT ${DRIVERS_DEVICE})
+    if(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
+      set(DEFAULT OFF)
+    elseif(DEFAULT_NO_CAIRO_DEVICES AND DEVICE MATCHES ".*cairo.*")
+      set(DEFAULT OFF)
+    else(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
+      string(REGEX REPLACE "^.*:.*:(.*)$" "\\1" DEFAULT ${DRIVERS_DEVICE})
+    endif(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
   endif(NOT PRESET_DEFAULT)
   option(PLD_${DEVICE} "Enable ${DEVICE} device" ${DEFAULT})
 endforeach(DRIVERS_DEVICE)


Fixed extra dir.

Fixed extra dir.

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -353,7 +353,7 @@
 	add_custom_command(OUTPUT romfs.o
 		COMMAND cmake -E remove_directory ${romfs_temp_dir}
 		COMMAND cmake -E copy_directory ${romfs_src_dir} ${romfs_temp_dir}
-		COMMAND cmake -E copy_directory ${extras_dir} ${romfs_temp_dir}
+		COMMAND cmake -E copy_directory ${extras_dir} ${romfs_temp_dir}/extras
 		COMMAND ${PYTHON_EXECUTABLE} ${romfs_autostart}
 			-a ${romfs_temp_dir}/init.d
 			-s ${romfs_temp_dir}/init.d/rc.autostart
@@ -361,7 +361,7 @@
 			--folder ${romfs_temp_dir}
 		COMMAND ${GENROMFS} -f ${CMAKE_CURRENT_BINARY_DIR}/romfs.bin
 			-d ${romfs_temp_dir} -V "NSHInitVol"
-		COMMAND cmake -E remove_directory ${romfs_temp_dir}
+		#COMMAND cmake -E remove_directory ${romfs_temp_dir}
 		COMMAND ${PYTHON_EXECUTABLE} ${bin_to_obj}
 			--ld ${LD} --c_flags ${CMAKE_C_FLAGS}
 			--c_compiler ${CMAKE_C_COMPILER}


Add the nsync library to the list of libraries passed to create_def_file.py.

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -914,6 +914,7 @@
         $<TARGET_FILE:pywrap_tensorflow_internal_static>
         $<TARGET_FILE:tf_protos_cc>
         $<TARGET_FILE:tf_python_protos_cc>
+	${nsync_STATIC_LIBRARIES}
     )

     set(pywrap_tensorflow_deffile "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/pywrap_tensorflow.def")


small fix to cap.cmake

small fix to cap.cmake

--- cmake/cap.cmake
+++ cmake/cap.cmake
@@ -9,11 +9,9 @@
     CMAKE_ARGS         -D CMAKE_INSTALL_PREFIX=${CAP_INSTALL_DIR}
                        -D CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                        -D CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+                       -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                        -D DEAL_II_INSTALL_DIR=${DEAL_II_INSTALL_DIR}
                        -D CAP_DATA_DIR=${CAP_DATA_SOURCE_DIR}
-                       -D NOWPAC_INSTALL_DIR=${NOWPAC_INSTALL_DIR}
-                       -D NLOPT_INSTALL_DIR=${NLOPT_INSTALL_DIR}
-                       -D EIGEN_INSTALL_DIR=${EIGEN_INSTALL_DIR}
     INSTALL_COMMAND    ""
     BUILD_IN_SOURCE    0
     DEPENDS            DEAL_II EIGEN


Drop the find_library part of the previous commit.  That turned out to
be required only because of a system installation screwup I had which
has since been fixed.

But retain the whitespace changes of the previous commit.

svn path=/trunk/; revision=12396

--- cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake
+++ cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake
@@ -87,15 +87,9 @@
 	#CMAKE_FLAGS "-DLINK_LIBRARIES=gphobos"
 	OUTPUT_VARIABLE OUTPUT)
     ELSE(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
-      find_library(PHOBOS_LIBRARY gphobos2)
-      if(PHOBOS_LIBRARY)
-	TRY_COMPILE(CMAKE_D_PHOBOS_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testDCompiler.d
-	  CMAKE_FLAGS "-DLINK_LIBRARIES=${PHOBOS_LIBRARY}"
-	  OUTPUT_VARIABLE OUTPUT)
-      else(PHOBOS_LIBRARY)
-	message(STATUS "Failed to find Phobos library")
-	set(CMAKE_D_PHOBOS_WORKS OFF)
-      endif(PHOBOS_LIBRARY)
+      TRY_COMPILE(CMAKE_D_PHOBOS_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testDCompiler.d
+	CMAKE_FLAGS "-DLINK_LIBRARIES=gphobos2"
+	OUTPUT_VARIABLE OUTPUT)
     ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   ELSE(CMAKE_COMPILER_IS_GDC)
     IF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")


Added path to sys.path to fix import problem with cython 0.14

--- cyitk/cyitkConfigureModule.cmake
+++ cyitk/cyitkConfigureModule.cmake
@@ -101,6 +101,8 @@
   #create __init__.py file
   set(CYITK_INIT_PY __init__.py)
   file(WRITE ${CYITK_MODULE_BINARY_DIR}/${CYITK_INIT_PY} "")
+  file(APPEND ${CYITK_MODULE_BINARY_DIR}/${CYITK_INIT_PY} "import sys\n")
+  file(APPEND ${CYITK_MODULE_BINARY_DIR}/${CYITK_INIT_PY} "sys.path.append('${CYITK_MODULE_BINARY_DIR}')\n")

   #set up targets and append entries in __init__.py
   foreach(CPP_FILE ${CYITK_IMAGE_SRCS})


Support lowercase characters in test names

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

--- deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake
+++ deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake
@@ -46,12 +46,17 @@
     # Query configuration and check whether we support it. Otherwise
     # set _define_test to FALSE:
     #
-    STRING(REGEX MATCHALL "WITH_([0-9]|[A-Z]|_)*=(ON|OFF)" _matches ${_test})
+    STRING(REGEX MATCHALL
+      "with_([0-9]|[a-z]|_)*=(on|off|yes|no|true|false)" _matches ${_test}
+      )
     FOREACH(_match ${_matches})
-      STRING(REGEX REPLACE "^(WITH_([0-9]|[A-Z]|_)*)=(ON|OFF)$" "\\1"
+      STRING(REGEX REPLACE
+        "^(with_([0-9]|[a-z]|_)*)=(on|off|yes|no|true|false)$" "\\1"
         _feature ${_match}
         )
-      STRING(REGEX MATCH "(ON|OFF)$" _boolean ${_match})
+      STRING(TOUPPER ${_feature} _feature)
+
+      STRING(REGEX MATCH "(on|off|yes|no|true|false)$" _boolean ${_match})

       IF( (DEAL_II_${_feature} AND NOT ${_boolean}) OR
           (NOT DEAL_II_${_feature} AND ${_boolean}) )


remove --default-stream per-thread nvcc flag

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

 # Release/Debug flags set by cmake. Such as -O3 -g -DNDEBUG etc.
 # So, don't set these flags here.
-LIST(APPEND CUDA_NVCC_FLAGS -std=c++11 --default-stream per-thread)
+LIST(APPEND CUDA_NVCC_FLAGS -std=c++11)
 LIST(APPEND CUDA_NVCC_FLAGS --use_fast_math)

 if(CMAKE_BUILD_TYPE  STREQUAL "Debug")


typo fix

typo fix

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -14,7 +14,7 @@
     NO_DEFAULT_PATH)

   # TODO: [tds] rosunit should define these macros, not us.  I guess.
-  find_program(ROSUNIT_SUMMARIZE_EXE summaraize_results.py
+  find_program(ROSUNIT_SUMMARIZE_EXE summarize_results.py
     PATHS ${CMAKE_SOURCE_DIR}/ros/tools/rosunit/scripts
     NO_DEFAULT_PATH)


Fix get_target_include_directories() function

The function just asked for target dependencies include dirs, missing
the include dirs of the target itself.

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -104,6 +104,7 @@
         return()
     endif()

+    get_target_common_property(includes ${TARGET} INCLUDE_DIRECTORIES)
     get_target_dependencies(${TARGET} dependencies)

     foreach(dep ${dependencies})


Add configuration entries for buffer alignments of low-level drivers

--- source/distortos-sources.cmake
+++ source/distortos-sources.cmake
@@ -1,11 +1,32 @@
 #
 # file: distortos-sources.cmake
 #
-# author: Copyright (C) 2018 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
+# author: Copyright (C) 2018-2019 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
 #
 # This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 # distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
+
+if(DEFINED DISTORTOS_SDMMCCARD_BUFFER_ALIGNMENTS)
+	distortosMax(DISTORTOS_SDMMCCARD_BUFFER_ALIGNMENT ${DISTORTOS_SDMMCCARD_BUFFER_ALIGNMENTS})
+	distortosSetFixedConfiguration(INTEGER
+			CONFIG_SDMMCCARD_BUFFER_ALIGNMENT
+			${DISTORTOS_SDMMCCARD_BUFFER_ALIGNMENT})
+endif(DEFINED DISTORTOS_SDMMCCARD_BUFFER_ALIGNMENTS)
+
+if(DEFINED DISTORTOS_SPIMASTER_BUFFER_ALIGNMENTS)
+	distortosMax(DISTORTOS_SPIMASTER_BUFFER_ALIGNMENT ${DISTORTOS_SPIMASTER_BUFFER_ALIGNMENTS})
+	distortosSetFixedConfiguration(INTEGER
+			CONFIG_SPIMASTER_BUFFER_ALIGNMENT
+			${DISTORTOS_SPIMASTER_BUFFER_ALIGNMENT})
+endif(DEFINED DISTORTOS_SPIMASTER_BUFFER_ALIGNMENTS)
+
+if(DEFINED DISTORTOS_UART_BUFFER_ALIGNMENTS)
+	distortosMax(DISTORTOS_UART_BUFFER_ALIGNMENT ${DISTORTOS_UART_BUFFER_ALIGNMENTS})
+	distortosSetFixedConfiguration(INTEGER
+			CONFIG_UART_BUFFER_ALIGNMENT
+			${DISTORTOS_UART_BUFFER_ALIGNMENT})
+endif(DEFINED DISTORTOS_UART_BUFFER_ALIGNMENTS)

 target_sources(distortos PRIVATE
 		${CMAKE_CURRENT_LIST_DIR}/fatalErrorHandler.cpp)


cmake: ignore two variables

cmake: ignore two variables

(showing up on my system)

--- scripts/cmake/ElektraCache.cmake
+++ scripts/cmake/ElektraCache.cmake
@@ -423,6 +423,8 @@
 	pkgcfg_lib__LIBSYSTEMD_PC_syst
 	pkgcfg_lib__OPENSSL_crypto
 	pkgcfg_lib__OPENSSL_ssl
+	pkgcfg_lib_PC_yaml-cpp_yaml-cpp
+	pkgcfg_lib__LIBSYSTEMD_PC_systemd
 	SWIG_DIR
 	SWIG_VERSION
 	gtest_build_samples


bugfix

bugfix

--- relic.cmake
+++ relic.cmake
@@ -29,5 +29,5 @@
 macro(relic_shared_library TARGET SOURCE LIBNAME)
   add_library(${TARGET}-shared SHARED IMPORTED)
   add_dependencies(${TARGET}-shared ${SOURCE})
-  set_target_properties(${TARGET}-shared PROPERTIES IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/deps/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${LIBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set_target_properties(${TARGET}-shared PROPERTIES IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/deps/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBNAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
 endmacro(relic_shared_library)


Auto-turning off PCH on Android build when using Clang compiler. This is a temporary workaround until the actual root cause that causes the build error is found and fixed.

--- CMake/Modules/CheckHost.cmake
+++ CMake/Modules/CheckHost.cmake
@@ -29,7 +29,7 @@
 #
 # non-WIN32:
 #  HAS_LIB64 (multilib capable)
-#  CCACHE_VERSION (when using Clang with ccache enabled)
+#  CCACHE_VERSION (when ccache is used)
 #
 # Neither here nor there:
 #  BASH_ON_WINDOWS
@@ -72,16 +72,17 @@
         endif ()
         set (BASH_ON_WINDOWS ${BASH_ON_WINDOWS} CACHE INTERNAL "Bash on Ubuntu on Windows")
     endif ()
-    # Test if PCH could be enabled in tandem with ccache when using Clang compiler toolchain
-    if ("$ENV{USE_CCACHE}" AND CMAKE_CXX_COMPILER_ID MATCHES Clang)
-        if (NOT DEFINED CCACHE_VERSION)
-            execute_process (COMMAND ccache --version COMMAND head -1 RESULT_VARIABLE CCACHE_EXIT_CODE OUTPUT_VARIABLE CCACHE_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-            string (REGEX MATCH "[^ .]+\\.[^.]+\\.[^ ]+" CCACHE_VERSION "${CCACHE_VERSION}")    # Stringify as it could be empty when an error has occured
-            if (CCACHE_EXIT_CODE EQUAL 0)
-               set (CCACHE_VERSION ${CCACHE_VERSION} CACHE INTERNAL "ccache version")
-           endif ()
-        endif ()
-        if (NOT CCACHE_VERSION VERSION_LESS 3.3.1)  # This is the last known bad version
+    if ("$ENV{USE_CCACHE}" AND NOT DEFINED CCACHE_VERSION)
+        execute_process (COMMAND ccache --version COMMAND head -1 RESULT_VARIABLE CCACHE_EXIT_CODE OUTPUT_VARIABLE CCACHE_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+        string (REGEX MATCH "[^ .]+\\.[^.]+\\.[^ ]+" CCACHE_VERSION "${CCACHE_VERSION}")    # Stringify as it could be empty when an error has occured
+        if (CCACHE_EXIT_CODE EQUAL 0)
+           set (CCACHE_VERSION ${CCACHE_VERSION} CACHE INTERNAL "ccache version")
+       endif ()
+    endif ()
+    # Temporary workaround - test if PCH could be enabled when using Clang compiler toolchain
+    if (CMAKE_CXX_COMPILER_ID MATCHES Clang)
+        # Turn off PCH when building on macOS host with ccache 3.3.1+ (the last known bad version) and when targeting Android platform
+        if ((APPLE AND NOT CCACHE_VERSION VERSION_LESS 3.3.1) OR ANDROID)
             set (URHO3D_PCH FALSE CACHE INTERNAL "" FORCE)
         endif ()
     endif ()


do not leak variables

do not leak variables

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -407,6 +407,7 @@
 	  mark_as_advanced(OGRE_${COMPONENT}_BINARY_REL OGRE_${COMPONENT}_BINARY_DBG)
     endif()
   endif()
+  unset(OGRE_${COMPONENT}_FIND_QUIETLY)
 endmacro()

 # look for Paging component


add -Werror to gcc settings

add -Werror to gcc settings

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -34,7 +34,7 @@
 # G++ (C++ compilation) specific settings
 if(CMAKE_COMPILER_IS_GNUCXX)
 	# default G++ compilation flags
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")

 	# Enable support for C++0x/C++11 for G++ if available
 	include(CheckCXXCompilerFlag)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


Fixed typo in config.h.cmake.

Fixed typo in config.h.cmake.

This closes ticket #24.

--- config.h.cmake
+++ config.h.cmake
@@ -68,7 +68,7 @@
 /* Define to 1 if you want to enable ZLIB */
 #cmakedefine WITH_LIBZ 1

-/* Define to 1 if you want to enable SSH1 */
+/* Define to 1 if you want to enable SFTP */
 #cmakedefine WITH_SFTP 1

 /* Define to 1 if you want to enable SSH1 */


Need to provide some defaults for the config.h.cmake file.

--- config.h.cmake
+++ config.h.cmake
@@ -2,10 +2,10 @@
 #cmakedefine HAVE_BCOPY 1

 /* Define to 1 if you have the <dlfcn.h> header file. */
-#cmakedefine HAVE_DLFCN_H
+#cmakedefine HAVE_DLFCN_H 1

 /* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H
+#cmakedefine HAVE_INTTYPES_H 1

 /* Define to 1 if the system has the type `long long'. */
 #cmakedefine HAVE_LONG_LONG 1
@@ -20,35 +20,35 @@
 #cmakedefine HAVE_MMAP 1

 /* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H
+#cmakedefine HAVE_STDINT_H 1

 /* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H
+#cmakedefine HAVE_STDLIB_H 1

 /* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H
+#cmakedefine HAVE_STRINGS_H 1

 /* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H
+#cmakedefine HAVE_STRING_H 1

 /* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H
+#cmakedefine HAVE_SYS_STAT_H 1

 /* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine HAVE_SYS_TYPES_H
+#cmakedefine HAVE_SYS_TYPES_H 1

 /* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine HAVE_UNISTD_H
+#cmakedefine HAVE_UNISTD_H 1

 /* The size of a `long', as computed by sizeof. */
 #cmakedefine SIZEOF_LONG @SIZEOF_LONG@

 /* Define to 1 if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS
+#cmakedefine STDC_HEADERS 1

 /* Define to empty if `const' does not conform to ANSI C. */
-#cmakedefine const
+#cmakedefine const @ANSI_CONST@

 /* Define as `__inline' if that's what the C compiler calls it, or to nothing
    if it is not supported. */
-#cmakedefine inline
+#cmakedefine inline @COMPILER_INLINE@


Add bx include

Add bx include

--- src/cmake/Modules/Findbgfx.cmake
+++ src/cmake/Modules/Findbgfx.cmake
@@ -1,10 +1,12 @@
 # Part of Project KARR
 # (c), released under BSD license

+find_path(bx_INCLUDE_DIR bx/bx.h
+          HINTS "../bx/include")
 find_path(bgfx_INCLUDE_DIR bgfx.h
           HINTS "../bgfx/include")
 find_library(bgfx_LIBRARY NAMES bgfxRelease
           HINTS "../bgfx/.build/linux64_gcc/bin/")
-set(bgfx_INCLUDE_DIRS ${bgfx_INCLUDE_DIR} )
+set(bgfx_INCLUDE_DIRS ${bgfx_INCLUDE_DIR} ${bx_INCLUDE_DIR} )
 set(bgfx_LIBRARIES ${bgfx_LIBRARY} )
 mark_as_advanced(bgfx_INCLUDE_DIR bgfx_LIBRARY )


Moving forward on ITK release branch towards 4.4.1

Change-Id: I924d86e097ebcad1ce5374860c9d549649041fe9

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -26,7 +26,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the
-set(ITK_TAG_COMMAND GIT_TAG v4.4.0
+set(ITK_TAG_COMMAND GIT_TAG 35b90133a793ffd884820e499175db19366fe627
  )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )


ENH: Prefer http over git protocol which is sometimes blocked on restricted networks

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -32,7 +32,7 @@

 set(proj ITK)  ## Use ITK convention of calling it ITK
-set(ITK_REPOSITORY git://itk.org/ITK.git)
+set(ITK_REPOSITORY http://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
 set(ITK_TAG_COMMAND GIT_TAG v4.8.2)


ENH: Prefer https vs http for ctest submission.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,7 @@
 set(CTEST_PROJECT_NAME "ITKExamples")
 set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")

-set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_METHOD "https")
 set(CTEST_DROP_SITE "open.cdash.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=Insight")
 set(CTEST_DROP_SITE_CDASH TRUE)


not ignoring cilkrts link warning anymore

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -26,7 +26,7 @@
 endif()

 list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning #1478")  # deprecated function used
-list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning #10237") # -lcilkrts linked in dynamically, static library not available")
+#list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning #10237") # -lcilkrts linked in dynamically, static library not available")
 list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "-Wextern-initializer")

 SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 200000)


refs #5833 skip helgrind test on darwin/others

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@51446 c7de825b-a66e-492c-adef-691d508d4ae1

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -56,6 +56,7 @@
   list(APPEND CTEST_CUSTOM_TESTS_IGNORE
     util/helgrind_test_circular_buffer
     util/helgrind_test_partitioned_counter
+    util/helgrind_test_partitioned_counter_5833
     ydb/helgrind_helgrind1.tdb
     ydb/helgrind_helgrind2.tdb
     ydb/helgrind_helgrind3.tdb


BUG: Update SmoothingRecursiveYvvGaussianFilter to fix CMake warning

The remote module SmoothingRecursiveYvvGaussianFilter was updated upstream
to use the new EXCLUDE_FROM_DEFAULT syntax. ITK will now fetch this
updated version.

Change-Id: I6c914e66fc1ebec787a5079b5b1d5b7ba6b8cde8

--- Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
+++ Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
@@ -2,5 +2,5 @@
 itk_fetch_module(SmoothingRecursiveYvvGaussianFilter
   "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: http://hdl.handle.net/10380/3425"
   GIT_REPOSITORY https://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter
-  GIT_TAG 0cc63e06fb4959a717527597d85dab8839d7176f
+  GIT_TAG d66cc15f97f98a6ecbf6e6ef8a5b52615ffb883e
   )


ExternalSource.cmake: external_git_repo(): Added support for an optional argument that allows the user to override the *_NAME and *_SRC_DIR variables set by the macro.

--- ExternalSource.cmake
+++ ExternalSource.cmake
@@ -99,14 +99,26 @@
 endmacro (external_source)

 # Define macro to set a number of variables per external git repo
+# Note: Besides these named args, this macro accepts the following optional args:
+#  OVERRIDE_NAME - Used to override the <package>_NAME and <package>_SRC_DIR variables set by this macro
 macro (external_git_repo ABBREV SRC_VERSION URL)
+	# Check for extra (optional) macro args.
+	set (extra_macro_args ${ARGN})
+	list(LENGTH extra_macro_args num_extra_args)

     # RELEASE builds are by default
     if (NOT ${ABBREV}_BUILD)
         set (${ABBREV}_BUILD "RELEASE")
     endif ()

+	# By default, package NAME and SRC_DIR are <package>-<version>
     set (external_source_name  ${ABBREV}-${SRC_VERSION})
+
+    # First optional macro arg overrides package NAME and SRC_DIR
+    if (${num_extra_args} GREATER 0)
+    	list(GET extra_macro_args 0 external_source_name)
+    endif ()
+
     message ("Setting external_git_repo: ${external_source_name}")

     # Append this external source name to our list of dependencies


added better android project name

added better android project name

--- cmake/CEGUIAndroid.cmake
+++ cmake/CEGUIAndroid.cmake
@@ -44,10 +44,6 @@
             SET(SCREEN_SIZE "|screenSize")
         endif()

-        if(OGRE_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER)
-            SET(GLES_OPTIMISER "-lglsl_optimizer -lmesa -lglcpp-library")
-        endif()
-
         SET(ANDROID_TARGET "android-${ANDROID_SDK_API_LEVEL}")

         SET(NDKOUT "${CMAKE_BINARY_DIR}/SampleBrowserNDK")
@@ -65,9 +61,6 @@
         endforeach()
         SET(JNI_SRC_FILES "${COMBINED_SOURCE_FILES_STRING}")
         SET(PKG_NAME "cegui.org.uk.browser")
-        SET(HAS_CODE "false")
-        SET(HEADERS "")
-        SET(SAMPLE_LDLIBS "")
         SET(ANDROID_SHARED_LIB "${CEGUI_TARGET_NAME}")
         file(COPY "${CMAKE_SOURCE_DIR}/datafiles/imagesets/ic_launcher.png" DESTINATION "${NDKOUT}/res/drawable")
         file(COPY "${CMAKE_SOURCE_DIR}/datafiles" DESTINATION "${NDKOUT}/assets")
@@ -88,7 +81,7 @@

         add_custom_command(
             TARGET ${ANDROID_PROJECT_TARGET} POST_BUILD COMMAND ${ANDROID_EXECUTABLE}
-            update project --name ${ANDROID_MOD_NAME} --subprojects --target ${ANDROID_TARGET} --path "${NDKOUT}" WORKING_DIRECTORY ${NDKOUT})
+            update project --name ${ANDROID_PROJECT_TARGET} --subprojects --target ${ANDROID_TARGET} --path "${NDKOUT}" WORKING_DIRECTORY ${NDKOUT})

         if(DEBUG)
             add_custom_command( TARGET ${ANDROID_PROJECT_TARGET} POST_BUILD COMMAND


Fixed a cmake typo

Fixed a cmake typo

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -191,7 +191,7 @@
 		COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --directory . --capture --output-file ${coverage_info}
 		COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --remove ${coverage_info} 'tests/*' '/usr/*' ${COVERAGE_IGNORE_LIST} --output-file ${coverage_cleaned}
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${coverage_cleaned}
-		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}
+#		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}

 		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 		COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."


follow with upstream update: added a wrapper function for file => source builder

--- cmake/FindTREEJUCE.cmake
+++ cmake/FindTREEJUCE.cmake
@@ -17,6 +17,16 @@
         ${TREEJUCE_SEARCH_PREFIX}/${CMAKE_INSTALL_BINDIR}
         ${TREEJUCE_SEARCH_PREFIX}/bin
 )
+
+function(TREEJUCE_WRAP_RESOURCE input_dir class_name)
+    add_custom_command(
+        OUTPUT
+            ${CMAKE_CURRENT_BINARY_DIR}/${class_name}.h
+            ${CMAKE_CURRENT_BINARY_DIR}/${class_name}.cpp
+        COMMAND
+            ${TREEJUCE_BIN_BUILDER} ${input_dir} ${CMAKE_CURRENT_BINARY_DIR} ${class_name}
+    )
+endfunction()

 #
 # find header directory


build: bump gRPC to 1.31.1

build: bump gRPC to 1.31.1

Signed-off-by: Lorenzo Fontana <0189fb5ac8a393aa741cf57f29cfe3228fcad081@gmail.com>

--- cmake/modules/gRPC.cmake
+++ cmake/modules/gRPC.cmake
@@ -110,8 +110,8 @@
     grpc
     DEPENDS openssl
     GIT_REPOSITORY https://github.com/grpc/grpc.git
-    GIT_TAG v1.27.0
-    GIT_SUBMODULES "third_party/protobuf third_party/zlib third_party/cares/cares third_party/abseil-cpp"
+    GIT_TAG v1.31.1
+    GIT_SUBMODULES "third_party/protobuf third_party/zlib third_party/cares/cares third_party/abseil-cpp third_party/re2"
     BUILD_IN_SOURCE 1
     BUILD_BYPRODUCTS ${GRPC_LIB} ${GRPCPP_LIB}
     INSTALL_COMMAND ""


updated pcl_find_ros.cmake to be compatible with the new stand-alone ROS messages; added missing rostime dependency

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

--- cmake/pcl_find_ros.cmake
+++ cmake/pcl_find_ros.cmake
@@ -1,13 +1,17 @@
 # Look for ROS.
-# This is a temporary and ugly hack.

+# A macro for linking the ROS libraries.  (Might not be necessary... todo: add this logic at the find_package(ROS))
 macro(link_ros_libs _target)
-    if(USE_ROS)
-        target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole rostime)
-    endif(USE_ROS)
+  if(ROS_FOUND)
+    # if find_package(ROS ...) found the required libraries, link against those
+    target_link_libraries(${_target} ${ROS_LIBRARIES})
+  elseif(USE_ROS)
+    # otherwise, we have to specify them here
+    target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole rostime)
+  endif()
 endmacro(link_ros_libs)

-
+# A macro for using rospack to find the ROS include path (required for pre-Fuerte ROS distributions)
 macro(get_ros_inc_path _dest _pkg)
     execute_process(COMMAND rospack find ${_pkg}
         RESULT_VARIABLE _res
@@ -18,25 +22,34 @@
     endif()
 endmacro(get_ros_inc_path)

-message(STATUS "ROS_ROOT $ENV{ROS_ROOT}")
+#todo: do we really need the next two lines?
 set(ROS_ROOT $ENV{ROS_ROOT})
 if(ROS_ROOT)
     option(USE_ROS "Integrate with ROS rather than using native files" OFF)
     message(STATUS "Found ROS; USE_ROS is ${USE_ROS}")
     if(USE_ROS)
-        set(_ros_pkgs std_msgs sensor_msgs roscpp_serialization cpp_common rostime
+        # Search for ROS
+        find_package(ROS COMPONENTS catkin roscpp_serialization std_msgs sensor_msgs rostime)
+	if (ROS_FOUND)
+	  # if find_package(ROS ...) found the required components, add their include directories
+          include_directories(${ROS_INCLUDE_DIRS})
+	else()
+          # otherwise, search for these particular packages the old hacky way
+          set(_ros_pkgs std_msgs sensor_msgs roscpp_serialization cpp_common rostime
             roscpp_traits roscpp rosconsole std_msgs rosbag topic_tools pcl)
-        set(_ros_paths)
-        foreach(_pkg ${_ros_pkgs})
+          set(_ros_paths)
+          foreach(_pkg ${_ros_pkgs})
             get_ros_inc_path(_path ${_pkg})
             list(APPEND _ros_paths ${_path})
-        endforeach(_pkg)
-        foreach(_path ${_ros_paths})
+          endforeach(_pkg)
+          foreach(_path ${_ros_paths})
             include_directories(${_path}/include
-                                ${_path}/msg_gen/cpp/include
-                                )
+              ${_path}/msg_gen/cpp/include
+              )
             link_directories(${_path}/lib)
-        endforeach(_path)
+          endforeach(_path)
+	endif()
+
         # use, i.e. don't skip the full RPATH for the build tree
         SET(CMAKE_SKIP_BUILD_RPATH  FALSE)


BUG: test for AVX compatibility to set MSVC optimization flags

This patch fixes #1114. Co-authored with @hjmjohnson.

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -137,23 +137,87 @@
   set(${cxx_warning_flags_var} "${CMAKE_CXX_WARNING_FLAGS}" PARENT_SCOPE)
 endfunction()

+# Check for the presence of AVX and figure out the flags to use for it.
+# Adapted from https://gist.github.com/UnaNancyOwen/263c243ae1e05a2f9d0e
+function(check_avx_flags avx_flags_var)
+  set(avx_flags_var)
+
+  include(CheckCXXSourceRuns)
+  set(_safe_cmake_required_flags "${CMAKE_REQUIRED_FLAGS}")
+  set(CMAKE_REQUIRED_FLAGS)
+
+  # Check AVX
+  if(MSVC_VERSION GREATER_EQUAL 1600)
+    set(CMAKE_REQUIRED_FLAGS "/arch:AVX") # set flags to be used in check_cxx_source_runs below
+  endif()
+  check_cxx_source_runs("
+    #include <immintrin.h>
+    int main()
+    {
+      __m256 a, b, c;
+      const float src[8] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
+      float dst[8];
+      a = _mm256_loadu_ps( src );
+      b = _mm256_loadu_ps( src );
+      c = _mm256_add_ps( a, b );
+      _mm256_storeu_ps( dst, c );
+
+      for( int i = 0; i < 8; i++ ){
+        if( ( src[i] + src[i] ) != dst[i] ){
+          return -1;
+        }
+      }
+
+      return 0;
+    }"
+    have_avx_extensions_var)
+
+  # Check AVX2
+  if(MSVC_VERSION GREATER_EQUAL 1800)
+    set(CMAKE_REQUIRED_FLAGS "/arch:AVX2") # set flags to be used in check_cxx_source_runs below
+  endif()
+  check_cxx_source_runs("
+    #include <immintrin.h>
+    int main()
+    {
+      __m256i a, b, c;
+      const int src[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+      int dst[8];
+      a =  _mm256_loadu_si256( (__m256i*)src );
+      b =  _mm256_loadu_si256( (__m256i*)src );
+      c = _mm256_add_epi32( a, b );
+      _mm256_storeu_si256( (__m256i*)dst, c );
+
+      for( int i = 0; i < 8; i++ ){
+        if( ( src[i] + src[i] ) != dst[i] ){
+          return -1;
+        }
+      }
+
+      return 0;
+    }"
+    have_avx2_extensions_var)
+
+  set(CMAKE_REQUIRED_FLAGS "${_safe_cmake_required_flags}")
+
+  # Set Flags
+  if(have_avx2_extensions_var AND MSVC_VERSION GREATER_EQUAL 1800)
+    set(avx_flags_var "${avx_flags_var} /arch:AVX2")
+  elseif(have_avx_extensions_var AND MSVC_VERSION GREATER_EQUAL 1600)
+    set(avx_flags_var "${avx_flags_var} /arch:AVX")
+  endif()
+endfunction()

 function(check_compiler_optimization_flags c_optimization_flags_var cxx_optimization_flags_var)
   set(${c_optimization_flags_var} "" PARENT_SCOPE)
   set(${cxx_optimization_flags_var} "" PARENT_SCOPE)

   if(MSVC)
-      set(InstructionSetOptimizationFlags
-         # https://docs.microsoft.com/en-us/cpp/build/reference/arch-x64?view=vs-2015
-         /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()
+    check_avx_flags(InstructionSetOptimizationFlags)
+    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)


Disable MSVC warnings for C code as well as C++

--- cmake/modules/QEverCloudGeneratorCompilerSettings.cmake
+++ cmake/modules/QEverCloudGeneratorCompilerSettings.cmake
@@ -12,5 +12,6 @@
   endif()
 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
   set(CMAKE_CXX_FLAGS "-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS ${CMAKE_CXX_FLAGS}")
+  set(CMAKE_C_FLAGS "-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")
   add_definitions("-DUNICODE -D_UNICODE")
 endif(CMAKE_COMPILER_IS_GNUCXX)


0.6.6 Mostly bug fixing

0.6.6 Mostly bug fixing

This version is released to match the current version of oro-server.

--- conf/LiboroVersion.cmake
+++ conf/LiboroVersion.cmake
@@ -4,4 +4,4 @@

 SET(CPACK_PACKAGE_VERSION_MAJOR "0")
 SET(CPACK_PACKAGE_VERSION_MINOR "6")
-SET(CPACK_PACKAGE_VERSION_PATCH "2")
+SET(CPACK_PACKAGE_VERSION_PATCH "6")


Remove adding fPIC flag in language options.

This is no longer needed since we use the CMake property.

Change-Id: I4bcf6e414ef9138d43176def23f0795d3b4b4ecb

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -7,17 +7,6 @@
 # Currently this will search for Python, Java, TCL, Ruby, C#, R
 # Additionally it give the option to wrap LUA.
 #
-
-
-# for wrapping to wrok correctly fPIC is needed on certain system.
-macro(check_PIC_flag Language)
-  string( TOUPPER ${Language} LANGUAGE )
-  if ( UNIX AND NOT APPLE AND WRAP_${LANGUAGE} )
-    if ( NOT ${CMAKE_CXX_FLAGS} MATCHES "-fPIC")
-      message ( FATAL_ERROR "${Language} wrapping requires CMAKE_CXX_FLAGS (or equivalent) to include -fPIC and ITK built with this flag." )
-    endif()
-  endif()
-endmacro()

 #
@@ -59,7 +48,6 @@
     )
 endif()
 option( WRAP_PYTHON "Wrap Python" ${WRAP_PYTHON_DEFAULT} )
-check_PIC_flag ( Python )

 find_package ( Java COMPONENTS Development Runtime QUIET )
 find_package ( JNI QUIET )
@@ -90,7 +78,6 @@

   )
 option ( WRAP_JAVA "Wrap Java" ${WRAP_JAVA_DEFAULT} )
-check_PIC_flag ( Java )

 find_package ( TCL QUIET )
 if ( ${TCL_FOUND} )
@@ -113,7 +100,6 @@
 else ( ${RUBY_FOUND} )
   set ( WRAP_RUBY_DEFAULT OFF )
 endif ( ${RUBY_FOUND} )
-check_PIC_flag ( Ruby )
 list( APPEND SITK_LANGUAGES_VARS
   RUBY_EXECUTABLE
   RUBY_INCLUDE_DIRS
@@ -122,7 +108,6 @@
   RUBY_FOUND
   RUBY_INCLUDE_PATH )
 option ( WRAP_RUBY "Wrap Ruby" ${WRAP_RUBY_DEFAULT} )
-check_PIC_flag ( Ruby )

 find_package( CSharp QUIET )
 if ( ${CSHARP_FOUND} AND NOT MINGW )


Retire ParseArguments (use CMakeParseArguments)

--- ParseArguments.cmake
+++ ParseArguments.cmake
@@ -1,36 +0,0 @@
-##
-# This is a helper Macro to parse optional arguments in Macros/Functions
-# It has been taken from the public CMake wiki.
-# See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and
-# licensing.
-##
-macro(parse_arguments prefix arg_names option_names)
-  set(DEFAULT_ARGS)
-  foreach(arg_name ${arg_names})
-    set(${prefix}_${arg_name})
-  endforeach(arg_name)
-  foreach(option ${option_names})
-    set(${prefix}_${option} FALSE)
-  endforeach(option)
-
-  set(current_arg_name DEFAULT_ARGS)
-  set(current_arg_list)
-  foreach(arg ${ARGN})
-    set(larg_names ${arg_names})
-    list(FIND larg_names "${arg}" is_arg_name)
-    if(is_arg_name GREATER -1)
-      set(${prefix}_${current_arg_name} ${current_arg_list})
-      set(current_arg_name ${arg})
-      set(current_arg_list)
-    else(is_arg_name GREATER -1)
-      set(loption_names ${option_names})
-      list(FIND loption_names "${arg}" is_option)
-      if(is_option GREATER -1)
-        set(${prefix}_${arg} TRUE)
-      else(is_option GREATER -1)
-        set(current_arg_list ${current_arg_list} ${arg})
-      endif(is_option GREATER -1)
-    endif(is_arg_name GREATER -1)
-  endforeach(arg)
-  set(${prefix}_${current_arg_name} ${current_arg_list})
-endmacro(parse_arguments)


Remove unrelated comments

Remove unrelated comments

--- Modules/ManageEnvironment.cmake
+++ Modules/ManageEnvironment.cmake
@@ -70,10 +70,6 @@
 #      Default: ${DATA_DIR}/${PROJECT_NAME}
 #    + PRJ_DOC_DIR: DocuFILEPATH = File chooser dialog.
 #      Default: ${DOC_DIR}/${PROJECT_NAME}-${PRJ_VER}
-
-# This module
-
-# This module supports software translation by:

 IF(NOT DEFINED _MANAGE_ENVIRONMENT_CMAKE_)
     SET(_MANAGE_ENVIRONMENT_CMAKE_ "DEFINED")


Added mingw support. (3)

Added mingw support. (3)


BUG: Use ITK_BUILD_DEFAULT_MODULES, rm FetchMGH, replace with ModuleMGH

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -117,6 +117,7 @@
       -DTK_BUILD_DEFAULT_MODULES:BOOL=ON
       -DKWSYS_USE_MD5:BOOL=ON # Required by SlicerExecutionModel
       -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
+      -DModule_MGHIO:BOOL=ON

       ${${proj}_DCMTK_ARGS}
       ${${proj}_WRAP_ARGS}


Upgrade spdlog to latest. Doesn't build yet

--- Superbuild/SpdLogExternal.cmake
+++ Superbuild/SpdLogExternal.cmake
@@ -30,7 +30,7 @@
 # git checkout -q will silence message about detached head (harmless).
 ExternalProject_Add(SpdLog_external
   GIT_REPOSITORY "https://github.com/gabime/spdlog"
-  GIT_TAG "v0.14.0"
+  GIT_TAG "v1.3.1"
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
   INSTALL_COMMAND ""


HDF5 shared library

HDF5 shared library

--- superbuild/External-HDF5.cmake
+++ superbuild/External-HDF5.cmake
@@ -7,7 +7,7 @@
     -DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE}
     -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF
     -DHDF5_BUILD_CPP_LIB:BOOL=ON
-    -DBUILD_SHARED_LIBS:BOOL=${HDF5_BUILD_SHARED}
+    -DBUILD_SHARED_LIBS:BOOL=ON
     -DHDF5_BUILD_TOOLS:BOOL=OFF
     -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DEPECENCIES_DIR}
   INSTALL_DIR ${INSTALL_DEPECENCIES_DIR}


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -14,6 +14,7 @@
 Comment[it]=Interfaccia utente personalizzata di configurazione account per account che usano il gestore di connessioni Sipe.
 Comment[nb]=Brukerflate for å sette opp egendefinerte kontoer ved bruk av sipe tilkoblingsbehandler.
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Sipe verbindingenbeheerder gebruiken.
+Comment[pl]=Własny interfejsu użytkownika konfiguracji kont dla kont wykorzystujących menadżera połączeń sipe.
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Sipe.
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Sipe.
 Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Sipe.
@@ -42,6 +43,7 @@
 Name[it]=Interfaccia utente di configurazione account Sipe
 Name[nb]=Brukerflate for å sette opp Sipe-konto
 Name[nl]=Gebruikersinterface voor Sipe accountconfiguratie
+Name[pl]=Interfejs użytkownika konfiguracji konta Sipe
 Name[pt]=Interface de Configuração de Contas do Sipe
 Name[pt_BR]=Interface de configuração de contas do Sipe
 Name[sk]=Používateľské rozhranie konfigurácie účtu Sipe


change binary package extension to .run

change binary package extension to .run

--- SuperBuild/CMake/External_package.cmake
+++ SuperBuild/CMake/External_package.cmake
@@ -1,11 +1,16 @@

 message(STATUS "Setup OTB Packaging...")

-set(PACKAGE_VERSION 5.0.0) #should take from cmake instead of hardcoded value
+set(PACKAGE_VERSION 5.0.0) #should take from cmake automatically or update with every release?
 set(PACKAGE_NAME OTB)
 set(PACKAGE_LONG_NAME OrfeoToolBox)

-set(ARCHIVE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}-Linux64)
+set(PACKAGE_ARCH Linux32)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(PACKAGE_ARCH Linux64)
+endif()
+
+set(ARCHIVE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}-${PACKAGE_ARCH})

 set(MAKESELF_SCRIPT ${CMAKE_BINARY_DIR}/PACKAGE-OTB/build/makeself.sh)

@@ -30,7 +35,7 @@
     COMMAND ${CMAKE_COMMAND}
     "${CMAKE_BINARY_DIR}/PACKAGE-OTB/src/PACKAGE-OTB"
     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/PACKAGE-OTB/build" )
-
+
   add_custom_target(PACKAGE-OTB-build
     COMMAND ${CMAKE_COMMAND}
     "--build" "${CMAKE_BINARY_DIR}/PACKAGE-OTB/build" "--target" "install"
@@ -38,10 +43,10 @@
     DEPENDS PACKAGE-OTB-configure)

   add_custom_target(PACKAGE-OTB
-    COMMAND ${MAKESELF_SCRIPT} "--target" "${ARCHIVE_NAME}" "${SB_INSTALL_PREFIX}/${ARCHIVE_NAME}" "${ARCHIVE_NAME}.bin" "${PACKAGE_LONG_NAME} ${PACKAGE_VERSION}" "./pkgsetup"
+    COMMAND ${MAKESELF_SCRIPT} "--target" "${ARCHIVE_NAME}" "${SB_INSTALL_PREFIX}/${ARCHIVE_NAME}" "${ARCHIVE_NAME}.run" "${PACKAGE_LONG_NAME} ${PACKAGE_VERSION}" "./pkgsetup"
     DEPENDS PACKAGE-OTB-build)
-
+
   add_custom_target(PACKAGE-OTB-clean
     COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_BINARY_DIR}/PACKAGE-OTB"
-    COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.bin"
+    COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.run"
     COMMAND ${CMAKE_COMMAND} "${CMAKE_BINARY_DIR}" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" )


FIX: PluginDependencies: Fix regular expression for filtering plugin libraries.

--- CMake/ctkMacroTargetLibraries.cmake
+++ CMake/ctkMacroTargetLibraries.cmake
@@ -49,7 +49,8 @@
     # Loop over all target library, if it does *NOT* start with "CTK",
     # let's resolve the variable to access its content
     FOREACH(target_library ${target_libraries})
-      IF(${target_library} MATCHES "^CTK[a-zA-Z0-9]+$")
+      IF(${target_library} MATCHES "^CTK[a-zA-Z0-9]+$" OR
+         ${target_library} MATCHES "^org_commontk_[a-zA-Z0-9_]+$")
         LIST(APPEND ${varname} ${target_library})
       ELSE()
         LIST(APPEND ${varname} "${${target_library}}")
@@ -179,7 +180,7 @@
 #
 MACRO(ctkMacroGetAllCTKTargetLibraries all_target_libraries varname)
   SET(re_ctklib "^(c|C)(t|T)(k|K)[a-zA-Z0-9]+$")
-  SET(re_ctkplugin "^org_commontk_[a-zA-Z0-9]+$")
+  SET(re_ctkplugin "^org_commontk_[a-zA-Z0-9_]+$")
   SET(_tmp_list)
   LIST(APPEND _tmp_list ${all_target_libraries})
   ctkMacroListFilter(_tmp_list re_ctklib OUTPUT_VARIABLE ${varname})


ENH: Updated macro ctkMacroGetAllCTKTargetLibraries to return also library startibg with 'ctk'.

--- CMake/ctkMacroTargetLibraries.cmake
+++ CMake/ctkMacroTargetLibraries.cmake
@@ -110,7 +110,7 @@
 # Extract all library names starting with CTK uppercase
 #
 MACRO(ctkMacroGetAllCTKTargetLibraries all_target_libraries varname)
-  SET(re_ctklib "^CTK[a-zA-Z0-9]+$")
+  SET(re_ctklib "^(c|C)(t|T)(k|K)[a-zA-Z0-9]+$")
   SET(_tmp_list)
   LIST(APPEND _tmp_list ${all_target_libraries})
   ctkMacroListFilter(_tmp_list re_ctklib OUTPUT_VARIABLE ${varname})


[INTERNAL] Allow the contrib package to be found by looking up an environment variable.

--- util/cmake/SeqAnContribs.cmake
+++ util/cmake/SeqAnContribs.cmake
@@ -69,6 +69,12 @@
 		  set (SEQAN_CONTRIB_BASE "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 		endif ()
 	  endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+    # Try to find in specific environment variable
+    if (DEFINED ENV{SEQAN_WIN_CONTRIB_DIRECTORY})
+        if (IS_DIRECTORY "$ENV{SEQAN_WIN_CONTRIB_DIRECTORY}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+            set (SEQAN_CONTRIB_BASE "$ENV{SEQAN_WIN_CONTRIB_DIRECTORY}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+        endif ()
+    endif ()
       # Try to fall back to x64 on C:\ (MinGW is only available as 32 bit).
       set (CONTRIB_ARCH "x64")
       if (NOT DEFINED SEQAN_CONTRIB_BASE)
@@ -114,4 +120,3 @@

     endforeach ()  # all contrib versions.
 endif (WIN32)
-


[Arm64] Correct cross/arm64/tryrun.cmake (#17293)

--- cross/arm64/tryrun.cmake
+++ cross/arm64/tryrun.cmake
@@ -55,7 +55,7 @@
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_COMPATIBLE_POW_EXITCODE
-     1
+     0
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_VALID_NEGATIVE_INF_POW_EXITCODE
@@ -107,7 +107,7 @@
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_PROCFS_CTL_EXITCODE
-     0
+     1
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_PROCFS_MAPS_EXITCODE


Revert "PKG: include libstdc++ for better compatibility"

This reverts commit f618e6c6c9af41b0a8ed6809aa750b8803045ed3.

--- SuperBuild/Packaging/PackageGlobals.cmake
+++ SuperBuild/Packaging/PackageGlobals.cmake
@@ -47,6 +47,7 @@
 set(LINUX_SYSTEM_DLLS
   libm.so
   libc.so
+  libstdc*
   libgcc_s.so
   librt.so
   libdl.so
@@ -133,8 +134,6 @@
   libpng12.so.0
   libexpat.so.1
   libfontconfig.so.1
-  libstdc\\+\\+.so.6
   )
-# libstdc++ is not actually part of GTK but we want to include it anyway in linux package

 set(ALLOWED_SYSTEM_DLLS ${GTK_LIB_LIST_1} ${GTK_LIB_LIST_2})


Case sensitivity issues.

Case sensitivity issues.

File exists as a sngle copy in windows but
corectly shows both files on Linux.

Manually deleted file on Linux side.

--- UDPReader/cmake/modules/FindALLEGRO.cmake
+++ UDPReader/cmake/modules/FindALLEGRO.cmake
@@ -1,38 +0,0 @@
-# FindAllegro
-# -----------
-#
-# Finds the Allegro 5 Library... or at least tries.
-#
-# This will define the following variables::
-#
-#   Allegro_FOUND    - True if the system has the Foo library
-#   Allegro_VERSION  - The version of the Foo library which was found
-#
-# and the following imported targets::
-#
-#   Allegro::AllegroMain   - The Allegro 5 library
-
-find_package(PkgConfig REQUIRED)
-pkg_check_modules(PC_Allegro QUIET IMPORTED_TARGET allegro-5)
-
-find_path(Allegro_INCLUDE_DIR
-	NAMES ./allegro5/allegro5.h ./allegro5/allegro.h
-	PATHS ${PC_Allegro_INCLUDE_DIRS}
-	PATH_SUFFIXES
-)
-
-find_library(Allegro_LIBRARY
-	NAMES allegro
-	PATH ${PC_Allegro_LIBRARY_DIRS}
-)
-
-set(Allegro_VERSION ${PC_ALLEGRO_VERSION})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Allegro
-	FOUND_VAR Allegro_FOUND
-	REQUIRED_VARS
-		Allegro_LIBRARY
-		Allegro_INCLUDE_DIR
-	VERSION_VAR Allegro_VERSION
-)


Fix typo. Hopefully fixes smoke/phonon build.
CCMAIL: kde-bindings@kde.org
CCMAIL: rdieter@math.unl.edu

svn path=/trunk/KDE/kdebindings/smoke/; revision=830038

--- phonon/generate.pl.cmake
+++ phonon/generate.pl.cmake
@@ -124,7 +124,7 @@
  );

 # Launch kalyptus
-chdir "../smoke/kde";
+chdir "../smoke/phonon";
 system "perl -I@kdebindings_SOURCE_DIR@/kalyptus @kdebindings_SOURCE_DIR@/kalyptus/kalyptus @ARGV --qt4 --globspace -fsmoke --name=phonon --init-modules=qt --classlist=@CMAKE_CURRENT_SOURCE_DIR@/classlist $macros --no-cache --outputdir=$outdir @headers @kdeheaders";
 my $exit = $? >> 8;
 exit $exit if ($exit);


use outsourced detection functions

use outsourced detection functions

--- modules/cblas.cmake
+++ modules/cblas.cmake
@@ -16,49 +16,15 @@
 #
 #   docopt: --cblas Detect and link to CBLAS [default: False].
 #   define: '-DENABLE_CBLAS=%s' % arguments['--cblas']
+#   fetch: https://raw.githubusercontent.com/scisoft/autocmake/master/modules/detect/detect_libraries.cmake
+#          https://raw.githubusercontent.com/scisoft/autocmake/master/modules/detect/detect_include_files.cmake

 option(ENABLE_CBLAS "Detect and link to CBLAS" OFF)

 if(ENABLE_CBLAS)
-    include(CheckIncludeFile)

-    function(_find_include_dir _names _hints _result)
-        find_path(_include_dir
-            NAMES ${_names}
-            HINTS ${_hints}
-        )
-        set(_all_include_files_work TRUE)
-        foreach(_name ${_names})
-            check_include_file(${_include_dir}/${_name} _include_file_works)
-            set(_all_include_files_work (${_all_include_files_work} AND ${_include_file_works}))
-        endforeach()
-        if(${_all_include_files_work})
-            set(${_result} ${_include_dir} PARENT_SCOPE)
-        endif()
-    endfunction()
-
-    include(CheckFunctionExists)
-
-    function(_find_library _names _check_function _result)
-        if(APPLE)
-            find_library(_lib
-                NAMES ${_names}
-                PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64
-                ENV DYLD_LIBRARY_PATH
-                )
-        else()
-            find_library(_lib
-                NAMES ${_names}
-                PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64
-                ENV LD_LIBRARY_PATH
-                )
-        endif()
-        set(CMAKE_REQUIRED_LIBRARIES ${_lib})
-        check_function_exists(${_check_function} _library_works)
-        if(${_library_works})
-            set(${_result} ${_lib} PARENT_SCOPE)
-        endif()
-    endfunction()
+    include(detect_libraries)
+    include(detect_include_files)

     set(CBLAS_FOUND FALSE)
     set(CBLAS_LIBRARIES "undefined")


fix comment that wasn't needed

fix comment that wasn't needed

--- 04-static-analysis/clang-format/cmake/modules/clang-format.cmake
+++ 04-static-analysis/clang-format/cmake/modules/clang-format.cmake
@@ -33,8 +33,6 @@
     | grep "replacement offset" 2>&1 > /dev/null
 )

-# This is a hack because our CMake root dir isn't the same as our git root dir
-
 # Get the path to this file
 get_filename_component(_clangcheckpath ${CMAKE_CURRENT_LIST_FILE} PATH)
 # call the script to chech changed files in git


added hint for FreeGLUT build on Mac

added hint for FreeGLUT build on Mac

--- plugins/FREEGLUT/cmake/FindFreeGLUT.cmake
+++ plugins/FREEGLUT/cmake/FindFreeGLUT.cmake
@@ -17,19 +17,22 @@

 # Look for the header file.
 FIND_PATH(FREEGLUT_INCLUDE_DIR
-          NAMES GL/freeglut.h
-	  HINTS
-	  ENV CPATH # For OSCAR modules at Brown/CCV
-	  )
+  NAMES GL/freeglut.h
+	HINTS
+	ENV CPATH # For OSCAR modules at Brown/CCV
+  /usr/local/Cellar/freeglut/2.8.1/include # This is how it comes with Brew.
+	)

 # Look for the library.
 FIND_LIBRARY(FREEGLUT_LIBRARY
-             NAMES glut
-	     HINTS
-	     ENV LD_LIBRARY_PATH # For OSCAR modules at Brown/CCV
-	     )
+  NAMES glut
+	HINTS
+	ENV LD_LIBRARY_PATH # For OSCAR modules at Brown/CCV
+  /usr/local/Cellar/freeglut/2.8.1/lib/libglut.3.dylib # Brew version.
+	)

-# Handle the QUIETLY and REQUIRED arguments and set FREEGLUT_FOUND to TRUE if all listed variables are TRUE.
+# Handle the QUIETLY and REQUIRED arguments and set FREEGLUT_FOUND to
+# TRUE if all listed variables are TRUE.
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(
   FREEGLUT
@@ -37,21 +40,17 @@
   FREEGLUT_LIBRARY
   FREEGLUT_INCLUDE_DIR)

-# If you're using a Brew version of FreeGLUT, these might work.  Too specific
-# to add into a hint for FIND_LIBRARY or FIND_PATH.
-#set(FREEGLUT_INCLUDE_DIR /usr/local/Cellar/freeglut/2.8.1/include)
-#set(FREEGLUT_LIBRARY /usr/local/Cellar/freeglut/2.8.1/lib/libglut.3.dylib)
-
-message("FreeGLUT library: " ${FREEGLUT_LIBRARY})
-message("FreeGLUT include: " ${FREEGLUT_INCLUDE_DIR})
-
 # Copy the results to the output variables.
 IF(FREEGLUT_FOUND)
 	SET(FREEGLUT_LIBRARIES ${FREEGLUT_LIBRARY})
 	SET(FREEGLUT_INCLUDE_DIRS ${FREEGLUT_INCLUDE_DIR})
+  message("-- FreeGLUT includes: " ${FREEGLUT_INCLUDE_DIR})
+  message("-- FreeGLUT library:  " ${FREEGLUT_LIBRARY})
 ELSE(FREEGLUT_FOUND)
 	SET(FREEGLUT_LIBRARIES)
 	SET(FREEGLUT_INCLUDE_DIRS)
+  message("** FreeGLUT library not found.")
 ENDIF(FREEGLUT_FOUND)

 MARK_AS_ADVANCED(FREEGLUT_INCLUDE_DIRS FREEGLUT_LIBRARIES)
+


updated cmake to be compatible with linux

--- proj/cmake/CoC-UtilsConfig.cmake
+++ proj/cmake/CoC-UtilsConfig.cmake
@@ -1,7 +1,20 @@
 if( NOT TARGET CoC-Utils )
     get_filename_component( COC-UTILS_SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../src" ABSOLUTE )

-    FILE(GLOB COC-UTILS_SOURCES ${COC-UTILS_SOURCE_PATH}/*.cpp)
+	LIST( APPEND COC-UTILS_SOURCES
+		${COC-UTILS_SOURCE_PATH}/cocBounce2D.cpp
+		${COC-UTILS_SOURCE_PATH}/cocBounce.cpp
+		${COC-UTILS_SOURCE_PATH}/cocFboWrapper.cpp
+		${COC-UTILS_SOURCE_PATH}/cocFlag.cpp
+		${COC-UTILS_SOURCE_PATH}/cocGLUtils.cpp
+		${COC-UTILS_SOURCE_PATH}/cocParameters.cpp
+		${COC-UTILS_SOURCE_PATH}/cocPoly.cpp
+		${COC-UTILS_SOURCE_PATH}/cocScaleGesture.cpp
+		${COC-UTILS_SOURCE_PATH}/cocSwipe.cpp
+		#${COC-UTILS_SOURCE_PATH}/cocTextBoxExtended.cpp  # causes compile error on linux
+		${COC-UTILS_SOURCE_PATH}/cocTimer.cpp
+		${COC-UTILS_SOURCE_PATH}/cocTween.cpp
+		)

     add_library( CoC-Utils ${COC-UTILS_SOURCES} )
     target_include_directories( CoC-Utils PUBLIC "${COC-UTILS_SOURCE_PATH}" )
@@ -27,4 +40,4 @@
         target_link_libraries( CoC-Utils PUBLIC CoC-Core)
     endif()

-endif()+endif()


python

python

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -515,14 +515,14 @@
 endmacro()

 macro(cmaki_python_library)
-	cmaki2_library(${ARGV})
+	cmaki2_library(${ARGV}) # INSTALL lib/python3.5/lib-dynload
 	set(PARAMETERS ${ARGV})
 	list(GET PARAMETERS 0 TARGET_NAME)
 	set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
-	# foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
-	# 	install(    TARGETS ${TARGET_NAME}
-	# 				DESTINATION ${BUILD_TYPE}/lib/python3.5
-	# 				CONFIGURATIONS ${BUILD_TYPE})
-	# endforeach()
+	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
+		install(    TARGETS ${TARGET_NAME}
+					DESTINATION ${BUILD_TYPE}/lib/python3.5/lib-dynload
+					CONFIGURATIONS ${BUILD_TYPE})
+	endforeach()
 endmacro()


Removed debug output from cmake/Modules/Compilers.cmake

--- cmake/Modules/Compilers.cmake
+++ cmake/Modules/Compilers.cmake
@@ -167,14 +167,6 @@
     # if flags were changed or not previously processed
     if(NOT "${CACHED_C_${_VAR}_TEST_FLAGS}" STREQUAL "${_FLAGS}" OR
             NOT DEFINED CACHED_C_${_VAR}_GOOD_FLAGS)
-        if(NOT "${CACHED_C_${_VAR}_TEST_FLAGS}" STREQUAL "${_FLAGS}")
-            message(STATUS "Test C flags differ for ${_VAR}")
-            message(STATUS "  new: ${_FLAGS}")
-            message(STATUS "  old: ${CACHED_C_${_VAR}_TEST_FLAGS}")
-        endif()
-        if(NOT DEFINED CACHED_C_${_VAR}_GOOD_FLAGS)
-            message(STATUS "CACHED_C_${_VAR}_GOOD_FLAGS is not defined")
-        endif()
         # test flags
         add_flags(C "${_VAR}" "${_FLAGS}")
         # cache the valid flags
@@ -196,12 +188,6 @@
     # if flags were changed or not previously processed
     if(NOT "${CACHED_CXX_${_VAR}_TEST_FLAGS}" STREQUAL "${_FLAGS}" OR
             NOT DEFINED CACHED_CXX_${_VAR}_GOOD_FLAGS)
-        if(NOT "${CACHED_CXX_${_VAR}_TEST_FLAGS}" STREQUAL "${_FLAGS}")
-            message(STATUS "Test C++ flags differ for ${_VAR}")
-        endif()
-        if(NOT DEFINED CACHED_CXX_${_VAR}_GOOD_FLAGS)
-            message(STATUS "CACHED_CXX_${_VAR}_GOOD_FLAGS is not defined")
-        endif()
         # test flags
         add_flags(CXX "${_VAR}" "${_FLAGS}")
         # cache the valid flags


Fix LINKEDIN indentation in FindGLIB2.cmake

--- cmake/Modules/FindGLIB2.cmake
+++ cmake/Modules/FindGLIB2.cmake
@@ -27,30 +27,30 @@
   SET(GLIB2_FOUND TRUE)
 ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )

-    IF( NOT LINKEDIN )
-      INCLUDE(FindPkgConfig)
-
-      ## Glib
-      IF ( GLIB2_FIND_REQUIRED )
-        SET( _pkgconfig_REQUIRED "REQUIRED" )
-      ELSE ( GLIB2_FIND_REQUIRED )
-        SET( _pkgconfig_REQUIRED "" )
-      ENDIF ( GLIB2_FIND_REQUIRED )
-
-      IF ( GLIB2_MIN_VERSION )
-        PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} )
-      ELSE ( GLIB2_MIN_VERSION )
-        PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 )
-        PKG_SEARCH_MODULE( GTHREAD2 ${_pkgconfig_REQUIRED} gthread-2.0 )
-      ENDIF ( GLIB2_MIN_VERSION )
-      IF ( PKG_CONFIG_FOUND )
-        IF ( GLIB2_FOUND )
-          SET ( GLIB2_CORE_FOUND TRUE )
-        ELSE ( GLIB2_FOUND )
-          SET ( GLIB2_CORE_FOUND FALSE )
-        ENDIF ( GLIB2_FOUND )
-      ENDIF ( PKG_CONFIG_FOUND )
-    ENDIF( NOT LINKEDIN )
+  IF( NOT LINKEDIN )
+    INCLUDE(FindPkgConfig)
+
+    ## Glib
+    IF ( GLIB2_FIND_REQUIRED )
+      SET( _pkgconfig_REQUIRED "REQUIRED" )
+    ELSE ( GLIB2_FIND_REQUIRED )
+      SET( _pkgconfig_REQUIRED "" )
+    ENDIF ( GLIB2_FIND_REQUIRED )
+
+    IF ( GLIB2_MIN_VERSION )
+      PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} )
+    ELSE ( GLIB2_MIN_VERSION )
+      PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 )
+      PKG_SEARCH_MODULE( GTHREAD2 ${_pkgconfig_REQUIRED} gthread-2.0 )
+    ENDIF ( GLIB2_MIN_VERSION )
+    IF ( PKG_CONFIG_FOUND )
+      IF ( GLIB2_FOUND )
+        SET ( GLIB2_CORE_FOUND TRUE )
+      ELSE ( GLIB2_FOUND )
+        SET ( GLIB2_CORE_FOUND FALSE )
+      ENDIF ( GLIB2_FOUND )
+    ENDIF ( PKG_CONFIG_FOUND )
+  ENDIF( NOT LINKEDIN )

   # Look for glib2 include dir and libraries w/o pkgconfig
   IF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )


Fix typo.

Fix typo.

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -40,7 +40,7 @@
     ELSE()
         SET(OPENBLAS_COMMIT "v0.2.19")
         SET(OPTIONAL_ARGS "")
-        IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^x86(-64)?$")
+        IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^x86(_64)?$")
             SET(OPTIONAL_ARGS DYNAMIC_ARCH=1 NUM_THREADS=64)
         ENDIF()
     ENDIF()


Make glib_mkenums() files depend on the source enum file

Then the changes in the source enum file will also regenerate
the enum type files.

--- cmake/modules/GLibTools.cmake
+++ cmake/modules/GLibTools.cmake
@@ -86,6 +86,7 @@
 	add_custom_command(
 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h
 		COMMAND ${GLIB_MKENUMS} --template "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/enumtypes-${_output_filename_noext}.h.tmpl" "${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}" >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.h
+		DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}
 	)

 set(SOURCE_TMPL "
@@ -133,6 +134,7 @@
 	add_custom_command(
 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c
 		COMMAND ${GLIB_MKENUMS} --template "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/enumtypes-${_output_filename_noext}.c.tmpl" "${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}" >${CMAKE_CURRENT_BINARY_DIR}/${_output_filename_noext}.c
+		DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_enums_header}
 	)
 endfunction(glib_mkenums)


Closes #19 #50

Closes #19 #50

bugfix and
closes #19
closes #50

find_package(GTest) did not find the system gtest on my ubuntu 16.04

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -25,9 +25,9 @@
 set(proj Gadgetron)

 # Set dependency list
-set(${proj}_DEPENDENCIES "Boost;HDF5;ISMRMRD;FFTW3double;Armadillo")
+set(${proj}_DEPENDENCIES "Boost;HDF5;ISMRMRD;FFTW3double;Armadillo;GTest")
 if(${USE_SYSTEM_GTest})
-  list(APPEND ${proj}_DEPENDENCIES "GTest")
+  find_package(GTest)
 endif()

 # Include dependent projects if any


update macos toolchain - support for arm64 slices

--- toolchains/osx.toolchain.cmake
+++ toolchains/osx.toolchain.cmake
@@ -5,6 +5,8 @@
 # Copyright (c) 2016. Domagoj Saric. All rights reserved.
 #
 ################################################################################
+
+cmake_minimum_required( VERSION 3.19 )

 include( "${CMAKE_CURRENT_LIST_DIR}/apple.cmake" )

@@ -17,9 +19,9 @@
 # cmake_policy( SET CMP0042 OLD )
 # set( CMAKE_MACOSX_RPATH 0 ) # even with the policy set CMake 3.5.2 still issues the warning?

-set( CMAKE_OSX_ARCHITECTURES           "$(ARCHS_STANDARD)" )
+set( CMAKE_OSX_ARCHITECTURES           "$(ARCHS_STANDARD)"           )
 set( CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS "$(ARCHS_STANDARD_32_64_BIT)" )
-set( CMAKE_OSX_DEPLOYMENT_TARGET       "10.7"                        )
+set( CMAKE_OSX_DEPLOYMENT_TARGET       "10.14"                       )
 set( CPACK_SYSTEM_NAME                 "OSX"                         )

 # Implementation note:
@@ -38,10 +40,6 @@

 set( TNUN_cpu_archs default )

-set( TNUN_ABI x64 )
-
-add_compile_options( -mmmx -mfpmath=sse -mcx16 )
-
 set( TNUN_LIBCPP_LOCATION /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 )
 include( ${CMAKE_CURRENT_LIST_DIR}/gcc_compatibles_stl.cmake )


Fix the ctest javascript coverage report.

Tell nyc where we stored the coverage data so the test passes.  With
this change, ctest successfully passes locally.  Without it, it fails.

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -12,7 +12,7 @@
   add_test(
     NAME js_coverage_combine_report
     WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
-    COMMAND npx nyc report
+    COMMAND npx nyc report -t "${PROJECT_SOURCE_DIR}/build/test/coverage/web_temp"
   )
   set_property(TEST js_coverage_reset PROPERTY LABELS girder_browser girder_integration)
   set_property(TEST js_coverage_combine_report PROPERTY LABELS girder_coverage)


Use libnova if present on the system to help compute the sidereal time

--- thirdparty/thirdparty.cmake
+++ thirdparty/thirdparty.cmake
@@ -658,6 +658,14 @@
       execute_process(
         COMMAND ${CMAKE_COMMAND} -E tar xzf ${thirdparty_dir}/${libindi_file}.tar.gz
         WORKING_DIRECTORY ${thirdparties_deflate_directory})
+    endif()
+
+    # Nova is required for sidereal time computation with Indi driver that not report it.
+    # This is not critical if it is not present but the hour angle computation will be wrong.
+    find_package(Nova)
+    if(NOVA_FOUND)
+      add_definitions("-DLIBNOVA")
+      set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${NOVA_LIBRARIES})
     endif()

     # warning: copied from the indi CMakeLists.txt. This should be updated when


fix generated environment files broken by code style change

--- ament_cmake_environment_hooks/cmake/ament_generate_package_environment.cmake
+++ ament_cmake_environment_hooks/cmake/ament_generate_package_environment.cmake
@@ -20,8 +20,7 @@
     set(SOURCE_HOOKS "")
     foreach(hook ${_AMENT_CMAKE_ENVIRONMENT_HOOKS_${ext}})
       set(SOURCE_HOOKS
-        "${SOURCE_HOOKS}${AMENT_CMAKE_ENVIRONMENT_SOURCE_COMMAND_${ext}}"
-        " \"$AMENT_CURRENT_PREFIX/${hook}\"\n")
+        "${SOURCE_HOOKS}${AMENT_CMAKE_ENVIRONMENT_SOURCE_COMMAND_${ext}} \"$AMENT_CURRENT_PREFIX/${hook}\"\n")
     endforeach()

     configure_file(


Update CMake module because name of jsoncpp library changed to jsoncpp_static

--- source/raptor/FindJsonCpp.cmake
+++ source/raptor/FindJsonCpp.cmake
@@ -27,8 +27,8 @@
 endif()

 find_library(JsonCpp_LIBRARY
-  NAMES jsoncpp
-  PATHS ~/.linuxbrew/lib  # linuxbrew
+  NAMES jsoncpp jsoncpp_static
+  PATHS ~/.linuxbrew/lib
   DOC "Specify the JsonCpp library here")
 set(JsonCpp_INCLUDE_DIRS ${JsonCpp_INCLUDE_DIR})
 set(JsonCpp_LIBRARIES "${JsonCpp_LIBRARY}")


os/iphone: print DEVELOPER_DIR only if not empty

--- os/iphone.cmake
+++ os/iphone.cmake
@@ -20,7 +20,10 @@
   polly_fatal_error("Works since Xcode 5.0.0 (current ver: ${XCODE_VERSION})")
 endif()

-polly_status_debug("Developer root (env): $ENV{DEVELOPER_DIR}")
+string(COMPARE EQUAL "$ENV{DEVELOPER_DIR}" "" _is_empty)
+if(NOT _is_empty)
+  polly_status_debug("Developer root (env): $ENV{DEVELOPER_DIR}")
+endif()

 execute_process(
     COMMAND


Fix add target libs.

Fix add target libs.

--- CPM.cmake
+++ CPM.cmake
@@ -1085,7 +1085,7 @@

   set(INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${__CPM_FULL_UNID})
   set(DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${__CPM_FULL_UNID})
-  set(TARGET_LIB_MAP_NAME CPM_KV_TARGET_LIB_MAP_${__CPM_FULL_UNID})
+  set(TARGET_LIB_MAP_NAME CPM_KV_LIB_TARGET_MAP_${__CPM_FULL_UNID})

   # Save variables that get overwritten by subdirectory.
   set(CPM_PARENT_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS})
@@ -1169,7 +1169,7 @@
       foreach(module IN LISTS CPM_EXPORTED_MODULES)
         set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
         set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})
-        set(IMPORT_TARGET_LIB_MAP_NAME CPM_KV_TARGET_LIB_MAP_${module})
+        set(IMPORT_TARGET_LIB_MAP_NAME CPM_KV_LIB_TARGET_MAP_${module})

         set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
         set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})
@@ -1195,7 +1195,7 @@
     # Make sure there are entries for us in the include and definition lists.
     set(CPM_KV_LIST_INCLUDE_MAP ${CPM_KV_LIST_INCLUDE_MAP} ${__CPM_FULL_UNID})
     set(CPM_KV_LIST_DEFINITION_MAP ${CPM_KV_LIST_DEFINITION_MAP} ${__CPM_FULL_UNID})
-    set(CPM_KV_LIST_TARGET_LIB_MAP ${CPM_KV_LIST_TARGET_LIB_MAP} ${__CPM_FULL_UNID})
+    set(CPM_KV_LIST_LIB_TARGET_MAP ${CPM_KV_LIST_LIB_TARGET_MAP} ${__CPM_FULL_UNID})

   else()
     # Set the name the module is using to setup its namespaces.
@@ -1213,7 +1213,7 @@
       foreach(module IN LISTS CPM_KV_EXPORT_MAP_${__CPM_FULL_UNID})
         set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
         set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})
-        set(IMPORT_TARGET_LIB_MAP_NAME CPM_KV_TARGET_LIB_MAP_${module})
+        set(IMPORT_TARGET_LIB_MAP_NAME CPM_KV_LIB_TARGET_MAP_${module})

         set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
         set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})


Ensure CPM_LAST_MODULE_NAME is present in the current scope as well.

--- CPM.cmake
+++ CPM.cmake
@@ -404,7 +404,8 @@
 macro(CPM_InitModule name)
   # Ensure the parent function knows what we decided to name ourselves.
   # This name will correspond to our module's namespace directives.
-  set(CPM_LAST_MODULE_NAME ${name} PARENT_SCOPE)
+  set(CPM_LAST_MODULE_NAME ${name})
+  set(CPM_LAST_MODULE_NAME ${CPM_LAST_MODULE_NAME} PARENT_SCOPE)
   message("Initializing macro: ${name}")

   # Build the appropriate definition for the module. We stored the unique ID


Don't use the lib prefix for plugins

Don't use the lib prefix for plugins

--- tools/cmake/ANHPlugin.cmake
+++ tools/cmake/ANHPlugin.cmake
@@ -153,6 +153,7 @@

     # Create the Common library
     ADD_LIBRARY(${name} MODULE ${SOURCES})
+    SET_TARGET_PROPERTIES(${name} PROPERTIES PREFIX "")

     # If a project library was created link to it
     IF(DEFINED __project_library)


Removing FindPackageHandleStandardArgs.cmake

--- cmake/FindPackageHandleStandardArgs.cmake
+++ cmake/FindPackageHandleStandardArgs.cmake
@@ -1,299 +0,0 @@
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
-#
-# This function is intended to be used in FindXXX.cmake modules files.
-# It handles the REQUIRED, QUIET and version-related arguments to find_package().
-# It also sets the <UPPERCASED_NAME>_FOUND variable.
-# The package is considered found if all variables <var1>... listed contain
-# valid results, e.g. valid filepaths.
-#
-# There are two modes of this function. The first argument in both modes is
-# the name of the Find-module where it is called (in original casing).
-#
-# The first simple mode looks like this:
-#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
-# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
-# will be set to TRUE.
-# If DEFAULT_MSG is given as second argument, then the function will generate
-# itself useful success and error messages. You can also supply a custom error message
-# for the failure case. This is not recommended.
-#
-# The second mode is more powerful and also supports version checking:
-#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
-#                                           [VERSION_VAR   <versionvar>]
-#                                           [HANDLE_COMPONENTS]
-#                                           [CONFIG_MODE]
-#                                           [FAIL_MESSAGE "Custom failure message"] )
-#
-# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
-# will be set to TRUE.
-# After REQUIRED_VARS the variables which are required for this package are listed.
-# Following VERSION_VAR the name of the variable can be specified which holds
-# the version of the package which has been found. If this is done, this version
-# will be checked against the (potentially) specified required version used
-# in the find_package() call. The EXACT keyword is also handled. The default
-# messages include information about the required version and the version
-# which has been actually found, both if the version is ok or not.
-# If the package supports components, use the HANDLE_COMPONENTS option to enable
-# handling them. In this case, find_package_handle_standard_args() will report
-# which components have been found and which are missing, and the <NAME>_FOUND
-# variable will be set to FALSE if any of the required components (i.e. not the
-# ones listed after OPTIONAL_COMPONENTS) are missing.
-# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
-# a find_package(... NO_MODULE) call.  In this case VERSION_VAR will be set
-# to <NAME>_VERSION and the macro will automatically check whether the
-# Config module was found.
-# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
-# used, the default message will be displayed.
-#
-# Example for mode 1:
-#
-#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-#
-# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
-# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
-# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
-# independent whether QUIET was used or not.
-# If it is found, success will be reported, including the content of <var1>.
-# On repeated Cmake runs, the same message won't be printed again.
-#
-# Example for mode 2:
-#
-#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
-#                                             VERSION_VAR BISON_VERSION)
-# In this case, BISON is considered to be found if the variable(s) listed
-# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
-# Also the version of BISON will be checked by using the version contained
-# in BISON_VERSION.
-# Since no FAIL_MESSAGE is given, the default messages will be printed.
-#
-# Another example for mode 2:
-#
-#    find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
-#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
-# In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4 NO_MODULE)
-# and adds an additional search directory for automoc4.
-# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
-# success/error message.
-
-#=============================================================================
-# Copyright 2007-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 distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-include(FindPackageMessage)
-include(CMakeParseArguments)
-
-# internal helper macro
-macro(_FPHSA_FAILURE_MESSAGE _msg)
-  if (${_NAME}_FIND_REQUIRED)
-    message(FATAL_ERROR "${_msg}")
-  else ()
-    if (NOT ${_NAME}_FIND_QUIETLY)
-      message(STATUS "${_msg}")
-    endif ()
-  endif ()
-endmacro()
-
-
-# internal helper macro to generate the failure message when used in CONFIG_MODE:
-macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
-  # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
-  if(${_NAME}_CONFIG)
-    _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
-  else()
-    # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
-    # List them all in the error message:
-    if(${_NAME}_CONSIDERED_CONFIGS)
-      set(configsText "")
-      list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
-      math(EXPR configsCount "${configsCount} - 1")
-      foreach(currentConfigIndex RANGE ${configsCount})
-        list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
-        list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
-        set(configsText "${configsText}    ${filename} (version ${version})\n")
-      endforeach()
-      if (${_NAME}_NOT_FOUND_MESSAGE)
-        set(configsText "${configsText}    Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n")
-      endif()
-      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
-
-    else()
-      # Simple case: No Config-file was found at all:
-      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
-    endif()
-  endif()
-endmacro()
-
-
-function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
-
-# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
-# new extended or in the "old" mode:
-  set(options CONFIG_MODE HANDLE_COMPONENTS)
-  set(oneValueArgs FAIL_MESSAGE VERSION_VAR)
-  set(multiValueArgs REQUIRED_VARS)
-  set(_KEYWORDS_FOR_EXTENDED_MODE  ${options} ${oneValueArgs} ${multiValueArgs} )
-  list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
-
-  if(${INDEX} EQUAL -1)
-    set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
-    set(FPHSA_REQUIRED_VARS ${ARGN})
-    set(FPHSA_VERSION_VAR)
-  else()
-
-    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${ARGN})
-
-    if(FPHSA_UNPARSED_ARGUMENTS)
-      message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
-    endif()
-
-    if(NOT FPHSA_FAIL_MESSAGE)
-      set(FPHSA_FAIL_MESSAGE  "DEFAULT_MSG")
-    endif()
-  endif()
-
-# now that we collected all arguments, process them
-
-  if("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
-    set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
-  endif()
-
-  # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
-  # when it successfully found the config-file, including version checking:
-  if(FPHSA_CONFIG_MODE)
-    list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
-    list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
-    set(FPHSA_VERSION_VAR ${_NAME}_VERSION)
-  endif()
-
-  if(NOT FPHSA_REQUIRED_VARS)
-    message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
-  endif()
-
-  list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
-
-  string(TOUPPER ${_NAME} _NAME_UPPER)
-  string(TOLOWER ${_NAME} _NAME_LOWER)
-
-  # collect all variables which were not found, so they can be printed, so the
-  # user knows better what went wrong (#6375)
-  set(MISSING_VARS "")
-  set(DETAILS "")
-  set(${_NAME_UPPER}_FOUND TRUE)
-  # check if all passed variables are valid
-  foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
-    if(NOT ${_CURRENT_VAR})
-      set(${_NAME_UPPER}_FOUND FALSE)
-      set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
-    else()
-      set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
-    endif()
-  endforeach()
-
-  # component handling
-  unset(FOUND_COMPONENTS_MSG)
-  unset(MISSING_COMPONENTS_MSG)
-
-  if(FPHSA_HANDLE_COMPONENTS)
-    foreach(comp ${${_NAME}_FIND_COMPONENTS})
-      if(${_NAME}_${comp}_FOUND)
-
-        if(NOT DEFINED FOUND_COMPONENTS_MSG)
-          set(FOUND_COMPONENTS_MSG "found components: ")
-        endif()
-        set(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}")
-
-      else()
-
-        if(NOT DEFINED MISSING_COMPONENTS_MSG)
-          set(MISSING_COMPONENTS_MSG "missing components: ")
-        endif()
-        set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}")
-
-        if(${_NAME}_FIND_REQUIRED_${comp})
-          set(${_NAME_UPPER}_FOUND FALSE)
-          set(MISSING_VARS "${MISSING_VARS} ${comp}")
-        endif()
-
-      endif()
-    endforeach()
-    set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}")
-    set(DETAILS "${DETAILS}[c${COMPONENT_MSG}]")
-  endif()
-
-  # version handling:
-  set(VERSION_MSG "")
-  set(VERSION_OK TRUE)
-  set(VERSION ${${FPHSA_VERSION_VAR}} )
-  if (${_NAME}_FIND_VERSION)
-
-    if(VERSION)
-
-      if(${_NAME}_FIND_VERSION_EXACT)       # exact version required
-        if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
-          set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
-          set(VERSION_OK FALSE)
-        else ()
-          set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
-        endif ()
-
-      else()     # minimum version specified:
-        if ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
-          set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
-          set(VERSION_OK FALSE)
-        else ()
-          set(VERSION_MSG "(found suitable version \"${VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")")
-        endif ()
-      endif()
-
-    else()
-
-      # if the package was not found, but a version was given, add that to the output:
-      if(${_NAME}_FIND_VERSION_EXACT)
-         set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
-      else()
-         set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
-      endif()
-
-    endif()
-  else ()
-    if(VERSION)
-      set(VERSION_MSG "(found version \"${VERSION}\")")
-    endif()
-  endif ()
-
-  if(VERSION_OK)
-    set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
-  else()
-    set(${_NAME_UPPER}_FOUND FALSE)
-  endif()
-
-
-  # print the result:
-  if (${_NAME_UPPER}_FOUND)
-    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
-  else ()
-
-    if(FPHSA_CONFIG_MODE)
-      _FPHSA_HANDLE_FAILURE_CONFIG_MODE()
-    else()
-      if(NOT VERSION_OK)
-        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
-      else()
-        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
-      endif()
-    endif()
-
-  endif ()
-
-  set(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
-
-endfunction()


COMP: fix merge error

COMP: fix merge error

--- Modules/Segmentation/MorphologicalProfiles/otb-module.cmake
+++ Modules/Segmentation/MorphologicalProfiles/otb-module.cmake
@@ -27,6 +27,7 @@
     OTBITK
     OTBImageBase
     OTBObjectList
+    OTBFunctor

   TEST_DEPENDS
     OTBImageIO


exclude .pyc files and __pycache__ folders from installation

--- ament_cmake_python/cmake/ament_python_install_package.cmake
+++ ament_cmake_python/cmake/ament_python_install_package.cmake
@@ -40,6 +40,8 @@
   install(
     DIRECTORY "${ARG_PACKAGE_DIR}/"
     DESTINATION "${PYTHON_INSTALL_DIR}/${package_name}"
+    PATTERN "*.pyc" EXCLUDE
+    PATTERN "__pycache__" EXCLUDE
   )
   # TODO optionally compile Python files


manually specify device-mapper, treating amazon as rhel7

--- CMake/Packages.cmake
+++ CMake/Packages.cmake
@@ -39,7 +39,6 @@
     set(PACKAGE_DEPENDENCIES
       "glibc >= 2.12"
       "openssl >= 1.0"
-      "device-mapper >= 1.02.90"
       "bzip2-libs"
       "readline"
       "zlib"
@@ -50,18 +49,21 @@
       set(PACKAGE_DEPENDENCIES
         "${PACKAGE_DEPENDENCIES}"
         "libudev"
+        "device-mapper >= 1.02.90"
       )
     elseif(OSQUERY_BUILD_DISTRO STREQUAL "rhel6")
       set(PACKAGE_ITERATION "1.rhel6")
       set(PACKAGE_DEPENDENCIES
         "${PACKAGE_DEPENDENCIES}"
         "libudev"
+        "device-mapper >= 1.02.90"
       )
     elseif(OSQUERY_BUILD_DISTRO STREQUAL "oracle6")
       set(PACKAGE_ITERATION "1.oel6")
       set(PACKAGE_DEPENDENCIES
         "${PACKAGE_DEPENDENCIES}"
         "libudev"
+        "device-mapper >= 1.02.90"
       )
     elseif(OSQUERY_BUILD_DISTRO STREQUAL "centos7")
       set(PACKAGE_ITERATION "1.el7")
@@ -71,10 +73,22 @@
       )
     elseif(OSQUERY_BUILD_DISTRO STREQUAL "rhel7")
       set(PACKAGE_ITERATION "1.rhel7")
+      set(PACKAGE_DEPENDENCIES
+        "${PACKAGE_DEPENDENCIES}"
+        "device-mapper >= 7:1.02.90"
+      )
     elseif(OSQUERY_BUILD_DISTRO STREQUAL "oracle7")
       set(PACKAGE_ITERATION "1.oel7")
+      set(PACKAGE_DEPENDENCIES
+        "${PACKAGE_DEPENDENCIES}"
+        "device-mapper >= 7:1.02.90"
+      )
     elseif(OSQUERY_BUILD_DISTRO STREQUAL "amazon2015.03")
       set(PACKAGE_ITERATION "1.amazon2015")
+      set(PACKAGE_DEPENDENCIES
+        "${PACKAGE_DEPENDENCIES}"
+        "device-mapper >= 7:1.02.90"
+      )
     endif()
   endif()
   JOIN("${PACKAGE_DEPENDENCIES}" ", " PACKAGE_DEPENDENCIES)


 - updated cmake macro : restyle if endif code block

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@5562 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/rdo_studio/branches/dev_linux/cmake/add_boost_test.cmake
+++ rdo/rdo_studio/branches/dev_linux/cmake/add_boost_test.cmake
@@ -18,7 +18,7 @@

 IF(MSVC)
 	SET_TARGET_PROPERTIES(${ARGV0} PROPERTIES COMPILE_FLAGS "/EHa")
-ENDIF()
+ENDIF(MSVC)

 TARGET_LINK_LIBRARIES(${ARGV0} ${Boost_LIBRARIES})


Attempt to remove 'photoeffects/3rdparty/cmake_install.cmake'

--- photoeffects/3rdparty/cmake_install.cmake
+++ photoeffects/3rdparty/cmake_install.cmake
@@ -1,34 +0,0 @@
-# Install script for directory: /home/kustikova/Documents/itlab-vision/photoeffects/3rdparty
-
-# Set the install prefix
-IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  SET(CMAKE_INSTALL_PREFIX "/usr/local")
-ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-  IF(BUILD_TYPE)
-    STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
-           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
-  ELSE(BUILD_TYPE)
-    SET(CMAKE_INSTALL_CONFIG_NAME "Release")
-  ENDIF(BUILD_TYPE)
-  MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-
-# Set the component getting installed.
-IF(NOT CMAKE_INSTALL_COMPONENT)
-  IF(COMPONENT)
-    MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
-    SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
-  ELSE(COMPONENT)
-    SET(CMAKE_INSTALL_COMPONENT)
-  ENDIF(COMPONENT)
-ENDIF(NOT CMAKE_INSTALL_COMPONENT)
-
-# Install shared libraries without execute permission?
-IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-  SET(CMAKE_INSTALL_SO_NO_EXE "1")
-ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-


Added TARGET_DEPENDS argument

Added TARGET_DEPENDS argument

--- CMake/mitkMacroCreateModule.cmake
+++ CMake/mitkMacroCreateModule.cmake
@@ -14,6 +14,7 @@
 #!     [DEPENDS <modules we need>]
 #!     [PROVIDES <library name which is built>]
 #!     [PACKAGE_DEPENDS <packages we need, like ITK, VTK, QT>]
+#!     [TARGET_DEPENDS <list of additional dependencies>
 #!     [EXPORT_DEFINE <declspec macro name for dll exports>]
 #!     [QT_MODULE]
 #! \endcode
@@ -23,7 +24,7 @@
 ##################################################################
 MACRO(MITK_CREATE_MODULE MODULE_NAME_IN)
   MACRO_PARSE_ARGUMENTS(MODULE
-                        "SUBPROJECTS;INCLUDE_DIRS;INTERNAL_INCLUDE_DIRS;DEPENDS;DEPENDS_INTERNAL;PROVIDES;PACKAGE_DEPENDS;EXPORT_DEFINE;ADDITIONAL_LIBS;GENERATED_CPP"
+                        "SUBPROJECTS;INCLUDE_DIRS;INTERNAL_INCLUDE_DIRS;DEPENDS;DEPENDS_INTERNAL;PROVIDES;PACKAGE_DEPENDS;TARGET_DEPENDS;EXPORT_DEFINE;ADDITIONAL_LIBS;GENERATED_CPP"
                         "QT_MODULE;FORCE_STATIC;HEADERS_ONLY"
                         ${ARGN})

@@ -118,6 +119,9 @@
 		LINK_DIRECTORIES(${ALL_LIBRARY_DIRS})
 	      ENDIF(ALL_LIBRARY_DIRS)
 	      ADD_LIBRARY(${MODULE_PROVIDES} ${_STATIC} ${coverage_sources} ${CPP_FILES_GENERATED} ${DOX_FILES} ${UI_FILES})
+        IF(MODULE_TARGET_DEPENDS)
+          ADD_DEPENDENCIES(${MODULE_PROVIDES} ${MODULE_TARGET_DEPENDS})
+        ENDIF()
 	      IF(MODULE_SUBPROJECTS)
 		SET_PROPERTY(TARGET ${MODULE_PROVIDES} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
 		FOREACH(subproject ${MODULE_SUBPROJECTS})
@@ -173,6 +177,9 @@
 	      ENDIF(ALL_LIBRARY_DIRS)
 	      ADD_LIBRARY(${MODULE_PROVIDES} ${coverage_sources} ${CPP_FILES_GENERATED} ${Q${KITNAME}_GENERATED_CPP} ${DOX_FILES} ${UI_FILES} ${QRC_FILES})
 	      TARGET_LINK_LIBRARIES(${MODULE_PROVIDES} ${QT_LIBRARIES} ${ALL_LIBRARIES} QVTK)
+        IF(MODULE_TARGET_DEPENDS)
+          ADD_DEPENDENCIES(${MODULE_PROVIDES} ${MODULE_TARGET_DEPENDS})
+        ENDIF()
 	      IF(MINGW)
 		TARGET_LINK_LIBRARIES(${MODULE_PROVIDES} ssp) # add stack smash protection lib
 	      ENDIF()


ENH: do not include curl headers outside CurlAdapter dir

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -115,11 +115,6 @@
       ${OTB_SOURCE_DIR}/Utilities/otbkml/src)
 ENDIF(OTB_USE_EXTERNAL_LIBKML)

-IF(OTB_USE_CURL)
-  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
-  	${CURL_INCLUDE_DIR} )
-ENDIF(OTB_USE_CURL)
-
 IF(OTB_USE_MAPNIK)
   SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
   	${MAPNIK_INCLUDE_DIR} ${FREETYPE2_INCLUDE_DIR})
@@ -324,12 +319,6 @@
 ELSE(OTB_USE_EXTERNAL_EXPAT)
 ENDIF(OTB_USE_EXTERNAL_EXPAT)

-#For CURL header file
-IF(OTB_USE_CURL)
-  SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
-  	${CURL_INCLUDE_DIR} )
-ENDIF(OTB_USE_CURL)
-
 #For MAPNIK header file
 IF(OTB_USE_MAPNIK)
   SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}


CDRIVER-2257 include cmake file CheckSymbolExists

--- build/cmake/FindResSearch.cmake
+++ build/cmake/FindResSearch.cmake
@@ -1,3 +1,5 @@
+include(CheckSymbolExists)
+
 if (ENABLE_SRV STREQUAL ON OR ENABLE_SRV STREQUAL AUTO)
    if (WIN32)
       set (RESOLV_LIBS Dnsapi)


Fix bower installation in docker build environments.

Since docker runs as root, we need to enabled Bower's flag to allow
installation as root.

--- build/cmake/core-admin-ui.cmake
+++ build/cmake/core-admin-ui.cmake
@@ -39,7 +39,7 @@
   DEPENDS
     ${CORE_BUILD_DIR}/tmp/admin-ui-build/bower.json
     ${STAMP_DIR}/core-admin-ui-yarn-install
-  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/bower install && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/bower prune
+  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/bower install --allow-root && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/bower prune --allow-root
   COMMAND touch ${STAMP_DIR}/core-admin-ui-bower-install
 )


CMake: fixed compilation flags for clang MacOS

--- src/cmake/common-settings.cmake
+++ src/cmake/common-settings.cmake
@@ -81,7 +81,7 @@
 	check_cxx_compiler_flag("-std=c++14"     YUNI_HAS_CPP14_SUPPORT)
 	check_cxx_compiler_flag("-std=c++11"     YUNI_HAS_CPP11_SUPPORT)
 	check_cxx_compiler_flag("-std=c++0x"     YUNI_HAS_GCC_CPP0X_SUPPORT)
-	check_cxx_compiler_flag("-stdlib=libstdc++" YUNI_HAS_LIB_CPP11_SUPPORT) # clang, Apple gcc...
+	check_cxx_compiler_flag("-stdlib=libc++" YUNI_HAS_LIB_CPP11_SUPPORT) # clang, Apple gcc...

 	if (YUNI_HAS_CPP14_SUPPORT)
 		set(YUNI_COMMON_CXX_OPTIONS  "${YUNI_COMMON_CXX_OPTIONS} -std=c++14")
@@ -95,7 +95,7 @@
 		endif()
 	endif()
 	if (YUNI_HAS_LIB_CPP11_SUPPORT)
-		set(YUNI_COMMON_CXX_OPTIONS  "${YUNI_COMMON_CXX_OPTIONS} -stdlib=libstdc++")
+		set(YUNI_COMMON_CXX_OPTIONS  "${YUNI_COMMON_CXX_OPTIONS} -stdlib=libc++")
 	endif()

 endif()


DOC: flag only uses one dash

DOC: flag only uses one dash

--- CMake/OTBModuleEnablement.cmake
+++ CMake/OTBModuleEnablement.cmake
@@ -202,7 +202,7 @@
   if(${otb-module}_ENABLED)
     # check cxx11 requirement after all enable/disable macros have been passed
     if(OTB_MODULE_${otb-module}_REQUIRES_CXX11 AND NOT OTB_HAS_CXX11)
-      message(FATAL_ERROR "Module ${otb-module} requires C++11 support. Consider adding --std=c++11 to your compiler flags or disabling it.")
+      message(FATAL_ERROR "Module ${otb-module} requires C++11 support. Consider adding -std=c++11 to your compiler flags or disabling it.")
     endif()

     list(APPEND OTB_MODULES_ENABLED ${otb-module})


STRING REGEX REPLACE fix

STRING REGEX REPLACE fix

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -85,7 +85,7 @@
       STRING(REGEX REPLACE "/" "\\\\"  _${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_${_FINDPACKAGE}_RUNTIME_DIRECTORY}")
     ELSE ()
       SET(_${_FINDPACKAGE}_RUNTIME_DIRECTORY "${${_FINDPACKAGE}_ROOT_DIR}/lib")
-      STRING(REGEX REPLACE " " "\\ "  _${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_${_FINDPACKAGE}_RUNTIME_DIRECTORY}")
+      STRING(REGEX REPLACE " " "\\\\ "  _${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_${_FINDPACKAGE}_RUNTIME_DIRECTORY}")
     ENDIF ()
     SET(${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_${_FINDPACKAGE}_RUNTIME_DIRECTORY}" CACHE INTERNAL "${dependTarget} Runtime Directory")
     IF (NOT TEST_PATH)


Disable unsupported blacklist option for gcc sanitizers.

--- cmake/ProjectGlobalMacros.cmake
+++ cmake/ProjectGlobalMacros.cmake
@@ -111,10 +111,10 @@
       if (${SAN} STREQUAL "address"
           OR ${SAN} STREQUAL "thread"
           OR ${SAN} STREQUAL "undefined")
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${SAN} -fsanitize-blacklist=${PROJECT_BINARY_DIR}/SanitizerBlacklist.txt")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -fsanitize=${SAN} -fsanitize-blacklist=${PROJECT_BINARY_DIR}/SanitizerBlacklist.txt")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${SAN}")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -fsanitize=${SAN}")
       else()
-        message(FATAL_ERROR "Clang sanitizer ${SAN} is unknown.")
+        message(FATAL_ERROR "GCC sanitizer ${SAN} is unknown.")
       endif()
     endif()
   endif()


Fix FindOpenVDB on Linux

Fix FindOpenVDB on Linux

--- cmake/modules/FindOpenVDB.cmake
+++ cmake/modules/FindOpenVDB.cmake
@@ -526,16 +526,14 @@
       INTERFACE_LINK_LIBRARIES "${_OPENVDB_VISIBLE_DEPENDENCIES}" # visible deps (headers)
       INTERFACE_COMPILE_FEATURES cxx_std_11
       IMPORTED_LOCATION "${OpenVDB_${COMPONENT}_LIBRARY}"
-      IMPORTED_LOCATION_RELEASE "${OpenVDB_${COMPONENT}_LIBRARY_RELEASE}"
-      IMPORTED_LOCATION_DEBUG "${OpenVDB_${COMPONENT}_LIBRARY_DEBUG}"
    )

-  # if (_is_multi)
-  #   set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
-  #     IMPORTED_LOCATION_RELEASE "${OpenVDB_${COMPONENT}_LIBRARY_RELEASE}"
-  #     IMPORTED_LOCATION_DEBUG "${OpenVDB_${COMPONENT}_LIBRARY_DEBUG}"
-  #   )
-  # endif ()
+   if (_is_multi)
+     set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
+       IMPORTED_LOCATION_RELEASE "${OpenVDB_${COMPONENT}_LIBRARY_RELEASE}"
+       IMPORTED_LOCATION_DEBUG "${OpenVDB_${COMPONENT}_LIBRARY_DEBUG}"
+     )
+   endif ()

    if (OPENVDB_USE_STATIC_LIBS)
     set_target_properties(OpenVDB::${COMPONENT} PROPERTIES


cmake: Only build with _FORTIFY_SOURCE on release builds.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -28,7 +28,7 @@

         if (CMAKE_BUILD_TYPE)
             string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
-            if (NOT CMAKE_BUILD_TYPE_LOWER MATCHES debug)
+            if (CMAKE_BUILD_TYPE_LOWER MATCHES (release|relwithdebinfo|minsizerel))
                 check_c_compiler_flag("-Wp,-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
                 if (WITH_FORTIFY_SOURCE)
                     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")