FIX: check if the Linux/Nix compiler has color support

--- CMakeLists.default.cmake
+++ CMakeLists.default.cmake
@@ -14,12 +14,21 @@
 	)
 endif(NOT CMAKE_BUILD_TYPE)

+include(CheckCXXCompilerFlag)
+CHECK_CXX_COMPILER_FLAG("-fdiagnostics-color=auto" HAS_COMPILER_COLORS)
+
 if (CMAKE_COMPILER_IS_GNUCXX)
+	if (HAS_COMPILER_COLORS)
+		set(COMPILER_FLAGS_OPTS "-fdiagnostics-color=auto")
+	else (HAS_COMPILER_COLORS)
+		set(COMPILER_FLAGS_OPTS "")
+	endif (HAS_COMPILER_COLORS)
+
 	set(CMAKE_C_FLAGS "-Wall -Wshadow -Wconversion -Wno-sign-conversion -pedantic-errors -fstrict-aliasing -fstack-protector-all -std=c99 ${CMAKE_USER_C_FLAGS}" CACHE STRING
 		"Flags used by the compiler during all build types." FORCE
 	)

-	set(CMAKE_C_FLAGS_DEBUG "-fdiagnostics-color=auto -g ${CMAKE_USER_C_FLAGS}"  CACHE STRING
+	set(CMAKE_C_FLAGS_DEBUG "${COMPILER_FLAGS_OPTS} -g ${CMAKE_USER_C_FLAGS}"  CACHE STRING
 		"Flags used by the compiler during debug build." FORCE
 	)


Clear "redundant move" warning when build LLVM (#1697)

Clear warnings like below when building LLVM JIT and wamrc:
  llvm-project/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h:73:25:
  warning: redundant move in return statement [-Wredundant-move]
  73 |         return std::move(Err);

--- build-scripts/config_common.cmake
+++ build-scripts/config_common.cmake
@@ -105,6 +105,15 @@
   add_definitions(${LLVM_DEFINITIONS})
   message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
   message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
+
+  # Disable -Wredundant-move when building LLVM JIT
+  include(CheckCXXCompilerFlag)
+  if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+    check_cxx_compiler_flag("-Wredundant-move" CXX_SUPPORTS_REDUNDANT_MOVE_FLAG)
+    if (CXX_SUPPORTS_REDUNDANT_MOVE_FLAG)
+      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-redundant-move")
+    endif ()
+  endif ()
 else ()
   unset (LLVM_AVAILABLE_LIBS)
 endif ()


Better ROS finding

Better ROS finding

--- CMakeModules/FindROS.cmake
+++ CMakeModules/FindROS.cmake
@@ -22,33 +22,34 @@
 SET(ROS_VERSION CACHE STRING "ROS version")
 SET(ROS_FOUND FALSE)

-IF(NOT DEFINED ROS_VERSION)
+IF(ROS_VERSION MATCHES "")
   MESSAGE("ROS_VERSION not defined")
   FOREACH(version ${AVAILABLE_ROS_VERSIONS})
-    IF(NOT DEFINED ROS_VERSION)
+    IF(NOT ROS_FOUND)
       FIND_PATH(ROS_H ros.h PATHS /opt/ros/${version}/include/ros)
       IF(ROS_H)
         MESSAGE(STATUS "Found ros version ${version}")
-        SET(ROS_VERSION ${version} CACHE STRING "ROS version")
+        SET(ROS_VERSION2 ${version})
         SET(ROS_FOUND 1)
       ENDIF(ROS_H)
-    ENDIF(NOT DEFINED ROS_VERSION)
+    ENDIF(NOT ROS_FOUND)
   ENDFOREACH(version)
-ELSE(NOT DEFINED ROS_VERSION)
+ELSE(ROS_VERSION MATCHES "")
   MESSAGE("ROS_VERSION defined as " ${ROS_VERSION})
   FIND_PATH(ROS_H ros.h PATHS /opt/ros/${ROS_VERSION}/include/ros)
   IF(ROS_H)
     MESSAGE("Found ros version ${ROS_VERSION}")
     SET(ROS_FOUND 1)
+    SET(ROS_VERSION2 ${version})
   ENDIF(ROS_H)
-ENDIF(NOT DEFINED ROS_VERSION)
+ENDIF(ROS_VERSION MATCHES "")

 IF(NOT ROS_FOUND)
   MESSAGE(WARNING "ROS files not found")
 ELSE(NOT ROS_FOUND)
-  SET(ROS_PATH /opt/ros/${ROS_VERSION})
+  SET(ROS_PATH /opt/ros/${ROS_VERSION2})
   SET(ROS_INCLUDE_DIR ${ROS_PATH}/include)
-  MESSAGE(STATUS "Detected ROS version ${ROS_VERSION}")
+  MESSAGE(STATUS "Detected ROS version ${ROS_VERSION2}")
   FOREACH(NAME ${ROSDEPS})
     FIND_LIBRARY(${NAME}_LIB NAMES ${NAME} PATHS ${ROS_PATH}/lib)
     LIST(APPEND ROS_LIBRARIES ${${NAME}_LIB})


Fix ant/Java detection in cmake scripts

Fix ant/Java detection in cmake scripts

Mac OS X 10.7 and newer don't come with Java installed. They do
include some stub binaries, which ask the user if they want to
install Java when run.

OpenCV's cmake script just checks for the existence of an ant
binary and assumes that Java's available if ant is. As a result,
cmake will configure the build to use Java and it will fail once
it tries to compile the Java bindings.

This fixes the issue by checking for the exit status of
`ant -version` - it exits 0 if Java is installed, or 1
otherwise.(cherry picked from commit a423afddc143f4b10e09e7b253a420b29f877b6c)

--- cmake/OpenCVDetectApacheAnt.cmake
+++ cmake/OpenCVDetectApacheAnt.cmake
@@ -16,10 +16,16 @@

 if(ANT_EXECUTABLE)
   execute_process(COMMAND ${ANT_EXECUTABLE} -version
+    RESULT_VARIABLE ANT_ERROR_LEVEL
     OUTPUT_VARIABLE ANT_VERSION_FULL
     OUTPUT_STRIP_TRAILING_WHITESPACE)
-  string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" ANT_VERSION "${ANT_VERSION_FULL}")
-  set(ANT_VERSION "${ANT_VERSION}" CACHE INTERNAL "Detected ant vesion")
+  if (ANT_ERROR_LEVEL)
+    unset(ANT_EXECUTABLE)
+    unset(ANT_EXECUTABLE CACHE)
+  else()
+    string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" ANT_VERSION "${ANT_VERSION_FULL}")
+    set(ANT_VERSION "${ANT_VERSION}" CACHE INTERNAL "Detected ant vesion")

-  message(STATUS "Found apache ant ${ANT_VERSION}: ${ANT_EXECUTABLE}")
+    message(STATUS "Found apache ant ${ANT_VERSION}: ${ANT_EXECUTABLE}")
+  endif()
 endif()


xcc: do not assume clang by default

xcc: do not assume clang by default

Some toolchain variants come with no clang support, so do not assume
clang by default and enable this using the enviornment variable
XCC_USE_CLANG.

export XCC_USE_CLANG=1

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

--- cmake/toolchain/xcc/generic.cmake
+++ cmake/toolchain/xcc/generic.cmake
@@ -23,7 +23,7 @@
 # xt-xcc does not support -Og, so make it -O0
 set(OPTIMIZE_FOR_DEBUG_FLAG "-O0")

-if(EXISTS ${CROSS_COMPILE}clang)
+if($ENV{XCC_USE_CLANG})
   set(CC clang)
   set(C++ clang++)
 else()


Remove RV32 Mobile Bert Compilation Benchmark (#10234)

Building the benchmarks is currently the critical path in CI latency,
taking almost 25 minutes for just that job, after it waits 25 minutes
for the TF integrations binaries (was that alway so slow??).

[![ci_run_graph](https://user-images.githubusercontent.com/5732088/187279027-21137775-5a3b-4ddf-ae4d-42e39051e7b2.png)](https://github.com/iree-org/iree/actions/runs/2950708667)

Of that time, 20 minutes is spent compiling this one vmfb, which we
only do so we can get statistics on how long it takes to compile. I
sampled the ten slowest build actions from a local build of the
benchmarks:

```
1179.39 benchmark_suites/TFLite/vmfb/mobilebert-baseline-tf2-quant.tflite.mlir-22179362840f853977acc734ee75e6ce.vmfb
216.321 benchmark_suites/TFLite/vmfb/mobilebert-baseline-tf2-quant.tflite.mlir-53b16b00b2d02162b1706d73ab6270b4.vmfb
159.585 benchmark_suites/TFLite/vmfb/mobilebert-baseline-tf2-quant.tflite.mlir-3bcb3f959e9f123bbaa01aa4d237bab8.vmfb
146.027 benchmark_suites/TFLite/vmfb/mobilebert-baseline-tf2-quant.tflite.mlir-73879267ae95d3551e73c7f078f4410d.vmfb
109.922 benchmark_suites/TFLite/vmfb/mobilebert-baseline-tf2-quant.tflite.mlir-cf781c710ad5c59b5e7f205b17b3c37b.vmfb
104.864 benchmark_suites/TFLite/vmfb/mobilebertsquad.tflite.mlir-fddd07b06a1abf9f5d4ea97225066f01.vmfb
88.665 benchmark_suites/TFLite/vmfb/mobilebertsquad.tflite.mlir-4fe50b8684bdd4684941c8a5698d3a48.vmfb
88.316 benchmark_suites/TFLite/vmfb/mobilebertsquad.tflite.mlir-833fba075c9cf413b8acbea9be0acade.vmfb
87.238 benchmark_suites/TFLite/vmfb/mobilebert-baseline-tf2-float.tflite.mlir-8a916ab990bd1cb5521dce6dd6a5ac6a.vmfb
86.905 benchmark_suites/TFLite/vmfb/mobilebert-baseline-tf2-float.tflite.mlir-e304860762a8369f86b813d45b3c699a.vmfb
```

This one is the clear winner. I don't think it's worth running this
compilation only to discover what we already know (it is very slow to
run this compilation).

Tested:
- `build_benchmarks` for this PR ran in 7 minutes instead of 25.
- Ran riscv benchmark pipeline.

--- benchmarks/TFLite/linux-riscv.cmake
+++ benchmarks/TFLite/linux-riscv.cmake
@@ -73,7 +73,6 @@
     "linux-riscv"

   MODULES
-    "${MOBILEBERT_INT8_MODULE}"
     "${PERSON_DETECT_INT8_MODULE}"
     "${EFFICIENTNET_INT8_MODULE}"


ENH (#3454): add new VirtualTrackingTool class

--- Modules/IGT/files.cmake
+++ Modules/IGT/files.cmake
@@ -26,6 +26,7 @@
   IGTTrackingDevices/mitkTrackingTool.cpp
   IGTTrackingDevices/mitkTrackingVolume.cpp
   IGTTrackingDevices/mitkVirtualTrackingDevice.cpp
+  IGTTrackingDevices/mitkVirtualTrackingTool.cpp

   IGTToolManagement/mitkNavigationToolStorage.cpp
   IGTToolManagement/mitkNavigationToolStorageSerializer.cpp


Add variable HUNTER_USE_CACHE_SERVERS

Add variable HUNTER_USE_CACHE_SERVERS

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -312,6 +312,11 @@
   file(
       APPEND
       "${HUNTER_DOWNLOAD_TOOLCHAIN}"
+      "set(HUNTER_USE_CACHE_SERVERS \"${HUNTER_USE_CACHE_SERVERS}\" CACHE INTERNAL \"\")\n"
+  )
+  file(
+      APPEND
+      "${HUNTER_DOWNLOAD_TOOLCHAIN}"
       "list(APPEND HUNTER_CACHE_SERVERS ${HUNTER_CACHE_SERVERS})\n"
   )


xgboost 0.40-p10

xgboost 0.40-p10

--- cmake/projects/xgboost/hunter.cmake
+++ cmake/projects/xgboost/hunter.cmake
@@ -119,6 +119,17 @@
     dc1e21d0b023df87915c0140999286afed064c50
 )

+hunter_add_version(
+    PACKAGE_NAME
+    xgboost
+    VERSION
+    0.40-p10
+    URL
+    "https://github.com/hunter-packages/xgboost/archive/v0.40-p10.tar.gz"
+    SHA1
+    d51da15945bd10e964384278862473ad8e5dcbc7
+)
+
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(xgboost)
 hunter_download(PACKAGE_NAME xgboost)


Change third party libs URLs to remotes.

--- ibtk/CMake/SuperBuild/PackageVersions.cmake
+++ ibtk/CMake/SuperBuild/PackageVersions.cmake
@@ -19,9 +19,9 @@
 set(SILO_MAJOR 4)
 set(SILO_MINOR 8)
 set(SILO_PATCH 0)
-set(SILO_VERSION ${SILO_MAJOR}.${SILO_MINOR}.${SILO_PATCH})
-set(SILO_URL ${IBTK_DEPENDENCY_URL})
-set(SILO_GZ silo-${SILO_MAJOR}.${SILO_MINOR}-bsd.tar.gz)
+set(SILO_VERSION ${SILO_MAJOR}.${SILO_MINOR})
+set(SILO_URL https://wci.llnl.gov/codes/silo/silo-${SILO_VERSION})
+set(SILO_GZ silo-${SILO_VERSION}-bsd.tar.gz)
 set(SILO_MD5 03e27c977f34dc6e9a5f3864153c24fe)

 set(QD_MAJOR 2)
@@ -36,7 +36,8 @@
 set(MUPARSER_MINOR 2)
 set(MUPARSER_PATCH 2)
 set(MUPARSER_VERSION ${MUPARSER_MAJOR}_${MUPARSER_MINOR}_${MUPARSER_PATCH})
-set(MUPARSER_URL ${IBTK_DEPENDENCY_URL})
+set(MUPARSER_URL https://portal.bitcasa.com/download-send/2b14f694ae180ed8dda4e7c2f7bc00432423b9bb5e48f3ad2262941ba0459d5d/eabe81b9812c5458652a09df95d81845be053abf35a8400f052c3ea7e645a793)
+# set(MUPARSER_URL ${IBTK_DEPENDENCY_URL})
 set(MUPARSER_GZ muparser_v${MUPARSER_VERSION}.zip)
 set(MUPARSER_MD5 6d77b5cb8096fe2c50afe36ad41bc14a)

@@ -52,7 +53,8 @@
 set(LIBMESH_MINOR 7)
 set(LIBMESH_PATCH 3.1)
 set(LIBMESH_VERSION ${LIBMESH_MAJOR}.${LIBMESH_MINOR}.${LIBMESH_PATCH})
-set(LIBMESH_URL ${IBTK_DEPENDENCY_URL})
+set(LIBMESH_URL https://portal.bitcasa.com/download-send/ae2e3c280bdbb09c61272d23f79ae6c868da1774eb21ff4bc129aee098bfc884/ba7a74695df317e4be90856f883942ac5ebb3957d6669408c2c37998098415f0)
+# set(LIBMESH_URL ${IBTK_DEPENDENCY_URL})
 set(LIBMESH_GZ libmesh-${LIBMESH_VERSION}.tar.gz)
 set(LIBMESH_MD5 bb5bf351c39deeac00692f2a9ebb5590)

@@ -60,14 +62,16 @@
 set(HYPRE_MINOR 8)
 set(HYPRE_PATCH 0)
 set(HYPRE_VERSION ${HYPRE_MAJOR}.${HYPRE_MINOR}.${HYPRE_PATCH}b)
-set(HYPRE_URL ${IBTK_DEPENDENCY_URL})
+set(HYPRE_URL https://computation.llnl.gov/casc/hypre/download)
+# set(HYPRE_URL ${IBTK_DEPENDENCY_URL})
 set(HYPRE_GZ hypre-${HYPRE_VERSION}.tar.gz)
 set(HYPRE_MD5 6b4db576c68d2072e48efbc00ea58489)

 set(BLITZ_MAJOR 0)
 set(BLITZ_MINOR 9)
 set(BLITZ_VERSION ${BLITZ_MAJOR}.${BLITZ_MINOR})
-set(BLITZ_URL ${IBTK_DEPENDENCY_URL})
+set(BLITZ_URL https://portal.bitcasa.com/download-send/f8a2ce0be8656eefdbeea94f8362c8b8270e52385e97c051bf4a6be5bfd6cba1/8cd50aaf016e938084fa3501f859772c93b6ce78e46eddd077a0096398834c80)
+# set(BLITZ_URL ${IBTK_DEPENDENCY_URL})
 set(BLITZ_GZ blitz-${BLITZ_VERSION}.tar.gz)
 set(BLITZ_MD5 031df2816c73e2d3bd6d667bbac19eca)

@@ -75,7 +79,8 @@
 set(SAMRAI_MINOR 4)
 set(SAMRAI_PATCH 4)
 set(SAMRAI_VERSION ${SAMRAI_MAJOR}.${SAMRAI_MINOR}.${SAMRAI_PATCH})
-set(SAMRAI_URL ${IBTK_DEPENDENCY_URL})
+set(SAMRAI_URL https://computation.llnl.gov/casc/SAMRAI/download)
+# set(SAMRAI_URL ${IBTK_DEPENDENCY_URL})
 set(SAMRAI_GZ SAMRAI-v${SAMRAI_VERSION}.tar.gz)
 set(SAMRAI_MD5 04fb048ed0efe7c531ac10c81cc5f6ac)


Do not build the multi-label segmentation plugins by default.

--- Plugins/PluginList.cmake
+++ Plugins/PluginList.cmake
@@ -73,7 +73,7 @@
   org.mitk.gui.qt.spectrocamrecorder:OFF
   org.mitk.gui.qt.classificationsegmentation:OFF
   org.mitk.gui.qt.overlaymanager:OFF
-  org.mitk.gui.qt.multilabelsegmentation:ON
+  org.mitk.gui.qt.multilabelsegmentation:OFF
   org.mitk.matchpoint.core.helper:OFF
   org.mitk.gui.qt.matchpoint.algorithm.browser:OFF
   org.mitk.gui.qt.matchpoint.algorithm.control:OFF


Supress Wuffs compiler warning

Supress Wuffs compiler warning

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -269,7 +269,8 @@
             " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-suggest-override>"
             " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-used-but-marked-unused>"
             " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-noexcept-type>"
-            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-comma>")
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-comma>"
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-c99-extensions>")

     set_source_files_properties(astcenccli_image_external.cpp
         PROPERTIES


Fixed rebasing error, fixed indentation, looking for pthread on non windows systems

--- ament_cmake_gtest/cmake/ament_add_gtest.cmake
+++ ament_cmake_gtest/cmake/ament_add_gtest.cmake
@@ -71,6 +71,11 @@
   add_executable("${target}" ${ARG_UNPARSED_ARGUMENTS})
   target_include_directories("${target}" PUBLIC "${GTEST_INCLUDE_DIRS}")
   target_link_libraries("${target}" ${GTEST_LIBRARIES})
+  if(NOT WIN32)
+    set(THREADS_PREFER_PTHREAD_FLAG ON)
+    find_package(Threads REQUIRED)
+    target_link_libraries("${target}" ${GTEST_LIBRARIES} Threads::Threads)
+  endif()
   if(NOT ARG_SKIP_LINKING_MAIN_LIBRARIES)
     target_link_libraries("${target}" ${GTEST_MAIN_LIBRARIES})
   endif()


Fixed the jags issue on x86

Fixed the jags issue on x86

--- Tools/CMake/Patch.cmake
+++ Tools/CMake/Patch.cmake
@@ -266,14 +266,18 @@
         #   - libgcc_ext.10.4.dylib
         #   - libgcc_ext.10.5.dylib

-        execute_process(
-          # COMMAND_ECHO STDOUT
-          ERROR_QUIET OUTPUT_QUIET
-          WORKING_DIRECTORY ${PATH}
-          COMMAND
-            bash ${NAME_TOOL_PREFIX_PATCHER} "${FILE}" "/usr/local/lib"
-            "@executable_path/../Frameworks/R.framework/Versions/${R_DIR_NAME}/Resources/opt/local/lib"
-        )
+        if(NOT (FILE MATCHES ".*(runjags|rjags|RoBMA|metaBMA).*"))
+
+          execute_process(
+            # COMMAND_ECHO STDOUT
+            ERROR_QUIET OUTPUT_QUIET
+            WORKING_DIRECTORY ${PATH}
+            COMMAND
+              bash ${NAME_TOOL_PREFIX_PATCHER} "${FILE}" "/usr/local/lib"
+              "@executable_path/../Frameworks/R.framework/Versions/${R_DIR_NAME}/Resources/opt/local/lib"
+          )
+
+        endif()

       endif()


Translate some MSVC CMAKE_*_FLAGS to clang flags in clang_compile

Passing MSVC-style cflags to the gcc-style clang driver will almost
always end badly. Just translate a couple of simple flags used by the
base CMake cflags like /D, /U, and /O.

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

--- cmake/Modules/CompilerRTCompile.cmake
+++ cmake/Modules/CompilerRTCompile.cmake
@@ -1,4 +1,30 @@
 include(LLVMParseArguments)
+
+# On Windows, CMAKE_*_FLAGS are built for MSVC but we use the GCC clang.exe,
+# which uses completely different flags. Translate some common flag types, and
+# drop the rest.
+function(translate_msvc_cflags out_flags msvc_flags)
+  # Insert an empty string in the list to simplify processing.
+  set(msvc_flags ";${msvc_flags}")
+
+  # Canonicalize /flag to -flag.
+  string(REPLACE ";/" ";-" msvc_flags "${msvc_flags}")
+
+  # Make space separated -D and -U flags into joined flags.
+  string(REGEX REPLACE ";-\([DU]\);" ";-\\1" msvc_flags "${msvc_flags}")
+
+  set(clang_flags "")
+  foreach(flag ${msvc_flags})
+    if ("${flag}" MATCHES "^-[DU]")
+      # Pass through basic command line macro definitions (-DNDEBUG).
+      list(APPEND clang_flags "${flag}")
+    elseif ("${flag}" MATCHES "^-O[2x]")
+      # Canonicalize normal optimization flags to -O2.
+      list(APPEND clang_flags "-O2")
+    endif()
+  endforeach()
+  set(${out_flags} "${clang_flags}" PARENT_SCOPE)
+endfunction()

 # Compile a source into an object file with COMPILER_RT_TEST_COMPILER using
 # a provided compile flags and dependenices.
@@ -20,13 +46,11 @@
   else()
     string(REPLACE " " ";" global_flags "${CMAKE_C_FLAGS}")
   endif()
-  # On Windows, CMAKE_*_FLAGS are built for MSVC but we use the GCC clang.exe
-  # which doesn't support flags starting with "/smth". Replace those with
-  # "-smth" equivalents.
-  if(MSVC)
-    string(REGEX REPLACE "^/" "-" global_flags "${global_flags}")
-    string(REPLACE ";/" ";-" global_flags "${global_flags}")
+
+  if (MSVC)
+    translate_msvc_cflags(global_flags "${global_flags}")
   endif()
+
   # Ignore unknown warnings. CMAKE_CXX_FLAGS may contain GCC-specific options
   # which are not supported by Clang.
   list(APPEND global_flags -Wno-unknown-warning-option)


bike-shedding

bike-shedding

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

    # perform the download
-   message(STATUS "Downloading '${FILENAME}'")
+   message(STATUS "Downloading ${FILENAME}")
    file(DOWNLOAD "${URL}" "${FILE}" STATUS STATUS)

    # check status
@@ -16,6 +16,6 @@
    if(NOT EC EQUAL 0)
       message(FATAL_ERROR "Download failed: ${MSG}")
    endif()
-   message(STATUS "Downloading '${FILENAME}' -- Success")
+   message(STATUS "Downloading ${FILENAME} - Success")

 endfunction()


no need to compare C++ standard between CUDA and host anymore

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -518,40 +518,38 @@
 if(found_stdstringview)
   set(hasstdstringview define)
   if(cuda)
-    if(CMAKE_CUDA_STANDARD GREATER_EQUAL CMAKE_CXX_STANDARD)
-      # CUDA_NVCC_EXECUTABLE
-      if(DEFINED ENV{CUDA_NVCC_EXECUTABLE})
-        set(CUDA_NVCC_EXECUTABLE "$ENV{CUDA_NVCC_EXECUTABLE}" CACHE FILEPATH "The CUDA compiler")
-      else()
-        find_program(CUDA_NVCC_EXECUTABLE
-          NAMES nvcc nvcc.exe
-          PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
-            ENV CUDA_TOOKIT_ROOT
-            ENV CUDA_PATH
-            ENV CUDA_BIN_PATH
-          PATH_SUFFIXES bin bin64
-          DOC "The CUDA compiler"
-          NO_DEFAULT_PATH
-        )
-        find_program(CUDA_NVCC_EXECUTABLE
-          NAMES nvcc nvcc.exe
-          PATHS /opt/cuda/bin
-          PATH_SUFFIXES cuda/bin
-          DOC "The CUDA compiler"
-        )
-        # Search default search paths, after we search our own set of paths.
-        find_program(CUDA_NVCC_EXECUTABLE nvcc)
-      endif()
-      mark_as_advanced(CUDA_NVCC_EXECUTABLE)
-      if(CUDA_NVCC_EXECUTABLE)
-        execute_process(COMMAND "echo"
-          "-e" "#include <string_view>\nint main() { char arr[3] = {'B', 'a', 'r'}; std::string_view strv(arr, sizeof(arr)); return 0;}"
-          "|"
-          "${CUDA_NVCC_EXECUTABLE}" "-std=c++${CMAKE_CUDA_STANDARD}" "-o" "/dev/null" "-x" "c++" "-"
-          RESULT_VARIABLE nvcc_compiled_string_view)
-        if (nvcc_compiled_string_view EQUAL "0")
-          set(cudahasstdstringview define)
-        endif()
+    # CUDA_NVCC_EXECUTABLE
+    if(DEFINED ENV{CUDA_NVCC_EXECUTABLE})
+      set(CUDA_NVCC_EXECUTABLE "$ENV{CUDA_NVCC_EXECUTABLE}" CACHE FILEPATH "The CUDA compiler")
+    else()
+      find_program(CUDA_NVCC_EXECUTABLE
+        NAMES nvcc nvcc.exe
+        PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
+          ENV CUDA_TOOKIT_ROOT
+          ENV CUDA_PATH
+          ENV CUDA_BIN_PATH
+        PATH_SUFFIXES bin bin64
+        DOC "The CUDA compiler"
+        NO_DEFAULT_PATH
+      )
+      find_program(CUDA_NVCC_EXECUTABLE
+        NAMES nvcc nvcc.exe
+        PATHS /opt/cuda/bin
+        PATH_SUFFIXES cuda/bin
+        DOC "The CUDA compiler"
+      )
+      # Search default search paths, after we search our own set of paths.
+      find_program(CUDA_NVCC_EXECUTABLE nvcc)
+    endif()
+    mark_as_advanced(CUDA_NVCC_EXECUTABLE)
+    if(CUDA_NVCC_EXECUTABLE)
+      execute_process(COMMAND "echo"
+        "-e" "#include <string_view>\nint main() { char arr[3] = {'B', 'a', 'r'}; std::string_view strv(arr, sizeof(arr)); return 0;}"
+        "|"
+        "${CUDA_NVCC_EXECUTABLE}" "-std=c++${CMAKE_CUDA_STANDARD}" "-o" "/dev/null" "-x" "c++" "-"
+        RESULT_VARIABLE nvcc_compiled_string_view)
+      if (nvcc_compiled_string_view EQUAL "0")
+        set(cudahasstdstringview define)
       endif()
     endif()
   endif()


[cmake] fix external mbedTLS usage (#4112)

In order to use external mbedTLS correctly we need to translate CMake
OT_BUILTIN_MBEDTLS into OpenThread's
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS.

Signed-off-by: Robert Lubos <9d28997c6894a2d0321a7bb399169af7ce99b64e@nordicsemi.no>

--- etc/cmake/options.cmake
+++ etc/cmake/options.cmake
@@ -194,4 +194,10 @@
     list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_LOG_PLATFORM=1")
     list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=1")
     list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_LOG_PREPEND_REGION=1")
-endif()+endif()
+
+if(OT_BUILTIN_MBEDTLS)
+    list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=1")
+else()
+    list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0")
+endif()


Bugfix

Bugfix

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

--- deal.II/cmake/setup_deal_ii.cmake
+++ deal.II/cmake/setup_deal_ii.cmake
@@ -78,11 +78,13 @@

 OPTION(DEAL_II_FEATURE_AUTODETECTION
   "Enables feature autodetection. This will automatically set DEAL_II_WITH_<...> options."
-  ON)
+  ON
+  )

 OPTION(DEAL_II_ALLOW_BUNDLED
   "Allow the use of libraries bundled with the source tarball. (DEAL_II_FORCE_BUNDLED* will overwrite this option.)"
-  ON)
+  ON
+  )

 #
 # Build configuration: configuration options regarding compilation and
@@ -90,7 +92,8 @@
 #
 OPTION(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS
   "configure sensible default CFLAGS and CXXFLAGS depending on platform, compiler and build target."
-  ON)
+  ON
+  )

 #
 # Component selection: configuration options regarding the setup of
@@ -99,15 +102,18 @@

 OPTION(DEAL_II_COMPONENT_COMPAT_FILES
   "Enable installation of the example steps. This adds a COMPONENT \"compat_files\" to the build system."
-  ON)
+  ON
+  )

 OPTION(DEAL_II_COMPONENT_EXAMPLES
   "Enable configuration and installation of the example steps. This adds a COMPONENT \"examples\" to the build system."
-  ON)
+  ON
+  )

 If(DEAL_II_WITH_DOC_DIRECTORY)
   OPTION(DEAL_II_COMPONENT_DOCUMENTATION
     "Enable configuration, build and installation of the documentation. This adds a COMPONENT \"documentation\" to the build system."
+    OFF
     )
 ENDIF()


android apk file name change

android apk file name change

--- cmake/CEGUIAndroid.cmake
+++ cmake/CEGUIAndroid.cmake
@@ -88,7 +88,7 @@

         add_custom_command(
             TARGET ${ANDROID_PROJECT_TARGET} POST_BUILD COMMAND ${ANDROID_EXECUTABLE}
-            update project --subprojects --target ${ANDROID_TARGET} --path "${NDKOUT}" WORKING_DIRECTORY ${NDKOUT})
+            update project --name ${ANDROID_MOD_NAME} --subprojects --target ${ANDROID_TARGET} --path "${NDKOUT}" WORKING_DIRECTORY ${NDKOUT})

         if(DEBUG)
             add_custom_command( TARGET ${ANDROID_PROJECT_TARGET} POST_BUILD COMMAND


Elektra: set ENABLE_OPTIMIZATION to OFF

Elektra: set ENABLE_OPTIMIZATION to OFF

reason: opmphm integration

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -300,7 +300,7 @@

 option (INSTALL_BUILD_TOOLS "Install build tools for cross-compilation" OFF)

-option (ENABLE_OPTIMIZATIONS "Turn on optimizations that trade memory for speed" ON)
+option (ENABLE_OPTIMIZATIONS "Turn on optimizations that trade memory for speed" OFF)

 #


Fix FindViennaCL.cmake to be able to detect version [ci skip]

--- cmake/FindViennaCL.cmake
+++ cmake/FindViennaCL.cmake
@@ -28,9 +28,6 @@
 	else(VIENNACL_INCLUDE_DIR)
 		mark_as_advanced(CLEAR VIENNACL_PATH_WIN32)
 	endif(VIENNACL_INCLUDE_DIR)
-
-ELSEIF(APPLE)
-#TODO
 ELSE (WIN32) #Linux
 	find_path(VIENNACL_INCLUDE_DIR viennacl/forwards.h
 			PATHS
@@ -38,16 +35,35 @@
 			DOC "The ViennaCL include path")
 ENDIF (WIN32)

+# TODO: viennacl currently doesn't store the version of itself in the header
+IF (VIENNACL_INCLUDE_DIR)
+	SET(CMAKE_REQUIRED_INCLUDES ${VIENNACL_INCLUDE_DIR})
+
+	include (CheckCXXSymbolExists)
+	IF (VIENNACL_WITH_OPENCL)
+		IF (NOT APPLE)
+			SET(CMAKE_REQUIRED_LIBRARIES OpenCL)
+		ENDIF ()
+	ENDIF()
+	CHECK_CXX_SYMBOL_EXISTS("viennacl::ocl::type_to_string<char>::apply" "viennacl/ocl/utils.hpp" HAVE_VIENNACL_TYPE_TO_STRING)
+	if (HAVE_VIENNACL_TYPE_TO_STRING)
+		SET(VIENNACL_VERSION "1.5.0")
+	else ()
+		SET(VIENNACL_VERSION "1.4.2")
+	endif ()
+ENDIF()
+
 include(FindPackageHandleStandardArgs)
 if(VIENNACL_WITH_OPENCL)
 	set(VIENNACL_INCLUDE_DIRS ${VIENNACL_INCLUDE_DIR} ${OPENCL_INCLUDE_DIRS})
 	set(VIENNACL_LIBRARIES ${OPENCL_LIBRARIES})
-	find_package_handle_standard_args(ViennaCL "ViennaCL not found!"
-			VIENNACL_INCLUDE_DIR OPENCL_INCLUDE_DIRS OPENCL_LIBRARIES)
+	find_package_handle_standard_args(ViennaCL REQUIRED_VARS
+			VIENNACL_INCLUDE_DIR OPENCL_INCLUDE_DIRS OPENCL_LIBRARIES
+			VERSION_VAR VIENNACL_VERSION)
 else(VIENNACL_WITH_OPENCL)
 	set(VIENNACL_INCLUDE_DIRS ${VIENNACL_INCLUDE_DIR})
 	set(VIENNACL_LIBRARIES "")
-	find_package_handle_standard_args(ViennaCL "ViennaCL not found!" VIENNACL_INCLUDE_DIR)
+	find_package_handle_standard_args(ViennaCL REQUIRED_VARS VIENNACL_INCLUDE_DIR VERSION_VAR VIENNACL_VERSION)
 endif(VIENNACL_WITH_OPENCL)

 MARK_AS_ADVANCED(VIENNACL_INCLUDE_DIR)


fixed qt version dependency

fixed qt version dependency

--- cmake/dependencies.cmake
+++ cmake/dependencies.cmake
@@ -45,7 +45,7 @@

 # ==== Find dependencies.
 find_package(CUDA 4.0 QUIET)
-find_package(Qt4 4.5 COMPONENTS QtCore QtGui QtXml QtOpenGL QtTest QUIET)
+find_package(Qt4 4.5.0 COMPONENTS QtCore QtGui QtXml QtOpenGL QtTest QUIET)
 find_package(Qwt5 QUIET)
 find_package(OpenMP QUIET)
 find_package(CppUnit QUIET)


fix xpu compile error. (#31223)

fix xpu compile error. (#31223)

--- cmake/external/xpu.cmake
+++ cmake/external/xpu.cmake
@@ -49,6 +49,7 @@
   SET(XPU_API_INC_DIR   "${XPU_SDK_ROOT}/XTDK/include/")
   SET(XPU_API_LIB "${XPU_SDK_ROOT}/XTDK/shlib/libxpuapi.so")
   SET(XPU_RT_LIB "${XPU_SDK_ROOT}/XTDK/runtime/shlib/libxpurt.so")
+  SET(XPU_LIB_DIR "${XPU_SDK_ROOT}/XTDK/shlib/")
 endif()

 INCLUDE_DIRECTORIES(${XPU_API_INC_DIR})


cmake: Fix warning in package-name.cmake

--- cmake/package-name.cmake
+++ cmake/package-name.cmake
@@ -77,7 +77,7 @@
         string(APPEND CPACK_DEBIAN_PACKAGE_ARCHITECTURE "_pi4")
       endif(IS_PI4 GREATER 0)

-    endif(IS_ARMHF)
+    endif(IS_ARMHF AND NOT PACKAGE_NAME_ONLY_ARCH)

   endif(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)


Toolchain file update

Toolchain file update

1. Use STM32_TOOLCHAIN_PATH if specified as environmental variable
2. Find tools like objcopy and size in default paths as well, which allows
   simply adding the binary folder of the toolchain to the path to find them.
   This also allows more consistent behaviour, because this already works
   for <cross-compile>-gcc/g++

--- cmake/stm32/common.cmake
+++ cmake/stm32/common.cmake
@@ -10,6 +10,12 @@
 endforeach()
 list(REMOVE_DUPLICATES STM32_SUPPORTED_FAMILIES_SHORT_NAME)

+if(DEFINED ENV{STM32_TOOLCHAIN_PATH})
+    message(STATUS "Detected toolchain path STM32_TOOLCHAIN_PATH in environmental variables: ")
+    message(STATUS "$ENV{STM32_TOOLCHAIN_PATH}")
+    set(STM32_TOOLCHAIN_PATH $ENV{STM32_TOOLCHAIN_PATH})
+endif()
+
 if(NOT STM32_TOOLCHAIN_PATH)
     if(NOT CMAKE_C_COMPILER)
         set(STM32_TOOLCHAIN_PATH "/usr")
@@ -36,11 +42,11 @@
 set(TOOLCHAIN_INC_PATH "${STM32_TOOLCHAIN_PATH}/${STM32_TARGET_TRIPLET}/include")
 set(TOOLCHAIN_LIB_PATH "${STM32_TOOLCHAIN_PATH}/${STM32_TARGET_TRIPLET}/lib")

-find_program(CMAKE_OBJCOPY NAMES ${STM32_TARGET_TRIPLET}-objcopy PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
-find_program(CMAKE_OBJDUMP NAMES ${STM32_TARGET_TRIPLET}-objdump PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
-find_program(CMAKE_SIZE NAMES ${STM32_TARGET_TRIPLET}-size PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
-find_program(CMAKE_DEBUGGER NAMES ${STM32_TARGET_TRIPLET}-gdb PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
-find_program(CMAKE_CPPFILT NAMES ${STM32_TARGET_TRIPLET}-c++filt PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
+find_program(CMAKE_OBJCOPY NAMES ${STM32_TARGET_TRIPLET}-objcopy PATHS ${TOOLCHAIN_BIN_PATH})
+find_program(CMAKE_OBJDUMP NAMES ${STM32_TARGET_TRIPLET}-objdump PATHS ${TOOLCHAIN_BIN_PATH})
+find_program(CMAKE_SIZE NAMES ${STM32_TARGET_TRIPLET}-size PATHS ${TOOLCHAIN_BIN_PATH})
+find_program(CMAKE_DEBUGGER NAMES ${STM32_TARGET_TRIPLET}-gdb PATHS ${TOOLCHAIN_BIN_PATH})
+find_program(CMAKE_CPPFILT NAMES ${STM32_TARGET_TRIPLET}-c++filt PATHS ${TOOLCHAIN_BIN_PATH})

 function(stm32_print_size_of_target TARGET)
     add_custom_target(${TARGET}_always_display_size
@@ -264,7 +270,7 @@

     get_target_property(LINK_DEPENDS ${TARGET} ${INTERFACE_PREFIX}LINK_DEPENDS)
     if(LINK_DEPENDS)
-        list(APPEND LINK_DEPENDS "${SCRIPT}")
+        list(APPEND LINK_DEPENDS "${SCRIPT}")
     else()
         set(LINK_DEPENDS "${SCRIPT}")
     endif()


Replace deprecated package test classifier SS -> ST

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -1,8 +1,8 @@
 TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
   SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS
-    Utils                 packages/Utils                  SS  REQUIRED
-    Interface             packages/Interface              SS  REQUIRED
-    Search                packages/Search                 SS  REQUIRED
-    Discretization        packages/Discretization         SS  REQUIRED
-    Meshfree              packages/Meshfree               SS  REQUIRED
+    Utils                 packages/Utils                  ST  REQUIRED
+    Interface             packages/Interface              ST  REQUIRED
+    Search                packages/Search                 ST  REQUIRED
+    Discretization        packages/Discretization         ST  REQUIRED
+    Meshfree              packages/Meshfree               ST  REQUIRED
   )


Use GCC flags in mingw

Use GCC flags in mingw

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -367,7 +367,7 @@
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
     # supporting a "--version" or "/version" flag

-    if(WIN32 AND NOT CYGWIN)
+    if(WIN32 AND NOT CYGWIN AND NOT MINGW)
       set(EIGEN_CXX_FLAG_VERSION "/version")
     else()
       set(EIGEN_CXX_FLAG_VERSION "--version")


fix find_path on FindFifeChan, issue https://github.com/fifengine/fifengine/issues/938

--- cmake/FindFifeChan.cmake
+++ cmake/FindFifeChan.cmake
@@ -25,12 +25,7 @@
 #                       Find FIFECHAN_INCLUDE_DIR
 #------------------------------------------------------------------------------

-find_path(FIFECHAN_INCLUDE_DIR fifechan/fifechan.hpp)
-
-# append "fifechan" to include_dir, but only if it's not already added
-if(NOT FIFECHAN_INCLUDE_DIR MATCHES "fifechan$")
-    set(FIFECHAN_INCLUDE_DIR ${FIFECHAN_INCLUDE_DIR}/fifechan)
-endif()
+find_path(FIFECHAN_INCLUDE_DIR NAMES fifechan.hpp)

 #------------------------------------------------------------------------------
 #                       Find FIFECHAN_LIBRARY


FindQDictZip: case error.

FindQDictZip: case error.

--- cmake/FindQDictZip.cmake
+++ cmake/FindQDictZip.cmake
@@ -1,4 +1,4 @@
-FIND_PATH(QDICTZIP_INCLUDE_DIR NAMES qdictzip/QDictZipFile.hh)
+FIND_PATH(QDICTZIP_INCLUDE_DIR NAMES QDictZip/QDictZipFile.hh)

 FIND_LIBRARY(QDICTZIP_LIBRARIES NAMES qdictzip)


add copyright notice to findreadline.cmake

--- cmake/FindREADLINE.cmake
+++ cmake/FindREADLINE.cmake
@@ -1,4 +1,29 @@
-# This file was a part of LuaJit project.
+# This file used to be a part of LuaJit project.
+
+# ===============================================================================
+# Picrin Scheme -- a lightweight scheme implementation.
+
+# Copyright (C) 2014 Yuichi Nishiwaki. All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+# [ MIT license: http://www.opensource.org/licenses/mit-license.php ]

 # ===============================================================================
 # LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/


Fix PYMOD_INSTALL_FULLDIR

Fix PYMOD_INSTALL_FULLDIR

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -39,7 +39,8 @@
   message(STATUS "Setting option PYMOD_INSTALL_LIBDIR: ${PYMOD_INSTALL_LIBDIR}")
   set(PYMOD_INSTALL_LIBDIR "${PYMOD_INSTALL_LIBDIR}" CACHE STRING "Location within CMAKE_INSTALL_LIBDIR to which Python modules are installed" FORCE)
 endif()
-file(TO_NATIVE_PATH "${CMAKE_INSTALL_LIBDIR}/${PYMOD_INSTALL_LIBDIR}/xcfun" PYMOD_INSTALL_FULLDIR)
+file(TO_NATIVE_PATH "lib/${PYMOD_INSTALL_LIBDIR}/xcfun" PYMOD_INSTALL_FULLDIR)
+message(STATUS "Bob bob PYMOD_INSTALL_FULLDIR is ${PYMOD_INSTALL_FULLDIR}")

 option_with_print(ENABLE_PYTHON_INTERFACE "Enable Python interface" OFF)


Remove cmake dead file

Remove cmake dead file

not in use anymore

--- cmake/dependencies.cmake
+++ cmake/dependencies.cmake
@@ -1,81 +0,0 @@
-enable_language(CXX)
-
-if (MSVC)
-    add_definitions(/bigobj /DNDEBUG /DUSE_GLOP /DUSE_BOP)
-else()
-    add_definitions(-fwrapv -DNDEBUG -DUSE_GLOP -DUSE_BOP)
-endif()
-
-if (NOT BUILD_DEPS)
-	return()
-endif()
-
-# Find or build Dependencies
-file(READ ${CMAKE_CURRENT_SOURCE_DIR}/Dependencies.txt _Dependency_file)
-foreach(DEPENDENCY Protobuf gflags glog Cbc CoinUtils Osi Clp Cgl)
-    string(REGEX REPLACE ".*${DEPENDENCY} = ([0-9.]+).*" "\\1" ${DEPENDENCY}_VERSION ${_Dependency_file})
-endforeach()
-
-if (MSVC)
-	include(external/zlib)
-	include(external/swig)
-endif()
-
-# Protobuf
-if (BUILD_DEPS)
-	set(Protobuf_FOUND False)
-else()
-	find_package(Protobuf ${Protobuf_VERSION})
-endif()
-if (NOT Protobuf_FOUND)
-	message(STATUS "Did not find system protobuf or forced build. Building as an external project")
-	include(external/protobuf)
-endif()
-#include_directories(${Protobuf_INCLUDE_DIRS})
-
-# gflags
-if (BUILD_DEPS)
-	set(gflags_FOUND False)
-else()
-	find_package(gflags ${gflags_VERSION})
-endif()
-if (NOT gflags_FOUND)
-	message(STATUS "Did not find system gflags or forced build. Building as an external project")
-	include(external/gflags)
-endif()
-#include_directories(${gflags_INCLUDE_DIRS})
-
-# glog
-if (BUILD_DEPS)
-	set(glog_FOUND False)
-else()
-	find_package(glog ${glog_VERSION})
-endif()
-if (NOT glog_FOUND)
-	message(STATUS "Did not find system glog or forced build. Building as an external project.")
-	include(external/glog)
-endif()
-#include_directories(${glog_INCLUDE_DIRS})
-
-# Cbc
-if (BUILD_DEPS)
-	set(Cbc_FOUND False)
-else()
-	find_package(Cbc ${Cbc_VERSION})
-endif()
-if (NOT Cbc_FOUND)
-	#if (NOT MSVC)
-	message(STATUS "Did not find system Cbc or forced build. Building as an external project.")
-	include(external/cbc)
-	#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CLP -DUSE_CBC")
-	#include_directories(${Cbc_INCLUDE_DIRS})
-	#endif()
-	#else()
-endif()
-#include_directories(${Cbc_INCLUDE_DIRS})
-#if (MSVC)
-#	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DUSE_CLP /DUSE_CBC")
-#else()
-#	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CLP -DUSE_CBC")
-#endif()
-#add_definitions("-DUSE_CLP -DUSE_CBC")


- Fix a messup

- Fix a messup

--- cmake/Packaging/WindowsImageBuild.cmake
+++ cmake/Packaging/WindowsImageBuild.cmake
@@ -19,7 +19,7 @@
         list ( APPEND BASE_LIBS AngleEGL AngleGLESv2 )
     endif()
     foreach(lib_target ${BASE_LIBS})
-        get_property ( lib ${lib_target} IMPORTED_LOCATION )
+        get_target_property ( lib ${lib_target} IMPORTED_LOCATION )
         get_filename_component ( LIB_BASE "${lib}" NAME_WE )
         get_filename_component ( LIB_DIR "${lib}" DIRECTORY )


Add missing parameter

Add missing parameter

--- CMake/mitkFunctionAddCustomModuleTest.cmake
+++ CMake/mitkFunctionAddCustomModuleTest.cmake
@@ -28,7 +28,7 @@

 function(mitkAddCustomModuleRenderingTest test_name test_function)

-  mitkAddCustomModuleTest(${test_name} ${test_function})
+  mitkAddCustomModuleTest(${test_name} ${test_function} ${ARGN})
   if(TEST ${test_name})
     set_property(TEST ${test_name} APPEND PROPERTY LABELS "Rendering Tests")
   endif()


From Olaf Flebbe, "support current zlib and libpng library names for win32 3rdParty builds."

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -68,9 +68,9 @@
             MARK_AS_ADVANCED(GLUT_glut_LIBRARY)
         ENDIF(GLUT_FOUND)
         FIND_DEPENDENCY(GIFLIB gif_lib.h "ungif;libungif" ${OSG_3RDPARTY_BIN} "D")
-        FIND_DEPENDENCY(ZLIB zlib.h "z;zlib" ${OSG_3RDPARTY_BIN} "D")
+        FIND_DEPENDENCY(ZLIB zlib.h "z;zlib;zlib1" ${OSG_3RDPARTY_BIN} "D")
         IF(ZLIB_FOUND)
-            FIND_DEPENDENCY(PNG png.h libpng ${OSG_3RDPARTY_BIN} "D")
+            FIND_DEPENDENCY(PNG png.h "libpng;libpng13" ${OSG_3RDPARTY_BIN} "D")
             IF(PNG_FOUND)
                 #forcing subsequent FindPNG stuff to not search for other variables.... kind of a hack
                 SET(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIR} CACHE FILEPATH "")


DOC: Added more description to itk-module.cmake

Change-Id: Ic5108db08ead061e88beb6d38556b1666f723ccd

--- Modules/ThirdParty/DCMTK/itk-module.cmake
+++ Modules/ThirdParty/DCMTK/itk-module.cmake
@@ -1,6 +1,5 @@
 set(DOCUMENTATION "This module contains the third party DCMTK library.
-")
+href=\"http://dicom.offis.de/dcmtk/\">DCMTK DCMTK is a collection of libraries and applications implementing large parts the DICOM standard.")

 itk_module(ITKDCMTK
   DEPENDS


update manifest

update manifest

--- manifest.cmake
+++ manifest.cmake
@@ -1,87 +1,97 @@
 set(_headers
-    include/boink/traversal.hh
+    include/boink/benchmarks/bench_storage.hh
     include/boink/boink.hh
     include/boink/cdbg/cdbg.hh
     include/boink/cdbg/cdbg_types.hh
     include/boink/cdbg/compactor.hh
     include/boink/cdbg/metrics.hh
+    include/boink/cdbg/saturating_compactor.hh
+    include/boink/cdbg/ucompactor.hh
     include/boink/cdbg/udbg.hh
     include/boink/cdbg/utagger.hh
-    include/boink/cdbg/ucompactor.hh
-    include/boink/cdbg/saturating_compactor.hh
     include/boink/dbg.hh
     include/boink/events.hh
     include/boink/event_types.hh
     include/boink/hashing/alphabets.hh
     include/boink/hashing/exceptions.hh
+    include/boink/hashing/hash_combine.hh
     include/boink/hashing/hashshifter.hh
     include/boink/hashing/kmeriterator.hh
+    include/boink/hashing/rollinghash/characterhash.h
+    include/boink/hashing/rollinghash/cyclichash.h
     include/boink/hashing/rollinghashshifter.hh
+    include/boink/hashing/smhasher/MurmurHash3.h
     include/boink/hashing/ukhshashshifter.hh
-    include/boink/hashing/smhasher/MurmurHash3.h
     include/boink/hashing/ukhs.hh
-    include/boink/hashing/hash_combine.hh
     include/boink/interface.hh
     include/boink/kmers/kmerclient.hh
+    include/boink/meta.hh
     include/boink/metrics.hh
     include/boink/minimizers.hh
+    include/boink/parsing/kseq.h
     include/boink/parsing/parsing.hh
     include/boink/parsing/readers.hh
     include/boink/pdbg.hh
     include/boink/processors.hh
     include/boink/reporting/reporters.hh
+    include/boink/ring_span.hpp
+    include/boink/signatures/sourmash/kmer_min_hash.hh
+    include/boink/signatures/sourmash_signature.hh
+    include/boink/signatures/ukhs_signature.hh
     include/boink/storage/bitstorage.hh
     include/boink/storage/bytestorage.hh
+    include/boink/storage/cqf/gqf.h
     include/boink/storage/nibblestorage.hh
     include/boink/storage/partitioned_storage.hh
     include/boink/storage/qfstorage.hh
+    include/boink/storage/sparsepp/serialize.hh
     include/boink/storage/sparseppstorage.hh
     include/boink/storage/storage.hh
     include/boink/storage/storage_types.hh
-    include/boink/storage/cqf/gqf.h
-    include/boink/signatures/ukhs_signature.hh
-    include/boink/signatures/sourmash/kmer_min_hash.hh
-    include/boink/signatures/sourmash_signature.hh
+    include/boink/traversal.hh
+    include/boink/utils/stringutils.h
 )

 set(_sources
-    src/boink/storage/partitioned_storage.cc
-    src/boink/storage/storage.cc
-    src/boink/storage/qfstorage.cc
-    src/boink/storage/bytestorage.cc
-    src/boink/storage/bitstorage.cc
-    src/boink/storage/sparseppstorage.cc
-    src/boink/storage/nibblestorage.cc
-    src/boink/storage/cqf/gqf.c
-    src/boink/processors.cc
-    src/boink/metrics.cc
+    src/boink/benchmarks/bench_storage.cc
+    src/boink/benchmarks/do_bench_storage.cc
+    src/boink/boink.cc
+    src/boink/cdbg/cdbg.cc
+    src/boink/cdbg/cdbg_types.cc
+    src/boink/cdbg/compactor.cc
+    src/boink/cdbg/metrics.cc
+    src/boink/cdbg/saturating_compactor.cc
+    src/boink/cdbg/ucompactor.cc
+    src/boink/cdbg/udbg.cc
+    src/boink/cdbg/utagger.cc
+    src/boink/dbg.cc
     src/boink/events.cc
-    src/boink/reporting/reporters.cc
-    src/boink/hashing/smhasher/MurmurHash3.cc
+    src/boink/event_types.cc
+    src/boink/hashing/alphabets.cc
     src/boink/hashing/hashshifter.cc
-    src/boink/hashing/alphabets.cc
     src/boink/hashing/kmeriterator.cc
     src/boink/hashing/rollinghashshifter.cc
+    src/boink/hashing/smhasher/MurmurHash3.cc
     src/boink/hashing/ukhs.cc
+    src/boink/meta.cc
+    src/boink/metrics.cc
+    src/boink/minimizers.cc
+    src/boink/parsing/parsing.cc
+    src/boink/parsing/readers.cc
+    src/boink/pdbg.cc
+    src/boink/processors.cc
+    src/boink/reporting/reporters.cc
+    src/boink/signatures/sourmash_signature.cc
     src/boink/signatures/ukhs_signature.cc
-    src/boink/signatures/sourmash_signature.cc
+    src/boink/storage/bitstorage.cc
+    src/boink/storage/bytestorage.cc
+    src/boink/storage/cqf/gqf.c
+    src/boink/storage/nibblestorage.cc
+    src/boink/storage/partitioned_storage.cc
+    src/boink/storage/qfstorage.cc
+    src/boink/storage/sparseppstorage.cc
+    src/boink/storage/storage.cc
     src/boink/traversal.cc
-    src/boink/dbg.cc
-    src/boink/pdbg.cc
-    src/boink/boink.cc
-    src/boink/event_types.cc
-    src/boink/cdbg/metrics.cc
-    src/boink/cdbg/cdbg_types.cc
-    src/boink/cdbg/cdbg.cc
-    src/boink/cdbg/compactor.cc
-    src/boink/cdbg/udbg.cc
-    src/boink/cdbg/utagger.cc
-    src/boink/cdbg/ucompactor.cc
-    src/boink/cdbg/saturating_compactor.cc
-    src/boink/parsing/readers.cc
-    src/boink/parsing/parsing.cc
-    src/boink/minimizers.cc
-    src/boink/benchmarks/bench_storage.cc
 )

 set(_data


cmake: copy over changes that rebase missed

--- cmake/configs/posix_sdflight_default.cmake
+++ cmake/configs/posix_sdflight_default.cmake
@@ -3,6 +3,8 @@
 set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)

 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
+
+set(config_generate_parameters_scope ALL)

 set(CONFIG_SHMEM "1")

@@ -49,6 +51,7 @@
 	lib/terrain_estimation
 	lib/runway_takeoff
 	lib/tailsitter_recovery
+	lib/DriverFramework/framework

 	platforms/common
 	platforms/posix/px4_layer


set PICO_TINYUSB_PATH for when building from within tinyusb without pico-sdk/tinyusb submodule

--- hw/bsp/rp2040/family.cmake
+++ hw/bsp/rp2040/family.cmake
@@ -19,6 +19,10 @@
 	# TOP is absolute path to root directory of TinyUSB git repo
 	set(TOP "../../..")
 	get_filename_component(TOP "${TOP}" REALPATH)
+
+	if (NOT PICO_TINYUSB_PATH)
+		set(PICO_TINYUSB_PATH ${TOP})
+	endif()

 	# tinyusb_additions will hold our extra settings libraries
 	add_library(tinyusb_additions INTERFACE)


OSX: XCode 4.3 modifications ( not fully tested )

--- cmake/PlatformSpecific.cmake
+++ cmake/PlatformSpecific.cmake
@@ -102,8 +102,12 @@
 	else(CMAKE_VERSION VERSION_LESS 2.8.1)
 		SET(CMAKE_XCODE_ATTRIBUTE_ARCHS i386\ x86_64)
 	endif(CMAKE_VERSION VERSION_LESS 2.8.1)
-	set(CMAKE_CONFIGURATION_TYPES Release)
-	set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
+	SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "limit configs" FORCE)
+	if(${XCODE_VERSION} LESS 4.3)
+		SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
+	else()
+		SET(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk)
+	endif()
 #	INCLUDE_DIRECTORIES( ../macos/include )
 	option(OSX_BUILD_LUXMARK "Compile LuxMark too" FALSE)
 	option(OSX_UPDATE_LUXRAYS_REPO "Copy LibLuxRays over to macos repo after compile" FALSE)
@@ -125,7 +129,7 @@
 		MESSAGE(STATUS "CMAKE_XCODE_ATTRIBUTE_ARCHS ( cmake 2.8 or higher method ): " ${CMAKE_XCODE_ATTRIBUTE_ARCHS})
 	ENDIF(CMAKE_VERSION VERSION_LESS 2.8.1)
 	MESSAGE(STATUS "OSX SDK SETTING : " ${CMAKE_OSX_SYSROOT})
-	MESSAGE(STATUS "BUILD_CONFIGURATION_TYPE : " ${CMAKE_CONFIGURATION_TYPES})
+	MESSAGE(STATUS "BUILD_TYPE : " ${CMAKE_BUILD_TYPE})
 	MESSAGE(STATUS "UPDATE_LUXRAYS_IN_MACOS_REPO : " ${OSX_UPDATE_LUXRAYS_REPO})
 	MESSAGE(STATUS "BUILD_LUXMARK_OSX : " ${OSX_BUILD_LUXMARK})
 	MESSAGE(STATUS "")


[CMake] Explicitly set Android lib prefix/suffix

When compiling the Swift standard library for Android on Linux, the
target prefixes and suffixes for static and shared libraries happen to
be the same for both platforms. When using a macOS host to compile,
however, the suffixes are different, causing build errors.

Explicitly set the prefixes and suffixes to prevent errors when
building on macOS.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -53,7 +53,15 @@
   precondition(kind MESSAGE "kind is required")
   precondition(sdk MESSAGE "sdk is required")

-  if("${sdk}" STREQUAL "WINDOWS")
+  if("${sdk}" STREQUAL "ANDROID")
+    if("${kind}" STREQUAL "STATIC")
+      set_property(TARGET "${target}" PROPERTY PREFIX "lib")
+      set_property(TARGET "${target}" PROPERTY SUFFIX ".a")
+    elseif("${libkind}" STREQUAL "SHARED")
+      set_property(TARGET "${target}" PROPERTY PREFIX "lib")
+      set_property(TARGET "${target}" PROPERTY SUFFIX ".so")
+    endif()
+  elseif("${sdk}" STREQUAL "WINDOWS")
     if("${kind}" STREQUAL "STATIC")
       set_property(TARGET "${target}" PROPERTY PREFIX "lib")
       set_property(TARGET "${target}" PROPERTY SUFFIX ".lib")


Most swift targets should depend on SwiftOnoneSupport, except Core and SwiftOnoneSupport

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1344,13 +1344,18 @@
   # All Swift code depends on the standard library, except for the standard
   # library itself.
   if(SWIFTLIB_TARGET_LIBRARY AND NOT SWIFTLIB_IS_STDLIB_CORE)
-    list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core)
+    list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core SwiftOnoneSupport)
+  endif()
+
+  if("${name}" STREQUAL "swiftSwiftOnoneSupport")
+    list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
+      SwiftOnoneSupport)
   endif()

   if((NOT "${SWIFT_BUILD_STDLIB}") AND
      (NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS}" STREQUAL ""))
     list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
-        Core)
+      Core SwiftOnoneSupport)
   endif()

   translate_flags(SWIFTLIB "${SWIFTLIB_options}")


[CMake] tablegen(): Use -I <dir> according to the list by include_directories().

For now, local_tds and global_tds are integrated to dependent_tds.

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -3,8 +3,16 @@
 # Adds the name of the generated file to TABLEGEN_OUTPUT.

 function(tablegen project ofn)
-  file(GLOB local_tds "*.td")
-  file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")
+  # Use the list by include_directories().
+  get_property(include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
+
+  # Collect possible dependent *.td(s).
+  # FIXME: It is far from optimal.
+  file(GLOB dependent_tds "*.td")
+  foreach(inc ${include_dirs})
+    file(GLOB tds "${inc}/*.td")
+    list(APPEND dependent_tds ${tds})
+  endforeach()

   if (IS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS})
     set(LLVM_TARGET_DEFINITIONS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS})
@@ -12,16 +20,20 @@
     set(LLVM_TARGET_DEFINITIONS_ABSOLUTE
       ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS})
   endif()
+  foreach(inc ${include_dirs})
+    list(APPEND TABLEGEN_INCLUDE_DIRECTORIES -I ${inc})
+  endforeach()
   add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
     # Generate tablegen output in a temporary file.
-    COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
-    -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR}
+    COMMAND ${${project}_TABLEGEN_EXE} ${ARGN}
+    -I ${CMAKE_CURRENT_SOURCE_DIR}
+    ${TABLEGEN_INCLUDE_DIRECTORIES}
     ${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
     -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
     # The file in LLVM_TARGET_DEFINITIONS may be not in the current
     # directory and local_tds may not contain it, so we must
     # explicitly list it here:
-    DEPENDS ${${project}_TABLEGEN_EXE} ${local_tds} ${global_tds}
+    DEPENDS ${${project}_TABLEGEN_EXE} ${dependent_tds}
     ${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
     COMMENT "Building ${ofn}..."
     )


Update compiler.cmake

Update compiler.cmake

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -209,7 +209,8 @@
                  "C3280" # Declaration hides variable
                  )
      endif ()
-     if (NOT CLANG)
+     if (CMAKE_C_COMPILER_ID MATCHES "Clang")
+     else()
          string(REPLACE "C" " -wd" MSVC_DISABLED_WARNINGS_STR ${MSVC_DISABLED_WARNINGS_LIST})
          string(REGEX REPLACE "[/-]W[1234][ ]?" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
      endif ()


generate json

generate json

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -245,6 +245,15 @@
 	else()
 		# message("-- using ${PACKAGE} in COMPATIBLE")
 		find_package(${PACKAGE} ${VERSION} REQUIRED)
+	endif()
+
+	# generate json
+	execute_process(
+		COMMAND python ${ARTIFACTS_PATH}/get_package.py --name=${PACKAGE} --depends=${DEPENDS_PATHFILE} --version=${VERSION}
+		WORKING_DIRECTORY "${ARTIFACTS_PATH}"
+		OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+	if(RESULT_VERSION)
+		message("error saving ${PACKAGE}:${VERSION} in ${DEPENDS_PATH}")
 	endif()

 	# 13 add includes


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -142,12 +142,18 @@
 		set(package_uncompressed_file "${CMAKE_PREFIX_PATH}/${PACKAGE}.tmp")
 		set(package_cmake_filename "${PACKAGE}-${VERSION}-${CMAKI_PLATFORM}-cmake.tar.gz")
 		set(http_package_cmake_filename "${CMAKI_REPOSITORY}/download.php?file=${package_cmake_filename}")
+		set(package_filename "${PACKAGE}-${VERSION}-${CMAKI_PLATFORM}.tar.gz")
+		set(http_package_filename "${CMAKI_REPOSITORY}/download.php?file=${package_cmake_filename}")
+		set(package_compessed "${depends_dir}/${package_filename}")
 		# 4. descargo el fichero que se supone tienes los ficheros cmake
 		if(NOT "${NO_USE_CACHE_REMOTE}")
 			cmaki_download_file("${http_package_cmake_filename}" "${package_uncompressed_file}")
+			set(COPY_SUCCESFUL1 "${COPY_SUCCESFUL}")
+			cmaki_download_file("${http_package_filename}" "${package_compessed}")
+			set(COPY_SUCCESFUL2 "${COPY_SUCCESFUL}")
 		endif()
 		# Si no puede descargar el artefacto ya hecho (es que necesito compilarlo y subirlo)
-		if(NOT "${COPY_SUCCESFUL}" OR "${NO_USE_CACHE_REMOTE}")
+		if(NOT "${COPY_SUCCESFUL1}" OR NOT "${COPY_SUCCESFUL2}" OR "${NO_USE_CACHE_REMOTE}")

 			file(REMOVE_RECURSE "${depends_bin_package}")
 			file(REMOVE_RECURSE "${depends_package}")
@@ -346,6 +352,7 @@
 	set(_DIR "${depends_dir}/${strip_compressed}")

 	if(NOT EXISTS "${package_marker}")
+		# TODO: avoid doble download
 		file(REMOVE "${package_compessed}")
 		if(EXISTS "${package_compressed_md5}")
 			file(READ "${package_compressed_md5}" md5sum )


pending changes

pending changes

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -124,7 +124,7 @@
 			file(REMOVE "${package_uncompressed_file}")

 			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.json --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} -o
+				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.json --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} -o -d
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 				RESULT_VARIABLE artifacts_result
 				)


Disables gcc/clang deprecated declarations warnings.

--- build-utils/cmake/compiler_settings.cmake
+++ build-utils/cmake/compiler_settings.cmake
@@ -79,7 +79,7 @@
   string(REGEX REPLACE " /EH.*" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
   string(REGEX REPLACE " /EH.*" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")

-  # Would be interesting to add this warnings
+  # Would be interesting to add these warnings
   # 4061 // enumerator 'identifier' in a switch of enum 'enumeration' is not explicitly handled by a case label
   # 4062 // enumerator 'identifier' in a switch of enum 'enumeration' is not handled
   # 4242 // identifier': conversion from 'type1' to 'type2', possible loss of data
@@ -167,6 +167,12 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
   endif()

+  # but disables deprecated declaration warnings
+  if(NOT CMAKE_CXX_FLAGS MATCHES "-Wno-deprecated-declarations")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
+  endif()
+
   # Automatically selects native architecture optimizations (sse...)
   #if(NOT CMAKE_CXX_FLAGS MATCHES "-march")
   #  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")


Appending works better with strings when applied to compile_flags.

--- cmake/AddPch.cmake
+++ cmake/AddPch.cmake
@@ -44,8 +44,9 @@
     endforeach(fileIt)

     foreach(fileIt ${PchSources})
-        set_property(SOURCE "${fileIt}" APPEND PROPERTY
-            COMPILE_FLAGS "/Yu\"${PrecompiledHeader}\" /FI\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\" /MP")
+        get_property(fileIt_COMPILE_FLAGS SOURCE "${fileIt}" PROPERTY COMPILE_FLAGS)
+        set_property(SOURCE "${fileIt}" PROPERTY
+            COMPILE_FLAGS "${fileIt_COMPILE_FLAGS} /Yu\"${PrecompiledHeader}\" /FI\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\" /MP")
         set_property(SOURCE "${fileIt}" APPEND PROPERTY
             OBJECT_DEPENDS "${PrecompiledBinary}")
     endforeach(fileIt)


Add ?GELST (Reference-LAPACK PR739)

Add ?GELST (Reference-LAPACK PR739)

--- cmake/lapack.cmake
+++ cmake/lapack.cmake
@@ -124,7 +124,7 @@
    ssbev_2stage.f ssbevx_2stage.f ssbevd_2stage.f ssygv_2stage.f
    sgesvdq.f slaorhr_col_getrfnp.f
    slaorhr_col_getrfnp2.f sorgtsqr.f sorgtsqr_row.f sorhr_col.f
-   slarmm.f slatrs3.f strsyl3.f)
+   slarmm.f slatrs3.f strsyl3.f sgelst.f)

 set(SXLASRC sgesvxx.f sgerfsx.f sla_gerfsx_extended.f sla_geamv.f
    sla_gercond.f sla_gerpvgrw.f ssysvxx.f ssyrfsx.f
@@ -223,7 +223,7 @@
    chbev_2stage.f chbevx_2stage.f chbevd_2stage.f chegv_2stage.f
    cgesvdq.f claunhr_col_getrfnp.f claunhr_col_getrfnp2.f
    cungtsqr.f cungtsqr_row.f cunhr_col.f
-   clatrs3.f ctrsyl3.f )
+   clatrs3.f ctrsyl3.f cgelst.f)

 set(CXLASRC cgesvxx.f cgerfsx.f cla_gerfsx_extended.f cla_geamv.f
    cla_gercond_c.f cla_gercond_x.f cla_gerpvgrw.f
@@ -316,7 +316,7 @@
    dsbev_2stage.f dsbevx_2stage.f dsbevd_2stage.f dsygv_2stage.f
    dcombssq.f dgesvdq.f dlaorhr_col_getrfnp.f
    dlaorhr_col_getrfnp2.f dorgtsqr.f dorgtsqr_row.f dorhr_col.f
-   dlarmm.f dlatrs3.f dtrsyl3.f)
+   dlarmm.f dlatrs3.f dtrsyl3.f dgelst.f)

 set(DXLASRC dgesvxx.f dgerfsx.f dla_gerfsx_extended.f dla_geamv.f
    dla_gercond.f dla_gerpvgrw.f dsysvxx.f dsyrfsx.f
@@ -419,7 +419,7 @@
    zhbev_2stage.f zhbevx_2stage.f zhbevd_2stage.f zhegv_2stage.f
    zgesvdq.f zlaunhr_col_getrfnp.f zlaunhr_col_getrfnp2.f
    zungtsqr.f zungtsqr_row.f zunhr_col.f
-   zlatrs3.f ztrsyl3.f)
+   zlatrs3.f ztrsyl3.f zgelst.f)

 set(ZXLASRC zgesvxx.f zgerfsx.f zla_gerfsx_extended.f zla_geamv.f
    zla_gercond_c.f zla_gercond_x.f zla_gerpvgrw.f zsysvxx.f zsyrfsx.f
@@ -622,7 +622,7 @@
    ssbev_2stage.c ssbevx_2stage.c ssbevd_2stage.c ssygv_2stage.c
    sgesvdq.c slaorhr_col_getrfnp.c
    slaorhr_col_getrfnp2.c sorgtsqr.c sorgtsqr_row.c sorhr_col.c
-   slarmm.c slatrs3.c strsyl3.c)
+   slarmm.c slatrs3.c strsyl3.c sgelst.c)

 set(SXLASRC sgesvxx.c sgerfsx.c sla_gerfsx_extended.c sla_geamv.c
    sla_gercond.c sla_gerpvgrw.c ssysvxx.c ssyrfsx.c
@@ -638,7 +638,7 @@
    cgecon.c cgeequ.c cgees.c  cgeesx.c cgeev.c  cgeevx.c
    cgehd2.c cgehrd.c cgelq2.c cgelqf.c
    cgels.c  cgelsd.c cgelss.c cgelsy.c cgeql2.c cgeqlf.c cgeqp3.c
-   cgeqr2.c cgeqr2p.c cgeqrf.c cgeqrfp.c cgerfs.c cgerq2.c cgerqf.c
+   cgeqr2.c cgeqr2p.c cgeqrf.c fcgeqrfp.c cgerfs.c cgerq2.c cgerqf.c
    cgesc2.c cgesdd.c cgesvd.c cgesvdx.c
    cgesvj.c cgejsv.c cgsvj0.c cgsvj1.c
    cgesvx.c cgetc2.c cgetrf2.c
@@ -720,7 +720,7 @@
    chbev_2stage.c chbevx_2stage.c chbevd_2stage.c chegv_2stage.c
    cgesvdq.c claunhr_col_getrfnp.c claunhr_col_getrfnp2.c
    cungtsqr.c cungtsqr_row.c cunhr_col.c
-   clatrs3.c ctrsyl3.c)
+   clatrs3.c ctrsyl3.c cgelst.c)

 set(CXLASRC cgesvxx.c cgerfsx.c cla_gerfsx_extended.c cla_geamv.c
    cla_gercond_c.c cla_gercond_x.c cla_gerpvgrw.c
@@ -812,7 +812,7 @@
    dsbev_2stage.c dsbevx_2stage.c dsbevd_2stage.c dsygv_2stage.c
    dcombssq.c dgesvdq.c dlaorhr_col_getrfnp.c
    dlaorhr_col_getrfnp2.c dorgtsqr.c dorgtsqr_row.c dorhr_col.c
-   dlarmm.c dlatrs3.c dtrsyl3.c)
+   dlarmm.c dlatrs3.c dtrsyl3.c dgelst.c)

 set(DXLASRC dgesvxx.c dgerfsx.c dla_gerfsx_extended.c dla_geamv.c
    dla_gercond.c dla_gerpvgrw.c dsysvxx.c dsyrfsx.c
@@ -913,7 +913,7 @@
    zheevd_2stage.c zheev_2stage.c zheevx_2stage.c zheevr_2stage.c
    zhbev_2stage.c zhbevx_2stage.c zhbevd_2stage.c zhegv_2stage.c
    zgesvdq.c zlaunhr_col_getrfnp.c zlaunhr_col_getrfnp2.c
-   zungtsqr.c zungtsqr_row.c zunhr_col.c zlatrs3.c ztrsyl3.c)
+   zungtsqr.c zungtsqr_row.c zunhr_col.c zlatrs3.c ztrsyl3.c zgelst.c)

 set(ZXLASRC zgesvxx.c zgerfsx.c zla_gerfsx_extended.c zla_geamv.c
    zla_gercond_c.c zla_gercond_x.c zla_gerpvgrw.c zsysvxx.c zsyrfsx.c


fix python destination for 2.x and debian layout (regression of 8210efe52c3020eb89815eb7af59e4af9fd66950, #544)

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -17,8 +17,11 @@
   message(STATUS "Using Debian Python package layout")
   set(PYTHON_PACKAGES_DIR dist-packages)
   set(SETUPTOOLS_ARG_EXTRA "--install-layout=deb")
-  # use major version only when installing with debian layout
-  string(SUBSTRING "${PYTHON_VERSION_XDOTY}" 0 1 PYTHON_VERSION_XDOTY)
+  # use major version only when installing 3.x with debian layout
+  string(SUBSTRING "${PYTHON_VERSION_XDOTY}" 0 1 PYTHON_VERSION_X)
+  if("${PYTHON_VERSION_X}" STREQUAL "3")
+    set(PYTHON_VERSION_XDOTY "${PYTHON_VERSION_X}")
+  endif()
 else()
   message(STATUS "Using default Python package layout")
   set(PYTHON_PACKAGES_DIR site-packages)


Fix auto detection of project name and file description. Fix template file directory

--- templates/CMake/GenerateVersionRcFile.cmake
+++ templates/CMake/GenerateVersionRcFile.cmake
@@ -3,29 +3,29 @@
 set(VERSIONRC_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_DIR}")

 # You can specify resource strings in arguments:
-#   NAME                      - Name of executable
-#   PRODUCT_NAME              - Name of product (${NAME} is default)
-#   FILE_DESCRIPTION          - ${NAME} is default
-#   VERSION_MAJOR             - Default: ${PROJECT_VERSION_MAJOR} if defined, otherwise 1.
-#   VERSION_MINOR             - Default: ${PROJECT_VERSION_MINOR} if defined, otherwise 0.
-#   VERSION_PATCH             - Default: ${PROJECT_VERSION_PATCH} if defined, otherwise 0.
-#   VERSION_TWEAK             - Default: ${PROJECT_VERSION_TWEAK} if defined, otherwise 0.
-#   FILE_VERSION_MAJOR        - Default: ${VERSION_MAJOR}
-#   FILE_VERSION_MINOR        - Default: ${VERSION_MINOR}
-#   FILE_VERSION_PATCH        - Default: ${VERSION_PATCH}
-#   FILE_VERSION_TWEAK        - Default: ${VERSION_TWEAK}
-#   PRODUCT_VERSION_MAJOR     - Default: ${VERSION_MAJOR}
-#   PRODUCT_VERSION_MINOR     - Default: ${VERSION_MINOR}
-#   PRODUCT_VERSION_PATCH     - Default: ${VERSION_PATCH}
-#   PRODUCT_VERSION_TWEAK     - Default: ${VERSION_TWEAK}
-#   COMPANY_NAME              - Your company name (no defaults)
-#   COMPANY_COPYRIGHT         - Default: Copyright (C) ${CURRENT_YEAR} ${COMPANY_NAME} is default if ${COMPANY_NAME} is defined, otherwise "".
-#   COMMENTS                  - Default: ${NAME} v${VERSION_MAJOR}.${VERSION_MINOR} is default
-#   ORIGINAL_FILENAME         - Default: ${NAME} is default
-#   INTERNAL_NAME             - Default: ${NAME} is default
-#   FILEFLAGS                 - Default: "VS_FF_DEBUG" if {CMAKE_BUILD_TYPE} is "Debug" or "RelWithDebInfo", otherwise 0x0L.
-#   FILETYPE                  - Default: "VFT_APP"
-#   FILESUBTYPE               - Default: "0x0L"
+#   NAME                  - Name of executable
+#   PRODUCT_NAME          - Default: ${NAME}
+#   FILE_DESCRIPTION      - Default: ${PROJECT_DESCRIPTION} or ${NAME}.
+#   VERSION_MAJOR         - Default: ${PROJECT_VERSION_MAJOR} if defined, otherwise 1.
+#   VERSION_MINOR         - Default: ${PROJECT_VERSION_MINOR} if defined, otherwise 0.
+#   VERSION_PATCH         - Default: ${PROJECT_VERSION_PATCH} if defined, otherwise 0.
+#   VERSION_TWEAK         - Default: ${PROJECT_VERSION_TWEAK} if defined, otherwise 0.
+#   FILE_VERSION_MAJOR    - Default: ${VERSION_MAJOR}
+#   FILE_VERSION_MINOR    - Default: ${VERSION_MINOR}
+#   FILE_VERSION_PATCH    - Default: ${VERSION_PATCH}
+#   FILE_VERSION_TWEAK    - Default: ${VERSION_TWEAK}
+#   PRODUCT_VERSION_MAJOR - Default: ${VERSION_MAJOR}
+#   PRODUCT_VERSION_MINOR - Default: ${VERSION_MINOR}
+#   PRODUCT_VERSION_PATCH - Default: ${VERSION_PATCH}
+#   PRODUCT_VERSION_TWEAK - Default: ${VERSION_TWEAK}
+#   COMPANY_NAME          - Your company name (no defaults)
+#   COMPANY_COPYRIGHT     - Default: Copyright (C) ${CURRENT_YEAR} ${COMPANY_NAME} is default if ${COMPANY_NAME} is defined, otherwise "".
+#   COMMENTS              - Default: ${NAME} v${VERSION_MAJOR}.${VERSION_MINOR} is default
+#   ORIGINAL_FILENAME     - Default: ${NAME} is default
+#   INTERNAL_NAME         - Default: ${NAME} is default
+#   FILEFLAGS             - Default: "VS_FF_DEBUG" if {CMAKE_BUILD_TYPE} is "Debug" or "RelWithDebInfo", otherwise 0x0L.
+#   FILETYPE              - Default: "VFT_APP"
+#   FILESUBTYPE           - Default: "0x0L"
 function(generate_version_rcfile rcfile)
   set(options)
   set(oneValueArgs
@@ -56,14 +56,14 @@
   cmake_parse_arguments(VERSIONRC "${options}" "${oneValueArgs}" "" ${ARGN})

   if(NOT DEFINED VERSIONRC_PRODUCT_NAME)
-    if(DEFINED PROJECT_NAME)
+    if(DEFINED PROJECT_NAME AND NOT "${PROJECT_NAME}" STREQUAL "")
       set(VERSIONRC_PRODUCT_NAME "${PROJECT_NAME}")
     else()
       set(VERSIONRC_PRODUCT_NAME "${VERSIONRC_NAME}")
     endif()
   endif()
   if(NOT DEFINED VERSIONRC_FILE_DESCRIPTION)
-    if(DEFINED PROJECT_DESCRIPTION)
+    if(DEFINED PROJECT_DESCRIPTION AND NOT "${PROJECT_DESCRIPTION}" STREQUAL "")
       set(VERSIONRC_FILE_DESCRIPTION "${PROJECT_DESCRIPTION}")
     else()
       set(VERSIONRC_FILE_DESCRIPTION "${VERSIONRC_NAME}")
@@ -201,8 +201,8 @@
   endif()

   configure_file(
-    ${VERSIONRC_CURRENT_LIST_DIR}/cmake/templates/VersionInfo.rc.in
+    ${VERSIONRC_CURRENT_LIST_DIR}/templates/VersionInfo.rc.in
     ${rcfile}
     @ONLY)
-  message(STATUS "Configure done. Output file: ${rcfile}")
+  message(STATUS "[generate_version_rcfile] Configure done. Output file: ${rcfile}")
 endfunction()


Fix skipped test reporting in CTest (#279)

This is a follow-up to c67cdf2. When the SKIP_RETURN_CODE gets set to 0,
the value is interpreted as 'false', and the test property is never
actually added.

Signed-off-by: Scott K Logan <8c724d14625be4be480086a9212b212477a303ef@cottsay.net>

--- ament_cmake_test/cmake/ament_add_test.cmake
+++ ament_cmake_test/cmake/ament_add_test.cmake
@@ -130,7 +130,7 @@
     "${testname}"
     PROPERTIES TIMEOUT ${ARG_TIMEOUT}
   )
-  if(ARG_SKIP_RETURN_CODE)
+  if(DEFINED ARG_SKIP_RETURN_CODE)
     set_tests_properties(
       "${testname}"
       PROPERTIES SKIP_RETURN_CODE ${ARG_SKIP_RETURN_CODE}


re-add support for scheme, which was dropped when the type generation code was redesigned ...

--- lib/OpenCogAtomTypes.cmake
+++ lib/OpenCogAtomTypes.cmake
@@ -10,6 +10,10 @@
 IF (NOT INHERITANCE_FILE)
 	SET (INHERITANCE_FILE "atom_types.inheritance")
 ENDIF (NOT INHERITANCE_FILE)
+
+IF (NOT SCM_FILE)
+	SET (SCM_FILE "../scm/type_constructors.scm")
+ENDIF (NOT SCM_FILE)

 # Check if this is for opencog/atomspace directory. If so, do not reference opencog::classserver()
 # to avoid infinit recursivity in ClassServer constructor.
@@ -25,6 +29,14 @@
 FILE(APPEND "${HEADER_FILE}"  "#include <opencog/atomspace/types.h>\nnamespace opencog\n{\n")
 FILE(WRITE "${DEFINITIONS_FILE}"  "/* File automatically generated. Do not edit */\n#include <opencog/atomspace/ClassServer.h>\n#include <opencog/atomspace/atom_types.h>\n#include <opencog/atomspace/types.h>\n#include \"atom_types.h\"\n")
 FILE(WRITE "${INHERITANCE_FILE}"  "/* File automatically generated. Do not edit */\n")
+
+FILE(WRITE "${SCM_FILE}" "\n")
+FILE(APPEND "${SCM_FILE}" "; DO NOT EDIT THIS FILE!  This file was automatically\n")
+FILE(APPEND "${SCM_FILE}" "; generated from atom definitions in types.script\n")
+FILE(APPEND "${SCM_FILE}" ";\n")
+FILE(APPEND "${SCM_FILE}" "; This file contains basic scheme wrappers for atom creation.\n")
+FILE(APPEND "${SCM_FILE}" ";\n")
+
 FILE(STRINGS "${SCRIPT_FILE}" TYPE_SCRIPT_CONTENTS)
 FOREACH (LINE ${TYPE_SCRIPT_CONTENTS})
     # this regular expression is more complex than required due to cmake's
@@ -85,6 +97,20 @@

         MESSAGE(STATUS "Atom type name: ${TYPE_NAME}")

+        # Try to guess if the thing is a node or link based on its name
+        STRING(REGEX MATCH "NODE$" ISNODE ${TYPE})
+        STRING(REGEX MATCH "LINK$" ISLINK ${TYPE})
+
+        # Print out the scheme definitions
+        IF (ISNODE STREQUAL "NODE")
+            FILE(APPEND "${SCM_FILE}" "(define (${TYPE_NAME} . x)\n")
+            FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-node (append (list '${TYPE_NAME}) x)))\n")
+        ENDIF (ISNODE STREQUAL "NODE")
+        IF (ISLINK STREQUAL "LINK")
+            FILE(APPEND "${SCM_FILE}" "(define (${TYPE_NAME} . x)\n")
+            FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-link (append (list '${TYPE_NAME}) x)))\n")
+        ENDIF (ISLINK STREQUAL "LINK")
+
         IF (PARENT_TYPES)
             STRING(REGEX REPLACE "[ 	]*,[ 	]*" ";" PARENT_TYPES "${PARENT_TYPES}")
             FOREACH (PARENT_TYPE ${PARENT_TYPES})


iox-#1287 Adjust RPATH (RUNPATH) so that is in the build process compatible with our iceoryx_meta and colcon, and also correctly set for relocatable install

Signed-off-by: Christian Eltzschig <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@elchris.org>

--- iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
+++ iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
@@ -34,7 +34,6 @@
     set(PROJECT_NAMESPACE ${PARAMS_NAMESPACE} )

     set(DESTINATION_BINDIR ${CMAKE_INSTALL_BINDIR})
-    set(DESTINATION_LIBDIR ${CMAKE_INSTALL_LIBDIR})
     set(DESTINATION_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/${PARAMS_PROJECT_PREFIX})
     set(DESTINATION_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PARAMS_NAME})

@@ -82,8 +81,8 @@
     TARGETS ${INSTALL_TARGETS}
     EXPORT ${TARGETS_EXPORT_NAME}
     RUNTIME DESTINATION ${DESTINATION_BINDIR} COMPONENT bin
-    LIBRARY DESTINATION ${DESTINATION_LIBDIR} COMPONENT bin
-    ARCHIVE DESTINATION ${DESTINATION_LIBDIR} COMPONENT bin
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT bin
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT bin
     )

     # header
@@ -130,24 +129,30 @@
 endMacro()

 Macro(iox_set_rpath)
-    set(arguments TARGET RPATH )
-    cmake_parse_arguments(IOX "" "" "${arguments}" ${ARGN} )
+    set(arguments TARGET)
+    cmake_parse_arguments(IOX "" "${arguments}" "" ${ARGN} )

     if ( LINUX OR UNIX )
-        set_target_properties(
-            ${IOX_TARGET}
-            PROPERTIES
-            BUILD_RPATH ${IOX_RPATH}
-            INSTALL_RPATH ${IOX_RPATH}
-        )
+        set(IOX_RPATH_PREFIX "\$ORIGIN")
     elseif( APPLE )
-        set_target_properties(
-                    ${IOX_TARGET}
-                    PROPERTIES
-                    BUILD_RPATH ${IOX_RPATH}
-                    INSTALL_RPATH ${IOX_RPATH}
-                )
-    endif( LINUX OR UNIX )
+        set(IOX_RPATH_PREFIX "@loader_path")
+    endif()
+
+    set(IOX_BUILD_RPATH ${IOX_RPATH_PREFIX}/../iceoryx_hoofs:${IOX_RPATH_PREFIX}/../iceoryx_posh:${IOX_RPATH_PREFIX}/../iceoryx_hoofs/platform:${IOX_RPATH_PREFIX}/../iceoryx_binding_c)
+    set(IOX_INSTALL_RPATH ${IOX_RPATH_PREFIX}/../${CMAKE_INSTALL_LIBDIR})
+
+    # TODO: iox-#1287 to be compatible with our current iceoryx_meta structure where we have build/posh build/hoofs build/binding_c
+    set(IOX_BUILD_RPATH ${IOX_BUILD_RPATH}:${IOX_RPATH_PREFIX}/../hoofs:${IOX_RPATH_PREFIX}/../posh:${IOX_RPATH_PREFIX}/../hoofs/platform:${IOX_RPATH_PREFIX}/../binding_c)
+    # TODO: iox-#1287 to be compatible with our current iceoryx_meta structure where the examples are again in a subfolder, build/iceoryx_examples/example_name
+    set(IOX_BUILD_RPATH ${IOX_BUILD_RPATH}:${IOX_RPATH_PREFIX}/../../hoofs:${IOX_RPATH_PREFIX}/../../posh:${IOX_RPATH_PREFIX}/../../hoofs/platform:${IOX_RPATH_PREFIX}/../../binding_c)
+    # TODO: END iox-#1287
+
+    set_target_properties(
+        ${IOX_TARGET}
+        PROPERTIES
+        BUILD_RPATH ${IOX_BUILD_RPATH}
+        INSTALL_RPATH ${IOX_INSTALL_RPATH}
+    )
 endMacro()

 Macro(iox_set_file_language)
@@ -197,18 +202,19 @@
         target_link_libraries(${IOX_TARGET} ${IOX_LIBS_UNIX})
     endif()

+    iox_set_rpath( TARGET ${IOX_TARGET} )
+
     set(IOX_WARNINGS ${ICEORYX_WARNINGS})
+    if ( IOX_USE_C_LANGUAGE )
+        if("-Wno-noexcept-type" IN_LIST IOX_WARNINGS)
+            list(REMOVE_ITEM IOX_WARNINGS "-Wno-noexcept-type")
+        endif()
+    endif()

     if ( IOX_USE_C_LANGUAGE )
         iox_set_file_language( USE_C_LANGUAGE FILES ${IOX_FILES} )
     else()
         iox_set_file_language( FILES ${IOX_FILES} )
-    endif()
-
-    if ( IOX_USE_C_LANGUAGE )
-        if("-Wno-noexcept-type" IN_LIST IOX_WARNINGS)
-            list(REMOVE_ITEM IOX_WARNINGS "-Wno-noexcept-type")
-        endif()
     endif()

     target_compile_options(${IOX_TARGET} ${IOX_WARNINGS} ${ICEORYX_SANITIZER})
@@ -311,7 +317,7 @@
         target_link_libraries(${IOX_TARGET} PUBLIC ${IOX_PUBLIC_LIBS_APPLE} PRIVATE ${IOX_PRIVATE_LIBS_APPLE})
     endif ( LINUX )

-    iox_set_rpath( TARGET ${IOX_TARGET} RPATH ${IOX_RPATH} )
+    iox_set_rpath( TARGET ${IOX_TARGET} )

     foreach(INTERFACE ${IOX_BUILD_INTERFACE})
         target_include_directories(${IOX_TARGET}


Fixed protobuf.cmake

Fixed protobuf.cmake

--- modules/protobuf.cmake
+++ modules/protobuf.cmake
@@ -13,7 +13,7 @@
   SET(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support" FORCE)

   # Module subdirectory
-  add_subdirectory("protobuf/cmake")
+  add_subdirectory("protobuf")

   # Module folder
   set_target_properties(libprotobuf PROPERTIES FOLDER "modules/protobuf")


Optimizations for repos with large amounts of ignored files

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -735,14 +735,6 @@
   include(CPack)
 endfunction()

-function(xpListPrependToAll var prefix)
-  set(listVar)
-  foreach(f ${ARGN})
-    list(APPEND listVar "${prefix}/${f}")
-  endforeach()
-  set(${var} "${listVar}" PARENT_SCOPE)
-endfunction()
-
 function(xpListAppendTrailingSlash var)
   set(listVar)
   foreach(f ${ARGN})
@@ -872,9 +864,10 @@
     OUTPUT_VARIABLE ignoredDirs
     OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-  separate_arguments(ignoredDirs UNIX_COMMAND "${ignoredDirs}")
+  string(REPLACE ";" "\\\\;" ignoredDirs "${ignoredDirs}")
+  string(REPLACE "\n" ";" ignoredDirs "${ignoredDirs}")
   list(APPEND ignoredDirs ${ARGN})
-  xpListPrependToAll(ignoredDirs ${dir} ${ignoredDirs})
+  list(TRANSFORM ignoredDirs PREPEND ${dir}/)
   set(${var} "${ignoredDirs}" PARENT_SCOPE)
 endfunction()

@@ -890,8 +883,9 @@
     OUTPUT_VARIABLE ignoredFiles
     OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-  separate_arguments(ignoredFiles UNIX_COMMAND "${ignoredFiles}")
-  xpListPrependToAll(ignoredFiles ${dir} ${ignoredFiles})
+  string(REPLACE ";" "\\\\;" ignoredFiles "${ignoredFiles}")
+  string(REPLACE "\n" ";" ignoredFiles "${ignoredFiles}")
+  list(TRANSFORM ignoredFiles PREPEND ${dir}/)
   set(${var} "${ignoredFiles}" PARENT_SCOPE)
 endfunction()

@@ -907,15 +901,17 @@
     OUTPUT_VARIABLE untrackedFiles
     OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-  separate_arguments(untrackedFiles UNIX_COMMAND "${untrackedFiles}")
-  xpListPrependToAll(untrackedFiles ${dir} ${untrackedFiles})
+  string(REPLACE ";" "\\\\;" untrackedFiles "${untrackedFiles}")
+  string(REPLACE "\n" ";" untrackedFiles "${untrackedFiles}")
+  list(TRANSFORM untrackedFiles PREPEND ${dir}/)
   set(${var} "${untrackedFiles}" PARENT_SCOPE)
 endfunction()

 function(xpGlobFiles var item)
+  set(globexpr ${ARGN})
   if(IS_DIRECTORY ${item})
     string(REGEX REPLACE "/$" "" item ${item}) # remove trailing slash
-    xpListPrependToAll(globexpr ${item} ${ARGN})
+    list(TRANSFORM globexpr PREPEND ${item}/)
     # NOTE: By default GLOB_RECURSE omits directories from result list
     file(GLOB_RECURSE dirFiles ${globexpr})
     xpGitUntrackedFiles(untrackedFiles ${item})
@@ -927,7 +923,7 @@
     list(APPEND listVar ${dirFiles})
   else()
     get_filename_component(dir ${item} DIRECTORY)
-    xpListPrependToAll(globexpr ${dir} ${ARGN})
+    list(TRANSFORM globexpr PREPEND ${dir}/)
     file(GLOB match ${globexpr})
     list(FIND match ${item} idx)
     if(NOT ${idx} EQUAL -1)
@@ -1024,6 +1020,10 @@
   else()
     list(REMOVE_DUPLICATES masterSrcList)
     if(EXISTS ${CMAKE_SOURCE_DIR}/.git)
+      if(NOT GIT_FOUND)
+        include(FindGit)
+        find_package(Git)
+      endif()
       xpGitIgnoredDirs(ignoredDirs ${CMAKE_SOURCE_DIR} .git/)
       xpGitUntrackedFiles(untrackedFiles ${CMAKE_SOURCE_DIR})
       file(GLOB topdir ${_dir}/*)
@@ -1032,8 +1032,10 @@
       list(SORT topdir) # sort list in-place alphabetically
       foreach(item ${topdir})
         xpGlobFiles(repoFiles ${item} *)
-        xpGlobFiles(fmtFiles ${item} *.c *.h *.cpp *.hpp *.cu *.cuh *.proto)
       endforeach()
+      set(fmtFiles ${repoFiles})
+      list(FILTER fmtFiles INCLUDE REGEX "^.*\.(c|h|cpp|hpp|cu|cuh|proto)$")
+      list(FILTER fmtFiles EXCLUDE REGEX "^.*\.crtoolrc$") # CMake was erroneously matching .crtoolrc
       foreach(item ${XP_SOURCE_DIR_IGNORE})
         xpGlobFiles(ignoreFiles ${item} *)
       endforeach()
@@ -1100,7 +1102,8 @@
 endmacro()

 function(xpSourceDirIgnore)
-  xpListPrependToAll(ignoredDirs ${CMAKE_CURRENT_SOURCE_DIR} ${ARGN})
+  set(ignoredDirs ${ARGN})
+  list(TRANSFORM ignoredDirs PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/)
   list(APPEND XP_SOURCE_DIR_IGNORE ${ignoredDirs})
   set(XP_SOURCE_DIR_IGNORE ${XP_SOURCE_DIR_IGNORE} PARENT_SCOPE)
 endfunction()


[CMake] Accidentally committed code that was using a variable only populated in some earlier code. NFC.

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -251,7 +251,7 @@
                       ../profile/InstrProfilingPlatformDarwin)
   foreach (os ${ARGN})
     list_union(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS BUILTIN_SUPPORTED_ARCH)
-    foreach (arch ${DARWIN_BUILTIN_ARCHS} ${DARWIN_BUILTIN_SIM_ARCHS})
+    foreach (arch ${DARWIN_BUILTIN_ARCHS})
       darwin_find_excluded_builtins_list(${arch}_${os}_EXCLUDED_BUILTINS
                               OS ${os}
                               ARCH ${arch}


[CMake] Add some missing dependencies of the `gyb` custom command invocations

--- cmake/modules/SwiftHandleGybSources.cmake
+++ cmake/modules/SwiftHandleGybSources.cmake
@@ -119,11 +119,13 @@
   set(gyb_extra_sources
       "${SWIFT_SOURCE_DIR}/utils/GYBUnicodeDataUtils.py"
       "${SWIFT_SOURCE_DIR}/utils/SwiftIntTypes.py"
+      "${SWIFT_SOURCE_DIR}/utils/SwiftFloatingPointTypes.py"
       "${SWIFT_SOURCE_DIR}/utils/UnicodeData/GraphemeBreakProperty.txt"
       "${SWIFT_SOURCE_DIR}/utils/UnicodeData/GraphemeBreakTest.txt"
       "${SWIFT_SOURCE_DIR}/utils/gyb_stdlib_support.py"
       "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/__init__.py"
       "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Child.py"
+      "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Classification.py"
       "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/kinds.py"
       "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Node.py"
       "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/AttributeNodes.py"


[t:4871] forgot global generates GSYMS too

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

--- cmake_modules/TokuBuildTagDatabases.cmake
+++ cmake_modules/TokuBuildTagDatabases.cmake
@@ -82,12 +82,14 @@
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GTAGS"
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GRTAGS"
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GPATH"
+      OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GSYMS"
       COMMAND ${GTAGS} --gtagsconf "${CMAKE_CURRENT_SOURCE_DIR}/.globalrc"
       DEPENDS ${all_srcs} ${all_hdrs} install_tdb_h generate_config_h generate_log_code
       WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
     add_custom_target(build_GTAGS ALL DEPENDS
       "${CMAKE_CURRENT_SOURCE_DIR}/GTAGS"
       "${CMAKE_CURRENT_SOURCE_DIR}/GRTAGS"
-      "${CMAKE_CURRENT_SOURCE_DIR}/GPATH")
+      "${CMAKE_CURRENT_SOURCE_DIR}/GPATH"
+      "${CMAKE_CURRENT_SOURCE_DIR}/GSYMS")
   endif ()
-endif ()+endif ()


Make Python code more readable

Make Python code more readable

They are four instructions. Sadly we can't indent them correctly in the CMake, but this is already more readable than putting everything on one line.

--- cmake/GetMIMETypes.cmake
+++ cmake/GetMIMETypes.cmake
@@ -8,7 +8,10 @@
 	get_filename_component(parent_dir ${plugin_dir} DIRECTORY) #Where to import it from.
 	#Execute the init file and get Python to print the list of MIME types.
 	execute_process( #Imports the project in the same way as in luna.plugins._load_candidates.
-		COMMAND "${PYTHON_EXECUTABLE}" "-c" "import imp; f, p, d = imp.find_module('${plugin_name}', ['${parent_dir}']); m = imp.load_module('${plugin_name}', f, p, d); print(';'.join(m.metadata()['mime']['extensions']))"
+		COMMAND "${PYTHON_EXECUTABLE}" "-c" "import imp
+file, path, description = imp.find_module('${plugin_name}', ['${parent_dir}'])
+module = imp.load_module('${plugin_name}', file, path, description)
+print(';'.join(module.metadata()['mime']['extensions']))"
 		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 		RESULT_VARIABLE python_status
 		OUTPUT_VARIABLE found_mime_types


Fix hardcoded build dir in Installation.cmake

--- cmake/Installation.cmake
+++ cmake/Installation.cmake
@@ -70,7 +70,7 @@
 # libbiodynamo.so
 install(TARGETS biodynamo LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
 if(dict)
-  install(FILES build/libbiodynamo_dict_rdict.pcm DESTINATION ${CMAKE_INSTALL_LIBDIR})
+  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libbiodynamo_dict_rdict.pcm" DESTINATION ${CMAKE_INSTALL_LIBDIR})
 endif()
 # libbdmcuda.a
 if(CUDA_FOUND)


[CMake] fix mapnik_option

[CMake] fix mapnik_option

--- cmake/MapnikOption.cmake
+++ cmake/MapnikOption.cmake
@@ -1,4 +1,4 @@
-macro(mapnik_option _name)
-    option(${ARGN})
-    add_feature_info("${ARGV0}" ${ARGV0} "${ARGV1}")
+macro(mapnik_option option_name option_description option_default_value)
+    option(${option_name} "${option_description}" ${option_default_value})
+    add_feature_info(${option_name} ${${option_name}} "${option_description}")
 endmacro()


cmake: flib: fix multiple NAMES handling

--- cmake/qibuild/find.cmake
+++ cmake/qibuild/find.cmake
@@ -73,13 +73,13 @@
     qi_error("empty name: ${name}")
   endif()

-  set(${name}_LIB "${_name}_LIB-NOTFOUND" CACHE INTERNAL "Cleared." FORCE)
+  set(${name}_LIB "${name}_LIB-NOTFOUND" CACHE INTERNAL "Cleared." FORCE)

   qi_debug("LIBFIND: modulelist: ${_flib_modulelist}")
   if (ARG_SYSTEM)
     qi_deprecated("Deprecated SYSTEM arguments")
   endif()
-  find_library(${name}_LIB ${ARG_NAMES})
+  find_library(${name}_LIB "${name}" NAMES ${ARG_NAMES})

   if (ARG_DEBUG)
     set(_keyword "debug")


oops - left a debug message that doesn't work on windows [skip travis]

--- PyPort/system-python.cmake
+++ PyPort/system-python.cmake
@@ -63,7 +63,6 @@
 		set(PYTHON_DEBUG_POSTFIX "_d")
 	endif()

-	message( ${CMAKE_LIBRARY_ARCHITECTURE})
 	#import the python lib
 	find_library(PYTHON_LIBRARY_RELEASE
 		NAMES ${PYTHON_VER}m


disabling all warnings for Clang compilation under Windows

--- common/cmake/clang.cmake
+++ common/cmake/clang.cmake
@@ -34,6 +34,7 @@
 #  SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /MP")          # compile source files in parallel
   SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GR")          # enable runtime type information (on by default)
   SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -Xclang -fcxx-exceptions") # enable C++ exceptions in Clang
+  SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /w")          # disable all warnings
   IF (EMBREE_STACK_PROTECTOR)
     SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS")          # protects against return address overrides
   ELSE()
@@ -56,14 +57,14 @@
   SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox")                       # enable full optimizations
   SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi")                       # inline intrinsic functions
   SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Gy")                       # package individual functions
-  SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-vectorize")            # disable auto vectorization
+#  SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-vectorize")            # disable auto vectorization

   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}")
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /DTBB_USE_DEBUG")          # configures TBB in debug mode
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ox")                      # enable full optimizations
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi")                      # inline intrinsic functions
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Gy")                      # package individual functions
-  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-vectorize")           # disable auto vectorization
+#  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-vectorize")           # disable auto vectorization
   SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG")        # generate debug information
   SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG")  # generate debug information


Correct scope when setting default c and cxx compiler for darwin.

--- default_build_settings.cmake
+++ default_build_settings.cmake
@@ -250,13 +250,13 @@
   endif()
   if(VESPA_COMPILER_VARIANT STREQUAL "gcc")
     if(APPLE)
-      set(DEFAULT_CMAKE_C_COMPILER "/usr/local/bin/gcc-9" PARENT_SCOPE)
-      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/bin/g++-9" PARENT_SCOPE)
+      set(DEFAULT_CMAKE_C_COMPILER "/usr/local/bin/gcc-9")
+      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/bin/g++-9")
     endif()
   elseif(VESPA_COMPILER_VARIANT STREQUAL "clang")
     if(APPLE)
-      set(DEFAULT_CMAKE_C_COMPILER, "/usr/local/opt/llvm/bin/clang" PARENT_SCOPE)
-      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/opt/llvm/bin/clang++" PARENT_SCOPE)
+      set(DEFAULT_CMAKE_C_COMPILER, "/usr/local/opt/llvm/bin/clang")
+      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/opt/llvm/bin/clang++")
     elseif(VESPA_OS_DISTRO STREQUAL "fedora")
       set(DEFAULT_CMAKE_C_COMPILER "/usr/bin/clang")
       set(DEFAULT_CMAKE_CXX_COMPILER "/usr/bin/clang++")
@@ -265,8 +265,8 @@
     endif()
   elseif(VESPA_COMPILER_VARIANT STREQUAL "appleclang")
     if(APPLE)
-      set(DEFAULT_CMAKE_C_COMPILER "/usr/bin/clang" PARENT_SCOPE)
-      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/bin/clang++" PARENT_SCOPE)
+      set(DEFAULT_CMAKE_C_COMPILER "/usr/bin/clang")
+      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/bin/clang++")
     else()
       message(FATAL_ERROR "-- appleclang compiler variant not supported for ${VESPA_OS_DISTRO_COMBINED}")
     endif()


Don't use hipcc to link for executables Co-authored-by: Terry Cojean <terry.cojean@kit.edu>

Don't use hipcc to link for executables
Co-authored-by: Terry Cojean <782fd97066eab5689f803392080a4087b68ed394@kit.edu>

--- config/cmake/modules/MfemCmakeUtilities.cmake
+++ config/cmake/modules/MfemCmakeUtilities.cmake
@@ -47,6 +47,7 @@
 macro(mfem_add_executable NAME)
   if (MFEM_USE_HIP)
     hip_add_executable(${NAME} ${ARGN})
+    set_target_properties(${NAME} PROPERTIES LINKER_LANGUAGE CXX)
   else()
     add_executable(${NAME} ${ARGN})
   endif()


Removed --iostandard from fasm2bels invocation (for now?)

Signed-off-by: Maciej Kurc <572803cc6e8d7bb35033942e4b03254951a2e0d6@antmicro.com>

--- xc7/make/arch_define.cmake
+++ xc7/make/arch_define.cmake
@@ -70,7 +70,6 @@
         --db_root ${PRJXRAY_DB_DIR}/${ARCH} \
         --rr_graph \${OUT_RRXML_VIRT_LOCATION} \
         --route \${OUT_ROUTE} \
-        --iostandard LVCMOS33 \
         --bitread $<TARGET_FILE:bitread> \
         --bit_file \${OUT_BIN} \
         --fasm_file \${OUT_BIN}.fasm \


Correct search paths, remove search of includes (they are not package with
engine generic), use find_package for boost.

	* build-aux/cmake/modules/FindSdkEngine.cmake: .

--- build-aux/cmake/modules/FindSdkEngine.cmake
+++ build-aux/cmake/modules/FindSdkEngine.cmake
@@ -85,49 +85,43 @@
 list(APPEND ${PACKAGE_NAME}_ADDITIONAL_DEBUG_PATHS
             ${${PACKAGE_NAME}_ROOT_DIR}/Debug/gostai/core/i686-pc-cygwin/engine
             ${${PACKAGE_NAME}_ROOT_DIR}/Debug/gostai/core/i686-pc-linux-gnu/engine
+            ${${PACKAGE_NAME}_ROOT_DIR}/Debug/gostai/core/mingw32/engine
             ${${PACKAGE_NAME}_ROOT_DIR}/Debug/lib
+            ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/i686-pc-cygwin/engine
             ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/i686-pc-linux-gnu/engine
-            ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/i686-pc-linux-gnu/engine
+            ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/mingw32/engine
             ${${PACKAGE_NAME}_ROOT_DIR}/lib)

 list(APPEND ${PACKAGE_NAME}_ADDITIONAL_RELEASE_PATHS
             ${${PACKAGE_NAME}_ROOT_DIR}/Release/gostai/core/i686-pc-cygwin/engine
             ${${PACKAGE_NAME}_ROOT_DIR}/Release/gostai/core/i686-pc-linux-gnu/engine
+            ${${PACKAGE_NAME}_ROOT_DIR}/Release/gostai/core/mingw32/engine
             ${${PACKAGE_NAME}_ROOT_DIR}/Release/lib
+            ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/i686-pc-cygwin/engine
             ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/i686-pc-linux-gnu/engine
-            ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/i686-pc-linux-gnu/engine
+            ${${PACKAGE_NAME}_ROOT_DIR}/gostai/core/mingw32/engine
             ${${PACKAGE_NAME}_ROOT_DIR}/lib)

-# Search for the include directory.
-package_search(PATH ${PACKAGE_NAME}_INCLUDE uobject.h
-               FULLNAME "SDK Engine INCLUDE"
-               PATHS ${${PACKAGE_NAME}_ROOT_DIR}/Release/include
-                     ${${PACKAGE_NAME}_ROOT_DIR}/Debug/include
-                     ${${PACKAGE_NAME}_ROOT_DIR}/include)
+# Search for the include directory
+# Includes are packaged with UrbiKernel and SdkRemote, but not with Engine
+#package_search(PATH ${PACKAGE_NAME}_INCLUDE uobject.h
+#               FULLNAME "SDK Engine INCLUDE"
+#               PATHS ${${PACKAGE_NAME}_ROOT_DIR}/Release/include
+#                     ${${PACKAGE_NAME}_ROOT_DIR}/Debug/include
+#                     ${${PACKAGE_NAME}_ROOT_DIR}/include)

 # Search for URBI debug library
-package_search(DEBUG LIBRARY ${PACKAGE_NAME}_URBI_DEBUG_LIBRARY urbicore
-               FULLNAME "SDK Engine for debug"
+package_search(DEBUG LIBRARY ${PACKAGE_NAME}_URBI_DEBUG_LIBRARY urbicore liburbicore
+               FULLNAME "Engine Generic for debug"
                PATHS ${${PACKAGE_NAME}_ADDITIONAL_DEBUG_PATHS})

 # Search for URBI release library
-package_search(RELEASE LIBRARY ${PACKAGE_NAME}_URBI_RELEASE_LIBRARY urbicore
-               FULLNAME "SDK Engine for release"
+package_search(RELEASE LIBRARY ${PACKAGE_NAME}_URBI_RELEASE_LIBRARY urbicore liburbicore
+               FULLNAME "Engine Generic for release"
                PATHS ${${PACKAGE_NAME}_ADDITIONAL_RELEASE_PATHS})

 # Search for the thread part of the boost library
-if(UNIX)
-  package_search(LIBRARY ${PACKAGE_NAME}_THREAD_BOOST_LIBRARY boost_thread-gcc41-mt-1_34_1
-                 INSTALL "Boost version 1.34.1 (thread part)"
-                 PATHS ${${PACKAGE_NAME}_ADDITIONAL_DEBUG_PATHS}
-                       ${${PACKAGE_NAME}_ADDITIONAL_RELEASE_PATHS})
-endif(UNIX)
-if(WIN32)
-  package_search(LIBRARY ${PACKAGE_NAME}_THREAD_BOOST_LIBRARY boost_thread-vc80-mt-1_34_1
-                 INSTALL "Boost version 1.34.1 (thread part)"
-                 PATHS ${${PACKAGE_NAME}_ADDITIONAL_RELEASE_PATHS}
-                       ${${PACKAGE_NAME}_ADDITIONAL_DEBUG_PATHS})
-endif(WIN32)
+find_package(Boost 1.34.1 COMPONENTS thread EXACT REQUIRED)

 # Additionnal libraries for windows platform.
 if(WIN32)


BUG: Fix itkexamples_common.cmake for a superbuild.

Also update the CDash entry to point to open.cdash.org.

--- Utilities/Dashboard/itkexamples_common.cmake
+++ Utilities/Dashboard/itkexamples_common.cmake
@@ -35,6 +35,7 @@
 #   dashboard_do_coverage     = True to enable coverage (ex: gcov)
 #   dashboard_do_memcheck     = True to enable memcheck (ex: valgrind)
 #   dashboard_no_clean        = True to skip build tree wipeout
+#   dashboard_superbuild      = True to use the Superbuild
 #   CTEST_UPDATE_COMMAND      = path to svn command-line client
 #   CTEST_BUILD_FLAGS         = build tool arguments (ex: -j2)
 #   CTEST_TEST_TIMEOUT        = Per-test timeout length
@@ -136,11 +137,11 @@
   set(dashboard_git_url "https://github.com/InsightSoftwareConsortium/ITKExamples.git")
 endif()
 if(NOT DEFINED dashboard_git_branch)
-  if("${dashboard_model}" STREQUAL "Nightly")
-    set(dashboard_git_branch nightly-master)
-  else()
+  #if("${dashboard_model}" STREQUAL "Nightly")
+  #  set(dashboard_git_branch nightly-master)
+  #else()
     set(dashboard_git_branch master)
-  endif()
+  #endif()
 endif()
 if(NOT DEFINED dashboard_git_crlf)
   if(UNIX)
@@ -244,8 +245,8 @@
   # CTestConfig.cmake info here.
   set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
   set(CTEST_DROP_METHOD "http")
-  set(CTEST_DROP_SITE "mmmccormick.com")
-  set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ITKExamples")
+  set(CTEST_DROP_SITE "open.cdash.org")
+  set(CTEST_DROP_LOCATION "/submit.php?project=Insight")
   set(CTEST_DROP_SITE_CDASH TRUE)
 endif()

@@ -397,8 +398,13 @@
     set(options
       -DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}
       )
-    ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
-      SOURCE "${CTEST_SOURCE_DIRECTORY}" OPTIONS "${options}")
+    if( dashboard_superbuild )
+      ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
+        SOURCE "${CTEST_SOURCE_DIRECTORY}/Superbuild")
+    else()
+      ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
+        SOURCE "${CTEST_SOURCE_DIRECTORY}" OPTIONS "${options}")
+    endif()
     ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})

     if(NOT dashboard_no_submit)
@@ -437,7 +443,11 @@
       if(COMMAND dashboard_hook_test)
         dashboard_hook_test()
       endif()
-      ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "^${subproj}$" ${CTEST_TEST_ARGS})
+      if(dashboard_superbuild)
+        ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}/ITKExamples-build" INCLUDE_LABEL "^${subproj}$" ${CTEST_TEST_ARGS})
+      else()
+        ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "^${subproj}$" ${CTEST_TEST_ARGS})
+      endif()
       set(safe_message_skip 1) # Block further messages
       if(NOT dashboard_no_submit)
         ctest_submit(PARTS Test)
@@ -485,7 +495,11 @@
     if(COMMAND dashboard_hook_test)
       dashboard_hook_test()
     endif()
-    ctest_test(${CTEST_TEST_ARGS})
+    if(dashboard_superbuild)
+      ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}/ITKExamples-build" ${CTEST_TEST_ARGS})
+    else()
+      ctest_test(${CTEST_TEST_ARGS})
+    endif()
     set(safe_message_skip 1) # Block further messages
     if(NOT dashboard_no_submit)
       ctest_submit(PARTS Test)


Don't 'fix' default compiler settings for MSVC...

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -51,7 +51,7 @@
     find_package(Threads)
   endif()

-  fix_default_compiler_settings_()
+  # fix_default_compiler_settings_()
   if (MSVC)
     # Newlines inside flags variables break CMake's NMake generator.
     # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.


remove -Zi from MSVC compiler options

remove -Zi from MSVC compiler options

This is incompatible with compiler caches such as sccache and
clcache. If a project including Google Test specifies /Z7 instead,
building fails with:

sccache C:\PROGRA~2\MICROS~1\2019\ENTERP~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\cl.exe  /nologo /TP -D__SSE2__ -D__SSE__ -I..\lib\googletest-1.10.x\googlemock\include -I..\lib\googletest-1.10.x\googlemock -I..\lib\googletest-1.10.x\googletest\include -I..\lib\googletest-1.10.x\googletest /DWIN32 /D_WINDOWS /W4 /GR  /MD /Z7 /O2 /Ob1 /DNDEBUG -GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi -D_UNICODE -DUNICODE -DWIN32 -D_WIN32 -DSTRICT -DWIN32_LEAN_AND_MEAN -wd4702 -DGTEST_HAS_PTHREAD=0 -EHsc -D_HAS_EXCEPTIONS=1  /Gy /showIncludes /Folib\googletest-1.10.x\googlemock\CMakeFiles\gmock_main.dir\src\gmock-all.cc.obj /Fdbin\gmock_main.pdb /FS -c ..\lib\googletest-1.10.x\googlemock\src\gmock-all.cc
FAILED: lib/googletest-1.10.x/googlemock/CMakeFiles/gmock_main.dir/src/gmock-all.cc.obj
..\lib\googletest-1.10.x\googletest\src\gtest-all.cc: fatal error C1041: cannot open program database 'D:\a\mixxx\mixxx\build\bin\gmock_main.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
cl : Command line warning D9025 : overriding '/Z7' with '/Zi'

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -72,7 +72,7 @@
   if (MSVC)
     # Newlines inside flags variables break CMake's NMake generator.
     # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
-    set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi")
+    set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J")
     set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
     set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
     set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")


erthink-cmake: fix search GCC tools for LTO.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -291,21 +291,21 @@

     set(gcc_suffix "")
     if(gcc_collect_valid AND gcc_collect)
-      string(REGEX MATCH "^(.*cc)(-.+)$" gcc_suffix_valid ${gcc_collect})
+      string(REGEX MATCH "^(.*(cc|\\+\\+))(-.+)$" gcc_suffix_valid ${gcc_collect})
       if(gcc_suffix_valid)
-        string(REGEX MATCH "^(.*cc)(-.+)$" "\\2" gcc_suffix ${gcc_collect})
+        string(REGEX REPLACE "^(.*(cc|\\+\\+))(-.+)$" "\\3" gcc_suffix ${gcc_collect})
       endif()
     endif()

     get_filename_component(gcc_dir ${CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER} DIRECTORY)
     if(NOT CMAKE_GCC_AR)
-      find_program(CMAKE_GCC_AR NAMES gcc${gcc_suffix}-ar gcc-ar${gcc_suffix} PATHS ${gcc_dir} NO_DEFAULT_PATH)
+      find_program(CMAKE_GCC_AR NAMES "gcc${gcc_suffix}-ar" "gcc-ar${gcc_suffix}" PATHS "${gcc_dir}" NO_DEFAULT_PATH)
     endif()
     if(NOT CMAKE_GCC_NM)
-      find_program(CMAKE_GCC_NM NAMES gcc${gcc_suffix}-nm gcc-nm${gcc_suffix} PATHS ${gcc_dir} NO_DEFAULT_PATH)
+      find_program(CMAKE_GCC_NM NAMES "gcc${gcc_suffix}-nm" "gcc-nm${gcc_suffix}" PATHS "${gcc_dir}" NO_DEFAULT_PATH)
     endif()
     if(NOT CMAKE_GCC_RANLIB)
-      find_program(CMAKE_GCC_RANLIB NAMES gcc${gcc_suffix}-ranlib gcc-ranlib${gcc_suffix} PATHS ${gcc_dir} NO_DEFAULT_PATH)
+      find_program(CMAKE_GCC_RANLIB NAMES "gcc${gcc_suffix}-ranlib" "gcc-ranlib${gcc_suffix}" PATHS "${gcc_dir}" NO_DEFAULT_PATH)
     endif()

     unset(gcc_dir)


cmake: emu: Support QEMU semihosting console emulation

The QEMU '-semihosting' option enables the emulation of the semihosting
mechanism that can be used to interface the Zephyr RTOS to the host
operating system.

In order to support semihosting console output, the QEMU semihosting
feature is enabled and its console is connected to the console backend
chardev.

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

--- cmake/emu/qemu.cmake
+++ cmake/emu/qemu.cmake
@@ -49,6 +49,13 @@

 # Connect main serial port to the console chardev.
 list(APPEND QEMU_FLAGS -serial chardev:con)
+
+# Connect semihosting console to the console chardev if configured.
+if(CONFIG_SEMIHOST_CONSOLE)
+  list(APPEND QEMU_FLAGS
+    -semihosting-config enable=on,target=auto,chardev=con
+    )
+endif()

 # Connect monitor to the console chardev.
 list(APPEND QEMU_FLAGS -mon chardev=con,mode=readline)