Removed references to Sigmoid nrrd files from Segmentation testing.

--- Modules/Segmentation/Testing/files.cmake
+++ Modules/Segmentation/Testing/files.cmake
@@ -22,8 +22,6 @@
   Pic2DplusT.nrrd
   BallBinary30x30x30.nrrd
   Png2D-bw.png
-  Sigmoid.nrrd
-  Sigmoid-2D-as-3D.nrrd
 )

 # Create an artificial module initializing class for


ENH: Exclude ITKGDCM module when system GDCM is ON.

When ITK_USE_SYSTEM_GDCM is set to be ON,ITKGDCM module
should be excluded from building.

--- Modules/ThirdParty/GDCM/itk-module.cmake
+++ Modules/ThirdParty/GDCM/itk-module.cmake
@@ -2,11 +2,19 @@
 href=\"http://sourceforge.net/projects/gdcm/\">GDCM</a> library.
 Grassroots DiCoM is a C++ library for DICOM medical files.")

-itk_module(ITKGDCM
-  DEPENDS
-    ITKZLIB
-    ITKExpat
-    ITKOpenJPEG
-  DESCRIPTION
-    "${DOCUMENTATION}"
-)
+if(ITK_USE_SYSTEM_GDCM)
+  itk_module(ITKGDCM
+    DESCRIPTION
+      "${DOCUMENTATION}"
+    EXCLUDE_FROM_ALL
+    )
+else()
+  itk_module(ITKGDCM
+    DEPENDS
+      ITKZLIB
+      ITKExpat
+      ITKOpenJPEG
+    DESCRIPTION
+      "${DOCUMENTATION}"
+  )
+endif()


Instead of random file name, use a hash as a deterministic name for Swift source file list in _compile_swift_files (#33190)

--- stdlib/cmake/modules/SwiftSource.cmake
+++ stdlib/cmake/modules/SwiftSource.cmake
@@ -688,9 +688,9 @@
   # need to work around this by avoiding long command line arguments. This can
   # be achieved by writing the list of file paths to a file, then reading that
   # list in the Python script.
-  string(RANDOM file_name)
+  string(REPLACE ";" "'\n'" source_files_quoted "${source_files}")
+  string(SHA1 file_name "'${source_files_quoted}'")
   set(file_path "${CMAKE_CURRENT_BINARY_DIR}/${file_name}.txt")
-  string(REPLACE ";" "'\n'" source_files_quoted "${source_files}")
   file(WRITE "${file_path}" "'${source_files_quoted}'")

   # If this platform/architecture combo supports backward deployment to old
@@ -717,7 +717,7 @@
       OUTPUT ${standard_outputs}
       DEPENDS
         ${swift_compiler_tool_dep}
-        ${file_path} ${source_files} ${SWIFTFILE_DEPENDS}
+        ${source_files} ${SWIFTFILE_DEPENDS}
         ${swift_ide_test_dependency}
         ${create_dirs_dependency_target}
         ${copy_legacy_layouts_dep}


fixed cmake compilation on linux

fixed cmake compilation on linux

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -84,14 +84,14 @@
 #option(DEBUG_SPEW "more debug" OFF)
 set(TORQUE_NO_DSO_GENERATION ON)

-# warning C4800: 'XXX' : forcing value to bool 'true' or 'false' (performance warning)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4800")
-# warning C4018: '<' : signed/unsigned mismatch
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4018")
-# warning C4244: 'initializing' : conversion from 'XXX' to 'XXX', possible loss of data
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4244")
-
 if(WIN32)
+    # warning C4800: 'XXX' : forcing value to bool 'true' or 'false' (performance warning)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4800")
+    # warning C4018: '<' : signed/unsigned mismatch
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4018")
+    # warning C4244: 'initializing' : conversion from 'XXX' to 'XXX', possible loss of data
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4244")
+
     link_directories($ENV{DXSDK_DIR}/Lib/x86)
 endif()


Update version of python-cmake-buildsystem

$ git shortlog b012e1e..463259b --no-merges
Jean-Christophe Fillion-Robin (94):
      Do not install test scripts if BUILD_TESTING is OFF. Fixes #110
      Update travis and appveyor settings to specify major/minor/patch versions.
      Fix setting of HAVE_LCHMOD
      Reorganize libpython sources
      Add "generate_graminit" target
      Add "generate_python_ast_h" and "generate_python_ast_c" targets
      Add "generate_opcode_h" target
      Sort test list alphabetically
      Fix execution of "test_doctest"
      libpython: Remove redundant settings of POSITION_INDEPENDENT_CODE property
      Set minimum required version of OpenSSL to 0.9.7
      Fix "test_gdb" configuring and installing "python-gdb.py"
      Fix test_asdl_parser
      Add option WITH_COMPUTED_GOTOS for Python >= 2.7.11
      Update "add_python_extension" function adding "ALWAYS_BUILTIN" option.
      bdist_wininst: Fix configuration error due to not found ZLIB_LIBRARIES
      extensions/CMakeLists.txt: Add comments
      Add /Zm200 microsoft compiler flag
      add_python_extension: Re-organize code to call target_link_libraries once.
      Ensure extension include directories are associated with only one extension
      Fix "test_asdl_parser" on windows
      Add USE_BUILTIN_ZLIB option. Fixes #14
      add_python_extension: Add support for NO_INSTALL option.
      Add support for building Python 3.5.1
      python3: Fix tests like "test_loads_recursion" failing on windows
      python3: Fix "test_no_comdat_folding" disabling COMDAT folding.
      python3: Add support for _decimal extension
      python3: Fix build of _scproxy
      python3: Support building xxlimited extension
      python3: Build "python3dll" and fix msvc "xxlimited" link issue.
      python3: Add target to run "Argument Clinic"
      python3: Associate ABIFLAGS with shared/static libraries
      python3: Export and install libpython3-shared
      python3: Build libpython3-shared on unix
      appveyor: Disable Debug configuration
      appveyor: Associate python "3.5.1" with "Visual Studio 12 2013" generator
      python3: Fix MaxOSX build
      python3: Fix HAVE_READV and HAVE_WRITEV configuration check on MacOSX
      python3: Fix windows error when building 32-bit by excluding vcdiv64.asm
      python3: Associate correct architecture with python3stub.lib
      python3: Fix windows build of _decimal extension
      python3: Fix build of decimal extension
      Add configure check for HAVE_UCS4_TCL
      python2: Support setting Py_UNICODE_SIZE. Fixes #106
      Install LICENSE file. Fixes #29
      Install man pages. Fixes #30
      Generate and install grammar tables. Fixes #28
      Add configure check for MACOSX_DEPLOYMENT_TARGET.
      extension_ctypes: Simplify code introducing ctypes_COMMON_SOURCES var
      extension_ctypes: Support MacOSX build. Fixes #18
      Fix configure check HAVE_READLINE_READLINE_H on MacOSX
      python3: Do not include system processor when setting SOABI on MacOSX
      python3: Fix name of crypt extension
      Cache results of CMake checks
      Use CMake module "CheckTypeSize" and remove custom "CheckTypeExists"
      libpython-static: Use CMAKE_DL_LIBS instead to initialize CMAKE_DL_LIBS
      Add WITH_STATIC_DEPENDENCIES option (available only on Unix)
      Add INSTALL_DEVELOPMENT option
      Add INSTALL_MANUAL option
      Add INSTALL_TEST option
      Support system where libutil and libm are builtin the standard library
      Support building with HAVE_LIBDL set to False
      Build threadmodule only if WITH_THREAD is ON
      Associate "semaphore.c" with multiprocessing module only if it applies
      decimal: Display selected libmpdec_config
      python2: Add option to build threadmodule
      Exclude targets not relevant when cross compiling
      libmpdec_config: Add note for possible tweak
      circle: Add initial configuration
      circle: Cache docker images
      Associate cross-compiling emulator with custom commands & targets and tests
      Fix compilation of getpath.c crosscompiling using MinGW
      extension_datetime: Fix reference to MSVC_BUILTIN
      extensions: Generalize the built-in of Windows extensions to all compilers
      extension_ctypes: Fix indent
      Add BUILD_LIBPYTHON_SHARED option, deprecate BUILD_SHARED and BUILD_STATIC
      Consistently set LIBPYTHON_VERSION checking for WIN32 instead of MSVC
      bdist_wininst: Do not build by default if crosscompiling.
      config-mingw: Create copy of "PC/pyconfig.h"
      config-mingw: Replace "tab" with "2 spaces"
      config-mingw: Remove WINCE related config
      config-mingw: Remove support for older version of Visual Studio
      config-mingw: Remove support for Borland, egcs/gnu-win32 and lcc-win32 compiler
      config-mingw: Remove support for Intel compiler
      config-mingw: Add (i686|x86_64)-w64-mingw32 toolchain support from MXE
      fficonfig: Add test to set HAVE_MMAP_FILE
      fficonfig: Fix HAVE_AS_CFI_PSEUDO_OP test
      fficonfig: Update package metadata and fix typos
      fficonfig: Add missing SIZEOF_SIZE_T define
      fficonfig: Add test placeholders for new options introduced in libffi >= 3.0.13
      fficonfig: Add HAVE_AS_ASCII_PSEUDO_OP test
      fficonfig: Add HAVE_AS_STRING_PSEUDO_OP test
      fficonfig: Ensure HAVE_RO_EH_FRAME value is configured
      python3: Fix setting of WITH_HASH_ALGORITHM option properties

Jonathan White (1):
      Set target properties only if decimal/readline extensions are builtin.

Marcel Metz (1):
      Remove arguments from else and end* block termination commands

Max Smolens (1):
      Support Python 3.5.2

Tony Narlock (7):
      Fix #132 libffi directory on FreeBSD 11-CURRENT
      Prevent BSD systems from being tagged as Linux
      ConfigureChecks: Correct HAVE_SYS_SYS_DOMAIN_H include check
      makefile-variables: Remove obsolete OTHER_LIBTOOL_OPT
      Rename fficonfig.h to fficonfig.h.in and configure it during configuration
      pyconfig.h: Add missing test for SETPGRP_HAVE_ARG
      Configure fficonfig.h using system introspection. See #135

--- CMake/Externals/External_python.cmake
+++ CMake/Externals/External_python.cmake
@@ -117,7 +117,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/python-cmake-buildsystem/python-cmake-buildsystem.git"
-    GIT_TAG "b012e1e718250b8d94256beca97dcbca24d463db"
+    GIT_TAG "463259b5897e4f6909865b59b2860da8e2be6ffc"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build
     CMAKE_CACHE_ARGS


Adding missing SWIG dependency on SimpleITK_Common.i

Change-Id: I46db80542bc63791230bf407c9edf2f10b949f7f

--- CMake/sitkProjectLanguageCommon.cmake
+++ CMake/sitkProjectLanguageCommon.cmake
@@ -44,6 +44,9 @@

 include (sitkUseSWIG)

+set(SIMPLEITK_WRAPPING_COMMON_DIR
+  ${SimpleITK_SOURCE_DIR}/Wrapping/Common)
+
 file(GLOB SWIG_EXTRA_DEPS
   "${SimpleITK_SOURCE_DIR}/Code/Common/include/*.h"
   "${SimpleITK_SOURCE_DIR}/Code/Registration/include/*.h"
@@ -52,6 +55,7 @@
 # make a manual list of dependencies for the Swig.i files
 list( APPEND SWIG_EXTRA_DEPS "${SimpleITK_BINARY_DIR}/Code/BasicFilters/include/SimpleITKBasicFiltersGeneratedHeaders.i"
   "${SimpleITK_BINARY_DIR}/Code/BasicFilters/include/SimpleITKBasicFiltersGeneratedHeaders.h"
+  "${SIMPLEITK_WRAPPING_COMMON_DIR}/SimpleITK_Common.i"
   ${SimpleITKBasicFiltersGeneratedHeader}
   )

@@ -65,9 +69,6 @@
   set ( CMAKE_SWIG_GLOBAL_FLAGS "-DSWIGWORDSIZE64" )
 endif()

-set(SIMPLEITK_WRAPPING_COMMON_DIR
-  ${SimpleITK_SOURCE_DIR}/Wrapping/Common)
-
 set ( CMAKE_SWIG_GLOBAL_FLAGS -I${SIMPLEITK_WRAPPING_COMMON_DIR} ${CMAKE_SWIG_GLOBAL_FLAGS} )

 include(sitkTargetLinkLibrariesWithDynamicLookup)


Minor cleaning up while trying to understand why the internationalisation of the Viewer plugin doesn't work on Linux (while it works perfectly fine on Windows).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -109,7 +109,12 @@

     QT4_WRAP_CPP(SOURCES_MOC ${HEADERS_MOC})
     QT4_WRAP_UI(SOURCES_UIS ${UIS})
-    QT4_ADD_RESOURCES(SOURCES_RCS ${RESOURCES})
+
+    IF(${INTERNATIONALISATION})
+        QT4_ADD_RESOURCES(SOURCES_RCS ${RESOURCES})
+    ELSE()
+        SET(SOURCES_RCS)
+    ENDIF()

     ADD_LIBRARY(${PLUGIN_NAME} SHARED
         ${SOURCES}


Update toolchain to match the latest Energia release with macOS sierra

--- cmake/msp430.cmake
+++ cmake/msp430.cmake
@@ -20,9 +20,13 @@
 set(CMAKE_SYSTEM_NAME Generic)
 set(MSP_TOOLCHAIN 1)

+# Skip compiler checks because it depends on the MCU flag being passed
+set(CMAKE_C_COMPILER_WORKS 1)
+set(CMAKE_CXX_COMPILER_WORKS 1)
+
 # The location of the mspgcc toolchain. This may vary and need to be modified.
 if(CMAKE_HOST_APPLE)
-    set(MSP430_PATH /Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430)
+    set(MSP430_PATH /Applications/Energia.app/Contents/Java/hardware/tools/msp430)
 elseif(CMAKE_HOST_WIN32)
     set(MSP430_PATH C:/Users/miannucci/msp430)
 else()
@@ -31,14 +35,14 @@

 # Specify the cross compiler
 if(CMAKE_HOST_WIN32)
-    CMAKE_FORCE_C_COMPILER(${MSP430_PATH}/bin/msp430-gcc.exe GNU)
-    CMAKE_FORCE_CXX_COMPILER(${MSP430_PATH}/bin/msp430-g++.exe GNU)
+    set(CMAKE_C_COMPILER ${MSP430_PATH}/bin/msp430-gcc.exe)
+    set(CMAKE_CXX_COMPILER ${MSP430_PATH}/bin/msp430-g++.exe)
 elseif(CMAKE_HOST_APPLE)
-    CMAKE_FORCE_C_COMPILER(${MSP430_PATH}/bin/msp430-gcc GNU)
-    CMAKE_FORCE_CXX_COMPILER(${MSP430_PATH}/bin/msp430-g++ GNU)
+    set(CMAKE_C_COMPILER ${MSP430_PATH}/bin/msp430-gcc)
+    set(CMAKE_CXX_COMPILER ${MSP430_PATH}/bin/msp430-g++)
 else()
-    CMAKE_FORCE_C_COMPILER(msp430-gcc GNU)
-    CMAKE_FORCE_CXX_COMPILER(msp430-g++ GNU)
+    set(CMAKE_C_COMPILER msp430-gcc)
+    set(CMAKE_CXX_COMPILER msp430-g++)
 endif()

 # Where is the target environment located
@@ -61,7 +65,7 @@
 # Create a function that will instantiate a flash target command using mspdebug.
 # you may have to set the path to mspdebug if it is different
 if (CMAKE_HOST_APPLE)
-    set(MSPDEBUG_PATH ${MSP430_PATH}/mspdebug/mspdebug)
+    set(MSPDEBUG_PATH ${MSP430_PATH}/bin/mspdebug)
 else()
     set(MSPDEBUG_PATH mspdebug)
 endif()


Oops! Turn C style and statement into CMake style.

--- CPM.cmake
+++ CPM.cmake
@@ -515,7 +515,7 @@
 endmacro()

 macro(_cpm_obtain_version_from_params parentVar)
-  if ((DEFINED _CPM_USE_EXISTING_VER) && (_CPM_USE_EXISTING_VER))
+  if ((DEFINED _CPM_USE_EXISTING_VER) AND (_CPM_USE_EXISTING_VER))
     # Attempt to pull existing version from module hierarchy. If we don't
     # find any, and the user has defined a version, then use that version
     # (this constitutes falling through without setting parentVar).


fixed non-workspace builds

fixed non-workspace builds

--- cmake/all.cmake
+++ cmake/all.cmake
@@ -107,6 +107,8 @@
 # output catkin version for debugging
 _catkin_package_xml(${CMAKE_BINARY_DIR}/catkin/catkin_generated/version DIRECTORY ${catkin_EXTRAS_DIR}/..)
 message(STATUS "catkin ${catkin_VERSION}")
+# ensure that no current package name is set
+unset(_CATKIN_CURRENT_PACKAGE)

 # set global install destinations
 set(CATKIN_GLOBAL_BIN_DESTINATION bin)


REFAC: update patchelf version in the binary packages

--- Packaging/External_patchelf.cmake
+++ Packaging/External_patchelf.cmake
@@ -41,8 +41,8 @@

 ExternalProject_Add(PATCHELF
   PREFIX "${PATCHELF_PREFIX_DIR}"
-  URL                 "http://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2"
-  URL_MD5             d02687629c7e1698a486a93a0d607947
+  URL                 "https://nixos.org/releases/patchelf/patchelf-0.10/patchelf-0.10.tar.bz2"
+  URL_MD5             6c3f3a06a95705870d129494a6880106
   DOWNLOAD_DIR        "${DOWNLOAD_LOCATION}"
   SOURCE_DIR          "${PATCHELF_SOURCE_DIR}"
   BINARY_DIR          "${PATCHELF_SOURCE_DIR}"


NSIS CPack tweak

NSIS CPack tweak

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -105,6 +105,7 @@

 if(MSVC)
   set(CPACK_GENERATOR "NSIS")
+  set(CPACK_NSIS_MODIFY_PATH ON)
 endif(MSVC)

 if(APPLE)


update CTestConfig file for my.cdash.org

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -3,11 +3,11 @@
 ## project to incorporate the testing dashboard.
 ## # The following are required to uses Dart and the Cdash dashboard
 ##   ENABLE_TESTING()
-##   INCLUDE(Dart)
+##   INCLUDE(CTest)
 set(CTEST_PROJECT_NAME "Eigen")
 set(CTEST_NIGHTLY_START_TIME "05:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "www.cdash.org")
-set(CTEST_DROP_LOCATION "/CDashPublic/submit.php?project=Eigen")
+set(CTEST_DROP_SITE "my.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=Eigen")
 set(CTEST_DROP_SITE_CDASH TRUE)


Fix checkout

Fix checkout

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -61,6 +61,16 @@
       message(STATUS "Update of ${DIR} failed:\n   ${error}")
     endif()

+    # update tag
+    execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD
+      RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT
+      WORKING_DIRECTORY "${DIR}")
+    if(RESULT)
+      message(STATUS "git rebase failed, aborting ${DIR} merge")
+      execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort
+        WORKING_DIRECTORY "${DIR}")
+    endif()
+
     # checkout requested tag
     execute_process(
       COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}"
@@ -69,16 +79,6 @@
       )
     if(nok)
       message(STATUS "${DIR} git checkout ${TAG} failed: ${error}\n")
-    endif()
-
-    # update tag
-    execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD
-      RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT
-      WORKING_DIRECTORY "${DIR}")
-    if(RESULT)
-      message(STATUS "git rebase failed, aborting ${DIR} merge")
-      execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort
-        WORKING_DIRECTORY "${DIR}")
     endif()
   else()
     message(STATUS "Can't update git external ${DIR}: Not a git repository")


