Update build option descriptions

Update build option descriptions

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -71,128 +71,128 @@
 #   The default value can be changed as many times as we wish before calling ROOT_APPLY_OPTIONS()
 #--------------------------------------------------------------------------------------------------

-ROOT_BUILD_OPTION(afdsmgrd OFF "Dataset manager for PROOF-based analysis facilities")
-ROOT_BUILD_OPTION(alien OFF "AliEn support, requires libgapiUI from ALICE")
-ROOT_BUILD_OPTION(arrow OFF "Apache Arrow in memory columnar storage support")
-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 OFF "Bonjour support, requires libdns_sd and/or Avahi")
-ROOT_BUILD_OPTION(builtin_afterimage ON "Build included libAfterImage, or use system libAfterImage")
-ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build the FITSIO library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_clang ON "Build clang internally")
-ROOT_BUILD_OPTION(builtin_davix OFF "Build the Davix library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_fftw3 OFF "Build the FFTW3 library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_freetype OFF "Build included libfreetype, or use system libfreetype")
-ROOT_BUILD_OPTION(builtin_ftgl ON "Build included libFTGL, or use system libftgl")
-ROOT_BUILD_OPTION(builtin_gl2ps OFF "Build included libgl2ps, or use system libgl2ps")
-ROOT_BUILD_OPTION(builtin_glew ON "Build included libGLEW, or use system libGLEW")
-ROOT_BUILD_OPTION(builtin_gsl OFF "Build the GSL library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_llvm ON "Build llvm internally")
-ROOT_BUILD_OPTION(builtin_lz4 OFF "Built included liblz4, or use system liblz4")
-ROOT_BUILD_OPTION(builtin_lzma OFF "Build included liblzma, or use system liblzma")
-ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL internally, or use system OpenSSL")
-ROOT_BUILD_OPTION(builtin_pcre OFF "Build included libpcre, or use system libpcre")
-ROOT_BUILD_OPTION(builtin_tbb OFF "Build the TBB internally")
-ROOT_BUILD_OPTION(builtin_unuran OFF "Build included libunuran, or use system libunuran")
-ROOT_BUILD_OPTION(builtin_vc OFF "Build the Vc package internally")
-ROOT_BUILD_OPTION(builtin_vdt OFF "Build the VDT package internally")
-ROOT_BUILD_OPTION(builtin_veccore OFF "Build VecCore internally")
-ROOT_BUILD_OPTION(builtin_xrootd OFF "Build the XROOTD internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_xxhash OFF "Build included xxHash library")
-ROOT_BUILD_OPTION(builtin_zlib OFF "Build included libz, or use system libz")
-ROOT_BUILD_OPTION(castor ON "CASTOR support, requires libshift from CASTOR >= 1.5.2")
+ROOT_BUILD_OPTION(afdsmgrd OFF "Enable support for Dataset manager for PROOF-based analysis facilities")
+ROOT_BUILD_OPTION(alien OFF "Enable support for AliEn (requires libgapiUI from ALICE)")
+ROOT_BUILD_OPTION(arrow OFF "Enable support for Apache Arrow")
+ROOT_BUILD_OPTION(asimage ON "Enable support for image processing via libAfterImage")
+ROOT_BUILD_OPTION(astiff ON "Enable support for TIFF images via libAfterImage")
+ROOT_BUILD_OPTION(bonjour OFF "Enable support for Avahi/Bonjour (requires libdns_sd and/or avahi)")
+ROOT_BUILD_OPTION(builtin_afterimage ON "Build bundled copy of libAfterImage")
+ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build CFITSIO internally (requires network)")
+ROOT_BUILD_OPTION(builtin_clang ON "Build bundled copy of Clang")
+ROOT_BUILD_OPTION(builtin_davix OFF "Build Davix internally (requires network)")
+ROOT_BUILD_OPTION(builtin_fftw3 OFF "Build FFTW3 internally (requires network)")
+ROOT_BUILD_OPTION(builtin_freetype OFF "Build bundled copy of freetype")
+ROOT_BUILD_OPTION(builtin_ftgl ON "Build bundled copy of FTGL")
+ROOT_BUILD_OPTION(builtin_gl2ps OFF "Build bundled copy of gl2ps")
+ROOT_BUILD_OPTION(builtin_glew ON "Build bundled copy of GLEW")
+ROOT_BUILD_OPTION(builtin_gsl OFF "Build GSL internally (requires network)")
+ROOT_BUILD_OPTION(builtin_llvm ON "Build bundled copy of LLVM")
+ROOT_BUILD_OPTION(builtin_lz4 OFF "Build bundled copy of lz4")
+ROOT_BUILD_OPTION(builtin_lzma OFF "Build bundled copy of lzma")
+ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL internally (requires network)")
+ROOT_BUILD_OPTION(builtin_pcre OFF "Build bundled copy of PCRE")
+ROOT_BUILD_OPTION(builtin_tbb OFF "Build TBB internally (requires network)")
+ROOT_BUILD_OPTION(builtin_unuran OFF "Build bundled copy of unuran")
+ROOT_BUILD_OPTION(builtin_vc OFF "Build Vc internally (requires network)")
+ROOT_BUILD_OPTION(builtin_vdt OFF "Build VDT internally (requires network)")
+ROOT_BUILD_OPTION(builtin_veccore OFF "Build VecCore internally (requires network)")
+ROOT_BUILD_OPTION(builtin_xrootd OFF "Build XRootD internally (requires network)")
+ROOT_BUILD_OPTION(builtin_xxhash OFF "Build bundled copy of xxHash")
+ROOT_BUILD_OPTION(builtin_zlib OFF "Build bundled copy of zlib")
+ROOT_BUILD_OPTION(castor ON "Enable support for CASTOR (CERN Advanced STORage manager)")
 ROOT_BUILD_OPTION(ccache OFF "Enable ccache usage for speeding up builds")
-ROOT_BUILD_OPTION(cefweb OFF "Chromium Embedded Framework web-based display")
-ROOT_BUILD_OPTION(clad ON "Enable clad, the cling automatic differentiation plugin.")
+ROOT_BUILD_OPTION(cefweb OFF "Enable support for CEF (Chromium Embedded Framework) web-based display")
+ROOT_BUILD_OPTION(clad ON "Build clad, the cling automatic differentiation plugin")
 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(coverage OFF "Test coverage")
-ROOT_BUILD_OPTION(cuda OFF "Use CUDA if it is found in the system")
-ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
-ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
-ROOT_BUILD_OPTION(cxx17 OFF "Build using C++17 compatible mode, requires gcc >= 7.2.0 or clang")
-ROOT_BUILD_OPTION(cxxmodules OFF "Compile with C++ modules enabled.")
-ROOT_BUILD_OPTION(davix ON "DavIx library for HTTP/WEBDAV access")
-ROOT_BUILD_OPTION(dcache OFF "dCache support, requires libdcap from DESY")
-ROOT_BUILD_OPTION(exceptions ON "Turn on compiler exception handling capability")
+ROOT_BUILD_OPTION(coverage OFF "Enable compile flags for coverage testing")
+ROOT_BUILD_OPTION(cuda OFF "Enable support for CUDA (requires CUDA toolkit >= 7.5)")
+ROOT_BUILD_OPTION(cxx11 ON  "Build using C++11 standard (requires gcc >= 4.8 or clang)")
+ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 standard (requires gcc >= 4.9 or clang)")
+ROOT_BUILD_OPTION(cxx17 OFF "Build using C++17 standard (requires gcc >= 7.2 or clang)")
+ROOT_BUILD_OPTION(cxxmodules OFF "Enable support for C++ modules")
+ROOT_BUILD_OPTION(davix ON "Enable support for Davix (HTTP/WebDAV access)")
+ROOT_BUILD_OPTION(dcache OFF "Enable support for dCache (requires libdcap from DESY)")
+ROOT_BUILD_OPTION(exceptions ON "Enable compiler exception handling")
 ROOT_BUILD_OPTION(explicitlink ON "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(fortran OFF "Enable the Fortran components of ROOT")
-ROOT_BUILD_OPTION(gdml ON "GDML writer and reader")
-ROOT_BUILD_OPTION(geocad OFF "ROOT-CAD Interface")
-ROOT_BUILD_OPTION(gfal ON "GFAL support, requires libgfal")
-ROOT_BUILD_OPTION(globus OFF "Globus authentication support, requires Globus toolkit")
+ROOT_BUILD_OPTION(fftw3 ON "Enable support for FFTW3")
+ROOT_BUILD_OPTION(fitsio ON "Enable support for reading FITS images")
+ROOT_BUILD_OPTION(fortran OFF "Build Fortran components of ROOT")
+ROOT_BUILD_OPTION(gdml ON "Enable support for GDML (Geometry Description Markup Language)")
+ROOT_BUILD_OPTION(geocad OFF "Enable support for OpenCascade")
+ROOT_BUILD_OPTION(gfal ON "Enable support for GFAL (Grid File Access Library)")
+ROOT_BUILD_OPTION(globus OFF "Enable support for Globus Auth")
 ROOT_BUILD_OPTION(gnuinstall OFF "Perform installation following the GNU guidelines")
 ROOT_BUILD_OPTION(gsl_shared OFF "Enable linking against shared libraries for GSL (default no)")
-ROOT_BUILD_OPTION(gviz OFF "Graphs visualization support, requires graphviz")
-ROOT_BUILD_OPTION(hdfs OFF "HDFS support; requires libhdfs from HDFS >= 0.19.1")
-ROOT_BUILD_OPTION(http ON "HTTP Server support")
-ROOT_BUILD_OPTION(imt ON "Implicit multi-threading support")
-ROOT_BUILD_OPTION(jemalloc OFF "Using the jemalloc allocator")
-ROOT_BUILD_OPTION(krb5 OFF "Kerberos5 support, requires Kerberos libs")
-ROOT_BUILD_OPTION(ldap OFF "LDAP support, requires (Open)LDAP libs")
+ROOT_BUILD_OPTION(gviz OFF "Enable support for Graphviz (graph visualization software)")
+ROOT_BUILD_OPTION(hdfs OFF "Enable support for Hadoop Distributed File System (HDFS)")
+ROOT_BUILD_OPTION(http ON "Enable suppport for HTTP server")
+ROOT_BUILD_OPTION(imt ON "Enable support for implicit multi-threading via Intel® Thread Bulding Blocks (TBB)")
+ROOT_BUILD_OPTION(jemalloc OFF "Use jemalloc memory allocator")
+ROOT_BUILD_OPTION(krb5 OFF "Enable support for Kerberos")
+ROOT_BUILD_OPTION(ldap OFF "Enable support for LDAP (Lightweight Directory Access Protocol)")
 ROOT_BUILD_OPTION(libcxx OFF "Build using libc++, requires cxx11 option (MacOS X only, for the time being)")
 ROOT_BUILD_OPTION(macos_native OFF "Disable looking for libraries, includes and binaries in locations other than a native installation (MacOS only)")
-ROOT_BUILD_OPTION(mathmore ON "Build the new libMathMore extended math library, requires GSL (vers. >= 1.8)")
+ROOT_BUILD_OPTION(mathmore ON "Build libMathMore extended math library (requires GSL)")
 ROOT_BUILD_OPTION(memory_termination OFF "Free internal ROOT memory before process termination (experimental, used for leak checking)")
-ROOT_BUILD_OPTION(memstat OFF "A memory statistics utility, helps to detect memory leaks")
-ROOT_BUILD_OPTION(minuit2 OFF "Build the new libMinuit2 minimizer library")
-ROOT_BUILD_OPTION(monalisa OFF "Monalisa monitoring support, requires libapmoncpp")
-ROOT_BUILD_OPTION(mysql ON "MySQL support, requires libmysqlclient")
-ROOT_BUILD_OPTION(odbc OFF "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(pgsql ON "PostgreSQL support, requires libpq")
+ROOT_BUILD_OPTION(memstat OFF "Build memory statistics utility (helps to detect memory leaks)")
+ROOT_BUILD_OPTION(minuit2 OFF "Build Minuit2 minimization library")
+ROOT_BUILD_OPTION(monalisa OFF "Enable support for monitoring with Monalisa (requires libapmoncpp)")
+ROOT_BUILD_OPTION(mysql ON "Enable support for MySQL databases")
+ROOT_BUILD_OPTION(odbc OFF "Enable support for ODBC databases (requires libiodbc or libodbc)")
+ROOT_BUILD_OPTION(opengl ON "Enable support for OpenGL (requires libGL and libGLU)")
+ROOT_BUILD_OPTION(oracle ON "Enable support for Oracle databases (requires Oracle Instant Client)")
+ROOT_BUILD_OPTION(pch ON "Enable support for Pre-Compiled Headers (PCH)")
+ROOT_BUILD_OPTION(pgsql ON "Enable support for PostgreSQL")
 ROOT_BUILD_OPTION(pyroot_experimental OFF "Use experimental Python bindings for ROOT")
 ROOT_BUILD_OPTION(pythia6_nolink OFF "Delayed linking of Pythia6 library")
-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 "Qt4 graphics backend, requires Qt4 >= 4.8")
-ROOT_BUILD_OPTION(qtgsi OFF "GSI's Qt4 integration, requires Qt4 >= 4.8")
-ROOT_BUILD_OPTION(qt5web OFF "Qt5 web-based display, requires Qt5")
-ROOT_BUILD_OPTION(r OFF "R ROOT bindings, requires R, Rcpp and RInside")
-ROOT_BUILD_OPTION(rfio OFF "RFIO support, requires libshift from CASTOR >= 1.5.2")
-ROOT_BUILD_OPTION(roofit ON "Build the libRooFit advanced fitting package")
-ROOT_BUILD_OPTION(root7 OFF "Build the ROOT 7 interface prototype, requires >= cxx14")
-ROOT_BUILD_OPTION(rpath OFF "Set run-time library load path on executables and shared libraries (at installation area)")
-ROOT_BUILD_OPTION(runtime_cxxmodules OFF "Enable runtime support for C++ modules.")
-ROOT_BUILD_OPTION(shadowpw OFF "Shadow password support")
+ROOT_BUILD_OPTION(pythia6 ON "Enable support for Pythia 6.x")
+ROOT_BUILD_OPTION(pythia8 ON "Enable support for Pythia 8.x")
+ROOT_BUILD_OPTION(python ON "Enable support for automatic Python bindings (PyROOT)")
+ROOT_BUILD_OPTION(qt OFF "Enable support for Qt4 graphics backend (requires Qt4 >= 4.8)")
+ROOT_BUILD_OPTION(qtgsi OFF "Enable support for GSI's Qt4 integration (requires Qt4 >= 4.8)")
+ROOT_BUILD_OPTION(qt5web OFF "Enable support for Qt5 web-based display (requires Qt5WebEngine)")
+ROOT_BUILD_OPTION(r OFF "Enable support for R bindings (requires R, Rcpp, and RInside)")
+ROOT_BUILD_OPTION(rfio OFF "Enable support for RFIO (Remote File IO) for CASTOR")
+ROOT_BUILD_OPTION(roofit ON "Build RooFit advanced fitting package")
+ROOT_BUILD_OPTION(root7 OFF "Build ROOT 7 components of ROOT (requires C++14 standard or higher)")
+ROOT_BUILD_OPTION(rpath OFF "Link libraries with built-in RPATH (run-time search path)")
+ROOT_BUILD_OPTION(runtime_cxxmodules OFF "Enable runtime support for C++ modules")
+ROOT_BUILD_OPTION(shadowpw OFF "Enable support for shadow passwords")
 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(sqlite ON "SQLite support, requires libsqlite3")
-ROOT_BUILD_OPTION(ssl ON "SSL encryption support, requires openssl")
+ROOT_BUILD_OPTION(sqlite ON "Enable support for SQLite")
+ROOT_BUILD_OPTION(ssl ON "Enable support for SSL encryption via OpenSSL")
 ROOT_BUILD_OPTION(table OFF "Build libTable contrib library")
-ROOT_BUILD_OPTION(tcmalloc OFF "Using the tcmalloc allocator")
-ROOT_BUILD_OPTION(thread ON "Using thread library (cannot be disabled)")
+ROOT_BUILD_OPTION(tcmalloc OFF "Use tcmalloc memory allocator")
+ROOT_BUILD_OPTION(thread ON "Enable support for multi-threading (cannot be disabled)")
 ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library")
-ROOT_BUILD_OPTION(tmva-cpu ON "Build TMVA with CPU support for deep learning. Requires BLAS")
-ROOT_BUILD_OPTION(tmva-gpu ON "Build TMVA with GPU support for deep learning. Requries CUDA")
-ROOT_BUILD_OPTION(tmva-pymva ON "Enable TMVA to call python mva's. Requires numpy")
-ROOT_BUILD_OPTION(tmva-rmva OFF "Alias for option r")
-ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random numbers")
-ROOT_BUILD_OPTION(vc OFF "Vc adds a few new types for portable and intuitive SIMD programming")
-ROOT_BUILD_OPTION(vdt ON "VDT adds a set of fast and vectorisable mathematical functions")
-ROOT_BUILD_OPTION(veccore OFF "VecCore SIMD abstraction library")
-ROOT_BUILD_OPTION(vecgeom OFF "VecGeom is a vectorized geometry library enhancing the performance of geometry navigation.")
+ROOT_BUILD_OPTION(tmva-cpu ON "Build TMVA with CPU support for deep learning (requires BLAS)")
+ROOT_BUILD_OPTION(tmva-gpu ON "Build TMVA with GPU support for deep learning (requries CUDA)")
+ROOT_BUILD_OPTION(tmva-pymva ON "Enable support for Python in TMVA (requires numpy)")
+ROOT_BUILD_OPTION(tmva-rmva OFF "Enable support for R in TMVA")
+ROOT_BUILD_OPTION(unuran OFF "Enable support for UNURAN (package for generating non-uniform random numbers)")
+ROOT_BUILD_OPTION(vc OFF "Enable support for Vc (SIMD Vector Classes for C++)")
+ROOT_BUILD_OPTION(vdt ON "Enable support for VDT (fast and vectorisable mathematical functions)")
+ROOT_BUILD_OPTION(veccore OFF "Enable support for VecCore SIMD abstraction library")
+ROOT_BUILD_OPTION(vecgeom OFF "Enable support for VecGeom vectorized geometry library")
 ROOT_BUILD_OPTION(winrtdebug OFF "Link against the Windows debug runtime library")
-ROOT_BUILD_OPTION(x11 ON "X11 support")
-ROOT_BUILD_OPTION(xft ON "Xft support (X11 antialiased fonts)")
-ROOT_BUILD_OPTION(xml ON "XML parser interface")
-ROOT_BUILD_OPTION(xrootd ON "Build xrootd file server and its client (if supported)")
-
-option(all "Enable all optional components" OFF)
-option(clingtest "Include cling tests. NOTE that this makes llvm/clang symbols visible in libCling." OFF)
-option(fail-on-missing "Fail the configure step if a required external package is missing" OFF)
-option(gminimal "Do not automatically search for support libraries, but include X11" OFF)
-option(minimal "Do not automatically search for support libraries" OFF)
-option(rootbench "Include rootbench, if rootbench exists in root or if it is a sibling directory." OFF)
-option(roottest "Include roottest, if roottest exists in root or if it is a sibling directory." OFF)
+ROOT_BUILD_OPTION(x11 ON "Enable support for X11")
+ROOT_BUILD_OPTION(xft ON "Enable anti-alias support with Xft")
+ROOT_BUILD_OPTION(xml ON "Enable support for XML (requires libxml2)")
+ROOT_BUILD_OPTION(xrootd ON "Enable support for XRootD file server and client")
+
+option(all "Enable all optional components by default" OFF)
+option(clingtest "Enable cling tests (Note: that this makes llvm/clang symbols visible in libCling)" OFF)
+option(fail-on-missing "Fail at configure time if a required package cannot be found" OFF)
+option(gminimal "Enable only required options by default, but include X11" OFF)
+option(minimal "Enable only required options by default" OFF)
+option(rootbench "Build rootbench if rootbench exists in root or if it is a sibling directory." OFF)
+option(roottest "Build roottest if roottest exists in root or if it is a sibling directory." OFF)
 option(testing "Enable testing with CTest" OFF)

-set(gcctoolchain "" CACHE PATH "Path for the gcctoolchain in case not the system gcc is used to build clang/LLVM")
+set(gcctoolchain "" CACHE PATH "Set path to GCC toolchain used to build llvm/clang")

 if (runtime_cxxmodules)
   set(pch_defvalue OFF)


Protobuf becomes buffered

Protobuf becomes buffered

--- cmake/projects/Protobuf/hunter.cmake
+++ cmake/projects/Protobuf/hunter.cmake
@@ -5,6 +5,7 @@
 endif()

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_download)
 include(hunter_pick_scheme)

@@ -19,5 +20,6 @@
   15752454ef0cf119b58136e2f4ffe97baeaf07cd
   )

-hunter_pick_scheme(DEFAULT url_sha1_cmake)
+hunter_pick_scheme(DEFAULT url_sha1_cmake)
+hunter_cacheable(Protobuf)
 hunter_download(PACKAGE_NAME Protobuf)


CMake: Silence warnings on Mac with XCode prior to 6.3

--- cmake/setup_compiler_flags_gnu.cmake
+++ cmake/setup_compiler_flags_gnu.cmake
@@ -97,11 +97,18 @@
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-variadic-macros")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-c++11-extensions")

