nomsg

nomsg

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -1,76 +1,76 @@
-# $Id$
-#-----------------------------------------------------------------------------
-# Include directories for other projects installed on the system.
-SET(OTB_INCLUDE_DIRS_SYSTEM "")
-
-#-----------------------------------------------------------------------------
-# Include directories from the build tree.
-SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_BINARY_DIR})
-
-# These directories are always needed.
-SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
-  ${OTB_SOURCE_DIR}/Code/Common
-  ${OTB_SOURCE_DIR}/Code/BasicFilters
-  ${OTB_SOURCE_DIR}/Code/IO
-  ${OTB_SOURCE_DIR}/Code/ChangeDetection
-  ${OTB_SOURCE_DIR}/Code/FeatureExtraction
-  ${OTB_SOURCE_DIR}/Code/Learning
-  ${OTB_SOURCE_DIR}/Code/Visu
-)
-
-#-----------------------------------------------------------------------------
-# Include directories from the GDAL build tree.
-INCLUDE(${OTB_SOURCE_DIR}/Utilities/GDAL/gdalIncludeDirectories.cmake)
-SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
-  ${GDAL_INCLUDE_DIRS_BUILD_TREE}
-  )
-
-
-#-----------------------------------------------------------------------------
-# Include directories from the CAI build tree.
-INCLUDE(${OTB_SOURCE_DIR}/Utilities/CAI/caiIncludeDirectories.cmake)
-SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
-  ${CAI_INCLUDE_DIRS_BUILD_TREE}
-  )
-
-
-
-
-#-----------------------------------------------------------------------------
-# Include directories needed for .cxx files in OTB.  These include
-# directories will NOT be available to user projects.
-SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX)
-
-SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX} )
-
-#-----------------------------------------------------------------------------
-# Include directories from the install tree.
-SET(OTB_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/otb")
-SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
-  ${OTB_INSTALL_INCLUDE_DIR}
-  ${OTB_INSTALL_INCLUDE_DIR}/Common
-  ${OTB_INSTALL_INCLUDE_DIR}/BasicFilters
-  ${OTB_INSTALL_INCLUDE_DIR}/IO
-  ${OTB_INSTALL_INCLUDE_DIR}/ChangeDetection
-  ${OTB_INSTALL_INCLUDE_DIR}/FeatureExtraction
-  ${OTB_INSTALL_INCLUDE_DIR}/Learning
-  ${OTB_INSTALL_INCLUDE_DIR}/Visu
-  ${OTB_INSTALL_INCLUDE_DIR}/Utilities
-  ${OTB_INSTALL_INCLUDE_DIR}/Utilities/CAI
-  ${OTB_INSTALL_INCLUDE_DIR}/Utilities/GDAL
-)
-
-
-#IF(NOT OTB_USE_SYSTEM_VXL)
-#  SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
-#    ${OTB_INSTALL_INCLUDE_DIR}/Utilities/vxl/vcl
-#    ${OTB_INSTALL_INCLUDE_DIR}/Utilities/vxl/core
-#    )
-#ENDIF(NOT OTB_USE_SYSTEM_VXL)
-
-
-#-----------------------------------------------------------------------------
-# Include directories for 3rd-party utilities provided by OTB.
-#OTB_THIRD_PARTY_INCLUDE(ZLIB zlib)
-#OTB_THIRD_PARTY_INCLUDE(PNG  png)
-#OTB_THIRD_PARTY_INCLUDE(TIFF tiff)
+# $Id$
+#-----------------------------------------------------------------------------
+# Include directories for other projects installed on the system.
+SET(OTB_INCLUDE_DIRS_SYSTEM "")
+
+#-----------------------------------------------------------------------------
+# Include directories from the build tree.
+SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_BINARY_DIR})
+
+# These directories are always needed.
+SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
+  ${OTB_SOURCE_DIR}/Code/Common
+  ${OTB_SOURCE_DIR}/Code/BasicFilters
+  ${OTB_SOURCE_DIR}/Code/IO
+  ${OTB_SOURCE_DIR}/Code/ChangeDetection
+  ${OTB_SOURCE_DIR}/Code/FeatureExtraction
+  ${OTB_SOURCE_DIR}/Code/Learning
+  ${OTB_SOURCE_DIR}/Code/Visu
+)
+
+#-----------------------------------------------------------------------------
+# Include directories from the GDAL build tree.
+#INCLUDE(${OTB_SOURCE_DIR}/Utilities/GDAL/gdalIncludeDirectories.cmake)
+#SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
+#  ${GDAL_INCLUDE_DIRS_BUILD_TREE}
+#  )
+
+
+#-----------------------------------------------------------------------------
+# Include directories from the CAI build tree.
+INCLUDE(${OTB_SOURCE_DIR}/Utilities/CAI/caiIncludeDirectories.cmake)
+SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
+  ${CAI_INCLUDE_DIRS_BUILD_TREE}
+  )
+
+
+
+
+#-----------------------------------------------------------------------------
+# Include directories needed for .cxx files in OTB.  These include
+# directories will NOT be available to user projects.
+SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX)
+
+SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX} )
+
+#-----------------------------------------------------------------------------
+# Include directories from the install tree.
+SET(OTB_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/otb")
+SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
+  ${OTB_INSTALL_INCLUDE_DIR}
+  ${OTB_INSTALL_INCLUDE_DIR}/Common
+  ${OTB_INSTALL_INCLUDE_DIR}/BasicFilters
+  ${OTB_INSTALL_INCLUDE_DIR}/IO
+  ${OTB_INSTALL_INCLUDE_DIR}/ChangeDetection
+  ${OTB_INSTALL_INCLUDE_DIR}/FeatureExtraction
+  ${OTB_INSTALL_INCLUDE_DIR}/Learning
+  ${OTB_INSTALL_INCLUDE_DIR}/Visu
+  ${OTB_INSTALL_INCLUDE_DIR}/Utilities
+  ${OTB_INSTALL_INCLUDE_DIR}/Utilities/CAI
+  ${OTB_INSTALL_INCLUDE_DIR}/Utilities/GDAL
+)
+
+
+#IF(NOT OTB_USE_SYSTEM_VXL)
+#  SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
+#    ${OTB_INSTALL_INCLUDE_DIR}/Utilities/vxl/vcl
+#    ${OTB_INSTALL_INCLUDE_DIR}/Utilities/vxl/core
+#    )
+#ENDIF(NOT OTB_USE_SYSTEM_VXL)
+
+
+#-----------------------------------------------------------------------------
+# Include directories for 3rd-party utilities provided by OTB.
+#OTB_THIRD_PARTY_INCLUDE(ZLIB zlib)
+#OTB_THIRD_PARTY_INCLUDE(PNG  png)
+#OTB_THIRD_PARTY_INCLUDE(TIFF tiff)


HTCONDOR-1435 Allow condor to build with Python 3.11

In particular, distutils.sysconfig.get_config_var('SO')

is not just deprecated, but removed in favor of

distutils.sysconfig.get_config_var('EXT_SUFFIX')

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -89,7 +89,11 @@
         include (FindPythonLibs)
         message(STATUS "Got PYTHONLIBS_VERSION_STRING = ${PYTHONLIBS_VERSION_STRING}")
         if (PYTHON_EXECUTABLE)
-            execute_process( COMMAND "${PYTHON_EXECUTABLE}" "-c" "import distutils.sysconfig; import sys; sys.stdout.write(distutils.sysconfig.get_config_var('SO'))" OUTPUT_VARIABLE PYTHON_MODULE_SUFFIX)
+			if (${PYTHON_VERSION_MAJOR} VERSION_GREATER_EQUAL 3)
+				execute_process( COMMAND "${PYTHON_EXECUTABLE}" "-c" "import distutils.sysconfig; import sys; sys.stdout.write(distutils.sysconfig.get_config_var('EXT_SUFFIX'))" OUTPUT_VARIABLE PYTHON_MODULE_SUFFIX)
+			else()
+				execute_process( COMMAND "${PYTHON_EXECUTABLE}" "-c" "import distutils.sysconfig; import sys; sys.stdout.write(distutils.sysconfig.get_config_var('SO'))" OUTPUT_VARIABLE PYTHON_MODULE_SUFFIX)
+			endif()
         endif()
     else(WANT_PYTHON_WHEELS)
         # We need to do this the hard way for both python2 and python3 support in the same build
@@ -183,7 +187,7 @@
             set(PYTHON_QUERY_PART_09 "print(sysconfig.get_config_var('MULTIARCH'));")
             set(PYTHON_QUERY_PART_10 "print(sysconfig.get_config_var('LDLIBRARY'));")
             set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib(plat_specific=True, prefix=''));")
-            set(PYTHON_QUERY_PART_12 "print(sysconfig.get_config_var('SO'));")
+			set(PYTHON_QUERY_PART_12 "print(sysconfig.get_config_var('EXT_SUFFIX'));")
             set(PYTHON_QUERY_PART_13 "print(sys.prefix)")

             set(PYTHON_QUERY_COMMAND "${PYTHON_QUERY_PART_01}${PYTHON_QUERY_PART_02}${PYTHON_QUERY_PART_03}${PYTHON_QUERY_PART_04}${PYTHON_QUERY_PART_05}${PYTHON_QUERY_PART_06}${PYTHON_QUERY_PART_07}${PYTHON_QUERY_PART_08}${PYTHON_QUERY_PART_09}${PYTHON_QUERY_PART_10}${PYTHON_QUERY_PART_11}${PYTHON_QUERY_PART_12}${PYTHON_QUERY_PART_13}")


raddd cppcheck-analysis target

raddd cppcheck-analysis target

--- 04-static-analysis/cppcheck-compile-commands/cmake/modules/FindCppCheck.cmake
+++ 04-static-analysis/cppcheck-compile-commands/cmake/modules/FindCppCheck.cmake
@@ -111,3 +111,12 @@
     CPPCHECK_SUPPRESSIONS
     CPPCHECK_CHECKS_ARGS
     CPPCHECK_OTHER_ARGS)
+
+if(CPPCHECK_FOUND)
+    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/analysis/cppcheck)
+    add_custom_target(cppcheck-analysis
+        COMMAND ${CPPCHECK_COMMAND})
+    message("cppcheck found. Use cppccheck-analysis targets to run it")
+else()
+    message("cppcheck not found. No cppccheck-analysis targets")
+endif()


[libomptarget-nvptx-bc] Pass found CUDA installations

We already know where the CUDA SDK is, so there is no point in
letting Clang search for it again and possibly finding no or
a different installation.

--cuda-path is supported since the beginning of CUDA support in
Clang, so making this required doesn't impose additional restrictions.

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

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@332495 91177308-0d34-0410-b5e6-96231b3b80d8

--- libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
+++ libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
@@ -79,7 +79,7 @@

 # These flags are required to emit LLVM Bitcode. We check them together because
 # if any of them are not supported, there is no point in finding out which are.
-set(compiler_flags_required -emit-llvm -O1 --cuda-device-only)
+set(compiler_flags_required -emit-llvm -O1 --cuda-device-only --cuda-path=${CUDA_TOOLKIT_ROOT_DIR})
 set(compiler_flags_required_src "extern \"C\" __device__ int thread() { return threadIdx.x; }")
 check_bitcode_compilation(LIBOMPTARGET_NVPTX_CUDA_COMPILER_SUPPORTS_FLAGS_REQUIRED "${compiler_flags_required_src}" ${compiler_flags_required})


Removing debug messages.

Removing debug messages.

--- CPM.cmake
+++ CPM.cmake
@@ -406,7 +406,6 @@
   if (NOT CPM_HIERARCHY_LEVEL EQUAL 0)
     foreach(_cpm_kvName IN LISTS CPM_KV_LIST_MOD_VERSION_MAP)
       set(CPM_KV_MOD_VERSION_MAP_${_cpm_kvName} ${CPM_KV_MOD_VERSION_MAP_${_cpm_kvName}} PARENT_SCOPE)
-      message("Propogating Version: CPM_KV_MOD_VERSION_MAP_${_cpm_kvName}: ${CPM_KV_MOD_VERSION_MAP_${_cpm_kvName}}")
     endforeach()
     set(_cpm_kvName) # Clear kvName

@@ -420,17 +419,14 @@
   # Use CPM_KV_LIST_MOD_VERSION_MAP to propogate constraints up into the
   # parent CPM_AddModule function's namespace. CPM_AddModule will
   # propogate the versioning information up again to it's parent's namespace.
-  message("PROPOGATING")
   if (NOT CPM_HIERARCHY_LEVEL EQUAL 0)
     foreach(_cpm_kvName IN LISTS CPM_KV_LIST_SOURCE_ADDED_MAP)
       set(${_cpm_kvName} ${CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName}} PARENT_SCOPE)
-      message("Propogating: ${_cpm_kvName}: ${${_cpm_kvName}}")
     endforeach()
     set(_cpm_kvName) # Clear kvName

     # Now propogate the list itself upwards.
     set(CPM_KV_LIST_SOURCE_ADDED_MAP ${CPM_KV_LIST_SOURCE_ADDED_MAP} PARENT_SCOPE)
-    message("List: ${CPM_KV_LIST_SOURCE_ADDED_MAP}")
   endif()
 endmacro()

@@ -442,10 +438,7 @@
   # Ensure the parent function knows what we decided to name ourselves.
   # This name will correspond to our module's namespace directives.
   if (NOT CPM_HIERARCHY_LEVEL EQUAL 0)
-    message("${name} setting HIERARCHY level (${CPM_HIERARCHY_LEVEL})")
     set(CPM_LAST_MODULE_NAME ${name} PARENT_SCOPE)
-  else()
-    message("${name} not setting HIERARCHY level (${CPM_HIERARCHY_LEVEL})")
   endif()

   # Build the appropriate definition for the module. We stored the unique ID
@@ -806,7 +799,6 @@
     # Setup module interface definition. This is the name the module is using
     # to identify itself in it's headers.
     if (DEFINED CPM_LAST_MODULE_NAME)
-      message("Module's name: ${CPM_LAST_MODULE_NAME}")
       _cpm_check_and_add_preproc(${name} ${CPM_LAST_MODULE_NAME} ${__CPM_FULL_UNID})
     else()
       message(FATAL_ERROR "A module (${name}) failed to define its name!")
@@ -823,7 +815,6 @@
     set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} "${__CPM_MODULE_SOURCE_DIR}/include" PARENT_SCOPE)

   else()
-    message("SKIPPING DIRECTORY")
     _cpm_check_and_add_preproc(${name} ${CPM_KV_SOURCE_ADDED_MAP_${__CPM_FULL_UNID}} ${__CPM_FULL_UNID})
   endif()


board: fvp_baser_aemv8r: Disable cache_state_modelled

The FVP runs extremely slowly (20 to 30 times slow) when we enable 4
cores. Disabling the cache_state_modelled can make it a little bit
quicker.

