From D. Berzano:
add build option to control afdsmgrd builds under cmake.

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@44332 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -55,74 +55,75 @@
   set(explicitlink_defvalue ON)
 endif()

-ROOT_BUILD_OPTION(afs OFF "AFS support, requires AFS libs and objects")
-ROOT_BUILD_OPTION(alien ON "AliEn support, requires libgapiUI from ALICE")
-ROOT_BUILD_OPTION(asimage ON "Image processing support, requires libAfterImage")
+ROOT_BUILD_OPTION(afdsmgrd OFF "Dataset manager for PROOF-based analysis facilities")
+ROOT_BUILD_OPTION(afs OFF "AFS support, requires AFS libs and objects")
+ROOT_BUILD_OPTION(alien ON "AliEn support, requires libgapiUI from ALICE")
+ROOT_BUILD_OPTION(asimage ON "Image processing support, requires libAfterImage")
 ROOT_BUILD_OPTION(astiff ON "Include tiff support in image processing")
-ROOT_BUILD_OPTION(bonjour ON "Bonjour support, requires libdns_sd and/or Avahi")
+ROOT_BUILD_OPTION(bonjour ON "Bonjour support, requires libdns_sd and/or Avahi")
 ROOT_BUILD_OPTION(builtin_afterimage OFF "Built included libAfterImage, or use system libAfterImage")
-ROOT_BUILD_OPTION(builtin_ftgl ON "Built included libFTGL, or use system libftgl")
-ROOT_BUILD_OPTION(builtin_freetype OFF "Built included libfreetype, or use system libfreetype")
+ROOT_BUILD_OPTION(builtin_ftgl ON "Built included libFTGL, or use system libftgl")
+ROOT_BUILD_OPTION(builtin_freetype OFF "Built included libfreetype, or use system libfreetype")
 ROOT_BUILD_OPTION(builtin_glew ON "Built included libGLEW, or use system libGLEW")
-ROOT_BUILD_OPTION(builtin_pcre OFF "Built included libpcre, or use system libpcre")
-ROOT_BUILD_OPTION(builtin_zlib OFF "Built included libz, or use system libz")
-ROOT_BUILD_OPTION(builtin_lzma OFF "Built included liblzma, or use system liblzma")
-ROOT_BUILD_OPTION(builtin_gsl OFF "Built the GSL library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_cfitsio OFF "Built the FITSIO library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_xrootd OFF "Built the XROOTD internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(castor ON "CASTOR support, requires libshift from CASTOR >= 1.5.2")
-ROOT_BUILD_OPTION(chirp ON "Chirp support (Condor remote I/O), requires libchirp_client")
-ROOT_BUILD_OPTION(cintex ON "Build the libCintex Reflex interface library")
+ROOT_BUILD_OPTION(builtin_pcre OFF "Built included libpcre, or use system libpcre")
+ROOT_BUILD_OPTION(builtin_zlib OFF "Built included libz, or use system libz")
+ROOT_BUILD_OPTION(builtin_lzma OFF "Built included liblzma, or use system liblzma")
+ROOT_BUILD_OPTION(builtin_gsl OFF "Built the GSL library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_cfitsio OFF "Built the FITSIO library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_xrootd OFF "Built the XROOTD internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(castor ON "CASTOR support, requires libshift from CASTOR >= 1.5.2")
+ROOT_BUILD_OPTION(chirp ON "Chirp support (Condor remote I/O), requires libchirp_client")
+ROOT_BUILD_OPTION(cintex ON "Build the libCintex Reflex interface library")
 ROOT_BUILD_OPTION(clarens ON "Clarens RPC support, optionally used by PROOF")
 ROOT_BUILD_OPTION(cling ON "Enable new CLING C++ interpreter")
-ROOT_BUILD_OPTION(cocoa OFF "Use native Cocoa/Quartz graphics backend (MacOS X only)")
-ROOT_BUILD_OPTION(dcache ON "dCache support, requires libdcap from DESY")
-ROOT_BUILD_OPTION(exceptions ON "Turn on compiler exception handling capability")
-ROOT_BUILD_OPTION(explicitlink ${explicitlink_defvalue} "Explicitly link with all dependent libraries")
-ROOT_BUILD_OPTION(fftw3 ON "Fast Fourier Transform support, requires libfftw3")
-ROOT_BUILD_OPTION(fitsio ON "Read images and data from FITS files, requires cfitsio")
-ROOT_BUILD_OPTION(gviz ON "Graphs visualization support, requires graphviz")
-ROOT_BUILD_OPTION(gdml OFF "GDML writer and reader")
-ROOT_BUILD_OPTION(genvector ON "Build the new libGenVector library" )
-ROOT_BUILD_OPTION(gfal ON "GFAL support, requires libgfal")
-ROOT_BUILD_OPTION(glite ON "gLite support, requires libglite-api-wrapper v.3 from GSI (https://subversion.gsi.de/trac/dgrid/wiki)")
-ROOT_BUILD_OPTION(globus OFF "Globus authentication support, requires Globus toolkit")
+ROOT_BUILD_OPTION(cocoa OFF "Use native Cocoa/Quartz graphics backend (MacOS X only)")
+ROOT_BUILD_OPTION(dcache ON "dCache support, requires libdcap from DESY")
+ROOT_BUILD_OPTION(exceptions ON "Turn on compiler exception handling capability")
+ROOT_BUILD_OPTION(explicitlink ${explicitlink_defvalue} "Explicitly link with all dependent libraries")
+ROOT_BUILD_OPTION(fftw3 ON "Fast Fourier Transform support, requires libfftw3")
+ROOT_BUILD_OPTION(fitsio ON "Read images and data from FITS files, requires cfitsio")
+ROOT_BUILD_OPTION(gviz ON "Graphs visualization support, requires graphviz")
+ROOT_BUILD_OPTION(gdml OFF "GDML writer and reader")
+ROOT_BUILD_OPTION(genvector ON "Build the new libGenVector library")
+ROOT_BUILD_OPTION(gfal ON "GFAL support, requires libgfal")
+ROOT_BUILD_OPTION(glite ON "gLite support, requires libglite-api-wrapper v.3 from GSI (https://subversion.gsi.de/trac/dgrid/wiki)")
+ROOT_BUILD_OPTION(globus OFF "Globus authentication support, requires Globus toolkit")
 ROOT_BUILD_OPTION(gsl_shared OFF "Enable linking against shared libraries for GSL (default no)")
-ROOT_BUILD_OPTION(hdfs ON "HDFS support; requires libhdfs from HDFS >= 0.19.1")
-ROOT_BUILD_OPTION(krb5 ON "Kerberos5 support, requires Kerberos libs")
-ROOT_BUILD_OPTION(ldap ON "LDAP support, requires (Open)LDAP libs")
-ROOT_BUILD_OPTION(mathmore ON "Build the new libMathMore extended math library, requires GSL (vers. >= 1.8)")
-ROOT_BUILD_OPTION(memstat ${memstat_defvalue} "A memory statistics utility, helps to detect memory leaks")
-ROOT_BUILD_OPTION(minuit2 OFF "Build the new libMinuit2 minimizer library")
-ROOT_BUILD_OPTION(monalisa ON "Monalisa monitoring support, requires libapmoncpp")
-ROOT_BUILD_OPTION(mysql ON "MySQL support, requires libmysqlclient")
-ROOT_BUILD_OPTION(odbc ON "ODBC support, requires libiodbc or libodbc")
-ROOT_BUILD_OPTION(opengl ON "OpenGL support, requires libGL and libGLU")
-ROOT_BUILD_OPTION(oracle ON "Oracle support, requires libocci")
-ROOT_BUILD_OPTION(pch ON)
-ROOT_BUILD_OPTION(peac ON "PEAC, PROOF Enabled Analysis Center, requires Clarens")
-ROOT_BUILD_OPTION(pgsql ON "PostgreSQL support, requires libpq")
-ROOT_BUILD_OPTION(pythia6 ON "Pythia6 EG support, requires libPythia6")
-ROOT_BUILD_OPTION(pythia8 ON "Pythia8 EG support, requires libPythia8")
-ROOT_BUILD_OPTION(python ON "Python ROOT bindings, requires python >= 2.2")
-ROOT_BUILD_OPTION(qt OFF "Qt graphics backend, requires libqt >= 4.x")
-ROOT_BUILD_OPTION(qtgsi OFF "GSI's Qt integration, requires libqt >= 3")
-ROOT_BUILD_OPTION(reflex ON "Build the libReflex dictionary library")
-ROOT_BUILD_OPTION(roofit OFF "Build the libRooFit advanced fitting package")
-ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
-ROOT_BUILD_OPTION(rfio ON "RFIO support, requires libshift from CASTOR >= 1.5.2")
-ROOT_BUILD_OPTION(rpath OFF "Set run-time library load path on executables and shared libraries (at installation area)")
-ROOT_BUILD_OPTION(sapdb ON "MaxDB/SapDB support, requires libsqlod and libsqlrte")
-ROOT_BUILD_OPTION(shadowpw ON "Shadow password support")
-ROOT_BUILD_OPTION(shared ON "Use shared 3rd party libraries if possible")
-ROOT_BUILD_OPTION(soversion OFF "Set version number in sonames (recommended)")
-ROOT_BUILD_OPTION(srp ON "SRP support, requires SRP source tree")
-ROOT_BUILD_OPTION(ssl ON "SSL encryption support, requires openssl")
-ROOT_BUILD_OPTION(table OFF "Build libTable contrib library")
-ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library")
-ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random numbers")
-ROOT_BUILD_OPTION(winrtdebug OFF "Link against the Windows debug runtime library")
-ROOT_BUILD_OPTION(xft ON "Xft support (X11 antialiased fonts)")
+ROOT_BUILD_OPTION(hdfs ON "HDFS support; requires libhdfs from HDFS >= 0.19.1")
+ROOT_BUILD_OPTION(krb5 ON "Kerberos5 support, requires Kerberos libs")
+ROOT_BUILD_OPTION(ldap ON "LDAP support, requires (Open)LDAP libs")
+ROOT_BUILD_OPTION(mathmore ON "Build the new libMathMore extended math library, requires GSL (vers. >= 1.8)")
+ROOT_BUILD_OPTION(memstat ${memstat_defvalue} "A memory statistics utility, helps to detect memory leaks")
+ROOT_BUILD_OPTION(minuit2 OFF "Build the new libMinuit2 minimizer library")
+ROOT_BUILD_OPTION(monalisa ON "Monalisa monitoring support, requires libapmoncpp")
+ROOT_BUILD_OPTION(mysql ON "MySQL support, requires libmysqlclient")
+ROOT_BUILD_OPTION(odbc ON "ODBC support, requires libiodbc or libodbc")
+ROOT_BUILD_OPTION(opengl ON "OpenGL support, requires libGL and libGLU")
+ROOT_BUILD_OPTION(oracle ON "Oracle support, requires libocci")
+ROOT_BUILD_OPTION(pch ON)
+ROOT_BUILD_OPTION(peac ON "PEAC, PROOF Enabled Analysis Center, requires Clarens")
+ROOT_BUILD_OPTION(pgsql ON "PostgreSQL support, requires libpq")
+ROOT_BUILD_OPTION(pythia6 ON "Pythia6 EG support, requires libPythia6")
+ROOT_BUILD_OPTION(pythia8 ON "Pythia8 EG support, requires libPythia8")
+ROOT_BUILD_OPTION(python ON "Python ROOT bindings, requires python >= 2.2")
+ROOT_BUILD_OPTION(qt OFF "Qt graphics backend, requires libqt >= 4.x")
+ROOT_BUILD_OPTION(qtgsi OFF "GSI's Qt integration, requires libqt >= 3")
+ROOT_BUILD_OPTION(reflex ON "Build the libReflex dictionary library")
+ROOT_BUILD_OPTION(roofit OFF "Build the libRooFit advanced fitting package")
+ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
+ROOT_BUILD_OPTION(rfio ON "RFIO support, requires libshift from CASTOR >= 1.5.2")
+ROOT_BUILD_OPTION(rpath OFF "Set run-time library load path on executables and shared libraries (at installation area)")
+ROOT_BUILD_OPTION(sapdb ON "MaxDB/SapDB support, requires libsqlod and libsqlrte")
+ROOT_BUILD_OPTION(shadowpw ON "Shadow password support")
+ROOT_BUILD_OPTION(shared ON "Use shared 3rd party libraries if possible")
+ROOT_BUILD_OPTION(soversion OFF "Set version number in sonames (recommended)")
+ROOT_BUILD_OPTION(srp ON "SRP support, requires SRP source tree")
+ROOT_BUILD_OPTION(ssl ON "SSL encryption support, requires openssl")
+ROOT_BUILD_OPTION(table OFF "Build libTable contrib library")
+ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library")
+ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random numbers")
+ROOT_BUILD_OPTION(winrtdebug OFF "Link against the Windows debug runtime library")
+ROOT_BUILD_OPTION(xft ON "Xft support (X11 antialiased fonts)")
 ROOT_BUILD_OPTION(xml ON "XML parser interface")
 ROOT_BUILD_OPTION(x11 ${x11_defvalue} "X11 support")
 ROOT_BUILD_OPTION(xrootd ON "Build xrootd file server and its client (if supported)")


don't install aardvark source files into packages (#2625)

--- cmake/InstallArangoDBJSClient.cmake
+++ cmake/InstallArangoDBJSClient.cmake
@@ -39,4 +39,9 @@
   REGEX "^.*/.npmignore"                                   EXCLUDE
   REGEX "^.*/expect.js$"                                   EXCLUDE
   REGEX "^.*/.bin"                                         EXCLUDE
+  REGEX "^.*/_admin/aardvark/APP/frontend/html/"           EXCLUDE
+  REGEX "^.*/_admin/aardvark/APP/frontend/img/"            EXCLUDE
+  REGEX "^.*/_admin/aardvark/APP/frontend/js/"             EXCLUDE
+  REGEX "^.*/_admin/aardvark/APP/frontend/scss/"           EXCLUDE
+  REGEX "^.*/_admin/aardvark/APP/frontend/src/"            EXCLUDE
 )


Cleaned up ModuleWholeSlideImaging.cmake

--- cmake/ModuleWholeSlideImaging.cmake
+++ cmake/ModuleWholeSlideImaging.cmake
@@ -2,24 +2,17 @@
     message("-- Whole slide imaging module enabled")
     include(cmake/ExternalOpenSlide.cmake)
     if(WIN32)
-        list(APPEND LIBRARIES libopenslide.lib)
-        list(APPEND FAST_INCLUDE_DIRS ${FAST_EXTERNAL_INSTALL_DIR}/include/openslide/)
-
         # Build TIFF
         include(cmake/ExternalTIFF.cmake)
-        set(TIFF_LIBRARY tiff.lib)
+        list(APPEND LIBRARIES libopenslide.lib tiff.lib)
+        list(APPEND FAST_INCLUDE_DIRS ${FAST_EXTERNAL_INSTALL_DIR}/include/openslide/ ${TIFF_INCLUDE_DIRS})
     else()
+        # Get OpenSlide and TIFF from OS
         find_package(OpenSlide REQUIRED)
+        find_package(TIFF REQUIRED)

-        list(APPEND FAST_INCLUDE_DIRS ${OPENSLIDE_INCLUDE_DIRS})
-        list(APPEND LIBRARIES ${OPENSLIDE_LIBRARIES})
-
-        # Use TIFF from Qt
-        set(TIFF_INCLUDE_DIRS ${FAST_EXTERNAL_BUILD_DIR}/qt5/src/qt5/qtimageformats/src/3rdparty/libtiff/libtiff/)
-        set(TIFF_LIBRARY libtiff.so)
+        list(APPEND LIBRARIES ${OPENSLIDE_LIBRARIES} ${TIFF_LIBRARIES})
+        list(APPEND FAST_INCLUDE_DIRS ${OPENSLIDE_INCLUDE_DIRS} ${TIFF_INCLUDE_DIRS})
      endif()
-    message(STATUS "TIFF FOUND: ${TIFF_LIBRARY} ${TIFF_INCLUDE_DIRS}")
-    list(APPEND FAST_INCLUDE_DIRS ${TIFF_INCLUDE_DIRS})
-    list(APPEND FAST_LIBRARY_DIRS ${FAST_EXTERNAL_INSTALL_DIR}/plugins/imageformats/)
-    list(APPEND LIBRARIES ${TIFF_LIBRARY})
+    message(STATUS "TIFF FOUND: ${TIFF_LIBRARY} ${TIFF_LIBRARIES} ${TIFF_INCLUDE_DIRS}")
 endif()


Update comments.

Update comments.

--- cmake/Modules/FindHinnantDate.cmake
+++ cmake/Modules/FindHinnantDate.cmake
@@ -72,10 +72,8 @@
         unset(HinnantDate_INCLUDE_FILE CACHE)
     else()
         # Check succeeded, create target
-        # remove filename
-        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_FILE}" DIRECTORY)
-        # remove date dir
-        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_DIR}" DIRECTORY)
+        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_FILE}" DIRECTORY) # remove filename
+        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_DIR}" DIRECTORY) # remove date dir
         mark_as_advanced(HinnantDate_INCLUDE_DIR)
         set(HinnantDate_ROOT_DIR "${HinnantDate_INCLUDE_DIR}")
         unset(HinnantDate_NOT_FOUND_MESSAGE)


