i#1418: Remove unnecessary CMP0020 policy (#3266)

CMP0020 is not needed for cmake > 2.8.11, neither are we importing Qt5Core.

Fixes #1418

--- make/policies.cmake
+++ make/policies.cmake
@@ -44,8 +44,5 @@
 # XXX DrMem-i#1481: update to cmake 2.8.12's better handling of interface imports
 cmake_policy(SET CMP0022 OLD)

-# XXX i#1418: update to cmake 2.8.12's better handling of interface imports, for Qt/Win
-cmake_policy(SET CMP0020 OLD)
-
 # Recognize literals in if statements
 cmake_policy(SET CMP0012 NEW)


fix eigen capitalization, so depending packages compile

--- catkin.cmake
+++ catkin.cmake
@@ -10,7 +10,7 @@
 catkin_package(
     INCLUDE_DIRS include/
     LIBRARIES ${PROJECT_NAME}
-    DEPENDS Boost eigen OMPL OpenRAVE
+    DEPENDS Boost Eigen OMPL OpenRAVE
 )

 include_directories(


Disable optimizations on ppc_macos_10.4.

With optimizations enabled, the compile crashes when building
condor_submit.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -82,7 +82,13 @@
 	if (_DEBUG)
 	  set( CMAKE_BUILD_TYPE Debug )
 	else()
-	  set( CMAKE_BUILD_TYPE RelWithDebInfo ) # = -O2 -g (package will strip the info)
+	  # Using -O2 crashes the compiler on ppc mac os x when compiling
+	  # condor_submit
+	  if ( ${OS_NAME} STREQUAL "DARWIN" AND ${SYS_ARCH} STREQUAL "POWERPC" )
+	    set( CMAKE_BUILD_TYPE RelWithDebInfo ) # = -g (package will strip the info)
+	  else()
+	    set( CMAKE_BUILD_TYPE RelWithDebInfo ) # = -O2 -g (package will strip the info)
+	  endif()
 	endif()

 	set( CMAKE_SUPPRESS_REGENERATION FALSE )


[cmake] Remove duplicate unncessary work.

Even before my changes, we had been setting this value twice. = /.

rdar://26154980

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -105,8 +105,6 @@
     get_filename_component(CLANG_MAIN_SRC_DIR ${${product}_PATH_TO_CLANG_SOURCE}
       ABSOLUTE)
   endif()
-
-  list(APPEND CMAKE_MODULE_PATH "${${product}_PATH_TO_LLVM_BUILD}/share/llvm/cmake")

   if(${is_cross_compiling})
     find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" "${${product}_NATIVE_LLVM_TOOLS_PATH}"


build: separate positive and negative warning flags

Signed-off-by: Daniel A. Steffen <bc823475b60dbcbd7be1bbdfe095b5f1939d5bd2@apple.com>

--- cmake/modules/DispatchCompilerWarnings.cmake
+++ cmake/modules/DispatchCompilerWarnings.cmake
@@ -8,8 +8,6 @@
     add_compile_options(-Werror)
     add_compile_options(-Wall)
     add_compile_options(-Wextra)
-    add_compile_options(-Wno-unknown-warning-option)
-    add_compile_options(-Wno-trigraphs)
     add_compile_options(-Wmissing-field-initializers)
     add_compile_options(-Wmissing-prototypes)
     add_compile_options(-Wdocumentation)
@@ -26,7 +24,6 @@
     add_compile_options(-Wuninitialized)
     add_compile_options(-Wunknown-pragmas)
     add_compile_options(-Wshadow)
-    add_compile_options(-Wno-four-char-constants)
     add_compile_options(-Wconversion)
     add_compile_options(-Wconstant-conversion)
     add_compile_options(-Wint-conversion)
@@ -66,6 +63,10 @@
     add_compile_options(-Wtautological-compare)
     add_compile_options(-Wunguarded-availability)
     add_compile_options(-Wunused)
+
+    add_compile_options(-Wno-unknown-warning-option)
+    add_compile_options(-Wno-trigraphs)
+    add_compile_options(-Wno-four-char-constants)
     add_compile_options(-Wno-disabled-macro-expansion)
     add_compile_options(-Wno-pedantic)
     add_compile_options(-Wno-bad-function-cast)


changed path to cmake config file and corrected CMAKE_CXX_COMPILER_ID in order to work on os x

--- cmake/CompilerOptions.cmake
+++ cmake/CompilerOptions.cmake
@@ -15,8 +15,8 @@
 		include(cmake/platforms/Darwin.cmake)
 	endif()

-	if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-		include(cmake/platforms/Darwing-clang.cmake)
+	if(${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
+		include(cmake/platforms/Darwin64-clang/config.cmake)
 	endif()
 endif()


Fix TestBigEndian configure error

Fix TestBigEndian configure error

It turns out that when MacPort (and possibly HomeBrew) are installed
on a MacOSX system, the "intl" library
is first found in a non standard location:

  HAVE_LIBINTL:FILEPATH=/opt/local/lib/libintl.dylib

Compared to, for example, libraries "m" and "util" which are found
in "/usr/lib":

  HAVE_LIBM:FILEPATH=/usr/lib/libm.dylib
  HAVE_LIBUTIL:FILEPATH=/usr/lib/libutil.dylib

Since CMAKE_REQUIRED_LIBRARIES variable used for the different configure
tests was updated with the name of the library instead of the full path
to the library, the first compile test was failing complaining that
it couldn't be linked against the "intl" library:

"/Applications/CMake 2.8-10.app/Contents/bin/cmake" -E cmake_link_script CMakeFiles/cmTryCompileExec1536614598.dir/link.txt --verbose=1
/usr/bin/cc      -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTryCompileExec1536614598.dir/CMAKE_SIZEOF_UNSIGNED_LONG.c.o  -o cmTryCompileExec1536614598  -lm -lintl -lutil
ld: library not found for -lintl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTryCompileExec1536614598] Error 1
make: *** [cmTryCompileExec1536614598/fast] Error 2

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -385,8 +385,8 @@
 set(CMAKE_EXTRA_INCLUDE_FILES stdio.h)

 add_cond(CMAKE_REQUIRED_LIBRARIES HAVE_LIBM m)
-add_cond(CMAKE_REQUIRED_LIBRARIES HAVE_LIBINTL intl)
 add_cond(CMAKE_REQUIRED_LIBRARIES HAVE_LIBUTIL util)
+add_cond(CMAKE_REQUIRED_LIBRARIES HAVE_LIBINTL ${HAVE_LIBINTL})
 add_cond(CMAKE_EXTRA_INCLUDE_FILES HAVE_WCHAR_H wchar.h)

 TEST_BIG_ENDIAN(WORDS_BIGENDIAN)


- Fix assimp Find script

- Fix assimp Find script

--- cmake/Find/Findassimp.cmake
+++ cmake/Find/Findassimp.cmake
@@ -82,7 +82,7 @@
             )
     endif()

-    if(DEFINED ZLIBSTATIC_LIBRARY_TMP)
+    if(ZLIBSTATIC_LIBRARY_TMP)
         set ( ASSIMP_LIBRARIES_TMP
             "${ASSIMP_LIBRARIES_TMP};${ZLIBSTATIC_LIBRARY_TMP}" )
         add_library ( ZLibStatic STATIC IMPORTED )
@@ -92,7 +92,7 @@
            )
     endif()

-    if(DEFINED IRRXML_LIBRARIES_TMP AND DEFINED ZLIBSTATIC_LIBRARY_TMP)
+    if(IRRXML_LIBRARIES_TMP AND ZLIBSTATIC_LIBRARY_TMP)
         set_target_properties ( Assimp PROPERTIES
             INTERFACE_LINK_LIBRARIES "IrrXML;ZLibStatic"
             )


Fix to CMake typo causing warning

Fix to CMake typo causing warning

--- cmake/Modules/Testing.cmake
+++ cmake/Modules/Testing.cmake
@@ -29,7 +29,7 @@
 add_option(USE_LOCAL_FOR_CTEST "Use the local source tree for CTest/CDash" OFF)
 if(USE_LOCAL_FOR_CTEST)
     set(CMAKE_LOCAL_DIRECTORY "${CMAKE_SOURCE_DIR}")
-endif(USE_LOCAL_FOR_TEST)
+endif(USE_LOCAL_FOR_CTEST)

 GET_TEMPORARY_DIRECTORY(CMAKE_DASHBOARD_ROOT "${CMAKE_PROJECT_NAME}-cdash")


fixed lintian warnings

fixed lintian warnings

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -266,6 +266,11 @@
 set(LIBS_LINTIAN_OVERRIDES "binary-or-shlib-defines-rpath" # usr/lib/libopencv_core.so.2.4.12
                            "package-name-doesnt-match-sonames") # libopencv-calib3d2.4 libopencv-contrib2.4

