added: config workaround for clang 3.4+ and boost < 1.56 (upd)

--- share/hugh/cmake/CMakeAddons_SetupVariables.cmake
+++ share/hugh/cmake/CMakeAddons_SetupVariables.cmake
@@ -55,11 +55,12 @@

 # [https://stackoverflow.com/questions/22476267]
 # [https://svn.boost.org/trac/boost/ticket/9610]
-cma_print_variable(Boost_VERSION)
-cma_print_variable(CMAKE_CXX_COMPILER_ID)
-cma_print_variable(CMAKE_CXX_COMPILER_VERSION)
 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "CLANG" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3)
   find_package(Boost ${BOOST_MINIMUM_VERSION} QUIET)
+
+  cma_print_variable(CMAKE_CXX_COMPILER_ID)
+  cma_print_variable(CMAKE_CXX_COMPILER_VERSION)
+  cma_print_variable(Boost_VERSION)

   if (Boost_VERSION VERSION_LESS 105060)
     message(STATUS "Adding CLANG 3.4+/boost < 1.65 workaround")


Strengthened the gmp version check

Strengthened the gmp version check

--- cmake/FindGMP.cmake
+++ cmake/FindGMP.cmake
@@ -29,15 +29,25 @@
 if (GMP_HEADERS AND GMP_LIB)
   # Find gmp version
   file(STRINGS "${GMP_HEADERS}/gmp.h" gmp_major REGEX "__GNU_MP_VERSION[ \t]+([0-9]+)")
-  string(REGEX REPLACE "[^ \t]*[ \t]+__GNU_MP_VERSION[ \t]+([0-9]+)" "\\1" gmp_major ${gmp_major})
+  string(REGEX REPLACE "[^ \t]*[ \t]+__GNU_MP_VERSION[ \t]+([0-9]+)" "\\1" gmp_major "${gmp_major}")
   file(STRINGS "${GMP_HEADERS}/gmp.h" gmp_minor REGEX "__GNU_MP_VERSION_MINOR[ \t]+([0-9]+)")
-  string(REGEX REPLACE "[^ \t]*[ \t]+__GNU_MP_VERSION_MINOR[ \t]+([0-9]+)" "\\1" gmp_minor ${gmp_minor})
+  string(REGEX REPLACE "[^ \t]*[ \t]+__GNU_MP_VERSION_MINOR[ \t]+([0-9]+)" "\\1" gmp_minor "${gmp_minor}")
   file(STRINGS "${GMP_HEADERS}/gmp.h" gmp_patchlevel REGEX "__GNU_MP_VERSION_PATCHLEVEL[ \t]+([0-9]+)")
-  string(REGEX REPLACE "[^ \t]*[ \t]+__GNU_MP_VERSION_PATCHLEVEL[ \t]+([0-9]+)" "\\1" gmp_patchlevel ${gmp_patchlevel})
-  set(GMP_VERSION "${gmp_major}.${gmp_minor}.${gmp_patchlevel}")
-  set(GMP_VERSION_MAJOR "${gmp_major}")
-  set(GMP_VERSION_MINOR "${gmp_minor}")
-  set(GMP_VERSION_PATCH "${gmp_patchlevel}")
+  string(REGEX REPLACE "[^ \t]*[ \t]+__GNU_MP_VERSION_PATCHLEVEL[ \t]+([0-9]+)" "\\1" gmp_patchlevel "${gmp_patchlevel}")
+  if((gmp_major EQUAL "") OR
+     (gmp_minor EQUAL "") OR
+     (gmp_patchlevel EQUAL ""))
+    # If the version encoding is wrong then it is set to "WRONG VERSION ENCODING" causing find_package_handle_standard_args to fail
+    set(GMP_VERSION "GMP BAD VERSION ENCODING")
+    set(GMP_VERSION_MAJOR "GMP BAD VERSION ENCODING")
+    set(GMP_VERSION_MINOR "GMP BAD VERSION ENCODING")
+    set(GMP_VERSION_PATCH "GMP BAD VERSION ENCODING")
+  else()
+    set(GMP_VERSION "${gmp_major}.${gmp_minor}.${gmp_patchlevel}")
+    set(GMP_VERSION_MAJOR "${gmp_major}")
+    set(GMP_VERSION_MINOR "${gmp_minor}")
+    set(GMP_VERSION_PATCH "${gmp_patchlevel}")
+  endif()

   unset(gmp_major)
   unset(gmp_minor)


Improve copy command for gtest files (#195)

On some systems copying $GTEST_SRC/include would not copy the
contents of the include directory, but rather the include
directory itself - resulting in: biodynamo/build/include/include

This would in return result in Cling not being able to find the
gtest headers and cause a segfault.

The improved copy command will always copy the contents correctly.

--- cmake/Testing.cmake
+++ cmake/Testing.cmake
@@ -23,7 +23,7 @@
   CMAKE_CACHE_ARGS
     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-    INSTALL_COMMAND cp -r "${CMAKE_CURRENT_BINARY_DIR}/gtest/src/gtest/include" "${CMAKE_CURRENT_BINARY_DIR}/include"
+    INSTALL_COMMAND cp -a "${CMAKE_CURRENT_BINARY_DIR}/gtest/src/gtest/include/." "${CMAKE_CURRENT_BINARY_DIR}/include"
   # Ugly but necessary, in future versions one can use ${binary_dir}
   # in BUILD_BYPRODUCTS
   #BUILD_BYPRODUCTS "${binary_dir}/libgtest.a"


misc: mic

misc: mic

misc

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -146,8 +146,8 @@
   ${PYTHON_EXECUTABLE}
   ${ZEPHYR_BASE}/scripts/kconfig/kconfig.py
   ${KCONFIG_ROOT}
-  ${PROJECT_BINARY_DIR}/.config
-  ${PROJECT_BINARY_DIR}/include/generated/autoconf.h
+  ${DOTCONFIG}
+  ${AUTOCONF_H}
   ${merge_fragments}
   WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
   # The working directory is set to the app dir such that the user


If configuration builds with remote_io plugin we need to find CURL package first

--- cmake/plugins.cmake
+++ cmake/plugins.cmake
@@ -58,6 +58,10 @@
   MARK_AS_ADVANCED(${PLUGIN}_PLUGIN_TYPE)
 ENDFOREACH()

+IF(NOT REMOTEIO_PLUGIN_TYPE MATCHES "NO")
+  FIND_PACKAGE(CURL)
+ENDIF()
+
 # since some files contain multiple plugins, remove duplicates from source files
 LIST(REMOVE_DUPLICATES LIBMARIADB_SOURCES)


TEST: update LINUX_SYSTEM_DLLS

TEST: update LINUX_SYSTEM_DLLS

--- Packaging/PackageGlobals.cmake
+++ Packaging/PackageGlobals.cmake
@@ -66,21 +66,9 @@
   python...dll
   )

-# if(PKG_GENERATE_XDK)
-#   set(WINDOWS_SYSTEM_DLLS
-#     ${WINDOWS_SYSTEM_DLLS}
-#     api-ms-win-*
-#     concrt140.dll
-#     ucrtbase.dll
-#     msvcp140.dll
-#     msvrt140.dll
-#     vcomp140.dll
-#     )
-# endif()
-
 set(LINUX_SYSTEM_DLLS
   libm.so
-  libc.so
+  libc.so.*
   libstdc*
   libgcc_s.so
   librt.so
@@ -105,11 +93,12 @@
   libICE.so*
   libXrandr.so*
   libpython*
-  libexpat.so.*
-  libfontconfig.so*
-  libfreetype.so*
-  libwebp.so*
   )
+  # libexpat.so.*
+  # libfontconfig.so*
+  # libfreetype.so*
+  # libwebp.so*
+  # )

 # libgcc_s.*dylib and other *.framework are dragged by QT
 set(APPLE_SYSTEM_DLLS
@@ -168,9 +157,11 @@
   libpcre.so.3
   libffi.so.6
   )
-set(GTK_LIB_LIST_2
-  libz.so.1
-  libpng12.so.0
-  )
+# set(GTK_LIB_LIST_2
+#   libz.so.1
+#   libpng12.so.0
+#   )

-set(ALLOWED_SYSTEM_DLLS ${GTK_LIB_LIST_1} ${GTK_LIB_LIST_2})
+
+#set(ALLOWED_SYSTEM_DLLS ${GTK_LIB_LIST_1} ${GTK_LIB_LIST_2})
+set(ALLOWED_SYSTEM_DLLS ${GTK_LIB_LIST_1}) # ${GTK_LIB_LIST_2})


Doxygen: Update comment (review fix)