Add Intel Comet Lake to the microarchitecture detection script (#14414)

* Add Intel Comet Lake to the microarchitecture detection script

* retire cpu microarchitectures older than minimal required(sandy-bridge)

* Fail if CPU is older than Sandy Bridge and ASM optimizations are enabled.

* fix error: actually set march to sandy-bridge

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -127,16 +127,18 @@
          # 4E | Skylake Client
          # 3C | Broadwell (likely a bug in the SDE)
          # 3C | Haswell
-         if(_cpu_model EQUAL 87) # 57
-            set(TARGET_ARCHITECTURE "knl")  # Knights Landing
+         if(_cpu_model EQUAL 165) # Comet lake. Use skylake, the closest march supported by GCC.
+            set(TARGET_ARCHITECTURE "skylake")
+         elseif(_cpu_model EQUAL 142 OR _cpu_model EQUAL 158) # 8E, 9E
+            set(TARGET_ARCHITECTURE "kaby-lake")
+         elseif(_cpu_model EQUAL 102)
+            set(TARGET_ARCHITECTURE "cannonlake")
          elseif(_cpu_model EQUAL 92)
             set(TARGET_ARCHITECTURE "goldmont")
          elseif(_cpu_model EQUAL 90 OR _cpu_model EQUAL 76)
             set(TARGET_ARCHITECTURE "silvermont")
-         elseif(_cpu_model EQUAL 102)
-            set(TARGET_ARCHITECTURE "cannonlake")
-         elseif(_cpu_model EQUAL 142 OR _cpu_model EQUAL 158) # 8E, 9E
-            set(TARGET_ARCHITECTURE "kaby-lake")
+         elseif(_cpu_model EQUAL 87) # 57
+            set(TARGET_ARCHITECTURE "knl")  # Knights Landing
          elseif(_cpu_model EQUAL 85) # 55
             set(TARGET_ARCHITECTURE "skylake-avx512")
          elseif(_cpu_model EQUAL 78 OR _cpu_model EQUAL 94) # 4E, 5E
@@ -149,24 +151,14 @@
             set(TARGET_ARCHITECTURE "ivy-bridge")
          elseif(_cpu_model EQUAL 42 OR _cpu_model EQUAL 45)
             set(TARGET_ARCHITECTURE "sandy-bridge")
-         elseif(_cpu_model EQUAL 37 OR _cpu_model EQUAL 44 OR _cpu_model EQUAL 47)
-            set(TARGET_ARCHITECTURE "westmere")
-         elseif(_cpu_model EQUAL 26 OR _cpu_model EQUAL 30 OR _cpu_model EQUAL 31 OR _cpu_model EQUAL 46)
-            set(TARGET_ARCHITECTURE "nehalem")
-         elseif(_cpu_model EQUAL 23 OR _cpu_model EQUAL 29)
-            set(TARGET_ARCHITECTURE "penryn")
-         elseif(_cpu_model EQUAL 15)
-            set(TARGET_ARCHITECTURE "merom")
-         elseif(_cpu_model EQUAL 28)
-            set(TARGET_ARCHITECTURE "atom")
-         elseif(_cpu_model EQUAL 14)
-            set(TARGET_ARCHITECTURE "core")
-         elseif(_cpu_model LESS 14)
-            message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the generic CPU settings with SSE2.")
+         elseif(_cpu_model GREATER 42)
+            message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the minimum required microarchitecture(sandy-bridge).")
+            set(TARGET_ARCHITECTURE "sandy-bridge")
+         elseif(NOT ASM_OPTIMIZATIONS)
+            message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. This is not fatal because ASM_OPTIMIZATIONS are disabled. If you want to use ASM_OPTIMIZATIONS make sure you have a compliant CPU(sandy-bridge or newer) and review the \"cmake/OptimizeForArchitecture.cmake\" script.")
             set(TARGET_ARCHITECTURE "generic")
          else()
-            message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the 65nm Core 2 CPU settings.")
-            set(TARGET_ARCHITECTURE "merom")
+            message(FATAL_ERROR "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. This is fatal, because ASM_OPTIMIZATIONS are ON. If your CPU microarchitecture is sandy-bridge or newer, please review the \"cmake/OptimizeForArchitecture.cmake\" script. If you have an older CPU, use -DASM_OPTIMIZATIONS=Off.")
          endif()
       elseif(_cpu_family EQUAL 7) # Itanium (not supported)
          message(WARNING "Your CPU (Itanium: family ${_cpu_family}, model ${_cpu_model}) is not supported by OptimizeForArchitecture.cmake.")


Qt 5.9 OSX: Add qtlibpng dependency

Qt 5.9 OSX: Add qtlibpng dependency

--- cmake/Qt5Gui_ZZZ_HunterPlugin.cmake
+++ cmake/Qt5Gui_ZZZ_HunterPlugin.cmake
@@ -83,6 +83,15 @@
       "${_qt_install_prefix}/lib/lib${_qt_platform_support_name}.a"
       "${_qt_install_prefix}/lib/lib${_qt_platform_support_name}_debug.a"
   )
+
+  if(NOT Qt5Core_VERSION VERSION_LESS 5.9)
+    # _png_create_info_struct
+    _qt_cmake_extra_helpers_add_interface_release_debug(
+        Qt5::Gui
+        "${_qt_install_prefix}/lib/libqtlibpng.a"
+        "${_qt_install_prefix}/lib/libqtlibpng_debug.a"
+    )
+  endif()
 elseif(UNIX)
   # Linux


cmake: gcc: target_arm: Force FP hard ABI for DCLS

When Dual-redundant Core Lock-step (DCLS) topology is used, the VFP
registers across the two redundant cores must be manually initialised
and synchronised, and this requires the `-mfloat-abi=hard` option to
be specified.

This commit forces the use of FP "hard" ABI on the VFP-equipped cores
that are configured in DCLS topology.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/compiler/gcc/target_arm.cmake
+++ cmake/compiler/gcc/target_arm.cmake
@@ -14,12 +14,19 @@
   list(APPEND TOOLCHAIN_C_FLAGS   -mfpu=${GCC_M_FPU})
   list(APPEND TOOLCHAIN_LD_FLAGS  -mfpu=${GCC_M_FPU})

-  if    (CONFIG_FP_SOFTABI)
+  if(CONFIG_CPU_HAS_DCLS AND NOT CONFIG_FP_HARDABI)
+    # If the processor is equipped with VFP and configured in DCLS topology,
+    # the FP "hard" ABI must be used in order to facilitate the FP register
+    # initialisation and synchronisation.
+    set(FORCE_FP_HARDABI TRUE)
+  endif()
+
+  if    (CONFIG_FP_HARDABI OR FORCE_FP_HARDABI)
+    list(APPEND TOOLCHAIN_C_FLAGS   -mfloat-abi=hard)
+    list(APPEND TOOLCHAIN_LD_FLAGS  -mfloat-abi=hard)
+  elseif(CONFIG_FP_SOFTABI)
     list(APPEND TOOLCHAIN_C_FLAGS   -mfloat-abi=softfp)
     list(APPEND TOOLCHAIN_LD_FLAGS  -mfloat-abi=softfp)
-  elseif(CONFIG_FP_HARDABI)
-    list(APPEND TOOLCHAIN_C_FLAGS   -mfloat-abi=hard)
-    list(APPEND TOOLCHAIN_LD_FLAGS  -mfloat-abi=hard)
   endif()
 endif()


Revert "toolchain/zephyr: invoke ar with -D for deterministic .a files"

This reverts commit b4078c557ddc / zephyrproject-rtos/zephyr#17495

This revert is needed for two reasons:

1. As reported by Lawrence King at
   https://lists.zephyrproject.org/g/users/message/1566
this breaks incremental builds with ninja:

  cd sample/hello_world
  west build -b qemu_x86
  touch src/main.c
  west build -b qemu_x86

  hello_world/build/../src/main.c:11: multiple definition of main';
  app/libapp.a(main.c.obj):samples/hello_world/build/../src/main.c:11:
  first defined here
  collect2: error: ld returned 1 exit status

  ar tf build/app/libapp.a
   main.c.obj
   main.c.obj

This does NOT break incremental builds with GNU Make, not sure why not.

2. Less urgently, I finally got someone from the CMake team to help me
and point me at an alternative solution that doesn't rely on CMake
internals: https://gitlab.kitware.com/cmake/cmake/issues/19474
I was about to try it when Lawrence reported the regression above.

Signed-off-by: Marc Herbert <77e7c7d746b52c6eb01119b65a031ae1f650246d@intel.com>

--- cmake/toolchain/zephyr/target.cmake
+++ cmake/toolchain/zephyr/target.cmake
@@ -1,34 +1,3 @@
 # SPDX-License-Identifier: Apache-2.0

 include(${ZEPHYR_BASE}/cmake/toolchain/zephyr/${SDK_VERSION}/target.cmake)
-
-
-# For toolchains without a deterministic 'ar' option, see
-# less ideal but tested "strip-nondeterminism" alternative at
-#  https://github.com/marc-hb/zephyr/commits/strip-nondeterminism
-
-# TODO: build future versions of the Zephyr SDK with
-#      --enable-deterministic-archives?
-
-# Ideally we'd want to _append_ -D to the list of flags and operations
-# that cmake already uses by default. However as of version 3.14 cmake
-# doesn't support addition, one can only replace the complete AR command.
-
-# To see what the default flags are and find where they're defined
-# in cmake's code:
-# - comment out the end of the foreach line like this:
-#      foreach(lang ) # ASM C CXX
-# - build any sample with:
-#       2>cmake.log  cmake --trace-expand ...
-# - Search cmake.log for:
-#      CMAKE_.*_ARCHIVE and CMAKE_.*CREATE_STATIC
-
-# CMake's documentation is at node: CMAKE_LANG_CREATE_STATIC_LIBRARY
-
-# At least one .a file needs 'ASM': arch/xtensa/core/startup/ because
-# there's no C file there.
-foreach(lang ASM C CXX)
-  # GNU ar always updates the index: no need for CMAKE_RANLIB
-  SET(CMAKE_${lang}_CREATE_STATIC_LIBRARY
-      "<CMAKE_AR> qcD <TARGET> <LINK_FLAGS> <OBJECTS>")
-endforeach()


removed changed which are just whitespaces

--- config/VIGRA_ADD_NUMPY_MODULE.cmake
+++ config/VIGRA_ADD_NUMPY_MODULE.cmake
@@ -20,12 +20,8 @@
 #        no installation target will be defined). The cmake target name becomes
 #        'vigranumpy_modulename' in order to get useful alphabetic sorting of
 #        targets in project files.
+FUNCTION(VIGRA_ADD_NUMPY_MODULE target)

-
-
-
-FUNCTION(VIGRA_ADD_NUMPY_MODULE target)
-
     # parse the args
     set(v SOURCES)
     set(PART_OF_VIGRANUMPY 0)


ARROW-4969: [C++] Set RPATH in correct order for test executables on OSX

Running `otool -l debug/arrow-scalar-test`:

Before:
```
Load command 17
          cmd LC_RPATH
      cmdsize 56
         path /Users/krisz/.conda/envs/arrow36/lib (offset 12)
Load command 18
          cmd LC_RPATH
      cmdsize 64
         path /Users/krisz/Workspace/arrow/cpp/build/debug/ (offset 12)
```

