TensileCreateLibrary can be used without pre-installing Tensile

--- Source/TensileConfig.cmake
+++ Source/TensileConfig.cmake
@@ -19,7 +19,7 @@
 # CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 ################################################################################

-include(FindPythonInterp)
+include(CMakeParseArguments)

 ################################################################################
 # Create A Tensile Library from LibraryLogic.yaml files
@@ -30,11 +30,23 @@
     Tensile_MERGE_FILES
     Tensile_SHORT_FILE_NAMES
     Tensile_LIBRARY_PRINT_DEBUG )
+
+  set(oneValueArgs Tensile_ROOT)
+  cmake_parse_arguments(PARSE "${oneValueArgs}" ${ARGN})
+
+  if(PARSE_Tensile_ROOT)
+    # python not pre-installed, use scripts downloaded to extern/Tensile
+    include(FindPythonInterp)
+    set(Tensile_CREATE_COMMAND ${PYTHON_EXECUTABLE} "${Tensile_ROOT}/Tensile/TensileCreateLibrary.py")
+  else()
+    set(Tensile_CREATE_COMMAND TensileCreateLibrary)
+  endif()
+
+
   set(Tensile_SOURCE_PATH "${PROJECT_BINARY_DIR}/Tensile")
   message(STATUS "Tensile_SOURCE_PATH=${Tensile_SOURCE_PATH}")

   # TensileLibraryWriter optional arguments
-  set(Tensile_CREATE_COMMAND TensileCreateLibrary)
   if(${Tensile_MERGE_FILES})
     set(Tensile_CREATE_COMMAND ${Tensile_CREATE_COMMAND} "--merge-files")
   else()


Suppress warnings related to https://github.com/robotology/idyntree/issues/613

--- cmake/InstallBasicPackageFiles.cmake
+++ cmake/InstallBasicPackageFiles.cmake
@@ -321,7 +321,8 @@
     set(_export_cmd TARGETS ${_IBPF_TARGETS})

   elseif(DEFINED _IBPF_TARGETS_PROPERTY)
-    message(DEPRECATION "TARGETS_PROPERTY is deprecated. Use EXPORT instead")
+    # Warning suppressed for https://github.com/robotology/idyntree/issues/613
+    # message(DEPRECATION "TARGETS_PROPERTY is deprecated. Use EXPORT instead")

     if(DEFINED _IBPF_TARGETS_PROPERTIES)
       message(FATAL_ERROR "TARGETS_PROPERTIES cannot be used with TARGETS_PROPERTIES")
@@ -374,7 +375,8 @@
   endif()
   # ENABLE_COMPATIBILITY_VARS is deprecated
   if(_IBPF_ENABLE_COMPATIBILITY_VARS)
-    message(DEPRECATION "ENABLE_COMPATIBILITY_VARS is deprecated.")
+    # Warning for https://github.com/robotology/idyntree/issues/613 suppressed
+    # message(DEPRECATION "ENABLE_COMPATIBILITY_VARS is deprecated.")
   endif()
   # ENABLE_COMPATIBILITY_VARS does not work with EXPORT
   if(NOT DEFINED _targets AND _IBPF_ENABLE_COMPATIBILITY_VARS)


[Exp PyROOT] Switch to default

[Exp PyROOT] Switch to default

Except for Windows.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -142,7 +142,11 @@
 ROOT_BUILD_OPTION(oracle ON "Enable support for Oracle databases (requires Oracle Instant Client)")
 ROOT_BUILD_OPTION(pgsql ON "Enable support for PostgreSQL")
 ROOT_BUILD_OPTION(pyroot ON "Enable support for automatic Python bindings (PyROOT)")
-ROOT_BUILD_OPTION(pyroot_experimental OFF "Use experimental Python bindings for ROOT")
+if(WIN32)
+  ROOT_BUILD_OPTION(pyroot_experimental OFF "Use experimental Python bindings for ROOT")
+else()
+  ROOT_BUILD_OPTION(pyroot_experimental ON "Use experimental Python bindings for ROOT")
+endif()
 ROOT_BUILD_OPTION(pythia6_nolink OFF "Delayed linking of Pythia6 library")
 ROOT_BUILD_OPTION(pythia6 ON "Enable support for Pythia 6.x")
 ROOT_BUILD_OPTION(pythia8 ON "Enable support for Pythia 8.x")


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

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

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

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


Enable newly created mlp option with -Dall=ON

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -220,6 +220,7 @@
  set(mathmore_defvalue ON)
  set(memstat_defvalue ON)
  set(minuit2_defvalue ON)
+ set(mlp_defvalue ON)
  set(monalisa_defvalue ON)
  set(mysql_defvalue ON)
  set(odbc_defvalue ON)


OpenBLAS: Don't use CMake on 0.3.0

OpenBLAS: Don't use CMake on 0.3.0

The CMake build seems to provide an inferior build that causes an infinite loop, so fallback to normal build on 0.3.0.

--- cmake/projects/OpenBLAS/hunter.cmake
+++ cmake/projects/OpenBLAS/hunter.cmake
@@ -55,7 +55,7 @@
 )

 hunter_configuration_types(OpenBLAS CONFIGURATION_TYPES Release)
