Blosc: Hint unix-like prefix on Windows

Blosc: Hint unix-like prefix on Windows

Simplest way to add a search for this alternate name
(instead of changing CMAKE_FIND_LIBRARY_PREFIXES).

--- cmake/FindBlosc.cmake
+++ cmake/FindBlosc.cmake
@@ -37,9 +37,14 @@
       NO_DEFAULT_PATHS
     )
   endif()
+  if(WIN32) # uses a Unix-like library prefix on Windows
+    set(BLOSC_LIBRARY_OPTS
+      libblosc ${BLOSC_LIBRARY_OPTS}
+    )
+  endif()

   find_path(BLOSC_INCLUDE_DIR blosc.h ${BLOSC_INCLUDE_OPTS})
-  find_library(BLOSC_LIBRARY blosc ${BLOSC_LIBRARY_OPTS})
+  find_library(BLOSC_LIBRARY NAMES blosc ${BLOSC_LIBRARY_OPTS})
   if(BLOSC_INCLUDE_DIR)
     file(STRINGS ${BLOSC_INCLUDE_DIR}/blosc.h _ver_string
       REGEX [=[BLOSC_VERSION_STRING +"[^"]*"]=]


CELIX-412: Reintroduces the CMake variable name used in Celix 2.0.0 for the C++ depman lib to ensure backward compatability

--- cmake/FindCELIX.cmake
+++ cmake/FindCELIX.cmake
@@ -102,6 +102,7 @@
     set(CELIX_DM_INCLUDE_DIR ${CELIX_INCLUDE_DIR}/dependency_manager)
 endif ()
 if (CELIX_DM_STATIC_CXX_LIB)
+	set(CELIX_DM_CXX_STATIC_LIB ${CELIX_DM_STATIC_CXX_LIB}) #Ensure that var name from verion 2.0.0 is still valid
     set(CELIX_DM_CXX_INCLUDE_DIR ${CELIX_INCLUDE_DIR}/dependency_manager_cxx)
 endif ()

@@ -118,3 +119,4 @@
 	include(${CELIX_CMAKECELIX_FILE})
 	include_directories(${CELIX_INCLUDE_DIRS})
 endif()
+


keep trying

keep trying

--- cmake/FindUnity.cmake
+++ cmake/FindUnity.cmake
@@ -17,6 +17,12 @@
 find_package(Mono REQUIRED)

 message(STATUS "System UNITY_ROOT_DIR is: ${UNITY_ROOT_DIR}")
+if (NOT EXISTS "${UNITY_ROOT_DIR}")
+  message(STATUS "${UNITY_ROOT_DIR} NOT exist")
+else()
+  message(STATUS "${UNITY_ROOT_DIR} exist")
+endif()
+
 if (NOT EXISTS "${UNITY_ROOT_DIR}")
   # Make our best attempt to find the latest unity installed on the system.
   # Note that Unity <=2018 include mono 2.x which causes compilation errors.


Delete GSettings.cmake

Delete GSettings.cmake

--- cmake/GSettings.cmake
+++ cmake/GSettings.cmake
@@ -1,42 +0,0 @@
-# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them.
-
-option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" ON)
-
-option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALINSTALL})
-
-if(GSETTINGS_LOCALINSTALL)
-    message(STATUS "GSettings schemas will be installed locally.")
-endif()
-
-if(GSETTINGS_COMPILE)
-    message(STATUS "GSettings shemas will be compiled.")
-endif()
-
-macro(add_schema SCHEMA_NAME)
-
-    set(PKG_CONFIG_EXECUTABLE pkg-config)
-    # Have an option to not install the schema into where GLib is
-    if (GSETTINGS_LOCALINSTALL)
-        SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/")
-    else (GSETTINGS_LOCALINSTALL)
-        execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
-        SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/")
-    endif (GSETTINGS_LOCALINSTALL)
-
-    # Run the validator and error if it fails
-    execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas  OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE)
-    execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-    if (_schemas_invalid)
-      message (SEND_ERROR "Schema validation error: ${_schemas_invalid}")
-    endif (_schemas_invalid)
-
-    # Actually install and recomple schemas
-    message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}")
-    install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL)
-
-    if (GSETTINGS_COMPILE)
-        install (CODE "message (STATUS \"Compiling GSettings schemas\")")
-        install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})")
-    endif ()
-endmacro()


change cmake to only pass "-Wall" to c, c++, and fortran compilers (nvcc doesn't have that option)

--- cmake/compilers.cmake
+++ cmake/compilers.cmake
@@ -4,7 +4,11 @@

 check_c_compiler_flag(-Wall _has_wall)
 if(_has_wall)
-  add_compile_options(-Wall)
+  add_compile_options(
+    $<$<COMPILE_LANGUAGE:C> -Wall>
+    $<$<COMPILE_LANGUAGE:CXX> -Wall>
+    $<$<COMPILE_LANGUAGE:Fortran> -Wall>
+    )
 else()
   check_c_compiler_flag(/Wall _has_msvc_wall)
   if(_has_msvc_wall)


Fix simple cmake error when COMPILER_RT_SUPPORTED_ARCH is empty.

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -417,7 +417,9 @@

 find_program(GOLD_EXECUTABLE NAMES ${LLVM_DEFAULT_TARGET_TRIPLE}-ld.gold ld.gold ${LLVM_DEFAULT_TARGET_TRIPLE}-ld ld DOC "The gold linker")

-list(REMOVE_DUPLICATES COMPILER_RT_SUPPORTED_ARCH)
+if(COMPILER_RT_SUPPORTED_ARCH)
+  list(REMOVE_DUPLICATES COMPILER_RT_SUPPORTED_ARCH)
+endif()
 message(STATUS "Compiler-RT supported architectures: ${COMPILER_RT_SUPPORTED_ARCH}")

 if(ANDROID)


refactoring `dump_vars`

refactoring `dump_vars`

dump of
- COMPILE_DEFINITIONS
- MACROS
- VARIABLES

--- cmake/dump_vars.cmake
+++ cmake/dump_vars.cmake
@@ -1,8 +1,25 @@
 #--------------------------------------------------------------------------------
 # include this macro to dump all variables:
 # include("cmake/dump_vars.cmake")
-get_cmake_property(_variableNames VARIABLES)
-foreach (_variableName ${_variableNames})
-    message(STATUS "${_variableName}=${${_variableName}}")
+
+message(STATUS "------------ BEGINN DUMP CMAKE VARS ---------------")
+get_property(_vars DIRECTORY PROPERTY COMPILE_DEFINITIONS)
+message(STATUS "------------ DUMP COMPILE_DEFINITIONS --------------")
+foreach (_var ${_vars})
+    message(STATUS "${_var}")
 endforeach()
+
+get_property(_vars DIRECTORY PROPERTY MACROS)
+message(STATUS "------------ DUMP MACROS --------------")
+foreach (_var ${_vars})
+    message(STATUS "${_var}")
+endforeach()
+
+get_property(_vars DIRECTORY PROPERTY VARIABLES)
+message(STATUS "------------ DUMP VARIABLES --------------")
+foreach (_var ${_vars})
+    message(STATUS "${_var}=${${_var}}")
+endforeach()
+
+message(STATUS "------------ END DUMP CMAKE VARS --------------")
 #--------------------------------------------------------------------------------


int128 detection

int128 detection

--- cmake/secp256k1.cmake
+++ cmake/secp256k1.cmake
@@ -23,7 +23,11 @@

         add_definitions(-DUSE_FIELD_5X52)

-        check_type_size("__int128" SIZEOF_INT128 BUILTIN_TYPES_ONLY)
+        check_type_size("int128_t" SIZEOF_INT128)
+        if(NOT SIZEOF_INT128)
+            check_type_size("__int128" SIZEOF_INT128 BUILTIN_TYPES_ONLY)
+        endif()
+
         if(SIZEOF_INT128)
             add_definitions(-DUSE_SCALAR_4X64)
             add_definitions(-DHAVE___INT128)


Use CMake EXCLUDE_FROM_ALL for composable kernels to avoid building of conv related kernels (#12855)

--- cmake/external/composable_kernel.cmake
+++ cmake/external/composable_kernel.cmake
@@ -11,9 +11,13 @@
   PATCH_COMMAND  git apply --reverse --check ${PATCH} || git apply --ignore-space-change --ignore-whitespace ${PATCH}
 )

-FetchContent_MakeAvailable(composable_kernel)
+FetchContent_GetProperties(composable_kernel)
+if(NOT composable_kernel_POPULATED)
+  FetchContent_Populate(composable_kernel)
+  add_subdirectory(${composable_kernel_SOURCE_DIR} ${composable_kernel_BINARY_DIR} EXCLUDE_FROM_ALL)

-add_library(onnxruntime_composable_kernel_includes INTERFACE)
-target_include_directories(onnxruntime_composable_kernel_includes INTERFACE
-  ${composable_kernel_SOURCE_DIR}/include
-  ${composable_kernel_SOURCE_DIR}/library/include)
+  add_library(onnxruntime_composable_kernel_includes INTERFACE)
+  target_include_directories(onnxruntime_composable_kernel_includes INTERFACE
+    ${composable_kernel_SOURCE_DIR}/include
+    ${composable_kernel_SOURCE_DIR}/library/include)
+endif()


MAINT: fix remaining version numbering details.

--- cmake/sara_installation_settings.cmake
+++ cmake/sara_installation_settings.cmake
@@ -64,7 +64,7 @@

 set(CPACK_PACKAGE_VERSION_MAJOR ${DO_Sara_VERSION_MAJOR})
 set(CPACK_PACKAGE_VERSION_MINOR ${DO_Sara_VERSION_MINOR})
-set(CPACK_PACKAGE_VERSION_PATCH ${DO_Sara_VERSION_PATCH})
+set(CPACK_PACKAGE_VERSION_PATCH ${DO_Sara_BUILD_NUMBER})
 set(CPACK_PACKAGE_VERSION ${DO_Sara_VERSION})
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "DO-Sara")
 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -85,7 +85,7 @@
 # ============================================================================ #
 # Special configuration for RPM packages.
 #