After:
```
Load command 17
          cmd LC_RPATH
      cmdsize 64
         path /Users/krisz/Workspace/arrow/cpp/build/debug/ (offset 12)
Load command 18
          cmd LC_RPATH
      cmdsize 56
         path /Users/krisz/.conda/envs/arrow36/lib (offset 12)
```

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

Closes #3986 from kszucs/ARROW-4969 and squashes the following commits:

83032da37 <Krisztián Szűcs> swap the rpath order

--- cpp/cmake_modules/BuildUtils.cmake
+++ cpp/cmake_modules/BuildUtils.cmake
@@ -515,7 +515,7 @@
                                      INSTALL_RPATH_USE_LINK_PATH
                                      TRUE
                                      INSTALL_RPATH
-                                     "$ENV{CONDA_PREFIX}/lib;${EXECUTABLE_OUTPUT_PATH}")
+                                     "${EXECUTABLE_OUTPUT_PATH};$ENV{CONDA_PREFIX}/lib")
   endif()

   if(ARG_STATIC_LINK_LIBS)


Bump the hardcoded fallback version

Bump the hardcoded fallback version

Trigger that build now that Tomviz has been tagged...

--- cmake/DetermineTomvizVersion.cmake
+++ cmake/DetermineTomvizVersion.cmake
@@ -7,7 +7,7 @@
 #   tomviz_version
 #   tomviz_version_long

-set(hardcoded_tomviz_version "0.9.0")
+set(hardcoded_tomviz_version "0.9.1")

 function(_set_version_vars versiontext)
   string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)" version_matches "${versiontext}")


Port it

Port it

svn path=/trunk/KDE/kdepim/; revision=882811

--- cmake/modules/FindOpenChange.cmake
+++ cmake/modules/FindOpenChange.cmake
@@ -18,14 +18,13 @@

 else (LIBMAPI_INCLUDE_DIRS AND LIBMAPI_LIBRARIES)
   if(NOT WIN32)
-    INCLUDE(UsePkgConfig)
-
-    PKGCONFIG(libmapi _MAPIIncDir _MAPILinkDir _MAPILinkFlags _MAPICflags)
+    find_package(PkgConfig)
+    pkg_check_modules(LIBMAPI libmapi)
   endif(NOT WIN32)

-  set(LIBMAPI_DEFINITIONS ${_MAPICflags})
-  set(LIBMAPI_INCLUDE_DIRS ${_MAPIIncDir})
-  set(LIBMAPI_LIBRARIES ${_MAPILinkFlags})
+  set(LIBMAPI_DEFINITIONS ${LIBMAPI_CFLAGS})
+  set(LIBMAPI_INCLUDE_DIRS ${LIBMAPI_INCLUDE_DIRS})
+  set(LIBMAPI_LIBRARIES ${LIBMAPI_LIBRARY_DIRS})

   if (LIBMAPI_INCLUDE_DIRS AND LIBMAPI_LIBRARIES)
      set(LIBMAPI_FOUND TRUE)


Set correct INSTALL_INTERFACE for library target

--- cmake/radium_setup_functions.cmake
+++ cmake/radium_setup_functions.cmake
@@ -601,7 +601,7 @@
     target_include_directories(${ARGS_TARGET}
         PUBLIC
         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
-        $<INSTALL_INTERFACE:include/${ARGS_TARGET}>
+        $<INSTALL_INTERFACE:include/${ARGS_TARGET_DIR}>
         )
     message(STATUS " [configure_radium_library] Defining alias ${ARGS_NAMESPACE}::${ARGS_TARGET} for target ${ARGS_TARGET}")
     add_library(${ARGS_NAMESPACE}::${ARGS_TARGET} ALIAS ${ARGS_TARGET})


Use pkg-config in libsndfile module.

Use pkg-config in libsndfile module.

--- cmake_modules/FindLibSndFile.cmake
+++ cmake_modules/FindLibSndFile.cmake
@@ -37,6 +37,11 @@
 #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #

+include(LibFindMacros)
+
+# Use pkg-config to get hints about paths
+libfind_pkg_check_modules(LIBSNDFILE_PKGCONF libsndfile)
+
 if (SNDFILE_LIBRARIES AND SNDFILE_INCLUDE_DIRS)
   # in cache already
   set(SNDFILE_FOUND TRUE)
@@ -46,10 +51,12 @@
     NAMES
       sndfile.h
     PATHS
+      ${LIBSNDFILE_PKGCONF_INCLUDE_DIRS}
       /usr/include
       /usr/local/include
       /opt/local/include
       /sw/include
+      /mingw64/include
   )

   find_library(SNDFILE_LIBRARY
@@ -57,10 +64,12 @@
       sndfile
       libsndfile
     PATHS
+      ${LIBSNDFILE_PKGCONF_LIBRARY_DIRS}
       /usr/lib
       /usr/local/lib
       /opt/local/lib
       /sw/lib
+      /mingw64/lib/
   )

   set(SNDFILE_INCLUDE_DIRS


[added] ability to specify src directory and disable secondary code when not in Boots

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -352,8 +352,12 @@
     BOTG_PreventInSourceBuilds()
     SET(${PROJECT_NAME}_ENABLE_TESTS ON CACHE BOOL "Enable all tests by default.")

-    # Enable all secondary tested code by default.
-    GLOBAL_SET( ${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE ON )
+    # Enable all secondary tested code only if building BootsOnTheGround.
+    SET( enable OFF )
+    IF( "${PROJECT_NAME}" STREQUAL BootsOnTheGround )
+        SET( enable ON )
+    ENDIF()
+    GLOBAL_SET( BootsOnTheGround_ENABLE_SECONDARY_TESTED_CODE ${enable} )

     # Process default flags for each language.
     BOTG_ProcessDefaultFlags( C )
@@ -376,11 +380,14 @@

 ENDMACRO()

-MACRO( BOTG_ConfigurePackage package_name )
+MACRO( BOTG_ConfigurePackage package_name src )

     MESSAGE( STATUS "[BootsOnTheGround] configuring simple package=${package_name} ...")

     TRIBITS_PACKAGE( ${package_name} )
+    IF( NOT src STREQUAL "" )
+        ADD_SUBDIRECTORY( ${src} )
+    ENDIF()
     TRIBITS_PACKAGE_POSTPROCESS()

 ENDMACRO()


[cmake] Add option to compile and not execute a specific test (#268)

- Add BUILD_ONLY as an argument to add_bond_test() CMake function

--- cmake/Bond.cmake
+++ cmake/Bond.cmake
@@ -113,16 +113,22 @@
 #
 # add_bond_test (name
 #   [schem.bond [schema2.bond]]
-#   source.cpp [source2.cpp])
+#   source.cpp [source2.cpp]
+#   [BUILD_ONLY])
 #
 function (add_bond_test test)
+    set (flagArgs BUILD_ONLY)
+    cmake_parse_arguments (arg "${flagArgs}" "" "" ${ARGN})
+    list (REMOVE_ITEM ARGV BUILD_ONLY)
     list (INSERT ARGV 1 EXCLUDE_FROM_ALL)
     add_bond_executable (${ARGV})
     add_dependencies (check ${test})
-    add_test (
-        NAME ${test}
-        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-        COMMAND ${test})
+    if (NOT arg_BUILD_ONLY)
+        add_test (
+            NAME ${test}
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+            COMMAND ${test})
+    endif()
 endfunction()

 #


CMake: the CHECK_ALIGNOF(x) macros were printing !0 exit status

We use exit status here to pass the actual alignment (b/c libc +
printf + windows). This makes the checks silent

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -328,7 +328,7 @@
 endmacro()

 # clang try-compile-run macro, run via lli, the llvm interpreter
-macro(custom_try_run_lli SOURCE1 SOURCE2 OUTPUT_VAR RES_VAR)
+macro(custom_try_run_lli SILENT SOURCE1 SOURCE2 OUTPUT_VAR RES_VAR)
 # this uses "lli" - the interpreter, so we can run any -target
 # TODO variable for target !!
   set(OUTF "${CMAKE_BINARY_DIR}/try_run.bc")
@@ -344,7 +344,7 @@
     execute_process(COMMAND "${LLVM_LLI}" "-force-interpreter" "${OUTF}" RESULT_VARIABLE RESV OUTPUT_VARIABLE ${OUTPUT_VAR} ERROR_VARIABLE EV)
     set(${RES_VAR} ${RESV})
     file(REMOVE "${OUTF}")
-    if(${RESV})
+    if(${RESV} AND (NOT ${SILENT}))
       message(STATUS " ########## The command ${LLVM_LLI} -force-interpreter ${OUTF}")
       message(STATUS " ########## Exited with nonzero status: ${RESV}")
       if(${${OUTPUT_VAR}})
@@ -410,7 +410,7 @@

   if(NOT DEFINED ${CACHE_VAR_NAME})

-    custom_try_run_lli("
+    custom_try_run_lli(TRUE "
 #ifndef offsetof
 #define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
 #endif


More debugging of octave paths

More debugging of octave paths

--- dev/cmake/Modules/FindOctave.cmake
+++ dev/cmake/Modules/FindOctave.cmake
@@ -201,6 +201,8 @@
 endif()

 message(STATUS "OCTAVE_VERSION=${OCTAVE_VERSION}" )
+message(STATUS "OCTAVE_OCTAVE_LIBRARY=${OCTAVE_OCTAVE_LIBRARY}")
+message(STATUS "OCTAVE_OCTINTERP_LIBRARY=${OCTAVE_OCTINTERP_LIBRARY}")
 message(STATUS "OCTAVE_CXXFLAGS=${_mkoctfile_cppflags}" )
 message(STATUS "OCTAVE_LINK_FLAGS=${_mkoctfile_ldflags}" )
 message(STATUS "OCTAVE_INCLUDE_DIRS=${_mkoctfile_includedir}")


Commenting out debug message for the build identifier string.  https://tracker.physiomeproject.org/show_bug.cgi?id=2648

git-svn-id: 4705079bc6b8aadf675e3696f5c015a6aa4916e3@8090 3c1deb5b-d424-0410-962d-aba41a686d42

--- source/configure/GenerateVersionHeader.cmake
+++ source/configure/GenerateVersionHeader.cmake
@@ -29,5 +29,5 @@
 " )

 FILE( WRITE ${CONFIGURED_VERSION_HEADER} ${VERSION_HEADER_STRING} )
-MESSAGE( STATUS "Build information: ${CMAKE_SYSTEM_PROCESSOR} ${OPERATING_SYSTEM} ${CMGUI_USER_INTERFACE} ${LOWERCASE_CURRENT_BUILD_TYPE} ${SVN_REVISION}" )
+#MESSAGE( STATUS "Build information: ${CMAKE_SYSTEM_PROCESSOR} ${OPERATING_SYSTEM} ${CMGUI_USER_INTERFACE} ${LOWERCASE_CURRENT_BUILD_TYPE} ${SVN_REVISION}" )


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 03)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


[Conf] Towards supporting Python3 (but still far from it).

--- config/FindPythonLibsWrapper.cmake
+++ config/FindPythonLibsWrapper.cmake
@@ -9,7 +9,7 @@
 if (PYTHON_INCLUDE_PATH AND "${PYTHON_INCLUDE_DIRS}" STREQUAL "")
   set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH} PARENT_SCOPE)
   set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
-endif ()
+endif (PYTHON_INCLUDE_PATH AND "${PYTHON_INCLUDE_DIRS}" STREQUAL "")

 #
 if ("${PYTHON_LIBRARIES}" MATCHES "libpython[1-9.]*.a")
@@ -19,13 +19,17 @@

   # Set up the versions we know about, in the order we will search. Always add
   # the user supplied additional versions to the front.
+  set(_Python1_VERSIONS 1.6 1.5)
+  set(_Python2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
+  set(_Python3_VERSIONS 3.3 3.2 3.1 3.0)
   set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS}
-	2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+	${_Python1_VERSIONS} ${_Python2_VERSIONS} ${_Python3_VERSIONS})

   foreach (_CURRENT_VERSION ${_Python_VERSIONS})
 	string (REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
 	find_library (PYTHON_DYN_LIBRARY
-      NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION})
+      NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
+	  python${_CURRENT_VERSION_NO_DOTS}mu python${_CURRENT_VERSION}mu)
 	if (NOT "${PYTHON_DYN_LIBRARY}" STREQUAL "")
 	  set (PYTHON_LIBRARIES ${PYTHON_DYN_LIBRARY})
 	endif (NOT "${PYTHON_DYN_LIBRARY}" STREQUAL "")
@@ -45,7 +49,7 @@
   if (PYTHONLIBSWRAPPER_FOUND)
 	mark_as_advanced (PYTHONLIBSWRAPPER_FOUND)
   else (PYTHONLIBSWRAPPER_FOUND)
-	message (FATAL_ERROR "Could not find the PythonLibs libraries! Please install the development-libraries and headers (e.g., 'pythonlibs-devel' for Fedora/RedHat).")
+	message (FATAL_ERROR "Could not find the PythonLibs libraries! Please install the development-libraries and headers (e.g., 'python-devel' for Fedora/RedHat).")
   endif (PYTHONLIBSWRAPPER_FOUND)

 endif ("${PYTHON_LIBRARIES}" MATCHES "libpython[1-9.]*.a")


Fix typo.

Fix typo.

	* cmake/modules/Init.cmake: Here.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/Init.cmake
+++ build-aux/cmake/modules/Init.cmake
@@ -19,6 +19,6 @@
 include(Hostname)
 hostname(BUILDER_HOSTNAME)
 include(PrintVar)
-set(BUIDLFARM $ENV{BUILDFARM})
+set(BUILDFARM $ENV{BUILDFARM})

 endif(NOT DEFINED INIT_CMAKE)


Removing status msg: "Could not find scp or pscp executable" for case when scp not on system.  Clutters output, and is not really necessary.

--- indra/cmake/FindSCP.cmake
+++ indra/cmake/FindSCP.cmake
@@ -30,8 +30,6 @@
 ELSE (SCP_FOUND)
   IF (SCP_FIND_REQUIRED)
     MESSAGE(FATAL_ERROR "Could not find scp or pscp executable")
-  ELSE (SCP_FIND_REQUIRED)
-    MESSAGE(STATUS "Could not find scp or pscp executable")
   ENDIF (SCP_FIND_REQUIRED)
 ENDIF (SCP_FOUND)