-if(HUNTER_OpenBLAS_VERSION VERSION_LESS 0.3.0)
+if(HUNTER_OpenBLAS_VERSION VERSION_LESS 0.3.1)
   hunter_pick_scheme(DEFAULT OpenBLAS)
   set(
       _openblas_unrelocatable_text_files


add generated constant definitions to library

Summary: when trying to build openr with `getDeps.py` constant definitions where not available since they were not part of the generated thrift lib. this fixes it.

Reviewed By: chadaustin

Differential Revision: D16064417

fbshipit-source-id: ee2b3e061caf67235f4a873405cf6cd6fb663ef4

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -59,12 +59,12 @@
   # Compute the list of generated files
   list(APPEND generated_headers
     "${output_dir}/gen-cpp2/${base}_constants.h"
-    "${output_dir}/gen-cpp2/${base}_constants.cpp"
     "${output_dir}/gen-cpp2/${base}_types.h"
     "${output_dir}/gen-cpp2/${base}_types.tcc"
     "${output_dir}/gen-cpp2/${base}_types_custom_protocol.h"
   )
   list(APPEND generated_sources
+    "${output_dir}/gen-cpp2/${base}_constants.cpp"
     "${output_dir}/gen-cpp2/${base}_data.h"
     "${output_dir}/gen-cpp2/${base}_data.cpp"
     "${output_dir}/gen-cpp2/${base}_types.cpp"


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Changed cc/ld flag handling (4).

Changed cc/ld flag handling (4).

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -180,7 +180,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=\"${CC_COVERAGE_FLAGS}\" -DCI_LD_FLAGS=\"${CC_COVERAGE_FLAGS}\"")
+    ctest_configure(OPTIONS "-DCI_FLAGS=${CC_COVERAGE_FLAGS}")
     ctest_build()
     ctest_test()
     if(CC_NAME STREQUAL "msvc")
@@ -215,9 +215,9 @@
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
     if(CC_NAME STREQUAL "msvc")
-        ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_CC_FLAGS=/analyze")
+        ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_FLAGS=/analyze")
     elseif(CC_NAME STREQUAL "clang")
-        ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_CC_FLAGS=--analyze")
+        ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_FLAGS=--analyze")
     endif()
     ctest_build()
     ctest_submit(PARTS Start Update Configure Build Upload Submit)
@@ -233,7 +233,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=-fno-omit-frame-pointer")
+    ctest_configure(OPTIONS "-DCI_FLAGS=-fno-omit-frame-pointer")
     ctest_build()
     ctest_test()
     ctest_memcheck()
@@ -244,7 +244,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=-fno-omit-frame-pointer")
+    ctest_configure(OPTIONS "-DCI_FLAGS=-fno-omit-frame-pointer")
     ctest_build()
     ctest_test()
     ctest_memcheck()
@@ -271,7 +271,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=-fsanitize=address -fno-omit-frame-pointer")
+    ctest_configure(OPTIONS "-DCI_FLAGS=-fsanitize=address -fno-omit-frame-pointer")
     ctest_build()
     ctest_test()
     ctest_memcheck()
@@ -292,7 +292,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer")
+    ctest_configure(OPTIONS "-DCI_FLAGS=-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer")
     ctest_build()
     ctest_test()
     ctest_memcheck()
@@ -319,7 +319,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=${CC_TSAN_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")
+    ctest_configure(OPTIONS "-DCI_FLAGS=${CC_TSAN_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")
     ctest_build()
     ctest_test()
     ctest_memcheck()
@@ -347,7 +347,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=${CC_UBSAN_FLAGS} -fno-omit-frame-pointer")
+    ctest_configure(OPTIONS "-DCI_FLAGS=${CC_UBSAN_FLAGS} -fno-omit-frame-pointer")
     ctest_build()
     ctest_test()
     ctest_memcheck()


Update ITK superbuild version along ITKv5.1rc01 development

This patch include fixes to GDCM enabling it's hiding of it's symbols.
Reducing the size of the SimpleITK distributions. And removing
conflict from using in an environment which already has GDCM or ITK
symbols.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -53,7 +53,7 @@
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

 # post v5.1rc01
-set(_DEFAULT_ITK_GIT_TAG "bcd762e7bd743341c2dce84852ced49d8292f293")
+set(_DEFAULT_ITK_GIT_TAG "ad99ff401d058a624866820180c904e57342ab16")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Update the ITK_DIR path version number

Update the ITK_DIR path version number

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -91,4 +91,4 @@

 ExternalProject_Get_Property(ITK install_dir)
-set(ITK_DIR "${install_dir}/lib/cmake/ITK-4.11" )
+set(ITK_DIR "${install_dir}/lib/cmake/ITK-4.12" )


BUG: Add search paths for GoogleTest as source code on system

The Debian 9 installation follows Google Tests recommendation by
including the GTest source code and not a compiled library. Search
paths have been added to locate the google test source code
installation on systems.

Change-Id: I5c8146d522a08abc389b3ad62b8fe09a17557ff4

--- Modules/ThirdParty/GoogleTest/itk-module-init.cmake
+++ Modules/ThirdParty/GoogleTest/itk-module-init.cmake
@@ -5,6 +5,21 @@
   # The recommendation from google test is NOT to compile google tests
   # for system installs, but allow users of the library to include the
   # source in their project.
+
+  set( GTEST_SRC_SEARCH_PATHS
+    "/usr/src/googletest"
+    "/usr/src/gtest"
+    )
+
+  if (NOT DEFINED GTEST_ROOT)
+    foreach( search_path ${GTEST_SRC_SEARCH_PATHS})
+      if(EXISTS "${search_path}/CMakeLists.txt")
+        set( GTEST_ROOT "${search_path}")
+        break()
+      endif()
+    endforeach()
+  endif()
+
   if( DEFINED GTEST_ROOT AND EXISTS "${GTEST_ROOT}/CMakeLists.txt")

     find_path(GTEST_INCLUDE_DIRS gtest/gtest.h


Enhanced target copy

Enhanced target copy

- Target is created if it does not exist
- Makes sure that input filenames are absolute

--- scripts/TargetCopyFiles.cmake
+++ scripts/TargetCopyFiles.cmake
@@ -3,50 +3,55 @@
 include(CMakeParseArguments)

 function(add_copy_files FILECOPIER_TARGET)
-  set(oneValueArgs DESTINATION GLOB)
-  set(multiValueArgs REPLACE FILES)
-  cmake_parse_arguments(FILECOPIER "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
-
-  if(NOT FILECOPIER_DESTINATION)
-    set(FILECOPIER_DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-  endif()
-  if(NOT FILECOPIER_GLOB AND NOT FILECOPIER_FILES)
-    set(input_sources ${FILECOPIER_UNPARSED_ARGUMENTS})
-  elseif(FILECOPIER_GLOB AND FILECOPIER_FILES)
-    message(FATAL_ERROR "copy_files takes one of GLOB or FILES, not both")
-  elseif(FILECOPIER_FILES)
-    set(input_sources ${FILECOPIER_FILES})
-  else()
-    file(GLOB input_sources ${FILECOPIER_GLOB})
-  endif()
-  if(NOT FILECOPIER_TARGET)
-    set(copy_target copy)
-  else()
-    set(copy_target ${FILECOPIER_TARGET})
-  endif()
-
-  if(FILECOPIER_REPLACE)
-    list(LENGTH FILECOPIER_REPLACE replace_length)
-    if(NOT ${replace_length} EQUAL 2)
-      message(FATAL_ERROR "copy_files argument REPLACE takes two inputs")
+    cmake_parse_arguments(
+        FILECOPIER
+        ""
+        "DESTINATION;GLOB"
+        "REPLACE;FILES"
+        ${ARGN}
+    )
+
+    if(NOT TARGET ${FILECOPIER_TARGET})
+        add_custom_target(${FILECOPIER_TARGET})
     endif()
-    list(GET FILECOPIER_REPLACE 0 PATTERN)
-    list(GET FILECOPIER_REPLACE 1 REPLACEMENT)
-  endif()
-
-  foreach(input ${input_sources})
-    get_filename_component(output ${input} NAME)
-    if(NOT "${FILECOPIER_REPLACE}" STREQUAL "")
-      string(REGEX REPLACE "${PATTERN}" "${REPLACEMENT}" output ${output})
+    if(NOT FILECOPIER_DESTINATION)
+        set(destination ${CMAKE_CURRENT_BINARY_DIR})
+    else()
+        get_filename_component(destination "${FILECOPIER_DESTINATION}" ABSOLUTE)
     endif()
-    set(output ${FILECOPIER_DESTINATION}/${output})
-
-    add_custom_command(
-      TARGET ${copy_target}
-      PRE_BUILD
-      COMMAND ${CMAKE_COMMAND} -E copy ${input} ${output}
-      DEPENDS ${input}
-    )
-  endforeach()
+    if(NOT FILECOPIER_GLOB AND NOT FILECOPIER_FILES)
+        set(input_sources ${FILECOPIER_UNPARSED_ARGUMENTS})
+    elseif(FILECOPIER_GLOB AND FILECOPIER_FILES)
+        message(FATAL_ERROR "copy_files takes one of GLOB or FILES, not both")
+    elseif(FILECOPIER_FILES)
+        set(input_sources ${FILECOPIER_FILES})
+    else()
+        file(GLOB input_sources ${FILECOPIER_GLOB})
+    endif()
+
+    if(FILECOPIER_REPLACE)
+        list(LENGTH FILECOPIER_REPLACE replace_length)
+        if(NOT ${replace_length} EQUAL 2)
+            message(FATAL_ERROR "copy_files argument REPLACE takes two inputs")
+        endif()
+        list(GET FILECOPIER_REPLACE 0 PATTERN)
+        list(GET FILECOPIER_REPLACE 1 REPLACEMENT)
+    endif()
+
+    foreach(input ${input_sources})
+        get_filename_component(output ${input} NAME)
+        if(NOT "${FILECOPIER_REPLACE}" STREQUAL "")
+            string(REGEX REPLACE "${PATTERN}" "${REPLACEMENT}" output ${output})
+        endif()
+        set(output ${destination}/${output})
+        get_filename_component(input "${input}" ABSOLUTE)
+
+        add_custom_command(
+            TARGET ${FILECOPIER_TARGET}
+            PRE_BUILD
+            COMMAND ${CMAKE_COMMAND} -E copy ${input} ${output}
+            DEPENDS ${input}
+        )
+    endforeach()
 endfunction()


misspelling

misspelling

--- FindICU.cmake
+++ FindICU.cmake
@@ -79,7 +79,7 @@
     list(REMOVE_DUPLICATES ICU_FIND_COMPONENTS)
     foreach(_icu_component ${ICU_FIND_COMPONENTS})
         if(NOT DEFINED "IcuComponents_${_icu_component}")
-            message(FATAL_ERROR "Unknwon ICU component: ${_icu_component}")
+            message(FATAL_ERROR "Unknown ICU component: ${_icu_component}")
         endif()
     endforeach(_icu_component)
 endif()


Hide default printouts under a debug flag

--- standard/CombinedInstaller.cmake
+++ standard/CombinedInstaller.cmake
@@ -1,4 +1,4 @@
-# Utility for creating a combined installer for Windows
+## Utility for creating a combined installer for Windows
 #
 # This utility allows a WIX installer to be created with a single PACKAGE command,
 # and allows both 32 and 64 variants of the installer to be installed on a system
@@ -34,7 +34,9 @@
 include(ParseVersion)

 function(combined_installer)
-  message("Project name is ${CMAKE_PROJECT_NAME}")
+  if(COMBINED_INSTALLER_DEBUG)
+    message("Project name is ${CMAKE_PROJECT_NAME}")
+  endif()

   set(options )
   set(oneValueArgs NAME VENDOR CONTACT VERSION GUID LICENSE README WIXFILE)
@@ -97,7 +99,9 @@
   #
   # For more information on the rationale for this process, see the discussion on semantic versioning
   # found at http://semver.org/
-  message("Upgrade GUID is ${ARG_GUID}")
+  if(COMBINED_INSTALLER_DEBUG)
+    message("Upgrade GUID is ${ARG_GUID}")
+  endif()
   set(CPACK_WIX_UPGRADE_GUID "{${ARG_GUID}}")

   # Need a custom wix installation template so that we update the CMake package registry correctly


[Numerics] Implementation and test of ConvexQP_ADMM

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -945,6 +945,7 @@
  NEW_TEST(ConvexQP_test0 ConvexQP_test.c)
  NEW_TEST(ConvexQP_test1 ConvexQP_test1.c)
  NEW_TEST(ConvexQP_test2 ConvexQP_test2.c)
+ NEW_TEST(ConvexQP_test3 ConvexQP_test3.c)
  END_TEST()
   BEGIN_TEST(src/AVI/test)


A fix for CI Ubuntu version -lrt issue?

A fix for CI Ubuntu version -lrt issue?

--- basholeveldb.cmake
+++ basholeveldb.cmake
@@ -28,7 +28,7 @@
             # Ubuntu
             if (LINUX_ISSUE MATCHES "Ubuntu")
                 message ("Detected Ubuntu system.  Using -lrt linker flag.")
-	            set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS};-lrt")
+	            set (CMAKE_SHARED_LINKER_FLAGS "--no-as-needed;-lrt")
             endif ()
         endif ()
     endif ()


fixed: auto add --keep when selecting emu mode

git-svn-id: 9c86407f91444b2cc93bb44d37d96a685973386f@2271 4683daeb-ad0f-0410-a623-93161e962ae5

--- Source/Contrib/ComputeBase/CMake/cuda/FindCUDA.cmake
+++ Source/Contrib/ComputeBase/CMake/cuda/FindCUDA.cmake
@@ -788,7 +788,7 @@
   # Emulation if the card isn't present.
   if (CUDA_BUILD_EMULATION)
     # Emulation.
-    set(nvcc_flags ${nvcc_flags} --device-emulation -D_DEVICEEMU -g)
+    set(nvcc_flags ${nvcc_flags} --device-emulation --keep -D_DEVICEEMU -g)
   else(CUDA_BUILD_EMULATION)
     # Device mode.  No flags necessary.
   endif(CUDA_BUILD_EMULATION)


FIX: Want ITK, not VTK

FIX: Want ITK, not VTK

--- UseITK.cmake
+++ UseITK.cmake
@@ -24,7 +24,7 @@
     INCLUDE_DIRECTORIES(${ITK_SOURCE_DIR}/Code/BasicFilters)
     INCLUDE_DIRECTORIES(${ITK_SOURCE_DIR}/Code/Algorithms)
     LINK_DIRECTORIES(${ITK_LIBRARY_PATH})
-ENDIF (VTK_BINARY_PATH)
+ENDIF (ITK_BINARY_PATH)

 IF (UNIX)
   LINK_LIBRARIES(${THREAD_LIBS} ${DL_LIBS} -lm)


build

build

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -1,15 +1,18 @@
-if(NOT TARGET zlib)
+if(NOT TARGET zlibstatic)

   # Temporary disable some warnings
   # C4127: conditional expression is constant
   # C4131: 'function' : uses old-style declarator
   # C4210: nonstandard extension used : function given file scope
   # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
+  set(CMAKE_OLD_C_FLAGS ${CMAKE_C_FLAGS})
+  set(CMAKE_OLD_CXX_FLAGS ${CMAKE_CXX_FLAGS})
   if(CMAKE_MAKE_PROGRAM MATCHES "(MSBuild|devenv|msdev|nmake)")
-    set(CMAKE_OLD_C_FLAGS ${CMAKE_C_FLAGS})
-    set(CMAKE_OLD_CXX_FLAGS ${CMAKE_CXX_FLAGS})
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4131 /wd4210 /wd4244")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4127 /wd4131 /wd4210 /wd4244")
+  elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
   endif()

   # Set module options
@@ -28,15 +31,13 @@
   endif()

   # Set module folder
-  set_target_properties(zlib zlibstatic example minigzip PROPERTIES FOLDER modules/zlib)
+  set_target_properties(zlibstatic zlib example minigzip PROPERTIES FOLDER modules/zlib)

   # Exclude some modules from the build
-  set_target_properties(example minigzip PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
+  set_target_properties(zlib example minigzip PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)

   # Restore default warnings
-  if(CMAKE_MAKE_PROGRAM MATCHES "(MSBuild|devenv|msdev|nmake)")
-    set(CMAKE_C_FLAGS ${CMAKE_OLD_C_FLAGS})
-    set(CMAKE_CXX_FLAGS ${CMAKE_OLD_CXX_FLAGS})
-  endif()
+  set(CMAKE_C_FLAGS ${CMAKE_OLD_C_FLAGS})
+  set(CMAKE_CXX_FLAGS ${CMAKE_OLD_CXX_FLAGS})

 endif()


Fix misleading comment (#361)

Fix misleading comment (#361)

Signed-off-by: Tim Clephas <d4556e704d106e059718e78eaf3f2807d66b731f@nobleo.nl>

--- ament_cmake_pytest/cmake/ament_add_pytest_test.cmake
+++ ament_cmake_pytest/cmake/ament_add_pytest_test.cmake
@@ -101,7 +101,7 @@
     list(APPEND cmd "-We")
   endif()

-  # enable pytest coverage by default if the package test_depends on pytest_cov
+  # enable pytest coverage by default if the package test_depends on python3-pytest-cov
   if("python3-pytest-cov" IN_LIST ${PROJECT_NAME}_TEST_DEPENDS)
     set(coverage_default ON)
   else()


Bumping version to 1.3 for development

Bumping version to 1.3 for development

--- Version.cmake
+++ Version.cmake
@@ -9,7 +9,7 @@
 # Version info

 set(SimpleITK_VERSION_MAJOR 1)
-set(SimpleITK_VERSION_MINOR 2)
+set(SimpleITK_VERSION_MINOR 3)
 set(SimpleITK_VERSION_PATCH 0)
 #set(SimpleITK_VERSION_TWEAK "")


[benchmark] We need the module_name in swift_benchmark_compile_archopts to look up sources.

This solves problems relating to the SOURCES variable not finding anything
files. module_name expanded to nothing so:

  ${${module_name}_sources} -> ${_sources} -> ''

Now we handle this properly.

rdar://34556274

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -327,9 +327,11 @@
   endforeach()

   foreach(module_name_path ${SWIFT_MULTISOURCE_SWIFT3_BENCHES})
-    set(objfile_out)
+    get_filename_component(module_name "${module_name_path}" NAME)
+
     if ("${bench_flags}" MATCHES "-whole-module.*" AND
         NOT "${bench_flags}" MATCHES "-num-threads.*")
+      set(objfile_out)
       add_swift_multisource_wmo_benchmark_library(objfile_out
         MODULE_PATH "${module_name_path}"
         SOURCE_DIR "${srcdir}"
@@ -338,8 +340,9 @@
         LIBRARY_FLAGS ${common_swift3_options} ${bench_flags}
         DEPENDS ${bench_library_objects} ${stdlib_dependencies})
       precondition(objfile_out)
-      list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
+      list(APPEND SWIFT_BENCH_OBJFILES "${objfile_out}")
     else()
+      set(objfiles_out)
       add_swift_multisource_nonwmo_benchmark_library(objfiles_out
         MODULE_PATH "${module_name_path}"
         SOURCE_DIR "${srcdir}"
@@ -353,9 +356,11 @@
   endforeach()

   foreach(module_name_path ${SWIFT_MULTISOURCE_SWIFT4_BENCHES})
-    set(objfile_out)
+    get_filename_component(module_name "${module_name_path}" NAME)
+
     if ("${bench_flags}" MATCHES "-whole-module.*" AND
         NOT "${bench_flags}" MATCHES "-num-threads.*")
+      set(objfile_out)
       add_swift_multisource_wmo_benchmark_library(objfile_out
         MODULE_PATH "${module_name_path}"
         SOURCE_DIR "${srcdir}"
@@ -364,8 +369,9 @@
         LIBRARY_FLAGS ${common_swift4_options} ${bench_flags}
         DEPENDS ${bench_library_objects} ${stdlib_dependencies})
       precondition(objfile_out)
-      list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
+      list(APPEND SWIFT_BENCH_OBJFILES "${objfile_out}")
     else()
+      set(objfiles_out)
       add_swift_multisource_nonwmo_benchmark_library(objfiles_out
         MODULE_PATH "${module_name_path}"
         SOURCE_DIR "${srcdir}"


IncludeWhatYouUse: Set CMAKE_MODULE_PATH before calling find_package

--- IncludeWhatYouUse.cmake
+++ IncludeWhatYouUse.cmake
@@ -9,11 +9,15 @@

 set (IWYU_EXIT_STATUS_WRAPPER
      "${CMAKE_CURRENT_LIST_DIR}/util/IWYUExitStatusWrapper.cmake")
+set (_IWYU_LIST_DIR "${CMAKE_CURRENT_LIST_DIR}")

 macro (iwyu_validate CONTINUE)

     if (NOT DEFINED IWYU_FOUND)

+        set (CMAKE_MODULE_PATH
+             ${CMAKE_MODULE_PATH} # NOLINT:correctness/quotes
+             "${_IWYU_LIST_DIR}")
         find_package (IWYU ${ARGN})

     endif ()


fix Connext_LIBRARY_DIRS and set Connext_DDSGEN2 to an existing (yet not working) executable

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -63,7 +63,6 @@
   endforeach()

   # find library nddscpp
-  set(Connext_LIBRARIES "")
   file(GLOB_RECURSE _libs
     RELATIVE "${_lib_path}"
     ${_search_library_paths}
@@ -120,14 +119,13 @@

   list(GET _libs 0 _libndds)
   list(GET _libs 1 _libmessaging)
+  set(Connext_LIBRARIES "")
   list(APPEND Connext_LIBRARIES "${_lib_path}/${_libndds}")
+  get_filename_component(Connext_LIBRARY_DIRS "${Connext_LIBRARIES}" DIRECTORY)
   list(APPEND Connext_LIBRARIES "${_lib_path}/${_libmessaging}")

-  get_filename_component(_lib_path "${Connext_LIBRARIES}" DIRECTORY)
-  set(Connext_LIBRARY_DIRS "${_lib_path}")
-
   set(Connext_DEFINITIONS "-DRTI_LINUX" "-DRTI_UNIX")
-  set(Connext_DDSGEN2 "$ENV{NDDSHOME}/bin/rtiddsgen2")
+  set(Connext_DDSGEN2 "${Connext_LIBRARY_DIRS}/rtiddsgen2")
   set(Connext_FOUND TRUE)
 else()
   # try to find_package() it


Require HEXAGON_ARM_SYSROOT for arm-linux-gnueabihf

The Toolchain-arm-linux-gnueabihf.cmake is currently used for
the SnapdragonFlight Apps processor.

The sysroot is required for cross building for Ubuntu 14.04 armhf.

Signed-off-by: Mark Charlebois <f1891e7fc976ae1bd489627e2954fb730751d728@gmail.com>

--- cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake
+++ cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake
@@ -21,6 +21,12 @@
         message(FATAL_ERROR "HEXAGON_SDK_ROOT not set")
 else()
         set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_SDK_ROOT})
+endif()
+
+if ("$ENV{HEXAGON_ARM_SYSROOT}" STREQUAL "")
+        message(FATAL_ERROR "HEXAGON_ARM_SYSROOT not set")
+else()
+        set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_ARM_SYSROOT})
 endif()

 # this one is important
@@ -69,7 +75,7 @@
 	endif()
 endforeach()

-set(C_FLAGS "--sysroot=${HEXAGON_SDK_ROOT}/sysroot")
+set(C_FLAGS "--sysroot=${HEXAGON_ARM_SYSROOT}")
 set(LINKER_FLAGS "-Wl,-gc-sections")
 set(CMAKE_EXE_LINKER_FLAGS ${LINKER_FLAGS})
 set(CMAKE_C_FLAGS ${C_FLAGS})


Support standard_args for YPSpur

Support standard_args for YPSpur

--- icart_mini_driver/cmake/Modules/FindYPSpur.cmake
+++ icart_mini_driver/cmake/Modules/FindYPSpur.cmake
@@ -7,3 +7,6 @@
 HINTS /usr/local/lib /usr/lib /opt/local/lib)
 find_library(YPSPUR_LIBRARY ypspur
 HINTS /usr/local/lib /usr/lib /opt/local/lib)
+
+find_package_handle_standard_args(YPSpur DEFAULT_MSG YPSPUR_LIBRARY YPSPUR_INCLUDE_DIR)
+


Suppression message de debug pour la cross-compilation RPI.

--- raspberry.cmake
+++ raspberry.cmake
@@ -2,9 +2,7 @@
 SET (CMAKE_SYSTEM_VERSION 1)

 # Check for Raspberry Pi Tools and bail out if they don't have it
-if(DEFINED ENV{PI_TOOLS_HOME})
-    message("Cross compillaion Raspberry PI with $ENV{PI_TOOLS_HOME}")
-else()
+if(NOT DEFINED ENV{PI_TOOLS_HOME})
     message(FATAL_ERROR "Raspberry PI build need 'export PI_TOOLS_HOME=<path>' environment variable")
     return()
 endif()


Revert change in flexisip.spec.cmake

Revert change in flexisip.spec.cmake

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -23,6 +23,9 @@
 %define     conference %{?_with_conference:1}%{!?_with_conference:0}
 %define     soci       %{?_without_soci:0}%{!?_without_soci:1}

+# This is for debian builds where debug_package has to be manually specified,
+# whereas in centos it does not
+%define     flex_debug      %{!?_enable_debug_packages:%debug_package}%{?_enable_debug_package:%{nil}}
 %define     pkg_prefix %{?_with_bc:bc-}%{!?_with_bc:}
 %{?_with_bc: %define    _prefix         /opt/belledonne-communications}

@@ -113,7 +116,7 @@
 %prep
 %setup -n %{name}-%{version}-%build_number

-%debug_package
+%flex_debug

 %build
 %{expand:%%%cmake_name} . -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} -DCMAKE_PREFIX_PATH:PATH=%{_prefix} \


PKG: run selftester.sh from extracted package dir

--- Packaging/testing.cmake
+++ Packaging/testing.cmake
@@ -24,8 +24,7 @@

 add_test(Tu_selftester
   COMMAND ${pkg_extracted_dir}/bin/selftester${my_ext}
-  ${pkg_extracted_dir}
-  WORKING_DIRECTORY ${testing_dir}
+  WORKING_DIRECTORY ${pkg_extracted_dir}
   )

 set_tests_properties ( Tu_selftester PROPERTIES DEPENDS Tu_install_package)


CMake: Make checked_find_package able to prefer configs (#2984)

Both global and per-package controls have been added to our
checked_find_package cmake function, to cause it to first check for
an exported config for the dependency, and only if not found, revert
to potentially using a FindPackage.cmake module.

This reflects our general leaning toward assuming that a package that
exports a cmake config probably does a better job of it than we would
do writing a Find module for it.

--- src/cmake/checked_find_package.cmake
+++ src/cmake/checked_find_package.cmake
@@ -7,7 +7,7 @@
      "Additional dependencies to consider required (semicolon-separated list, or ALL)")
 set (OPTIONAL_DEPS "" CACHE STRING
      "Additional dependencies to consider optional (semicolon-separated list, or ALL)")
-
+option (ALWAYS_PREFER_CONFIG "Prefer a dependency's exported config file if it's available" OFF)

 # checked_find_package(Pkgname ...) is a wrapper for find_package, with the
 # following extra features:
@@ -42,6 +42,8 @@
 #     version, accepting but warning if it is below this number (even
 #     if above the true minimum version accepted). The warning message
 #     can give an optional explanation, passed as RECOMMEND_MIN_REASON.
+#   * Optional PREFER_CONFIG, if supplied, tries to use an exported config
+#     file from the package before using a FindPackage.cmake module.
 #
 # N.B. This needs to be a macro, not a function, because the find modules
 # will set(blah val PARENT_SCOPE) and we need that to be the global scope,
@@ -49,7 +51,7 @@
 macro (checked_find_package pkgname)
     cmake_parse_arguments(_pkg   # prefix
         # noValueKeywords:
-        "REQUIRED"
+        "REQUIRED;PREFER_CONFIG"
         # singleValueKeywords:
         "ENABLE;ISDEPOF;VERSION_MIN;VERSION_MAX;RECOMMEND_MIN;RECOMMEND_MIN_REASON"
         # multiValueKeywords:
@@ -85,8 +87,19 @@
             set (_quietskip true)
         endif ()
     endif ()
+    set (_config_status "")
     if (_enable OR _pkg_REQUIRED)
-        find_package (${pkgname} ${_pkg_UNPARSED_ARGUMENTS})
+        if (${pkgname}_FOUND OR ${pkgname_upper}_FOUND)
+            # was already found
+        elseif (_pkg_PREFER_CONFIG OR ALWAYS_PREFER_CONFIG)
+            find_package (${pkgname} CONFIG ${_pkg_UNPARSED_ARGUMENTS})
+            if (${pkgname}_FOUND OR ${pkgname_upper}_FOUND)
+                set (_config_status "from CONFIG")
+            endif ()
+        endif ()
+        if (NOT (${pkgname}_FOUND OR ${pkgname_upper}_FOUND))
+            find_package (${pkgname} ${_pkg_UNPARSED_ARGUMENTS})
+        endif()
         if ((${pkgname}_FOUND OR ${pkgname_upper}_FOUND)
               AND ${pkgname}_VERSION
               AND (_pkg_VERSION_MIN OR _pkg_VERSION_MAX))
@@ -106,7 +119,7 @@
                     set (${pkgname}_VERSION ${${_vervar}})
                 endif ()
             endforeach ()
-            message (STATUS "${ColorGreen}Found ${pkgname} ${${pkgname}_VERSION} ${ColorReset}")
+            message (STATUS "${ColorGreen}Found ${pkgname} ${${pkgname}_VERSION} ${_config_status}${ColorReset}")
             if (VERBOSE)
                 set (_vars_to_print ${pkgname}_INCLUDES ${pkgname_upper}_INCLUDES
                                     ${pkgname}_INCLUDE_DIR ${pkgname_upper}_INCLUDE_DIR


correct location

correct location

--- cmake/ArangoDBMacros.cmake
+++ cmake/ArangoDBMacros.cmake
@@ -317,7 +317,7 @@
   install(
     FILES ${PROJECT_SOURCE_DIR}/Installation/debian/arangodb.init
     PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
-    DESTINATION etc/init.d
+    DESTINATION ${ETCDIR}/init.d
     RENAME arangodb3
     COMPONENT debian-extras
   )


Check for a valid compiler

Check for a valid compiler

--HG--
branch : fix_visibility

--- cmake/SearchForStuff.cmake
+++ cmake/SearchForStuff.cmake
@@ -3,6 +3,17 @@

 include (${project_cmake_dir}/FindOS.cmake)
 include (FindPkgConfig)
+
+# It is know that raring compiler 4.7.3 is not able to compile the software
+# Check for a fully valid c++11 compiler
+if (CMAKE_COMPILER_IS_GNUCC)
+  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
+                OUTPUT_VARIABLE GCC_VERSION)
+    if (GCC_VERSION LESS 4.8)
+      message(STATUS "Not found a compatible c++11 gcc compiler")
+      BUILD_ERROR("GCC version is lower than 4.8. Need a compatible c++11 compiler")
+  endif()
+endif()

 ########################################
 if (PROTOBUF_VERSION LESS 2.3.0)


Back out remains of previous attempt.

Back out remains of previous attempt.

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -183,11 +183,6 @@
   IF(NOT ARG_DESTINATION)
     MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET")
   ENDIF()
-  IF(target_type MATCHES "EXECUTABLE")
-    SET(INSTALL_TYPE TARGETS)
-  ELSE()
-    SET(INSTALL_TYPE FILES)
-  ENDIF()
   GET_TARGET_PROPERTY(target_location ${target} LOCATION)
   IF(CMAKE_GENERATOR MATCHES "Makefiles")
    STRING(REPLACE "${CMAKE_BINARY_DIR}" "${DEBUGBUILDDIR}"  debug_target_location "${target_location}")
@@ -225,7 +220,7 @@
       GROUP_READ
       WORLD_READ)

-  INSTALL(${INSTALL_TYPE} ${debug_target_location}
+  INSTALL(FILES ${debug_target_location}
     DESTINATION ${ARG_DESTINATION}
     ${RENAME_PARAM}
     ${PERMISSIONS_${target_type}}


ENABLE_octave defaults to ON because both build-tree and install-tree octave
examples now work fine (at least on Linux) for our CBS.

svn path=/trunk/; revision=7080

--- cmake/modules/octave.cmake
+++ cmake/modules/octave.cmake
@@ -20,7 +20,7 @@
 # Module for determining octave bindings configuration options

 # Options to enable Octave bindings
-option(ENABLE_octave "Enable Octave bindings" OFF)
+option(ENABLE_octave "Enable Octave bindings" ON)

 if(ENABLE_octave AND NOT BUILD_SHARED_LIBS)
   message(STATUS "WARNING: "


cmake: cache the whole dependencies for each project

--- cmake/qibuild/uselib.cmake
+++ cmake/qibuild/uselib.cmake
@@ -76,9 +76,11 @@
       list(FIND _result ${_sub_dep} _is_present)
       string(TOUPPER ${_sub_dep} _u_sub_dep)
       if (_is_present EQUAL -1)
-        #if (NOT ${_u_sub_dep}_SEARCHED AND NOT ${_u_sub_dep}_PACKAGE_FOUND)
+        if (NOT ${_u_sub_dep}_FAT_DEPENDS)
           _qi_use_lib_get_deps(_new_deps "${_sub_dep}")
-        #endif()
+        else()
+          set(_new_deps ${${_u_sub_dep}_FAT_DEPENDS})
+        endif()
         list(APPEND _result ${_new_deps})
       endif()
     endforeach()
@@ -94,6 +96,9 @@
   list(REMOVE_DUPLICATES _result)
   list(REVERSE _result)

+  #why? because it will avoid many recursion. we store the complete dependencies of a project
+  # in cache, and use that, instead of digging into deps by recursion.
+  qi_set_cache(${_U_PKG}_FAT_DEPENDS "${_result}")
   set(${_OUT_list} ${_result} PARENT_SCOPE)
 endfunction()


Fix FindPETSc.cmake

Fix FindPETSc.cmake

Handle trailing '\n' and empty variables on Linux

--- cmake_find/FindPETSc.cmake
+++ cmake_find/FindPETSc.cmake
@@ -158,8 +158,10 @@
       OUTPUT_VARIABLE ${var}
       RESULT_VARIABLE petsc_return)
 #	message(STATUS "returned")
+#	remove trailing '\n'
+	string(STRIP "${${var}}" ${var})
 # protect backslashed spaces from disappearing
-	string(REGEX REPLACE "\\\\ " "?space?" ${var} ${${var}})
+	string(REGEX REPLACE "\\\\ " "?space?" ${var} "${${var}}")
 #	foreach(D ${${var}})
 #	message("${D}")
 #	endforeach()


cmake/curl: remove leftovers

cmake/curl: remove leftovers

--- cmake/Modules/BuildCURL.cmake
+++ cmake/Modules/BuildCURL.cmake
@@ -79,13 +79,8 @@
 set(CURL_INCLUDE_DIRS ${CURL_INSTALL_DIR}/include)

 if(WIN32 AND NOT MINGW)
-  if(DEBUG)
-    list(APPEND CURL_LIBRARIES "${CURL_LIBRARY_DIR}/libcurl_debug.lib")
-    install_external_library(curl "${CURL_BIN_DIRS}/libcurl_debug.dll")
-  else()
-    list(APPEND CURL_LIBRARIES "${CURL_LIBRARY_DIR}/libcurl.lib")
-    install_external_library(curl "${CURL_BIN_DIRS}/libcurl.dll")
-  endif()
+  list(APPEND CURL_LIBRARIES "${CURL_LIBRARY_DIR}/libcurl.lib")
+  install_external_library(curl "${CURL_BIN_DIRS}/libcurl.dll")
 else()
   list(APPEND CURL_LIBRARIES "${CURL_LIBRARY_DIR}/libcurl.a")
   list(APPEND CURL_LIBRARIES "${OPENSSL_LIBRARIES}")


Allow overriding the location of C/C++ compilers in Android CMake build.

Patch by Greg Fitzgerald.

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

--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -11,8 +11,15 @@
 # make <target>

 SET(CMAKE_SYSTEM_NAME Linux)
-SET(CMAKE_C_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang)
-SET(CMAKE_CXX_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang++)
+
+IF(NOT CMAKE_C_COMPILER)
+ SET(CMAKE_C_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang)
+ENDIF()
+
+IF(NOT CMAKE_CXX_COMPILER)
+ SET(CMAKE_CXX_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang++)
+ENDIF()
+
 SET(ANDROID "1" CACHE STRING "ANDROID" FORCE)

 SET(ANDROID_COMMON_FLAGS "-target arm-linux-androideabi --sysroot=${LLVM_ANDROID_TOOLCHAIN_DIR}/sysroot -B${LLVM_ANDROID_TOOLCHAIN_DIR} -mllvm -arm-enable-ehabi")


check if BuildInfo.h is outdated

check if BuildInfo.h is outdated

--- cmake/scripts/buildinfo.cmake
+++ cmake/scripts/buildinfo.cmake
@@ -10,25 +10,25 @@
 # cmake -DETH_SOURCE_DIR=. -DETH_DST_DIR=build -DETH_BUILD_TYPE=Debug -DETH_BUILD_PLATFORM=mac -P scripts/buildinfo.cmake

 if (NOT ETH_BUILD_TYPE)
-    set(ETH_BUILD_TYPE "unknown")
+	set(ETH_BUILD_TYPE "unknown")
 endif()

 if (NOT ETH_BUILD_PLATFORM)
-    set(ETH_BUILD_PLATFORM "unknown")
+	set(ETH_BUILD_PLATFORM "unknown")
 endif()

 execute_process(
 	COMMAND git --git-dir=${ETH_SOURCE_DIR}/.git --work-tree=${ETH_SOURCE_DIR} rev-parse HEAD
-	OUTPUT_VARIABLE ETH_COMMIT_HASH
+	OUTPUT_VARIABLE ETH_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE
 )

 if (NOT ETH_COMMIT_HASH)
-    set(ETH_COMMIT_HASH 0)
+	set(ETH_COMMIT_HASH 0)
 endif()

 execute_process(
 	COMMAND git --git-dir=${ETH_SOURCE_DIR}/.git --work-tree=${ETH_SOURCE_DIR} diff --shortstat
-	OUTPUT_VARIABLE ETH_LOCAL_CHANGES
+	OUTPUT_VARIABLE ETH_LOCAL_CHANGES OUTPUT_STRIP_TRAILING_WHITESPACE
 )

 if (ETH_LOCAL_CHANGES)
@@ -37,5 +37,25 @@
 	set(ETH_CLEAN_REPO 1)
 endif()

-configure_file("${ETH_SOURCE_DIR}/BuildInfo.h.in" "${ETH_DST_DIR}/BuildInfo.h")
+set(INFILE "${ETH_SOURCE_DIR}/BuildInfo.h.in")
+set(TMPFILE "${ETH_DST_DIR}/BuildInfo.h.tmp")
+set(OUTFILE "${ETH_DST_DIR}/BuildInfo.h")

+# create outfile if it doesn't exist
+if (NOT (EXISTS ${OUTFILE}))
+	execute_process(COMMAND touch ${OUTFILE})
+endif()
+
+configure_file("${INFILE}" "${TMPFILE}")
+
+execute_process(
+	COMMAND diff "${OUTFILE}" "${TMPFILE}"
+	OUTPUT_VARIABLE ETH_FILE_OUTDATED
+)
+
+if (ETH_FILE_OUTDATED)
+	execute_process(COMMAND mv "${TMPFILE}" "${OUTFILE}")
+else()
+	execute_process(COMMAND rm "${TMPFILE}")
+endif()
+


Revert "Box2D find blubb"

Revert "Box2D find blubb"

This reverts commit 9e13aeddc5abdea0c4a7b1febb22b75b6a61a7b7.

--- cmake_modules/FindBox2D.cmake
+++ cmake_modules/FindBox2D.cmake
@@ -1,63 +1,30 @@
-# Locate Box2D
-# This module defines XXX_FOUND, XXX_INCLUDE_DIRS and XXX_LIBRARIES standard variables
+# source: http://breathe.git.sourceforge.net
+#
+# Locate Box2D library
+# This module defines
+# BOX2D_LIBRARY, the name of the library to link against
+# BOX2D_FOUND, if false, do not try to link to Box2D
+# BOX2D_INCLUDE_DIR, where to find Box2D headers
+#
+# Created by Sven-Hendrik Haase. Based on the FindZLIB.cmake module.

-FIND_PATH(BOX2D_INCLUDE_DIR Box2D.h
-	HINTS
-	$ENV{BOX2D_DIR}
-	$ENV{BOX2D_PATH}
-	${ADDITIONAL_SEARCH_PATHS}
-	PATH_SUFFIXES include Include
-	PATHS
-		~/Library/Frameworks
-		/Library/Frameworks
-		/usr/local
-		/usr
-		/sw # Fink
-		/opt/local # DarwinPorts
-		/opt/csw # Blastwave
-		/opt
-)
+IF(BOX2D_INCLUDE_DIR)
+  # Already in cache, be silent
+  SET(BOX2D_FIND_QUIETLY TRUE)
+ENDIF(BOX2D_INCLUDE_DIR)

-FIND_LIBRARY(BOX2D_LIBRARY
-	NAMES box2d
-	HINTS
-	$ENV{BOX2D_DIR}
-	$ENV{BOX2D_PATH}
-	${ADDITIONAL_SEARCH_PATHS}
-	PATH_SUFFIXES lib64 lib lib/release Library
-	PATHS
-		~/Library/Frameworks
-		/Library/Frameworks
-		/usr/local
-		/usr
-		/sw
-		/opt/local
-		/opt/csw
-		/opt
-)
+FIND_PATH(BOX2D_INCLUDE_DIR Box2D/Box2D.h)

-FIND_LIBRARY(BOX2D_LIBRARY_DEBUG
-	NAMES box2dd box2d_d
-	HINTS
-	$ENV{BOX2D_DIR}
-	$ENV{BOX2D_PATH}
-	${ADDITIONAL_SEARCH_PATHS}
-	PATH_SUFFIXES lib64 lib lib/debug Library
-	PATHS
-		~/Library/Frameworks
-		/Library/Frameworks
-		/usr/local
-		/usr
-		/sw
-		/opt/local
-		/opt/csw
-		/opt
-)
+SET(BOX2D_NAMES box2d Box2d BOX2D Box2D)
+FIND_LIBRARY(BOX2D_LIBRARY NAMES ${BOX2D_NAMES})
+MARK_AS_ADVANCED(BOX2D_LIBRARY BOX2D_INCLUDE_DIR)

+# Per-recommendation
+SET(BOX2D_INCLUDE_DIRS "${BOX2D_INCLUDE_DIR}")
+SET(BOX2D_LIBRARIES    "${BOX2D_LIBRARY}")

-# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
+# handle the QUIETLY and REQUIRED arguments and set BOX2D_FOUND to TRUE if
 # all listed variables are TRUE
+
 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(BOX2D DEFAULT_MSG BOX2D_LIBRARY BOX2D_INCLUDE_DIR)
-INCLUDE(FindPackageTargetLibraries)
-FIND_PACKAGE_SET_STD_INCLUDE_AND_LIBS(BOX2D)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Box2D DEFAULT_MSG BOX2D_LIBRARY BOX2D_INCLUDE_DIR)


adding RPM_PACKAGE_RELEASE number again

adding RPM_PACKAGE_RELEASE number again

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -220,7 +220,7 @@
   IF (ENABLE_INSTALLER)

     SET(CPACK_GENERATOR RPM)
-    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64")
+    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_RPM_PACKAGE_RELEASE}.x86_64")
     SET(CPACK_COMPONENTS_ALL libraries headers documentation tutorials utilities libraries_xeonphi tutorials_xeonphi utilities_xeonphi)
     SET(CPACK_RPM_COMPONENT_INSTALL ON)
     SET(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0") # Apache Software License, Version 2.0


COM: Fix copyright header for S1TilingApps remote module

--- Modules/Remote/S1TilingSupportApplications.remote.cmake
+++ Modules/Remote/S1TilingSupportApplications.remote.cmake
@@ -1,15 +1,15 @@
 #
-# Copyright(C) 2005-2020 Centre National d'Etudes Spatiales(CNES)
+# Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
 #
 # This file is part of Orfeo Toolbox
 #
-#     https: //www.orfeo-toolbox.org/
+#     https://www.orfeo-toolbox.org/
 #
-# Licensed under the Apache License, Version 2.0(the "License");
+# Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
 #
-#     http: //www.apache.org/licenses/LICENSE-2.0
+#     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


removing some messages

removing some messages

git-svn-id: 609522d7d408cfa97e9ff3bac4923f7fa96011fc@134 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -586,7 +586,6 @@
     if(MATLAB_FIND_DEBUG)
       message(STATUS "[MATLAB] - Unknown version, looking for Matlab under ${MATLAB_ROOT}")
     endif()
-    message("MATLAB_PROGRAM ${MATLAB_PROGRAM}")
     find_program(
       MATLAB_PROGRAM
       matlab
@@ -594,7 +593,6 @@
       DOC "Matlab main program"
       NO_DEFAULT_PATH
     )
-    message("MATLAB_PROGRAM ${MATLAB_PROGRAM}")


Added system check application to start menu

--- cmake/Package.cmake
+++ cmake/Package.cmake
@@ -22,6 +22,8 @@
     set(CPACK_NSIS_MODIFY_PATH ON)
     # Start menu items
     set(CPACK_NSIS_MENU_LINKS
+        "fast\\\\bin\\\\systemCheck"
+        "System Check"
         "fast\\\\bin\\\\UFFviewer"
         "Ultrasound File Format Viewer"
         "fast\\\\bin\\\\runPipeline"


Fixed if-branch error

Fixed if-branch error

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@195 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -1,144 +1,144 @@
-# option to disable inclusion of qmake build system into source package
-option (
-  DISABLE_QMAKE_BUILD
-  "Disable inclusion of qmake build system into source package"
-  OFF
-)
-
-# set name
-set (CPACK_PACKAGE_NAME "OpenMesh")
-set (CPACK_PACKAGE_VENDOR "ACG")
-
-# set version
-set (CPACK_PACKAGE_VERSION_MAJOR "${OPENMESH_VERSION_MAJOR}")
-set (CPACK_PACKAGE_VERSION_MINOR "${OPENMESH_VERSION_MINOR}")
-set (CPACK_PACKAGE_VERSION_PATCH "${OPENMESH_VERSION_PATCH}")
-set (CPACK_PACKAGE_VERSION "${OPENMESH_VERSION}")
-
-# addition package info
-set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenMesh")
-set (CPACK_PACKAGE_EXECUTABLES "OpenMesh;")
-set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
-set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}")
-set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
-set (CPACK_SOURCE_STRIP_FILES "")
-
-# set (CPACK_STRIP_FILES "bin/OpenFlipper")
-
-# source package generation
-set (CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP")
-
-# ignored files in source package
-set (CPACK_SOURCE_IGNORE_FILES  "\\\\.#;/#;.*~")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.git")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.svn")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR}")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "Makefile")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "Makefile\\\\..*")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.moc\\\\.cpp$")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "CMakeCache.txt")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "CMakeFiles")
-
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*_(32|64)_Debug/")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*_(32|64)_Release/")
-
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/MacOS")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/WIN")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/tmp/")
-
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevelop")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevses")
-
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/lib/")
-list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/include/")
-
-if (DISABLE_QMAKE_BUILD)
-  list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.pro")
-  list (APPEND CPACK_SOURCE_IGNORE_FILES "/qmake/")
-  list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.qmake\\\\.cache")
-endif ()
-
-# filter out all disabled plugins
-# file (
-#   GLOB _plugins_in
-#   RELATIVE "${CMAKE_SOURCE_DIR}"
-#   "${CMAKE_SOURCE_DIR}/Plugin-*"
-# )
-#foreach (_plugin ${_plugins_in})
-#  string (REPLACE "Plugin-" "" _plugin_name ${_plugin})
-#  string (TOUPPER ${_plugin_name} _PLUGIN)
-#  if (NOT EXISTS ${CMAKE_SOURCE_DIR}/${_plugin}/CMakeLists.txt AND DISABLE_QMAKE_BUILD)
-#    list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}")
-#  elseif (DISABLE_PLUGIN_${_PLUGIN})
-#    list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}")
-#  endif ()
-#endforeach ()
-
-
-if (WIN32)
-  # window NSIS installer
-  set (CPACK_GENERATOR "NSIS")
-  set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
-  set (CPACK_NSIS_DISPLAY_NAME "OpenMesh v${CPACK_PACKAGE_VERSION}")
-  # set (CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\OpenFlipper_Icon_128x128x32.ico")
-  # we need a real uninstaller icon here and we have to define both to make the installer icon work
-  # set (CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\OpenFlipper_Icon_128x128x32.ico")
-  # set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\installer.bmp")
-  set (CPACK_NSIS_HELP_LINK "http:\\\\www.openmesh.org")
-  set (CPACK_NSIS_URL_INFO_ABOUT "http:\\\\www.openmesh.org")
-  # TODO: fillme
-  # set (CPACK_NSIS_CONTACT "")
-
-  #set (CPACK_NSIS_CREATE_ICONS
-  #     "CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\OpenFlipper.lnk\\\" \\\"$INSTDIR\\\\OpenFlipper.exe\\\""
-  #    )
-  #set (CPACK_NSIS_DELETE_ICONS
-  #     "Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\OpenFlipper.lnk\\\""
-  #    )
-
-  # append dll's to installed package
-  #if (EXISTS ${CMAKE_SOURCE_DIR}/WIN)
-	  #file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 debug/*.dll")
-	  #install(FILES ${_files}
-	  #DESTINATION ${ACG_PROJECT_BINDIR}
-	  #CONFIGURATIONS Debug
-	  #)
-    #file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 release/*.dll")
-    #install (FILES ${_files}
-    #  DESTINATION ${ACG_PROJECT_BINDIR}
-    #  CONFIGURATIONS Release
-    #)
-    #install (FILES "${CMAKE_SOURCE_DIR}/WIN/DLLs/Redistributables/Visual Studio 2008/vcredist_x86.exe"
-    #  DESTINATION ${ACG_PROJECT_BINDIR}
-    #)
-    #set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vcredist_x86.exe\\\" /q:a'")
-    #endif ()
-    #elseif (APPLE)
-  # apple Drag'n'Drop installer package
-  #set (CPACK_GENERATOR "DragNDrop;TGZ")
-  #set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/OpenFlipper/Icons/OpenFlipper_Icon.icns")
-  #endif ()
-
-# has to be last
-if (WIN32)
-  set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP "true")
-  include (InstallRequiredSystemLibraries)
-  install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${ACG_PROJECT_BINDIR})
-else ()
-  include (InstallRequiredSystemLibraries)
-endif ()
-
-
-include (CPack)
-
-if (NOT WIN32 AND NOT APPLE)
-  # no binary target for linux
-  file (REMOVE "${CMAKE_BINARY_DIR}/CPackConfig.cmake")
-endif ()
-
-# cmake doesn't create a source package target, so we have to add our own
-if (EXISTS "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake")
-  add_custom_target (PACKAGE_SOURCE
-    ${CMAKE_CPACK_COMMAND} --config "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake"
-  )
-endif ()
+# option to disable inclusion of qmake build system into source package
+option (
+  DISABLE_QMAKE_BUILD
+  "Disable inclusion of qmake build system into source package"
+  OFF
+)
+
+# set name
+set (CPACK_PACKAGE_NAME "OpenMesh")
+set (CPACK_PACKAGE_VENDOR "ACG")
+
+# set version
+set (CPACK_PACKAGE_VERSION_MAJOR "${OPENMESH_VERSION_MAJOR}")
+set (CPACK_PACKAGE_VERSION_MINOR "${OPENMESH_VERSION_MINOR}")
+set (CPACK_PACKAGE_VERSION_PATCH "${OPENMESH_VERSION_PATCH}")
+set (CPACK_PACKAGE_VERSION "${OPENMESH_VERSION}")
+
+# addition package info
+set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenMesh")
+set (CPACK_PACKAGE_EXECUTABLES "OpenMesh;")
+set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
+set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}")
+set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
+set (CPACK_SOURCE_STRIP_FILES "")
+
+# set (CPACK_STRIP_FILES "bin/OpenFlipper")
+
+# source package generation
+set (CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP")
+
+# ignored files in source package
+set (CPACK_SOURCE_IGNORE_FILES  "\\\\.#;/#;.*~")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.git")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.svn")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR}")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "Makefile")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "Makefile\\\\..*")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.moc\\\\.cpp$")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "CMakeCache.txt")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "CMakeFiles")
+
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*_(32|64)_Debug/")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*_(32|64)_Release/")
+
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/MacOS")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/WIN")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/tmp/")
+
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevelop")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevses")
+
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/lib/")
+list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/include/")
+
+if (DISABLE_QMAKE_BUILD)
+  list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.pro")
+  list (APPEND CPACK_SOURCE_IGNORE_FILES "/qmake/")
+  list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.qmake\\\\.cache")
+endif ()
+
+# filter out all disabled plugins
+# file (
+#   GLOB _plugins_in
+#   RELATIVE "${CMAKE_SOURCE_DIR}"
+#   "${CMAKE_SOURCE_DIR}/Plugin-*"
+# )
+#foreach (_plugin ${_plugins_in})
+#  string (REPLACE "Plugin-" "" _plugin_name ${_plugin})
+#  string (TOUPPER ${_plugin_name} _PLUGIN)
+#  if (NOT EXISTS ${CMAKE_SOURCE_DIR}/${_plugin}/CMakeLists.txt AND DISABLE_QMAKE_BUILD)
+#    list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}")
+#  elseif (DISABLE_PLUGIN_${_PLUGIN})
+#    list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}")
+#  endif ()
+#endforeach ()
+
+
+if (WIN32)
+  # window NSIS installer
+  set (CPACK_GENERATOR "NSIS")
+  set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
+  set (CPACK_NSIS_DISPLAY_NAME "OpenMesh v${CPACK_PACKAGE_VERSION}")
+  # set (CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\OpenFlipper_Icon_128x128x32.ico")
+  # we need a real uninstaller icon here and we have to define both to make the installer icon work
+  # set (CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\OpenFlipper_Icon_128x128x32.ico")
+  # set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\OpenFlipper\\\\Icons\\\\installer.bmp")
+  set (CPACK_NSIS_HELP_LINK "http:\\\\www.openmesh.org")
+  set (CPACK_NSIS_URL_INFO_ABOUT "http:\\\\www.openmesh.org")
+  # TODO: fillme
+  # set (CPACK_NSIS_CONTACT "")
+
+  #set (CPACK_NSIS_CREATE_ICONS
+  #     "CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\OpenFlipper.lnk\\\" \\\"$INSTDIR\\\\OpenFlipper.exe\\\""
+  #    )
+  #set (CPACK_NSIS_DELETE_ICONS
+  #     "Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\OpenFlipper.lnk\\\""
+  #    )
+
+  # append dll's to installed package
+  #if (EXISTS ${CMAKE_SOURCE_DIR}/WIN)
+	  #file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 debug/*.dll")
+	  #install(FILES ${_files}
+	  #DESTINATION ${ACG_PROJECT_BINDIR}
+	  #CONFIGURATIONS Debug
+	  #)
+    #file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 release/*.dll")
+    #install (FILES ${_files}
+    #  DESTINATION ${ACG_PROJECT_BINDIR}
+    #  CONFIGURATIONS Release
+    #)
+    #install (FILES "${CMAKE_SOURCE_DIR}/WIN/DLLs/Redistributables/Visual Studio 2008/vcredist_x86.exe"
+    #  DESTINATION ${ACG_PROJECT_BINDIR}
+    #)
+    #set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vcredist_x86.exe\\\" /q:a'")
+    #endif ()
+    #elseif (APPLE)
+  # apple Drag'n'Drop installer package
+  #set (CPACK_GENERATOR "DragNDrop;TGZ")
+  #set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/OpenFlipper/Icons/OpenFlipper_Icon.icns")
+endif ()
+
+# has to be last
+if (WIN32)
+  set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP "true")
+  include (InstallRequiredSystemLibraries)
+  install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${ACG_PROJECT_BINDIR})
+else ()
+  include (InstallRequiredSystemLibraries)
+endif ()
+
+
+include (CPack)
+
+if (NOT WIN32 AND NOT APPLE)
+  # no binary target for linux
+  file (REMOVE "${CMAKE_BINARY_DIR}/CPackConfig.cmake")
+endif ()
+
+# cmake doesn't create a source package target, so we have to add our own
+if (EXISTS "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake")
+  add_custom_target (PACKAGE_SOURCE
+    ${CMAKE_CPACK_COMMAND} --config "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake"
+  )
+endif ()