-set(CPACK_RPM_PACKAGE_RELEASE ${BUILD_NUMBER})
+set(CPACK_RPM_PACKAGE_RELEASE ${DO_Sara_VERSION})
 set(CPACK_RPM_PACKAGE_LICENSE "MPL v2")
 set(CPACK_RPM_PACKAGE_GROUP "Applications/Multimedia")


[Build] Generalised the module_python_add CMake macro to any type of scripts (Shell, Python, Perl, Ruby, etc).

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1483,8 +1483,15 @@
 endmacro (module_binary_add)

 ##
-# Add a Python script to be installed
-macro (module_python_add _script_file)
+# Add a (Shell, Python, Perl, Ruby, etc) script to be installed.
+#
+# The parameter is the relative file path of the (template) script to
+# be installed. That template file must end with the '.in' suffix.
+# Indeed, the project variables (wrapped by @@ signs) of the template file
+# are evaluated and expanded thanks to the configure command.
+# The '.in' extension of the script is dropped once installed.
+#
+macro (module_script_add _script_file)
   #
   set (_full_script_src_path ${CMAKE_CURRENT_SOURCE_DIR}/${_script_file}.in)
   set (_full_script_path ${CMAKE_CURRENT_BINARY_DIR}/${_script_file})
@@ -1492,11 +1499,14 @@
 	#
     configure_file (${_full_script_src_path} ${_full_script_path} @ONLY)

-    # Add the 'scripts_${MODULE_NAME}' target, depending on the
-    # converted (Python) scripts
-    add_custom_target (scripts_${MODULE_NAME} ALL DEPENDS ${_full_script_path})
-
-    # Install the (Python) script file
+	# Extract the file name (only) from the full file path
+	get_filename_component (_script_alone ${_script_file} NAME)
+
+	# Add the 'scripts_${MODULE_NAME}' target, depending on the
+    # converted (Shell, Python, Perl, Ruby, etc) scripts
+    add_custom_target (${_script_alone}_script ALL DEPENDS ${_full_script_path})
+
+    # Install the (Shell, Python, Perl, Ruby, etc) script file
     install (PROGRAMS ${_full_script_path} DESTINATION bin COMPONENT devel)

   else (EXISTS ${_full_script_src_path})
@@ -1505,7 +1515,6 @@
   endif (EXISTS ${_full_script_src_path})

   # Register the binary target in the project (for reporting purpose)
-  get_filename_component (_script_alone ${_script_file} NAME)
   list (APPEND PROJ_ALL_BIN_TARGETS ${_script_alone})
   set (PROJ_ALL_BIN_TARGETS ${PROJ_ALL_BIN_TARGETS} PARENT_SCOPE)

@@ -1514,7 +1523,7 @@
   list (APPEND ${MODULE_NAME}_ALL_EXECS ${_script_alone})
   set (${MODULE_NAME}_ALL_EXECS ${${MODULE_NAME}_ALL_EXECS} PARENT_SCOPE)

-endmacro (module_python_add)
+endmacro (module_script_add)

 ##
 # Installation of the CMake import helper, so that third party projects


ENH: Update GSL to 2.7

ENH: Update GSL to 2.7

--- SuperBuild/CMake/External_gsl.cmake
+++ SuperBuild/CMake/External_gsl.cmake
@@ -24,13 +24,14 @@

 ExternalProject_Add(GSL
   PREFIX GSL
-  URL "https://github.com/ampl/gsl/archive/v2.3.0.tar.gz"
-  DOWNLOAD_NAME gsl_v2.3.0.tar.gz
-  URL_MD5 7e0478f7c5e62696fef480b9a46f708c
+  URL "https://github.com/ampl/gsl/archive/v2.7.0.tar.gz"
+  DOWNLOAD_NAME gsl_v2.7.0.tar.gz
+  URL_MD5 566ca5f5f08057aa6572aecf7fd67eb9
   BINARY_DIR ${GSL_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
+  -DNO_AMPL_BINDINGS:BOOL=ON
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   DEPENDS ${GSL_DEPENDENCIES}
   LOG_DOWNLOAD 1


Changed git-download.cmake error/warning message when running with uncommitted changes. Will now instead ignore the download and return.

--- src/cmake/git-download.cmake
+++ src/cmake/git-download.cmake
@@ -29,6 +29,11 @@
     set(multiValueArgs "")
     cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

+    if(GIT_HAVE_CHANGES)
+        message(AUTHOR_WARNING "Local changes detected! \n\tGit subtree requires a clean directory; please commit changes before running this.\n\tSkipping download.")
+        return()
+    endif()
+
     # If no tag is specified, default to master
     if(NOT args_TAG)
         set(args_TAG master)
@@ -50,10 +55,6 @@
         OUTPUT_VARIABLE GIT_HAVE_CHANGES
     )

-    if(GIT_HAVE_CHANGES)
-        message(FATAL_ERROR "Git subtree requires a clean directory; please commit changes before running this.")
-    endif()
-
     message("Cloning branch ${args_TAG} from ${args_URL} into relative directory ${RELATIVE_CLONE_DIR}:")
     set(MERGE_MESSAGE "Merged branch ${args_TAG} in repository ${args_URL}.")
     if(NOT EXISTS ${args_CLONE_DIR})


Added a comment about nupic.core's swig wraps relying on the macro CAPNP_LITE to have a value.

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -48,6 +48,7 @@

 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
   set(CAPNP_CMAKE_DEFINITIONS -DCAPNP_LITE=1 -DEXTERNAL_CAPNP=1 -DBUILD_TOOLS=OFF)
+  # NOTE nupic.core's swig wraps depend on the macro CAPNP_LITE to have a value
   set(CAPNP_COMPILER_DEFINITIONS ${CAPNP_COMPILER_DEFINITIONS} -DCAPNP_LITE=1)
   set(CAPNP_LINK_LIBRARIES ${capnproto_lib_capnp} ${capnproto_lib_kj})
 else()


hard-coding pumi root since we need a specific branch of pumi and cannot use the rhel7 system-installed version

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -272,7 +272,7 @@
   "-DCMAKE_C_COMPILER:FILEPATH=mpicc"
   "-DCMAKE_CXX_COMPILER:FILEPATH=mpicxx"
   "-DCMAKE_Fortran_COMPILER:FILEPATH=mpif90"
-  "-DSCOREC_DIR:FILEPATH=$ENV{PUMI_ROOT}/lib/cmake/SCOREC/"
+  "-DSCOREC_DIR:FILEPATH=/fasttmp/wtobin/dev/install/core/lib/cmake/SCOREC/"
   "-DENABLE_PETSC:BOOL=ON"
   "-DPETSC_DIR:FILEPATH=$ENV{PETSC_DIR}"
   "-DPETSC_ARCH:FILEPATH=$ENV{PETSC_ARCH}"


Use a single target for generation of .wasm files

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -192,8 +192,7 @@
   else()
   endif()

-  add_custom_target(${target} ALL DEPENDS ${DESTINATION_FOLDER}/${target}.wast.hpp ${extra_target_dependency})
-  add_custom_target(${target}_wasm ALL DEPENDS ${DESTINATION_FOLDER}/${target}.wasm)
+  add_custom_target(${target} ALL DEPENDS ${DESTINATION_FOLDER}/${target}.wast.hpp ${extra_target_dependency} ${DESTINATION_FOLDER}/${target}.wasm)

   set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${DESTINATION_FOLDER}/${target}.wast.hpp)


Use CMake 3.15's COMPILE_LANG_AND_ID genex to simplify some CMake code.

--- cmake/CubBuildCompilerTargets.cmake
+++ cmake/CubBuildCompilerTargets.cmake
@@ -91,13 +91,13 @@
   foreach (cxx_option IN LISTS cxx_compile_options)
     target_compile_options(cub.compiler_interface INTERFACE
       $<$<COMPILE_LANGUAGE:CXX>:${cxx_option}>
-      $<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CUDA_COMPILER_ID:NVCXX>>:${cxx_option}>
+      $<$<COMPILE_LANG_AND_ID:CUDA,NVCXX>:${cxx_option}>
       # Only use -Xcompiler with NVCC, not NVC++.
       #
       # CMake can't split genexs, so this can't be formatted better :(
       # This is:
       # if (using CUDA and CUDA_COMPILER is NVCC) add -Xcompiler=opt:
-      $<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CUDA_COMPILER_ID:NVIDIA>>:-Xcompiler=${cxx_option}>
+      $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-Xcompiler=${cxx_option}>
     )
   endforeach()

@@ -110,11 +110,11 @@
   target_compile_options(cub.compiler_interface INTERFACE
     # If using CUDA w/ NVCC...
     # Display diagnostic numbers.
-    $<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CUDA_COMPILER_ID:NVIDIA>>:-Xcudafe=--display_error_number>
+    $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-Xcudafe=--display_error_number>
     # Promote warnings.
-    $<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CUDA_COMPILER_ID:NVIDIA>>:-Xcudafe=--promote_warnings>
+    $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-Xcudafe=--promote_warnings>
     # Don't complain about deprecated GPU targets.
-    $<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CUDA_COMPILER_ID:NVIDIA>>:-Wno-deprecated-gpu-targets>
+    $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-Wno-deprecated-gpu-targets>
     # Suppress deprecation warnings in nvcc < 11.5.
     # TexRefInputIterator uses deprecated CUDART APIs, see NVIDIA/cub#191.
     # After 11.5, we will suppress these in-code via pragma, but for older nvcc


cmake fix

cmake fix

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@9365 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -198,17 +198,8 @@
       endif()
    endif(_vendor_id STREQUAL "GenuineIntel")
 endmacro()
-
 macro(OptimizeForArchitecture)
-   set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. \
-Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used. \
-Setting the value to \"auto\" will try to optimize for the architecture where cmake is called. \
-Other supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \
-\"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \
-\"haswell\", \"broadwell\", \"skylake\", \"skylake-xeon\", \"kaby-lake\", \"cannonlake\", \"silvermont\", \
-\"goldmont\", \"knl\" (Knights Landing), \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \
-\"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\", \
-\"AMD 14h\", \"AMD 16h\".")
+   set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used. Setting the value to \"auto\" will try to optimize for the architecture where cmake is called. Other supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \"haswell\", \"broadwell\", \"skylake\", \"skylake-xeon\", \"kaby-lake\", \"cannonlake\", \"silvermont\", \"goldmont\", \"knl\" (Knights Landing), \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\", \"AMD 14h\", \"AMD 16h\".")
    set(_force)
    if(NOT _last_target_arch STREQUAL "${TARGET_ARCHITECTURE}")
       message(STATUS "target changed from \"${_last_target_arch}\" to \"${TARGET_ARCHITECTURE}\"")