Doxygen: Update comment (review fix)

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -423,7 +423,7 @@
     add_custom_target("DOXY-generate-processor-previews"
         COMMAND inviwo --save-previews "${output_dir}/inviwo/html" --quit
         WORKING_DIRECTORY ${output_dir}
-        COMMENT "Generating Inviwo API documentation with Doxygen"
+        COMMENT "Generate preview images of processors to be used in Inviwo Doxygen API documentation"
         VERBATIM
     )
     set_target_properties("DOXY-generate-processor-previews"
@@ -454,4 +454,4 @@
             add_dependencies("DOXY-ALL" "DOXY-HELP-${${mod}_class}")
         endif()
     endforeach()
- endfunction()+ endfunction()


Update VMTK to make it compatible with ITK5

--- SuperBuild/External_VMTK.cmake
+++ SuperBuild/External_VMTK.cmake
@@ -25,7 +25,7 @@

   ExternalProject_SetIfNotDefined(
     ${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG
-    "f5469652deaeeb823123bfa93f9f11e391aa05ac"
+    "91bc715e79e55ac63e83ffcefce66e67b52fac69"
     QUIET
     )


STYLE: rename project name teem

STYLE: rename project name teem

--- SuperBuild/External_teem.cmake
+++ SuperBuild/External_teem.cmake
@@ -13,7 +13,7 @@
 set(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)

 # Include dependent projects if any
-set(extProjName Teem) #The find_package known name
+set(extProjName teem) #The find_package known name
 set(proj ${extProjName})              #This local name

 #if(${USE_SYSTEM_${extProjName}})


Updating swigwin hash and download

Updating swigwin hash and download

This is another package attempt for windows, for the patched version
of SWIG.

Change-Id: I4c2c929cc6a37699b5fc76a290805c4b4585cc87

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -14,7 +14,7 @@

   set(SWIG_TARGET_VERSION 2.0.11-1)
   set(SWIG_DOWNLOAD_SOURCE_HASH "c6c23afc5d4df6c87c0205053a3a84dc")
-  set(SWIG_DOWNLOAD_WIN_HASH "084d171dd2155782c0c9de0fd289c7e3" )
+  set(SWIG_DOWNLOAD_WIN_HASH "8fd2837dd42933a8a85644c39a5c912b" )

   if(WIN32)


erge branch 'develop' of https://github.com/yiskylee/NICE into Trace

--- cpp/cmake/check.cmake
+++ cpp/cmake/check.cmake
@@ -1,6 +1,6 @@
 file(GLOB_RECURSE ALL_SOURCE_FILES
     RELATIVE ${CMAKE_SOURCE_DIR}
-    src/*.cc include/*.h)
+    src/*.cc include/*.h test/*.cc)

 find_package(PythonInterp)
 if(NOT PYTHONINTERP_FOUND)


Fixed an error where older Boost versions were no longer found properly.

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -128,7 +128,7 @@
 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 QUIET)
+find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 if (NOT Boost_FOUND)
         if(Boost_USE_STATIC_LIBS)
                 set(Boost_USE_STATIC_LIBS OFF)


pulling rocPRIM from master repo

pulling rocPRIM from master repo

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -47,7 +47,7 @@
     message(STATUS "Downloading rocPRIM.")
     download_project(PROJ    rocPRIM
          GIT_REPOSITORY      https://github.com/ROCmSoftwarePlatform/rocPRIM.git
-         GIT_TAG             caef132d64b29a7d857eb68af5323fc302d26766 # TODO change back to master once rocm docker image is updated
+         GIT_TAG             master
          INSTALL_DIR         ${ROCPRIM_ROOT}
          CMAKE_ARGS          -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_TEST=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hcc
          LOG_DOWNLOAD        TRUE


Support setting ENVIRONMENT on test targets

--- cmake/DevBaseMacro.cmake
+++ cmake/DevBaseMacro.cmake
@@ -165,10 +165,13 @@
 # Also configures the environment to point to the location of shared libs.
 # The idea of this is to keep the dev's shell as clean as possible. Use
 # ctest command to run unit tests.
-# SCOPE: Some prefix. Often the lib name of the lib being tested.
-# NAME : Name of test module, without extension.
-# LINK_LIBRARIES: Libraries to link against.
-# DEPENDENCIES: Targets this test target depends on.
+#
+# SCOPE: Some prefix. Often the lib name of the lib being tested
+# NAME : Name of test module, without extension
+# LINK_LIBRARIES: Libraries to link against
+# DEPENDENCIES: Targets this test target depends on
+# ENVIRONMENT: Environment variables that should be defined for running
+#     the test
 macro(add_unit_test)
     set(OPTIONS "")
     set(ONE_VALUE_ARGUMENTS SCOPE NAME)
@@ -178,6 +181,7 @@
         OBJECT_LIBRARIES
         LINK_LIBRARIES
         DEPENDENCIES
+        ENVIRONMENT
     )

     cmake_parse_arguments(ADD_UNIT_TEST "${OPTIONS}" "${ONE_VALUE_ARGUMENTS}"
@@ -233,7 +237,11 @@
     endif()

     set_property(TEST ${TEST_EXE_NAME}
-        PROPERTY ENVIRONMENT "PATH=${PATH_STRING}")
+        PROPERTY
+            ENVIRONMENT
+                PATH=${PATH_STRING}
+                ${ADD_UNIT_TEST_ENVIRONMENT}
+    )
 endmacro()

@@ -247,6 +255,7 @@
         OBJECT_LIBRARIES
         LINK_LIBRARIES
         DEPENDENCIES
+        ENVIRONMENT
     )

     cmake_parse_arguments(ADD_UNIT_TESTS "${OPTIONS}" "${ONE_VALUE_ARGUMENTS}"
@@ -266,7 +275,8 @@
             SUPPORT_NAMES ${ADD_UNIT_TESTS_SUPPORT_NAMES}
             INCLUDE_DIRS ${ADD_UNIT_TESTS_INCLUDE_DIRS}
             OBJECT_LIBRARIES ${ADD_UNIT_TESTS_OBJECT_LIBRARIES}
-            LINK_LIBRARIES ${ADD_UNIT_TESTS_LINK_LIBRARIES})
+            LINK_LIBRARIES ${ADD_UNIT_TESTS_LINK_LIBRARIES}
+            ENVIRONMENT ${ADD_UNIT_TESTS_ENVIRONMENT})
         set(target_name ${ADD_UNIT_TESTS_SCOPE}_${NAME})
         if(ADD_UNIT_TESTS_DEPENDENCIES)
             add_dependencies(${target_name} ${ADD_UNIT_TESTS_DEPENDENCIES})


cmake: hide some variables

cmake: hide some variables

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -387,6 +387,14 @@

 mark_as_advanced (FORCE # The following settings might be relevant to a few users:
 		  GTEST_ROOT
+		  ANTLR4CPP_DIR
+		  BUILD_GMOCK
+		  BUILD_GTEST
+		  INSTALL_GMOCK
+		  INSTALL_GTEST
+		  LIBFA_INCLUDE_DIR
+		  gmock_build_tests
+		  gtest_hide_internal_symbols
 		  COVERAGE_PREFIX
 		  CMAKE_PIC_FLAGS
 		  CMAKE_STATIC_FLAGS


-update FindAutomoc4.cmake to include documentation, same as in kdelibs/cmake/modules/FindAutomoc4.cmake

Alex

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -3,19 +3,41 @@
 #
 #  AUTOMOC4_FOUND - automoc4 has been found
 #  AUTOMOC4_EXECUTABLE - the automoc4 tool
+#  AUTOMOC4_VERSION - the full version of automoc4
+#  AUTOMOC4_VERSION_MAJOR, AUTOMOC4_VERSION_MINOR, AUTOMOC4_VERSION_PATCH - AUTOMOC4_VERSION
+#                     broken into its components
 #
 # It also adds the following macros
 #  AUTOMOC4(<target> <SRCS_VAR>)
 #    Use this to run automoc4 on all files contained in the list <SRCS_VAR>.
 #
-#  AUTOMOC4_MOC_HEADERS(<target> header1.h header2.h)
+#  AUTOMOC4_MOC_HEADERS(<target> header1.h header2.h ...)
 #    Use this to add more header files to be processed with automoc4.
+#
+#  AUTOMOC4_ADD_EXECUTABLE(<target_NAME> src1 src2 ...)
+#    This macro does the same as ADD_EXECUTABLE, but additionally
+#    adds automoc4 handling for all source files.
+#
+# AUTOMOC4_ADD_LIBRARY(<target_NAME> src1 src2 ...)
+#    This macro does the same as ADD_LIBRARY, but additionally
+#    adds automoc4 handling for all source files.
+
+# Internal helper macro, may change or be removed anytime:
+# _ADD_AUTOMOC4_TARGET(<target_NAME> <SRCS_VAR>)
+#
+# Since version 0.9.88:
+# The following two macros are only to be used for KDE4 projects
+# and do something which makes sure automoc4 works for KDE. Don't
+# use them anywhere else.
+# _AUTOMOC4_KDE4_PRE_TARGET_HANDLING(<target_NAME> <SRCS_VAR>)
+# _AUTOMOC4_KDE4_POST_TARGET_HANDLING(<target_NAME>)

-# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
+# Copyright (c) 2008-2009, Alexander Neundorf, <neundorf@kde.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+

 # check if we are inside KDESupport and automoc is enabled
 if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")


IVGCVSW-2900 Adding the missing option to build the Accuracy Tool
             to the GlobalConfig.cmake

Change-Id: I7f7e3e36fa66c5cd5b2248cab6f2b9b90d65d1a4
Signed-off-by: Éanna Ó Catháin <76c9b836d03a84985e849689e6f5a5209ababaf7@arm.com>

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -15,6 +15,7 @@
 option(BUILD_TF_LITE_PARSER "Build Tensorflow Lite parser" OFF)
 option(BUILD_ARMNN_SERIALIZER "Build Armnn Serializer" OFF)
 option(BUILD_ARMNN_QUANTIZER "Build ArmNN quantizer" OFF)
+option(BUILD_ACCURACY_TOOL "Build Accuracy Tool" OFF)
 option(FLATC_DIR "Path to Flatbuffers compiler" OFF)
 option(TF_LITE_GENERATED_PATH "Tensorflow lite generated C++ schema location" OFF)
 option(FLATBUFFERS_ROOT "Location where the flatbuffers 'include' and 'lib' folders to be found" Off)


cmake: fixed incorrect usage of add_definitions() on Linux

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -519,11 +519,7 @@

   if((NOT DEFINED OPENCV_MODULE_TYPE AND BUILD_SHARED_LIBS)
       OR (DEFINED OPENCV_MODULE_TYPE AND OPENCV_MODULE_TYPE STREQUAL SHARED))
-    if(MSVC)
-      set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
-    else()
-      add_definitions(-DCVAPI_EXPORTS)
-    endif()
+    set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
   endif()

   if(MSVC)


Better fix/hack for GCC link order problems

--- cmake/fips_private.cmake
+++ cmake/fips_private.cmake
@@ -62,15 +62,16 @@
     foreach(dep ${input})
         fips_recurse_deps(${dep} resolvedDeps)
     endforeach()
-
-# NOTE: we do NOT remove dups, this simplifies the tricky linker order
-# requirements on GCC
-# FIXME: there must be a more elegant way...
-#    if (resolvedDeps)
-#       list(REMOVE_DUPLICATES resolvedDeps)
-#    endif()
+    if (resolvedDeps)
+       list(REMOVE_DUPLICATES resolvedDeps)
+    endif()
     if (FIPS_CMAKE_VERBOSE)
         message("${target} Dependencies: ${resolvedDeps}")
+    endif()
+    # NOTE: this little hack fixes the dependency-order problem
+    # when linking with the GCC toolchain
+    if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+        set(resolvedDeps ${resolvedDeps} ${resolvedDeps} ${resolvedDeps})
     endif()
     target_link_libraries(${target} ${resolvedDeps})
 endmacro()


cmake: Optimize linking, not as many duplicates

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -448,26 +448,17 @@

   libplatform
   libarch
-  libos
-  libc
-  musl_syscalls
-  cxxabi
-  libpthread
-  libunwind
-  libcxx
-
-  libplatform
-  libarch
-  libos
-  libc
-  cxxabi
-  libpthread
-  libunwind
-  libcxx

   musl_syscalls
   libos
   libcxx
+  cxxabi
+  libunwind
+  libpthread
+  libc
+
+  musl_syscalls
+  libos
   libc
   libgcc
   ${CRTN}


change logic to be clearer

change logic to be clearer

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

-if(NOT STM32_TOOLCHAIN_PATH AND NOT CMAKE_C_COMPILER)
-    set(STM32_TOOLCHAIN_PATH "/usr")
-    message(STATUS "No STM32_TOOLCHAIN_PATH specified, using default: " ${STM32_TOOLCHAIN_PATH})
-else()
-    if(NOT STM32_TOOLCHAIN_PATH)
+if(NOT STM32_TOOLCHAIN_PATH)
+    if(NOT CMAKE_C_COMPILER)
+        set(STM32_TOOLCHAIN_PATH "/usr")
+        message(STATUS "No STM32_TOOLCHAIN_PATH specified, using default: " ${STM32_TOOLCHAIN_PATH})
+    else()
         # keep only directory of compiler
         get_filename_component(STM32_TOOLCHAIN_PATH ${CMAKE_C_COMPILER} DIRECTORY)
         # remove the last /bin directory


Fix permissions

Fix permissions


Enable the override warning.

Enable the override warning.

--- build_settings.cmake
+++ build_settings.cmake
@@ -17,7 +17,7 @@
 set(AUTORUN_UNIT_TESTS FALSE CACHE BOOL "If TRUE, tests will be run immediately after linking the test executable")

 # Warnings
-set(WARN_OPTS "-Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
+set(WARN_OPTS "-Wsuggest-override -Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")

 # C and C++ compiler flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel ${EXTRA_C_FLAGS}")


CR #80

CR #80

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -2,8 +2,10 @@
 # Usage:
 #  git_external(<directory> <giturl> <gittag> [RESET <files>])
 #  git_external_manage(<file>)
-#    calls git_external and provides an update target which bumps the tag to the
-#    master revision in the given file. The file has to contain:
+#    is used for a managed .gitexternal file which is parsed and
+#    updated by this function, which calls git_external and provides
+#    an update target to bump the tag to the master revision by
+#    recreating the given file. The file has to contain:
 #      include(GitExternal)
 #      git_external_manage(${CMAKE_CURRENT_LIST_FILE})
 #      #-> CMake/common https://github.com/Eyescale/CMake.git 8324611
@@ -47,6 +49,10 @@
           add_custom_target(update)
         endif()
         if(NOT TARGET update_git_external)
+          add_custom_target(update_git_external)
+          add_dependencies(update update_git_external)
+        endif()
+        if(NOT TARGET update_git_external_header)
           set(GIT_EXTERNAL_SCRIPT
             "${CMAKE_CURRENT_BINARY_DIR}/gitupdateexternal.cmake")
           file(WRITE "${GIT_EXTERNAL_SCRIPT}"
@@ -54,7 +60,7 @@
 include(GitExternal)
 git_external_manage(\\\${CMAKE_CURRENT_LIST_FILE})
 \")")
-          add_custom_target(update_git_external
+          add_custom_target(update_git_external_header
             COMMAND ${CMAKE_COMMAND} -P ${GIT_EXTERNAL_SCRIPT}
             COMMENT "Recreate ${FILE}"
             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -77,9 +83,10 @@
         add_custom_target(update_git_external_${GIT_EXTERNAL_NAME}
           COMMAND ${CMAKE_COMMAND} -P ${GIT_EXTERNAL_SCRIPT}
           COMMENT "Update ${REPO} in ${FILE}"
-          DEPENDS update_git_external
+          DEPENDS update_git_external_header
           WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
-        add_dependencies(update update_git_external_${GIT_EXTERNAL_NAME})
+        add_dependencies(update_git_external
+          update_git_external_${GIT_EXTERNAL_NAME})
       endif()
     endif()
   endforeach()


ENH: Remote for SmoothingRecursiveYvvGaussianFilter

Provide C++11 compiler warning fixes to codebase.

Change-Id: Ie6c2b75e775dee148de3e3155607e0edcab99fd6

--- Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
+++ Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
@@ -3,5 +3,5 @@
   "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: https://hdl.handle.net/10380/3425"
   #UPSTREAM_REPO GIT_REPOSITORY ${git_protocol}://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/SmoothingRecursiveYvvGaussianFilter.git
-  GIT_TAG 9d25453217feff0df4b5854c7b8be186b5a3a0e2
+  GIT_TAG 7aca9be26a41d39cfbed7b8e7ccf6bd1dade05ed
   )


Must set the OGRE_MEDIA_DIR_* to an absolute path for build folder versions

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -142,6 +142,8 @@

 # CREATE CONFIG FILES - BUILD DIR VERSIONS
+set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/media")
+set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/media")
 if (WIN32)
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")


Update the SimpleITK S3 URL to virtual-host style

--- CMake/sitkExternalData.cmake
+++ CMake/sitkExternalData.cmake
@@ -34,7 +34,7 @@
   list(APPEND ExternalData_URL_TEMPLATES

     # Data mirrored from SimpleITKExternalData repository
-    "https://s3.amazonaws.com/simpleitk/public/%(algo)/%(hash)"
+    "https://simpleitk.s3.amazonaws.com/public/%(algo)/%(hash)"

     # Data published on GitHub Pages
     "https://simpleitk.github.io/SimpleITKExternalData/%(algo)/%(hash)"


Add new data download service

Add new data download service

Replace old NLM servers with AWS S3 mirrored data service.

--- CMake/sitkExternalData.cmake
+++ CMake/sitkExternalData.cmake
@@ -34,10 +34,7 @@
   list(APPEND ExternalData_URL_TEMPLATES

     # Data mirrored from SimpleITKExternalData repository
-    "https://erie.nlm.nih.gov/SimpleITKExternalData/%(algo)/%(hash)"
-
-    # Data published by MIDAS
-    "https://placid.nlm.nih.gov/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+    "https://s3.amazonaws.com/simpleitk/public/%(algo)/%(hash)"

     # Data published on GitHub Pages
     "https://simpleitk.github.io/SimpleITKExternalData/%(algo)/%(hash)"


Only add other hierarchy file if they exist

Hierarchy fileis for dependant modules may not exist. For
example building against an installed version. Add check
to prevent them being past to the hierarchy tool if they
don't exist.

Change-Id: I350560a5bcdfb8ea1a13643ccd15fbffdb470a75

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -121,9 +121,9 @@
   set(OTHER_HIERARCHY_TARGETS)
   foreach(dep ${${vtk-module}_DEPENDS})
     if(NOT "${vtk-module}" STREQUAL "${dep}")
-      if(NOT ${dep}_EXCLUDE_FROM_WRAPPING)
+      if(NOT ${dep}_EXCLUDE_FROM_WRAPPING AND DEFINED ${dep}_BINARY_DIR)
         list(APPEND OTHER_HIERARCHY_FILES
-		"${quote}${${dep}_BINARY_DIR}/${dep}Hierarchy.txt${quote}")
+          "${quote}${${dep}_BINARY_DIR}/${dep}Hierarchy.txt${quote}")
         list(APPEND OTHER_HIERARCHY_TARGETS ${dep})
       endif()
     endif()


Re-insert WRAP_SPECIAL into hierarchy file.

This is required in order to wrap many of the classes older versions
of the wrapping tools.

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -59,6 +59,7 @@
     get_property(TMP_WRAP_EXCLUDE SOURCE ${FILE} PROPERTY WRAP_EXCLUDE)
     get_source_file_property(TMP_ABSTRACT ${FILE} ABSTRACT)
     get_source_file_property(TMP_EXCLUDE_PYTHON ${FILE} WRAP_EXCLUDE_PYTHON)
+    get_source_file_property(TMP_WRAP_SPECIAL ${FILE} WRAP_SPECIAL)

     # what is the filename without the extension
     get_filename_component(TMP_FILENAME ${FILE} NAME_WE)
@@ -111,6 +112,10 @@
         set(VTK_WRAPPER_INIT_DATA "${VTK_WRAPPER_INIT_DATA};WRAP_EXCLUDE_PYTHON")
       endif()

+      if(TMP_WRAP_SPECIAL)
+        set(VTK_WRAPPER_INIT_DATA "${VTK_WRAPPER_INIT_DATA};WRAP_SPECIAL")
+      endif()
+
       set(VTK_WRAPPER_INIT_DATA "${VTK_WRAPPER_INIT_DATA}\n")

     endif()


use undocumented option to avoid need for timeout

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -325,16 +325,10 @@
 endif()

 if(Connext_DDSGEN_SERVER)
-  # the first invocation with a timeout is necessary since when the script
-  # forks the daemon it fails to exit early (default daemon timeout is 20s)
-  # TODO(mikaelarguedas) remove this once rtiddsgen_server detaches the forked daemon and returns early
+  # check that the generator is invocable / finds a Java runtime environment
+  # the undocumented option ensures that the script doesn't spawn a server
   execute_process(
-    COMMAND "${Connext_DDSGEN_SERVER}" "-version"
-    TIMEOUT 1
-    OUTPUT_QUIET ERROR_QUIET)
-  # check that the generator is invocable / finds a Java runtime environment
-  execute_process(
-    COMMAND "${Connext_DDSGEN_SERVER}" "-version"
+    COMMAND "${Connext_DDSGEN_SERVER}" "-n_version"
     RESULT_VARIABLE _retcode
     OUTPUT_QUIET ERROR_QUIET)
   if(NOT _retcode EQUAL 0)


Change token list to DSN lexer CMake module to output new IO_ERROR exception.

--- CMakeModules/TokenList2DsnLexer.cmake
+++ CMakeModules/TokenList2DsnLexer.cmake
@@ -262,9 +262,9 @@
      * this lower level function returning an int (so the enum does not collide
      * with another usage).
      * @return ${enum} - the type of token found next.
-     * @throw IOError - only if the LINE_READER throws it.
-     */
-    ${enum} NextTok() throw (IOError)
+     * @throw IO_ERROR - only if the LINE_READER throws it.
+     */
+    ${enum} NextTok() throw( IO_ERROR )
     {
         return (${enum}) DSNLEXER::NextTok();
     }
@@ -273,11 +273,11 @@
      * Function NeedSYMBOL
      * calls NextTok() and then verifies that the token read in
      * satisfies bool IsSymbol().
-     * If not, an IOError is thrown.
+     * If not, an IO_ERROR is thrown.
      * @return int - the actual token read in.
-     * @throw IOError, if the next token does not satisfy IsSymbol()
-     */
-    ${enum} NeedSYMBOL() throw( IOError )
+     * @throw IO_ERROR, if the next token does not satisfy IsSymbol()
+     */
+    ${enum} NeedSYMBOL() throw( IO_ERROR )
     {
         return (${enum}) DSNLEXER::NeedSYMBOL();
     }
@@ -286,11 +286,11 @@
      * Function NeedSYMBOLorNUMBER
      * calls NextTok() and then verifies that the token read in
      * satisfies bool IsSymbol() or tok==T_NUMBER.
-     * If not, an IOError is thrown.
+     * If not, an IO_ERROR is thrown.
      * @return int - the actual token read in.
-     * @throw IOError, if the next token does not satisfy the above test
-     */
-    ${enum} NeedSYMBOLorNUMBER() throw( IOError )
+     * @throw IO_ERROR, if the next token does not satisfy the above test
+     */
+    ${enum} NeedSYMBOLorNUMBER() throw( IO_ERROR )
     {
         return (${enum}) DSNLEXER::NeedSYMBOLorNUMBER();
     }


Update indent variable based on external project stack size

This commit add a new public function:

  superbuild_message(<proj> <msg>)

It allows to display an indented message associated with a given project.

Internally, it uses the stack size introduced by commit 041dfe2

See #418

--- CMake/ctkMacroCheckExternalProjectDependency.cmake
+++ CMake/ctkMacroCheckExternalProjectDependency.cmake
@@ -290,11 +290,23 @@
   set(${varname} ${_ep_arguments} PARENT_SCOPE)
 endfunction()

-macro(_epd_status txt)
+function(_sb_update_indent proj)
+  superbuild_stack_size(SUPERBUILD_PROJECT_STACK _stack_size)
+  set(_indent "")
+  if(_stack_size GREATER 0)
+    foreach(not_used RANGE 1 ${_stack_size})
+      set(_indent "  ${_indent}")
+    endforeach()
+  endif()
+  set_property(GLOBAL PROPERTY SUPERBUILD_${proj}_INDENT ${_indent})
+endfunction()
+
+function(superbuild_message proj msg)
   if(NOT SUPERBUILD_FIRST_PASS)
-    message(STATUS ${txt})
-  endif()
-endmacro()
+    get_property(_indent GLOBAL PROPERTY SUPERBUILD_${proj}_INDENT)
+    message(STATUS "SuperBuild - ${_indent}${msg}")
+  endif()
+endfunction()

 #!
 #! superbuild_stack_content(<stack_name> <output_var>)
@@ -369,22 +381,17 @@
     set(proj ${_sb_UNPARSED_ARGUMENTS})
   endif()

-  # Set indent variable if needed
-  if(NOT DEFINED __indent)
-    set(__indent "")
-  else()
-    set(__indent "${__indent}  ")
-  endif()
-
   # Sanity checks
   if(NOT DEFINED ${proj}_DEPENDENCIES)
-    message(FATAL_ERROR "${__indent}${proj}_DEPENDENCIES variable is NOT defined !")
+    message(FATAL_ERROR "${proj}_DEPENDENCIES variable is NOT defined !")
   endif()

   superbuild_stack_size(SUPERBUILD_PROJECT_STACK _stack_size)
   if(_stack_size EQUAL 0)
     set(SUPERBUILD_TOPLEVEL_PROJECT ${proj})
   endif()
+
+  _sb_update_indent(${proj})

   # Keep track of the projects
   list(APPEND __epd_${SUPERBUILD_TOPLEVEL_PROJECT}_projects ${proj})
@@ -395,16 +402,13 @@
     set(SUPERBUILD_FIRST_PASS TRUE)
   endif()

-  # Set message strings
-  set(__${proj}_indent ${__indent})
-  set(__${proj}_superbuild_message "SuperBuild - ${__indent}${proj}[OK]")
-  if(${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj})
-    set(__${proj}_superbuild_message "${__${proj}_superbuild_message} (SYSTEM)")
-  endif()
-
   # Display dependency of project being processed
   if("${${proj}_DEPENDENCIES}" STREQUAL "")
-    _epd_status(${__${proj}_superbuild_message})
+    set(_msg "${proj}[OK]")
+    if(${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj})
+      set(_msg "${_msg} (SYSTEM)")
+    endif()
+    superbuild_message(${proj} ${_msg})
   else()
     set(dependency_str " ")
     foreach(dep ${${proj}_DEPENDENCIES})
@@ -415,7 +419,7 @@
         set(dependency_str "${dependency_str}${dep}, ")
       endif()
     endforeach()
-    _epd_status("SuperBuild - ${__indent}${proj} => Requires${dependency_str}")
+    superbuild_message(${proj} "${proj} => Requires${dependency_str}")
   endif()

   foreach(dep ${${proj}_DEPENDENCIES})
@@ -450,19 +454,15 @@

   # If project being process has dependencies, indicates it has also been added.
   if(NOT "${${proj}_DEPENDENCIES}" STREQUAL "")
-    _epd_status(${__${proj}_superbuild_message})
-  endif()
-
-  # Update indent variable
-  string(LENGTH "${__indent}" __indent_length)
-  math(EXPR __indent_length "${__indent_length}-2")
-  if(NOT ${__indent_length} LESS 0)
-    string(SUBSTRING "${__indent}" 0 ${__indent_length} __indent)
+    set(_msg "${proj}[OK]")
+    if(${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj})
+      set(_msg "${_ok_message} (SYSTEM)")
+    endif()
+    superbuild_message(${proj} ${_msg})
   endif()

   if(${proj} STREQUAL ${SUPERBUILD_TOPLEVEL_PROJECT} AND SUPERBUILD_FIRST_PASS)
     message(STATUS "SuperBuild - First pass - done")
-    unset(__indent)

     unset(${SUPERBUILD_TOPLEVEL_PROJECT}_DEPENDENCIES) # XXX - Refactor

@@ -511,6 +511,10 @@
     set(SUPERBUILD_FIRST_PASS TRUE)
   endif()

+  if(_sb_PROJECT_VAR)
+    set(${_sb_PROJECT_VAR} ${proj})
+  endif()
+
   if(SUPERBUILD_FIRST_PASS)
     return()
   else()


Automatically update outdated version.txt on packaging

--- Superbuild/Projects/veloview.bundle.common.cmake
+++ Superbuild/Projects/veloview.bundle.common.cmake
@@ -2,9 +2,22 @@
 include(Git)
 include(ParaViewDetermineVersion)
 # Sets VV_VERSION_{MAJOR,MINOR,PATCH} for git
-file(STRINGS ${VeloViewSuperBuild_SOURCE_DIR}/../version.txt version_txt)
+set(VV_VERSION_FILE ${VeloViewSuperBuild_SOURCE_DIR}/../version.txt)
+file(STRINGS "${VV_VERSION_FILE}" version_txt)
 extract_version_components("${version_txt}" "VV")
 determine_version(${VeloViewSuperBuild_SOURCE_DIR} ${GIT_EXECUTABLE} "VV")
+# Update the hard-coded version
+extract_version_components("${version_txt}" "VV_file")
+if((version_txt VERSION_LESS VV_VERSION_FULL)
+   OR (version_txt VERSION_EQUAL VV_VERSION_FULL
+       AND (VV_file_VERSION_PATCH_EXTRA STRLESS VV_VERSION_PATCH_EXTRA)))
+  message(STATUS "Outdated version file updated from ${version_txt} to ${VV_VERSION_FULL} in " ${VV_VERSION_FILE})
+  file(WRITE "${VV_VERSION_FILE}" "${VV_VERSION_FULL}")
+endif()
+if(NOT (version_txt STREQUAL VV_VERSION_FULL))
+  message(STATUS "Git version (${VV_VERSION_FULL}) differs from version in file (${version_txt}) at " ${VV_VERSION_FILE})
+endif()
+

 # Sets GD_YEAR, GD_MONTH, GD_DAY
 include(${VeloViewSuperBuild_SOURCE_DIR}/Projects/getdate.cmake)


COMP: Deactivating file in CMake

COMP: Deactivating file in CMake

--- Modules/DiffusionImaging/DiffusionCore/files.cmake
+++ Modules/DiffusionImaging/DiffusionCore/files.cmake
@@ -59,7 +59,7 @@

   # Registration Algorithms & Co.
   Algorithms/Registration/mitkPyramidImageRegistrationMethod.cpp
-  Algorithms/Registration/mitkDWIHeadMotionCorrectionFilter.cpp
+#  Algorithms/Registration/mitkDWIHeadMotionCorrectionFilter.cpp

   # Function Collection
   mitkDiffusionFunctionCollection.cpp


Link to gcc_s and gcc if compiler is GCC version 5. Fixes issue #9593 (#9642)

--- tensorflow/contrib/cmake/tf_shared_lib.cmake
+++ tensorflow/contrib/cmake/tf_shared_lib.cmake
@@ -82,6 +82,13 @@
     tf_protos_cc
 )

+# There is a bug in GCC 5 resulting in undefined reference to a __cpu_model function when
+# linking to the tensorflow library. Adding the following libraries fixes it.
+# See issue on github: https://github.com/tensorflow/tensorflow/issues/9593
+if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0)
+    target_link_libraries(tensorflow PRIVATE gcc_s gcc)
+endif()
+
 if(WIN32)
   add_dependencies(tensorflow tensorflow_static)
 endif(WIN32)


MOD: Fixed a bug that made OgreRenderer link to the Ogre release lib always

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -75,13 +75,13 @@

 # Find the release and debug libraries.
 find_library(OGRE_LIB NAMES OgreMain
-    PATHS ${OGRE_PREFIX_PATH}
-    PATH_SUFFIXES Release lib/Release
-)
+             PATHS ${OGRE_PREFIX_PATH}
+             PATH_SUFFIXES Release lib/Release)
+
 find_library(OGRE_LIB_DBG NAMES OgreMain_d
-    PATHS ${OGRE_PREFIX_PATH}
-    PATH_SUFFIXES Debug lib/Debug
-)
+             PATHS ${OGRE_PREFIX_PATH}
+             PATH_SUFFIXES Debug lib/Debug)
+
 mark_as_advanced(OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH OGRE_LIB OGRE_LIB_DBG)

 # If the Ogre build settings file was found, parse it to identify the Ogre Thread provider.