Add mingw gcov support.

Add mingw gcov support.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -227,6 +227,8 @@
     if(NOT CTEST_COVERAGE_COMMAND)
         find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
     endif()
+elseif(CC_NAME STREQUAL "mingw")
+    find_program(CTEST_COVERAGE_COMMAND NAMES x86_64-w64-mingw32-gcov i686-w64-mingw32-gcov x86_64-w64-mingw32.static-gcov i686-w64-mingw32.static-gcov)
 elseif(CC_NAME STREQUAL "clang")
     find_program(CTEST_COVERAGE_COMMAND NAMES llvm-cov-${CC_VERSION})
     if(NOT CTEST_COVERAGE_COMMAND)


Add USE_ETHOSU for the config.cmake (#9162)

This commit adds the cmake variable to enable/disable
building with Arm(R) Ethos(TM)-U NPU codegen support.

Change-Id: I891a1cb0619dd24d749353fe7b156c45356d453f

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -227,6 +227,9 @@
 # If USE_ETHOSN is enabled, use ETHOSN_HW (ON) if Ethos-N hardware is available on this machine
 # otherwise use ETHOSN_HW (OFF) to use the software test infrastructure
 set(USE_ETHOSN_HW OFF)
+
+# Whether to build with Arm(R) Ethos(TM)-U NPU codegen support
+set(USE_ETHOSU OFF)

 # Whether to build with TensorRT codegen or runtime
 # Examples are available here: docs/deploy/tensorrt.rst.


Minor bug fix in assigning namespace to exported CMake targets.

--- common.cmake
+++ common.cmake
@@ -33,7 +33,9 @@
   DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT ${component})

 # Install the export set for use with the install-tree