+if(AARCH64 AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
+   # GCC 4.8 has a bug which sometimes causes it to produce non-PIC aarch64 code.
+   list(APPEND LIBS_LINTIAN_OVERRIDES "shlib-with-non-pic-code")
+endif()
+
 if(HAVE_opencv_python)
     set(PYTHON_LINTIAN_OVERRIDES "binary-or-shlib-defines-rpath" # usr/lib/python2.7/dist-packages/cv2.so
                                  "missing-dependency-on-numpy-abi")


[cmake] move SONAME handling to llvm_add_library

Summary:
Move handling of the SONAME option from add_llvm_library
to llvm_add_library, so that it can be used in sub-projects.
In particular, this makes it possible to have consistently
named shared libraries for LLVM, Clang and LLDB.

Also, base the SONAME and symlinks on the output name
by extracting the OUTPUT_NAME property, rather than assuming
it is the same as the target name.

Reviewers: beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14539

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -448,6 +448,24 @@
     endif()
   endif()

+  if(ARG_SHARED AND UNIX)
+    if(NOT APPLE AND ARG_SONAME)
+      get_target_property(output_name ${name} OUTPUT_NAME)
+      if(${output_name} STREQUAL "output_name-NOTFOUND")
+        set(output_name ${name})
+      endif()
+      set(library_name ${output_name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX})
+      set(api_name ${output_name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
+      set_target_properties(${name} PROPERTIES OUTPUT_NAME ${library_name})
+      llvm_install_library_symlink(${api_name} ${library_name} SHARED
+        COMPONENT ${name}
+        ALWAYS_GENERATE)
+      llvm_install_library_symlink(${output_name} ${library_name} SHARED
+        COMPONENT ${name}
+        ALWAYS_GENERATE)
+    endif()
+  endif()
+
   # Add the explicit dependency information for this library.
   #
   # It would be nice to verify that we have the dependencies for this library
@@ -498,7 +516,7 @@

 macro(add_llvm_library name)
   cmake_parse_arguments(ARG
-    "SHARED;SONAME"
+    "SHARED"
     ""
     ""
     ${ARGN})
@@ -540,19 +558,6 @@
                           COMMAND "${CMAKE_COMMAND}"
                                   -DCMAKE_INSTALL_COMPONENT=${name}
                                   -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
-      endif()
-      if(ARG_SHARED AND UNIX)
-        if(NOT APPLE AND ARG_SONAME)
-          set(library_name ${name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX})
-          set(api_name ${name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
-          set_target_properties(${name} PROPERTIES OUTPUT_NAME ${library_name})
-          llvm_install_library_symlink(${api_name} ${library_name} SHARED
-            COMPONENT ${name}
-            ALWAYS_GENERATE)
-          llvm_install_library_symlink(${name} ${library_name} SHARED
-            COMPONENT ${name}
-            ALWAYS_GENERATE)
-        endif()
       endif()
     endif()
     set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})


update re2c to 1.3

update re2c to 1.3

--- cmake/modules/GetRE2C.cmake
+++ cmake/modules/GetRE2C.cmake
@@ -11,7 +11,7 @@
     download_project(
             PROJ                re2c
             GIT_REPOSITORY      https://github.com/skvadrik/re2c.git
-            GIT_TAG             1.2.1
+            GIT_TAG             1.3
             GIT_PROGRESS        1
     )


Stylistic changes including replacing some MATCHES logic that can be done
a simpler way.

svn path=/trunk/; revision=7100

--- cmake/modules/fortran.cmake
+++ cmake/modules/fortran.cmake
@@ -22,43 +22,39 @@
 # Module for determining F77/F95 bindings configuration options

 # Options to enable Fortran bindings
-OPTION(ENABLE_f77 "Enable f77 bindings" ON)
-OPTION(ENABLE_f95 "Enable f95 bindings" ON)
+option(ENABLE_f77 "Enable f77 bindings" ON)
+option(ENABLE_f95 "Enable f95 bindings" ON)

-IF (ENABLE_f77 OR ENABLE_f95)
+if(ENABLE_f77 OR ENABLE_f95)
+  # Check for fortran compiler
+  include(CMakeDetermineFortranCompiler)
+  if(NOT CMAKE_Fortran_COMPILER)
+    message(STATUS "WARNING: "
+    "fortran compiler not found. Disabling f77/f95 bindings"
+    )
+    set(ENABLE_f77 OFF CACHE BOOL "Enable f77 bindings" FORCE)
+    set(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE)
+  endif(NOT CMAKE_Fortran_COMPILER)
+endif (ENABLE_f77 OR ENABLE_f95)

-# Check for fortran compiler
-INCLUDE(CMakeDetermineFortranCompiler)
+if(ENABLE_f77 OR ENABLE_f95)
+  # Enable fortran language
+  enable_language(Fortran)

-IF (CMAKE_Fortran_COMPILER MATCHES "NOTFOUND$")
-  MESSAGE(STATUS "WARNING: "
-  "fortran compiler not found. Disabling f77/f95 bindings")
-  SET(ENABLE_f77 OFF CACHE BOOL "Enable f77 bindings" FORCE)
-  SET(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE)
-ENDIF (CMAKE_Fortran_COMPILER MATCHES "NOTFOUND$")
+  # Don't compile Fortran 95 binding if compiler doesn't support it
+  if(ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+    message(STATUS "WARNING: "
+    "fortran compiler does not support f90/95. Disabling f95 bindings"
+    )
+    set(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE)
+  endif(ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)

-ENDIF (ENABLE_f77 OR ENABLE_f95)
+  # Set installation location for f95 modules.
+  set(F95_MOD_INSTALL_DIR lib/fortran/modules/${PACKAGE})
+  set(F95_MOD_DIR ${CMAKE_INSTALL_PREFIX}/${F95_MOD_INSTALL_DIR})

-IF (ENABLE_f77 OR ENABLE_f95)
-
-# Enable fortran language
-ENABLE_LANGUAGE(Fortran)
-
-# Don't compile Fortran 95 binding if compiler doesn't support it
-IF (ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)
-  MESSAGE(STATUS "WARNING: "
-  "fortran compiler does not support f90/95. Disabling f95 bindings")
-  SET(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE)
-ENDIF (ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)
-
-# Set installation location for f95 modules.
-set(F95_MOD_INSTALL_DIR lib/fortran/modules/${PACKAGE})
-set(F95_MOD_DIR ${CMAKE_INSTALL_PREFIX}/${F95_MOD_INSTALL_DIR})
-
-# Check if f77 command line parsing is possible
-IF (ENABLE_f77)
-INCLUDE(TestF77CmdLine)
-ENDIF (ENABLE_f77)
-
-ENDIF (ENABLE_f77 OR ENABLE_f95)
-
+  # Check if f77 command line parsing is possible
+  if(ENABLE_f77)
+    include(TestF77CmdLine)
+  endif(ENABLE_f77)
+endif(ENABLE_f77 OR ENABLE_f95)


Remove duplicate reference to hwy library

This will simplify target dependencies

--- lib/jxl.cmake
+++ lib/jxl.cmake
@@ -468,7 +468,7 @@
   $<TARGET_OBJECTS:jxl_dec-obj>
 )
 target_link_libraries(jxl_dec-static
-  PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_DEC_INTERNAL_LIBS} hwy)
+  PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_DEC_INTERNAL_LIBS})
 target_include_directories(jxl_dec-static PUBLIC
   "${PROJECT_SOURCE_DIR}"
   "${CMAKE_CURRENT_SOURCE_DIR}/include"
@@ -489,7 +489,7 @@
 # to do, remove $<TARGET_OBJECTS:jxl_dec-obj> here and depend on jxl_dec-static
 add_library(jxl-static STATIC ${JPEGXL_INTERNAL_OBJECTS})
 target_link_libraries(jxl-static
-  PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_INTERNAL_LIBS} hwy)
+  PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_INTERNAL_LIBS})
 target_include_directories(jxl-static PUBLIC
   "${PROJECT_SOURCE_DIR}"
   "${CMAKE_CURRENT_SOURCE_DIR}/include"


More work.

More work.

--- mod_cmake/ModularDeps.cmake
+++ mod_cmake/ModularDeps.cmake
@@ -40,7 +40,7 @@
   add_subdirectory("${PROJECT_SOURCE_DIR}/deps/${DEP_NAME}")

   # Mark the dependency as satisfied.
-  set(${DEP_NAME}_DEP_SATISFIED YES CACHE)
+  set(${DEP_NAME}_DEP_SATISFIED YES CACHE INTERNAL "${DEP_NAME} dependency.")
   mark_as_advanced(${DEP_NAME}_DEP_SATISFIED)
 endfunction()


BUG: Update SplitComponents remote module

This fixes a missing EXCLUDE_FROM_DEFAULT parameter in the module config.

Change-Id: Ic28cf0a476efb6d4626f1db13cbb86007613f518

--- Modules/Remote/SplitComponents.remote.cmake
+++ Modules/Remote/SplitComponents.remote.cmake
@@ -5,5 +5,5 @@
 itk::Image of, for example, itk::Vector, itk::CovariantVector, or
 itk::SymmetricSecondRankTensor. http://hdl.handle.net/10380/3230"
   GIT_REPOSITORY https://github.com/thewtex/ITKSplitComponents/
-  GIT_TAG 91d9a5035001a31a5d0c6f76684338648cce8446
+  GIT_TAG 7bede8f7efa83b2e3199fa651462ff657388ae23
   )


[Fuchsia] Include libClang and clang-include-fixer in the toolchain

libClang is used by other Clang based tools such as cquery while
clang-include-fixer is generally a useful tool.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@325665 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -79,10 +79,12 @@

 set(LLVM_DISTRIBUTION_COMPONENTS
   clang
+  libclang
   lld
   LTO
   clang-format
   clang-headers
+  clang-include-fixer
   clang-refactor
   clang-tidy
   clangd


Adds the Requires field to the .pc confile file

It has been unnoticed because other packages already required it.

--- cmake/create_pkgconfig_file.cmake
+++ cmake/create_pkgconfig_file.cmake
@@ -17,6 +17,7 @@
             "Name: ${name}\n"
             "Description: ${desc}\n"
             "Version: ${SYSSTAT_VERSION}\n"
+            "Requires: Qt5Core\n"
             "Libs: -L\${libdir} -l${name}\n"
             "Cflags: -I\${includedir}\n"
             "\n"


Fix error for entry point

Fix error for entry point

--- cmake/modules/Build-sqlite3.cmake
+++ cmake/modules/Build-sqlite3.cmake
@@ -27,7 +27,7 @@
       URL https://sqlite.org/2019/sqlite-amalgamation-3270200.zip
       URL_HASH SHA1=0bafa4f52c19b8a917ad31048d22787d2e25be68
       CONFIGURE_COMMAND ""
-      BUILD_COMMAND cl sqlite3.c -link -out:sqlite3.lib
+      BUILD_COMMAND cl sqlite3.c -link -dll -out:sqlite3.lib
       BUILD_IN_SOURCE true
       BUILD_BYPRODUCTS ${_byproducts}
       INSTALL_COMMAND ""


Revert "Respect value of BUILD_SHARED_LIBS in ROOT_LINKER_LIBRARY"

This reverts commit 2c1c8a143567a7841cf5ea808c8e153547789b36.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -602,7 +602,7 @@
 function(ROOT_LINKER_LIBRARY library)
   CMAKE_PARSE_ARGUMENTS(ARG "DLLEXPORT;CMAKENOEXPORT;TEST;NOINSTALL" "TYPE" "LIBRARIES;DEPENDENCIES;BUILTINS"  ${ARGN})
   ROOT_GET_SOURCES(lib_srcs src ${ARG_UNPARSED_ARGUMENTS})
-  if(NOT ARG_TYPE AND BUILD_SHARED_LIBS)
+  if(NOT ARG_TYPE)
     set(ARG_TYPE SHARED)
   endif()
   if(ARG_TEST) # we are building a test, so add EXCLUDE_FROM_ALL


Add BUILD_TESTING=OFF to libuv

Add BUILD_TESTING=OFF to libuv

--- cmake/projects/libuv/hunter.cmake
+++ cmake/projects/libuv/hunter.cmake
@@ -2,6 +2,7 @@

 include(hunter_add_version)
 include(hunter_cacheable)
+include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)
 include(hunter_report_broken_package)
@@ -52,5 +53,7 @@

 hunter_pick_scheme(DEFAULT url_sha1_cmake)

+hunter_cmake_args(libuv CMAKE_ARGS BUILD_TESTING=OFF)
+
 hunter_cacheable(libuv)
 hunter_download(PACKAGE_NAME libuv)


xcc: do not make assumptions about toolchain path

the toolchain path can either be part of a full SDK install or
standalone, support both modes.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/toolchain/xcc/generic.cmake
+++ cmake/toolchain/xcc/generic.cmake
@@ -8,7 +8,7 @@
   message(FATAL_ERROR "Nothing found at XTENSA_TOOLCHAIN_PATH: '${XTENSA_TOOLCHAIN_PATH}'")
 endif()

-set(TOOLCHAIN_HOME ${XTENSA_TOOLCHAIN_PATH}/XtDevTools/install/tools/$ENV{TOOLCHAIN_VER}/XtensaTools)
+set(TOOLCHAIN_HOME ${XTENSA_TOOLCHAIN_PATH}/$ENV{TOOLCHAIN_VER}/XtensaTools)

 set(COMPILER xcc)
 set(LINKER ld)


