Fix typo in halide.cmake

Fix typo in halide.cmake

Typo prevents the usage of non-make generators, like ninja.

Former-commit-id: d4a37182ca692cf7626e06b6ce7c1604e288ff1e [formerly 89ead45ec3a921c6781ea2eb8121fa53ee00bc47]
Former-commit-id: 28b8220fc09d82f56f95ddffc34f53797acb84cd

--- halide.cmake
+++ halide.cmake
@@ -274,7 +274,7 @@

   # BASENAME.run simply runs the BASENAME.rungen target
   add_custom_target("${BASENAME}.run"
-                    COMMAND "${RUNGEN}" "$(RUNARGS)"
+                    COMMAND "${RUNGEN}" "${RUNARGS}"
                     DEPENDS "${RUNGEN}")
   set_target_properties("${BASENAME}.run" PROPERTIES EXCLUDE_FROM_ALL TRUE)
 endfunction()


Corrected bug in a build script (found by Dario Nunes, thanks !).

git-svn-id: a49aa41e49c69a6ab6ef43f172843a2fef6cb475@431 7c7d615a-03b3-410d-a316-1135b1bd9499

--- centreon-broker/build/CMake/SOCIPostgreSQLConfig.cmake
+++ centreon-broker/build/CMake/SOCIPostgreSQLConfig.cmake
@@ -53,7 +53,7 @@
     PATH_SUFFIXES ${CHECK_SUFFIXES}
     NO_DEFAULT_PATH)
 else ()
-  find_path(SOCI_POSTGRESQL_INCLUDE_DIR
+  find_path(SOCIPOSTGRESQL_INCLUDE_DIR
     NAMES ${CHECK_HEADERS}
     PATHS ${SOCI_INCLUDE_DIR}
     PATH_SUFFIXES ${CHECK_SUFFIXES})


Fix Clang 7.0.1 build.

Fix Clang 7.0.1 build.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -729,6 +729,11 @@
             # When ccache support is on, these flags keep the color diagnostics pipe through ccache output and suppress Clang warning due ccache internal preprocessing step
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
+        endif ()
+        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0)
+            # Workaround for Clang 7.0 and above until the Bullet upstream has fixed the Clang 7 diagnostic checks issue (see https://github.com/bulletphysics/bullet3/issues/2114)
+            set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-argument-outside-range")
+            set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-argument-outside-range")
         endif ()
     else ()
         # GCC-specific


COMP: change ACDV cmake version to 2.8.5

--- CMakeExternals/PatchACVD.cmake
+++ CMakeExternals/PatchACVD.cmake
@@ -38,6 +38,14 @@
 set(CONTENTS ${contents})
 configure_file(${TEMPLATE_FILE} ${path} @ONLY)

+# Change required CMake version
+
+set(path "CMakeLists.txt")
+file(STRINGS ${path} contents NEWLINE_CONSUME)
+string(REPLACE "2.8.7" "2.8.5" contents ${contents})
+set(CONTENTS ${contents})
+configure_file(${TEMPLATE_FILE} ${path} @ONLY)
+
 # Replace int by vtkIdType, which are types of different size (x64)

 set(path "DiscreteRemeshing/vtkVerticesProcessing.h")


Improve boost 1.50 and 1.51 checks. And mark the GL ES 1 render system as deprecated.

--HG--
branch : v1-8

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -90,9 +90,9 @@
 find_package(OpenGL)
 macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render system" "http://www.opengl.org/" FALSE "" "")

-# Find OpenGL ES
+# Find OpenGL ES 1.x
 find_package(OpenGLES)
-macro_log_feature(OPENGLES_FOUND "OpenGL ES 1.x" "Support for the OpenGL ES 1.x render system" "http://www.khronos.org/opengles/" FALSE "" "")
+macro_log_feature(OPENGLES_FOUND "OpenGL ES 1.x" "Support for the OpenGL ES 1.x render system (DEPRECATED)" "http://www.khronos.org/opengles/" FALSE "" "")

 # Find OpenGL ES 2.x
 find_package(OpenGLES2)
@@ -125,24 +125,31 @@
 if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
 	set(Boost_COMPILER "-xgcc42")
 endif()