-install(EXPORT ${package}Targets DESTINATION
-  ${INSTALL_CMAKE_DIR} COMPONENT ${component})
+install(EXPORT ${package}Targets
+  DESTINATION ${INSTALL_CMAKE_DIR}
+  NAMESPACE Voxel::
+  COMPONENT ${component})

 ENDFUNCTION()


update common.cmake to support C and C++ which fixes pthread on Ubuntu

--- common.cmake
+++ common.cmake
@@ -6,7 +6,7 @@
 option(TOOLS "Enable building of tools" ON)
 option(TOOLS_DEV "Enable building of tools-dev" ON)

-project (${PROJECT})
+project (${PROJECT} C CXX)
 enable_testing()

 INCLUDE (CPack)


mingw fix, ticket #3483, thanks snorri

mingw fix, ticket #3483, thanks snorri

--- core/roslib/rosbuild.cmake
+++ core/roslib/rosbuild.cmake
@@ -4,7 +4,7 @@
 rosbuild_add_library(roslib src/package.cpp)
 rosbuild_link_boost(roslib thread)

-if(NOT APPLE)
+if(NOT (APPLE OR WIN32 OR MINGW))
   target_link_libraries(roslib rt)
-endif(NOT APPLE)
+endif()


ENH: Changed start time for nightly