-  IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.6")
-    #
-    # Clang versions prior to 3.6 emit a lot of false positives wrt
-    # "-Wunused-function".
-    #
+  #
+  # Clang versions prior to 3.6 emit a lot of false positives wrt
+  # "-Wunused-function". Also suppress warnings for Xcode older than 6.3
+  # (which is equivalent to clang < 3.6).
+  #
+  # FIXME: I wait for the day with a clang version "4.0"... and I will
+  # curse the person that thought it is a _great_ idea to come up with
+  # independent version numbers for clang on Mac...
+  #
+  IF( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.6" OR
+      ( NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0" AND
+        CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.3") )
     ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-function")
   ENDIF()
 ENDIF()


Fix whitespace mismatches. NFCI.

Fix whitespace mismatches. NFCI.

Tabs are not our friends.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -220,10 +220,10 @@
 endfunction()

 if( LLVM_ENABLE_LLD )
-	if ( LLVM_USE_LINKER )
-		message(FATAL_ERROR "LLVM_ENABLE_LLD and LLVM_USE_LINKER can't be set at the same time")
-	endif()
-	set(LLVM_USE_LINKER "lld")
+  if ( LLVM_USE_LINKER )
+    message(FATAL_ERROR "LLVM_ENABLE_LLD and LLVM_USE_LINKER can't be set at the same time")
+  endif()
+  set(LLVM_USE_LINKER "lld")
 endif()

 if( LLVM_USE_LINKER )
@@ -231,7 +231,7 @@
   set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fuse-ld=${LLVM_USE_LINKER}")
   check_cxx_source_compiles("int main() { return 0; }" CXX_SUPPORTS_CUSTOM_LINKER)
   if ( NOT CXX_SUPPORTS_CUSTOM_LINKER )
-	  message(FATAL_ERROR "Host compiler does not support '-fuse-ld=${LLVM_USE_LINKER}'")
+    message(FATAL_ERROR "Host compiler does not support '-fuse-ld=${LLVM_USE_LINKER}'")
   endif()
   set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
   append("-fuse-ld=${LLVM_USE_LINKER}"


cmake: pass -fvisibility-inlines-hidden if it is supported. In a
Release+Asserts build with -DBUILD_SHARED_LIBS=ON, the install
directory goes from 72MB to 70MB.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -87,6 +87,12 @@
       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
     else( SUPPORTS_FPIC_FLAG )
       message(WARNING "-fPIC not supported.")
+    endif()
+
+    check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
+    if( SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG )
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility-inlines-hidden")
     endif()
   endif()
 endif()


refs #5086 commenting out cmake line to fix linux build.  We have to find a permanent fix for clang later.

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -147,7 +147,7 @@
 endif ()

 ## We need to explicitly set this standard library for Xcode builds.
-add_definitions(-stdlib=libc++)
+##add_definitions(-stdlib=libc++)

 if (CMAKE_CXX_COMPILER_ID MATCHES Intel)
   set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")


Fix time for start nightly build with (Central European Summer Time)

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3468 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/test/CTestConfig.cmake
+++ trunk/test/CTestConfig.cmake
@@ -1,7 +1,7 @@
 #ctest_submit(                                             RETURN_VALUE res)

 SET(CTEST_PROJECT_NAME "OpenViBe")
-SET(CTEST_NIGHTLY_START_TIME "20:00:00 EST")
+SET(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
 SET(CTEST_DROP_METHOD "http")
 SET(CTEST_DROP_SITE "cdash.inria.fr")
 SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=OpenViBe")


set -utf-8 flag only for real MSVC compilers. E.g. not Intel's icx.exe

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -82,7 +82,9 @@
     # http://stackoverflow.com/questions/3232669 explains the issue.
     set(cxx_base_flags "${cxx_base_flags} -wd4702")
     # Ensure MSVC treats source files as UTF-8 encoded.
-    set(cxx_base_flags "${cxx_base_flags} -utf-8")
+    if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+      set(cxx_base_flags "${cxx_base_flags} -utf-8")
+    endif()
   elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     set(cxx_base_flags "-Wall -Wshadow -Wconversion")
     set(cxx_exception_flags "-fexceptions")


BUG: superbuild: missing link to expat on msvc

--- SuperBuild/CMake/External_libkml.cmake
+++ SuperBuild/CMake/External_libkml.cmake
@@ -43,7 +43,11 @@

   set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
   if(WIN32)
-    set(_SB_${proj}_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlbase.lib)
+    if(USE_SYSTEM_EXPAT)
+      set(_SB_${proj}_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlbase.lib;${EXPAT_LIBRARY})
+    else()
+      set(_SB_${proj}_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlbase.lib;${_SB_EXPAT_LIBRARY})
+    endif()
     set(_SB_${proj}_CONVENIENCE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlconvenience.lib)
     set(_SB_${proj}_DOM_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmldom.lib)
     set(_SB_${proj}_ENGINE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlengine.lib)


PrintableOptions.cmake: Correct variable name comparison

CMake 3.20.1 errors out with:

CMake Error at cmake/modules/PrintableOptions.cmake:38 (message):
   variable name cannot be empty
 Call Stack (most recent call first):
   CMakeLists.txt:152 (add_printable_variable)

Change how the parameter value is compared, to fix it.

--- cmake/modules/PrintableOptions.cmake
+++ cmake/modules/PrintableOptions.cmake
@@ -19,40 +19,40 @@
 #    prints all the build options previously added with the above functions

 macro(add_printable_variable_bare _name)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "variable name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	list(APPEND _printable_options ${_name})
 endmacro()

 macro(add_printable_option _name _description _default_value)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "option name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	option(${_name} ${_description} ${_default_value})
 	add_printable_variable_bare(${_name})
 endmacro()

 macro(add_printable_variable _name _description _default_value)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "variable name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	set(${_name} ${_default_value} CACHE STRING ${_description})
 	add_printable_variable_bare(${_name})
 endmacro()

 macro(add_printable_variable_path _name _description _default_value)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "path variable name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	set(${_name} ${_default_value} CACHE PATH ${_description})
 	add_printable_variable_bare(${_name})
 endmacro()

 macro(add_printable_variable_filepath _name _description _default_value)
-	if(_name STREQUAL "")
+	if("${_name}" STREQUAL "")
 		message(FATAL_ERROR "filepath variable name cannot be empty")
-	endif(_name STREQUAL "")
+	endif("${_name}" STREQUAL "")
 	set(${_name} ${_default_value} CACHE FILEPATH ${_description})
 	add_printable_variable_bare(${_name})
 endmacro()


Defer RPATH setting to after RootInstallDirs

Setting of CMAKE_INSTALL_RPATH prior to inclusion of RootInstallDirs
hardcodes RPATH based on CMAKE_INSTALL_PREFIX. RootInstallDirs
may result in final library install path being modified from this
value.

Move RPATH settings post-inclusion of RootInstallDirs. Set
CMAKE_INSTALL_DIR to value of CMAKE_INSTALL_FULL_LIBDIR which
is set by RootInstallDirs and will be consistent through the project.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -195,6 +195,12 @@
 option(testing "Enable testing with CTest" OFF)
 option(roottest "Include roottest, if roottest exists in root or if it is a sibling directory." OFF)

+#---Avoid creating dependencies to 'non-statndard' header files -------------------------------
+include_regular_expression("^[^.]+$|[.]h$|[.]icc$|[.]hxx$|[.]hpp$")
+
+#---Add Installation Variables------------------------------------------------------------------
+include(RootInstallDirs)
+
 #---General Build options----------------------------------------------------------------------
 # use, i.e. don't skip the full RPATH for the build tree
 set(CMAKE_SKIP_BUILD_RPATH  FALSE)
@@ -206,15 +212,8 @@

 # the RPATH to be used when installing---------------------------------------------------------
 if(rpath)
-  set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+  set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
   set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
 endif()

-#---Avoid creating dependencies to 'non-statndard' header files -------------------------------
-include_regular_expression("^[^.]+$|[.]h$|[.]icc$|[.]hxx$|[.]hpp$")
-
-#---Add Installation Variables------------------------------------------------------------------
-include(RootInstallDirs)
-
-
-
+


The source-group for files now always matches the relative path of the file

--- cmake/modules/DeskvoxAddTarget.cmake
+++ cmake/modules/DeskvoxAddTarget.cmake
@@ -39,53 +39,41 @@
 #

-macro(__deskvox_process_sources)
+function(__deskvox_process_sources)
   foreach(f ${ARGN})
-    get_filename_component(ext ${f} EXT)
     get_filename_component(path ${f} PATH)

-    ##
-    ## TODO:
-    ##
-    ## Re-order filesystem: (public) headers into 'include', source files into 'src'
-    ## then simply use
-    ##      source_group("${path}" FILES ${f})
-    ## below.
-    ##
-
-    if(ext MATCHES "\\.(c|cpp|cxx|mm|cu)")
-      set(group "src")
-    elseif(ext MATCHES "\\.(h|hpp|hxx|inl|inc|impl)")
-      set(group "include")
+    if(NOT path STREQUAL "")
+      string(REPLACE "/" "\\" path "${path}")
+      set(group "${path}")
     else()
       set(group "")
     endif()

-    if(NOT path STREQUAL "")
-      string(REPLACE "/" "\\" path "${path}")
-      set(group "${group}\\${path}")
-    endif()
+    source_group("${group}" FILES ${f})

-    source_group("${group}" FILES ${f})
+    get_filename_component(ext ${f} EXT)

     if(ext MATCHES "\\.(cu)")
       if(NOT DESKVOX_CUDA_FOUND)
         message(STATUS "Note: '" ${f} "' ignored: CUDA support not available or disabled")
       else()
         if(BUILD_SHARED_LIBS)
-          cuda_compile(__dps_cuda_obj ${f} SHARED)
+          cuda_compile(cuda_compile_obj ${f} SHARED)
         else()
-          cuda_compile(__dps_cuda_obj ${f})
+          cuda_compile(cuda_compile_obj ${f})
         endif()

-        list(APPEND __DESKVOX_PROCESSED_SOURCES ${f})
-        list(APPEND __DESKVOX_PROCESSED_SOURCES ${__dps_cuda_obj})
+        list(APPEND processed_sources ${f})
+        list(APPEND processed_sources ${cuda_compile_obj})
       endif()
     else()
-      list(APPEND __DESKVOX_PROCESSED_SOURCES ${f})
+      list(APPEND processed_sources ${f})
     endif()
   endforeach()
-endmacro()
+
+  set(__DESKVOX_PROCESSED_SOURCES ${__DESKVOX_PROCESSED_SOURCES} ${processed_sources} PARENT_SCOPE)
+endfunction()

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


Set 'davix' option ON by default for Linux platforms.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -62,7 +62,7 @@
   set(memstat_defvalue ON)
   set(explicitlink_defvalue ON)
   set(cocoa_defvalue OFF)
-  set(davix_defvalue OFF)
+  set(davix_defvalue ON)
 endif()


Clarification of error message in case of root7 option

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -304,11 +304,11 @@

 if(root7)
   if(NOT CMAKE_CXX_STANDARD)
-      set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++14 standard used with root7")
-      message(STATUS "Enabling C++14 for compilation of root7 components")
+    set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++14 standard used with root7")
+    message(STATUS "Enabling C++14 for compilation of root7 components")
   elseif(NOT CMAKE_CXX_STANDARD GREATER 11)
-      message(FATAL_ERROR ">>> At least C++14 standard required with root7")
-   endif()
+    message(FATAL_ERROR ">>> At least C++14 standard required with root7, please enable it using CMake option: -DCMAKE_CXX_STANDARD=14")
+  endif()
 endif()

 #---check if webui can be build-------------------------------


update OpenNI packages urls for the all-in-one installer

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@5055 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_all_in_one_installer.cmake
+++ cmake/pcl_all_in_one_installer.cmake
@@ -24,17 +24,17 @@

     if(CMAKE_CL_64)
         set(OPENNI_PACKAGE "OpenNI-Win64-1.3.2-Dev.msi")
-        set(OPENNI_URL "http://dev.pointclouds.org/attachments/download/360/${OPENNI_PACKAGE}")
+        set(OPENNI_URL "http://www.pointclouds.org/assets/files/dependencies/${OPENNI_PACKAGE}")
         set(OPENNI_MD5 e54b5ede27b293c579c42dcede33b289)
         set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource64-5.0.3.msi")
-        set(OPENNI_SENSOR_URL "http://dev.pointclouds.org/attachments/download/359/${OPENNI_SENSOR_PACKAGE}")
+        set(OPENNI_SENSOR_URL "http://www.pointclouds.org/assets/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
         set(OPENNI_SENSOR_MD5 cbf4ce02d5ef430dca17833d5588e060)
     else(CMAKE_CL_64)
         set(OPENNI_PACKAGE "OpenNI-Win32-1.3.2-Dev.msi")
-        set(OPENNI_URL "http://dev.pointclouds.org/attachments/download/361/${OPENNI_PACKAGE}")
+        set(OPENNI_URL "http://www.pointclouds.org/assets/files/dependencies/${OPENNI_PACKAGE}")
         set(OPENNI_MD5 0b7118a0581abef411b58530d4039cf0)
         set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource32-5.0.3.msi")
-        set(OPENNI_SENSOR_URL "http://dev.pointclouds.org/attachments/download/358/${OPENNI_SENSOR_PACKAGE}")
+        set(OPENNI_SENSOR_URL "http://www.pointclouds.org/assets/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
         set(OPENNI_SENSOR_MD5 8bf14b2e813859f868fc316acb2d08fa)
     endif(CMAKE_CL_64)


Fixes git submodules in case of only including Nitro.cmake

--- Nitro.cmake
+++ Nitro.cmake
@@ -23,6 +23,16 @@
 # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+# Intialize git submodules if not done already
+file(GLOB SUBMODULE_FILES "${CMAKE_CURRENT_LIST_DIR}/common/*")
+list(LENGTH SUBMODULE_FILES COUNT_COMMON)
+
+if(${COUNT_COMMON} EQUAL 0)
+    message(STATUS "Initializing git submodule")
+    execute_process(COMMAND "git" "submodule" "init" WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}")
+    execute_process(COMMAND "git" "submodule" "update" WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}")
+endif()
+
 include(${CMAKE_CURRENT_LIST_DIR}/common/UnsetIfUpdated.cmake)

 UnsetIfUpdated(MIN_LOG_LEVEL CMAKE_BUILD_TYPE)


CMake: properly rename LICENSE file

CMake: properly rename LICENSE file

--- CMake/Packaging.cmake
+++ CMake/Packaging.cmake
@@ -20,7 +20,7 @@

 # CPack won't allow file without recognized extension to be used as
 # license file.
-file(COPY "${OGRE_SOURCE_DIR}/LICENSE" DESTINATION "${OGRE_BINARY_DIR}/LICENSE.txt")
+configure_file("${OGRE_SOURCE_DIR}/LICENSE" "${OGRE_BINARY_DIR}/LICENSE.txt" COPYONLY)
 set(CPACK_RESOURCE_FILE_LICENSE "${OGRE_BINARY_DIR}/LICENSE.txt")

 #set(CPACK_PACKAGE_ICON "${OGRE_SOURCE_DIR}\\\\ogrelogo.gif")


Use cmake_parse_arguments to pass the COMMAND to _add_driver_step.

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -100,10 +100,24 @@

 endfunction (_bootstrap_test_driver_script)

-function (_add_driver_step DRIVER_SCRIPT STEP COMMAND_VAR)
+function (_add_driver_step DRIVER_SCRIPT STEP)
+
+    set (DRIVER_STEP_MULTIVAR_ARGS COMMAND)
+
+    cmake_parse_arguments (ADD_DRIVER_STEP
+                           ""
+                           ""
+                           "${DRIVER_STEP_MULTIVAR_ARGS}"
+                           ${ARGN})
+
+    if (NOT ADD_DRIVER_STEP_COMMAND)
+
+        message (FATAL_ERROR "A COMMAND must be provided to add_driver_step")
+
+    endif (NOT ADD_DRIVER_STEP_COMMAND)

     file (APPEND ${DRIVER_SCRIPT}
-          "set (${STEP} ${${COMMAND_VAR}})\n"
+          "set (${STEP} ${ADD_DRIVER_STEP_COMMAND})\n"
           "add_driver_command (${STEP}\n"
           "                    \${CMAKE_CURRENT_BINARY_DIR}/${STEP}.output\n"
           "                    \${CMAKE_CURRENT_BINARY_DIR}/${STEP}.error)\n")
@@ -143,7 +157,8 @@

         set (CONFIGURE_COMMAND
              ${CMAKE} .. -C${CACHE_FILE} -DCMAKE_VERBOSE_MAKEFILE=ON)
-        _add_driver_step (${DRIVER_SCRIPT} CONFIGURE CONFIGURE_COMMAND)
+        _add_driver_step (${DRIVER_SCRIPT} CONFIGURE
+                          COMMAND ${CONFIGURE_COMMAND})

     endif (EXISTS ${TEST_FILE_PATH})

@@ -156,7 +171,8 @@
                        --build
                        ${TEST_WORKING_DIRECTORY_NAME}
                        --clean-first)
-    _add_driver_step (${DRIVER_SCRIPT} BUILD BUILD_COMMAND)
+    _add_driver_step (${DRIVER_SCRIPT} BUILD
+                      COMMAND ${BUILD_COMMAND})

 endfunction (_append_build_step)

@@ -173,7 +189,8 @@
              ${CMAKE}
              -C${CACHE_FILE}
              -P ${TEST_VERIFY_SCRIPT_FILE})
-        _add_driver_step (${DRIVER_SCRIPT} VERIFY VERIFY_COMMAND)
+        _add_driver_step (${DRIVER_SCRIPT} VERIFY
+                          COMMAND ${VERIFY_COMMAND})

     else (EXISTS ${TEST_VERIFY_SCRIPT_FILE})


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

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

--- kcm/kcm_kscreen.desktop.cmake
+++ kcm/kcm_kscreen.desktop.cmake
@@ -13,7 +13,7 @@
 Name[bs]=Konfiguracija ekrana
 Name[ca]=Configuració de la pantalla
 Name[cs]=Nastavení zobrazení
-Name[de]=Anzeige einrichten
+Name[de]=Anzeige-Einrichtung
 Name[el]=Διαμόρφωση οθόνης
 Name[en_GB]=Display Configuration
 Name[es]=Configuración de la pantalla


SuperBuild: cleanup for geotiff

SuperBuild: cleanup for geotiff

--- SuperBuild/CMake/External_geotiff.cmake
+++ SuperBuild/CMake/External_geotiff.cmake
@@ -28,11 +28,6 @@
     ADD_SUPERBUILD_CMAKE_VAR(ZLIB_LIBRARY)
     ADD_SUPERBUILD_CMAKE_VAR(JPEG_INCLUDE_DIR)
     ADD_SUPERBUILD_CMAKE_VAR(JPEG_LIBRARY)
-  else()
-    ADD_SUPERBUILD_CONFIGURE_VAR(TIFF_ROOT --with-libtiff)
-    ADD_SUPERBUILD_CONFIGURE_VAR(PROJ_ROOT --with-proj)
-    ADD_SUPERBUILD_CONFIGURE_VAR(ZLIB_ROOT --with-zlib)
-    ADD_SUPERBUILD_CONFIGURE_VAR(JPEG_ROOT --with-jpeg)
   endif()

   ExternalProject_Add(${proj}


SuperBuild: openssl using perl to configure

--- SuperBuild/CMake/External_openssl.cmake
+++ SuperBuild/CMake/External_openssl.cmake
@@ -50,16 +50,12 @@
     BINARY_DIR ${OPENSSL_SB_SRC}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-    PATCH_COMMAND
-    ${SB_ENV_CONFIGURE_CMD}
-    ${PERL_COMMAND} ${OPENSSL_SB_SRC}/Configure
+    PATCH_COMMAND ${PERL_COMMAND} ${OPENSSL_SB_SRC}/Configure
     ${OPENSSL_BUILD_ARCH}
     no-asm
     "--prefix=${SB_INSTALL_PREFIX_NATIVE}"
     "--openssldir=${SB_INSTALL_PREFIX_NATIVE}"
-    CONFIGURE_COMMAND
-      ${SB_ENV_CONFIGURE_CMD}
-      ${OPENSSL_CONFIGURE_CMD}
+    CONFIGURE_COMMAND ${OPENSSL_CONFIGURE_CMD}
     BUILD_COMMAND nmake -f "${OPENSSL_SB_SRC}/ms/ntdll.mak"
     INSTALL_COMMAND nmake -f "${OPENSSL_SB_SRC}/ms/ntdll.mak" install
     LOG_DOWNLOAD 1


ENH: Bump ITKUltrasound to 2016-05-29

ENH: Bump ITKUltrasound to 2016-05-29

--- SuperBuild/External_ITKUltrasound.cmake
+++ SuperBuild/External_ITKUltrasound.cmake
@@ -7,8 +7,8 @@
 set(${proj}_DEPENDENCIES )
 ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

-# master 2016-05-25
-set(${proj}_GIT_TAG 972c7be4bdfacb0a41972ef86b99de368da2e1b5)
+# master 2016-05-29
+set(${proj}_GIT_TAG 8f848928f1f794cb46e515f8969902a5b65b30c3)
 ExternalProject_Add(${proj}
   ${${proj}_EP_ARGS}
   GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKUltrasound.git


added build of astra python wrapper

added build of astra python wrapper

--- SuperBuild/External_astra-toolbox.cmake
+++ SuperBuild/External_astra-toolbox.cmake
@@ -83,29 +83,9 @@
     set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA)

-#create a configure script
-file(WRITE ${${proj}_SOURCE_DIR}/configure-launch
-"
-#! /bin/bash
-
-echo $0 received $# parameters
-
-for arg
-do echo $arg
-done
-
-${${proj}_SOURCE_DIR}/build/linux/configure $@ --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix
-
-")
-
 set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure")
 list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib")
 list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib")
-
-
-file(COPY ${${proj}_SOURCE_DIR}/configure-launch
-     DESTINATION ${${proj}_BINARY_DIR}
-     FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)

     ExternalProject_Add(${proj}
       ${${proj}_EP_ARGS}
@@ -127,13 +107,51 @@

       # This build is Unix specific
       BUILD_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux
-        ${CMAKE_COMMAND} -E env make clean
-        ${CMAKE_COMMAND} -E env make install-libraries
+        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux make install-libraries
       INSTALL_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux
+        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h
       DEPENDS
         ${${proj}_DEPENDENCIES}
+    )
+
+    set(python_wrapper "astra-python-wrapper")
+
+    #create a configure script
+    file(WRITE ${${proj}_SOURCE_DIR}/python_build
+"
+#! /bin/bash
+set -ex
+
+CPPFLAGS="-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build
+")
+
+
+   file(COPY ${${proj}_SOURCE_DIR}/python_build
+     DESTINATION ${${proj}_SOURCE_DIR}/python
+     FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
+
+    set(cppflags "-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include")
+    set(build_python "")
+    list (APPEND build_python "CC=${CMAKE_C_COMPILER}")
+    ExternalProject_Add(${python_wrapper}
+      ${${proj}_EP_ARGS}
+      SOURCE_DIR ${${proj}_SOURCE_DIR}
+      BINARY_DIR ${${proj}_BINARY_DIR}
+      DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
+      STAMP_DIR ${${proj}_STAMP_DIR}
+      TMP_DIR ${${proj}_TMP_DIR}
+      INSTALL_DIR ${libastra_Install_Dir}
+      # apparently this is the only way to pass environment variables to
+      # external projects
+      CONFIGURE_COMMAND ""
+
+      # This build is Unix specific
+      BUILD_COMMAND
+        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_build
+      INSTALL_COMMAND
+        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h
+      DEPENDS
+        ${proj}
     )

     else()


bump version to 0.5.2

bump version to 0.5.2

--- src/CPackConfig.cmake
+++ src/CPackConfig.cmake
@@ -4,7 +4,7 @@

 set(CPACK_PACKAGE_VERSION_MAJOR "0")
 set(CPACK_PACKAGE_VERSION_MINOR "5")
-set(CPACK_PACKAGE_VERSION_PATCH "1")
+set(CPACK_PACKAGE_VERSION_PATCH "2")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libes")


ENH: Update Sphinx for ITK 4.8.0

ENH: Update Sphinx for ITK 4.8.0

Change-Id: I55573c60466a88a805c6e2a096021e4c49933f91

--- Modules/Remote/SphinxExamples.remote.cmake
+++ Modules/Remote/SphinxExamples.remote.cmake
@@ -2,6 +2,6 @@
 itk_fetch_module(SphinxExamples
   "This module builds the examples found at http://itk.org/ITKExamples/"
   GIT_REPOSITORY http://itk.org/ITKExamples.git
-  # 2015-07-02
-  GIT_TAG 890667eaa7dbab6111aabd51432d1aeadca738f9
+  # 2015-07-09
+  GIT_TAG 2bc08a52aa0437da776cc777157f25b7b525b46f
   )


Hide loud warning when using to third_party eigen

Summary:
This is a little excessive:
```
CMake Warning at cmake/Dependencies.cmake:201 (find_package):
  By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Eigen3", but
  CMake did not find one.

  Could not find a package configuration file provided by "Eigen3" with any
  of the following names:

    Eigen3Config.cmake
    eigen3-config.cmake

  Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
  "Eigen3_DIR" to a directory containing one of the above files.  If "Eigen3"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:72 (include)
```
Closes https://github.com/caffe2/caffe2/pull/729

Differential Revision: D5183059

Pulled By: Yangqing

fbshipit-source-id: d17d5d06a50abb50f9978d022ddc4918e991079d

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -198,7 +198,7 @@

 # ---[ EIGEN
 add_definitions(-DEIGEN_MPL2_ONLY)
-find_package(Eigen3)
+find_package(Eigen3 QUIET)
 if(EIGEN3_FOUND)
   include_directories(SYSTEM ${EIGEN3_INCLUDE_DIRS})
 else()


add optional compile flags to enable coverage testing

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -153,11 +153,17 @@
 endmacro(ei_init_testing)

 if(CMAKE_COMPILER_IS_GNUCXX)
+  option(EIGEN_COVERAGE_TESTING "Enable/disable gcov" OFF)
+  if(EIGEN_COVERAGE_TESTING)
+    set(COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage")
+  else(EIGEN_COVERAGE_TESTING)
+    set(COVERAGE_FLAGS "")
+  endif(EIGEN_ENABLE_COVERAGE_TESTING)
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g2")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g2")
-    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-inline-functions")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g2")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS} -g2")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COVERAGE_FLAGS} -O2 -g2")
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COVERAGE_FLAGS} -fno-inline-functions")
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COVERAGE_FLAGS} -O0 -g2")
   endif(CMAKE_SYSTEM_NAME MATCHES Linux)
   set(EI_OFLAG "-O2")
 elseif(MSVC)


man page absolute path

man page absolute path

--- cmake/MyPackageMan.cmake
+++ cmake/MyPackageMan.cmake
@@ -11,6 +11,7 @@
 MACRO(MyPackageMan PODFILE MANFILE SECTION VERSION)

   IF (EXISTS ${PODFILE})
+    GET_FILENAME_COMPONENT(PODFILE_ABSOLUTE ${PODFILE} ABSOLUTE)
     FIND_PROGRAM (POD2MAN pod2man)
     IF (POD2MAN)
       FIND_PROGRAM (GZIP gzip)
@@ -19,9 +20,9 @@
         IF (NOT TARGET ${MANPAGE_TARGET})
           ADD_CUSTOM_COMMAND(
 	    OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}"
-	    DEPENDS "${PODFILE}"
+	    DEPENDS "${PODFILE_ABSOLUTE}"
 	    COMMAND "${POD2MAN}"
-	    ARGS --section "${SECTION}" --center "${CMAKE_PROJECT_NAME}" -r "${VERSION}" --stderr --name "${MANFILE}" "${PODFILE}" > "${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}"
+	    ARGS --section "${SECTION}" --center "${CMAKE_PROJECT_NAME}" -r "${VERSION}" --stderr --name "${MANFILE}" "${PODFILE_ABSOLUTE}" > "${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}"
 	    )
           ADD_CUSTOM_COMMAND(
 	    OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz"


first try to locate XCFun, only if not found, fetch

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -1,18 +1,25 @@
-include(FetchContent)
+find_package(XCFun CONFIG QUIET)

-set(XCFun_XC_MAX_ORDER 6)
+if(TARGET xcfun)
+  get_property(_loc TARGET xcfun PROPERTY LOCATION)
+  message(STATUS "Found XCFun: ${_loc} (found version ${XCFun_VERSION})")
+else()
+  include(FetchContent)

-FetchContent_Populate(xcfun_sources
-  QUIET
-  GIT_REPOSITORY
-    https://github.com/dftlibs/xcfun.git
-  GIT_TAG
-    v2.0.0a5
-  )
+  set(XCFun_XC_MAX_ORDER 6)

-add_subdirectory(
-  ${xcfun_sources_SOURCE_DIR}
-  ${xcfun_sources_BINARY_DIR}
-  )
+  FetchContent_Populate(xcfun_sources
+    QUIET
+    GIT_REPOSITORY
+      https://github.com/dftlibs/xcfun.git
+    GIT_TAG
+      v2.0.0a4
+    )

-unset(XCFun_XC_MAX_ORDER)
+  add_subdirectory(
+    ${xcfun_sources_SOURCE_DIR}
+    ${xcfun_sources_BINARY_DIR}
+    )
+
+  unset(XCFun_XC_MAX_ORDER)
+endif()


CMake: Linux, only link to libs as needed.

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -349,6 +349,7 @@

 if(UNIX)
     set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Will add -fPIC under linux.
+    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed") # Only link to libs as needed.
 endif()

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


Updated FindOGRE.cmake to properly set OGRE_${COMPONENT}_BINARY variables with paths to the corresponding DLLs

--HG--
branch : v1-7

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -333,47 +333,51 @@
 endif()

+#########################################################
+# Find Ogre components
+#########################################################
+
+set(OGRE_COMPONENT_SEARCH_PATH_REL
+  ${OGRE_LIBRARY_DIR_REL}/..
+  ${OGRE_LIBRARY_DIR_REL}/../..
+  ${OGRE_BIN_SEARCH_PATH}
+)
+set(OGRE_COMPONENT_SEARCH_PATH_DBG
+  ${OGRE_LIBRARY_DIR_DBG}/..
+  ${OGRE_LIBRARY_DIR_DBG}/../..
+  ${OGRE_BIN_SEARCH_PATH}
+)
+
+macro(ogre_find_component COMPONENT HEADER)
+  findpkg_begin(OGRE_${COMPONENT})
+  find_path(OGRE_${COMPONENT}_INCLUDE_DIR NAMES ${HEADER} HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES ${COMPONENT} OGRE/${COMPONENT} Components/${COMPONENT}/include)
+  set(OGRE_${COMPONENT}_LIBRARY_NAMES "Ogre${COMPONENT}${OGRE_LIB_SUFFIX}")
+  get_debug_names(OGRE_${COMPONENT}_LIBRARY_NAMES)
+  find_library(OGRE_${COMPONENT}_LIBRARY_REL NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
+  find_library(OGRE_${COMPONENT}_LIBRARY_DBG NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
+  make_library_set(OGRE_${COMPONENT}_LIBRARY)
+  findpkg_finish(OGRE_${COMPONENT})
+  if (OGRE_${COMPONENT}_FOUND)
+    # find binaries
+    if (NOT OGRE_STATIC)
+	  if (WIN32)
+	    find_file(OGRE_${COMPONENT}_BINARY_REL NAMES "Ogre${COMPONENT}.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_REL} PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release)
+	    find_file(OGRE_${COMPONENT}_BINARY_DBG NAMES "Ogre${COMPONENT}_d.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_DBG} PATH_SUFFIXES "" bin bin/debug debug)
+	  endif()
+	  mark_as_advanced(OGRE_${COMPONENT}_BINARY_REL OGRE_${COMPONENT}_BINARY_DBG)
+    endif()
+  endif()
+endmacro()

 # look for Paging component
-findpkg_begin(OGRE_Paging)
-find_path(OGRE_Paging_INCLUDE_DIR NAMES OgrePaging.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Paging OGRE/Paging Components/Paging/include)
-set(OGRE_Paging_LIBRARY_NAMES "OgrePaging${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Paging_LIBRARY_NAMES)
-find_library(OGRE_Paging_LIBRARY_REL NAMES ${OGRE_Paging_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Paging_LIBRARY_DBG NAMES ${OGRE_Paging_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-set(OGRE_Paging_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
-make_library_set(OGRE_Paging_LIBRARY)
-findpkg_finish(OGRE_Paging)
-
+ogre_find_component(Paging OgrePaging.h)
 # look for Terrain component
-findpkg_begin(OGRE_Terrain)
-find_path(OGRE_Terrain_INCLUDE_DIR NAMES OgreTerrain.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Terrain OGRE/Terrain Components/Terrain/include)
-set(OGRE_Terrain_LIBRARY_NAMES "OgreTerrain${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Terrain_LIBRARY_NAMES)
-find_library(OGRE_Terrain_LIBRARY_REL NAMES ${OGRE_Terrain_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Terrain_LIBRARY_DBG NAMES ${OGRE_Terrain_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_Terrain_LIBRARY)
-findpkg_finish(OGRE_Terrain)
-
+ogre_find_component(Terrain OgreTerrain.h)
 # look for Property component
-findpkg_begin(OGRE_Property)
-find_path(OGRE_Property_INCLUDE_DIR NAMES OgreProperty.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Property OGRE/Property Components/Property/include)
-set(OGRE_Property_LIBRARY_NAMES "OgreProperty${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Property_LIBRARY_NAMES)
-find_library(OGRE_Property_LIBRARY_REL NAMES ${OGRE_Property_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Property_LIBRARY_DBG NAMES ${OGRE_Property_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_Property_LIBRARY)
-findpkg_finish(OGRE_Property)
-
+ogre_find_component(Property OgreProperty.h)
 # look for RTShaderSystem component
-findpkg_begin(OGRE_RTShaderSystem)
-find_path(OGRE_RTShaderSystem_INCLUDE_DIR NAMES OgreRTShaderSystem.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES RTShaderSystem OGRE/RTShaderSystem Components/RTShaderSystem/include)
-set(OGRE_RTShaderSystem_LIBRARY_NAMES "OgreRTShaderSystem${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_RTShaderSystem_LIBRARY_NAMES)
-find_library(OGRE_RTShaderSystem_LIBRARY_REL NAMES ${OGRE_RTShaderSystem_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_RTShaderSystem_LIBRARY_DBG NAMES ${OGRE_RTShaderSystem_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_RTShaderSystem_LIBRARY)
-findpkg_finish(OGRE_RTShaderSystem)
+ogre_find_component(RTShaderSystem OgreRTShaderSystem.h)
+

 #########################################################
 # Find Ogre plugins


change mitk-data hash

change mitk-data hash

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag e8240c06) # first 8 characters of hash-tag
+  set(revision_tag c9ac0917) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Cleaned up FindFFmpeg.cmake

Cleaned up FindFFmpeg.cmake

--- CMakeModules/FindFFmpeg.cmake
+++ CMakeModules/FindFFmpeg.cmake
@@ -93,9 +93,9 @@
         /usr/freeware/lib64
     )

-    IF   (FFMPEG_${varname}_LIBRARIES)
+    IF   (FFMPEG_${varname}_LIBRARIES AND FFMPEG_${varname}_INCLUDE_DIRS)
         SET(FFMPEG_${varname}_FOUND 1)
-    ENDIF(FFMPEG_${varname}_LIBRARIES)
+    ENDIF(FFMPEG_${varname}_LIBRARIES AND FFMPEG_${varname}_INCLUDE_DIRS)

 ENDMACRO(FFMPEG_FIND)

@@ -126,6 +126,6 @@

 ELSE (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND)

-    MESSAGE(STATUS "Could not find FFMPEG")
+#    MESSAGE(STATUS "Could not find FFMPEG")

 ENDIF(FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND)


Search for GLEWmx in default paths too

Search for GLEWmx in default paths too

Same as [#1292](https://github.com/arrayfire/arrayfire/pull/1292) on arrayfire/arrayfire

--- CMakeModules/FindGLEWmx.cmake
+++ CMakeModules/FindGLEWmx.cmake
@@ -58,7 +58,6 @@
             /sw/lib
             /opt/local/lib
             ${GLEW_ROOT_DIR}/lib
-            NO_DEFAULT_PATH
             DOC "The GLEWmx library")
         UNSET(PX)
         UNSET(SX)
@@ -75,7 +74,6 @@
             /sw/lib
             /opt/local/lib
             ${GLEW_ROOT_DIR}/lib
-            NO_DEFAULT_PATH
             DOC "The GLEWmx library")
     ENDIF (USE_GLEWmx_STATIC)
 ENDIF (WIN32)


cmake: improve gitversion generation

cmake: improve gitversion generation

--- CMakeModules/gitversion.cmake
+++ CMakeModules/gitversion.cmake
@@ -1,6 +1,9 @@
-set(CMAKE_MODULE_PATH ${TOP_SOURCE_DIR}/CMakeModules)
-
 if (GIT_EXECUTABLE)
+  # refresh git index
+  execute_process(COMMAND ${GIT_EXECUTABLE} update-index -q --refresh
+    WORKING_DIRECTORY ${TOP_SOURCE_DIR} TIMEOUT 5 OUTPUT_QUIET
+    ERROR_VARIABLE EXEC_ERR OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
   #later use git describe here
   execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
     WORKING_DIRECTORY ${TOP_SOURCE_DIR}


build fix

build fix

--- CMakeExternals.cmake
+++ CMakeExternals.cmake
@@ -725,17 +725,24 @@

       if(WIN32)
         set(MEGAMOL_SHADER_FACTORY_LIB "lib/megamol-shader-factory.lib")
+        set(SHADERC_LIB "lib/shaderc_combined.lib")
       else()
         include(GNUInstallDirs)
         set(MEGAMOL_SHADER_FACTORY_LIB "${CMAKE_INSTALL_LIBDIR}/libmegamol-shader-factory.a")
+        set(SHADERC_LIB "${CMAKE_INSTALL_LIBDIR}/libshaderc_combined.a")
       endif()

       add_external_project(megamol-shader-factory STATIC
         GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/megamol-shader-factory.git
-        BUILD_BYPRODUCTS "<INSTALL_DIR>/${MEGAMOL_SHADER_FACTORY_LIB}")
+        BUILD_BYPRODUCTS
+        "<INSTALL_DIR>/${MEGAMOL_SHADER_FACTORY_LIB}"
+        "<INSTALL_DIR>/${SHADERC_LIB}")

+      external_get_property(megamol-shader-factory INSTALL_DIR)
+
       add_external_library(megamol-shader-factory
-        LIBRARY ${MEGAMOL_SHADER_FACTORY_LIB})
+        LIBRARY ${MEGAMOL_SHADER_FACTORY_LIB}
+        INTERFACE_LIBRARIES ${INSTALL_DIR}/${SHADERC_LIB})
   else()
     message(FATAL_ERROR "Unknown external required \"${NAME}\"")
   endif()


Add PROJECT_NAME to each check/project target.

Subproject builds create targets with the same names unless we make them unique.

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -35,20 +35,20 @@
   source_group(\\ FILES ${FILE})

   list(APPEND ALL_CPP_TESTS ${NAME})
-  add_executable(${NAME} ${FILE})
-  set_target_properties(${NAME} PROPERTIES FOLDER "Tests")
+  add_executable(${PROJECT_NAME}_${NAME} ${FILE})
+  set_target_properties(${PROJECT_NAME}_${NAME} PROPERTIES FOLDER "Tests")

   # Per target INCLUDE_DIRECTORIES if supported
   if(CMAKE_VERSION VERSION_GREATER 2.8.7 AND ${NAME}_INCLUDE_DIRECTORIES)
-    set_target_properties(${NAME} PROPERTIES
+    set_target_properties(${PROJECT_NAME}_${NAME} PROPERTIES
       INCLUDE_DIRECTORIES "${${NAME}_INCLUDE_DIRECTORIES}")
   endif()

   # Test link libraries
   if (${NAME}_LINK_LIBRARIES)
-    target_link_libraries(${NAME} ${${NAME}_LINK_LIBRARIES})
+    target_link_libraries(${PROJECT_NAME}_${NAME} ${${NAME}_LINK_LIBRARIES})
   endif()
-  target_link_libraries(${NAME} ${TEST_LIBRARIES})
+  target_link_libraries(${PROJECT_NAME}_${NAME} ${TEST_LIBRARIES})

   # Per target test command customisation with
   # ${NAME}_TEST_PREFIX and ${NAME}_TEST_ARGS
@@ -62,18 +62,18 @@
   endif()

   if(CMAKE_VERSION VERSION_LESS 2.8)
-    get_target_property(EXECUTABLE ${NAME} LOCATION)
+    get_target_property(EXECUTABLE ${PROJECT_NAME}_${NAME} LOCATION)
     string(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}"
            EXECUTABLE "${EXECUTABLE}")
-    add_test(${NAME} ${RUN_PREFIX} ${EXECUTABLE} ${RUN_ARGS})
+    add_test(${PROJECT_NAME}_${NAME} ${RUN_PREFIX} ${EXECUTABLE} ${RUN_ARGS})
   else(CMAKE_VERSION VERSION_LESS 2.8)
-    add_test(NAME ${NAME} COMMAND ${RUN_PREFIX} $<TARGET_FILE:${NAME}> ${RUN_ARGS})
+    add_test(NAME ${PROJECT_NAME}_${NAME} COMMAND ${RUN_PREFIX} $<TARGET_FILE:${PROJECT_NAME}_${NAME}> ${RUN_ARGS})
   endif(CMAKE_VERSION VERSION_LESS 2.8)

   # Add test labels
   set(TEST_LABELS ${TEST_LABEL} ${${NAME}_TEST_LABEL})
   if (TEST_LABELS)
-    set_tests_properties(${NAME} PROPERTIES LABELS "${TEST_LABELS}")
+    set_tests_properties(${PROJECT_NAME}_${NAME} PROPERTIES LABELS "${TEST_LABELS}")
   endif()
 endforeach()


Make indentation of FindLLVM.cmake uniform.

--- CMake/FindLLVM.cmake
+++ CMake/FindLLVM.cmake
@@ -16,7 +16,7 @@
 if (MSVC)
   set(LLVM_ROOT "C:/Program Files/LLVM")
   if (NOT IS_DIRECTORY ${LLVM_ROOT})
-      message(FATAL_ERROR "Could NOT find LLVM")
+    message(FATAL_ERROR "Could NOT find LLVM")
   endif ()

   message(STATUS "Found LLVM: ${LLVM_ROOT}")
@@ -36,45 +36,47 @@
 else (LLVM_INCLUDE_DIR)

   find_program(LLVM_CONFIG_EXECUTABLE
-      NAMES llvm-config
-      PATHS
-      /opt/local/bin
-      /opt/llvm/2.6/bin
-      /opt/llvm/bin
-  )
+    NAMES llvm-config
+    PATHS
+    /opt/local/bin
+    /opt/llvm/2.6/bin
+    /opt/llvm/bin
+    )

   find_program(LLVM_GCC_EXECUTABLE
-      NAMES llvm-gcc llvmgcc
-      PATHS
-      /opt/local/bin
-      /opt/llvm/2.6/bin
-      /opt/llvm/bin
-      /Developer/usr/bin
-  )
+    NAMES llvm-gcc llvmgcc
+    PATHS
+    /opt/local/bin
+    /opt/llvm/2.6/bin
+    /opt/llvm/bin
+    /Developer/usr/bin
+    /usr/lib/llvm/llvm/gcc-4.2/bin
+    )

   find_program(LLVM_GXX_EXECUTABLE
-      NAMES llvm-g++ llvmg++
-      PATHS
-      /opt/local/bin
-      /opt/llvm/2.6/bin
-      /opt/llvm/bin
-      /Developer/usr/bin
-  )
+    NAMES llvm-g++ llvmg++
+    PATHS
+    /opt/local/bin
+    /opt/llvm/2.6/bin
+    /opt/llvm/bin
+    /Developer/usr/bin
+    /usr/lib/llvm/llvm/gcc-4.2/bin
+    )

   if(LLVM_GCC_EXECUTABLE)
-      MESSAGE(STATUS "LLVM llvm-gcc found at: ${LLVM_GCC_EXECUTABLE}")
-      #CMAKE_FORCE_C_COMPILER(${LLVM_GCC_EXECUTABLE} GNU)
+    MESSAGE(STATUS "LLVM llvm-gcc found at: ${LLVM_GCC_EXECUTABLE}")
+    #CMAKE_FORCE_C_COMPILER(${LLVM_GCC_EXECUTABLE} GNU)
   endif(LLVM_GCC_EXECUTABLE)

   if(LLVM_GXX_EXECUTABLE)
-      MESSAGE(STATUS "LLVM llvm-g++ found at: ${LLVM_GXX_EXECUTABLE}")
-      #CMAKE_FORCE_CXX_COMPILER(${LLVM_GXX_EXECUTABLE} GNU)
+    MESSAGE(STATUS "LLVM llvm-g++ found at: ${LLVM_GXX_EXECUTABLE}")
+    #CMAKE_FORCE_CXX_COMPILER(${LLVM_GXX_EXECUTABLE} GNU)
   endif(LLVM_GXX_EXECUTABLE)

   if(LLVM_CONFIG_EXECUTABLE)
-      MESSAGE(STATUS "LLVM llvm-config found at: ${LLVM_CONFIG_EXECUTABLE}")
+    MESSAGE(STATUS "LLVM llvm-config found at: ${LLVM_CONFIG_EXECUTABLE}")
   else(LLVM_CONFIG_EXECUTABLE)
-      MESSAGE(FATAL_ERROR "Could NOT find LLVM")
+    MESSAGE(FATAL_ERROR "Could NOT find LLVM")
   endif(LLVM_CONFIG_EXECUTABLE)

   MACRO(FIND_LLVM_LIBS LLVM_CONFIG_EXECUTABLE _libname_ LIB_VAR OBJECT_VAR)
@@ -85,44 +87,44 @@
   ENDMACRO(FIND_LLVM_LIBS)

-   # this function borrowed from PlPlot, Copyright (C) 2006  Alan W. Irwin
-   function(TRANSFORM_VERSION numerical_result version)
-   # internal_version ignores everything in version after any character that
-   # is not 0-9 or ".".  This should take care of the case when there is
-   # some non-numerical data in the patch version.
-   #message(STATUS "DEBUG: version = ${version}")
-   string(REGEX REPLACE "^([0-9.]+).*$" "\\1" internal_version ${version})
+  # this function borrowed from PlPlot, Copyright (C) 2006  Alan W. Irwin
+  function(TRANSFORM_VERSION numerical_result version)
+    # internal_version ignores everything in version after any character that
+    # is not 0-9 or ".".  This should take care of the case when there is
+    # some non-numerical data in the patch version.
+    #message(STATUS "DEBUG: version = ${version}")
+    string(REGEX REPLACE "^([0-9.]+).*$" "\\1" internal_version ${version})

-      # internal_version is normally a period-delimited triplet string of the form
-      # "major.minor.patch", but patch and/or minor could be missing.
-      # Transform internal_version into a numerical result that can be compared.
-      string(REGEX REPLACE "^([0-9]*).+$" "\\1" major ${internal_version})
-      string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" minor ${internal_version})
-      #string(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.([0-9]*)$" "\\1" patch ${internal_version})
+    # internal_version is normally a period-delimited triplet string of the form
+    # "major.minor.patch", but patch and/or minor could be missing.
+    # Transform internal_version into a numerical result that can be compared.
+    string(REGEX REPLACE "^([0-9]*).+$" "\\1" major ${internal_version})
+    string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" minor ${internal_version})
+    #string(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.([0-9]*)$" "\\1" patch ${internal_version})

-      #if(NOT patch MATCHES "[0-9]+")
-      #  set(patch 0)
-      #endif(NOT patch MATCHES "[0-9]+")
-      set(patch 0)
+    #if(NOT patch MATCHES "[0-9]+")
+    #  set(patch 0)
+    #endif(NOT patch MATCHES "[0-9]+")
+    set(patch 0)

-      if(NOT minor MATCHES "[0-9]+")
-        set(minor 0)
-      endif(NOT minor MATCHES "[0-9]+")
+    if(NOT minor MATCHES "[0-9]+")
+      set(minor 0)
+    endif(NOT minor MATCHES "[0-9]+")

-      if(NOT major MATCHES "[0-9]+")
-        set(major 0)
-      endif(NOT major MATCHES "[0-9]+")
-      #message(STATUS "DEBUG: internal_version = ${internal_version}")
-      #message(STATUS "DEBUG: major = ${major}")
-      #message(STATUS "DEBUG: minor= ${minor}")
-      #message(STATUS "DEBUG: patch = ${patch}")
-      math(EXPR internal_numerical_result
-        #"${major}*1000000 + ${minor}*1000 + ${patch}"
-        "${major}*1000000 + ${minor}*1000"
-        )
-      #message(STATUS "DEBUG: ${numerical_result} = ${internal_numerical_result}")
-      set(${numerical_result} ${internal_numerical_result} PARENT_SCOPE)
-   endfunction(TRANSFORM_VERSION)
+    if(NOT major MATCHES "[0-9]+")
+      set(major 0)
+    endif(NOT major MATCHES "[0-9]+")
+    #message(STATUS "DEBUG: internal_version = ${internal_version}")
+    #message(STATUS "DEBUG: major = ${major}")
+    #message(STATUS "DEBUG: minor= ${minor}")
+    #message(STATUS "DEBUG: patch = ${patch}")
+    math(EXPR internal_numerical_result
+      #"${major}*1000000 + ${minor}*1000 + ${patch}"
+      "${major}*1000000 + ${minor}*1000"
+      )
+    #message(STATUS "DEBUG: ${numerical_result} = ${internal_numerical_result}")
+    set(${numerical_result} ${internal_numerical_result} PARENT_SCOPE)
+  endfunction(TRANSFORM_VERSION)

   exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE LLVM_STRING_VERSION )


MinGW build fits into 40 Mb with debug info

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -281,7 +281,7 @@
 					${OLXROOTDIR}/libs/lua
 					${OLXROOTDIR}/libs/boost_process)
 		# as long as we dont have breakpad, this doesnt make sense
-		#ADD_DEFINITIONS(-g2) # limit debug info somewhat, or it will produce huge .EXE
+		ADD_DEFINITIONS(-gdwarf-2 -g1) # By default GDB uses STABS and produces 300Mb exe - DWARF will produce 40Mb and no line numbers, -g2 will give 170Mb
 	ELSE(MINGW_CROSS_COMPILE)
 		ADD_DEFINITIONS("-pthread")
 	ENDIF(MINGW_CROSS_COMPILE)


Build bazel deps with clang config on AppleClang.

* Previously, this was being mis-identified as GCC.
* Should fix: #4448

--- build_tools/cmake/configure_bazel.cmake
+++ build_tools/cmake/configure_bazel.cmake
@@ -51,6 +51,8 @@
   # Use the utility to emit _bazelrc_file configuration options.
   set(_bazelrc_file "${CMAKE_BINARY_DIR}/bazelrc")
   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    set(_bazel_platform_config generic_clang)
+  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
     set(_bazel_platform_config generic_clang)
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     message(WARNING "Configuring bazel build for GCC: This receives minimal testing (recommend clang)")


revert the part of PR #4453 about linkopts, thanks GMNGeoffrey for the catch (#4476)

--- build_tools/cmake/iree_cc_library.cmake
+++ build_tools/cmake/iree_cc_library.cmake
@@ -164,6 +164,11 @@
         "$<BUILD_INTERFACE:${IREE_SOURCE_DIR}>"
         "$<BUILD_INTERFACE:${IREE_BINARY_DIR}>"
     )
+    target_link_options(${_NAME}
+      INTERFACE
+        ${IREE_DEFAULT_LINKOPTS}
+        ${_RULE_LINKOPTS}
+    )
     target_link_libraries(${_NAME}
       INTERFACE
         ${_RULE_DEPS}


auav-x21 sync with px4fmu-v3 modules list

--- cmake/configs/nuttx_auav-x21_default.cmake
+++ cmake/configs/nuttx_auav-x21_default.cmake
@@ -17,10 +17,12 @@
 	drivers/blinkm
 	drivers/camera_trigger
 	drivers/gps
-	drivers/mkblctrl
 	drivers/imu/mpu6000
 	drivers/imu/mpu9250
+	drivers/irlock
+	drivers/mkblctrl
 	drivers/oreoled
+	drivers/protocol_splitter
 	drivers/pwm_input
 	drivers/pwm_out_sim
 	drivers/px4flow
@@ -30,6 +32,7 @@
 	drivers/stm32
 	drivers/stm32/adc
 	drivers/stm32/tone_alarm
+	drivers/tap_esc
 	drivers/vmount
 	modules/sensors

@@ -40,10 +43,11 @@
 	systemcmds/config
 	systemcmds/dumpfile
 	systemcmds/esc_calib
+	systemcmds/hardfault_log
 	systemcmds/led_control
 	systemcmds/mixer
-	systemcmds/hardfault_log
 	systemcmds/motor_ramp
+	systemcmds/motor_test
 	systemcmds/mtd
 	systemcmds/nshterm
 	systemcmds/param
@@ -61,9 +65,9 @@
 	#
 	drivers/distance_sensor/sf0x/sf0x_tests
 	drivers/test_ppm
+	lib/controllib/controllib_test
 	#lib/rc/rc_tests
 	modules/commander/commander_tests
-	lib/controllib/controllib_test
 	modules/mavlink/mavlink_tests
 	modules/mc_pos_control/mc_pos_control_tests
 	modules/uORB/uORB_tests
@@ -72,22 +76,25 @@
 	#
 	# General system control
 	#
+	modules/camera_feedback
 	modules/commander
+	modules/events
+	modules/gpio_led
+	modules/land_detector
 	modules/load_mon
+	modules/mavlink
 	modules/navigator
-	modules/mavlink
-	modules/gpio_led
 	modules/uavcan
-	modules/land_detector

 	#
 	# Estimation modules
 	#
 	modules/attitude_estimator_q
+	modules/ekf2
+	modules/landing_target_estimator
+	modules/local_position_estimator
 	modules/position_estimator_inav
-	modules/local_position_estimator
-	modules/landing_target_estimator
-	modules/ekf2
+	modules/wind_estimator

 	#
 	# Vehicle Control
@@ -114,29 +121,34 @@
 	#
 	# OBC challenge
 	#
-	#examples/bottle_drop
+	examples/bottle_drop

 	#
 	# Rover apps
 	#
-	#examples/rover_steering_control
+	examples/rover_steering_control
+
+	#
+	# Segway
+	#
+	examples/segway

 	#
 	# Demo apps
 	#
-	#examples/math_demo
+
 	# Tutorial code from
 	# https://px4.io/dev/px4_simple_app
-	#examples/px4_simple_app
+	examples/px4_simple_app

 	# Tutorial code from
 	# https://px4.io/dev/debug_values
-	#examples/px4_mavlink_debug
+	examples/px4_mavlink_debug

 	# Tutorial code from
 	# https://px4.io/dev/example_fixedwing_control
-	#examples/fixedwing_control
+	examples/fixedwing_control

 	# Hardware test
-	#examples/hwtest
+	examples/hwtest
 )


Run bin target by default

Run bin target by default

--- firmware/cmake/greatfet-common.cmake
+++ firmware/cmake/greatfet-common.cmake
@@ -153,7 +153,7 @@
 	set_target_properties(${PROJECT_NAME}.elf PROPERTIES LINK_FLAGS "${LDFLAGS_M4}")

 	add_custom_target(
-		${PROJECT_NAME}.bin
+		${PROJECT_NAME}.bin ALL
 		DEPENDS ${PROJECT_NAME}.elf
 		COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}.elf ${PROJECT_NAME}.bin
 	)
@@ -181,7 +181,7 @@

 	add_custom_target(
 		${PROJECT_NAME}.dfu ${DFU_ALL}
-		DEPENDS ${PROJECT_NAME}_dfu.bin ${PROJECT_NAME}.bin
+		DEPENDS ${PROJECT_NAME}_dfu.bin
 		COMMAND rm -f _tmp.dfu _header.bin
 		COMMAND cp ${PROJECT_NAME}_dfu.bin _tmp.dfu
 		COMMAND ${DFU_COMMAND}


using cython3

using cython3

--- bitbots_common/cmake/FindCython.cmake
+++ bitbots_common/cmake/FindCython.cmake
@@ -22,7 +22,7 @@
 # limitations under the License.
 #=============================================================================

-find_program( CYTHON_EXECUTABLE NAMES cython )
+find_program( CYTHON_EXECUTABLE NAMES cython3 )

 include( FindPackageHandleStandardArgs )
 FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )


- issue 2128: fix variable not expanded

- issue 2128: fix variable not expanded

--- copasi/bindings/perl/patch-swig-file.cmake
+++ copasi/bindings/perl/patch-swig-file.cmake
@@ -4,11 +4,12 @@
 # All rights reserved.

+
 if (NOT FILENAME OR NOT EXISTS ${FILENAME})
   message(FATAL_ERROR "Please specify the filename to the file to patch")
 endif()

-get_filename_component(NAME_ONLY FILENAME NAME)
+get_filename_component(NAME_ONLY ${FILENAME} NAME)
 file(READ "${FILENAME}" SOURCECODE)

 file(WRITE  "${FILENAME}" "// patched ${NAME_ONLY}\n")


cmake sitl_tests silence debug message

cmake sitl_tests silence debug message

--- platforms/posix/cmake/sitl_tests.cmake
+++ platforms/posix/cmake/sitl_tests.cmake
@@ -48,8 +48,6 @@
 		uorb
 	)
 endif()
-
-message("${tests}")

 foreach(test_name ${tests})
 	configure_file(${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_template.in ${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_${test_name}_generated)


Refs #3243. Fixed error with CMake 3.5

Refs #3243. Fixed error with CMake 3.5

--- cmake/common/check_configuration.cmake
+++ cmake/common/check_configuration.cmake
@@ -130,10 +130,10 @@
             -Wuseless-cast
             -Wdouble-promotion
             -Wold-style-cast
-            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,6.0.0>>:-Wnull-dereference>
-            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,7.0.0>>:-Wduplicated-branches>
-            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,6.0.0>>:-Wduplicated-cond>
-            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,7.0.0>>:-Wrestrict>
+            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6.0.0>>>:-Wnull-dereference>
+            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,7.0.0>>>:-Wduplicated-branches>
+            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6.0.0>>>:-Wduplicated-cond>
+            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,7.0.0>>>:-Wrestrict>
             )
     endif()
 endfunction()


OS X build and warning fix

OS X build and warning fix

Revert "Add missed file"

This reverts commit 4c9f27270e0a7c00c10cbc56ce5c6842b47e5ab2.

FindCoreFoundation.cmake is not needed since CoreFoundation
is a system framework. Its use has been removed by
commit f223ce03d4b94ffbb093fc8be5adf8d968f54434

Acked by: Ivan Čukić

REVIEW: 126285

--- cmake/modules/FindCoreFoundation.cmake
+++ cmake/modules/FindCoreFoundation.cmake
@@ -1,13 +0,0 @@
-# Copyright (c) 2014, Samuel Gaist, <samuel.gaist@edeltech.ch>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-INCLUDE(CMakeFindFrameworks)
-
-CMAKE_FIND_FRAMEWORKS(CoreFoundation)
-
-if (CoreFoundation_FRAMEWORKS)
-   set(COREFOUNDATION_LIBRARY "-framework CoreFoundation" CACHE FILEPATH "CoreFoundation framework" FORCE)
-   set(COREFOUNDATION_FOUND 1)
-endif (CoreFoundation_FRAMEWORKS)


[llvm] [cmake] Add additional headers only if they exist

Modify the add_header_files_for_glob() function to only add files
that do exist, rather than all matches of the glob.  This fixes CMake
error when one of the include directories (which happen to include
/usr/include) contain broken symlinks.

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

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

--- cmake/modules/LLVMProcessSources.cmake
+++ cmake/modules/LLVMProcessSources.cmake
@@ -30,7 +30,15 @@

 function(add_header_files_for_glob hdrs_out glob)
   file(GLOB hds ${glob})
-  set(${hdrs_out} ${hds} PARENT_SCOPE)
+  set(filtered)
+  foreach(file ${hds})
+    # Explicit existence check is necessary to filter dangling symlinks
+    # out.  See https://bugs.gentoo.org/674662.
+    if(EXISTS ${file})
+      list(APPEND filtered ${file})
+    endif()
+  endforeach()
+  set(${hdrs_out} ${filtered} PARENT_SCOPE)
 endfunction(add_header_files_for_glob)

 function(find_all_header_files hdrs_out additional_headerdirs)


Fix typo when loading `conanbuildinfo.cmake` (#202)

Fix a typo in the code loading the conan information which was not
apparent as the `CMakeLists.txt` in the repositories that use these
tools were already loading the `conanbuildinfo.cmake`.

--- cmake/bde_external_dependencies.cmake
+++ cmake/bde_external_dependencies.cmake
@@ -66,7 +66,7 @@
     set(CONAN_BUILD_INFO ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
     if (EXISTS ${CONAN_BUILD_INFO})
         message(STATUS "Found ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
-        include(${CONAN_BLD_INFO})
+        include(${CONAN_BUILD_INFO})
         conan_basic_setup(TARGETS)
     endif()
 endfunction()


Allow the CMake option 'LLVM_ABI_BREAKING_CHECKS' to be undefined.

When building libc++abi in a standalone configuration the CMake option
'LLVM_ABI_BREAKING_CHECKS` will not be defined.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -88,6 +88,9 @@
   set( LLVM_ENABLE_ABI_BREAKING_CHECKS 1 )
 elseif( uppercase_LLVM_ABI_BREAKING_CHECKS STREQUAL "FORCE_OFF" )
   # We don't need to do anything special to turn off ABI breaking checks.
+elseif( NOT DEFINED LLVM_ABI_BREAKING_CHECKS )
+  # Treat LLVM_ABI_BREAKING_CHECKS like "FORCE_OFF" when it has not been
+  # defined.
 else()
   message(FATAL_ERROR "Unknown value for LLVM_ABI_BREAKING_CHECKS: \"${LLVM_ABI_BREAKING_CHECKS}\"!")
 endif()


cmake: disable -Wnon-virtual-dtor when it gives false positives

clang has only been smart enough not to trigger -Wnon-virtual-dtor
warnings on final classes since r208449 (in clang 3.5). Building
with older versions is extremely noisy, so disable the warning
on those compilers.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -288,8 +288,20 @@
     add_flag_if_supported("-Wcovered-switch-default" COVERED_SWITCH_DEFAULT_FLAG)
     append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS)
     append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS)
-    check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
-    append_if(CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG "-Wnon-virtual-dtor" CMAKE_CXX_FLAGS)
+
+    # Check if -Wnon-virtual-dtor warns even though the class is marked final.
+    # If it does, don't add it. So it won't be added on clang 3.4 and older.
+    # This also catches cases when -Wnon-virtual-dtor isn't supported by
+    # the compiler at all.
+    set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11 -Werror=non-virtual-dtor")
+    CHECK_CXX_SOURCE_COMPILES("class base {public: virtual void anchor();protected: ~base();};
+                               class derived final : public base { public: ~derived();};
+                               int main() { return 0; }"
+                              CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR)
+    set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
+    append_if(CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
+              "-Wnon-virtual-dtor" CMAKE_CXX_FLAGS)

     # Check if -Wcomment is OK with an // comment ending with '\' if the next
     # line is also a // comment.


MAINT: copy the files in the 'cmake' directory and not the directory!

This tiny difference (additional '/') makes the whole thing.

--- cmake/sara_installation_settings.cmake
+++ cmake/sara_installation_settings.cmake
@@ -18,7 +18,7 @@
                 ${DO_Sara_DIR}/COPYING.MPL2
           DESTINATION ${SARA_INSTALL_DIR}/include/DO/Sara
           COMPONENT Sources)
-  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmake
+  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmake/
           DESTINATION ${SARA_INSTALL_DIR}/share/cmake/Modules
           COMPONENT Sources)
   install(DIRECTORY ${DO_Sara_DIR}/src/DO


ctest: reorganize and ensure BUILD_TESTING

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- test.cmake
+++ test.cmake
@@ -278,9 +278,14 @@
    set(CMAKE_MAKE_PROGRAM "make")
 endif()

-set(configure_options "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS};-DCMAKE_BUILD_TYPE=${build_type};-DBUILD_EXAMPLES=TRUE;-DTEST_OPERATOR_FAILURES=TRUE;-DUSE_CCACHE=ON")
+set(configure_options "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}")
+list(APPEND configure_options "-DCMAKE_BUILD_TYPE=${build_type}")
+list(APPEND configure_options "-DBUILD_TESTING=TRUE")
+list(APPEND configure_options "-DBUILD_EXAMPLES=TRUE")
+list(APPEND configure_options "-DTEST_OPERATOR_FAILURES=TRUE")
+list(APPEND configure_options "-DUSE_CCACHE=ON")
 if(target_architecture)
-   set(configure_options "${configure_options};-DTARGET_ARCHITECTURE=${target_architecture}")
+   list(APPEND configure_options "-DTARGET_ARCHITECTURE=${target_architecture}")
 endif()

 if("${COMPILER_VERSION}" MATCHES "(GCC|Open64).*4\\.[01234567]\\."


[Build] The Python script is now also installed. There is still some work to specify the correct path of the dependency (library).

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -376,7 +376,7 @@
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS
     program_options date_time iostreams serialization filesystem
-    unit_test_framework)
+    unit_test_framework python)

   # The first check is for the required components.
   find_package (Boost COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
@@ -393,7 +393,8 @@
     # Update the list of dependencies for the project
     list (APPEND PROJ_DEP_LIBS_FOR_LIB
       ${Boost_IOSTREAMS_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
-      ${Boost_FILESYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY})
+      ${Boost_FILESYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY}
+      ${Boost_PYTHON_LIBRARY})
     list (APPEND PROJ_DEP_LIBS_FOR_BIN ${Boost_PROGRAM_OPTIONS_LIBRARY})
     list (APPEND PROJ_DEP_LIBS_FOR_TST ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})

@@ -401,7 +402,8 @@
     set (BOOST_REQUIRED_LIBS
       ${Boost_IOSTREAMS_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
       ${Boost_FILESYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY}
-      ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+      ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
+      ${Boost_PYTHON_LIBRARY})
   endif (Boost_FOUND)

 endmacro (get_boost)
@@ -757,9 +759,12 @@
     "${${MODULE_LIB_TARGET}_root_HEADERS}" "${${MODULE_LIB_TARGET}_SOURCES}"
     ${_intermodule_dependencies})

-  # Installation of all the remaining header files for the module, i.e.,
-  # the header files located in all the layers except the root.
-  module_header_install_everything_else ()
+  # If so required, installation of all the remaining header files
+  # for the module, i.e., the header files located in all the layers
+  # except the root.
+  if (${_publish_all_headers_flag})
+    module_header_install_everything_else()
+  endif (${_publish_all_headers_flag})

   # Convenient message to the user/developer
   if (NOT "${INSTALL_LIB_DIR}" MATCHES "^/usr/${LIBDIR}$")
@@ -776,6 +781,8 @@
 #    short name: a 'lib' suffix is just appended to the short name.
 #  * The directory where to find the header files.
 #  * The header files to be published/installed along with the library.
+#    If there are no header to be exported, the 'na' keyword (standing for
+#    'non available') must be given.
 #  * The source files to build the library.
 #    Note that the source files contain at least the header files. Hence,
 #    even when there are no .cpp source files, the .hpp files will appear.
@@ -788,7 +795,7 @@
 # external libraries (e.g., Boost, SOCI, StdAir) are automatically
 # appended, thanks to the get_external_libs() macro.
 macro (module_library_add_specific
-	_lib_short_name _lib_dir _lib_headers _lib_sources)
+    _lib_short_name _lib_dir _lib_headers _lib_sources)
   # Derive the library (CMake) target from its name
   set (_lib_target ${_lib_short_name}lib)

@@ -834,9 +841,6 @@
     # as generated by the module_generate_config_helpers() macro
     add_dependencies (${_lib_target} hdr_cfg_${MODULE_NAME})
   endif (${_lib_short_name} STREQUAL ${MODULE_NAME})
-
-  # DEBUG
-  #message ("DEBUG -- [${_lib_target}] _lib_headers = ${_lib_headers}")

   ##
   # Library name (and soname)
@@ -869,8 +873,11 @@
   list (APPEND ${MODULE_NAME}_ALL_LIBS ${_lib_target})
   set (${MODULE_NAME}_ALL_LIBS ${${MODULE_NAME}_ALL_LIBS} PARENT_SCOPE)

-  # Install the header files for the library
-  module_header_install_specific (${_lib_dir} "${_lib_headers}")
+  # If given/existing, install the header files for the library
+  string (TOLOWER "${_lib_headers}" _lib_headers_lower)
+  if (NOT "${_lib_headers_lower}" STREQUAL "na")
+    module_header_install_specific (${_lib_dir} "${_lib_headers}")
+  endif (NOT "${_lib_headers_lower}" STREQUAL "na")

 endmacro (module_library_add_specific)

@@ -959,11 +966,37 @@
 endmacro (module_binary_add)

 ##
+# Add a Python script to be installed
+macro (module_python_add _script_file)
+  #
+  set (_full_python_script_path ${CMAKE_CURRENT_SOURCE_DIR}/${_script_file})
+  if (EXISTS ${_full_python_script_path})
+    # Install the development helpers
+    install (PROGRAMS ${_script_file} DESTINATION bin COMPONENT devel)
+
+  else (EXISTS ${_full_python_script_path})
+    message (FATAL_ERROR
+      "The Python script to be installed, '${_script_file}', does not exist")
+  endif (EXISTS ${_full_python_script_path})
+
+  # Register the binary target in the project (for reporting purpose)
+  get_filename_component (_script_alone ${_script_file} NAME)
+  list (APPEND PROJ_ALL_BIN_TARGETS ${_script_alone})
+  set (PROJ_ALL_BIN_TARGETS ${PROJ_ALL_BIN_TARGETS} PARENT_SCOPE)
+
+  # Register, for reporting purpose, the list of executables to be built
+  # and installed for that module
+  list (APPEND ${MODULE_NAME}_ALL_EXECS ${_script_alone})
+  set (${MODULE_NAME}_ALL_EXECS ${${MODULE_NAME}_ALL_EXECS} PARENT_SCOPE)
+
+endmacro (module_python_add)
+
+##
 # Installation of the CMake import helper, so that third party projects
 # can refer to it (for libraries, header files and binaries)
 macro (module_export_install)
-  install (EXPORT ${LIB_DEPENDENCY_EXPORT} DESTINATION
-    "${INSTALL_DATA_DIR}/${PACKAGE}/CMake" COMPONENT devel)
+  install (EXPORT ${LIB_DEPENDENCY_EXPORT}
+    DESTINATION "${INSTALL_DATA_DIR}/${PACKAGE}/CMake" COMPONENT devel)
 endmacro (module_export_install)

@@ -1118,11 +1151,11 @@

   # Install the development helpers
   install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CFG_SCRIPT}
-	DESTINATION ${CFG_SCRIPT_PATH})
+    DESTINATION ${CFG_SCRIPT_PATH})
   install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PKGCFG_SCRIPT}
-	DESTINATION ${PKGCFG_SCRIPT_PATH})
+    DESTINATION ${PKGCFG_SCRIPT_PATH})
   install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${M4_MACROFILE}
-	DESTINATION ${M4_MACROFILE_PATH})
+    DESTINATION ${M4_MACROFILE_PATH})

 endmacro (install_dev_helper_files)