@@ -455,7 +446,8 @@
       _enable_or_disable(AVX512IFMA "avx512ifma" "Use AVX512IFMA." false)
       _enable_or_disable(AVX512VBMI "avx512vbmi" "Use AVX512VBMI." false)

-      if(MSVC)
+      #if(MSVC)
+      if(MSVC AND MSVC_VERSION GREATER 1700) # G+Smo: VS 11
          # MSVC on 32 bit can select /arch:SSE2 (since 2010 also /arch:AVX)
          # MSVC on 64 bit cannot select anything (should have changed with MSVC 2010)
          _my_find(_enable_vector_unit_list "avx2" _found)


update linux

update linux

--- tools/cmake/ANHLibrary.cmake
+++ tools/cmake/ANHLibrary.cmake
@@ -192,7 +192,7 @@
                     add_test(
                         NAME all_${name}_tests_${configuration}
                         CONFIGURATIONS ${configuration}
-                        COMMAND ${name}_test "--catch_system_error=yes  --log_level=test_suite output_format=XML:${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
+                        COMMAND ${name}_test "--catch_system_error=yes  --log_level=test_suite --output_format=XML>${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
                         WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${configuration}
                     )
                 endforeach()
@@ -201,7 +201,7 @@
             IF(ENABLE_TEST_REPORT)
                 add_test(
                     NAME all_${name}_tests
-                    COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}_test "--gtest_output=xml:${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
+                    COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}_test "--catch_system_error=yes  --log_level=test_suite --output_format=XML>${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
                 )
             ENDIF()
         ENDIF()


ENH: Let gitlab-ci runners build with clang-tidy.

When built with a special environment variable set (named
`ITK_ACCEPT_ALL_COMPILERS`) or a cmake variable of the same name,
pass arguments to the compiler version-check cmake utility that
allow unknown compilers (this enables the use of clang-tidy).

--- Modules/Core/Common/CMake/itkGenerateNewCompilerFeatureDetectionHeaders.cmake
+++ Modules/Core/Common/CMake/itkGenerateNewCompilerFeatureDetectionHeaders.cmake
@@ -1,5 +1,12 @@
 ## Dynamically create compiler detection header
 include(WriteCompilerDetectionHeader)
+if (DEFINED ENV{ITK_ACCEPT_ALL_COMPILERS} OR ITK_ACCEPT_ALL_COMPILERS)
+  message(STATUS "ITK will allow unknown compilers without error.")
+  set(maybe_allow_unknown_compilers
+    ALLOW_UNKNOWN_COMPILERS
+    ALLOW_UNKNOWN_COMPILER_VERSIONS
+  )
+endif()
 write_compiler_detection_header(
       FILE "${CMAKE_CURRENT_BINARY_DIR}/itk_compiler_detection.h"
       PREFIX ITK
@@ -7,6 +14,7 @@
       OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/compilers
       COMPILERS ${CMAKE_CXX_COMPILER_ID} # AppleClang Clang GNU MSVC SunPro Intel #Supported compilers as of 3.5.2
       VERSION ${CMAKE_VERSION}
+      ${maybe_allow_unknown_compilers}
       FEATURES
         cxx_aggregate_default_initializers      # Aggregate default initializers, as defined in N3605.
         cxx_alias_templates                     # Template aliases, as defined in N2258.


Remove /dssa-cfg-sink- on VS 2022 17.3 onwards

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -83,16 +83,6 @@
             # MSVC defines
             $<$<CXX_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>)

-    # Work around compiler bug in MSVC when targeting arm64
-    # https://developercommunity.visualstudio.com/t/inlining-turns-constant-into-register-operand-for/1394798
-    # https://github.com/microsoft/vcpkg/pull/24869
-    if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-        if(CPU_ARCHITECTURE STREQUAL armv8 OR CPU_ARCHITECTURE STREQUAL arm64)
-            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /d2ssa-cfg-sink-")
-            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /d2ssa-cfg-sink-")
-        endif()
-    endif()
-
     if(${DECOMPRESSOR})
         target_compile_definitions(${NAME}
             PRIVATE
@@ -208,11 +198,13 @@
                     ASTCENC_F16C=0)
         endif()

-        # Workaround MSVC codegen bug for NEON builds see:
+        # Workaround MSVC codegen bug for NEON builds on VS 2022 17.2 or older
         # https://developercommunity.visualstudio.com/t/inlining-turns-constant-into-register-operand-for/1394798
-        target_compile_options(${NAME}
-            PRIVATE
-            $<$<CXX_COMPILER_ID:MSVC>:/d2ssa-cfg-sink->)
+        if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND MSVC_VERSION LESS 1933)
+            target_compile_options(${NAME}
+                PRIVATE
+                    $<$<CXX_COMPILER_ID:MSVC>:/d2ssa-cfg-sink->)
+        endif()

     elseif((${ISA_SIMD} MATCHES "sse2") OR (${UNIVERSAL_BUILD} AND ${ISA_SSE2}))
         if(NOT ${UNIVERSAL_BUILD})


fix for finding Eigen

fix for finding Eigen

--- tutorial/cmake/FindEIGEN.cmake
+++ tutorial/cmake/FindEIGEN.cmake
@@ -66,6 +66,9 @@
       ${CMAKE_INSTALL_PREFIX}/include
       ${KDE4_INCLUDE_DIR}
 	  ${PROJECT_SOURCE_DIR}/../../../Eigen
+    ${PROJECT_SOURCE_DIR}/../../../external/nanogui/ext/eigen/
+    ${PROJECT_SOURCE_DIR}/../../external/nanogui/ext/eigen/
+    ${PROJECT_SOURCE_DIR}/../external/nanogui/ext/eigen/
 	  $ENV{DevLibraries}/Eigen
       PATH_SUFFIXES eigen3 eigen
     )


ENH: Update required ITK from v4.11.0 to v4.13.1

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -71,8 +71,8 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG v4.11.0)
-  set(ITK_VERSION_ID ITK-4.11)
+  set(${proj}_GIT_TAG v4.13.1)
+  set(ITK_VERSION_ID ITK-4.13)

   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
@@ -85,7 +85,7 @@
     LOG_INSTALL   0  # Wrap install in script to to ignore log output from dashboards
     ${cmakeversion_external_update} "${cmakeversion_external_update_value}"
     CMAKE_GENERATOR ${gen}
-    CMAKE_ARGS
+    CMAKE_CACHE_ARGS
       ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
       ${COMMON_EXTERNAL_PROJECT_ARGS}
       ${${proj}_CMAKE_OPTIONS}


Update PythonExternal.cmake

Update PythonExternal.cmake

--- Superbuild/PythonExternal.cmake
+++ Superbuild/PythonExternal.cmake
@@ -28,9 +28,9 @@

 SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})

-SET(DEFAULT_PYTHON_VERSION "3.5.6")
-IF(WIN32) # need to check windows
-  SET(DEFAULT_PYTHON_VERSION "3.4.3")
+SET(DEFAULT_PYTHON_VERSION "3.6.7")
+IF(WIN32)
+  SET(DEFAULT_PYTHON_VERSION "3.8.2")
 ENDIF()

 set(USER_PYTHON_VERSION ${DEFAULT_PYTHON_VERSION} CACHE STRING "Branch name corresponding to Python version number")


Removed mbits download cache

Removed mbits download cache

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -53,11 +53,6 @@
   set(CDASH_ADMIN_URL_PREFIX "http://mbits")
 endif()

-if(NOT MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL AND MBITS_AVAILABLE)
-  set(MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL "http://mbits/dl-cache")
-endif()
-
-
 if(NOT DEFINED GIT_BRANCH OR GIT_BRANCH STREQUAL "")
   set(GIT_BRANCH "")
 else()


Fixed ODE release link library

Fixed ODE release link library

--- CMakeModules/KlamptDependencies.cmake
+++ CMakeModules/KlamptDependencies.cmake
@@ -107,7 +107,7 @@
     MESSAGE("TinyXML not found!")
   endif( )

-  SET(KLAMPT_LIBRARIES debug ${KRISLIBRARY_LIBRARY_DEBUG} optimized ${KRISLIBRARY_LIBRARY_RELEASE} debug ${ODE_LIBRARY_DEBUG} optimized ${ODE_LIBRARY_DEBUG} ${GLPK_LIBRARY} debug ${GLUI_LIBRARY_DEBUG} optimized ${GLUI_LIBRARY_RELEASE} debug ${TINYXML_LIBRARY_DEBUG} optimized ${TINYXML_LIBRARY_RELEASE} glut32 opengl32 Ws2_32 winmm)
+  SET(KLAMPT_LIBRARIES debug ${KRISLIBRARY_LIBRARY_DEBUG} optimized ${KRISLIBRARY_LIBRARY_RELEASE} debug ${ODE_LIBRARY_DEBUG} optimized ${ODE_LIBRARY_RELEASE} ${GLPK_LIBRARY} debug ${GLUI_LIBRARY_DEBUG} optimized ${GLUI_LIBRARY_RELEASE} debug ${TINYXML_LIBRARY_DEBUG} optimized ${TINYXML_LIBRARY_RELEASE} glut32 opengl32 Ws2_32 winmm)
   SET(KLAMPT_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${ODE_INCLUDE_DIR} ${GLPK_INCLUDE_DIR} ${GLUI_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR})
   #Boost should be included as a lib directory
   LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})