@@ -100,7 +100,7 @@
     # Set-up the list of directories for the OGRE libraries to link against in the Ogre related components.
     set (OGRE_LIBRARIES ${OGRE_LIB})
     if (OGRE_LIB_DBG)
-        set (OGRE_LIBRARIES_DBG ${OGRE_LIB_DBG};${Boost_THREAD_LIBRARY_DEBUG};${Boost_SYSTEM_LIBRARY_DEBUG};${Boost_DATE_TIME_LIBRARY_DEBUG};${Boost_CHRONO_LIBRARY_DEBUG})
+        set (OGRE_LIBRARIES_DBG ${OGRE_LIB_DBG})
     endif()

     # Ogre was found. If the thread provider is boost, also search for the boost libs.


cmake: Fix FindSCIP (Fix #2801)

cmake: Fix FindSCIP (Fix #2801)


Revert "fix build error"

Revert "fix build error"

This reverts commit 869a68d5147f239159ea4f406e25003aa782d7ca.

--- cmake/get-sdl2.cmake
+++ cmake/get-sdl2.cmake
@@ -24,4 +24,6 @@
     #CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${DEPENDENCY_INSTALL_DIR}
     INSTALL_DIR ${DEPENDENCY_INSTALL_DIR}
     CMAKE_ARGS ${SDL2_CMAKE_ARGS}
-)
+  )
+
+endif()


Fixed jemalloc with ccache build failure.