@@ -1234,11 +1267,11 @@
   message (STATUS)
   foreach (_module_name ${PROJ_ALL_MOD_FOR_BLD})
     message (STATUS "* Module ....................... : ${_module_name}")
-    message (STATUS "  + Layers to be built ......... : ${${_module_name}_ALL_LAYERS}")
+    message (STATUS "  + Layers to build ............ : ${${_module_name}_ALL_LAYERS}")
     message (STATUS "  + Dependencies on other layers : ${${_module_name}_INTER_TARGETS}")
-    message (STATUS "  + Libraries to be built ...... : ${${_module_name}_ALL_LIBS}")
-    message (STATUS "  + Executables to be built .... : ${${_module_name}_ALL_EXECS}")
-    message (STATUS "  + Test to be checked ......... : ${${_module_name}_ALL_TESTS}")
+    message (STATUS "  + Libraries to build/install . : ${${_module_name}_ALL_LIBS}")
+    message (STATUS "  + Executables to build/install : ${${_module_name}_ALL_EXECS}")
+    message (STATUS "  + Tests to perform ........... : ${${_module_name}_ALL_TESTS}")
   endforeach (_module_name)
 endmacro (display_status_all_modules)

@@ -1261,8 +1294,8 @@
   message (STATUS "---     Build Configuration    ---")
   message (STATUS "----------------------------------")
   message (STATUS "Modules to build ............... : ${PROJ_ALL_MOD_FOR_BLD}")