cmake: use -std=gnu++14 when performing configure checks

Summary:
Always use the `-std=gnu++14` compiler flag when performing configure-time
checks on Unix-based platforms.

On older versions of gcc (e.g. 5.x) some of the configuration checks
incorrectly fail without this option.

Reviewed By: meyering

Differential Revision: D6788847

fbshipit-source-id: 6e182ff9930a42b01c23f9a0cceda0108052224b

--- CMake/FollyCompilerUnix.cmake
+++ CMake/FollyCompilerUnix.cmake
@@ -2,6 +2,7 @@
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_COMMON}")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_COMMON} -O3")

+list(APPEND CMAKE_REQUIRED_FLAGS -std=gnu++14)
 function(apply_folly_compile_options_to_target THETARGET)
   target_compile_options(${THETARGET}
     PUBLIC


rename macro

rename macro

--- CMake/Packages/UsingCog.cmake
+++ CMake/Packages/UsingCog.cmake
@@ -19,26 +19,26 @@
 # Contact Information: info@zillians.com
 #

-MACRO(COG_GEN)
+MACRO(zillians_add_cog_gen)

     # parse the argument options
-    SET(__option_catalogries "OUTPUT;COG_FILE")
+    SET(__option_catalogries "OUTPUT_VARIABLE;INPUT")
     SET(__temporary_options_variable ${ARGN})
     split_options(__temporary_options_variable "default" __option_catalogries __options_set)

     # check if the number of targets specified is wrong
-    hashmap(GET __options_set "OUTPUT"   __output)
-    hashmap(GET __options_set "COG_FILE" __cog_file)
+    hashmap(GET __options_set "OUTPUT_VARIABLE" __output_variable)
+    hashmap(GET __options_set "INPUT" __input)

-    IF(DEFINED __cog_file)
+    IF(DEFINED __input)

-        STRING(REGEX REPLACE ".cog" ".h" OUTPUT_SOURCE_RENAMED ${__cog_file})
+        STRING(REGEX REPLACE ".cog" ".h" OUTPUT_SOURCE_RENAMED ${__input})
         add_custom_command(
             OUTPUT ${OUTPUT_SOURCE_RENAMED}
-            COMMAND ${COG_SCRIPT} -d -o ${OUTPUT_SOURCE_RENAMED} ${__cog_file}
-            DEPENDS ${__cog_file}
+            COMMAND ${COG_SCRIPT} -d -o ${OUTPUT_SOURCE_RENAMED} ${__input}
+            DEPENDS ${__input}
             )
-        LIST(APPEND ${__output} ${OUTPUT_SOURCE_RENAMED})
+        LIST(APPEND ${__output_variable} ${OUTPUT_SOURCE_RENAMED})

     ENDIF()


COMP Changed MITK-Data rev. tag to the newest

* the MITK needs to test on .nrrd data added recently to the repo

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

 IF(BUILD_TESTING)

-  SET(revision_tag 4fa450c29ebd819419)
+  SET(revision_tag a2065ce186967682b2)
   IF(${proj}_REVISION_TAG)
     SET(revision_tag ${${proj}_REVISION_TAG})
   ENDIF()


FindDCMTK - Workaround bug in packaging of DCMTK 3.6.0 on Debian.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637687

See inlined comment for more details.

See #382

--- Utilities/CMake/FindDCMTK.cmake
+++ Utilities/CMake/FindDCMTK.cmake
@@ -327,5 +327,28 @@
   REQUIRED_VARS ${DCMTK_INCLUDE_DIR_NAMES} DCMTK_LIBRARIES
   FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure")

+# Workaround bug in packaging of DCMTK 3.6.0 on Debian.
+# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637687
+#
+# By setting 'DCMTK_FIND_PACKAGE_SKIP_ADD_DEFINITIONS' to '1' before
+# calling 'find_package(DCMTK)', the variable 'DCMTK_DEFINITIONS' will be set
+# appropriately.
+if(DCMTK_FOUND AND UNIX AND NOT APPLE)
+  include(CheckCXXSourceCompiles)
+  set(CMAKE_REQUIRED_FLAGS )
+  set(CMAKE_REQUIRED_DEFINITIONS )
+  set(CMAKE_REQUIRED_INCLUDES ${DCMTK_INCLUDE_DIRS})
+  set(CMAKE_REQUIRED_LIBRARIES ${DCMTK_LIBRARIES})
+  check_cxx_source_compiles("#include <dcmtk/config/osconfig.h>\n#include <dcmtk/ofstd/ofstream.h>\nint main(int,char*[]){return 0;}"
+    DCMTK_HAVE_CONFIG_H_OPTIONAL
+    )
+  if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL)
+    set(DCMTK_DEFINITIONS "-DHAVE_CONFIG_H")
+  endif()
+  if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL AND NOT DCMTK_FIND_PACKAGE_SKIP_ADD_DEFINITIONS)
+    add_definitions(${DCMTK_DEFINITIONS})
+  endif()
+endif()
+
 message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")


Fixed TBB Find module to work with default Ubuntu TBB package

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -109,7 +109,7 @@
 # third: try to find path automatically
 if (NOT _TBB_INSTALL_DIR)
     if (_TBB_DEFAULT_INSTALL_DIR)
-        set (_TBB_INSTALL_DIR $ENV{_TBB_DEFAULT_INSTALL_DIR})
+        set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
     endif (_TBB_DEFAULT_INSTALL_DIR)
 endif (NOT _TBB_INSTALL_DIR)
 # sanity check


Cause SEGFAULTs in Duktape instead

Cause SEGFAULTs in Duktape instead

--- cmake/duktape.cmake
+++ cmake/duktape.cmake
@@ -3,7 +3,7 @@
 include_directories(vendor/duktape-1.4.0/src)

 # Configure Duktape