Add NO_UPDATE and VERBOSE options to GitExternal

NO_UPDATE can be used to stop branch changes/updates.
VERBOSE displays info about what is being done.

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -7,8 +7,18 @@
 #    update target to bump the tag to the master revision by
 #    recreating .gitexternals.
 #  * Provides function
-#    git_external(<directory> <giturl> <gittag> [RESET <files>])
+#    git_external(<directory> <giturl> <gittag> [NO_UPDATE, VERBOSE] [RESET <files>])
 #  git_external_manage(<file>)
+#
+# [optional] Flags which control behaviour
+#  NO_UPDATE
+#    When set, GitExternal will not change a repo that has already been checked out.
+#    The purpose of this is to allow one to set a default branch to be checked out,
+#    but stop GitExternal from changing back to that branch if the user has checked
+#    out and is working on another.
+#  VERBOSE
+#    When set, displays information about git commands that are executed
+#

 find_package(Git)
 if(NOT GIT_EXECUTABLE)
@@ -17,9 +27,16 @@

 include(CMakeParseArguments)

+macro(GIT_EXTERNAL_MESSAGE msg)
+  if(${GIT_EXTERNAL_VERBOSE})
+    message(STATUS "${NAME} : ${msg}")
+  endif()
+endmacro(GIT_EXTERNAL_MESSAGE)
+
 function(GIT_EXTERNAL DIR REPO TAG)
-  cmake_parse_arguments(GIT_EXTERNAL "" "" "RESET" ${ARGN})
-  get_filename_component(DIR "${DIR}" ABSOLUTE)
+  cmake_parse_arguments(GIT_EXTERNAL "NO_UPDATE;VERBOSE" "" "RESET" ${ARGN})
+  get_filename_component(DIR  "${DIR}" ABSOLUTE)
+  get_filename_component(NAME "${DIR}" NAME)
   get_filename_component(GIT_EXTERNAL_DIR "${DIR}/.." ABSOLUTE)

   if(NOT EXISTS "${DIR}")
@@ -34,51 +51,58 @@
   endif()

   if(IS_DIRECTORY "${DIR}/.git")
-    execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
-      OUTPUT_VARIABLE currentref OUTPUT_STRIP_TRAILING_WHITESPACE
-      WORKING_DIRECTORY ${DIR})
-    if(currentref STREQUAL TAG) # nothing to do
-      return()
-    endif()
-
-    # reset generated files
-    foreach(GIT_EXTERNAL_RESET_FILE ${GIT_EXTERNAL_RESET})
-      execute_process(
-        COMMAND "${GIT_EXECUTABLE}" reset -q "${GIT_EXTERNAL_RESET_FILE}"
+    if (${GIT_EXTERNAL_NO_UPDATE})
+      GIT_EXTERNAL_MESSAGE("Update branch disabled by user")
+    else()
+      GIT_EXTERNAL_MESSAGE("current ref is \"${currentref}\" and tag is \"${TAG}\"")
+      if(currentref STREQUAL TAG) # nothing to do
+        return()
+      endif()
+
+      # reset generated files
+      foreach(GIT_EXTERNAL_RESET_FILE ${GIT_EXTERNAL_RESET})
+        GIT_EXTERNAL_MESSAGE("git reset -q ${GIT_EXTERNAL_RESET_FILE}")
+        execute_process(
+          COMMAND "${GIT_EXECUTABLE}" reset -q "${GIT_EXTERNAL_RESET_FILE}"
+          RESULT_VARIABLE nok ERROR_VARIABLE error
+          WORKING_DIRECTORY "${DIR}")
+        GIT_EXTERNAL_MESSAGE("git checkout -q -- ${GIT_EXTERNAL_RESET_FILE}")
+        execute_process(
+          COMMAND "${GIT_EXECUTABLE}" checkout -q -- "${GIT_EXTERNAL_RESET_FILE}"
+          RESULT_VARIABLE nok ERROR_VARIABLE error
+          WORKING_DIRECTORY "${DIR}")
+      endforeach()
+
+      # fetch latest update
+      GIT_EXTERNAL_MESSAGE("git fetch --all -q")
+      execute_process(COMMAND "${GIT_EXECUTABLE}" fetch --all -q
         RESULT_VARIABLE nok ERROR_VARIABLE error
         WORKING_DIRECTORY "${DIR}")
+      if(nok)
+        message(STATUS "Update of ${DIR} failed:\n   ${error}")
+      endif()
+
+      # checkout requested tag
+      GIT_EXTERNAL_MESSAGE("git checkout -q ${TAG}")
       execute_process(
-        COMMAND "${GIT_EXECUTABLE}" checkout -q -- "${GIT_EXTERNAL_RESET_FILE}"
+        COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}"
         RESULT_VARIABLE nok ERROR_VARIABLE error
+        WORKING_DIRECTORY "${DIR}"
+        )
+      if(nok)
+        message(STATUS "${DIR} git checkout ${TAG} failed: ${error}\n")
+      endif()
+
+      # update tag
+      GIT_EXTERNAL_MESSAGE("git rebase FETCH_HEAD")
+      execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD
+        RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT
         WORKING_DIRECTORY "${DIR}")
-    endforeach()
-
-    # fetch latest update
-    execute_process(COMMAND "${GIT_EXECUTABLE}" fetch --all -q
-      RESULT_VARIABLE nok ERROR_VARIABLE error
-      WORKING_DIRECTORY "${DIR}")
-    if(nok)
-      message(STATUS "Update of ${DIR} failed:\n   ${error}")
-    endif()
-
-    # checkout requested tag
-    execute_process(
-      COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}"
-      RESULT_VARIABLE nok ERROR_VARIABLE error
-      WORKING_DIRECTORY "${DIR}"
-      )
-    if(nok)
-      message(STATUS "${DIR} git checkout ${TAG} failed: ${error}\n")
-    endif()
-
-    # update tag
-    execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD
-      RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT
-      WORKING_DIRECTORY "${DIR}")
-    if(RESULT)
-      message(STATUS "git rebase failed, aborting ${DIR} merge")
-      execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort
-        WORKING_DIRECTORY "${DIR}")
+      if(RESULT)
+        message(STATUS "git rebase failed, aborting ${DIR} merge")
+        execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort
+          WORKING_DIRECTORY "${DIR}")
+      endif()
     endif()
   else()
     message(STATUS "Can't update git external ${DIR}: Not a git repository")


Added Luajit-2.1 support

Added Luajit-2.1 support

Signed-off-by: Vadim A. Misbakh-Soloviov <0317e6896132b03afd1b7513bbabbb42f0b8d888@mva.name>

