- change search order for expat library

- change search order for expat library

expat 2.4.x renamed the library from expat to libexpat.
also be sure to check dependency dir first
provide more debug info

--- CMakeModules/FindEXPAT.cmake
+++ CMakeModules/FindEXPAT.cmake
@@ -34,37 +34,58 @@
     PATHS $ENV{EXPAT_DIR}/include
             $ENV{EXPAT_DIR}
             ${${_PROJECT_DEPENDENCY_DIR}}/include
-            ~/Library/Frameworks
-            /Library/Frameworks
-            /sw/include        # Fink
-            /opt/local/include # MacPorts
-            /opt/csw/include   # Blastwave
-            /opt/include
-            /usr/freeware/include
             NO_DEFAULT_PATH)
+
+if (NOT EXPAT_INCLUDE_DIR)
+find_path(EXPAT_INCLUDE_DIR expat.h
+    PATHS $ENV{EXPAT_DIR}/include
+          $ENV{EXPAT_DIR}
+          ${${_PROJECT_DEPENDENCY_DIR}}/include
+          ~/Library/Frameworks
+          /Library/Frameworks
+          /sw/include        # Fink
+          /opt/local/include # MacPorts
+          /opt/csw/include   # Blastwave
+          /opt/include
+          /usr/freeware/include
+          NO_DEFAULT_PATH)
+endif ()

 if (NOT EXPAT_INCLUDE_DIR)
     find_path(EXPAT_INCLUDE_DIR expat.h)
 endif ()

 find_library(EXPAT_LIBRARY
-    NAMES expat libexpat
+    NAMES libexpat expat
     PATHS $ENV{EXPAT_DIR}/${CMAKE_INSTALL_LIBDIR}
-            $ENV{EXPAT_DIR}/lib-dbg
-            $ENV{EXPAT_DIR}
-            ${${_PROJECT_DEPENDENCY_DIR}}/${CMAKE_INSTALL_LIBDIR}
-            ${${_PROJECT_DEPENDENCY_DIR}}
-            ~/Library/Frameworks
-            /Library/Frameworks
-            /sw/lib        # Fink
-            /opt/local/lib # MacPorts
-            /opt/csw/lib   # Blastwave
-            /opt/lib
-            /usr/freeware/lib64
-            NO_DEFAULT_PATH)
+          $ENV{EXPAT_DIR}/lib-dbg
+          $ENV{EXPAT_DIR}
+          ${${_PROJECT_DEPENDENCY_DIR}}/${CMAKE_INSTALL_LIBDIR}
+          ${${_PROJECT_DEPENDENCY_DIR}}/lib64
+          ${${_PROJECT_DEPENDENCY_DIR}}/lib
+          ${${_PROJECT_DEPENDENCY_DIR}}
+          NO_DEFAULT_PATH)

 if (NOT EXPAT_LIBRARY)
-    find_library(EXPAT_LIBRARY NAMES expat libexpat)
+find_library(EXPAT_LIBRARY
+    NAMES libexpat expat
+    PATHS $ENV{EXPAT_DIR}/${CMAKE_INSTALL_LIBDIR}
+          $ENV{EXPAT_DIR}/lib-dbg
+          $ENV{EXPAT_DIR}
+          ${${_PROJECT_DEPENDENCY_DIR}}/${CMAKE_INSTALL_LIBDIR}
+          ${${_PROJECT_DEPENDENCY_DIR}}
+          ~/Library/Frameworks
+          /Library/Frameworks
+          /sw/lib        # Fink
+          /opt/local/lib # MacPorts
+          /opt/csw/lib   # Blastwave
+          /opt/lib
+          /usr/freeware/lib64
+          NO_DEFAULT_PATH)
+endif()
+
+if (NOT EXPAT_LIBRARY)
+    find_library(EXPAT_LIBRARY NAMES libexpat expat)
 endif ()

 mark_as_advanced(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)
@@ -139,7 +160,11 @@
     INTERFACE_COMPILE_DEFINITIONS "XML_STATIC=1"
     )
 else()
-  message(FATAL_ERROR "Unable to compile a test executable against expat")
+  message(FATAL_ERROR "Unable to compile a test executable against expat with
+
+  EXPAT_INCLUDE_DIR = ${EXPAT_INCLUDE_DIR}
+  EXPAT_LIBRARY     = ${EXPAT_LIBRARY}
+  ")
 endif()

 endif()


Use std=cxx11 for clang

Use std=cxx11 for clang

--- CompilerIdentification.cmake
+++ CompilerIdentification.cmake
@@ -46,7 +46,7 @@
   set(CXX_DIALECT_PRE_11 "-std=c++98")

   set(CXX_DIALECT_11 "-std=c++11")
-  if(GCC_COMPILER_VERSION VERSION_LESS 4.7)
+  if(CMAKE_COMPILER_IS_GNUCXX_PURE AND GCC_COMPILER_VERSION VERSION_LESS 4.7)
     set(CXX_DIALECT_11 "-std=c++0x")
   endif()


CMake: Add newline

CMake: Add newline

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -57,4 +57,4 @@
     set(MKLDNN_INCLUDE_DIR "${EXTERNAL_INSTALL_LOCATION}/include" PARENT_SCOPE)
     set(MKLDNN_LIB_DIR "${EXTERNAL_INSTALL_LOCATION}/lib" PARENT_SCOPE)

-endif()+endif()


[CMake] configure_lit_site_cfg: ${SHLIBDIR} should point the build tree.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -436,11 +436,15 @@
     set(LLVM_BUILD_MODE "%(build_mode)s")
   endif ()

+  # They below might not be the build tree but provided binary tree.
   set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
   set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR})
   string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLVM_TOOLS_DIR ${LLVM_TOOLS_BINARY_DIR})
   string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLVM_LIBS_DIR  ${LLVM_LIBRARY_DIR})
-  string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} SHLIBDIR       ${LLVM_LIBRARY_DIR})
+
+  # SHLIBDIR points the build tree.
+  string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} SHLIBDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+
   set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
   set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
   set(SHLIBPATH_VAR ${SHLIBPATH_VAR})


More optional signing stuff for 10.5

More optional signing stuff for 10.5

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -206,8 +206,10 @@
   # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
   set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
-  set(ENABLE_SIGNING TRUE)
-  set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
+  if (XCODE_VERSION GREATER 4.2)
+    set(ENABLE_SIGNING TRUE)
+    set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
+  endif (XCODE_VERSION GREATER 4.2)
 endif (DARWIN)


BUG: special case in regex. filterout headertest

--- Packaging/install_rule.cmake
+++ Packaging/install_rule.cmake
@@ -1,3 +1,7 @@
+# This is one big fat if-elseif ladder
+# that will detect a type and destination to use in
+# install(..
+
 function(install_rule src_file)

   get_filename_component(src_file_EXT ${src_file} EXT)
@@ -17,6 +21,14 @@
     if ("${sfile_NAME_LOWER}" MATCHES "^(otb|mvd)([a-z0-9]+)test*.*" )
       if(PKG_DEBUG)
         message("SKIP INSTALL for ${sfile_NAME_LOWER}")
+      endif()
+      continue()
+    #special case for remote modules which has executables
+    #like MosiacHeaderTest1.exe. This ideally should be
+    #fixed in remote modules
+    elseif ("${sfile_NAME_LOWER}" MATCHES "headertest" )
+      if(PKG_DEBUG)
+	message("SKIP INSTALL for ${sfile_NAME_LOWER}")
       endif()
       continue()
     elseif("${sfile_ABS_LOWER}" MATCHES "(\\.exe)$")


Mark gl2ps as being part of the OpenGL backend

gl2ps is only compatible with the old opengl implementation
so marking it as part of that backend as it cannot compile
without it.

--- Rendering/GL2PS/module.cmake
+++ Rendering/GL2PS/module.cmake
@@ -1,5 +1,7 @@
 vtk_module(vtkRenderingGL2PS
   TCL_NAME vtkRenderingGLtoPS
+  BACKEND
+    OpenGL
   DEPENDS
     vtkRenderingContext${VTK_RENDERING_BACKEND}
   PRIVATE_DEPENDS


Add MUMPS ver 5.3.0 - 5.3.3

Add MUMPS ver 5.3.0 - 5.3.3

--- cmake/FindMumps.cmake
+++ cmake/FindMumps.cmake
@@ -21,6 +21,10 @@
 if($ENV{MUMPS_ROOT})
 set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} $ENV{MUMPS_ROOT}/lib)
 endif()
+set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.3.3/lib)
+set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.3.1/lib)
+set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.3.0/lib)
+set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.2.1/lib)
 set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.2.1/lib)
 set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.2.0/lib)
 set(LIB_SEARCH_PATH ${LIB_SEARCH_PATH} ${CMAKE_SOURCE_DIR}/../MUMPS_5.1.2/lib)


[axl_cmake] added -c option when compiling gcc precompiled headers

--- cmake/axl_utils.cmake
+++ cmake/axl_utils.cmake
@@ -793,7 +793,7 @@
 			${_COMPILE_FLAGS}
 			${_PCH_FLAGS}
 			"-o" ${_PCH_BIN}
-			${_PCH_H}
+			"-c" ${_PCH_H}
 		)

 	# modify target


[axl_cmake] use CMAKE_HOST_SYSTEM_PROCESSOR for CPU detection

--- cmake/axl_utils.cmake
+++ cmake/axl_utils.cmake
@@ -156,10 +156,12 @@
 	_CPU
 	)

-	if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+	if ("${CMAKE_HOST_SYSTEM_PROCESSOR}"  MATCHES "^(amd64|x86_64|x64)$")
 		set (${_CPU} "amd64")
-	else ()
+	elseif ("${CMAKE_HOST_SYSTEM_PROCESSOR}"  MATCHES "^(x86|i386)$")
 		set (${_CPU} "x86")