-add_definitions("-DDUK_OPT_CPP_EXCEPTIONS")
+add_definitions("-DDUK_OPT_CPP_EXCEPTIONS" "-DDUK_CAUSE_SEGFAULT")

 list(APPEND SOURCE_FILES
     vendor/duktape-1.4.0/src/duk_config.h


Change runner name + comment to clarify it does more than just contacts

REVIEW: 112306
BUG: 316227

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -1,5 +1,5 @@
 [Desktop Entry]
-Name=Instant Messaging Contacts
+Name=Instant Messaging
 Name[bs]=Brze poruke
 Name[ca]=Contactes de missatgeria instantània
 Name[ca@valencia]=Contactes de missatgeria instantània
@@ -42,7 +42,7 @@
 Name[x-test]=xxInstant Messaging Contactsxx
 Name[zh_CN]=即时通讯联系人
 Name[zh_TW]=即時訊息聯絡人
-Comment=Start chat with any of your IM contacts
+Comment=Start a chat with any of your IM contacts or change your IM status
 Comment[bs]=Počnite ćaskanje s nekim od IM kontakta
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI
 Comment[ca@valencia]=Inicia un xat amb qualsevol dels vostres contactes de MI


- Removed "exotic" flags from Devel builds

--- environment.cmake
+++ environment.cmake
@@ -53,8 +53,7 @@
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG")
 	set(CMAKE_CXX_FLAGS_DEVEL   "${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wextra -Wno-unused-parameter -Wno-variadic-macros")
 	set(CMAKE_CXX_FLAGS_DEVEL   "${CMAKE_CXX_FLAGS_DEVEL} -pedantic -fverbose-asm -finstrument-functions")
-	set(CMAKE_CXX_FLAGS_DEVEL   "${CMAKE_CXX_FLAGS_DEVEL} -fno-delete-null-pointer-checks -fno-omit-frame-pointer")
-	set(CMAKE_CXX_FLAGS_DEVEL   "${CMAKE_CXX_FLAGS_DEVEL} -fstack-check -fstack-protector")
+	set(CMAKE_CXX_FLAGS_DEVEL   "${CMAKE_CXX_FLAGS_DEVEL} -fno-omit-frame-pointer -fstack-protector")

 	if (CMAKE_COMPILER_IS_CLANGXX)
 		#set(CMAKE_CXX_FLAGS_DEVEL "${CMAKE_CXX_FLAGS_DEVEL} -Werror=gnu -DCLEVER_NOGNU")


COMP: The FFTW library was never linked (submitted by Jakub Bican)

--- CMake/FindFFTW.cmake
+++ CMake/FindFFTW.cmake
@@ -32,8 +32,8 @@

 IF(FFTW_FOUND)
   INCLUDE_DIRECTORIES( ${FFTW_INCLUDE})
-  LINK_DIRECTORIES( ${FFTW_LIB} )
-        ADD_DEFINITIONS(-DUSE_FFTW)
+  LINK_LIBRARIES( ${FFTW_LIB} )
+  ADD_DEFINITIONS(-DUSE_FFTW)
   SET(FFTW_DIR .)
 ENDIF (FFTW_FOUND)


BUG: Disable using mkl_tbb_thread

BUG: Disable using mkl_tbb_thread

MKL can use either the `mkl_sequential` library, or the `mkl_tbb_thread` library.
When using the `mkl_tbb_thread` library, it requires TBB, which necessitate more
CMake code to be configured correctly and passed to projects that use MKL. Support
for this is currently broken in ITK and therefore was disabled. A follow-up commit
could solve the linking problem, but this commit is solely to remove what is broken.

Change-Id: I94f1b76c7956f08a666e3f005d5719163c83b2aa

--- CMake/FindFFTW.cmake
+++ CMake/FindFFTW.cmake
@@ -22,7 +22,7 @@
 ## ** On Mac, it is:
 ## `/opt/intel/compilers_and_libraries/mac/mkl`
 ##
-## If the compiler supports it, `ITK_USE_TBB_WITH_MKL` is automatically
+## '''Disabled''': If the compiler supports it, `ITK_USE_TBB_WITH_MKL` is automatically
 ## set to ON and MKL is linked against `TBB`. Otherwise it is linked against
 ## `mkl_sequential`.
 ##
@@ -86,15 +86,18 @@
     set(FFTWF_LIB ${CUFFT_LIB} ${CUFFTW_LIB})
     set(FFTWD_LIB ${CUFFT_LIB} ${CUFFTW_LIB})
   elseif(ITK_USE_MKL)
-    if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-      # See MKL configuration help page:
-      # https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor
-      message("TBB threading option not available with Clang compiler.")
-      set(ITK_USE_TBB_WITH_MKL OFF CACHE BOOL "Use TBB threading in MKL" FORCE)
-    else()
-      option(ITK_USE_TBB_WITH_MKL "Use TBB threading in MKL" ON)
-      mark_as_advanced(ITK_USE_TBB_WITH_MKL)
-    endif()
+    # '''Disabled''': `ITK_USE_TBB_WITH_MKL`. To configure MKL with TBB, the TBB library
+    # has to be found. This is not currently taken care of as part of this file and may
+    # result in conflicts if `Module_ITKTBB` is ON.
+#    if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+#      # See MKL configuration help page:
+#      # https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor
+#      message("TBB threading option not available with Clang compiler.")
+#      set(ITK_USE_TBB_WITH_MKL OFF CACHE BOOL "Use TBB threading in MKL" FORCE)
+#    else()
+#      option(ITK_USE_TBB_WITH_MKL "Use TBB threading in MKL" ON)
+#      mark_as_advanced(ITK_USE_TBB_WITH_MKL)
+#    endif()

     if(CMAKE_SIZEOF_VOID_P EQUAL "8")
       if(APPLE)
@@ -117,11 +120,13 @@
       endif()
     endif()
     set(MKL_EXTRA_LIBRARIES mkl_core)
-    if(ITK_USE_TBB_WITH_MKL)
-      list(APPEND MKL_EXTRA_LIBRARIES mkl_tbb_thread)
-    else()
-        list(APPEND MKL_EXTRA_LIBRARIES mkl_sequential)
-    endif()
+    # Force to sequential for now.
+    list(APPEND MKL_EXTRA_LIBRARIES mkl_sequential)
+#    if(ITK_USE_TBB_WITH_MKL)
+#      list(APPEND MKL_EXTRA_LIBRARIES mkl_tbb_thread)
+#    else()
+#        list(APPEND MKL_EXTRA_LIBRARIES mkl_sequential)
+#    endif()
     set(FFTW_LIBRARY_NAMES ${MKL_LIBRARY} ${MKL_EXTRA_LIBRARIES})

     macro(FFTWD_LIB_START)
@@ -137,9 +142,10 @@
     macro(FFTWD_LIB_END)
       if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
         list(APPEND FFTWD_LIB -Wl,--end-group -lpthread -lm -ldl)
-        if(ITK_USE_TBB_WITH_MKL)
-          list(APPEND FFTWD_LIB -ltbb -lstdc++)
-        endif()
+         # Force to sequential for now.
+#        if(ITK_USE_TBB_WITH_MKL)
+#          list(APPEND FFTWD_LIB -ltbb -lstdc++)
+#        endif()
       endif()
     endmacro()


Removed redundant line in FindLeap.cmake

--- CMake/FindLeap.cmake
+++ CMake/FindLeap.cmake
@@ -11,7 +11,6 @@

 find_library(LEAP_LIBRARIES
   NAMES Leap
-  PATH_SUFFIXES libstdc++
   PATHS
     ${LEAP_SDK_ROOT}/lib
     /opt/LeapSDK/lib)


COMP: Update test data

COMP: Update test data

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

 if(BUILD_TESTING)

-  set(revision_tag ab6c5213)
+  set(revision_tag ae9267c8)
   #if(${proj}_REVISION_TAG)
   #  set(revision_tag ${${proj}_REVISION_TAG})
   #endif()


ENH: When DTIPrep is built as a Slicer extension, we do not support MGHIO

--- DTIPrepTools.cmake
+++ DTIPrepTools.cmake
@@ -35,7 +35,7 @@
 endif()

 #-----------------------------------------------------------------------------
-find_package(ITK COMPONENTS
+set( ITKModules
   ITKDiffusionTensorImage
   ITKRegistrationCommon
   ITKOptimizersv4
@@ -64,7 +64,6 @@
   ITKIOImageBase
   ITKIOJPEG
   ITKIOLSM
-  MGHIO
   ITKIOMRC
   ITKIOMesh
   ITKIOMeta
@@ -82,6 +81,13 @@
   ITKIOTransformMatlab
   ITKIOVTK
   ITKIOXML
+)
+if( NOT DTIPrep_BUILD_SLICER_EXTENSION )
+  list( APPEND ITKModules MGHIO )
+endif()
+
+find_package(ITK COMPONENTS
+  ${ITKModules}
   REQUIRED)

 include(${ITK_USE_FILE})


BUG: Modify VTK External project build.

BUG: Modify VTK External project build.

Only support VTKv6 for now on. The rest of the projects compile with this version

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -25,42 +25,19 @@
 set(proj        VTK) #This local name

-#Setting VTK_VERSION_MAJOR to its default value if it has not been set before
 set(VTK_VERSION_MAJOR 6 CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6).")
 # Set the possible values of VTK major version for cmake-gui
 set_property(CACHE VTK_VERSION_MAJOR PROPERTY STRINGS "5" "6")
-if(NOT "${VTK_VERSION_MAJOR}" STREQUAL "5" AND NOT "${VTK_VERSION_MAJOR}" STREQUAL "6")
-  set(VTK_VERSION_MAJOR 6 CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6)." FORCE)
-  message(WARNING "Setting VTK_VERSION_MAJOR to '6' as an valid value was specified.")
-endif()

-set(USE_VTKv5 ON)
-set(USE_VTKv6 OFF)
-if(${VTK_VERSION_MAJOR} STREQUAL "6")
-  set(USE_VTKv5 OFF)
-  set(USE_VTKv6 ON)
-endif()
+set(${extProjName}_REQUIRED_VERSION "6.3.0")  #If a required version is necessary, then set this, else leave blank

-if(USE_VTKv6)
-  set(${extProjName}_REQUIRED_VERSION "6.3.0")  #If a required version is necessary, then set this, else leave blank
-else()
-  set(${extProjName}_REQUIRED_VERSION "5.10")  #If a required version is necessary, then set this, else leave blank
-endif()
-
-if("${VTK_VERSION_MAJOR}" STREQUAL "5")
-  message(WARNING "VTK_VERSION_MAJOR 5 support is deprecated.")
-endif()
 # Sanity checks
 #if(DEFINED ${extProjName}_DIR AND NOT EXISTS ${${extProjName}_DIR})
 #  message(FATAL_ERROR "${extProjName}_DIR variable is defined but corresponds to non-existing directory (${${extProjName}_DIR})")
 #endif()

 # Set dependency list
-set(${proj}_DEPENDENCIES "")
-set(${PROJECT_NAME}_USE_PYTHONQT OFF)
-if (${PROJECT_NAME}_USE_PYTHONQT)
-  list(APPEND ${proj}_DEPENDENCIES python)
-endif()
+set(${proj}_DEPENDENCIES Qt5)

 # Include dependent projects if any
 SlicerMacroCheckExternalProjectDependency(${proj})
@@ -75,131 +52,26 @@
       -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
       -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
       -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
-      -DVTK_REQUIRED_OBJCXX_FLAGS:STRING="")
-  endif()
-
-  ### --- Project specific additions here
-  set(VTK_WRAP_TCL OFF)
-  set(VTK_WRAP_PYTHON OFF)
-
-  if (${PROJECT_NAME}_USE_PYTHONQT)
-    set(VTK_WRAP_PYTHON ON)
-  endif()
-
-  set(VTK_PYTHON_ARGS
-      -DPYTHON_EXECUTABLE:PATH=${PYTHON_EXECUTABLE}
-      -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
-      -DPYTHON_LIBRARIES:FILEPATH=${PYTHON_LIBRARIES}
       )
-  if(${PROJECT_NAME}_USE_PYTHONQT)
-    list(APPEND VTK_PYTHON_ARGS
-      -DVTK_INSTALL_PYTHON_USING_CMAKE:BOOL=ON
-      )
-  endif()
-
-  set(VTK_QT_ARGS)
-  if(${PRIMARY_PROJECT_NAME}_USE_QT)
-    if(USE_VTKv6)
-      set(VTK_QT_ARGS
-        -DModule_vtkGUISupportQt:BOOL=ON
-        )
-    else()
-      set(VTK_QT_ARGS)
-    endif()
-    if(NOT APPLE)
-      list(APPEND VTK_QT_ARGS
-        #-DDESIRED_QT_VERSION:STRING=4 # Unused
-        -DVTK_USE_GUISUPPORT:BOOL=ON
-        -DVTK_USE_QVTK_QTOPENGL:BOOL=ON
-        -DVTK_USE_QT:BOOL=ON
-        -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-        )
-    else()
-      list(APPEND VTK_QT_ARGS
-        -DVTK_USE_CARBON:BOOL=OFF
-        # Default to Cocoa, VTK/CMakeLists.txt will enable Carbon and disable cocoa if needed
-        -DVTK_USE_COCOA:BOOL=ON
-        -DVTK_USE_X:BOOL=OFF
-        #-DVTK_USE_RPATH:BOOL=ON # Unused
-        #-DDESIRED_QT_VERSION:STRING=4 # Unused
-        -DVTK_USE_GUISUPPORT:BOOL=ON
-        -DVTK_USE_QVTK_QTOPENGL:BOOL=ON
-        -DVTK_USE_QT:BOOL=ON
-        -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-        )
-    endif()
-    find_package(Qt5 COMPONENTS Core Widgets Svg OpenGL REQUIRED)
-  else()
-    set(VTK_QT_ARGS
-        -DVTK_USE_GUISUPPORT:BOOL=OFF
-        -DVTK_USE_QT:BOOL=OFF
-        )
-  endif()
-
-  # Disable Tk when Python wrapping is enabled
-  if (${PROJECT_NAME}_USE_PYTHONQT)
-    list(APPEND VTK_QT_ARGS -DVTK_USE_TK:BOOL=OFF)
-  endif()
-
-  set(slicer_TCL_LIB)
-  set(slicer_TK_LIB)
-  set(slicer_TCLSH)
-  set(VTK_TCL_ARGS)
-  if(VTK_WRAP_TCL)
-    if(WIN32)
-      set(slicer_TCL_LIB ${CMAKE_BINARY_DIR}/tcl-build/lib/tcl84.lib)
-      set(slicer_TK_LIB ${CMAKE_BINARY_DIR}/tcl-build/lib/tk84.lib)
-      set(slicer_TCLSH ${CMAKE_BINARY_DIR}/tcl-build/bin/tclsh.exe)
-    elseif(APPLE)
-      set(slicer_TCL_LIB ${CMAKE_BINARY_DIR}/tcl-build/lib/libtcl8.4.dylib)
-      set(slicer_TK_LIB ${CMAKE_BINARY_DIR}/tcl-build/lib/libtk8.4.dylib)
-      set(slicer_TCLSH ${CMAKE_BINARY_DIR}/tcl-build/bin/tclsh84)
-    else()
-      set(slicer_TCL_LIB ${CMAKE_BINARY_DIR}/tcl-build/lib/libtcl8.4.so)
-      set(slicer_TK_LIB ${CMAKE_BINARY_DIR}/tcl-build/lib/libtk8.4.so)
-      set(slicer_TCLSH ${CMAKE_BINARY_DIR}/tcl-build/bin/tclsh84)
-    endif()
-    set(VTK_TCL_ARGS
-      -DTCL_INCLUDE_PATH:PATH=${CMAKE_BINARY_DIR}/tcl-build/include
-      -DTK_INCLUDE_PATH:PATH=${CMAKE_BINARY_DIR}/tcl-build/include
-      -DTCL_LIBRARY:FILEPATH=${slicer_TCL_LIB}
-      -DTK_LIBRARY:FILEPATH=${slicer_TK_LIB}
-      -DTCL_TCLSH:FILEPATH=${slicer_TCLSH}
-      )
-  endif()
-
-  set(VTK_BUILD_STEP "")
-  if(UNIX)
-    configure_file(SuperBuild/External_VTK_build_step.cmake.in
-      ${CMAKE_CURRENT_BINARY_DIR}/External_VTK_build_step.cmake
-      @ONLY)
-    set(VTK_BUILD_STEP ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/External_VTK_build_step.cmake)
   endif()

   set(${proj}_CMAKE_OPTIONS
       -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install
       -DBUILD_EXAMPLES:BOOL=OFF
       -DBUILD_TESTING:BOOL=OFF
-      -DVTK_USE_PARALLEL:BOOL=ON
-      -DVTK_DEBUG_LEAKS:BOOL=${${PROJECT_NAME}_USE_VTK_DEBUG_LEAKS}
-      -DVTK_LEGACY_REMOVE:BOOL=OFF
-      -DVTK_WRAP_TCL:BOOL=${VTK_WRAP_TCL}
-      #-DVTK_USE_RPATH:BOOL=ON # Unused
-      ${VTK_TCL_ARGS}
-      -DVTK_WRAP_PYTHON:BOOL=${VTK_WRAP_PYTHON}
+      -DVTK_USE_PARALLEL:BOOL=ON
       -DVTK_INSTALL_LIB_DIR:PATH=${${PROJECT_NAME}_INSTALL_LIB_DIR}
-      ${VTK_PYTHON_ARGS}
-      ${VTK_QT_ARGS}
-      ${VTK_MAC_ARGS}
+      ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
+      -DVTK_Group_Qt:BOOL=ON
+      -DQT_QMAKE_EXECUTABLE:PATH=${QT_QMAKE_EXECUTABLE}
+      -DCMAKE_PREFIX_PATH=${Qt5_DIR}
+      -DVTK_QT_VERSION:STRING=5
     )
   ### --- End Project specific additions
-if(USE_VTKv6)
+
   set(${proj}_GIT_TAG "v6.3.0")
   set(${proj}_REPOSITORY ${git_protocol}://vtk.org/VTK.git)
-else()
-  set(${proj}_REPOSITORY ${git_protocol}://github.com/BRAINSia/VTK.git)
-  set(${proj}_GIT_TAG "FixClangFailure_VTK5.10_release")
-endif()
+
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
@@ -222,22 +94,8 @@
     )

-  set(VTKPatchScript ${CMAKE_CURRENT_LIST_DIR}/External_VTK_patch.cmake)
-  ExternalProject_Add_Step(${proj} VTKPatch
-    COMMENT "get rid of obsolete C/CXX flags"
-    DEPENDEES download
-    DEPENDERS configure
-    COMMAND ${CMAKE_COMMAND}
-    -DVTKSource=<SOURCE_DIR>
-    -DUSE_VTKv6=${USE_VTKv6}
-    -P ${VTKPatchScript}
-    )
-
-if(USE_VTKv6)
   set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/vtk-6.3)
-else()
-  set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/vtk-5.10)
-endif()
+

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