Extend DEB package build dependency of libnova

Most current and upcoming DEB package based distributions
such as Ubuntu and Debian ship libnova in version 16.
Extend the package build dependency to encompass also libnova-0.16-0.

--- cmake_modules/PHD2Packaging.cmake
+++ cmake_modules/PHD2Packaging.cmake
@@ -98,7 +98,7 @@
   # set version and arch compatible file name
   set(CPACK_PACKAGE_FILE_NAME "phd2_${CPACK_DEBIAN_PACKAGE_VERSION}_${debarch}")
   # Ubuntu 14.04 compatible minimal dependency
-  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), indi-bin (>= 0.9.7), libnova-0.14-0, libstdc++6 (>= 4.2.1), libusb-1.0-0 (>= 2:1.0.8), libwxbase3.0-0 (>= 3.0.0), libwxgtk3.0-0 (>=3.0.0), libx11-6, zlib1g (>= 1:1.1.4)")
+  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), indi-bin (>= 0.9.7), libnova-0.14-0 | libnova-0.16-0, libstdc++6 (>= 4.2.1), libusb-1.0-0 (>= 2:1.0.8), libwxbase3.0-0 (>= 3.0.0), libwxgtk3.0-0 (>=3.0.0), libx11-6, zlib1g (>= 1:1.1.4)")
   set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "PHD2 auto-guiding software")
   # same section as many astronomy packages
   set(CPACK_DEBIAN_PACKAGE_SECTION "education")


flags/fpic: prepare for Android

flags/fpic: prepare for Android

--- flags/fpic.cmake
+++ flags/fpic.cmake
@@ -9,5 +9,13 @@

 include(polly_add_cache_flag)

-polly_add_cache_flag(CMAKE_CXX_FLAGS "-fPIC")
-polly_add_cache_flag(CMAKE_C_FLAGS "-fPIC")
+string(COMPARE EQUAL "${ANDROID_NDK_VERSION}" "" _not_android)
+
+# TODO: test other platfroms, CMAKE_CXX_FLAGS_INIT should work for all
+if(_not_android)
+  polly_add_cache_flag(CMAKE_CXX_FLAGS "-fPIC")
+  polly_add_cache_flag(CMAKE_C_FLAGS "-fPIC")
+else()
+  polly_add_cache_flag(CMAKE_CXX_FLAGS_INIT "-fPIC")
+  polly_add_cache_flag(CMAKE_C_FLAGS_INIT "-fPIC")
+endif()


Fix handling of macro argument (#220)

Fix handling of macro argument (#220)

Macro invocations handle arguments differently than functions https://cmake.org/cmake/help/latest/command/macro.html#macro-vs-function
This can cause a false positive like:
```
-- Found rcutils: 0.8.4 (/opt/ros/master/install/share/rcutils/cmake)
CMake Error at install/share/ament_cmake_version/cmake/ament_export_development_version_if_higher_than_manifest.cmake:36 (message):
  ament_export_development_version_if_higher_than_manifest() called with
  unused arguments:
Call Stack (most recent call first):
  src/ros2/rmw/rmw/CMakeLists.txt:66 (ament_export_development_version_if_higher_than_manifest)
```

Signed-off-by: Dan Rose <2591e5f46f28d303f9dc027d475a5c60d8dea17a@digilabs.io>

--- ament_cmake_version/cmake/ament_export_development_version_if_higher_than_manifest.cmake
+++ ament_cmake_version/cmake/ament_export_development_version_if_higher_than_manifest.cmake
@@ -32,7 +32,7 @@
 # @public
 #
 macro(ament_export_development_version_if_higher_than_manifest development_version)
-  if(ARGN)
+  if(${ARGN})
     message(FATAL_ERROR
       "ament_export_development_version_if_higher_than_manifest() called with unused arguments: ${ARGN}")
   endif()


Only use USES_TERMINAL when cmake is of sufficient version

Change-Id: I060bdf75b82a82bad1868c85388d0f10ecf84dc3

--- CMake/sitkUseSWIG.cmake
+++ CMake/sitkUseSWIG.cmake
@@ -168,6 +168,9 @@
   IF(SWIG_MODULE_${name}_EXTRA_FLAGS)
     SET(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS})
   ENDIF(SWIG_MODULE_${name}_EXTRA_FLAGS)
+  if(NOT CMAKE_VERSION VERSION_LESS 3.2 )
+    set(USES_TERMINAL "USES_TERMINAL")
+  endif()
   ADD_CUSTOM_COMMAND(
     OUTPUT "${swig_generated_file_fullname}" ${swig_extra_generated_files}
     COMMAND "${SWIG_EXECUTABLE}"
@@ -181,7 +184,7 @@
     -o "${swig_generated_file_fullname}"
     "${swig_source_file_fullname}"
     MAIN_DEPENDENCY "${swig_source_file_fullname}"
-    USES_TERMINAL
+    ${USES_TERMINAL}
     DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
     COMMENT "Swig source to generate ${SWIG_MODULE_${name}_LANGUAGE} wrapping")
   SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}" ${swig_extra_generated_files}


Compile with -Wformat, needed for -Wformat-security

--- CMake/unix_config.cmake
+++ CMake/unix_config.cmake
@@ -3,7 +3,7 @@
 macro(os_set_flags)
     set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -fPIC -pedantic -g -D_BSD_SOURCE")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pedantic -g -Wno-missing-field-initializers")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-multichar -Wsequence-point -Wformat-security")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-multichar -Wsequence-point -Wformat -Wformat-security")

     execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE MACHINE)
     if(${MACHINE} MATCHES "arm-linux-gnueabihf")


Update CMakeInstallation.cmake

Update CMakeInstallation.cmake

added missing paren

--- CMakeInstallation.cmake
+++ CMakeInstallation.cmake
@@ -58,7 +58,7 @@
   SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
   SET(CPACK_NSIS_MENU_LINKS
 	"https://www.unidata.ucar.edu/software/netcdf" "Unidata Website"
-	"https://docs.unidata.ucar.edu/netcdf-c" "NetCDF Stable Documentation"
+	"https://docs.unidata.ucar.edu/netcdf-c" "NetCDF Stable Documentation")

 ENDIF()


Bugfix for #177

Bugfix for #177

--- CommonApplication.cmake
+++ CommonApplication.cmake
@@ -30,7 +30,7 @@
     list(APPEND SOURCES ${MOC_SOURCES})
   endif()
   if(${NAME}_UI_FORMS)
-    qt4_wrap_ui(UI_SOURCES ${${NAME}_FORMS})
+    qt4_wrap_ui(UI_SOURCES ${${NAME}_UI_FORMS})
     list(APPEND SOURCES ${UI_SOURCES})
     include_directories(${CMAKE_CURRENT_BINARY_DIR})
   endif()


added it to Examples.cmake too;

added it to Examples.cmake too;

--- Examples/Examples.cmake
+++ Examples/Examples.cmake
@@ -185,7 +185,33 @@
 				  set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_py)
 				  set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfp)
 			endif()
-			set(EX_TARGET_NAMES ${EX_TARGET_NAMES} pyMTF)
+			set(EX_TARGET_NAMES ${EX_TARGET_NAMES} pyMTF)
+
+			add_library(pyMTF2 MODULE Examples/cpp/pyMTF2.cc)
+			set_target_properties(pyMTF2 PROPERTIES PREFIX "")
+			if(WIN32)
+				set_target_properties(pyMTF2 PROPERTIES SUFFIX ".pyd")
+			endif()
+			target_compile_definitions(pyMTF2 PUBLIC ${MTF_DEFINITIONS})
+			target_compile_options(pyMTF2 PUBLIC ${MTF_RUNTIME_FLAGS} ${MTF_COMPILETIME_FLAGS})
+			target_include_directories(pyMTF2 PUBLIC ${MTF_INCLUDE_DIRS} ${MTF_EXT_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${PYTHON_NUMPY_INCLUDE_DIR})
+			message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}")
+			message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}")
+			target_link_libraries(pyMTF2 mtf ${MTF_LIBS} ${PYTHON_LIBRARIES} ${PYTHON_LIBS})
+			install(TARGETS pyMTF2 LIBRARY DESTINATION ${MTF_PY_INSTALL_DIR} COMPONENT pyMTF)
+			add_custom_target(py DEPENDS pyMTF2)
+			if(NOT WIN32)
+				add_custom_target(install_py2
+				  ${CMAKE_COMMAND}
+				  -D "CMAKE_INSTALL_COMPONENT=py2"
+				  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+				   DEPENDS pyMTF2
+				  )
+				  add_custom_target(mtfp2 DEPENDS pyMTF2 install_py2)
+				  set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_py2)
+				  set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfp2)
+			endif()
+			set(EX_TARGET_NAMES ${EX_TARGET_NAMES} pyMTF2)
 		# else()
 			# message(STATUS "Incompatible version of Python library found so pyMTF is disabled: " ${PYTHONLIBS_VERSION_STRING})
 		# endif()


From Nico Kruithof, "This patch makes sure that FindOSG.cmake finds OSG when it is compiled as a 64 bit library, as the libraries are installed in the lib64 directory and not lib"

--- CMakeModules/FindOSG.cmake
+++ CMakeModules/FindOSG.cmake
@@ -27,13 +27,19 @@
         NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
         PATHS
         ${OSG_DIR}/lib/Debug
+        ${OSG_DIR}/lib64/Debug
         ${OSG_DIR}/lib
+        ${OSG_DIR}/lib64
         $ENV{OSG_DIR}/lib/debug
+        $ENV{OSG_DIR}/lib64/debug
         $ENV{OSG_DIR}/lib
+        $ENV{OSG_DIR}/lib64
         $ENV{OSG_DIR}
         $ENV{OSGDIR}/lib
+        $ENV{OSGDIR}/lib64
         $ENV{OSGDIR}
         $ENV{OSG_ROOT}/lib
+        $ENV{OSG_ROOT}/lib64
         NO_DEFAULT_PATH
     )

@@ -58,13 +64,19 @@
         NAMES ${MYLIBRARYNAME}
         PATHS
         ${OSG_DIR}/lib/Release
+        ${OSG_DIR}/lib64/Release
         ${OSG_DIR}/lib
+        ${OSG_DIR}/lib64
         $ENV{OSG_DIR}/lib/Release
+        $ENV{OSG_DIR}/lib64/Release
         $ENV{OSG_DIR}/lib
+        $ENV{OSG_DIR}/lib64
         $ENV{OSG_DIR}
         $ENV{OSGDIR}/lib
+        $ENV{OSGDIR}/lib64
         $ENV{OSGDIR}
         $ENV{OSG_ROOT}/lib
+        $ENV{OSG_ROOT}/lib64
         NO_DEFAULT_PATH
     )


[C++] Do not include test files in coverage report

--- cpp/CMake/code-coverage/CodeCoverage.cmake
+++ cpp/CMake/code-coverage/CodeCoverage.cmake
@@ -62,7 +62,7 @@

 		# Capturing lcov counters and generating report
 		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'libs/*' 'tests/*' '/usr/*' 'ThirdParty/*' --output-file ${_outputname}.info.cleaned