-  message (STATUS "Libraries to build ............. : ${PROJ_ALL_LIB_TARGETS}")
-  message (STATUS "Binaries to build .............. : ${PROJ_ALL_BIN_TARGETS}")
+  message (STATUS "Libraries to build/install ..... : ${PROJ_ALL_LIB_TARGETS}")
+  message (STATUS "Binaries to build/install ...... : ${PROJ_ALL_BIN_TARGETS}")
   message (STATUS "Modules to test ................ : ${PROJ_ALL_MOD_FOR_TST}")
   message (STATUS "Binaries to test ............... : ${PROJ_ALL_TST_TARGETS}")
   display_status_all_modules ()


Update conan.cmake

Update conan.cmake

Co-authored-by: Carlos Zoido <2accafae6a9d696f958aa2dba27077cd7a20a336@gmail.com>

--- conan.cmake
+++ conan.cmake
@@ -264,7 +264,7 @@
         endif()
     endforeach()

-    if(APPLE)
+    if(CMAKE_OSX_SYSROOT)
         set(xcode_sysroot_option "--sysroot=${CMAKE_OSX_SYSROOT}")
     endif()


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

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

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -25,6 +25,7 @@
 Name[eu]=VLC
 Name[fa]=وی‌ال‌سی (VLC)
 Name[fi]=VLC