Signed-off-by: Jaxson Han <70391990969cde8f4f4c008c74e601e9ed3959a1@arm.com>

--- boards/arm64/fvp_baser_aemv8r/board.cmake
+++ boards/arm64/fvp_baser_aemv8r/board.cmake
@@ -35,4 +35,5 @@

   -C bp.vis.disable_visualisation=1
   -C bp.vis.rate_limit-enable=0
+  -C cache_state_modelled=0
   )


workaround to avoid unused warning

workaround to avoid unused warning

--- modules/fc.cmake
+++ modules/fc.cmake
@@ -60,4 +60,10 @@
         message(STATUS "FCFLAGS is set to '$ENV{FCFLAGS}'.")
         set(CMAKE_Fortran_FLAGS "$ENV{FCFLAGS}")
     endif()
+else()
+    # workaround to avoid unused warning
+    if(DEFINED EXTRA_FCFLAGS)
+        set(_unused ${EXTRA_FCFLAGS})
+        unset(_unused)
+    endif()
 endif()


Create `ImageIO` module.

Create `ImageIO` module.

--- cmake/FindDO.cmake
+++ cmake/FindDO.cmake
@@ -44,12 +44,14 @@
   # List the available component libraries in DO++
   # Foundational libraries
   do_append_components(DO_COMPONENTS Core)
+  do_append_components(DO_COMPONENTS ImageIO)
+  #do_append_components(DO_COMPONENTS ImageDrawing)
   do_append_components(DO_COMPONENTS Graphics)

   # TODO: Don't re-enable this components as long there are not properly
   # tested.
   #do_append_components(DO_COMPONENTS KDTree)
-  #do_append_components(DO_COMPONENTS ImageDrawing)
+
   # Image processing
   do_append_components(DO_COMPONENTS ImageProcessing)
   # Geometry


enable threads when using gold linker

enable threads when using gold linker

--- cmake/LDGOLD.cmake
+++ cmake/LDGOLD.cmake
@@ -51,7 +51,7 @@
             get_target_property(TARGET_TYPE ${t} TYPE)

             if (${TARGET_TYPE} STREQUAL INTERFACE_LIBRARY)
-                target_link_libraries(${t} INTERFACE -fuse-ld=gold)
+                target_link_libraries(${t} INTERFACE -fuse-ld=gold -Wl,--threads)
                 if (ENABLE_DEBUGFISSION)
                     target_compile_options(${t} INTERFACE -gsplit-dwarf)
                     target_link_libraries(${t} INTERFACE -Wl,--gdb-index)
@@ -62,7 +62,7 @@
                 endif()

                 if (NOT ${TARGET_TYPE} STREQUAL OBJECT_LIBRARY)
-                    target_link_libraries(${t} PRIVATE -fuse-ld=gold)
+                    target_link_libraries(${t} PRIVATE -fuse-ld=gold -Wl,--threads)
                     if (ENABLE_DEBUGFISSION)
                         target_link_libraries(${t} PRIVATE -Wl,--gdb-index)
                     endif()


:bug: syntax error in re-cmake variable file

--- scripts/PackageLookup.cmake
+++ scripts/PackageLookup.cmake
@@ -292,7 +292,7 @@
         file(WRITE "${cmakefile}"
           "set(CMAKE_PROGRAM_PATH \"${EXTERNAL_ROOT}/bin\" CACHE PATH \"\")\n"
           "set(CMAKE_LIBRARY_PATH \"${EXTERNAL_ROOT}/lib\" CACHE PATH \"\")\n"
-          "set(CMAKE_INCLUDE_PATH"
+          "set(CMAKE_INCLUDE_PATH "
             "\"${EXTERNAL_ROOT}/include\" CACHE PATH \"\")\n"
           "set(CMAKE_PREFIX_PATH \"${EXTERNAL_ROOT}\" CACHE PATH \"\")\n"
           "set(${SANENAME}_RECURSIVE TRUE CACHE INTERNAL \"\")\n"


Can use configure_files as lookup hooks

Can use configure_files as lookup hooks

--- scripts/PackageLookup.cmake
+++ scripts/PackageLookup.cmake
@@ -298,15 +298,20 @@
 # A script that is executed once a package has been built locally
 # This function should be called from the lookup recipe
 function(write_lookup_hook hook package)
-    cmake_parse_arguments(_wpls${package} "APPEND" "SCRIPTNAME" "" ${ARGN})
+    cmake_parse_arguments(_wpls${package} "APPEND" "SCRIPTNAME;CONFIGURE" "" ${ARGN})
+    if(_wpls${package}_APPEND AND _wpls${package}_CONFIGURE)
+        message(FATAL_ERROR "Only one of APPEND and CONFIGURE is valid")
+    endif()

     # Sets filename. That's the only difference between hooks, in practice.
     get_lookup_hookscript_name(${hook} ${package})
     # Then write or append to file.
-    if(_wpls${package}_APPEND)
+    if(_wpls${package}_APPEND AND NOT _wpls${package}_CONFIGURE)
         file(APPEND "${hook_script}" ${_wpls${package}_UNPARSED_ARGUMENTS})
+    else(NOT _wpls${package}_CONFIGURE)
+        file(WRITE "${hook_script}" ${_wpls${package}_UNPARSED_ARGUMENTS})
     else()
-        file(WRITE "${hook_script}" ${_wpls${package}_UNPARSED_ARGUMENTS})
+        configure_file("${_wpls${package}_CONFIGURE}" "${hook_script}" @ONLY)
     endif()
     if(_wpls${package}_SCRIPTNAME)
         set(${_wpls${package}_SCRIPTNAME} "${hook_script}" PARENT_SCOPE)


Actually remove DEAL_II_EXPLICIT_CONSTRUCTOR_BUG.

Follow-up to ac33ee15e72.

--- cmake/checks/check_03_compiler_bugs.cmake
+++ cmake/checks/check_03_compiler_bugs.cmake
@@ -118,35 +118,6 @@
   )

-
-#
-# Some older versions of gcc compile this, despite the 'explicit'
-# keyword:
-#
-# struct X {
-#     template <typename T>
-#     explicit X(T);
-# };
-# void f(X);
-# int main () { f(1); }
-#
-# Check for this misfeature.
-#
-# - Wolfgang Bangerth, Matthias Maier, rewritten 2012
-#
-CHECK_CXX_SOURCE_COMPILES(
-  "
-  struct X {
-    template <typename T>
-    explicit X(T) {}
-  };
-  void f(X) {}
-  int main() { f(1); }
-  "
-  DEAL_II_EXPLICIT_CONSTRUCTOR_BUG
-  )
-
-
 #
 # Some older versions of gcc deduce pointers to const functions in
 # template contexts to pointer-to-function of const objects.


cmake: clean unreferenced functions from OpenCV modules too

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -179,12 +179,24 @@
       string(REPLACE "-ffunction-sections" "" ${flags} "${${flags}}")
       string(REPLACE "-fdata-sections" "" ${flags} "${${flags}}")
     endforeach()
-  elseif(NOT ((IOS OR ANDROID) AND NOT BUILD_SHARED_LIBS) AND NOT MSVC)
-    # Remove unreferenced functions: function level linking
-    add_extra_compiler_option(-ffunction-sections)
-    add_extra_compiler_option(-fdata-sections)
-    if(NOT APPLE AND NOT OPENCV_SKIP_GC_SECTIONS)
-      set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS} -Wl,--gc-sections")
+  else()
+    if(MSVC)
+      # TODO: Clang/C2 is not supported
+    elseif(((IOS OR ANDROID) AND NOT BUILD_SHARED_LIBS) AND NOT OPENCV_FORCE_FUNCTIONS_SECTIONS)
+      # don't create separate sections for functions/data, reduce package size
+    else()
+      # Remove unreferenced functions: function level linking
+      add_extra_compiler_option(-ffunction-sections)
+      add_extra_compiler_option(-fdata-sections)
+      if(NOT OPENCV_SKIP_GC_SECTIONS)
+        if(APPLE)
+          set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS} -Wl,-dead_strip")
+          set(OPENCV_EXTRA_SHARED_LINKER_FLAGS "${OPENCV_EXTRA_SHARED_LINKER_FLAGS} -Wl,-dead_strip")
+        else()
+          set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS} -Wl,--gc-sections")
+          set(OPENCV_EXTRA_SHARED_LINKER_FLAGS "${OPENCV_EXTRA_SHARED_LINKER_FLAGS} -Wl,--gc-sections")
+        endif()
+      endif()
     endif()
   endif()


Improve finding of Fortran compiler

Improve finding of Fortran compiler

Finding out whether a compiler is found in Cmake seems to be really
hard. In particular a non-found Fortran compiler caused issues on MacOS
(ROOT-8510). The inital check for the compiler was

enable_language(Fortran OPTIONAL)

This does not set the the CMAKE_Fortran_COMPILER variable (or sets it to
NOTFOUND) if a Fortran compiler is not found, but still marks the
Fortran language as being enabled for the current project. This broke
the settings for BLAS/LAPACK.

The second attempt (bb40ede3941d0b4f2db4e23d5f9c32b221eb5fac) was to use

check_language(Fortran)
if(CMAKE_Fortran_COMPILER)
  enable_language(Fortran)
endif()

This does not find the Fortran compiler corresponding to the used C++
compiler. Cmake has some mechanism that if the C++ compiler is a GNU
compiler, it would also prefer GNU Fortran compilers. However, as the
check_language test is running in a separate process it would not know
about the C++ compiler. This is a problem in a set-up with executables
like:

/opt/newgcc/g++
/opt/newgcc/gfortran
/usr/bin/f95 (link to gfortran)
/usr/bin/g++
/usr/bin/gfortran

Two versions of GCC are installed, one by the system, and one more
recent version in a separate directory. The directory to the newer
version is in the environment variable PATH before /usr/bin. In this
case the test from above (second attempt) would use /usr/bin/f95 as the
Fortran compiler, because Cmake usually prefers the executable f95 over
gfortran. This causes problems in case the two Fortran compilers are not
ABI compatible, i.e., gfortran 4.4 installed by the system vs. 4.9 as a
slightly more recent version. A simple enable_language (as in the
initial version) would correctly use /opt/newgcc/gfortran in this case.
This had to be worked around by setting the environment variable
FC=gfortran before running Cmake.

To fix this, check_language is only used to determine whether a Fortran
compiler exists at all. If a compiler is found, then the
CMAKE_Fortran_COMPILER variable is reset, and enable_language again
performs a search of the compiler, this time prefering a compiler from
the same vendor as the C++ compiler.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -9,9 +9,23 @@
   if(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
     set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND)
   endif()
-  check_language(Fortran)
   if(CMAKE_Fortran_COMPILER)
+    # CMAKE_Fortran_COMPILER has already been defined somewhere else, so
+    # just check whether it contains a valid compiler
     enable_language(Fortran)
+  else()
+    # CMAKE_Fortran_COMPILER has not been defined, so first check whether
+    # there is a Fortran compiler at all
+    check_language(Fortran)
+    if(CMAKE_Fortran_COMPILER)
+      # Fortran compiler found, however as 'check_language' was executed
+      # in a separate process, the result might not be compatible with
+      # the C++ compiler, so reset the variable, ...
+      unset(CMAKE_Fortran_COMPILER CACHE)
+      # ..., and enable Fortran again, this time prefering compilers
+      # compatible to the C++ compiler
+      enable_language(Fortran)
+    endif()
   endif()
 else()
   set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND)


[cxxmodules] Fix headers paths in Core modulemap.

This replace failed to actually make the paths relative because
of the typo in the variable name and the surrounding parentheses.

This also fixes the nightly modules builds.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -269,7 +269,7 @@
                      macosx meta metacling multiproc newdelete pcre rint
                      rootcling_stage1 textinput thread unix winnt zip)
     foreach(core_folder ${core_folders})
-     string(REPLACE "${CMAKE_SOURCE_DIR}/core/(${core_folders})/inc/" ""  headerfiles "${headerfiles}")
+      string(REPLACE "${CMAKE_SOURCE_DIR}/core/${core_folder}/inc/" ""  headerfiles "${headerfiles}")
     endforeach()
   endif()


[fixed] compiler flag handling

[fixed] compiler flag handling

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -150,12 +150,14 @@
   ENDIF()
 ENDFUNCTION()
 #-------------------------------------------------------------------------------
-FUNCTION( BOTG_FixupCompilerNames compiler )
-
-    # Fix up compiler names
-    IF( compiler STREQUAL "AppleClang" )
-        SET( compiler "Clang" PARENT_SCOPE )
-    ENDIF()
+FUNCTION( BOTG_GetCompilerName lang compiler )
+    SET( compiler_ "${CMAKE_${lang}_COMPILER}")
+    GET_FILENAME_COMPONENT(compiler_ "${compiler_}" NAME_WE)
+    SET( compiler_suite_ "${CMAKE_${lang}_COMPILER_ID}")
+    IF( compiler_suite_ STREQUAL "AppleClang" )
+        SET(compiler_suite_ "Clang" )
+    ENDIF()
+    SET( ${compiler} "${compiler_suite_}/${compiler_}" PARENT_SCOPE )

 ENDFUNCTION()
 #-------------------------------------------------------------------------------
@@ -163,8 +165,7 @@
 MACRO( BOTG_ProcessDefaultFlags lang )

     # Set the compiler name so we can have compiler-dependent flags.
-    SET( compiler "${CMAKE_${lang}_COMPILER_ID}")
-    BOTG_FixUpCompilerNames( compiler )
+    BOTG_GetCompilerName( ${lang} compiler )
     GLOBAL_SET( BOTG_${lang}_COMPILER ${compiler} )
     MESSAGE( STATUS "[BootsOnTheGround] BOTG_${lang}_COMPILER=${BOTG_${lang}_COMPILER}")

@@ -268,8 +269,8 @@
    SET (CMAKE_REQUIRED_DEFINITIONS "${save_defs}")
 ENDMACRO()
 #-------------------------------------------------------------------------------
-FUNCTION( BOTG_MinimumCompilerVersion compiler lang version )
-    BOTG_CompilerMatches( ${compiler} ${lang} found )
+FUNCTION( BOTG_MinimumCompilerVersion lang compiler version )
+    BOTG_CompilerMatches( ${lang} ${compiler} found )
     IF( ${found} AND CMAKE_${lang}_COMPILER_VERSION VERSION_LESS ${version} )
         MESSAGE( FATAL_ERROR "compiler=${compiler} for lang=${lang} is required to have minimum version=${version} but found ${CMAKE_${lang}_COMPILER_VERSION}")
     ENDIF()
@@ -308,36 +309,35 @@
     ENDIF()
 ENDMACRO()
 #-------------------------------------------------------------------------------