+		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'libs/*' '${CMAKE_SOURCE_DIR}/tests/*' '/usr/*' 'ThirdParty/*' --output-file ${_outputname}.info.cleaned
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
 		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned


ENH: ossim can now depend on openthread

ENH: ossim can now depend on openthread

--- CMake/External_ossim.cmake
+++ CMake/External_ossim.cmake
@@ -61,6 +61,16 @@
     list(APPEND ${proj}_DEPENDENCIES JPEG)
   endif()

+  if(USE_SYSTEM_OPENTHREAD)
+    set(OSSIM_SB_OPENTHREAD_CONFIG)
+  else()
+    set(OSSIM_SB_OPENTHREAD_CONFIG
+      -DOPENTHREADS_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
+      -DOPENTHREADS_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libOpenThreads.so
+      )
+    list(APPEND ${proj}_DEPENDENCIES OPENTHREAD)
+  endif()
+
   ExternalProject_Add(${proj}
     PREFIX ${proj}
     URL "http://download.osgeo.org/ossim/source/latest/ossim-1.8.18-1.tar.gz"
@@ -80,6 +90,7 @@
       ${OSSIM_SB_GEOTIFF_CONFIG}
       ${OSSIM_SB_GEOS_CONFIG}
       ${OSSIM_SB_JPEG_CONFIG}
+      ${OSSIM_SB_OPENTHREAD_CONFIG}
       -DBUILD_OSSIMPREDATOR:BOOL=OFF
       -DBUILD_OSSIMPLANET:BOOL=OFF
       -DBUILD_OSSIMPLANETQT:BOOL=OFF


CMake: add new components to feature summary and sort it [ci skip]


On tente ça sans conviction

On tente ça sans conviction

--- CMake/Modules/common.cmake
+++ CMake/Modules/common.cmake
@@ -6,6 +6,12 @@
     endif ()
 endmacro ()

+
+if (MINGW AND CMAKE_CROSSCOMPILING)
+    message ("Oh Oh MINGW AND CMAKE_CROSSCOMPILING")
+    set (MINGW_PREFIX "" CACHE STRING "Prefix path to MinGW cross-compiler tools (MinGW cross-compiling build only)")
+    set (MINGW_SYSROOT "" CACHE PATH "Path to MinGW system root (MinGW cross-compiling build only)")
+endif ()

 if (LINUX)
     message("Add TIME_LINUX preprocessor definition")


fix pack deps in win and linux

fix pack deps in win and linux

--- packages/pack-template.cmake
+++ packages/pack-template.cmake
@@ -32,8 +32,8 @@

     # Package project

-    set(project_name "template")   # Name of package project
-    set(project_root "template")   # Name of root project that is to be installed
+    set(project_name ${META_PROJECT_NAME})   # Name of package project
+    set(project_root ${META_PROJECT_NAME})   # Name of root project that is to be installed

     # Package information
@@ -141,11 +141,7 @@

     # Install files

-    if(APPLE)
-        set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};/")
-    else()
-        set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};${project_root};ALL;/")
-    endif()
+    set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};${project_root};ALL;/")
     set(CPACK_PACKAGE_INSTALL_DIRECTORY     "${package_name}")
     set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY  "${package_name}")
     if(NOT WIN32)
@@ -183,5 +179,7 @@

 # Dependencies

-add_dependencies(pack-${project_name}   ${project_root} ALL_BUILD)
-add_dependencies(pack                   pack-${project_name})
+if(MSVC)
+    add_dependencies(pack-${project_name} ALL_BUILD)
+endif()
+add_dependencies(pack pack-${project_name})


ARROW-15905: [Python][C++] Fix CMake warning when building PyArrow

Use `find_package` to add `FindPkgConfig.cmake` instead of `include(FindPkgConfig)` to avoid warning being raised.

Before the change when building pyarrow I could see the following warning:
```shell
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (Arrow).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
  cmake_modules/FindArrow.cmake:39 (include)
  cmake_modules/FindArrowPython.cmake:47 (find_package)
  CMakeLists.txt:231 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
```
With the change the Warning disappears.

The rationale for the change comes from some investigation over the [find_package](https://cmake.org/cmake/help/latest/command/find_package.html?highlight=find_package) and [include](https://cmake.org/cmake/help/latest/command/include.html?highlight=include) documentation and this [stackoverflow thread](https://stackoverflow.com/a/29316084)

Closes #12840 from raulcd/ARROW-15905

Authored-by: Raúl Cumplido <59d4da135a4a8d271cfab38e4b71ac8d4bb78fb2@gmail.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/FindArrow.cmake
+++ cpp/cmake_modules/FindArrow.cmake
@@ -36,7 +36,7 @@
   return()
 endif()

-include(FindPkgConfig)
+find_package(PkgConfig)
 include(FindPackageHandleStandardArgs)

 if(WIN32 AND NOT MINGW)


SuperBuild: use build directory

SuperBuild: use build directory

--- SuperBuild/CMake/External_fftw.cmake
+++ SuperBuild/CMake/External_fftw.cmake
@@ -24,6 +24,8 @@

 set(FFTWF_SB_SRC ${CMAKE_BINARY_DIR}/FFTW/src/FFTWF)
 set(FFTWD_SB_SRC ${CMAKE_BINARY_DIR}/FFTW/src/FFTWD)
+set(FFTWF_SB_BUILD ${CMAKE_BINARY_DIR}/FFTW/build/FFTWF)
+set(FFTWD_SB_BUILD ${CMAKE_BINARY_DIR}/FFTW/build/FFTWD)

 # Compile the float version of FFTW
 ExternalProject_Add(FFTWF
@@ -31,7 +33,7 @@
   URL "http://www.fftw.org/fftw-3.3.8.tar.gz"
   URL_MD5 8aac833c943d8e90d51b697b27d4384d
   SOURCE_DIR ${FFTWF_SB_SRC}
-  BINARY_DIR ${FFTWF_SB_SRC}
+  BINARY_DIR ${FFTWF_SB_BUILD}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   CMAKE_CACHE_ARGS
@@ -57,7 +59,7 @@
   URL "http://www.fftw.org/fftw-3.3.8.tar.gz"
   URL_MD5 8aac833c943d8e90d51b697b27d4384d
   SOURCE_DIR ${FFTWD_SB_SRC}
-  BINARY_DIR ${FFTWD_SB_SRC}
+  BINARY_DIR ${FFTWD_SB_BUILD}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   CMAKE_CACHE_ARGS


disable: libkml, pgsql, jasper in GDAL build

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -34,8 +34,13 @@

   # PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
   # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
-
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL LIBKML_ROOT     --with-libkml)
+
+  list(APPEND GDAL_SB_CONFIG "--with-libkml=no")
+  if(OTB_USE_LIBKML)
+    #RK: disabled libkml. Here are in External_otb.cmake
+    #ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(LIBKML)
+    #ADD_SUPERBUILD_CONFIGURE_VAR(GDAL LIBKML_ROOT     --with-libkml)
+  endif()

   set(GDAL_PATCH_COMMAND)
   set(GDAL_CONFIGURE_COMMAND  "${SB_ENV_CONFIGURE_CMD};${GDAL_SB_SRC}/configure"
@@ -57,6 +62,7 @@
     --with-ingres=no
     --with-jp2mrsid=no
     --with-kakadu=no
+    --with-jasper=no
     --with-libgrass=no
     --with-mrsid=no
     --with-msg=no
@@ -77,6 +83,7 @@
     --with-spatialite=no
     --with-xerces=no
     --with-xml2=no
+    --with-pg=no
     ${GDAL_SB_CONFIG}
     ${GDAL_SB_EXTRA_OPTIONS}
     )
@@ -84,10 +91,6 @@
   #set(GDAL_INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install)

 else(MSVC)
-
-  ##remove libkml?
-  list(REMOVE_ITEM GDAL_DEPENDENCIES LIBKML)
-
   STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
   STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
   configure_file(${CMAKE_SOURCE_DIR}/patches/GDAL/nmake_gdal_extra.opt.in ${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt)


PKG: avoid dependency to libjson-c on Unix

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -102,6 +102,7 @@
     --with-webp=no
     --with-threads=yes
     --with-freexl=no
+    --with-libjson-c=no
     ${GDAL_SB_CONFIG}
     ${GDAL_SB_EXTRA_OPTIONS}
     )


Remove obsolete comment.

Remove obsolete comment.

--- external/Swig.cmake
+++ external/Swig.cmake
@@ -30,8 +30,6 @@
       ${PROJECT_SOURCE_DIR}/${PLATFORM}${BITNESS}${PLATFORM_SUFFIX}/bin/swig.exe)
   set(swig_dir ${PROJECT_SOURCE_DIR}/common/share/swig/3.0.2)
 else()
-  # TODO: Remove dependency on curl by using native CMake functionality for
-  # fetching pcre.
   ExternalProject_Add(
     Swig
     URL ${swig_download_url}


fix for intel

fix for intel

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@9025 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/AddCXXCompileOptions.cmake
+++ cmake/AddCXXCompileOptions.cmake
@@ -121,28 +121,22 @@
       set(_ext gnu++)
     endif()

-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
+    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.1)
       set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98")
       set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=${_ext}98")
       set(CMAKE_CXX_STANDARD_DEFAULT 98)
     endif()

-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0)
+    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2)
       set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++11")
       set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}11")
-      set(CMAKE_CXX_STANDARD_DEFAULT 11)
-    elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
-      set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++0x")
-      set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}0x")
-      set(CMAKE_CXX_STANDARD_DEFAULT 11)
-    endif()
-
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2)
       set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "${_std}=c++14")
       # todo: there is no gnu++14 value supported; figure out what to do
       set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "${_std}=c++14")
       set(CMAKE_CXX_STANDARD_DEFAULT 14)
     elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0)
+      set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++0x")
+      set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}0x")
       set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "${_std}=c++1y")
       # todo: there is no gnu++14 value supported; figure out what to do
       set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "${_std}=c++1y")


Codecoverage, add legend

Codecoverage, add legend

--- cmake/Modules/CodeCoverage.cmake
+++ cmake/Modules/CodeCoverage.cmake
@@ -160,7 +160,7 @@
         # Capturing lcov counters and generating report
         COMMAND ${LCOV_PATH} --directory ${CMAKE_SOURCE_DIR} --capture --output-file ${Coverage_NAME}.info
         COMMAND ${LCOV_PATH} --remove ${Coverage_NAME}.info ${COVERAGE_EXCLUDES} --output-file ${Coverage_NAME}.info.cleaned
-        COMMAND ${GENHTML_PATH} -o ${Coverage_NAME} ${Coverage_NAME}.info.cleaned
+        COMMAND ${GENHTML_PATH} -o ${Coverage_NAME} --legend ${Coverage_NAME}.info.cleaned
         COMMAND ${CMAKE_COMMAND} -E remove ${Coverage_NAME}.info ${Coverage_NAME}.info.cleaned

         WORKING_DIRECTORY ${PROJECT_BINARY_DIR}


Add Plugin: Improve name of argument `ENVIRONMENT`