Add build option that went missing in the removal of the dlib commits.

--- cmake-local/osvrBuildOptions.cmake
+++ cmake-local/osvrBuildOptions.cmake
@@ -37,6 +37,8 @@

 option(BUILD_HEADER_DEPENDENCY_TESTS "Should we add targets to ensure that every public header compiles cleanly on its own? Increases number of targets greatly..." ${OSVR_ON_UNLESS_SUBPROJECT})

+option(BUILD_ADVANCED_DEV_TOOLS "Should we build tools designed for core developers?" OFF)
+
 # Consistency: can't build the examples, apps, etc if you don't have the library
 set(dependent_options
     BUILD_SERVER_EXAMPLES


Option to enable/disable plugin linking with OpenCV

--- cmake/OpenCVPluginStandalone.cmake
+++ cmake/OpenCVPluginStandalone.cmake
@@ -78,10 +78,17 @@
     set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES PREFIX "${OPENCV_PLUGIN_MODULE_PREFIX}")
   endif()

-  if(APPLE)
-    set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
-  elseif(WIN32)
-    # Hack for Windows only, Linux/MacOS uses global symbol table (without exact .so binding)
+  if(WIN32 OR NOT APPLE)
+    set(OPENCV_PLUGIN_NO_LINK FALSE CACHE BOOL "")
+  else()
+    set(OPENCV_PLUGIN_NO_LINK TRUE CACHE BOOL "")
+  endif()
+
+  if(OPENCV_PLUGIN_NO_LINK)
+    if(APPLE)
+      set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+    endif()
+  else()
     find_package(OpenCV REQUIRED ${module} ${OPENCV_PLUGIN_DEPS})
     target_link_libraries(${OPENCV_PLUGIN_NAME} PRIVATE ${OpenCV_LIBRARIES})
   endif()


Disable gfortran stack-reuse compiler option (#595)

* Disable stack-reuse in gfortran

Ran into an issue with gfortran 9.1.0 on mac where a function within a subroutine used the same stack location for an integer as a variable of a different name in the subroutine.

See commit c35dc09b of the structural control revision for problematic code.  The basic issue was that the ErrStat value of subroutine ParseInputFileInfo was sharing stack space with the CurLine variable.  The function 'Failed' would check the ErrStat2 value and set the ErrStat accordingly, but in optimization -O2 or -O3, the CurLine variable and ErrStat variable were the same stack location, resulting in very strange behaviour.  In this particular case, it caused OpenFAST to abort.  Gfortran 7.x and debug compiles do not show this issue.

 Based on the documentation in section 3.16 from https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc.pdf, this may sometimes occur with legacy code and it is possible we've had this happen in the past and never known about it.  Impact on memory usage is unknown at this time.

* Add link to bug description in PR

Co-authored-by: Rafael M Mudafort <70fe8fcd98d06b6d274772a08e56b6bf4b09fa34@gmail.com>

--- cmake/OpenfastFortranOptions.cmake
+++ cmake/OpenfastFortranOptions.cmake
@@ -107,6 +107,11 @@
   #set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -cpp -fopenmp")
   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -cpp")

+  # Disable stack reuse within routines: issues seen with gfortran 9.x, but others may also exhibit
+  #   see section 3.16 of https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc.pdf
+  #   and https://github.com/OpenFAST/openfast/pull/595
+  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fstack-reuse='none'")
+
   # Deal with Double/Single precision
   if (DOUBLE_PRECISION)
     add_definitions(-DOPENFAST_DOUBLE_PRECISION)


Escape special character ``#`` in git branch names

--- cmake/TrackCapRevisionNumber.cmake
+++ cmake/TrackCapRevisionNumber.cmake
@@ -7,10 +7,15 @@
         )
     INCLUDE(${CMAKE_BINARY_DIR}/cmake/QueryGitRevision.cmake)
     SET_PROPERTY(DIRECTORY ${CMAKE_SOURCE_DIR} APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/.git/HEAD)
+    execute_process(COMMAND
+        ${CMAKE_COMMAND} -E copy_if_different
+            ${CMAKE_SOURCE_DIR}/.git/${GIT_HEAD_REF}
+            ${CMAKE_BINARY_DIR}/escape_hell
+    )
     ADD_CUSTOM_COMMAND(
         OUTPUT ${CMAKE_BINARY_DIR}/cpp/source/version.cc
-        DEPENDS ${CMAKE_SOURCE_DIR}/.git/${GIT_HEAD_REF}
         COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake/QueryGitRevision.cmake
+        DEPENDS ${CMAKE_BINARY_DIR}/escape_hell
         COMMENT "Query git revision"
         )
     ADD_CUSTOM_TARGET(


Make output more clear in RootTestDriver.

--- cmake/modules/RootTestDriver.cmake
+++ cmake/modules/RootTestDriver.cmake
@@ -97,7 +97,11 @@
     endif()

     execute_process(COMMAND ${_cmd} ${_chkout} ${_chkerr} WORKING_DIRECTORY ${CWD} RESULT_VARIABLE _rc)
+
+    message("-- BEGIN TEST OUTPUT --")
     message("${_outvar}")
+    message("-- END TEST OUTPUT --")
+
     file(WRITE ${OUT} "${_outvar}")

     if(DEFINED RC AND (NOT _rc EQUAL RC))


CMake: Rename "include/inst" to "include/install"

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29146 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_deal_ii.cmake
+++ deal.II/cmake/setup_deal_ii.cmake
@@ -104,7 +104,7 @@
     # Otherwise stale headers might get included resulting in a failing
     # build.
     #
-    SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include/inst")
+    SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include/install")
   ELSE()
     SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include")
   ENDIF()


CMake: Add Generator information to detailed.log

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

--- deal.II/cmake/setup_finalize.cmake
+++ deal.II/cmake/setup_finalize.cmake
@@ -121,6 +121,10 @@
 #        CMAKE_BINARY_DIR:       ${CMAKE_BINARY_DIR}
 #        CMAKE_CXX_COMPILER:     ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR}
 #                                ${CMAKE_CXX_COMPILER}
+"
+  )
+_detailed(
+"#        CMAKE_GENERATOR:        ${CMAKE_GENERATOR}
 "
   )
 IF(CMAKE_CROSSCOMPILING)


ffmpeg/3.4: update FFmpeg wrapper 2021.03

- FFmpeg 3.4.8

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,8 +1,8 @@
-# Binaries branch name: ffmpeg/3.4_20200907
-# Binaries were created for OpenCV: 03bee14372f5537daa56c62e771ec16181ca1f98
-ocv_update(FFMPEG_BINARIES_COMMIT "2a96257b743695a47f8012aab1ffb995a1dee8b4")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "5e68a3ff82f43ac6524e50e448a34c9c")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "205db629d893e7d4865fd1459807ff47")
+# Binaries branch name: ffmpeg/3.4_20210302
+# Binaries were created for OpenCV: 2ab1f3f166fccc3a01497209cc01c5cea44ff201
+ocv_update(FFMPEG_BINARIES_COMMIT "e99214251d9f3cde7c48abd46b2259bddc9885b6")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "fad5ada9be36120bba8966709e7953a8")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "650e2272728491923e566f784f79cfef")
 ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")

 function(download_win_ffmpeg script_var)


If libtool creates a lib64 directory for fftw libraries instead of lib, make symbolic link to lib.

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -102,6 +102,15 @@
     set(FFTW_LIBDIR ${ITK_BINARY_DIR}/fftw/lib)
     link_directories(${FFTW_LIBDIR})
     include_directories(${FFTW_INCLUDE_PATH})
+    if(UNIX AND NOT APPLE)
+      if(CMAKE_SIZEOF_VOID_P MATCHES 8)
+        if(EXISTS ${ITK_BINARY_DIR}/fftw/lib64)
+          add_custom_command(TARGET fftwd
+            POST_BUILD
+            COMMAND ln -sf ${ITK_BINARY_DIR}/fftw/lib64 ${ITK_BINARY_DIR}/fftw/lib)
+        endif()
+      endif()
+    endif()
     #
     # copy libraries into install tree
     install(CODE


adding cmake lines to set the compiler's assembler so it can preprocess & pass the assembly files to the linker

--- firmware/mbed/arm_toolchain.cmake
+++ firmware/mbed/arm_toolchain.cmake
@@ -9,3 +9,6 @@
 # specify the cross compiler, later on we will set the correct path
 CMAKE_FORCE_C_COMPILER(arm-none-eabi-gcc GNU)
 CMAKE_FORCE_CXX_COMPILER(arm-none-eabi-g++ GNU)
+
+set(ASM arm-none-eabi-as)
+include(CMakeDetermineASMCompiler)


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -66,7 +66,7 @@
 Comment[ca@valencia]=Dorsal GStreamer del Phonon
 Comment[cs]=Podpůrná vrstva GStreamer pro Phonon
 Comment[da]=GStreamer-backend til Phonon
-Comment[de]=Phonon-Treiber für GStreamer
+Comment[de]=Phonon-Back-End für GStreamer
 Comment[el]=Σύστημα υποστήριξης GStreamer του Phonon
 Comment[en_GB]=Phonon GStreamer backend
 Comment[es]=Motor GStreamer para Phonon


fixed cmake files

fixed cmake files

--- cmake/EthExecutableHelper.cmake
+++ cmake/EthExecutableHelper.cmake
@@ -48,6 +48,7 @@
 		-DLIBS="${DLLS}"
 		-DCONFIGURATION="$<CONFIGURATION>"
 		-DDESTINATION="${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
+	)
 endmacro()

 #


EnableCXX11, abort if cannot find suitable C++11 compiler

--- cmake/Modules/EnableCXX11.cmake
+++ cmake/Modules/EnableCXX11.cmake
@@ -19,7 +19,7 @@
         #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c++0x")
         message(WARNING "Compiler supports only --std=c++0x.")
     else()
-        message(ERROR "Compiler does not support --std=c++11 or --std=c++0x.")
+        message(FATAL_ERROR "Compiler does not support --std=c++11 or --std=c++0x.")
     endif()
 endif()


LINK_FLAGS

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -56,6 +56,7 @@
     # Do the dependency: ADD_SUBDIRECTORY or FIND_PACKAGE
     # ===================================================
     #
+    STRING (TOUPPER ${packageDepend} _PACKAGEDEPEND)
     IF (ALL_IN_ONE)
       GET_FILENAME_COMPONENT(packageDependSourceDirAbsolute ${packageDependSourceDir} ABSOLUTE)
       MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Adding subdirectory ${packageDependSourceDirAbsolute}")
@@ -63,8 +64,7 @@
     ELSE ()
       MESSAGE(STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Looking for ${packageDepend}")
       FIND_PACKAGE (${packageDepend})
-      STRING (TOUPPER ${packageDepend} _FINDPACKAGE)
-      IF (NOT ${_FINDPACKAGE}_FOUND)
+      IF (NOT ${_PACKAGEDEPEND}_FOUND)
         MESSAGE (FATAL_ERROR "[${PROJECT_NAME}-DEPEND-STATUS] Find ${packageDepend} failed")
       ENDIF ()
     ENDIF ()
@@ -114,7 +114,7 @@
           #
           # Include dependency
           #
-          FOREACH (_include_directory ${${packageDepend}_INCLUDE_DIRS})
+          FOREACH (_include_directory ${${_PACKAGEDEPEND}_INCLUDE_DIRS})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_include_directory} include dependency to ${_target}")
             ENDIF ()
@@ -123,7 +123,7 @@
           #
           # Library dependency
           #
-          FOREACH (_library ${${packageDepend}_LIBRARIES})
+          FOREACH (_library ${${_PACKAGEDEPEND}_LIBRARIES})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_library} library dependency to ${_target}")
             ENDIF ()
@@ -132,7 +132,7 @@
           #
           # Compile definitions
           #
-          FOREACH (_flag ${${packageDepend}_C_FLAGS_SHARED})
+          FOREACH (_flag ${${_PACKAGEDEPEND}_C_FLAGS_SHARED})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_flag} compile definition dependency to ${_target}")
             ENDIF ()
@@ -141,7 +141,7 @@
           #
           # Link flags
           #
-          FOREACH (_flag ${${packageDepend}_C_FLAGS_SHARED})
+          FOREACH (_flag ${${_PACKAGEDEPEND}_LINK_FLAGS})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_flag} link flag dependency to ${_target}")
             ENDIF ()
@@ -169,7 +169,7 @@
     ELSE ()
       STRING(REGEX REPLACE " " "\\\\ "  _dependLibraryRuntimeDirectory "${_dependLibraryRuntimeDirectory}")
     ENDIF ()