--- cmake/jemalloc.cmake
+++ cmake/jemalloc.cmake
@@ -11,7 +11,7 @@
   SET(SOURCE_DIR "${CMAKE_SOURCE_DIR}/extra/jemalloc")
   SET(BINARY_DIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/extra/jemalloc/build")
   SET(LIBJEMALLOC "libjemalloc")
-  SET(JEMALLOC_CONFIGURE_OPTS "CC=${CMAKE_C_COMPILER}" "--with-private-namespace=jemalloc_internal_" "--enable-cc-silence")
+  SET(JEMALLOC_CONFIGURE_OPTS "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}" "--with-private-namespace=jemalloc_internal_" "--enable-cc-silence")
   IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT APPLE) # see the comment in CMakeLists.txt
     LIST(APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug)
   ENDIF()


Correct a missing closing parenthese. [ci skip]

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -152,7 +152,7 @@
     if (NOT FOUND_MESSAGE)
         set (FOUND_MESSAGE "Found Urho3D: ${URHO3D_LIBRARIES}")
         if (URHO3D_VERSION)
-            set (FOUND_MESSAGE "${FOUND_MESSAGE} (found version \"${URHO3D_VERSION}\"")
+            set (FOUND_MESSAGE "${FOUND_MESSAGE} (found version \"${URHO3D_VERSION}\")")
         endif ()
     endif ()
     include (FindPackageMessage)


Uncomment "message" call

Uncomment "message" call

--- CMake/connectivity_check.cmake
+++ CMake/connectivity_check.cmake
@@ -1,5 +1,6 @@
 # License: Apache 2.0. See LICENSE file in root directory.
-# Copyright(c) 2019 Intel Corporation. All Rights Reserved.message(STATUS "Checking internet connection...")
+# Copyright(c) 2019 Intel Corporation. All Rights Reserved.
+message(STATUS "Checking internet connection...")
 file(DOWNLOAD "http://realsense-hw-public.s3-eu-west-1.amazonaws.com/Releases/connectivity_check" "${CMAKE_CURRENT_SOURCE_DIR}/connectivity_check" SHOW_PROGRESS TIMEOUT 5 STATUS status)
 list (FIND status "\"No error\"" _index)
 if (${_index} EQUAL -1)
@@ -8,4 +9,4 @@
 else()
     message(STATUS "Internet connection identified")
     set(INTERNET_CONNECTION ON)
-endif()+endif()


Link against libclang-cpp.so when linking with shared libraries

libclang-cpp.so is a new shared object in clang-9.0.0 which
contains all the clang components in one library.  Doing this will
save us from having to update cmake when there is a new clang component
and may provide better performance in LTO builds of clang.

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -219,10 +219,16 @@
 string(REGEX REPLACE "-W[^ ]*" "" LLVM_CXXFLAGS "${LLVM_CXXFLAGS}")

 # Llvm-config does not include clang libs
-set(CLANG_LIBNAMES clangCodeGen clangFrontendTool clangFrontend clangDriver clangSerialization
-    clangParse clangSema clangRewrite clangRewriteFrontend
-    clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers
-    clangStaticAnalyzerCore clangAnalysis clangEdit clangAST clangASTMatchers clangLex clangBasic)
+if((9 LESS LLVM_MAJOR) AND (LLVM_LIB_IS_SHARED MATCHES "shared"))
+  # Link against a single shared library instead of multiple component shared
+  # libraries.
+  set(CLANG_LIBNAMES clang-cpp)
+else()
+  set(CLANG_LIBNAMES clangCodeGen clangFrontendTool clangFrontend clangDriver clangSerialization
+      clangParse clangSema clangRewrite clangRewriteFrontend
+      clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers
+      clangStaticAnalyzerCore clangAnalysis clangEdit clangAST clangASTMatchers clangLex clangBasic)
+endif()

 foreach(LIBNAME ${CLANG_LIBNAMES})
   find_library(C_LIBFILE_${LIBNAME} NAMES "${LIBNAME}" HINTS "${LLVM_LIBDIR}")


Disable lua [cache clear]

Disable lua [cache clear]

--- cmake/Modules/UrhoCommon.cmake
+++ cmake/Modules/UrhoCommon.cmake
@@ -149,7 +149,8 @@
 option (URHO3D_ANGELSCRIPT "Enable AngelScript scripting support" TRUE)
 cmake_dependent_option (URHO3D_FORCE_AS_MAX_PORTABILITY "Use generic calling convention for AngelScript on any platform" FALSE "URHO3D_ANGELSCRIPT" FALSE)
 option (URHO3D_IK "Enable inverse kinematics support" TRUE)
-option (URHO3D_LUA "Enable additional Lua scripting support" TRUE)
+#option (URHO3D_LUA "Enable additional Lua scripting support" TRUE)
+unset (URHO3D_LUA CACHE)
 option (URHO3D_NAVIGATION "Enable navigation support" TRUE)
 cmake_dependent_option (URHO3D_NETWORK "Enable networking support" TRUE "NOT WEB" FALSE)
 option (URHO3D_PHYSICS "Enable physics support" TRUE)
@@ -202,13 +203,17 @@
     cmake_dependent_option (URHO3D_MMX "Enable MMX instruction set (32-bit Linux platform only); the MMX is effectively enabled when 3DNow! or SSE is enabled; should only be used for older CPU with MMX support" "${HAVE_MMX}" "X86 OR E2K AND CMAKE_SYSTEM_NAME STREQUAL Linux AND NOT URHO3D_64BIT AND NOT URHO3D_SSE AND NOT URHO3D_3DNOW" FALSE)
     # For completeness sake - this option is intentionally not documented as we do not officially support PowerPC (yet)
     cmake_dependent_option (URHO3D_ALTIVEC "Enable AltiVec instruction set (PowerPC only)" "${HAVE_ALTIVEC}" POWERPC FALSE)
-    cmake_dependent_option (URHO3D_LUAJIT "Enable Lua scripting support using LuaJIT (check LuaJIT's CMakeLists.txt for more options)" TRUE "NOT WEB AND NOT APPLE" FALSE)
-    cmake_dependent_option (URHO3D_LUAJIT_AMALG "Enable LuaJIT amalgamated build (LuaJIT only); default to true when LuaJIT is enabled" TRUE URHO3D_LUAJIT FALSE)
-    cmake_dependent_option (URHO3D_SAFE_LUA "Enable Lua C++ wrapper safety checks (Lua/LuaJIT only)" FALSE URHO3D_LUA FALSE)
+    #cmake_dependent_option (URHO3D_LUAJIT "Enable Lua scripting support using LuaJIT (check LuaJIT's CMakeLists.txt for more options)" TRUE "NOT WEB AND NOT APPLE" FALSE)
+    unset (URHO3D_LUAJIT CACHE)
+    #cmake_dependent_option (URHO3D_LUAJIT_AMALG "Enable LuaJIT amalgamated build (LuaJIT only); default to true when LuaJIT is enabled" TRUE URHO3D_LUAJIT FALSE)
+    unset (URHO3D_LUAJIT_AMALG CACHE)
+    #cmake_dependent_option (URHO3D_SAFE_LUA "Enable Lua C++ wrapper safety checks (Lua/LuaJIT only)" FALSE URHO3D_LUA FALSE)
+    unset (URHO3D_SAFE_LUA CACHE)
     if (NOT CMAKE_BUILD_TYPE STREQUAL Release AND NOT CMAKE_CONFIGURATION_TYPES)
         set (DEFAULT_LUA_RAW TRUE)
     endif ()
-    cmake_dependent_option (URHO3D_LUA_RAW_SCRIPT_LOADER "Prefer loading raw script files from the file system before falling back on Urho3D resource cache. Useful for debugging (e.g. breakpoints), but less performant (Lua/LuaJIT only)" "${DEFAULT_LUA_RAW}" URHO3D_LUA FALSE)
+    #cmake_dependent_option (URHO3D_LUA_RAW_SCRIPT_LOADER "Prefer loading raw script files from the file system before falling back on Urho3D resource cache. Useful for debugging (e.g. breakpoints), but less performant (Lua/LuaJIT only)" "${DEFAULT_LUA_RAW}" URHO3D_LUA FALSE)
+    unset (URHO3D_LUA_RAW_SCRIPT_LOADER CACHE)
     option (URHO3D_PLAYER "Build Urho3D script player" TRUE)
     option (URHO3D_SAMPLES "Build sample applications" TRUE)
     option (URHO3D_UPDATE_SOURCE_TREE "Enable commands to copy back some of the generated build artifacts from build tree to source tree to facilitate devs to push them as part of a commit (for library devs with push right only)")


Libmsn includes are included as msn/msn.h not just msn.h so fix the include path
set by the cmake module

svn path=/trunk/KDE/kdenetwork/cmake/modules/FindLibmsn.cmake; revision=903541

--- cmake/modules/FindLibmsn.cmake
+++ cmake/modules/FindLibmsn.cmake
@@ -12,7 +12,7 @@
     SET(LIBMSN_FIND_QUIETLY TRUE)
 ENDIF (LIBMSN_INCLUDE_DIR AND LIBMSN_LIBRARIES)

-FIND_PATH(LIBMSN_INCLUDE_DIR msn.h
+FIND_PATH(LIBMSN_INCLUDE_DIR msn/msn.h
     PATHS ${CMAKE_INSTALL_PREFIX}
     PATH_SUFFIXES msn )


Preserve blank-delimited library flags as single elements of the output list
in the cmake_link_flags macro.

svn path=/trunk/; revision=8473

--- cmake/modules/pkg-config.cmake
+++ cmake/modules/pkg-config.cmake
@@ -155,8 +155,10 @@
     set(${_link_flags_out})
   else("${_link_flags_in}" STREQUAL ""})
     #message("(original link flags) = ${_link_flags_in}")
-    # Convert link flags to a list.
-    string(REGEX REPLACE " " ";" _link_flags_list "${_link_flags_in}")
+    # Convert link flags to a list.  Note some link flags are blank-delimited
+    # (such as "-framework whatever") so preserve those by splitting into
+    # separate list elements only if the next element starts with a hyphen.
+    string(REGEX REPLACE " -" ";-" _link_flags_list "${_link_flags_in}")
     # Extract list of directories from -L options.
     list(LENGTH _link_flags_list _link_flags_length)
     math(EXPR _link_flags_length "${_link_flags_length} - 1")


Update CppUTestConfigurationOptions.cmake

the src/Platform/Borland/UTestPlatform.cpp is now used when the cmake generator is "Borland Makefiles"

--- cmake/Modules/CppUTestConfigurationOptions.cmake
+++ cmake/Modules/CppUTestConfigurationOptions.cmake
@@ -13,6 +13,8 @@
     set(LINKER_SCRIPT "${CppUTestRootDirectory}/platforms/iar/CppUTestTest.icf")
     set(CMAKE_C_LINK_FLAGS "--semihosting --config ${LINKER_SCRIPT} --map mapfile.map")
     set(CMAKE_CXX_LINK_FLAGS "--semihosting --config ${LINKER_SCRIPT} --map mapfile.map")
+elseif (BORLAND)
+    set(CPP_PLATFORM Borland)
 elseif (STD_C)
     if(NOT CPP_PLATFORM)
         set(CPP_PLATFORM Gcc)


on Windows, don't treat warnings as errors in Debug mode (only Release)

--- cmake-toolchains/windows.cmake
+++ cmake-toolchains/windows.cmake
@@ -41,15 +41,15 @@
     set(FIPS_VS_CRT_FLAGS "/MT")
 endif()

-set(CMAKE_CXX_FLAGS "${FIPS_VS_EXCEPTION_FLAGS} /MP /WX /DWIN32")
+set(CMAKE_CXX_FLAGS "${FIPS_VS_EXCEPTION_FLAGS} /MP /DWIN32")
 set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Od /D_DEBUG /DFIPS_DEBUG=1")
-set(CMAKE_CXX_FLAGS_RELEASE "/O2 /DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "/O2 /DNDEBUG /WX")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")

-set(CMAKE_C_FLAGS "/MP /WX /errorReport:queue /DWIN32")
+set(CMAKE_C_FLAGS "/MP /DWIN32")
 set(CMAKE_C_FLAGS_DEBUG "/Zi /Od /D_DEBUG /DFIPS_DEBUG=1")
-set(CMAKE_C_FLAGS_RELEASE "/O2 /DNDEBUG ")
+set(CMAKE_C_FLAGS_RELEASE "/O2 /DNDEBUG /WX")
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")


Remove reference to obsolete CMake policy CMP0054

--- cmake/CMakeCompatibility.cmake
+++ cmake/CMakeCompatibility.cmake
@@ -1,8 +1,5 @@
 if (POLICY CMP0042)
 	cmake_policy(SET CMP0042 NEW)
-endif()
-if (POLICY CMP0054)
-	cmake_policy(SET CMP0054 OLD)
 endif()
 if (POLICY CMP0063)
 	# Honor visibility properties for all target types.


cmake/FindWaffle: Use PATH_SUFFIXES for WAFFLE_INCLUDE_DIR

This simplifies the code for finding WAFFLE_INCLUDE_DIR.

Signed-off-by: Adrian Marius Negreanu <6275e895b07c55965e568461471033e41dc8e923@intel.com>
[chadv: Write commit message. Split intwo two patches.]
Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

--- cmake/Modules/FindWaffle.cmake
+++ cmake/Modules/FindWaffle.cmake
@@ -39,14 +39,10 @@
     set(WAFFLE_FIND_VERSION_MAJOR 1)
 endif()