--- cmake/Modules/LibAddPlugin.cmake
+++ cmake/Modules/LibAddPlugin.cmake
@@ -230,14 +230,15 @@
 # TEST_README:
 #  Add a Markdown Shell Recorder test for the ReadMe of the plugin
 #
-# ENVIRONMENT:
-#   Specifies environment variables for the Markdown Shell Recorder test
+# TEST_ENVIRONMENT:
+#   Specifies environment variables for the **Markdown Shell Recorder** test
 #
 function (add_plugin PLUGIN_SHORT_NAME)
 	cmake_parse_arguments (ARG
 		"CPP;ADD_TEST;TEST_README;INSTALL_TEST_DATA" # optional keywords
 		"INCLUDE_SYSTEM_DIRECTORIES" # one value keywords
-		"SOURCES;LINK_LIBRARIES;COMPILE_DEFINITIONS;INCLUDE_DIRECTORIES;LINK_ELEKTRA;DEPENDS;ENVIRONMENT" # multi value keywords
+		# multi value keywords
+		"SOURCES;LINK_LIBRARIES;COMPILE_DEFINITIONS;INCLUDE_DIRECTORIES;LINK_ELEKTRA;DEPENDS;TEST_ENVIRONMENT"
 		${ARGN}
 	)

@@ -253,7 +254,7 @@
 	restore_variable (${PLUGIN_NAME} ARG_LINK_ELEKTRA)
 	restore_variable (${PLUGIN_NAME} ARG_ADD_TEST)
 	restore_variable (${PLUGIN_NAME} ARG_TEST_README)
-	restore_variable (${PLUGIN_NAME} ARG_ENVIRONMENT)
+	restore_variable (${PLUGIN_NAME} ARG_TEST_ENVIRONMENT)
 	restore_variable (${PLUGIN_NAME} ARG_INSTALL_TEST_DATA)

 	if (ARG_UNPARSED_ARGUMENTS)
@@ -285,7 +286,7 @@
 		endif ()

 		if (ARG_TEST_README)
-			add_plugin_shell_test (${PLUGIN_SHORT_NAME} ENVIRONMENT ${ARG_ENVIRONMENT})
+			add_plugin_shell_test (${PLUGIN_SHORT_NAME} ENVIRONMENT ${ARG_TEST_ENVIRONMENT})
 		endif (ARG_TEST_README)

 		return ()


Clean up `UseDOImageProcessing.cmake`.

Clean up `UseDOImageProcessing.cmake`.