-    SET(${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_dependLibraryRuntimeDirectory}")
+    SET(${_PACKAGEDEPEND}_RUNTIME_DIRECTORY "${_dependLibraryRuntimeDirectory}")
     IF ("${_test_path}" STREQUAL "")
       MESSAGE(STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Initializing TEST_PATH with PATH")
       SET (_test_path "$ENV{PATH}" )
@@ -179,9 +179,9 @@
     ELSE ()
       SET (SEP ":")
     ENDIF ()
-    SET (_test_path "${${_FINDPACKAGE}_RUNTIME_DIRECTORY}${SEP}${_test_path}")
+    SET (_test_path "${${_PACKAGEDEPEND}_RUNTIME_DIRECTORY}${SEP}${_test_path}")
     IF (MYPACKAGE_DEBUG)
-      MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Prepended ${${_FINDPACKAGE}_RUNTIME_DIRECTORY} to TEST_PATH")
+      MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Prepended ${${_PACKAGEDEPEND}_RUNTIME_DIRECTORY} to TEST_PATH")
     ENDIF ()
     SET_PROPERTY(GLOBAL PROPERTY MYPACKAGE_TEST_PATH "${_test_path}")
   ENDIF ()


Removed obsolete CMake workaround.

Removed obsolete CMake workaround.

--- cmake/OpenCVFindLibsGrfmt.cmake
+++ cmake/OpenCVFindLibsGrfmt.cmake
@@ -199,8 +199,3 @@

   set(HAVE_OPENEXR YES)
 endif()
-
-#cmake 2.8.2 bug - it fails to determine zlib version
-if(ZLIB_FOUND)
-  ocv_parse_header2(ZLIB "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_VERSION)
-endif()


let FindLIbrary script return absolute paths to remove need for link_directories

--- cmake/modules/FindLibrary.cmake
+++ cmake/modules/FindLibrary.cmake
@@ -117,7 +117,7 @@
   ENDIF (NOT _${DEP}_FOUND_LIB_DIR)

   FOREACH(_LIB_DIR ${_${DEP}_FOUND_LIB_DIR})
-    LIST(APPEND _${DEP}_LIBRARIES ${${DEP}_LIB_FILENAME})
+    LIST(APPEND _${DEP}_LIBRARIES "${_LIB_DIR}/${${DEP}_LIB_FILENAME}")
   ENDFOREACH(_LIB_DIR ${_${DEP}_FOUND_INC_DIRS})

   IF (_${DEP}_FOUND_LIB_DIR)


Build everything but the stdlib with function body skipping

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -331,6 +331,11 @@
       set(interface_file "${module_base}.swiftinterface")
       list(APPEND swift_module_flags
            "-emit-module-interface-path" "${interface_file}")
+    endif()
+
+    if (NOT SWIFTFILE_IS_STDLIB_CORE)
+      list(APPEND swift_module_flags
+           "-Xfrontend -experimental-skip-non-inlinable-function-bodies")
     endif()

     # If we have extra regexp flags, check if we match any of the regexps. If so


White space changes according to emacs cmake mode.

svn path=/trunk/; revision=8690

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -33,7 +33,7 @@
 endif(DEFAULT_NO_BINDINGS)

 # Depending on these above options and system resources may also determine
-# the following variables which are largely self-explantory unless documented
+# the following variables which are largely self-explanatory unless documented
 # further.

 #TCL_INCLUDE_PATH
@@ -60,8 +60,8 @@
   # Supplement those results with iTcl and iTk include paths and libraries.
   if(TCL_FOUND)
     message(STATUS
-    "Looking for include paths and libraries for Tcl/Tk - found"
-    )
+      "Looking for include paths and libraries for Tcl/Tk - found"
+      )
     message(STATUS "Looking for tclsh")
     include(FindTclsh)
     if(TCL_TCLSH)
@@ -69,10 +69,10 @@
       message(STATUS "TCL_TCLSH = ${TCL_TCLSH}")
       # test to determine HAVE_TCL_GT_84
       execute_process(
-      COMMAND ${TCL_TCLSH} CheckTCL_GT_84.tcl
-      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules
-      OUTPUT_VARIABLE HAVE_TCL_GT_84
-      )
+	COMMAND ${TCL_TCLSH} CheckTCL_GT_84.tcl
+	WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules
+	OUTPUT_VARIABLE HAVE_TCL_GT_84
+	)
     else(TCL_TCLSH)
       message(STATUS "Looking for tclsh - not found")
       # Fall back to user option for determining HAVE_TCL_GT_84.
@@ -81,8 +81,8 @@
     message(STATUS "HAVE_TCL_GT_84 = ${HAVE_TCL_GT_84}")
   else(TCL_FOUND)
     message(STATUS
-    "Looking for include paths and libraries for Tcl/Tk - not found"
-    )
+      "Looking for include paths and libraries for Tcl/Tk - not found"
+      )
   endif(TCL_FOUND)
   if(TCL_FOUND AND TCL_TCLSH)
     message(STATUS "TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}")
@@ -97,7 +97,7 @@
         set(itcl_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
         foreach(version ${itcl_library_versions})
           find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH}
-                       PATH_SUFFIXES itcl${version})
+            PATH_SUFFIXES itcl${version})
         endforeach(version ${itcl_library_versions})
         if(ITCL_LIBRARY)
           message(STATUS "Looking for itcl library - found")
@@ -105,14 +105,12 @@
           find_path(HAVE_ITCLDECLS_H itclDecls.h ${TCL_INCLUDE_PATH})
         else(ITCL_LIBRARY)
           message(STATUS "Looking for itcl library - not found")
-          message(STATUS "WARNING: Disabling incr Tcl interface code"
-        )
-        set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE)
+          message(STATUS "WARNING: Disabling incr Tcl interface code")
+          set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE)
         endif(ITCL_LIBRARY)
       else(ITCL_INCLUDE_PATH)
         message(STATUS "Looking for itcl.h - not found")
-        message(STATUS "WARNING: Disabling incr Tcl interface code"
-        )
+        message(STATUS "WARNING: Disabling incr Tcl interface code")
         set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE)
       endif(ITCL_INCLUDE_PATH)
     endif(ENABLE_itcl)
@@ -140,8 +138,8 @@
       message(STATUS "TK_LIBRARY = ${TK_LIBRARY}")
     else(ENABLE_tk)
       message(STATUS
-      "WARNING: Because Tk is disabled must disable incr Tk as well"
-      )
+	"WARNING: Because Tk is disabled must disable incr Tk as well"
+	)
       set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)
     endif(ENABLE_tk)
     if(ENABLE_itk)
@@ -153,16 +151,15 @@
         set(itk_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
         foreach(version ${itk_library_versions})
           find_library(ITK_LIBRARY itk${version}
-                       PATH_SUFFIXES itk${version})
+            PATH_SUFFIXES itk${version})
         endforeach(version ${itk_library_versions})
         if(ITK_LIBRARY)
           message(STATUS "Looking for itk library - found")
           set(HAVE_ITK ON)
         else(ITK_LIBRARY)
           message(STATUS "Looking for itk library - not found")
-          message(STATUS "WARNING: Disabling incr Tk interface code"
-        )
-        set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)
+          message(STATUS "WARNING: Disabling incr Tk interface code")
+          set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)
         endif(ITK_LIBRARY)
       else(ITK_INCLUDE_PATH)
         message(STATUS "Looking for itk.h - not found")
@@ -183,9 +180,9 @@
   endif(TCL_FOUND AND TCL_TCLSH)
 else(ENABLE_tcl)
   message(STATUS
-  "ENABLE_tcl is OFF so disabling everything else that "
-  "is Tcl/Tk related"
-  )
+    "ENABLE_tcl is OFF so disabling everything else that "
+    "is Tcl/Tk related"
+    )
   set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE)
   set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE)
   set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)


Use PkgConfig to finde Clipper.

Use PkgConfig to finde Clipper.

--- cmake_modules/FindClipper.cmake
+++ cmake_modules/FindClipper.cmake
@@ -1,6 +1,28 @@
-find_path(Clipper_INCLUDE_DIR polyclipping/clipper.hpp)
-find_library(Clipper_LIBRARIES polyclipping)
+# - Try to find Clipper
+# Once done this will define
+#  Clipper_FOUND - System has Clipper
+#  Clipper_INCLUDE_DIRS - The Clipper include directories
+#  Clipper_LIBRARIES - The libraries needed to use Clipper
+#  Clipper_DEFINITIONS - Compiler switches required for using Clipper
+
+find_package(PkgConfig)
+pkg_check_modules(PC_Clipper QUIET polyclipping.pc)
+set(Clipper_DEFINITIONS ${PC_Clipper_CFLAGS_OTHER})
+
+find_path(Clipper_INCLUDE_DIR polyclipping/clipper.hpp
+  HINTS ${PC_Clipper_INCLUDEDIR} ${PC_Clipper_INCLUDE_DIRS}
+  PATH_SUFFIXES libpolyclipping)
+
+find_library(Clipper_LIBRARY NAMES polyclipping libpolyclipping
+  HINTS ${PC_Clipper_LIBDIR} ${PC_Clipper_LIBRARY_DIRS} )

 include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set Clipper_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(Clipper  DEFAULT_MSG
+  Clipper_LIBRARY Clipper_INCLUDE_DIR)

-find_package_handle_standard_args(Clipper Clipper_INCLUDE_DIR Clipper_LIBRARIES)
+mark_as_advanced(Clipper_INCLUDE_DIR Clipper_LIBRARY)
+
+set(Clipper_LIBRARIES ${Clipper_LIBRARY})
+set(Clipper_INCLUDE_DIRS ${Clipper_INCLUDE_DIR})


Trying to fix xqdoc issue for external modules built with installed zorba.

--- cmake_modules/ZorbaModule.cmake
+++ cmake_modules/ZorbaModule.cmake
@@ -596,9 +596,11 @@
       COMMENT "Building XQDoc XML documentation for ${PROJECT_NAME} module..."
   )
   #SET_TARGET_PROPERTIES(xqdoc-xml-${PROJECT_NAME} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
-  ADD_DEPENDENCIES(xqdoc-xml-${PROJECT_NAME} zorba_simplestore)
-  ADD_DEPENDENCIES(xqdoc-xml-${PROJECT_NAME} xqdoc-xml)
-  ADD_DEPENDENCIES(xqdoc xqdoc-xml-${PROJECT_NAME})
+  IF(TARGET xqdoc-xml)
+    ADD_DEPENDENCIES(xqdoc-xml-${PROJECT_NAME} zorba_simplestore)
+    ADD_DEPENDENCIES(xqdoc-xml-${PROJECT_NAME} xqdoc-xml)
+    ADD_DEPENDENCIES(xqdoc xqdoc-xml-${PROJECT_NAME})
+  ENDIF(TARGET xqdoc-xml)

   SET(ZORBA_XHTML_REQUISITES_PATH ${Zorba_DIR}/xqdoc/requisites CACHE PATH "Dir where to the html requisites are stored")
   ADD_CUSTOM_TARGET(xqdoc-${PROJECT_NAME}
@@ -613,8 +615,8 @@
       -e "\"zorbaVersion:=${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}\""
       COMMENT "Building XQDoc documentation for the ${PROJECT_NAME} module ..."
   )