+Name[fr]=VLC
 Name[ga]=VLC
 Name[gl]=VLC
 Name[hu]=VLC
@@ -72,6 +73,7 @@
 Comment[eu]=Phonon-en VLC bizkarraldekoa
 Comment[fa]=پسانه‌ی وی‌ال‌سی برای فنون (Phonon VLC backend)
 Comment[fi]=Phonon VLC -taustajärjestelmä
+Comment[fr]=Module VLC pour Phonon
 Comment[ga]=Inneall VLC Phonon
 Comment[gl]=Infraestrutura de VLC para Phonon
 Comment[hu]=Phonon VLC-backend


Minor

Minor

--- myCMakeFiles/FortranEnvironment.cmake
+++ myCMakeFiles/FortranEnvironment.cmake
@@ -68,12 +68,13 @@
 # Set the output directories for compiled libraries and module files.
 # Paths are relative to the build folder where you call cmake
 # ================================
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib) # Static library location
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib) # Shared library location
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/../lib) # Static library location
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/../lib) # Shared library location
 # Place module files in specific include folder
-set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../include)
+set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/../include)
 # Place executables in bin
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/../bin)
+INCLUDE_DIRECTORIES(${CMAKE_Fortran_MODULE_DIRECTORY})

 # ++++++++++++++++++++++++++++++++