--- cmake/Modules/FindLuaJIT.cmake
+++ cmake/Modules/FindLuaJIT.cmake
@@ -10,7 +10,7 @@
 find_path(LUA_INCLUDE_DIR luajit.h
   HINTS
     ENV LUA_DIR
-  PATH_SUFFIXES include/luajit-2.0 include
+  PATH_SUFFIXES include/luajit-2.1 include/luajit-2.0 include
   PATHS
   ~/Library/Frameworks
   /Library/Frameworks


Updated cmake module for python testing to search for libs instead of requiring a manual addition of them in the event the system requires them.

--- cmake/TestForPythonEmbed.cmake
+++ cmake/TestForPythonEmbed.cmake
@@ -4,6 +4,11 @@
 #  PYTHON_EMBEDABLE - True if embedable

 find_package(PythonLibs)
+# Some systems require these libs to be explicitly be added for the test
+find_library(DL dl)
+find_library(MATH m)
+find_library(PTHREAD pthread)
+find_library(UTIL util)

 if(PYTHONLIBS_FOUND)
 	MESSAGE(STATUS "Checking if Python is Embedable")
@@ -11,7 +16,7 @@
 	# If on Slackware, uncomment the next line to fix a missing library issue
 	# As of 11/22/2009 this is needed for Slackware 13
 	# SET(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} -ldl -lm -lpthread -lutil)
-	SET(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES})
+	SET(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES} ${DL} ${MATH} ${PTHREAD} ${UTIL})
 	CHECK_C_SOURCE_COMPILES(
 "#include <Python.h>
 int main(int argc, char *argv[]) {


update firestore version

update firestore version

Using firestore version that has a fix for compiler errors seen
on newer versions of g++ (sign-compare).

--- cmake/external/firestore.cmake
+++ cmake/external/firestore.cmake
@@ -18,7 +18,7 @@
   return()
 endif()

-set(version CocoaPods-7.7.0)
+set(version 5f6febab5e133960ca8fc6d2639ea460253bc43a)
 ExternalProject_Add(
   firestore


cmake/modules/FindPYTHON.cmake: Find Python library for the current interpreter.

--- cmake/modules/FindPYTHON.cmake
+++ cmake/modules/FindPYTHON.cmake
@@ -50,11 +50,27 @@
             SET(PYTHON_SITE_PACKAGES "PYTHON_SITE_PACKAGES-NOTFOUND")
         ENDIF()
     ENDIF()
+    IF(NOT PYTHON_VERSION)
+        execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
+                            "from distutils.sysconfig import get_python_version; print get_python_version()"
+                            RESULT_VARIABLE PYTHON_VERSION_NOT_FOUND
+                            OUTPUT_VARIABLE PYTHON_VERSION
+                            OUTPUT_STRIP_TRAILING_WHITESPACE)
+        IF(NOT PYTHON_VERSION_NOT_FOUND)
+            FILE(TO_CMAKE_PATH ${PYTHON_VERSION} PYTHON_VERSION)
+        ELSE()
+            SET(PYTHON_VERSION "PYTHON_VERSION-NOTFOUND")
+        ENDIF()
+    ENDIF()
+    IF(NOT PYTHON_LIBRARY_DIR_NOT_FOUND AND NOT PYTHON_VERSION_NOT_FOUND)
+        find_library(PYTHON_LIBRARY "python${PYTHON_VERSION}" PATHS ${PYTHON_LIBRARY_DIR} NO_DEFAULT_PATH)
+    ENDIF()
 ELSE()
     SET(PYTHON_ROOT "PYTHON_ROOT-NOTFOUND")
     SET(PYTHON_INCLUDE_DIR "PYTHON_INCLUDE_DIR-NOTFOUND")
     SET(PYTHON_LIBRARY_DIR "PYTHON_LIBRARY_DIR-NOTFOUND")
     SET(PYTHON_SITE_PACKAGES "PYTHON_SITE_PACKAGES-NOTFOUND")
+    SET(PYTHON_VERSION "PYTHON_VERSION-NOTFOUND")
 ENDIF()


fix build

fix build

--- cmake_admin/FindReadline.cmake
+++ cmake_admin/FindReadline.cmake
@@ -11,7 +11,7 @@
 find_library ( READLINE_LIBRARIES NAMES readline )

 if ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
-    set ( HAVE_READLINE TRUE CACHE BOOL )
+    set ( HAVE_READLINE TRUE CACHE BOOL "Found readline header and lib" FORCE )
 endif ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )

 include ( FindPackageHandleStandardArgs )


fix wrong cmake logic: DO use system zlib

--- cmakemodules/script_zlib.cmake
+++ cmakemodules/script_zlib.cmake
@@ -13,7 +13,7 @@
 			set(MRPT_ZLIB_LIBS ${ZLIB_LIBRARIES}) # APPEND_MRPT_LIBS(z)

 			set(CMAKE_MRPT_HAS_ZLIB_SYSTEM 1)
-			set(CMAKE_MRPT_HAS_ZLIB_SYSTEM_IS_WX 1)
+			set(CMAKE_MRPT_HAS_ZLIB_SYSTEM_IS_WX 0)
 	else()
 			# If we are using wxWidgets we dont need this... for now check if this is MinGW on Windows...
 			if (WIN32 AND CMAKE_MRPT_HAS_WXWIDGETS)


BUG: Fix Abydos name to include Slicer when building using Slicer

--- Abydos_Kitware_TubeTK_Slicer.cmake
+++ Abydos_Kitware_TubeTK_Slicer.cmake
@@ -22,7 +22,7 @@
 ##############################################################################

 # Follow format for caps and components as given on TubeTK dashboard
-set( SITE_NAME "Abydos.Kitware" )
+set( SITE_NAME "Abydos.Kitware.Slicer" )
 # Follow format for caps and components as given on TubeTK dashboard
 set( SITE_PLATFORM "WindowsXP-VS2010Exp-32" )


fbcode_builder: ThriftCppLibrary: the output depends on the thrift templates

Summary:
Update ThriftCppLibrary.cmake to record that the output depends on the thrift
`cpp2` template files.  The `THRIFT_TEMPLATE_FILES` variable was defined in
D16062657 but doesn't appear to be used anywhere.  This uses it, and also
updates it to only match the C++ template files.

Reviewed By: wez

Differential Revision: D16738442

fbshipit-source-id: aa4097e9ec1d009ef1e3ee2efd03ffa19a82ed12

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -77,7 +77,7 @@

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

   # Emit the rule to run the thrift compiler
@@ -101,6 +101,7 @@
       "${THRIFT_FILE}"
     DEPENDS
       ${ARG_DEPENDS}
+      ${THRIFT_TEMPLATE_FILES}
   )

   # Now emit the library rule to compile the sources


Updated OpenVINO for windows

Updated OpenVINO for windows

--- cmake/ModuleOpenVINO.cmake
+++ cmake/ModuleOpenVINO.cmake
@@ -2,8 +2,8 @@
     message("-- Enabling Intel OpenVINO inference engine module")
     if(WIN32)
         fast_download_dependency(openvino
-                2021.1
-                69628ba6f40094834b0f8b6f38efee6e7fc67cfb44805ffd638177de571aff3e
+                2021.4.2
+		7268d5ab14366e2df017a955ca2aa95c7cbd9a6c690f45113a26fb86d9199714
         )
     elseif(APPLE)
         fast_download_dependency(openvino


[ci] non-parallel build: set NP as well

[ci] non-parallel build: set NP as well

--- ci_gitlab/ctest_common.cmake
+++ ci_gitlab/ctest_common.cmake
@@ -31,14 +31,13 @@
 #include(cmake_host_system_information)
 cmake_host_system_information(RESULT hostname QUERY HOSTNAME)
 cmake_host_system_information(RESULT fqdn QUERY FQDN)
+cmake_host_system_information(RESULT NP QUERY NUMBER_OF_LOGICAL_CORES)

 set(ALLOW_PARALLEL_BUILD 1 CACHE BOOL "Allow parallel build")
-if(ALLOW_PARALLEL_BUILD)
-  cmake_host_system_information(RESULT NP QUERY NUMBER_OF_LOGICAL_CORES)
-  set(CTEST_BUILD_FLAGS -j${NP})
-else()
-  set(CTEST_BUILD_FLAGS -j1)
+if(NOT ALLOW_PARALLEL_BUILD)
+  set(NP 1)
 endif()
+set(CTEST_BUILD_FLAGS -j${NP})

 if(${CMAKE_VERSION} VERSION_GREATER "3.10.3")
   cmake_host_system_information(RESULT osname QUERY OS_NAME)


file globbing

file globbing

--- CMake/mitkMacroInstallPython.cmake
+++ CMake/mitkMacroInstallPython.cmake
@@ -72,10 +72,17 @@
   endforeach()

   # install vtk python. This folder contains all *.py files for VTK module loading.
-  install(DIRECTORY "${VTK_DIR}/Wrapping/Python/vtk"
-          DESTINATION bin/Python
-          USE_SOURCE_PERMISSIONS
-          COMPONENT Runtime)
+  #install(DIRECTORY "${VTK_DIR}/Wrapping/Python/vtk"
+  #        DESTINATION bin/Python
+  #        USE_SOURCE_PERMISSIONS
+  #        COMPONENT Runtime)
+
+  # glob through all files, NSIS can't use directories
+  file(GLOB_RECURSE item RELATIVE "${VTK_DIR}/Wrapping/Python/vtk" "${VTK_DIR}/Wrapping/Python/vtk/*.py")
+  foreach(f ${item})
+    get_filename_component(_filepath "${f}" PATH)
+    install(FILES "${VTK_DIR}/Wrapping/Python/vtk/${f}" DESTINATION bin/Python/vtk/${_filepath})
+  endforeach()

   list(APPEND _python_dirs "${VTK_DIR}/lib")

@@ -105,10 +112,16 @@
   endif()

   if(Numpy_DIR)
-    install(DIRECTORY "${Numpy_DIR}/numpy"
-            DESTINATION bin/Python
-            USE_SOURCE_PERMISSIONS
-            COMPONENT Runtime)
+    #install(DIRECTORY "${Numpy_DIR}/numpy"
+    #        DESTINATION bin/Python
+    #        USE_SOURCE_PERMISSIONS
+    #        COMPONENT Runtime)
+    ## glob through all files, NSIS can't use directories
+    #file(GLOB_RECURSE item RELATIVE "${Numpy_DIR}/numpy" "${Numpy_DIR}/numpy/*")
+    foreach(f ${item})
+      get_filename_component(_filepath "${f}" PATH)
+      install(FILES "${Numpy_DIR}/numpy/${f}" DESTINATION bin/Python/numpy/${_filepath})
+    endforeach()
   endif()

   list(REMOVE_DUPLICATES _python_dirs)


Improve CMake config files to make cross-building plugins easier.

--- cmake-local/osvrConfig.cmake
+++ cmake-local/osvrConfig.cmake
@@ -1,6 +1,9 @@

 # File will only exist in build trees - provides hints to dependencies
 include("${CMAKE_CURRENT_LIST_DIR}/osvrConfigBuildTreePaths.cmake" OPTIONAL)
+
+# Hook for a super-build to optionally inject hints before target import.
+include("${CMAKE_CURRENT_LIST_DIR}/osvrConfigSuperBuildPrefix.cmake" OPTIONAL)

 # Dependency of PluginKit
 find_package(libfunctionality QUIET)
@@ -19,6 +22,9 @@

 set(OSVR_PLUGIN_IGNORE_SUFFIX "@OSVR_PLUGIN_IGNORE_SUFFIX@" CACHE INTERNAL
     "The additional suffix for OSVR plugins that are not to be auto-loaded" FORCE)
+
+# Hook for a super-build to optionally inject configuration after target import.
+include("${CMAKE_CURRENT_LIST_DIR}/osvrConfigSuperBuildSuffix.cmake" OPTIONAL)

 # Since alias targets only work for libraries, we use this method instead to
 # share the osvr_convert_json script between the main tree and external config users.


apple: set -D_DARWIN_C_SOURCE globally

apple: set -D_DARWIN_C_SOURCE globally

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -90,6 +90,17 @@
 	endif (WIN32)
 endif (CMAKE_COMPILER_IS_GNUCXX)

+#
+# Platform specific settings
+#
+if (APPLE)
+
+	# Workaround to not loose functions as soon as feature test macros are used
+	# https://boringssl.googlesource.com/boringssl/+/63a0797ff247f13870b649c3f6239d80be202752
+	# https://charm.cs.illinois.edu/redmine/issues/1743
+	add_definitions (-D_DARWIN_C_SOURCE)
+endif(APPLE)
+
 if (WIN32)
 	set (HAVE_WIN32 "1")
 	message (STATUS "Win32 detected")


Make folder in OpenVINO building on linux

--- cmake/ExternalOpenVINO.cmake
+++ cmake/ExternalOpenVINO.cmake
@@ -11,7 +11,7 @@
         GIT_TAG "2019_R1.1"
         SOURCE_SUBDIR inference-engine
         UPDATE_COMMAND
-            git submodule init COMMAND git submodule update --recursive
+            git submodule init COMMAND git submodule update --recursive COMMAND mkdir -p inference-engine/build/
         CMAKE_ARGS
             -DENABLE_OPENCV:BOOL=OFF
             -DENABLE_OBJECT_DETECTION_TESTS:BOOL=OFF


CMake: Extract Maya version from API headers.

--- cmake/Modules/FindMaya.cmake
+++ cmake/Modules/FindMaya.cmake
@@ -9,6 +9,7 @@
 # MAYA_<lib>_FOUND    Defined if <lib> has been found
 # MAYA_<lib>_LIBRARY  Path to <lib> library
 # MAYA_INCLUDE_DIRS   Path to the devkit's include directories
+# MAYA_API_VERSION    Maya API version
 #
 # IMPORTANT: Currently, there's only support for OSX platform and Maya version 2012.

@@ -134,6 +135,7 @@
     /devkit/plug-ins/
   DOC "Maya's devkit headers path"
 )
+
 LIST(APPEND MAYA_INCLUDE_DIRS ${MAYA_DEVKIT_INC_DIR})

 FOREACH(MAYA_LIB
@@ -162,7 +164,14 @@
   LIST(APPEND ${MAYA_LIBRARIES} MAYA_${MAYA_LIB}_LIBRARY)
 ENDFOREACH(MAYA_LIB)

+if(MAYA_INCLUDE_DIRS AND EXISTS "${MAYA_INCLUDE_DIR}/maya/MTypes.h")
+    FILE(STRINGS ${MAYA_INCLUDE_DIR}/maya/MTypes.h TMP REGEX "#define MAYA_API_VERSION.*$")
+    STRING(REGEX MATCHALL "[0-9]+" MAYA_API_VERSION ${TMP})
+endif()
+
 # handle the QUIETLY and REQUIRED arguments and set MAYA_FOUND to TRUE if
 # all listed variables are TRUE
 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Maya DEFAULT_MSG ${MAYA_LIBRARIES} MAYA_INCLUDE_DIRS)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Maya DEFAULT_MSG
+    ${MAYA_LIBRARIES}
+    MAYA_INCLUDE_DIRS)


CMake: tweak frontend.cmake for Portage and FreeBSD Ports

--- cmake/Modules/frontend.cmake
+++ cmake/Modules/frontend.cmake
@@ -3,11 +3,10 @@
 endif()

 macro(libcaca_check)
-	find_package(libcaca)
-	if(libcaca_FOUND)
-		option(LIBCACA_ENABLE "Enable libcaca frontend" on)
-	endif()
-	if(LIBCACA_ENABLE)
+	option(ENABLE_LIBCACA "Enable libcaca frontend" on)
+
+	if(ENABLE_LIBCACA)
+		find_package(libcaca REQUIRED)
 		set(HAVE_LIBCACA 1)
 		include_directories(${libcaca_INCLUDE_DIR})

@@ -20,12 +19,9 @@
 endmacro()

 macro(sdl2_check)
-	find_package(SDL2)
-	if(SDL2_FOUND)
-		option(SDL2_ENABLE "Enable SDL2 frontend" on)
-	endif()
+	option(ENABLE_SDL2 "Enable SDL2 frontend" on)