-  ADD_DEPENDENCIES(xqdoc-${PROJECT_NAME} xqdoc-xml-${PROJECT_NAME} zorba_simplestore)
-  SET_TARGET_PROPERTIES(xqdoc PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
+  ADD_DEPENDENCIES(xqdoc-${PROJECT_NAME} xqdoc-xml-${PROJECT_NAME})
+  SET_TARGET_PROPERTIES(xqdoc-${PROJECT_NAME} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)

 ENDMACRO(ADD_XQDOC_TARGETS)


ARROW-6992: [C++]: Undefined Behavior sanitizer build option fails with GCC

The GCC '-fno-sanitize' option does not support the 'function' flag.
Furthermore, GCC v5.1 is required for the 'vptr' and 'alignment' flags
and the '-fno-sanitize-recover' option.

To make things simple, GCC v5.1 or greater is required for the
undefined behavior sanitizer build option.

Closes #5734 from gawain-bolton/ARROW-6992_undefined_behaviour_sanitizer_build_option_fails_with_gcc and squashes the following commits:

6521ef04d <gawain.bolton> ARROW-6992: : Undefined Behavior sanitizer build option fails with GCC

Authored-by: gawain.bolton <80e8b3fb096aaf569606ffef4aafa80d6cbe4594@cfm.fr>
Signed-off-by: Benjamin Kietzman <be26f8d5d161e4d7965ee00602589fb2b74149f2@gmail.com>

--- cpp/cmake_modules/san-config.cmake
+++ cpp/cmake_modules/san-config.cmake
@@ -35,19 +35,22 @@
 # - disable 'alignment' because unaligned access is really OK on Nehalem and we do it
 #   all over the place.
 # - disable 'function' because it appears to give a false positive https://github.com/google/sanitizers/issues/911
+#   Note: GCC does not support the 'function' flag.
 if(${ARROW_USE_UBSAN})
-  if(NOT
-     (("${COMPILER_FAMILY}" STREQUAL "clang")
-      OR ("${COMPILER_FAMILY}"
-          STREQUAL
-          "gcc"
-          AND "${COMPILER_VERSION}" VERSION_GREATER "4.9")))
-    message(SEND_ERROR "Cannot use UBSAN without clang or gcc >= 4.9")
+  if("${COMPILER_FAMILY}" STREQUAL "clang")
+    set(
+      CMAKE_CXX_FLAGS
+      "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-sanitize=alignment,vptr,function -fno-sanitize-recover=all"
+      )
+  elseif("${COMPILER_FAMILY}" STREQUAL "gcc"
+         AND "${COMPILER_VERSION}" VERSION_GREATER_EQUAL "5.1")
+    set(
+      CMAKE_CXX_FLAGS
+      "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-sanitize=alignment,vptr -fno-sanitize-recover=all"
+      )
+  else()
+    message(SEND_ERROR "Cannot use UBSAN without clang or gcc >= 5.1")
   endif()
-  set(
-    CMAKE_CXX_FLAGS
-    "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-sanitize=alignment,vptr,function -fno-sanitize-recover=all"
-    )
 endif()

 # Flag to enable thread sanitizer (clang or gcc 4.8)


[Config] Added support for Python 3.10

[Config] Added support for Python 3.10

--- config/FindPython/Support.cmake
+++ config/FindPython/Support.cmake
@@ -25,7 +25,7 @@
   message (FATAL_ERROR "FindPython: INTERNAL ERROR")
 endif()
 if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
-  set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+  set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
 elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
   set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
 else()


modules: updated FindCorrade.cmake.

modules: updated FindCorrade.cmake.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -126,7 +126,7 @@
 #
 #   This file is part of Corrade.
 #
-#   Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
+#   Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
 #             Vladimír Vondruš <mosra@centrum.cz>
 #
 #   Permission is hereby granted, free of charge, to any person obtaining a


Possible fix to CMake error

Possible fix to CMake error

git-svn-id: 9be72bd8b79bf6944680671de68cae08993c9086@1686 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/boost/FindBoost.cmake
+++ src/CMake/boost/FindBoost.cmake
@@ -157,7 +157,7 @@
         # This version is a short-form for the requested version with
         # the patch level dropped.
         list(APPEND _boost_TEST_VERSIONS "${version}")
-      endif()
+      endif(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}")
     endforeach(version)
   else(Boost_FIND_VERSION)
     # Any version is acceptable.


fix for some gcc compiler versions that do not match the regex

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -68,8 +68,11 @@
     else()
       message(FATAL_ERROR "Compiler '${CMAKE_CXX_COMPILER_ID}' not supported. Use GNU or Clang instead.")
     endif()
-    string(REGEX MATCH "^[0-9]+\\.[0-9]+" _compiler_version "${CMAKE_CXX_COMPILER_VERSION}")
-    set(_boost_toolset "${_boost_with_toolset}-${_compiler_version}")
+      get_filename_component(_cxx_compiler_name "${CMAKE_CXX_COMPILER}" NAME)
+      string(REGEX MATCH "^[0-9]+\\.[0-9]+" _compiler_version "${CMAKE_CXX_COMPILER_VERSION}")
+      if(_cxx_compiler_name MATCHES "${_compiler_version}")
+        set(_boost_toolset "${_boost_with_toolset}-${_compiler_version}")
+      endif()
   endif()

   if(_boost_toolset)


Adding support for SVN to CPM_EnsureRepoCurrent

--- CPM.cmake
+++ CPM.cmake
@@ -49,8 +49,11 @@
 #
 #  CPM_EnsureRepoIsCurrent(
 #    [TARGET_DIR dir]             # Required - Directory to place repository.
-#    [GIT_REPOSITORY repo]        # Required - Git repository to clone and update in TARGET_DIR.
+#    [GIT_REPOSITORY repo]        # Git repository to clone and update in TARGET_DIR.
 #    [GIT_TAG tag]                # Git tag to checkout.
+#    [SVN_REPOSITORY repo]        # SVN repository to checkout.
+#    [SVN_REVISION rev]           # SVN revision.
+#    [SVN_TRUST_CERT 1]           # Trust the Subversion server site certificate
 #    )
 #
 # CPM also adds the following variables to the global namespace for CPM script
@@ -709,9 +712,7 @@
   endif()
 endmacro()

-function(CPM_EnsureRepoIsCurrent)
-  _cpm_parse_arguments(CPM_EnsureRepoIsCurrent _CPM_REPO_ "${ARGN}")
-
+macro(_cpm_ensure_git_repo_is_current)
   # Tag with a sane default if not present.
   if (DEFINED _CPM_REPO_GIT_TAG)
     set(tag ${_CPM_REPO_GIT_TAG})
@@ -850,8 +851,80 @@
       message("Failed to update submodules in: '${dir}'. Skipping submodule update.")
     endif()
   endif()
+endmacro()
+
+macro(_cpm_ensure_svn_repo_is_current)
+  # Tag with a sane default if not present.
+  if (DEFINED _CPM_REPO_SVN_REVISION)
+    set(revision ${_CPM_REPO_SVN_REVISION})
+  else()
+    set(revision "HEAD")
+  endif()
+
+  find_package(Subversion)
+  if(NOT Subversion_SVN_EXECUTABLE)
+    message(FATAL_ERROR "error: could not find svn for checkout of ${_CPM_REPO_SVN_REPOSITORY}")
+  endif()
+
+  set(repo ${_CPM_REPO_GIT_REPOSITORY})
+  set(dir ${_CPM_REPO_TARGET_DIR})
+
+  if ((DEFINED _CPM_REPO_SVN_TRUST_CERT) AND (_CPM_REPO_TRUST_CERT))
+    set(trustCert "--trust-server-cert")
+  endif()
+
+  set(svn_user_pw_args "")
+  if((DEFINED _CPM_REPO_SVN_USERNAME) AND (_CPM_REPO_SVN_USERNAME))
+    set(svn_user_pw_args ${svn_user_pw_args} "--username=${_CPM_REPO_SVN_USERNAME}")
+  endif()
+  if((DEFINED _CPM_REPO_SVN_PASSWORD) AND (_CPM_REPO_SVN_PASSWORD))
+    set(svn_user_pw_args ${svn_user_pw_args} "--password=${_CPM_REPO_SVN_PASSWORD}")
+  endif()
+
+  if (NOT EXISTS "${dir}/")
+    message(STATUS "SVN checking out repo (${repo} @ revision ${revision})")
+    set(cmd "${Subversion_SVN_EXECUTABLE} co ${repo} -r ${revision}
+      --non-interactive ${trustCert} ${svn_user_pw_args} ${dir}")
+    execute_process(
+      COMMAND ${cmd}
+      RESULT_VARIABLE result
+      OUTPUT_QUIET
+      ERROR_QUIET)
+    if (result)
+      set(msg "Command failed: ${result}\n")
+      set(msg "${msg} '${cmd}'")
+      message(FATAL_ERROR "${msg}")
+    endif()
+  endif()
+
+  # Update the SVN repo.
+  set(cmd "${Subversion_SVN_EXECUTABLE} up -r ${revision}
+    --non-interactive ${trustCert} ${svn_user_pw_args}")
+  execute_process(
+    COMMAND ${cmd}
+    RESULT_VARIABLE result
+    WORKING_DIRECTORY "${dir}"
+    OUTPUT_QUIET
+    ERROR_QUIET)
+  if (result)
+    set(msg "Command failed: ${result}\n")
+    set(msg "${msg} '${cmd}'")
+    message(FATAL_ERROR "${msg}")
+  endif()
+endmacro()
+
+function(CPM_EnsureRepoIsCurrent)
+  _cpm_parse_arguments(CPM_EnsureRepoIsCurrent _CPM_REPO_ "${ARGN}")
+
+  if (DEFINED _CPM_REPO_GIT_REPOSITORY)
+    _cpm_ensure_git_repo_is_current()
+  elseif(DEFINED _CPM_REPO_SVN_REPOSITORY)
+    _cpm_ensure_svn_repo_is_current()
+  else()
+    message(FATAL_ERROR "CPM_EnsureRepoIsCurrent: You must specify an SVN or GIT repository.")
+  endif()
+
 endfunction()
-

 macro(_cpm_get_base_directory VARIABLE_TO_SET)
   # Determine base module directory and target directory for module.


Update FindVMC.cmake

Update FindVMC.cmake

--- ndsim/build/FindVMC.cmake
+++ ndsim/build/FindVMC.cmake
@@ -27,8 +27,9 @@
                                       NO_DEFAULT_PATH
 )

-FIND_PATH(GEANT4VMC_LIBRARY_DIR NAMES libgeant4vmc.so PATHS
-  $ENV{G4_VMC_INSTALL_DIR}/lib64
+FIND_PATH(GEANT4VMC_LIBRARY_DIR NAMES libgeant4vmc.so libgeant4vmc.dylib PATHS
+  $ENV{G4_VMC_INSTALL_DIR}/lib64
+  $ENV{G4_VMC_INSTALL_DIR}/lib
   $ENV{G4_VMC_INSTALL_DIR}/lib/tgt_linux
   $ENV{G4_VMC_INSTALL_DIR}/lib/tgt_linuxicc
   $ENV{G4_VMC_INSTALL_DIR}/lib/tgt_linuxx8664gcc
@@ -55,8 +56,9 @@
                                       NO_DEFAULT_PATH
 )

-FIND_PATH(G4ROOT_LIBRARY_DIR NAMES libg4root.so PATHS
+FIND_PATH(G4ROOT_LIBRARY_DIR NAMES libg4root.so libg4root.dylib PATHS
   $ENV{G4_VMC_INSTALL_DIR}/lib64
+  $ENV{G4_VMC_INSTALL_DIR}/lib
   $ENV{G4_VMC_INSTALL_DIR}/lib/tgt_linux
   $ENV{G4_VMC_INSTALL_DIR}/lib/tgt_linuxicc
   $ENV{G4_VMC_INSTALL_DIR}/lib/tgt_linuxx8664gcc
@@ -78,8 +80,9 @@

 MESSAGE(STATUS "\n Looking for VGM...")

-FIND_PATH(VGM_LIBRARY_DIR NAMES libBaseVGM.so PATHS
+FIND_PATH(VGM_LIBRARY_DIR NAMES libBaseVGM.so libBaseVGM.dylib PATHS
   $ENV{VGM_INSTALL_DIR}/lib64
+  $ENV{VGM_INSTALL_DIR}/lib
   NO_DEFAULT_PATH
 )


Changed link_library to always link static on iOS.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -353,12 +353,16 @@
     set(dllname ${libname})
   endif ()

-  link_external_static(${path} ${libname} TRUE)
-
-  set(fullpath "${MYTHIC_DEPENDENCIES}/${path}/bin")
-  doctor_dynamic(dllname ${fullpath})
-
-  add_custom_command(TARGET ${CURRENT_TARGET} POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy ${fullpath}/${dllname} $<TARGET_FILE_DIR:${CURRENT_TARGET}>
-    )
-endmacro()
+  if (IOS)
+    link_external_static(${path} ${libname})
+  else()
+    link_external_static(${path} ${libname} TRUE)
+
+    set(fullpath "${MYTHIC_DEPENDENCIES}/${path}/bin")
+    doctor_dynamic(dllname ${fullpath})
+
+    add_custom_command(TARGET ${CURRENT_TARGET} POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E copy ${fullpath}/${dllname} $<TARGET_FILE_DIR:${CURRENT_TARGET}>
+      )
+  endif()
+endmacro()


Windows: CMake: Removed VsBuildCommand.

Windows: CMake: Removed VsBuildCommand.

This CMake function was previously used to generate a `.bat` script on
Windows that would build the project. However, this is unnecessary, as
the command `cmake --build .` performs the same function.

Review: https://reviews.apache.org/r/59771/

--- 3rdparty/libprocess/cmake/macros/VsBuildCommand.cmake
+++ 3rdparty/libprocess/cmake/macros/VsBuildCommand.cmake
@@ -1,46 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-##############################################################
-# VS_BUILD_CMD generates a build command for project which have Visual Studio
-# Solution File(.sln). For example, when we want to build GLOG through Visual
-# Studio in command line, we would run this command. It would define
-# ${LIB_NAME_UPPER}_BUILD_CMD with build command finally.
-function(
-    VS_BUILD_CMD
-    LIB_NAME
-    SOLUTION_FILE
-    BUILD_CONFIGURATION
-    PROJECT_ROOT
-    PROJECT_NAMES)
-
-  string(TOUPPER ${LIB_NAME} LIB_NAME_UPPER)
-
-  set(VS_BUILD_SCRIPT
-    ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat)
-  set(BUILD_CMD_VAR ${LIB_NAME_UPPER}_BUILD_CMD)
-
-  # Generate the build command with ${VS_BUILD_SCRIPT}.
-  ## 1. Convert the path to Windows style.
-  file(
-    TO_NATIVE_PATH
-    "${VS_BUILD_SCRIPT} ${SOLUTION_FILE} ${BUILD_CONFIGURATION} ${PROJECT_ROOT} ${PROJECT_NAMES}"
-    BUILD_CMD_STRING)
-  ## 2. Convert the command to list so that CMake could handle it correctly.
-  string(REPLACE " " ";" BUILD_CMD ${BUILD_CMD_STRING})
-
-  set(${BUILD_CMD_VAR} ${BUILD_CMD} PARENT_SCOPE)
-endfunction()


Fix message about test input locations

Fix message about test input locations

--- test/testing.cmake
+++ test/testing.cmake
@@ -1,9 +1,9 @@
 set(MESHES ""
     CACHE STRING
-    "Extracted http://scorec.rpi.edu/pumi/pumi_test_meshes.tar.gz")
+    "See sub module pumi_meshes")
 set(GRAPHS ""
     CACHE STRING
-    "Extracted http://scorec.rpi.edu/pumi/pumi_test_meshes.tar.gz")
+    "See sub module EnGPar-graphs")

 function(mpi_test TESTNAME PROCS EXE)
   add_test(


Modification du script de recherche de FreeTDS pour éviter des
ambigüités de path sous linux

git-svn-id: d30e9ebd5e731d506e3e731e014b27e1f54e3bfc@23 a734f7ea-df10-47d3-a172-9f42111c9061

--- source/cmake_modules/FindfreeTDS.cmake
+++ source/cmake_modules/FindfreeTDS.cmake
@@ -1,14 +1,13 @@
 IF(MSVC)
   FIND_PATH(FreeTDS_INCLUDE_DIR sqlfront.h PATHS D:/freeTDS/include c:/freeTDS/include)
+  IF(CMAKE_CFG_INTDIR MATCHES "Debug")
+    SET(FreeTDS_LIBRARY_DIR ${FreeTDS_INCLUDE_DIR}/../lib-debug)
+  else(CMAKE_CFG_INTDIR MATCHES "Debug")
+    SET(FreeTDS_LIBRARY_DIR ${FreeTDS_INCLUDE_DIR}/../lib)
+  ENDIF(CMAKE_CFG_INTDIR MATCHES "Debug")
 ELSE(MSVC)
   FIND_PATH(FreeTDS_INCLUDE_DIR sqlfront.h PATHS C:/mingw)
 ENDIF(MSVC)
-
-IF(CMAKE_CFG_INTDIR MATCHES "Debug")
-  SET(FreeTDS_LIBRARY_DIR ${FreeTDS_INCLUDE_DIR}/../lib-debug)
-else(CMAKE_CFG_INTDIR MATCHES "Debug")
-  SET(FreeTDS_LIBRARY_DIR ${FreeTDS_INCLUDE_DIR}/../lib)
-ENDIF(CMAKE_CFG_INTDIR MATCHES "Debug")

 IF(MSVC)
   FIND_LIBRARY(FreeTDS_DBLIB NAMES dblib PATHS ${FreeTDS_LIBRARY_DIR})
@@ -25,7 +24,7 @@
     SET(FreeTDS_FOUND TRUE)
   ENDIF(FreeTDS_SYBDB AND FreeTDS_INCLUDE_DIR)
 ENDIF(MSVC)
-MESSAGE(STATUS "Found FreeTDS: ${FreeTDS_LIBS} ${FreeTDS_SYBDB}")
+
 IF (FreeTDS_FOUND)
    IF (NOT FreeTDS_FIND_QUIETLY)
       MESSAGE(STATUS "Found FreeTDS: ${FreeTDS_LIBS}")


CMake things...

CMake things...

--- x86_energyConfig.cmake
+++ x86_energyConfig.cmake
@@ -1,4 +1,6 @@
 include("${CMAKE_CURRENT_LIST_DIR}/ix86_energyTargets.cmake")
+
+set(x86_energy_FOUND TRUE)

 get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
 get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)


Epic bugfix: Provide full path of comparison file

ndiff tricked me (diff succeeded if second file was nonexistent or short...)

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30641 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
@@ -29,6 +29,7 @@

   FILE(GLOB _tests "*.output")
   FOREACH(_test ${_tests})
+    SET(_comparison ${_test})

     #
     # Respect TEST_PICKUP_REGEX: Make sure we are allowed to pickup this
@@ -86,7 +87,6 @@
         SET(_configuration)
       ENDIF()

-      SET(_comparison ${_test})
       STRING(REGEX REPLACE "\\..*" "" _test ${_test})
       DEAL_II_ADD_TEST(${_category} ${_test} ${_comparison} ${_n_cpu} ${_configuration})
     ENDIF()


Simplify target selection in DEAL_II_SETUP_TARGET()

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

--- deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
+++ deal.II/cmake/macros/macro_deal_ii_setup_target.cmake
@@ -45,7 +45,7 @@
   GET_DIRECTORY_PROPERTY(_inc_dirs_so_far INCLUDE_DIRECTORIES)
   SET_TARGET_PROPERTIES(${_target} PROPERTIES
     INCLUDE_DIRECTORIES
-      "${_inc_dirs_so_far};${DEAL_II_EXTERNAL_INCLUDE_DIRS};${DEAL_II_INCLUDE_DIRS}"
+      "${_inc_dirs_so_far};${DEAL_II_INCLUDE_DIRS}"
     LINK_FLAGS
       "${DEAL_II_LINKER_FLAGS}"
     COMPILE_DEFINITIONS
@@ -62,25 +62,14 @@
       COMPILE_DEFINITIONS_${_build}
         "${DEAL_II_USER_DEFINITIONS_${_build}}"
       )
-
   ENDFOREACH()

   #
-  # Link againgst the correct deal.II library target for the current
-  # CMAKE_BUILD_TYPE:
+  # Link against the deal.II targets:
   #
-  STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _build)
-  IF(NOT "${DEAL_II_TARGET_${_build}}" STREQUAL "")
-    TARGET_LINK_LIBRARIES(${_target}
-      ${DEAL_II_TARGET_${_build}}
-      )
-  ELSE()
-    MESSAGE(FATAL_ERROR
-      "\nNo matching deal.II library target for current build type: "
-      "\"${CMAKE_BUILD_TYPE}\"\n"
-      "Candidates are (case insensitive): ${DEAL_II_BUILD_TYPES}\n\n"
-      )
-  ENDIF()
+  TARGET_LINK_LIBRARIES(${_target}
+    ${DEAL_II_TARGET}
+    )

 ENDMACRO()


Propogate CPM_LIBRARIES passed function scope.

See previous commit message for rational on propogating CPM_LIBRARIES
upwards through the function and subdirectory scopes.

--- CPM.cmake
+++ CPM.cmake
@@ -659,7 +659,6 @@
   # Added so only one target_link_libraries will be required at the application
   # level instead of calling target_link_libraries in every module.
   if (CPM_LIBRARIES)
-    list(REMOVE_DUPLICATES CPM_LIBRARIES)
     set(CPM_LIBRARIES ${CPM_LIBRARIES} PARENT_SCOPE)
   endif()

@@ -1811,7 +1810,8 @@
     if (("${TARGET_TYPE}" STREQUAL "STATIC_LIBRARY")
       OR ("${TARGET_TYPE}" STREQUAL "MODULE_LIBRARY")
       OR ("${TARGET_TYPE}" STREQUAL "SHARED_LIBRARY"))
-      set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
+      set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}")
+      set(CPM_LIBRARIES ${CPM_LIBRARIES} PARENT_SCOPE)
     endif()
     set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
   else()
@@ -1843,6 +1843,14 @@
   _cpm_propogate_target_lib_map_up()
   _cpm_propogate_export_map_up()
   _cpm_propogate_forward_decl_map_up()
+
+  # Propogate CPM_LIBRARIES upwards and remove any duplicates that may exist.
+  # Added so only one target_link_libraries will be required at the application
+  # level instead of calling target_link_libraries in every module.
+  if (CPM_LIBRARIES)
+    list(REMOVE_DUPLICATES CPM_LIBRARIES)
+    set(CPM_LIBRARIES ${CPM_LIBRARIES} PARENT_SCOPE)
+  endif()

   if (COMMAND CPM_PostModuleExecCallback)
     CPM_PostModuleExecCallback()


Bump CTK,VTK,ITK,SlicerExecModel to Slicer versions

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -30,7 +30,7 @@

 # Common Toolkit snapshot 2014-01-03
 set( CTK_URL ${github_protocol}://github.com/commontk/CTK.git )
-set( CTK_HASH_OR_TAG cb53ac3a1906e7a9535e8c7920a6436c5ad23b4b )
+set( CTK_HASH_OR_TAG 6983eccff0bd161df0329b3a1a33d9f235b6baa0 )

 # TubeTK Image Viewer snapshot 2015-01-09
 set( ImageViewer_URL ${github_protocol}://github.com/KitwareMedical/ImageViewer.git )
@@ -38,7 +38,7 @@

 # Insight Segmentation and Registration Toolkit
 set( ITK_URL ${github_protocol}://github.com/Slicer/ITK.git )
-set( ITK_HASH_OR_TAG f5e429abeba93b773ec52b8f012e16de338bcaaf )
+set( ITK_HASH_OR_TAG 9c9b3100258bd339b0b65f1e9a2a087ebf799707 )

 # JsonCpp snapshot 2014-04-15 r276
 # ${svn_protocol}://svn.code.sf.net/p/jsoncpp/code/trunk/jsoncpp )
@@ -58,8 +58,8 @@
 # Slicer Execution Model snapshot 2014-05-13
 set( SlicerExecutionModel_URL
   ${github_protocol}://github.com/Slicer/SlicerExecutionModel.git )
-set( SlicerExecutionModel_HASH_OR_TAG a6616b527dc0dced26256f6a303174a98f373f6f )
+set( SlicerExecutionModel_HASH_OR_TAG b31b424a2e18fa7e9ada11433a16b1e148d6cdd8 )

 # Visualization Toolkit (3D Slicer fork) snapshot 2013-08-20 06:54:45
 set( VTK_URL ${github_protocol}://github.com/Slicer/VTK.git )
-set( VTK_HASH_OR_TAG ea7cdc4e0b399be244e79392c67fed068c33e454 )
+set( VTK_HASH_OR_TAG c9fd5fb5deedc0af5c28489a81e137f5cc2941bd )


Check for local boost before system boost.  Helps build

--- CMake/FindBoost.cmake
+++ CMake/FindBoost.cmake
@@ -158,12 +158,13 @@

 endmacro()

+
 if(NOT BOOST_FOUND)
-	DO_FIND_BOOST_SYSTEM()
+	DO_FIND_BOOST_ROOT()
 endif()

 if(NOT BOOST_FOUND)
-	DO_FIND_BOOST_ROOT()
+	DO_FIND_BOOST_SYSTEM()
 endif()

 if(NOT BOOST_FOUND)


Attempt to fix Brett's build.

Attempt to fix Brett's build.

--- CMake/FindCEGUI.cmake
+++ CMake/FindCEGUI.cmake
@@ -45,7 +45,6 @@
         ~/LIBRARIES/Frameworks
         /LIBRARIES/Frameworks
         /usr/local/lib
-        /usr/lib
         /usr/local/lib/CEGUI
         /usr/lib/cegui-0.7.1
         /sw/lib


Use relative path for coverage file.

Use relative path for coverage file.

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -870,11 +870,8 @@
                                             "${ERROR_LOG}"
                                             COVERAGE_FILES ${COVERAGE_FILES})

-            get_filename_component (ABSOLUTE_COVERAGE_FILE_PATH
-                                    "${CMAKE_UNIT_COVERAGE_FILE}"
-                                    ABSOLUTE)
-
-            file (APPEND "${ABSOLUTE_COVERAGE_FILE_PATH}"
+            # Use relative path
+            file (APPEND "${CMAKE_UNIT_COVERAGE_FILE}"
                   ${COVERAGE_FILE_CONTENTS})

         endif ()


cmake: make FindTBB.cmake search in the TBB_ROOT/lib folder for libs

This is a fairly standard way to install libraries and how we do things at DLS.

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -91,13 +91,13 @@

     #Find TBB Libraries
     set (_TBB_LIBRARY_DIR ${TBB_ROOT}/lib/${TBB_ARCH_PLATFORM} )
-    find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER}
+    find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib
                 PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER}
+    find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib
                 PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER}
+    find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib
                 PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER}
+    find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib
                 PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)

     message ("TBB_LIBRARY:" ${TBB_LIBRARY})


Quick-fix for building shared library.

Quick-fix for building shared library.

--- cmake/Install.cmake
+++ cmake/Install.cmake
@@ -16,7 +16,7 @@
 get_filename_component(__FILENAME "${__LOCATION}" NAME)
 set(INSTALL_TARGET_LIST "${INSTALL_TARGET_LIST}\nset_target_properties(CGUL PROPERTIES IMPORTED_LOCATION \"\${CMAKE_CURRENT_LIST_DIR}/../${CGUL_LIB_DIR}/${__FILENAME}\")")

-if(WIN32 AND CGUL_STATIC)
+if(WIN32 AND NOT CGUL_STATIC)

     set(INSTALL_TARGET_LIST "${INSTALL_TARGET_LIST}\nset_target_properties(CGUL PROPERTIES IMPORTED_IMPLIB \"\${CMAKE_CURRENT_LIST_DIR}/../${CGUL_LIB_DIR}/${__FILENAME}\")")


Fix .version file creation

Fix .version file creation

--- cmake/git-ver.cmake
+++ cmake/git-ver.cmake
@@ -4,18 +4,17 @@
 ### source is not under source control - take from .version
 ### file. Otherwise current version is 0.0

+## Get version
 if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
   execute_process (COMMAND git describe
     OUTPUT_VARIABLE GIT_TAG_VERSION)
-  if (GIT_TAG_VERSION)
-    file (WRITE .version "${GIT_TAG_VERSION}")
-  endif ()
 else ()
   if (EXISTS "${CMAKE_SOURCE_DIR}/.version")
     execute_process (COMMAND cat .version
       OUTPUT_VARIABLE GIT_TAG_VERSION)
   endif ()
 endif ()
+
 ## Parse version
 if (NOT GIT_TAG_VERSION)
   message (WARNING "No version information was found! "
@@ -23,8 +22,6 @@
   set (TRUT_VERSION_MAJOR 0)
   set (TRUT_VERSION_MINOR 0)
   set (TRUT_VERSION_PATCH 0)
-  set (TRUT_VERSION "0.0.0")
-  set (TRUT_VERSION_FULL "unknown")
 else ()
   execute_process (COMMAND echo "${GIT_TAG_VERSION}"
     COMMAND sed -ne "s/^v\\([[:digit:]]*\\)\\..*/\\1/p"
@@ -42,13 +39,17 @@
     COMMAND sed -ne "s/.*-\\(.*\\)/\\1/p"
     OUTPUT_VARIABLE TRUT_VERSION_DIRT
     OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif ()

-  set (TRUT_VERSION "${TRUT_VERSION_MAJOR}.${TRUT_VERSION_MINOR}.${TRUT_VERSION_PATCH}")
-  if (TRUT_VERSION_DIRT)
-    set (TRUT_VERSION_FULL "${TRUT_VERSION}-${TRUT_VERSION_DIRT}")
-  else ()
-    set (TRUT_VERSION_FULL "${TRUT_VERSION}")
-  endif ()
-
-  message (STATUS "Building version: ${TRUT_VERSION_FULL}")
+## Compose version strings
+set (TRUT_VERSION "${TRUT_VERSION_MAJOR}.${TRUT_VERSION_MINOR}.${TRUT_VERSION_PATCH}")
+if (TRUT_VERSION_DIRT)
+  set (TRUT_VERSION_FULL "${TRUT_VERSION}-${TRUT_VERSION_DIRT}")
+else ()
+  set (TRUT_VERSION_FULL "${TRUT_VERSION}")
 endif ()
+
+## Create version file
+file (WRITE .version "v${TRUT_VERSION_FULL}")
+
+message (STATUS "Building version: ${TRUT_VERSION_FULL}")


fix install target

fix install target

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -32,16 +32,16 @@

 install(
     FILES
-        lazperf/lazperf.hpp
-        lazperf/filestream.hpp
-        lazperf/vlr.hpp
-        lazperf/io.hpp
+        ./cpp/lazperf/lazperf.hpp
+        ./cpp/lazperf/filestream.hpp
+        ./cpp/lazperf/vlr.hpp
+        ./cpp/lazperf/io.hpp
     DESTINATION
         include/lazperf
 )
 install(
     FILES
-        lazperf/lazperf_user_base.hpp
+        ./cpp/lazperf/lazperf_user_base.hpp
     DESTINATION
         include/lazperf
     RENAME


statically link quadmath

statically link quadmath

--- cmake/osx_gcc.cmake
+++ cmake/osx_gcc.cmake
@@ -14,7 +14,8 @@
 SET (BOOST_INCLUDE "/usr/local/include")
 SET (BOOST_ARCHIVE )

-SET (QUADMATH_ARCHIVE "-lquadmath")
+SET (QUADMATH_ARCHIVE /usr/local/Cellar/gcc/8.1.0/lib/gcc/8/libquadmath.a)
+#SET (QUADMATH_ARCHIVE "-lquadmath")
 SET (EXTERNAL_LIB ${PROJECT_SOURCE_DIR}/external)
 #SET (BLAS_ARCHIVE  -lblas -llapack)
 #SET (BLAS_ARCHIVE  -lblas -llapack ${EXTERNAL_LIB}/getrf/build/libgetrf.a)


Issue #27: Add dependency on VLMain

Issue #27: Add dependency on VLMain

--- CMake/mpIncludeVL.cmake
+++ CMake/mpIncludeVL.cmake
@@ -13,7 +13,7 @@
 #============================================================================*/

 if(BUILD_VL)
-  set(_vl_components VLCore VLGraphics VLVolume)
+  set(_vl_components VLMain VLCore VLGraphics VLVolume)
   if(MYPROJECT_USE_QT)
     list(APPEND _vl_components VLQt5)
   endif()


SVN_MERGE

SVN_MERGE

Merged revisions 1042809,1042999 via svnmerge from
https://vkrause@svn.kde.org/home/kde/trunk/KDE/kdepimlibs

........
  r1042809 | tokoe | 2009-10-30 20:01:28 +0100 (Fri, 30 Oct 2009) | 4 lines

  Allow the user to pre-select a drag'n'drop action by using modifier keys

  BUG: 212355
........
  r1042999 | mueller | 2009-10-31 14:08:58 +0100 (Sat, 31 Oct 2009) | 2 lines

  build with KDE4_DEFINITONS,which might contain -D_FILE_OFFSET_BITS=64
........

svn path=/branches/work/akonadi-ports/kdepimlibs/; revision=1043664

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -4,6 +4,7 @@
 if ( GPGME_FOUND )

 set(CMAKE_REQUIRED_INCLUDES ${GPGME_INCLUDES})
+set(CMAKE_REQUIRED_DEFINITIONS ${KDE4_DEFINITIONS})
 set(CMAKE_REQUIRED_LIBRARIES)
 foreach( _FLAVOUR VANILLA PTHREAD QT PTH GLIB )
   if ( NOT CMAKE_REQUIRED_LIBRARIES )


Restrict test for -std=c++11 and -std=c++0x compiler flags to GCC and Clang.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -7,14 +7,17 @@
 include(CheckCXXSourceCompiles)
 include(CheckCXXCompilerFlag)

-CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
-if (COMPILER_SUPPORTS_CXX11)
-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-elseif (COMPILER_SUPPORTS_CXX0X)
-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-else ()
-  message (STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler or set up compiler flags enabling C++11.")
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+  CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+  CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+  if (COMPILER_SUPPORTS_CXX11)
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+  elseif (COMPILER_SUPPORTS_CXX0X)
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+  else ()
+    message (STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
+    message (STATUS "Please use a different C++ compiler or set up compiler flags enabling C++11.")
+  endif ()
 endif ()

 check_include_files(dlfcn.h       HAVE_DLFCN_H)


Solved bug in qt resource adding in common_application.

--- CommonApplication.cmake
+++ CommonApplication.cmake
@@ -38,7 +38,7 @@
     include_directories(${PROJECT_BINARY_DIR})
   endif()
   if(${NAME}_RESOURCES)
-    qt4_add_resources(QRC_SOURCES ${LIVREGUI_RESOURCES})
+    qt4_add_resources(QRC_SOURCES ${${NAME}_RESOURCES})
     list(APPEND SOURCES ${QRC_SOURCES})
   endif()


Update some outdated CMake code

Update some outdated CMake code

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -65,9 +65,8 @@
   halide_generator_output_path(${unique_generator_target} SCRATCH_DIR)

   # Determine the name of the output files
-  # CMake 2.8 doesn't have string(CONCAT), so fake it like so:
-  string(REPLACE ".lib" "${CMAKE_STATIC_LIBRARY_SUFFIX}" FILTER_LIB "${args_GENERATED_FUNCTION}.lib" )
-  string(REPLACE ".h" ".h" FILTER_HDR "${args_GENERATED_FUNCTION}.h" )
+  set(FILTER_LIB "${args_GENERATED_FUNCTION}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+  set(FILTER_HDR "${args_GENERATED_FUNCTION}.h")

   # Check to see if the target includes pnacl
   if ("${args_GENERATOR_ARGS}" MATCHES ".*pnacl.*")


disabled hunter support for now

disabled hunter support for now

--- share/hugh/cmake/SetupHunter.cmake
+++ share/hugh/cmake/SetupHunter.cmake
@@ -5,6 +5,9 @@
 # Copyright (C) 2016 University of Hull                                                            #
 #                                                                                #
 ####################################################################################################
+
+message(STATUS "Support for 'Hunter' currently disabled")
+return()

 include(${CMAKE_CURRENT_LIST_DIR}/HunterGate.cmake)


CMake: allow to control resource paths (#2199)

This commit introduced two CMake options `OGRE_MEDIA_PATH` and
`OGRE_PLUGINS_PATH` to control such paths.

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -11,33 +11,63 @@
 # Generate and install the config files needed for the samples
 ##################################################################

+if (NOT OGRE_MEDIA_PATH)
+  if (WIN32)
+    set(OGRE_MEDIA_PATH "Media")
+    set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
+  elseif (APPLE)
+    set(OGRE_MEDIA_PATH "Media")
+    if(APPLE_IOS)
+      set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
+    else()
+      set(OGRE_MEDIA_DIR_REL "../${OGRE_MEDIA_PATH}")
+    endif()
+  elseif (UNIX)
+    set(OGRE_MEDIA_PATH "share/OGRE/Media")
+    set(OGRE_MEDIA_DIR_REL "./Media")
+  endif()
+else ()
+  set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
+endif()
+
+if (NOT OGRE_PLUGINS_PATH)
+  if (WIN32)
+    set(OGRE_PLUGINS_PATH "bin")
+    set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/bin")
+  elseif (APPLE)
+    set(OGRE_PLUGINS_PATH "lib/${CMAKE_BUILD_TYPE}")
+    set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_BUILD_TYPE}/")
+  elseif (UNIX)
+    set(OGRE_PLUGINS_PATH "${OGRE_LIB_DIRECTORY}/OGRE")
+    set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE")
+  endif()
+else ()
+  set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_PLUGINS_PATH}")
+endif()
+
+if (NOT OGRE_CFG_INSTALL_PATH)
+  if (WIN32 OR APPLE)
+    set(OGRE_CFG_INSTALL_PATH "bin")
+  elseif (UNIX)
+    set(OGRE_CFG_INSTALL_PATH "share/OGRE")
+  endif()
+endif()
+
 if (WIN32)
-  set(OGRE_MEDIA_PATH "Media")
-  set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
   set(OGRE_TEST_MEDIA_DIR_REL "../Tests/${OGRE_MEDIA_PATH}")
-  set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/bin")
   set(OGRE_SAMPLES_DIR_REL ".")
-  set(OGRE_CFG_INSTALL_PATH "bin")
 elseif (APPLE)
-  set(OGRE_MEDIA_PATH "Media")
   if(APPLE_IOS)
-    set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
     set(OGRE_TEST_MEDIA_DIR_REL "../../Tests/${OGRE_MEDIA_PATH}")
   else()
-    set(OGRE_MEDIA_DIR_REL "../${OGRE_MEDIA_PATH}")
     set(OGRE_TEST_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/Tests/Media")
   endif()
   # these are resolved relative to the app bundle
-  set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_BUILD_TYPE}/")
   set(OGRE_SAMPLES_DIR_REL "Contents/Plugins/")
   set(OGRE_CFG_INSTALL_PATH "bin")
 elseif (UNIX)
-  set(OGRE_MEDIA_PATH "share/OGRE/Media")
-  set(OGRE_MEDIA_DIR_REL "./Media")
   set(OGRE_TEST_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/Tests/Media")
-  set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE")
   set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples")
-  set(OGRE_CFG_INSTALL_PATH "share/OGRE")
 endif ()

 # generate OgreConfigPaths.h
@@ -210,16 +240,22 @@
 # Create the CMake package files
 include(CMakePackageConfigHelpers)

-if(WIN32 OR APPLE)
-  set(OGRE_CMAKE_DIR "CMake")
-else()
-  set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
-endif()
-if(WIN32)
-  set(OGRE_PLUGIN_DIR_CMAKE "bin")
-else()
-  set(OGRE_PLUGIN_DIR_CMAKE "${OGRE_LIB_DIRECTORY}/OGRE")
-endif()
+if (NOT OGRE_CMAKE_DIR)
+  if(WIN32 OR APPLE)
+    set(OGRE_CMAKE_DIR "CMake")
+  else()
+    set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
+  endif()
+endif()
+
+if (NOT OGRE_PLUGIN_DIR_CMAKE)
+  if(WIN32)
+    set(OGRE_PLUGIN_DIR_CMAKE "bin")
+  else()
+    set(OGRE_PLUGIN_DIR_CMAKE "${OGRE_LIB_DIRECTORY}/OGRE")
+  endif()
+endif()
+
 configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake
     INSTALL_DESTINATION ${OGRE_CMAKE_DIR}
     PATH_VARS OGRE_MEDIA_PATH OGRE_PLUGIN_DIR_CMAKE OGRE_CFG_INSTALL_PATH CMAKE_INSTALL_PREFIX)


CMake fix: cfg files were not placed properly in the build dir for Linux

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -93,15 +93,27 @@
 elseif (APPLE)
   # TODO
 endif ()
-# create resources.cfg
-configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/debug/resources.cfg)
-configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/release/resources.cfg)
-# create plugins.cfg
-configure_file(${OGRE_TEMPLATES_DIR}/plugins_d.cfg.in ${OGRE_BINARY_DIR}/bin/debug/plugins.cfg)
-configure_file(${OGRE_TEMPLATES_DIR}/plugins.cfg.in ${OGRE_BINARY_DIR}/bin/release/plugins.cfg)
-# create media.cfg
-configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/debug/media.cfg)
-configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/release/media.cfg)
-# create quake3settings.cfg
-configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/debug/quake3settings.cfg)
-configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/release/quake3settings.cfg)
+if (WIN32)
+  # create resources.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/debug/resources.cfg)
+  configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/release/resources.cfg)
+  # create plugins.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/plugins_d.cfg.in ${OGRE_BINARY_DIR}/bin/debug/plugins.cfg)
+  configure_file(${OGRE_TEMPLATES_DIR}/plugins.cfg.in ${OGRE_BINARY_DIR}/bin/release/plugins.cfg)
+  # create media.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/debug/media.cfg)
+  configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/release/media.cfg)
+  # create quake3settings.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/debug/quake3settings.cfg)
+  configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/release/quake3settings.cfg)
+else() # other OS only need one cfg file
+  # create resources.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${OGRE_BINARY_DIR}/bin/resources.cfg)
+  # create plugins.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/plugins_d.cfg.in ${OGRE_BINARY_DIR}/bin/plugins.cfg)
+  # create media.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/media.cfg.in ${OGRE_BINARY_DIR}/bin/media.cfg)
+  # create quake3settings.cfg
+  configure_file(${OGRE_TEMPLATES_DIR}/quake3settings.cfg.in ${OGRE_BINARY_DIR}/bin/quake3settings.cfg)
+
+