ENH: Changed start time for nightly

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,3 +1,7 @@
+# Dashboard is opened for submissions for a 24 hour period starting at
+# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
+SET (NIGHTLY_START_TIME "23:00:00 EST")
+
 # Dart server to submit results (used by client)
 SET (DROP_SITE "public.kitware.com")
 SET (DROP_LOCATION "/incoming")


ci windows: append /Z7 to _FLAGS to prevent appending /Zi by MariaDB

--- build/msvc_ccache.cmake
+++ build/msvc_ccache.cmake
@@ -1,5 +1,7 @@
 # ccache doesn't work with /Zi.
 # See also: https://github.com/ccache/ccache/issues/1040
+string(APPEND CMAKE_C_FLAGS " /Z7")
+string(APPEND CMAKE_CXX_FLAGS " /Z7")
 foreach(lang C CXX)
   foreach(flag_suffix
       ""
@@ -12,7 +14,6 @@
       "_DEBUG_INIT"
       "_MINSIZEREL"
       "_MINSIZEREL_INIT")
-    message("XXX: ${lang}:${flag_suffix}: CMAKE_${lang}_FLAGS${flag_suffix}: ${CMAKE_${lang}_FLAGS${flag_suffix}}")
     string(REPLACE "/Zi" "/Z7"
       CMAKE_${lang}_FLAGS${flag_suffix}
       "${CMAKE_${lang}_FLAGS${flag_suffix}}")