-find_path(WAFFLE_PREFIX_INCLUDE_DIR
-    NAMES "waffle-${WAFFLE_FIND_VERSION_MAJOR}/waffle.h"
-)
-
-set(WAFFLE_INCLUDE_DIR "${WAFFLE_PREFIX_INCLUDE_DIR}/waffle-${WAFFLE_FIND_VERSION_MAJOR}")
-
-set(WAFFLE_INCLUDE_DIRS "${WAFFLE_INCLUDE_DIR}"
-    CACHE FILEPATH "Full path to Waffle library")
+find_path(WAFFLE_INCLUDE_DIRS
+    NAMES waffle.h
+    PATH_SUFFIXES "waffle-${WAFFLE_FIND_VERSION_MAJOR}"
+ )

 find_library(WAFFLE_LIBRARIES
     NAMES "waffle-${WAFFLE_FIND_VERSION_MAJOR}"
@@ -77,10 +73,8 @@
 #
 unset(WAFFLE_FIND_VERSION_MAJOR CACHE)
 unset(WAFFLE_INCLUDE_DIR CACHE)
-unset(WAFFLE_PREFIX_INCLUDE_DIR CACHE)
 unset(WAFFLE_VERSION_H CACHE)

 unset(WAFFLE_FIND_VERSION_MAJOR)
 unset(WAFFLE_INCLUDE_DIR)
-unset(WAFFLE_PREFIX_INCLUDE_DIR)
 unset(WAFFLE_VERSION_H)


CMake: Fix build failure when Urho3D uses multiple languages (C/CXX). Thanks to @gleblebedev.

--- cmake/Modules/UrhoCommon.cmake
+++ cmake/Modules/UrhoCommon.cmake
@@ -221,7 +221,7 @@
     # Finalize option list
     string(REGEX REPLACE "[^;]+\\$<COMPILE_LANGUAGE:[^;]+;" "" GENERATOR_OPTIONS "${GENERATOR_OPTIONS}")    # COMPILE_LANGUAGE creates ambiguity, remove.
     string(REPLACE ";" "\n" GENERATOR_OPTIONS "${GENERATOR_OPTIONS}")
-    file(GENERATE OUTPUT "GeneratorOptions_${BIND_TARGET}_$<CONFIG>.txt" CONTENT "${GENERATOR_OPTIONS}")
+    file(GENERATE OUTPUT "GeneratorOptions_${BIND_TARGET}_$<CONFIG>.txt" CONTENT "${GENERATOR_OPTIONS}" CONDITION $<COMPILE_LANGUAGE:CXX>)

     set (SWIG_SYSTEM_INCLUDE_DIRS "${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES};${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES};${CMAKE_SYSTEM_INCLUDE_PATH};${CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS}")
     if (BIND_INCLUDE_DIRS)


[CMake] Fix find_python_libs_windows

[CMake] Fix find_python_libs_windows

Exporting PYTHON_INCLUDE_DIR to the Python scope somehow got lost in my
last change. Add it back again. This should fix the Windows bot!

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@367127 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -191,6 +191,7 @@
   set(PYTHON_EXECUTABLE ${PYTHON_EXE} PARENT_SCOPE)
   set(PYTHON_LIBRARY ${PYTHON_LIB} PARENT_SCOPE)
   set(PYTHON_DLL ${PYTHON_DLL} PARENT_SCOPE)
+  set(PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR} PARENT_SCOPE)
   set(PYTHONLIBS_VERSION_STRING "${PYTHONLIBS_VERSION_STRING}" PARENT_SCOPE)
   set(PYTHON_VERSION_STRING ${PYTHON_VERSION_STRING} PARENT_SCOPE)
   set(PYTHON_VERSION_MAJOR ${PYTHON_VERSION_MAJOR} PARENT_SCOPE)


[CMake] Don't force some CMake variables

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -18,9 +18,9 @@
 set(LLDB_VERSION_SUFFIX  svn CACHE STRING "" FORCE)

 if(APPLE)
-  set(LLDB_USE_SYSTEM_DEBUGSERVER ON CACHE BOOL "" FORCE)
-  set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "" FORCE)
-  set(LLDB_FRAMEWORK_TOOLS ${swift_lldb_framework_tools} CACHE STRING "" FORCE)
+  set(LLDB_USE_SYSTEM_DEBUGSERVER ON CACHE BOOL "")
+  set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")
+  set(LLDB_FRAMEWORK_TOOLS ${swift_lldb_framework_tools} CACHE STRING "")
 endif()

 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")


Manage linux on ppc64le architecture in cmake

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -27,6 +27,18 @@
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
     message(STATUS "Found CLANG compiler")
     set(ROOT_ARCHITECTURE linuxarm64)
+  else()
+    message(FATAL_ERROR "There is no Setup for this compiler up to now. Don't know what to do. Stop cmake at this point.")
+  endif()
+elseif(${SYSCTL_OUTPUT} MATCHES ppc64le)
+  message(STATUS "Found a 64bit ppc64 little endian system")
+  set(SPECIAL_CINT_FLAGS "-DG__64BIT")
+  if(CMAKE_COMPILER_IS_GNUCXX)
+    message(STATUS "Found GNU compiler collection")
+    set(ROOT_ARCHITECTURE ppc64le)
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
+    message(STATUS "Found CLANG compiler")
+    set(ROOT_ARCHITECTURE ppc64le)
   else()
     message(FATAL_ERROR "There is no Setup for this compiler up to now. Don't know what to do. Stop cmake at this point.")
   endif()


build(Emscripten): Improve build flags

build(Emscripten): Improve build flags

--- src/docker/itk-wasm/ITKWebAssemblyInterface.cmake
+++ src/docker/itk-wasm/ITKWebAssemblyInterface.cmake
@@ -35,13 +35,13 @@
     _add_executable(${umd_target} ${ARGN})

     get_property(_link_flags TARGET ${target} PROPERTY LINK_FLAGS)
-    set(common_link_flags " -s FORCE_FILESYSTEM=1 -s EXPORTED_RUNTIME_METHODS='[\"callMain\",\"cwrap\",\"ccall\",\"writeArrayToMemory\",\"writeAsciiToMemory\",\"AsciiToString\"]'  -flto -s WASM=1 -lnodefs.js -s WASM_ASYNC_COMPILATION=1 -s EXPORT_NAME=${target} -s MODULARIZE=1 -s EXIT_RUNTIME=0 -s INVOKE_RUN=0 --pre-js /ITKWebAssemblyInterface/src/emscripten-module/itkJSPipelinePre.js --post-js /ITKWebAssemblyInterface/src/emscripten-module/itkJSPost.js -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s EXPORTED_FUNCTIONS='[\"_main\"]' ${_link_flags}")
+    set(common_link_flags " -s FORCE_FILESYSTEM=1 -s EXPORTED_RUNTIME_METHODS='[\"callMain\",\"cwrap\",\"ccall\",\"writeArrayToMemory\",\"writeAsciiToMemory\",\"AsciiToString\"]' -flto -s ALLOW_MEMORY_GROWTH=1 -s WASM=1 -lnodefs.js -s WASM_ASYNC_COMPILATION=1 -s EXPORT_NAME=${target} -s MODULARIZE=1 -s EXIT_RUNTIME=0 -s INVOKE_RUN=0 --pre-js /ITKWebAssemblyInterface/src/emscripten-module/itkJSPipelinePre.js --post-js /ITKWebAssemblyInterface/src/emscripten-module/itkJSPost.js -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s EXPORTED_FUNCTIONS='[\"_main\"]' ${_link_flags}")
     set_property(TARGET ${wasm_target} PROPERTY LINK_FLAGS "${common_link_flags} -s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0")
     set_property(TARGET ${umd_target} PROPERTY LINK_FLAGS "${common_link_flags}")

     get_property(_link_flags_debug TARGET ${target} PROPERTY LINK_FLAGS_DEBUG)
-    set_property(TARGET ${wasm_target} PROPERTY LINK_FLAGS_DEBUG " -fno-lto -s DISABLE_EXCEPTION_CATCHING=0 --bind ${_link_flags_debug}")
-    set_property(TARGET ${umd_target} PROPERTY LINK_FLAGS_DEBUG " -fno-lto -s DISABLE_EXCEPTION_CATCHING=0 --bind ${_link_flags_debug}")
+    set_property(TARGET ${wasm_target} PROPERTY LINK_FLAGS_DEBUG " -fno-lto -s SAFE_HEAP=1 -s DISABLE_EXCEPTION_CATCHING=0 --bind ${_link_flags_debug}")
+    set_property(TARGET ${umd_target} PROPERTY LINK_FLAGS_DEBUG " -fno-lto -s SAFE_HEAP=1 -s DISABLE_EXCEPTION_CATCHING=0 --bind ${_link_flags_debug}")
   else()
     set_property(TARGET ${wasm_target} PROPERTY SUFFIX ".wasi.wasm")
     if (NOT TARGET wasi-exception-shim AND DEFINED CMAKE_CXX_COMPILE_OBJECT)


Minor

Minor

--- config/default.cmake
+++ config/default.cmake
@@ -0,0 +1,3 @@
+
+# Default CMake build configuration
+


atlas path

atlas path

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

--- Numerics/cmake/FindATLAS.cmake
+++ Numerics/cmake/FindATLAS.cmake
@@ -60,7 +60,7 @@
       SET(HAVE_CLAPACK_H 1)
     ENDIF(NOT CBLAS_INCLUDE_PATH)
   ELSE(NOT ATLAS_INCLUDE_PATH)
-    SET(ATLAS_INCLUDE_PATH ${ATLAS_INCLUDE_PATH})
+    SET(ATLAS_INCLUDE_PATH "${ATLAS_INCLUDE_PATH};${ATLAS_INCLUDE_PATH}/atlas")
     SET(HAVE_ATLAS 1)
     SET(HAVE_CBLAS_H 1)
     SET(HAVE_CLAPACK_H 1)


Fixed SFML import error in MSVC.

Fixed SFML import error in MSVC.


Use u and l instead of msvc specifics

Use u and l instead of msvc specifics


Fix COPYING path in script_setup_cpack.cmake


CI: remove hardcoded opencv include dir

CI: remove hardcoded opencv include dir

--- CI/debian-unstable-gcc.cmake
+++ CI/debian-unstable-gcc.cmake
@@ -21,7 +21,6 @@
 # Configuration options for debian-unstable-gcc

 set(site_option
-"opencv_INCLUDE_DIR:PATH=/usr/include
-OTB_USE_MPI:BOOL=OFF
+"OTB_USE_MPI:BOOL=OFF
 OTB_USE_SHARK:BOOL=OFF
 ")


Make sure the correct resource path is inserted into config files when building the OS X SDK.

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -26,7 +26,7 @@
     set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
     set(OGRE_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}")
   else()
-    if(OGRE_INSTALL_SAMPLES)
+    if(OGRE_INSTALL_SAMPLES_SOURCE)
       set(OGRE_MEDIA_PATH "media")
       set(OGRE_MEDIA_DIR_REL "../../../${OGRE_MEDIA_PATH}")
       set(OGRE_MEDIA_DIR_DBG "../../../${OGRE_MEDIA_PATH}")


Correct case-sensitivity issue with samples media path

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -142,8 +142,8 @@

 # CREATE CONFIG FILES - BUILD DIR VERSIONS
-set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/media")
-set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/media")
+set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
+set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
 if (WIN32)
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")


another attempt to fix flann config

another attempt to fix flann config

--- CMakeModules/Findflann.cmake
+++ CMakeModules/Findflann.cmake
@@ -2,16 +2,14 @@

 include(FindPackageHandleStandardArgs)

-find_path(FLANN_INCLUDE_DIRS flann.hpp PATH_SUFFIXES flann)
-if (FLANN_INCLUDE_DIRS)
-    file(READ "${FLANN_INCLUDE_DIRS}/config.h" FLANN_CONFIG)
+find_path(FLANN_INCLUDE_DIR flann.hpp PATH_SUFFIXES flann)
+if (FLANN_INCLUDE_DIR)
+    file(READ "${FLANN_INCLUDE_DIR}/config.h" FLANN_CONFIG)
     string(REGEX REPLACE ".*FLANN_VERSION_ \"([0-9.]+)\".*" "\\1" FLANN_VERSION ${FLANN_CONFIG})
     if(FLANN_VERSION VERSION_LESS flann_FIND_VERSION)
         message(STATUS "Installed version of flann is too old. Version ${flann_FIND_VERSION} or above required")
-        unset(FLANN_INCLUDE_DIRS)
     else()
-        string(REGEX REPLACE "/flann$" "" FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIRS})
-        message(STATUS "Found flann -- ${FLANN_INCLUDE_DIRS}")
+        string(REGEX REPLACE "/flann$" "" FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIR})
     endif()
 endif()
 message("FLANN_INCLUDE_DIRS = ${FLANN_INCLUDE_DIRS}")


[ROOT-11007] Fix ROOTBUILD defined in compiledata.h and used by ACLiC to decide to optimize/not the user scripts (#6232)

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -815,6 +815,12 @@
   set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup")
 endif()

+# ROOTBUILD definition (it is defined in compiledata.h and used by ACLIC
+# to decide whether (by default) to optimize or not optimize the user scripts.)
+if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+  set(ROOTBUILD "debug")
+endif()
+
 if(WIN32)
   # We cannot use the compiledata.sh script for windows
   configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.win32.in ${CMAKE_BINARY_DIR}/ginclude/compiledata.h NEWLINE_STYLE UNIX)
@@ -823,7 +829,7 @@
     ${CMAKE_BINARY_DIR}/ginclude/compiledata.h "${CMAKE_CXX_COMPILER}"
         "${CMAKE_CXX_FLAGS_RELEASE}" "${CMAKE_CXX_FLAGS_DEBUG}" "${CMAKE_CXX_FLAGS}"
         "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}" "${CMAKE_EXE_FLAGS}" "so"
-        "${libdir}" "-lCore" "-lRint" "${incdir}" "" "" "${ROOT_ARCHITECTURE}" "")
+        "${libdir}" "-lCore" "-lRint" "${incdir}" "" "" "${ROOT_ARCHITECTURE}" "${ROOTBUILD}")
 endif()

 #---Get the value of CMAKE_CXX_FLAGS provided by the user in the command line


moved to generator expressions for cmake debug flags

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -23,9 +23,9 @@
 endif ()

 ## add TOKU_PTHREAD_DEBUG for debug builds
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG=1)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DRD TOKU_PTHREAD_DEBUG=1)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DRD _FORTIFY_SOURCE=2)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
+  $<$<OR:$<CONFIG:DEBUG>,$<CONFIG:DRD>>:TOKU_PTHREAD_DEBUG=1>
+  $<$<CONFIG:DRD>:_FORTIFY_SOURCE=2>)

 ## coverage
 option(USE_GCOV "Use gcov for test coverage." OFF)


Version: Update development date

Version: Update development date

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 4)
-set(CastXML_VERSION_PATCH 20210902)
+set(CastXML_VERSION_PATCH 20211025)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


[changed] version back to 0.9.0

[changed] version back to 0.9.0

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,2 +1,2 @@
 # This version number is loaded by the package and the project.
-SET( VERSION "0.10.0" )
+SET( VERSION "0.9.0" )


Delete CPackSourceConfig.cmake

Delete CPackSourceConfig.cmake