@@ -98,3 +99,4 @@

 message(STATUS "make install will install to ${CMAKE_INSTALL_PREFIX}")
 message(STATUS "To change, use option -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install/to")
+


xc7: drop --allow-orphan-sinks option

xc7: drop --allow-orphan-sinks option

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- xc7/make/arch_define.cmake
+++ xc7/make/arch_define.cmake
@@ -83,7 +83,6 @@
         --pcf \${INPUT_IO_FILE} \
         --eblif \${OUT_EBLIF} \
         --top \${TOP} \
-        --allow_orphan_sinks \
         \${OUT_BIT_VERILOG} \${OUT_BIT_VERILOG}.tcl"
     NO_BIT_TIME
     USE_FASM


Add targets to generate YAML outputs for DeviceResource files.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- fpga_interchange/examples/chipdb.cmake
+++ fpga_interchange/examples/chipdb.cmake
@@ -50,6 +50,17 @@

     add_custom_target(rapidwright-${device}-device DEPENDS ${rapidwright_device_db})
     set_property(TARGET rapidwright-${device}-device PROPERTY LOCATION ${rapidwright_device_db})
+
+    add_custom_target(rapidwright-${device}-device-yaml
+        COMMAND
+            ${PYTHON_EXECUTABLE} -mfpga_interchange.convert
+                --schema_dir ${INTERCHANGE_SCHEMA_PATH}
+                --schema device
+                --input_format capnp
+                --output_format yaml
+                ${rapidwright_device_db}
+                ${rapidwright_device_db}.yaml
+        DEPENDS ${rapidwright_device_db})

     if (DEFINED output_target)
         set(${output_target} rapidwright-${device}-device PARENT_SCOPE)