-set(Boost_ADDITIONAL_VERSIONS "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
+set(Boost_ADDITIONAL_VERSIONS "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
 # Components that need linking (NB does not include header-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
-find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
-if (NOT Boost_FOUND)
-	# Try again with the other type of libs
+find_package(Boost QUIET)
+if (Boost_FOUND)
 	if(Boost_USE_STATIC_LIBS)
 		set(Boost_USE_STATIC_LIBS OFF)
 	else()
 		set(Boost_USE_STATIC_LIBS ON)
 	endif()
+
+    if(Boost_VERSION GREATER 104900)
+        set(OGRE_BOOST_COMPONENTS thread date_time system chrono)
+    endif()
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()
-find_package(Boost QUIET)
+
 # Optional Boost libs (Boost_${COMPONENT}_FOUND
 macro_log_feature(Boost_FOUND "boost" "Boost (general)" "http://boost.org" FALSE "" "")
 macro_log_feature(Boost_THREAD_FOUND "boost-thread" "Used for threading support" "http://boost.org" FALSE "" "")
 macro_log_feature(Boost_DATE_TIME_FOUND "boost-date_time" "Used for threading support" "http://boost.org" FALSE "" "")
+if(Boost_VERSION GREATER 104900)
+    macro_log_feature(Boost_SYSTEM_FOUND "boost-system" "Used for threading support" "http://boost.org" FALSE "" "")
+    macro_log_feature(Boost_CHRONO_FOUND "boost-chrono" "Used for threading support" "http://boost.org" FALSE "" "")
+endif()

 # POCO
 find_package(POCO)


Add new search path for OpenGL libraries on Ubuntu 11.10

--HG--
branch : v1-8

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -50,6 +50,8 @@
 # Set hardcoded path guesses for various platforms
 if (UNIX AND NOT OGRE_BUILD_PLATFORM_TEGRA2)
   set(OGRE_DEP_SEARCH_PATH ${OGRE_DEP_SEARCH_PATH} /usr/local)
+  # Ubuntu 11.10 has an inconvenient path to OpenGL libraries
+  set(OGRE_DEP_SEARCH_PATH ${OGRE_DEP_SEARCH_PATH} /usr/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu)
 endif ()

 if(OGRE_BUILD_PLATFORM_TEGRA2)


Use execute_process to invoke chmod from cmake (#874) (#875)

--- Tensile/Source/TensileCreateLibrary.cmake
+++ Tensile/Source/TensileCreateLibrary.cmake
@@ -50,8 +50,10 @@
   message(STATUS "Tensile_COMPILER            from TensileCreateLibraryCmake : ${Tensile_COMPILER}")
   message(STATUS "Tensile_ARCHITECTURE        from TensileCreateLibraryCmake : ${Tensile_ARCHITECTURE}")

+  execute_process(COMMAND chmod 755 ${Tensile_ROOT}/bin/TensileCreateLibrary)
+  execute_process(COMMAND chmod 755 ${Tensile_ROOT}/bin/Tensile)
+
   set(Tensile_CREATE_COMMAND "${Tensile_ROOT}/bin/TensileCreateLibrary")
-

   set(Tensile_SOURCE_PATH "${PROJECT_BINARY_DIR}/Tensile")
   message(STATUS "Tensile_SOURCE_PATH=${Tensile_SOURCE_PATH}")


cmake: binutils: find binutils nm for host compiler

We need this to generate symbols from final binary.

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

--- cmake/bintools/host-gnu/target.cmake
+++ cmake/bintools/host-gnu/target.cmake
@@ -7,6 +7,7 @@
 find_program(CMAKE_AR      ar     )
 find_program(CMAKE_RANLIB  ranlib )
 find_program(CMAKE_READELF readelf)
+find_program(CMAKE_NM      nm)

 find_program(CMAKE_GDB     gdb    )


Update FindTelepathyQt4.cmake from kde-telepathy.

--- cmake/modules/FindTelepathyQt4.cmake
+++ cmake/modules/FindTelepathyQt4.cmake
@@ -1,28 +1,43 @@
-# Try to find the Qt binding of the Telepathy library
-# TELEPATHY_QT_FOUND - system has Telepathy-Qt
-# TELEPATHY_QT_INCLUDE_DIR - the Telepathy-Qt include directory
-# TELEPATHY_QT_LIBRARIES - Link these to use Telepathy-Qt
+# Try to find the Qt4 binding of the Telepathy library
+# TELEPATHY_QT4_FOUND - system has TelepathyQt4
+# TELEPATHY_QT4_INCLUDE_DIR - the TelepathyQt4 include directory
+# TELEPATHY_QT4_LIBRARIES - Link these to use TelepathyQt4

 # Copyright (c) 2008, Allen Winter <winter@kde.org>
+# Copyright (c) 2009, Andre Moreira Magalhaes <andrunko@gmail.com>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-set (TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
-if (TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
+set(TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
+if(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
   # Already in cache, be silent
-  set (TELEPATHY_QT4_FIND_QUIETLY TRUE)
-endif (TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
+  set(TELEPATHY_QT4_FIND_QUIETLY TRUE)
+endif(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)

-find_path (TELEPATHY_QT4_INCLUDE_DIR
-          NAMES TelepathyQt4/Client/Channel TelepathyQt4/Client/Connection TelepathyQt4/Types
-          PATHS ${CMAKE_INSTALL_PREFIX}/include/telepathy-1.0
-)
-find_library (TELEPATHY_QT4_LIBRARIES
-             NAMES telepathy-qt4
-             PATHS ${CMAKE_INSTALL_PREFIX}/lib
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+    if (TelepathyQt4_FIND_VERSION_EXACT)
+        pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4=${TelepathyQt4_FIND_VERSION})
+    else (TelepathyQt4_FIND_VERSION_EXACT)
+        pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=${TelepathyQt4_FIND_VERSION})
+    endif (TelepathyQt4_FIND_VERSION_EXACT)
+endif(PKG_CONFIG_FOUND)
+
+find_path(TELEPATHY_QT4_INCLUDE_DIR
+          NAMES TelepathyQt4/Types
+          HINTS
+          ${PC_TELEPATHY_QT4_INCLUDEDIR}
+          ${PC_TELEPATHY_QT4_INCLUDE_DIRS}
 )

-include (FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS (TELEPATHY_QT4 DEFAULT_MSG
-                                   TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)
+find_library(TELEPATHY_QT4_LIBRARIES
+             NAMES telepathy-qt4
+             HINTS
+             ${PC_TELEPATHY_QT4_LIBDIR}
+             ${PC_TELEPATHY_QT4_LIBRARY_DIRS}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(TELEPATHY_QT4 DEFAULT_MSG
+                                  TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)


Add support for LOCAL_LLVM_DIR (#1580)

Add support for LOCAL_LLVM_DIR (#1580)

--- cmake/third_party/llvm-project.cmake
+++ cmake/third_party/llvm-project.cmake
@@ -1,9 +1,3 @@
-FetchContent_Declare(
-  llvm-project
-  URL      https://github.com/plaidml/llvm-project/archive/182eb478559f27191b7373616f30a608065aaaa3.tar.gz
-  URL_HASH SHA256=606ce4fae35c72b951f31402741403d568287933712db5ae4e735e51b00bab46
-)
-
 set(LLVM_APPEND_VC_REV OFF CACHE BOOL "" FORCE)
 set(LLVM_ENABLE_IDE OFF CACHE BOOL "" FORCE)
 set(LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "" FORCE)
@@ -19,14 +13,26 @@
 set(OPENMP_ENABLE_OMPT_TOOLS OFF CACHE BOOL "" FORCE)
 set(OPENMP_STANDALONE_BUILD ON CACHE BOOL "" FORCE)

-FetchContent_GetProperties(llvm-project)
-if(NOT llvm-project_POPULATED)
-  FetchContent_Populate(llvm-project)
-  set(LLVM_SOURCE_DIR ${llvm-project_SOURCE_DIR})
-  set(LLVM_BINARY_DIR ${llvm-project_BINARY_DIR})
+message("LOCAL_LLVM_DIR: ${LOCAL_LLVM_DIR}")
+
+if(LOCAL_LLVM_DIR)
+  set(LLVM_SOURCE_DIR ${LOCAL_LLVM_DIR})
+  set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR}/_deps/llvm-project-build)
   add_subdirectory(${LLVM_SOURCE_DIR}/llvm ${LLVM_BINARY_DIR} EXCLUDE_FROM_ALL)
+else()
+  FetchContent_Declare(
+    llvm-project
+    URL      https://github.com/plaidml/llvm-project/archive/182eb478559f27191b7373616f30a608065aaaa3.tar.gz
+    URL_HASH SHA256=606ce4fae35c72b951f31402741403d568287933712db5ae4e735e51b00bab46
+  )
+  FetchContent_GetProperties(llvm-project)
+  if(NOT llvm-project_POPULATED)
+    FetchContent_Populate(llvm-project)
+    set(LLVM_SOURCE_DIR ${llvm-project_SOURCE_DIR})
+    set(LLVM_BINARY_DIR ${llvm-project_BINARY_DIR})
+    add_subdirectory(${LLVM_SOURCE_DIR}/llvm ${LLVM_BINARY_DIR} EXCLUDE_FROM_ALL)
+  endif()
 endif()
-

 list(APPEND LLVM_INCLUDE_DIRS
   ${LLVM_SOURCE_DIR}/llvm/include


Perform style checks post-build

Perform style checks post-build

--- VeraPPUtilities.cmake
+++ VeraPPUtilities.cmake
@@ -293,7 +293,7 @@
     # just refers to the list name and not the list itself
     foreach (_source ${${SOURCES_VAR}})
         add_custom_command (TARGET ${TARGET}
-                            PRE_BUILD
+                            POST_BUILD
                             COMMAND
                             ${VERAPP_EXECUTABLE}
                             ARGS


Fix MUnit error parsing

Fix MUnit error parsing

Fix the CommonFunctions.cmake code that parses the MUnit output for error
reporting.  It assumed that the all MUnit routines would start with ZZUT which
is not the case.

Remove the "ZZUT" from the regex matches while changing the failure
message line to check for the captured routine_name.

Add comments to describe each if statment.

OSEHRA-Id: http://issues.osehra.org/browse/OAT-112
Change-Id: I1f71123b83825e6e47bc7659be42936409671393

--- CMake/CommonFunctions.cmake
+++ CMake/CommonFunctions.cmake
@@ -75,15 +75,20 @@
 # Define a function for parsing and reporting munit output results
 function(ReportUnitTestResult PACKAGE_NAME DIRNAME OUTPUT)
    set(test_passed TRUE)
+   set(routine_name "NONE")
    foreach (line ${OUTPUT})
-     if(line MATCHES "^[^\\^]+>D \\^ZZUT[A-Z0-9]+")
-       string(REGEX MATCH "ZZUT[A-Z0-9]+$" routine_name "${line}")
-     elseif(line MATCHES "^ ?[^\\^]+\\^ZZUT[A-Z0-9]+")
+     # Matches the command that runs the test, keeps the routine name
+     if(line MATCHES ">D \\^[A-Z0-9]+")
+       string(REGEX MATCH "[A-Z0-9]+$" routine_name "${line}")
+     # Captures and prints the failure message
+     elseif(line MATCHES "^ ?[^\\^]+\\^${routine_name}+")
        message("${routine_name}: ${line}")
        set(test_passed FALSE)
+     # Matches the first part of the results line, checking for test failures
      elseif(line MATCHES "^ ?Checked.*, with [1-9]+ failure")
        message("${routine_name} in package ${PACKAGE_NAME}:\n${line}")
        set(test_passed FALSE)
+     # Matches the second part of the results line, checking for errors
      elseif(line MATCHES "encountered [1-9]+ error")
        message("M Error(s) encountered in ${routine_name} in package ${PACKAGE_NAME}")
        set(test_passed FALSE)


Removed commented out lines

Removed commented out lines

--- CMakeModules/FindWasm.cmake
+++ CMakeModules/FindWasm.cmake
@@ -2,8 +2,6 @@

 # TODO: Check if compiler is able to generate wasm32
 if ("${WASM_ROOT}" STREQUAL "")
-   #   if (NOT "$ENV{WASM_ROOT}" STREQUAL "")
-   #   set( WASM_ROOT $ENV{WASM_ROOT} )
    if (APPLE)
       set( WASM_ROOT "/usr/local/wasm" )
    elseif (UNIX AND NOT APPLE)


COMP temporarily deactivating tests

COMP temporarily deactivating tests

--- Modules/Segmentation/Testing/files.cmake
+++ Modules/Segmentation/Testing/files.cmake
@@ -1,7 +1,7 @@
 set(MODULE_TESTS
   mitkContourMapper2DTest.cpp
   mitkContourTest.cpp
-  mitkContourModelSetToImageFilterTest.cpp
+#  mitkContourModelSetToImageFilterTest.cpp
   mitkDataNodeSegmentationTest.cpp
   mitkImageToContourFilterTest.cpp
 #  mitkSegmentationInterpolationTest.cpp


Bugfix: Disable -Wa,--compress-debug-sections on MinGW as well

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

--- deal.II/cmake/checks/check_for_compiler_features.cmake
+++ deal.II/cmake/checks/check_for_compiler_features.cmake
@@ -294,7 +294,8 @@
 #
 # - Matthias Maier, rewritten 2012
 #
-IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+IF( (NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN") AND
+    (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") )
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-Wa,--compress-debug-sections")
   ENABLE_IF_SUPPORTED(DEAL_II_C_FLAGS_DEBUG "-Wa,--compress-debug-sections")
 ENDIF()


[zephyr] Fix zephyr compilation flag retrieval (#4422)

We have a mechanism to obtain Zephyr compilation flags,
so that we can pass some of them (like include paths etc.)
to CHIP build system. The mechanism leverages
Zephyr-supplied CMake functions which were supposed to
return lists of flags. However, in recent Zephyr revisions,
they changed behavior of the functions and the build fails.

Switch to using functions which return strings of flags
which seem to have more stable API.

--- config/nrfconnect/chip-module/zephyr-util.cmake
+++ config/nrfconnect/chip-module/zephyr-util.cmake
@@ -26,11 +26,11 @@
     # zephyr returns as "non-system" headers (the ones from
     # zephyr_get_include_directories_for_lang) we need to manually replace "-I"
     # with "-isystem".
-    zephyr_get_include_directories_for_lang(${LANG} INCLUDES)
-    list(TRANSFORM INCLUDES REPLACE "-I" "-isystem")
-    zephyr_get_system_include_directories_for_lang(${LANG} SYSTEM_INCLUDES)
-    zephyr_get_compile_definitions_for_lang(${LANG} DEFINES)
-    zephyr_get_compile_options_for_lang(${LANG} FLAGS)
+    zephyr_get_include_directories_for_lang_as_string(${LANG} INCLUDES)
+    string(REGEX REPLACE "(^| )-I" "\\1-isystem" INCLUDES ${INCLUDES})
+    zephyr_get_system_include_directories_for_lang_as_string(${LANG} SYSTEM_INCLUDES)
+    zephyr_get_compile_definitions_for_lang_as_string(${LANG} DEFINES)
+    zephyr_get_compile_options_for_lang_as_string(${LANG} FLAGS)
     set(${VAR} ${INCLUDES} ${SYSTEM_INCLUDES} ${DEFINES} ${FLAGS} ${${VAR}} PARENT_SCOPE)
 endfunction()


Testing: run pointcloud tests when partio is found (#1611)

Wow, this has been lurking for a while. Our Findpartio.cmake tries
looking for a partio exported config, but if not found, falls back
to a simple code to find it manually.

All was fine with the fallback code, which if found would set both
"partio_FOUND" and "PARTIO_FOUND". But the config file, if found --
only for the newer partio versions -- only set partio_FOUND. And in
that circumstance, we were not seting up the pointcloud tests!

Although the partio tests were running in CI (thankfully), I was not
running them locally on my machine with a new-ish partio.

Signed-off-by: Larry Gritz <f0a1ce6f80112d72f7276457fd261d671b827567@larrygritz.com>

--- src/cmake/testing.cmake
+++ src/cmake/testing.cmake
@@ -383,7 +383,7 @@
     endif()

     # Only run pointcloud tests if Partio is found
-    if (PARTIO_FOUND)
+    if (partio_FOUND)
         TESTSUITE ( pointcloud pointcloud-fold )
     endif ()


XDK: fix is executable2 function for windows (check .exe and .dll)

--- SuperBuild/Packaging/PackageMacros.cmake
+++ SuperBuild/Packaging/PackageMacros.cmake
@@ -143,7 +143,7 @@
   # If file name ends in .exe on Windows, *assume* executable:
   #
   if(WIN32 AND NOT UNIX)
-    if("${file_full_lower}" MATCHES "\\.exe$")
+    if("${file_full_lower}" MATCHES "(\\.exe|\\.dll)$")
       set(${result_var} 1 PARENT_SCOPE)
       return()
     endif()


added the missing file in the files.cmake

--- Modules/DicomRT/files.cmake
+++ Modules/DicomRT/files.cmake
@@ -7,6 +7,7 @@
   mitkIsoDoseLevelCollections.cpp
   mitkIsoDoseLevelSetProperty.cpp
   mitkIsoDoseLevelVectorProperty.cpp
+  mitkRTStructureSetReader.cpp
   Rendering/mitkDoseImageVtkMapper2D.cpp
 )


STYLE: Adding a contributor

STYLE: Adding a contributor

--- ShapePopulationViewer.cmake
+++ ShapePopulationViewer.cmake
@@ -9,7 +9,7 @@
   set(MODULE_NAME ${LOCAL_PROJECT_NAME} )
   set(EXTENSION_HOMEPAGE "https://www.nitrc.org/projects/shapepopviewer/")
   set(EXTENSION_CATEGORY "Shape Analysis")
-  set(EXTENSION_CONTRIBUTORS "Alexis Girault (NIRAL, UNC), Francois Budin (NIRAL, UNC)")
+  set(EXTENSION_CONTRIBUTORS "Alexis Girault (NIRAL, UNC), Francois Budin (NIRAL, UNC), Laura Pascal (DCBIA-OrthoLab, UofM)")
   set(EXTENSION_DESCRIPTION "Visualize and interact with multiple surfaces at the same time to easily compare them")
   set(EXTENSION_ICONURL "https://www.nitrc.org/project/screenshot.php?group_id=759&screenshot_id=704")
   set(EXTENSION_SCREENSHOTURLS "http://wiki.na-mic.org/Wiki/images/8/81/Screenshot1.png http://wiki.na-mic.org/Wiki/images/1/13/SPVscreenshot2.png")


Update sugar_setup_gitenv_paths

Update sugar_setup_gitenv_paths

Do not set variables if GITENV_ROOT is empty

--- cmake/core/sugar_setup_gitenv_paths.cmake
+++ cmake/core/sugar_setup_gitenv_paths.cmake
@@ -13,16 +13,16 @@
     set(GITENV_ROOT "$ENV{GITENV_ROOT}")
   endif()

-  sugar_test_variable_not_empty(GITENV_ROOT)
+  if(NOT "${GITENV_ROOT}" STREQUAL "")
+    set(Boost_NO_SYSTEM_PATHS TRUE) # disable searching in system dirs
+    set(BOOST_ROOT "${GITENV_ROOT}/boost/install")

-  set(Boost_NO_SYSTEM_PATHS TRUE) # disable searching in system dirs
-  set(BOOST_ROOT "${GITENV_ROOT}/boost/install")
+    set(GMOCK_ROOT "${GITENV_ROOT}/google/gmock")
+    set(GTEST_ROOT "${GITENV_ROOT}/google/gtest")
+    set(BREAKPAD_ROOT "${GITENV_ROOT}/google/breakpad")
+    set(SAFE_NUMERICS_ROOT "${GITENV_ROOT}/safe_numerics")
+    set(SOBER_ROOT "${GITENV_ROOT}/ruslo/sober")

-  set(GMOCK_ROOT "${GITENV_ROOT}/google/gmock")
-  set(GTEST_ROOT "${GITENV_ROOT}/google/gtest")
-  set(BREAKPAD_ROOT "${GITENV_ROOT}/google/breakpad")
-  set(SAFE_NUMERICS_ROOT "${GITENV_ROOT}/safe_numerics")
-  set(SOBER_ROOT "${GITENV_ROOT}/ruslo/sober")
-
-  set(RAPIDJSON_INCLUDE_DIRS "${GITENV_ROOT}/json/rapidjson/include")
+    set(RAPIDJSON_INCLUDE_DIRS "${GITENV_ROOT}/json/rapidjson/include")
+  endif()
 endmacro()


Added GIT_TAG instead of download url. This way it is easier to upgrade to the latest version, instead of downloading and uploading to google code

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -112,8 +112,8 @@
 ExternalProject_Add(
     osgearth
     DEPENDS osg gdal
-    #GIT_REPOSITORY https://github.com/gwaldron/osgearth.git
-	URL https://omegalib.googlecode.com/files/osgearth-10db273f4f.tar.gz
+    GIT_REPOSITORY https://github.com/gwaldron/osgearth.git
+    GIT_TAG c446b57a235d91de0564c314ffd8ea00daedf50b
     CMAKE_GENERATOR ${OSGEARTH_GENERATOR}
     CMAKE_ARGS
         ${OSGEARTH_ARGS}


odb-compiler linux: changed from i686 to x64

--- cmake/projects/odb-compiler/hunter.cmake
+++ cmake/projects/odb-compiler/hunter.cmake
@@ -22,16 +22,16 @@
       SHA1
       14d4972b43278b12479950b4a12affe4e4e500c1
   )
-elseif(CMAKE_HOST_UNIX)
+elseif(CMAKE_HOST_UNIX) # if Linux
   hunter_add_version(
       PACKAGE_NAME
       odb-compiler
       VERSION
       "2.4.0"
       URL
-      "http://www.codesynthesis.com/download/odb/2.4/odb-2.4.0-i686-linux-gnu.tar.bz2"
+      "http://www.codesynthesis.com/download/odb/2.4/odb-2.4.0-x86_64-linux-gnu.tar.bz2"
       SHA1
-      f8b5797af1ce185db6adfa1d91ba5c90584d220f
+      630882a3461a8aa6349fd5b4e5ef20ec9afae09d
   )
 elseif(CMAKE_HOST_WIN32)
   hunter_add_version(


GCOV support

GCOV support

--- cmake_modules/SetupCompilerOptions.cmake
+++ cmake_modules/SetupCompilerOptions.cmake
@@ -17,36 +17,50 @@

 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
     OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-    ###
-    execute_process(
-        COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-    if((GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
-        set(HAVE_STD_CXX_11 1
-            CACHE INTERNAL "have std c++11 support")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-unused-local-typedefs")
-    endif()

     set(CFLAGS_COMMON
       "-Wall -Wextra -Werror")# -Wno-ignored-qualifiers -Wfatal-errors")

-    set(CFLAGS_REL      "-O3 ${CFLAGS_COMMON} -DNDEBUG")
-    set(CFLAGS_DBG      "-O0 -ggdb3 ${CFLAGS_COMMON} -DDEBUG")
-    set(CFLAGS_DBGREL   "-O2 -g ${CFLAGS_COMMON} -DNDEBUG")
+    set(CFLAGS_REL      "-O3 ${CFLAGS_COMMON} ${GCOV_FLAGS} -DNDEBUG")
+    set(CFLAGS_DBG      "-O0 -ggdb3 ${CFLAGS_COMMON} ${GCOV_FLAGS} -DDEBUG")
+    set(CFLAGS_DBGREL   "-O2 -g ${CFLAGS_COMMON} ${GCOV_FLAGS} -DNDEBUG")
+
+    ###
+    execute_process(
+        COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+
+    if((GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
+        set(HAVE_STD_CXX_11 1
+            CACHE INTERNAL "have std c++11 support")
+        set(CXX_11_FLAGS "-std=c++11 -Wno-unused-local-typedefs")
+    endif()

     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
     set(CMAKE_C_FLAGS_DEBUG
                       "${CMAKE_C_FLAGS_DEBUG} ${CFLAGS_DBG}")
-    set(CMAKE_CXX_FLAGS_DEBUG
-        "${CMAKE_CXX_FLAGS_DEBUG} ${CFLAGS_DBG}")
     set(CMAKE_C_FLAGS_RELEASE
         "${CMAKE_C_FLAGS_RELEASE} ${CFLAGS_REL}")
+    set(CMAKE_C_FLAGS_RELWITHDEBINFO
+        "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CFLAGS_DBGREL}")
+
+    set(CMAKE_CXX_FLAGS_DEBUG
+        "${CMAKE_CXX_FLAGS_DEBUG} ${CFLAGS_DBG} ${CXX_11_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELEASE
-        "${CMAKE_CXX_FLAGS_RELEASE} ${CFLAGS_REL}")
-    set(CMAKE_C_FLAGS_RELWITHDEBINFO
-        "${CMAKE_C_FLAGS_RELEASE} ${CFLAGS_DBGREL}")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBUGINFO
-        "${CMAKE_CXX_FLAGS_RELWITHDEBUGINFO} ${CFLAGS_DBGREL}")
+        "${CMAKE_CXX_FLAGS_RELEASE} ${CFLAGS_REL} ${CXX_11_FLAGS}")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
+        "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CFLAGS_DBGREL} ${CXX_11_FLAGS}")
+
+    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_DEBUG} ${CXX_11_FLAGS}")
+    elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CXX_11_FLAGS}")
+    else()
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_RELEASE} ${CXX_11_FLAGS}")
+    endif()
+
 else()
   ## TODO add checks for other compilers
   set(HAVE_STD_CXX_11 1


Adding svn:eol-style native

Adding svn:eol-style native

--- test/remote/SvnPackage.cmake
+++ test/remote/SvnPackage.cmake
@@ -1,173 +1,173 @@
-# Utility routines to package a local SVN working copy's changes into
-# a single file, and for applying that file to a fresh SVN enlistment
-# elsewhere.
-
-
-macro (find_prereqs)
-  # Definitely need svn here.
-  FIND_PROGRAM(SVN_EXECUTABLE svn
-  DOC "subversion command line client")
-  IF(NOT SVN_EXECUTABLE)
-    message (FATAL_ERROR "Subversion is required; not found")
-  ENDIF(NOT SVN_EXECUTABLE)
-  set (svn "${SVN_EXECUTABLE}")
-
-  # We also want zorba itself (you HAVE built it, right?).
-  find_program(zorba NAMES zorba zorba.exe
-               PATHS "${cwd}/../../build" "${ZORBA_BUILD_DIR}"
-               PATH_SUFFIXES bin)
-  if (NOT zorba)
-    message (FATAL_ERROR "Zorba is required; not found. Specify -DZORBA_BUILD_DIR to point to your build directory if necessary.")
-  endif (NOT zorba)
-endmacro (find_prereqs)
-
-
-# Utility routine: given svn-status.xml file and a changelist (may be
-# ""), return a list of files which match any specified status.
-macro (get_files_with_status filelist svnstatusxml changelist)
-  # Which element to look at?
-  if ("${changelist}" STREQUAL "")
-    set (elem "target")
-  else ("${changelist}" STREQUAL "")
-    set (elem "changelist[@name=\"${changelist}\"]")
-  endif ("${changelist}" STREQUAL "")
-
-  # Which statuses to look at?
-  set (whereclause "")
-  set (prefix "where")
-  foreach (status ${ARGN})
-    set (whereclause "${whereclause}${prefix} $status=\"${status}\"")
-    set (prefix " or")
-  endforeach (status ${ARGN})
-  set (query
-    "fn:string-join(
-      for $entry in status/${elem}/entry
-      let $status := data($entry/wc-status/@item)
-      ${whereclause}
-      return $entry/@path,
-      \";\")")
-
-  # Set "filelist" to result
-  execute_process (COMMAND "${zorba}" --omit-xml-declaration
-                   --query "${query}" --context-item "${svnstatusxml}"
-                   OUTPUT_VARIABLE "${filelist}")
-endmacro (get_files_with_status)
-
-
-# Args:
-#   srcdir: root of local SVN working copy with changes to package
-#   outdir: directory to place resulting changes.tgz (will also hold temp files)
-#   changelist: svn changelist to package (may be "" to package all changes)
-#   resultfile: Variable to store resulting filename in
-macro (svn_package srcdir outdir changelist resultfile)
-  find_prereqs ()
-
-  # Start by making our working directory
-  set (chgdir "${outdir}/changes")
-  file (MAKE_DIRECTORY "${chgdir}")
-
-  # Write out the "svn info" and "svn status" information
-  execute_process (COMMAND "${svn}" --xml info "${srcdir}"
-                   OUTPUT_FILE "${chgdir}/svn-info.xml")
-  execute_process (COMMAND "${svn}" --xml status "${srcdir}"
-                   OUTPUT_FILE "${chgdir}/svn-status.xml")
-
-  # Also save the named of the changelist for the remote queue to use
-  file (WRITE "${chgdir}/changelist" "${changelist}")
-
-  # Pick out path names for added and modified files in the specified
-  # changelist, or from the default changelist (<target> element) if
-  # no changelist specified
-  get_files_with_status (copyfiles "${chgdir}/svn-status.xml" "${changelist}"
-                         added modified)
-
-  # Copy each modified or added file to a corresponding place in the
-  # directory hierarchy of the changes directory. Skip directories.
-  file (MAKE_DIRECTORY "${chgdir}/files")
-  foreach (filepath ${copyfiles})
-    if (NOT IS_DIRECTORY "${filepath}")
-      message ("Copying ${filepath}..")
-      file (TO_CMAKE_PATH "${filepath}" filepath)
-      file (RELATIVE_PATH relpath "${srcdir}" "${filepath}")
-      get_filename_component (reldir "${relpath}" PATH)
-      file (MAKE_DIRECTORY "${chgdir}/files/${reldir}")
-      execute_process (COMMAND "${CMAKE_COMMAND}" -E copy
-                       "${filepath}" "${chgdir}/files/${reldir}")
-    endif (NOT IS_DIRECTORY "${filepath}")
-  endforeach (filepath)
-
-  # Package up for delivery to remote queue - name the archive after
-  # the current time to ensure first-come, first-serve and prevent
-  # collisions
-  execute_process (COMMAND "${zorba}" --omit-xml-declaration
-                   --query "fn:adjust-dateTime-to-timezone(fn:current-dateTime(), xs:dayTimeDuration(\"PT0H\"))"
-                   OUTPUT_VARIABLE datetime)
-  string (REPLACE ":" "-" datetime "${datetime}")
-  set (changefile "changes-${datetime}.tgz")
-  execute_process (COMMAND "${CMAKE_COMMAND}" -E tar czf
-                   "${outdir}/${changefile}" "changes"
-                   WORKING_DIRECTORY "${outdir}")
-  set (${resultfile} "${changefile}")
-  file (REMOVE_RECURSE "${chgdir}")
-endmacro (svn_package)
-
-
-# Args:
-#   changefile - a changes.tgz file from package_svn
-#   svndir - directory to check out SVN into and apply changes
-#   tmpdir - directory to temporarily unpack changefile into
-macro (svn_unpackage changefile svndir tmpdir)
-  find_prereqs ()
-
-  # Unpack changes.tgz into working dir
-  execute_process (COMMAND "${CMAKE_COMMAND}" -E tar xzf "${changefile}"
-                   WORKING_DIRECTORY "${tmpdir}")
-  set (chgdir "${tmpdir}/changes")
-
-  # Checkout/update svn from specified URL and rev
-  execute_process (COMMAND "${zorba}" --omit-xml-declaration
-                   --query "data(info/entry/url)"
-                   --context-item "${chgdir}/svn-info.xml"
-                   OUTPUT_VARIABLE svnroot)
-  execute_process (COMMAND "${zorba}" --omit-xml-declaration
-                   --query "data(info/entry/@revision)"
-                   --context-item "${chgdir}/svn-info.xml"
-                   OUTPUT_VARIABLE svnrev)
-  execute_process (COMMAND "${svn}" checkout
-                   -r "${svnrev}" "${svnroot}" "${svndir}")
-
-  # Copy modified/added files on top of svn directory
-  execute_process (COMMAND "${CMAKE_COMMAND}" -E copy_directory
-                   "${chgdir}/files" "${svndir}")
-
-  # Modified files are already all set. Process svn-status.xml to
-  # delete any files which were deleted on client's svn, as named in
-  # the client's changelist.
-  file (READ "${chgdir}/changelist" changelist)
-  get_files_with_status (deletefiles
-                         "${chgdir}/svn-status.xml" "${changelist}" deleted)
-  execute_process (COMMAND "${zorba}" --omit-xml-declaration
-                   --query "data(info/entry/@path)"
-                   --context-item "${chgdir}/svn-info.xml"
-                   OUTPUT_VARIABLE clientroot)
-  foreach (filepath ${deletefiles})
-    # These are absolute paths from the client; convert to relative paths
-    file (RELATIVE_PATH relpath "${clientroot}" "${filepath}")
-    execute_process (COMMAND "${svn}" delete "${svndir}/${relpath}")
-  endforeach (filepath ${deletefiles})
-
-  # Now add any new files, using the local output of "svn status" to
-  # find "unversioned" files.  (We could read the svn-status.xml from
-  # the changes file, but when it is based on a changelist, it won't
-  # include directories to add.)
-  execute_process (COMMAND "${svn}" --xml status "${svndir}"
-                   OUTPUT_FILE "${chgdir}/svn-status.xml")
-  get_files_with_status (addfiles "${chgdir}/svn-status.xml" "" unversioned)
-  foreach (filepath ${addfiles})
-    execute_process (COMMAND "${svn}" add "${filepath}")
-  endforeach (filepath ${addfiles})
-
-  # Remove temporary unpackaged workingset
-  file (REMOVE_RECURSE "${chgdir}")
-
-endmacro (svn_unpackage)
+# Utility routines to package a local SVN working copy's changes into
+# a single file, and for applying that file to a fresh SVN enlistment
+# elsewhere.
+
+
+macro (find_prereqs)
+  # Definitely need svn here.
+  FIND_PROGRAM(SVN_EXECUTABLE svn
+  DOC "subversion command line client")
+  IF(NOT SVN_EXECUTABLE)
+    message (FATAL_ERROR "Subversion is required; not found")
+  ENDIF(NOT SVN_EXECUTABLE)
+  set (svn "${SVN_EXECUTABLE}")
+
+  # We also want zorba itself (you HAVE built it, right?).
+  find_program(zorba NAMES zorba zorba.exe
+               PATHS "${cwd}/../../build" "${ZORBA_BUILD_DIR}"
+               PATH_SUFFIXES bin)
+  if (NOT zorba)
+    message (FATAL_ERROR "Zorba is required; not found. Specify -DZORBA_BUILD_DIR to point to your build directory if necessary.")
+  endif (NOT zorba)
+endmacro (find_prereqs)
+
+
+# Utility routine: given svn-status.xml file and a changelist (may be
+# ""), return a list of files which match any specified status.
+macro (get_files_with_status filelist svnstatusxml changelist)
+  # Which element to look at?
+  if ("${changelist}" STREQUAL "")
+    set (elem "target")
+  else ("${changelist}" STREQUAL "")
+    set (elem "changelist[@name=\"${changelist}\"]")
+  endif ("${changelist}" STREQUAL "")
+
+  # Which statuses to look at?
+  set (whereclause "")
+  set (prefix "where")
+  foreach (status ${ARGN})
+    set (whereclause "${whereclause}${prefix} $status=\"${status}\"")
+    set (prefix " or")
+  endforeach (status ${ARGN})
+  set (query
+    "fn:string-join(
+      for $entry in status/${elem}/entry
+      let $status := data($entry/wc-status/@item)
+      ${whereclause}
+      return $entry/@path,
+      \";\")")
+
+  # Set "filelist" to result
+  execute_process (COMMAND "${zorba}" --omit-xml-declaration
+                   --query "${query}" --context-item "${svnstatusxml}"
+                   OUTPUT_VARIABLE "${filelist}")
+endmacro (get_files_with_status)
+
+
+# Args:
+#   srcdir: root of local SVN working copy with changes to package
+#   outdir: directory to place resulting changes.tgz (will also hold temp files)
+#   changelist: svn changelist to package (may be "" to package all changes)
+#   resultfile: Variable to store resulting filename in
+macro (svn_package srcdir outdir changelist resultfile)
+  find_prereqs ()
+
+  # Start by making our working directory
+  set (chgdir "${outdir}/changes")
+  file (MAKE_DIRECTORY "${chgdir}")
+
+  # Write out the "svn info" and "svn status" information
+  execute_process (COMMAND "${svn}" --xml info "${srcdir}"
+                   OUTPUT_FILE "${chgdir}/svn-info.xml")
+  execute_process (COMMAND "${svn}" --xml status "${srcdir}"
+                   OUTPUT_FILE "${chgdir}/svn-status.xml")
+
+  # Also save the named of the changelist for the remote queue to use
+  file (WRITE "${chgdir}/changelist" "${changelist}")
+
+  # Pick out path names for added and modified files in the specified
+  # changelist, or from the default changelist (<target> element) if
+  # no changelist specified
+  get_files_with_status (copyfiles "${chgdir}/svn-status.xml" "${changelist}"
+                         added modified)
+
+  # Copy each modified or added file to a corresponding place in the
+  # directory hierarchy of the changes directory. Skip directories.
+  file (MAKE_DIRECTORY "${chgdir}/files")
+  foreach (filepath ${copyfiles})
+    if (NOT IS_DIRECTORY "${filepath}")
+      message ("Copying ${filepath}..")
+      file (TO_CMAKE_PATH "${filepath}" filepath)
+      file (RELATIVE_PATH relpath "${srcdir}" "${filepath}")
+      get_filename_component (reldir "${relpath}" PATH)
+      file (MAKE_DIRECTORY "${chgdir}/files/${reldir}")
+      execute_process (COMMAND "${CMAKE_COMMAND}" -E copy
+                       "${filepath}" "${chgdir}/files/${reldir}")
+    endif (NOT IS_DIRECTORY "${filepath}")
+  endforeach (filepath)
+
+  # Package up for delivery to remote queue - name the archive after
+  # the current time to ensure first-come, first-serve and prevent
+  # collisions
+  execute_process (COMMAND "${zorba}" --omit-xml-declaration
+                   --query "fn:adjust-dateTime-to-timezone(fn:current-dateTime(), xs:dayTimeDuration(\"PT0H\"))"
+                   OUTPUT_VARIABLE datetime)
+  string (REPLACE ":" "-" datetime "${datetime}")
+  set (changefile "changes-${datetime}.tgz")
+  execute_process (COMMAND "${CMAKE_COMMAND}" -E tar czf
+                   "${outdir}/${changefile}" "changes"
+                   WORKING_DIRECTORY "${outdir}")
+  set (${resultfile} "${changefile}")
+  file (REMOVE_RECURSE "${chgdir}")
+endmacro (svn_package)
+
+
+# Args:
+#   changefile - a changes.tgz file from package_svn
+#   svndir - directory to check out SVN into and apply changes
+#   tmpdir - directory to temporarily unpack changefile into
+macro (svn_unpackage changefile svndir tmpdir)
+  find_prereqs ()
+
+  # Unpack changes.tgz into working dir
+  execute_process (COMMAND "${CMAKE_COMMAND}" -E tar xzf "${changefile}"
+                   WORKING_DIRECTORY "${tmpdir}")
+  set (chgdir "${tmpdir}/changes")
+
+  # Checkout/update svn from specified URL and rev
+  execute_process (COMMAND "${zorba}" --omit-xml-declaration
+                   --query "data(info/entry/url)"
+                   --context-item "${chgdir}/svn-info.xml"
+                   OUTPUT_VARIABLE svnroot)
+  execute_process (COMMAND "${zorba}" --omit-xml-declaration
+                   --query "data(info/entry/@revision)"
+                   --context-item "${chgdir}/svn-info.xml"
+                   OUTPUT_VARIABLE svnrev)
+  execute_process (COMMAND "${svn}" checkout
+                   -r "${svnrev}" "${svnroot}" "${svndir}")
+
+  # Copy modified/added files on top of svn directory
+  execute_process (COMMAND "${CMAKE_COMMAND}" -E copy_directory
+                   "${chgdir}/files" "${svndir}")
+
+  # Modified files are already all set. Process svn-status.xml to
+  # delete any files which were deleted on client's svn, as named in
+  # the client's changelist.
+  file (READ "${chgdir}/changelist" changelist)
+  get_files_with_status (deletefiles
+                         "${chgdir}/svn-status.xml" "${changelist}" deleted)
+  execute_process (COMMAND "${zorba}" --omit-xml-declaration
+                   --query "data(info/entry/@path)"
+                   --context-item "${chgdir}/svn-info.xml"
+                   OUTPUT_VARIABLE clientroot)
+  foreach (filepath ${deletefiles})
+    # These are absolute paths from the client; convert to relative paths
+    file (RELATIVE_PATH relpath "${clientroot}" "${filepath}")
+    execute_process (COMMAND "${svn}" delete "${svndir}/${relpath}")
+  endforeach (filepath ${deletefiles})
+
+  # Now add any new files, using the local output of "svn status" to
+  # find "unversioned" files.  (We could read the svn-status.xml from
+  # the changes file, but when it is based on a changelist, it won't
+  # include directories to add.)
+  execute_process (COMMAND "${svn}" --xml status "${svndir}"
+                   OUTPUT_FILE "${chgdir}/svn-status.xml")
+  get_files_with_status (addfiles "${chgdir}/svn-status.xml" "" unversioned)
+  foreach (filepath ${addfiles})
+    execute_process (COMMAND "${svn}" add "${filepath}")
+  endforeach (filepath ${addfiles})
+
+  # Remove temporary unpackaged workingset
+  file (REMOVE_RECURSE "${chgdir}")
+
+endmacro (svn_unpackage)


Turn error into warning

Turn error into warning

--- flags/ios_nocodesign.cmake
+++ flags/ios_nocodesign.cmake
@@ -41,7 +41,8 @@
       _polly_wrong_xcconfig_path
   )
   if(_polly_wrong_xcconfig_path)
-    polly_fatal_error(
+    message(
+        WARNING
         "Unexpected XCODE_XCCONFIG_FILE value: "
         "    ${_polly_xcode_xcconfig_file_path_env}"
         "expected: "


iox-#1287 Fix macos issues with rpath separator and @executable_path required for apps

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

--- iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
+++ iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
@@ -129,29 +129,50 @@
 endMacro()

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

     if( APPLE )
-        set(IOX_RPATH_PREFIX "@loader_path")
+        if ( IOX_IS_EXECUTABLE )
+            set(IOX_RPATH_PREFIX "@executable_path")
+        else()
+            set(IOX_RPATH_PREFIX "@loader_path")
+        endif()
     elseif ( LINUX OR UNIX )
         set(IOX_RPATH_PREFIX "\$ORIGIN")
     endif()

-    set(IOX_BUILD_RPATH ${IOX_RPATH_PREFIX}/../iceoryx_hoofs:${IOX_RPATH_PREFIX}/../iceoryx_posh:${IOX_RPATH_PREFIX}/../iceoryx_hoofs/platform:${IOX_RPATH_PREFIX}/../iceoryx_binding_c)
-    set(IOX_INSTALL_RPATH ${IOX_RPATH_PREFIX}/../${CMAKE_INSTALL_LIBDIR})
-
-    # TODO: iox-#1287 to be compatible with our current iceoryx_meta structure where we have build/posh build/hoofs build/binding_c
-    set(IOX_BUILD_RPATH ${IOX_BUILD_RPATH}:${IOX_RPATH_PREFIX}/../hoofs:${IOX_RPATH_PREFIX}/../posh:${IOX_RPATH_PREFIX}/../hoofs/platform:${IOX_RPATH_PREFIX}/../binding_c)
-    # TODO: iox-#1287 to be compatible with our current iceoryx_meta structure where the examples are again in a subfolder, build/iceoryx_examples/example_name
-    set(IOX_BUILD_RPATH ${IOX_BUILD_RPATH}:${IOX_RPATH_PREFIX}/../../hoofs:${IOX_RPATH_PREFIX}/../../posh:${IOX_RPATH_PREFIX}/../../hoofs/platform:${IOX_RPATH_PREFIX}/../../binding_c)
-    # TODO: END iox-#1287
-
-    set_target_properties(
-        ${IOX_TARGET}
-        PROPERTIES
-        BUILD_RPATH ${IOX_BUILD_RPATH}
-        INSTALL_RPATH ${IOX_INSTALL_RPATH}
+    set_property(
+        TARGET ${IOX_TARGET}
+        PROPERTY INSTALL_RPATH
+        "${IOX_RPATH_PREFIX}/../${CMAKE_INSTALL_LIBDIR}"
+    )
+
+    set_property(
+        TARGET ${IOX_TARGET}
+        PROPERTY BUILD_RPATH
+            "${IOX_RPATH_PREFIX}/../iceoryx_hoofs"
+            "${IOX_RPATH_PREFIX}/../iceoryx_posh"
+            "${IOX_RPATH_PREFIX}/../iceoryx_hoofs/platform"
+            "${IOX_RPATH_PREFIX}/../iceoryx_binding_c"
+
+            # TODO: iox-#1287 to be compatible with our current iceoryx_meta structure where we have build/posh build/hoofs build/binding_c
+            "${IOX_RPATH_PREFIX}/../hoofs"
+            "${IOX_RPATH_PREFIX}/../posh"
+            "${IOX_RPATH_PREFIX}/../hoofs/platform"
+            "${IOX_RPATH_PREFIX}/../binding_c"
+            # TODO: iox-#1287 to be compatible with our current iceoryx_meta structure where the examples are again in a subfolder, build/iceoryx_examples/example_name
+            "${IOX_RPATH_PREFIX}/../../hoofs"
+            "${IOX_RPATH_PREFIX}/../../posh"
+            "${IOX_RPATH_PREFIX}/../../hoofs/platform"
+            "${IOX_RPATH_PREFIX}/../../binding_c"
+            # TODO: iox-#1287 iox-roudi is stored directly in build, despite it should be stored in iceoryx_posh, adjust paths so that this works too
+            "${IOX_RPATH_PREFIX}/hoofs"
+            "${IOX_RPATH_PREFIX}/posh"
+            "${IOX_RPATH_PREFIX}/hoofs/platform"
+            "${IOX_RPATH_PREFIX}/binding_c"
+            # TODO: END iox-#1287
     )
 endMacro()

@@ -202,7 +223,7 @@
         target_link_libraries(${IOX_TARGET} ${IOX_LIBS_UNIX})
     endif()

-    iox_set_rpath( TARGET ${IOX_TARGET} )
+    iox_set_rpath( IS_EXECUTABLE TARGET ${IOX_TARGET} )

     if ( IOX_PLACE_IN_BUILD_ROOT )
         set_target_properties(${IOX_TARGET} PROPERTIES


Help from Az finally gave the correct answer to the problem I was trying to address originally, so really this fix is from Az. Exposes the directory for where your game files go in cmake without having to go to Advanced tab.

--- Tools/CMake/basics.cmake
+++ Tools/CMake/basics.cmake
@@ -32,7 +32,7 @@
     set(TORQUE_TEMPLATE "BaseGame" CACHE STRING "the template to use")
 endif()
 if(NOT TORQUE_APP_DIR)
-    set(TORQUE_APP_DIR "${CMAKE_BINARY_DIR}")
+    set(TORQUE_APP_DIR "${CMAKE_SOURCE_DIR}/My Projects/${TORQUE_APP_NAME}" CACHE STRING "final installation location")
 endif()
 if(NOT projectOutDir)
     set(projectOutDir "${TORQUE_APP_DIR}/game")


Update External_VMTK.cmake format based on template.

--- SuperBuild/External_VMTK.cmake
+++ SuperBuild/External_VMTK.cmake
@@ -12,21 +12,32 @@

 # Sanity checks
 if(DEFINED VMTK_DIR AND NOT EXISTS ${VMTK_DIR})
-  message(FATAL_ERROR "Foo_DIR variable is defined but corresponds to nonexistent directory")
+  message(FATAL_ERROR "VMTK_DIR [${VMTK_DIR}] variable is defined but corresponds to nonexistent directory")
 endif()

 if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})

-  if(NOT DEFINED git_protocol)
-    set(git_protocol "git")
-  endif()
+ExternalProject_SetIfNotDefined(
+  ${CMAKE_PROJECT_NAME}_${proj}_GIT_REPOSITORY
+  "${EP_GIT_PROTOCOL}://github.com/vmtk/vmtk.git"
+  QUIET
+  )
+
+ExternalProject_SetIfNotDefined(
+  ${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG
+  "a0dacdc2499a3828d7a649c9c1d32363ce407b1a"
+  QUIET
+  )
+
+  set(EP_SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj})
+  set(EP_BINARY_DIR ${CMAKE_BINARY_DIR}/${proj}-build)

   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
-    GIT_REPOSITORY "${git_protocol}://github.com/vmtk/vmtk.git"
-    GIT_TAG "a0dacdc2499a3828d7a649c9c1d32363ce407b1a"
-    SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
-    BINARY_DIR ${proj}-build
+    GIT_REPOSITORY "${${CMAKE_PROJECT_NAME}_${proj}_GIT_REPOSITORY}"
+    GIT_TAG "${${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG}"
+    SOURCE_DIR ${EP_SOURCE_DIR}
+    BINARY_DIR ${EP_BINARY_DIR}
     CMAKE_CACHE_ARGS
       -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/${EXTENSION_BUILD_SUBDIRECTORY}/${Slicer_THIRDPARTY_BIN_DIR}
       -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/${EXTENSION_BUILD_SUBDIRECTORY}/${Slicer_THIRDPARTY_LIB_DIR}
@@ -36,7 +47,7 @@
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
       -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-      -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
+      -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
       -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/SlicerVmtk-build
       # installation location for the pypes/scripts
       -DVMTK_INSTALL_BIN_DIR:PATH=${Slicer_INSTALL_QTLOADABLEMODULES_PYTHON_LIB_DIR}/pypes
@@ -75,10 +86,11 @@
     DEPENDS
       ${${proj}_DEPENDS}
     )
-  set(${proj}_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
+  set(${proj}_DIR ${EP_BINARY_DIR})

 else()
   ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDS})
 endif()

 mark_as_superbuild(${proj}_DIR:PATH)
+


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- plugins/haze/ktpaccountskcm_plugin_haze.desktop.cmake
+++ plugins/haze/ktpaccountskcm_plugin_haze.desktop.cmake
@@ -48,7 +48,7 @@
 Name=Haze Account Configuration User Interface
 Name[bs]=Korisnički interfejs za konfiguraciju korisničkih naloga Haze
 Name[ca]=Interfície d'usuari de configuració del compte d'Haze
-Name[ca@valencia]=Interfície d'usuari de configuració del compte de Haze
+Name[ca@valencia]=Interfície d'usuari de configuració del compte d'Haze
 Name[cs]=Uživatelské rozhraní nastavení účtu Haze
 Name[da]=Brugerflade til Haze kontokonfiguration
 Name[de]=Benutzeroberfläche zur Einrichtung von Haze-Zugängen


Updated to download the latest zlib version.

--- external/zlib/Options.cmake
+++ external/zlib/Options.cmake
@@ -14,7 +14,7 @@

 # Determine which URL to use to obtain the ZLIB source files
 set_option(ZLIB_URL
-  "http://zlib.net/zlib-1.2.7.tar.gz"
+  "http://zlib.net/zlib-1.2.8.tar.gz"
   STRING
   "URL for getting latest 'zlib' version")


Modified win32 to allow disabled LOG4CXX

--- CMakeModules/KlamptDependencies.cmake
+++ CMakeModules/KlamptDependencies.cmake
@@ -93,7 +93,7 @@
   #GL Extension Wrangler package (GLEW)
   SET(GLEW_INCLUDE_DIR ${KRISLIBRARY_ROOT}/glew-2.0.0/include CACHE PATH "GLEW include directory" FORCE)
   SET(GLEW_LIB ${KRISLIBRARY_ROOT}/glew32.lib CACHE PATH "GLEW library" FORCE)
-  SET(KLAMPT_INCLUDE_DIRS ${KLAMPT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIR} ${KRISLIBRARY_ROOT}/log4cxx/include)
+  SET(KLAMPT_INCLUDE_DIRS ${KLAMPT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIR})
   SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} ${GLEW_LIB})

   #Optional: Assimp package
@@ -117,9 +117,12 @@
        FORCE
     )
   ENDIF(NOT LOG4CXX_ROOT)
-  FIND_PACKAGE(LOG4CXX REQUIRED)
-  SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} ${LOG4CXX_LIBRARIES})
-
+  FIND_PACKAGE(LOG4CXX )
+  IF(LOG4CXX_FOUND)
+	MESSAGE("LOG4CXX has been  found")
+    SET(KLAMPT_INCLUDE_DIRS ${KLAMPT_INCLUDE_DIRS} ${KRISLIBRARY_ROOT}/log4cxx/include)
+	SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} ${LOG4CXX_LIBRARIES})
+  ENDIF(LOG4CXX_FOUND)

 ELSE(WIN32)


Change the node binary search order

Change the node binary search order

Look for node instead of nodejs first, with an understanding of the rare
potential for this to break. This addresses immediate needs of
node-cmake dependents while a more formal solution is determined (if it
is necessary).

--- NodeJS.cmake
+++ NodeJS.cmake
@@ -208,7 +208,12 @@
         endif()
         # Fall back to the "latest" version if node isn't installed
         set(VERSION ${NODEJS_VERSION_FALLBACK})
-        find_program(NODEJS_BINARY NAMES nodejs node)
+        # This has all of the implications of why the binary is called nodejs in the first place
+        # https://lists.debian.org/debian-devel-announce/2012/07/msg00002.html
+        # However, with nvm/n, its nearly standard to have a proper 'node' binary now (since the
+        # apt-based one is so out of date), so for now just assume that this rare binary conflict
+        # case is the degenerate case. May need a more complicated solution later.
+        find_program(NODEJS_BINARY NAMES node nodejs)
         if(NODEJS_BINARY)
             execute_process(
                 COMMAND ${NODEJS_BINARY} --version


(split) ENH: Bump VTK ExternalProject to 5.10.1.

Change-Id: I13ae6552c597546cd4262171ec683ae582478e8c


Fix FindSSE SSE4* check crash on MSVC.

Fix FindSSE SSE4* check crash on MSVC.


Xft is not needed by any example.

Xft is not needed by any example.

--- CMake/Dependencies/DependencyX11.cmake
+++ CMake/Dependencies/DependencyX11.cmake
@@ -62,25 +62,5 @@
 	else ()
 		MESSAGE(WARNING "X11 xf86vm library is missing. Not all tools and examples may compile correctly...")
 	endif ()
-
-	if (FALSE)
-	# only tools need this
-	if (X11_Xft_FOUND AND IRRLICHT_BUILD_TOOLS)
-		MESSAGE(STATUS "X11 Xft library correctly Found:")
-		MESSAGE(STATUS " * Include-Dir: ${X11_Xft_INCLUDE_PATH}")
-		MESSAGE(STATUS " * Libraries: ${X11_Xft_LIB}")
-
-		INCLUDE_DIRECTORIES(
-			${X11_Xft_INCLUDE_PATH}
-		)
-
-		SET(IRRLICHT_DEPENDENCY_LIBRARIES
-			${IRRLICHT_DEPENDENCY_LIBRARIES}
-			${X11_Xft_LIB}
-		)
-	else ()
-		MESSAGE(WARNING "X11 Xft library is missing. Not all tools and examples may compile correctly...")
-	endif ()
-	endif ()

 endif ()


COMP: Bump TubeTK to use its CMake var updates

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "8ad2415c93eb083e663cd3261e43d6cb882ff88a"
+    GIT_TAG "c3fff00f5299f5f9c9df3ff7dce4852c97118499"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
@@ -55,8 +55,6 @@
       -DTubeTK_USE_SUPERBUILD:BOOL=ON
       # Slicer_SOURCE_DIR is used when generating UseTubeTK.cmake
       -DSlicer_SOURCE_DIR:PATH=${Slicer_SOURCE_DIR}
-      # Slicer is not available yet (no SlicerConfig.cmake generated)
-      -DTubeTK_USE_Slicer:BOOL=OFF
       -DUSE_SYSTEM_SlicerExecutionModel:BOOL=ON
       -DSlicerExecutionModel_DIR:PATH=${CMAKE_BINARY_DIR}/SlicerExecutionModel-build
       -DUSE_SYSTEM_ITK:BOOL=ON
@@ -75,10 +73,10 @@
       # Build only TubeTK lib, not the modules. They will be built by Slicer.
       -DTubeTK_BUILD_ALL_MODULES:BOOL=OFF
       -DTubeTK_BUILD_APPLICATIONS:BOOL=OFF
-      -DTubeTK_BUILD_SLICER_EXTENSION:BOOL=OFF
+      -DTubeTK_BUILD_USING_SLICER:BOOL=OFF
+      -DTubeTK_BUILD_WITHIN_SLICER:BOOL=ON
       -DTubeTK_USE_LIBSVM:BOOL=OFF
       -DTubeTK_USE_PYTHON:BOOL=OFF
-      -DTubeTK_RUN_MODULES_IN_SLICER:BOOL=ON
     INSTALL_COMMAND ""
     DEPENDS
       ${${proj}_DEPENDENCIES}


ENH: Bump version of TubeTK

ENH: Bump version of TubeTK

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "2ef59cfb598f8611a1320396d606250d45ccfd08"
+    GIT_TAG "b17e94d9cfc0d693feae25593e0d394a4f2675c6"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


BUG: commit fixing horrible missing )

BUG: commit fixing horrible missing )

--- CMake/sitkConfigureFileBuildtime.cmake
+++ CMake/sitkConfigureFileBuildtime.cmake
@@ -32,7 +32,7 @@
 VariableListToArgs( vars configure_vars )

 file( WRITE "${CMAKE_BINARY_DIR}/CMake/configure_file_buildtime.cmake"
-  "configure_file( \"${filename}\" \"${out_filename} )\"" )
+  "configure_file( \"${filename}\" \"${out_filename}\" )" )

 set( cmd ${CMAKE_COMMAND} "${configure_vars}" -P "${CMAKE_BINARY_DIR}/CMake/configure_file_buildtime.cmake")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


px4_fmu-v2_default disable constained flash options

--- boards/px4/fmu-v2/default.cmake
+++ boards/px4/fmu-v2/default.cmake
@@ -10,7 +10,7 @@
 	BOOTLOADER ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/extras/px4fmuv3_bl.bin
 	IO px4_io-v2_default
 	#TESTING
-	CONSTRAINED_FLASH
+	#CONSTRAINED_FLASH
 	#UAVCAN_INTERFACES 2

 	SERIAL_PORTS
@@ -52,6 +52,7 @@
 		px4flow
 		px4fmu
 		px4io
+		#roboclaw
 		stm32
 		stm32/adc
 		stm32/tone_alarm
@@ -106,6 +107,7 @@
 		top
 		#topic_listener
 		tune_control
+		#usb_connected
 		ver

 	EXAMPLES
@@ -121,8 +123,3 @@
 		#segway
 		#uuv_example_app
 	)
-
-# remove optional flight task features from fmu-v2 to save flash memory
-list(APPEND flight_tasks_to_remove
-		Orbit
-	)


Fix initial Yarn installation issue - cmake dependencies weren't right.

--- build/cmake/core-admin-ui.cmake
+++ build/cmake/core-admin-ui.cmake
@@ -27,8 +27,7 @@
     ${CORE_BUILD_DIR}/tmp/admin-ui-build/node_modules
   DEPENDS
     yarn
-    ${CORE_BUILD_DIR}/tmp/admin-ui-build/package.json
-    ${CORE_BUILD_DIR}/tmp/admin-ui-build/yarn.lock
+    ${STAMP_DIR}/core-admin-ui-build-dir
   COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} yarn install && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} yarn clean
   COMMAND touch ${STAMP_DIR}/core-admin-ui-yarn-install
 )


Fix builder

Fix builder

--- KRAL/builder.cmake
+++ KRAL/builder.cmake
@@ -94,11 +94,7 @@
 endif()
 set (CMAKE_GENERATED_COMMAND "${CMAKE_GENERATED_COMMAND} -DANDROID_ASSETS=\"${ASSETS_${T}}\" -DNEW_CMAKE=1 -DPACKAGES=\"${PACKAGE_DIRS}\" -DCMAKE_BUILD_TYPE=${BUILD_TYPE_${T}} -DKRAL_PATH=\"${KRAL_PATH}\" -DPLATFORM=\"${PLATFORM_${T}}\" -G \"${PROJECT_TYPE_${T}}\" \"${PROJECT_DIR_${T}}\"")

-<<<<<<< HEAD
 if (GENERATE OR G)
-=======
-if (GENERATE)
->>>>>>> 53d8f63f54113d79cb7e960966fb6bd7f460f0d8
     exec_program("\"${CMAKE_COMMAND}\" -E remove_directory ${PROJECTS_ROOT_DIR}/${BUILD_DIR_${T}}" RETURN_VALUE GCRV)

     if (NOT "${GCRV}" STREQUAL "0")
@@ -121,7 +117,6 @@
         file (APPEND ${CMLFILE} "set (PLATFORM ${PLATFORM_${T}} CACHE INTERNAL PLATFORM FORCE)\n")
         file (APPEND ${CMLFILE} "set (CMAKE_BUILD_TYPE ${BUILD_TYPE_${T}} CACHE INTERNAL BUILD_TYPE FORCE)\n")
         file (APPEND ${CMLFILE} "set (PACKAGES ${PACKAGE_DIRS} CACHE INTERNAL PACKAGE_DIRS FORCE)\n")
-<<<<<<< HEAD
         file (APPEND ${CMLFILE} "set (NEW_CMAKE True)\n")
         file (APPEND ${CMLFILE} "add_subdirectory (${PROJECT_DIR_${T}})")
     endif ()
@@ -133,18 +128,6 @@
 elseif (LIST OR L)
     print_target(${T})
 elseif (BUILD OR B)
-=======
-        file (APPEND ${CMLFILE} "add_subdirectory (${PROJECT_DIR_${T}})")
-    endif ()
-elseif (UPDATE)
-    exec_program ("${CMAKE_COMMAND}" ARGS -E chdir ${PROJECTS_ROOT_DIR}/${BUILD_DIR_${T}} "${CMAKE_GENERATED_COMMAND}")
-elseif (COMPILE)
-    exec_program ("${CMAKE_COMMAND}" ARGS -E chdir ${PROJECTS_ROOT_DIR}/${BUILD_DIR_${T}}
-            \"${CMAKE_COMMAND}\" --build .)
-elseif (LIST)
-    print_target(${T})
-elseif (BUILD)
->>>>>>> 53d8f63f54113d79cb7e960966fb6bd7f460f0d8
     file(REMOVE_RECURSE "${PROJECTS_ROOT_DIR}/${BUILD_DIR_${T}}")
     file(MAKE_DIRECTORY "${PROJECTS_ROOT_DIR}/${BUILD_DIR_${T}}")


self host fftw

self host fftw

closes #75

--- version_config.cmake
+++ version_config.cmake
@@ -35,7 +35,7 @@
 if(WIN32)
   # Just use precompiled version
   # TODO would prefer the next zip file but for KT using an ftp URL times-out (firewall?)
-  set(FFTW3_URL ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip )
+  set(FFTW3_URL https://www.ccppetmr.ac.uk/sites/www.ccppetmr.ac.uk/files/downloads/fftw-3.3.5-dll64.zip )
   set(FFTW3_MD5 cb3c5ad19a89864f036e7a2dd5be168c )
   #set(FFTW3_URL https://s3.amazonaws.com/install-gadgetron-vs2013/Dependencies/FFTW/zip/FFTW3.zip )
   #set(FFTW3_MD5 a42eac92d9ad06d7c53fb82b09df2b6e )


#13 generate import lib in msvc using cmake >= 3.4

--- Build.cmake
+++ Build.cmake
@@ -90,6 +90,9 @@
    SET(G3LOG_LIBRARY g3logger)

 if(ADD_BUILD_WIN_SHARED OR NOT(MSVC OR MINGW))
+   IF(NOT(CMAKE_VERSION LESS 3.4) AND MSVC)
+      set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+   ENDIF()
    add_library(g3logger_shared SHARED ${SRC_FILES})
    set_target_properties(g3logger_shared PROPERTIES LINKER_LANGUAGE CXX)
    IF(APPLE)


AddCompilerFlag: be more thorough that code compiles

Testing -std=c++14 with clang and libstdc++ from GCC 4.8 must fail
because "#include <stdio>" fails to compile (it's incompatible with
C++14).

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

--- cmake/AddCompilerFlag.cmake
+++ cmake/AddCompilerFlag.cmake
@@ -117,27 +117,32 @@
       endforeach()
    endif()

+   set(_c_code "int main() { return 0; }")
+   set(_cxx_code "int main() { return 0; }")
    if("${_flag}" STREQUAL "-mfma")
       # Compiling with FMA3 support may fail only at the assembler level.
       # In that case we need to have such an instruction in the test code
-      set(_code "#include <immintrin.h>
+      set(_c_code "#include <immintrin.h>
       __m128 foo(__m128 x) { return _mm_fmadd_ps(x, x, x); }
       int main() { return 0; }")
+      set(_cxx_code "${_c_code}")
    elseif("${_flag}" STREQUAL "-stdlib=libc++")
       # Compiling with libc++ not only requires a compiler that understands it, but also
       # the libc++ headers itself
-      set(_code "#include <iostream>
+      set(_cxx_code "#include <iostream>
+      #include <cstdio>
       int main() { return 0; }")
    else()
-      set(_code "int main() { return 0; }")
+      set(_cxx_code "#include <cstdio>
+      int main() { return 0; }")
    endif()

    if(DEFINED _c_result)
-      check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc} "${_code}")
+      check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc} "${_c_code}")
       set(${_c_result} ${check_c_compiler_flag_${_flag_esc}})
    endif()
    if(DEFINED _cxx_result)
-      check_cxx_compiler_flag("${_flag}" check_cxx_compiler_flag_${_flag_esc} "${_code}")
+      check_cxx_compiler_flag("${_flag}" check_cxx_compiler_flag_${_flag_esc} "${_cxx_code}")
       set(${_cxx_result} ${check_cxx_compiler_flag_${_flag_esc}})
    endif()

@@ -158,11 +163,11 @@

    if(MIC_NATIVE_FOUND)
       if(DEFINED _mic_c_result)
-         check_mic_c_compiler_flag("${_flag}" check_mic_c_compiler_flag_${_flag_esc} "${_code}")
+         check_mic_c_compiler_flag("${_flag}" check_mic_c_compiler_flag_${_flag_esc} "${_c_code}")
          set(${_mic_c_result} ${check_mic_c_compiler_flag_${_flag_esc}})
       endif()
       if(DEFINED _mic_cxx_result)
-         check_mic_cxx_compiler_flag("${_flag}" check_mic_cxx_compiler_flag_${_flag_esc} "${_code}")
+         check_mic_cxx_compiler_flag("${_flag}" check_mic_cxx_compiler_flag_${_flag_esc} "${_cxx_code}")
          set(${_mic_cxx_result} ${check_mic_cxx_compiler_flag_${_flag_esc}})
       endif()


dots in -D arguments also seem to be a problem

--- cmake/AddCompilerFlag.cmake
+++ cmake/AddCompilerFlag.cmake
@@ -2,7 +2,7 @@
 include("${_currentDir}/CheckCCompilerFlag.cmake")
 include("${_currentDir}/CheckCXXCompilerFlag.cmake")
 macro(AddCompilerFlag _flag)
-   string(REGEX REPLACE "[-+/:= ]" "_" _flag_esc "${_flag}")
+   string(REGEX REPLACE "[.-+/:= ]" "_" _flag_esc "${_flag}")
    check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc})
    check_cxx_compiler_flag("${_flag}" check_cxx_compiler_flag_${_flag_esc})


Fix installing of systemd unit file

Fix installing of systemd unit file

--- cmake/ArangoDBInstall.cmake
+++ cmake/ArangoDBInstall.cmake
@@ -1,11 +1,11 @@
 include(${CMAKE_SOURCE_DIR}/cmake/GNUInstallDirs.cmake)

 set(ARANGODB_SOURCE_DIR ${CMAKE_SOURCE_DIR})
-set(CMAKE_INSTALL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_SYSCONFDIR}/arangodb3")
-set(CMAKE_INSTALL_FULL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_FULL_SYSCONFDIR}/arangodb3")
+set(CMAKE_INSTALL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_SYSCONFDIR}/${CMAKE_PROJECT_NAME}")
+set(CMAKE_INSTALL_FULL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${CMAKE_PROJECT_NAME}")

-set(CMAKE_INSTALL_DATAROOTDIR_ARANGO "${CMAKE_INSTALL_DATAROOTDIR}/arangodb3")
-set(CMAKE_INSTALL_FULL_DATAROOTDIR_ARANGO "${CMAKE_INSTALL_FULL_DATAROOTDIR}/arangodb3")
+set(CMAKE_INSTALL_DATAROOTDIR_ARANGO "${CMAKE_INSTALL_DATAROOTDIR}/${CMAKE_PROJECT_NAME}")
+set(CMAKE_INSTALL_FULL_DATAROOTDIR_ARANGO "${CMAKE_INSTALL_FULL_DATAROOTDIR}/${CMAKE_PROJECT_NAME}")

 if (MSVC OR DARWIN)
   set(ENABLE_UID_CFG false)
@@ -13,17 +13,19 @@
   set(ENABLE_UID_CFG true)
 endif ()

-set(CMAKE_INSTALL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_SYSCONFDIR}/arangodb3")
-set(CMAKE_INSTALL_FULL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_FULL_SYSCONFDIR}/arangodb3")
+set(CMAKE_INSTALL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_SYSCONFDIR}/${CMAKE_PROJECT_NAME}")
+set(CMAKE_INSTALL_FULL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${CMAKE_PROJECT_NAME}")

-# database directory
-FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/arangodb3")
+# database directory
+set(ARANGODB_DB_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/${CMAKE_PROJECT_NAME}")
+FILE(MAKE_DIRECTORY ${ARANGODB_DB_DIRECTORY})

 # apps
-FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/arangodb3-apps")
+set(ARANGODB_APPS_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/${CMAKE_PROJECT_NAME}-apps")
+FILE(MAKE_DIRECTORY "${ARANGODB_APPS_DIRECTORY}")

 # logs
-FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/log/arangodb3")
+FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/log/${CMAKE_PROJECT_NAME}")

 include(InstallMacros)

@@ -69,7 +71,7 @@
 ################################################################################

 install(
-  DIRECTORY ${PROJECT_BINARY_DIR}/var/lib/arangodb3
+  DIRECTORY ${ARANGODB_DB_DIRECTORY}
   DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib)

 ################################################################################
@@ -77,22 +79,24 @@
 ################################################################################

 install(
-  DIRECTORY ${PROJECT_BINARY_DIR}/var/lib/arangodb3-apps
+  DIRECTORY ${ARANGODB_APPS_DIRECTORY}
   DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib)

 ################################################################################
-### @brief install systemd service file
+### @brief detect if we're on a systemd enabled system; if install unit file.
 ################################################################################
-if (${USE_ENTERPRISE})
-  configure_file (
-    FILES ${ARANGODB_SOURCE_DIR}/Installation/systemd/arangodb3.service.in
-    DESTINATION ${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3e.service
-    NEWLINE_STYLE UNIX)
-else()
+if (IS_DIRECTORY /usr/lib/systemd/system)
   configure_file (
     ${ARANGODB_SOURCE_DIR}/Installation/systemd/arangodb3.service.in
     ${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3.service
     NEWLINE_STYLE UNIX)
+  if (${USE_ENTERPRISE})
+    install(${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3.service
+      DESTINATION /usr/lib/systemd/system/arangodb3e.service)
+  else()
+    install(${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3.service
+      DESTINATION /usr/lib/systemd/system/arangodb3.service)
+  endif()
 endif()


Fixed detection of zlib and bzip2 und Linux

--- cmake/BALLConfigBoost.cmake
+++ cmake/BALLConfigBoost.cmake
@@ -1,5 +1,6 @@
-SET(BALL_BOOST_COMPONENTS system thread iostreams regex zlib bzip2)
+SET(BALL_BOOST_COMPONENTS system thread iostreams regex)
 if ( WIN32 )
+  LIST(APPEND BALL_BOOST_COMPONENTS zlib bzip2)
 	ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)
 	ADD_DEFINITIONS(-DBOOST_THREAD_USE_DLL)
 endif()


undef _GLIBCXX_USE_DEPRECATED

undef _GLIBCXX_USE_DEPRECATED

Signed-off-by: Étienne Schmitt <25d5031dc1a1d443222aec9a4e916501ae23c255@inria.fr>

--- cmake/CompilerOptions.cmake
+++ cmake/CompilerOptions.cmake
@@ -84,6 +84,7 @@
 		# _GLIBCXX_ASSERTIONS and _GLIBCXX_PARALLEL are not compatible on some systems.
 		add_flags(CMAKE_CXX_FLAGS_DEBUG "-D_GLIBCXX_ASSERTIONS")
 	endif()
+	remove_definitions("-D_GLIBCXX_USE_DEPRECATED")

 	# Enable SSE3 instruction set
 	add_flags(CMAKE_CXX_FLAGS "-msse3")


Improve find Fern code

Improve find Fern code

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -207,6 +207,14 @@
     if(NOT FERN_FOUND)
         message(FATAL_ERROR "Fern not found")
     endif()
+
+    include_directories(
+        SYSTEM
+        ${FERN_INCLUDE_DIRS}
+    )
+    list(APPEND DEVBASE_EXTERNAL_LIBRARIES
+        ${FERN_LIBRARIES}
+    )
 endif()


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(gloox VERSION 1.0.20-p1)
+hunter_config(gloox VERSION 1.0.20-p2)
 hunter_config(wdc VERSION 1.0.1-hunter-p1)
 hunter_config(pugixml VERSION 1.8.1)
 hunter_config(puffin-stream VERSION 0.2.2.0)


[CMake] Introduce "llvm_add_library(SHARED STATIC)" to build both shared lib and static lib simulataneously.

  llvm_add_library(foo SHARED STATIC
    DEPENDS <dependent targets...>
    LINK_LIBS <required libraries...>
    )

It generates both foo (foo.so) and foo_static(foo.a) and both of them depend on DEPENDS and LINK_LIBS.
Then, also obj.foo is generated. obj.foo depends on DEPENDS, but doesn't depend on LINK_LIBS.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -184,14 +184,18 @@
   cmake_parse_arguments(ARG
     "MODULE;SHARED;STATIC"
     "OUTPUT_NAME"
-    "ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS"
+    "ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS;OBJLIBS"
     ${ARGN})
   list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS})
   if(ARG_ADDITIONAL_HEADERS)
     # Pass through ADDITIONAL_HEADERS.
     set(ARG_ADDITIONAL_HEADERS ADDITIONAL_HEADERS ${ARG_ADDITIONAL_HEADERS})
   endif()
-  llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS} ${ARG_ADDITIONAL_HEADERS})
+  if(ARG_OBJLIBS)
+    set(ALL_FILES ${ARG_OBJLIBS})
+  else()
+    llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS} ${ARG_ADDITIONAL_HEADERS})
+  endif()

   if(ARG_MODULE)
     if(ARG_SHARED OR ARG_STATIC)
@@ -208,6 +212,36 @@
     if(NOT ARG_SHARED)
       set(ARG_STATIC TRUE)
     endif()
+  endif()
+
+  # Generate objlib
+  if(ARG_SHARED AND ARG_STATIC)
+    # Generate an obj library for both targets.
+    set(obj_name "obj.${name}")
+    add_library(${obj_name} OBJECT EXCLUDE_FROM_ALL
+      ${ALL_FILES}
+      )
+    llvm_update_compile_flags(${obj_name})
+    set(ALL_FILES "$<TARGET_OBJECTS:${obj_name}>")
+
+    set_target_properties(${obj_name} PROPERTIES FOLDER "Object Libraries")
+  endif()
+
+  if(ARG_SHARED AND ARG_STATIC)
+    # static
+    set(name_static "${name}_static")
+    if(ARG_OUTPUT_NAME)
+      set(output_name OUTPUT_NAME "${ARG_OUTPUT_NAME}_static")
+    endif()
+    # DEPENDS has been appended to LLVM_COMMON_LIBS.
+    llvm_add_library(${name_static} STATIC
+      ${output_name}
+      OBJLIBS ${ALL_FILES} # objlib
+      LINK_LIBS ${ARG_LINK_LIBS}
+      LINK_COMPONENTS ${ARG_LINK_COMPONENTS}
+      )
+    # FIXME: Add name_static to anywhere in TARGET ${name}'s PROPERTY.
+    set(ARG_STATIC)
   endif()

   if(ARG_MODULE)


Yet another attempt at getting cmake-clang-i686-mingw32 green.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -44,7 +44,7 @@
       DEPENDS ${export_file}
       VERBATIM
       COMMENT "Creating export file for ${target_name}")
-    if(CYGWIN)
+    if(CYGWIN OR MINGW)
       set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                    LINK_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/symbol.def")
     else()


[CMake] Fixing bots

[CMake] Fixing bots

CMake calls to set_property with APPEND string need to have a leading space.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -668,7 +668,7 @@
     set_target_properties(${target} PROPERTIES ENABLE_EXPORTS 1)
     if (APPLE)
       set_property(TARGET ${target} APPEND_STRING PROPERTY
-        LINK_FLAGS "-rdynamic")
+        LINK_FLAGS " -rdynamic")
     endif()
   endif()
 endfunction()


enh: Do not auto-hide/show DEPENDS_<Pkg>_DIR variables [BASIS]

--- CMake/Basis/CommonTools.cmake
+++ CMake/Basis/CommonTools.cmake
@@ -794,14 +794,6 @@
           message (STATUS "${_BFP_STATUS}")
         endif ()
         unset (_BFP_STATUS)
-        # show/hide DEPENDS_<PKG>_DIR in GUI
-        if (DEPENDS_${PKG}_DIR
-            OR (NOT _BFP_ARGN_REQUIRED AND NOT WITH_${PKG})
-            OR (DEFINED USE_${PKG}     AND NOT USE_${PKG}))
-          mark_as_advanced (FORCE DEPENDS_${PKG}_DIR)
-        else ()
-          mark_as_advanced (CLEAR DEPENDS_${PKG}_DIR)
-        endif ()
         # raise error when a required package was not found
         if (NOT ${PKG}_FOUND AND NOT _BFP_ARGN_NO_NOTFOUND_ERROR AND (_BFP_ARGN_REQUIRED OR WITH_${PKG}))
           set (_BFP_ERROR)


COMP: Update ITKModuleExternal CMake message to avoid CTest false positive

This commit updates message introduced in 4b010e724 (ENH: use the new
CMake mechanism to specify MSVC's static or DLL CRT) to avoid false
positive when building module like ITKUltrasound as a standalone project.

Removing the "error" string avoid the regular expression associated
with cmCTestBuildHandler.cxx (see [1]) from reporting an error.

[1] https://github.com/Kitware/CMake/blob/7dc7907837a8ce4608f8cc762409617e62c496fe/Source/CTest/cmCTestBuildHandler.cxx#L28-L169

Co-authored-by: Connor Bowley <813bbb54c68361d610205b2aa71ea73b4ffd79ea@kitware.com>
Co-authored-by: James Fishbaugh <3b5d97b7e78003a24178ddfc992ae5d14b44bcbf@kitware.com>
Co-authored-by: Sam Horvath <c1de7a0d9a2a5ca35b32d46a4318780356b2af1a@kitware.com>

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -12,7 +12,7 @@
   message(WARNING "cmake_minimum_required must be at least 3.16.3")
   message(STATUS "This is needed to allow proper setting of CMAKE_MSVC_RUNTIME_LIBRARY.")
   message(STATUS "Do not be surprised if you run into link errors of the style:
-  error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_Static' doesn't match value 'MDd_Dynamic' in module.obj")
+  LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_Static' doesn't match value 'MDd_Dynamic' in module.obj")
 endif()
 if(NOT EXISTS ${ITK_CMAKE_DIR}/ITKModuleMacros.cmake)
   message(FATAL_ERROR "Modules can only be built against an ITK build tree; they cannot be built against an ITK install tree.")


changed the revision tag for MITK Data

changed the revision tag for MITK Data

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 569c8296) # first 8 characters of hash-tag
+  set(revision_tag cc24c409) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Fix libyaml version in configure.

Fix libyaml version in configure.

--- cmake/Modules/Findlibyaml.cmake
+++ cmake/Modules/Findlibyaml.cmake
@@ -1,10 +1,10 @@
 find_package(PkgConfig)
-pkg_check_modules(PC_libyaml libyaml>=2.7)
+pkg_check_modules(PC_libyaml libyaml>=0.1.6)

 find_path(libyaml_INCLUDE_DIR yaml.h
           HINTS ${PC_libyaml_INCLUDEDIR} ${PC_libyaml_INCLUDE_DIRS})

-find_library(libyaml_LIBRARY NAMES libyaml
+find_library(libyaml_LIBRARY NAMES yaml libyaml
              HINTS ${PC_libyaml_LIBDIR} ${PC_libyaml_LIBRARY_DIRS} )

 set(libyaml_LIBRARIES ${libyaml_LIBRARY})


Use post-build event for hex() function

Use post-build event for hex() function

--- cmake/distortos-utilities.cmake
+++ cmake/distortos-utilities.cmake
@@ -55,15 +55,14 @@
 endfunction()

 #
-# Converts ELF file named `elfFilename` to Intel HEX file named `hexFilename`.
+# Converts output file of `target` to Intel HEX file named `hexFilename`.
 #

-function(hex elfFilename hexFilename)
-	add_custom_command(OUTPUT ${hexFilename}
-			COMMAND ${CMAKE_OBJCOPY} -O ihex ${elfFilename} ${hexFilename}
-			DEPENDS ${elfFilename}
-			USES_TERMINAL)
-	add_custom_target(${elfFilename}-to-${hexFilename} ALL DEPENDS ${hexFilename})
+function(hex target hexFilename)
+	add_custom_command(TARGET ${target} POST_BUILD
+			COMMAND ${CMAKE_OBJCOPY} -O ihex $<TARGET_FILE:${target}> ${hexFilename}
+			BYPRODUCTS ${hexFilename}
+			VERBATIM)
 endfunction()

 #


Second part for ROOT-6208

Second part for ROOT-6208

--- cmake/modules/FindPythia8.cmake
+++ cmake/modules/FindPythia8.cmake
@@ -44,9 +44,4 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Pythia8 DEFAULT_MSG PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
 mark_as_advanced(PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
-
-if(PYTHIA8_FOUND)
-  file(READ ${PYTHIA8_INCLUDE_DIR}/../xmldoc/Version.xml versionstr)
-  string(REGEX REPLACE ".*Pythia:versionNumber.*default.*[0-9][.]([0-9]+).*" "\\1" PYTHIA8_VERSION "${versionstr}")
-endif()
-
+


[Concurrency] Fix Android ARMv7 C libdispatch build (#35905)

For cross-compiling Android one can simply provide
CMAKE_ANDROID_ARCH_ABI and the right CMAKE_SYSTEM_PROCESSOR will be
chosen by CMake. Since the SDK arch names are not the expected ones by the Android NDK,
it is better not to use them. The change should keep sending the
CMAKE_SYSTEM_PROCESSOR for SDKs that are not ANDROID, while skipping it
for the ANDROID SDKs.

--- cmake/modules/Libdispatch.cmake
+++ cmake/modules/Libdispatch.cmake
@@ -65,6 +65,10 @@
   foreach(arch ${ARCHS})
     set(LIBDISPATCH_VARIANT_NAME "libdispatch-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")

+    if(NOT sdk STREQUAL ANDROID)
+      set(SWIFT_LIBDISPATCH_SYSTEM_PROCESSOR  -DCMAKE_SYSTEM_PROCESSOR=${arch})
+    endif()
+
     ExternalProject_Add("${LIBDISPATCH_VARIANT_NAME}"
                         SOURCE_DIR
                           "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE}"
@@ -81,7 +85,7 @@
                           -DCMAKE_RANLIB=${CMAKE_RANLIB}
                           -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
                           -DCMAKE_SYSTEM_NAME=${SWIFT_SDK_${sdk}_NAME}
-                          -DCMAKE_SYSTEM_PROCESSOR=${arch}
+                          ${SWIFT_LIBDISPATCH_SYSTEM_PROCESSOR}
                           "-DCMAKE_ANDROID_NDK=${SWIFT_ANDROID_NDK_PATH}"
                           -DCMAKE_ANDROID_ARCH_ABI=${SWIFT_SDK_ANDROID_ARCH_${arch}_ABI}
                           -DCMAKE_ANDROID_API=${SWIFT_ANDROID_API_LEVEL}
@@ -157,7 +161,7 @@
                             -DCMAKE_RANLIB=${CMAKE_RANLIB}
                             -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
                             -DCMAKE_SYSTEM_NAME=${SWIFT_SDK_${sdk}_NAME}
-                            -DCMAKE_SYSTEM_PROCESSOR=${arch}
+                            ${SWIFT_LIBDISPATCH_SYSTEM_PROCESSOR}
                             "-DCMAKE_ANDROID_NDK=${SWIFT_ANDROID_NDK_PATH}"
                             -DCMAKE_ANDROID_ARCH_ABI=${SWIFT_SDK_ANDROID_ARCH_${arch}_ABI}
                             -DCMAKE_ANDROID_API=${SWIFT_ANDROID_API_LEVEL}


BUG: DUSE_BRAINSABC was set to 'OF' instead of 'OFF'

--- SuperBuild/External_BRAINSTools.cmake
+++ SuperBuild/External_BRAINSTools.cmake
@@ -111,7 +111,7 @@
       -DZLIB_ROOT:PATH=${zlib_DIR}
       -DZLIB_INCLUDE_DIR:PATH=${zlib}_DIR}/include
       -DZLIB_LIBRARY:FILEPATH=${ZLIB_LIBRARY}
-      -DUSE_BRAINSABC:BOOL=OF
+      -DUSE_BRAINSABC:BOOL=OFF
       -DUSE_BRAINSConstellationDetector:BOOL=OFF
       -DUSE_BRAINSContinuousClass:BOOL=OFF
       -DUSE_BRAINSCut:BOOL=OFF


fbcode_builder: minor style cleanup in ThriftCppLibrary.cmake

Summary:
Add explicit double quotes around arguments that are intended to be exactly a
single parameter.  Also line wrap to 80 characters.

Reviewed By: wez

Differential Revision: D16738443

fbshipit-source-id: b8c9b6d50da72b44e23eaf5effbc384b6cbbc1c0

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -17,7 +17,11 @@
   )

   # Generate relative paths in #includes
-  file(RELATIVE_PATH include_prefix ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE})
+  file(
+    RELATIVE_PATH include_prefix
+    "${CMAKE_SOURCE_DIR}"
+    "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
+  )
   get_filename_component(include_prefix ${include_prefix} DIRECTORY)

   if (NOT "${include_prefix}" STREQUAL "")
@@ -29,33 +33,33 @@

   # Compute the list of generated files
   list(APPEND generated_headers
-    ${output_dir}/gen-cpp2/${base}_constants.h
-    ${output_dir}/gen-cpp2/${base}_constants.cpp
-    ${output_dir}/gen-cpp2/${base}_types.h
-    ${output_dir}/gen-cpp2/${base}_types.tcc
-    ${output_dir}/gen-cpp2/${base}_types_custom_protocol.h
+    "${output_dir}/gen-cpp2/${base}_constants.h"
+    "${output_dir}/gen-cpp2/${base}_constants.cpp"
+    "${output_dir}/gen-cpp2/${base}_types.h"
+    "${output_dir}/gen-cpp2/${base}_types.tcc"
+    "${output_dir}/gen-cpp2/${base}_types_custom_protocol.h"
   )
   list(APPEND generated_sources
-    ${output_dir}/gen-cpp2/${base}_data.h
-    ${output_dir}/gen-cpp2/${base}_data.cpp
-    ${output_dir}/gen-cpp2/${base}_types.cpp
+    "${output_dir}/gen-cpp2/${base}_data.h"
+    "${output_dir}/gen-cpp2/${base}_data.cpp"
+    "${output_dir}/gen-cpp2/${base}_types.cpp"
   )
   foreach(service IN LISTS ARG_SERVICES)
     list(APPEND generated_headers
-      ${output_dir}/gen-cpp2/${service}.h
-      ${output_dir}/gen-cpp2/${service}.tcc
-      ${output_dir}/gen-cpp2/${service}AsyncClient.h
-      ${output_dir}/gen-cpp2/${service}_custom_protocol.h
+      "${output_dir}/gen-cpp2/${service}.h"
+      "${output_dir}/gen-cpp2/${service}.tcc"
+      "${output_dir}/gen-cpp2/${service}AsyncClient.h"
+      "${output_dir}/gen-cpp2/${service}_custom_protocol.h"
     )
     list(APPEND generated_sources
-      ${output_dir}/gen-cpp2/${service}.cpp
-      ${output_dir}/gen-cpp2/${service}AsyncClient.cpp
-      ${output_dir}/gen-cpp2/${service}_processmap_binary.cpp
-      ${output_dir}/gen-cpp2/${service}_processmap_compact.cpp
+      "${output_dir}/gen-cpp2/${service}.cpp"
+      "${output_dir}/gen-cpp2/${service}AsyncClient.cpp"
+      "${output_dir}/gen-cpp2/${service}_processmap_binary.cpp"
+      "${output_dir}/gen-cpp2/${service}_processmap_compact.cpp"
     )
   endforeach()

-  list(APPEND thrift_include_options -I ${CMAKE_SOURCE_DIR})
+  list(APPEND thrift_include_options -I "${CMAKE_SOURCE_DIR}")
   foreach(depends IN LISTS ARG_DEPENDS)
     get_property(thrift_include_directory
       TARGET ${depends}
@@ -64,14 +68,17 @@
     if (thrift_include_directory STREQUAL "")
       message(STATUS "No thrift dependency found for ${depends}")
     else()
-      list(APPEND thrift_include_options -I
-        ${thrift_include_directory})
+      list(
+        APPEND thrift_include_options
+        -I "${thrift_include_directory}"
+      )
     endif()
   endforeach()

   file(
     GLOB_RECURSE THRIFT_TEMPLATE_FILES
-    FOLLOW_SYMLINKS ${FBTHRIFT_TEMPLATES_DIR}/*.mustache)
+    FOLLOW_SYMLINKS "${FBTHRIFT_TEMPLATES_DIR}/*.mustache"
+  )

   # Emit the rule to run the thrift compiler
   add_custom_command(
@@ -79,25 +86,26 @@
       ${generated_headers}
       ${generated_sources}
     COMMAND
-      ${CMAKE_COMMAND} -E make_directory ${output_dir}
+      "${CMAKE_COMMAND}" -E make_directory "${output_dir}"
     COMMAND
-      ${FBTHRIFT_COMPILER}
+      "${FBTHRIFT_COMPILER}"
       --strict
-      --templates ${FBTHRIFT_TEMPLATES_DIR}
+      --templates "${FBTHRIFT_TEMPLATES_DIR}"
       --gen "mstch_cpp2:${GEN_ARG_STR}"
       ${thrift_include_options}
-      -o ${output_dir}
-      ${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}
+      -o "${output_dir}"
+      "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
     WORKING_DIRECTORY
-      ${CMAKE_BINARY_DIR}
+      "${CMAKE_BINARY_DIR}"
     MAIN_DEPENDENCY
-      ${THRIFT_FILE}
+      "${THRIFT_FILE}"
     DEPENDS
       ${ARG_DEPENDS}
   )

   # Now emit the library rule to compile the sources
-  add_library(${LIB_NAME} STATIC
+  add_library(
+    "${LIB_NAME}" STATIC
     ${generated_sources}
   )

@@ -107,7 +115,7 @@
   )

   target_include_directories(
-    ${LIB_NAME}
+    "${LIB_NAME}"
     PRIVATE
       ${CMAKE_SOURCE_DIR}
       ${CMAKE_BINARY_DIR}
@@ -116,7 +124,7 @@
       ${FBTHRIFT_INCLUDE_DIR}
   )
   target_link_libraries(
-    ${LIB_NAME}
+    "${LIB_NAME}"
     PUBLIC
       ${ARG_DEPENDS}
       FBThrift::thriftcpp2
@@ -124,13 +132,13 @@
   )

   set_target_properties(
-    ${LIB_NAME}
+    "${LIB_NAME}"
     PROPERTIES
       EXPORT_PROPERTIES "THRIFT_INCLUDE_DIRECTORY"
-      THRIFT_INCLUDE_DIRECTORY ${CMAKE_SOURCE_DIR}
+      THRIFT_INCLUDE_DIRECTORY "${CMAKE_SOURCE_DIR}"
   )

   get_property(thrift_include_directory
-    TARGET ${LIB_NAME}
+    TARGET "${LIB_NAME}"
     PROPERTY THRIFT_INCLUDE_DIRECTORY)
 endfunction()


Set OSX_SDK_VERSION on Apple for non-Xcode toolchains

--- os/osx.cmake
+++ os/osx.cmake
@@ -5,6 +5,15 @@
   return()
 else()
   set(POLLY_OS_OSX_CMAKE_ 1)
+endif()
+
+# Toolchain can be loaded from Linux too (e.g. by libcxx or gcc)
+if(NOT APPLE)
+  return()
+endif()
+
+if(IOS)
+  polly_fatal_error("Not for iOS")
 endif()

 # find 'osx' root
@@ -29,6 +38,20 @@

 polly_status_debug("Developer root: ${XCODE_DEVELOPER_ROOT}")

+string(COMPARE EQUAL "${OSX_SDK_VERSION}" "" _is_empty)
+if(_is_empty)
+  execute_process(
+      COMMAND xcrun --show-sdk-version
+      RESULT_VARIABLE _result
+      OUTPUT_VARIABLE OSX_SDK_VERSION
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+  if(NOT _result EQUAL 0)
+    polly_fatal_error("'xcrun --show-sdk-version' failed")
+  endif()
+endif()
+
 set(
     CMAKE_OSX_SYSROOT
     "${XCODE_DEVELOPER_ROOT}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk"


COMP: Specify dependency on ITKThreshold

--- itk-module.cmake
+++ itk-module.cmake
@@ -36,6 +36,7 @@
     ITKStatistics
     ITKSpatialObjects
     ITKTransform
+    ITKThresholding
     ITKVTK
     MinimalPathExtraction
   COMPILE_DEPENDS


FindSilicium.cmake: the include dir was wrong

--- cmake/FindSilicium.cmake
+++ cmake/FindSilicium.cmake
@@ -4,7 +4,7 @@
 #  LIBSILICIUM_INCLUDE_DIRS
 #  LIBSILICIUM_LIBRARIES

-find_path(LIBSILICIUM_INCLUDE_DIR "version.hpp" HINTS "/usr/local/include/silicium" "/usr/include/silicium")
+find_path(LIBSILICIUM_INCLUDE_DIR "silicium/version.hpp" HINTS "/usr/local/include" "/usr/include")
 find_library(LIBSILICIUM_LIBRARY "libsilicium.a" HINTS "/usr/local/lib" "/usr/lib")

 set(LIBSILICIUM_LIBRARIES ${LIBSILICIUM_LIBRARY})


Github #226 Use correct paths returned by FindBoost.cmake

According to the documentation in FindBoost.cmake these
are the correct output variables.

Change-Id: If56874aaafe1577888f73719f0a493088d1ac531
Signed-off-by: Matthew Bentham <286076deec2404ae356dd8bc92f2f71e81044bd4@arm.com>

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -108,8 +108,8 @@
 add_definitions("-DBOOST_ALL_NO_LIB") # Turn off auto-linking as we specify the libs manually
 set(Boost_USE_STATIC_LIBS ON)
 find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework system filesystem log program_options)
-include_directories(SYSTEM "${Boost_INCLUDE_DIR}")
-link_directories(${Boost_LIBRARY_DIR})
+include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
+link_directories(${Boost_LIBRARY_DIRS})

 # pthread
 find_package (Threads)


Update clang format file

Update clang format file

--- cmake/clang-format.cmake
+++ cmake/clang-format.cmake
@@ -2,7 +2,7 @@
 include("functions")

 # get_all_cpp_files2(ALL_PROJECT_CPP_FILES)
-get_all_cpp_files(ALL_PROJECT_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/external;${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}/tools/firmware-update/33u/lib;${CMAKE_CURRENT_SOURCE_DIR}/src/include/;${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms;")
+get_all_cpp_files(ALL_PROJECT_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/external;${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}/tools/firmware-update/33u/lib;${CMAKE_CURRENT_SOURCE_DIR}/src/lib;")

 add_custom_target(clang-format
   COMMAND clang-format -i


build: curl depends on openssl

build: curl depends on openssl

Co-authored-by: Lorenzo Fontana <638e8f0171575864326f06d2a5f8e72287427b15@linux.com>
Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>

--- cmake/modules/cURL.cmake
+++ cmake/modules/cURL.cmake
@@ -18,11 +18,18 @@
   set(CURL_BUNDLE_DIR "${PROJECT_BINARY_DIR}/curl-prefix/src/curl")
   set(CURL_INCLUDE_DIR "${CURL_BUNDLE_DIR}/include/")
   set(CURL_LIBRARIES "${CURL_BUNDLE_DIR}/lib/.libs/libcurl.a")
-  set(CURL_SSL_OPTION "--with-ssl")
-  message(STATUS "Using bundled curl in '${CURL_BUNDLE_DIR}'")

-  ExternalProject_Add(
+  if(NOT USE_BUNDLED_OPENSSL)
+    set(CURL_SSL_OPTION "--with-ssl")
+  else()
+    set(CURL_SSL_OPTION "--with-ssl=${OPENSSL_INSTALL_DIR}")
+    message(STATUS "Using bundled curl in '${CURL_BUNDLE_DIR}'")
+    message(STATUS "Using SSL for curl in '${CURL_SSL_OPTION}'")
+  endif()
+
+  externalproject_add(
     curl
+    DEPENDS openssl
     # START CHANGE for CVE-2017-8816, CVE-2017-8817, CVE-2017-8818, CVE-2018-1000007
     URL "https://s3.amazonaws.com/download.draios.com/dependencies/curl-7.61.0.tar.bz2"
     URL_MD5 "31d0a9f48dc796a7db351898a1e5058a"


fixed aggregate headers (using “VERBATIM” tag on add_custom_command)

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@7805 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/new_lcmtypes.cmake
+++ cmake/new_lcmtypes.cmake
@@ -24,6 +24,11 @@
 #          add_lcm() for all .lcm files in that directory.  For backwards
 #          compatibility, the default value is
 #             LCMTYPES_SEARCHDIR=CMAKE_SOURCE_DIR/lcmtypes
+#          This has the drawback that new LCM files will not be added to the
+#          build until cmake runs again.  The recommended best practice is to
+#          use add_lcmtype and not rely on the search, but manually calling
+#             unset(LCMTYPES_SEARCHDIR)
+#          after include(lcmtypes.cmake) and before lcmtypes_build.
 #
 #          After invoking this macro, the following variables will be set:
 #             LCMTYPES_INCLUDE_DIR
@@ -90,6 +95,7 @@

 set(LCMTYPES_DIR ${CMAKE_CURRENT_BINARY_DIR}/lcmtypes)
 execute_process(COMMAND mkdir -p ${LCMTYPES_DIR})
+include_directories(${LCMTYPES_DIR})

 set(LCMTYPES_SEARCHDIR ${CMAKE_SOURCE_DIR}/lcmtypes)

@@ -109,20 +115,21 @@

     # create a header file aggregating all of the autogenerated .h files
     set(__agg_h_fname "${LCMTYPES_DIR}/${__sanitized_project_name}.h")
-    set(__h_str "#ifndef __lcmtypes_${__sanitized_project_name}_h__\n
-    		 #define __lcmtypes_${__sanitized_project_name}_h__\n\n")
+    set(__h_str "#ifndef __lcmtypes_${__sanitized_project_name}_h__\\n#define __lcmtypes_${__sanitized_project_name}_h__\\n\\n")
     foreach(c_file ${LCMTYPES_C_SOURCEFILES})
       string(REGEX REPLACE ".c$" ".h" h_file ${c_file})
       file(RELATIVE_PATH __tmp_path ${LCMTYPES_DIR} ${h_file})
-      set(__h_str "${__h_str}#include \"${__tmp_path}\"\n")
+      set(__h_str "${__h_str}#include \"${__tmp_path}\"\\n")
       get_filename_component(__tmp_dir ${__tmp_path} PATH)
       install(FILES ${h_file} DESTINATION "include/lcmtypes/${__tmp_dir}")
     endforeach()
-    set(__h_str "${__h_str}\n#endif\n")
+    set(__h_str "${__h_str}\\n#endif\\n")
+    message(STATUS "${__h_str}")

     add_custom_command(OUTPUT ${__agg_h_fname}
-      COMMAND echo "${__h_str}" ">" "${__agg_h_fname}"
+      COMMAND echo "${__h_str}" ">" "${__agg_h_fname}"
       DEPENDS ${LCMTYPES_CPP_SOURCEFILES}
+      VERBATIM
     )

     # add a custom target to force generation of aggregate h file
@@ -148,19 +155,19 @@
   if (LCMTYPES_CPP_HEADERFILES)
     # create a header file aggregating all of the autogenerated .hpp files
     set(__agg_hpp_fname "${LCMTYPES_DIR}/${__sanitized_project_name}.hpp")
-    set(__hpp_str "#ifndef __lcmtypes_${__sanitized_project_name}_hpp__\n
-    		 #define __lcmtypes_${__sanitized_project_name}_hpp__\n\n")
+    set(__hpp_str "#ifndef __lcmtypes_${__sanitized_project_name}_hpp__\\n#define __lcmtypes_${__sanitized_project_name}_hpp__\\n\\n")
     foreach(hpp_file ${LCMTYPES_CPP_HEADERFILES})
       file(RELATIVE_PATH __tmp_path ${LCMTYPES_DIR} ${hpp_file})
-      set(__hpp_str "${__hpp_str}#include \"${__tmp_path}\"\n")
+      set(__hpp_str "${__hpp_str}#include \"${__tmp_path}\"\\n")
       get_filename_component(__tmp_dir ${__tmp_path} PATH)
       install(FILES ${hpp_file} DESTINATION "include/lcmtypes/${__tmp_dir}")
     endforeach()
-    set(__hpp_str "${__hpp_str}\n#endif\n")
+    set(__hpp_str "${__hpp_str}\\n#endif\\n")

     add_custom_command(OUTPUT ${__agg_hpp_fname}
       COMMAND echo "${__hpp_str}" ">" "${__agg_hpp_fname}"
       DEPENDS ${LCMTYPES_CPP_HEADERFILES}
+      VERBATIM
     )

     # add a custom target to force generation of aggregate hpp


cmake: Work towards LTO on GCC

cmake: Work towards LTO on GCC

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -56,12 +56,28 @@
 if (undefined_san)
   set(CAPABS "${CAPABS} -fsanitize=undefined -fno-sanitize=vptr")
 endif()
-if (thin_lto)
-  set(CMAKE_LINKER "ld.lld")
-  set(OPTIMIZE "${OPTIMIZE} -flto=thin -fuse-ld=lld")
-elseif (full_lto)
-  set(CMAKE_LINKER "ld.lld")
-  set(OPTIMIZE "${OPTIMIZE} -flto=full")
+
+if (thin_lto OR full_lto)
+  if (thin_lto)
+    set(OPTIMIZE "${OPTIMIZE} -flto=thin -fuse-ld=lld")
+  elseif (full_lto)
+    set(OPTIMIZE "${OPTIMIZE} -flto=full")
+  endif()
+  if (CMAKE_COMPILER_IS_CLANG)
+    set(CMAKE_LINKER "ld.lld")
+  elseif (CMAKE_COMPILER_IS_GNUCC)
+    execute_process(COMMAND ${CMAKE_C_COMPILER} --print-file-name liblto_plugin.so OUTPUT_VARIABLE LTO_PLUGiN OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process(COMMAND ${CMAKE_C_COMPILER} --print-file-name lto-wrapper OUTPUT_VARIABLE LTO_WRAPPER OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process(COMMAND ${CMAKE_C_COMPILER} --print-file-name collect2 OUTPUT_VARIABLE GCC_COLLECT OUTPUT_STRIP_TRAILING_WHITESPACE)
+    message(STATUS "Linker plugin: ${LTO_PLUGiN}, wrapper: ${LTO_WRAPPER}")
+    message(STATUS "LTO wrapper: ${LTO_WRAPPER}")
+    set(ENV{COLLECT_GCC} "${GCC_COLLECT}")
+    set(ENV{COLLECT_LTO_WRAPPER} "${LTO_WRAPPER}")
+    message(STATUS "COLLECT_GCC=$ENV{COLLECT_GCC}")
+    set(CMAKE_LINKER "gold")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -plugin ${LTO_PLUGiN} -plugin-opt ${LTO_WRAPPER} -plugin-opt -fresolution=40")
+    message(STATUS "Linker is now: ${CMAKE_LINKER}")
+  endif()
 endif()

 if (CMAKE_COMPILER_IS_GNUCC)
@@ -248,7 +264,7 @@
 set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> -o <TARGET> <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES>")

 set(BUILD_SHARED_LIBRARIES OFF)
-set(CMAKE_EXE_LINKER_FLAGS "-static")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")

 set(LD_STRIP)
 if (NOT debug)


CoTech #79 decision: switch off C++0x/C++11 feature by default for SALOME 7x

--- salome_adm/cmake_files/SalomeSetupPlatform.cmake
+++ salome_adm/cmake_files/SalomeSetupPlatform.cmake
@@ -166,6 +166,9 @@
   ENDIF()
 ENDIF()

+IF(NOT DEFINED NO_CXX11_SUPPORT)
+  SET(NO_CXX11_SUPPORT ON)
+ENDIF()
 IF(NOT NO_CXX11_SUPPORT)
   # C++11 support
   INCLUDE(CheckCXXCompilerFlag)


fix misleading comment

fix misleading comment

--- cmake/ElmConfig.cmake
+++ cmake/ElmConfig.cmake
@@ -42,13 +42,13 @@
 # Are we in install prefix or in a build directory?
 if(EXISTS ${PARENT_DIR}/modules AND IS_DIRECTORY ${PARENT_DIR}/modules)

-	# install prefix
+	#build directory
 	set(Elm_INCLUDE_DIRS ${PARENT_DIR}/modules)
 	set(Elm_LIB_DIR ${PARENT_DIR}/lib)

 elseif(EXISTS ${PARENT_DIR}/../include AND IS_DIRECTORY ${PARENT_DIR}/../include)

-	#build directory
+	# install prefix
 	set(Elm_INCLUDE_DIRS ${PARENT_DIR}/../include)
 	set(Elm_LIB_DIR ${PARENT_DIR}/../lib)


devenv: Fix find_package(LibUV) script

devenv: Fix find_package(LibUV) script

Linking with libuv On Ubuntu 14.04 amd64 produces undefined symbol error
for pthread_rwlock_trywrlock function. Adding -lpthread resolves the
issue.

--- cmake/FindLibUV.cmake
+++ cmake/FindLibUV.cmake
@@ -109,6 +109,11 @@
   list(APPEND LIBUV_LIBRARIES ws2_32)
 endif()

+check_library_exists(pthread pthread_rwlock_trywrlock "pthread.h" HAVE_PTHREAD)
+if(HAVE_PTHREAD)
+  list(APPEND LIBUV_LIBRARIES pthread)
+endif()
+
 include(FindPackageHandleStandardArgs)

 # handle the QUIETLY and REQUIRED arguments and set LIBUV_FOUND to TRUE


[cmake] added missing defines to GridUtils

--- cmake/GridUtils.cmake
+++ cmake/GridUtils.cmake
@@ -8,6 +8,16 @@
 SET( GRIDDIM
 	"2" CACHE STRING
 	"GRIDDIM" )
+
+if(${GRIDTYPE} MATCHES "YASPGRID")
+	add_definitions( "-D${GRIDTYPE}" )
+	add_definitions( "-DGRIDDIM=${GRIDDIM}" )
+endif(${GRIDTYPE} MATCHES "YASPGRID")
+
+if(${GRIDTYPE} MATCHES "SGRID")
+	add_definitions( "-D${GRIDTYPE}" )
+	add_definitions( "-DGRIDDIM=${GRIDDIM}" )
+endif(${GRIDTYPE} MATCHES "SGRID")

 set( ENABLE_UG OFF )
 if( ${GRIDTYPE} MATCHES "UGGRID" )
@@ -20,6 +30,8 @@
   # because those listed in lubug.pc are wrong
   set( GRIDLIBS ugS2 ugS3 devS m )
   add_definitions( "-DENABLE_UG=1" )
+	add_definitions( "-D${GRIDTYPE}" )
+	add_definitions( "-DGRIDDIM=${GRIDDIM}" )
 endif( ${GRIDTYPE} MATCHES "UGGRID" )

 SET( ENABLE_ALUGRID OFF )
@@ -36,6 +48,8 @@
 		include_sys_dir( ${ALUGRID_BASE_PATH}/include/parallel )
 	endif( ENABLE_MPI )
 	add_definitions( "-DENABLE_ALUGRID=1" )
+	add_definitions( "-D${GRIDTYPE}" )
+	add_definitions( "-DGRIDDIM=${GRIDDIM}" )
 endif( ${GRIDTYPE} MATCHES "ALUGRID" )

 #SET( ENABLE_ALBERTA OFF )


SafeStack: Adjust condition for COMPILER_RT_HAS_SAFESTACK to fix sanitizer builds.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -337,7 +337,7 @@
   set(COMPILER_RT_HAS_MSSE3_FLAG FALSE)
 endif()

-if (SAFESTACK_SUPPORTED_ARCH AND
+if (COMPILER_RT_HAS_SANITIZER_COMMON AND SAFESTACK_SUPPORTED_ARCH AND
     OS_NAME MATCHES "Darwin|Linux|FreeBSD")
   set(COMPILER_RT_HAS_SAFESTACK TRUE)
 else()


disabled test box

disabled test box

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

--- cmake/dep_graph.cmake
+++ cmake/dep_graph.cmake
@@ -22,4 +22,9 @@
         endforeach(_dep)
       endif()
     endforeach(_ss)
+
+    #file(APPEND ${_dot_file}
+    #    "  \"test\" [style=\"filled\" fillcolor=\"#A3A27C\" shape=\"box\"];\n ")
+    file(APPEND ${_dot_file} "}\n")
 endfunction(MAKE_DEP_GRAPH)
+


scyconfig.h path fix

scyconfig.h path fix

--- cmake/LibSourceyIncludes.cmake
+++ cmake/LibSourceyIncludes.cmake
@@ -215,6 +215,7 @@

   include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
   include_directories(${LibSourcey_INCLUDE_DIRS})
+  include_directories(${CMAKE_BINARY_DIR})
   link_directories(${LibSourcey_LIBRARY_DIRS})
 endmacro()


Update FindMATLAB.cmake

Update FindMATLAB.cmake

There are two problems with `readlink`:
1) it might give a path relative to the symlink location,
2) if matlab bin directory is in $PATH it will yield nothing.
The use of `realpath` solves both of them.

--- cmake/modules/FindMATLAB.cmake
+++ cmake/modules/FindMATLAB.cmake
@@ -93,7 +93,7 @@
     IF (MATLAB_BIN_EXISTS)
       execute_process(
         COMMAND which matlab
-        COMMAND xargs readlink
+        COMMAND xargs realpath
         COMMAND xargs dirname
         COMMAND xargs dirname
         COMMAND xargs echo -n


Qt 5.9 sources for Linux

Qt 5.9 sources for Linux

--- cmake/projects/Qt/hunter.cmake
+++ cmake/projects/Qt/hunter.cmake
@@ -215,16 +215,29 @@
     d902b7df94219d2ed2f5c868839c85ce9daa056a
 )

-hunter_add_version(
-    PACKAGE_NAME
-    Qt
-    VERSION
-    "5.9.1"
-    URL
-    "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.zip"
-    SHA1
-    bdac47fdcf6dd502a123eb403bb4260542f91034
-)
+if(WIN32)
+  hunter_add_version(
+      PACKAGE_NAME
+      Qt
+      VERSION
+      "5.9.1"
+      URL
+      "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.zip"
+      SHA1
+      bdac47fdcf6dd502a123eb403bb4260542f91034
+  )
+else()
+  hunter_add_version(
+      PACKAGE_NAME
+      Qt
+      VERSION
+      "5.9.1"
+      URL
+      "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.tar.xz"
+      SHA1
+      8b9900cece0a18cf23d53a42379a628a1c1330ae
+  )
+endif()

 hunter_cacheable(Qt)