-	if(SDL2_ENABLE)
+	if(ENABLE_SDL2)
 		find_package(SDL2 REQUIRED)
 		mark_as_advanced(SDL2_INCLUDE_DIR SDL2_LIBRARY SDL2MAIN_LIBRARY)
 		set(HAVE_SDL2 1)
@@ -41,10 +37,10 @@

 macro(win32_check)
 	if(HAVE_WINDOWS)
-		option(WIN32_ENABLE "Enable the Win32 GDI frontend" on)
+		option(ENABLE_WIN32 "Enable the Win32 GDI frontend" on)
 	endif()

-	if(WIN32_ENABLE)
+	if(ENABLE_WIN32)
 		set(HAVE_WIN32 1)

 		file(GLOB W32_FRONTEND_SOURCES src/frontends/w32/*.c)
@@ -72,8 +68,8 @@
 	endif()

 	# Add the null backend
-	option(NULL_ENABLE "Enable a frontendless sgherm build (testing)" ${NULL_DEFAULT})
-	if(NULL_ENABLE)
+	option(ENABLE_NULL "Enable a frontendless sgherm build (testing)" ${NULL_DEFAULT})
+	if(ENABLE_NULL)
 		file(GLOB NULL_FRONTEND_SOURCES src/frontends/null/*.c)
 		add_executable("sgherm-null" ${NULL_FRONTEND_SOURCES} $<TARGET_OBJECTS:sgherm-core>)
 	endif()


Don't crash and burn when backends aren't found

--- cmake/Modules/frontend.cmake
+++ cmake/Modules/frontend.cmake
@@ -3,10 +3,11 @@
 endif()

 macro(libcaca_check)
-	option(LIBCACA_ENABLE "Enable libcaca frontend" on)
+	find_package(libcaca)
+	if(HAVE_libcaca)
+		option(LIBCACA_ENABLE "Enable libcaca frontend" on)
+	endif()
 	if(LIBCACA_ENABLE)
-		find_package(libcaca REQUIRED)
-		set(HAVE_LIBCACA 1)
 		include_directories(${libcaca_INCLUDE_DIR})

 		file(GLOB LIBCACA_FRONTEND_SOURCES src/frontends/caca/*.c)
@@ -18,7 +19,11 @@
 endmacro()

 macro(sdl2_check)
-	option(SDL2_ENABLE "Enable SDL2 frontend" on)
+	find_package(SDL2)
+	if(HAVE_SDL2)
+		option(SDL2_ENABLE "Enable SDL2 frontend" on)
+	endif()
+
 	if(SDL2_ENABLE)
 		find_package(SDL2 REQUIRED)
 		mark_as_advanced(SDL2_INCLUDE_DIR SDL2_LIBRARY SDL2MAIN_LIBRARY)


Some library defs are private

Some library defs are private

--- cmake/MyPackageLibrary.cmake
+++ cmake/MyPackageLibrary.cmake
@@ -49,7 +49,7 @@
   STRING (TOUPPER ${PROJECT_NAME} _PROJECTNAME)
   IF ((NOT CMAKE_BUILD_TYPE MATCHES Debug) AND (NOT CMAKE_BUILD_TYPE MATCHES RelWithDebInfo))
     FOREACH (_target ${PROJECT_NAME} ${PROJECT_NAME}_static)
-      TARGET_COMPILE_DEFINITIONS(${_target} PUBLIC -D${_PROJECTNAME}_NTRACE)
+      TARGET_COMPILE_DEFINITIONS(${_target} PRIVATE -D${_PROJECTNAME}_NTRACE)
     ENDFOREACH ()
   ENDIF ()
   #
@@ -61,10 +61,10 @@
   SET (${_PROJECTNAME}_VERSION "${${_PROJECTNAME}_VERSION_MAJOR}.${${_PROJECTNAME}_VERSION_MINOR}.${${_PROJECTNAME}_VERSION_PATCH}")
   FOREACH (_target ${PROJECT_NAME} ${PROJECT_NAME}_static)
     TARGET_COMPILE_DEFINITIONS(${_target}
-      PUBLIC -D${_PROJECTNAME}_VERSION_MAJOR=${versionMajor}
-      PUBLIC -D${_PROJECTNAME}_VERSION_MINOR=${versionMinor}
-      PUBLIC -D${_PROJECTNAME}_VERSION_PATCH=${versionPatch}
-      PUBLIC -D${_PROJECTNAME}_VERSION="${${_PROJECTNAME}_VERSION}"
+      PRIVATE -D${_PROJECTNAME}_VERSION_MAJOR=${versionMajor}
+      PRIVATE -D${_PROJECTNAME}_VERSION_MINOR=${versionMinor}
+      PRIVATE -D${_PROJECTNAME}_VERSION_PATCH=${versionPatch}
+      PRIVATE -D${_PROJECTNAME}_VERSION="${${_PROJECTNAME}_VERSION}"
       )
   ENDFOREACH ()
   #


Change upload so it uploads both firmware and eeprom images

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -848,6 +848,7 @@
     endif()

     list(APPEND AVRDUDE_ARGS "-Uflash:w:${TARGET_NAME}.hex")
+    list(APPEND AVRDUDE_ARGS "-Ueeprom:w:${TARGET_NAME}.eep:i")
     add_custom_target(${UPLOAD_TARGET}
                      ${ARDUINO_AVRDUDE_PROGRAM}
                      ${AVRDUDE_ARGS}


[cmake] Reset variable before using it

[cmake] Reset variable before using it

A bunch of macros use the same variable name, and since CMake macros
don't get their own scope, the value persists across macro invocations,
and we can end up exporting targets which shouldn't be exported. Clear
the variable before each use to avoid this.

Converting these macros to functions would also help, since it would
avoid the variable leaking into its parent scope, and that's something I
plan to follow up with. It won't fully address the problem, however,
since functions still inherit variables from their parent scopes, so if
someone in the parent scope just happened to use the same variable name
we'd still have the same issue.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@357036 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -89,7 +89,7 @@
     target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})

     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
-
+      set(export_to_clangtargets)
       if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
           "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
           NOT LLVM_DISTRIBUTION_COMPONENTS)
@@ -137,6 +137,7 @@
   add_dependencies(${name} clang-resource-headers)

   if (CLANG_BUILD_TOOLS)
+    set(export_to_clangtargets)
     if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
         NOT LLVM_DISTRIBUTION_COMPONENTS)
       set(export_to_clangtargets EXPORT ClangTargets)


Add comment to clarify the empty if block, as per gribozavr's review feedback.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -152,6 +152,7 @@
   if("${sdk}" STREQUAL "LINUX")
     list(APPEND result "-lpthread" "-ldl")
   elseif("${sdk}" STREQUAL "FREEBSD")
+    # No extra libraries required.
   else()
     list(APPEND result "-lobjc")
   endif()


Added catch for simulated compiler

Added catch for simulated compiler

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -90,7 +90,7 @@
      message(STATUS "Using clang compiler.")

      # set default cmake c flags for clang
-     set(CMAKE_C_FLAGS "-Wall -std=c11 ${CFLAGS}")
+     set(CMAKE_C_FLAGS "-Wall -std=c11")
      set(CMAKE_C_FLAGS_DEBUG "-g")
      set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
      set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
@@ -144,77 +144,76 @@
          string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

          # if the clang msvc-like command line interface is being used
-         #if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
-         set(CMAKE_CXX_FLAGS
-                 "${CMAKE_CXX_FLAGS}"
-                 " /MD"
-                 " /EHsc"
-                 " /W3"
-                 " /FC"
-                 " /Ox"
-                 " -D_SCL_SECURE_NO_WARNINGS"
-                 " ${CXXFLAGS}"
-                 )
-         string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-
-         # clang-cl 9 doesn't properly implement an alternative for -isystem <dir>
-         # for system headers, all warnings incurred by eigen must be silenced to
-         # make the build log readable.
-         if (CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 12.0.0)
+         if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
              set(CMAKE_CXX_FLAGS
                      "${CMAKE_CXX_FLAGS}"
-                     " -Wno-float-conversion"
-                     " -Wno-unreachable-code-return"
-                     " -Wno-unused-template"
-                     " -Wno-sign-conversion"
-                     " -Wno-undef"
-                     " -Wno-unused-result"
-                     " -Wno-documentation-unknown-command"
-                     " -Wno-missing-prototypes"
-                     " -Wno-missing-noreturn"
-                     " -Wno-deprecated-declarations"
-                     " -Wno-implicit-int-conversion"
-                     " -Wno-shadow-field-in-constructor"
-                     " -Wno-shadow-field"
-                     " -Wno-switch-enum"
-                     " -Wno-cast-align"
-                     " -Wno-float-equal"
-                     " -Wno-deprecated-dynamic-exception-spec"
-                     " -Wno-header-hygiene"
-                     " -Wno-zero-as-null-pointer-constant"
-                     " -Wno-vla-extension"
-                     " -Wno-old-style-cast"
-                     " -Wno-disabled-macro-expansion"
-                     " -Wno-covered-switch-default"
-                     " -Wno-range-loop-analysis"
-                     " -Wno-shadow"
-                     " -Wno-reserved-id-macro"
-                     " -Wno-float-overflow-conversion"
-                     " -Wno-unknown-argument"
-                     " -Wno-extra-semi"
-                     " -Wno-global-constructors"
-                     " -Wno-extra-semi-stmt"
-                     " -Wno-documentation-deprecated-sync"
-                     " -Wno-unused-variable"
-                     " -Wno-shadow-uncaptured-local"
-                     " -Wno-documentation"
-                     " -Wno-deprecated"
-                     " -Wno-unused-macros"
-                     " -Wno-vla"
-                     " -Wno-unreachable-code-break"
-                     " -Wno-implicit-fallthrough"
-                     " -Wno-conditional-uninitialized"
-                     " -Wno-exit-time-destructors"
-                     " -Wno-undefined-func-template"
-                     " -Wno-c++98-compat"
-                     " -Wno-shorten-64-to-32"
-                     " -Wno-c++98-compat-pedantic"
-                     " -Wno-used-but-marked-unused" # : boost unit tests. should be reinabled and sorted out.
-                     " -Wno-newline-eof" # : end of line newline. should be reinabled and so.
-                     " -Wno-return-std-move-in-c++11" # :
+                     " /MD"
+                     " /EHsc"
+                     " /W3"
+                     " /FC"
+                     " /Ox"
+                     " -D_SCL_SECURE_NO_WARNINGS"
                      )
              string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-             #endif ()
+
+             # clang-cl 9 doesn't properly implement an alternative for -isystem <dir>
+             # for system headers, all warnings incurred by eigen must be silenced to
+             # make the build log readable.
+             if (CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 12.0.0)
+                 set(CMAKE_CXX_FLAGS
+                         "${CMAKE_CXX_FLAGS}"
+                         " -Wno-float-conversion"
+                         " -Wno-unreachable-code-return"
+                         " -Wno-unused-template"
+                         " -Wno-sign-conversion"
+                         " -Wno-undef"
+                         " -Wno-unused-result"
+                         " -Wno-documentation-unknown-command"
+                         " -Wno-missing-prototypes"
+                         " -Wno-missing-noreturn"
+                         " -Wno-deprecated-declarations"
+                         " -Wno-implicit-int-conversion"
+                         " -Wno-shadow-field-in-constructor"
+                         " -Wno-shadow-field"
+                         " -Wno-switch-enum"
+                         " -Wno-cast-align"
+                         " -Wno-float-equal"
+                         " -Wno-deprecated-dynamic-exception-spec"
+                         " -Wno-header-hygiene"
+                         " -Wno-zero-as-null-pointer-constant"
+                         " -Wno-vla-extension"
+                         " -Wno-old-style-cast"
+                         " -Wno-disabled-macro-expansion"
+                         " -Wno-covered-switch-default"
+                         " -Wno-range-loop-analysis"
+                         " -Wno-shadow"
+                         " -Wno-reserved-id-macro"
+                         " -Wno-float-overflow-conversion"
+                         " -Wno-unknown-argument"
+                         " -Wno-extra-semi"
+                         " -Wno-global-constructors"
+                         " -Wno-extra-semi-stmt"
+                         " -Wno-documentation-deprecated-sync"
+                         " -Wno-unused-variable"
+                         " -Wno-shadow-uncaptured-local"
+                         " -Wno-documentation"
+                         " -Wno-deprecated"
+                         " -Wno-unused-macros"
+                         " -Wno-vla"
+                         " -Wno-unreachable-code-break"
+                         " -Wno-implicit-fallthrough"
+                         " -Wno-conditional-uninitialized"
+                         " -Wno-exit-time-destructors"
+                         " -Wno-undefined-func-template"
+                         " -Wno-c++98-compat"
+                         " -Wno-shorten-64-to-32"
+                         " -Wno-c++98-compat-pedantic"
+                         " -Wno-used-but-marked-unused" # : boost unit tests. should be reinabled and sorted out.
+                         " -Wno-newline-eof" # : end of line newline. should be reinabled and so.
+                         " -Wno-return-std-move-in-c++11" # :
+                         )
+                 string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+             endif ()
          endif ()
          set(CMAKE_CXX_FLAGS_DEBUG "-g")
          set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")


fix rosbuild naming of checked test results

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -583,7 +583,7 @@
   endif(CMAKE_MINOR_VERSION LESS 6)
   add_dependencies(test test_${_testname})
   # Register check for test output
-  _rosbuild_check_rostest_xml_result(${_testname} ${rosbuild_test_results_dir}/${PROJECT_NAME}/TEST-${_testname}.xml)
+  _rosbuild_check_rostest_xml_result(${_testname} ${rosbuild_test_results_dir}/${PROJECT_NAME}/rostest-${_testname}.xml)
 endmacro(rosbuild_add_gtest)

 # A version of add_gtest that checks a label against ROS_BUILD_TEST_LABEL
@@ -624,7 +624,7 @@
   endif(CMAKE_MINOR_VERSION LESS 6)
   add_dependencies(test pyunit_${_testname})
   # Register check for test output
-  _rosbuild_check_rostest_xml_result(${_testname} ${rosbuild_test_results_dir}/${PROJECT_NAME}/TEST-${_testname}.xml)
+  _rosbuild_check_rostest_xml_result(${_testname} ${rosbuild_test_results_dir}/${PROJECT_NAME}/rosunit-${_testname}.xml)
 endmacro(rosbuild_add_pyunit)

 # A version of add_pyunit that checks a label against ROS_BUILD_TEST_LABEL


Add PATCH_COMMAND to eigen.cmake

Add PATCH_COMMAND to eigen.cmake

--- tensorflow/contrib/cmake/external/eigen.cmake
+++ tensorflow/contrib/cmake/external/eigen.cmake
@@ -18,6 +18,12 @@
 #  sha256 = "...",
 #  build_file = "eigen.BUILD",
 #)
+
+option(eigen_PATCH_FILE "Patch file to apply to eigen" OFF)
+set(eigen_PATCH_COMMAND "")
+if(eigen_PATCH_FILE)
+    set(eigen_PATCH_COMMAND PATCH_COMMAND patch -p0 -i "${eigen_PATCH_FILE}")
+endif(eigen_PATCH_FILE)

 include (ExternalProject)

@@ -45,6 +51,7 @@
     URL ${eigen_URL}
     DOWNLOAD_DIR "${DOWNLOAD_LOCATION}"
     INSTALL_DIR "${eigen_INSTALL}"
+    ${eigen_PATCH_COMMAND}
     CMAKE_CACHE_ARGS
         -DCMAKE_BUILD_TYPE:STRING=Release
         -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF


Remove strange APPLE-specific cpack code which is just wrong

--- packages/pack-glow.cmake
+++ packages/pack-glow.cmake
@@ -131,23 +131,19 @@
             Delete \\\"$TEMP\\\\${MSVC_REDIST_NAME}\\\"
             ")
     endif()
-
+
     # Install files
-
-    if(APPLE)
-        set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};glow;/")
-    else()
-        set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};glow;ALL;/")
-    endif()
+
+    set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};glow;ALL;/")
     set(CPACK_PACKAGE_INSTALL_DIRECTORY     "${package_name}")
     set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY  "${package_name}")
     if(NOT WIN32)
         set(CPACK_INSTALL_PREFIX            "/usr/")
     endif()

-
+
     # Set generator
-
+
     set(CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CPackConfig-${project_name}.cmake")
     set(CPACK_GENERATOR     "ZIP;TGZ;DEB;NSIS;")


COMP: Do not set instruction optimizations with WASI-SDK

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -217,7 +217,7 @@
          list(APPEND InstructionSetOptimizationFlags
               /arch:SSE /arch:SSE2)
       endif()
-    elseif(NOT EMSCRIPTEN)
+    elseif(NOT EMSCRIPTEN OR WASI)
       if (${CMAKE_C_COMPILER} MATCHES "icc.*$")
         set(USING_INTEL_ICC_COMPILER TRUE)
       endif()


start version 3.4

start version 3.4

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -34,7 +34,7 @@
 cmake_policy(POP)

 set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set (Mathematica_CMAKE_MODULE_VERSION "3.3.1")
+set (Mathematica_CMAKE_MODULE_VERSION "3.4.0")

 # activate select policies
 if (POLICY CMP0025)


Fix SDL compilation missing DX includes when using OpenGL and DirectX SDK.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -484,9 +484,14 @@
     add_definitions (-DURHO3D_DATABASE -DURHO3D_DATABASE_SQLITE)
 endif ()

-# Find Direct3D include & library directories in MS Windows SDK or DirectX SDK when not using OpenGL.
-if (WIN32 AND NOT URHO3D_OPENGL)
-    find_package (Direct3D REQUIRED)
+# Find Direct3D include & library directories in MS Windows SDK or DirectX SDK. They may also be required by SDL
+# even if using OpenGL instead of Direct3D, but do not make Direct3D REQUIRED in that case
+if (WIN32)
+    if (NOT URHO3D_OPENGL)
+        find_package (Direct3D REQUIRED)
+    else ()
+        find_package (Direct3D)
+    endif ()
     if (DIRECT3D_INCLUDE_DIRS)
         include_directories (${DIRECT3D_INCLUDE_DIRS})
     endif ()


intel_adsp: simplify bootloader cmake file

Checking for existence if cmake files here is not needed and was used
with out of tree boards.

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

--- soc/xtensa/intel_adsp/common/bootloader.cmake
+++ soc/xtensa/intel_adsp/common/bootloader.cmake
@@ -3,17 +3,7 @@
 # SPDX-License-Identifier: Apache-2.0

 set(SOC_FAMILY intel_adsp)
-
-if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/bootloader/CMakeLists.txt)
-  if(USING_OUT_OF_TREE_BOARD)
-    set(build_dir boards/${ARCH}/${BOARD}/bootloader)
-  else()
-    unset(build_dir)
-  endif()
-
-  add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/bootloader ${build_dir})
-endif()
-
+add_subdirectory(bootloader)
 set(ELF_FIX ${SOC_DIR}/${ARCH}/${SOC_FAMILY}/common/fix_elf_addrs.py)

 add_custom_target(


Fixed issue with flags.cmake

Fixed issue with flags.cmake

--- examples/mysql/flags.cmake
+++ examples/mysql/flags.cmake
@@ -1,2 +1,2 @@
 set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -I/usr/local/include" )
-set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-L/usr/local/lib -lmysqlpp")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib -lmysqlpp")


Switch libjpeg-turbo to dynamic CRT

Switch libjpeg-turbo to dynamic CRT

--- bootstrap/get.cmake
+++ bootstrap/get.cmake
@@ -322,7 +322,7 @@
     SHA1 "fe49aea935617748c21ecbe46c986d6c1b98f39b")
   y3_extract("${_package}.tar.gz" DIR ${_package})
   y3_cmake(${_package} TARGET "jpeg-static" BUILD_TO_PREFIX
-    OPTIONS -DCMAKE_ASM_NASM_COMPILER=${NASM_EXECUTABLE} -DENABLE_SHARED=OFF -DREQUIRE_SIMD=ON -DWITH_TURBOJPEG=OFF)
+    OPTIONS -DCMAKE_ASM_NASM_COMPILER=${NASM_EXECUTABLE} -DENABLE_SHARED=OFF -DREQUIRE_SIMD=ON -DWITH_CRT_DLL=ON -DWITH_TURBOJPEG=OFF)
   file(INSTALL
     ${BUILD_DIR}/${_package}/jconfig.h
     ${BUILD_DIR}/${_package}/jerror.h


fix glfw cmake file

fix glfw cmake file

--- ext/glfw.cmake
+++ ext/glfw.cmake
@@ -42,7 +42,7 @@
 	# TEST_COMMAND      ""
     CMAKE_ARGS
             "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
-            "-DCMAKE_BUILD_TYPE=Release"
+            "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
             "-DGLFW_BUILD_EXAMPLES=OFF"
             "-DGLFW_BUILD_TESTS=OFF"
             "-DGLFW_BUILD_DOCS=OFF"


Fix build issue on older windows boxes

Fix build issue on older windows boxes

--- deps/uv.cmake
+++ deps/uv.cmake
@@ -91,6 +91,9 @@
     ${LIBUVDIR}/src/win/winsock.c
     ${LIBUVDIR}/src/win/winsock.h
   )
+  if ("${MSVS_VERSION}" LESS "2015")
+    set(SOURCES ${SOURCES} ${LIBUVDIR}/src/win/snprintf.c)
+  endif()
 else()
   include_directories(${LIBUVDIR}/src/unix)
   set(SOURCES ${SOURCES}


mimxrt1050_evk: Fix setting of JLINK_DEVICE

The '=' character was incorrectly getting passed to the JLinkGDBServer
device argument, and caused the server to fail to connect to the target.

Signed-off-by: Maureen Helm <87a696db5547fa477bda9f9e0f00013c839c14d3@nxp.com>

--- boards/arm/mimxrt1050_evk/board.cmake
+++ boards/arm/mimxrt1050_evk/board.cmake
@@ -10,6 +10,8 @@
   set_ifndef(DEBUG_SCRIPT jlink.sh)
 endif()

+set(JLINK_DEVICE Cortex-M7)
+
 set_property(GLOBAL APPEND PROPERTY FLASH_SCRIPT_ENV_VARS
-  JLINK_DEVICE=Cortex-M7
+  JLINK_DEVICE
   )


Update links to programming language drivers on the download page.

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -132,9 +132,12 @@

 #### Connectors

-- Perl driver, [CPAN home](http://search.cpan.org/~yuran/MR-Tarantool/)
+- Perl driver, [MR:Tarantool](http://search.cpan.org/~yuran/MR-Tarantool/)
+- An alternative Perl driver implementation, [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.22/lib/DR/Tarantool.pm)
 - [Ruby driver](https://github.com/mailru/tarantool-ruby)
 - Python driver, [hosted at pypi.python.org](http://pypi.python.org/pypi/tarantool)
+- PHP driver [https://github.com/mailru/tarantool-php](https://github.com/mailru/tarantool-php)
+- Java driver, [Maven repository](http://dgreenru.github.com/tarantool-java)

 {% page download ru %}

@@ -273,6 +276,9 @@

 ### Доступ из языков программирования

-- Perl driver, [CPAN home](http://search.cpan.org/~yuran/MR-Tarantool/)
+- Perl driver, [MR:Tarantool](http://search.cpan.org/~yuran/MR-Tarantool/)
+- An alternative Perl driver implementation, [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.22/lib/DR/Tarantool.pm)
 - [Ruby driver](https://github.com/mailru/tarantool-ruby)
 - Python driver, [hosted at pypi.python.org](http://pypi.python.org/pypi/tarantool)
+- PHP driver [https://github.com/mailru/tarantool-php](https://github.com/mailru/tarantool-php)
+- Java driver, [Maven repository](http://dgreenru.github.com/tarantool-java)


Change description

Change description

--- build/Package.cmake
+++ build/Package.cmake
@@ -32,7 +32,7 @@
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}")

 # Common
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Haka runtime is a tool that allows to capture network traffic and filter them based on Lua policy files.")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Haka runtime is a tool that allows capturing and filtering network traffic based on Lua policy files.")
 set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CPackEnv.cmake")
 FILE(WRITE "${CPACK_PROJECT_CONFIG_FILE}" "set(ENV{LD_LIBRARY_PATH} \"${CMAKE_CURRENT_BINARY_DIR}/_CPack_Packages/\${CPACK_TOPLEVEL_TAG}/DEB/\${CPACK_PACKAGE_FILE_NAME}/${HAKA_INSTALL_PREFIX}/lib\")\n")
 install(FILES LICENSE.txt DESTINATION ${HAKA_INSTALL_PREFIX}/share/doc/haka)


BUG: windows need all .lib files for devel.

--- Packaging/install_importlibs.cmake
+++ Packaging/install_importlibs.cmake
@@ -5,37 +5,18 @@
     return()
   endif()

-  set(search_regex  "..IMPORTED_IMPLIB_([A-Z]+)...{_IMPORT_PREFIX}\/lib\/")
-  if(NOT WIN32)
-    set(search_regex    "..IMPORTED_LOCATION_([A-Z]+)...{_IMPORT_PREFIX}\/lib\/")
-  endif()
-
-  file(GLOB_RECURSE
-    target_cmake_files
-    "${SUPERBUILD_INSTALL_DIR}/lib/cmake/ITK*/*Targets-*.*"
-    "${SUPERBUILD_INSTALL_DIR}/lib/cmake/OTB*/*Targets-*.*")
-
-  set(lib_files)
-  foreach( target_cmake_file ${target_cmake_files})
-    if(PKG_DEBUG)
-      message("checking IMPORTED_IMPLIB_RELEASE in ${target_cmake_file}")
-    endif()
-    file(STRINGS "${target_cmake_file}" matched_items REGEX "${search_regex}")
-    foreach(matched_item ${matched_items})
-      if(matched_item MATCHES "otbapp_")
-	continue()
-      endif()
-      string(REGEX REPLACE "${search_regex}" "" lib_file "${matched_item}")
-      string(REGEX REPLACE "\"" "" lib_file "${lib_file}")
-      list(APPEND lib_files "${SUPERBUILD_INSTALL_DIR}/lib/${lib_file}")
-    endforeach()
-  endforeach()
-
-  foreach(lib_file ${lib_files})
-    if(PKG_DEBUG)
-      message("SPECIAL install_rule for lib_file: ${lib_file}")
-    endif()
-    install_rule(${lib_file})
+  #ALL .lib files are required for building
+  #eg: gdal.dll will have gdal_i.lib which is
+  #needed when you do cmake configure for projects
+  #using OTB. Hence the *.lib regex is non optional
+  #and cannot be optimized at any level.
+  #Only thing you can control is to create only those
+  #required .lib files in install directory. This exclude
+  #all otb*.*testdriver.lib etc..
+  file(GLOB import_lib_files
+    "${SUPERBUILD_INSTALL_DIR}/lib/*.lib")
+  foreach( import_lib_file ${import_lib_files})
+    install_rule(${import_lib_file})
   endforeach()