@@ -128,6 +139,17 @@

     add_custom_target(${patch_name}-${device}-device DEPENDS ${output_device_file})
     set_property(TARGET ${patch_name}-${device}-device PROPERTY LOCATION ${output_device_file})
+
+    add_custom_target(${patch_name}-${device}-device-yaml
+        COMMAND
+            ${PYTHON_EXECUTABLE} -mfpga_interchange.convert
+                --schema_dir ${INTERCHANGE_SCHEMA_PATH}
+                --schema device
+                --input_format capnp
+                --output_format yaml
+                ${output_device_file}
+                ${output_device_file}.yaml
+        DEPENDS ${output_device_file})

     if (DEFINED output_target)
         set(${output_target} ${patch_name}-${device}-device PARENT_SCOPE)


upgrade to glfw 3.1.1

upgrade to glfw 3.1.1

--- cmake/EmbedGlfw.cmake
+++ cmake/EmbedGlfw.cmake
@@ -11,8 +11,8 @@

 ExternalProject_Add(
   project_glfw
-  URL https://github.com/glfw/glfw/archive/3.1.zip
-  URL_MD5 8493932ac9db71351e5f3753ce654f0c
+  URL https://github.com/glfw/glfw/archive/3.1.1.zip
+  URL_MD5 cce362cc9e46883d2d7b6669ca2e02c6
   PREFIX "${CMAKE_CURRENT_BINARY_DIR}/glfw"
   CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_DOCS=0 -DGLFW_BUILD_EXAMPLES=0 -DGLFW_BUILD_TESTS=0 -DGLFW_INSTALL=0 ${GLFW_ADDITIONAL_CMAKE_ARGS}
   INSTALL_COMMAND ""


Fix the FindIconv module so it uses the right _FOUND name and thus sets the lib and header vars right.

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -20,7 +20,7 @@
     if (NOT ICONV_LIB_GLIBC)
         find_package_handle_standard_args(Iconv DEFAULT_MSG ICONV_LIB ICONV_H_PATH)
     else()
-        set(Iconv TRUE)
+        set(Iconv_FOUND TRUE)
         unset(ICONV_LIB)
     endif()

@@ -29,7 +29,7 @@
 mark_as_advanced(ICONV_H_PATH ICONV_LIB ICONV_LIB_GLIBC)

 # set up output vars
-if (ICONV_FOUND)
+if (Iconv_FOUND)
     set (ICONV_INCLUDE_DIR ${ICONV_H_PATH})
     set (ICONV_LIBRARIES ${ICONV_LIB})
 else()


Add a validation check of the value printed from running python

--- cmake/FindNumPy.cmake
+++ cmake/FindNumPy.cmake
@@ -24,10 +24,10 @@
 # distribute, sublicense, and/or sell copies of the Software, and to permit
 # persons to whom the Software is furnished to do so, subject to
 # the following conditions:
-#
+#
 # The above copyright notice and this permission notice shall be included
 # in all copies or substantial portions of the Software.
-#
+#
 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -35,7 +35,7 @@
 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 # OTHER DEALINGS IN THE SOFTWARE.
-#
+#
 #============================================================================

 # Finding NumPy involves calling the Python interpreter
@@ -53,7 +53,7 @@
 execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
     "import numpy as n; print(n.__version__); print(n.get_include());"
     RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS
-    OUTPUT_VARIABLE _NUMPY_VALUES
+    OUTPUT_VARIABLE _NUMPY_VALUES_OUTPUT
     ERROR_VARIABLE _NUMPY_ERROR_VALUE
     OUTPUT_STRIP_TRAILING_WHITESPACE)