--- cygwin/CPackSourceConfig.cmake
+++ cygwin/CPackSourceConfig.cmake
@@ -1,89 +0,0 @@
-# This file will be configured to contain variables for CPack. These variables
-# should be set in the CMake list file of the project before CPack module is
-# included. The list of available CPACK_xxx variables and their associated
-# documentation may be obtained using
-#  cpack --help-variable-list
-#
-# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME)
-# and some are specific to a generator
-# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables
-# usually begin with CPACK_<GENNAME>_xxxx.
-
-
-SET(CPACK_BINARY_7Z "")
-SET(CPACK_BINARY_BUNDLE "")
-SET(CPACK_BINARY_CYGWIN "")
-SET(CPACK_BINARY_DEB "")
-SET(CPACK_BINARY_DRAGNDROP "")
-SET(CPACK_BINARY_IFW "")
-SET(CPACK_BINARY_NSIS "")
-SET(CPACK_BINARY_OSXX11 "")
-SET(CPACK_BINARY_PACKAGEMAKER "")
-SET(CPACK_BINARY_RPM "")
-SET(CPACK_BINARY_STGZ "")
-SET(CPACK_BINARY_TBZ2 "")
-SET(CPACK_BINARY_TGZ "")
-SET(CPACK_BINARY_TXZ "")
-SET(CPACK_BINARY_TZ "")
-SET(CPACK_BINARY_WIX "")
-SET(CPACK_BINARY_ZIP "")
-SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
-SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE")
-SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE")
-SET(CPACK_GENERATOR "CygwinSource")
-SET(CPACK_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#")
-SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "0")
-SET(CPACK_INSTALLED_DIRECTORIES "/cygdrive/e/devel/spdlog;/")
-SET(CPACK_INSTALL_CMAKE_PROJECTS "")
-SET(CPACK_INSTALL_PREFIX "/usr/local")
-SET(CPACK_MODULE_PATH "")
-SET(CPACK_NSIS_DISPLAY_NAME "spdlog 1.4.0")
-SET(CPACK_NSIS_INSTALLER_ICON_CODE "")
-SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
-SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
-SET(CPACK_NSIS_PACKAGE_NAME "spdlog 1.4.0")
-SET(CPACK_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackConfig.cmake")
-SET(CPACK_PACKAGE_CONTACT "Gabi Melman <gmelman1@gmail.com>")
-SET(CPACK_PACKAGE_DEFAULT_LOCATION "/")
-SET(CPACK_PACKAGE_DESCRIPTION_FILE "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "spdlog built using CMake")
-SET(CPACK_PACKAGE_FILE_NAME "spdlog-1.4.0-Source")
-SET(CPACK_PACKAGE_INSTALL_DIRECTORY "spdlog 1.4.0")
-SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "spdlog 1.4.0")
-SET(CPACK_PACKAGE_NAME "spdlog")
-SET(CPACK_PACKAGE_RELOCATABLE "true")
-SET(CPACK_PACKAGE_VENDOR "Gabi Melman")
-SET(CPACK_PACKAGE_VERSION "1.4.0")
-SET(CPACK_PACKAGE_VERSION_MAJOR "1")
-SET(CPACK_PACKAGE_VERSION_MINOR "4")
-SET(CPACK_PACKAGE_VERSION_PATCH "0")
-SET(CPACK_PROJECT_URL "https://github.com/gabime/spdlog")
-SET(CPACK_RESOURCE_FILE_LICENSE "/usr/share/cmake-3.6.2/Templates/CPack.GenericLicense.txt")
-SET(CPACK_RESOURCE_FILE_README "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt")
-SET(CPACK_RESOURCE_FILE_WELCOME "/usr/share/cmake-3.6.2/Templates/CPack.GenericWelcome.txt")
-SET(CPACK_SET_DESTDIR "OFF")
-SET(CPACK_SOURCE_7Z "")
-SET(CPACK_SOURCE_CYGWIN "ON")
-SET(CPACK_SOURCE_GENERATOR "CygwinSource")
-SET(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#")
-SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "/cygdrive/e/devel/spdlog;/")
-SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackSourceConfig.cmake")
-SET(CPACK_SOURCE_PACKAGE_FILE_NAME "spdlog-1.4.0-Source")
-SET(CPACK_SOURCE_TBZ2 "")
-SET(CPACK_SOURCE_TGZ "")
-SET(CPACK_SOURCE_TOPLEVEL_TAG "CYGWIN-Source")
-SET(CPACK_SOURCE_TXZ "")
-SET(CPACK_SOURCE_TZ "")
-SET(CPACK_SOURCE_ZIP "")
-SET(CPACK_STRIP_FILES "")
-SET(CPACK_SYSTEM_NAME "CYGWIN")
-SET(CPACK_TOPLEVEL_TAG "CYGWIN-Source")
-SET(CPACK_WIX_SIZEOF_VOID_P "8")
-
-if(NOT CPACK_PROPERTIES_FILE)
-  set(CPACK_PROPERTIES_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackProperties.cmake")
-endif()
-
-if(EXISTS ${CPACK_PROPERTIES_FILE})
-  include(${CPACK_PROPERTIES_FILE})
-endif()


HAWQ-653. fix the bug when enabling code coverage

--- depends/libyarn/CMake/CodeCoverage.cmake
+++ depends/libyarn/CMake/CodeCoverage.cmake
@@ -18,11 +18,7 @@

 # Check prereqs
 FIND_PROGRAM(GCOV_PATH gcov)
-
-IF(CMAKE_COMPILER_IS_GNUCXX)
-    FIND_PROGRAM(LCOV_PATH lcov)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
+FIND_PROGRAM(LCOV_PATH lcov)
 FIND_PROGRAM(GENHTML_PATH genhtml)

 IF(NOT GCOV_PATH)
@@ -35,12 +31,8 @@

 #Setup compiler options
 ADD_DEFINITIONS(-fprofile-arcs -ftest-coverage)
-
-IF(CMAKE_COMPILER_IS_GNUCXX)
-    LINK_LIBRARIES(gcov)
-ELSEIF(CMAKE_COMPILER_IS_CLANG)
-    LINK_LIBRARIES(profile_rt)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs ")
+SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs ")

 IF((NOT LCOV_PATH) AND CMAKE_COMPILER_IS_GNUCXX)
     MESSAGE(FATAL_ERROR "lcov not found! Aborting...")


Also clear PATH_TO_EXECUTABLE in cache at first function call.

--- ToolingFindPackageUtil.cmake
+++ ToolingFindPackageUtil.cmake
@@ -96,7 +96,7 @@
                            "${FIND_TOOL_EXECUTABLE_MULTIVAR_ARGS}"
                            ${ARGN})

-    set (PATH_TO_EXECUTABLE)
+    unset (PATH_TO_EXECUTABLE CACHE)
     if (FIND_TOOL_EXECUTABLE_CUSTOM_PATHS)

         set (PATHS ${FIND_TOOL_EXECUTABLE_CUSTOM_PATHS})


Fix path in cmake file

Fix path in cmake file

--- plugins/homepage/plugin.cmake
+++ plugins/homepage/plugin.cmake
@@ -7,4 +7,4 @@
     "${PROJECT_SOURCE_DIR}/plugins/homepage/plugin_tests")

 add_eslint_test(homepage
-    "${PROJECT_SOURCE_DIR}/plugins/homepage/web_client/js/src")
+    "${PROJECT_SOURCE_DIR}/plugins/homepage/web_client/js")


added options for windows/appveyour find script

--- cmake-modules/FindSDL2.cmake
+++ cmake-modules/FindSDL2.cmake
@@ -74,6 +74,8 @@
 	/opt/local # DarwinPorts
 	/opt/csw # Blastwave
 	/opt
+	${SDL2_HINT_ROOT}
+	${SDL2_HINT_BUILD}
 )

 FIND_PATH(SDL2_INCLUDE_DIR SDL.h
@@ -87,7 +89,7 @@
 	NAMES SDL2
 	HINTS
 	$ENV{SDL2DIR}
-	PATH_SUFFIXES lib64 lib
+	PATH_SUFFIXES lib64 lib Release Debug
 	PATHS ${SDL2_SEARCH_PATHS}
 )


cmake: add -Wformat to fix error

cmake: add -Wformat to fix error

see #1629

  cc1: error: -Wformat-security ignored without -Wformat

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -128,7 +128,7 @@
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wall -Wextra")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wno-overlength-strings")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wsign-compare -Wfloat-equal")
-set (COMMON_FLAGS "${COMMON_FLAGS} -Wformat-security")
+set (COMMON_FLAGS "${COMMON_FLAGS} -Wformat -Wformat-security")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wshadow")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wcomments -Wtrigraphs -Wundef")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wuninitialized -Winit-self")
@@ -154,7 +154,7 @@
 #
 # Merge all flags
 #
-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_STD} ${EXTRA_FLAGS} ${C_EXTRA_FLAGS} ${COMMON_FLAGS} -Wsign-compare -Wfloat-equal -Wformat-security")
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_STD} ${EXTRA_FLAGS} ${C_EXTRA_FLAGS} ${COMMON_FLAGS} -Wsign-compare -Wfloat-equal")
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STD} ${EXTRA_FLAGS} ${CXX_EXTRA_FLAGS} ${COMMON_FLAGS}")

 message (STATUS "C flags are ${CMAKE_C_FLAGS}")


avoid remove duplicates list call on empty list

--- cmake/FindMetaExamples.cmake
+++ cmake/FindMetaExamples.cmake
@@ -49,8 +49,14 @@
 			binary/multiple_kernel_learning.sg
 		)
 	ENDIF()
-  LIST(REMOVE_DUPLICATES EXCLUDED_META_EXAMPLES)
-    SET(EXCLUDED_META_EXAMPLES ${EXCLUDED_META_EXAMPLES} PARENT_SCOPE)
+
+  # remove double entries to avoid errors due to "double" removing
+  LIST(LENGTH EXCLUDED_META_EXAMPLES NUM_EXCLUDED)
+  IF(NUM_EXCLUDED GREATER 0)
+    LIST(REMOVE_DUPLICATES EXCLUDED_META_EXAMPLES)
+  ENDIF()
+
+  SET(EXCLUDED_META_EXAMPLES ${EXCLUDED_META_EXAMPLES} PARENT_SCOPE)

 endfunction()


[cmake] sort warning flags for display

[cmake] sort warning flags for display

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -542,6 +542,8 @@
 		message (STATUS "    C/C++ warning flags:")

 		list (REMOVE_DUPLICATES _WARNING_FLAG_LIST)
+		list (SORT _WARNING_FLAG_LIST)
+
 		foreach (_FLAG ${_WARNING_FLAG_LIST})
 			axl_message ("        ${_FLAG}")
 		endforeach ()


build: install the import libraries for windows

When building the target libraries, we need to install the import
library as well.  Unfortunately, due to the way that the swift build
system works, we do not have the ability to rely on CMake doing the
right thing and taking care of this for us.  We have to manually
construct and track the import library due to the fact that we fight the
cross-compilation support.  Add some logic to extract the import
libraries and install them so that uses can actually build for Windows.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -2223,8 +2223,19 @@
           FILES "${UNIVERSAL_LIBRARY_NAME}"
           DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
           PERMISSIONS ${file_permissions})
+      if(sdk STREQUAL WINDOWS)
+        foreach(arch ${SWIFT_SDK_WINDOWS_ARCHITECTURES})
+          if(TARGET ${name}-windows-${arch}_IMPLIB)
+            get_target_property(import_library ${name}-windows-${arch}_IMPLIB IMPORTED_LOCATION)
+            swift_install_in_component(${SWIFTLIB_INSTALL_IN_COMPONENT}
+              FILES ${import_library}
+              DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${arch}"
+              PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+          endif()
+        endforeach()
+      endif()
+
       swift_is_installing_component("${SWIFTLIB_INSTALL_IN_COMPONENT}" is_installing)
-
       if(NOT is_installing)
         set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${VARIANT_NAME})
       else()


CMake: avoid a reconfigure loop from r213091

Removing the native CMakeCache.txt causes the target to get re-run needlessly
on some systems. We'll want another solution for that part of the fix.

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -86,8 +86,7 @@
   endforeach()

   add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt
-    # Remove the old cache to avoid persisting previous flags.
-    COMMAND ${CMAKE_COMMAND} -E remove ${CX_NATIVE_TG_DIR}/CMakeCache.txt
+    # TODO: Clear the old CMakeCache.txt somehow without breaking restat.
     COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release
                              -DLLVM_BUILD_POLLY=OFF ${CX_CMAKE_ARGUMENTS}
                              -G "${CMAKE_GENERATOR}" ${CMAKE_SOURCE_DIR}


CMake: fix cross-compilation with external source directories

This adds support for building native artifacts when cross-compiling using the
popular side-by-side source directory layout (no symlinks, no nested
repositories).

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -77,9 +77,19 @@
     COMMAND ${CMAKE_COMMAND} -E make_directory ${CX_NATIVE_TG_DIR}
     COMMENT "Creating ${CX_NATIVE_TG_DIR}...")

+  # Forward a subset of configure options to discover additional tablegen modules.
+  get_cmake_property(_variableNames CACHE_VARIABLES)
+  foreach (_variableName ${_variableNames})
+    if (_variableName MATCHES "^(LLVM_EXTERNAL_.*_SOURCE_DIR)$")
+      list(APPEND CX_CMAKE_ARGUMENTS "-D${_variableName}=\"${${_variableName}}\"")
+    endif ()
+  endforeach()
+
   add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt
+    # Remove the old cache to avoid persisting previous flags.
+    COMMAND ${CMAKE_COMMAND} -E remove ${CX_NATIVE_TG_DIR}/CMakeCache.txt
     COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release
-                             -DLLVM_BUILD_POLLY=OFF
+                             -DLLVM_BUILD_POLLY=OFF ${CX_CMAKE_ARGUMENTS}
                              -G "${CMAKE_GENERATOR}" ${CMAKE_SOURCE_DIR}
     WORKING_DIRECTORY ${CX_NATIVE_TG_DIR}
     DEPENDS ${CX_NATIVE_TG_DIR}


Removed mingw --large-address-aware

Removed mingw --large-address-aware

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -113,7 +113,7 @@
          # MinGW gives some c11plus.xe out of memory messages:
          # http://sourceforge.net/p/mingw-w64/mailman/message/33182613/
          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=0")