- Fixing BuildFunctions again

- Fixing BuildFunctions again

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -11,11 +11,9 @@
 # Wrappers to get rid of boilerplate and cross-platform-ness (ahem, Android)

 macro(TARGET_ENABLE_CXX11 TARGET)
-    if(ANDROID)
-        if(CMAKE_MAJOR_VERSION < 3 OR CMAKE_MINOR_VERSION < 1)
-            # Android's compiler doesn't support target_compile_features :(
-            set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
-        endif()
+    if(ANDROID OR CMAKE_MAJOR_VERSION VERSION_LESS 3 AND CMAKE_MINOR_VERSION VERSION_LESS 1)
+        # Android's compiler doesn't support target_compile_features :(
+        set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
     elseif(APPLE)
         # To get around old Clang versions
         set(CMAKE_CXX_FLAGS "-stdlib=libc++ -std=c++11 ${CMAKE_CXX_FLAGS}")


Retry once more for Segmentation fault

Retry once more for Segmentation fault

--- cmake/modules/RootTestDriver.cmake
+++ cmake/modules/RootTestDriver.cmake
@@ -190,6 +190,11 @@
   else()
     execute_process(COMMAND ${_cmd} ${_out} ${_err} ${_cwd} RESULT_VARIABLE _rc)

+    if(_rc STREQUAL "Segmentation fault")
+       message(STATUS "Got ${_rc}, retrying again once more...")
+       execute_process(COMMAND ${_cmd} ${_out} ${_err} ${_cwd} RESULT_VARIABLE _rc)
+    endif()
+
     if(DEFINED RC AND (NOT _rc EQUAL RC))
       message(FATAL_ERROR "error code: ${_rc}")
     elseif(NOT DEFINED RC AND _rc)