Fix jenkins_mercury.cmake

Fix jenkins_mercury.cmake

--- Testing/jenkins_mercury.cmake
+++ Testing/jenkins_mercury.cmake
@@ -95,6 +95,6 @@
 #set(ENV{CXX} /usr/bin/g++)
 #set(ENV{FC}  /usr/bin/gfortran)

-include(mercury_common.cmake)
+include($ENV{PWD}/Testing/mercury_common.cmake)

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


Limiting headless builds to linux

Limiting headless builds to linux

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -48,9 +48,9 @@
   # We use this as a marker that you can try to use the proprietary libraries.
   set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
 endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
-if (INSTALL_PROPRIETARY)
+if (LINUX AND INSTALL_PROPRIETARY)
   set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
-endif (INSTALL_PROPRIETARY)
+endif (LINUX AND INSTALL_PROPRIETARY)
 set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py")
 set(TEMPLATE_VERIFIER_MASTER_URL "http://bitbucket.org/lindenlab/master-message-template/raw/tip/message_template.msg" CACHE STRING "Location of the master message template")


px4_fmu-v2 disable mpu9250

px4_fmu-v2 disable mpu9250

--- boards/px4/fmu-v2/default.cmake
+++ boards/px4/fmu-v2/default.cmake
@@ -37,7 +37,7 @@
 		imu/l3gd20
 		imu/lsm303d
 		imu/mpu6000
-		imu/mpu9250
+		#imu/mpu9250
 		#iridiumsbd
 		#irlock
 		#lights/blinkm


Fix MD5 variable name

Fix MD5 variable name

--- ExternalSource.cmake
+++ ExternalSource.cmake
@@ -28,7 +28,7 @@

 set (${ABBREV}_NAME     ${ABBREV}-${SRC_VERSION})
 set (${ABBREV}_FILE     ${FLYEM_BUILD_DIR}/src/${FILENAME})
-set (${ABBREV}_FILE_MD5 ${MD5})
+set (${ABBREV}_MD5      ${MD5})
 set (${ABBREV}_RELEASE  ${SRC_VERSION})
 set (${ABBREV}_SRC_DIR  ${FLYEM_BUILD_DIR}/src/${${ABBREV}_NAME})


Excluding more M routines from GTM compilation.

At this point we get a clean compilation of the remaining routines.

--- CMake/ListOfVistARoutines.cmake
+++ CMake/ListOfVistARoutines.cmake
@@ -39,7 +39,7 @@
   A4A7B.m
   A5CST.m
   A7R3.m
-  A7R3NT2.m
+# A7R3NT2.m
   A7RUCH01.m
   A7RXDRPT.m
   ABSV04.m
@@ -7336,7 +7336,7 @@
   HLCS2.m
   HLCSAC.m
   HLCSAS1.m
-  HLCSAS.m
+# HLCSAS.m
   HLCSDL1.m
   HLCSDL2.m
   HLCSDL.m
@@ -7456,7 +7456,7 @@
   HLLM1.m
   HLLM.m
   HLLOG.m
-  HLLP.m
+# HLLP.m
   HLMA0.m
   HLMA1.m
   HLMA2.m
@@ -7511,7 +7511,7 @@
   HLOSRVR2.m
   HLOSRVR3.m
   HLOSTAT.m
-  HLOTCP.m
+# HLOTCP.m
   HLOTLNK.m
   HLOT.m
   HLOUSR1.m
@@ -10685,7 +10685,7 @@
   KMPDUT4C.m
   KMPDUT4.m
   KMPDUT5.m
-  KMPDUTL1.m
+# KMPDUTL1.m
   KMPDUTL2.m
   KMPDUTL3.m
   KMPDUTL4.m
@@ -10712,8 +10712,8 @@
   KMPRUTL2.m
   KMPRUTL3.m
   KMPRUTL.m
-  KMPSGE.m
-  KMPSLK.m
+# KMPSGE.m
+# KMPSLK.m
   KMPSUTL1.m
   KMPSUTL.m
   LA1103.m
@@ -13809,8 +13809,8 @@
   NVSMKPRN.m
   NVSMSG.m
   NVSPOST.m
-  NVSSTB.m
-  NVSVCSS.m
+# NVSSTB.m
+# NVSVCSS.m
   OCXBDT1.m
   OCXBDT2.m
   OCXBDT3.m
@@ -25822,7 +25822,7 @@
   XGKB1.m
   XGSA.m
   XGSBOX.m
-  XGSETUP.m
+# XGSETUP.m
   XGS.m
   XGSW.m
   XHDAUTH.m
@@ -26004,13 +26004,13 @@
   XMKPR1.m
   XMKPRD.m
   XMKPR.m