-FUNCTION( BOTG_CompilerMatches compiler lang found_compiler )
-   IF( NOT ${compiler} STREQUAL "ANY" )
-        STRING(REGEX MATCH "${compiler}" found ${BOTG_${lang}_COMPILER})
-        SET(${found_compiler} ${found} PARENT_SCOPE)
-        IF( found STREQUAL "" )
-            SET(${found_compiler} OFF PARENT_SCOPE)
-        ELSE()
-            SET(${found_compiler} ON PARENT_SCOPE)
-        ENDIF()
-    ELSE()
-        SET(${found_compiler} ON PARENT_SCOPE)
-    ENDIF()
-ENDFUNCTION()
-#-------------------------------------------------------------------------------
-FUNCTION( BOTG_SystemMatches system found_system)
-   IF( NOT ${system} STREQUAL "ANY" )
-        STRING(REGEX MATCH "${system}" found ${BOTG_SYSTEM})
-        IF( found STREQUAL "" )
-            SET(${found_system} OFF PARENT_SCOPE)
-        ELSE()
-            SET(${found_system} ON PARENT_SCOPE)
-        ENDIF()
-    ELSE()
-        SET(${found_system} ON PARENT_SCOPE)
-    ENDIF()
-ENDFUNCTION()
-#-------------------------------------------------------------------------------
-FUNCTION( BOTG_CompilerAndSystemMatches compiler lang system found_both)
-    BOTG_CompilerMatches( ${compiler} ${lang} found_compiler )
+FUNCTION( BOTG_CompilerMatches lang compiler found )
+    SET(${found} OFF PARENT_SCOPE)
+    IF( ("${compiler}" STREQUAL "ANY") OR ("${compiler}" STREQUAL "") )
+        SET(${found} ON PARENT_SCOPE )
+    ELSE()
+        STRING(REGEX MATCH "${compiler}" found_ ${BOTG_${lang}_COMPILER})
+        IF( NOT "${found_}" STREQUAL "" )
+            SET(${found} ON PARENT_SCOPE)
+        ENDIF()
+    ENDIF()
+ENDFUNCTION()
+#-------------------------------------------------------------------------------
+FUNCTION( BOTG_SystemMatches system found)
+    SET(${found} OFF PARENT_SCOPE)
+    IF( ("${system}" STREQUAL "ANY") OR ("${system}" STREQUAL "") )
+        SET(${found} ON PARENT_SCOPE )
+    ELSE()
+        STRING(REGEX MATCH "${system}" found_ ${BOTG_SYSTEM})
+        IF( NOT "${found_}" STREQUAL "" )
+            SET(${found} ON PARENT_SCOPE)
+        ENDIF()
+    ENDIF()
+ENDFUNCTION()
+#-------------------------------------------------------------------------------
+FUNCTION( BOTG_CompilerAndSystemMatches lang compiler system found_both)
+    BOTG_CompilerMatches( ${lang} ${compiler} found_compiler )
+    MESSAGE(STATUS "[BootsOnTheGround] lang='${lang}' compiler='${compiler}' found='${found_compiler}'")
     BOTG_SystemMatches( ${system} found_system )
+    MESSAGE(STATUS "[BootsOnTheGround] system='${system}' found='${found_system}'")
     IF( found_system AND found_compiler )
         SET(${found_both} ON PARENT_SCOPE )
     ELSE()
@@ -346,7 +346,7 @@
 ENDFUNCTION()
 #-------------------------------------------------------------------------------
 MACRO( BOTG_AddCompilerFlags lang compiler system) #list of flags comes at end
-    BOTG_CompilerAndSystemMatches( ${compiler} ${lang} ${system} found )
+    BOTG_CompilerAndSystemMatches( "${lang}" "${compiler}" "${system}" found )
     IF( found )
         MESSAGE(STATUS "[BootsOnTheGround] adding package=${PACKAGE_NAME} ${lang} flags for compiler='${BOTG_${lang}_COMPILER}' on system='${BOTG_SYSTEM}'")
         FOREACH( flag ${ARGN} )


Do not add include directories with potentially no access.

Fixes #403.

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -188,14 +188,6 @@
 #LLVM_CXX_FLAGS=$($LLVM_CONFIG --cxxflags | sed -e 's/ -pedantic / /g')
 string(REPLACE " -pedantic" "" LLVM_CXXFLAGS "${LLVM_CXXFLAGS}")

-# Llvm-config may be installed or it might be used from build directory, in which case
-# we need to add few extra include paths to find clang includes and compiled includes
-list(APPEND LLVM_INCLUDE_DIRS
-  "${LLVM_INCLUDEDIR}"
-  "${LLVM_SRC_ROOT}/tools/clang/include"
-  "${LLVM_OBJ_ROOT}/include"
-  "${LLVM_OBJ_ROOT}/tools/clang/include")
-
 # Llvm-config does not include clang libs
 set(CLANG_LIBNAMES clangFrontendTool clangFrontend clangDriver clangSerialization
     clangCodeGen clangParse clangSema clangRewrite clangRewriteFrontend


Update Suil.cmake

Update Suil.cmake

--- cmake/Suil.cmake
+++ cmake/Suil.cmake
@@ -314,7 +314,7 @@
         set(${name}_ARTIFACTS_DIR ${SUIL_APP_ARTIFACTS_DIR})
         if (NOT SUIL_APP_ARTIFACTS_DIR)
             set(${name}_ARTIFACTS_DIR ${CMAKE_INSTALL_PREFIX})
-        endif ()
+        endif()

         # install the files
         if (SUIL_APP_INSTALL_FILES)
@@ -343,7 +343,7 @@
             set(${name}_INSTALL_INCFLT "*.h(pp)?")
             if (SUIL_APP_INSTALL_INCFLT)
                 set(${name}_INSTALL_INCFLT ${SUIL_APP_INSTALL_INCFLT})
-            endif
+            endif()
             message(STATUS "target '${name} install includes from: ${SUIL_APP_INSTALL_INCDIR}, patterns: ${${name}_INSTALL_INCFLT}")
             install(DIRECTORY ${SUIL_APP_INSTALL_INCDIR}
                     DESTINATION ${${name}_ARTIFACTS_DIR}/include


Delete FindCPM.cmake

Delete FindCPM.cmake

--- tests/cmake/FindCPM.cmake
+++ tests/cmake/FindCPM.cmake
@@ -1,16 +0,0 @@
-set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpm_packages" CACHE TYPE STRING)
-  find_package(Git)
-  if(NOT GIT_FOUND)
-    message(FATAL_ERROR "CPM requires Git.")
-  endif()
-  if (NOT EXISTS ${CPM_DIR}/CPM.cmake)
-    message(STATUS "Cloning repo (https://github.com/iauns/cpm)")
-    execute_process(
-      COMMAND "${GIT_EXECUTABLE}" clone https://github.com/iauns/cpm ${CPM_DIR}
-      RESULT_VARIABLE error_code
-      OUTPUT_QUIET ERROR_QUIET)
-    if(error_code)
-      message(FATAL_ERROR "CPM failed to get the hash for HEAD")
-    endif()
-  endif()
-include(${CPM_DIR}/CPM.cmake)


cmake: Fix menuconfig target

cmake: Fix menuconfig target

need to load mconf path as build property

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -188,6 +188,8 @@

     idf_build_get_property(menuconfig_depends __MENUCONFIG_DEPENDS)

+    idf_build_get_property(mconf __MCONF)
+
     # Generate the menuconfig target (uses C-based mconf-idf tool, either prebuilt or via mconf-idf target above)
     add_custom_target(menuconfig
         ${menuconfig_depends}
@@ -198,7 +200,7 @@
         "COMPONENT_KCONFIGS_PROJBUILD=${kconfig_projbuilds}"
         "IDF_CMAKE=y"
         "KCONFIG_CONFIG=${sdkconfig}"
-        ${MCONF} ${root_kconfig}
+        ${mconf} ${root_kconfig}
         VERBATIM
         USES_TERMINAL
         # additional run of confgen esures that the deprecated options will be inserted into sdkconfig (for backward


cmake development

cmake development

--- lib/graph/sources.cmake
+++ lib/graph/sources.cmake
@@ -1,8 +1,10 @@
 # $Id$ $Revision$

-SET(graph_SRCDIR ${CMAKE_SOURCE_DIR}/lib/graph)
-
-INCLUDE_DIRECTORIES(${graph_SRCDIR})
+INCLUDE_DIRECTORIES(
+	${graph_SRCDIR}
+	${top_SRCDIR}
+	${cdt_SRCDIR}
+)

 ADD_CUSTOM_COMMAND(
 	WORKING_DIRECTORY ${graph_SRCDIR}


Removed invalidated TODO item.

Removed invalidated TODO item.

--- CPM.cmake
+++ CPM.cmake
@@ -11,15 +11,11 @@
 # addSubdirectory. I tried to take the good of ExternalProject, and merge that
 # with the good of add_subdirectory.
 #
-# TODO: We might need to create a file with all of the static libraries
-#       dependencies in it so that we can link against those at the executable
-#       level. This will be an issue when we have CPM builds relying on other
-#       CPM builds (I don't know if this is already done for external projects).
 # TODO: Add include prefixes. Since we know that all public includes will be
-#       located in ./include, we can copy that directory to a new location
-#       and prefix it with something. This is so we can fix include issues
-#       at the local CMake level instead of having to go upstream with
-#       requests or patch the project.
+#       located in ./include, we can copy the contents of that directory to a
+#       new location and prefix it with something. This is so we can fix
+#       include issues at the local CMake level instead of having to go
+#       upstream with requests or patch the project.
 #       Name: INCLUDE_PREFIX.
 # TODO: Possibly add an output variable for unique id or other paths the user
 #       may want with regards to the module. This way users could add


Remove debug comments.

Remove debug comments.

--- CPM.cmake
+++ CPM.cmake
@@ -1110,8 +1110,6 @@
       set(__CPM_PATH_UNID_VERSION "")
     endif()
     set(__CPM_MODULE_SOURCE_DIR "${tmp_src_dir}")
-    message("Source dir: ${tmp_src_dir}")
-    message("Source dir2: ${_CPM_SOURCE_DIR}")
   endif()

   # Cunstruct full UNID


Attempt to work around non-existant target.

--- CPM.cmake
+++ CPM.cmake
@@ -997,9 +997,10 @@
   if (TARGET ${CPM_TARGET_NAME})
     set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
   else()
-    message(WARNING "Module ${name} did not produce a target. add_dependencies may fail.")
-    message(WARNING "All modules should produce a target, even header only libraries.")
-    message(WARNING "See: add_custom_target")
+    set(CPM_LIBRARIES ${CPM_LIBRARIES} "" PARENT_SCOPE)
+    #message(WARNING "Module ${name} did not produce a target. add_dependencies may fail.")
+    #message(WARNING "All modules should produce a target, even header only libraries.")
+    #message(WARNING "See: add_custom_target")
   endif()

   set(CPM_DEFINITIONS ${CPM_DEFINITIONS} PARENT_SCOPE)


unittest: Support EXTRA_*_FLAGS

unittest: Support EXTRA_*_FLAGS

Signed-off-by: Sebastian Boe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- tests/unit/unittest.cmake
+++ tests/unit/unittest.cmake
@@ -2,9 +2,17 @@
 cmake_policy(SET CMP0000 OLD)
 cmake_policy(SET CMP0002 NEW)

+enable_language(C CXX ASM)
+
 # Parameters:
 #   SOURCES: list of source files, default main.c
 #   INCLUDE: list of additional include paths relative to ZEPHYR_BASE
+
+separate_arguments(  EXTRA_CFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_CFLAGS})
+separate_arguments(  EXTRA_AFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_AFLAGS})
+separate_arguments(EXTRA_CPPFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_CPPFLAGS})
+separate_arguments(EXTRA_CXXFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_CXXFLAGS})
+separate_arguments(EXTRA_LD_FLAGS_AS_LIST UNIX_COMMAND ${EXTRA_LD_FLAGS})

 if(NOT SOURCES)
   set(SOURCES main.c)
@@ -19,7 +27,17 @@

 add_executable(testbinary ${SOURCES})

-target_compile_options(testbinary PRIVATE -Wall)
+target_compile_options(testbinary PRIVATE
+  -Wall
+  ${EXTRA_CPPFLAGS_AS_LIST}
+  ${EXTRA_CFLAGS_AS_LIST}
+  $<$<COMPILE_LANGUAGE:CXX>:${EXTRA_CXXFLAGS_AS_LIST}>
+  $<$<COMPILE_LANGUAGE:ASM>:${EXTRA_AFLAGS_AS_LIST}>
+  )
+
+target_link_libraries(testbinary PRIVATE
+  ${EXTRA_LDFLAGS_AS_LIST}
+  )

 if(COVERAGE)
   target_compile_options(testbinary PRIVATE


refactor

refactor

--- conan.cmake
+++ conan.cmake
@@ -905,6 +905,30 @@
     endif()
 endmacro()

+function(conan_version result)
+    set(${result} "" PARENT_SCOPE)
+
+    if(NOT CONAN_CMD)
+        find_program(CONAN_CMD conan)
+        if(NOT CONAN_CMD AND CONAN_REQUIRED)
+            message(FATAL_ERROR "Conan executable not found! Please install conan.")
+        endif()
+    endif()
+
+    execute_process(COMMAND ${CONAN_CMD} --version
+                    RESULT_VARIABLE return_code
+                    OUTPUT_VARIABLE CONAN_VERSION_OUTPUT
+                    ERROR_VARIABLE CONAN_VERSION_OUTPUT)
+
+    if(NOT "${return_code}" STREQUAL "0")
+      message(FATAL_ERROR "Conan --version failed='${return_code}'")
+    endif()
+
+    string(REGEX MATCH ".*Conan version ([0-9]+\\.[0-9]+\\.[0-9]+)" FOO "${CONAN_VERSION_OUTPUT}")
+
+    set(${result} ${CMAKE_MATCH_1} PARENT_SCOPE)
+endfunction()
+
 macro(conan_check)
     # Checks conan availability in PATH
     # Arguments REQUIRED, DETECT_QUIET and VERSION are optional
@@ -924,25 +948,16 @@
     if(NOT CONAN_DETECT_QUIET)
         message(STATUS "Conan: Found program ${CONAN_CMD}")
     endif()
-    execute_process(COMMAND ${CONAN_CMD} --version
-                    RESULT_VARIABLE return_code
-                    OUTPUT_VARIABLE CONAN_VERSION_OUTPUT
-                    ERROR_VARIABLE CONAN_VERSION_OUTPUT)
-
-    if(NOT "${return_code}" STREQUAL "0")
-      message(FATAL_ERROR "Conan --version failed='${return_code}'")
-    endif()
+
+    conan_version(CONAN_DETECTED_VERSION)

     if(NOT CONAN_DETECT_QUIET)
-        string(STRIP "${CONAN_VERSION_OUTPUT}" _CONAN_VERSION_OUTPUT)
-        message(STATUS "Conan: Version found ${_CONAN_VERSION_OUTPUT}")
+        message(STATUS "Conan: Version found ${CONAN_DETECTED_VERSION}")
     endif()

     if(DEFINED CONAN_VERSION)
-        string(REGEX MATCH ".*Conan version ([0-9]+\\.[0-9]+\\.[0-9]+)" FOO
-            "${CONAN_VERSION_OUTPUT}")
-        if(${CMAKE_MATCH_1} VERSION_LESS ${CONAN_VERSION})
-            message(FATAL_ERROR "Conan outdated. Installed: ${CMAKE_MATCH_1}, \
+        if(${CONAN_DETECTED_VERSION} VERSION_LESS ${CONAN_VERSION})
+            message(FATAL_ERROR "Conan outdated. Installed: ${CONAN_DETECTED_VERSION}, \
                 required: ${CONAN_VERSION}. Consider updating via 'pip \
                 install conan==${CONAN_VERSION}'.")
         endif()


CMake: make OGRE_RESOURCEMANAGER_STRICT=TRUE the recommended option

--- CMake/FeatureSummary.cmake
+++ CMake/FeatureSummary.cmake
@@ -221,9 +221,9 @@
 endif ()

 if (OGRE_RESOURCEMANAGER_STRICT)
-	set(_resmgr "strict [BETA]")
-else ()
-	set(_resmgr "compatible")
+	set(_resmgr "strict")
+else ()
+	set(_resmgr "legacy [DEPRECATED]")
 endif ()

 set(_features "${_features}Build type:                      ${_buildtype}\n")


BUG: Python wrapper modules should be part of runtime installation component, not development.

--- CMake/KitCommonBlock.cmake
+++ CMake/KitCommonBlock.cmake
@@ -69,9 +69,9 @@
   # the shared library containing the wrappers for this kit.
   ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
   TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
-  IF(NOT VTK_INSTALL_NO_LIBRARIES)
+  IF(NOT VTK_INSTALL_NO_RUNTIME)
     INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}Python)