cmake: nice bug fix in qi_stage_lib

cmake: nice bug fix in qi_stage_lib

--- cmake/qibuild/internal/stage.cmake
+++ cmake/qibuild/internal/stage.cmake
@@ -239,7 +239,14 @@
 endfunction()

-function(_qi_internal_stage_lib target ${ARGN})
+function(_qi_internal_stage_lib target)
+  message(STATUS "
+
+  In _qi_internal_stage_lib:
+  called with ${target} ${ARGN}
+
+  "
+  )
   cmake_parse_arguments(ARG "" "" "STAGED_NAME" ${ARGN})
   string(TOUPPER ${target} _U_target)
   string(TOLOWER ${target} _l_target)


Beginnings of simpler and more robust namespace mapping.

--- CPM.cmake
+++ CPM.cmake
@@ -90,6 +90,21 @@
 #  CPM_USING_NS_HEADER_FILE   - Header file containing using directives for all
 #                               automatically generated header files.
 #  CPM_PREPROC_NS_HEADER_FILE - Header which includes namespace directives.
+#  CPM_KV_MOD_VERSION_MAP_*   - A key/value module version mapping.
+#                               Key: Unique path (no version)
+#                               Val: The most recently added module version.
+#                               This is used to enforce, if requested, that
+#                               only one version of a particular module exists
+#                               in the build chain.
+#  CPM_KV_PREPROC_NS_DEFS_*   - A key/value C preprocessor namespace mapping.
+#                               Key: C Preprocessor name.
+#                               Val: The *full* unique ID of the module.
+#                               This ensures that namespace definitions do not
+#                               overlap on one another. Either by accident by
+#                               naming different modules the same, or through
+#                               an imported modules interface (modules can
+#                               force you to import a particular version of
+#                               a module if they expose it in their interface).
 #
 #-------------------------------------------------------------------------------
 # Pre-compute a regex to match documented keywords for each command.
@@ -347,7 +362,37 @@

 endfunction()

-function(CPM_AddModule)
+# Exports the module with 'name'. This is necessary if you need to expose
+# other module interfaces through your interface. It is not necessary if you
+# are just using the module, but is necessary if you expose the module's
+# interface in your CPM module's interface. CPM runs a check to see if you are
+# using non-exported modules in your interface code, and fails/warns if you are.
+# The check is not exhastive however.
+macro(CPM_ExportModuleInterface name)
+
+endmacro()
+
+# This macro initializes a CPM module. We use a macro for this code so that
+# we can set variables in the parent namespace (if any).
+# name - Same as the name parameter in CPM_AddModule. A preprocessor definition
+#        using this name will be generated for namespaces.
+macro(CPM_InitModule name)
+  # Construct a preprocessor value using 'name'. We use add_definitions.
+
+endmacro()
+
+# This macro forces one, and only one, version of a module to be linked into
+# a program. If any part of the build chain uses a different version of the
+# module, then the CMake configure step will fail with a verbose error.
+macro(CPM_ForceOnlyOneModuleVersion)
+  # Set a flag in the parent namespace to force a check against module name
+  # and version.
+  set(CPM_FORCE_ONLY_ONE_MODULE_VERSION TRUE)
+endmacro()
+
+# name - Required as this name determines what preprocessor definition will
+#        be generated for this module.
+function(CPM_AddModule name)

   # Parse all function arguments into our namespace prepended with _CPM_.
   _cpm_parse_arguments(CPM_AddModule _CPM_ "${ARGN}")
@@ -379,12 +424,13 @@
     string(REGEX REPLACE "https://github.com/" "github_" __CPM_PATH_UNID "${__CPM_PATH_UNID}")
     string(REGEX REPLACE "http://github.com/" "github_" __CPM_PATH_UNID "${__CPM_PATH_UNID}")

-    set(__CPM_PATH_UNID "${__CPM_PATH_UNID}_${_CPM_GIT_TAG}")
+    set(__CPM_PATH_UNID_VERSION "${_CPM_GIT_TAG}")
   endif()

   # Check to see if the source is stored locally.
   if (DEFINED _CPM_SOURCE_DIR)
     set(__CPM_PATH_UNID ${_CPM_SOURCE_DIR})
+    set(__CPM_PATH_UNID_VERSION "")
     set(__CPM_MODULE_SOURCE_DIR "${_CPM_SOURCE_DIR}")
   endif()

@@ -394,11 +440,18 @@
   # Ensure the 'hyphen (-)' is at the beginning or end of the [].
   string(REGEX REPLACE "[:/\\.?-]" "" __CPM_PATH_UNID "${__CPM_PATH_UNID}")

+  # Do the same for the version ID.
+  string(REGEX REPLACE "/" "_" __CPM_PATH_UNID_VERSION "${__CPM_PATH_UNID_VERSION}")
+  string(REGEX REPLACE "[:/\\.?-]" "" __CPM_PATH_UNID_VERSION "${__CPM_PATH_UNID_VERSION}")
+
+  # Cunstruct full UNID
+  set(__CPM_FULL_UNID "${__CPM_PATH_UNID}_${__CPM_PATH_UNID_VERSION}")
+
   # Construct paths from UNID
-  set(__CPM_MODULE_BIN_DIR "${__CPM_BASE_MODULE_DIR}/${__CPM_PATH_UNID}/bin")
+  set(__CPM_MODULE_BIN_DIR "${__CPM_BASE_MODULE_DIR}/${__CPM_FULL_UNID}/bin")

   if (__CPM_USING_GIT)
-    set(__CPM_MODULE_SOURCE_DIR "${__CPM_BASE_MODULE_DIR}/${__CPM_PATH_UNID}/src")
+    set(__CPM_MODULE_SOURCE_DIR "${__CPM_BASE_MODULE_DIR}/${__CPM_FULL_UNID}/src")
     # Download the code if it doesn't already exist. Otherwise make sure
     # the code is updated (on the latest branch or tag).
     if (NOT EXISTS "${__CPM_MODULE_SOURCE_DIR}/")
@@ -535,9 +588,9 @@
   # the add subdirectory.

   # Set variables CPM will use inside of the library target.
-  set(CPM_UNIQUE_ID ${__CPM_PATH_UNID})
-  set(CPM_TARGET_NAME "${__CPM_PATH_UNID}_ep")
-  set(CPM_OUTPUT_LIB_NAME ${__CPM_PATH_UNID})
+  set(CPM_UNIQUE_ID ${__CPM_FULL_UNID})
+  set(CPM_TARGET_NAME "${__CPM_FULL_UNID}_ep")
+  set(CPM_OUTPUT_LIB_NAME ${__CPM_FULL_UNID})
   set(CPM_DIR ${CPM_DIR_OF_CPM})

   # Set target output directories.
@@ -552,9 +605,16 @@
   # with further calls to CPM.
   set(__CPM_USING_GIT)
   set(__CPM_BASE_MODULE_DIR)
+  set(CPM_FORCE_ONLY_ONE_MODULE_VERSION)

   # Setup the project.
   add_subdirectory("${__CPM_MODULE_SOURCE_DIR}" "${__CPM_MODULE_BIN_DIR}")
+
+  if (DEFINED CPM_FORCE_ONLY_ONE_MODULE_VERSION)
+    if(CPM_FORCE_ONLY_ONE_MODULE_VERSION)
+      # Check version of __CPM_PATH_UNID in our pre-existing map key/value map.
+    endif()
+  endif()

   if (DEFINED CPM_LAST_MODULE_NAME)
     # Build the include header files for the module in the current autogen dir.
@@ -581,7 +641,7 @@

   # Append a definition to the cpm header file that must be included to
   # correct for the namespace modifications.
-  file(APPEND ${CPM_USING_NS_HEADER_FILE} "using namespace ${__CPM_PATH_UNID};\n")
+  file(APPEND ${CPM_USING_NS_HEADER_FILE} "using namespace ${__CPM_FULL_UNID};\n")

   # Append target to pre-existing libraries.
   set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)


Remove build command from date build module

--- cmake/modules/Build-HinnantDate.cmake
+++ cmake/modules/Build-HinnantDate.cmake
@@ -8,7 +8,6 @@
   PATCH_COMMAND ${PATCH_SCRIPT_PATH} ${CMAKE_PATCH_DIR}/date_win.patch
   INSTALL_DIR ${DATE_INSTALL_DIR}
   DEPENDS CURL::libcurl
-  BUILD_COMMAND cmake --build . --target install
 )

 ExternalProject_Get_Property(


[cmake] Disable a GCC optimization when building LLVM for MIPS

GCC when compiling LLVM for MIPS can introduce a jump to an uninitialized
value when shrink wrapping is enabled. As shrink wrapping is enabled in
GCC at all optimization levels, it must be disabled. This bug exists for
all versions of GCC since 4.9.2.

This partially resolves PR37701 / GCC PR target/86069.

Patch by Simon Dardis.

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -247,6 +247,11 @@
     # On Windows all code is PIC. MinGW warns if -fPIC is used.
   else()
     add_flag_or_print_warning("-fPIC" FPIC)
+  endif()
+  # GCC for MIPS can miscompile LLVM due to PR37701.
+  if(CMAKE_COMPILER_IS_GNUCXX AND LLVM_NATIVE_ARCH STREQUAL "Mips" AND
+         NOT Uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+    add_flag_or_print_warning("-fno-shrink-wrap" FNO_SHRINK_WRAP)
   endif()
 endif()


From Pere: fix ACLiC for CMake builds on Windows

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@42285 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -352,12 +352,16 @@
 install(FILES ${CMAKE_BINARY_DIR}/include/RConfigure.h DESTINATION include)

 #---Configure and install various files----------------------------------------------------------------------
-execute_Process(COMMAND uname -a OUTPUT_VARIABLE BuildNodeInfo OUTPUT_STRIP_TRAILING_WHITESPACE )
+execute_Process(COMMAND hostname OUTPUT_VARIABLE BuildNodeInfo OUTPUT_STRIP_TRAILING_WHITESPACE )

 configure_file(${CMAKE_SOURCE_DIR}/config/rootrc.in ${CMAKE_BINARY_DIR}/etc/system.rootrc @ONLY)
 configure_file(${CMAKE_SOURCE_DIR}/config/RConfigOptions.in include/RConfigOptions.h)
-configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.in include/compiledata.h)
+if(WIN32)
+  configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.win32.in include/compiledata.h)
+else()
+  configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.in include/compiledata.h)
+endif()
 configure_file(${CMAKE_SOURCE_DIR}/config/Makefile-comp.in config/Makefile.comp)
 configure_file(${CMAKE_SOURCE_DIR}/config/Makefile.in config/Makefile.config)
 configure_file(${CMAKE_SOURCE_DIR}/config/mimes.unix.in ${CMAKE_BINARY_DIR}/etc/root.mimes)


Change the arch argument for configure_sdk_unix to architectures (#15756)

General purpose cross compilation from host x to targets a,b,c will
require the ability to have multiple architectures passed to
`configure_sdk_unix`. Simply change the function to accept multiple
archs.

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -143,27 +143,28 @@
 endmacro()

 macro(configure_sdk_unix
-    prefix name lib_subdir triple_name arch triple sdkpath)
+    prefix name lib_subdir triple_name architectures triple sdkpath)
   # Note: this has to be implemented as a macro because it sets global
   # variables.

-  # Todo: this only supports building an SDK for one target arch only.
   set(SWIFT_SDK_${prefix}_NAME "${name}")
-  set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "${sdkpath}")
   set(SWIFT_SDK_${prefix}_VERSION "don't use")
   set(SWIFT_SDK_${prefix}_BUILD_NUMBER "don't use")
   set(SWIFT_SDK_${prefix}_DEPLOYMENT_VERSION "")
   set(SWIFT_SDK_${prefix}_LIB_SUBDIR "${lib_subdir}")
   set(SWIFT_SDK_${prefix}_VERSION_MIN_NAME "")
   set(SWIFT_SDK_${prefix}_TRIPLE_NAME "${triple_name}")
-  set(SWIFT_SDK_${prefix}_ARCHITECTURES "${arch}")
+  set(SWIFT_SDK_${prefix}_ARCHITECTURES "${architectures}")
   if("${prefix}" STREQUAL "CYGWIN")
     set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "COFF")
   else()
     set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "ELF")
   endif()

-  set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE "${triple}")
+  foreach(arch ${architectures})
+    set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "${sdkpath}")
+    set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE "${triple}")
+  endforeach()

   # Add this to the list of known SDKs.
   list(APPEND SWIFT_CONFIGURED_SDKS "${prefix}")


cmake: dts.cmake: Use SOC_PATH to find soc/dts.fixup

Per arch the path to the SOC dir that we would find dts.fixup varies
between being ${CONFIG_SOC_FAMILY}/${CONFIG_SOC_SERIES} and just
${CONFIG_SOC}.  The ${SOC_PATH} var handles defining this correct so
use it instead when we define DTS_SOC_FIXUP_FILE.

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -89,7 +89,7 @@
   if(EXISTS ${DTS_BOARD_FIXUP_FILE})
     set(DTS_BOARD_FIXUP -f ${DTS_BOARD_FIXUP_FILE})
   endif()
-  set_ifndef(DTS_SOC_FIXUP_FILE ${PROJECT_SOURCE_DIR}/arch/${ARCH}/soc/${CONFIG_SOC_FAMILY}/${CONFIG_SOC_SERIES}/dts.fixup)
+  set_ifndef(DTS_SOC_FIXUP_FILE ${PROJECT_SOURCE_DIR}/arch/${ARCH}/soc/${SOC_PATH}/dts.fixup)
   if(EXISTS ${DTS_SOC_FIXUP_FILE})
     set(DTS_SOC_FIXUP -f ${DTS_SOC_FIXUP_FILE})
   endif()