-         set(CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware")
+#         set(CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware")
      endif ()

  elseif (TUDAT_BUILD_MSVC)


rust.cmake: add comment pointing to CAmkES setting of --tls-model

Change-Id: I5b2674ef86b9a5c35f441666a9d3ec55cd591f7e
GitOrigin-RevId: 32312f93e053ea0579cb6d98e9fc991ba325ddb2


Correctly install PDB files after LIBRARY_OUTPUT_PATH change

--- adm/cmake/BuildToolkit.cmake
+++ adm/cmake/BuildToolkit.cmake
@@ -160,11 +160,11 @@

 	IF(MSVC AND ${PROJECT_NAME}_INSTALL_PDB_FILES )
 		IF (CMAKE_CONFIGURATION_TYPES)
-			INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/${TOOLKIT}.pdb DESTINATION ${TOOLKIT_INSTALL_LIB_DIR} CONFIGURATIONS RelWithDebInfo)
-			INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/${TOOLKIT}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${TOOLKIT_INSTALL_LIB_DEBUG_DIR} CONFIGURATIONS Debug)
+			INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/RelWithDebInfo/${TOOLKIT}.pdb DESTINATION ${TOOLKIT_INSTALL_LIB_DIR} CONFIGURATIONS RelWithDebInfo)
+			INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/Debug/${TOOLKIT}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${TOOLKIT_INSTALL_LIB_DEBUG_DIR} CONFIGURATIONS Debug)
 		ELSE(CMAKE_CONFIGURATION_TYPES)
-			INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TOOLKIT}.pdb DESTINATION ${TOOLKIT_INSTALL_LIB_DIR} CONFIGURATIONS RelWithDebInfo)
-			INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TOOLKIT}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${TOOLKIT_INSTALL_LIB_DEBUG_DIR} CONFIGURATIONS Debug)
+			INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/${TOOLKIT}.pdb DESTINATION ${TOOLKIT_INSTALL_LIB_DIR} CONFIGURATIONS RelWithDebInfo)
+			INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/${TOOLKIT}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${TOOLKIT_INSTALL_LIB_DEBUG_DIR} CONFIGURATIONS Debug)
 		ENDIF (CMAKE_CONFIGURATION_TYPES)


Ajout du support CMake sous Windows

Ajout du support CMake sous Windows


add license header to .cmake file

add license header to .cmake file

--- source/suppress-warnings.cmake
+++ source/suppress-warnings.cmake
@@ -1,3 +1,17 @@
+# Copyright 2015 ARM Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 message("suppressing warnings from mbed-hal-st-stm32cubef4")

 set_target_properties(mbed-hal-st-stm32cubef4


Added a commented out line for building debug with release optimizations.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -6,7 +6,10 @@
 endif ()

 macro(create_library target)
-set (CMAKE_OSX_ARCHITECTURES "armv7 arm64")
+  set (CMAKE_OSX_ARCHITECTURES "armv7 arm64")
+
+  # Optimize debug build to help diagnose release build crashes.
+  #set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Os")

   set(CURRENT_TARGET ${target})
   #message(WARNING "*${PROJECT_NAME} STREQUAL ${target}*")


Core/CMake: update revision display format

--- revision.h.in.cmake
+++ revision.h.in.cmake
@@ -6,7 +6,7 @@
  #define VER_COMPANYNAME_STR        "AzerothCore"
  #define VER_LEGALCOPYRIGHT_STR     "AzerothCore"
  #define VER_FILEVERSION            0,0,0
- #define VER_FILEVERSION_STR        "@rev_date@ (@rev_hash@)"
+ #define VER_FILEVERSION_STR        "@rev_hash@ @rev_date@"
  #define VER_PRODUCTVERSION         VER_FILEVERSION
  #define VER_PRODUCTVERSION_STR     VER_FILEVERSION_STR
 #endif // __REVISION_H__


Fix errors in the documentation comments


Fix a problem when cross compiling using NMake.

The previous behaviour was to add a CXX flags when
msdev/devenv/nmake/VCExpress was detected.
However these tools have nothing to do with the compiler used.
The /W4 applies only when CL (aka MS-VC) is the current compiler.
It avoids a compilation issue when nmake is used with another
toolchain than the MS one (eg. the Android NDK which is base on GCC,
and of course GCC do not know the /W4 flag!).
Use MSVC instead of MSVC_VERSION variable to do the test.

Change-Id: I287796dcba9c39a8f912db10bd8b8f527a544bdb

--- CMake/vtkDetermineCompilerFlags.cmake
+++ CMake/vtkDetermineCompilerFlags.cmake
@@ -101,15 +101,15 @@
 ENDIF(_MAY_BE_INTEL_COMPILER)

-IF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake|VCExpress)")
-# Use the highest warning level for visual studio.
+IF(MSVC)
+# Use the highest warning level for visual c++ compiler.
   SET(CMAKE_CXX_WARNING_LEVEL 4)
   IF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
     STRING(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
   ELSE(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
   ENDIF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
-ENDIF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake|VCExpress)")
+ENDIF(MSVC)

 # Disable deprecation warnings for standard C and STL functions in VS2005
 # and later


remove Wno-error=parentheses-equality (#42993)

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -142,7 +142,6 @@
     -Wno-unused-function
     -Wno-error=literal-suffix
     -Wno-error=unused-local-typedefs
-    -Wno-error=parentheses-equality # Warnings in pybind11
     -Wno-error=ignored-attributes  # Warnings in Eigen, gcc 6.3
     -Wno-error=terminate  # Warning in PADDLE_ENFORCE
     -Wno-error=int-in-bool-context # Warning in Eigen gcc 7.2


Add macro for getting bin output directory

--- cmake/mouve.cmake
+++ cmake/mouve.cmake
@@ -1,3 +1,11 @@
+macro(mouve_bin_directory _config _directory)
+    if(MSVC) # We should really check for multi-config generator
+        set(${_directory} ${CMAKE_BINARY_DIR}/bin/${_config})
+    else()
+        set(${_directory} ${CMAKE_BINARY_DIR}/bin)
+    endif()
+endmacro()
+
 function(mouve_add_plugin _name)
     add_library(${_name} MODULE ${ARGN})
     target_link_libraries(${_name} PRIVATE Mouve.Logic)
@@ -6,16 +14,15 @@
     if(MSVC) # We should really check for multi-config generator
         foreach(config ${CMAKE_CONFIGURATION_TYPES})
             string(TOUPPER ${config} configUpper)
-            set_target_properties(${_name}
-                PROPERTIES
-                    LIBRARY_OUTPUT_DIRECTORY_${configUpper} ${CMAKE_BINARY_DIR}/bin/${config}/plugins
+            mouve_bin_directory(${config} directory)
+            set_target_properties(${_name} PROPERTIES
+                LIBRARY_OUTPUT_DIRECTORY_${configUpper} ${directory}/plugins
             )
         endforeach()
     else()
-        set_target_properties(${_name}
-            PROPERTIES
-                LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/plugins
-
+        mouve_bin_directory(${CMAKE_BUILD_TYPE} directory)
+        set_target_properties(${_name} PROPERTIES
+            LIBRARY_OUTPUT_DIRECTORY ${directory}/plugins
         )
     endif()


Bump WSREP_PATCH_VERSION to 19

Bump WSREP_PATCH_VERSION to 19

--- cmake/wsrep.cmake
+++ cmake/wsrep.cmake
@@ -26,7 +26,7 @@
 OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})

 # Set the patch version
-SET(WSREP_PATCH_VERSION "18")
+SET(WSREP_PATCH_VERSION "19")

 # Obtain wsrep API version
 FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION


added message to find chull cmake module

--- share/Findchull.cmake
+++ share/Findchull.cmake
@@ -22,7 +22,9 @@

 if(NOT CHULL_INCLUDE_DIR)
   set(CHULL_FOUND NO)
-  # do anything else?
+  message(STATUS "chull NOT found, please specify CHULL_ROOT.")
+else()
+    message(STATUS "Found chull: ${CHULL_INCLUDE_DIR}")
 endif()

 # No need to find other libraries yet.


Fix library dependency build step on RPi

--- toolchains/raspberrypi.cmake
+++ toolchains/raspberrypi.cmake
@@ -34,9 +34,11 @@
 include_directories(/opt/vc/include/interface/vcos/pthreads)
 include_directories(/opt/vc/include/interface/vmcs_host/linux)

+# load library dependencies
+add_subdirectory(${PROJECT_SOURCE_DIR}/external)
+
 # load core library
 add_subdirectory(${PROJECT_SOURCE_DIR}/core)
-include_directories(${CORE_LIBRARIES_INCLUDE_DIRS})

 add_executable(${EXECUTABLE_NAME} ${SOURCES})


typo in FindSystemC.cmake fixed (DIR -> DIRS)

--- cmake/FindSystemC.cmake
+++ cmake/FindSystemC.cmake
@@ -61,7 +61,7 @@
   PATHS ${_SYSTEMC_PATHS}
 )

-FIND_PATH(SystemC_LIBRARY_DIR
+FIND_PATH(SystemC_LIBRARY_DIRS
   NAMES libsystemc.a
   HINTS ${_SYSTEMC_HINTS}
   PATHS ${_SYSTEMC_PATHS}
@@ -82,7 +82,7 @@
 if(SystemC_FOUND)
         set(SystemC_LIBRARIES systemc)
         message(STATUS "SystemC header files are taken from ${SystemC_INCLUDE_DIRS}")
-        message(STATUS "SystemC library is taken from ${SystemC_LIBRARY_DIR}")
+        message(STATUS "SystemC library is taken from ${SystemC_LIBRARY_DIRS}")
         if(SCV_FOUND)
             set(SCV_LIBRARIES scv)
             message(STATUS "SCV header files are taken from ${SCV_INCLUDE_DIRS}")


Bug 493 : multiple calls to FindUmfPack (transplanted from 35ee747575143155b8ef538c0c0b30d0cf0894a3)

--- cmake/FindUmfpack.cmake
+++ cmake/FindUmfpack.cmake
@@ -19,8 +19,9 @@
 find_library(UMFPACK_LIBRARIES umfpack PATHS $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})

 if(UMFPACK_LIBRARIES)
-
-  get_filename_component(UMFPACK_LIBDIR ${UMFPACK_LIBRARIES} PATH)
+  if (NOT UMFPACK_LIBDIR)
+    get_filename_component(UMFPACK_LIBDIR ${UMFPACK_LIBRARIES} PATH)
+  endif(NOT UMFPACK_LIBDIR)

   find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
   if (AMD_LIBRARY)


cmake: dts: resolve symlinks before de-duplicating DTS_ROOT

DTS directories can come from multiple places. Some places like a user's
CMakeLists.txt can preserve symbolic links. Others like
`scripts/zephyr_module.py --settings-out` resolve symbolic
links.

list(REMOVE_DUPLICATES ...) does not know anything about directories;
only about strings. To fix it the de-duplication, resolve all symbolic
links in DTS_ROOT first using file(REAL_PATH ...).

Fixes this somewhat confusing error:
```
-- Found BOARD.dts:    /home/proj/mymodule/boards/myboard/myboard.dts
devicetree error: both /home/proj/mymodule/dts/bindings/intel,stuff.yaml
             and /disk1/home/proj/mymodule/dts/bindings/intel,stuff.yaml
have 'compatible: intel,stuff'
```

Also, print `gen_defines.py` arguments in case of an error so anyone can
see what failed and not just west+CMake experts.

Signed-off-by: Marc Herbert <77e7c7d746b52c6eb01119b65a031ae1f650246d@intel.com>

--- cmake/modules/dts.cmake
+++ cmake/modules/dts.cmake
@@ -53,6 +53,17 @@
   ${SHIELD_DIRS}
   ${ZEPHYR_BASE}
   )
+
+# DTS directories can come from multiple places. Some places like a
+# user's CMakeLists.txt can preserve symbolic links. Others like
+# scripts/zephyr_module.py --settings-out resolve them.
+unset(real_dts_root)
+foreach(dts_dir ${DTS_ROOT})
+  file(REAL_PATH ${dts_dir} real_dts_dir)
+  list(APPEND real_dts_root ${real_dts_dir})
+endforeach()
+set(DTS_ROOT ${real_dts_root})
+
 list(REMOVE_DUPLICATES
   DTS_ROOT
   )
@@ -210,6 +221,7 @@
     RESULT_VARIABLE ret
     )
   if(NOT "${ret}" STREQUAL "0")
+    message(STATUS "In: ${PROJECT_BINARY_DIR}, command: ${CMD_EXTRACT}")
     message(FATAL_ERROR "gen_defines.py failed with return code: ${ret}")
   else()
     zephyr_file_copy(${ZEPHYR_DTS}.new ${ZEPHYR_DTS} ONLY_IF_DIFFERENT)


set RELEASE_OUTPUT_NAME for executables on Windows

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -187,7 +187,9 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX})
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF
+                                                DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
+                                                RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
     elseif(__COMPILER_PATHSCALE)
@@ -227,7 +229,9 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX})
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF
+                                                DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
+                                                RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
     elseif(__COMPILER_PATHSCALE)
@@ -267,7 +271,9 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX})
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF
+                                                DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
+                                                RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
     else()


ENH: disable jasper in GDAL

ENH: disable jasper in GDAL

--- CMake/External_GDAL.cmake
+++ CMake/External_GDAL.cmake
@@ -85,7 +85,7 @@
         --prefix=${CMAKE_INSTALL_PREFIX}
         --enable-static=no
         --without-ogdi
-        #--without-jasper
+        --without-jasper
         ${GDAL_SB_ZLIB_CONFIG}
         ${GDAL_SB_TIFF_CONFIG}
         ${GDAL_SB_GEOTIFF_CONFIG}


Rely on `Z3_INCLUDE_DIRS` instead of `Z3_PKGCONF_INCLUDE_DIRS`

--- CMakeModules/FindZ3.cmake
+++ CMakeModules/FindZ3.cmake
@@ -54,7 +54,7 @@

 find_file(Z3_VERSION_HEADER
   z3_version.h
-  PATHS ${Z3_PKGCONF_INCLUDE_DIRS}
+  PATHS ${Z3_INCLUDE_DIRS}
   REQUIRED
 )


cmake-rust: merge two RustStaticLibrary.cmake and add feature support

Summary:
We somehow have two different RustStaticLibrary.cmake in different places (one in eden repo and the other one in the shared opensource builder).

This diff merges them and switches Eden into using the shared CMake function (for the features option).

This diff also adds the features option for rust_executable funciton, which will be used in the next diff.

Reviewed By: kmancini

Differential Revision: D39038491

fbshipit-source-id: 99d61a1d5450010b345107a9ec5c761b62004aa6