--- cmake/UseDOImageProcessing.cmake
+++ cmake/UseDOImageProcessing.cmake
@@ -1,90 +1,10 @@
-macro (do_set_imageprocessing_source_dir)
-  set(DO_ImageProcessing_SOURCE_DIR ${DO_SOURCE_DIR}/ImageProcessing)
-endmacro (do_set_imageprocessing_source_dir)
-
-macro (do_list_imageprocessing_source_files)
-  # Master header file
-  set(DO_ImageProcessing_MASTER_HEADER ${DO_SOURCE_DIR}/ImageProcessing.hpp)
-  # Header files
-  file(GLOB DO_ImageProcessing_HEADER_FILES
-       ${DO_ImageProcessing_SOURCE_DIR}/*.hpp)
-  # Source files
-  file(GLOB DO_ImageProcessing_SOURCE_FILES
-       ${DO_ImageProcessing_SOURCE_DIR}/*.cpp)
-  # All files here
-  set(DO_ImageProcessing_HEADER_FILES
-      ${DO_ImageProcessing_MASTER_HEADER}
-      ${DO_ImageProcessing_HEADER_FILES})
-
-  # Custom library project organization.
-  source_group("0. Master Header File" FILES
-               ${DO_ImageProcessing_MASTER_HEADER})
-  source_group("1. Linear Filtering" FILES
-               ${DO_ImageProcessing_SOURCE_DIR}/LinearFiltering.hpp)
-  source_group("2. Deriche IIR Filters" FILES
-               ${DO_ImageProcessing_SOURCE_DIR}/Deriche.hpp)
-  source_group("3. Differential Calculus, ..." FILES
-               ${DO_ImageProcessing_SOURCE_DIR}/Differential.hpp
-               ${DO_ImageProcessing_SOURCE_DIR}/Determinant.hpp
-               ${DO_ImageProcessing_SOURCE_DIR}/Norm.hpp
-               ${DO_ImageProcessing_SOURCE_DIR}/Orientation.hpp
-               ${DO_ImageProcessing_SOURCE_DIR}/SecondMomentMatrix.hpp)
-  source_group("4. Interpolation" FILES
-               ${DO_ImageProcessing_SOURCE_DIR}/Interpolation.hpp)
-  source_group("5. Reduce, Enlarge, Warp..." FILES
-               ${DO_ImageProcessing_SOURCE_DIR}/Scaling.hpp
-               ${DO_ImageProcessing_SOURCE_DIR}/Warp.hpp)
-  source_group("6. Gaussian Scale-Space" FILES
-               ${DO_ImageProcessing_SOURCE_DIR}/ImagePyramid.hpp
-               ${DO_ImageProcessing_SOURCE_DIR}/DoG.hpp
-               ${DO_ImageProcessing_SOURCE_DIR}/Extrema.hpp)
-endmacro (do_list_imageprocessing_source_files)
-
-macro (do_load_packages_for_imageprocessing_library)
-  include(${DO_Core_USE_FILE})
-  if (NOT APPLE)
-    find_package(OpenMP)
-    if (OPENMP_FOUND)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-    endif()
-  endif()
-endmacro (do_load_packages_for_imageprocessing_library)
-
-macro (do_create_variables_for_imageprocessing_library)
-  set(DO_ImageProcessing_LIBRARIES "")
-  set(DO_ImageProcessing_LINK_LIBRARIES ${DO_ImageProcessing_LIBRARIES})
-endmacro (do_create_variables_for_imageprocessing_library)
-
-
-do_load_packages_for_imageprocessing_library()
-
+include_directories(${Eigen3_DIR} ${DO_INCLUDE_DIR})

 if (DO_USE_FROM_SOURCE)
-  get_property(DO_ImageProcessing_ADDED
-               GLOBAL PROPERTY _DO_ImageProcessing_INCLUDED)
-  if (NOT DO_ImageProcessing_ADDED)
-    do_set_imageprocessing_source_dir()
-    do_list_imageprocessing_source_files()
-    do_create_variables_for_imageprocessing_library()
+  get_property(DO_ImageProcessing_ADDED GLOBAL PROPERTY _DO_ImageProcessing_INCLUDED)
+  if (NOT DO_Core_ADDED)
+    do_create_common_variables("ImageProcessing")
+    do_glob_directory(${DO_SOURCE_DIR}/ImageProcessing)
+    do_generate_library("ImageProcessing")
   endif ()
-
-  # Static library
-  do_append_library(
-    ImageProcessing STATIC
-    "${DO_SOURCE_DIR}"
-    "${DO_ImageProcessing_HEADER_FILES}"
-    "${DO_ImageProcessing_SOURCE_FILES}"
-    "${DO_ImageProcessing_LINK_LIBRARIES}"
-    )
-
-  # Shared library
-  if (DO_BUILD_SHARED_LIBS)
-    do_append_library(
-      ImageProcessing_SHARED SHARED
-      "${DO_SOURCE_DIR}"
-      "${DO_ImageProcessing_HEADER_FILES}"
-      "${DO_ImageProcessing_SOURCE_FILES}"
-      "${DO_ImageProcessing_LINK_LIBRARIES}"
-      )
-  endif ()
-endif ()
+endif ()


Make tests run serially and force max mpi procs to 16

--- scripts/circle/circle_el7-gcc7-openmpi.cmake
+++ scripts/circle/circle_el7-gcc7-openmpi.cmake
@@ -3,7 +3,7 @@
 set(CTEST_BUILD_CONFIGURATION Release)
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 set(CTEST_BUILD_FLAGS "-k -j4")
-set(CTEST_TEST_ARGS PARALLEL_LEVEL 4)
+set(CTEST_TEST_ARGS PARALLEL_LEVEL 1)

 set(dashboard_model Experimental)
 set(dashboard_binary_name "build_$ENV{CIRCLE_JOB}")
@@ -36,6 +36,8 @@
 ADIOS2_USE_ZeroMQ:STRING=ON
 ZFP_ROOT:PATH=/opt/zfp/install
 ADIOS1_ROOT:PATH=/opt/adios1/1.12.0/gnu7_openmpi
+
+MPIEXEC_MAX_NUMPROCS:STRING=16
 ")

 include(${CMAKE_CURRENT_LIST_DIR}/../dashboard/adios_common.cmake)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/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   18)
+SET(KWSYS_DATE_STAMP_DAY   19)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/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   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


Revised UseUninstall.cmake

Revised UseUninstall.cmake

--- Modules/UseUninstall.cmake
+++ Modules/UseUninstall.cmake
@@ -11,8 +11,8 @@
 	PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/Modules)

     IF("${_cmake_uninstall_in}" STREQUAL "_cmake_uninstall_in-NOTFOUND")
-	MESSAGE(FATAL_ERROR "Cannot find cmake_uninstall.cmake.in in ${CMAKE_SOURCE_DIR} "
-	    "${CMAKE_MODULE_PATH} ${CMAKE_INCLUDE_PATH}")
+	MESSAGE(FATAL_ERROR "Cannot find cmake_uninstall.cmake.in in ${CMAKE_ROOT}/Modules"
+	   " ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/Modules")
     ENDIF("${_cmake_uninstall_in}" STREQUAL "_cmake_uninstall_in-NOTFOUND")

     CONFIGURE_FILE("${_cmake_uninstall_in}"


updated library name in find cyclus

updated library name in find cyclus

--- cmake/FindCyclus.cmake
+++ cmake/FindCyclus.cmake
@@ -57,7 +57,7 @@
   PATH_SUFFIXES cyclus/lib lib)

 # Look for the library
-FIND_LIBRARY(CYCLUS_AGENT_TEST_LIBRARY NAMES agenttests
+FIND_LIBRARY(CYCLUS_AGENT_TEST_LIBRARY NAMES baseagentunittests
   HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
   /usr/local/cyclus/lib /usr/local/cyclus
   /opt/local /opt/local/cyclus


fix lccgen name

fix lccgen name

--- cmake/Findlccgen.cmake
+++ cmake/Findlccgen.cmake
@@ -47,7 +47,7 @@

 if(LCC_LOCATION)
 	find_package(lccgen HINTS ${LCC_LOCATION} CONFIG) #try to find it without looping on this module
-	if(NOT lcc_FOUND)
+	if(NOT lccgen_FOUND)
 		find_program(LCC_EXECUTABLE
 		NAMES ${lcc_names} HINTS ${LCC_LOCATION} DOC "lccgen command line client")
 		FIND_PACKAGE_HANDLE_STANDARD_ARGS(lccgen FOUND_VAR LCC_FOUND
@@ -55,7 +55,7 @@
             	                           FAIL_MESSAGE "Error finding lcc executable. variable LCC_LOCATION non set correctly.")
     	add_executable(license_generator::lccgen IMPORTED GLOBAL)
 		set_property(TARGET license_generator::lccgen PROPERTY IMPORTED_LOCATION ${LCC_EXECUTABLE})
-	ENDIF(NOT lcc_FOUND)
+	ENDIF(NOT lccgen_FOUND)
 ELSE(LCC_LOCATION)
 	find_package(lccgen HINTS ${CMAKE_BINARY_DIR} CONFIG) #try to find it without looping on this module


[cmake] fix e12134c

[cmake] fix e12134c

--- cmake/PymorUtils.cmake
+++ cmake/PymorUtils.cmake
@@ -21,7 +21,7 @@
                   "${pythonWrapperGenerator}"
                   "${target_name}"
                   "${header_filename}"
-                  "${PROJECT_BINARY_DIR}/config.h"
+                  "${PROJECT_SOURCE_DIR}/config.h"
                   "${CMAKE_CURRENT_BINARY_DIR}"
               DEPENDS
                   "${pythonWrapperGenerator}"
@@ -39,7 +39,7 @@
                   "${pythonWrapperGenerator}"
                   "${target_name}"
                   "${header_filename}"
-                  "${PROJECT_SOURCE_DIR}/config.h"
+                  "${PROJECT_BINARY_DIR}/config.h"
                   "${CMAKE_CURRENT_BINARY_DIR}"
               DEPENDS
                   "${pythonWrapperGenerator}"


disable -Werror in the maintainer mode until we're ready for it

--- cmake/maintainer.cmake
+++ cmake/maintainer.cmake
@@ -35,7 +35,7 @@
 ENDIF()

 # Turn on Werror (warning => error) when using maintainer mode.
-IF(MYSQL_MAINTAINER_MODE MATCHES "ON")
+IF(FALSE AND MYSQL_MAINTAINER_MODE MATCHES "ON")
   SET(MY_C_WARNING_FLAGS "${MY_C_WARNING_FLAGS} -DFORCE_INIT_OF_VARS -Werror")
   SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -DFORCE_INIT_OF_VARS -Werror")
 ENDIF()


emscripten toolchain: Add option for embind and enable emscripten cmake modules

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -25,6 +25,7 @@
 option(FIPS_EMSCRIPTEN_USE_WEBGL2 "use WebGL2" OFF)
 option(FIPS_EMSCRIPTEN_USE_CLOSURE "run closure compiler on JS code" OFF)
 option(FIPS_EMSCRIPTEN_USE_EMMALLOC "use emmalloc allocator" OFF)
+option(FIPS_EMSCRIPTEN_USE_EMBIND "use embind" OFF)
 option(FIPS_EMSCRIPTEN_ALLOW_MEMORY_GROWTH "allow memory growth" ON)
 option(FIPS_EMSCRIPTEN_USE_WASM_TRAP_MODE_CLAMP "use trap-mode clamp for wasm" ON)
 option(FIPS_EMSCRIPTEN_DEMANGLE "compile with libcxxabi-provided demangling support" OFF)
@@ -73,6 +74,9 @@
 if (FIPS_EMSCRIPTEN_USE_EMMALLOC)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s \"MALLOC='emmalloc'\"")
 endif()
+if (FIPS_EMSCRIPTEN_USE_EMBIND)
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} --bind")
+endif()
 if (FIPS_EMSCRIPTEN_USE_FS)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_FILESYSTEM=0")
 else()
@@ -172,6 +176,9 @@
 set(CMAKE_AR "${EMSCRIPTEN_ROOT}/emar${EMCC_SUFFIX}" CACHE PATH "archive" FORCE)
 set(CMAKE_LINKER "${EMSCRIPTEN_ROOT}/emcc${EMCC_SUFFIX}" CACHE PATH "linker" FORCE)
 set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT}/emranlib${EMCC_SUFFIX}" CACHE PATH "ranlib" FORCE)
+
+# override cmake modules with emscripten cmake modules
+set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${EMSCRIPTEN_ROOT_PATH}/cmake/Modules")

 # only search for libraries and includes in the toolchain
 set(CMAKE_FIND_ROOT_PATH ${EMSCRIPTEN_ROOT})


emscripten: new cmake option FIPS_EMSCRIPTEN_USE_WEBGL2 to enable WebGL2

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -58,6 +58,7 @@
 option(FIPS_EMSCRIPTEN_USE_SAFE_HEAP "emscripten: enable SAFE_HEAP checks" OFF)
 option(FIPS_EMSCRIPTEN_USE_CPU_PROFILER "emscripten: enable the built-in CPU profiler" OFF)
 option(FIPS_EMSCRIPTEN_USE_MEMORY_PROFILER "emscripten: enable the built-in memory profiler" OFF)
+option(FIPS_EMSCRIPTEN_USE_WEBGL2 "emscripten: use WebGL2" OFF)
 set(FIPS_EMSCRIPTEN_TOTAL_MEMORY 134217728 CACHE STRING "emscripten: total heap size in bytes")
 set(FIPS_EMSCRIPTEN_LTO_LEVEL 1 CACHE STRING "emscripten: Link-time-optimization level (0..3)")
 set(FIPS_EMSCRIPTEN_OUTLINING_LIMIT 60000 CACHE STRING "emscripten: outlining limit")
@@ -79,7 +80,6 @@
 set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s EXPORTED_FUNCTIONS=\"${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}\"")
 set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_EXIT_RUNTIME=1")

-# enable the emscripten tracer if profiling is enabled
 if (FIPS_PROFILING)
     set(EMSC_TRACING 1)
     set(EMSC_COMMON_FLAGS "${EMSC_COMMON_FLAGS} --tracing")
@@ -88,6 +88,9 @@
 endif()
 if (FIPS_EMSCRIPTEN_USE_SAFE_HEAP)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s SAFE_HEAP=1")
+endif()
+if (FIPS_EMSCRIPTEN_USE_WEBGL2)
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s USE_WEBGL2=1 -s FULL_ES3=1")
 endif()
 if (FIPS_EMSCRIPTEN_USE_FS)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_FILESYSTEM=0")


emscripten: default LTO to off

emscripten: default LTO to off

...it was actually disabled all along because WASM_OBJECT_FILES
is now default-on, and this didables LTO, but I also didn't
see any performance increase in the emulators when enabling
it (only a 10% size increase).

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -33,7 +33,7 @@
 option(FIPS_EMSCRIPTEN_USE_FETCH "use fetch API" OFF)
 option(FIPS_EMSCRIPTEN_USE_MINIMAL_RUNTIME "use the minimal JS runtime" OFF)
 set(FIPS_EMSCRIPTEN_TOTAL_MEMORY 33554432 CACHE STRING "initial heap size in bytes")
-set(FIPS_EMSCRIPTEN_LTO_LEVEL 1 CACHE STRING "link-time-optimization level (0..3)")
+set(FIPS_EMSCRIPTEN_LTO_LEVEL 0 CACHE STRING "link-time-optimization level (0..3)")
 set(FIPS_EMSCRIPTEN_MEM_INIT_METHOD 1 CACHE STRING "how to represent initial memory content (0..2)")
 set(FIPS_EMSCRIPTEN_SHELL_HTML "shell.html" CACHE STRING "path to shell html file")

@@ -42,6 +42,7 @@
 endif()

 set(EMSC_COMMON_FLAGS)
+set(EMSC_COMMON_FLAGS_RELEASE)
 set(EMSC_CXX_FLAGS)
 set(EMSC_LINKER_FLAGS)
 set(EMSC_LINKER_FLAGS_RELEASE)
@@ -101,9 +102,9 @@
 endif()
 set(EMSCRIPTEN_OPT "-O3")
 if (FIPS_EXCEPTIONS)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
-else()
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s DISABLE_EXCEPTION_CATCHING=1")
+    set(EMSC_COMMON_FLAGS "${EMSC_COMMON_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
+else()
+    set(EMSC_COMMON_FLAGS "${EMSC_COMMON_FLAGS} -s DISABLE_EXCEPTION_CATCHING=1")
     set(EMSC_CXX_FLAGS "${EMSC_CXX_FLAGS} -fno-exceptions")
 endif()
 if (NOT FIPS_RTTI)
@@ -112,9 +113,11 @@
 set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL}")
 if (FIPS_EMSCRIPTEN_USE_WASM)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1")
+    if (FIPS_EMSCRIPTEN_LTO_LEVEL GREATER 0)
+        set(EMSC_COMMON_FLAGS "${EMSC_COMMON_FLAGS} -s WASM_OBJECT_FILES=0")
+    endif()
 else()
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=0")
-    set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE}")
 endif()
 if (FIPS_EMSCRIPTEN_USE_CLOSURE)
     if (Java_FOUND)
@@ -126,7 +129,7 @@
 if (FIPS_EMSCRIPTEN_DEMANGLE)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s DEMANGLE_SUPPORT=1")
 endif()
-set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s ASSERTIONS=0")
+set(EMSC_COMMON_FLAGS_RELEASE "${EMSC_COMMON_FLAGS_RELEASE} -s ASSERTIONS=0")
 if (FIPS_EMSCRIPTEN_USE_FETCH)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s FETCH=1")
 endif()
@@ -228,19 +231,19 @@

 # c++ compiler flags
 set(CMAKE_CXX_FLAGS "${EMSC_COMMON_FLAGS} ${EMSC_CXX_FLAGS} -std=c++11 -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override -Wno-warn-absolute-paths -Wno-expansion-to-defined")
-set(CMAKE_CXX_FLAGS_RELEASE "${EMSCRIPTEN_OPT} -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "${EMSC_COMMON_FLAGS_RELEASE} ${EMSCRIPTEN_OPT} -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
 set(CMAKE_CXX_FLAGS_PROFILING "${EMSCRIPTEN_OPT} -DNDEBUG --profiling")

 # c compiler flags
 set(CMAKE_C_FLAGS "${EMSC_COMMON_FLAGS} -fstrict-aliasing -Wall -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-warn-absolute-paths -Wno-expansion-to-defined")
-set(CMAKE_C_FLAGS_RELEASE "${EMSCRIPTEN_OPT} -DNDEBUG")
+set(CMAKE_C_FLAGS_RELEASE "${EMSCRIPTEN_OPT} ${EMSC_COMMON_FLAGS_RELEASE} -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG "-O0 -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
 set(CMAKE_C_FLAGS_PROFILING "${EMSCRIPTEN_OPT} -DNDEBUG --profiling")

 # linker flags
 set(CMAKE_EXE_LINKER_FLAGS "${EMSC_COMMON_FLAGS} ${EMSC_LINKER_FLAGS} ${EMSC_EXE_LINKER_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} ${EMSC_LINKER_FLAGS_RELEASE}")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} ${EMSC_COMMON_FLAGS_RELEASE} ${EMSC_LINKER_FLAGS_RELEASE}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O0 -g")
 set(CMAKE_EXE_LINKER_FLAGS_PROFILING "--profiling ${EMSCRIPTEN_OPT} ${EMSC_LINKER_FLAGS_RELEASE}")

@@ -249,7 +252,7 @@

 # dynamic lib linker flags
 set(CMAKE_SHARED_LINKER_FLAGS "-shared ${EMSC_COMMON_FLAGS} ${EMSC_LINKER_FLAGS}")
-set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} ${EMSC_LINKER_FLAGS_RELEASE}")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} ${EMSC_COMMON_FLAGS_RELEASE} ${EMSC_LINKER_FLAGS_RELEASE}")
 set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g")
 set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "--profiling ${EMSCRIPTEN_OPT} ${EMSC_LINKER_FLAGS_RELEASE}")


Update FW: improve OV9782 color saturation and sharpness

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "faf65d29a955cf5b375826437468db0dc33d0fb5")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "d2b298e834f3cf746071059e2c1e1c4d37b724af")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW to latest develop

Update FW to latest develop

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "5c86c4497337e40c4b9293786f4f5c53667ab1ae")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "1d9a7ed8c70a2d1d2eba386acdebcbf3ca49de29")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


[VDT] Update version to 0.4.1

[VDT] Update version to 0.4.1

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1247,8 +1247,8 @@
       set(builtin_vc OFF CACHE BOOL "" FORCE)
     endif()
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-    if ( APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
-      message(STATUS "Vc requires Apple Clang version >= 4.0; switching OFF 'vc' option")
+    if ( APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
+      message(STATUS "Vc requires Apple Clang version >= 5.0; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
       set(builtin_vc OFF CACHE BOOL "" FORCE)
     elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
@@ -1447,12 +1447,12 @@
     endif()
   endif()
   if(builtin_vdt)
-    set(vdt_version 0.3.9)
+    set(vdt_version 0.4.1)
     set(VDT_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}vdt${CMAKE_SHARED_LIBRARY_SUFFIX})
     ExternalProject_Add(
       VDT
       URL ${lcgpackages}/vdt-${vdt_version}.tar.gz
-      URL_HASH SHA256=1662d21037a29cae717ee50b73bd177bea79582f4138b7ad11404fc4be4e542e
+      URL_HASH SHA256=020ae76518d67476c3cb9a3fdf0683ee982d6b1a5898739000072ce34063072c
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1


Ensure that the lib build destination matches the expected one for libAfterImage

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -326,7 +326,9 @@
       AFTERIMAGE
       DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/graf2d/asimage/src/libAfterImage AFTERIMAGE
       INSTALL_DIR ${CMAKE_BINARY_DIR}
-      CONFIGURE_COMMAND ./configure --prefix <INSTALL_DIR> --with-ttf ${_ttf_include} --with-afterbase=no
+      CONFIGURE_COMMAND ./configure --prefix <INSTALL_DIR>
+                        --libdir=<INSTALL_DIR>/lib
+                        --with-ttf ${_ttf_include} --with-afterbase=no
                         --without-svg --disable-glx ${_after_mmx}
                         --with-builtin-ungif  --with-jpeg ${_jpeginclude}
                         --with-png ${_pnginclude} ${_tiffinclude}


[cmake] Pass -isysroot CMAKE_OSX_SYSROOT to new tbb.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1198,6 +1198,9 @@
     install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries FILES_MATCHING PATTERN "tbb*")
   else()
     ROOT_ADD_CXX_FLAG(_tbb_cxxflags -mno-rtm)
+    if(APPLE)
+      set(_tbb_cxxflags "${_tbb_cxxflags} -isysroot ${CMAKE_OSX_SYSROOT}")
+    endif()
     set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libtbb${CMAKE_SHARED_LIBRARY_SUFFIX})
     ExternalProject_Add(
       TBB
@@ -1205,7 +1208,7 @@
       URL_HASH SHA256=${tbb_sha256}
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND ""
-      BUILD_COMMAND make ${_tbb_compiler} CXXFLAGS=${_tbb_cxxflags} CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}
+      BUILD_COMMAND make ${_tbb_compiler} "CXXFLAGS=${_tbb_cxxflags}" CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}
       INSTALL_COMMAND ${CMAKE_COMMAND} -Dinstall_dir=<INSTALL_DIR> -Dsource_dir=<SOURCE_DIR>
                                        -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
       INSTALL_COMMAND ""


Disable ssl option rather than enabling builtin_openssl by default

The builtin OpenSSL requires a network connection to build.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -635,18 +635,16 @@
   else()
     find_package(OpenSSL)
     if(NOT OPENSSL_FOUND)
-      if(WIN32) # builtin OpenSSL does not work on Windows
-        message(STATUS "Switching OFF 'ssl' option.")
-        set(ssl OFF CACHE BOOL "" FORCE)
-      else()
-        message(STATUS "OpenSSL not found, switching ON 'builtin_openssl' option.")
-        set(builtin_openssl ON CACHE BOOL "" FORCE)
-      endif()
+      message(STATUS "Switching OFF 'ssl' option.")
+      set(ssl OFF CACHE BOOL "" FORCE)
     endif()
   endif()
 endif()

 if(builtin_openssl)
+  if(WIN32)
+    message(FATAL_ERROR "The builtin OpenSSL in ROOT is not supported on Windows.")
+  endif()
   list(APPEND ROOT_BUILTINS OpenSSL)
   add_subdirectory(builtins/openssl)
 endif()


shift openal-soft directory add plus various cmake set(values) on over to an o/s agnostic block, rather than only including that if used on windows


ENH: Updated to ITK version being used by Slicer - inclds Mac support

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -123,8 +123,8 @@

     set( proj Insight )
     ExternalProject_Add( ${proj}
-      GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Slicer/ITK.git"
-      GIT_TAG "origin/slicer-4.0"
+      GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Kitware/ITK.git"
+      GIT_TAG "v3.20.1"
       SOURCE_DIR "${CMAKE_BINARY_DIR}/Insight"
       BINARY_DIR Insight-Build
       CMAKE_GENERATOR ${gen}


Added a replace macro for all compilers

Added a replace macro for all compilers

--- build/macros.cmake
+++ build/macros.cmake
@@ -247,6 +247,11 @@
 	replace_or_append_compiler_flag(CMAKE_C_FLAGS_RELWITHDEBINFO ${_regex_str} ${_flag_str})
 endmacro()

+macro(replace_or_append_all_flag _regex_str _flag_str)
+	replace_or_append_compiler_flag(CMAKE_CXX_FLAGS ${_regex_str} ${_flag_str})
+	replace_or_append_compiler_flag(CMAKE_C_FLAGS ${_regex_str} ${_flag_str})
+endmacro()
+
 macro(replace_or_append_all_flag_compilers _vc_regex_str _gcc_regex_str _vc_flag_str _gcc_flag_str)
 	get_compiler_name(COMPILER)
 	if(COMPILER MATCHES "vc")


Bugfix: create ${TARGET}.signed dummy file in CMakeFiles directory

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

--- deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
+++ deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
@@ -97,15 +97,15 @@

   IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
     IF(DEFINED OSX_CERTIFICATE_NAME)
-      ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/${TARGET}.signed
+      ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${TARGET}.signed
         COMMAND codesign -f -s ${OSX_CERTIFICATE_NAME} ${TARGET}
-        COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/${TARGET}.signed
+        COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${TARGET}.signed
         COMMENT "Digitally signing ${TARGET}"
         DEPENDS ${TARGET}
         VERBATIM
         )
       ADD_CUSTOM_TARGET(sign ALL
-        DEPENDS ${CMAKE_BINARY_DIR}/${TARGET}.signed
+        DEPENDS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${TARGET}.signed
         )
       ADD_DEPENDENCIES(run sign)
     ELSE()


[Build] Added a required variable within the FindBoostWrapper CMake finder script.

--- FindBoostWrapper.cmake
+++ FindBoostWrapper.cmake
@@ -9,7 +9,7 @@
 # Check the version requirement only
 include (FindPackageHandleStandardArgs)
 find_package_handle_standard_args (BoostWrapper
-  REQUIRED_VARS Boost_INCLUDE_DIRS
+  REQUIRED_VARS Boost_INCLUDE_DIRS Boost_LIBRARY_DIRS
   VERSION_VAR Boost_HUMAN_VERSION)

 if (BOOSTWRAPPER_FOUND)


Updated example flags.cmake to find Cuttlebone alongside AlloSystem.

--- examples/dependencies/flags.cmake
+++ examples/dependencies/flags.cmake
@@ -1,12 +1,16 @@
-find_library(CUTTLEBONE_LIB cuttlebone
-	PATHS cuttlebone/build/ /usr/local/lib)
+find_library(CUTTLEBONE_LIB
+	NAMES cuttlebone
+	PATHS ${CMAKE_SOURCE_DIR}/../cuttlebone/build/ /usr/local/lib)

-find_path(CUTTLEBONE_INCLUDE_DIR Cuttlebone/Cuttlebone.hpp
-          PATHS cuttlebone /usr/local/include)
+find_path(CUTTLEBONE_INCLUDE_DIR
+	NAMES Cuttlebone/Cuttlebone.hpp
+	PATHS ${CMAKE_SOURCE_DIR}/../cuttlebone/ /usr/local/include)

 if(NOT(CUTTLEBONE_INCLUDE_DIR AND CUTTLEBONE_LIB))
     message("Cuttlebone not found. Can't build application")
     return()
+else(NOT(CUTTLEBONE_INCLUDE_DIR AND CUTTLEBONE_LIB))
+	message("Cuttlebone found.")
 endif(NOT(CUTTLEBONE_INCLUDE_DIR AND CUTTLEBONE_LIB))

 include_directories(${CUTTLEBONE_INCLUDE_DIR})


Add Binding: Fix minor spelling mistakes

--- cmake/Modules/LibAddBinding.cmake
+++ cmake/Modules/LibAddBinding.cmake
@@ -1,9 +1,9 @@
 include(LibAddMacros)

-# - Adds a binding if it is included in BINDINGS and not exluded by name or
+# - Adds a binding if it is included in BINDINGS and not excluded by name or
 #   category (infos/status or infos/provides from it's README.md).
 #
-#   If the binding is exluded the reason is printed along with the binding name.
+#   If the binding is excluded the reason is printed along with the binding name.
 #
 #   This is function can be used anywhere since the base directory is fixed to
 #   the bindings source directory. However if the binding uses subdirectories


[cmake] Gracefully fall back to C++11 if compiler default is undetected

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -118,7 +118,13 @@
                    COMMAND ${CMAKE_CXX_COMPILER} -E -x c++ -
                    COMMAND tail -n1
                    OUTPUT_VARIABLE CXX_STANDARD_STRING
+                   ERROR_QUIET
                    OUTPUT_STRIP_TRAILING_WHITESPACE)
+   # if the above command fails to set the variable for any reason, let's default to 2011 with a warning
+   if (NOT CXX_STANDARD_STRING)
+      message(WARNING "Could not detect the default C++ standard in use by the detected compiler (${CMAKE_CXX_COMPILER}). Falling back to C++11 as a default, can be overridden by setting CMAKE_CXX_STANDARD.")
+      set(CXX_STANDARD_STRING 2011)
+   endif()
 endif()
 # Lexicographically compare the value of __cplusplus (e.g. "201703L" for C++17) to figure out
 # what standard CMAKE_CXX_COMPILER uses by default.


Prefer non-package install of libsatsolver devel files

--- cmake/modules/FindSatSolver.cmake
+++ cmake/modules/FindSatSolver.cmake
@@ -13,22 +13,36 @@
    set(SATSOLVER_FIND_QUIETLY TRUE)
 endif (SATSOLVER_VERSION)

-SET(RPM_EXECUTABLE "rpm")
+# Prefer a local (non-rpm) installation first

-EXECUTE_PROCESS(COMMAND ${RPM_EXECUTABLE} -q "--queryformat"
-"%{version}" "libsatsolver-devel"
-OUTPUT_VARIABLE SATSOLVER_VERSION)
+IF(EXISTS /usr/include/satsolver/satversion.h)
+  MESSAGE(STATUS "satversion.h found")
+  EXECUTE_PROCESS(COMMAND "grep" "SATSOLVER_VERSION_STRING" "/usr/include/satsolver/satversion.h" OUTPUT_VARIABLE SATSOLVER_VERSION_STRING)
+#  MESSAGE(STATUS "Grep returned '${SATSOLVER_VERSION_STRING}'")
+  STRING(REGEX REPLACE ".*([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" SATSOLVER_VERSION "${SATSOLVER_VERSION_STRING}")
+  MESSAGE(STATUS "Version '${SATSOLVER_VERSION}'")
+ENDIF(EXISTS /usr/include/satsolver/satversion.h)

-STRING(REPLACE "\n" "" SATSOLVER_VERSION "${SATSOLVER_VERSION}")
+# Look for libsatsolver-devel

-IF("${SATSOLVER_VERSION}" MATCHES ".*not installed.*")
-  SET(SATSOLVER_VERSION "")
-ELSE("${SATSOLVER_VERSION}" MATCHES ".*not installed.*")
+IF("${SATSOLVER_VERSION}" STREQUAL "")
+  MESSAGE(STATUS "Looking for libsatsolver-devel")
+  SET(RPM_EXECUTABLE "rpm")
+  EXECUTE_PROCESS(COMMAND ${RPM_EXECUTABLE} -q "--queryformat" "%{version}" "libsatsolver-devel" OUTPUT_VARIABLE SATSOLVER_VERSION)
+  STRING(REPLACE "\n" "" SATSOLVER_VERSION "${SATSOLVER_VERSION}")
+  IF("${SATSOLVER_VERSION}" MATCHES ".*not installed.*")
+    SET(SATSOLVER_VERSION "")
+  ENDIF("${SATSOLVER_VERSION}" MATCHES ".*not installed.*")
+ENDIF("${SATSOLVER_VERSION}" STREQUAL "")
+
+IF("${SATSOLVER_VERSION}" STREQUAL "")
+  MESSAGE(WARNING "Cant determine SATSOLVER_VERSION")
+ELSE("${SATSOLVER_VERSION}" STREQUAL "")
   STRING(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" DISCARD "${SATSOLVER_VERSION}")
   SET(SATSOLVER_VERSION_MAJOR ${CMAKE_MATCH_1})
   SET(SATSOLVER_VERSION_MINOR ${CMAKE_MATCH_2})
   SET(SATSOLVER_VERSION_PATCH ${CMAKE_MATCH_3})
-ENDIF("${SATSOLVER_VERSION}" MATCHES ".*not installed.*")
+ENDIF("${SATSOLVER_VERSION}" STREQUAL "")

 MARK_AS_ADVANCED(
   SATSOLVER_VERSION


Fix inconsistency between ROOTConfig.cmake and  macro REFLEX_GENERATE_DICTIONARY()

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -191,7 +191,7 @@

   add_custom_command(
     OUTPUT ${gensrcdict} ${rootmapname}
-    COMMAND ${ROOT_genreflex_cmd}
+    COMMAND ${ROOT_genreflex_CMD}
     ARGS ${headerfiles} -o ${gensrcdict} ${rootmapopts} --select=${selectionfile}
          --gccxmlpath=${GCCXML_home}/bin ${ARG_OPTIONS} ${include_dirs} ${definitions}
     DEPENDS ${headerfiles} ${selectionfile})


Recovery of correct CMake invocation of rootcling

We are fixing a correct invocation accidentally removed in ROOT_GENERATE_DICTIONARY() macro
in '[cxxmodules] Move away from environment variable' commit.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -403,7 +403,7 @@
     elseif(TARGET ROOT::rootcling)
       set(command ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:$ENV{LD_LIBRARY_PATH}" $<TARGET_FILE:ROOT::rootcling>)
     else()
-      set(command ${CMAKE_COMMAND} -E rootcling)
+      set(command ${CMAKE_COMMAND} -E env rootcling)
     endif()
   endif()


Build perf test runner only if onnxruntime_BUILD_SHARED_LIB is ON

--- cmake/onnxruntime_unittests.cmake
+++ cmake/onnxruntime_unittests.cmake
@@ -444,6 +444,7 @@
 add_test(NAME onnx_test_pytorch_operator
   COMMAND onnx_test_runner ${PROJECT_SOURCE_DIR}/external/onnx/onnx/backend/test/data/pytorch-operator)

+#perf test runner
 set(onnxruntime_perf_test_src_dir ${TEST_SRC_DIR}/perftest)
 set(onnxruntime_perf_test_src_patterns
 "${onnxruntime_perf_test_src_dir}/*.cc"
@@ -470,17 +471,21 @@
   SET(SYS_PATH_LIB shlwapi)
 endif()
 onnxruntime_add_include_to_target(onnxruntime_perf_test gsl)
-target_link_libraries(onnxruntime_perf_test PRIVATE onnxruntime_test_utils onnx_test_runner_common onnxruntime_common
-        onnx_test_data_proto onnx_proto libprotobuf ${GETOPT_LIB_WIDE} onnxruntime
-        ${SYS_PATH_LIB} ${CMAKE_DL_LIBS} Threads::Threads)
+
+if (onnxruntime_BUILD_SHARED_LIB)
+  target_link_libraries(onnxruntime_perf_test PRIVATE onnxruntime_test_utils onnx_test_runner_common onnxruntime_common
+          onnx_test_data_proto onnx_proto libprotobuf ${GETOPT_LIB_WIDE} onnxruntime
+          ${SYS_PATH_LIB} ${CMAKE_DL_LIBS} Threads::Threads)
+  if(tensorflow_C_PACKAGE_PATH)
+    target_include_directories(onnxruntime_perf_test PRIVATE ${tensorflow_C_PACKAGE_PATH}/include)
+    target_link_directories(onnxruntime_perf_test PRIVATE ${tensorflow_C_PACKAGE_PATH}/lib)
+    target_link_libraries(onnxruntime_perf_test PRIVATE tensorflow)
+    target_compile_definitions(onnxruntime_perf_test PRIVATE HAVE_TENSORFLOW)
+  endif()
+else()
+  target_link_libraries(onnxruntime_perf_test PRIVATE onnx_test_runner_common ${GETOPT_LIB_WIDE} ${onnx_test_libs})
+endif()
 set_target_properties(onnxruntime_perf_test PROPERTIES FOLDER "ONNXRuntimeTest")
-
-if(tensorflow_C_PACKAGE_PATH)
-  target_include_directories(onnxruntime_perf_test PRIVATE ${tensorflow_C_PACKAGE_PATH}/include)
-  target_link_directories(onnxruntime_perf_test PRIVATE ${tensorflow_C_PACKAGE_PATH}/lib)
-  target_link_libraries(onnxruntime_perf_test PRIVATE tensorflow)
-  target_compile_definitions(onnxruntime_perf_test PRIVATE HAVE_TENSORFLOW)
-endif()

 # shared lib
 if (onnxruntime_BUILD_SHARED_LIB)


Eigen '429aa5254200'

Eigen '429aa5254200'

--- cmake/projects/Eigen/hunter.cmake
+++ cmake/projects/Eigen/hunter.cmake
@@ -79,6 +79,17 @@
     3ea6a95fb3b1b82c9a9c75fb50f5c87f7e0c9b1a
 )

+hunter_add_version(
+    PACKAGE_NAME
+    Eigen
+    VERSION
+    "v0.0.0-429aa5254200-p0"
+    URL
+    "https://github.com/hunter-packages/eigen/archive/hunter-429aa5254200-p0.tar.gz"
+    SHA1
+    89e7e4419142f7a06fc59183f61c1f9333f2633b
+)
+
 set(_android_args)
 if(ANDROID)
   set(_android_args EIGEN_DISABLE_CXX11_MATH=YES)


set_property() better than set_target_properties()

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -266,9 +266,10 @@
 		# (See comments in script_matlab.cmake)
 		# Add /DELAYLOAD:... to avoid dependency of these DLLs for standalone (non-mex) projects
 		IF (CMAKE_MRPT_HAS_MATLAB AND BUILD_SHARED_LIBS AND MSVC)
-			set_target_properties(mrpt-${name}
-				PROPERTIES
-				LINK_FLAGS "/DELAYLOAD:\"libmx.dll\" /DELAYLOAD:\"libmex.dll\" /ignore:4199")
+			set_property(
+				TARGET mrpt-${name}
+				APPEND_STRING PROPERTY
+				LINK_FLAGS " /DELAYLOAD:\"libmx.dll\" /DELAYLOAD:\"libmex.dll\" /ignore:4199")
 			# The /ignore:4199 is to disable warnings like these:
 			#  warning LNK4199: /DELAYLOAD:libmx.dll ignored; no imports found from libmx.dll
 			# in libs which do not (yet) support mex stuff


Add setting to ChibiOS contrib to disable compiler warning

***NO_CI***

--- CMake/Modules/FindChibiOS-Contrib.cmake
+++ CMake/Modules/FindChibiOS-Contrib.cmake
@@ -45,5 +45,7 @@
 list(APPEND CHIBIOS_CONTRIB_SOURCES ${chibios-contrib_SOURCE_DIR}/os/hal/src/hal_usb_msd.c)
 list(APPEND CHIBIOS_CONTRIB_SOURCES ${chibios-contrib_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c)

+SET_SOURCE_FILES_PROPERTIES( ${chibios-contrib_SOURCE_DIR}/os/hal/src/hal_usbh.c PROPERTIES COMPILE_FLAGS -Wno-type-limits)
+
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS-Contrib DEFAULT_MSG CHIBIOS_CONTRIB_INCLUDE_DIRS CHIBIOS_CONTRIB_SOURCES)


Fix MinGW build regression issue.

Fix MinGW build regression issue.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -82,6 +82,7 @@
     execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION ERROR_QUIET)
     if (GCC_VERSION VERSION_LESS 4.9.1)
         message (WARNING "Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
+        set (URHO3D_DEFAULT_SSE FALSE)
     else ()
         set (URHO3D_DEFAULT_SSE TRUE)
     endif ()


Fix android toolchain error

Fix android toolchain error

--HG--
branch : v1-9

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -521,7 +521,7 @@
 #verify that target ABI is supported
 list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx )
 if( __androidAbiIdx EQUAL -1 )
- string( REPLACE ";" "\", \"", PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
+ string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
  message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain.
    Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\"
    " )