fixing build...

fixing build...

--- cmake/ucm.cmake
+++ cmake/ucm.cmake
@@ -62,7 +62,7 @@
 macro(ucm_set_runtime)
     cmake_parse_arguments(ARG "STATIC;DYNAMIC;PRINT_FLAGS" "" "" ${ARGN})

-    if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ${PRINT_FLAGS} STREQUAL "")
+    if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND "${ARG_PRINT_FLAGS}" STREQUAL "")
         message(AUTHOR_WARNING "ucm_set_runtime() does not support clang yet!")
     endif()


allow overwrite of DLOPEN flags from command line

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -917,8 +917,12 @@

 #####################################
 # Do we want to link in libssl and kerberos or dlopen() them at runtime?
-if (LINUX AND NOT WANT_PYTHON_WHEELS)
-	set( DLOPEN_SECURITY_LIBS TRUE )
+if (NOT DEFINED DLOPEN_SECURITY_LIBS)
+	if (LINUX AND NOT WANT_PYTHON_WHEELS)
+		set(DLOPEN_SECURITY_LIBS TRUE)
+	else()
+		set(DLOPEN_SECURITY_LIBS FALSE)
+	endif()
 endif()

 ################################################################################
@@ -1060,8 +1064,12 @@

 #####################################
 # Do we want to link in the GSI libraries or dlopen() them at runtime?
-if (HAVE_EXT_GLOBUS AND LINUX AND NOT WANT_PYTHON_WHEELS)
-	set( DLOPEN_GSI_LIBS TRUE )
+if (NOT DEFINED DLOPEN_GSI_LIBS)
+	if (HAVE_EXT_GLOBUS AND LINUX AND NOT WANT_PYTHON_WHEELS)
+		set(DLOPEN_GSI_LIBS TRUE)
+	else()
+		set(DLOPEN_GSI_LIBS FALSE)
+	endif()
 endif()

 message(STATUS "********* External configuration complete (dropping config.h) *********")


Re-enable Google coredumper on 32-bit linux, part 2.

Both 32- and 64-bit versions of rhel3 don't like the newer version of
coredumper.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -477,7 +477,7 @@

 if (NOT WINDOWS)

-	if (${SYSTEM_NAME} MATCHES "rhel3" AND ${SYS_ARCH} MATCHES "X86_64")
+	if (${SYSTEM_NAME} MATCHES "rhel3")
 		# The new version of 2011.05.24-r31 doesn't compile on rhel3/x86_64
 		add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/coredumper/0.2)
 	else ()


allow stamps to work on windows

allow stamps to work on windows

--- cmake/stamp.cmake
+++ cmake/stamp.cmake
@@ -1,5 +1,6 @@
 function(stamp FILE)
+  get_filename_component(FILE_ONLY ${FILE} NAME)
   configure_file(${FILE}
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/stamps/${FILE}
+    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/stamps/${PROJECT_NAME}/${FILE_ONLY}
     @ONLY)
 endfunction()


Fix typo in documentation and path of execute_test.cmake script.

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -67,7 +67,7 @@
 #
 # Using PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION would
 # do as well, but CMake/CTest does not allow us to specify an
-# expected exist status. Moreover, the execute_test.cmake script
+# expected exit status. Moreover, the execute_test.cmake script
 # sets environment variables needed by the --fromenv/--tryfromenv tests.
 macro (add_gflags_test name expected_rc expected_output unexpected_output cmd)
   add_test (
@@ -76,7 +76,7 @@
                                "-DEXPECTED_RC:STRING=${expected_rc}"
                                "-DEXPECTED_OUTPUT:STRING=${expected_output}"
                                "-DUNEXPECTED_OUTPUT:STRING=${unexpected_output}"
-                               -P "${PROJECT_SOURCE_DIR}/test/execute_test.cmake"
+                               -P "${CMAKE_CURRENT_LIST_DIR}/execute_test.cmake"
     WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/test"
   )
 endmacro ()


SVN_SILENT made messages (.desktop file)

--- xine/xine.desktop.cmake
+++ xine/xine.desktop.cmake
@@ -56,6 +56,7 @@
 Name[sv]=Xine
 Name[th]=Xine
 Name[tr]=Xine
+Name[ug]=Xine
 Name[uk]=Xine
 Name[x-test]=xxXinexx
 Name[zh_CN]=Xine


Issue #1: Try to quieten boost output.

Issue #1: Try to quieten boost output.

--- CMake/ExternalProjects/Boost.cmake
+++ CMake/ExternalProjects/Boost.cmake
@@ -150,6 +150,7 @@
       ${_with_boost_libs}
       # Use the option below to view the shell commands (for debugging)
       #-d+4
+      -d 0
       variant=${_boost_variant}
       link=${_boost_link}
       ${_boost_cxxflags}


Added quoting for source and binary paths

--- CMake/mitkFunctionUseModules.cmake
+++ CMake/mitkFunctionUseModules.cmake
@@ -171,7 +171,7 @@

   if(ALL_INCLUDE_DIRECTORIES)
     foreach(_include_dir ${ALL_INCLUDE_DIRECTORIES})
-      if(_include_dir MATCHES ^${CMAKE_SOURCE_DIR} OR _include_dir MATCHES ^${CMAKE_BINARY_DIR})
+      if(_include_dir MATCHES "^${CMAKE_SOURCE_DIR}" OR _include_dir MATCHES "^${CMAKE_BINARY_DIR}")
         include_directories(${_include_dir})
       else()
         include_directories(SYSTEM ${_include_dir})


Remove NDK toolchain checks and debugging config from android.cmake

--- toolchains/android.cmake
+++ toolchains/android.cmake
@@ -1,25 +1,4 @@
 add_definitions(-DPLATFORM_ANDROID)
-
-if(NOT MAKE_BUILD_TOOL)
-    message(SEND_ERROR "Provide ndk make, located in <NDK_ROOT>/prebuilt/<OS>/bin/, -DMAKE_BUILD_TOOL=<NDK_PREBUILT_BIN>/make")
-    return()
-else()
-    set(CMAKE_BUILD_TOOL ${MAKE_BUILD_TOOL})
-    message(STATUS "Will use make prebuilt tool located at : ${CMAKE_BUILD_TOOL}")
-endif()
-
-FILE(READ "$ENV{ANDROID_NDK}/RELEASE.TXT" NDK_VERSION_STRING)
-string(FIND ${NDK_VERSION_STRING} "r10e" NDK_MATCH)
-if(${NDK_MATCH} LESS 0)
-  message(SEND_ERROR "Please use NDK version r10e as $ANDROID_NDK")
-  return()
-endif()
-
-# check for unsupported compilers
-check_unsupported_compiler_version()
-
-# configurations
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic")

 # build external dependencies
 add_subdirectory(${PROJECT_SOURCE_DIR}/external)


Graph Control 4.0.4-1 Gold

Graph Control 4.0.4-1 Gold

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_MAJOR 4 )
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 4 )
-set ( HPCC_MATURITY "rc" )
+set ( HPCC_MATURITY "release" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


Split off 8.8.26

Split off 8.8.26

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 25 )
+set ( HPCC_POINT 27 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.4.48

Split off 8.4.48

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 4 )
-set ( HPCC_POINT 47 )
+set ( HPCC_POINT 49 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Nagios Monitoring 7.8.32-rc1 Release Candidate 1

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 31 )
-set ( HPCC_MATURITY "closedown" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_POINT 32 )
+set ( HPCC_MATURITY "rc" )
+set ( HPCC_SEQUENCE 1 )
 ###


Remove volume test

Remove volume test

Will remove volume_test.py file once test parity is achieved

--- girder/cumulus/plugin.cmake
+++ girder/cumulus/plugin.cmake
@@ -2,7 +2,6 @@
 add_python_test(job PLUGIN cumulus)
 add_python_test(cluster PLUGIN cumulus)
 add_python_test(script PLUGIN cumulus)
-add_python_test(volume PLUGIN cumulus)
 add_python_test(aws PLUGIN cumulus)
 add_python_test(upload PLUGIN cumulus)
 add_python_style_test(python_static_analysis_cumulus "${PROJECT_SOURCE_DIR}/plugins/cumulus/server")


fptu-cmake: fix minor typo.

fptu-cmake: fix minor typo.

--- cmake.fptu/os.cmake
+++ cmake.fptu/os.cmake
@@ -48,7 +48,7 @@
   # In Mac OS, the dynamic linker recognizes
   # @loader_path, @executable_path and @rpath tokens, ex:
   #   '@loder_path/lit.dylib'
-  # means load lit from the same dir the requesting binary lives in.
+  # means load lib from the same dir the requesting binary lives in.
   # Since our dynamic libraries aren't intended for static linking,
   # this is pretty much irrelevant. Disable CMake rpath features
   # altogether. Suppresses a few warnings.


doxygen: add modules/sofa to the list of inputs

Former-commit-id: c4fb8ea916e7da167758489174130422e9c018c8

--- cmake/doxygen.cmake
+++ cmake/doxygen.cmake
@@ -104,14 +104,6 @@
         sofa_list_intersection(documentable_dependencies project_dependencies SOFA_DOCUMENTABLE_PROJECTS)
         set(input "${GLOBAL_PROJECT_PATH_${project}}")

-        # Temporary workaround for modules, which are not organised by directory:
-        # we extract the list of source files from the CMakeLists.txt files.
-        if("${input}" MATCHES ".*/modules/sofa/component/.*")
-            if(NOT WIN32)
-                execute_process(COMMAND bash -c "sed -e 's/#.*//' ${input}/CMakeLists.txt | sed -ne '/\\.\\.\\/.*\\(h\\|cpp\\|inl\\)/s/.*\\(\\.\\.\\/.*\\(h\\|cpp\\|inl\\)\\).*/\\1/p' | sed -e ':foo;N;$!bfoo;s/\\n/ /g' | sed -e 's:\\.\\.:${SOFA_SRC_DIR}/modules/sofa/component:g'" OUTPUT_VARIABLE input)
-            endif()
-        endif()
-
         add_doc_target("${project}" "${input}" "${documentable_dependencies};SOFA")
     endforeach()

@@ -171,7 +163,7 @@
         add_doc_target("SOFA" "${SOFA_FRAMEWORK_DIR}/sofa ${SOFA_BUILD_DIR}/misc/doc.h ${SOFA_BUILD_DIR}/misc/component_list.h" "")
         add_dependencies("doc-SOFA" "component_list")
     else()
-        add_doc_target("SOFA" "${SOFA_FRAMEWORK_DIR}/sofa ${SOFA_BUILD_DIR}/misc/doc.h" "")
+        add_doc_target("SOFA" "${SOFA_FRAMEWORK_DIR}/sofa ${SOFA_MODULES_DIR}/sofa ${SOFA_BUILD_DIR}/misc/doc.h" "")
     endif()
     set_target_properties("doc-SOFA" PROPERTIES FOLDER "Documentation") # IDE Folder


cmake: Update S2N bundle to add dummy serialization functions