--- build/fbcode_builder/CMake/RustStaticLibrary.cmake
+++ build/fbcode_builder/CMake/RustStaticLibrary.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) Facebook, Inc. and its affiliates.
+# Copyright (c) Meta Platforms, Inc. and affiliates.

 include(FBCMakeParseArgs)

@@ -26,7 +26,7 @@

 if("${GENERATE_CARGO_VENDOR_CONFIG}" STREQUAL "AUTO")
   set(GENERATE_CARGO_VENDOR_CONFIG "${USE_CARGO_VENDOR}")
-endif()
+endif()

 if(GENERATE_CARGO_VENDOR_CONFIG)
   if(NOT EXISTS "${RUST_VENDORED_CRATES_DIR}")
@@ -78,7 +78,7 @@
 # Cargo build static library.
 #
 # ```cmake
-# rust_static_library(<TARGET> [CRATE <CRATE_NAME>])
+# rust_static_library(<TARGET> [CRATE <CRATE_NAME>] [FEATURES <FEATURE_NAME>])
 # ```
 #
 # Parameters:
@@ -88,6 +88,8 @@
 # - CRATE_NAME:
 #   Name of the crate. This parameter is optional. If unspecified, it will
 #   fallback to `${TARGET}`.
+# - FEATURE_NAME:
+#   Name of the Rust feature to enable.
 #
 # This function creates two targets:
 # - "${TARGET}": an interface library target contains the static library built
@@ -99,12 +101,17 @@
 # headers with the interface library.
 #
 function(rust_static_library TARGET)
-  fb_cmake_parse_args(ARG "" "CRATE" "" "${ARGN}")
+  fb_cmake_parse_args(ARG "" "CRATE;FEATURES" "" "${ARGN}")

   if(DEFINED ARG_CRATE)
     set(crate_name "${ARG_CRATE}")
   else()
     set(crate_name "${TARGET}")
+  endif()
+  if(DEFINED ARG_FEATURES)
+    set(features --features ${ARG_FEATURES})
+  else()
+    set(features )
   endif()

   set(cargo_target "${TARGET}.cargo")
@@ -117,7 +124,11 @@
     set(cargo_cmd cargo.exe)
   endif()

-  set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name})
+  if(DEFINED ARG_FEATURES)
+    set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name} --features ${ARG_FEATURES})
+  else()
+    set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name})
+  endif()
   if(USE_CARGO_VENDOR)
     set(extra_cargo_env "CARGO_HOME=${RUST_CARGO_HOME}")
     set(cargo_flags ${cargo_flags})
@@ -156,16 +167,18 @@
   )
 endfunction()

-# This function instructs cmake to define a target that will use `cargo build`
+# This function instructs CMake to define a target that will use `cargo build`
 # to build a bin crate referenced by the Cargo.toml file in the current source
 # directory.
 # It accepts a single `TARGET` parameter which will be passed as the package
 # name to `cargo build -p TARGET`. If binary has different name as package,
 # use optional flag BINARY_NAME to override it.
-# The cmake target will be registered to build by default as part of the
+# It also accepts a `FEATURES` parameter if you want to enable certain features
+# in your Rust binary.
+# The CMake target will be registered to build by default as part of the
 # ALL target.
 function(rust_executable TARGET)
-  fb_cmake_parse_args(ARG "" "BINARY_NAME" "" "${ARGN}")
+  fb_cmake_parse_args(ARG "" "BINARY_NAME;FEATURES" "" "${ARGN}")

   set(crate_name "${TARGET}")
   set(cargo_target "${TARGET}.cargo")
@@ -174,7 +187,12 @@
   if(DEFINED ARG_BINARY_NAME)
     set(executable_name "${ARG_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
   else()
-      set(executable_name "${crate_name}${CMAKE_EXECUTABLE_SUFFIX}")
+    set(executable_name "${crate_name}${CMAKE_EXECUTABLE_SUFFIX}")
+  endif()
+  if(DEFINED ARG_FEATURES)
+    set(features --features ${ARG_FEATURES})
+  else()
+    set(features )
   endif()

   set(cargo_cmd cargo)
@@ -182,7 +200,11 @@
     set(cargo_cmd cargo.exe)
   endif()

-  set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name})
+  if(DEFINED ARG_FEATURES)
+    set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name} --features ${ARG_FEATURES})
+  else()
+    set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name})
+  endif()
   if(USE_CARGO_VENDOR)
     set(extra_cargo_env "CARGO_HOME=${RUST_CARGO_HOME}")
     set(cargo_flags ${cargo_flags})


ilastik.cmake: Updated git tag.

ilastik.cmake: Updated git tag.

--- ilastik.cmake
+++ ilastik.cmake
@@ -36,7 +36,7 @@
 include (futures)

 # select the desired ilastik commit
-set(DEFAULT_ILASTIK_VERSION eb3940aea782c301ce470f6342c457c94a8bfece) # 2014-07-29
+set(DEFAULT_ILASTIK_VERSION v1.1.1) # 2014-08-06
 IF(NOT DEFINED ILASTIK_VERSION)
     SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}")
 ENDIF()


ilastik.cmake: Updated git tag.

ilastik.cmake: Updated git tag.

--- ilastik.cmake
+++ ilastik.cmake
@@ -27,7 +27,7 @@
 include (greenlet)

 external_git_repo (ilastik
-    flyem-20130207B
+    flyem-20130221
     http://github.com/janelia-flyem/flyem-ilastik)

 message ("Installing ${ilastik_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")


OPEN-210 FMOD Ex include confusion.  Revert FMODEX.cmake change from changeset 3d662c2f1aad.  This gave the TPVDs some grief and was an unfinished attempt at cleanup.

--- indra/cmake/FMODEX.cmake
+++ indra/cmake/FMODEX.cmake
@@ -39,7 +39,7 @@
             optimized fmodex)
       endif (WINDOWS)
       set(FMODEX_LIBRARIES ${FMODEX_LIBRARY})
-      set(FMODEX_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/)
+      set(FMODEX_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodex)
     endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
   endif (STANDALONE)
 endif (FMODEX)


adding usdRender

adding usdRender

--- cmake/FindPixarUsd.cmake
+++ cmake/FindPixarUsd.cmake
@@ -31,5 +31,5 @@

 target_link_libraries(UsdInterface
     INTERFACE
-    hd usdHydra usdImaging
+    hd usdHydra usdImaging usdRender
     )


compile fix for non-external embree

compile fix for non-external embree

--- cmake/build_embree.cmake
+++ cmake/build_embree.cmake
@@ -53,6 +53,7 @@
       sync/barrier.cpp
       stl/string.cpp
       )
+ELSE()
     SET(EMBREE_COMMON_SYS_SOURCES
       platform.cpp
       sysinfo.cpp


fixed message up to add message to listener even if it is not displayed

--- cmake/core/message.cmake
+++ cmake/core/message.cmake
@@ -68,9 +68,6 @@
 	endif()

-	if(_LEVEL GREATER MESSAGE_LEVEL)
-		return()
-	endif()
 	set(msg "${_UNPARSED_ARGUMENTS}")
 	if(_FORMAT)
 		map_format(msg "${msg}")
@@ -89,6 +86,9 @@

 	endforeach()

+	if(_LEVEL GREATER MESSAGE_LEVEL)
+		return()
+	endif()
 	if(MESSAGE_QUIET)
 		return()
 	endif()


set XCFun_XC_MAX_ORDER outside

set XCFun_XC_MAX_ORDER outside

CMAKE_ARGS seem to have no effect here

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -1,4 +1,6 @@
 include(FetchContent)
+
+set(XCFun_XC_MAX_ORDER 6)

 FetchContent_Populate(xcfun_sources
   QUIET
@@ -6,19 +8,11 @@
     https://github.com/dftlibs/xcfun.git
   GIT_TAG
     ca137ba62577796b6cf916fbb83ab79784096ecf
-  CMAKE_ARGS
-    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-    -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-    -DENABLE_FORTRAN_INTERFACE=OFF
-    -DENABLE_TESTALL=OFF
-    -DXCFun_XC_MAX_ORDER=6
-  CMAKE_CACHE_ARGS
-    -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
-    -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
   )

 add_subdirectory(
   ${xcfun_sources_SOURCE_DIR}
   ${xcfun_sources_BINARY_DIR}
   )
+
+unset(XCFun_XC_MAX_ORDER)


ENH: update ossim version to 1.8.20

ENH: update ossim version to 1.8.20

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -44,80 +44,30 @@
     set(OSSIM_CXX_FLAGS /EHsc)
   endif()

-  if(0)
-    # SVN version
-    ExternalProject_Add(ossim_cmakemodules
-      PREFIX ${proj}/_cmakemodules
-      SVN_REPOSITORY "http://svn.osgeo.org/ossim/trunk/ossim_package_support/cmake/CMakeModules"
-      SVN_REVISION -r 23087
-      CONFIGURE_COMMAND ""
-      BUILD_COMMAND ""
-      INSTALL_COMMAND ""
-      PATCH_COMMAND ${CMAKE_COMMAND} -E copy
-        ${CMAKE_SOURCE_DIR}/patches/${proj}/OssimUtilities.cmake
-        ${CMAKE_BINARY_DIR}/${proj}/_cmakemodules/src/ossim_cmakemodules)
-
-    list(APPEND ${proj}_DEPENDENCIES ossim_cmakemodules)
-
-    ExternalProject_Add(${proj}
-      PREFIX ${proj}
-      SVN_REPOSITORY "http://svn.osgeo.org/ossim/trunk/ossim/"
-      SVN_REVISION -r 23092
-      BINARY_DIR ${OSSIM_SB_BUILD_DIR}
-      INSTALL_DIR ${SB_INSTALL_PREFIX}
-      DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-      CMAKE_CACHE_ARGS
-        -DOSSIM_VERSION:STRING=1.8.18-1
-        -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-        -DCMAKE_BUILD_TYPE:STRING=Release
-        -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
-        -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
-        -DBUILD_OSSIM_APPS:BOOL=OFF
-        -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
-        -DINSTALL_ARCHIVE_DIR:STRING=lib
-        -DINSTALL_LIBRARY_DIR:STRING=lib
-        -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-        ${OSSIM_SB_CONFIG}
-      DEPENDS ${${proj}_DEPENDENCIES}
-      CMAKE_COMMAND ${SB_CMAKE_COMMAND}
-      )
-
-      ExternalProject_Add_Step(${proj} copy_CMakeModules
-        COMMAND ${CMAKE_COMMAND} -E copy_directory
-        ${CMAKE_BINARY_DIR}/${proj}/_cmakemodules/src/ossim_cmakemodules ${OSSIM_SB_SRC}/CMakeModules
-        DEPENDEES patch update
-        DEPENDERS configure
-      )
-  else()
-    # archive version
-    ExternalProject_Add(${proj}
-      PREFIX ${proj}
-      URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23092.tar.gz"
-      URL_MD5 1bb7247fa490eb4a6e57b3c2e129d587
-      BINARY_DIR ${OSSIM_SB_BUILD_DIR}
-      INSTALL_DIR ${SB_INSTALL_PREFIX}
-      DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-      CMAKE_CACHE_ARGS
-        -DOSSIM_VERSION:STRING=1.8.18-1
-        -DProject_WC_REVISION:STRING=23092
-        -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-        -DCMAKE_BUILD_TYPE:STRING=Release
-        -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
-        -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
-        -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
-        -DBUILD_OSSIM_APPS:BOOL=OFF
-        -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
-        -DINSTALL_ARCHIVE_DIR:STRING=lib
-        -DINSTALL_LIBRARY_DIR:STRING=lib
-        -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-        ${OSSIM_SB_CONFIG}
-      PATCH_COMMAND ${CMAKE_COMMAND} -E copy
-        ${CMAKE_SOURCE_DIR}/patches/${proj}/OssimUtilities.cmake
-        ${OSSIM_SB_SRC}/CMakeModules
-      DEPENDS ${${proj}_DEPENDENCIES}
-      CMAKE_COMMAND ${SB_CMAKE_COMMAND}
-      )
-  endif()
+  # archive version
+  ExternalProject_Add(${proj}
+    PREFIX ${proj}
+    URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
+    URL_MD5 40f406c0da9cc188092582b3bdb20a80
+    BINARY_DIR ${OSSIM_SB_BUILD_DIR}
+    INSTALL_DIR ${SB_INSTALL_PREFIX}
+    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
+    CMAKE_CACHE_ARGS
+    -DProject_WC_REVISION:STRING=23537
+    -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
+    -DCMAKE_BUILD_TYPE:STRING=Release
+    -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
+    -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
+    -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
+    -DBUILD_OSSIM_APPS:BOOL=OFF
+    -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
+    -DINSTALL_ARCHIVE_DIR:STRING=lib
+    -DINSTALL_LIBRARY_DIR:STRING=lib
+    -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
+    ${OSSIM_SB_CONFIG}
+    DEPENDS ${${proj}_DEPENDENCIES}
+    CONFIGURE_COMMAND ${SB_CMAKE_COMMAND} ${OSSIM_SB_SRC}/ossim
+    )

   set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
   if(WIN32)


cmake

cmake

--- cmake/LNCommon.cmake
+++ cmake/LNCommon.cmake
@@ -212,7 +212,6 @@
 			"/Yu\"${header_file_name}\" /FI\"${header_file_name}\""	# use PCH, ForcedIncludeFiles
 		)

-
 		# get source files from project (referred LLVM)
 		get_property(source_files TARGET ${project_name} PROPERTY SOURCES)
 		foreach (file ${source_files})
@@ -229,6 +228,18 @@
 	endif()
 endfunction()

+#------------------------------------------------------------------------------
+function(ln_add_pch2 project_name header_file_name source_file_path)
+	if (MSVC)
+		set(LN_LOCAL_COMPILE_FLAGS
+			"${CMAKE_CXX_FLAGS} /Yu\"${header_file_name}\" /FI\"${header_file_name}\""	# use PCH, ForcedIncludeFiles
+		)
+		SET_TARGET_PROPERTIES(${project_name} PROPERTIES COMPILE_FLAGS ${LN_LOCAL_COMPILE_FLAGS})
+
+		set_source_files_properties(${source_file_path} PROPERTIES COMPILE_FLAGS "/Yc\"${header_file_name}\"")	# create PCH
+	endif()
+endfunction()
+
 # make output dir path
 ln_make_output_dir(LN_LIB_OUTPUT_DIR)