@@ -67,10 +67,19 @@
 endif()

 # Convert the process output into a list
-string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES})
+string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES_OUTPUT})
 string(REGEX REPLACE "\n" ";" _NUMPY_VALUES ${_NUMPY_VALUES})
 list(GET _NUMPY_VALUES 0 NUMPY_VERSION)
 list(GET _NUMPY_VALUES 1 NUMPY_INCLUDE_DIRS)
+
+string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" _VER_CHECK "${NUMPY_VERSION}")
+if("${_VER_CHECK}" STREQUAL "")
+    # The output from Python was unexpected. Raise an error always
+    # here, because we found NumPy, but it appears to be corrupted somehow.
+    message(FATAL_ERROR
+        "Requested version and include path from NumPy, got instead:\n${_NUMPY_VALUES_OUTPUT}\n")
+    return()
+endif()

 # Make sure all directory separators are '/'
 string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS})


[CMake] Effectively revert r230683.

[CMake] Effectively revert r230683.

Clang in 32-bit mode may choose to target different architecture
than host compiler.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -161,10 +161,11 @@
   if("${LLVM_NATIVE_ARCH}" STREQUAL "X86")
     if(NOT MSVC)
       test_target_arch(x86_64 "" "-m64")
+      # FIXME: We build runtimes for both i686 and i386, as "clang -m32" may
+      # target different variant than "$CMAKE_C_COMPILER -m32". This part should
+      # be gone after we resolve PR14109.
       test_target_arch(i686 __i686__ "-m32")
-      if(NOT CAN_TARGET_i686)
-        test_target_arch(i386 __i386__ "-m32")
-      endif()
+      test_target_arch(i386 __i386__ "-m32")
     else()
       test_target_arch(i386 "" "")
     endif()


mute 'runtime library file does not exist' cmake warning, when using express editions of MSVC

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

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -58,6 +58,10 @@
   endif(EXISTS ${PACKAGE_MAKER_PROGRAM})
 endif()

+# By default, do not warn when built on machines using only VS Express:
+if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+  set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+endif()
 include(InstallRequiredSystemLibraries)

 set(PCL_CPACK_CFG_FILE "${PCL_BINARY_DIR}/cpack_options.cmake")


cmake development

cmake development

--- lib/gd/sources.cmake
+++ lib/gd/sources.cmake
@@ -1,9 +1,6 @@
 # $Id$ $Revision$

-SET(gd_SRCDIR ${CMAKE_SOURCE_DIR}/lib/gd)
-
 INCLUDE( UsePkgConfig )
-
 INCLUDE( FindJPEG )
 INCLUDE( FindPNG )
 INCLUDE( FindZLIB )
@@ -12,6 +9,7 @@
 PKGCONFIG( fontconfig FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIB_DIR FONTCONFIG_LINK_FLAGS FONTCONFIG_CFLAGS )

 INCLUDE_DIRECTORIES(
+	${top_SRCDIR}
 	${gd_SRCDIR}
 	${FREETYPE_INCLUDE_DIR}
 	${FONTCONFIG_INCLUDE_DIR}


mingw build

mingw build

--- Build.cmake
+++ Build.cmake
@@ -63,6 +63,7 @@
    set(CMAKE_CXX_FLAGS_RELEASE "/MT")
    set(CMAKE_CXX_FLAGS_DEBUG "/MTd")

+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") # source code already in utf-8, force it for compilers in non-utf8_windows_locale
    # ERROR level conflicts with windows.h
    ADD_DEFINITIONS (-DNOGDI)
    # support AMD proc on vc2015
@@ -72,7 +73,6 @@
 endif()

 IF (MSVC OR MINGW)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") # source code already in utf-8, force it for compilers in non-utf8_windows_locale
   set(PLATFORM_LINK_LIBRIES dbghelp)
       # VC11 bug: http://code.google.com/p/googletest/issues/detail?id=408
       #          add_definition(-D_VARIADIC_MAX=10)