+	else ()
+		message (FATAL_ERROR "Unsupported CPU: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
 	endif ()
 endmacro ()


[asan] Disable asan for aarch64.

[asan] Disable asan for aarch64.

lib/Target/AArch64/AArch64FrameLowering.cpp:370: virtual void llvm::AArch64FrameLowering::emitPrologue(llvm::MachineFunction&, llvm::MachineBasicBlock&) const: Assertion `!(NeedsRealignment && NumBytes==0) && "NumBytes should never be 0 when realignment is needed"' failed.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -247,7 +247,7 @@
 filter_available_targets(UBSAN_COMMON_SUPPORTED_ARCH
   ${SANITIZER_COMMON_SUPPORTED_ARCH})
 filter_available_targets(ASAN_SUPPORTED_ARCH
-  x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mipsel mips64 mips64el)
+  x86_64 i386 i686 powerpc64 powerpc64le arm mips mipsel mips64 mips64el)
 filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
 filter_available_targets(LSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
 filter_available_targets(MSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)


[compiler-rt] Don't require c++ headers when configuring compiler-rt builds

Summary:
A sysroot without c++ headers is able to build compiler-rt, don't
require them when configuring available architectures from cmake.

Reviewers: samsonov, beanz, compnerd

Subscribers: llvm-commits

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -92,8 +92,8 @@
 # platform. We use the results of these tests to build only the various target
 # runtime libraries supported by our current compilers cross-compiling
 # abilities.
-set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc)
-file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <limits>\nint main() {}\n")
+set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.c)
+file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <stdio.h>\nint main() { printf(\"hello, world\"); }\n")

 # Add $arch as supported with no additional flags.
 macro(add_default_target_arch arch)


Revert "[CMake] Use __libc_start_main rather than fopen when checking for C library"

This reverts commit r352341: it broke the build on macOS which doesn't
seem to provide __libc_start_main in its C library.

git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@352411 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -2,7 +2,7 @@
 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)

-check_library_exists(c __libc_start_main "" LIBCXXABI_HAS_C_LIB)
+check_library_exists(c fopen "" LIBCXXABI_HAS_C_LIB)
 if (NOT LIBCXXABI_USE_COMPILER_RT)
   check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXXABI_HAS_GCC_S_LIB)
 endif ()


Add ${LIBGFLAGS_LIBRARY} to IMPORTED_LINK_INTERFACE_LIBRARIES of glog::glog (#9169)

Summary:
X-link: https://github.com/facebook/hhvm/pull/9169

X-link: https://github.com/facebook/wangle/pull/208

X-link: https://github.com/facebookincubator/reindeer/pull/4

X-link: https://github.com/facebookincubator/velox/pull/2445

X-link: https://github.com/facebookincubator/hsthrift/pull/98

X-link: https://github.com/facebookincubator/katran/pull/171

X-link: https://github.com/facebookincubator/mvfst/pull/272

X-link: https://github.com/facebook/fboss/pull/118

X-link: https://github.com/facebookincubator/fizz/pull/81

X-link: https://github.com/facebookexperimental/eden/pull/127

X-link: https://github.com/facebook/sapling-staging/pull/7

X-link: https://github.com/facebookexperimental/edencommon/pull/4

X-link: https://github.com/facebookexperimental/rust-shed/pull/34

X-link: https://github.com/facebook/fbthrift/pull/521

Pull Request resolved: https://github.com/facebook/watchman/pull/1055

X-link: https://github.com/facebook/folly/pull/1854

X-link: https://github.com/facebook/openr/pull/140

X-link: https://github.com/facebook/fb303/pull/31

Previously Folly provided a polyfill of the `GflagsFlagSaver` symbol, which was removed since https://github.com/facebook/folly/commit/4dadde1256f74e756510a499c86459967f78afb9. Therefore, `glog` should solve the `GflagsFlagSaver` symbol directly from `gflags`.

This diff added `gflags` libraries as a dependency of the CMake project `glog::glog` into `fbcode_builder`'s `FindGlog.cmake`, so that the `fbcode_builder` users will be able to automatically link with `gflags`.

Reviewed By: alexeyt

Differential Revision: D39220438

fbshipit-source-id: 485d67bfeace955f83a4961372680f12eb9cc1a5

--- build/fbcode_builder/CMake/FindGlog.cmake
+++ build/fbcode_builder/CMake/FindGlog.cmake
@@ -34,4 +34,10 @@
   add_library(glog::glog UNKNOWN IMPORTED)
   set_target_properties(glog::glog PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}")
   set_target_properties(glog::glog PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${GLOG_LIBRARIES}")
+
+  find_package(Gflags)
+  if(GFLAGS_FOUND)
+    message(STATUS "Found gflags as a dependency of glog::glog, include=${LIBGFLAGS_INCLUDE_DIR}, libs=${LIBGFLAGS_LIBRARY}")
+    set_target_properties(glog::glog PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES ${LIBGFLAGS_LIBRARY})
+  endif()
 endif()


cuda 4.2 release: changed cudart_x_xx string

--- build/cmake/custom_scripts/schism_cuda.cmake
+++ build/cmake/custom_scripts/schism_cuda.cmake
@@ -9,7 +9,7 @@
 option(SCHISM_CUDA_BUILD_KEEP_INTERMEDIATE_FILES   "Keep the generated intermediate files"  ON)

 if (WIN32)
-    set(SCM_CUDA_SHARED_LIB_NAME "cudart64_42_6" CACHE STRING "schism cuda internal" FORCE)
+    set(SCM_CUDA_SHARED_LIB_NAME "cudart64_42_9" CACHE STRING "schism cuda internal" FORCE)
 endif (WIN32)

 if (WIN32)


Improve set_from_env function support already defined values

--- Testing/CI/Azure/azure.cmake
+++ Testing/CI/Azure/azure.cmake
@@ -3,21 +3,22 @@
 # ------------
 #
 # Sets a CMake variable from an environment variable. If the
-# environment variable  is not  defined then either a fatal error is
-# generated or the CMake variable is not modified.
+# environment variable is not defined then the exist CMake value will
+# persist. Next if a "DEFAULT" argument is provided then the "value"
+# parameter will be use to set the variable.
 #
 # set_from_env( <variable> <environment variable> [REQUIRED|DEFAULT value] )
 function(set_from_env var env_var)
-  if(NOT DEFINED ENV{${env_var}})
-    if (ARGV2 STREQUAL "REQUIRED")
-      message(FATAL_ERROR "Required environment variable \"${env_var}\" not defined.")
-    elseif (ARGV2 STREQUAL "DEFAULT")
-      message("Setting \"${var}\" to default \"${ARGV3}\".")
-      set(${var} ${ARGV3} PARENT_SCOPE)
-    endif()
-  else()
+  if( DEFINED ENV{${env_var}})
     message("Setting \"${var}\" to \"$ENV{${env_var}}\" from environment.")
     set(${var} $ENV{${env_var}} PARENT_SCOPE)
+  elseif (DEFINED ${var})
+    message("Using defined value for \"${var}\" of \"${${var}}\"")
+  elseif (ARGV2 STREQUAL "REQUIRED")
+    message(FATAL_ERROR "Required environment variable \"${env_var}\" not defined.")
+  elseif (ARGV2 STREQUAL "DEFAULT")
+    message("Setting \"${var}\" to default \"${ARGV3}\".")
+    set(${var} ${ARGV3} PARENT_SCOPE)
   endif()
 endfunction()


Fix FindKCMTelepathyAccounts.cmake to not use the double lib prefix.

svn path=/trunk/playground/network/telepathy-accounts-kcm-plugins/; revision=1007861

--- cmake/modules/FindKCMTelepathyAccounts.cmake
+++ cmake/modules/FindKCMTelepathyAccounts.cmake
@@ -16,7 +16,7 @@

 find_path(KCMTELEPATHYACCOUNTS_INCLUDE_DIR
   NAMES KCMTelepathyAccounts/AbstractAccountUi KCMTelepathyAccounts/abstract-account-parameters-widget.h)
-find_library(KCMTELEPATHYACCOUNTS_LIBRARIES NAMES libkcmtelepathyaccounts )
+find_library(KCMTELEPATHYACCOUNTS_LIBRARIES NAMES kcmtelepathyaccounts )

 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(KCMTELEPATHYACCOUNTS DEFAULT_MSG


BUG: WRAPPER_LIBRARY_OUTPUT_DIR is needed before macro call

Ensure that global variables are set when cmake processing occurs
before macro call is made for external modules.

--- Wrapping/TypedefMacros.cmake
+++ Wrapping/TypedefMacros.cmake
@@ -29,6 +29,9 @@
 # TODO: is this the place place for this?
 set(WRAPPER_LIBRARY_INCLUDE_DIRECTORIES "" CACHE INTERNAL "additional include directories for each module")

+# WRAPPER_LIBRARY_OUTPUT_DIR. Directory in which generated cxx, xml, and idx files will be placed.
+set(WRAPPER_LIBRARY_OUTPUT_DIR "${ITK_DIR}/Wrapping" CACHE INTERNAL "Need to specify the output library directory globally")
+
 ###############################################################################
 # Define fundamental wrapping macro which sets up the global variables used
 # across all of the wrapping macros included at the end of this file.
@@ -50,10 +53,6 @@

   # WRAPPER_LIBRARY_SOURCE_DIR. Directory to be scanned for *.wrap files.
   set(WRAPPER_LIBRARY_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-
-  # WRAPPER_LIBRARY_OUTPUT_DIR. Directory in which generated cxx, xml, and idx
-  # files will be placed.
-  set(WRAPPER_LIBRARY_OUTPUT_DIR "${ITK_DIR}/Wrapping")

   # WRAPPER_LIBRARY_DEPENDS. List of names of other wrapper libraries that
   # define symbols used by this wrapper library.


fix tbb external

fix tbb external

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -180,19 +180,20 @@
       BUILD_BYPRODUCTS "<INSTALL_DIR>/${ADIOS2_LIB}"
       CMAKE_ARGS
         -DBUILD_SHARED_LIBS=OFF
-        -DBUILD_TESTING=OFF
+        -DADIOS2_BUILD_EXAMPLES=OFF
+        -DADIOS2_BUILD_TESTING=OFF
         -DCMAKE_POSITION_INDEPENDENT_CODE=ON
         -DADIOS2_USE_BZip2=OFF
         -DADIOS2_USE_Fortran=OFF
         -DADIOS2_USE_HDF5=OFF
         -DADIOS2_USE_PNG=OFF
+        -DADIOS2_USE_Profiling=OFF
         -DADIOS2_USE_Python=OFF
         -DADIOS2_USE_SST=OFF
         -DADIOS2_USE_SZ=OFF
         -DADIOS2_USE_SysVShMem=OFF
         -DADIOS2_USE_ZFP=OFF
         -DADIOS2_USE_ZeroMQ=OFF
-        -DADIOS2_USE_Profiling=OFF
         -DMPI_GUESS_LIBRARY_NAME=${MPI_GUESS_LIBRARY_NAME})

     add_external_library(adios2
@@ -815,7 +816,7 @@

     target_compile_definitions(spdlog INTERFACE SPDLOG_FMT_EXTERNAL;SPDLOG_COMPILED_LIB)

-  # oneTBB
+  # tbb
   elseif (NAME STREQUAL "tbb")
     if (TARGET tbb)
       return()
@@ -825,38 +826,26 @@
       set(EXTERNAL_EXE_LINKER_FLAGS "${EXTERNAL_EXE_LINKER_FLAGS} /NODEFAULTLIB:tbb12_debug.lib" CACHE STRING "" FORCE)
     endif ()

-    set(TBB_REPO "https://github.com/oneapi-src/oneTBB.git")
-    set(TBB_TAG "v2021.3.0")
-    set(TBB_ARGS "-DTBB_TEST=OFF")
-
-    if (WIN32)
-      set(TBB_LIB "${CMAKE_INSTALL_LIBDIR}/tbb12.lib")
-      set(TBB_DLL "bin/tbb12.dll")
-
-      add_external_project(tbb SHARED
-        GIT_REPOSITORY ${TBB_REPO}
-        GIT_TAG ${TBB_TAG}
-        CMAKE_ARGS ${TBB_ARGS}
-        BUILD_BYPRODUCTS "<INSTALL_DIR>/${TBB_DLL}" "<INSTALL_DIR>/${TBB_LIB}")
-      add_external_library(tbb
-        PROJECT tbb
-        LIBRARY "${TBB_DLL}"
-        IMPORT_LIBRARY "${TBB_LIB}")
-    else ()
-      # todo this is surely not portable, as always
-      set(TBB_LIB "${CMAKE_INSTALL_LIBDIR}/libtbb.so.12.3")
-
-      add_external_project(tbb SHARED
-        GIT_REPOSITORY ${TBB_REPO}
-        GIT_TAG ${TBB_TAG}
-        CMAKE_ARGS ${TBB_ARGS}
-        BUILD_BYPRODUCTS "<INSTALL_DIR>/${TBB_LIB}"
-        )
-      add_external_library(tbb
-        PROJECT tbb
-        LIBRARY "${TBB_LIB}"
-        )
-    endif ()
+    if (WIN32)
+      set(TBB_LIB "bin/tbb12.dll")
+      set(TBB_LIB_IMPORT "${CMAKE_INSTALL_LIBDIR}/tbb12.lib")
+    else ()
+      set(TBB_LIB "${CMAKE_INSTALL_LIBDIR}/libtbb.so.12")
+    endif ()
+
+    add_external_project(tbb SHARED
+      GIT_REPOSITORY https://github.com/oneapi-src/oneTBB.git
+      GIT_TAG v2021.3.0
+      CMAKE_ARGS
+        -DTBB_TEST=OFF
+      BUILD_BYPRODUCTS
+        "<INSTALL_DIR>/${TBB_LIB}"
+        "<INSTALL_DIR>/${TBB_LIB_IMPORT}")
+
+    add_external_library(tbb
+      PROJECT tbb
+      IMPORT_LIBRARY "${TBB_LIB_IMPORT}"
+      LIBRARY "${TBB_LIB}")

   # tinyobjloader
   elseif (NAME STREQUAL "tinyobjloader")


CMake: Fix false positive for Postgres 10+ check

We used to mistake 9.3.24 as a higher version than Postgres 10 and stop
matching it to the correct "port". This patch fixes that.

Closes #320

--- src/ports/postgres/cmake/PostgreSQLUtils.cmake
+++ src/ports/postgres/cmake/PostgreSQLUtils.cmake
@@ -83,7 +83,7 @@
                 endif()
             elseif(${PORT_UC} STREQUAL "POSTGRESQL" AND
                     (${${PORT_UC}_VERSION_MAJOR} EQUAL 10 OR
-                    ${${PORT_UC}_VERSION_PATCH} GREATER 10))
+                    ${${PORT_UC}_VERSION_MAJOR} GREATER 10))
                 # Starting Postgresql 10, semantic versioning will be followed,
                 # implying we only need 1 folder for same major versions
                 set(VERSION ${${PORT_UC}_VERSION_MAJOR})


ENH: Updating ITKGenericLabelInterpolator remote module

Updating remote repository to repository in InsightSoftwareConsortium
Github and updating version to compile and pass tests with current ITK
version.

https://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator/compare/b057e698644fcaa1f9f07882e3a2fcd5a0823a45...210c3e6eeece4875ac7d331460b3a4d2e4f6db60

Change-Id: Id3b3a2aa6ab5c3b4f52b10653f1476b096d7c1aa

--- Modules/Remote/GenericLabelInterpolator.remote.cmake
+++ Modules/Remote/GenericLabelInterpolator.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(GenericLabelInterpolator
   "A generic interpolator for multi-label images."
-  GIT_REPOSITORY ${git_protocol}://github.com/fbudin69500/ITKGenericLabelInterpolator.git
-  GIT_TAG b057e698644fcaa1f9f07882e3a2fcd5a0823a45
+  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator.git
+  GIT_TAG 210c3e6eeece4875ac7d331460b3a4d2e4f6db60
   )


[cmake] update src/config.h.cmake

[cmake] update src/config.h.cmake

--- src/config.h.cmake
+++ src/config.h.cmake
@@ -36,6 +36,7 @@

 /* XATTR */
 #cmakedefine HAVE_ATTR_ATTRIBUTES_H
+#cmakedefine HAVE_SYS_XATTR_H
 #cmakedefine HAVE_XATTR

 /* mySQL */
@@ -126,6 +127,7 @@
 #cmakedefine  HAVE_LSTAT
 #cmakedefine  HAVE_MADVISE
 #cmakedefine  HAVE_MEMCPY
+#cmakedefine  HAVE_MEMPCPY
 #cmakedefine  HAVE_MEMSET
 #cmakedefine  HAVE_MMAP
 #cmakedefine  HAVE_PATHCONF
@@ -144,12 +146,14 @@
 #cmakedefine  HAVE_SIGTIMEDWAIT
 #cmakedefine  HAVE_STRPTIME
 #cmakedefine  HAVE_SYSLOG
+#cmakedefine  HAVE_TIMEGM
 #cmakedefine  HAVE_WRITEV
 #cmakedefine  HAVE_INET_ATON
 #cmakedefine  HAVE_ISSETUGID
 #cmakedefine  HAVE_INET_PTON
 #cmakedefine  HAVE_MEMSET_S
 #cmakedefine  HAVE_EXPLICIT_BZERO
+#cmakedefine  HAVE_COPY_FILE_RANGE

 /* libcrypt */
 #cmakedefine  HAVE_CRYPT_H


add VAD_MetaMat

add VAD_MetaMat

--- VAD_MetaMat.cmake
+++ VAD_MetaMat.cmake
@@ -21,13 +21,20 @@
 function(vad_live)
   message("run VAD_LIVE for METAMAT")

+  vigra_add_dep(HDF5 REQUIRED LIVE)
+  vigra_add_dep(OpenCV REQUIRED LIVE)
+  vigra_add_dep(Boost REQUIRED LIVE)
+
   git_clone(MetaMat)

   add_subdirectory("${VAD_EXTERNAL_ROOT}/MetaMat" "${CMAKE_BINARY_DIR}/external/MetaMat")

   add_library(METAMAT::METAMAT INTERFACE IMPORTED)

-  set_target_properties(METAMAT::METAMAT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/external/MetaMat/include")
-  set_target_properties(METAMAT::METAMAT PROPERTIES INTERFACE_LINK_LIBRARIES cliini)

+  # FIXME shouldnt this be forwarded?
+  get_target_property(_MM_INC_DIRS metamat INTERFACE_INCLUDE_DIRECTORIES)
+
+  set_target_properties(METAMAT::METAMAT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/external/MetaMat/include;${_MM_INC_DIRS}")
+  set_target_properties(METAMAT::METAMAT PROPERTIES INTERFACE_LINK_LIBRARIES metamat)
 endfunction()


[Apple Silicon] Add arm64 macOS support to benchmark suite

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -105,7 +105,7 @@
 endmacro()

 macro(configure_sdks_darwin)
-  set(macosx_arch "x86_64")
+  set(macosx_arch "x86_64" "arm64")
   set(iphoneos_arch "arm64" "arm64e" "armv7")
   set(appletvos_arch "arm64")
   set(watchos_arch "armv7k")
@@ -609,11 +609,7 @@

   if(is_darwin)
     # If host == target.
-    if("${BENCH_COMPILE_ARCHOPTS_PLATFORM}" STREQUAL "macosx")
-      set(OUTPUT_EXEC "${benchmark-bin-dir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}")
-    else()
-      set(OUTPUT_EXEC "${benchmark-bin-dir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}-${target}")
-    endif()
+    set(OUTPUT_EXEC "${benchmark-bin-dir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}-${target}")
   else()
     # If we are on Linux, we do not support cross compiling.
     set(OUTPUT_EXEC "${benchmark-bin-dir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}")


Better hints to find openjpeg

Better hints to find openjpeg

--- src/cmake/modules/FindOpenJpeg.cmake
+++ src/cmake/modules/FindOpenJpeg.cmake
@@ -61,6 +61,7 @@
      /usr/local/include
      /usr/include/openjpeg
      /usr/include/openjpeg-1.5
+     /usr/local/include/openjpeg-1.5
      /usr/include
      /opt/local/include)


Mark the COG C compiler as advanced

Mark the COG C compiler as advanced

--- toolchain.cmake
+++ toolchain.cmake
@@ -40,6 +40,7 @@
 find_program( CMAKE_RANLIB          propeller-elf-ranlib )
 find_program( CMAKE_STRIP           propeller-elf-strip )

+mark_as_advanced( CMAKE_COGC_COMPILER )
 mark_as_advanced( CMAKE_COGCXX_COMPILER )

 # locate load tools


iox-#556 disable introspection client by default

Signed-off-by: Dietrich Krönke <ea45bc0219d3b6c3a6b9cf3abdfa172e6bfa16ff@apex.ai>

--- iceoryx_meta/build_options.cmake
+++ iceoryx_meta/build_options.cmake
@@ -25,7 +25,7 @@
 option(BUILD_DOC "Build and generate documentation" OFF)
 option(COVERAGE "Build iceoryx with gcov flags" OFF)
 option(EXAMPLES "Build all iceoryx examples" OFF)
-option(INTROSPECTION "Builds the introspection client which requires the ncurses library with an activated terminfo feature" ON)
+option(INTROSPECTION "Builds the introspection client which requires the ncurses library with an activated terminfo feature" OFF)
 option(DDS_GATEWAY "Builds the iceoryx dds gateway - enables internode communication via dds" OFF)
 option(BINDING_C "Builds the C language bindings" ON)
 option(SANITIZE "Build with sanitizers" OFF)


ctkMacroBuildLib - Link against PythonQt, Python and VTK if the lib embeds PythonQt decorator

--- CMake/ctkMacroBuildLib.cmake
+++ CMake/ctkMacroBuildLib.cmake
@@ -100,6 +100,24 @@
     ${MY_MOC_CPP}
     ${MY_UI_CPP}
     )
+
+  # Since the PythonQt decorator depends on PythonQt, Python and VTK, let's link against
+  # these ones to avoid complaints of MSVC
+  # Note: "LINK_DIRECTORIES" has to be invoked before "ADD_LIBRARY"
+  SET(my_EXTRA_PYTHON_LIBRARIES)
+  IF(CTK_WRAP_PYTHONQT_LIGHT AND NOT ${MY_DISABLE_WRAP_PYTHONQT})
+    # Does a header having the expected filename exists ?
+    STRING(REGEX REPLACE "^CTK" "ctk" lib_name_lc_ctk ${lib_name})
+    SET(decorator_header_filename ${lib_name_lc_ctk}PythonQtDecorator.h)
+    IF(EXISTS ${decorator_header_filename})
+      LIST(APPEND my_EXTRA_PYTHON_LIBRARIES ${PYTHON_LIBRARY} ${PYTHONQT_LIBRARIES})
+      # Should we link against VTK
+      IF(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
+        LINK_DIRECTORIES(${VTK_LIBRARY_DIRS})
+        LIST(APPEND my_EXTRA_PYTHON_LIBRARIES vtkCommon vtkPythonCore)
+      ENDIF()
+    ENDIF()
+  ENDIF()

   ADD_LIBRARY(${lib_name} ${MY_LIBRARY_TYPE}
     ${MY_SRCS}
@@ -127,12 +145,13 @@
   SET(my_libs
     ${MY_TARGET_LIBRARIES}
     )
-
+
   IF(MINGW)
     LIST(APPEND my_libs ssp) # add stack smash protection lib
   ENDIF(MINGW)
-
-  TARGET_LINK_LIBRARIES(${lib_name} ${my_libs})
+
+  # See above for definition of my_EXTRA_PYTHON_LIBRARIES
+  TARGET_LINK_LIBRARIES(${lib_name} ${my_libs} ${my_EXTRA_PYTHON_LIBRARIES})

   # Update CTK_BASE_LIBRARIES
   SET(CTK_BASE_LIBRARIES ${my_libs} ${lib_name} CACHE INTERNAL "CTK base libraries" FORCE)


BabylonAddLibrary.cmake Correct windows build

--- cmake/BabylonAddLibrary.cmake
+++ cmake/BabylonAddLibrary.cmake
@@ -48,7 +48,9 @@
     babylon_target_clang_tidy(${TARGET})

     # Enable backward-cpp stack trace for linux
-    add_backward(${TARGET})
+    if(UNIX AND NOT APPLE)
+        add_backward(${TARGET})
+    endif()
 endfunction()


Another typo in comment inside OpenNI2 cmake file

--- cmake/OpenCVFindOpenNI2.cmake
+++ cmake/OpenCVFindOpenNI2.cmake
@@ -27,7 +27,7 @@

 if(OPENNI2_LIBRARY AND OPENNI2_INCLUDES)
     set(HAVE_OPENNI2 TRUE)
-endif() #if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
+endif() #if(OPENNI2_LIBRARY AND OPENNI2_INCLUDES)

 get_filename_component(OPENNI2_LIB_DIR "${OPENNI2_LIBRARY}" PATH)
 get_filename_component(OPENNI2_INCLUDE_DIR ${OPENNI2_INCLUDES} PATH)


fix(android): fix processor count detection to be cross-platform

--- cmake/Toolchain-Android.cmake
+++ cmake/Toolchain-Android.cmake
@@ -1,4 +1,5 @@
 cmake_minimum_required (VERSION 3.2)
+include(ProcessorCount)

 set(CMAKE_SYSTEM_NAME Android)

@@ -6,4 +7,4 @@
 set(CMAKE_GENERATOR_TOOLSET DefaultClang)

 # Make sure we use all our processors when building
-set(CMAKE_ANDROID_PROCESS_MAX $ENV{NUMBER_OF_PROCESSORS})
+ProcessorCount(CMAKE_ANDROID_PROCESS_MAX)


Attempt to fix clang-cmake-mips after r268977.

I think it's wiped out the build area and fully-reconfigured for the first time
since r268977. This seems to have caused Mips64 to become enabled when it wasn't
before because compiling with -mabi=64 succeeds but linking with -mabi=64 fails.

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

--- cmake/builtin-config-ix.cmake
+++ cmake/builtin-config-ix.cmake
@@ -2,6 +2,12 @@

 # Make all the tests only check the compiler
 set(TEST_COMPILE_ONLY On)
+# Temporary fix for Mips buildbots this broke. It's the linker that rejects
+# inappropriate multilibs on this system.
+check_compile_definition("__mips__" "" IS_MIPS_HOST)
+if(IS_MIPS_HOST)
+  set(TEST_COMPILE_ONLY OFF)
+endif()

 builtin_check_c_compiler_flag(-fPIC                 COMPILER_RT_HAS_FPIC_FLAG)
 builtin_check_c_compiler_flag(-fPIE                 COMPILER_RT_HAS_FPIE_FLAG)


[CMake] Document CMAKE_OSX_DEPLOYMENT_TARGET requirements

--- cmake/compiler-versions.cmake
+++ cmake/compiler-versions.cmake
@@ -38,6 +38,9 @@
 endif()
 if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0.1)
   message(FATAL_ERROR "XCode (Apple clang) C++ compiler version ${CMAKE_CXX_COMPILER_VERSION} is too old. Need version 10.0.1+ (XCode 10.3+)")
+endif()
+if(CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.7)
+  message(FATAL_ERROR "Can not target OSX version ${CMAKE_OSX_DEPLOYMENT_TARGET}, which is older than 10.7")
 endif()

 if(WITH_OPENMP)
@@ -89,3 +92,7 @@
 if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0.0)
   message(WARNING "XCode (Apple clang) C++ compiler version ${CMAKE_CXX_COMPILER_VERSION} support is soft-deprecated and will be removed in the future. XCode version 12.0+ is recommended.")
 endif()
+
+if(CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.14)
+  message(WARNING "Targeting OSX version ${CMAKE_OSX_DEPLOYMENT_TARGET} older than 10.14 is deprecated")
+endif()


Fix for ROOT-6837 (AliEn cmake include variable and Installation instructions)

--- cmake/modules/FindAlien.cmake
+++ cmake/modules/FindAlien.cmake
@@ -11,7 +11,7 @@
   set(ALIEN_FIND_QUIETLY TRUE)
 endif()

-find_path(ALIEN_INCLUDE_DIR gapiUI.h
+find_path(ALIEN_INCLUDE_DIR gapiUI.h PATHS
   ${ALIEN_DIR}/include $ENV{ALIEN_DIR}/include
   /usr/local/include
   /opt/alien/api/include


Add evil hack to workaround the missing libdl.a in the Android toolchain.

Reviewers: vharron, ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

Differential Revision: http://reviews.llvm.org/D11321

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

--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -119,6 +119,25 @@
 set( ANDROID_CXX_FLAGS    "${ANDROID_CXX_FLAGS} -fdata-sections -ffunction-sections" )
 set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--gc-sections" )

+################# BEGIN EVIL HACK ##################
+# lldb-server links against libdl even though it's not being used and
+# libdl.a is currently missing from the toolchain (b.android.com/178517).
+# Therefore, in order to statically link lldb-server, we need a temporary
+# workaround. This creates a dummy libdl.a stub until the actual
+# libdl.a can be implemented in the toolchain.
+set( ANDROID_LIBDL_STUB "${CMAKE_BINARY_DIR}/libdl_stub" )
+file( MAKE_DIRECTORY ${ANDROID_LIBDL_STUB} )
+file( WRITE "${ANDROID_LIBDL_STUB}/libdl.c" "
+#include <dlfcn.h>
+void *       dlopen  (const char *filename, int flag)   { return 0; }
+const char * dlerror (void)                             { return 0; }
+void *       dlsym   (void *handle, const char *symbol) { return 0; }
+int          dlclose (void *handle)                     { return 0; }")
+execute_process( COMMAND ${CMAKE_C_COMPILER} -c ${ANDROID_LIBDL_STUB}/libdl.c -o ${ANDROID_LIBDL_STUB}/libdl.o )
+execute_process( COMMAND ${CMAKE_AR} rcs ${ANDROID_LIBDL_STUB}/libdl.a ${ANDROID_LIBDL_STUB}/libdl.o )
+set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -L${ANDROID_LIBDL_STUB}" )
+################# END EVIL HACK ##################
+
 # cache flags
 set( CMAKE_CXX_FLAGS           ""                        CACHE STRING "c++ flags" )
 set( CMAKE_C_FLAGS             ""                        CACHE STRING "c flags" )


ilastik.cmake: On Mac OS, rename the drtile.dylib library to drtile.so, since Python seems to insist on that name.

--- ilastik.cmake
+++ ilastik.cmake
@@ -49,7 +49,9 @@
             -DPYTHON_NUMPY_INCLUDE_DIR=${PYTHON_PREFIX}/lib/python2.7/site-packages/numpy/core/include
             -DVIGRA_NUMPY_CORE_LIBRARY=${PYTHON_PREFIX}/lib/python2.7/site-packages/vigra/vigranumpycore.so
             ${ilastik_SRC_DIR}/lazyflow/lazyflow/drtile
-        BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
+        # For some reason, python refuses to recognize the shared library unless it ends with .so.
+        # Renaming it seems to do the trick
+        BUILD_COMMAND       ${BUILDEM_ENV_STRING} make && mv ${ilastik_SRC_DIR}/lazyflow/lazyflow/drtile/drtile.dylib ${ilastik_SRC_DIR}/lazyflow/lazyflow/drtile/drtile.so
         TEST_COMMAND        ${BUILDEM_DIR}/bin/ilastik_headless_test
         INSTALL_COMMAND     ""
     )


Fix inclusion and linking of tbb on VC9.

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -104,10 +104,18 @@
         link_directories(${OGRE_DIR}/lib)
         if (WIN32)
             include_directories(${OGRE_DIR}/include/OGRE/RenderSystems/Direct3D9)
+            if (MSVC90 AND TUNDRA_NO_BOOST) # TODO VC10 doesn't need this, investigate why
+            # Hackish, use TBB_HOME instead
+                include_directories(${OGRE_DIR}/../Dependencies/tbb/include)
+            endif()
             # Note: VC9 uses $(ConfigurationName), but #VC10 and onwards uses $(Configuration).
-            # However VC10 seems to able to $(ConfigurationName) also, so use that.
+            # However VC10 seems to be able to understand $(ConfigurationName) also, so use that.
             link_directories(${OGRE_DIR}/lib/$(ConfigurationName))
             link_directories(${OGRE_DIR}/lib/$(ConfigurationName)/opt)
+            if (MSVC90 AND TUNDRA_NO_BOOST) # TODO VC10 doesn't need this, investigate why
+            # Hackish, use TBB_HOME instead
+                link_directories(${OGRE_DIR}/../Dependencies/tbb/lib/ia32/vc9)
+            endif()
         endif()
         message(STATUS "Using Ogre from SDK directory " ${OGRE_DIR})
     else()


Force linking with libdl (required for JIT compiler) under linux.

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

--- cmake/gismoUse.cmake
+++ cmake/gismoUse.cmake
@@ -28,6 +28,9 @@
     #message(STATUS "exec (pure template): ${FNAME}")
     add_executable(${FNAME} ${FILE} ${gismo_SOURCES} ${gismo_EXTENSIONS})
     target_link_libraries(${FNAME} gismo_static)
+    if(UNIX AND NOT APPLE)
+    	target_link_libraries(${FNAME} dl)
+    endif(UNIX AND NOT APPLE)
     # Allow CMake to follow dependencies on hpp files
     set_property(TARGET ${FNAME} PROPERTY
     IMPLICIT_DEPENDS_INCLUDE_TRANSFORM "GISMO_HPP_HEADER(%)=\"%\"")
@@ -44,6 +47,9 @@
     if (GISMO_BUILD_COVERAGE)
       target_link_libraries(${FNAME} gcov)
     endif(GISMO_BUILD_COVERAGE)
+    if(UNIX AND NOT APPLE)
+    	target_link_libraries(${FNAME} dl)
+    endif(UNIX AND NOT APPLE)
 	#set_property(TARGET ${FNAME} PROPERTY FOLDER "tests-gismo")
 endmacro(add_gismo_shared_executable)

@@ -54,6 +60,9 @@
     #message(STATUS "exec (statically linked): ${FNAME}")
     add_executable(${FNAME} ${FILE})
     target_link_libraries(${FNAME} gismo_static)
+    if(UNIX AND NOT APPLE)
+    	target_link_libraries(${FNAME} dl)
+    endif(UNIX AND NOT APPLE)
 endmacro(add_gismo_static_executable)

 macro(mark_gismo_optional FILE)


Allow the Qt directory to be set from the command line.

--- cmake/setup_qt.cmake
+++ cmake/setup_qt.cmake
@@ -1,11 +1,13 @@
 # Prepare everything for using FindQt5 and building a Qt5 target.
 macro(setup_qt)
-    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-        # Search for 64bit Qt
-        set(QT_ROOT $ENV{QT_ROOT_64})
-    else()
-        # Search for 32bit Qt
-        set(QT_ROOT $ENV{QT_ROOT_32})
+    if(NOT QT_ROOT)
+        if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+            # Search for 64bit Qt
+            set(QT_ROOT $ENV{QT_ROOT_64})
+        else()
+            # Search for 32bit Qt
+            set(QT_ROOT $ENV{QT_ROOT_32})
+        endif()
     endif()

     list(APPEND CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake/Qt5)


Add warning if gcc version > 8.2(#25635)

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -8,6 +8,8 @@
     if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
         if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8)
             message(FATAL_ERROR "Unsupported GCC version. GCC >= 4.8 required.")
+        elseif(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 8.2)
+            message(WARNING "Found GCC ${CMAKE_CXX_COMPILER_VERSION} which is too high, recommended to use GCC 8.2")
         endif()
     elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
         # cmake >= 3.0 compiler id "AppleClang" on Mac OS X, otherwise "Clang"


Add ARM64X forwarder libs

Add ARM64X forwarder libs

--- cmake/winml.cmake
+++ cmake/winml.cmake
@@ -828,3 +828,31 @@
 # However, there are no cuda imports in winml_dll, and the linker throws the 4199 warning.
 # This is needed to allow winml_dll build with cuda enabled.
 target_link_options(winml_dll PRIVATE /ignore:4199)
+
+if (winml_is_inbox)
+  # Link *_x64/*_arm64 DLLs for the ARM64X forwarder
+  function(duplicate_shared_library target new_target)
+    get_target_property(sources ${target} SOURCES)
+    get_target_property(compile_definitions ${target} COMPILE_DEFINITIONS)
+    get_target_property(compile_options ${target} COMPILE_OPTIONS)
+    get_target_property(include_directories ${target} INCLUDE_DIRECTORIES)
+    get_target_property(link_libraries ${target} LINK_LIBRARIES)
+
+    add_library(${new_target} SHARED ${sources})
+    add_dependencies(${target} ${new_target})
+    target_compile_definitions(${new_target} PRIVATE ${compile_definitions})
+    target_compile_options(${new_target} PRIVATE ${compile_options})
+    target_include_directories(${new_target} PRIVATE ${include_directories})
+    target_link_libraries(${new_target} PRIVATE ${link_libraries})
+  endfunction()
+  if (WAI_ARCH STREQUAL x64 OR WAI_ARCH STREQUAL arm64)
+    if (TARGET winml_dll)
+      duplicate_shared_library(winml_dll Windows_ai_machinelearning_${WAI_ARCH})
+      target_compile_features(Windows_ai_machinelearning_${WAI_ARCH} PRIVATE cxx_std_17)
+      target_precompiled_header(Windows_ai_machinelearning_${WAI_ARCH} pch.h)
+    endif()
+    if (TARGET onnxruntime)
+      duplicate_shared_library(onnxruntime onnxruntime_${WAI_ARCH})
+    endif()
+  endif()
+endif()


Bump WSREP_PATCH_VERSION in cmake/wsrep.cmake to 13

--- cmake/wsrep.cmake
+++ cmake/wsrep.cmake
@@ -18,7 +18,7 @@
 # so WSREP_VERSION is produced regardless

 # Set the patch version
-SET(WSREP_PATCH_VERSION "12")
+SET(WSREP_PATCH_VERSION "13")

 # MariaDB addition: Revision number of the last revision merged from
 # codership branch visible in @@visible_comment.


BUG: Restored ctest_update() in SuperBuild, hoping to have specified CTEST_SOURCE_DIRECTORY correctly by now.

Based upon a suggestion by Matt McCormick, "Re: [SuperElastix] Dashboard questions", Tue Feb 20, 2018.

--- SuperBuild/CTest.cmake
+++ SuperBuild/CTest.cmake
@@ -18,7 +18,7 @@
 #=========================================================================

 # Directories relative to the build directory.
-set(CTEST_SOURCE_DIRECTORY "../src/SuperBuild")
+set(CTEST_SOURCE_DIRECTORY "../src")
 set(CTEST_BINARY_DIRECTORY ".")

 set(CTEST_SITE "lkeb-selx01")
@@ -45,10 +45,11 @@
 set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} --build ${CTEST_BINARY_DIRECTORY}")
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DWITH_TESTING:BOOL=ON ${CTEST_BUILD_OPTIONS}")
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"-G${CTEST_CMAKE_GENERATOR}\"")
-set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
+set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"/SuperBuild")

 ctest_start("Nightly")
-# TODO Add ctest_update() to ensure that the commit SHA will be passed to CDash, and GitHub.
+# Added ctest_update() to ensure that the commit SHA will be passed to CDash, and GitHub.
+ctest_update()
 ctest_configure()
 ctest_build()
 ctest_submit( PARTS Configure Build )


Use new tile type filter for place delay matrix computation.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- xc7/make/device_define.cmake
+++ xc7/make/device_define.cmake
@@ -165,6 +165,7 @@
         --route_chan_width 500
         --astar_fac 0.75
         --bb_factor 100
+        --allowed_tiles_for_delay_model BLK-TL-SLICEL,BLK-TL-SLICEM
       )

     get_target_property_required(PYTHON3 env PYTHON3)


FindMPI: convert to a safer path representation.

Fixes up concatenation which makes a '\;' and breaks the list.

Change-Id: Ic075580255135f7722d96f33a1bccc24071a6a82

--- CMake/FindMPI.cmake
+++ CMake/FindMPI.cmake
@@ -151,7 +151,9 @@
 set(_MPI_PREFIX_PATH)
 if(WIN32)
   # MSMPI
-  list(APPEND _MPI_PREFIX_PATH "$ENV{MSMPI_BIN}")
+  file(TO_CMAKE_PATH "$ENV{MSMPI_BIN}" msmpi_bin_path) # The default path ends with a '\' and doesn't mix with ';' when appending.
+  list(APPEND _MPI_PREFIX_PATH "${msmpi_bin_path}")
+  unset(msmpi_bin_path)
   list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin")
   list(APPEND _MPI_PREFIX_PATH "$ENV{MSMPI_INC}/..") # The SDK is installed separately from the runtime
   # MPICH


Add support for generated CSharp files with full paths

Change-Id: I7ca9a47ad57658c8ef5aa1d25c7ba5502bedbb14

--- CMake/UseCSharp.cmake
+++ CMake/UseCSharp.cmake
@@ -76,6 +76,9 @@
         FILE( GLOB it_glob ${it} )
         list( APPEND sources ${it} )
         list( APPEND sources_dep ${it_glob} )
+      elseif( IS_ABSOLUTE ${it} )
+        list( APPEND sources ${it} )
+        list( APPEND sources_dep ${it} )
       endif( )
     endif ( )
   endforeach( )


Disable an additional warning on windows

Summary:
It's spammy and is just informational.

Created from Diffusion's 'Open in Editor' feature.

Reviewed By: yfeldblum

Differential Revision: D16886741

fbshipit-source-id: 29aecb8a62cac9a60cbc4cabc596fd1ee00cfc04

--- CMake/FollyCompilerMSVC.cmake
+++ CMake/FollyCompilerMSVC.cmake
@@ -203,6 +203,7 @@
       /wd4435 # Object layout under /vd2 will change due to virtual base.
       /wd4514 # Unreferenced inline function has been removed. (caused by /Zc:inline)
       /wd4548 # Expression before comma has no effect. I wouldn't disable this normally, but malloc.h triggers this warning.
+      /wd4571 # Semantics of catch(...) changed in VC 7.1
       /wd4574 # ifdef'd macro was defined to 0.
       /wd4582 # Constructor is not implicitly called.
       /wd4583 # Destructor is not implicitly called.


BUG: Set runtime output path for external module binaries

Addresses crashing test driver on Windows with shared libraries.

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -49,6 +49,11 @@
   set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ITK_BINARY_DIR}/lib CACHE PATH "Shared library directory")
 else()
   set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE PATH "Shared library directory")
+endif()
+if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+  set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ITK_BINARY_DIR}/bin CACHE PATH "Shared library directory")
+else()
+  set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} CACHE PATH "Shared library directory")
 endif()

 if(ITK_WRAPPING)
@@ -80,6 +85,7 @@
     # of allowing only a single element int the CMAKE_CONFIGURATION_TYPES and enforcing
     # that CMAKE_BUILD_TYPE match that type (see Wrapping/CMakeLists.txt enforcement)
     set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "$<1:${ITK_PYTHON_PACKAGE_DIR}>" CACHE PATH "Shared library directory with generator override")
+    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "$<1:${ITK_PYTHON_PACKAGE_DIR}>" CACHE PATH "Shared library directory with generator override")
   endif()
 else()
   set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY}   CACHE PATH "Shared library directory")
@@ -88,6 +94,7 @@

 if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
   set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${ITK_DIR}/lib CACHE PATH "Static library install directory")
+  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY}   CACHE PATH "Runtime library directory")
 endif()

 # ITK installation structure


fixed: insert dummy lib if debug support lib is not available

--- CMake/OSGBuildFunctions.cmake
+++ CMake/OSGBuildFunctions.cmake
@@ -2485,16 +2485,42 @@
       GET_FILENAME_COMPONENT(OSG_TMP_LIB_DIR ${${NEW_LIB}_DEBUG} PATH)
   ENDIF(NOT OSG_TMP_LIB_DIR AND ${NEW_LIB}_DEBUG)

-
-  SET_TARGET_PROPERTIES(OSG_${NEW_LIB}_TARGET PROPERTIES
-                        IMPORTED_IMPLIB_RELEASE ${${NEW_LIB}_RELEASE}
-                        IMPORTED_LOCATION_RELEASE ${OSG_TMP_LIB_DIR}
-                        IMPORTED_IMPLIB_RELEASENOOPT ${${NEW_LIB}_RELEASE}
-                        IMPORTED_LOCATION_RELEASENOOPT ${OSG_TMP_LIB_DIR}
-                        IMPORTED_IMPLIB_DEBUG ${${NEW_LIB}_DEBUG}
-                        IMPORTED_LOCATION_DEBUG ${OSG_TMP_LIB_DIR}
-                        IMPORTED_IMPLIB_DEBUGOPT ${${NEW_LIB}_DEBUG}
-                        IMPORTED_LOCATION_DEBUGOPT ${OSG_TMP_LIB_DIR})
+  IF(NOT ${NEW_LIB}_DEBUG)
+    MESSAGE("  warning not debug lib for ${NEW_LIB}")
+
+    IF(NOT EXISTS "${CMAKE_BINARY_DIR}/osgDummyLinkLib.c")
+      FILE(WRITE "${CMAKE_BINARY_DIR}/osgDummyLinkLib.c" "")
+    ENDIF()
+
+    IF(NOT TARGET OSGDummyLinkLib)
+      ADD_LIBRARY(OSGDummyLinkLib STATIC osgDummyLinkLib.c)
+    ENDIF()
+
+    SET_TARGET_PROPERTIES(OSG_${NEW_LIB}_TARGET PROPERTIES
+                          IMPORTED_IMPLIB_RELEASE ${${NEW_LIB}_RELEASE}
+                          IMPORTED_LOCATION_RELEASE ${OSG_TMP_LIB_DIR}
+                          IMPORTED_IMPLIB_RELEASENOOPT ${${NEW_LIB}_RELEASE}
+                          IMPORTED_LOCATION_RELEASENOOPT ${OSG_TMP_LIB_DIR}
+                          IMPORTED_IMPLIB_DEBUG "${CMAKE_BINARY_DIR}/bin/Debug/OSGDummyLinkLib.lib"
+                          IMPORTED_LOCATION_DEBUG "${CMAKE_BINARY_DIR}/bin/Debug"
+                          IMPORTED_IMPLIB_DEBUGOPT "${CMAKE_BINARY_DIR}/bin/Debug/OSGDummyLinkLib.lib"
+                          IMPORTED_LOCATION_DEBUGOPT "${CMAKE_BINARY_DIR}/bin/Debug")
+
+      ADD_DEPENDENCIES(OSG_${NEW_LIB}_TARGET OSGDummyLinkLib)
+
+  ELSE()
+
+    SET_TARGET_PROPERTIES(OSG_${NEW_LIB}_TARGET PROPERTIES
+                          IMPORTED_IMPLIB_RELEASE ${${NEW_LIB}_RELEASE}
+                          IMPORTED_LOCATION_RELEASE ${OSG_TMP_LIB_DIR}
+                          IMPORTED_IMPLIB_RELEASENOOPT ${${NEW_LIB}_RELEASE}
+                          IMPORTED_LOCATION_RELEASENOOPT ${OSG_TMP_LIB_DIR}
+                          IMPORTED_IMPLIB_DEBUG ${${NEW_LIB}_DEBUG}
+                          IMPORTED_LOCATION_DEBUG ${OSG_TMP_LIB_DIR}
+                          IMPORTED_IMPLIB_DEBUGOPT ${${NEW_LIB}_DEBUG}
+                          IMPORTED_LOCATION_DEBUGOPT ${OSG_TMP_LIB_DIR})
+  ENDIF()
+

 ENDFUNCTION(OSG_SETUP_IMPORT_LIB_WINDOWS)


using new hash

using new hash

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag e33e2f66) # first 8 characters of hash-tag
+  set(revision_tag 2ffa73f0) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Some systems need PYTHON_INCLUDE_DIR2 for FindPythonLibs.cmake.

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -89,6 +89,7 @@
       ${ep_common_cache_args}
       -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
       -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
+      -DPYTHON_INCLUDE_DIR2:PATH=${PYTHON_INCLUDE_DIR2}
       -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}
       ${ep_PythonQt_args}
     DEPENDS
@@ -107,6 +108,7 @@
     PYTHONQT_INSTALL_DIR:PATH
     PYTHON_EXECUTABLE:FILEPATH # FindPythonInterp expects PYTHON_EXECUTABLE variable to be defined
     PYTHON_INCLUDE_DIR:PATH # FindPythonQt expects PYTHON_INCLUDE_DIR variable to be defined
+    PYTHON_INCLUDE_DIR2:PATH
     PYTHON_LIBRARY:FILEPATH # FindPythonQt expects PYTHON_LIBRARY variable to be defined
   LABELS "FIND_PACKAGE_VARS"
   )


cmake modules: add COREFOUNDATION

cmake modules: add COREFOUNDATION

Change-Id: I843d644756e41fa3a41f8324da9d8811c1fc346e
Reviewed-on: http://gerrit.aldebaran.lan/57206
Tested-by: gerrit
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>


Use DEPENDENTS for forcing flash prefetch option when HPRE != 1


CodeGenerator: Remove unecessary dependency

Change-Id: I95bbf74c2a96d4433e312beeed9c88dad83ae013

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -460,7 +460,6 @@

   add_dependencies(${VALUE_CODE_IMPLEMENTATION_LIB}impl
     ${VALUE_CODE_IMPLEMENTATION_LIB}interface
-    ${VALUE_CODE_IMPLEMENTATION_LIB}gstreamer
   )

   target_link_libraries (${VALUE_CODE_IMPLEMENTATION_LIB}impl


added THRUST_IGNORE_DEPRECATED_CPP_DIALECT to remove warning when using intel compiler

--- CMake/GOMCCUDASetup.cmake
+++ CMake/GOMCCUDASetup.cmake
@@ -7,13 +7,13 @@

 include_directories(src/GPU)

-set(GPU_NPT_flags "-DENSEMBLE=4 -DGOMC_CUDA")
+set(GPU_NPT_flags "-DENSEMBLE=4 -DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT")
 set(GPU_NPT_name "GOMC_GPU_NPT")
-set(GPU_GC_flags "-DENSEMBLE=3 -DGOMC_CUDA")
+set(GPU_GC_flags "-DENSEMBLE=3 -DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT")
 set(GPU_GC_name "GOMC_GPU_GCMC")
-set(GPU_GE_flags "-DENSEMBLE=2 -DGOMC_CUDA")
+set(GPU_GE_flags "-DENSEMBLE=2 -DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT")
 set(GPU_GE_name "GOMC_GPU_GEMC")
-set(GPU_NVT_flags "-DENSEMBLE=1 -DGOMC_CUDA")
+set(GPU_NVT_flags "-DENSEMBLE=1 -DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT")
 set(GPU_NVT_name "GOMC_GPU_NVT")

 set(CMAKE_CUDA_STANDARD 14)


Changed temporary link to SOFA tarball to official MITK thirdparty link.

--- CMakeExternals/SOFA.cmake
+++ CMakeExternals/SOFA.cmake
@@ -41,7 +41,7 @@
       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
-      URL http://dl.dropboxusercontent.com/u/5822501/SOFA-rev${rev}.tar.gz
+      URL http://mitk.org/download/thirdparty/SOFA-rev${rev}.tar.gz
       URL_MD5 ff65b2813dcc27755844f95cb0392bcf
       PATCH_COMMAND ${SOFA_PATCH_COMMAND}
       INSTALL_COMMAND ""


fix: linux resource copying (for me)

fix: linux resource copying (for me)

--- toolchains/linux.cmake
+++ toolchains/linux.cmake
@@ -29,7 +29,12 @@

     add_executable(${EXECUTABLE_NAME} ${SOURCES})

-    add_custom_command(TARGET tangram POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
-                       ${PROJECT_SOURCE_DIR}/core/resources $<TARGET_FILE_DIR:tangram>)
+    add_custom_command(TARGET tangram POST_BUILD COMMAND
+      COMMAND ${CMAKE_COMMAND} -E echo "Copying data..."
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/core/resources/shaders $<TARGET_FILE_DIR:tangram>/shaders
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/core/resources/img $<TARGET_FILE_DIR:tangram>/img
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/core/resources/fonts $<TARGET_FILE_DIR:tangram>/fonts
+      COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/core/resources/scene.yaml $<TARGET_FILE_DIR:tangram>
+    )

 endfunction()


Find also debug libraries in find script (fixes #56)

--- glow-config.cmake
+++ glow-config.cmake
@@ -1,8 +1,8 @@

 # GLOW_FOUND
 # GLOW_INCLUDE_DIR
+
 # GLOW_LIBRARY
-
 # GLOW_UTILS_LIBRARY
 # GLOW_WINDOW_LIBRARY

@@ -29,26 +29,97 @@
 	/opt/local/lib64
 )

-find_library(GLOW_LIBRARY
-	NAMES glow
-	PATHS ${LIB_PATHS}
-	DOC "The glow library")
+if (CMAKE_BUILD_TYPE STREQUAL "Release")
+	find_library(GLOW_LIBRARY
+		NAMES glow
+		PATHS ${LIB_PATHS}
+		DOC "The glow library")
+
+	find_library(GLOW_UTILS_LIBRARY
+		NAMES glowutils
+		PATHS ${LIB_PATHS}
+		DOC "The glowutils library")
+
+	find_library(GLOW_WINDOW_LIBRARY
+		NAMES glowwindow
+		PATHS ${LIB_PATHS}
+		DOC "The glowwindow library")
+
+	if (NOT GLOW_LIBRARY)
+		message(STATUS "glow release library requested but not found, search for debug version.")
+		find_library(GLOW_LIBRARY
+			NAMES glowd
+			PATHS ${LIB_PATHS}
+			DOC "The glow debug library")
+	endif()
+
+	if (NOT GLOW_UTILS_LIBRARY)
+		message(STATUS "glowutils release library requested but not found, search for debug version.")
+		find_library(GLOW_UTILS_LIBRARY
+			NAMES glowutilsd
+			PATHS ${LIB_PATHS}
+			DOC "The glowutils debug library")
+	endif()
+
+	if (NOT GLOW_WINDOW_LIBRARY)
+		message(STATUS "glowwindow release library requested but not found, search for debug version.")
+		find_library(GLOW_WINDOW_LIBRARY
+			NAMES glowwindowd
+			PATHS ${LIB_PATHS}
+			DOC "The glowwindow debug library")
+	endif()
+else()
+	find_library(GLOW_LIBRARY
+		NAMES glowd
+		PATHS ${LIB_PATHS}
+		DOC "The glow debug library")
+
+	find_library(GLOW_UTILS_LIBRARY
+		NAMES glowutilsd
+		PATHS ${LIB_PATHS}
+		DOC "The glowutils debug library")

-find_library(GLOW_UTILS_LIBRARY
-	NAMES glowutils
-	PATHS ${LIB_PATHS}
-	DOC "The glowutils library")
+	find_library(GLOW_WINDOW_LIBRARY
+		NAMES glowwindowd
+		PATHS ${LIB_PATHS}
+		DOC "The glowwindow debug library")
+
+	if (GLOW_LIBRARY)
+		message(STATUS "Using debug version of glow")
+	else()
+		message(STATUS "glow debug library requested but not found, search for release version.")
+		find_library(GLOW_LIBRARY
+			NAMES glow
+			PATHS ${LIB_PATHS}
+			DOC "The glow library")
+	endif()
+
+	if (GLOW_UTILS_LIBRARY)
+		message(STATUS "Using debug version of glowutils")
+	else()
+		message(STATUS "glowutils debug library requested but not found, search for release version.")
+		find_library(GLOW_UTILS_LIBRARY
+			NAMES glowutils
+			PATHS ${LIB_PATHS}
+			DOC "The glowutils library")
+	endif()
+
+	if (GLOW_WINDOW_LIBRARY)
+		message(STATUS "Using debug version of glowwindow")
+	else()
+		message(STATUS "glowwindow debug library requested but not found, search for release version.")
+		find_library(GLOW_WINDOW_LIBRARY
+			NAMES glowwindow
+			PATHS ${LIB_PATHS}
+			DOC "The glowwindow library")
+	endif()
+endif()

-find_library(GLOW_WINDOW_LIBRARY
-	NAMES glowwindow
-	PATHS ${LIB_PATHS}
-	DOC "The glowwindow library")
+if(GLOW_INCLUDE_DIR AND GLOW_LIBRARY)
+    set(GLOW_FOUND 1 CACHE STRING "Set to 1 if glow is found, 0 otherwise")
+else()
+    set(GLOW_FOUND 0 CACHE STRING "Set to 1 if glow is found, 0 otherwise")
+    message(WARNING "Note: an envvar like GLOW_DIR assists this script to locate glow.")
+endif()

-IF(GLOW_INCLUDE_DIR AND GLOW_LIBRARY)
-    SET(GLOW_FOUND 1 CACHE STRING "Set to 1 if glow is found, 0 otherwise")
-ELSE()
-    SET(GLOW_FOUND 0 CACHE STRING "Set to 1 if glow is found, 0 otherwise")
-    MESSAGE(WARNING "Note: an envvar like GLOW_DIR assists this script to locate glow.")
-ENDIF()
-
-MARK_AS_ADVANCED(GLOW_FOUND)
+mark_as_advanced(GLOW_FOUND)


document arguments to test macros

document arguments to test macros

Change-Id: I1a57355fe31361b3ce0fe64fac2bd00798a30ef0

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -39,7 +39,10 @@

 # -----------------------------------------------------------------------------
 # Usage: vtk_add_test_cxx([name.cxx[,-E<n>][,NO_VALID]]...
-#          [NO_DATA] [NO_VALID] [VALID_ERROR <n>])
+#          [NO_DATA] [NO_VALID])
+# NO_DATA indicates that this test doesn't require any input data file
+# NO_VALID indicates that this test doesn't compare results against baseline images
+# NO_OUTPUT indicates that the test doesn't produce any output files
 function(vtk_add_test_cxx)
   # Parse Command line args
   set(names "")
@@ -142,7 +145,10 @@

 # -----------------------------------------------------------------------------
 # Usage: vtk_add_test_python(name [NO_RT] [NO_DATA] [NO_VALID])
-# NO_RT is for tests using vtk.test.testing
+# NO_RT means that your test won't use the image comparison helpers from vtk.test.testing
+# NO_DATA indicates that this test doesn't require any input data file
+# NO_VALID indicates that this test doesn't compare results against baseline images
+# NO_OUTPUT indicates that the test doesn't produce any output files
 function(vtk_add_test_python name)
   if(NOT VTK_PYTHON_EXE)
     message(FATAL_ERROR "VTK_PYTHON_EXE not set")
@@ -199,7 +205,11 @@
 endfunction()

 # -----------------------------------------------------------------------------
-# Usage: vtk_add_test_tcl(name [NO_DATA] [NO_VALID])
+# Usage: vtk_add_test_tcl(name [NO_DATA] [NO_VALID] [NO_OUTPUT] [NO_RT])
+# NO_RT means that your test won't use the image comparison helpers from rtImageTest.tcl
+# NO_DATA indicates that this test doesn't require any input data file
+# NO_VALID indicates that this test doesn't compare results against baseline images
+# NO_OUTPUT indicates that the test doesn't produce any output files
 function(vtk_add_test_tcl name)
   if(NOT VTK_TCL_EXE)
     message(FATAL_ERROR "VTK_TCL_EXE not set")


build: fix check for iconv

build: fix check for iconv

--- CMakeModules/FindIconv.cmake
+++ CMakeModules/FindIconv.cmake
@@ -53,6 +53,7 @@

 if(ICONV_FOUND)
     set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
+    set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
     check_cxx_source_compiles(
         "#include <iconv.h>
          int main() {
@@ -62,6 +63,7 @@
         ICONV_ACCEPTS_NONCONST_INPUT)

     set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
+    set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
     check_cxx_source_compiles(
         "#include <iconv.h>
          int main() {


fixed mismatched IF braces due to two arguments now being necessary to run a mono command


* Torque now requires c++17 due to new torque script code * Minimum version of cmake is now beyond 3.6.0, no need to check for that when selecting VS_STARTUP_PROJECT


-wall leads to incredibly long compile times (we're talking 5 minutes vs 80, here)

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -29,8 +29,8 @@
     #set(CXX_FLAG32 "-m32") #uncomment for build x32 on OSx64

     # default compiler flags
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wall -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'")
-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wall -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'")
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'")

 	# for asm files
 	SET (CMAKE_ASM_NASM_OBJECT_FORMAT "elf")


FindLIBPORTAUDIO.cmake: correct suffix

FindLIBPORTAUDIO.cmake: correct suffix


New version: 0.3.12

New version: 0.3.12

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "11")
+SET(HAWKEY_PATCH "12")


New version: 0.3.2

New version: 0.3.2

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "1")
+SET(HAWKEY_PATCH "2")


Update Hunter

Update Hunter

--- common.cmake
+++ common.cmake
@@ -1,11 +1,11 @@
-# Copyright (c) 2015, Ruslan Baratov
+# Copyright (c) 2015-2016, Ruslan Baratov
 # All rights reserved.

 # * https://github.com/hunter-packages/gate
 # * https://github.com/ruslo/hunter
 include("${CMAKE_CURRENT_LIST_DIR}/cmake/HunterGate.cmake")
+
 HunterGate(
-    URL "https://github.com/ruslo/hunter/archive/v0.15.6.tar.gz"
-    SHA1 "3dc0cd2ccbc52e8be93967dbc583303a1e825aa2"
-    ${CONFIG_FILE}
+    URL "https://github.com/ruslo/hunter/archive/v0.17.7.tar.gz"
+    SHA1 "78219f42c3737adcc161c52b9f71ce65a3d775c2"
 )


Fix misprint

Fix misprint

--- common.cmake
+++ common.cmake
@@ -5,7 +5,7 @@
 # * https://github.com/ruslo/hunter
 include("${CMAKE_CURRENT_LIST_DIR}/cmake/HunterGate.cmake")
 HunterGate(
-    ULR "https://github.com/ruslo/hunter/archive/v0.12.11.tar.gz"
+    URL "https://github.com/ruslo/hunter/archive/v0.12.11.tar.gz"
     SHA1 "79173425791e1fac4bafdecfc47a4edb994b2b1d"
     ${CONFIG_FILE}
 )


iox-#163 enable Wconversion for clang

iox-#163 enable Wconversion for clang

Signed-off-by: Dietrich Krönke <ea45bc0219d3b6c3a6b9cf3abdfa172e6bfa16ff@apex.ai>

--- iceoryx_utils/cmake/IceoryxPlatform.cmake
+++ iceoryx_utils/cmake/IceoryxPlatform.cmake
@@ -37,7 +37,7 @@
 elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
     set(ICEORYX_WARNINGS PRIVATE ${ICEORYX_WARNINGS} -W -Wall -Wextra -Wuninitialized -Wpedantic -Wstrict-aliasing -Wcast-align -Wno-noexcept-type -Wconversion)
 elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    set(ICEORYX_WARNINGS PRIVATE ${ICEORYX_WARNINGS} -W -Wall -Wextra -Wuninitialized -Wpedantic -Wstrict-aliasing -Wcast-align -Wno-noexcept-type)
+    set(ICEORYX_WARNINGS PRIVATE ${ICEORYX_WARNINGS} -W -Wall -Wextra -Wuninitialized -Wpedantic -Wstrict-aliasing -Wcast-align -Wno-noexcept-type -Wconversion)
 endif()

 if(BUILD_STRICT)


Update Superbuild ITK version to 4.13rc01


module.cmake: Update list based on output of WhatModulesVTK.py

--- module.cmake
+++ module.cmake
@@ -1,44 +1,66 @@
 set(DOCUMENTATION "A collection of examples illustrating how to use VTK")

-set(qt_modules "")
-if (Module_vtkGUISupportQtOpenGL)
-  set(qt_modules vtkRenderingQt vtkViewsQt vtkGUISupportQtOpenGL)
+set(DEPENDS
+  vtkChartsCore
+  vtkCommonColor
+  vtkCommonComputationalGeometry
+  vtkCommonSystem
+  vtkFiltersExtraction
+  vtkFiltersFlowPaths
+  vtkFiltersGeneric
+  vtkFiltersGeometry
+  vtkFiltersHybrid
+  vtkFiltersModeling
+  # vtkFiltersParallelStatistics #  Optional
+  vtkFiltersPoints
+  vtkFiltersProgrammable
+  vtkFiltersTexture
+  vtkFiltersVerdict
+  vtkGeovisCore
+  vtkIOExodus
+  vtkIOExport
+  # vtkIOFFMPEG # Optional
+  vtkIOImport
+  vtkIOInfovis
+  # vtkIOMySQL # Optional
+  vtkIOPLY
+  vtkIOParallel
+  vtkIOParallelXML
+  vtkImagingColor
+  vtkImagingFourier
+  vtkImagingHybrid
+  vtkImagingMath
+  vtkImagingMorphological
+  vtkImagingSources
+  vtkImagingStatistics
+  vtkImagingStencil
+  # vtkInfovisBoostGraphAlgorithms # Optional
+  vtkInfovisLayout
+  vtkInteractionImage
+  vtkRenderingAnnotation
+  vtkRenderingContext${VTK_RENDERING_BACKEND}
+  vtkRenderingImage
+  vtkRenderingLOD
+  vtkRenderingLabel
+  vtkRendering${VTK_RENDERING_BACKEND}
+  vtkRenderingVolume${VTK_RENDERING_BACKEND}
+  vtkTestingGenericBridge
+  vtkTestingRendering
+  vtkViewsContext2D
+  vtkViewsInfovis
+  )
+
+if(Module_vtkGUISupportQtOpenGL)
+  list(APPEND DEPENDS
+    vtkGUISupportQtOpenGL
+    vtkRenderingQt
+    vtkViewsQt
+    )
 endif()

 vtk_module( WikiExamples
   DEPENDS
-  vtkFiltersFlowPaths
-  vtkFiltersGeneric
-  vtkFiltersGeometry
-  vtkFiltersParallelStatistics
-  vtkFiltersPoints
-  vtkFiltersProgrammable
-  vtkFiltersSelection
-  vtkFiltersTexture
-  vtkFiltersVerdict
-  vtkIOExodus
-  vtkIOExport
-  vtkIOImport
-  vtkIOInfovis
-  vtkIOLSDyna
-  vtkIOPLY
-  vtkIOParallel
-  vtkIOParallelXML
-  vtkImagingMath
-  vtkImagingMorphological
-  vtkImagingStatistics
-  vtkImagingStencil
-  vtkInteractionImage
-  vtkRenderingContext${VTK_RENDERING_BACKEND}
-  vtkRenderingImage
-  vtkRenderingLOD
-  vtkRenderingVolume${VTK_RENDERING_BACKEND}
-  vtkRendering${VTK_RENDERING_BACKEND}
-  vtkTestingGenericBridge
-  vtkTestingRendering
-  vtkViewsContext2D
-  vtkViewsGeovis
-  ${qt_modules}
+    ${DEPENDS}
   DESCRIPTION
     "${DOCUMENTATION}"
 )


Search for LLVM tools in more locations (suggested by llvm-config etc)

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -14,7 +14,6 @@
 endif()

 set(WITH_LLVM_CONFIG "${WITH_LLVM_CONFIG}" CACHE PATH "Path to preferred llvm-config")
-

 if(NOT LLVM_CONFIG)
   message(FATAL_ERROR "llvm-config not found !")
@@ -30,6 +29,7 @@
   message(STATUS "LLVM binaries suffix : ${LLVM_BINARY_SUFFIX}")
 endif()

+get_filename_component(LLVM_CONFIG_LOCATION "${LLVM_CONFIG}" DIRECTORY)

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

@@ -48,7 +48,9 @@
   endif()
 endmacro(run_llvm_config)

-run_llvm_config( LLVM_VERSION_FULL --version)
+run_llvm_config(LLVM_PREFIX --prefix)
+set(LLVM_PREFIX_BIN "${LLVM_PREFIX}/bin")
+run_llvm_config(LLVM_VERSION_FULL --version)
 # sigh, sanitize version... `llvm --version` on debian might return 3.4.1 but llvm command names are still <command>-3.4
 string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1.\\2" LLVM_VERSION "${LLVM_VERSION_FULL}")
 message(STATUS "LLVM_VERSION: ${LLVM_VERSION}")
@@ -113,7 +115,7 @@
 ####################################################################

 macro(find_program_or_die OUTPUT_VAR PROG_NAME DOCSTRING)
-  find_program(${OUTPUT_VAR} NAMES "${PROG_NAME}${LLVM_BINARY_SUFFIX}${CMAKE_EXECUTABLE_SUFFIX}" "${PROG_NAME}${CMAKE_EXECUTABLE_SUFFIX}" DOC "${DOCSTRING}")
+  find_program(${OUTPUT_VAR} NAMES "${PROG_NAME}${LLVM_BINARY_SUFFIX}${CMAKE_EXECUTABLE_SUFFIX}" "${PROG_NAME}${CMAKE_EXECUTABLE_SUFFIX}" HINTS "${LLVM_CONFIG_LOCATION}" "${LLVM_PREFIX}" "${LLVM_PREFIX_BIN}" DOC "${DOCSTRING}")
   if(${OUTPUT_VAR})
     message(STATUS "Found ${PROG_NAME}: ${${OUTPUT_VAR}}")
   else()


Add cur service

Add cur service

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -32,6 +32,7 @@
 list(APPEND C2J_LIST "cognito-identity:2014-06-30")
 list(APPEND C2J_LIST "cognito-sync:2014-06-30")
 list(APPEND C2J_LIST "config:2014-11-12")
+list(APPEND C2J_LIST "cur:2017-01-06")
 list(APPEND C2J_LIST "datapipeline:2012-10-29")
 list(APPEND C2J_LIST "devicefarm:2015-06-23")
 list(APPEND C2J_LIST "directconnect:2012-10-25")
@@ -226,7 +227,7 @@

         SET(SDK_DIR "aws-cpp-sdk-${SDK}")

-        if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SDK_DIR}")
+        if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SDK_DIR}" AND NOT REGENERATE_CLIENTS)
             SET(REMOVE_SDK 1)
         endif()


FindHIP: Fix bug in handling HIP_SOURCE_PROPERTY_FORMAT

Change-Id: I6f19c487b222039e2653a8de1930c02da64318ed

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -316,7 +316,7 @@
 ###############################################################################
 # MACRO: Prepare cmake commands for the target
 ###############################################################################
-macro(HIP_PREPARE_TARGET_COMMANDS _target _format _generated_files)
+macro(HIP_PREPARE_TARGET_COMMANDS _target _format _generated_files _source_files)
     set(_hip_flags "")
     set(_hip_build_configuration "${CMAKE_BUILD_TYPE}")
     if(HIP_HOST_COMPILATION_CPP)
@@ -378,6 +378,7 @@

     # Reset the output variable
     set(_hip_generated_files "")
+    set(_hip_source_files "")

     # Iterate over all arguments and create custom commands for all source files
     foreach(file ${ARGN})
@@ -457,11 +458,13 @@
             # Make sure the build system knows the file is generated
             set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE)
             list(APPEND _hip_generated_files ${generated_file})
+            list(APPEND _hip_source_files ${file})
         endif()
     endforeach()

     # Set the return parameter
     set(${_generated_files} ${_hip_generated_files})
+    set(${_source_files} ${_hip_source_files})
 endmacro()

 ###############################################################################
@@ -470,7 +473,8 @@
 macro(HIP_ADD_EXECUTABLE hip_target)
     # Separate the sources from the options
     HIP_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _hipcc_options _hcc_options _nvcc_options ${ARGN})
-    HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files ${_sources} HIPCC_OPTIONS ${_hipcc_options} HCC_OPTIONS ${_hcc_options} NVCC_OPTIONS ${_nvcc_options})
+    HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files _source_files ${_sources} HIPCC_OPTIONS ${_hipcc_options} HCC_OPTIONS ${_hcc_options} NVCC_OPTIONS ${_nvcc_options})
+    list(REMOVE_ITEM _sources ${_source_files})
     set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_EXECUTABLE} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>")
     add_executable(${hip_target} ${_cmake_options} ${_generated_files} ${_sources})
     set_target_properties(${hip_target} PROPERTIES LINKER_LANGUAGE HIP)
@@ -482,7 +486,8 @@
 macro(HIP_ADD_LIBRARY hip_target)
     # Separate the sources from the options
     HIP_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _hipcc_options _hcc_options _nvcc_options ${ARGN})
-    HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files ${_sources} ${_cmake_options} HIPCC_OPTIONS ${_hipcc_options} HCC_OPTIONS ${_hcc_options} NVCC_OPTIONS ${_nvcc_options})
+    HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files _source_files ${_sources} ${_cmake_options} HIPCC_OPTIONS ${_hipcc_options} HCC_OPTIONS ${_hcc_options} NVCC_OPTIONS ${_nvcc_options})
+    list(REMOVE_ITEM _sources ${_source_files})
     add_library(${hip_target} ${_cmake_options} ${_generated_files} ${_sources})
     set_target_properties(${hip_target} PROPERTIES LINKER_LANGUAGE ${HIP_C_OR_CXX})
 endmacro()


Modif Cmake pour pascal.

Modif Cmake pour pascal.

--- cmake/FindOIS.cmake
+++ cmake/FindOIS.cmake
@@ -31,7 +31,7 @@
   ${OGRE_SOURCE}/iPhoneDependencies ${ENV_OGRE_SOURCE}/iPhoneDependencies
   ${OGRE_SOURCE}/Dependencies ${ENV_OGRE_SOURCE}/Dependencies
   ${OGRE_SDK} ${ENV_OGRE_SDK}
-  ${OGRE_HOME} ${ENV_OGRE_HOME})
+  ${OGRE_HOME} ${ENV_OGRE_HOME} C:/lib/ogre)
 create_search_paths(OIS)
 # redo search if prefix path changed
 clear_if_changed(OIS_PREFIX_PATH


FindSIP now uses the detected python, not the first one in PATH

--- cmake/FindSIP.cmake
+++ cmake/FindSIP.cmake
@@ -29,7 +29,7 @@

   # Use the path to the python installation as a hint for finding sip
   SET(SIP_POSSIBLE_INC_DIRS "${PYTHON_INCLUDE_PATH}")
-	EXECUTE_PROCESS ( COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
+	EXECUTE_PROCESS ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
 		OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
 		OUTPUT_STRIP_TRAILING_WHITESPACE
 	)


FIX: clang-format

FIX: clang-format

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -115,41 +115,41 @@
       IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a")
     add_dependencies(${TARGET_NAME} ${TARGET_NAME}_archive)
 	else() # general UNIX: use "ar" to extract objects and re-add to a common lib
-		foreach(lib ${libs})
-			set(objlistfile ${lib}.objlist) # list of objects in the input library
-			set(objdir ${lib}.objdir)
-
-			add_custom_command(OUTPUT ${objdir}
-					COMMAND ${CMAKE_COMMAND} -E make_directory ${objdir})
-
-			add_custom_command(OUTPUT ${objlistfile}
-					COMMAND ${CMAKE_AR} -x "$<TARGET_FILE:${lib}>"
-					COMMAND ${CMAKE_AR} -t "$<TARGET_FILE:${lib}>" > ../${objlistfile}
-					DEPENDS ${lib} ${objdir}
-					WORKING_DIRECTORY ${objdir})
-
-			# Empty dummy source file that goes into merged library
-			set(mergebase ${lib}.mergebase.c)
-			add_custom_command(OUTPUT ${mergebase}
-					COMMAND ${CMAKE_COMMAND} -E touch ${mergebase}
-					DEPENDS ${objlistfile})
-
-			list(APPEND mergebases "${mergebase}")
-		endforeach()
-
-		# We need a target for the output merged library
-		add_library(${TARGET_NAME} STATIC ${mergebases})
-		set(outlibfile "$<TARGET_FILE:${TARGET_NAME}>")
-
-		foreach(lib ${libs})
-			add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
-					COMMAND ${CMAKE_AR} ru ${outlibfile} @"../${objlistfile}"
-					WORKING_DIRECTORY ${objdir})
-		endforeach()
-
-		add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
-				COMMAND ${CMAKE_RANLIB} ${outlibfile})
-	endif()
+    foreach(lib ${libs})
+      set(objlistfile ${lib}.objlist) # list of objects in the input library
+      set(objdir ${lib}.objdir)
+
+      add_custom_command(OUTPUT ${objdir}
+        COMMAND ${CMAKE_COMMAND} -E make_directory ${objdir})
+
+      add_custom_command(OUTPUT ${objlistfile}
+        COMMAND ${CMAKE_AR} -x "$<TARGET_FILE:${lib}>"
+        COMMAND ${CMAKE_AR} -t "$<TARGET_FILE:${lib}>" > ../${objlistfile}
+        DEPENDS ${lib} ${objdir}
+        WORKING_DIRECTORY ${objdir})
+
+      # Empty dummy source file that goes into merged library
+      set(mergebase ${lib}.mergebase.c)
+      add_custom_command(OUTPUT ${mergebase}
+        COMMAND ${CMAKE_COMMAND} -E touch ${mergebase}
+        DEPENDS ${objlistfile})
+
+      list(APPEND mergebases "${mergebase}")
+    endforeach()
+
+    # We need a target for the output merged library
+    add_library(${TARGET_NAME} STATIC ${mergebases})
+    set(outlibfile "$<TARGET_FILE:${TARGET_NAME}>")
+
+    foreach(lib ${libs})
+    add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
+      COMMAND ${CMAKE_AR} ru ${outlibfile} @"../${objlistfile}"
+      WORKING_DIRECTORY ${objdir})
+    endforeach()
+
+    add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
+      COMMAND ${CMAKE_RANLIB} ${outlibfile})
+  endif()
 endfunction(merge_static_libs)

 function(cc_library TARGET_NAME)


For CMake, get AMICI version from version.txt to avoid issues of unmerged tagged branches and building from non-git directory

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -2,7 +2,11 @@
 if(Git_FOUND)
     execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags  | cut -c 2- | tr -d '\n' | sed -E s/-/./"
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-        OUTPUT_VARIABLE PROJECT_VERSION
+        OUTPUT_VARIABLE PROJECT_VERSION_GIT
         )
 endif()

+execute_process(COMMAND sh -c "cat version.txt"
+    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+    OUTPUT_VARIABLE PROJECT_VERSION
+    )


fail build if version number can't be found

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -1,8 +1,13 @@
 get_filename_component(CWD ${CMAKE_CURRENT_LIST_FILE} PATH)
 execute_process(COMMAND "${CWD}/scm-version"
     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+    RESULT_VARIABLE SCM_STATUS
     OUTPUT_STRIP_TRAILING_WHITESPACE
     OUTPUT_VARIABLE SCM_VERSION)
-message("Current revision of ${PROJECT_SOURCE_DIR} is \"${SCM_VERSION}\"")
+if (NOT "${SCM_STATUS}" STREQUAL 0)
+    message(FATAL_ERROR "Failed to get version from scm-version")
+else()
+    message("Current revision of ${PROJECT_SOURCE_DIR} is \"${SCM_VERSION}\"")
+endif()

 add_definitions(-DSCM_VERSION="${SCM_VERSION}")


removed typo

removed typo

--- pgmlink.cmake
+++ pgmlink.cmake
@@ -17,7 +17,7 @@
 include (boost)
 include (opengm)
 include (doxygen)
-inlcude (dlib)
+include (dlib)

 external_git_repo (pgmlink
     HEAD


Added support to overwrite the generator type. Eigen'fied the new variables.

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -27,6 +27,13 @@
 #  - EIGEN_WORK_DIR: directory used to download the source files and make the builds
 #      default: folder which contains this script
 #  - EIGEN_CMAKE_ARGS: additional arguments passed to cmake
+#  - EIGEN_GENERATOR_TYPE: allows to overwrite the generator type
+#      default: nmake (windows
+#      See http://www.cmake.org/cmake/help/cmake2.6docs.html#section_Generators for a complete
+#      list of supported generators.
+#  - EIGEN_NO_UPDATE: allows to submit dash boards from local repositories
+#      This might be interesting in case you want to submit dashboards
+#      including local changes.
 #  - CTEST_SOURCE_DIRECTORY: path to eigen's src (use a new and empty folder, not the one you are working on)
 #      default: <EIGEN_WORK_DIR>/src
 #  - CTEST_BINARY_DIRECTORY: build directory
@@ -132,11 +139,11 @@

 ## mandatory variables (the default should be ok in most cases):

-if(NOT IGNORE_CVS)
+if(NOT EIGEN_NO_UPDATE)
   SET (CTEST_CVS_COMMAND "hg")
   SET (CTEST_CVS_CHECKOUT "${CTEST_CVS_COMMAND} clone http://bitbucket.org/eigen/eigen2 \"${CTEST_SOURCE_DIRECTORY}\"")
   SET(CTEST_BACKUP_AND_RESTORE TRUE) # the backup is CVS related ...
-endif(NOT IGNORE_CVS)
+endif(NOT EIGEN_NO_UPDATE)

 # which ctest command to use for running the dashboard
 SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE}")
@@ -158,15 +165,24 @@
 # any quotes inside of this string if you use it
 if(WIN32 AND NOT UNIX)
   #message(SEND_ERROR "win32")
-  set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
-  SET (CTEST_INITIAL_CACHE "
-    MAKECOMMAND:STRING=nmake -i
-    CMAKE_MAKE_PROGRAM:FILEPATH=nmake
-    CMAKE_GENERATOR:INTERNAL=NMake Makefiles
-    CMAKE_BUILD_TYPE:STRING=Release
-    BUILDNAME:STRING=${EIGEN_BUILD_STRING}
-    SITE:STRING=${EIGEN_SITE}
-  ")
+  if(EIGEN_GENERATOR_TYPE)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"${EIGEN_GENERATOR_TYPE}\"")
+    SET (CTEST_INITIAL_CACHE "
+      CMAKE_BUILD_TYPE:STRING=Release
+      BUILDNAME:STRING=${EIGEN_BUILD_STRING}
+      SITE:STRING=${EIGEN_SITE}
+    ")
+  else(EIGEN_GENERATOR_TYPE)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
+    SET (CTEST_INITIAL_CACHE "
+      MAKECOMMAND:STRING=nmake -i
+      CMAKE_MAKE_PROGRAM:FILEPATH=nmake
+      CMAKE_GENERATOR:INTERNAL=NMake Makefiles
+      CMAKE_BUILD_TYPE:STRING=Release
+      BUILDNAME:STRING=${EIGEN_BUILD_STRING}
+      SITE:STRING=${EIGEN_SITE}
+    ")
+  endif(EIGEN_GENERATOR_TYPE)
 else(WIN32 AND NOT UNIX)
   SET (CTEST_INITIAL_CACHE "
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}


Support CONFIG_CDEF in the cmake build.

Support CONFIG_CDEF in the cmake build.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=76

Change-Id: I3e19eb302eb2f0f5a12243bf093c8f9807d97e91

--- av1/av1.cmake
+++ av1/av1.cmake
@@ -218,12 +218,19 @@
   set(AOM_AV1_COMMON_SOURCES
       ${AOM_AV1_COMMON_SOURCES}
       "${AOM_ROOT}/av1/common/clpf.c"
-      "${AOM_ROOT}/av1/common/clpf.h")
+      "${AOM_ROOT}/av1/common/clpf.h"
+      "${AOM_ROOT}/av1/common/clpf_simd.h"
+      "${AOM_ROOT}/av1/common/clpf_simd_kernel.h"
+      "${AOM_ROOT}/av1/common/dering.c"
+      "${AOM_ROOT}/av1/common/dering.h"
+      "${AOM_ROOT}/av1/common/od_dering.c"
+      "${AOM_ROOT}/av1/common/od_dering.h")

   set(AOM_AV1_ENCODER_SOURCES
       ${AOM_AV1_ENCODER_SOURCES}
       "${AOM_ROOT}/av1/encoder/clpf_rdo.c"
-      "${AOM_ROOT}/av1/encoder/clpf_rdo.h")
+      "${AOM_ROOT}/av1/encoder/clpf_rdo.h"
+      "${AOM_ROOT}/av1/encoder/pickdering.c")

   set(AOM_AV1_COMMON_SSE2_INTRIN
       ${AOM_AV1_COMMON_SSE2_INTRIN}
@@ -247,7 +254,9 @@

   set(AOM_AV1_ENCODER_SSE4_1_INTRIN
       ${AOM_AV1_ENCODER_SSE4_1_INTRIN}
-      "${AOM_ROOT}/av1/encoder/clpf_rdo_sse4.c")
+      "${AOM_ROOT}/av1/encoder/clpf_rdo_sse4.c"
+      "${AOM_ROOT}/av1/common/x86/od_dering_sse4.c"
+      "${AOM_ROOT}/av1/common/x86/od_dering_sse4.h")
 endif ()

 if (CONFIG_EXT_INTER)


Dont set CUDA_ARCH_LIST to ARGN if it is empty

--- cmake/3.6/Modules/FindCUDA/select_compute_arch.cmake
+++ cmake/3.6/Modules/FindCUDA/select_compute_arch.cmake
@@ -88,7 +88,9 @@
 # Usage:
 #   SELECT_NVCC_ARCH_FLAGS(out_variable [list of CUDA compute archs])
 function(CUDA_SELECT_NVCC_ARCH_FLAGS out_variable)
-  set(CUDA_ARCH_LIST "${ARGN}")
+  if(ARGN)
+    set(CUDA_ARCH_LIST "${ARGN}")
+  endif()

   if("X${CUDA_ARCH_LIST}" STREQUAL "X" )
     set(CUDA_ARCH_LIST "Auto")


Look for rtiddsgen2 in ${Connext_HOME"/bin

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -208,7 +208,11 @@
     set(Connext_DDSGEN2 "rtiddsgen2.bat")
   else()
     set(Connext_DEFINITIONS "-DRTI_LINUX" "-DRTI_UNIX")
-    set(Connext_DDSGEN2 "${Connext_HOME}/scripts/rtiddsgen2")
+    if(EXISTS "${Connext_HOME}/bin/rtiddsgen2")
+      set(Connext_DDSGEN2 "${Connext_HOME}/bin/rtiddsgen2")
+    else()
+      set(Connext_DDSGEN2 "${Connext_HOME}/scripts/rtiddsgen2")
+    endif()
   endif()
   set(Connext_FOUND TRUE)
 else()


FindAlpinoCorpus: IndexedCorpusReader.hh does not exist anymore.

--- cmake/FindAlpinoCorpus.cmake
+++ cmake/FindAlpinoCorpus.cmake
@@ -1,4 +1,4 @@
-FIND_PATH(ALPINOCORPUS_INCLUDE_DIR NAMES AlpinoCorpus/IndexedCorpusReader.hh)
+FIND_PATH(ALPINOCORPUS_INCLUDE_DIR NAMES AlpinoCorpus/CorpusReader.hh)

 FIND_LIBRARY(ALPINOCORPUS_LIBRARIES NAMES alpino_corpus )


Update LuaNativeObjects build file.

Update LuaNativeObjects build file.

--- cmake/LuaNativeObjects.cmake
+++ cmake/LuaNativeObjects.cmake
@@ -1,19 +1,39 @@
 #
 # Lua Native Objects
 #
+
+set(LUA_NATIVE_OBJECTS_PATH ${CMAKE_SOURCE_DIR}/../LuaNativeObjects CACHE PATH
+				"Directory to LuaNativeObjects bindings generator.")
+set(USE_PRE_GENERATED_BINDINGS TRUE CACHE BOOL
+				"Set this to FALSE to re-generate bindings using LuaNativeObjects")
+
+set(GENERATE_LUADOCS TRUE CACHE BOOL
+				"Set this to FALSE to avoid generation of docs using LuaDoc")
+
 macro(GenLuaNativeObjects _src_files_var)
 	set(_new_src_files)
 	foreach(_src_file ${${_src_files_var}})
 		if(_src_file MATCHES ".nobj.lua")
 			string(REGEX REPLACE ".nobj.lua" ".nobj.c" _src_file_out ${_src_file})
-			string(REGEX REPLACE ".nobj.lua" ".nobj.h" _header_file_out ${_src_file})
-			add_custom_command(OUTPUT ${_src_file_out} ${_header_file_out}
+			string(REGEX REPLACE ".nobj.lua" ".nobj.ffi.lua" _ffi_file_out ${_src_file})
+			add_custom_command(OUTPUT ${_src_file_out} ${_ffi_file_out}
 				COMMAND lua ${LUA_NATIVE_OBJECTS_PATH}/native_objects.lua -outpath ${CMAKE_CURRENT_BINARY_DIR} -gen lua ${_src_file}
 				WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
 				DEPENDS ${_src_file}
 			)
 			set_source_files_properties(${_src_file_out} PROPERTIES GENERATED TRUE)
-			set_source_files_properties(${_header_file_out} PROPERTIES GENERATED TRUE)
+			set_source_files_properties(${_ffi_file_out} PROPERTIES GENERATED TRUE)
+			if (${GENERATE_LUADOCS})
+				string(REGEX REPLACE ".nobj.lua" "" _doc_base ${_src_file})
+				string(REGEX REPLACE ".nobj.lua" ".luadoc" _doc_file_out ${_src_file})
+				add_custom_target(${_doc_file_out} ALL
+					COMMAND lua ${LUA_NATIVE_OBJECTS_PATH}/native_objects.lua -outpath docs -gen luadoc ${_src_file}
+					COMMAND luadoc -nofiles -d docs docs
+					WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+					DEPENDS ${_src_file}
+				)
+			endif()
+			set_source_files_properties(${_doc_file_out} PROPERTIES GENERATED TRUE)
 			set(_new_src_files ${_new_src_files} ${_src_file_out})
 		else(_src_file MATCHES ".nobj.lua")
 			set(_new_src_files ${_new_src_files} ${_src_file})


Fix GLFW library search by cmake

Fix GLFW library search by cmake

On mac, the glfw library is called libglfw3.dylib. On Linux (or at least on my
system) it's called libglfw.so. That's why we now specify both of these names
in the cmake find module.

--- cmake/Modules/FindGLFW.cmake
+++ cmake/Modules/FindGLFW.cmake
@@ -1,4 +1,4 @@
-find_library(GLFW_LIBRARY glfw3)
+find_library(GLFW_LIBRARY NAMES glfw3 glfw)
 find_path(GLFW_INCLUDE_DIR glfw3.h PATH_SUFFIXES GLFW)

 include(FindPackageHandleStandardArgs)


cmake: Update NSIS find module for Windows

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

--- cmake/Modules/FindNSIS.cmake
+++ cmake/Modules/FindNSIS.cmake
@@ -1,5 +1,9 @@
 # - Try to find NSIS
 # Once done this will define
+#
+#  NSIS_ROOT_PATH - Set this variable to the root installation of NSIS
+#
+# Read-Only variables:
 #
 #  NSIS_FOUND - system has NSIS
 #  NSIS_MAKE - NSIS creator executable
@@ -17,17 +21,16 @@
 #

 if (WIN32)
-    set(_NSIS_ROOT_HINTS
-        "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS;Default]")
+    set(_x86 "(x86)")

     set(_NSIS_ROOT_PATHS
-        $ENV{PROGRAMFILES}/NSIS)
+        "$ENV{ProgramFiles}/NSIS"
+        "$ENV{ProgramFiles${_x86}}/NSIS"
+        "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS;Default]")

     find_path(NSIS_ROOT_PATH
         NAMES
             Include/Library.nsh
-        HINTS
-            ${_NSIS_ROOT_HINTS}
         PATHS
             ${_NSIS_ROOT_PATHS}
         )


fix for 2504: WITH_CUDA disabled with OSX in 2.4.3.

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -3,8 +3,13 @@
   return()
 endif()

-if (NOT MSVC AND NOT CMAKE_COMPILER_IS_GNUCXX OR MINGW)
-  message(STATUS "CUDA compilation was disabled (due to unsuppoted host compiler).")
+if (WIN32 AND NOT MSVC)
+  message(STATUS "CUDA compilation is disabled (due to only Visual Studio compiler suppoted on your platform).")
+  return()
+endif()
+
+if (CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  message(STATUS "CUDA compilation is disabled (due to Clang unsuppoted on your platform).")
   return()
 endif()


Fix #6500 cmake bug that adds D_FORCE_INLINES to NVCC

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -138,6 +138,7 @@
       set(OPENCV_CUDA_ARCH_FEATURES "${OPENCV_CUDA_ARCH_FEATURES} ${ARCH}")
     endif()
   endforeach()
+  set(NVCC_FLAGS_EXTRA ${NVCC_FLAGS_EXTRA} -D_FORCE_INLINES)

   # Tell NVCC to add PTX intermediate code for the specified architectures
   string(REGEX MATCHALL "[0-9]+" ARCH_LIST "${ARCH_PTX_NO_POINTS}")


OSX: Make project generating simpler, allow for use of XCODE: "Use default compiler" option

--- cmake/PlatformSpecific.cmake
+++ cmake/PlatformSpecific.cmake
@@ -164,12 +164,15 @@
     endif()

 	if(${XCODE_VERSION} VERSION_LESS 4.3)
-		SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
-	elseif(${XCODE_VERSION} VERSION_GREATER 4.3)
-		set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx) # xcode 4.4-style, gets alway latest available
-	else()
-		SET(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk)
-	endif()
+		SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk)
+	else()
+		SET(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk)
+        set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx) # to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT, gets alway latest available
+	endif()
+
+    # set a precedence of sdk path over all other default search pathes
+    SET(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT})
+
 #	INCLUDE_DIRECTORIES( ${OSX_DEPENDENCY_ROOT}/include )

 	### options


build: make swift_lib_add_single more amenable to cross-compilation

Use the SWIFTLIB_SINGLE_SDK variable rather than the CMAKE_BUILD_SYSTEM variable
to determine the target type.  This allows us to use the logic for adding
libraries for foreign OSes on a build host.  This is needed to pave the road to
cross-crompiling the standard library for different targets.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -499,7 +499,13 @@
   endif()

   if (SWIFT_COMPILER_VERSION)
-    if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+    if ("${SWIFTLIB_SINGLE_SDK}" STREQUAL "OSX" OR
+        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "IOS" OR
+        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "IOS_SIMULATOR" OR
+        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "TVOS" OR
+        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "TVOS_SIMULATOR" OR
+        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "WATCHOS" OR
+        "${SWIFTLIB_SINGLE_SDK}" STREQUAL "WATCHOS_SIMULATOR")
       list(APPEND SWIFTLIB_SINGLE_LINK_FLAGS "-Xlinker" "-current_version" "-Xlinker" "${SWIFT_COMPILER_VERSION}" "-Xlinker" "-compatibility_version" "-Xlinker" "1")
     endif()
   endif()
@@ -565,8 +571,8 @@
   # we add markers for metadata sections in the shared libraries using
   # these object files.  This wouldn't be necessary if the link was done by
   # the swift binary: rdar://problem/19007002
-  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR
-     "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "LINUX" OR
+     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "FREEBSD")

     if("${libkind}" STREQUAL "SHARED")
       set(arch_subdir "${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}")
@@ -623,8 +629,8 @@

   # The section metadata objects are generated sources, and we need to tell CMake
   # not to expect to find them prior to their generation.
-  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR
-     "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "LINUX" OR
+     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "FREEBSD")
     if("${libkind}" STREQUAL "SHARED")
       set_source_files_properties(${SWIFT_SECTIONS_OBJECT_BEGIN} PROPERTIES GENERATED 1)
       set_source_files_properties(${SWIFT_SECTIONS_OBJECT_END} PROPERTIES GENERATED 1)
@@ -661,7 +667,13 @@
     endforeach()
   endif()

-  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "OSX" OR
+     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "IOS" OR
+     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "IOS_SIMULATOR" OR
+     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "TVOS" OR
+     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "TVOS_SIMULATOR" OR
+     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "WATCHOS" OR
+     "${SWIFTLIB_SINGLE_SDK}" STREQUAL "WATCHOS_SIMULATOR")
     set(install_name_dir "@rpath")

     if(SWIFTLIB_SINGLE_IS_STDLIB)
@@ -674,11 +686,11 @@
     set_target_properties("${target}"
       PROPERTIES
       INSTALL_NAME_DIR "${install_name_dir}")
-  elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT "${SWIFTLIB_SINGLE_SDK}" STREQUAL "ANDROID")
+  elseif("${SWIFTLIB_SINGLE_SDK}" STREQUAL "LINUX" AND NOT "${SWIFTLIB_SINGLE_SDK}" STREQUAL "ANDROID")
     set_target_properties("${target}"
       PROPERTIES
       INSTALL_RPATH "$ORIGIN:/usr/lib/swift/linux")
-  elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Cygwin")
+  elseif("${SWIFTLIB_SINGLE_SDK}" STREQUAL "CYGWIN")
     set_target_properties("${target}"
       PROPERTIES
       INSTALL_RPATH "$ORIGIN:/usr/lib/swift/windows")


Link Swift images on ELF using -Bsymbolic.

We don't want references to local symbols within an image to be relocatable, since this increases startup time and causes problems with relative references.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -173,9 +173,9 @@
       result)

   if("${sdk}" STREQUAL "LINUX")
-    list(APPEND result "-lpthread" "-ldl")
+    list(APPEND result "-lpthread" "-ldl" "-Wl,-Bsymbolic")
   elseif("${sdk}" STREQUAL "FREEBSD")
-    list(APPEND result "-lpthread")
+    list(APPEND result "-lpthread" "-Wl,-Bsymbolic")
   else()
     list(APPEND result "-lobjc")
   endif()


build; correct swift fat library linking on Windows

Windows does not link against the library but the import library.  When
building the target specific bits, we unfortunately do not use the cmake
build infrastructure properly.  This results in us trying to link
against libraries which do not exist.  Redirect the link to the right
files.  This allows us to build swift-reflection-test.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -2136,11 +2136,19 @@
   # Find the names of dependency library targets.
   #
   # We don't add the ${ARCH} to the target suffix because we want to link
-  # against fat libraries.
-  _list_add_string_suffix(
-      "${SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES}"
-      "-${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}"
-      SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES_TARGETS)
+  # against fat libraries.  This only works for the Darwin targets as MachO is
+  # the only format with the fat libraries.
+  if(${SWIFTEXE_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
+    _list_add_string_suffix(
+        "${SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES}"
+        "-${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}"
+        SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES_TARGETS)
+  else()
+    _list_add_string_suffix(
+        "${SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES}"
+        "-${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}-${SWIFTEXE_SINGLE_ARCHITECTURE}"
+        SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES_TARGETS)
+  endif()

   handle_swift_sources(
       dependency_target


Use mapr C client instead of libhdfs.so

Use mapr C client instead of libhdfs.so

--- cmake_modules/FindHDFS.cmake
+++ cmake_modules/FindHDFS.cmake
@@ -38,8 +38,8 @@
 set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/lib/native)
 #set(HDFS_LIB_PATHS /opt/mapr/lib $ENV{HADOOP_HOME}/lib/native/Linux-amd64-64)

-find_library(HDFS_LIB NAMES hdfs PATHS
-#find_library(HDFS_LIB NAMES MapRClient PATHS
+#find_library(HDFS_LIB NAMES hdfs PATHS
+find_library(HDFS_LIB NAMES MapRClient PATHS
   ${HDFS_LIB_PATHS}
   # make sure we don't accidentally pick up a different version
   NO_DEFAULT_PATH


cmake: Look for VTK 8 first

cmake: Look for VTK 8 first

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -59,7 +59,7 @@
     MIRTK{Common,Numerics,Image,PointSet,IO}
     Boost-1.48 # {math_c99} used, but headers only
     Eigen3
-    "VTK-7|6{
+    "VTK-8|7|6{
       vtkCommonCore,
       vtkCommonDataModel,
       vtkFiltersCore,


COMP: Fix configuration of IOFactory header. See #3393

This commit fixes code initially introduced in e55e67b (ENH: Enabling
shared IO modules on windows) that seems to have always been broken.

Indeed, variable starting with "ITK_MODULE_" where never configured
into <ModuleName>.cmake and the property "ENABLE_SHARED" was never
configured into it.

Change-Id: I6015fcc00370254f9ef3c047711628bbccc4b9b4

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -22,7 +22,7 @@
   if(NOT ${_module_was_requested} EQUAL -1)
     # note: this is an internal CMake variable and should not be used outside ITK
     set(_abi)
-    if(ITK_MODULE_${_module_name}_ENABLE_SHARED AND BUILD_SHARED_LIBS)
+    if(${_module_name}_ENABLE_SHARED AND BUILD_SHARED_LIBS)
       set(_abi "ITK_ABI_IMPORT")
     endif()
     set(${_registration_list_var}


Hookup vera++ in the CMake build

Hookup vera++ in the CMake build

--- CMake/common.cmake
+++ CMake/common.cmake
@@ -50,11 +50,13 @@
 	set(COMMON_LIBS "-lprofiler")
 endif()

-# ???
-# QMAKE_POST_LINK += $${ENVISION_ROOT_DIR}/checkers/vera++-check-dir $$_PRO_FILE_PWD_
-
 function(use_precompiled_header targetName)
 	message("Using precompiled header for ${targetName} ")
+
+	#TODO: This shouldn't really belong here, but what's a better place?
+	add_custom_command(TARGET ${targetName} PRE_LINK
+		COMMAND ${ENVISION_ROOT_DIR}/checkers/vera++-check-dir ${CMAKE_CURRENT_SOURCE_DIR}
+	)

 	# A custom target name for the precompiled header
 	set(precompiled ${targetName}-Precompiled-Header)