BUG: Remove wrapping configuration loading debug statement

--- Wrapping/macro_files/itk_auto_load_submodules.cmake
+++ Wrapping/macro_files/itk_auto_load_submodules.cmake
@@ -299,7 +299,6 @@
         # Now include the .wrap file, and read manually requested types needed
         # to build lists of items to be wrapped for both CASTXML and SWIG
         if(EXISTS "${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap")
-            message(STATUS "loading ${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap")
             include("${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap")
         else()
             # for backward compatibility, to be removed in ITKv6


Fixed appcompat library setting.

Fixed appcompat library setting.

--- client/Android/FreeRDPCore/project.properties.cmake
+++ client/Android/FreeRDPCore/project.properties.cmake
@@ -13,3 +13,4 @@
 # Project target.
 target=android-@ANDROID_APP_TARGET_SDK@
 android.library=true
+android.library.reference.1=../appcompat_v7


COMP: Jsoncpp ignores BUILD_SHARED_LIBS.

Instead it uses JSONCPP_LIB_BUILD_SHARED internally.

--- CMake/Superbuild/External_JsonCpp.cmake
+++ CMake/Superbuild/External_JsonCpp.cmake
@@ -80,7 +80,7 @@
       -DCMAKE_INSTALL_PREFIX:PATH=${${proj}_DIR}
       -DCMAKE_BUILD_TYPE:STRING=${build_type}
       ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
-      -DBUILD_SHARED_LIBS:BOOL=${shared}
+      -DJSONCPP_LIB_BUILD_SHARED:BOOL=${shared}
       -DJSONCPP_WITH_TESTS:BOOL=OFF )

 else( NOT DEFINED ${proj}_DIR AND NOT ${USE_SYSTEM_JSONCPP} )


Bug 536 - Freetype 2.4.10

Bug 536 - Freetype 2.4.10

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


remove additional space

remove additional space

--- CMake/Platform/mbedOS-GNU-C.cmake
+++ CMake/Platform/mbedOS-GNU-C.cmake
@@ -8,7 +8,7 @@
 set(CMAKE_C_COMPILE_OBJECT        "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
 # <LINK_LIBRARIES> is grouped with system libraries so that system library
 # functions (e.g. malloc) can be overridden by symbols in <LINK_LIBRARIES>
-set(CMAKE_C_LINK_EXECUTABLE       "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> -Wl,-Map,<TARGET>.map -Wl,--start-group <OBJECTS> <LINK_LIBRARIES> ${GLOBALLY_LINKED_TARGET_LIBS}  -lm -lc -lgcc -lm -lc -lgcc -Wl,--end-group  --specs=nano.specs -o <TARGET>")
+set(CMAKE_C_LINK_EXECUTABLE       "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> -Wl,-Map,<TARGET>.map -Wl,--start-group <OBJECTS> <LINK_LIBRARIES> ${GLOBALLY_LINKED_TARGET_LIBS} -lm -lc -lgcc -lm -lc -lgcc -Wl,--end-group  --specs=nano.specs -o <TARGET>")

 set(CMAKE_C_FLAGS_DEBUG_INIT          "-g")


Do not introduce cyclic dependencies.

Do not introduce cyclic dependencies.

--- CMake/mitkMacroCreateModule.cmake
+++ CMake/mitkMacroCreateModule.cmake
@@ -33,7 +33,7 @@
     SET(MODULE_PROVIDES )
   ELSE()
     SET(MODULE_PROVIDES ${MODULE_NAME})
-    IF(NOT MODULE_NO_INIT)
+    IF(NOT MODULE_NO_INIT AND NOT MODULE_NAME STREQUAL "Mitk")
       # Add a dependency to the "Mitk" module
       LIST(APPEND MODULE_DEPENDS Mitk)
     ENDIF()


ICC uses movups, which doesn't break the ABI

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

--- tests/abi.cmake
+++ tests/abi.cmake
@@ -18,9 +18,9 @@
 extract_asm(vector_abi)

 if("${IMPL}" STREQUAL SSE)
-   set(reference "v?movaps .*a_v, %xmm0.*call.* v?movaps %xmm0, .*b_v")
+   set(reference "v?mov[au]ps .*a_v, %xmm0.*call.* v?mov[au]ps %xmm0, .*b_v")
 elseif("${IMPL}" STREQUAL AVX OR "${IMPL}" STREQUAL AVX2)
-   set(reference "vmovaps .*a_v, %ymm0.*call.* vmovaps %ymm0, .*b_v")
+   set(reference "vmov[au]ps .*a_v, %ymm0.*call.* vmov[au]ps %ymm0, .*b_v")
 else()
    message(FATAL_ERROR "Unknown IMPL '${IMPL}'")
 endif()


Improved generated superbuild script to correctly pass -j options.

--- Applications/PluginGenerator/ProjectTemplate/SuperBuild.cmake
+++ Applications/PluginGenerator/ProjectTemplate/SuperBuild.cmake
@@ -146,7 +146,7 @@
 ExternalProject_Add(${proj}
   DOWNLOAD_COMMAND ""
   CMAKE_GENERATOR ${gen}
-  CMAKE_ARGS
+  CMAKE_CACHE_ARGS
     ${ep_common_args}
     ${my_superbuild_boolean_args}
     -D${MY_PROJECT_NAME}_USE_SUPERBUILD:BOOL=OFF
@@ -171,28 +171,31 @@
 # Project
 #-----------------------------------------------------------------------------

+if(CMAKE_GENERATOR MATCHES ".*Makefiles.*")
+  set(_build_cmd "$(MAKE)")
+else()
+  set(_build_cmd ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/${MY_PROJECT_NAME}-build --config ${CMAKE_CFG_INTDIR})
+endif()
+
 # The variable SUPERBUILD_EXCLUDE_${MY_PROJECT_NAME}BUILD_TARGET should be set when submitting to a dashboard
 if(NOT DEFINED SUPERBUILD_EXCLUDE_${MY_PROJECT_NAME}BUILD_TARGET OR NOT SUPERBUILD_EXCLUDE_${MY_PROJECT_NAME}BUILD_TARGET)
-  set(proj ${MY_PROJECT_NAME}-build)
-  ExternalProject_Add(${proj}
-    DOWNLOAD_COMMAND ""
-    CONFIGURE_COMMAND ""
-    CMAKE_GENERATOR ${gen}
-    BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/${MY_PROJECT_NAME}-build --config ${CMAKE_CFG_INTDIR}
-    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
-    BINARY_DIR ${MY_PROJECT_NAME}-build
-    INSTALL_COMMAND ""
-    DEPENDS
-      "${MY_PROJECT_NAME}-Configure"
-    )
-endif()
+  set(_target_all_option "ALL")
+else()
+  set(_target_all_option "")
+endif()
+
+add_custom_target(${MY_PROJECT_NAME}-build ${_target_all_option}
+  COMMAND ${_build_cmd}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${MY_PROJECT_NAME}-build
+  DEPENDS ${MY_PROJECT_NAME}-Configure
+  )

 #-----------------------------------------------------------------------------
 # Custom target allowing to drive the build of the project itself
 #-----------------------------------------------------------------------------

 add_custom_target(${MY_PROJECT_NAME}
-  COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/${MY_PROJECT_NAME}-build --config ${CMAKE_CFG_INTDIR}
+  COMMAND ${_build_cmd}
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${MY_PROJECT_NAME}-build
 )


Fix #564 - gmock/gmock.h not found in benchmark tests.

--- cmake/HandleGTest.cmake
+++ cmake/HandleGTest.cmake
@@ -54,40 +54,62 @@
       )

   ExternalProject_Get_Property(googletest install_dir)
-
-  add_library(gtest UNKNOWN IMPORTED)
-  add_library(gtest_main UNKNOWN IMPORTED)
+  set(GTEST_INCLUDE_DIRS ${install_dir}/include)
+  file(MAKE_DIRECTORY ${GTEST_INCLUDE_DIRS})

   set(LIB_SUFFIX "${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(LIB_PREFIX "${CMAKE_STATIC_LIBRARY_PREFIX}")
-
   if("${GTEST_BUILD_TYPE}" STREQUAL "DEBUG")
     set(LIB_SUFFIX "d${CMAKE_STATIC_LIBRARY_SUFFIX}")
   endif()
-  file(MAKE_DIRECTORY ${install_dir}/include)
-  set_target_properties(gtest PROPERTIES
-    IMPORTED_LOCATION ${install_dir}/lib/${LIB_PREFIX}gtest${LIB_SUFFIX}
-    INTERFACE_INCLUDE_DIRECTORIES ${install_dir}/include
-  )
-  set_target_properties(gtest_main PROPERTIES
-    IMPORTED_LOCATION ${install_dir}/lib/${LIB_PREFIX}gtest_main${LIB_SUFFIX}
-    INTERFACE_INCLUDE_DIRECTORIES ${install_dir}/include
-  )
-  add_dependencies(gtest googletest)
-  add_dependencies(gtest_main googletest)
-  set(GTEST_BOTH_LIBRARIES gtest gtest_main)
-  set(GTEST_INCLUDE_DIRS ${install_dir}/include)
+
+  # Use gmock_main instead of gtest_main because it initializes gtest as well.
+  # Note: The libraries are listed in reverse order of their dependancies.
+  foreach(LIB gtest gmock gmock_main)
+    add_library(${LIB} UNKNOWN IMPORTED)
+    set_target_properties(${LIB} PROPERTIES
+      IMPORTED_LOCATION ${install_dir}/lib/${LIB_PREFIX}${LIB}${LIB_SUFFIX}
+      INTERFACE_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS}
+      INTERFACE_LINK_LIBRARIES "${GTEST_BOTH_LIBRARIES}"
+    )
+    add_dependencies(${LIB} googletest)
+    list(APPEND GTEST_BOTH_LIBRARIES ${LIB})
+  endforeach()
 endmacro(build_external_gtest)

 if (BENCHMARK_ENABLE_GTEST_TESTS)
   if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/googletest)