-  ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
+  ENDIF(NOT VTK_INSTALL_NO_RUNTIME)
 ENDIF (VTK_WRAP_PYTHON)

 # if we are wrapping into Java then add the library and extra


Simplify Boost build by using an in-source build configuration.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -78,10 +78,8 @@
       set(_boost_linkflags "linkflags=${_install_rpath_linkflag}")
     endif()

-    set(_build_cmd ${CMAKE_COMMAND} -E chdir "<SOURCE_DIR>"
-        ./b2
+    set(_build_cmd "<SOURCE_DIR>/b2"
         ${APPLE_SYSROOT_FLAG}
-        "--build-dir=<BINARY_DIR>"
         --layout=tagged
         ${_with_boost_libs}
         # Use the option below to view the shell commands (for debugging)
@@ -108,7 +106,9 @@
       LIST_SEPARATOR ${sep}
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/boost_1_56_0.tar.bz2
       URL_MD5 a744cf167b05d72335f27c88115f211d
-      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir "<SOURCE_DIR>" ./bootstrap${_shell_extension}
+      # We use in-source builds for Boost
+      BINARY_DIR ${ep_prefix}/src/${proj}
+      CONFIGURE_COMMAND "<SOURCE_DIR>/bootstrap${_shell_extension}"
         --with-toolset=${_boost_toolset}
         --with-libraries=${_boost_libs}
         "--prefix=<INSTALL_DIR>"


Fix the location of where FindMKL searches for TBB DLLs

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -52,7 +52,7 @@

 if(WIN32)
   if(${MSVC_VERSION} GREATER_EQUAL 1900)
-    set(msvc_dir "vc14")
+    set(msvc_dir "vc_mt")
     set(shared_suffix "_dll")
     set(md_suffix "md")
   else()


FindMKL.cmake: fix target creation

FindMKL.cmake: fix target creation

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -255,7 +255,7 @@
   find_library(M_LIB m)
   mark_as_advanced(M_LIB)
 endif()
-if(MKL_FOUND)
+if(MKL_FOUND AND NOT TARGET MKL::MKL)
   add_library(MKL::MKL SHARED IMPORTED)
   if(MKL_THREAD_LAYER STREQUAL "Sequential")
     set_target_properties(MKL::MKL


NUP-2324 Enable -D_LIBCPP_DEBUG=0 for debug-lite in Clang builds (e.g., OS X). NOTE: Clan't debug mode is not mature, and anything above level 0 appears to require debug build of libc++ during linking, which it not present by default on OS X.

--- CommonCompilerConfig.cmake
+++ CommonCompilerConfig.cmake
@@ -345,6 +345,10 @@
     # to examine containers in gdb.
     # See https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_using.html
     list(APPEND COMMON_COMPILER_DEFINITIONS -D_GLIBCXX_DEBUG)
+  elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+    # NOTE: debug mode is immature in Clang, and values of _LIBCPP_DEBUG above 0
+    # require  the debug build of libc++ to be present at linktime on OS X.
+    list(APPEND COMMON_COMPILER_DEFINITIONS -D_LIBCPP_DEBUG=0)
   endif()

   # Disable optimizations


BUG: force installation of libssl in prefix/lib

--- SuperBuild/CMake/External_openssl.cmake
+++ SuperBuild/CMake/External_openssl.cmake
@@ -77,6 +77,7 @@
     ${SB_ENV_CONFIGURE_CMD}
     ${OPENSSL_SB_SRC}/config ${OPENSSL_BUILD_ARCH}
     "--prefix=${SB_INSTALL_PREFIX}"
+    "--libdir=lib"
     shared
     zlib
     zlib-dynamic


Full path to compiler

Full path to compiler

--- compiler/gcc.cmake
+++ compiler/gcc.cmake
@@ -7,5 +7,31 @@
   set(POLLY_COMPILER_GCC_CMAKE 1)
 endif()

-set(CMAKE_C_COMPILER gcc CACHE STRING "C compiler" FORCE)
-set(CMAKE_CXX_COMPILER g++ CACHE STRING "C++ compiler" FORCE)
+find_program(CMAKE_C_COMPILER gcc)
+find_program(CMAKE_CXX_COMPILER g++)
+
+if(NOT CMAKE_C_COMPILER)
+  polly_fatal_error("gcc not found")
+endif()
+
+if(NOT CMAKE_CXX_COMPILER)
+  polly_fatal_error("g++ not found")
+endif()
+
+set(
+    CMAKE_C_COMPILER
+    "${CMAKE_C_COMPILER}"
+    CACHE
+    STRING
+    "C compiler"
+    FORCE
+)
+
+set(
+    CMAKE_CXX_COMPILER
+    "${CMAKE_CXX_COMPILER}"
+    CACHE
+    STRING
+    "C++ compiler"
+    FORCE
+)


Fix musl + clang 3.6 compile error

Fix musl + clang 3.6 compile error

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -285,6 +285,9 @@
 					add_flags_cxx("-Wno-documentation-unknown-command")
 				endif()
 			endif()
+			if ("${CLANG_VERSION}" VERSION_GREATER 3.5)
+				add_flags_cxx("-Wno-error=disabled-macro-expansion")
+			endif()
 		endif()
 	endif()


update user options

update user options

--- user_options_sample.cmake
+++ user_options_sample.cmake
@@ -4,13 +4,11 @@

 ##############################################################################

-# Whether to use static boost libs
-# Recommanded
-SET (Boost_USE_STATIC_LIBS ON CACHE BOOL "Boost use static libraries")
-
 # The Root directory to find Boost
 # Under this directory `include/boost` and `lib` directory shall be found
 SET (BOOST_ROOT "C:/Program Files/Boost" CACHE PATH "Boost ROOT")
+# If BOOST_ROOT is set, one may also want to turn on Boost_NO_SYSTEM_PATHS
+SET (Boost_NO_SYSTEM_PATHS OFF CACHE BOOL "Do not use system Boost search")

 # For additional Boost related variables see the CMake official FindBoost.cmake


detect and filter-out generator expressions in form $<NOT:$<CONFIG:Debug>...

- Qt uses that


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   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Remove unnecessary separate SSE2 compiler option for Release build target - we always build with SSE2 support

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -49,7 +49,7 @@
       "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /Ob0 /MP -D_SECURE_STL=0"
       CACHE STRING "C++ compiler release-with-debug options" FORCE)
   set(CMAKE_CXX_FLAGS_RELEASE
-      "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 /Oi /Ot /GF /Gy /arch:SSE2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
+      "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 /Oi /Ot /GF /Gy -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
       CACHE STRING "C++ compiler release options" FORCE)
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")


CI: enable otbGRM in CI

CI: enable otbGRM in CI

--- CI/configure_options.cmake
+++ CI/configure_options.cmake
@@ -70,7 +70,7 @@
 set(cmake_configure_option
 "${cmake_configure_option}
 CMAKE_PREFIX_PATH=${XDK_PATH}")
-foreach(remote_module OTBTemporalGapFilling SertitObject)#otbGRM DiapOTBModule
+foreach(remote_module OTBTemporalGapFilling SertitObject otbGRM)# DiapOTBModule
   set(cmake_configure_option
 "${cmake_configure_option}
 Module_${remote_module}:BOOL=ON")


Change patch version to 0 (from 0-beta)

Change patch version to 0 (from 0-beta)

--- CMakeModules/Version.cmake
+++ CMakeModules/Version.cmake
@@ -9,7 +9,7 @@

 SET(FG_VERSION_MAJOR "0")
 SET(FG_VERSION_MINOR "9")
-SET(FG_VERSION_PATCH "0-beta")
+SET(FG_VERSION_PATCH "0")

 SET(FG_VERSION "${FG_VERSION_MAJOR}.${FG_VERSION_MINOR}.${FG_VERSION_PATCH}")
 SET(FG_API_VERSION_CURRENT ${FG_VERSION_MAJOR}${FG_VERSION_MINOR})


CMake: remove hack for gcc4.9+ , unneeded

--- CommonCompilerConfig.cmake
+++ CommonCompilerConfig.cmake
@@ -312,26 +312,6 @@
 	endif()

-	# Compatibility with gcc >= 4.9 which requires the use of gcc's own wrappers for
-	# ar and ranlib in combination with LTO works also with LTO disabled
-	IF(UNIX AND CMAKE_COMPILER_IS_GNUCXX AND (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") AND
-		  CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "4.9")
-		set(CMAKE_AR "gcc-ar")
-		set(CMAKE_RANLIB "gcc-ranlib")
-		# EXTERNAL_STATICLIB_CMAKE_DEFINITIONS_OPTIMIZED duplicates settings for
-		# CMAKE_AR and CMAKE_RANLIB. This is a workaround for a CMAKE bug
-		# (https://gitlab.kitware.com/cmake/cmake/issues/15547) that prevents
-		# the correct propagation of CMAKE_AR and CMAKE_RANLIB variables to all
-		# externals
-		list(APPEND EXTERNAL_STATICLIB_CMAKE_DEFINITIONS_OPTIMIZED
-			 -DCMAKE_AR:PATH=gcc-ar
-			 -DCMAKE_RANLIB:PATH=gcc-ranlib)
-		# And ditto for externals that use the configure-based build system
-		list(APPEND EXTERNAL_STATICLIB_CONFIGURE_DEFINITIONS_OPTIMIZED
-			 AR=gcc-ar
-			 RANLIB=gcc-ranlib)
-	ENDIF()
-

         #
         # set OPTIMIZATION flags
@@ -420,4 +400,3 @@
      set(INTERNAL_CXX_FLAGS_STR "${INTERNAL_CXX_FLAGS_STR} ${flag_item}")
 endforeach()

-


Removing todo items.

Removing todo items.

All completed or not applicable.

--- CPM.cmake
+++ CPM.cmake
@@ -1,21 +1,4 @@
 # CPM - CMake Package Manager
-#
-# TODO: Implement 'export module interface'.
-# TODO: Add source prefixes. We can take advantage of the standard directory
-#       layout of CPM modules and prefix the cloned source directories. These
-#       prefixes will allow us to bypass, however unlikely, header naming
-#       conflicts.
-#       Name: INCLUDE_PREFIX.
-# TODO: Add exetrnal library constraints. Some modules may require the user to
-#       use the same version of GLM it uses, for instance. This is to avoid
-#       conflicts regarding what headers are used. This shouldn't be hard
-#       to do as long as all externals and modules are run through CPM.
-# TODO: Add externals. CPM could check the user's home directory for the
-#       existance of recipes to make external projects. If that is not found,
-#       it can manually download all of the recipes.
-# TODO: Allow copying of source directories into prefixed directories. This
-#       will allow us to change the include prefix on a per-module basis.
-#       this would allow us to avoid namespace conflicts.
 #
 # A CMake module for managing external dependencies.
 # CPM can be used to build traditional C/C++ libraries and CPM modules.


Ensure preprocessor definitions are added for module's chosen name.

--- CPM.cmake
+++ CPM.cmake
@@ -822,6 +822,7 @@

   else()
     message("SKIPPING DIRECTORY")
+    _cpm_check_and_add_preproc(${name} ${CPM_KV_SOURCE_ADDED_MAP_${__CPM_FULL_UNID}} ${__CPM_FULL_UNID})
   endif()

   # Set the appropriate preprocessor definition for this module and populate


CI: build samples on MSVC, update to NDK 12b

--- ci-build.cmake
+++ ci-build.cmake
@@ -44,8 +44,7 @@

     set(OTHER
         -DOGRE_BUILD_DEPENDENCIES=TRUE
-        -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps
-        -DOGRE_BUILD_SAMPLES=FALSE)
+        -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps)

     set(BUILD_DEPS TRUE)
 endif()
@@ -53,7 +52,7 @@
 if(DEFINED ENV{ANDROID})
     set(CROSS
         -DANDROID_NATIVE_API_LEVEL=21
-        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r10e
+        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r12b
         -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CMake/toolchain/android.toolchain.cmake)

     set(RENDERSYSTEMS
@@ -67,17 +66,15 @@

     message(STATUS "Downloading Android NDK")
     file(DOWNLOAD
-        http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin
-        ./android-ndk-r10e-linux-x86_64.bin)
-    execute_process(COMMAND chmod +x android-ndk-r10e-linux-x86_64.bin)
+        http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
+        ./android-ndk-r12b-linux-x86_64.zip)
     message(STATUS "Extracting Android NDK")
-    execute_process(COMMAND ./android-ndk-r10e-linux-x86_64.bin OUTPUT_QUIET)
+    execute_process(COMMAND unzip android-ndk-r12b-linux-x86_64.zip OUTPUT_QUIET)
 endif()

 execute_process(COMMAND cmake
     -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
     -DOGRE_BUILD_TESTS=ON
-    -DOGRE_CONFIG_ALLOCATOR=1 # disable nedalloc
     -DOGRE_BUILD_DEPENDENCIES=${BUILD_DEPS}
     -DSWIG_EXECUTABLE=/usr/bin/swig3.0
     ${RENDERSYSTEMS}


Reverted default BN precision.

Reverted default BN precision.

--- cmake/bn.cmake
+++ cmake/bn.cmake
@@ -1,6 +1,6 @@
 message(STATUS "Multiple precision arithmetic configuration (BN module):\n")

-message("   ** Options for the multiple precision module (default = 1024,DOUBLE,0):")
+message("   ** Options for the multiple precision module (default = 256,DOUBLE,0):")
 message("      BN_PRECI=n        The base precision in bits. Let w be n in words.")
 message("      BN_MAGNI=DOUBLE   A multiple precision integer can store 2w words.")
 message("      BN_MAGNI=CARRY    A multiple precision integer can store w+1 words.")
@@ -36,7 +36,7 @@

 # Choose the arithmetic precision.
 if (NOT BN_PRECI)
-	set(BN_PRECI 1024)
+	set(BN_PRECI 256)
 endif(NOT BN_PRECI)
 set(BN_PRECI ${BN_PRECI} CACHE INTEGER "Arithmetic precision in bits")


cmake: fixed spelling error in os.cmake

cmake: fixed spelling error in os.cmake

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -39,7 +39,7 @@
 if (NOT ARCH)
   if (${CONAN_SETTINGS_ARCH} STREQUAL "x86")
     set(ARCH i686)
-  elseif(${CONAN_SETTINGS_ARCG} STREQUAL "armv8")
+  elseif(${CONAN_SETTINGS_ARCH} STREQUAL "armv8")
     set(ARCH aarch64)
   else()
     set(ARCH ${CONAN_SETTINGS_ARCH})


ENH: it seems that VTK/CMake/vtkTclTkMacros.cmake need to be fixed too. It uses TK_INTERNAL_PATH for testing. The problem is that this macro file is installed by VTK, and used by other projects later on. At that point, TK_INTERNAL_PATH is not set, so it fails... One way to do it would be to probably configure that macro so that it tests TK_INTERNAL_PATH in the build tree, and VTK_TK_INTERNAL_DIR in the install tree (VTK_TK_INTERNAL_DIR is the variable that gets the value from TK_INTERNAL_PATH, more or less, in VTKConfig.cmake). I don't know if it is the right way, the problem is that this macro is used all over the place, at a time where it is hard to know if VTK_TK_INTERNAL_DIR would ever be set properly (unlikely right now since it is done at the end of the main CMakeLists.txt). This is especially true for larger projects like VV and PV that do some some hacks and redefine some (but not all) variables to prevent VTK from being Tcl wrapped besides Common and vtkTkRenderWidget & co. So in the meantime, the macro will now test TK_INTERNAL_PATH if it is not empty, and VTK_TK_INTERNAL_DIR otherwise...

--- CMake/vtkTclTkMacros.cmake
+++ CMake/vtkTclTkMacros.cmake
@@ -15,11 +15,16 @@

   SET (${tcl_tk_major_version} "")
   SET (${tcl_tk_minor_version} "")
+  IF (TK_INTERNAL_PATH)
+    SET (try_tk_internal_path ${TK_INTERNAL_PATH})
+  ELSE (TK_INTERNAL_PATH)
+    SET (try_tk_internal_path ${VTK_TK_INTERNAL_DIR})
+  ENDIF (TK_INTERNAL_PATH)
   FOREACH (tcl_tk_minor_version_try "2" "3" "4")
-    IF ("${TK_INTERNAL_PATH}" MATCHES "tk8\\.?${tcl_tk_minor_version_try}")
-      SET (${tcl_tk_major_version} "8")
-      SET (${tcl_tk_minor_version} ${tcl_tk_minor_version_try})
-    ENDIF ("${TK_INTERNAL_PATH}" MATCHES "tk8\\.?${tcl_tk_minor_version_try}")
+    IF ("${try_tk_internal_path}" MATCHES "tk8\\.?${tcl_tk_minor_version_try}")
+      SET (${tcl_tk_major_version} "8")
+      SET (${tcl_tk_minor_version} ${tcl_tk_minor_version_try})
+    ENDIF ("${try_tk_internal_path}" MATCHES "tk8\\.?${tcl_tk_minor_version_try}")
     IF ("${TCL_LIBRARY}" MATCHES "tcl8\\.?${tcl_tk_minor_version_try}")
       SET (${tcl_tk_major_version} "8")
       SET (${tcl_tk_minor_version} ${tcl_tk_minor_version_try})


Disabling ICU

Disabling ICU

Summary: It is assumed that ICU is not available, which automatically disables this options. This causes problems if another ICU version is found somewhere, e.g. by Anaconda. In this case the build fails.

Test Plan: Coevred by current tests since ICU was disabled in most cases anyway until now.

Reviewers: O1 MITK Core, kislinsk

Reviewed By: O1 MITK Core, kislinsk

Maniphest Tasks: T26438

Differential Revision: https://phabricator.mitk.org/D204

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -48,6 +48,7 @@
          -DDCMTK_WITH_TIFF:BOOL=OFF  # see bug #9894
          -DDCMTK_WITH_XML:BOOL=OFF  # see bug #9894
          -DDCMTK_WITH_ICONV:BOOL=OFF  # see bug #9894
+         -DDCMTK_WITH_ICU:BOOL=OFF  # see T26438
          ${${proj}_CUSTOM_CMAKE_ARGS}
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}


Added /lib64 to search paths.

Added /lib64 to search paths.

--- CMakeModules/FindOSG.cmake
+++ CMakeModules/FindOSG.cmake
@@ -43,7 +43,9 @@
         ~/Library/Frameworks
         /Library/Frameworks
         /usr/local/lib
+        /usr/local/lib64
         /usr/lib
+        /usr/lib64
         /sw/lib
         /opt/local/lib
         /opt/csw/lib
@@ -72,7 +74,9 @@
         ~/Library/Frameworks
         /Library/Frameworks
         /usr/local/lib
+        /usr/local/lib64
         /usr/lib
+        /usr/lib64
         /sw/lib
         /opt/local/lib
         /opt/csw/lib


If COIN3D is not found with pkg-config, but with manual search, the only output seen on the screen is an error message. Add a success-message!

--- cMake/FindCoin3D.cmake
+++ cMake/FindCoin3D.cmake
@@ -104,5 +104,6 @@

 IF(COIN3D_LIBRARIES)
   SET( COIN3D_FOUND "YES" )
+  message("COIN3D Libraries found")
 ENDIF(COIN3D_LIBRARIES)


Output actual results and queries as CDATA blocks, for ease in cut-and-paste.

--- test/fots/ImportFOTS.cmake
+++ test/fots/ImportFOTS.cmake
@@ -69,7 +69,8 @@
     "-e fotsPath:=${_outdir}/2011/QT3-test-suite/catalog.xml "
     "-e mode:=run-test-sets -e testSetPrefixes:=${_testset} "
     "-e expectedFailuresPath:=${BUILDDIR}/FOTSExpectedFailures.xml "
-    "--disable-http-resolution --indent)\n"
+    "--disable-http-resolution --indent "
+    "-z cdata-section-elements=\"fots:query result\")\n"
     "ZORBA_SET_TEST_PROPERTY (FOTS/${_testset} "
     "FAIL_REGULAR_EXPRESSION \"result=\\\"fail\\\"\")\n")

@@ -94,7 +95,8 @@
       "-e mode:=run-test-case "
       "-e testSetName:=${_testset} -e testCaseName:=${_testcase} "
       "-e expectedFailuresPath:=${BUILDDIR}/FOTSExpectedFailures.xml "
-      "--disable-http-resolution --indent)\n"
+      "--disable-http-resolution --indent "
+      "-z cdata-section-elements=\"fots:query result\")\n"
       "ZORBA_SET_TEST_PROPERTY (FOTS/${_testset}/${_testcase} "
       "PASS_REGULAR_EXPRESSION \"name=\\\"${_testcase}\\\" result=\\\"pass\\\"\")\n")
   ENDFOREACH (_testcase)


Find python3 first

Find python3 first

--- CMake/hoomd/HOOMDPythonSetup.cmake
+++ CMake/hoomd/HOOMDPythonSetup.cmake
@@ -5,6 +5,8 @@
 if (HOOMD_INCLUDE_DIR)
     list(APPEND CMAKE_MODULE_PATH ${HOOMD_INCLUDE_DIR}/hoomd/extern/pybind/tools)
 endif()
+
+set(PYBIND11_PYTHON_VERSION 3)

 # trick pybind11 tools to allow us to manage C++ flags
 # cmake ignores this in 2.8, but when pybind11 sees this


share a little bit more

share a little bit more

--- cmake/FindCyclus.cmake
+++ cmake/FindCyclus.cmake
@@ -43,6 +43,7 @@
 # Look for the header files
 FIND_PATH(CYCLUS_CORE_SHARE_DIR cyclus.rng.in
   HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
+        "${CYCLUS_ROOT_DIR}/share" "${CYCLUS_ROOT_DIR}/share/cyclus"
   /usr/local/cyclus /opt/local/cyclus
   PATH_SUFFIXES cyclus/share share)


[cmake] FindMATLAB: set version for unix

--- cmake/FindMATLAB.cmake
+++ cmake/FindMATLAB.cmake
@@ -127,11 +127,14 @@

     # Search for a version of Matlab available, starting from the most modern one to older versions
       FOREACH(MATVER "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a" "R2009b" "R2009a" "R2008b")
+        SET(MATLAB_VERSION ${MATVER})
         IF((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))
           IF(EXISTS /Applications/MATLAB_${MATVER}.app)
             SET(MATLAB_ROOT /Applications/MATLAB_${MATVER}.app)
+            break()
           ELSEIF(EXISTS /Applications/MATLAB_${MATVER}_Student.app)
-             SET(MATLAB_ROOT /Applications/MATLAB_${MATVER}_Student.app)
+            SET(MATLAB_ROOT /Applications/MATLAB_${MATVER}_Student.app)
+            break()
           ENDIF(EXISTS /Applications/MATLAB_${MATVER}.app)
         ENDIF((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))
       ENDFOREACH(MATVER)


Fix for Python lib called libpython3.2m.a

It seems we need to check for both libpython3.2.a and libpython3.2m.a.

--- cmake/FindPython.cmake
+++ cmake/FindPython.cmake
@@ -22,7 +22,9 @@
 string(STRIP ${PYTHON_VERSION} PYTHON_VERSION)
 message(STATUS "Python version: ${PYTHON_VERSION}")

-FIND_LIBRARY(PYTHON_LIBRARY NAMES python${PYTHON_VERSION}
+FIND_LIBRARY(PYTHON_LIBRARY NAMES
+        python${PYTHON_VERSION}
+        python${PYTHON_VERSION}m
     PATHS ${PYTHON_LIB_PATH}
     NO_DEFAULT_PATH
     NO_SYSTEM_ENVIRONMENT_PATH


fix misspelled expected variable

fix misspelled expected variable

--- cmake/LLVMIRUtil.cmake
+++ cmake/LLVMIRUtil.cmake
@@ -13,7 +13,7 @@

 set(LLVM_IR_UTIL_VERSION_MAJOR "2")
 set(LLVM_IR_UTIL_VERSION_MINOR "4")
-set(LLVM_IR_UTIL_VERSION_PATCH "1")
+set(LLVM_IR_UTIL_VERSION_PATCH "3")

 string(CONCAT LLVM_IR_UTIL_VERSION
   ${LLVM_IR_UTIL_VERSION_MAJOR} "."
@@ -476,7 +476,7 @@
         "llvmir_attach_bc_target: extraneous arguments provided")
     endif()
   else()
-    if(LLVMIR_ATTACH_UPARSED_ARGUMENTS)
+    if(LLVMIR_ATTACH_UNPARSED_ARGUMENTS)
       message(FATAL_ERROR
         "llvmir_attach_bc_target: extraneous arguments provided")
     endif()
@@ -511,7 +511,9 @@
     list(APPEND IN_FULL_LLVMIR_FILES "${IN_LLVMIR_DIR}/${IN_LLVMIR_FILE}")
   endforeach()

-  add_executable(${TRGT} ${LLVMIR_ATTACH_UPARSED_ARGUMENTS} ${IN_FULL_LLVMIR_FILES})
+  add_executable(${TRGT}
+    ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS}
+    ${IN_FULL_LLVMIR_FILES})

   set_property(TARGET ${TRGT} PROPERTY LINKER_LANGUAGE ${LINKER_LANGUAGE})
   set_property(TARGET ${TRGT} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${OUT_DIR})


[cmake] fixes more undefined macro warnings

--- config.h.cmake
+++ config.h.cmake
@@ -29,6 +29,7 @@
 #define DS_FINAL  ${DS_FINAL}
 #define HAVE_DUNE_FEM_PARAMETER_REPLACE 0

+/*** Silence implicitly False evaluation of undefined macro warnings ****/
 #ifndef HAVE_DUNE_FEM
 # define HAVE_FUNE_FEM 0
 #endif
@@ -88,5 +89,40 @@
 #ifndef HAVE_CONSTEXPR
 # define HAVE_CONSTEXPR 0
 #endif
+
+#ifndef HAVE_DUNE_METAGRID
+# define HAVE_DUNE_METAGRID 0
+#endif
+
+#ifndef HAVE_DUNE_SPGRID
+# define HAVE_DUNE_SPGRID 0
+#endif
+
+#ifndef HAVE_PETSC
+# define HAVE_PETSC 0
+#endif
+
+#ifndef HAVE_ALUGRID
+# define HAVE_ALUGRID 0
+#endif
+
+#ifndef DUNE_FEM_COMPATIBILITY
+# define DUNE_FEM_COMPATIBILITY 0
+#endif
+
+#ifndef HAVE_ALBERTA
+# define HAVE_ALBERTA 0
+#endif
+
+#ifndef HAVE_UG
+# define HAVE_UG 0
+#endif
+
+#ifndef HAVE_ALBERTA
+# define HAVE_ALBERTA 0
+#endif
+
+/*** End: Silence implicitly False evaluation of undefined macro warnings ****/
+
 /* end dune-stuff */
 // NEVER delete/alter above comment, dune's cmake crap relies on it


* Remove commented out code

* Remove commented out code

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

--- qt/qtguess.pl.cmake
+++ qt/qtguess.pl.cmake
@@ -39,19 +39,6 @@
 my $allinc = '@all_includes@';
 my $alllib = '@all_libs@';

-# my %x;
-# $x{'LIBPNG'}  =   '@LIBPNG@';
-# $x{'LIBJPEG'} =   '@LIBJPEG@';
-# $x{'LIBSM'}   =   '@LIBSM@';
-# $x{'LIBSOCKET'} = '@LIBSOCKET@';
-# $x{'LIBDL'}      = '@LIBDL@';
-# $x{'LIBRESOLV'}  = '@LIBRESOLV@';
-# $x{'LIB_X11'} =   '@LIB_X11@';
-# $x{'X_PRE_LIBS'} = '@X_PRE_LIBS@';
-# $x{'LIB_X11'} =~ s/\$\((.*?)\)/$x{$1}/g;
-#
-# $qtflags =~ s/\$\((.*?)\)/$x{$1}/g;
-
  -e "$qtcoreinc/qglobal.h" or die "Invalid Qt include directory.\n";

 my $ccmd = "$cc $ccflags $allinc $alllib -o $tmp $tmp.cpp";
@@ -68,7 +55,6 @@
 print "Number of defines to be tested : $used/$total\n\n" unless $opt_q;
 open( QTDEFS, ">>".($opt_o || "qtdefines") ) or die "Can't open output file: $!\n";

-#grab_qglobal_symbols();
 preliminary_test();
 perform_all_tests();

@@ -90,37 +76,6 @@
 	return "$tmpdir/$tmpname";
 }

-#--------------------------------------------------------------#
-
-sub grab_qglobal_symbols
-{
-	my $cmd = "$cc -E -D__cplusplus -dM -I$qtcoreinc $qtcoreinc/qglobal.h 2>/dev/null";
-	my $symbols = `$cmd`;
-        for(0..1)
-        {
-	    if( check_exit_status($?) )
-	    {
-		while( $symbols =~/^#\s*define\s*(QT_\S+)/gm )
-		{
-			$qtdefs{$1} = 1;
-		}
-		print "Found ". scalar( keys %qtdefs )." predefined symbol".((scalar( keys %qtdefs ) -1)?"s":"")." in qglobal.h\n" unless ($opt_q or !(keys %qtdefs));
-		while( $symbols =~/^#\s*define\s*QT_MODULE_(\S+)/gm )
-		{
-			$qtundefs{"QT_NO_$1"} = 1;
-		}
-		print "Found ". scalar( keys %qtundefs )." undefined symbol".((scalar( keys %qtundefs ) -1)?"s":"")." in qglobal.h\n" unless ($opt_q or !(keys %qtundefs));
-                last;
-	    }
-	    elsif(! $_) # first try
-	    {
-		print  "Failed to run $cmd.\nTrying without __cplusplus (might be already defined)\n";
-                $cmd = "$cc -E -dM -I$qtcoreinc $qtcoreinc/qglobal.h 2>/dev/null";
-                $symbols = `$cmd`;
-                next;
-	    }
-        }
-}

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

@@ -250,7 +205,6 @@
 our %tests = (
 	"QT_NO_ACCESSIBILITY" =>        ["QtGui/qaccessible.h", "QAccessibleEvent event(QEvent::AccessibilityHelp, 0);", 15],
 	"QT_NO_ACTION" =>		["QtGui/qaction.h", "QAction foo( (QObject*)NULL );", 5],
-	#QT_NO_BIG_CODECS
  	"QT_NO_BUTTONGROUP" =>		["QtGui/qbuttongroup.h", "QButtonGroup foo( (QObject*)NULL );", 12],
  	"QT_NO_CHECKBOX" =>		["QtGui/qcheckbox.h", "QCheckBox foo( (QWidget*)NULL );", 10],
 	"QT_NO_CLIPBOARD" => 		["QtGui/qapplication.h, QtGui/qclipboard.h", q"
@@ -258,7 +212,6 @@
 						QClipboard *baz= foo.clipboard();
 					", 5],
  	"QT_NO_COLORDIALOG" =>		["QtGui/qcolordialog.h", "QColorDialog::customCount();", 12],
-	#QT_NO_COLORNAMES
  	"QT_NO_COMBOBOX" =>		["QtGui/qcombobox.h", "QComboBox foo( (QWidget*)NULL );", 10],
 	"QT_NO_COMPAT" =>		["QtGui/qfontmetrics.h", q"
 						QFontMetrics *foo= new QFontMetrics( QFont() );
@@ -268,38 +221,27 @@
  						QApplication foo( argc, argv );
  						foo.addLibraryPath( QString::null );
 					", 5],
-	#QT_NO_COP
  	"QT_NO_CURSOR" =>		["QtGui/qcursor.h", "QCursor foo;", 5],
  	"QT_NO_DATASTREAM" =>		["QtCore/qdatastream.h", "QDataStream foo;", 5],
  	"QT_NO_DATETIMEEDIT" =>		["QtGui/qdatetimeedit.h", "QTimeEdit foo;", 12],
 	"QT_NO_DIAL" =>			["QtGui/qdial.h", "QDial foo;", 10],
 	"QT_NO_DIALOG" =>		["QtGui/qdialog.h", "QDialog foo;", 12],
 	"QT_NO_DIR" =>			["QtCore/qdir.h", "QDir foo;", 5],
-	#QT_NO_DIRECTPAINTER
 	"QT_NO_DOM" =>			["QtXml/qdom.h", "QDomDocumentType foo;", 5],
 	"QT_NO_DRAGANDDROP" =>		["QtGui/qevent.h", "QDropEvent foo( QDropEvent() );", 5],
 	"QT_NO_DRAWUTIL" =>		["QtGui/qdrawutil.h, QtGui/qcolor.h", "qDrawPlainRect( (QPainter *) NULL, 0, 0, 0, 0, QColor() );", 10],
-	#QT_NO_EFFECTS
 	"QT_NO_ERRORMESSAGE" => 	["QtGui/qerrormessage.h", "QErrorMessage foo( (QWidget*) NULL );", 13],
 	"QT_NO_FILEDIALOG" =>		["QtGui/qfiledialog.h", "QFileDialog foo();", 13],

 	"QT_NO_FONTDATABASE" =>		["QtGui/qfontdatabase.h", "QFontDatabase foo;", 5],
 	"QT_NO_FONTDIALOG" => 		["QtGui/qfontdialog.h",   "QFontDialog::getFont( (bool *)NULL );", 12],
 	"QT_NO_FRAME" => 		["QtGui/qframe.h", "QFrame foo;", 10],
-	#QT_NO_FREETYPE
  	"QT_NO_FTP" =>	["QtNetwork/qftp.h", "QFtp foo;", 9],
 	"QT_NO_GROUPBOX" =>		["QtGui/qgroupbox.h", "QGroupBox foo;", 12],
-	#QT_NO_IMAGEFORMAT_BMP
-	#QT_NO_IMAGEFORMAT_JPEG
-	#QT_NO_IMAGEFORMATPLUGIN
-	#QT_NO_IMAGEFORMAT_PNG
-	#QT_NO_IMAGEFORMAT_PPM
-	#QT_NO_IMAGEFORMAT_XBM
  	"QT_NO_IMAGE_HEURISTIC_MASK" =>	["QtGui/qimage.h", q"
 						QImage *foo = new QImage;
 						foo->createHeuristicMask();
 					", 8],
-	#QT_NO_IMAGE_TEXT
 	"QT_NO_IMAGEIO" => 		["QtGui/qbitmap.h, QtCore/qstring.h", q"
 						QBitmap foo( QString::fromLatin1('foobar') );
 					", 5],
@@ -328,7 +270,6 @@
 	"QT_NO_MESSAGEBOX" =>		["QtGui/qmessagebox.h", "QMessageBox foo;", 13],
 	"QT_NO_MOVIE" =>		["QtGui/qmovie.h", "QMovie foo;", 5],
 	"QT_NO_NETWORK" =>		["QtNetwork/qnetworkproxy.h", "QNetworkProxy foo;", 5],
-	#QT_NO_NETWORKPROXY
 	"QT_NO_PALETTE" =>		["QtGui/qpalette.h", "QPalette foo;", 5],
 	"QT_NO_PICTURE" =>		["QtGui/qpicture.h", "QPicture foo;", 5],
 	"QT_NO_PRINTER" =>		["QtGui/qprinter.h", "QPrinter foo();", 5],
@@ -340,35 +281,16 @@
 	"QT_NO_PUSHBUTTON" =>		["QtGui/qpushbutton.h", "QPushButton foo( (QWidget *) NULL );", 12],
 	"QT_NO_QUUID_STRING" =>		["QtCore/quuid.h", "QUuid foo( QString() );", 8],
 	"QT_NO_RADIOBUTTON" =>		["QtGui/qradiobutton.h", "QRadioButton foo( (QWidget *) NULL );", 12],
-	#QT_NO_QWS_ALPHA_CURSOR
-	#QT_NO_QWS_DECORATION_DEFAULT
-	#QT_NO_QWS_INPUTMETHODS
-	#QT_NO_QWS_KEYBOARD
-	#QT_NO_QWS_MOUSE
-	#QT_NO_QWS_MOUSE_AUTO
-	#QT_NO_QWS_MOUSE_MANUAL
-	#QT_NO_QWS_MULTIPROCESS
-	#QT_NO_QWS_PROPERTIES
-	#QT_NO_QWS_QPF
-	#QT_NO_RESIZEHANDLER
-	#QT_NO_RUBBERBAND
 	"QT_NO_SCROLLBAR" =>		["QtGui/qscrollbar.h", "QScrollBar foo( (QWidget *) NULL );", 12],
 	"QT_NO_SESSIONMANAGER" =>	["QtGui/qapplication.h", q"
   						QApplication foo( argc, argv );
   						foo.sessionId();
 					", 15],
 	"QT_NO_SETTINGS" =>		["QtCore/qsettings.h", "QSettings foo;", 5],
-	#QT_NO_SHORTCUT
 	"QT_NO_SIGNALMAPPER" =>		["QtCore/qsignalmapper.h", "QSignalMapper foo( (QObject *) NULL );", 0],
 	"QT_NO_SIZEGRIP" =>		["QtGui/qsizegrip.h", "QSizeGrip foo( (QWidget *) NULL );", 10],
 	"QT_NO_SLIDER" =>		["QtGui/qslider.h", "QSlider foo( (QWidget *) NULL );", 12],
 	"QT_NO_SOUND" =>		["QtGui/qsound.h", "QSound foo( QString::null );", 5],
-	#QT_NO_SPINWIDGET
-	#QT_NO_SPLASHSCREEN
-	#QT_NO_STACKEDWIDGET
-	#QT_NO_STATUSBAR
-	#QT_NO_STATUSTIP
-	#QT_NO_STL
 	"QT_NO_STRINGLIST" =>		["qstringlist.h", "QStringList foo;", 0],
 	"QT_NO_STYLE_PLASTIQUE" =>		["QtGui/qplastiquestyle.h", "QPlastiqueStyle foo;", 16],
  	"QT_NO_STYLE_WINDOWSXP" =>	["QtGui/qwindowsxpstyle.h", "QWindowsXPStyle foo;", 16],
@@ -394,7 +316,6 @@
 						};
 						Q_EXPORT_PLUGIN2( 'Foo', QFoo )
 					"],
-	#QT_NO_TEXTDATE
  	"QT_NO_TEXTEDIT" =>		["QtGui/qtextedit.h", "QTextEdit foo;", 13],
     "QT_NO_TEXTSTREAM" =>           ["QtCore/qtextstream.h", "QTextStream foo;", 5],
     "QT_NO_THREAD" =>           ["QtCore/qthread.h", "QFoo foo;", 5, q"
@@ -409,10 +330,6 @@
     "QT_NO_TOOLBAR" =>              ["QtGui/qtoolbar.h", "QToolBar foo;", 10],
     "QT_NO_TOOLBUTTON" =>           ["QtGui/qtoolbutton.h", "QToolButton foo((QWidget *) NULL );", 12],
     "QT_NO_TOOLTIP" =>              ["QtGui/qtooltip.h", "QToolTip::palette();", 10],
-	#QT_NO_TRANSLATION
-	#QT_NO_UDPSOCKET
-	#QT_NO_URLINFO
-	#QT_NO_VALIDATOR
     "QT_NO_VARIANT" =>              ["QtCore/qvariant.h", "QVariant foo;", 0],
     "QT_NO_WHATSTHIS" =>            ["QtGui/qwhatsthis.h", "QWhatsThis::inWhatsThisMode();", 10],
 	"QT_NO_WHEELEVENT" =>		["QtGui/qevent.h", "QWheelEvent foo( QPoint(1,1), 1, (Qt::MouseButtons)1, 0 );", 5],


Update plugin for Windows

Update plugin for Windows

--- cmake/Qt5Widgets_HunterPlugin_5_5.cmake
+++ cmake/Qt5Widgets_HunterPlugin_5_5.cmake
@@ -216,7 +216,7 @@
   )

   # defined: '_glBindBuffer'
-  _qt_cmake_extra_helpers_add_interface(Qt5::Widgets Qt5::Gui_GLESv2)
+  # _qt_cmake_extra_helpers_add_interface(Qt5::Widgets Qt5::Gui_GLESv2)

   # defined: '_hb_buffer_create'
   _qt_cmake_extra_helpers_add_interface_release_debug(
@@ -226,11 +226,11 @@
   )

   # defined: 'CreateTLSIndex'
-  _qt_cmake_extra_helpers_add_interface_release_debug(
-      Qt5::Widgets
-      "${_qt_install_prefix}/lib/translator.lib"
-      "${_qt_install_prefix}/lib/translatord.lib"
-  )
+  # _qt_cmake_extra_helpers_add_interface_release_debug(
+  #      Qt5::Widgets
+  #     "${_qt_install_prefix}/lib/translator.lib"
+  #     "${_qt_install_prefix}/lib/translatord.lib"
+  # )

   # defined: '_pcre16_compile2'
   _qt_cmake_extra_helpers_add_interface_release_debug(
@@ -259,7 +259,7 @@
   _qt_cmake_extra_helpers_add_interface(Qt5::Widgets winmm)

   # defined: '_eglChooseConfig'
-  _qt_cmake_extra_helpers_add_interface(Qt5::Widgets Qt5::Gui_EGL)
+  # _qt_cmake_extra_helpers_add_interface(Qt5::Widgets Qt5::Gui_EGL)

   # defined: '_Direct3DCreate9'
   _qt_cmake_extra_helpers_add_interface(Qt5::Widgets d3d9)
@@ -275,11 +275,11 @@
   )

   # defined: 'pp::Preprocessor::Preprocessor'
-  _qt_cmake_extra_helpers_add_interface_release_debug(
-      Qt5::Widgets
-      "${_qt_install_prefix}/lib/preprocessor.lib"
-      "${_qt_install_prefix}/lib/preprocessord.lib"
-  )
+  # _qt_cmake_extra_helpers_add_interface_release_debug(
+  #    Qt5::Widgets
+  #    "${_qt_install_prefix}/lib/preprocessor.lib"
+  #    "${_qt_install_prefix}/lib/preprocessord.lib"
+  #)
 elseif(MINGW)
   _qt_cmake_extra_helpers_add_source(
       Qt5::Widgets


Update BuildGoogleBreakpad.cmake

Update BuildGoogleBreakpad.cmake

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -16,20 +16,20 @@
     INSTALL_COMMAND ""
   )

-  ExternalProject_Add_Step(
-    breakpad
-    download-gyp
-    DEPENDEES download
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/tools/gyp
-    COMMAND git clone https://github.com/bnoordhuis/gyp.git ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/tools/gyp
-  )
+  #ExternalProject_Add_Step(
+  #  breakpad
+  #  download-gyp
+  #  DEPENDEES download
+  #  COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/tools/gyp
+  #  COMMAND git clone https://github.com/bnoordhuis/gyp.git ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/tools/gyp
+  #)

-  ExternalProject_Add_Step(
-    breakpad
-    generate-gyp
-    DEPENDEES download
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/tools/gyp/gyp ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/client/windows/breakpad_client.gyp
-  )
+  #ExternalProject_Add_Step(
+  #  breakpad
+  #  generate-gyp
+  #  DEPENDEES download
+  #  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/tools/gyp/gyp ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/client/windows/breakpad_client.gyp
+  #)

   ExternalProject_Add_Step(
     breakpad
@@ -126,4 +126,4 @@
   endif()
 endif()

-SET_PROPERTY(TARGET breakpad                PROPERTY FOLDER "ThirdParty")+SET_PROPERTY(TARGET breakpad                PROPERTY FOLDER "ThirdParty")


SVN_SILENT made messages (.desktop file)

--- plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
+++ plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
@@ -15,6 +15,7 @@
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Morse.
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Morse.
 Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Morse.
+Comment[sl]=Uporabniški vmesnik za prilagoditev računov, ki uporabljajo upravljalnik povezav Morse.
 Comment[sr]=Корисничко сучеље за подешавање посебних налога под менаџером везе Морзе.
 Comment[sr@ijekavian]=Корисничко сучеље за подешавање посебних налога под менаџером везе Морзе.
 Comment[sr@ijekavianlatin]=Korisničko sučelje za podešavanje posebnih naloga pod menadžerom veze Morse.


Update CMake script for raspberry pi

Update CMake script for raspberry pi

--- toolchains/raspberrypi.cmake
+++ toolchains/raspberrypi.cmake
@@ -12,27 +12,24 @@

 # add sources and include headers
 find_sources_and_include_directories(
-  ${PROJECT_SOURCE_DIR}/rpi/src/*.h
-  ${PROJECT_SOURCE_DIR}/rpi/src/*.cpp)
+  ${PROJECT_SOURCE_DIR}/platforms/rpi/src/*.h
+  ${PROJECT_SOURCE_DIR}/platforms/rpi/src/*.cpp)

 # add linux dependencies
 set(LINUX_SOURCES
-    ${PROJECT_SOURCE_DIR}/linux/src/urlWorker.cpp
-    ${PROJECT_SOURCE_DIR}/linux/src/platform_linux.cpp)
+  ${PROJECT_SOURCE_DIR}/platforms/linux/src/urlWorker.cpp
+  ${PROJECT_SOURCE_DIR}/platforms/linux/src/platform_linux.cpp)

-include_directories(${PROJECT_SOURCE_DIR}/linux/src)
+include_directories(${PROJECT_SOURCE_DIR}/platforms/linux/src)

 find_sources_and_include_directories(
-  ${PROJECT_SOURCE_DIR}/core/common/platform_gl.h
-  ${PROJECT_SOURCE_DIR}/core/common/platform_gl.cpp)
+  ${PROJECT_SOURCE_DIR}/platforms/common/platform_gl.h
+  ${PROJECT_SOURCE_DIR}/platforms/common/platform_gl.cpp)

 # include headers for rpi-installed libraries
 include_directories(/opt/vc/include/)
 include_directories(/opt/vc/include/interface/vcos/pthreads)
 include_directories(/opt/vc/include/interface/vmcs_host/linux)
-
-# load library dependencies
-add_subdirectory(${PROJECT_SOURCE_DIR}/external)

 # load core library
 add_subdirectory(${PROJECT_SOURCE_DIR}/core)
@@ -40,6 +37,6 @@
 add_executable(${EXECUTABLE_NAME} ${SOURCES} ${LINUX_SOURCES})

 target_link_libraries(${EXECUTABLE_NAME}
-    ${CORE_LIBRARY} -lcurl)
+  ${CORE_LIBRARY} -lcurl)

 add_resources(${EXECUTABLE_NAME} "${PROJECT_SOURCE_DIR}/scenes")


[FIX] use more warnings on ICC, but disable some

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -153,9 +153,15 @@
   set (CMAKE_COMPILER_IS_GNUCXX TRUE)
 endif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")

+# Intel
+set (COMPILER_IS_INTEL FALSE)
+if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+  set (COMPILER_IS_INTEL TRUE)
+endif (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+
 # GCC Setup

-if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
+if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL)
   # Tune warnings for GCC.
   set (CMAKE_CXX_WARNING_LEVEL 4)
   # NOTE: First location to set SEQAN_CXX_FLAGS at the moment.  If you write
@@ -194,6 +200,9 @@
   elseif (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
     set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_CXX_FLAGS_RELEASE} -g -fno-omit-frame-pointer")
   endif ()
+
+  # disable some warnings on ICC
+  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -wd3373,2102")
 endif ()

 # Windows Setup


s,PREFIX,TAG,

s,PREFIX,TAG,

--- iOS.cmake
+++ iOS.cmake
@@ -18,7 +18,7 @@
 set(ENV{CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "" FORCE)

 set(POLLY_TOOLCHAIN_NAME "iOS")
-set(POLLY_TOOLCHAIN_PREFIX "ios")
+set(POLLY_TOOLCHAIN_TAG "ios")

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


Fix typeo in warning message

Fix typeo in warning message

--- CMake/sitkUseGTest.cmake
+++ CMake/sitkUseGTest.cmake
@@ -74,7 +74,7 @@
     add_library(GTest::Main ALIAS ${GTEST_MAIN_LIBRARIES})

   else()
-    message(WARNING "CTEST_ROOT appears to be a source directory \
+    message(WARNING "GTEST_ROOT appears to be a source directory \
     but \"gtest/gtest.h\"  can not be found in source directory: \
     ${GTEST_ROOT}")
   endif()


Fix the CMAKE_MAKE_PROGRAM variable is not set in 3rd party libraries

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -116,6 +116,7 @@
             -DBUILD_SHARED_LIBS=${OGREDEPS_SHARED}
             -G ${CMAKE_GENERATOR}
             -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
+            -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
             ${CROSS}
             ${PROJECT_BINARY_DIR}/zlib-1.2.11
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/zlib-1.2.11)
@@ -138,6 +139,7 @@
         -DBUILD_SHARED_LIBS=${OGREDEPS_SHARED}
         -G ${CMAKE_GENERATOR}
         -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
+        -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
         ${CROSS}
         ${PROJECT_BINARY_DIR}/zziplib-develop
         WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/zziplib-develop)
@@ -168,6 +170,7 @@
             ${CROSS}
             -G ${CMAKE_GENERATOR}
             -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
+            -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
             ${PROJECT_BINARY_DIR}/freetype-2.9
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/freetype-2.9/objs)
         execute_process(COMMAND ${CMAKE_COMMAND}
@@ -189,6 +192,7 @@
             -DSDL_STATIC=FALSE
             -G ${CMAKE_GENERATOR}
             -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
+            -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
             ${CROSS}
             ${PROJECT_BINARY_DIR}/SDL2-2.0.8
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/SDL2-build)


Fix Boost variable usage, Boost is in lower case

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40824

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -168,7 +168,7 @@
   ${CEGUI_INCLUDE_DIRS}
   ${OIS_INCLUDE_DIRS}
   ${Cg_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIRS}
   ${X11_INCLUDE_DIR}
   ${DirectX_INCLUDE_DIRS}
   ${CppUnit_INCLUDE_DIRS}
@@ -178,7 +178,7 @@
 link_directories(
   ${OPENGL_LIBRARY_DIRS}
   ${Cg_LIBRARY_DIRS}
-  ${BOOST_LIBRARY_DIRS}
+  ${Boost_LIBRARY_DIRS}
   ${X11_LIBRARY_DIRS}
   ${DirectX_LIBRARY_DIRS}
   ${CppUnit_LIBRARY_DIRS}


Silly quotation mark.

Silly quotation mark.

--- CMake/travis_build.cmake
+++ CMake/travis_build.cmake
@@ -1,4 +1,4 @@
-set(CTEST_SOURCE_DIRECTORY ".."")
+set(CTEST_SOURCE_DIRECTORY "..")
 set(CTEST_BINARY_DIRECTORY ".")
 include(${CTEST_SOURCE_DIRECTORY}/CMake/travis_common.cmake)


Change download method of VTK to Git clone

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -54,8 +54,8 @@

   ExternalProject_Add(${proj}
     LIST_SEPARATOR ${sep}
-    URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/VTK-9.1.0.tar.gz
-    URL_MD5 96508e51d7c3764cd5aba06fffd9864e
+    GIT_REPOSITORY https://github.com/Kitware/VTK.git
+    GIT_TAG v9.1.0
     CMAKE_GENERATOR ${gen}
     CMAKE_GENERATOR_PLATFORM ${gen_platform}
     CMAKE_ARGS


Fix iOS try_compile

Fix iOS try_compile

Set global variables:
* CMAKE_XCODE_EFFECTIVE_PLATFORMS
* MACOSX_BUNDLE_GUI_IDENTIFIER
* CMAKE_MACOSX_BUNDLE
* CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY

--- ios.cmake
+++ ios.cmake
@@ -24,12 +24,12 @@
 endif()

 set(CMAKE_OSX_SYSROOT "iphoneos" CACHE STRING "System root for iOS" FORCE)
+set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")

-# Skip compiler check:
-#     http://cmake.org/Bug/view.php?id=12288
-#     http://code.google.com/p/ios-cmake/issues/detail?id=1
-set(CMAKE_CXX_COMPILER_WORKS TRUE CACHE BOOL "Skip compiler check" FORCE)
-set(CMAKE_C_COMPILER_WORKS TRUE CACHE BOOL "Skip compiler check" FORCE)
+# Fix try_compile
+set(MACOSX_BUNDLE_GUI_IDENTIFIER com.example)
+set(CMAKE_MACOSX_BUNDLE YES)
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")

 # find 'iphoneos' and 'iphonesimulator' roots and version
 find_program(XCODE_SELECT_EXECUTABLE xcode-select)


find bzip2 zlib packages on MSW from xpSetFlags

* xpSetFlags() should be called from root-level CMake, so these packages are "global"
* this makes their bz2 and zlibstatic targets available globally for use in BOOST_DEFINITIONS
* boost iostreams has been built special (in externpro) with bzip2 and zlib support

see issue https://github.com/smanders/externpro/issues/182#issuecomment-382561894

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1999,6 +1999,9 @@
   endif()
   if(MSVC)
     xpSetFlagsMsvc()
+    if(EXISTS ${xpThisDir}/usexp-bzip2-config.cmake AND EXISTS ${xpThisDir}/usexp-zlib-config.cmake)
+      xpFindPkg(PKGS bzip2 zlib) # for BOOST_DEFINITIONS
+    endif()
   elseif(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
     xpSetFlagsGcc()
   endif()


COMP: fix otbIncludeDirectories.cmake

COMP: fix otbIncludeDirectories.cmake

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -52,8 +52,7 @@
 #  ${OTB_SOURCE_DIR}/Utilities/otbgalib
   ${OTB_SOURCE_DIR}/Utilities/otbkml
   ${OTB_SOURCE_DIR}/Utilities/otbkml/src
-#   ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party
-#   ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party/boost_1_34_1
+  ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party
 #  ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party/zlib-1.2.3
 #  ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party/zlib-1.2.3/contrib
   ${OTB_SOURCE_DIR}/Utilities/otbliblas/include
@@ -64,6 +63,12 @@
   ${OTB_BINARY_DIR}/Code/Visualization

 )
+
+IF(NOT OTB_USE_EXTERNAL_BOOST)
+  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
+    ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party/boost_1_34_1)
+ENDIF(NOT OTB_USE_EXTERNAL_BOOST)
+
 IF(OTB_COMPILE_JPEG2000)
   SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
         ${OTB_SOURCE_DIR}/Utilities/otbopenjpeg


cmake px4fmu-v2_test: disable sdlog2 (avoids flash overflow)

--- cmake/configs/nuttx_px4fmu-v2_test.cmake
+++ cmake/configs/nuttx_px4fmu-v2_test.cmake
@@ -111,7 +111,7 @@
 	#
 	# Logging
 	#
-	modules/sdlog2
+	#modules/sdlog2

 	#
 	# Library modules


Work CI-CD (#2027)

Work CI-CD (#2027)

***NO_CI***

--- CMake/binutils.common.cmake
+++ CMake/binutils.common.cmake
@@ -149,9 +149,19 @@

 # Add common target sources to a specific CMake target
 # To be called from target CMakeList.txt
-macro(nf_add_common_sources target)
-
-    target_sources(${target}.elf PUBLIC
+# mandatory TARGET parameter to set the target
+# optional EXTRA_LIBRARIES with extra libraries to be included in the target build
+macro(nf_add_common_sources)
+
+    # parse arguments
+    cmake_parse_arguments(
+        NFACS
+        ""
+        "TARGET"
+        "EXTRA_LIBRARIES"
+        ${ARGN})
+
+    target_sources(${NFACS_TARGET}.elf PUBLIC

         ${CMAKE_CURRENT_SOURCE_DIR}/target_common.c
         ${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c
@@ -161,9 +171,9 @@
     )

     # sources specific to nanoBooter
-    if(${target} STREQUAL ${NANOBOOTER_PROJECT_NAME})
-
-        target_sources(${target}.elf PUBLIC
+    if(${NFACS_TARGET} STREQUAL ${NANOBOOTER_PROJECT_NAME})
+
+        target_sources(${NFACS_TARGET}.elf PUBLIC
             ${NANOBOOTER_PROJECT_SOURCES}
             ${WireProtocol_SOURCES}
         )
@@ -171,12 +181,12 @@
         # include configuration manager file
         if(NF_FEATURE_HAS_CONFIG_BLOCK)
             # feature enabled, full support
-            target_sources(${target}.elf PUBLIC
+            target_sources(${NFACS_TARGET}.elf PUBLIC
                 ${CMAKE_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager.c)

         else()
             # feature disabled, stubs only
-            target_sources(${target}.elf PUBLIC
+            target_sources(${NFACS_TARGET}.elf PUBLIC
                 ${CMAKE_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c)

         endif()
@@ -184,21 +194,22 @@
     endif()

     # sources specific to nanoCRL
-    if(${target} STREQUAL ${NANOCLR_PROJECT_NAME})
-
-        target_link_libraries(${target}.elf
+    if(${NFACS_TARGET} STREQUAL ${NANOCLR_PROJECT_NAME})
+
+        target_link_libraries(${NFACS_TARGET}.elf
             nano::NF_CoreCLR
             nano::NF_NativeAssemblies
             nano::NF_Debugger
             nano::WireProtocol
+
+            ${NFACS_EXTRA_LIBRARIES}
         )

-        target_sources(${target}.elf PUBLIC
+        target_sources(${NFACS_TARGET}.elf PUBLIC

             ${NANOCLR_PROJECT_SOURCES}

             # sources for nanoFramework libraries
-            ${NF_Diagnostics_SOURCES}
             ${Graphics_Sources}
         )

@@ -432,8 +443,8 @@
     cmake_parse_arguments(
         NFSTBC
         "HAS_NANOBOOTER"
-        "BOOTER_EXTRA_SOURCE_FILES;CLR_EXTRA_SOURCE_FILES"
         "BOOTER_LINKER_FILE;CLR_LINKER_FILE;BOOTER_EXTRA_LINKMAP_PROPERTIES;CLR_EXTRA_LINKMAP_PROPERTIES;BOOTER_EXTRA_COMPILE_DEFINITIONS;CLR_EXTRA_COMPILE_DEFINITIONS;BOOTER_EXTRA_COMPILE_OPTIONS;CLR_EXTRA_COMPILE_OPTIONS;BOOTER_EXTRA_LINK_FLAGS;CLR_EXTRA_LINK_FLAGS"
+        "BOOTER_EXTRA_SOURCE_FILES;CLR_EXTRA_SOURCE_FILES;BOOTER_EXTRA_LIBRARIES;CLR_EXTRA_LIBRARIES"
         ${ARGN})

     if(NOT NFSTBC_HAS_NANOBOOTER
@@ -481,7 +492,7 @@
         nf_add_platform_packages(TARGET ${NANOBOOTER_PROJECT_NAME})
         nf_add_platform_dependencies(${NANOBOOTER_PROJECT_NAME})

-        nf_add_common_sources(${NANOBOOTER_PROJECT_NAME})
+        nf_add_common_sources(TARGET ${NANOBOOTER_PROJECT_NAME})
         nf_add_platform_sources(${NANOBOOTER_PROJECT_NAME})

         # include directories for nanoBooter
@@ -527,7 +538,7 @@
     nf_add_platform_packages(TARGET ${NANOCLR_PROJECT_NAME})
     nf_add_platform_dependencies(${NANOCLR_PROJECT_NAME})

-    nf_add_common_sources(${NANOCLR_PROJECT_NAME})
+    nf_add_common_sources(TARGET ${NANOCLR_PROJECT_NAME} EXTRA_LIBRARIES ${CLR_EXTRA_LIBRARIES})
     nf_add_platform_sources(${NANOCLR_PROJECT_NAME})

     # include directories for nanoCLR


Automatically create symlinks for Qt Frameworks after installing

--- qt4.cmake
+++ qt4.cmake
@@ -96,6 +96,13 @@
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} $(MAKE) install
 )

+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+	ExternalProject_Add_Step(${qt4_NAME} ${qt4_NAME}-create-symlinks
+	   COMMAND "for i in `ls ${BUILDEM_DIR}/lib | grep \.framework`; do ln -s ${BUILDEM_DIR}/lib/$i/Headers ${BUILDEM_DIR}/include/`echo $i | sed 's/\.framework//g'`; done"
+	   DEPENDEES install
+	)
+endif()
+
 set_target_properties(${qt4_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)

 endif (NOT qt4_NAME)


Removed Red CMake Module

Removed Red CMake Module

--- Red.cmake
+++ Red.cmake
@@ -1,9 +0,0 @@
-SET(Red_SRC
-    "Red/Hardware/Linux/LinuxHardware.cpp"
-    "Red/Network/BSD/BSDSocket.cpp"
-    "Red/Network/BSD/BSDSocketSubsystem.cpp"
-    "Red/Thread/POSIX/POSIXCriticalSection.cpp"
-   )
-
-SET(Red_DEPS
-   )


Bump for rubber band fixes

Bump for rubber band fixes

--- versions.cmake
+++ versions.cmake
@@ -80,7 +80,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision locally before proposing a move
-  set(_paraview_revision "eda913252d27e0d7d968b1dd93826f309e653dfb")
+  set(_paraview_revision "b9a216aa78b1570bbd6e73133730782f4a6efdae")
 endif()
 # Locally patched ParaView repo, or main repo
 #set(_paraview_repo "https://gitlab.kitware.com/paraview/paraview.git")


ENH: superbuild: use openthreads archive also on Windows

--- SuperBuild/CMake/External_openthreads.cmake
+++ SuperBuild/CMake/External_openthreads.cmake
@@ -18,7 +18,8 @@
   message(STATUS "  Using OpenThreads SuperBuild version")

   #TODO: try to use cmake variable for DOWNLOAD_COMMAND for different platforms
-  if(MSVC)
+  #if(MSVC)
+  if(0)
     ExternalProject_Add(${proj}
       PREFIX ${proj}
       SVN_REPOSITORY "http://svn.openscenegraph.org/osg/OpenThreads/tags/OpenThreads-2.3.0/"
@@ -34,7 +35,8 @@
         ${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt ${OPENTHREADS_SB_SRC}
         CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     )
-  else(UNIX or APPLE)
+  #else(UNIX or APPLE)
+  else()
     ExternalProject_Add(${proj}
       PREFIX ${proj}
       URL "http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip"


remove ITKReview dependency since migration of Objectness filter

--- itk-module.cmake
+++ itk-module.cmake
@@ -18,7 +18,6 @@
 # define the dependencies of the include module and the tests
 itk_module(SimpleITKFiltersModule
   DEPENDS
-    ITKReview
     ITKImageFeature
   TEST_DEPENDS
     ITKTestKernel


fix wrong variable name in docblock

fix wrong variable name in docblock

--- rclcpp/cmake/get_rclcpp_information.cmake
+++ rclcpp/cmake/get_rclcpp_information.cmake
@@ -19,7 +19,7 @@
 # with the given prefix.
 #
 # :param rmw_implementation: the RMW implementation name
-# :type target: string
+# :type rmw_implementation: string
 # :param var_prefix: the prefix of all output variable names
 # :type var_prefix: string
 #


Add cmake flags for testing compilation with lto and hardening.

--- build_settings.cmake
+++ build_settings.cmake
@@ -26,7 +26,7 @@

 # Warnings
 set(C_WARN_OPTS "-Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
-if (VESPA_USE_SANITIZER)
+if (VESPA_USE_SANITIZER OR VESPA_DISABLE_INLINE_WARNINGS)
     # Instrumenting code changes binary size, which triggers inlining warnings that
     # don't happen during normal, non-instrumented compilation.
 else()
@@ -71,6 +71,11 @@
   set(VESPA_XXHASH_DEFINE "-DXXH_INLINE_ALL")
 endif()

+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND VESPA_USE_LTO)
+  # Enable lto
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto=auto -ffat-lto-objects")
+endif()
+
 # C and C++ compiler flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} ${VESPA_XXHASH_DEFINE} -DBOOST_DISABLE_ASSERTS ${VESPA_CPU_ARCH_FLAGS} ${EXTRA_C_FLAGS}")
 # AddressSanitizer/ThreadSanitizer work for both GCC and Clang
@@ -91,6 +96,11 @@
   if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_NO_CXX98_FUNCTION_BASE")
   endif()
+endif()
+
+# Hardening
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND VESPA_USE_HARDENING)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection")
 endif()

 # Linker flags


Bump version

Bump version

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -20,7 +20,7 @@

 SET(OSPRAY_VERSION_MAJOR 1)
 SET(OSPRAY_VERSION_MINOR 4)
-SET(OSPRAY_VERSION_PATCH 0)
+SET(OSPRAY_VERSION_PATCH 1)
 SET(OSPRAY_VERSION_GITHASH 0)
 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
   FIND_PACKAGE(Git)


Boost.Cmake defines Boost_USE_STATIC for static linking to boost libraries

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@2650 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -2,6 +2,7 @@

 if(NOT PCL_SHARED_LIBS OR WIN32)
   set(Boost_USE_STATIC_LIBS ON)
+  set(Boost_USE_STATIC ON)
 endif(NOT PCL_SHARED_LIBS OR WIN32)

 if(${CMAKE_VERSION} VERSION_LESS 2.8.5)


Depend on Boost chrono if needed (see issue #741)

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -25,8 +25,9 @@

 # Required boost modules
 find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)
-# Chrono doesn't seem to be available in < 1.47
-#find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time chrono iostreams)
+if(WIN32 AND Boost_VERSION VERSION_GREATER "1.49")
+  find_package(Boost 1.40.0 REQUIRED COMPONENTS chrono)
+endif(WIN32 AND Boost_VERSION VERSION_GREATER "1.49")

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)


Boost.Cmake defines Boost_USE_STATIC for static linking to boost libraries

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


* [CMake] BugFix: Correctly set the description and default values of TORQUE_POSIX_PATH_CASE_INSENSITIVE and TORQUE_ZIP_PATH_CASE_INSENSITIVE.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -163,10 +163,10 @@
 option(TORQUE_MULTITHREAD "Multi Threading" ON)
 mark_as_advanced(TORQUE_MULTITHREAD)

-option(TORQUE_POSIX_PATH_CASE_INSENSITIVE ON)
+option(TORQUE_POSIX_PATH_CASE_INSENSITIVE "POSIX Pathing Case Insensitivity" ON)
 mark_as_advanced(TORQUE_POSIX_PATH_CASE_INSENSITIVE)

-option(TORQUE_ZIP_PATH_CASE_INSENSITIVE ON)
+option(TORQUE_ZIP_PATH_CASE_INSENSITIVE "ZIP Pathing Case Insensitivity" ON)
 mark_as_advanced(TORQUE_ZIP_PATH_CASE_INSENSITIVE)

 option(TORQUE_DISABLE_MEMORY_MANAGER "Disable memory manager" ON)


TBB will get refound of TBB_ROOT is changed

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -19,6 +19,9 @@
     DOC "Root of TBB installation"
     PATHS ${PROJECT_SOURCE_DIR}/tbb "C:/Program Files (x86)/Intel/Composer XE/tbb"
   )
+  SET(TBB_INCLUDE_DIR TBB_INCLUDE_DIR-NOTFOUND)
+  SET(TBB_LIBRARY TBB_LIBRARY-NOTFOUND)
+  SET(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)

   IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
     SET(TBB_ARCH intel64)
@@ -47,6 +50,13 @@
     DOC "Root of TBB installation"
     PATHS ${PROJECT_SOURCE_DIR}/tbb /opt/intel/composerxe/tbb
   )
+  SET(TBB_INCLUDE_DIR TBB_INCLUDE_DIR-NOTFOUND)
+  SET(TBB_LIBRARY TBB_LIBRARY-NOTFOUND)
+  SET(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
+
+  SET(TBB_INCLUDE_DIR_MIC TBB_INCLUDE_DIR_MIC-NOTFOUND)
+  SET(TBB_LIBRARY_MIC TBB_LIBRARY_MIC-NOTFOUND)
+  SET(TBB_LIBRARY_MALLOC_MIC TBB_LIBRARY_MALLOC_MIC-NOTFOUND)

   IF (APPLE)
     IF (ENABLE_INSTALLER)


Accomodate SuSE and Ubuntu

Accomodate SuSE and Ubuntu

--- cmake/Modules/cvmfs_compiler.cmake
+++ cmake/Modules/cvmfs_compiler.cmake
@@ -42,8 +42,8 @@
     OUTPUT_VARIABLE CVMFS_GCC_VERSION
     ERROR_VARIABLE  CVMFS_GCC_VERSION
   )
-  STRING(REGEX REPLACE "[A-Za-z]* \\(GCC\\) ([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CVMFS_GCC_MAJOR "${CVMFS_GCC_VERSION}")
-  STRING(REGEX REPLACE "[A-Za-z]* \\(GCC\\) [0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" CVMFS_GCC_MINOR "${CVMFS_GCC_VERSION}")
+  STRING(REGEX REPLACE "[A-Za-z]* \\(.+\\) ([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CVMFS_GCC_MAJOR "${CVMFS_GCC_VERSION}")
+  STRING(REGEX REPLACE "[A-Za-z]* \\(.+\\) [0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" CVMFS_GCC_MINOR "${CVMFS_GCC_VERSION}")
   if (${CVMFS_GCC_MAJOR} LESS 4)
     message (FATAL_ERROR "GCC < 4.1 unsupported")
   endif (${CVMFS_GCC_MAJOR} LESS 4)


#6 export jemalloc targets so mysql/maria can use them

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -17,11 +17,11 @@
       "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc"
   )

-add_library(jemalloc STATIC IMPORTED)
+add_library(jemalloc STATIC IMPORTED GLOBAL)
 set_target_properties(jemalloc PROPERTIES IMPORTED_LOCATION
   "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc_pic.a")
 add_dependencies(jemalloc build_jemalloc)
-add_library(jemalloc_nopic STATIC IMPORTED)
+add_library(jemalloc_nopic STATIC IMPORTED GLOBAL)
 set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION
   "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
 add_dependencies(jemalloc_nopic build_jemalloc)


update

update

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -32,13 +32,13 @@
                     "${GLFW_DIR}/lib"
                     "${GLFW_DIR}/lib-vc2015"
             )
-        elseif (MSVC14 AND ((${MSVC_VERSION} GREATER_EQUAL 1910) AND (${MSVC_VERSION} LESS 1920)))
+        elseif (MSVC14 AND (${MSVC_VERSION} GREATER_EQUAL 1910) AND (${MSVC_VERSION} LESS 1920))
             find_library (GLFW_LIB NAMES glfw3
                 PATHS
                     "${GLFW_DIR}/lib"
                     "${GLFW_DIR}/lib-vc2017"
             )
-        elseif (MSVC14 AND ((${MSVC_VERSION} GREATER_EQUAL 1920) AND (${MSVC_VERSION} LESS 1930)))
+        elseif (MSVC14 AND (${MSVC_VERSION} GREATER_EQUAL 1920) AND (${MSVC_VERSION} LESS 1930))
             find_library (GLFW_LIB NAMES glfw3
                 PATHS
                     "${GLFW_DIR}/lib"


Find GLFW in source builds on Linux

Find GLFW in source builds on Linux

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -33,6 +33,9 @@
     $ENV{PROGRAMFILES}/GLFW/lib
     $ENV{PROGRAMFILES}/GLFW/lib/x64
     $ENV{PROGRAMFILES}/GLFW/lib-msvc120
+    $ENV{GLFW_HOME}/build/src
+    $ENV{GLFW_HOME}/build-debug/src
+    $ENV{GLFW_HOME}/build-release/src
     /usr/lib64
     /usr/local/lib64
     /sw/lib64