rust.cmake: fixups

rust.cmake: fixups

- add a default TARGET argument for RustAddLibrary and remove TARGET
  params from the calls--we were already overriding any specified
  TARGET and all the specified TARGETS had bitrot'd
- make CARGO_OPTIONS a CACHE variable so it's scope-independent and
  set the variable to avoid duplicate options (which cargo rejects)

Change-Id: I37eaa421d99834deeb87242aa9acea7e49bed8e3
GitOrigin-RevId: c667372e2961cd052b358abce9602cc888e46daf

--- apps/system/rust.cmake
+++ apps/system/rust.cmake
@@ -11,10 +11,10 @@
 # NB: we cannot use CARGO_OPTIONS, cargo will strip it out
 set(RUSTFLAGS "-Z tls-model=local-exec" CACHE INTERNAL "rustc env flags")

-list(APPEND CARGO_OPTIONS
-  --target riscv32imac-unknown-none-elf
+set(CARGO_OPTIONS
   -Z unstable-options
-  -Z avoid-dev-deps)
+  -Z avoid-dev-deps
+  CACHE INTERNAL "cargo cmd line arguments")

 if("${RELEASE}")
     list(APPEND CARGO_OPTIONS "--release")
@@ -42,6 +42,9 @@
     if("${RUST_BUILD_DIR}" STREQUAL "")
         set(RUST_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
     endif()
+    if("${RUST_TARGET}" STREQUAL "")
+        set(RUST_TARGET "riscv32imac-unknown-none-elf")
+    endif()

     add_custom_target(
         ${lib_name}_custom
@@ -53,6 +56,7 @@
         COMMAND
             ${CMAKE_COMMAND} -E env RUSTFLAGS=${RUSTFLAGS}
             cargo +nightly-2021-08-05 build
+            --target ${RUST_TARGET}
             ${CARGO_OPTIONS}
             --target-dir ${RUST_BUILD_DIR}
             --out-dir ${RUST_BUILD_DIR}


Fixed InstallDependencies in 1.8.1 for boost 1.50+

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -180,7 +180,6 @@
       PATTERN "asio" EXCLUDE
       PATTERN "assign" EXCLUDE
       PATTERN "bimap" EXCLUDE
-      PATTERN "chrono" EXCLUDE
       PATTERN "circular_buffer" EXCLUDE
       PATTERN "compatibility" EXCLUDE
       PATTERN "concept_check" EXCLUDE
@@ -189,7 +188,6 @@
       PATTERN "filesystem" EXCLUDE
       PATTERN "flyweight" EXCLUDE
       PATTERN "format" EXCLUDE
-      PATTERN "functional" EXCLUDE
       PATTERN "fusion" EXCLUDE
       PATTERN "geometry" EXCLUDE
       PATTERN "gil" EXCLUDE
@@ -214,18 +212,15 @@
       PATTERN "ptr_container" EXCLUDE
       PATTERN "python" EXCLUDE
       PATTERN "random" EXCLUDE
-      PATTERN "ratio" EXCLUDE
       PATTERN "regex" EXCLUDE
       PATTERN "serialization" EXCLUDE
       PATTERN "signals" EXCLUDE
       PATTERN "signals2" EXCLUDE
       PATTERN "spirit" EXCLUDE
       PATTERN "statechart" EXCLUDE
-      PATTERN "system" EXCLUDE
       PATTERN "test" EXCLUDE
       PATTERN "timer" EXCLUDE
       PATTERN "tr1" EXCLUDE
-      PATTERN "typeof" EXCLUDE
       PATTERN "units" EXCLUDE
       PATTERN "unordered" EXCLUDE
       PATTERN "uuid" EXCLUDE


Fixed an introduced bug in android project creation.

--HG--
branch : android-cmake-project-creation-refactor

--- CMake/Utils/AndroidMacros.cmake
+++ CMake/Utils/AndroidMacros.cmake
@@ -39,7 +39,7 @@
 	endif()

-	SET(DEPENDENCIES ${DEPENDENCIES} OgreTerrain OgreRTShaderSystem OgreMeshLodGeneratorStatic OgreOverlay OgrePaging OgreVolume Plugin_ParticleFX Plugin_OctreeSceneManager)
+	SET(DEPENDENCIES ${DEPENDENCIES} OgreTerrain OgreRTShaderSystem OgreMeshLodGenerator OgreOverlay OgrePaging OgreVolume Plugin_ParticleFX Plugin_OctreeSceneManager)
 	add_dependencies(${ANDROID_PROJECT_TARGET} ${DEPENDENCIES})
 	set(DEPEND_STATIC_LIBS "")
 	foreach(DEPENDENCY ${DEPENDENCIES})


rpath setting for launchers

rpath setting for launchers

--- resources/toolchains/linux_amd64_gcc.cmake
+++ resources/toolchains/linux_amd64_gcc.cmake
@@ -27,6 +27,10 @@
 set ( CMAKE_CXX_FLAGS_DEBUG "-g -O0" CACHE INTERNAL "" )
 set ( CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG" CACHE INTERNAL "" )

+# https://stackoverflow.com/a/6331749/314015
+set ( CMAKE_EXE_LINKER_FLAGS "-Wl,-rpath -Wl,$ORIGIN -Wl,-z -Wl,origin" CACHE INTERNAL "" )
+set ( CMAKE_SKIP_RPATH TRUE CACHE INTERNAL "" )
+
 if ( EXISTS "/usr/bin/valgrind" )
     set ( CMAKE_MEMORYCHECK_COMMAND "/usr/bin/valgrind" CACHE INTERNAL "" )
     set ( CMAKE_MEMORYCHECK_COMMAND_OPTIONS


fix detect

fix detect

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -54,12 +54,11 @@
 	endif(CMAKE_CL_64)
 ELSE()
 	execute_process(
-		COMMAND "./detect_operative_system.sh"
-		WORKING_DIRECTORY "${CMAKI_PATH}"
+		COMMAND sh detect_operative_system.sh
+		WORKING_DIRECTORY "${CMAKI_PATH}/ci"
 		OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
 	set(CMAKI_PLATFORM "${RESULT_VERSION}")
 ENDIF()
-MESSAGE(FATAL_ERROR "----------- ${CMAKI_PATH}/ci")
 MESSAGE("-- platform detected: ${CMAKI_PLATFORM}")

 function(cmaki_find_package PACKAGE)


fix missing link with libtess2 static lib

--- build/toolchains/android.cmake
+++ build/toolchains/android.cmake
@@ -28,6 +28,7 @@
 set(CXX_FLAGS_DEBUG "${CXX_FLAGS_DEBUG} -g -O0")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -fPIC")
 set(LIBCURL_PRECOMPILED_LIB ${CMAKE_SOURCE_DIR}/android/jni/precompiled/${ANDROID_ABI}/libcurl.a)
+set(LIBTESS_PRECOMPILED_LIB ${CMAKE_SOURCE_DIR}/android/jni/precompiled/${ANDROID_ABI}/libtess2.a)

 # include dependency headers
 include_directories(${PROJECT_SOURCE_DIR}/android/jni/include)
@@ -43,7 +44,7 @@
 set(INSTALL_CORE_LIBRARY "ON")
 set(CORE_LIB_TYPE SHARED)
 set(CORE_INSTALLATION_PATH ${CMAKE_SOURCE_DIR}/android/libs/${ANDROID_ABI})
-set(CORE_LIB_DEPS GLESv2 ${LIBCURL_PRECOMPILED_LIB})
+set(CORE_LIB_DEPS GLESv2 ${LIBCURL_PRECOMPILED_LIB} ${LIBTESS_PRECOMPILED_LIB})
 set(CORE_LIB_NAME tangram) # in order to have libtangram.so

 include_directories(${PROJECT_SOURCE_DIR}/core/include/)


activated all tests again

activated all tests again

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -8,14 +8,14 @@
    mitkNavigationDataLandmarkTransformFilterTest.cpp
    mitkNavigationDataObjectVisualizationFilterTest.cpp
    mitkNavigationDataTest.cpp
-   #mitkNavigationDataRecorderTest.cpp
+   mitkNavigationDataRecorderTest.cpp
    mitkNavigationDataReferenceTransformFilterTest.cpp
    mitkNavigationDataSequentialPlayerTest.cpp
    mitkNavigationDataSourceTest.cpp
    mitkNavigationDataToMessageFilterTest.cpp
    mitkNavigationDataToNavigationDataFilterTest.cpp
    mitkNavigationDataToPointSetFilterTest.cpp
-   #mitkNavigationDataTransformFilterTest.cpp
+   mitkNavigationDataTransformFilterTest.cpp
    mitkNDIPassiveToolTest.cpp
    mitkNDIProtocolTest.cpp
    mitkNDITrackingDeviceTest.cpp
@@ -23,18 +23,18 @@
    mitkTrackingVolumeGeneratorTest.cpp
    mitkTrackingDeviceTest.cpp
    mitkTrackingToolTest.cpp
-   #mitkVirtualTrackingDeviceTest.cpp # see bug 16385
+   mitkVirtualTrackingDeviceTest.cpp # see bug 16385
    mitkNavigationDataPlayerTest.cpp # see bug 11636 (extend this test by microservices)
-   #mitkTrackingDeviceSourceTest.cpp # see bug 16385
+   mitkTrackingDeviceSourceTest.cpp # see bug 16385
    mitkTrackingDeviceSourceConfiguratorTest.cpp
    mitkNavigationDataEvaluationFilterTest.cpp
    mitkTrackingTypesTest.cpp

    # ------------------ Navigation Tool Management Tests -------------------
-   #mitkNavigationToolStorageTest.cpp # see bug 16385
-   #mitkNavigationToolTest.cpp # see bug 16385
-   #mitkNavigationToolReaderAndWriterTest.cpp
-   #mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
+   mitkNavigationToolStorageTest.cpp # see bug 16385
+   mitkNavigationToolTest.cpp # see bug 16385
+   mitkNavigationToolReaderAndWriterTest.cpp
+   mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
    # -----------------------------------------------------------------------
 )


qi_create_module: honor NO_INSTALL option

the option was forwarded to qi_create_lib as expected,
but not taken into account when installing the qi/module/*.mod file.

Change-Id: Idfa8f8bca1f0cca41a3d91a01ef6267f532ecfa5
Reviewed-on: http://gerrit.aldebaran.lan/90513
Reviewed-by: vincent.palancher <f8ff75e1c61314c499fafa8de0d9e004e87e66b0@external.softbankrobotics.com>
Tested-by: sbarthelemy <9c154f64c36738f8e44d945c231ac417d15bd66e@aldebaran.com>

--- qimodule-config.cmake
+++ qimodule-config.cmake
@@ -41,5 +41,12 @@

   set(_modfilename "${name}.mod")
   file(WRITE "${QI_SDK_DIR}/${QI_SDK_SHARE}/qi/module/${_modfilename}" "cpp\n")
-  qi_install_data("${QI_SDK_DIR}/${QI_SDK_SHARE}/qi/module/${_modfilename}" SUBFOLDER "qi/module")
+  cmake_parse_arguments(ARG
+    "NO_INSTALL"
+    ""
+    ""
+    ${ARGN})
+  if (NOT ARG_NO_INSTALL)
+    qi_install_data("${QI_SDK_DIR}/${QI_SDK_SHARE}/qi/module/${_modfilename}" SUBFOLDER "qi/module")
+  endif()
 endfunction()


Fix cmake

Fix cmake

--- cmake/FindScalapack.cmake
+++ cmake/FindScalapack.cmake
@@ -24,7 +24,7 @@

 find_path(_MKL_SCALAPACK_INCLUDE
 NAMES mkl_scalapack.h
-HINTS $ENV{MKL_ROOT}/include
+HINTS $ENV{MKLROOT}/include
 $ENV{HOME}/local/include
 $ENV{HOME}/.local/include
 ${CMAKE_INCLUDE_PATH}
@@ -34,13 +34,13 @@
 /usr/local/include
 /usr/include
 )
-find_library(_MKL_SCALAPACK_LP64      NAMES mkl_scalapack_lp64       HINTS $ENV{MKL_ROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
-find_library(_MKL_BLACS_INTELMPI_LP64 NAMES mkl_blacs_intelmpi_lp64  HINTS $ENV{MKL_ROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
-find_library(_MKL_BLACS_OPENMPI_LP64  NAMES mkl_blacs_openmpi_lp64   HINTS $ENV{MKL_ROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
-find_library(_MKL_INTEL_LP64          NAMES mkl_intel_lp64           HINTS $ENV{MKL_ROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
-find_library(_MKL_INTEL_THREAD        NAMES mkl_intel_thread         HINTS $ENV{MKL_ROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
-find_library(_MKL_GNU_THREAD          NAMES mkl_gnu_thread           HINTS $ENV{MKL_ROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
-find_library(_MKL_CORE                NAMES mkl_core                 HINTS $ENV{MKL_ROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
+find_library(_MKL_SCALAPACK_LP64      NAMES mkl_scalapack_lp64       HINTS $ENV{MKLROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
+find_library(_MKL_BLACS_INTELMPI_LP64 NAMES mkl_blacs_intelmpi_lp64  HINTS $ENV{MKLROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
+find_library(_MKL_BLACS_OPENMPI_LP64  NAMES mkl_blacs_openmpi_lp64   HINTS $ENV{MKLROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
+find_library(_MKL_INTEL_LP64          NAMES mkl_intel_lp64           HINTS $ENV{MKLROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
+find_library(_MKL_INTEL_THREAD        NAMES mkl_intel_thread         HINTS $ENV{MKLROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
+find_library(_MKL_GNU_THREAD          NAMES mkl_gnu_thread           HINTS $ENV{MKLROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )
+find_library(_MKL_CORE                NAMES mkl_core                 HINTS $ENV{MKLROOT}/lib/intel64 $ENV{HOME}/local/lib $ENV{HOME}/.local/lib /opt/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu /usr/local/lib /usr/lib )

 if(WITH_MKL AND _MKL_SCALAPACK_INCLUDE AND _MKL_SCALAPACK_LP64)
   set(SCALAPACK_INCLUDE_PATH ${_MKL_SCALAPACK_INCLUDE})


benchmarks: Create imported target in find module

Is much more convenient than using the variables that have been found
directly.

--- cmake/Findbenchmark.cmake
+++ cmake/Findbenchmark.cmake
@@ -30,9 +30,10 @@
 	REQUIRED_VARS benchmark_LIBRARY
 	benchmark_INCLUDE_DIR)

-if(benchmark_FOUND)
-	set(benchmark_LIBRARIES ${benchmark_LIBRARY})
-	set(benchmark_INCLUDE_DIRS ${benchmark_INCLUDE_DIR})
+if (benchmark_FOUND AND NOT TARGET benchmark)
+	add_library(benchmark UNKNOWN IMPORTED)
+	set_target_properties(benchmark PROPERTIES
+		IMPORTED_LOCATION "${benchmark_LIBRARY}"
+		INTERFACE_INCLUDE_DIRECTORIES "${benchmark_INCLUDE_DIR}"
+	)
 endif()
-
-mark_as_advanced(benchmark_INCLUDE_DIR benchmark_LIBRARY)


Guess CPACK_PACKAGE_CONTACT from git if possible

--- cmake/MyPackagePack.cmake
+++ cmake/MyPackagePack.cmake
@@ -8,39 +8,6 @@
     #
     IF (MYPACKAGE_DEBUG)
       MESSAGE (STATUS "[${PROJECT_NAME}-BOOTSTRAP-DEBUG] Configuration CPack")
-    ENDIF ()
-    #
-    # If this is a git repository, guess username and contact from git
-    # else guess it from user name environment variable
-    #
-    FIND_PACKAGE(Git)
-    IF (GIT_FOUND)
-      EXECUTE_PROCESS(
-        COMMAND ${GIT_EXECUTABLE} config --get user.name
-        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-        OUTPUT_VARIABLE _git_username)
-      EXECUTE_PROCESS(
-        COMMAND ${GIT_EXECUTABLE} config --get user.email
-        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-        OUTPUT_VARIABLE _git_useremail)
-      STRING(REGEX REPLACE "\r?\n$" "" _git_username "${_git_username}")
-      STRING(REGEX REPLACE "\r?\n$" "" _git_useremail "${_git_useremail}")
-    ENDIF ()
-    IF (NOT "x${_git_username}" STREQUAL "x")
-      IF (NOT "x${_git_useremail}" STREQUAL "x")
-        SET (CPACK_PACKAGE_CONTACT             "${_git_username} <${_git_useremail}>")
-      ELSE ()
-        SET (CPACK_PACKAGE_CONTACT             "${_git_username}")
-      ENDIF ()
-    ELSE ()
-      IF (WIN32)
-        SET (CPACK_PACKAGE_CONTACT             "$ENV{USERNAME}")
-      ELSE ()
-        SET (CPACK_PACKAGE_CONTACT             "$ENV{USER}")
-      ENDIF ()
-    ENDIF ()
-    IF (MYPACKAGE_DEBUG)
-      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Contact                  : ${CPACK_PACKAGE_CONTACT}")
     ENDIF ()
     SET (CPACK_PACKAGE_NAME                "${PROJECT_NAME}")
     SET (CPACK_PACKAGE_VENDOR              "${VENDOR}")


ippicv: install third-party-programs.txt file

--- cmake/OpenCVFindIPP.cmake
+++ cmake/OpenCVFindIPP.cmake
@@ -252,6 +252,7 @@
   else()
     ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/EULA.txt")
   endif()
+  ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/third-party-programs.txt")
 endif()

 file(TO_CMAKE_PATH "${IPPROOT}" __IPPROOT)


[MLIR] Update MLIR/LLVM repos (#4011)

[MLIR] Update MLIR/LLVM repos (#4011)

* [MLIR] Update MLIR/LLVM repos

To have access to unranked memrefs.

* Fix MLIR forward again to fix lit test in MLIR repo

--- cmake/external_mlir.cmake
+++ cmake/external_mlir.cmake
@@ -20,8 +20,8 @@
 set(MLIR_REPO_URL https://github.com/tensorflow/mlir.git)

 # Change these commit IDs to move to latest stable versions
-set(MLIR_LLVM_COMMIT_ID 372ad327)
-set(MLIR_COMMIT_ID 721a07c)
+set(MLIR_LLVM_COMMIT_ID 75990950)
+set(MLIR_COMMIT_ID 5e64e536)

 # MLIR environment variables. Some of them are used by LIT tool.
 set(MLIR_PROJECT_ROOT ${CMAKE_CURRENT_BINARY_DIR}/mlir_project)


copy trt lib to inference lib test=develop

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -191,6 +191,13 @@
     list(APPEND inference_deps anakin_inference_lib)
 endif ()

+if (TENSORRT_FOUND)
+    copy(tensorrt_lib DEPS ${inference_deps}
+        SRCS ${TENSORRT_ROOT}/include/Nv*.h ${TENSORRT_ROOT}/lib/libnvinfer*
+        DSTS ${FLUID_INSTALL_DIR}/third_party/install/tensorrt/include ${FLUID_INSTALL_DIR}/third_party/install/tensorrt/lib)
+endif ()
+
+
 set(module "inference")
 copy(inference_lib DEPS ${inference_deps}
   SRCS ${src_dir}/${module}/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/inference/libpaddle_fluid.*


[BUILD] fix nlohmann_json's (third party) include dir (#1415)

--- cmake/nlohmann-json.cmake
+++ cmake/nlohmann-json.cmake
@@ -26,7 +26,7 @@
 )

 ExternalProject_Get_Property(nlohmann_json_download INSTALL_DIR)
-SET(NLOHMANN_JSON_INCLUDE_DIR ${INSTALL_DIR}/third_party/src/nlohmann_json_download/single_include)
+SET(NLOHMANN_JSON_INCLUDE_DIR ${INSTALL_DIR}/src/nlohmann_json_download/single_include)
 add_library(nlohmann_json_ INTERFACE)
 target_include_directories(nlohmann_json_ INTERFACE
     "$<BUILD_INTERFACE:${NLOHMANN_JSON_INCLUDE_DIR}>"


Do not redefine _OPENMP when found natively

Former-commit-id: 923e3c9e5e227cb421c57ac730de3422df23f014

--- cmake-modules/FindOpenMP.cmake
+++ cmake-modules/FindOpenMP.cmake
@@ -82,7 +82,7 @@
     list(APPEND CMAKE_MODULE_PATH ${BACKUP})
     unset(BACKUP)
     if(OpenMP_FOUND AND TARGET OpenMP::OpenMP_CXX)
-        set_target_properties(OpenMP::OpenMP_CXX PROPERTIES INTERFACE_COMPILE_DEFINITIONS "_OPENMP")
+#        set_target_properties(OpenMP::OpenMP_CXX PROPERTIES INTERFACE_COMPILE_DEFINITIONS "_OPENMP")
         check_omp_compiles(OpenMP::OpenMP_CXX)
         if(OMP_COMPILES AND TARGET OpenMP::OpenMP_CXX)
             add_library(openmp::openmp INTERFACE IMPORTED)


remove find_package(kdewin)

remove find_package(kdewin)

svn path=/branches/KDE/4.2/kdepim/; revision=916608

--- cmake/modules/FindAssuan.cmake
+++ cmake/modules/FindAssuan.cmake
@@ -75,12 +75,6 @@

   else()

-    # is this needed, of just unreflected cut'n'paste?
-    # this isn't a KDE library, after all!
-    if( NOT KDEWIN_FOUND )
-      find_package( KDEWIN REQUIRED )
-    endif()
-
     set( ASSUAN_FOUND         false )
     set( ASSUAN_VANILLA_FOUND false )
     #set( ASSUAN_GLIB_FOUND    false )


Remove copy_python_test target dependency from cmake testhelper macros

--- cmake/modules/testhelper.cmake
+++ cmake/modules/testhelper.cmake
@@ -1,6 +1,5 @@
 macro(addTestToLibavgPythonPackage testTarget)
     add_custom_target(copy_${testTarget} ALL)
-    add_dependencies(copy_${testTarget} ${testTarget} copy_python_tests)
     add_custom_command(TARGET copy_${testTarget}
         COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_CURRENT_BINARY_DIR}/${testTarget}"
@@ -18,7 +17,6 @@

 macro(addPluginToLibavgPythonPackage plugin)
     add_custom_target(copy_${plugin} ALL)
-    add_dependencies(copy_${plugin} ${plugin} copy_python_tests)
     add_custom_command(TARGET copy_${plugin}
         COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_CURRENT_BINARY_DIR}/${plugin}${CMAKE_SHARED_MODULE_SUFFIX}"


Make FindMono use pkg-config just as much as necessary to avoid the problems pkg-config has with folders that contain spaces in their names'

--- build/modules/FindMono.cmake
+++ build/modules/FindMono.cmake
@@ -224,12 +224,27 @@

     IF(NOT PKG_CONFIG_FOUND)
+
       MESSAGE(STATUS "Could not find suitable pkg-config to search for Mono")
       SET(MONO_FOUND FALSE)
     ELSE(NOT PKG_CONFIG_FOUND)
-      PKG_CHECK_MODULES(MONO mono)  # will set MONO_FOUND
-      IF(APPLE AND EXISTS "/Library/Frameworks/Mono.framework")
-        SET(MONO_FOUND TRUE)
+      IF(MONO_ROOT AND EXISTS ${MONO_ROOT}/lib/pkgconfig AND NOT APPLE)
+        PKG_CHECK_MODULES(MONO glib-2.0 gthread-2.0)  # will set MONO_FOUND
+        PKG_CHECK_MODULES(MONO_MANA mono)  # will set MONO_MANA_FOUND
+        IF(NOT MONO_MANA_FOUND)
+           SET(MONO_FOUND FALSE)
+           MESSAGE(STATUS "Found glib and gthread but could not locate mono")
+        ENDIF()
+        SET(MONO_INCLUDE_DIRS ${MONO_ROOT}/include/mono-1.0 ${MONO_INCLUDE_DIRS})
+        SET(MONO_LIBRARY_DIRS ${MONO_ROOT}/lib ${MONO_LIBRARY_DIRS})
+        SET(MONO_LIBRARIES ${MONO_MANA_LIBRARIES})
+        SET(MONO_LDFLAGS -Wl,--export-dynamic ${MONO_LDFLAGS})
+        SET(MONO_CFLAGS -D_REENTRANT ${MONO_CFLAGS})# MONO_MANA_CFLAGS not compatible with spaces
+      ELSE()
+        PKG_CHECK_MODULES(MONO mono)  # will set MONO_FOUND
+        IF(APPLE AND EXISTS "/Library/Frameworks/Mono.framework")
+          SET(MONO_FOUND TRUE)
+        ENDIF()
       ENDIF()
     ENDIF(NOT PKG_CONFIG_FOUND)


Revert "Build gtest with CMAKE_BUILD_TYPE=Release"

This reverts commit 3296476ed0de92f9dbdb3975b5ae2d9659bd54ca.

It causes MSVC build to fail linking due _ITERATOR_DEBUG_LEVEL value
mismatch.

--- cmake/gtest.cmake
+++ cmake/gtest.cmake
@@ -1,6 +1,5 @@
 find_package(Threads)
 find_package(GTest QUIET)
-
 if(NOT GTEST_FOUND)
   message(STATUS "Building own gtest")

@@ -11,7 +10,7 @@
     URL_HASH SHA256=b58cb7547a28b2c718d1e38aee18a3659c9e3ff52440297e965f5edffe34b6d0
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0
     CMAKE_ARGS
-      -DCMAKE_BUILD_TYPE=Release
+      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
       -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
       -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
     INSTALL_COMMAND ""


Unittests on by default on emscripten (may change again though)

--- cmake/oryol.cmake
+++ cmake/oryol.cmake
@@ -10,7 +10,7 @@
 #   define top-level options for the whole project
 #-------------------------------------------------------------------------------
 option(ORYOL_NO_ASSERTS_IN_RELEASE "Remove asserts in release-mode" OFF)
-if (ORYOL_EMSCRIPTEN OR ORYOL_NACL)
+if (ORYOL_NACL)
     option(ORYOL_UNITTESTS "Enable unit tests" OFF)
 else()
     option(ORYOL_UNITTESTS "Enable unit tests" ON)


Copy libBDMGlyphFilter.so to correct location

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -276,6 +276,14 @@
             ${CMAKE_SOURCE_DIR}/NOTICE
             )

+    # BioDynaMo paraview plugin
+    if(paraview)
+      add_copy_files(copy_files_bdm
+              DESTINATION ${CMAKE_INSTALL_PVPLUGINDIR}
+              ${CMAKE_INSTALL_LIBDIR}/libBDMGlyphFilter${CMAKE_SHARED_LIBRARY_SUFFIX}
+              )
+    endif()
+
 endfunction()

 # This function add a description to the packages which will be displayed


modules: updated FindOVR.cmake.

modules: updated FindOVR.cmake.

--- modules/FindOVR.cmake
+++ modules/FindOVR.cmake
@@ -55,7 +55,7 @@
 find_path(OVR_INCLUDE_DIR NAMES OVR_CAPI.h HINTS ${LIBOVR_ROOT}/Include)

 if(WIN32)
-    if(MSVC)
+    if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
         if(CMAKE_SIZEOF_VOID_P EQUAL 8)
             # compiling for 64 bit
             set(_OVR_MSVC_ARCH "x64")


FIX: don't repeat 'Found UUID'

FIX: don't repeat 'Found UUID'

--- cmake/Modules/FindUUID.cmake
+++ cmake/Modules/FindUUID.cmake
@@ -51,6 +51,7 @@
 if (UUID_FOUND)
    if (NOT UUID_FIND_QUIETLY)
       message(STATUS "Found UUID: ${UUID_LIBRARIES}")
+      set (UUID_FIND_QUIETLY 1 CACHE BOOL "Don't spam about UUID findings")
    endif ()
 else ()
    if (UUID_FIND_REQUIRED)


Oddly fix glibc.

Oddly fix glibc.

Apparently, there were some CMake issues that were resolved by clearing
the cache entirely (i.e. rm -r build), and this allowed me to just use
_XOPEN_SOURCE as the manpage says.  Huh.

--- cmake/Modules/platform.cmake
+++ cmake/Modules/platform.cmake
@@ -66,23 +66,9 @@
 	if(NOT HAVE_POSIX)
 		windows_check()
 	elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-		# now this is a story all about how
-		# my flags got twisted upside down
-		# and I'd like to take a minute just sit right there
-		# I'll tell why glibc sucks and smells like derriere.
-		#
-		# in man page feature_test_macros(7), of course
-		# they lie and say you only need _XOPEN_SOURCE
-		# cleaning all the flags, and relaxing all cool
-		# and making clean CMakeLists outside the school
-		#
-		# then gcc and cmake spewed a bunch of remarks
-		# about missing prototypes and unknown marks
-		# I read in one little bug that red hat was swine
-		# and said "You're missing the whole point of using #define."
-		set(GLIBC_SUCKS "-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700")
-		set(CMAKE_REQUIRED_DEFINITIONS ${GLIBC_SUCKS})
-		add_definitions(${GLIBC_SUCKS})
+		set(GLIBC_FEATURE "-D_XOPEN_SOURCE=700")
+		set(CMAKE_REQUIRED_DEFINITIONS ${GLIBC_FEATURE})
+		add_definitions(${GLIBC_FEATURE})
 	endif()

 	test_big_endian(BIG_ENDIAN)


Some cleanup.

Some cleanup.

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -1145,19 +1145,15 @@
     string(LENGTH "${MAIN_SKETCH}" MAIN_SKETCH_LENGTH)
     math(EXPR LENGTH_STR1 "${MAIN_SKETCH_LENGTH}-(${FIRST_INCLUDE_OFFSET})")
     string(SUBSTRING "${MAIN_SKETCH}" ${FIRST_INCLUDE_OFFSET} ${LENGTH_STR1} STR1)
-    message("STR1:\n${STR1}")
-    message(STATUS "main sketch length: ${MAIN_SKETCH_LENGTH}")
-    message(STATUS "first include offset: ${FIRST_INCLUDE_OFFSET}")
-    message(STATUS "length str 1: ${LENGTH_STR1}")
-
-    math(EXPR POS3 "${FIRST_INCLUDE_OFFSET}")
+    #message(STATUS "STR1:\n${STR1}")
+
     string(SUBSTRING "${MAIN_SKETCH}" 0 ${FIRST_INCLUDE_OFFSET} SKETCH_HEAD)
-    message(STATUS "SKETCH_HEAD:\n${SKETCH_HEAD}")
+    #message(STATUS "SKETCH_HEAD:\n${SKETCH_HEAD}")

 	# find the body of the main pde
     math(EXPR BODY_LENGTH "${MAIN_SKETCH_LENGTH}-${FIRST_INCLUDE_OFFSET}-1")
     string(SUBSTRING "${MAIN_SKETCH}" "${FIRST_INCLUDE_OFFSET}+1" "${BODY_LENGTH}" SKETCH_BODY)
-    message(STATUS "BODY:\n${SKETCH_BODY}")
+    #message(STATUS "BODY:\n${SKETCH_BODY}")

 	# write the file head
     file(APPEND ${SKETCH_CPP} "\n")


disable stripping

disable stripping

--- cmake/debugInformation.cmake
+++ cmake/debugInformation.cmake
@@ -71,7 +71,7 @@
 macro(strip_install_bin_and_config
     TARGET
     INTERMEDIATE_STRIP_DIR
-    TAGET_DIR
+    TARGET_DIR
     BIND_TARGET)

   string(LENGTH "${TARGET}" TLEN)
@@ -80,24 +80,24 @@
   endif()
   set(FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${TARGET}${CMAKE_EXECUTABLE_SUFFIX})
   set(STRIP_FILE ${INTERMEDIATE_STRIP_DIR}/${TARGET}${CMAKE_EXECUTABLE_SUFFIX})
-  if (NOT MSVC AND CMAKE_STRIP)
-    set(TARGET_NAME "${BIND_TARGET}_${TARGET}")
-    ExternalProject_Add("${TARGET_NAME}"
-      SOURCE_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}
-
-      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${INTERMEDIATE_STRIP_DIR}
-      COMMENT "creating strip directory"
-
-      BUILD_COMMAND ${CMAKE_STRIP} ${FILE} -o ${STRIP_FILE}
-      COMMENT "stripping binary"
-
-      INSTALL_COMMAND  ${CMAKE_COMMAND} -E copy ${STRIP_FILE} ${TAGET_DIR}
-      )
-  else ()
+#   if (NOT MSVC AND CMAKE_STRIP)
+#     set(TARGET_NAME "${BIND_TARGET}_${TARGET}")
+#     ExternalProject_Add("${TARGET_NAME}"
+#       SOURCE_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}
+#
+#       CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${INTERMEDIATE_STRIP_DIR}
+#       COMMENT "creating strip directory"
+#
+#       BUILD_COMMAND ${CMAKE_STRIP} ${FILE} -o ${STRIP_FILE}
+#       COMMENT "stripping binary"
+#
+#       INSTALL_COMMAND  ${CMAKE_COMMAND} -E copy ${STRIP_FILE} ${TARGET_DIR}
+#       )
+#   else ()
     install(
       PROGRAMS ${FILE}
-      DESTINATION TAGET_DIR)
-  endif()
+      DESTINATION ${TARGET_DIR})
+#  endif()
   install_config(${TARGET})

 endmacro()


Fix warpctc static libs and torch

Fix warpctc static libs and torch

--- cmake/external/warpctc.cmake
+++ cmake/external/warpctc.cmake
@@ -24,16 +24,10 @@

 IF(WIN32)
     SET(WARPCTC_LIBRARIES
-        "${WARPCTC_INSTALL_DIR}/lib/warpctc.dll" CACHE FILEPATH "Warp-ctc Library" FORCE)
+        "${WARPCTC_INSTALL_DIR}/lib/warpctc.lib" CACHE FILEPATH "Warp-ctc Library" FORCE)
 ELSE(WIN32)
-    IF(APPLE)
-        SET(_warpctc_SHARED_SUFFIX dylib)
-    ELSE(APPLE)
-        SET(_warpctc_SHARED_SUFFIX so)
-    ENDIF(APPLE)
-
     SET(WARPCTC_LIBRARIES
-        "${WARPCTC_INSTALL_DIR}/lib/libwarpctc.${_warpctc_SHARED_SUFFIX}" CACHE FILEPATH "Warp-ctc Library" FORCE)
+        "${WARPCTC_INSTALL_DIR}/lib/libwarpctc.a" CACHE FILEPATH "Warp-ctc Library" FORCE)
 ENDIF(WIN32)

 IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
@@ -53,6 +47,7 @@
     CMAKE_ARGS      -DCMAKE_INSTALL_PREFIX=${WARPCTC_INSTALL_DIR}
     CMAKE_ARGS      -DWITH_GPU=${WITH_GPU}
     CMAKE_ARGS      -DWITH_OMP=${USE_OMP}
+    CMAKE_ARGS      -DWITH_TORCH=OFF
     CMAKE_ARGS      -DBUILD_SHARED=OFF
 )


Incorporate review feedback from Micheal

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1261,9 +1261,11 @@
       "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFTLIB_SINGLE_SUBDIR}"
       "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}")

-  # There are scenarios in which this function is called with SDKROOT set
-  # In those we need to ensure we link against the dylibs present in the SDK
-  if(DEFINED ENV{SDKROOT})
+  # In certain cases when building, the environment variable SDKROOT is set to override
+  # where the sdk root is located in the system. If that environment variable has been
+  # set by the user, respect it and add the specified SDKROOT directory to the
+  # library_search_directories so we are able to link against those libraries
+  if(DEFINED ENV{SDKROOT} AND EXISTS "$ENV{SDKROOT}/usr/lib/swift")
       list(APPEND library_search_directories "$ENV{SDKROOT}/usr/lib/swift")
   endif()


Add -DSWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS=1 when compiling the front-end

This should fix building a --debug-build

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -263,6 +263,10 @@
         "-I${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/include"
         "-I${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++abi/include"
         "-I${SWIFT_ANDROID_NDK_PATH}/sources/android/support/include")
+  endif()
+
+  if(SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS)
+    list(APPEND result "-DSWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS=1")
   endif()

   set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)


[Windows][noetic-devel] Generate executables without extension name. (#1061)

* generate exe without extension name.

* use NAME_WE to be compatible with CMake<3.14.

* Fixed the wrong reference.

--- cmake/platform/windows.cmake
+++ cmake/platform/windows.cmake
@@ -130,9 +130,12 @@
   endif()

   if(WIN32)
+    get_filename_component(WRAPPER_NAME
+      "${ARG_SCRIPT_NAME}"
+      NAME_WE)
     set(
       WRAPPER_SOURCE
-      "${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/add_python_executable/${ARG_TARGET_NAME}/${ARG_SCRIPT_NAME}.cpp")
+      "${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/add_python_executable/${ARG_TARGET_NAME}/${WRAPPER_NAME}.cpp")
     configure_file(
       "${catkin_EXTRAS_DIR}/templates/python_win32_wrapper.cpp.in"
       "${WRAPPER_SOURCE}"
@@ -140,10 +143,10 @@

     add_executable(${ARG_TARGET_NAME} "${WRAPPER_SOURCE}")

-    # The actual file name of the executable built on Windows will be ${ARG_SCRIPT_NAME}.exe according to OUTPUT_NAME
+    # The actual file name of the executable built on Windows will be ${WRAPPER_NAME}.exe according to OUTPUT_NAME
     set_target_properties(
       ${ARG_TARGET_NAME} PROPERTIES
-      OUTPUT_NAME "${ARG_SCRIPT_NAME}"
+      OUTPUT_NAME "${WRAPPER_NAME}"
       RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/windows_wrappers/${ARG_TARGET_NAME}")

     install(


toolchain: iamcu support with xtools toolchain

Support both x86 and iamcu variants of the toolchain.

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

--- cmake/toolchain/xtools.cmake
+++ cmake/toolchain/xtools.cmake
@@ -7,7 +7,13 @@
 set(COMPILER gcc)

 set(CROSS_COMPILE_TARGET_arm arm-zephyr-eabi)
-set(CROSS_COMPILE_TARGET_x86 i586-zephyr-elf)
+if("${ARCH}" STREQUAL "x86")
+  if(CONFIG_X86_IAMCU)
+    set(CROSS_COMPILE_TARGET_x86  i586-${TOOLCHAIN_VENDOR}-elfiamcu)
+  else()
+    set(CROSS_COMPILE_TARGET_x86 i586-${TOOLCHAIN_VENDOR}-elf)
+  endif()
+endif()
 set(CROSS_COMPILE_TARGET_nios2 nios2-zephyr-elf)
 set(CROSS_COMPILE_TARGET_riscv32 riscv32-zephyr-elf)
 set(CROSS_COMPILE_TARGET_mips mipsel-zephyr-elf)


Local changes

Local changes

--- cmake_include/FindHDF4.cmake
+++ cmake_include/FindHDF4.cmake
@@ -25,9 +25,13 @@
 #
 #=============================================================================

-set(HDF4_LIBRARIES df mfhdf)
+find_library(HDF4_LIBRARIES NAMES df mfhdf PATH_SUFFIXES hdf)
+find_library(HDF4_DF_LIBRARY NAMES df PATH_SUFFIXES hdf)
+find_library(HDF4_MFHDF_LIBRARY NAMES mfhdf PATH_SUFFIXES hdf)
+message(STATUS "DF library found: ${HDF4_DF_LIBRARY}")
+message(STATUS "MFHDF library found: ${HDF4_MFHDF_LIBRARY}")

-find_library(HDF4_LIBRARIES NAMES df mfhdf PATH_SUFFIXES hdf)
+message(STATUS "HDF4 libraries: ${HDF4_LIBRARIES}")

 find_library(_HDF4_DF_LIBRARY NAMES df PATH_SUFFIXES hdf)
 get_filename_component(HDF4_LIBRARY_DIRS ${_HDF4_DF_LIBRARY} PATH)


Add a PNG_SUPPORT option (default : ON) to trigger the support for that format (the provided PNG lib and settings break the build, let's find a compromise).

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -117,6 +117,8 @@
 # Look for the PNG and zlib libraries and header files
 #
 # on windows we have it checked in
+OPTION (PNG_SUPPORT "Add support for the PNG format." ON)
+
 IF (WIN32)
   FIND_LIBRARY(PNG_LIBRARY libpng "${VTK_SOURCE_DIR}/IO/PNG")
   FIND_PATH(PNG_INCLUDE_PATH png.h "${VTK_SOURCE_DIR}/IO/PNG")
@@ -141,11 +143,13 @@
   )
 ENDIF (WIN32)

-IF (PNG_LIBRARY)
-  IF (PNG_INCLUDE_PATH)
-    IF (ZLIB_INCLUDE_PATH)
-      SET (HAVE_PNG 1)
-      INCLUDE_DIRECTORIES(${PNG_INCLUDE_PATH})
-    ENDIF (ZLIB_INCLUDE_PATH)
-  ENDIF (PNG_INCLUDE_PATH)
-ENDIF (PNG_LIBRARY)
+IF (PNG_SUPPORT)
+  IF (PNG_LIBRARY)
+    IF (PNG_INCLUDE_PATH)
+      IF (ZLIB_INCLUDE_PATH)
+        SET (HAVE_PNG 1)
+        INCLUDE_DIRECTORIES(${PNG_INCLUDE_PATH})
+      ENDIF (ZLIB_INCLUDE_PATH)
+    ENDIF (PNG_INCLUDE_PATH)
+  ENDIF (PNG_LIBRARY)
+ENDIF (PNG_SUPPORT)


changes from debris, to allow build on Mac OS

--- extdep/cryptopp.cmake
+++ extdep/cryptopp.cmake
@@ -1,11 +1,11 @@
 if(${APPLE})
 ExternalProject_Add(cryptopp
-	URL http://www.cryptopp.com/cryptopp562.zip
-	BINARY_DIR cryptopp-prefix/src/cryptopp
-	CONFIGURE_COMMAND ""
-	BUILD_COMMAND make -j 3
-	INSTALL_COMMAND make dynamic install PREFIX=${ETH_DEPENDENCY_INSTALL_DIR}
-	)
+     URL https://downloads.sourceforge.net/project/cryptopp/cryptopp/5.6.2/cryptopp562.zip
+     BINARY_DIR cryptopp-prefix/src/cryptopp
+     CONFIGURE_COMMAND ""
+     BUILD_COMMAND make CXX=clang++ CXXFLAGS=-DCRYPTOPP_DISABLE_ASM
+     INSTALL_COMMAND make install PREFIX=${ETH_DEPENDENCY_INSTALL_DIR}
+)
 else()
 ExternalProject_Add(cryptopp
 	URL https://github.com/mmoss/cryptopp/archive/v5.6.2.zip


Restructure ADD_GUILE_MODULE

Restructure ADD_GUILE_MODULE

It is now able to handle relative paths and genrated files

--- cmake/OpenCogFunctions.cmake
+++ cmake/OpenCogFunctions.cmake
@@ -25,22 +25,21 @@
 # This configures the install and binary paths for each file, passed to it,
 # based on the value of the variables MODULE_NAME, MODULE_FILE_DIR_PATH and
 # MODULE_DIR_PATH in the PARENT_SCOPE.
-FUNCTION(PROCESS_MODULE_STRUCTURE FILE_PATH)
-    GET_FILENAME_COMPONENT(FILE_NAME ${FILE_PATH} NAME)
+FUNCTION(PROCESS_MODULE_STRUCTURE FILE_NAME DIR_PATH)
     SET(GUILE_BIN_DIR "${CMAKE_BINARY_DIR}/opencog/scm")

-    # Copy files into build directory mirroring the install path structure.
-    # Also, set install path.
+    # Copy files into build directory mirroring the install path structure,
+    # and also set the install path.
+    # DEPENDS is set for custom commands because some of the files may be
+    # generated.
     IF ("${MODULE_NAME}.scm" STREQUAL "${FILE_NAME}")
         EXECUTE_PROCESS(
             COMMAND ${CMAKE_COMMAND} -E make_directory ${GUILE_BIN_DIR}/${MODULE_FILE_DIR_PATH}
         )
         ADD_CUSTOM_COMMAND(TARGET ${TARGET_NAME} PRE_BUILD
-            COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_PATH}" "${GUILE_BIN_DIR}/${MODULE_FILE_DIR_PATH}/${FILE_NAME}"
-            DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_PATH}"
+            COMMAND ${CMAKE_COMMAND} -E copy "${DIR_PATH}/${FILE_NAME}" "${GUILE_BIN_DIR}/${MODULE_FILE_DIR_PATH}/${FILE_NAME}"
+            DEPENDS "${DIR_PATH}/${FILE_NAME}"
         )
-        SET(MODULE_FILE_DEPEND "${GUILE_BIN_DIR}/${MODULE_FILE_DIR_PATH}/${FILE_NAME}"
-            PARENT_SCOPE)
         SET(FILE_INSTALL_PATH "${GUILE_SITE_DIR}/${MODULE_FILE_DIR_PATH}"
             PARENT_SCOPE
         )
@@ -49,11 +48,9 @@
             COMMAND ${CMAKE_COMMAND} -E make_directory ${GUILE_BIN_DIR}/${MODULE_DIR_PATH}
         )
         ADD_CUSTOM_COMMAND(TARGET ${TARGET_NAME} PRE_BUILD
-            COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_PATH}" "${GUILE_BIN_DIR}/${MODULE_DIR_PATH}/${FILE_NAME}"
-            DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_PATH}"
+            COMMAND ${CMAKE_COMMAND} -E copy "${DIR_PATH}/${FILE_NAME}" "${GUILE_BIN_DIR}/${MODULE_DIR_PATH}/${FILE_NAME}"
+            DEPENDS "${DIR_PATH}/${FILE_NAME}"
         )
-        SET(MODULE_FILE_DEPEND "${GUILE_BIN_DIR}/${MODULE_DIR_PATH}/${FILE_NAME}"
-            PARENT_SCOPE)
         SET(FILE_INSTALL_PATH "${GUILE_SITE_DIR}/${MODULE_DIR_PATH}"
             PARENT_SCOPE
         )
@@ -86,21 +83,37 @@
     SET(PREFIX_DIR_PATH "${GUILE_SITE_DIR}")
     SET(options "")  # This is used only as a place-holder
     SET(oneValueArgs MODULE_DESTINATION)
-    SET(multiValueArgs FILES)
+    SET(multiValueArgs FILES DEPENDS)
     CMAKE_PARSE_ARGUMENTS(SCM "${options}" "${oneValueArgs}"
         "${multiValueArgs}" ${ARGN})

     # NOTE:  The keyword arguments 'FILES' and 'MODULE_DESTINATION' are
     # required.
     IF((DEFINED SCM_FILES) AND (DEFINED SCM_MODULE_DESTINATION))
-        SET(GUILE_MODULE_DEPENDS "")
         # FILE_PATH is used for variable name because files in
         # sub-directories may be passed.
         FOREACH(FILE_PATH ${SCM_FILES})
-            # Check if the file exists in the current source directory.
-            IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE_PATH})
-                MESSAGE(FATAL_ERROR "${FILE_NAME} file does not exist in "
-                ${CMAKE_CURRENT_SOURCE_DIR})
+            GET_PROPERTY(FILE_GENERATED SOURCE ${FILE_PATH} PROPERTY GENERATED SET)
+            GET_FILENAME_COMPONENT(DIR_PATH ${FILE_PATH} DIRECTORY)
+            GET_FILENAME_COMPONENT(FILE_NAME ${FILE_PATH} NAME)
+
+            # Check if the file exists or is generated, and set FULL_DIR_PATH
+            # or target dependencies.
+            IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${DIR_PATH}/${FILE_NAME})
+                SET(FULL_DIR_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${DIR_PATH}/)
+            ELSEIF(EXISTS /${DIR_PATH}/${FILE_NAME})
+                SET(FULL_DIR_PATH /${DIR_PATH}/)
+            ELSEIF(FILE_GENERATED AND (NOT SCM_DEPENDS))
+                MESSAGE(STATUS "The target that generates ${FILE_PATH} has "
+                    "not been added as a dependency using the option "
+                    "'DEPENDS'")
+            ELSEIF(FILE_GENERATED AND SCM_DEPENDS)
+                ADD_DEPENDENCIES(${TARGET_NAME} ${SCM_DEPENDS})
+                SET(FULL_DIR_PATH /${DIR_PATH}/)
+            ELSE()
+                MESSAGE(FATAL_ERROR "${FILE_PATH} file does not exist in "
+                    "${CMAKE_CURRENT_SOURCE_DIR} nor does it have "
+                    "'GENERATED' property.")
             ENDIF()

             # Specify module paths.
@@ -117,7 +130,7 @@
             SET(MODULE_NAME ${CMAKE_MATCH_3})
             SET(MODULE_FILE_DIR_PATH ${CMAKE_MATCH_2})
             SET(MODULE_DIR_PATH ${CMAKE_MATCH_2}/${CMAKE_MATCH_3})
-            PROCESS_MODULE_STRUCTURE(${FILE_PATH})
+            PROCESS_MODULE_STRUCTURE(${FILE_NAME} ${FULL_DIR_PATH})

             # NOTE: The install configuration isn't part of
             # PROCESS_MODULE_STRUCTURE function so as to avoid "Command


AddSwift: Fix typo in static library dependency append

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1129,7 +1129,7 @@
   set(SWIFTLIB_SINGLE_LINK_LIBRARIES_WITHOUT_ICU)
   foreach(item ${SWIFTLIB_SINGLE_LINK_LIBRARIES})
     if(NOT "${item}" STREQUAL "icucore")
-      list(APPEND SWIFTLIB_SINGLE_LINK_LIBRARIES_WITHOUT_ICU "{$item}")
+      list(APPEND SWIFTLIB_SINGLE_LINK_LIBRARIES_WITHOUT_ICU "${item}")
     endif()
   endforeach()


Fixing build with versioning

Fixing build with versioning

--- indra/cmake/BuildVersion.cmake
+++ indra/cmake/BuildVersion.cmake
@@ -5,7 +5,7 @@
 macro (build_version _target)
   execute_process(
       COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py
-        llversion${_target}.h ${LLCOMMON_INCLUDE_DIRS}
+        llversion${_target}.cpp ${LLCOMMON_INCLUDE_DIRS}
       OUTPUT_VARIABLE ${_target}_VERSION
       OUTPUT_STRIP_TRAILING_WHITESPACE
       )


Fixed a bug :)

Fixed a bug :)

--- cmake/modules/FindROOT.cmake
+++ cmake/modules/FindROOT.cmake
@@ -147,6 +147,9 @@

   Foreach (_current_FILE ${INFILES})
     string(REGEX MATCH "Ali" ALICE ${_current_FILE})
+    if(NOT ALICE)
+      string(REGEX MATCH "TH1F" ALICE ${_current_FILE})
+    endif(NOT ALICE)
 #Filter Non-ALICE files
     if(ALICE)
       Get_filename_component(name_wo_path ${_current_FILE} NAME)


projecTM jack version bump

projecTM jack version bump

git-svn-id: 647c2dfdf120d9af8205d960f30c8711574448cd@1403 6778bc44-b910-0410-a7a0-be141de4315d

--- src/projectM-jack/cmake/CPack-projectM.cmake
+++ src/projectM-jack/cmake/CPack-projectM.cmake
@@ -17,8 +17,8 @@
 #SET(CPACK_BINARY_TGZ ON)
 #SET(CPACK_SOURCE_Z OFF)
 SET(CPACK_PACKAGE_VERSION_MAJOR "2")
-SET(CPACK_PACKAGE_VERSION_MINOR "0")
-SET(CPACK_PACKAGE_VERSION_PATCH "1")
+SET(CPACK_PACKAGE_VERSION_MINOR "1")
+SET(CPACK_PACKAGE_VERSION_PATCH "0")

 INCLUDE(CPack)


Bug 880: manually edit the DartConfiguration.tcl file to get it working with cmake 3.0.x

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -14,49 +14,18 @@
 # check whether /bin/bash exists
 find_file(EIGEN_BIN_BASH_EXISTS "/bin/bash" PATHS "/" NO_DEFAULT_PATH)

-# CMake/Ctest does not allow us to change the build command,
-# so we have to workaround by directly editing the generated DartConfiguration.tcl file
-# save CMAKE_MAKE_PROGRAM
-set(CMAKE_MAKE_PROGRAM_SAVE ${CMAKE_MAKE_PROGRAM})
-# and set a fake one
-set(CMAKE_MAKE_PROGRAM "@EIGEN_MAKECOMMAND_PLACEHOLDER@")
-
 # This call activates testing and generates the DartConfiguration.tcl
 include(CTest)

 set(EIGEN_TEST_BUILD_FLAGS "" CACHE STRING "Options passed to the build command of unit tests")

-# overwrite default DartConfiguration.tcl
-# The worarounds are different for each version of the MSVC IDE
-set(EIGEN_TEST_TARGET buildtests)
-if(MSVC_IDE)
-  if(CMAKE_MAKE_PROGRAM_SAVE MATCHES "devenv") # devenv
-    set(EIGEN_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM_SAVE} Eigen.sln /build Release /project ${EIGEN_TEST_TARGET}")
-  else() # msbuild
-    set(EIGEN_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM_SAVE} ${EIGEN_TEST_TARGET}.vcxproj /p:Configuration=\${CTEST_CONFIGURATION_TYPE}")
-  endif()
-
-  # append the build flags if provided
-  if(NOT "${EIGEN_TEST_BUILD_FLAGS}" MATCHES "^[ \t]*$")
-    set(EIGEN_BUILD_COMMAND "${EIGEN_BUILD_COMMAND} ${EIGEN_TEST_BUILD_FLAGS}")
-  endif()
-
-  # apply the dartconfig hack ...
-  set(EIGEN_MAKECOMMAND_PLACEHOLDER "${EIGEN_BUILD_COMMAND}\n#")
-else()
-  # for make and nmake
-  set(EIGEN_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM_SAVE} ${EIGEN_TEST_TARGET} ${EIGEN_TEST_BUILD_FLAGS}")
-  set(EIGEN_MAKECOMMAND_PLACEHOLDER "${EIGEN_BUILD_COMMAND}")
-endif()
-
-configure_file(${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)
-
-# restore default CMAKE_MAKE_PROGRAM
-set(CMAKE_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM_SAVE})
-
-# un-set temporary variables so that it is like they never existed
-unset(CMAKE_MAKE_PROGRAM_SAVE)
-unset(EIGEN_MAKECOMMAND_PLACEHOLDER)
+# Overwrite default DartConfiguration.tcl such that ctest can build our unit tests.
+# Recall that our unit tests are not in the "all" target, so we have to explicitely ask ctest to build our custom 'buildtests' target.
+# At this stage, we can also add custom flags to the build tool through the user defined EIGEN_TEST_BUILD_FLAGS variable.
+file(READ  "${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl" EIGEN_DART_CONFIG_FILE)
+string(REGEX REPLACE "MakeCommand:.*DefaultCTestConfigurationType" "MakeCommand: ${CMAKE_COMMAND} --build . --target buildtests --config '' -- -i ${EIGEN_TEST_BUILD_FLAGS}\nDefaultCTestConfigurationType"
+       EIGEN_DART_CONFIG_FILE2 ${EIGEN_DART_CONFIG_FILE})
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl" ${EIGEN_DART_CONFIG_FILE2})

 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)


cmake: set _WIN32_WINNT for Windows 7 API

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -383,6 +383,19 @@
   add_definitions(-D_VARIADIC_MAX=10)
 endif()

+if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+  get_directory_property(__DIRECTORY_COMPILE_DEFINITIONS COMPILE_DEFINITIONS)
+  if((NOT " ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${OPENCV_EXTRA_CXX_FLAGS} ${OPENCV_EXTRA_FLAGS_RELEASE} ${__DIRECTORY_COMPILE_DEFINITIONS}" MATCHES "_WIN32_WINNT"
+      AND NOT OPENCV_CMAKE_SKIP_MACRO_WIN32_WINNT)
+      OR OPENCV_CMAKE_FORCE_MACRO_WIN32_WINNT
+  )
+    # https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
+    # Target Windows 7 API
+    set(OPENCV_CMAKE_MACRO_WIN32_WINNT "0x0601" CACHE STRING "Value of _WIN32_WINNT macro")
+    add_definitions(-D_WIN32_WINNT=${OPENCV_CMAKE_MACRO_WIN32_WINNT})
+  endif()
+endif()
+
 # Enable compiler options for OpenCV modules/apps/samples only (ignore 3rdparty)
 macro(ocv_add_modules_compiler_options)
   if(MSVC AND NOT OPENCV_SKIP_MSVC_W4_OPTION)


Prefer shared lib over static lib for finding libcrypto

--- cmake/modules/FindLibCrypto.cmake
+++ cmake/modules/FindLibCrypto.cmake
@@ -18,7 +18,7 @@
         )

 find_library(LibCrypto_LIBRARY
-        NAMES libcrypto.a libcrypto.so
+        NAMES libcrypto.so libcrypto.a
         HINTS ${CMAKE_INSTALL_PREFIX}/build/crypto
         ${CMAKE_INSTALL_PREFIX}/build
         ${CMAKE_INSTALL_PREFIX}


Add parsing of WILLFAIL in ROOT_ADD_PYUNITTEST

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -1373,7 +1373,7 @@
 # ROOT_ADD_PYUNITTEST( <name> <file>)
 #----------------------------------------------------------------------------
 function(ROOT_ADD_PYUNITTEST name file)
-  CMAKE_PARSE_ARGUMENTS(ARG "" "" "COPY_TO_BUILDDIR" ${ARGN})
+  CMAKE_PARSE_ARGUMENTS(ARG "WILLFAIL" "" "COPY_TO_BUILDDIR" ${ARGN})

   set(ROOT_ENV ROOTSYS=${ROOTSYS}
       PATH=${ROOTSYS}/bin:$ENV{PATH}
@@ -1391,10 +1391,15 @@
     set(copy_to_builddir COPY_TO_BUILDDIR ${copy_files})
   endif()

+  if(ARG_WILLFAIL)
+    set(will_fail WILLFAIL)
+  endif()
+
   ROOT_ADD_TEST(pyunittests-${good_name}
                 COMMAND ${PYTHON_EXECUTABLE} -B -m unittest discover -s ${CMAKE_CURRENT_SOURCE_DIR}/${file_dir} -p ${file_name} -v
                 ENVIRONMENT ${ROOT_ENV}
-                ${copy_to_builddir})
+                ${copy_to_builddir}
+                ${will_fail})
 endfunction()

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


Try to unbreak bots.

Try to unbreak bots.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -246,7 +246,7 @@
   endforeach()
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  rheaderfiles "${headerfiles}")
   # Replace the non-standard folder layout of Core.
-  if (ARG_STAGE1 AND ${ARG_MODULE} STREQUAL "Core")
+  if (ARG_STAGE1 AND ARG_MODULE STREQUAL "Core")
     set(core_folders "base|clib|cont|doc|lzma|macosx|meta|metautils|multiproc|newdelete|pcre|rint|textinput|thread|unix|utils|winnt|zip")
     string(REGEX REPLACE "${CMAKE_SOURCE_DIR}/core/(${core_folders})/inc/" ""  rheaderfiles "${rheaderfiles}")
   endif()


cmake: compat: redefine old t001chain var (_SDK_LIB, SDK_DIR)

--- cmake/qibuild/compat/compat.cmake
+++ cmake/qibuild/compat/compat.cmake
@@ -35,8 +35,17 @@
 #####################

 # In theory those should not be used that often...
-set(_SDK_LIB ${QI_SDK_LIB})
-set(_SDK_BIN ${QI_SDK_BIN})
+qi_set_global(_SDK_LIB           ${QI_SDK_LIB})
+qi_set_global(_SDK_BIN           ${QI_SDK_BIN})
+qi_set_global(_SDK_FRAMEWORK     ${QI_SDK_FRAMEWORK}    )
+qi_set_global(_SDK_INCLUDE       ${QI_SDK_INCLUDE}      )
+qi_set_global(_SDK_SHARE         ${QI_SDK_SHARE}        )
+qi_set_global(_SDK_CONF          ${QI_SDK_CONF}         )
+qi_set_global(_SDK_DOC           ${QI_SDK_DOC}          )
+qi_set_global(_SDK_CMAKE         ${QI_SDK_CMAKE}        )
+qi_set_global(_SDK_CMAKE_MODULES ${QI_SDK_CMAKE_MODULES})
+
+qi_set_global(SDK_DIR ${QI_SDK_DIR})

 function(win32_copy_targe)
   qi_deprecated("win32_copy_target is deprecated.


- Update FindPantheios to gcc45 files (TODO : autodetect version)

--- cmake_modules/FindPantheios.cmake
+++ cmake_modules/FindPantheios.cmake
@@ -45,11 +45,11 @@
        )

     # Look for the libraries.
-    FIND_LIBRARY(PANTHEIOS_CORE_LIBRARY     NAMES pantheios.1.core.gcc44.mt.debug        PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
-    FIND_LIBRARY(PANTHEIOS_UTIL_LIBRARY     NAMES pantheios.1.util.gcc44.mt.debug        PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
-    FIND_LIBRARY(PANTHEIOS_FE_LIBRARY       NAMES pantheios.1.fe.all.gcc44.mt.debug      PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
-    FIND_LIBRARY(PANTHEIOS_BE_FILE_LIBRARY  NAMES pantheios.1.be.fprintf.gcc44.mt.debug  PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
-    FIND_LIBRARY(PANTHEIOS_BEC_FILE_LIBRARY NAMES pantheios.1.bec.fprintf.gcc44.mt.debug PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_CORE_LIBRARY     NAMES pantheios.1.core.gcc45.mt.debug        PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_UTIL_LIBRARY     NAMES pantheios.1.util.gcc45.mt.debug        PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_FE_LIBRARY       NAMES pantheios.1.fe.all.gcc45.mt.debug      PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_BE_FILE_LIBRARY  NAMES pantheios.1.be.fprintf.gcc45.mt.debug  PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_BEC_FILE_LIBRARY NAMES pantheios.1.bec.fprintf.gcc45.mt.debug PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})

     LIST(APPEND PANTHEIOS_LIBRARY ${PANTHEIOS_CORE_LIBRARY})
     LIST(APPEND PANTHEIOS_LIBRARY ${PANTHEIOS_UTIL_LIBRARY})


Fix CMake variable usage.

Fix CMake variable usage.

--- cmake/Modules/CppUTestWarningFlags.cmake
+++ cmake/Modules/CppUTestWarningFlags.cmake
@@ -56,10 +56,10 @@
     check_and_append_c_warning_flags(${WARNING_C_ONLY_FLAGS})
     check_and_append_cxx_warning_flags(${WARNING_CXX_FLAGS})

-    if (C++11)
+    if (CPPUTEST_C++11)
         check_cxx_compiler_flag("-Wno-c++98-compat" NO_WARNING_CXX_98_COMPAT_FLAG)
         if (NO_WARNING_CXX_98_COMPAT_FLAG)
             set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-c++98-compat")
         endif (NO_WARNING_CXX_98_COMPAT_FLAG)
-    endif (C++11)
+      endif (CPPUTEST_C++11)
 endif (MSVC)


Add OpenCV-Extra 3.4.6

Add OpenCV-Extra 3.4.6

--- cmake/projects/OpenCV-Extra/hunter.cmake
+++ cmake/projects/OpenCV-Extra/hunter.cmake
@@ -16,6 +16,17 @@
     "https://github.com/opencv/opencv_contrib/archive/4.0.0.tar.gz"
     SHA1
     4c10c8cb288a320b47ec7e87a0fdcf5a8df0f49d
+)
+
+hunter_add_version(
+    PACKAGE_NAME
+    OpenCV-Extra
+    VERSION
+    "3.4.6"
+    URL
+    "https://github.com/opencv/opencv_contrib/archive/3.4.6.tar.gz"
+    SHA1
+    f87e11ac00550529853f19871429d062ef446c35
 )

 hunter_add_version(


small CMake fix for TRY_TO_COPY_DLLS option

--- CMake/MyGUIInstallDependencies.cmake
+++ CMake/MyGUIInstallDependencies.cmake
@@ -26,8 +26,11 @@
 	configure_file(${RELEASE_SEFILEPATH}${FILENAME}.dll ${MYGUI_BINARY_DIR}/bin/minsizerel/${FILENAME}.dll COPYONLY)
 endfunction(install_dll_file)

-set(MYGUI_DEP_CUR_DIR ${MYGUI_DEPENDENCIES_DIR})
-set(MYGUI_DEP_BIN_DIR ${MYGUI_DEPENDENCIES_DIR}/bin)
+if (MYGUI_DEPENDENCIES_DIR STREQUAL "")
+	set(MYGUI_DEP_BIN_DIR ${MYGUI_SOURCE_DIR}/Dependencies/bin)
+else ()
+	set(MYGUI_DEP_BIN_DIR ${MYGUI_DEPENDENCIES_DIR}/bin)
+endif ()

 option(MYGUI_TRY_TO_COPY_DLLS "Copy dlls needed for sample builds" FALSE)


Disable CUDA for windows

Disable CUDA for windows

--- CMake/Superbuild/External_SOFA.cmake
+++ CMake/Superbuild/External_SOFA.cmake
@@ -42,9 +42,9 @@
 SlicerMacroCheckExternalProjectDependency(${proj})

 # FindCUDA
-set(SOFA_CUDA_ARGS)
+set(SOFA_CUDA_ARGS -DSOFA-PLUGIN_SOFACUDA:BOOL=OFF)
 find_package(CUDA QUIET)
-if(CUDA_FOUND)
+if(CUDA_FOUND AND NOT WIN32)
   set(SOFA_CUDA_ARGS
     -DSOFA-PLUGIN_SOFACUDA:BOOL=ON
     -DCUDA_TOOLKIT_ROOT_DIR:PATH=${CUDA_TOOLKIT_ROOT_DIR}


cmake: Update botan bundles to musl variants

--- cmake/botan.cmake
+++ cmake/botan.cmake
@@ -4,14 +4,14 @@
 include(ExternalProject)

 if(${ARCH} STREQUAL "x86_64")
-  set(BOTAN_HASH 707bb3ce80c8fbd8bf84e15211f68936)
+  set(BOTAN_HASH b1dfea0d906783e00dc650832d47ffd4)
 elseif(${ARCH} STREQUAL "i686")
-  set(BOTAN_HASH 788fbe7e214d22638135c5a603bc0fe7)
+  set(BOTAN_HASH e49e7177fe015de294acb0c8dc13a099)
 endif()

 ExternalProject_Add(botan
         PREFIX botan
-        URL https://github.com/includeos/botan/releases/download/inc-3.0/botan-includeos-${ARCH}.tar.gz
+        URL https://github.com/includeos/botan/releases/download/musl-1.0/botan-includeos-${ARCH}.tar.gz
         URL_HASH MD5=${BOTAN_HASH}
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""


Disable unit tests by default on emscripten and PNaCl

--- cmake/oryol.cmake
+++ cmake/oryol.cmake
@@ -9,7 +9,11 @@
 #-------------------------------------------------------------------------------
 #   define top-level options for the whole project
 #-------------------------------------------------------------------------------
-option(ORYOL_UNITTESTS "Enable unit tests" ON)
+if (ORYOL_EMSCRIPTEN OR ORYOL_NACL)
+    option(ORYOL_UNITTESTS "Enable unit tests" OFF)
+else()
+    option(ORYOL_UNITTESTS "Enable unit tests" ON)
+endif()
 option(ORYOL_UNITTESTS_RUN_AFTER_BUILD "Automatically run unit tests after building" OFF)
 option(ORYOL_EXCEPTIONS "Enable C++ exceptions" OFF)
 option(ORYOL_ALLOCATOR_DEBUG "Enable allocator debugging code (slow)" OFF)


Don't bother with the effective C++ warnings right now.

--- cmake/EnableExtraCompilerWarnings.cmake
+++ cmake/EnableExtraCompilerWarnings.cmake
@@ -50,10 +50,6 @@
 			set(_flags "${_flags} -Wextra")
 		endif()

-		check_cxx_compiler_flag(-Weffc++ SUPPORTS_WEFFCXX_FLAG)
-		if(SUPPORTS_WEFFCXX_FLAG)
-			set(_flags "${_flags} -Weffc++")
-		endif()
 	endif()
 endmacro()


Fix #140, wrong working directory

Fix #140, wrong working directory

--- cmake/cmake_celix/BundlePackaging.cmake
+++ cmake/cmake_celix/BundlePackaging.cmake
@@ -263,7 +263,7 @@
             COMMAND ${ZIP_COMMAND} -rq ${BUNDLE_FILE} *
             COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
             DEPENDS  ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
-            WORKING_DIRECTORY ${BUNDLE_CONTENT_DIR}
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
     else()
         message(FATAL_ERROR "A jar or zip command is needed to jar/zip bundles")


extra compiler flag for ccache+clang

extra compiler flag for ccache+clang

--- CMakeModules/CompilerSettings.cmake
+++ CMakeModules/CompilerSettings.cmake
@@ -2,7 +2,7 @@
     add_definitions(-W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused)
 endif(CMAKE_COMPILER_IS_GNUCXX)
 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    add_definitions(-W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-unused-parameter -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual -Wno-unknown-pragmas)
+    add_definitions(-W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-unused-parameter -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual -Wno-unknown-pragmas -Qunused-arguments)
 endif()

 if(MSVC OR MSVC90 OR MSVC10)


attempt to figure out what's going on with Travis CI

--- CMakeModules/Findxmlgenerator.cmake
+++ CMakeModules/Findxmlgenerator.cmake
@@ -25,7 +25,9 @@
     # Without this you might get compilation errors
     if(XMLCOMPILER STREQUAL "castxml" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
         set(XMLCFLAGS "-D__STRICT_ANSI__")
+        message("    **** castxml and g++ ****")
     endif()
+    set(XMLCFLAGS "-D__STRICT_ANSI__")

     if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
         set(XMLCOMPILER "g++")


Make endian define more convenient to use

--- Common.cmake
+++ Common.cmake
@@ -73,6 +73,8 @@
 test_big_endian(BIGENDIAN)
 if(BIGENDIAN)
   add_definitions(-D${UPPER_PROJECT_NAME}_BIGENDIAN)
+else()
+  add_definitions(-D${UPPER_PROJECT_NAME}_LITTLEENDIAN)
 endif()

 include(Compiler) # compiler-specific default options and warnings


Force default build type

Force default build type

--- Common.cmake
+++ Common.cmake
@@ -9,9 +9,9 @@

 if(NOT CMAKE_BUILD_TYPE)
   if(RELEASE_VERSION)
-    set(CMAKE_BUILD_TYPE Release)
+    set(CMAKE_BUILD_TYPE Release CACHE FORCE)
   else()
-    set(CMAKE_BUILD_TYPE Debug)
+    set(CMAKE_BUILD_TYPE Debug CACHE FORCE)
   endif()
 endif(NOT CMAKE_BUILD_TYPE)


If we need Mono, but don't find it, then fail early Self-reviewed.

--- indra/cmake/MonoEmbed.cmake
+++ indra/cmake/MonoEmbed.cmake
@@ -25,11 +25,11 @@
   SET(MONO_LIB_DIRECTORY ${MONO_LIBRARY}/Libraries)

   IF (MONO_LIBRARY AND MONO_GLIB_LIBRARY AND GLIB_CONFIG)
-    MESSAGE("-- Found Mono for embedding")
+    MESSAGE(STATUS "Found Mono for embedding")
     INCLUDE_DIRECTORIES(${MONO_GLIB_LIBRARY} ${GLIB_CONFIG})
     LINK_DIRECTORIES(${MONO_LIB_DIRECTORY})
   ELSE (MONO_LIBRARY AND MONO_GLIB_LIBRARY AND GLIB_CONFIG)
-    MESSAGE("-- Mono not found for embedding")
+    MESSAGE(FATAL_ERROR "Mono not found for embedding")
     MESSAGE(${MONO_LIBRARY})
     MESSAGE(${MONO_GLIB_LIBRARY})
     MESSAGE(${GLIB_CONFIG})


make local developer builds use the same channel as TeamCity developer builds

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -141,7 +141,7 @@
 set(GRID agni CACHE STRING "Target Grid")

 set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
-set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name")
+set(VIEWER_CHANNEL "Second Life Developer" CACHE STRING "Viewer Channel Name")
 set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")

 if (XCODE_VERSION GREATER 4.2)


- параметр только для Visual Studio

 - параметр только для Visual Studio

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@13115 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/split-bison.cmake
+++ rdo/packages/cmake/trunk/split-bison.cmake
@@ -17,8 +17,10 @@
 	SET(CPP_OUTPUT_FILE_1 ${GRAMMA_OUTPUT_PATH}/rdogram${Y_1}.cpp)
 	SET(CPP_OUTPUT_FILE_2 ${GRAMMA_OUTPUT_PATH}/rdogram${Y_2}.cpp)

-	SET_SOURCE_FILES_PROPERTIES(${GRAMMA_OUTPUT_PATH}/rdogram${Y_1}.cpp PROPERTIES COMPILE_FLAGS "/Od")
-	SET_SOURCE_FILES_PROPERTIES(${GRAMMA_OUTPUT_PATH}/rdogram${Y_2}.cpp PROPERTIES COMPILE_FLAGS "/Od")
+	IF(MSVC)
+		SET_SOURCE_FILES_PROPERTIES(${GRAMMA_OUTPUT_PATH}/rdogram${Y_1}.cpp PROPERTIES COMPILE_FLAGS "/Od")
+		SET_SOURCE_FILES_PROPERTIES(${GRAMMA_OUTPUT_PATH}/rdogram${Y_2}.cpp PROPERTIES COMPILE_FLAGS "/Od")
+	ENDIF()

 	SET(BISON_${INPUT_FILE}_OUTPUTS_1 ${CPP_OUTPUT_FILE_1})
 	SET(BISON_${INPUT_FILE}_OUTPUTS_2 ${CPP_OUTPUT_FILE_2})


use system variable instead of custom one

--- cmake/FindEigen2.cmake
+++ cmake/FindEigen2.cmake
@@ -1,4 +1,9 @@
 # - Try to find Eigen2 lib
+#
+# This module supports requiring a minimum version, e.g. you can do
+#   find_package(Eigen2 2.0.3)
+# to require version 2.0.3 to newer of Eigen2.
+#
 # Once done this will define
 #
 #  EIGEN2_FOUND - system has eigen lib with correct version
@@ -9,7 +14,7 @@
 # Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
 # Redistribution and use is allowed according to the terms of the BSD license.

-if(NOT EIGEN2_MIN_VERSION)
+if(NOT Eigen2_FIND_VERSION)
   if(NOT Eigen2_FIND_VERSION_MAJOR)
     set(Eigen2_FIND_VERSION_MAJOR 2)
   endif(NOT Eigen2_FIND_VERSION_MAJOR)
@@ -20,8 +25,8 @@
     set(Eigen2_FIND_VERSION_PATCH 0)
   endif(NOT Eigen2_FIND_VERSION_PATCH)

-  set(EIGEN2_MIN_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}")
-endif(NOT EIGEN2_MIN_VERSION)
+  set(Eigen2_FIND_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}")
+endif(NOT Eigen2_FIND_VERSION)

 macro(_eigen2_check_version)
   file(READ "${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header LIMIT 5000 OFFSET 1000)
@@ -34,16 +39,16 @@
   set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")

   set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
-  if(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
+  if(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})
     set(EIGEN2_VERSION_OK FALSE)
-  else(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
+  else(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})
     set(EIGEN2_VERSION_OK TRUE)
-  endif(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
+  endif(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})

   if(NOT EIGEN2_VERSION_OK)

     message(STATUS "Eigen2 version ${EIGEN2_VERSION} found in ${EIGEN2_INCLUDE_DIR}, "
-                   "but at least version ${EIGEN2_MIN_VERSION} is required")
+                   "but at least version ${Eigen2_FIND_VERSION} is required")
   endif(NOT EIGEN2_VERSION_OK)
 endmacro(_eigen2_check_version)


Fix CMake dev warning

Fix CMake dev warning

--- cmake/FindPython.cmake
+++ cmake/FindPython.cmake
@@ -66,7 +66,7 @@
     CACHE STRING "Suffix for python extensions")

 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PYTHON DEFAULT_MSG PYTHON_LIBRARY PYTHON_INCLUDE_PATH PYTHON_INSTALL_PATH)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Python DEFAULT_MSG PYTHON_LIBRARY PYTHON_INCLUDE_PATH PYTHON_INSTALL_PATH)

 # Links a Python extension module.


My experience is CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH are strictly
environment variables and not something you can set with a -Doption.  Change
self-documentation accordingly.

svn path=/trunk/; revision=6859

--- cmake/modules/gd.cmake
+++ cmake/modules/gd.cmake
@@ -17,7 +17,8 @@
 # along with the file PLplot; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

-# Configuration for the gd device (supporting png, gif and/or jpeg drivers)
+# Configuration for the gd device driver (supporting png, gif and/or jpeg
+# devices.)
 #
 # The following variables are set / modified
 #
@@ -28,12 +29,10 @@
 # gd_LINK_FLAGS       - LINK_FLAGS for dynamic gd device driver.
 # DRIVERS_LINK_FLAGS  - list of LINK_FLAGS for all static device drivers.
 #
-# Include file searches use FindPath. To add extra search directories to
-# set the environment variable CMAKE_INCLUDE_PATH or the CMake variable
-# CMAKE_INCLUDE_PATH (using cmake -D option).
-# Library searches use FindLibrary. To add extra search directories to
-# set the environment variable CMAKE_LIBRARY_PATH or the CMake variable
-# CMAKE_LIBRARY_PATH (using cmake -D option).
+# Include file searches use FindPath. To add extra search directories
+# set the environment variable CMAKE_INCLUDE_PATH.
+# Library searches use FindLibrary. To add extra search directories
+# set the environment variable CMAKE_LIBRARY_PATH.
 # See cmake documentation for further details.

 # Look for gd libraries


Allow gcc 4.9 for cuda 7.0

Allow gcc 4.9 for cuda 7.0

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -46,6 +46,9 @@
   IF((CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC) OR APPLE)
     # Compatible gcc can be checked in host_config.h
     SET(GCC_PATH "")
+    IF(${CUDA_VERSION} VERSION_GREATER "6.99")
+      FIND_GCC(GCC_PATH "4" "9")
+    ENDIF()
     IF(${CUDA_VERSION} VERSION_GREATER "5.4.99")
       FIND_GCC(GCC_PATH "4" "8")
     ENDIF()


updated find cyclus

updated find cyclus

--- CMake/FindCyclus.cmake
+++ CMake/FindCyclus.cmake
@@ -13,7 +13,7 @@
     MESSAGE(STATUS "\t\tThe environment variable CYCLUS_ROOT_DIR: $ENV{CYCLUS_ROOT_DIR}")
   ENDIF(NOT DEFINED CYCLUS_ROOT_DIR)
 ELSE(DEFINED ENV{CYCLUS_ROOT_DIR})
-  SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
+  SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
 ENDIF(DEFINED ENV{CYCLUS_ROOT_DIR})

 # Let the user know if we're using a hint
@@ -23,18 +23,18 @@
 # defined dirs
 FIND_PATH(CYCLUS_CORE_INCLUDE_DIR cyclus.h
   HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
-  "${CYCLUS_ROOT_DIR}/include"
-  "${CYCLUS_ROOT_DIR}/include/cyclus"
-  /usr/local/cyclus /opt/local/cyclus
+  "${CYCLUS_ROOT_DIR}/include"
+  "${CYCLUS_ROOT_DIR}/include/cyclus"
+  /usr/local/cyclus /opt/local/cyclus
   PATH_SUFFIXES cyclus/include include include/cyclus)

 # Set the include dir, this will be the future basis for other
 # defined dirs
 FIND_PATH(CYCLUS_CORE_TEST_INCLUDE_DIR agent_tests.h
   HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus/tests"
-  "${CYCLUS_ROOT_DIR}/include"
-  "${CYCLUS_ROOT_DIR}/include/cyclus/tests"
-  /usr/local/cyclus /opt/local/cyclus
+  "${CYCLUS_ROOT_DIR}/include"
+  "${CYCLUS_ROOT_DIR}/include/cyclus/tests"
+  /usr/local/cyclus /opt/local/cyclus
   PATH_SUFFIXES cyclus/include include include/cyclus include/cyclus/tests cyclus/include/tests)

 # Add the root dir to the hints
@@ -42,27 +42,28 @@

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

 # Look for the library
 FIND_LIBRARY(CYCLUS_CORE_LIBRARY NAMES cyclus
-  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
-  /usr/local/cyclus/lib /usr/local/cyclus
+  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
+  /usr/local/cyclus/lib /usr/local/cyclus
   /opt/local /opt/local/cyclus
   PATH_SUFFIXES cyclus/lib lib)

 # Look for the library
 FIND_LIBRARY(CYCLUS_GTEST_LIBRARY NAMES gtest
-  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
+  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
   "${CYCLUS_ROOT_DIR}/lib"  "${CYCLUS_CORE_SHARE_DIR}/../lib"
-  /usr/local/cyclus/lib /usr/local/cyclus
-  /opt/local/lib /opt/local/cyclus/lib
+  /usr/local/cyclus/lib /usr/local/cyclus
+  /opt/local/lib /opt/local/cyclus/lib
   PATH_SUFFIXES cyclus/lib lib)

 # Copy the results to the output variables.
-IF (CYCLUS_CORE_INCLUDE_DIR AND CYCLUS_CORE_TEST_INCLUDE_DIR
+IF (CYCLUS_CORE_INCLUDE_DIR AND CYCLUS_CORE_TEST_INCLUDE_DIR
     AND CYCLUS_CORE_LIBRARY AND CYCLUS_GTEST_LIBRARY AND CYCLUS_CORE_SHARE_DIR)
   SET(CYCLUS_CORE_FOUND 1)
   SET(CYCLUS_CORE_LIBRARIES ${CYCLUS_CORE_LIBRARY})
@@ -81,20 +82,20 @@

 # Report the results.
 IF (CYCLUS_CORE_FOUND)
-  SET(CYCLUS_CORE_DIR_MESSAGE "Found Cyclus Core Headers : "
+  SET(CYCLUS_CORE_DIR_MESSAGE "Found Cyclus Core Headers : "
     ${CYCLUS_CORE_INCLUDE_DIRS} )
-  SET(CYCLUS_CORE_TEST_DIR_MESSAGE "Found Cyclus Core Test Headers : "
+  SET(CYCLUS_CORE_TEST_DIR_MESSAGE "Found Cyclus Core Test Headers : "
     ${CYCLUS_CORE_TEST_INCLUDE_DIRS} )
-  SET(CYCLUS_CORE_SHARE_MESSAGE "Found Cyclus Core Shared Data : "
+  SET(CYCLUS_CORE_SHARE_MESSAGE "Found Cyclus Core Shared Data : "
     ${CYCLUS_CORE_SHARE_DIRS} )
-  SET(CYCLUS_CORE_LIB_MESSAGE "Found Cyclus Core Library : "
+  SET(CYCLUS_CORE_LIB_MESSAGE "Found Cyclus Core Library : "
     ${CYCLUS_CORE_LIBRARIES} )
-  SET(CYCLUS_GTEST_LIB_MESSAGE "Found Cyclus GTest Library : "
+  SET(CYCLUS_GTEST_LIB_MESSAGE "Found Cyclus GTest Library : "
     ${CYCLUS_GTEST_LIBRARIES} )
-  MESSAGE(STATUS ${CYCLUS_CORE_DIR_MESSAGE})
-  MESSAGE(STATUS ${CYCLUS_CORE_SHARE_MESSAGE})
-  MESSAGE(STATUS ${CYCLUS_CORE_LIB_MESSAGE})
-  MESSAGE(STATUS ${CYCLUS_GTEST_LIB_MESSAGE})
+  MESSAGE(STATUS ${CYCLUS_CORE_DIR_MESSAGE})
+  MESSAGE(STATUS ${CYCLUS_CORE_SHARE_MESSAGE})
+  MESSAGE(STATUS ${CYCLUS_CORE_LIB_MESSAGE})
+  MESSAGE(STATUS ${CYCLUS_GTEST_LIB_MESSAGE})
 ELSE (CYCLUS_CORE_FOUND)
 	SET(CYCLUS_CORE_DIR_MESSAGE
 		"Cyclus was not found. Make sure CYCLUS_CORE_LIBRARY and CYCLUS_CORE_INCLUDE_DIR are set.")
@@ -103,7 +104,7 @@
 	  MESSAGE(STATUS "CYCLUS_CORE_SHARE_DIR was set to : ${CYCLUS_CORE_SHARE_DIR}")
 	  MESSAGE(STATUS "CYCLUS_CORE_LIBRARY was set to : ${CYCLUS_CORE_LIBRARY}")
 	  MESSAGE(STATUS "CYCLUS_GTEST_LIBRARY was set to : ${CYCLUS_GTEST_LIBRARY}")
-
+
       IF (cyclus_FIND_REQUIRED)
         MESSAGE(FATAL_ERROR "${cyclus_DIR_MESSAGE}")
       ENDIF (cyclus_FIND_REQUIRED)


COMP: clean up ImportGDAL

COMP: clean up ImportGDAL

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -72,7 +72,6 @@
   MESSAGE(FATAL_ERROR
            "Cannot find geotiff headers. Please set GEOTIFF_INCLUDE_DIRS.")
   ENDIF (NOT GEOTIFF_INCLUDE_DIRS)
-#  INCLUDE_DIRECTORIES(${GEOTIFF_INCLUDE_DIRS})

   # Find tiff headers
   FIND_PATH(TIFF_INCLUDE_DIRS tiffio.h $ENV{GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR} ${OSGEO4W_INCLUDE} /usr/include)
@@ -81,7 +80,6 @@
   MESSAGE(FATAL_ERROR
            "Cannot find libtiff headers. Please set TIFF_INCLUDE_DIRS.")
   ENDIF (NOT TIFF_INCLUDE_DIRS)
-#  INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIRS})

   # Find jpeg headers
   FIND_PATH(JPEG_INCLUDE_DIRS jpeglib.h $ENV{GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR} ${OSGEO4W_INCLUDE} /usr/include)


COMP: /usr/include is always searched by cmake

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -72,7 +72,7 @@
   ENDIF (NOT GEOTIFF_INCLUDE_DIRS)

   # Find tiff headers
-  FIND_PATH(TIFF_INCLUDE_DIRS tiffio.h ${GDAL_INCLUDE_DIR} /usr/include)
+  FIND_PATH(TIFF_INCLUDE_DIRS tiffio.h ${GDAL_INCLUDE_DIR})
   MARK_AS_ADVANCED(TIFF_INCLUDE_DIRS)
   IF (NOT TIFF_INCLUDE_DIRS)
   MESSAGE(FATAL_ERROR
@@ -80,7 +80,7 @@
   ENDIF (NOT TIFF_INCLUDE_DIRS)

   # Find jpeg headers
-  FIND_PATH(JPEG_INCLUDE_DIRS jpeglib.h ${GDAL_INCLUDE_DIR} /usr/include)
+  FIND_PATH(JPEG_INCLUDE_DIRS jpeglib.h ${GDAL_INCLUDE_DIR})
   MARK_AS_ADVANCED(JPEG_INCLUDE_DIRS)
   IF (NOT JPEG_INCLUDE_DIRS)
   MESSAGE(FATAL_ERROR
@@ -89,7 +89,7 @@
   INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIRS})

   # Find ogr headers
-  FIND_PATH(OGR_INCLUDE_DIRS ogrsf_frmts.h ${GDAL_INCLUDE_DIR} /usr/include)
+  FIND_PATH(OGR_INCLUDE_DIRS ogrsf_frmts.h ${GDAL_INCLUDE_DIR})
   MARK_AS_ADVANCED(OGR_INCLUDE_DIRS)
   IF (NOT OGR_INCLUDE_DIRS)
   MESSAGE(FATAL_ERROR


Turn off webview to make compilation possible on ubuntu 20.04

--- CMake/Conan.cmake
+++ CMake/Conan.cmake
@@ -28,7 +28,13 @@
       fmt/7.0.3
       span-lite/0.6.0
     )
-    list(APPEND CONAN_OPTIONS wxwidgets:compatibility=3.1 wxwidgets:debugreport=False)
+    list(
+      APPEND
+      CONAN_OPTIONS
+      wxwidgets:compatibility=3.1
+      wxwidgets:debugreport=False
+      wxwidgets:webview=False
+    )
   endif()

   conan_cmake_run(


cmake: Set application version as package version.

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -11,9 +11,9 @@

 ### versions
-set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "5")
-set(CPACK_PACKAGE_VERSION_PATCH "4")
+set(CPACK_PACKAGE_VERSION_MAJOR "${APPLICATION_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${APPLICATION_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${APPLICATION_VERSION_PATCH}")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")


[ctest] put again tripop cdash

[ctest] put again tripop cdash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -11,8 +11,8 @@

 # https is needed on cdash server side
 set(CTEST_DROP_METHOD "https")
-set(CTEST_DROP_SITE "my.cdash.org/")
-# set(CTEST_DROP_SITE "cdash-tripop.inrialpes.fr")
+#set(CTEST_DROP_SITE "my.cdash.org/")
+set(CTEST_DROP_SITE "cdash-tripop.inrialpes.fr")
 set(CTEST_DROP_LOCATION "/submit.php?project=Siconos")
 set(CTEST_DROP_SITE_CDASH TRUE)
 if(BUILD_NAME)


ENH: Merge changes from main tree into VTK-5-2 branch. (cvs -q up -j1.2 -j1.3 CTestConfig.cmake)

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,6 +1,10 @@
-SET (CTEST_PROJECT_NAME "VTK")
-SET (CTEST_NIGHTLY_START_TIME "22:00:00 EDT")
-SET (CTEST_DROP_METHOD "http")
-SET (CTEST_DROP_SITE "www.vtk.org")
-SET (CTEST_DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
-SET (CTEST_TRIGGER_SITE "http://${CTEST_DROP_SITE}/cgi-bin/Submit-vtk-TestingResults.cgi")
+set(CTEST_PROJECT_NAME "VTK")
+set(CTEST_NIGHTLY_START_TIME "22:00:00 EDT")
+
+
+
+set(CTEST_DROP_METHOD "http")
+
+set(CTEST_DROP_SITE "www.cdash.org")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=VTK")
+set(CTEST_DROP_SITE_CDASH TRUE)


#4001: Update CTestConfig to point cmiclab

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -21,7 +21,7 @@
 ENDIF(NOT DEFINED CTEST_DROP_METHOD)

 IF(CTEST_DROP_METHOD STREQUAL "http")
-  SET(CTEST_DROP_SITE "cmicdev.cs.ucl.ac.uk")
+  SET(CTEST_DROP_SITE "cdash.cmiclab.cs.ucl.ac.uk")
   SET(CTEST_DROP_LOCATION "/cdash/submit.php?project=NiftyLink")
   SET(CTEST_DROP_SITE_CDASH TRUE)
 ENDIF(CTEST_DROP_METHOD STREQUAL "http")


COMP: master branch of diapotb breaks on windows

--- Modules/Remote/diapotb.remote.cmake
+++ Modules/Remote/diapotb.remote.cmake
@@ -2,5 +2,5 @@
 otb_fetch_module(DiapOTBModule
   "OTB module for SAR processing in Diapason."
   GIT_REPOSITORY https://gitlab.orfeo-toolbox.org/remote_modules/diapotb.git
-  GIT_TAG master
+  GIT_TAG d38457a019d2ef15a47d04c21f235c9e9fe4acd5
 )


WITH_TESTING=FALSE

WITH_TESTING=FALSE

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@1895 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/SiconosProject.cmake
+++ Numerics/cmake/SiconosProject.cmake
@@ -55,7 +55,7 @@
   OPTION(WITH_SVN "Consider SVN is online" OFF)
   OPTION(WITH_DEFAULT_BUILD_TYPE "Use a default build type (Release)" ON)
   OPTION(WITH_DOCUMENTATION "Build doxygen documentation with 'make doc'" OFF)
-  OPTION(WITH_TESTING "Enable 'make test' target" ON)
+  OPTION(WITH_TESTING "Enable 'make test' target" OFF)

   # Build type


um: common.cmake update

um: common.cmake update

--- um/common.cmake
+++ um/common.cmake
@@ -1,3 +1,7 @@
+# It's a CMake code snippet I use in all of my CMake projects.
+# It makes targets link the runtime statically by default + strips debug
+# symbols in release builds.
+
 get_directory_property(parent_directory PARENT_DIRECTORY)
 set(is_root_project $<NOT:parent_directory>)

@@ -17,9 +21,13 @@
 set(CMAKE_CXX_EXTENSIONS OFF)

 function(use_static_runtime_msvc target)
-    target_compile_options("${target}" PRIVATE
-        $<$<CONFIG:Debug>:/MTd>
-        $<$<NOT:$<CONFIG:Debug>>:/MT>)
+    get_target_property(target_type "${target}" TYPE)
+    if(target_type STREQUAL INTERFACE_LIBRARY)
+    else()
+        target_compile_options("${target}" PRIVATE
+            $<$<CONFIG:Debug>:/MTd>
+            $<$<NOT:$<CONFIG:Debug>>:/MT>)
+    endif()
 endfunction()

 function(use_static_runtime_gcc target)
@@ -40,8 +48,12 @@
 endfunction()

 function(strip_symbol_table_gcc target)
-    target_link_libraries("${target}" PRIVATE
-        $<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>:-s>)
+    get_target_property(target_type "${target}" TYPE)
+    set(release_build $<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>)
+    if(target_type STREQUAL INTERFACE_LIBRARY)
+    else()
+        target_link_libraries("${target}" PRIVATE $<${release_build}:-s>)
+    endif()
 endfunction()

 function(strip_symbol_table target)
@@ -53,23 +65,26 @@
     endif()
 endfunction()

+function(apply_common_settings target)
+    if(TARGET "${target}")
+        get_target_property(target_imported "${target}" IMPORTED)
+        if(target_imported STREQUAL NOTFOUND OR NOT target_imported)
+            if(STRIP_SYMBOL_TABLE)
+                strip_symbol_table("${target}")
+            endif()
+            if(USE_STATIC_RUNTIME)
+                use_static_runtime("${target}")
+            endif()
+        endif()
+    endif()
+endfunction()
+
 macro(add_executable target)
     _add_executable(${ARGV})
-    if(TARGET "${target}")
-        if(USE_STATIC_RUNTIME)
-            use_static_runtime("${target}")
-        endif()
-        if(STRIP_SYMBOL_TABLE)
-            strip_symbol_table("${target}")
-        endif()
-    endif()
+    apply_common_settings("${target}")
 endmacro()

 macro(add_library target)
     _add_library(${ARGV})
-    if(TARGET "${target}")
-        if(USE_STATIC_RUNTIME)
-            use_static_runtime("${target}")
-        endif()
-    endif()
+    apply_common_settings("${target}")
 endmacro()


BUG: fix c macro for config checking

BUG: fix c macro for config checking

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -50,6 +50,43 @@
   set(GDAL_CONFIG_CHECKING ON CACHE BOOL "Tests to check gdal config." FORCE)
   message(FATAL_ERROR "${m}")
 endmacro(error_message)
+
+#------------------- C version ---------------------
+macro(gdal_try_run_c msg_type var source_file)
+message(STATUS "Performing Test ${var}")
+set(${var})
+try_run(RUN_${var} COMPILE_${var} ${CMAKE_CURRENT_BINARY_DIR}
+${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/${source_file}
+CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}"
+COMPILE_DEFINITIONS "-w"
+COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT_${var}
+RUN_OUTPUT_VARIABLE RUN_OUTPUT_${var}
+ARGS ${ARGN}
+)
+
+if(NOT COMPILE_${var})
+  error_message("Compiling Test ${var} - Failed \n
+COMPILE_OUTPUT_${var}: '${COMPILE_OUTPUT_${var}}'")
+endif()
+if(RUN_${var})
+  set(${var} FALSE)
+  #if msg_type is STATUS (ie "okay" if test is failing),
+  #then we don't need to give an run-output and exit status.
+  if("${msg_type}" STREQUAL "STATUS")
+    message(${msg_type} "Performing Test ${var} - Failed")
+  else()
+    error_message("Performing Test ${var} - Failed \n
+            Exit status: '${RUN_${var}}' \n
+            RUN_OUTPUT_${var}: '${RUN_OUTPUT_${var}}'")
+  endif()
+else()
+  set(${var} TRUE)
+  message(STATUS "Performing Test ${var} - Success")
+endif()
+unset(RUN_OUTPUT_${var})
+unset(COMPILE_OUTPUT_${var})
+unset(COMPILE_${var})
+endmacro()

 #------------------- Helper Macro ---------------------
 macro(gdal_try_run msg_type var source_file)
@@ -64,19 +101,6 @@
 ARGS ${ARGN}
 )

-#------------------- C version ---------------------
-macro(gdal_try_run_c msg_type var source_file)
-message(STATUS "Performing Test ${var}")
-set(${var})
-try_run(RUN_${var} COMPILE_${var} ${CMAKE_CURRENT_BINARY_DIR}
-${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/${source_file}
-CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}"
-COMPILE_DEFINITIONS "-w"
-COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT_${var}
-RUN_OUTPUT_VARIABLE RUN_OUTPUT_${var}
-ARGS ${ARGN}
-)
-
 if(NOT COMPILE_${var})
   error_message("Compiling Test ${var} - Failed \n
 COMPILE_OUTPUT_${var}: '${COMPILE_OUTPUT_${var}}'")


MDEV-5081 - Simple performance improvement for MariaDB

Currently fast mutexes have lower throuput compared to normal mutexes.
Remove them from release build configuration.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -154,9 +154,6 @@
       # libmysqld.so will depend on libaio.so
       SET(LIBMYSQLD_SO_EXTRA_LIBS aio)
     ENDIF()
-
-    # Enable fast mutexes on Linux
-    OPTION(WITH_FAST_MUTEXES "" ON)
   ENDIF()

 ENDIF()


Avoid adding the path to the source dir twice.
There's still a problem, CMAKE_SOURCE_DIR is not passed in properly.

svn path=/trunk/KDE/kdepim/; revision=527465

--- libkcal/ical_file.cmake
+++ libkcal/ical_file.cmake
@@ -36,6 +36,7 @@
 FILE(APPEND ${KDE_FILE_H_FILE} "*/\n")

 foreach (_current_FILE ${COMBINEDHEADERSICAL})
+    MESSAGE( ${CMAKE_SOURCE_DIR})
 	FILE(READ ${_current_FILE} _contents)
     STRING(REGEX REPLACE "#include *\"ical.*\\.h\"" "" _contents "${_contents}" )
     STRING(REGEX REPLACE "#include *\"config.*\\.h\"" "" _contents "${_contents}" )


Added macros for replacing compiler strings

--- build/macros.cmake
+++ build/macros.cmake
@@ -211,6 +211,50 @@
 	set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${_flag}")
 endmacro()

+macro(replace_or_append_compiler_flag _flags_var _regex_str _flag_str)
+	if(${_flags_var} MATCHES ${_regex_str})
+		string(REGEX REPLACE ${_regex_str} ${_flag_str} ${_flags_var} "${${_flags_var}}")
+	else()
+		set(${_flags_var} "${${_flags_var}} ${_flag_str}")
+	endif()
+endmacro()
+
+macro(replace_or_append_debug_flag _regex_str _flag_str)
+	replace_or_append_compiler_flag(CMAKE_CXX_FLAGS_DEBUG ${_regex_str} ${_flag_str})
+	replace_or_append_compiler_flag(CMAKE_C_FLAGS_DEBUG ${_regex_str} ${_flag_str})
+endmacro()
+
+macro(replace_or_append_release_flag _regex_str _flag_str)
+	replace_or_append_compiler_flag(CMAKE_CXX_FLAGS_MINSIZEREL ${_regex_str} ${_flag_str})
+	replace_or_append_compiler_flag(CMAKE_CXX_FLAGS_RELEASE ${_regex_str} ${_flag_str})
+	replace_or_append_compiler_flag(CMAKE_CXX_FLAGS_RELWITHDEBINFO ${_regex_str} ${_flag_str})
+	replace_or_append_compiler_flag(CMAKE_C_FLAGS_MINSIZEREL ${_regex_str} ${_flag_str})
+	replace_or_append_compiler_flag(CMAKE_C_FLAGS_RELEASE ${_regex_str} ${_flag_str})
+	replace_or_append_compiler_flag(CMAKE_C_FLAGS_RELWITHDEBINFO ${_regex_str} ${_flag_str})
+endmacro()
+
+macro(replace_or_append_release_flag_compilers _vc_regex_str _gcc_regex_str _vc_flag_str _gcc_flag_str)
+	get_compiler_name(COMPILER)
+	if(COMPILER MATCHES "vc")
+		replace_or_append_release_flag(${_vc_regex_str} ${_vc_flag_str})
+	elseif(COMPILER MATCHES "gcc")
+		replace_or_append_release_flag(${_gcc_regex_str} ${_gcc_flag_str})
+	else()
+		message(FATAL_ERROR "Error: Only MSVC and GCC supported")
+	endif()
+endmacro()
+
+macro(replace_or_append_debug_flag_compilers _vc_regex_str _gcc_regex_str _vc_flag_str _gcc_flag_str)
+	get_compiler_name(COMPILER)
+	if(COMPILER MATCHES "vc")
+		replace_or_append_debug_flag(${_vc_regex_str} ${_vc_flag_str})
+	elseif(COMPILER MATCHES "gcc")
+		replace_or_append_debug_flag(${_gcc_regex_str} ${_gcc_flag_str})
+	else()
+		message(FATAL_ERROR "Error: Only MSVC and GCC supported")
+	endif()
+endmacro()
+
 macro(enable_fast_floating_point _enable)
 	get_compiler_name(COMPILER)
 	if(${_enable})


STYLE: fixed bug

STYLE: fixed bug

changing one setting in a directory was not affecting sub-directories.

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -417,6 +417,7 @@
     -DTubeTK_USE_SUPERBUILD:BOOL=FALSE
     -DTubeTK_USE_VTK:BOOL=${TubeTK_USE_VTK}
     -DTubeTK_USE_KWSTYLE:BOOL=${TubeTK_USE_KWSTYLE}
+    -DKWSTYLE_DASHBOARD_SUBMISSION:BOOL=${KWSTYLE_DASHBOARD_SUBMISSION}
     -DTubeTK_USE_CTK:BOOL=${TubeTK_USE_CTK}
     -DTubeTK_USE_QT:BOOL=${TubeTK_USE_QT}
     -DTubeTK_USE_ITKV4:BOOL=${TubeTK_USE_ITKV4}
@@ -457,6 +458,7 @@
     -DTubeTK_USE_SUPERBUILD:BOOL=FALSE
     -DTubeTK_USE_VTK:BOOL=${TubeTK_USE_VTK}
     -DTubeTK_USE_KWSTYLE:BOOL=${TubeTK_USE_KWSTYLE}
+    -DKWSTYLE_DASHBOARD_SUBMISSION:BOOL=${KWSTYLE_DASHBOARD_SUBMISSION}
     -DTubeTK_USE_CTK:BOOL=${TubeTK_USE_CTK}
     -DTubeTK_USE_QT:BOOL=${TubeTK_USE_QT}
     -DTubeTK_USE_ITKV4:BOOL=${TubeTK_USE_ITKV4}


Be more helpful finding boost when you're building against a build tree.

--- osvrConfigBuildTreePaths.cmake
+++ osvrConfigBuildTreePaths.cmake
@@ -14,4 +14,9 @@
 set(OpenCV_DIR_IMPORTED "@OpenCV_DIR@")
 if(OpenCV_DIR_IMPORTED AND NOT OPENCV_FOUND)
     list(APPEND CMAKE_PREFIX_PATH "${OpenCV_DIR_IMPORTED}")
+endif()
+
+# Help out with boost.
+if(NOT BOOST_FOUND)
+    include("@CMAKE_CURRENT_SOURCE_DIR@/CMakeBoostHelper.cmake")
 endif()


cmake: clean macro() calls in Reaper.cmake

Prefer function() where that makes sense.

--- cmake/Reaper.cmake
+++ cmake/Reaper.cmake
@@ -31,7 +31,7 @@
 set(REAPER_GENERATED_BY_CMAKE_MSG "Generated by CMake")

 # Sort sources in folders for visual studio
-macro(reaper_fill_vs_source_tree target root)
+function(reaper_fill_vs_source_tree target root)
     get_target_property(SOURCE_FILES ${target} SOURCES)
     get_target_property(SOURCE_FILES_DEPS ${target} INTERFACE_SOURCES)
     list(APPEND SOURCE_FILES ${SOURCE_FILES_DEPS})
@@ -45,10 +45,10 @@
             source_group(TREE ${CMAKE_SOURCE_DIR} PREFIX "Other" FILES ${FILE})
         endif()
     endforeach()
-endmacro()
+endfunction()

 # Automatically generate the header used for exporting/importing symbols
-macro(reaper_generate_export_header target project_label)
+function(reaper_generate_export_header target project_label)
     # Construct export macro name
     string(TOUPPER ${target} TARGET_UPPERCASE)
     set(LIBRARY_API_MACRO ${TARGET_UPPERCASE}_API)
@@ -61,10 +61,10 @@
     set(REAPER_EXPORT_TEMPLATE_PATH ${CMAKE_SOURCE_DIR}/src/LibraryExport.h.in)
     set(LIBRARY_GENERATED_EXPORT_HEADER_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${project_label}Export.h)
     configure_file(${REAPER_EXPORT_TEMPLATE_PATH} ${LIBRARY_GENERATED_EXPORT_HEADER_PATH} NEWLINE_STYLE UNIX @ONLY)
-endmacro()
-
-# Helper macro that add default compilation flags for reaper targets
-macro(reaper_configure_warnings target enabled)
+endfunction()
+
+# Helper function that add default compilation flags for reaper targets
+function(reaper_configure_warnings target enabled)
     if(${enabled})
         if(MSVC)
             target_compile_options(${target} PRIVATE "$<$<CONFIG:DEBUG>:${REAPER_MSVC_DEBUG_FLAGS}>")
@@ -84,12 +84,12 @@
             target_compile_options(${target} PRIVATE "$<$<CONFIG:RELEASE>:${REAPER_MSVC_DISABLE_WARNINGS}>")
         endif()
     endif()
-endmacro()
-
-# Common helper macro that sets relevant C++ warnings and compilation flags
-# see below for specific versions of the macro.
-# NOTE: call this macro AFTER target_sources() calls
-macro(reaper_configure_target_common target project_label)
+endfunction()
+
+# Common helper that sets relevant C++ warnings and compilation flags
+# see below for specific versions of the function.
+# NOTE: call this function AFTER target_sources() calls
+function(reaper_configure_target_common target project_label)
     target_include_directories(${target} PUBLIC ${CMAKE_SOURCE_DIR}/src)
     target_compile_definitions(${target} PRIVATE REAPER_BUILD_${REAPER_BUILD_TYPE})
     if(MSVC)
@@ -110,10 +110,10 @@
     else()
         message(FATAL_ERROR "Could not detect compiler")
     endif()
-endmacro()
+endfunction()

 # Append coverage compilation flags for the specified target
-macro(reaper_configure_coverage target)
+function(reaper_configure_coverage target)
     if(REAPER_BUILD_COVERAGE_INFO)
         # Sanity checks
         if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -123,40 +123,41 @@
         if(MSVC)
             message(FATAL_ERROR "Coverage is not supported for msvc")
         elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-            target_link_libraries(${target} PRIVATE -lgcov)
+            # Set link flags
+            target_link_libraries(${target} PRIVATE --coverage)
+            # Set compile flags
             target_compile_options(${target} PRIVATE
-                "-fprofile-arcs"
-                "-ftest-coverage"
+                "--coverage"                # Enable coverage info generation
                 "-O0"                       # Disable optimizations
                 "-fno-elide-constructors"   # Inhibit inlining as much as possible
             )
         endif()
     endif()
-endmacro()
-
-# Use this macro for engine libraries
-macro(reaper_configure_library target project_label)
+endfunction()
+
+# Use this function for engine libraries
+function(reaper_configure_library target project_label)
     reaper_configure_target_common(${target} ${project_label})
     reaper_configure_warnings(${target} ON)
     reaper_configure_coverage(${target})
     reaper_generate_export_header(${target} ${project_label})
-endmacro()
-
-# Use this macro for executables
-macro(reaper_configure_executable target project_label)
+endfunction()
+
+# Use this function for executables
+function(reaper_configure_executable target project_label)
     reaper_configure_target_common(${target} ${project_label})
     reaper_configure_coverage(${target})
     reaper_configure_warnings(${target} ON)
-endmacro()
-
-# Use this macro for external dependencies
-macro(reaper_configure_external_target target project_label)
+endfunction()
+
+# Use this function for external dependencies
+function(reaper_configure_external_target target project_label)
     reaper_configure_target_common(${target} ${project_label})
     reaper_configure_warnings(${target} OFF)
-endmacro()
-
-# Reaper standard test macro
-macro(reaper_add_tests library testfiles)
+endfunction()
+
+# Reaper standard test helper
+function(reaper_add_tests library testfiles)
     if(REAPER_BUILD_TESTS)
         set(REAPER_TEST_FILES ${testfiles} ${ARGN}) # Expecting a list here
         set(REAPER_TEST_BIN ${library}_tests)
@@ -176,7 +177,7 @@
         set_target_properties(${REAPER_TEST_BIN} PROPERTIES FOLDER Test)
         set_target_properties(${REAPER_TEST_BIN} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
     endif()
-endmacro()
+endfunction()

 # Install and update git hooks
 function(reaper_setup_git_hooks)


Ignore modernize-make-shared from clang tidy settings.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -145,6 +145,7 @@
       ${_NO_CPPCOREGUIDELINES_PRO_TYPE_VARARG}
       -cppcoreguidelines-slicing
       -cppcoreguidelines-special-member-functions
+      -modernize-make-shared
       fuchsia-*
       -fuchsia-default-arguments
       -fuchsia-default-arguments-calls


ENH: Turn on KWStyle, CPPCheck, and Valgrind (MEMCHECK)

--- MicroTumorLinux1_Amazon_TubeTK.cmake
+++ MicroTumorLinux1_Amazon_TubeTK.cmake
@@ -164,9 +164,9 @@

 set( SITE_NIGHTLY_BUILD ON )
 set( SITE_NIGHTLY_TEST ON )
-set( SITE_NIGHTLY_CPPCHECK OFF )
-set( SITE_NIGHTLY_KWSTYLE OFF )
-set( SITE_NIGHTLY_COVERAGE OFF )
+set( SITE_NIGHTLY_CPPCHECK ON )
+set( SITE_NIGHTLY_KWSTYLE ON )
+set( SITE_NIGHTLY_COVERAGE ON )
 set( SITE_NIGHTLY_MEMORY ON )
 set( SITE_NIGHTLY_BUILD_DOCUMENTATION OFF )
 set( SITE_NIGHTLY_PACKAGE ON )


Revert "CI: add testing step and remove OTB_DATA_ROOT"

This reverts commit e60d91f5d6973e53a09fbaa9c581b528eb921f05.

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -39,7 +39,7 @@
 set (CMAKE_COMMAND "cmake")

 # Data directory setting
-# set (OTB_DATA_ROOT "${OTB_SOURCE_DIR}/otb-data/") # todo
+set (OTB_DATA_ROOT "${OTB_SOURCE_DIR}/otb-data/") # todo
 set (OTB_LARGEINPUT_ROOT "") # todo

@@ -74,6 +74,6 @@
   message( SEND_ERROR "An error occurs during ctest_build.")
 endif()

-ctest_test(PARALLEL_LEVEL 8)
+# ctest_test(PARALLEL_LEVEL 8)

 ctest_submit()


Fix CMake syntax error

Fix CMake syntax error

--- CMake/zlib.cmake
+++ CMake/zlib.cmake
@@ -118,7 +118,7 @@
 	set(ZLIB_SRCS ${ZLIB_SRCS}
 		win32/zlib1.rc # If present will override custom build rule below.s
 	)
-ENDIF
+ENDIF()

 # parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
 file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)


ChibiOS support for F1 family.

ChibiOS support for F1 family.

--- cmake/Modules/FindChibiOS.cmake
+++ cmake/Modules/FindChibiOS.cmake
@@ -175,23 +175,6 @@
         STM32/OTGv1
     )

-    SET(INDEX 0)
-    FOREACH(module ${CHIBIOS_HAL_LLD_MODULES})
-        LIST(GET CHIBIOS_HAL_PLATFORM_MODULE_PATHES ${INDEX} path)
-
-        SET(CHIBIOS_${module}_PLATFORM_SEARCH_PATH ${CHIBIOS_ROOT}/os/hal/platforms/${path})
-        SET(CHIBIOS_${module}_PLATFORM_SEARCH_HEADERS ${module}_lld.h)
-        SET(CHIBIOS_${module}_PLATFORM_SOURCES ${module}_lld.c)
-
-        IF(${module} STREQUAL ext)
-           SET(CHIBIOS_${module}_PLATFORM_SEARCH_HEADERS ${CHIBIOS_ext_PLATFORM_SEARCH_HEADERS} ext_lld_isr.h)
-           SET(CHIBIOS_${module}_PLATFORM_SEARCH_PATH ${CHIBIOS_ext_PLATFORM_SEARCH_PATH} ${CHIBIOS_ROOT}/os/hal/platforms/STM32F4xx)
-           SET(CHIBIOS_${module}_PLATFORM_SOURCES ${CHIBIOS_ext_PLATFORM_SOURCES} ext_lld_isr.c)
-        ENDIF()
-
-        MATH(EXPR INDEX "${INDEX} + 1")
-    ENDFOREACH()
-
     IF(NOT ChibiOS_LINKER_SCRIPT)
         IF(NOT STM32_CHIP_TYPE)
             STM32_GET_CHIP_TYPE(${STM32_CHIP} STM32_CHIP_TYPE)
@@ -213,7 +196,105 @@
             MESSAGE(STATUS "ChibiOS doesn't have linker script for your chip, please specify it directly using ChibiOS_LINKER_SCRIPT variable.")
         ENDIF()
     ENDIF()
+
+    SET(CHIBIOS_${module}_PLATFORM_SEARCH_PATH ${CHIBIOS_ext_PLATFORM_SEARCH_PATH} ${CHIBIOS_ROOT}/os/hal/platforms/STM32F4xx)
+
+ELSEIF(STM32_FAMILY STREQUAL "F1")
+
+    SET(CHIBIOS_kernel_PLATFORM_SEARCH_PATH
+        ${CHIBIOS_ROOT}/os/ports/common/ARMCMx/CMSIS/include
+        ${CHIBIOS_ROOT}/os/ports/GCC/ARMCMx/STM32F1xx
+    )
+    SET(CHIBIOS_kernel_PLATFORM_SOURCES
+        vectors.c
+    )
+    SET(CHIBIOS_kernel_PLATFORM_SEARCH_HEADERS
+        core_cm3.h
+        cmparams.h
+    )
+
+    SET(CHIBIOS_hal_PLATFORM_SEARCH_PATH
+        ${CHIBIOS_ROOT}/os/hal/platforms/STM32F1xx
+        ${CHIBIOS_ROOT}/os/hal/platforms/STM32
+    )
+    SET(CHIBIOS_hal_PLATFORM_SEARCH_HEADERS
+        hal_lld.h
+        stm32.h
+        stm32f10x.h
+    )
+    SET(CHIBIOS_hal_PLATFORM_SOURCES
+        hal_lld.c
+        stm32_dma.c
+    )
+
+    SET(CHIBIOS_HAL_PLATFORM_MODULE_PATHES
+        STM32F1xx
+        STM32
+        STM32
+        STM32/TIMv1
+        STM32/I2Cv1
+        STM32/TIMv1
+        STM32
+        STM32/GPIOv1
+        STM32/TIMv1
+        STM32/RTCv1
+        STM32
+        STM32/USARTv1
+        STM32/SPIv1
+        STM32/USARTv1
+        STM32/USBv1
+    )
+
+    IF(NOT ChibiOS_LINKER_SCRIPT)
+        IF(NOT STM32_CHIP_TYPE)
+            STM32_GET_CHIP_TYPE(${STM32_CHIP} STM32_CHIP_TYPE)
+        ENDIF()
+        IF(NOT STM32_FLASH_SIZE)
+            STM32_GET_CHIP_PARAMETERS(${STM32_CHIP} STM32_FLASH_SIZE STM32_RAM_SIZE)
+        ENDIF()
+        IF(${STM32_CHIP_TYPE} STREQUAL MD_VL)
+            IF(${STM32_FLASH_SIZE} STREQUAL 128K)
+                FIND_FILE(ChibiOS_LINKER_SCRIPT NAMES STM32F100xB.ld PATHS ${CHIBIOS_ROOT}/os/ports/GCC/ARMCMx/STM32F1xx/ld NO_DEFAULT_PATH CMAKE_FIND_ROOT_PATH_BOTH)
+            ENDIF()
+        ELSEIF(${STM32_CHIP_TYPE} STREQUAL MD)
+            IF(${STM32_FLASH_SIZE} STREQUAL 128K)
+                FIND_FILE(ChibiOS_LINKER_SCRIPT NAMES STM32F103xB.ld PATHS ${CHIBIOS_ROOT}/os/ports/GCC/ARMCMx/STM32F1xx/ld NO_DEFAULT_PATH CMAKE_FIND_ROOT_PATH_BOTH)
+            ENDIF()
+        ELSEIF(${STM32_CHIP_TYPE} STREQUAL HD)
+            IF(${STM32_FLASH_SIZE} STREQUAL 384K)
+                FIND_FILE(ChibiOS_LINKER_SCRIPT NAMES STM32F103xD.ld PATHS ${CHIBIOS_ROOT}/os/ports/GCC/ARMCMx/STM32F1xx/ld NO_DEFAULT_PATH CMAKE_FIND_ROOT_PATH_BOTH)
+            ELSEIF(${STM32_FLASH_SIZE} STREQUAL 512K)
+                FIND_FILE(ChibiOS_LINKER_SCRIPT NAMES STM32F103xE.ld PATHS ${CHIBIOS_ROOT}/os/ports/GCC/ARMCMx/STM32F1xx/ld NO_DEFAULT_PATH CMAKE_FIND_ROOT_PATH_BOTH)
+            ENDIF()
+        ELSEIF(${STM32_CHIP_TYPE} STREQUAL XL)
+            IF(${STM32_FLASH_SIZE} STREQUAL 1024K)
+                FIND_FILE(ChibiOS_LINKER_SCRIPT NAMES STM32F103xG.ld PATHS ${CHIBIOS_ROOT}/os/ports/GCC/ARMCMx/STM32F1xx/ld NO_DEFAULT_PATH CMAKE_FIND_ROOT_PATH_BOTH)
+            ENDIF()
+        ENDIF()
+    ENDIF()
+
+    SET(CHIBIOS_${module}_PLATFORM_SEARCH_PATH ${CHIBIOS_ext_PLATFORM_SEARCH_PATH} ${CHIBIOS_ROOT}/os/hal/platforms/STM32F1xx)
 ENDIF()
+
+IF(NOT ChibiOS_LINKER_SCRIPT)
+    MESSAGE(STATUS "ChibiOS doesn't have linker script for your chip, please specify it directly using ChibiOS_LINKER_SCRIPT variable.")
+ENDIF()
+
+SET(INDEX 0)
+FOREACH(module ${CHIBIOS_HAL_LLD_MODULES})
+    LIST(GET CHIBIOS_HAL_PLATFORM_MODULE_PATHES ${INDEX} path)
+
+    SET(CHIBIOS_${module}_PLATFORM_SEARCH_PATH ${CHIBIOS_ROOT}/os/hal/platforms/${path})
+    SET(CHIBIOS_${module}_PLATFORM_SEARCH_HEADERS ${module}_lld.h)
+    SET(CHIBIOS_${module}_PLATFORM_SOURCES ${module}_lld.c)
+
+    IF(${module} STREQUAL ext)
+       SET(CHIBIOS_${module}_PLATFORM_SEARCH_HEADERS ${CHIBIOS_ext_PLATFORM_SEARCH_HEADERS} ext_lld_isr.h)
+       SET(CHIBIOS_${module}_PLATFORM_SOURCES ${CHIBIOS_ext_PLATFORM_SOURCES} ext_lld_isr.c)
+    ENDIF()
+
+    MATH(EXPR INDEX "${INDEX} + 1")
+ENDFOREACH()

 FOREACH(comp ${ChibiOS_FIND_COMPONENTS})
     LIST(FIND CHIBIOS_COMPONENTS ${comp} INDEX)


STRING REGEX REPLACE fix

STRING REGEX REPLACE fix

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -31,7 +31,7 @@
       IF ("${CMAKE_HOST_SYSTEM}" MATCHES ".*Windows.*")
         STRING(REGEX REPLACE "/" "\\\\"  _dependLibraryRuntimeDirectory "${_dependLibraryRuntimeDirectory}")
       ELSE ()
-        STRING(REGEX REPLACE " " "\\ "  _dependLibraryRuntimeDirectory "${_dependLibraryRuntimeDirectory}")
+        STRING(REGEX REPLACE " " "\\\\ "  _dependLibraryRuntimeDirectory "${_dependLibraryRuntimeDirectory}")
       ENDIF ()
       SET(${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_dependLibraryRuntimeDirectory}" CACHE INTERNAL "${dependTarget} Runtime Directory")
       IF (NOT TEST_PATH)


fixing the security warning on blingfire. (#209)

--- cmake/externals/blingfire.cmake
+++ cmake/externals/blingfire.cmake
@@ -12,4 +12,12 @@

     # enable size optimization build
     add_subdirectory(${blingfire_SOURCE_DIR} ${blingfire_BINARY_DIR} EXCLUDE_FROM_ALL)
-endif ()
+    # we don't use any Python code from Blingfire codebase
+    set(NO_USE_FILE ${blingfire_SOURCE_DIR}/scripts/requirements.txt)
+    file(TO_NATIVE_PATH ${NO_USE_FILE} NO_USE_FILE)
+    if (CMAKE_SYSTEM_NAME MATCHES "Windows")
+        execute_process(COMMAND cmd /c "del ${NO_USE_FILE}")
+    else()
+        execute_process(COMMAND bash -c "rm ${NO_USE_FILE}")
+    endif()
+endif()