+    set(GTEST_ROOT "${CMAKE_SOURCE_DIR}/googletest")
     set(INSTALL_GTEST OFF CACHE INTERNAL "")
     set(INSTALL_GMOCK OFF CACHE INTERNAL "")
     add_subdirectory(${CMAKE_SOURCE_DIR}/googletest)
-    set(GTEST_BOTH_LIBRARIES gtest gtest_main)
+    set(GTEST_BOTH_LIBRARIES gtest gmock gmock_main)
+    foreach(HEADER test mock)
+      # CMake 2.8 and older don't respect INTERFACE_INCLUDE_DIRECTORIES, so we
+      # have to add the paths ourselves.
+      set(HFILE g${HEADER}/g${HEADER}.h)
+      set(HPATH ${GTEST_ROOT}/google${HEADER}/include)
+      find_path(HEADER_PATH_${HEADER} ${HFILE}
+          NO_DEFAULT_PATHS
+          HINTS ${HPATH}
+      )
+      if (NOT HEADER_PATH_${HEADER})
+        message(FATAL "Failed to find header ${HFILE} in ${HPATH}")
+      endif()
+      list(APPEND GTEST_INCLUDE_DIRS ${HEADER_PATH_${HEADER}})
+    endforeach()
   elseif(BENCHMARK_DOWNLOAD_DEPENDENCIES)
     build_external_gtest()
   else()
     find_package(GTest REQUIRED)
+    find_path(GMOCK_INCLUDE_DIRS gmock/gmock.h
+        HINTS ${GTEST_INCLUDE_DIRS})
+    if (NOT GMOCK_INCLUDE_DIRS)
+      message(FATAL "Failed to find header gmock/gmock.h with hint ${GTEST_INCLUDE_DIRS}")
+    endif()
+    set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS})
+    # FIXME: We don't currently require the gmock library to build the tests,
+    # and it's likely we won't find it, so we don't try. As long as we've
+    # found the gmock/gmock.h header and gtest_main that should be good enough.
   endif()
 endif()


cmake: support ICC warnings

cmake: support ICC warnings

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -302,6 +302,7 @@
     set(_flag_vars "")
     set(_msvc_warnings "")
     set(_gxx_warnings "")
+    set(_icc_warnings "")
     foreach(arg ${ARGN})
       if(arg MATCHES "^CMAKE_")
         list(APPEND _flag_vars ${arg})
@@ -309,6 +310,8 @@
         list(APPEND _msvc_warnings ${arg})
       elseif(arg MATCHES "^-W")
         list(APPEND _gxx_warnings ${arg})
+      elseif(arg MATCHES "^-wd" OR arg MATCHES "^-Qwd" OR arg MATCHES "^/Qwd")
+        list(APPEND _icc_warnings ${arg})
       endif()
     endforeach()
     if(MSVC AND _msvc_warnings AND _flag_vars)
@@ -331,9 +334,25 @@
         endforeach()
       endforeach()
     endif()
+    if(CV_ICC AND _icc_warnings AND _flag_vars)
+      foreach(var ${_flag_vars})
+        foreach(warning ${_icc_warnings})
+          if(UNIX)
+            string(REPLACE "-Qwd" "-wd" warning "${warning}")
+          else()
+            string(REPLACE "-wd" "-Qwd" warning "${warning}")
+          endif()
+          ocv_check_flag_support(${var} "${warning}" _varname)
+          if(${_varname})
+            set(${var} "${${var}} ${warning}")
+          endif()
+        endforeach()
+      endforeach()
+    endif()
     unset(_flag_vars)
     unset(_msvc_warnings)
     unset(_gxx_warnings)
+    unset(_icc_warnings)
   endif(NOT ENABLE_NOISY_WARNINGS)
 endmacro()


fix "non target" warning for "world" build

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -795,8 +795,12 @@
   set(${_extra} "")
   set(${_3rdparty} "")
   foreach(m ${OPENCV_MODULES_PUBLIC})
-    get_target_property(deps ${m} INTERFACE_LINK_LIBRARIES)
-    if(NOT deps)
+    if(TARGET ${m})
+      get_target_property(deps ${m} INTERFACE_LINK_LIBRARIES)
+      if(NOT deps)
+        set(deps "")
+      endif()
+    else()
       set(deps "")
     endif()
     list(INSERT ${_modules} 0 ${deps} ${m})


Create dummy project with the same naming scheme as standard ones.

--- cmake/PackageInit.cmake
+++ cmake/PackageInit.cmake
@@ -4,7 +4,12 @@
     if (USE_SYSTEM_${package})
         find_package(${package_name})
         if (${var}_FOUND)
+
+            #   Create a dummy external project just to satisfy dependencies.
+
+            SetExternalProjectsDirs(${package} ep_build_dirs)
             ExternalProject_Add(${package}
+                ${ep_build_dirs}
                 CONFIGURE_COMMAND ""
                 DOWNLOAD_COMMAND ""
                 UPDATE_COMMAND ""


gosh, fix syntax

gosh, fix syntax

--- cmake/get-tinyxml.cmake
+++ cmake/get-tinyxml.cmake
@@ -15,11 +15,11 @@
   DOWNLOAD_NAME         tinyxml-v${TINYXML_VERSION}.zip
   URL                   https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.zip/download
   URL_MD5               2a0aaf609c9e670ec9748cd01ed52dae
-  PATCH_COMMAND         ${CMAKE_COMMAND} -E copy ${CMAKE_MODULE_PATH}/patches/tinyxml/CMakeLists.txt ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml
+  PATCH_COMMAND         ${CMAKE_COMMAND} -E copy ${CMAKE_MODULE_PATH}/patches/tinyxml/CMakeLists.txt  ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml
   INSTALL_COMMAND       ${CMAKE_COMMAND} -E make_directory ${DEPENDENCY_INSTALL_DIR}/include/tinyxml
     COMMAND ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml-build/Release/tinyxml.dll  ${DEPENDENCY_INSTALL_DIR}/bin/tinyxml.dll
     COMMAND ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml-build/Release/tinyxml.lib  ${DEPENDENCY_INSTALL_DIR}/lib/tinyxml.lib
-    COMMAND ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml/tinystr.h"                 ${DEPENDENCY_INSTALL_DIR}/include/tinyxml/tinystr.h
-    COMMAND ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml/tinyxml.h"                 ${DEPENDENCY_INSTALL_DIR}/include/tinyxml/tinyxml.h
+    COMMAND ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml/tinystr.h                  ${DEPENDENCY_INSTALL_DIR}/include/tinyxml/tinystr.h
+    COMMAND ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml/tinyxml.h                  ${DEPENDENCY_INSTALL_DIR}/include/tinyxml/tinyxml.h

 )


Fix: oups missed with the last commit

Fix: oups missed with the last commit

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

--- cmake/pcl_options.cmake
+++ cmake/pcl_options.cmake
@@ -1,5 +1,9 @@
 # Options for building PCL.

 # Build shared libraries by default.
-option(PCL_SHARED_LIBS "Build shared libraries." ON)
+if(WIN32)
+	option(PCL_SHARED_LIBS "Build shared libraries." OFF)
+else(WIN32)
+	option(PCL_SHARED_LIBS "Build shared libraries." ON)
+endif(WIN32)
 mark_as_advanced(PCL_SHARED_LIBS)


Win32 compilation uses multiple CPUs again.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -39,10 +39,10 @@
   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MD /MP"
       CACHE STRING "C++ compiler debug options" FORCE)
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
-      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /Ob2 /Gm"
+      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Ob2 /arch:SSE2"
       CACHE STRING "C++ compiler release-with-debug options" FORCE)
   set(CMAKE_CXX_FLAGS_RELEASE
-      "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /Ob2 /Oi /Ot /GF /Gy /arch:SSE2"
+      "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 /Oi /GF /Gy /arch:SSE2"
       CACHE STRING "C++ compiler release options" FORCE)

   if (LAA)


Found better way to get compiler version in CMake.

--- cmake/ConfigureCompiler.cmake
+++ cmake/ConfigureCompiler.cmake
@@ -151,15 +151,10 @@
   endif()
   if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     set(CONFIGURE_COMPILER_SET_CXX_COMPILER_FLAGS ON)
-    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-    if (GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
-      if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
-        set(CMAKE_CXX_FLAGS "-std=c++11")
-      else()
-        set(CMAKE_CXX_FLAGS "-std=c++0x")
-      endif()
-    else()
-      message(FATAL_ERROR "Version ${GCC_VERSION} of GCC compiler is not supported.")
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
+      set(CMAKE_CXX_FLAGS "-std=c++0x")
+    else()
+      set(CMAKE_CXX_FLAGS "-std=c++11")
     endif()
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -pedantic -Wall -Wextra -Wno-long-long -fmessage-length=100"
                         CACHE STRING "Flags used by the compiler during all build types." FORCE)


Add a comment that LIBPL is for Linux/Debian Jessie

--- cmake/FindPythonLibsNew.cmake
+++ cmake/FindPythonLibsNew.cmake
@@ -68,11 +68,14 @@
 endif()

 # According to http://stackoverflow.com/questions/646518/python-how-to-detect-debug-interpreter
-# testing whether sys has the gettotalrefcount function is a reliable, cross-platform
-# way to detect a CPython debug interpreter.
+# testing whether sys has the gettotalrefcount function is a reliable,
+# cross-platform way to detect a CPython debug interpreter.
 #
 # The library suffix is from the config var LDVERSION sometimes, otherwise
 # VERSION. VERSION will typically be like "2.7" on unix, and "27" on windows.
+#
+# The config var LIBPL is for Linux, and helps on Debian Jessie where the
+# addition of multi-arch support shuffled things around.
 execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
     "from distutils import sysconfig as s;import sys;import struct;
 print('.'.join(str(v) for v in sys.version_info));


Fix typo when set openblas compiling flags.

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -37,7 +37,7 @@
         SET(OPTIONAL_ARGS HOSTCC=${HOST_C_COMPILER} TARGET=ARMV7 USE_THREAD=0 libs)
     ELSE()
         SET(OPENBLAS_COMMIT "v0.2.19")