--- cmake/openssl.cmake
+++ cmake/openssl.cmake
@@ -5,7 +5,7 @@
   ExternalProject_Add(s2n_bundle
           PREFIX s2n
           URL https://github.com/fwsGonzo/s2n_bundle/releases/download/v1/s2n_bundle.tar.gz
-          URL_HASH MD5=6677a1526b5f450a9605c388577923b7
+          URL_HASH MD5=657af3e79e3a8ef08e2be5150386d193
           CONFIGURE_COMMAND ""
           BUILD_COMMAND ""
           UPDATE_COMMAND ""


Enable debug trace, and remove prepare job


Fix the link for TBB

Fix the link for TBB

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -146,7 +146,7 @@

 # ThreadingBuildingBlocks
 find_package(TBB)
-macro_log_feature(TBB_FOUND "tbb" "Threading Building Blocks" "http://openttb.org/" FALSE "" "")
+macro_log_feature(TBB_FOUND "tbb" "Threading Building Blocks" "http://www.threadingbuildingblocks.org/" FALSE "" "")


ExternalData: Add backtrace to missing file warning

Since commit 32e48028 (If the original file is missing, make it
non-fatal, 2013-10-31) we use a STATUS message instead of a FATAL_ERROR
to report that a DATA{} reference names a missing file.  The STATUS
message has no backtrace.  Use an AUTHOR_WARNING message instead.

Also restore the FATAL_ERROR message when the DATA{} reference names a
file that exists as a directory.

Change-Id: I2cbcb8f6667074401ea9f7743cf6e547ec5061a0

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -399,6 +399,7 @@
   set(external "") # Entries external to the source tree.
   set(internal "") # Entries internal to the source tree.
   set(have_original ${data_is_directory})
+  set(have_original_as_dir 0)

   # Process options.
   set(series_option "")
@@ -449,11 +450,18 @@
   endif()

   if(NOT have_original)
-    message(STATUS "Data file referenced by argument\n"
+    if(have_original_as_dir)
+      set(msg_kind FATAL_ERROR)
+      set(msg "that is directory instead of a file!")
+    else()
+      set(msg_kind AUTHOR_WARNING)
+      set(msg "that does not exist as a file (with or without an extension)!")
+    endif()
+    message(${msg_kind} "Data file referenced by argument\n"
       "  ${arg}\n"
       "corresponds to source tree path\n"
       "  ${reldata}\n"
-      "that does not exist as a file (with or without an extension)!")
+      "${msg}")
   endif()

   if(external)
@@ -570,27 +578,33 @@
       set(alg "")
     endif()
     if("x${relname}" MATCHES "^x${regex}$" # matches
-        AND NOT IS_DIRECTORY "${top_src}/${entry}" # not a directory
         AND NOT "x${relname}" MATCHES "(^x|/)\\.ExternalData_" # not staged obj
         )
-      set(name "${top_src}/${relname}")
-      set(file "${top_bin}/${relname}")
-      if(alg)
-        list(APPEND external "${file}|${name}|${alg}")
-      elseif(ExternalData_LINK_CONTENT)
-        _ExternalData_link_content("${name}" alg)
-        list(APPEND external "${file}|${name}|${alg}")
-      elseif(NOT top_same)
-        list(APPEND internal "${file}|${name}")
-      endif()
-      if("${relname}" STREQUAL "${reldata}")
-        set(have_original 1)
+      if(IS_DIRECTORY "${top_src}/${entry}")
+        if("${relname}" STREQUAL "${reldata}")
+          set(have_original_as_dir 1)
+        endif()
+      else()
+        set(name "${top_src}/${relname}")
+        set(file "${top_bin}/${relname}")
+        if(alg)
+          list(APPEND external "${file}|${name}|${alg}")
+        elseif(ExternalData_LINK_CONTENT)
+          _ExternalData_link_content("${name}" alg)
+          list(APPEND external "${file}|${name}|${alg}")
+        elseif(NOT top_same)
+          list(APPEND internal "${file}|${name}")
+        endif()
+        if("${relname}" STREQUAL "${reldata}")
+          set(have_original 1)
+        endif()
       endif()
     endif()
   endforeach()
   set(external "${external}" PARENT_SCOPE)
   set(internal "${internal}" PARENT_SCOPE)
   set(have_original "${have_original}" PARENT_SCOPE)
+  set(have_original_as_dir "${have_original_as_dir}" PARENT_SCOPE)
 endfunction()

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


Ensure we never auto initialize anything twice

This will cause duplicate symbol declarations and a compile failure.

Change-Id: I765db8ce0abf2f11770d42b979a0eaa4ab3f83f9

--- CMake/vtkModuleAPI.cmake
+++ CMake/vtkModuleAPI.cmake
@@ -67,6 +67,7 @@
   list(SORT _${ns}_AUTOINIT) # Deterministic order.
   foreach(mod ${_${ns}_AUTOINIT})
     list(SORT _${ns}_AUTOINIT_${mod}) # Deterministic order.
+    list(REMOVE_DUPLICATES _${ns}_AUTOINIT_${mod})
     list(LENGTH _${ns}_AUTOINIT_${mod} _ai_len)
     string(REPLACE ";" "," _ai "${_ai_len}(${_${ns}_AUTOINIT_${mod}})")
     if(${_ai_len} GREATER 1 AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio")


--- xine/xine.desktop.cmake
+++ xine/xine.desktop.cmake
@@ -112,7 +112,7 @@
 Comment[sr@latin]=Xine kao pozadina Phonona
 Comment[sv]=Phonon Xine-gränssnitt
 Comment[th]=โปรแกรมเบื้องหลัง Xine ของ Phonon
-Comment[tr]=Phonon Xine arka ucu
+Comment[tr]=Phonon Xine arkaucu
 Comment[ug]=Phonon Xine نىڭ ئارقائۇچى
 Comment[uk]=Модуль використання Xine у Phonon
 Comment[x-test]=xxPhonon Xine backendxx


CMake: Deduplicate entries in DEAL_II_USER_INCLUDE_DIRS

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29238 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_finalize.cmake
+++ deal.II/cmake/setup_finalize.cmake
@@ -35,7 +35,15 @@
 ENDFOREACH()

 #
-# Depulicate entries in DEAL_II_EXTERNAL_LIBRARIES(_...):
+# Deduplicate entries in DEAL_II_USER_INCLUDE_DIRS
+#
+IF(NOT "${DEAL_II_USER_INCLUDE_DIRS}" STREQUAL "")
+  LIST(REMOVE_DUPLICATES DEAL_II_USER_INCLUDE_DIRS)
+ENDIF()
+
+#
+# Deduplicate entries in DEAL_II_EXTERNAL_LIBRARIES(_...)
+# in reverse order:
 #
 IF(NOT "${DEAL_II_EXTERNAL_LIBRARIES}" STREQUAL "")
   LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES)


Pass along correct 'make' to sub-builds.

If the top-level cmake has a custom make specified through -DCMAKE_MAKE_PROGRAM
then this must be passed along to the sub-build processes in compiler-rt or the
build process will fail.

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -284,7 +284,8 @@
   ExternalProject_Add(${name}
     PREFIX ${prefix}
     SOURCE_DIR ${COMPILER_RT_LIBCXX_PATH}
-    CMAKE_ARGS -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER}
+    CMAKE_ARGS -DCMAKE_MAKE_PROGRAM:STRING=${CMAKE_MAKE_PROGRAM}
+               -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER}
                -DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_COMPILER}
                -DCMAKE_C_FLAGS=${LIBCXX_CFLAGS}
                -DCMAKE_CXX_FLAGS=${LIBCXX_CFLAGS}


Fix standalone plugin compilation for Windows

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -413,11 +413,11 @@
 endif()

 if(ENABLE_BUILD_HARDENING)
-  include(${CMAKE_CURRENT_LIST_DIR}/OpenCVCompilerDefenses.cmake)
+  include("${CMAKE_CURRENT_LIST_DIR}/OpenCVCompilerDefenses.cmake")
 endif()

 if(MSVC)
-  include(cmake/OpenCVCRTLinkage.cmake)
+  include("${CMAKE_CURRENT_LIST_DIR}/OpenCVCRTLinkage.cmake")
   add_definitions(-D_VARIADIC_MAX=10)
 endif()


- Remove unnecessary properties from MacAppBuild

--- cmake/Packaging/MacAppBuild.cmake
+++ cmake/Packaging/MacAppBuild.cmake
@@ -101,8 +101,6 @@
     if(IOS)
         set_target_properties ( ${TARGET} PROPERTIES
                             XCODE_PRODUCT_TYPE "com.apple.product-type.application"
-                            XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11"
-                            XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++"
                             )

         target_link_libraries ( ${TARGET} ${SDL2_LIBRARY} ${SDL2_LIBRARIES} )


[cxxmodules] Remove TVersionCheck.h from Core C++ module blacklist

This header is supported in the C++ module, so we can remove it from
the blacklist.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -470,7 +470,7 @@
     endif()
   endif(APPLE)

-  set(excluded_headers RConfig.h RVersion.h RtypesImp.h TVersionCheck.h
+  set(excluded_headers RConfig.h RVersion.h RtypesImp.h
                         Rtypes.h RtypesCore.h TClassEdit.h
                         TIsAProxy.h TVirtualIsAProxy.h
                         DllImport.h TGenericClassInfo.h


HPCC-14299 Add cmake common functions

HPCC-14299 Add cmake common functions

Signed-off-by: Gleb Aronsky <9746c29e6ed593f1e1ccbe1aacaf8f0320155813@lexisnexis.com>

--- cmake_modules/nmCommonSetup.cmake
+++ cmake_modules/nmCommonSetup.cmake
@@ -485,3 +485,52 @@
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
         endif()
   ENDMACRO()
+
+  function(LIST_TO_STRING separator outvar)
+    set ( tmp_str "" )
+    list (LENGTH ARGN list_length)
+    if ( ${list_length} LESS 2 )
+      set ( tmp_str "${ARGN}" )
+    else()
+      math(EXPR last_index "${list_length} - 1")
+
+      foreach( index RANGE ${last_index} )
+        if ( ${index} GREATER 0 )
+          list( GET ARGN ${index} element )
+          set( tmp_str "${tmp_str}${separator}${element}")
+        else()
+          list( GET ARGN 0 element )
+          set( tmp_str "${element}")
+        endif()
+      endforeach()
+    endif()
+    set ( ${outvar} "${tmp_str}" PARENT_SCOPE )
+  endfunction()
+
+  function(STRING_TO_LIST separator outvar stringvar)
+    set( tmp_list "" )
+    string(REPLACE "${separator}" ";" tmp_list ${stringvar})
+    string(STRIP "${tmp_list}" tmp_list)
+    set( ${outvar} "${tmp_list}" PARENT_SCOPE)
+  endfunction()
+
+
+
+  ###########################################################################
+  ###
+  ## The following sets the dependency list for a package
+  ###
+  ###########################################################################
+  function(SET_DEPENDENCIES cpackvar)
+    set(_tmp "")
+    if(${cpackvar})
+      STRING_TO_LIST(", " _tmp ${${cpackvar}})
+    endif()
+    foreach(element ${ARGN})
+      list(APPEND _tmp ${element})
+    endforeach()
+    list(REMOVE_DUPLICATES _tmp)
+    LIST_TO_STRING(", " _tmp "${_tmp}")
+    set(${cpackvar} "${_tmp}" CACHE STRING "" FORCE)
+    message(STATUS "Updated ${cpackvar} to ${${cpackvar}}")
+  endfunction()


do not loose CTEST_FAILURE_MESSAGE from ctest_submit command

--- ctest_ext.cmake
+++ ctest_ext.cmake
@@ -561,7 +561,8 @@
         ctest_submit(RETURN_VALUE res)

         if(NOT res EQUAL 0)
-            set(CTEST_FAILURE_MESSAGE "${CTEST_FAILURE_MESSAGE}\n- Submit stage failed" PARENT_SCOPE)
+            set(CTEST_FAILURE_MESSAGE "${CTEST_FAILURE_MESSAGE}\n- Submit stage failed")
+            set(CTEST_FAILURE_MESSAGE "${CTEST_FAILURE_MESSAGE}" PARENT_SCOPE)
         endif()
     endif()


Adding '-g' to mac builds

Adding '-g' to mac builds

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -195,7 +195,7 @@
   # This is a known issue where getcontext(3) is writing past the end of the
   # ucontext_t struct when _XOPEN_SOURCE is not defined (rdar://problem/5578699 ).
   # As a workaround, define _XOPEN_SOURCE before including ucontext.h.
-  add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
+  add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE -g)
   set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
   set(DARWIN_extra_cstar_flags "-mlong-branch")


fixed path on mac

fixed path on mac

--- include.cmake
+++ include.cmake
@@ -64,7 +64,7 @@
             set(GAMS_DISTRIB /Library/Frameworks/GAMS.framework/Versions/${GAMS_DISTRIB_MAJOR}/Resources)
             set(GAMSINC
 "GAMS_DISTRIB=${GAMS_DISTRIB}\n\
-GAMS_DISTRIB_C_API=${GAMS_DISTRIB}/apifiles/C/api\
+GAMS_DISTRIB_C_API=${GAMS_DISTRIB}/apifiles/C/api\n\
 GAMS_DISTRIB_CPP_API=${GAMS_DISTRIB}/apifiles/C++/api")

         elseif(UNIX AND NOT APPLE)


Add new search path for OpenGL libraries on Ubuntu 11.10

--HG--
branch : v1-8

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

 if(OGRE_BUILD_PLATFORM_TEGRA2)


Make ITK customizable

Make ITK customizable

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -45,6 +45,8 @@
     )
   endif()

+  mitk_query_custom_ep_vars()
+
   ExternalProject_Add(${proj}
      LIST_SEPARATOR ${sep}
      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.13.1.tar.xz
@@ -59,10 +61,13 @@
        -DGDCM_DIR:PATH=${GDCM_DIR}
        -DITK_USE_SYSTEM_HDF5:BOOL=ON
        -DHDF5_DIR:PATH=${HDF5_DIR}
+       ${${proj}_CUSTOM_CMAKE_ARGS}
      CMAKE_CACHE_ARGS
        ${ep_common_cache_args}
+       ${${proj}_CUSTOM_CMAKE_CACHE_ARGS}
      CMAKE_CACHE_DEFAULT_ARGS
        ${ep_common_cache_default_args}
+       ${${proj}_CUSTOM_CMAKE_CACHE_DEFAULT_ARGS}
      DEPENDS ${proj_DEPENDENCIES}
     )


Denoise FLP

Denoise FLP

--- FindLibraryPackage.cmake
+++ FindLibraryPackage.cmake
@@ -220,9 +220,6 @@
         string(REGEX REPLACE ".*[ \t]([0-9.]+)" "\\1"
           ${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION
           ${${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION})
-        message("${name} -> ${_flp_trans} ${${_flp_${name}_UC}_VERSION}
-          ${${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION}
-          EXACT ${_flp_${name}_REQ} ${_flp_${name}_QUIET}")
         find_package(${_flp_trans}
           ${${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION}
           EXACT ${_flp_${name}_REQ} ${_flp_${name}_QUIET})


more modifications of ann url

more modifications of ann url

--- ann.cmake
+++ ann.cmake
@@ -13,7 +13,7 @@

 external_source (libann
     1.1.2
-    libann_1.1.2.tar.gz
+    ann_1.1.2.tar.gz
     7ffaacc7ea79ca39d4958a6378071365
     http://www.cs.umd.edu/~mount/ANN/Files/1.1.2)


MSVC: Disabled warnings in build

MSVC: Disabled warnings in build

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -1,38 +1,25 @@
 # CUSTOM PROPERTIES TO SET
-
 # GLOBAL

-#set(CMAKE_BUILD_TYPE "Debug")
 set(CMAKE_VERBOSE_MAKEFILE ON)
 set(BUILD_STATIC_LIBRARY ON)
 set(USE_OPEN_MP OFF)
 set(TCL_VERSION 8.5)
-#set(PYTHON_INCLUDE_DIRS "/usr/include/python2.7")
-##set(BUILD_CSOUND_AC OFF)
-##set(BUILD_CSOUND_AC_PYTHON_INTERFACE OFF)
-##set(BUILD_CSOUND_AC_LUA_INTERFACE OFF)

-#### NOTE the processor type needs setting
-#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wall -mtune=core2")
-## also to test multicore
-#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wno-missing-field-initializers -Wno-unused-parameter -mtune=core2 -DJPFF")
-
+# Disable the following warnings in msvc
+# C4244 loss of data in conversion
+# C4267 loss of data in conversion
+# C4005 macro refinitions
+# C4996 unsafe functions
+set(CMAKE_C_FLAGS "${CMAKE_CX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996")

 set(BUILD_PD_CLASS OFF)

-#list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
-#  "c:/Program Files/Mega-Nerd/libsndfile/include")
-#list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
-#  "c:/Program Files/Mega-Nerd/libsndfile/lib")
-
-
+# FIXME this is supposedly a bad thing, figure out something else maybe
 list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
   "${CMAKE_CURRENT_BINARY_DIR}/../deps/include")
 list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
   "${CMAKE_CURRENT_BINARY_DIR}/../deps/lib")

-#list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
-#    "c:/Python25/libs")
-#list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
-#    "c:/Python25/include")