-  XML1CRC.m
-  XML4CRC1.m
-  XML4CRC.m
+# XML1CRC.m
+# XML4CRC1.m
+# XML4CRC.m
   XML.m
-  XMLSWP0.m
+# XMLSWP0.m
   XMLSWP2.m
-  XMLSWP.m
+# XMLSWP.m
   XMLTCP.m
   XM.m
   XMM1.m
@@ -26032,19 +26032,19 @@
   XMR3.m
   XMR4.m
   XMRENT.m
-  XMRFTP.m
-  XMRFTPUX.m
-  XMRINETD.m
+# XMRFTP.m
+# XMRFTPUX.m
+# XMRINETD.m
   XMR.m
   XMRMSM.m
   XMRONT.m
   XMRPCTS0.m
   XMRPCTS1.m
-  XMRPCTSA.m
+# XMRPCTSA.m
   XMRPCTS.m
   XMRPOP.m
-  XMRTCPGO.m
-  XMRUCX.m
+# XMRTCPGO.m
+# XMRUCX.m
   XMS0BLOB.m
   XMS1.m
   XMS2.m
@@ -26059,7 +26059,7 @@
   XMTDO.m
   XMTDR.m
   XMTDT.m
-  XMUCXPOP.m
+# XMUCXPOP.m
   XMUDCHK.m
   XMUDCHR.m
   XMUDNC.m
@@ -26161,7 +26161,7 @@
   XOBVRPCX.m
   XOBVSKT.m
   XOBVSYSI.m
-  XOBVTCP.m
+# XOBVTCP.m
   XOBVTLS.m
   XOBWPWD.m
   XOBWUA1.m
@@ -26413,7 +26413,7 @@
   XQSRV.m
   XQSTCK.m
   XQSUITE1.m
-  XQSUITE.m
+# XQSUITE.m
   XQT1.m
   XQT2.m
   XQT3.m
@@ -26427,7 +26427,7 @@
   XT73P132.m
   XT95POST.m
   XTBASE.m
-  XTEDTVXD.m
+# XTEDTVXD.m
   XTER1A1.m
   XTER1A.m
   XTER1B.m
@@ -26562,12 +26562,12 @@
   XUAF4.m
   XUAPURGE.m
   XUBA.m
-  XUCIDTM.m
+# XUCIDTM.m
   XUCIGTM.m
   _XUCI.m
-  XUCIMSM.m
-  XUCIONT.m
-  XUCIVXD.m
+# XUCIMSM.m
+# XUCIONT.m
+# XUCIVXD.m
   XUCSXCD.m
   XUCSXDR.m
   XUCSXGR.m
@@ -26637,7 +26637,7 @@
   XUMF512F.m
   XUMF567.m
   XUMF5AT.m
-  XUMF5AU.m
+# XUMF5AU.m
   XUMF5BYT.m
   XUMF5II.m
   XUMF5I.m
@@ -26729,8 +26729,8 @@
   XUSESIG1.m
   XUSESIG.m
   XUSFACHK.m
-  XUSG1.m
-  XUSG.m
+# XUSG1.m
+# XUSG.m
   XUSHSH.m
   XUSHSHP.m
   XUSKAAJ1.m
@@ -26871,7 +26871,7 @@
   XWBRW.m
   XWBSEC.m
   XWBTCPC.m
-  XWBTCPL.m
+# XWBTCPL.m
   XWBTCP.m
   XWBTCPM1.m
   XWBTCPM2.m
@@ -26879,7 +26879,7 @@
   XWBTCPMT.m
   XWBUTL.m
   XWBVLC.m
-  XWBVLL.m
+# XWBVLL.m
   XWBVL.m
   XWBZ1.m
   YIHISTF.m
@@ -27256,12 +27256,12 @@
   ZIS31.m
   _ZIS3.m
   ZIS3.m
-  ZIS4DTM.m
-  ZIS4GTM.m
-  ZIS4IS2.m
-  _ZIS4.m
-  ZIS4MSM.m
-  ZIS4MSQ.m
+# ZIS4DTM.m
+# ZIS4GTM.m
+# ZIS4IS2.m
+# _ZIS4.m
+# ZIS4MSM.m
+# ZIS4MSQ.m
   _ZIS5.m
   ZIS5.m
   _ZIS6.m
@@ -27288,8 +27288,8 @@
   ZISFMSQ.m
   ZISFMVX.m
   ZISFONT.m
-  ZISFVXD.m
-  ZISHDTM.m
+# ZISFVXD.m
+# ZISHDTM.m
   ZISHGTM.m
   ZISHGUX.m
   ZISHIS2.m
@@ -27337,7 +27337,7 @@
   ZOSVGUX.m
 # ZOSVKRO.m
 # ZOSVKSOE.m
-  ZOSVKSOS.m
+# ZOSVKSOS.m
   ZOSVKSVS.m
   _ZOSV.m
   _ZTBKC.m
@@ -27432,5 +27432,5 @@
   ZUSET.m
   ZUVXD.m
 # ZZHLGHB1.m
-  ZZRCSUM.m
+# ZZRCSUM.m
   )


Fix regression making sure the Qt4 moc considers target include paths.

--- CMake/ctkMacroBuildPlugin.cmake
+++ CMake/ctkMacroBuildPlugin.cmake
@@ -198,7 +198,7 @@
       # this is a workaround for Visual Studio. The relative include paths in the generated
       # moc files can get very long and can't be resolved by the MSVC compiler.
       foreach(moc_src ${MY_MOC_SRCS})
-        QT4_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} ${MY_MOC_OPTIONS} ${target})
+        QT4_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} ${MY_MOC_OPTIONS} TARGET ${lib_name})
       endforeach()
     endif()
     QT4_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})


COMP: gettext configuration for external project

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -109,6 +109,13 @@
   SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
   	${MAPNIK_INCLUDE_DIR} ${FREETYPE2_INCLUDE_DIR})
 ENDIF(OTB_USE_MAPNIK)
+
+#-----------------------------------------------------------------------------
+# Include directories from the GETTEXT build tree.
+IF(OTB_USE_GETTEXT)
+  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
+  	${GETTEXT_INCLUDE_DIR})
+ENDIF(OTB_USE_GETTEXT)

 #-----------------------------------------------------------------------------
 # Include directories from the PQXX build tree.
@@ -350,6 +357,12 @@
   	${MAPNIK_INCLUDE_DIR} )
 ENDIF(OTB_USE_MAPNIK)

+#For Gettext header file
+IF(OTB_USE_GETTEXT)
+  SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
+  	${GETTEXT_INCLUDE_DIR} )
+ENDIF(OTB_USE_GETTEXT)
+
 # For OpentTreads  header file
 IF(OTB_USE_EXTERNAL_OPENTHREADS)
   SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}


Fix missing arguments when setting CMake CACHE variable

Change-Id: I0c970c88b2fec32dda0bef27e79dcc8de3b12a8e

--- CMake/sitkGenerateFilterSource.cmake
+++ CMake/sitkGenerateFilterSource.cmake
@@ -3,12 +3,19 @@
 #
 if ( NOT SITK_LUA_EXECUTABLE )
   set ( SAVE_LUA_EXECUTABLE ${LUA_EXECUTABLE} )
+  get_property( SAVE_LUA_EXECUTABLE_TYPE CACHE LUA_EXECUTABLE PROPERTY TYPE )
+  get_property( SAVE_LUA_EXECUTABLE_DOCSTRING CACHE LUA_EXECUTABLE PROPERTY HELPSTRING )

   find_package( LuaInterp REQUIRED 5.1 )
   set( SITK_LUA_EXECUTABLE ${LUA_EXECUTABLE} CACHE PATH "Lua executable used for code generation." )

   if (DEFINED SAVE_LUA_EXECUTABLE)
-    set( LUA_EXECUTABLE ${SAVE_LUA_EXECUTABLE} CACHE )
+    set( LUA_EXECUTABLE ${SAVE_LUA_EXECUTABLE}
+      CACHE
+       ${SAVE_LUA_EXECUTABLE_TYPE}
+       ${SAVE_LUA_EXECUTABLE_DOCSTRING}
+       FORCED
+       )
   else()
     unset( LUA_EXECUTABLE CACHE )
   endif()


teach ConfigurePackages to find qt property browser

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -180,8 +180,8 @@

 macro (configure_qtpropertybrowser)
     sagase_configure_package (QT_PROPERTY_BROWSER
-        NAMES QtPropertyBrowser
-        COMPONENTS QtPropertyBrowser
+        NAMES QtPropertyBrowser QtSolutions_PropertyBrowser-2.5
+        COMPONENTS QtPropertyBrowser QtSolutions_PropertyBrowser-2.5
         PREFIXES ${ENV_NAALI_DEP_PATH})

     sagase_configure_report (QT_PROPERTY_BROWSER)


Better test dependencies import

Better test dependencies import

--- BdeBuildSystem/BdeTargetUtils.cmake
+++ BdeBuildSystem/BdeTargetUtils.cmake
@@ -417,9 +417,6 @@
                                                              ${${uor_name}_PCDEPS}
                                                              ${${uor_name}_TEST_PCDEPS}
                                                    LABELS    "all" ${target} ${pkg})
-                        if (${pkg}_TEST_TARGETS)
-                            bbs_import_target_dependencies(${target} ${${uor_name}_TEST_PCDEPS})
-                        endif()
                     endif()
                 endif()
             endforeach()
@@ -435,9 +432,16 @@
                 if (NOT TARGET ${target}.t)
                     add_custom_target(${target}.t)
                 endif()
+                set(import_test_deps ON)
                 foreach(pkg ${${uor_name}_PACKAGES})
                     if (${pkg}_TEST_TARGETS)
                         add_dependencies(${target}.t ${${pkg}_TEST_TARGETS})
+                        if (import_test_deps)
+                            # Import UOR test dependencies only once and only if we have at least
+                            # one generated test target
+                            bbs_import_target_dependencies(${target} ${${uor_name}_TEST_PCDEPS})
+                            set(import_test_deps OFF)
+                        endif()
                     endif()
                 endforeach()
             endif()