-        SET(OPENBLAS_ARGS DYNAMIC_ARCH=1 libs)
+        SET(OPTIONAL_ARGS DYNAMIC_ARCH=1 libs)
     ENDIF()

     ExternalProject_Add(


Fixes issue ROOT-5813 (CMake)

Fixes issue ROOT-5813 (CMake)

--- cmake/modules/FindAlien.cmake
+++ cmake/modules/FindAlien.cmake
@@ -12,7 +12,7 @@
 endif()

 find_path(ALIEN_INCLUDE_DIR gapiUI.h
-  ${ALIEN_DIR}/include
+  ${ALIEN_DIR}/include $ENV{ALIEN_DIR}/include
   /usr/local/include
   /opt/alien/api/include
   /opt/monalisa/include
@@ -21,7 +21,7 @@
 )

 find_library(ALIEN_LIBRARY NAMES gapiUI PATHS
-  ${ALIEN_DIR}/lib
+  ${ALIEN_DIR}/lib $ENV{ALIEN_DIR}/lib
   /usr/local/lib
   /opt/alien/api/lib
   /opt/monalisa/lib


Find the NumPy version from NumPy

Find the NumPy version from NumPy

--- cmake/modules/FindNumPy.cmake
+++ cmake/modules/FindNumPy.cmake
@@ -1,12 +1,13 @@
 #ckwg +4
-# Copyright 2010, 2012 by Kitware, Inc. All Rights Reserved. Please refer to
-# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
+# Copyright 2010, 2012, 2013 by Kitware, Inc. All Rights Reserved. Please refer
+# to KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
 # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.

 # Locate NumPy library
 # This module defines
 #  NUMPY_FOUND       - if false, do not try to link to NumPy
 #  NUMPY_INCLUDE_DIR - where to find numpy/numpyconfig.h
+#  NUMPY_VERSION     - the version of NumPy

 if (PYTHON_EXECUTABLE)
   execute_process(
@@ -20,12 +21,28 @@
     set(NUMPY_INCLUDE_DIR "${__numpy_include_dir}"
       CACHE PATH "Include directory for NumPy headers")
   endif ()
+
+  execute_process(
+    COMMAND         "${PYTHON_EXECUTABLE}" -c
+                    "import numpy, sys; sys.stdout.write(numpy.version.version)"
+    RESULT_VARIABLE __numpy_version_res
+    OUTPUT_VARIABLE __numpy_version
+    ERROR_QUIET)
+
+  if (${__numpy_version_res} EQUAL 0)
+    set(NUMPY_VERSION "${__numpy_version}"
+      CACHE PATH "NumPy version")
+  endif ()
 endif ()

 # handle the QUIETLY and REQUIRED arguments and set NUMPY_FOUND to TRUE if
 # all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(NumPy DEFAULT_MSG NUMPY_INCLUDE_DIR)
+find_package_handle_standard_args(NumPy
+  REQUIRED_VARS
+    NUMPY_INCLUDE_DIR
+  VERSION_VAR
+    NUMPY_VERSION)

 mark_as_advanced(
   NUMPY_INCLUDE_DIR)


cmake/modules/FindVIGRA.cmake: Check to see if VIGRA_ROOT is already defined before searching.

--- cmake/modules/FindVIGRA.cmake
+++ cmake/modules/FindVIGRA.cmake
@@ -9,11 +9,13 @@

 # See if VIGRA_ROOT was set externally, if so use it.
-if (NOT "$ENV{VIGRA_ROOT}" STREQUAL "")
-    set(VIGRA_ROOT $ENV{VIGRA_ROOT})
-elseif (NOT "$ENV{VIGRAROOT}" STREQUAL "")
-      set(VIGRA_ROOT $ENV{VIGRAROOT})
-      set(ENV{VIGRA_ROOT} $ENV{VIGRA_ROOT})
+if (NOT "${VIGRA_ROOT}" STREQUAL "")
+    if (NOT "$ENV{VIGRA_ROOT}" STREQUAL "")
+        set(VIGRA_ROOT $ENV{VIGRA_ROOT})
+    elseif (NOT "$ENV{VIGRAROOT}" STREQUAL "")
+          set(VIGRA_ROOT $ENV{VIGRAROOT})
+          set(ENV{VIGRA_ROOT} $ENV{VIGRA_ROOT})
+    endif()
 endif()

 # configVersion.hxx only present, after build of Vigra


Static Android build doesn't need shared libs.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@244073 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -44,7 +44,9 @@
 # its symbols, which significantly increases the binary size. Static linking, on
 # the other hand, has little to no effect on the binary size.
 if( NOT DEFINED LLVM_BUILD_STATIC )
- set( LLVM_BUILD_STATIC True )
+ set( LLVM_BUILD_STATIC True  CACHE BOOL "" FORCE )
+ set( LLVM_ENABLE_PIC   FALSE CACHE BOOL "" FORCE )
+ set( BUILD_SHARED_LIBS FALSE CACHE BOOL "" FORCE )
 endif()

 set( ANDROID_ABI "${ANDROID_ABI}" CACHE INTERNAL "Android Abi" FORCE )


add a path to locat kutils

add a path to locat kutils

--- cmakemodules/Findkutils.cmake
+++ cmakemodules/Findkutils.cmake
@@ -40,6 +40,7 @@
   ${CMAKE_CURRENT_SOURCE_DIR}/../kutils/
   ${CMAKE_CURRENT_SOURCE_DIR}/../build/kutils/
   ${CMAKE_CURRENT_SOURCE_DIR}/../../kutils/
+  ${CMAKE_CURRENT_SOURCE_DIR}/../../KTAB/kutils/
   ${KTAB_PREFIX}
   "C:/local/ktab"
   ${CMAKE_CURRENT_SOURCE_DIR}/../kutils/Debug


ENH: Jump straight on the open bugs section

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -25,7 +25,7 @@
 SET (CVS_WEB_CVSROOT "VTK")
 SET (USE_DOXYGEN "On")
 SET (DOXYGEN_URL "http://www.vtk.org/doc/nightly/html/" )
-SET (GNATS_WEB_URL "http://public.kitware.com/Bug/index.php")
+SET (GNATS_WEB_URL "${PROJECT_URL}/Bug/query.php?projects=1&status%5B%5D=1&status%5B%5D=2&status%5B%5D=3&status%5B%5D=4&status%5B%5D=6&op=doquery")
 SET (USE_GNATS "On")

 # copy over the testing logo


BUG: expat is installed, but ITK_INCLUDE_DIRS fail to report so, therefore any external projects trying to use an installed ITK will fail as soon as a file like itkXMLFile.h is included (it requires expat.h).

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -90,6 +90,7 @@
   ${ITK_INSTALL_INCLUDE_DIR}/Algorithms
   ${ITK_INSTALL_INCLUDE_DIR}/BasicFilters
   ${ITK_INSTALL_INCLUDE_DIR}/Common
+  ${ITK_INSTALL_INCLUDE_DIR}/expat
   ${ITK_INSTALL_INCLUDE_DIR}/Numerics
   ${ITK_INSTALL_INCLUDE_DIR}/IO
   ${ITK_INSTALL_INCLUDE_DIR}/Numerics/FEM


fix FIPS_MSVC_LTCG vs FIPS_WINDOWS_LTCG typo

--- cmake-toolchains/windows.cmake
+++ cmake-toolchains/windows.cmake
@@ -91,7 +91,7 @@
 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")

 # add LTCG options
-if (FIPS_WINDOWS_LTCG)
+if (FIPS_MSVC_LTCG)
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
     set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL")
     set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /INCREMENTAL:NO /LTCG")


clear out TMP_ cmake variable after use, display FFMPEG information after found

--- cmake/Modules/FindFFMPEG.cmake
+++ cmake/Modules/FindFFMPEG.cmake
@@ -67,13 +67,13 @@
 SET( TMP_ TMP-NOTFOUND )
 SET( FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_PATHS} )
 FOREACH( INC_ ${FFMPEG_HEADERS} )
-   message( "checking: " ${INC_} )
+   message( STATUS "checking: " ${INC_} )

    FIND_PATH( TMP_ ${INC_}
 	      PATHS ${FFMPEG_INCLUDE_PATHS}
 	      PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} )
    IF ( TMP_ )
-      message( "found: " ${TMP_} )
+      message( STATUS "found: " ${TMP_} )
       MATH( EXPR INC_SUCCESS ${INC_SUCCESS}+1 )
       SET( FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_DIR} ${TMP_} )
    ENDIF ( TMP_ )
@@ -97,6 +97,9 @@
    SET ( FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES_FULL} )
 ENDIF( NOT WIN32 )

+#Clear out temp variable
+unset(TMP_ CACHE)
+
 LIST( LENGTH FFMPEG_HEADERS LIST_SIZE_ )

 SET( FFMPEG_FOUND FALSE )
@@ -104,4 +107,7 @@
 IF ( ${INC_SUCCESS} EQUAL ${LIST_SIZE_} )
    SET( FFMPEG_FOUND TRUE )
    SET( FFMPEG_SWSCALE_FOUND ${SWSCALE_FOUND} )
+   message( STATUS "FFMPEG include dir: ${FFMPEG_INCLUDE_DIR}" )
+   message( STATUS "FFMPEG library dir: ${FFMPEG_LIBRARY_DIR}" )
+   message( STATUS "FFMPEG libraries: ${FFMPEG_LIBRARIES}" )
 ENDIF ( ${INC_SUCCESS} EQUAL ${LIST_SIZE_} )


change default directory name for opencv to opencv3 to allow parrallel installation of opencv2 and opencv3

--- cmake/UbiTrackFindCoreLibraries.cmake
+++ cmake/UbiTrackFindCoreLibraries.cmake
@@ -113,7 +113,7 @@

 #OpenCV
 IF(WIN32 AND DEFINED EXTERNAL_LIBRARIES_DIR)
-	set(OPENCV_ROOT_DIR "${EXTERNAL_LIBRARIES_DIR}/opencv")
+	set(OPENCV_ROOT_DIR "${EXTERNAL_LIBRARIES_DIR}/opencv3")
 ENDIF(WIN32 AND DEFINED EXTERNAL_LIBRARIES_DIR)

 SET(OpenCV_CUDA OFF)


Update AddSwiftUnittests.cmake

Update AddSwiftUnittests.cmake

--- cmake/modules/AddSwiftUnittests.cmake
+++ cmake/modules/AddSwiftUnittests.cmake
@@ -50,8 +50,6 @@
   elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
     set_property(TARGET "${test_dirname}" APPEND PROPERTY COMPILE_FLAGS
       " -march=core2")
-    set_property(TARGET "${test_dirname}" APPEND PROPERTY LINK_FLAGS
-      " -march=core2")
   endif()

   find_program(LDLLD_PATH "ld.lld")


Don't use -ffunction-sections -fdata-sections on debug builds.

Unfortunately, on ELF there is not used attribute on the .o files,
so there is no easy way to keep the dump function alive.

If we are not gcing, we may as well produce non gcable files and
avoid the cost.

Linking a debug clang now takes 18.856225992 seconds, before it
took 21.206897447.

I will try avoiding --gc-sections -O3 on a followup patch.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -486,7 +486,8 @@
 # But MinSizeRel seems to add that automatically, so maybe disable these
 # flags instead if LLVM_NO_DEAD_STRIP is set.
 if(NOT CYGWIN AND NOT WIN32)
-  if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+  if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND
+     NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
     check_c_compiler_flag("-Werror -fno-function-sections" C_SUPPORTS_FNO_FUNCTION_SECTIONS)
     if (C_SUPPORTS_FNO_FUNCTION_SECTIONS)
       # Don't add -ffunction-section if it can be disabled with -fno-function-sections.


Add DEPENDS option to REFLEX_GENERATE_DICTIONARY()

This is equivalent to the EXTRA_DEPENDENCIES added in
ROOT_GENERATE_DICTIONARY(), but has been named DEPENDS
to follow the style of CMake's own commands.

Fixes: ROOT-7549

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -121,7 +121,7 @@
 #---REFLEX_GENERATE_DICTIONARY( dictionary headerfiles SELECTION selectionfile OPTIONS opt1 opt2 ...)
 #---------------------------------------------------------------------------------------------------
 macro(REFLEX_GENERATE_DICTIONARY dictionary)
-  CMAKE_PARSE_ARGUMENTS(ARG "" "SELECTION" "OPTIONS" ${ARGN})
+  CMAKE_PARSE_ARGUMENTS(ARG "" "SELECTION" "OPTIONS;DEPENDS" ${ARGN})
   #---Get List of header files---------------
   set(headerfiles)
   foreach(fp ${ARG_UNPARSED_ARGUMENTS})
@@ -177,7 +177,7 @@
     COMMAND ${ROOT_genreflex_CMD}
     ARGS ${headerfiles} -o ${gensrcdict} ${rootmapopts} --select=${selectionfile}
          --gccxmlpath=${GCCXML_home}/bin ${ARG_OPTIONS} ${include_dirs} ${definitions}
-    DEPENDS ${headerfiles} ${selectionfile})
+    DEPENDS ${headerfiles} ${selectionfile} ${ARG_DEPENDS})

   #---roottest compability---------------------------------
   if(CMAKE_ROOTTEST_DICT)