build BUGFIX set PIC for compat explicitly

--- CMakeModules/UseCompat.cmake
+++ CMakeModules/UseCompat.cmake
@@ -22,4 +22,5 @@
     configure_file(${PROJECT_SOURCE_DIR}/compat/compat.h.in ${PROJECT_BINARY_DIR}/compat.h @ONLY)
     include_directories(${PROJECT_BINARY_DIR})
     add_library(compat OBJECT ${PROJECT_SOURCE_DIR}/compat/compat.c)
+    set_property(TARGET compat PROPERTY POSITION_INDEPENDENT_CODE ON)
 endmacro()


[cmake] LICENSE.md -> LICENSE.txt in the installer

--- CMakeModules/installer.cmake
+++ CMakeModules/installer.cmake
@@ -12,7 +12,7 @@
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 set(CPACK_PACKAGE_DESCRIPTION "A client for the Eos network")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A client for the Eos network")
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "Eos ${CPACK_PACKAGE_VERSION}")

 if(WIN32)


fix typo

fix typo

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -94,7 +94,7 @@
 if(USE_LEVELDB)
   find_package(LevelDB)
   find_package(Snappy)
-  if (LEVELDB_FOUND and SNAPPY_FOUND)
+  if (LEVELDB_FOUND AND SNAPPY_FOUND)
     include_directories(SYSTEM ${LevelDB_INCLUDE})
     list(APPEND Caffe2_DEPENDENCY_LIBS ${LevelDB_LIBRARIES})
     include_directories(SYSTEM ${Snappy_INCLUDE_DIR})