[build] add build option `OT_BORDER_ROUTING_COUNTERS` (#8389)

--- etc/cmake/options.cmake
+++ etc/cmake/options.cmake
@@ -77,6 +77,7 @@
 ot_option(OT_BORDER_AGENT OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE "border agent")
 ot_option(OT_BORDER_ROUTER OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE "border router")
 ot_option(OT_BORDER_ROUTING OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE "border routing")
+ot_option(OT_BORDER_ROUTING_COUNTERS OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE "border routing counters")
 ot_option(OT_CHANNEL_MANAGER OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE "channel manager")
 ot_option(OT_CHANNEL_MONITOR OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE "channel monitor")
 ot_option(OT_CHILD_SUPERVISION OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE "child supervision")


Enable Python in all configuration builds

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -8,10 +8,18 @@
   )
 endif()

+set(_python_excludes )
+
+if(NOT (CMAKE_SIZEOF_VOID_P EQUAL 8) )
+  set(_python_excludes
+    Python
+    Numpy
+   )
+endif()
+
 set(_package_excludes
   ${_apple_package_excludes}
-  Python
-  Numpy
+  ${_python_excludes}
   OpenCL
   SYSTEM_Boost
   Boost_LIBRARIES


updated common.cmake

updated common.cmake

--- common.cmake
+++ common.cmake
@@ -63,8 +63,12 @@

 include_directories( include  )

-file(GLOB PROJECT_INCLUDES "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
-file(GLOB PROJECT_SRC "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")
+set(PROJECT_INCLUDES_GLOBS ${PROJECT_INCLUDES_GLOBS} "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
+
+set(PROJECT_SRC_GLOBS ${PROJECT_SRC_GLOBS} "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")
+
+file(GLOB PROJECT_INCLUDES ${PROJECT_INCLUDES_GLOBS} )
+file(GLOB PROJECT_SRC ${PROJECT_SRC_GLOBS} )

 add_library (${PROJECT} ${PROJECT_SRC} ${PROJECT_INCLUDES})


Guarding against empty list

Guarding against empty list

Former-commit-id: d6bec64ba75b8a9098333a07c850afd29921e4b3

--- cmake-modules/getExpandedTarget.cmake
+++ cmake-modules/getExpandedTarget.cmake
@@ -30,12 +30,14 @@
     #            message("Current ${expanded_list}: ${${expanded_list}}")
     #            message("Returning:  ${scoped_list};${${expanded_list}}")
     if(NOT ${expanded_list})
-        list(REMOVE_DUPLICATES scoped_list)
+        list(REMOVE_DUPLICATES "scoped_list")
         set(${expanded_list} "${scoped_list}" PARENT_SCOPE)
     else()
-        list(REMOVE_DUPLICATES scoped_list)
-        list(REMOVE_DUPLICATES expanded_list)
-        list(REMOVE_DUPLICATES ${expanded_list})
+        list(REMOVE_DUPLICATES "scoped_list")
+        list(REMOVE_DUPLICATES "expanded_list")
+        if(${expanded_list})
+            list(REMOVE_DUPLICATES "${expanded_list}")
+        endif()
         set(${expanded_list} "${scoped_list};${${expanded_list}}" PARENT_SCOPE)
     endif()
 endfunction()


Fixing minor bug in ACMEs list to string function

Change-Id: Ibdf04102bcaf92345d96fd93bbe6a7767075fdbd

--- cmake/acme/internal/helpmethods.cmake
+++ cmake/acme/internal/helpmethods.cmake
@@ -108,7 +108,7 @@

 MACRO(INTERNAL_LIST_TO_STRING ilts_input ilts_output)
-	STRING(REGEX REPLACE ";" " " ${ilts_output} "${ilts_input}")
+	STRING(REGEX REPLACE ";" " " "${ilts_output}" "${ilts_input}")
 ENDMACRO(INTERNAL_LIST_TO_STRING)


[cmake] Add support for using the standalone leaks sanitizer with LLVM.

This commit causes LLVM_USE_SANITIZER to now accept the "Leaks" option. This
will cause cmake to pass in -fsanitize=leak in all of the appropriate places.

I am making this change so that I can setup a linux bot that only detects
leaks.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@305839 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 864e349715f5e32049bef560a23777b465f6c8ca)

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -565,6 +565,9 @@
       append_common_sanitizer_flags()
       append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all"
               CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    elseif (LLVM_USE_SANITIZER STREQUAL "Leaks")
+      append_common_sanitizer_flags()
+      append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     else()
       message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
     endif()


CMake: LLVM_LIT_TOOLS_DIR is needed only on Win32 hosts to use GnuWin32 tools.

Unixen and Cygwin do not need it.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -20,8 +20,6 @@
 endif()
 set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}"
     CACHE STRING "Default options for lit")
-
-set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools")

 if( LLVM_ENABLE_ASSERTIONS )
   # MSVC doesn't like _DEBUG on release builds. See PR 4379.
@@ -48,6 +46,9 @@
   else(CYGWIN)
     set(LLVM_ON_WIN32 1)
     set(LLVM_ON_UNIX 0)
+
+    # This is effective only on Win32 hosts to use gnuwin32 tools.
+    set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools")
   endif(CYGWIN)
   set(LTDL_SHLIB_EXT ".dll")
   set(EXEEXT ".exe")


Support setting BN_INSTALL_DIR in cmake

Support setting BN_INSTALL_DIR in cmake

--- cmake/FindBinaryNinjaCore.cmake
+++ cmake/FindBinaryNinjaCore.cmake
@@ -14,7 +14,7 @@
 cmake_minimum_required(VERSION 3.13 FATAL_ERROR)

 if(NOT BN_INTERNAL_BUILD)
-    set(PATH_HINTS "$ENV{BN_INSTALL_DIR}")
+    set(PATH_HINTS "$ENV{BN_INSTALL_DIR}" ${BN_INSTALL_DIR})
     if(WIN32)
         # System-wide install
         list(APPEND PATH_HINTS "C:\\Program Files\\Vector35\\BinaryNinja")


Add hboost thread as dependency to resolve linking error

Signed-off-by: Dan Bailey <39b6ae1dd30d9ab3cd77a2d084b277520f14c203@ilm.com>

--- cmake/OpenVDBHoudiniSetup.cmake
+++ cmake/OpenVDBHoudiniSetup.cmake
@@ -197,18 +197,21 @@
   list(APPEND _HOUDINI_EXTRA_LIBRARIES
     ${_HOUDINI_LIB_DIR}/libHoudiniRAY.dylib
     ${_HOUDINI_LIB_DIR}/libhboost_regex.dylib
+    ${_HOUDINI_LIB_DIR}/libhboost_thread.dylib
   )
 else()
   set(_HOUDINI_LIB_DIR dsolib)
   list(APPEND _HOUDINI_EXTRA_LIBRARIES
     ${_HOUDINI_LIB_DIR}/libHoudiniRAY.so
     ${_HOUDINI_LIB_DIR}/libhboost_regex.so
+    ${_HOUDINI_LIB_DIR}/libhboost_thread.so
   )
 endif()

 list(APPEND _HOUDINI_EXTRA_LIBRARY_NAMES
   HoudiniRAY
   hboost_regex
+  hboost_thread
 )

 # Additionally link extra deps


Disabled the Html module for now untill the all Jansson test pass.

--- cmake_modules/FindJansson.cmake
+++ cmake_modules/FindJansson.cmake
@@ -34,7 +34,9 @@
   PATH_SUFFIXES jansson)

 IF (Jansson_LIBRARY AND Jansson_INCLUDE)
-  SET(Jansson_FOUND TRUE)
+# Disabled Jansson tests temporarely until we fix some of them that are failing
+#   SET(Jansson_FOUND TRUE)
+  SET(Jansson_FOUND FALSE)
   SET(Jansson_LIBRARIES ${Jansson_LIBRARY})
   SET(Jansson_INCLUDE_DIRS ${Jansson_INCLUDE})
 ELSE (Jansson_LIBRARY AND Jansson_INCLUDE)


ENH: official 6.1 version of vtk

ENH: official 6.1 version of vtk

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -159,8 +159,8 @@
       ${VTK_MAC_ARGS}
     )
   ### --- End Project specific additions
-  set(${proj}_REPOSITORY ${git_protocol}://vtk.org/VTK.git)
-  set(${proj}_GIT_TAG "v6.1.0.rc1")
+  set(${proj}_REPOSITORY https://github.com/Kitware/VTK.git)
+  set(${proj}_GIT_TAG v6.1.0 )
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


update common.cmake

update common.cmake

--- common.cmake
+++ common.cmake
@@ -16,8 +16,8 @@

 if(CMAKE_USE_PTHREADS_INIT)
     if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
-        set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-pthread")
-        set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} "-pthread")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
     endif()
 endif()
@@ -25,11 +25,11 @@
 if (${CXX11} MATCHES "ON")
     # Compiler-specific C++11 activation.
     if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-        set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-        set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-        set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-        set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+        set(CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
+        set(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
+        set(CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG")
+        set(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} -O4 -DNDEBUG")
+        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g")

         execute_process(
             COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
@@ -38,15 +38,15 @@
         endif ()
     elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")

-        set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-        set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-        set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-        set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+        set(CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
+        set(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
+        set(CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG")
+        set(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} -O4 -DNDEBUG")
+        set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g")

         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
     elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
-        add_definitions("/W2")
+        add_definitions("/W3")
     else ()
         message(FATAL_ERROR "Your C++ compiler does not support C++11.")
     endif ()
@@ -64,7 +64,6 @@
 include_directories( include  )

 set(PROJECT_INCLUDES_GLOBS ${PROJECT_INCLUDES_GLOBS} "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
-
 set(PROJECT_SRC_GLOBS ${PROJECT_SRC_GLOBS} "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")

 file(GLOB PROJECT_INCLUDES ${PROJECT_INCLUDES_GLOBS} )