Fixed if clause.

Fixed if clause.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -158,7 +158,7 @@
     set(COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage")
   else(EIGEN_COVERAGE_TESTING)
     set(COVERAGE_FLAGS "")
-  endif(EIGEN_ENABLE_COVERAGE_TESTING)
+  endif(EIGEN_COVERAGE_TESTING)
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS} -g2")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COVERAGE_FLAGS} -O2 -g2")


fix detection of ICC version

fix detection of ICC version

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -316,7 +316,7 @@
       string( REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1.\\2.\\3"
               eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
     elseif(eigen_cxx_compiler_name MATCHES "icpc|clang")
-      string( REGEX REPLACE ".* ([0-9]*)\\.([0-9]*) .*" "\\1.\\2"
+      string( REGEX REPLACE ".* ([0-9]+\\.[0-9]+\\.[0-9]+|[0-9]+\\.[0-9]+).*" "\\1"
               eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
     else()
       set(eigen_cxx_compiler_version "_")


[cmake] error if CHECK_SIZE_TYPE failed

[cmake] error if CHECK_SIZE_TYPE failed

--- cmake/SiconosSetup.cmake
+++ cmake/SiconosSetup.cmake
@@ -106,12 +106,17 @@

 endif()

-IF(NOT SIZE_OF_CSI)
-  INCLUDE(CheckTypeSize)
-  CHECK_TYPE_SIZE("size_t" SIZE_OF_CSI)
-ENDIF(NOT SIZE_OF_CSI)
-
+# Choice of CSparse/CXSparse integer size
 IF(NOT DEFINED SICONOS_INT64)
+  IF(NOT SIZE_OF_CSI)
+    INCLUDE(CheckTypeSize)
+    CHECK_TYPE_SIZE("size_t" SIZE_OF_CSI)
+    IF(NOT SIZE_OF_CSI)
+      message(FATAL_ERROR
+        "Could not get size of size_t, please specify SICONOS_INT64.")
+    ENDIF(NOT SIZE_OF_CSI)
+  ENDIF(NOT SIZE_OF_CSI)
+
   IF ("${SIZE_OF_CSI}" EQUAL 8)
     SET(SICONOS_INT64 TRUE)
   ELSE ("${SIZE_OF_CSI}" EQUAL 8)


cmake fix

cmake fix

--- cmake/SiconosTools.cmake
+++ cmake/SiconosTools.cmake
@@ -317,8 +317,8 @@
     message(STATUS "Activate sanitizer options (USE_SANITIZER=${USE_SANITIZER}) : ${SANITIZER_OPTIONS}")
   endif()

-
-  target_compile_options(${CURRENT_TARGET} PUBLIC ${SANITIZER_OPTIONS})
-  target_link_options(${CURRENT_TARGET} PUBLIC ${SANITIZER_OPTIONS})
-
-endfunction()
+  if(SANITIZER_OPTIONS)
+    target_compile_options(${CURRENT_TARGET} PUBLIC ${SANITIZER_OPTIONS})
+    target_link_options(${CURRENT_TARGET} PUBLIC ${SANITIZER_OPTIONS})
+  endif()
+endfunction()