on first configure run that list is empty, we need to avoid it.

--- cmake/packages/deb.cmake
+++ cmake/packages/deb.cmake
@@ -58,11 +58,15 @@
 set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}")

 set(conffiles_list "")
-list(REMOVE_DUPLICATES INSTALL_CONFIGFILES_LIST)
-foreach (_configFile ${INSTALL_CONFIGFILES_LIST})
-  list(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${_configFile})
-  set(conffiles_list "${conffiles_list}${_configFile}\n")
-endforeach()
+if ("${INSTALL_CONFIGFILES_LIST}" STREQUAL "")
+  message("the list is empty in this turn")
+else()
+  list(REMOVE_DUPLICATES INSTALL_CONFIGFILES_LIST)
+  foreach (_configFile ${INSTALL_CONFIGFILES_LIST})
+    list(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${_configFile})
+    set(conffiles_list "${conffiles_list}${_configFile}\n")
+  endforeach()
+endif()

 set(DH_CONFFILES_NAME "${PROJECT_BINARY_DIR}/conffiles")
 FILE(WRITE ${DH_CONFFILES_NAME} "${conffiles_list}")


FindPython2 for platforms with python3 as their main python

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -13,6 +13,20 @@

 # defines $CAPABS depending on installation
 include(${CMAKE_CURRENT_LIST_DIR}/settings.cmake)
+
+if (${CMAKE_VERSION} VERSION_LESS "3.12")
+  #ultimate fallback
+  set(Python2_EXECUTABLE python)
+  find_program(Python2 python2.7)
+  if (NOT Python2)
+    #brutal fallback
+    set(Python2_EXECUTABLE python)
+  else()
+    set(Python2_EXECUTABLE ${Python2})
+  endif()
+else()
+  find_package(Python2 COMPONENTS Interpreter)
+endif()

 # Arch-specific defines & options
 if ("${ARCH}" STREQUAL "x86_64")
@@ -139,7 +153,7 @@
 if (EXISTS ${CMAKE_SOURCE_DIR}/nacl.txt)
   add_custom_command(
      OUTPUT nacl_content.cpp
-     COMMAND cat ${CMAKE_SOURCE_DIR}/nacl.txt | python ${INSTALL_LOC}/nacl/NaCl.py ${CMAKE_BINARY_DIR}/nacl_content.cpp
+     COMMAND cat ${CMAKE_SOURCE_DIR}/nacl.txt | ${Python2_EXECUTABLE} ${INSTALL_LOC}/nacl/NaCl.py ${CMAKE_BINARY_DIR}/nacl_content.cpp
      DEPENDS ${CMAKE_SOURCE_DIR}/nacl.txt
    )
    add_library(nacl_content STATIC nacl_content.cpp)
@@ -386,7 +400,7 @@
                          REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
   add_custom_command(
     OUTPUT  memdisk.o
-    COMMAND python ${INSTALL_LOC}/memdisk/memdisk.py --file memdisk.asm ${DISK_RELPATH}
+    COMMAND ${Python2_EXECUTABLE} ${INSTALL_LOC}/memdisk/memdisk.py --file memdisk.asm ${DISK_RELPATH}
     COMMAND nasm -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} memdisk.asm -o memdisk.o
     DEPENDS ${DISK_RELPATH}
   )


using more modern cmake syntax

using more modern cmake syntax

--- cmake/stm32/common.cmake
+++ cmake/stm32/common.cmake
@@ -42,11 +42,14 @@
 find_program(CMAKE_DEBUGGER NAMES ${STM32_TARGET_TRIPLET}-gdb PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
 find_program(CMAKE_CPPFILT NAMES ${STM32_TARGET_TRIPLET}-c++filt PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)

-FUNCTION(stm32_print_size_of_target TARGET)
-    # this target is always considered out of date so size will always be displayed on build
-    ADD_CUSTOM_TARGET(${TARGET}_size ALL COMMAND ${CMAKE_SIZE} ${TARGET}${CMAKE_EXECUTABLE_SUFFIX_C}
-                                                        DEPENDS ${TARGET}${CMAKE_EXECUTABLE_SUFFIX_C})
-ENDFUNCTION()
+function(stm32_print_size_of_target TARGET)
+    add_custom_command(
+       TARGET ${TARGET}
+       POST_BUILD
+       COMMAND ${CMAKE_SIZE} ${TARGET}${CMAKE_EXECUTABLE_SUFFIX_C}
+       COMMENT "Target Sizes: "
+    )
+endfunction()

 function(stm32_get_chip_type FAMILY DEVICE TYPE)
     set(INDEX 0)


renamed mitkReportWriter to mitkTemplateReportWriter

--- Core/Controllers/files.cmake
+++ Core/Controllers/files.cmake
@@ -9,7 +9,7 @@
   mitkOperationEvent.cpp
   mitkProgressBar.cpp
   mitkRenderingManager.cpp
-  mitkReportGenerator.cpp
+  mitkTemplateReportWriter.cpp
   mitkSliceNavigationController.cpp
   mitkSlicesCoordinator.cpp
   mitkSlicesRotator.cpp


ENH: Detection of libraries enhanced in UNIX.

--- CMake/FindGDCM.cmake
+++ CMake/FindGDCM.cmake
@@ -10,13 +10,22 @@
 #  GDCM_LIBRARIES         = full path to the GDCM library and linker flags on unix
 #  CMAKE_GDCM_CXX_FLAGS   = compiler flags for building GDCM
 #  GDCM_INCLUDE_DIR       = include path of GDCM
-
+#
+#
+#   NOTE: That GDCM *MUST* be build as a shared library
+#         because it its distributed under a LGPL license.
+#         This is currently the only way for using GDCM
+#         at a open license level similar to ITK.
+#
+#
+#
 IF(WIN32)
   IF(NOT UNIX)

   SET (GDCM_POSSIBLE_LIB_PATHS
     /usr/lib
     /usr/local/lib
+    $ENV{HOME}/local/lib
     $ENV{CREATIS}/gdcm/lib/Release
     $ENV{CREATIS}/gdcm/lib/Debug
     $ENV{CREATIS}/gdcm/lib/
@@ -128,10 +137,13 @@

 ENDIF(WIN32)

+
+
 IF(UNIX)

   SET (GDCM_POSSIBLE_LIB_PATHS
     $ENV{CREATIS}/gdcm/lib/
+    $ENV{HOME}/local/lib
     $ENV{GDCMHOME}/lib
     /usr/local/lib
     /usr/lib
@@ -141,6 +153,7 @@
   SET (GDCM_POSSIBLE_INCLUDE_PATHS
     $ENV{CREATIS}/gdcm/src
     $ENV{CREATIS}/gdcm/vtk
+    $ENV{HOME}/local/include
     $ENV{GDCMHOME}/src
     $ENV{GDCMHOME}/vtk
     /usr/local/include
@@ -162,9 +175,42 @@
   #Merge every path in one single :
   SET(GDCM_INCLUDE_DIR ${GDCM_INCLUDE_DIR} ${VTKGDCM_INCLUDE_DIR})

-  FIND_LIBRARY(GDCM_LIBRARIES
-    NAMES vtkgdcm gdcm
-    PATHS ${GDCM_POSSIBLE_LIB_PATHS}
+  FIND_LIBRARY(GDCM_SHARED_LIBRARY
+    NAMES gdcm
+    PATHS ${GDCM_POSSIBLE_LIB_PATHS}
+  )
+
+  FIND_LIBRARY(VTKGDCM_SHARED_LIBRARY
+    NAMES vtkgdcm
+    PATHS ${GDCM_POSSIBLE_LIB_PATHS}
+  )
+
+  FIND_LIBRARY(GDCMIJPEG8_SHARED_LIBRARY
+    NAMES gdcmijpeg8 libgdcmijpeg8
+    PATHS ${GDCM_POSSIBLE_LIB_PATHS}
+  )
+
+  FIND_LIBRARY(GDCMIJPEG12_SHARED_LIBRARY
+    NAMES gdcmijpeg12 libgdcmijpeg12
+    PATHS ${GDCM_POSSIBLE_LIB_PATHS}
+  )
+
+  FIND_LIBRARY(GDCMLJPEG_SHARED_LIBRARY
+    NAMES gdcmljpeg libgdcmljpeg
+    PATHS ${GDCM_POSSIBLE_LIB_PATHS}
+  )
+
+  SET(GDCM_LIBRARIES ${VTKGDCM_SHARED_LIBRARY} ${GDCM_SHARED_LIBRARY}
+  ${GDCMIJPEG8_SHARED_LIBRARY} ${GDCMIJPEG12_SHARED_LIBRARY} ${GDCMLJPEG_SHARED_LIBRARY})
+
+  MARK_AS_ADVANCED(
+    VTKGDCM_SHARED_LIBRARY
+    GDCM_SHARED_LIBRARY
+    GDCMIJPEG8_SHARED_LIBRARY
+    GDCMIJPEG12_SHARED_LIBRARY
+    GDCMLJPEG_SHARED_LIBRARY
+    CMAKE_GDCM_CXX_FLAGS
+    GDCM_INCLUDE_DIR
   )

 ENDIF(UNIX)


COMP: remove ugly cmake message left in previous commit

--- CMake/i18n_qt4.cmake
+++ CMake/i18n_qt4.cmake
@@ -10,7 +10,6 @@

   foreach(SOURCE_FILE ${ARGV})
     get_filename_component( ABS_SOURCE_FILE ${SOURCE_FILE} ABSOLUTE )
-    message("ABS_SOURCE_FILE ${ABS_SOURCE_FILE}")
     set( Monteverdi2_I18N_SOURCE_FILES
       ${Monteverdi2_I18N_SOURCE_FILES} ${ABS_SOURCE_FILE}
       CACHE INTERNAL "" FORCE


Fix setting Atlas_INCLUDE_DIRS in FindAtlas

--- cmake/FindAtlas.cmake
+++ cmake/FindAtlas.cmake
@@ -46,7 +46,7 @@
 find_package_handle_standard_args(Atlas DEFAULT_MSG ${LOOKED_FOR})

 if(ATLAS_FOUND)
-  set(Atlas_INCLUDE_DIR ${Atlas_CBLAS_INCLUDE_DIR} ${Atlas_CLAPACK_INCLUDE_DIR})
+  set(Atlas_INCLUDE_DIRS ${Atlas_CBLAS_INCLUDE_DIR} ${Atlas_CLAPACK_INCLUDE_DIR})
   set(Atlas_LIBRARIES ${Atlas_LAPACK_LIBRARY} ${Atlas_CBLAS_LIBRARY} ${Atlas_BLAS_LIBRARY})
   mark_as_advanced(${LOOKED_FOR})


[ASan] Enable on SystemZ.

[ASan] Enable on SystemZ.

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -148,7 +148,7 @@
 set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64}
     ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X})
 set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
-    ${MIPS32} ${MIPS64} ${PPC64})
+    ${MIPS32} ${MIPS64} ${PPC64} ${S390X})
 set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
 set(ALL_LSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
 set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})


[CMake/ASan] Skip using libedit if ASan is enabled -- it leaks memory.

Note that you'll have to clear this variable from your CMake cache for
it to take effect.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -128,7 +128,8 @@
   else()
     set(HAVE_LIBZ 0)
   endif()
-  if (HAVE_HISTEDIT_H)
+  # Skip libedit if using ASan as it contains memory leaks.
+  if (HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
     check_library_exists(edit el_init "" HAVE_LIBEDIT)
   endif()
   if(LLVM_ENABLE_TERMINFO)


fix cmake index_t definition

fix cmake index_t definition

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

--- cmake/gsOptions.cmake
+++ cmake/gsOptions.cmake
@@ -62,13 +62,14 @@
    set_property(CACHE GISMO_COEFF_TYPE PROPERTY STRINGS
    "float" "double" "long double" "mpfr::mpreal"
    )
+endif()

+if(NOT GISMO_INDEX_TYPE)
   set (GISMO_INDEX_TYPE "int" CACHE STRING
    "Index type(int, unsigned, size_t)" FORCE)
    set_property(CACHE GISMO_INDEX_TYPE PROPERTY STRINGS
    "int" "unsigned" "size_t"
    )
-
 endif()

 #Standard options


customize nsis package name

customize nsis package name

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

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -36,7 +36,15 @@
     set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32")
     set(win_system_name win32)
   endif(CMAKE_CL_64)
-  set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-${win_system_name}")
+  set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}")
+  if(BUILD_all_in_one_installer)
+    set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-AllInOne")
+  endif(BUILD_all_in_one_installer)
+  if(MSVC10)
+    set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2010-${win_system_name}")
+  else(MSVC10)
+    set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-${win_system_name}")
+  endif(MSVC10)
   # force CPACK_PACKAGE_INSTALL_REGISTRY_KEY because of a known limitation in cmake/cpack to be fixed in next releases
   # http://public.kitware.com/Bug/view.php?id=9094
   # This is to allow a 32bit and a 64bit of PCL to get installed on one system


clean up the main CMakeLists.txt

clean up the main CMakeLists.txt

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@2798 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -8,6 +8,12 @@
 #if(EXISTS ${RPM_PROGRAM})
 #  list(APPEND CPACK_GENERATOR "RPM")
 #endif(EXISTS ${RPM_PROGRAM})
+
+set(CPACK_PACKAGE_VERSION "${PCL_VERSION}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${PCL_MAJOR_VERSION}")
+set(CPACK_PACKAGE_VERSION_MINOR "${PCL_MINOR_VERSION}")
+set(CPACK_PACKAGE_VERSION_PATCH "${PCL_REVISION_VERSION}")
+set(CPACK_PACKAGE_CONFIG_INSTALL_DIR ${PCLCONFIG_INSTALL_DIR})

 # DEB
 if("${CMAKE_SYSTEM}" MATCHES "Linux")
@@ -23,6 +29,18 @@
   if(EXISTS ${NSIS_PROGRAM})
     list(APPEND CPACK_GENERATOR "NSIS")
   endif(EXISTS ${NSIS_PROGRAM})
+  if(CMAKE_CL_64)
+    set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+    set(win_system_name win64)
+  else(CMAKE_CL_64)
+    set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32")
+    set(win_system_name win32)
+  endif(CMAKE_CL_64)
+  set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-${win_system_name}")
+  # force CPACK_PACKAGE_INSTALL_REGISTRY_KEY because of a known limitation in cmake/cpack to be fixed in next releases
+  # http://public.kitware.com/Bug/view.php?id=9094
+  # This is to allow a 32bit and a 64bit of PCL to get installed on one system
+  set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${PROJECT_NAME} ${PCL_VERSION} ${win_system_name}" )
 endif()

 # dpkg


cmake: use $MPI_INCLUDE as hint for gasnet

--- cmake/FindGASNet.cmake
+++ cmake/FindGASNet.cmake
@@ -185,6 +185,8 @@
   mark_as_advanced(GASNet_ROOT_DIR)
   if(GASNet_ROOT_DIR)
     set(_GASNet_FIND_INCLUDE_OPTS PATHS ${GASNet_ROOT_DIR}/include NO_DEFAULT_PATH)
+  else
+    set(_GASNet_FIND_INCLUDE_OPTS HINTS ENV MPI_INCLUDE)
   endif()
   find_path(GASNet_INCLUDE_DIR gasnet.h ${_GASNet_FIND_INCLUDE_OPTS})


added the include path of luajit2.1 for the FindLuaJIT module of cmake. (#1120)

--- cmake/FindLuaJIT.cmake
+++ cmake/FindLuaJIT.cmake
@@ -31,7 +31,7 @@
 FIND_PATH(LUAJIT_INCLUDE_DIR lua.h
   HINTS
   $ENV{LUAJIT_DIR}
-  PATH_SUFFIXES include/luajit-2.0 include/luajit2.0 include/luajit include
+  PATH_SUFFIXES include/luajit-2.0 include/luajit2.0 include/luajit include/luajit-2.1 include
   PATHS
   ~/Library/Frameworks
   /Library/Frameworks


Create tbag_config__check_compiler() cmake macro.

--- cmake/TbagConfig.cmake
+++ cmake/TbagConfig.cmake
@@ -8,6 +8,37 @@
 include (TbagProject)
 include (TbagInformation)
 include (TbagPreview)
+
+## -----------
+## Environment
+## -----------
+
+#/// Check compiler.
+macro (tbag_config__check_compiler)
+    set (TBAG_GCC        0)
+    set (TBAG_CLANG      0)
+    set (TBAG_MSVC       0)
+    set (TBAG_INTEL      0)
+    set (TBAG_MSVC_INTEL 0)
+
+    if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+        set (TBAG_CLANG 1)
+    elseif (CMAKE_CXX_COMPILER_ID MATCHES "Apple")
+        set (TBAG_CLANG 1)
+    elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+        set (TBAG_GCC 1)
+    elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+        if (MSVC)
+            set (TBAG_MSVC_INTEL 1)
+        else ()
+            set (TBAG_INTEL 1)
+        endif ()
+    elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+        set (TBAG_MSVC 1)
+    else ()
+        message (FATAL_ERROR "Compiler '${CMAKE_CXX_COMPILER_ID}' not recognized")
+    endif ()
+endmacro ()

 ## -----------------
 ## Main information.


[wip] [cmake] Drop check for boost/variant.hpp.

--- cmake/WintermuteDependencies.cmake
+++ cmake/WintermuteDependencies.cmake
@@ -81,7 +81,6 @@
   endif()
 endmacro(FIND_REQUIRED_HEADER)

-FIND_REQUIRED_HEADER(boost/variant.hpp CHKHDR_BOOST_VARIANT)
 FIND_REQUIRED_HEADER(cxxabi.h CHKHDR_CXXABI)
 FIND_REQUIRED_HEADER(sys/types.h CHKHDR_SYS_TYPES)
 FIND_REQUIRED_HEADER(unistd.h CHKHDR_UNISTD)


Fix include paths

Fix include paths

--- cmake/modules/FindKTelepathy.cmake
+++ cmake/modules/FindKTelepathy.cmake
@@ -22,7 +22,6 @@
 find_path(KTELEPATHY_INCLUDE_DIR
   NAMES KTelepathy/presence.h
   PATHS ${KDE4_INCLUDE_DIR}
-  PATH_SUFFIXES telepathy-1.0
 )

 find_library(KTELEPATHY_LIBRARIES NAMES telepathykdecommoninternalsprivate )


fix: webkit linking broken on Linux

fix: webkit linking broken on Linux

--- indra/cmake/WebKitLibPlugin.cmake
+++ indra/cmake/WebKitLibPlugin.cmake
@@ -73,9 +73,8 @@
           QtNetwork
           QtGui
           QtCore
-          qgif
-          qjpeg
           jpeg
+          jscore
           fontconfig
           X11
           Xrender


Fix a warning of mismatched endif()

Fix a warning of mismatched endif()

also fix a formatting issue

Change-Id: I873a763a89208007b5361d23f1f3e517dda32dca

--- CommonFunctions.cmake
+++ CommonFunctions.cmake
@@ -20,7 +20,7 @@
      set(FAILURE_CONDITION "F -|W -")
    else()
      set(FAILURE_CONDITION "F -")
-   endif(USE_WARNINGS)
+   endif()
    set(test_passed TRUE)
    foreach (line ${OUTPUT})
       # the XINDEX will always check the integrity of the routine using checksum
@@ -52,7 +52,7 @@
      message("${PACKAGE_NAME} Passed:\n${OUTPUT}")
    else()
      message(FATAL_ERROR "${PACKAGE_NAME} has XINDEX Errors")
-     endif()
+   endif()
 endfunction()

 # Define a function for parsing and reporting munit output results


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -2,6 +2,7 @@
 Encoding=UTF-8
 Comment=Custom account configuration user interface for accounts using the sipe connection manager.
 Comment[bs]=Korisnički interfejs za konfiguraciju korisničkih naloga koristeći sipe menadžer konekcja.
+Comment[ca]=Interfície d'usuari de configuració de compte personalitzat per comptes que utilitzen el gestor de connexions Sipe.
 Comment[cs]=Vlastní uživatelské rozhraní nastavení účtů pro účty používající správce spojení sipe.
 Comment[da]=Brugerflade til brugertilpasset kontokonfiguration til konti der bruger forbindelseshåndteringen sipe.
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Sipe-Verbindungsverwaltung verwenden.
@@ -27,6 +28,7 @@
 Icon=blockdevice
 Name=Sipe Account Configuration User Interface
 Name[bs]=Korisnički interfejs za konfiguraciju korisničkih naloga Sipe
+Name[ca]=Interfície d'usuari de configuració de compte de Sipe
 Name[cs]=Uživatelské rozhraní nastavení účtu Sipe
 Name[da]=Brugerflade til konfiguration af sipe-konto
 Name[de]=Benutzeroberfläche zur Einrichtung von Sipe-Zugängen


adding new ExtendedStatisticsImagefilter to cmake list

--- Modules/ImageStatistics/files.cmake
+++ Modules/ImageStatistics/files.cmake
@@ -9,6 +9,6 @@
   mitkImageStatisticsCalculator.h
   mitkPointSetDifferenceStatisticsCalculator.h
   mitkPointSetStatisticsCalculator.h
-  mitkStatisticsImageFilter.h
+  mitkExtendedStatisticsImageFilter.h
   mitkExtendedLabelStatisticsImageFilter.h
 )


ENH: update Montage remote module

ENH: update Montage remote module

The updates include
 * std::mutex refactoring
 * Butterworth band-pass filtering of input tiles
 * adjust to VXL2 changes

--- Modules/Remote/Montage.remote.cmake
+++ Modules/Remote/Montage.remote.cmake
@@ -2,5 +2,5 @@
 itk_fetch_module(Montage
 "Reconstruction of 3D volumetric dataset from a collection of 2D slices"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMontage.git
-  GIT_TAG adc26dfe60384a512bd4993bd9a1fab872e9597f
+  GIT_TAG a8154ee8544e6414b87167ffa95fc1186d3a2881
   )


--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -10,98 +10,43 @@
 InitialPreference=20

 Name=VLC
-Name[ast]=VLC
-Name[bg]=VLC
-Name[bs]=VLC
 Name[ca]=VLC
 Name[ca@valencia]=VLC
 Name[cs]=VLC
-Name[da]=VLC
 Name[de]=VLC
-Name[el]=VLC
 Name[en_GB]=VLC
 Name[es]=VLC
-Name[et]=VLC
-Name[eu]=VLC
-Name[fa]=وی‌ال‌سی (VLC)
 Name[fi]=VLC
 Name[fr]=VLC
-Name[ga]=VLC
-Name[gl]=VLC
-Name[hu]=VLC
-Name[it]=VLC
-Name[kk]=VLC
-Name[ko]=VLC
-Name[lt]=VLC
-Name[mr]=व्ही-एल-सी
 Name[nb]=VLC
-Name[nds]=VLC
 Name[nl]=VLC
 Name[nn]=VLC
-Name[pa]=VLC
-Name[pl]=VLC
-Name[pt]=VLC
-Name[pt_BR]=VLC
-Name[ro]=VLC
-Name[ru]=VLC
 Name[sk]=VLC
-Name[sl]=VLC
 Name[sr]=ВЛЦ
 Name[sr@ijekavian]=ВЛЦ
 Name[sr@ijekavianlatin]=VLC
 Name[sr@latin]=VLC
 Name[sv]=VLC
-Name[tr]=VLC
-Name[ug]=VLC
 Name[uk]=VLC
 Name[x-test]=xxVLCxx
-Name[zh_CN]=VLC
-Name[zh_TW]=VLC

 Comment=Phonon VLC backend
-Comment[bg]=Ядро VLC за Phonon
-Comment[bs]=VLC kao pozadina za Phonon
 Comment[ca]=Dorsal del VLC pel Phonon
 Comment[ca@valencia]=Dorsal del VLC pel Phonon
 Comment[cs]=Podpůrná vrstva VLC
-Comment[da]=Phonon VLC-motor
 Comment[de]=Phonon-Treiber für VLC
-Comment[el]=Σύστημα υποστήριξης Phonon VLC
 Comment[en_GB]=Phonon VLC backend
 Comment[es]=Motor VLC para Phonon
-Comment[et]=Phononi VLC taustaprogramm
-Comment[eu]=Phonon-en VLC bizkarraldekoa
-Comment[fa]=پسانه‌ی وی‌ال‌سی برای فنون (Phonon VLC backend)
 Comment[fi]=Phonon VLC -taustajärjestelmä
 Comment[fr]=Module VLC pour Phonon
-Comment[ga]=Inneall VLC Phonon
-Comment[gl]=Infraestrutura de VLC para Phonon
-Comment[hu]=Phonon VLC-backend
-Comment[it]=Motore VLC di Phonon
-Comment[kk]=Phonon VLC тетігі
-Comment[ko]=Phonon VLC 백엔드
-Comment[lt]=Phonon VLC galinė sąsaja
-Comment[mr]=फोनॉन व्ही-एल-सी बॅकएन्ड
 Comment[nb]=Phonon VLC-motor
-Comment[nds]=VLC-Hülpprogramm för Phonon
 Comment[nl]=VLC-backend van Phonon
 Comment[nn]=VLC-motor for Phonon
-Comment[pa]=ਫੋਨੋਨ VLC ਬੈਕਐਂਡ
-Comment[pl]=Silnik VLC dla Phonon
-Comment[pt]=Infra-estrutura do VLC para o Phonon
-Comment[pt_BR]=Infraestrutura do VLC para o Phonon
-Comment[ro]=Suportul VLC pentru Phonon
-Comment[ru]=Механизм VLC для Phonon
 Comment[sk]=Backend Phonon VLC
-Comment[sl]=Zaledje VLC za Phonon
 Comment[sr]=ВЛЦ као позадина Фонона
 Comment[sr@ijekavian]=ВЛЦ као позадина Фонона
 Comment[sr@ijekavianlatin]=VLC kao pozadina Phonona
 Comment[sr@latin]=VLC kao pozadina Phonona
 Comment[sv]=Phonon VLC-gränssnitt
-Comment[tr]=Phonon VLC arka ucu
-Comment[ug]=Phonon VLC ئارقا ئۇچى
 Comment[uk]=Модуль VLC Phonon
 Comment[x-test]=xxPhonon VLC backendxx
-Comment[zh_CN]= Phonon VLC 后端
-Comment[zh_TW]=Phonon VLC 後端介面


Fin YAJL: Reformat CMake code

Fin YAJL: Reformat CMake code

--- cmake/Modules/FindYajl.cmake
+++ cmake/Modules/FindYajl.cmake
@@ -1,4 +1,4 @@
-#
+# ~~~
 # Find libyajl
 #
 # yajl is a json parser needed for the plugin yajl
@@ -7,25 +7,25 @@
 # YAJL_INCLUDE_DIRS   - where to find the header file yajl/yajl_common.h
 # YAJL_LIBRARIES      - where to find the library libyail
 # YAJL_VERSION        - "1" if no yajl/yajl_version.h found
-#
+# ~~~

-find_path(YAJL_INCLUDE_DIR yajl/yajl_common.h)
+find_path (YAJL_INCLUDE_DIR yajl/yajl_common.h)

-set(YAJL_NAMES ${YAJL_NAMES} yajl libyajl)
-find_library(YAJL_LIBRARY NAMES ${YAJL_NAMES} PATH)
+set (YAJL_NAMES ${YAJL_NAMES} yajl libyajl)
+find_library (YAJL_LIBRARY NAMES ${YAJL_NAMES} PATH)

-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Yajl DEFAULT_MSG YAJL_LIBRARY YAJL_INCLUDE_DIR)
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (Yajl DEFAULT_MSG YAJL_LIBRARY YAJL_INCLUDE_DIR)

 if (YAJL_FOUND)
 	set (YAJL_INCLUDE_DIRS ${YAJL_INCLUDE_DIR})
 	set (YAJL_LIBRARIES ${YAJL_LIBRARY})

-	find_path(YAJL2_INCLUDE_DIR yajl/yajl_version.h)
+	find_path (YAJL2_INCLUDE_DIR yajl/yajl_version.h)
 	if (NOT YAJL2_INCLUDE_DIR)
-		message(STATUS "Assume Yajl Version 1 because yajl/yajl_version.h was not found")
-		set(YAJL_NO_VERSION "1")
-	endif(NOT YAJL2_INCLUDE_DIR)
-endif(YAJL_FOUND)
+		message (STATUS "Assume Yajl Version 1 because yajl/yajl_version.h was not found")
+		set (YAJL_NO_VERSION "1")
+	endif (NOT YAJL2_INCLUDE_DIR)
+endif (YAJL_FOUND)

-mark_as_advanced( YAJL2_INCLUDE_DIR YAJL_INCLUDE_DIR YAJL_LIBRARY)
+mark_as_advanced (YAJL2_INCLUDE_DIR YAJL_INCLUDE_DIR YAJL_LIBRARY)


[CMake] Fix build when SWIFT_STDLIB_ENABLE_RESILIENCE is off.

*Shatner voice* CMaaaaaaaaaake!

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -335,7 +335,7 @@
     list(APPEND swift_flags
         "-nostdimport" "-parse-stdlib" "-module-name" "Swift")
     if (NOT SWIFT_STDLIB_ENABLE_RESILIENCE)
-      list(append swift_flags "-Xfrontend" "-sil-serialize-all")
+      list(APPEND swift_flags "-Xfrontend" "-sil-serialize-all")
     endif()
   endif()


Search for hpdf headers found in a suffix subdirectory named hpdf before searching
for those headers without such a suffix subdirectory.

svn path=/trunk/; revision=12596

--- cmake/modules/Findhpdf.cmake
+++ cmake/modules/Findhpdf.cmake
@@ -8,7 +8,12 @@
 #  hpdf_LIBRARY_DIRS, the directory where libhpdf (either shared or static)
 #  is found.

-find_path(hpdf_INCLUDE_DIR hpdf.h /usr/local/include/hpdf /usr/local/include /usr/include/hpdf /usr/include)
+# Give preference to header found in hpdf subdirectory (which is the
+# result of a build and install of upstream libharu), then if not
+# found look for the case of no such subdirectory (which is how the
+# Debian system version of libharu headers is installed).
+find_path(hpdf_INCLUDE_DIR hpdf.h PATHS /usr/local/include /usr/include PATH_SUFFIXES hpdf)
+find_path(hpdf_INCLUDE_DIR hpdf.h PATHS /usr/local/include /usr/include)

 if(hpdf_INCLUDE_DIR)
   find_library(hpdf_LIBRARY


Update compiler.cmake

Update compiler.cmake

--- 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")
+     set(CMAKE_C_FLAGS "-Wall -std=c11 ${CFLAGS}")
      set(CMAKE_C_FLAGS_DEBUG "-g")
      set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
      set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")


ENH: Update BatchMake to un-comment the declaration of variables that are necessary to build BatchMake on the Win32 platform.

--- SuperBuild/External_BatchMake.cmake
+++ SuperBuild/External_BatchMake.cmake
@@ -39,7 +39,7 @@

 ExternalProject_Add(${proj}
   GIT_REPOSITORY ${git_protocol}://github.com/NIRALUser/BatchMake.git
-  GIT_TAG "c194f670839bd0efa39eb0f624ac4b88d0300ebf"
+  GIT_TAG "5e1c185b564ac2acef35ba68fbde370c19ba33de"
   SOURCE_DIR BatchMake
   BINARY_DIR BatchMake-build
   ${cmakeversion_external_update} "${cmakeversion_external_update_value}"


boards: Remove deprecated board names from Zephyr 2.3 or before

Remove board name changes that were deprecated in Zephyr 2.3 or before.

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

--- boards/deprecated.cmake
+++ boards/deprecated.cmake
@@ -7,20 +7,3 @@
 #
 # To add a board rename, add a line in following format:
 # set(<old_board_name>_DEPRECATED <new_board_name>)
-
-set(nrf51_pca10028_DEPRECATED nrf51dk_nrf51422)
-set(nrf51_pca10031_DEPRECATED nrf51dongle_nrf51422)
-set(nrf52_pca10040_DEPRECATED nrf52dk_nrf52832)
-set(nrf52_pca20020_DEPRECATED thingy52_nrf52832)
-set(nrf52810_pca10040_DEPRECATED nrf52dk_nrf52810)
-set(nrf52833_pca10100_DEPRECATED nrf52833dk_nrf52833)
-set(nrf52840_pca10056_DEPRECATED nrf52840dk_nrf52840)
-set(nrf52840_pca10059_DEPRECATED nrf52840dongle_nrf52840)
-set(nrf52811_pca10056_DEPRECATED nrf52840dk_nrf52811)
-set(nrf5340_dk_nrf5340_cpuapp_DEPRECATED nrf5340pdk_nrf5340_cpuapp)
-set(nrf5340_dk_nrf5340_cpuappns_DEPRECATED nrf5340pdk_nrf5340_cpuappns)
-set(nrf5340_dk_nrf5340_cpunet_DEPRECATED nrf5340pdk_nrf5340_cpunet)
-set(nrf9160_pca10090_DEPRECATED nrf9160dk_nrf9160)
-set(nrf9160_pca10090ns_DEPRECATED nrf9160dk_nrf9160ns)
-set(nrf52840_pca10090_DEPRECATED nrf9160dk_nrf52840)
-set(efr32_slwstk6061a_DEPRECATED efr32_radio_brd4250b)


Add a simple revision counting for windows version.rc micro revision

--- package/version.cmake
+++ package/version.cmake
@@ -37,12 +37,20 @@
     if(GIT_FOUND)
         # we use a short hash
         execute_process(
-            COMMAND ${GIT_EXECUTABLE} log --pretty=format:%h -n 1
+            COMMAND ${GIT_EXECUTABLE} describe --always --dirty
             WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../
             OUTPUT_VARIABLE XDISPATCH_WC_REVISION
+            OUTPUT_STRIP_TRAILING_WHITESPACE
+        )
+        execute_process(
+            COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD
+            WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../
+            OUTPUT_VARIABLE XDISPATCH_WC_NUMBER
+            OUTPUT_STRIP_TRAILING_WHITESPACE
         )
     else() # fallback, no revision use date&time
         set(XDISPATCH_WC_REVISION "")
+        set(XDISPATCH_WC_NUMBER "0")
     endif()
 endif()

@@ -70,13 +78,14 @@
 set( XDISPATCH_VERSION_PATCH            0)
 if( NOT XDISPATCH_BUILD_NO )
   if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
-    set( XDISPATCH_VERSION_SUFFIX   devel${XDISPATCH_WC_REVISION})
-    message("-- Configuring release version")
+    set( XDISPATCH_VERSION_SUFFIX   "release-${XDISPATCH_WC_REVISION}")
+    message( "-- Configuring release version")
   else()
-    set( XDISPATCH_VERSION_SUFFIX   devel)
+    set( XDISPATCH_VERSION_SUFFIX   "devel-${XDISPATCH_WC_REVISION}")
+    message( "-- Configuring devel version")
   endif()
   set( XDISPATCH_VERSION            ${XDISPATCH_VERSION_MAJOR}.${XDISPATCH_VERSION_MINOR}.${XDISPATCH_VERSION_PATCH}~${XDISPATCH_VERSION_SUFFIX})
-  set( XDISPATCH_DLL_VERSION        ${XDISPATCH_VERSION_MAJOR},${XDISPATCH_VERSION_MINOR},${XDISPATCH_VERSION_PATCH},${XDISPATCH_WC_REVISION} )
+  set( XDISPATCH_DLL_VERSION        ${XDISPATCH_VERSION_MAJOR},${XDISPATCH_VERSION_MINOR},${XDISPATCH_VERSION_PATCH},${XDISPATCH_WC_NUMBER} )
 else()
     set( XDISPATCH_VERSION_SUFFIX   ${XDISPATCH_BUILD_NO} )
     set( XDISPATCH_VERSION          ${XDISPATCH_VERSION_MAJOR}.${XDISPATCH_VERSION_MINOR}.${XDISPATCH_VERSION_PATCH})


drm: Fix link options for drm libraries discovered via pkg-config

Cmake puts pkg-config discovered link options for libdrm, libkms, and
libgbm in *_LDFLAGS variables, not *_LIBRARIES.

Change-Id: I0566a31da0961617e63e13d965238089fb0e52a7

--- targets/drm/drm.cmake
+++ targets/drm/drm.cmake
@@ -43,5 +43,5 @@
                     ${KMS_INCLUDE_DIRS} ${DRM_INCLUDE_DIRS})

 set(DEQP_PLATFORM_LIBRARIES ${DEQP_GLES2_LIBRARIES} ${DEQP_GLES3_LIBRARIES}
-                            ${DEQP_EGL_LIBRARIES} ${GBM_LIBRARIES}
-                            ${KMS_LIBRARIES} ${DRM_LIBRARIES})
+                            ${DEQP_EGL_LIBRARIES} ${GBM_LDFLAGS}
+                            ${KMS_LDFLAGS} ${DRM_LDFLAGS})


Fix misleading message in finding ODE (#1599)

--- cmake/DARTFindODE.cmake
+++ cmake/DARTFindODE.cmake
@@ -6,9 +6,9 @@
 #
 # This file is provided under the "BSD-style" License

-find_package(ODE CONFIG NAMES ODE ode)
+find_package(ODE QUIET CONFIG NAMES ODE ode)

-if(NOT ODE_FOUND)
+if(NOT ODE_FOUND AND NOT ode_FOUND)

   find_package(ODE 0.13 QUIET MODULE)


new minerva layout

new minerva layout

--- cmake/FindMinerva.cmake
+++ cmake/FindMinerva.cmake
@@ -10,13 +10,7 @@

 find_library(MINERVA_LIBRARY
     NAMES minerva
-    PATHS ${MINERVA_PREFIX_PATH}/release/lib)
-
-if(NOT MINERVA_LIBRARY)
-  find_library(MINERVA_LIBRARY
-      NAMES minerva
-      PATHS ${MINERVA_PREFIX_PATH}/debug/lib)
-endif(NOT MINERVA_LIBRARY)
+    PATHS ${MINERVA_PREFIX_PATH}/lib)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Minerva DEFAULT_MSG MINERVA_LIBRARY MINERVA_INCLUDE_DIR)


Fix the cmake error.

Fix the cmake error.

--- cmake/TbagModules.cmake
+++ cmake/TbagModules.cmake
@@ -196,7 +196,7 @@

     if (WIN32)
         list (APPEND TBAG_PROJECT_DEFINITIONS GTEST_OS_WINDOWS)
-    else ()
+    endif ()

     ## external libraries.
     if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")


[!] fixed i676 linux toolchain

[!] fixed i676 linux toolchain

--- cmake/linux32-gcc.cmake
+++ cmake/linux32-gcc.cmake
@@ -8,8 +8,8 @@
 # here is the target environment located
 #set(CMAKE_FIND_ROOT_PATH /usr/i686-linux-gnu)

-set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -m32 -march=i686)
-set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -m32 -march=i686)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -march=i686")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -march=i686")

 # adjust the default behaviour of the FIND_XXX() commands:
 # search headers and libraries in the target environment, search


Adding .${PCL_MINOR_VERSION} to SOVERSION

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -87,7 +87,7 @@
     #
     set_target_properties(${_name} PROPERTIES
         VERSION ${PCL_VERSION}
-        SOVERSION ${PCL_MAJOR_VERSION}
+        SOVERSION ${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}
         DEFINE_SYMBOL "PCLAPI_EXPORTS")
     if(USE_PROJECT_FOLDERS)
       set_target_properties(${_name} PROPERTIES FOLDER "Libraries")


no OPT:REF in debug msvc

no OPT:REF in debug msvc

In msvc Debug mode, OPT:REF is not compatible with incremental linking

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -82,8 +82,8 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS /OPT:REF)
-		else()
+      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
+    else()
       SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
     endif()
     #
@@ -110,8 +110,8 @@
     target_link_libraries(${_name} ${Boost_LIBRARIES})
     #
     # Only link if needed
-		if(WIN32 AND MSVC)
-      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS /OPT:REF)
+    if(WIN32 AND MSVC)
+      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
     else()
       SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
     endif()
@@ -144,7 +144,7 @@
       # GTest >= 1.5 requires pthread and CMake's 2.8.4 FindGTest is broken
       target_link_libraries(${_exename} pthread)
     elseif(WIN32)
-      SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS /OPT:REF)
+      SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
     endif()
     #
     PCL_LINK_OPENMP(${_exename})


[Config] Fixed the CMake target dependency issue regarding dev helpers (-config, .pc, .m4).

--- config/devhelpers.cmake
+++ config/devhelpers.cmake
@@ -17,8 +17,11 @@
 # Convert the developer script utilities (basically, just replace
 # the @<variable>@ variables)
 configure_file (${CFG_SCRIPT}.in ${CFG_SCRIPT} @ONLY)
+add_custom_target (${CFG_SCRIPT} DEPENDS ${CFG_SCRIPT}.in)
 configure_file (${PKGCFG_SCRIPT}.in ${PKGCFG_SCRIPT} @ONLY)
+add_custom_target (${PKGCFG_SCRIPT} DEPENDS ${PKGCFG_SCRIPT}.in)
 configure_file (${M4_MACROFILE}.in ${M4_MACROFILE} @ONLY)
+add_custom_target (${M4_MACROFILE} DEPENDS ${M4_MACROFILE}.in)

 #
 add_custom_target (devhelpers ALL DEPENDS)


Create CPM_EnsureRepoIsCurrent function for utility purposes.

--- CPM.cmake
+++ CPM.cmake
@@ -52,15 +52,19 @@
 # directory manually. If you set the source directory the project will not be
 # downloaded and will not be updated using git. You must manage that manually.
 #
-# Add external simply looks for the name plus an optional associated version.
-# If you use this function, additional data will be downloaded from a CPM
-# repository. This repository holds build scripts for various different popular
-# packages. CPM_AddExternal is not as robust as modules and can't be versioned
-# well. Additionally, you cannot link against multiple versions of the same
-# library unless you use shared libraries.
-#
 # Also remember: you will probably want to use add_dependencies with the
 # ${CPM_LIBRARIES}.
+#
+# The following is a reference for CPM_EnsureRepoCurrent, a utility function
+# that allows CPM users to ensure a repository is available at some target
+# directory location. This function is useful for creating modules for external
+# header only libraries.
+#
+#  CPM_EnsureRepoIsCurrent(
+#    [TARGET_DIR dir]             # Required - Directory to place repository.
+#    [GIT_REPOSITORY repo]        # Required - Git repository to clone and update in TARGET_DIR.
+#    [GIT_TAG tag]                # Git tag to checkout.
+#    )
 #
 # CPM also adds the following variables to the global namespace for CPM script
 # purposes only. These variables are unlikely to be useful to you.
@@ -575,6 +579,149 @@
   endif()
 endmacro()

+function(CPM_EnsureRepoIsCurrent)
+  _cpm_parse_arguments(CPM_EnsureRepoIsCurrent _CPM_REPO_ "${ARGN}")
+
+  # Tag with a sane default if not present.
+  if (DEFINED _CPM_REPO_GIT_TAG)
+    set(tag ${_CPM_REPO_GIT_TAG})
+  else()
+    set(tag "origin/master")
+  endif()
+
+  set(repo ${_CPM_REPO_GIT_REPOSITORY})
+  set(dir ${_CPM_REPO_TARGET_DIR})
+
+  if (NOT EXISTS "${dir}/")
+    message(STATUS "Cloning repo (${repo})")
+
+    # Much of this clone code is taken from external project's generation
+    # of its *gitclone.cmake files.
+    # Try the clone 3 times (from External Project source).
+    # We don't set a timeout here because we absolutely need to clone the
+    # directory in order to continue with the build process.
+    set(error_code 1)
+    set(number_of_tries 0)
+    while(error_code AND number_of_tries LESS 3)
+      execute_process(
+        COMMAND "${GIT_EXECUTABLE}" clone "${repo}" "${dir}"
+        WORKING_DIRECTORY "${CPM_DIR_OF_CPM}"
+        RESULT_VARIABLE error_code
+        )
+      math(EXPR number_of_tries "${number_of_tries} + 1")
+    endwhile()
+
+    # Check to see if we really have cloned the repository.
+    if(number_of_tries GREATER 1)
+      message(STATUS "Had to git clone more than once:
+      ${number_of_tries} times.")
+    endif()
+    if(error_code)
+      message(FATAL_ERROR "Failed to clone repository: '${repo}'")
+    endif()
+
+    # Checkout the appropriate tag.
+    execute_process(
+      COMMAND "${GIT_EXECUTABLE}" checkout ${tag}
+      WORKING_DIRECTORY "${dir}"
+      RESULT_VARIABLE error_code
+      OUTPUT_QUIET
+      ERROR_QUIET
+      )
+    if(error_code)
+      message(FATAL_ERROR "Failed to checkout tag: '${tag}'")
+    endif()
+
+    # Initialize and update any submodules that may be present in the repo.
+    execute_process(
+      COMMAND "${GIT_EXECUTABLE}" submodule init
+      WORKING_DIRECTORY "${dir}"
+      RESULT_VARIABLE error_code
+      )
+    if(error_code)
+      message(FATAL_ERROR "Failed to init submodules in: '${dir}'")
+    endif()
+
+    execute_process(
+      COMMAND "${GIT_EXECUTABLE}" submodule update --recursive
+      WORKING_DIRECTORY "${dir}"
+      RESULT_VARIABLE error_code
+      )
+    if(error_code)
+      message(FATAL_ERROR "Failed to update submodules in: '${dir}'")
+    endif()
+  endif()
+
+  # Attempt to update with a timeout.
+  execute_process(
+    COMMAND "${GIT_EXECUTABLE}" rev-list --max-count=1 HEAD
+    WORKING_DIRECTORY "${dir}"
+    RESULT_VARIABLE error_code
+    OUTPUT_VARIABLE head_sha
+    )
+  if(error_code)
+    message(FATAL_ERROR "Failed to get the hash for HEAD")
+  endif()
+
+  execute_process(
+    COMMAND "${GIT_EXECUTABLE}" show-ref ${tag}
+    WORKING_DIRECTORY "${dir}"
+    OUTPUT_VARIABLE show_ref_output
+    )
+  # If a remote ref is asked for, which can possibly move around,
+  # we must always do a fetch and checkout.
+  if("${show_ref_output}" MATCHES "remotes")
+    set(is_remote_ref 1)
+  else()
+    set(is_remote_ref 0)
+  endif()
+
+  # This will fail if the tag does not exist (it probably has not been fetched
+  # yet).
+  execute_process(
+    COMMAND "${GIT_EXECUTABLE}" rev-list --max-count=1 ${tag}
+    WORKING_DIRECTORY "${dir}"
+    RESULT_VARIABLE error_code
+    OUTPUT_VARIABLE tag_sha
+    )
+
+  # Is the hash checkout out that we want?
+  if(error_code OR is_remote_ref OR NOT ("${tag_sha}" STREQUAL "${head_sha}"))
+    # Fetch the remote repository and limit it to 15 seconds.
+    execute_process(
+      COMMAND "${GIT_EXECUTABLE}" fetch
+      WORKING_DIRECTORY "${dir}"
+      RESULT_VARIABLE error_code
+      TIMEOUT 15
+      )
+    if(error_code)
+      message("Failed to fetch repository '${repo}'. Skipping fetch.")
+    endif()
+
+    execute_process(
+      COMMAND "${GIT_EXECUTABLE}" checkout ${tag}
+      WORKING_DIRECTORY "${dir}"
+      RESULT_VARIABLE error_code
+      OUTPUT_QUIET
+      ERROR_QUIET
+      )
+    if(error_code)
+      message(FATAL_ERROR "Failed to checkout tag: '${tag}'")
+    endif()
+
+    execute_process(
+      COMMAND "${GIT_EXECUTABLE}" submodule update --recursive
+      WORKING_DIRECTORY "${dir}"
+      RESULT_VARIABLE error_code
+      TIMEOUT 15
+      )
+    if(error_code)
+      message("Failed to update submodules in: '${dir}'. Skipping submodule update.")
+    endif()
+  endif()
+
+endfunction()
+
 # name - Required as this name determines what preprocessor definition will
 #        be generated for this module.
 function(CPM_AddModule name)
@@ -622,133 +769,11 @@
     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}/")
-      message(STATUS "Cloning module repo (${_CPM_GIT_REPOSITORY})")
-      # Much of this clone code is taken from external project's generation
-      # of its *gitclone.cmake files.
-      # Try the clone 3 times (from External Project source).
-      # We don't set a timeout here because we absolutely need to clone the
-      # directory in order to continue with the build process.
-      set(error_code 1)
-      set(number_of_tries 0)
-      while(error_code AND number_of_tries LESS 3)
-        execute_process(
-          COMMAND "${GIT_EXECUTABLE}" clone "${_CPM_GIT_REPOSITORY}" "${__CPM_MODULE_SOURCE_DIR}"
-          WORKING_DIRECTORY "${CPM_DIR_OF_CPM}"
-          RESULT_VARIABLE error_code
-          )
-        math(EXPR number_of_tries "${number_of_tries} + 1")
-      endwhile()
-
-      # Check to see if we really have cloned the repository.
-      if(number_of_tries GREATER 1)
-        message(STATUS "Had to git clone more than once:
-        ${number_of_tries} times.")
-      endif()
-      if(error_code)
-        message(FATAL_ERROR "Failed to clone repository: '${_CPM_GIT_REPOSITORY}'")
-      endif()
-
-      # Checkout the appropriate tag.
-      execute_process(
-        COMMAND "${GIT_EXECUTABLE}" checkout ${__CPM_NEW_GIT_TAG}
-        WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-        RESULT_VARIABLE error_code
-        OUTPUT_QUIET
-        ERROR_QUIET
-        )
-      if(error_code)
-        message(FATAL_ERROR "Failed to checkout tag: '${__CPM_NEW_GIT_TAG}'")
-      endif()
-
-      # Initialize and update any submodules that may be present in the repo.
-      execute_process(
-        COMMAND "${GIT_EXECUTABLE}" submodule init
-        WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-        RESULT_VARIABLE error_code
-        )
-      if(error_code)
-        message(FATAL_ERROR "Failed to init submodules in: '${__CPM_MODULE_SOURCE_DIR}'")
-      endif()
-
-      execute_process(
-        COMMAND "${GIT_EXECUTABLE}" submodule update --recursive
-        WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-        RESULT_VARIABLE error_code
-        )
-      if(error_code)
-        message(FATAL_ERROR "Failed to update submodules in: '${__CPM_MODULE_SOURCE_DIR}'")
-      endif()
-    endif()
-
-    # Attempt to update with a timeout.
-    execute_process(
-      COMMAND "${GIT_EXECUTABLE}" rev-list --max-count=1 HEAD
-      WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-      RESULT_VARIABLE error_code
-      OUTPUT_VARIABLE head_sha
+    CPM_EnsureRepoIsCurrent(
+      TARGET_DIR      ${__CPM_MODULE_SOURCE_DIR}
+      GIT_REPOSITORY  ${_CPM_GIT_REPOSITORY}
+      GIT_TAG         ${__CPM_NEW_GIT_TAG}
       )
-    if(error_code)
-      message(FATAL_ERROR "Failed to get the hash for HEAD")
-    endif()
-
-    execute_process(
-      COMMAND "${GIT_EXECUTABLE}" show-ref master
-      WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-      OUTPUT_VARIABLE show_ref_output
-      )
-    # If a remote ref is asked for, which can possibly move around,
-    # we must always do a fetch and checkout.
-    if("${show_ref_output}" MATCHES "remotes")
-      set(is_remote_ref 1)
-    else()
-      set(is_remote_ref 0)
-    endif()
-
-    # This will fail if the tag does not exist (it probably has not been fetched
-    # yet).
-    execute_process(
-      COMMAND "${GIT_EXECUTABLE}" rev-list --max-count=1 master
-      WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-      RESULT_VARIABLE error_code
-      OUTPUT_VARIABLE tag_sha
-      )
-
-    # Is the hash checkout out that we want?
-    if(error_code OR is_remote_ref OR NOT ("${tag_sha}" STREQUAL "${head_sha}"))
-      # Fetch the remote repository and limit it to 15 seconds.
-      execute_process(
-        COMMAND "${GIT_EXECUTABLE}" fetch
-        WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-        RESULT_VARIABLE error_code
-        TIMEOUT 15
-        )
-      if(error_code)
-        message("Failed to fetch repository '${_CPM_GIT_REPOSITORY}'. Skipping fetch.")
-      endif()
-
-      execute_process(
-        COMMAND "${GIT_EXECUTABLE}" checkout ${__CPM_NEW_GIT_TAG}
-        WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-        RESULT_VARIABLE error_code
-        OUTPUT_QUIET
-        ERROR_QUIET
-        )
-      if(error_code)
-        message(FATAL_ERROR "Failed to checkout tag: '${__CPM_NEW_GIT_TAG}'")
-      endif()
-
-      execute_process(
-        COMMAND "${GIT_EXECUTABLE}" submodule update --recursive
-        WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
-        RESULT_VARIABLE error_code
-        TIMEOUT 15
-        )
-      if(error_code)
-        message("Failed to update submodules in: '${__CPM_MODULE_SOURCE_DIR}'. Skipping submodule update.")
-      endif()
-    endif()
-
   endif(__CPM_USING_GIT)

   # We are either using the git clone or we are using a user supplied source


Make file end with linefeed.

Make file end with linefeed.

svn path=/trunk/; revision=12359

--- cmake/build_projects/libharu/include/hpdf_config.h.cmake
+++ cmake/build_projects/libharu/include/hpdf_config.h.cmake
@@ -94,4 +94,4 @@
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 #cmakedefine LIBHPDF_size_t

-#endif /* _HPDF_CONFIG_H */+#endif /* _HPDF_CONFIG_H */


Adding mangled mesa support.

Adding mangled mesa support.

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -46,6 +46,17 @@
      ENDIF (DART_ROOT)
     ENDIF(BUILD_TESTING)
 ENDIF (VTK_USE_PARALLEL)
+
+OPTION (VTK_MANGLE_MESA "Use mangled Mesa with OpenGL" OFF)
+IF (VTK_MANGLE_MESA)
+  FIND_LIBRARY(MESA_LIBRARY MesaGL
+  /usr/local/lib
+  )
+  FIND_LIBRARY(MESA_OS_LIBRARY MesaOS
+  /usr/local/lib
+  )
+ENDIF (VTK_MANGLE_MESA)
+

 #
 # get information for Tcl wrapping


Correctly set superbuild label

Correctly set superbuild label

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -104,6 +104,9 @@
 MACRO(run_ctest)
   set(dartclient_error)

+  set_property(GLOBAL PROPERTY SubProject SuperBuild)
+  set_property(GLOBAL PROPERTY Label SuperBuild)
+
   ctest_start(${model})
   ctest_update(SOURCE "${CTEST_CHECKOUT_DIR}" RETURN_VALUE res)

@@ -145,9 +148,6 @@

     message("----------- [ Configure SuperBuild ] -----------")

-    set_property(GLOBAL PROPERTY SubProject SuperBuild)
-    set_property(GLOBAL PROPERTY Label SuperBuild)
-
     ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
       OPTIONS "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}"
       RETURN_VALUE res
@@ -263,6 +263,10 @@
         file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${old_coverage_dirs}")

       endforeach()
+
+      # switch back to SuperBuild label
+      set_property(GLOBAL PROPERTY SubProject SuperBuild)
+      set_property(GLOBAL PROPERTY Label SuperBuild)

       message("----------- [ Finish SuperBuild ] -----------")
     else()


Fix non-terminating parenthesis.

Fix non-terminating parenthesis.

--- CPM.cmake
+++ CPM.cmake
@@ -184,7 +184,7 @@
 set(CPM_DEFINITIONS)

 # Increment the module hierarchy level if it exists.
-if ((DEFINED CPM_SHOW_HIERARCHY) AND (CPM_SHOW_HIERARCHY)
+if ((DEFINED CPM_SHOW_HIERARCHY) AND (CPM_SHOW_HIERARCHY))
   if (DEFINED CPM_HIERARCHY_LEVEL)
     math(EXPR CPM_HIERARCHY_LEVEL "${CPM_HIERARCHY_LEVEL}+1")
   else()


Removing _ep from target name.

Removing _ep from target name.

--- CPM.cmake
+++ CPM.cmake
@@ -740,8 +740,7 @@

   # Set variables CPM will use inside of the library target.
   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_TARGET_NAME "${__CPM_FULL_UNID}")
   set(CPM_DIR ${CPM_DIR_OF_CPM})

   # Set target output directories.


Remove unnecessary target message.

Remove unnecessary target message.

--- CPM.cmake
+++ CPM.cmake
@@ -1281,7 +1281,6 @@
     endif()
     set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
   else()
-    message(STATUS "${name} module did not generate a target. Building custom.")
     add_custom_target(${CPM_TARGET_NAME})
     set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} ${CPM_TARGET_NAME} PARENT_SCOPE)
   endif()


Attempt to resolve dependency issue.

Attempt to resolve dependency issue.

--- CPM.cmake
+++ CPM.cmake
@@ -17,6 +17,7 @@
 #
 #  CPM_INCLUDE_DIRS     - All module search paths.
 #  CPM_LIBRARIES        - All targets to link against.
+#  CPM_DEPENDENCIES     - All dependencies. In some cases, this is different than CPM_LIBRARIES.
 #  CPM_DEFINITIONS      - Definitions for all CPM namespaces.
 #
 # Add module function reference:
@@ -996,8 +997,11 @@
   # Append target to pre-existing libraries.
   if (TARGET ${CPM_TARGET_NAME})
     set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
+    set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
   else()
-    set(CPM_LIBRARIES ${CPM_LIBRARIES} "" PARENT_SCOPE)
+    #set(CPM_LIBRARIES ${CPM_LIBRARIES} "" PARENT_SCOPE)
+    add_custom_target(${CPM_TARGET_NAME})
+    set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} ${CPM_TARGET_NAME} PARENT_SCOPE)
     #message(WARNING "Module ${name} did not produce a target. add_dependencies may fail.")
     #message(WARNING "All modules should produce a target, even header only libraries.")
     #message(WARNING "See: add_custom_target")


Added ability to use most recently added version of a module.

--- CPM.cmake
+++ CPM.cmake
@@ -49,6 +49,7 @@
 #    [SOURCE_DIR dir]             # Uses 'dir' as the source directory as opposed to downloading.
 #    [GIT_TAG tag]                # Same as ExternalProject_Add's GIT_TAG
 #    [GIT_REPOSITORY repo]        # Same as ExternalProject_Add's GIT_REPOSITORY.
+#    [USE_EXISTING_VER truth]     # If set to true then the module will attempt to use a pre-existing version of the module.
 #    [PREPROCESSOR_POSTFIX post]  # Adds "_${PREPROCESSOR_POSTFIX}" onto all C preprocessor definitions.
 #    [CMAKE_ARGS args...]         # Additional CMake arguments to set for only for this module.
 #    )
@@ -82,24 +83,34 @@
 # purposes only. These variables are unlikely to be useful to you.
 #
 #  CPM_DIR_OF_CPM               - Variable that stores the location of *this*
-#  file.  CPM_USING_NS_HEADER_FILE     - Header file containing using
-#  directives for all automatically generated header files.
-#  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_LIST_MOD_VERSION_MAP  - A list of
-#  entries in CPM_KV_MOD_VERSION_MAP.  This list is used to propagate
-#  information to the parent_scope when CPM_INIT_MODULE is called and at the
-#  end of the AddModule function.  CPM_KV_PREPROC_NS_MAP_*      - 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).  CPM_KV_LIST_PREPROC_NS_MAP   - A list of entries in
-#  CPM_KV_PREPROC_NS_MAP.  This list is used to clear the map when descending
-#  the build hierarchy using add_subdirectory.  CPM_HIERARCHY_LEVEL          -
-#  Variable only useful when displaying the module hierarchy.
+#                                 file.
+#  CPM_USING_NS_HEADER_FILE     - Header file containing using directives for
+#                                 all automatically generated header files.
+#  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.
+#  CPM_KV_LIST_MOD_VERSION_MAP  - A list of entries in CPM_KV_MOD_VERSION_MAP.
+#                                 This list is used to propagate information to
+#                                 the parent_scope when CPM_INIT_MODULE is
+#                                 called and at the end of the AddModule
+#                                 function.
+#  CPM_KV_PREPROC_NS_MAP_*      - 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).
+#  CPM_KV_LIST_PREPROC_NS_MAP   - A list of entries in CPM_KV_PREPROC_NS_MAP.
+#                                 This list is used to clear the map when
+#                                 descending the build hierarchy using
+#                                 add_subdirectory.
+#  CPM_HIERARCHY_LEVEL          - Contains current CPM hierarchy level.
 #
 # NOTE: End users aren't required to finalize their modules after they add them
 # because all appropriate constraints do not need to be propogated further then
@@ -499,6 +510,40 @@
   endif()
 endfunction()

+macro(_cpm_make_valid_unid_or_path variable)
+  string(REGEX REPLACE "https://github.com/" "github_" ${variable} ${${variable}})
+  string(REGEX REPLACE "http://github.com/" "github_" ${variable} ${${variable}})
+
+  string(REGEX REPLACE "/" "_" ${variable} ${${variable}})
+  string(REGEX REPLACE "[:/\\.?-]" "" ${variable} ${${variable}})
+endmacro()
+
+macro(_cpm_obtain_version_from_params parentVar)
+  if ((DEFINED _CPM_USE_EXISTING_VER) && (_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).
+    if (DEFINED _CPM_GIT_REPOSITORY)
+      # Modify the git repository.
+      set(__CPM_TMP_VAR ${_CPM_GIT_REPOSITORY})
+      _cpm_make_valid_unid_or_path(__CPM_TMP_VAR)
+      if (DEFINED CPM_KV_MOD_VERSION_MAP_${__CPM_TMP_VAR})
+        set(${parentVar} ${CPM_KV_MOD_VERSION_MAP_${__CPM_TMP_VAR}})
+      endif()
+      set(__CPM_TMP_VAR)
+    endif()
+  endif()
+
+  # Sane default for GIT_TAG if it is not specified
+  if (NOT DEFINED ${parentVar})
+    if (DEFINED _CPM_GIT_TAG)
+      set(${parentVar} ${_CPM_GIT_TAG})
+    else()
+      set(${parentVar} "origin/master")
+    endif()
+  endif()
+endmacro()
+
 # name - Required as this name determines what preprocessor definition will
 #        be generated for this module.
 function(CPM_AddModule name)
@@ -509,13 +554,6 @@
   # Determine base module directory and target directory for module.
   set(__CPM_BASE_MODULE_DIR "${CPM_DIR_OF_CPM}/modules")

-  # Sane default for GIT_TAG if it is not specified
-  if (DEFINED _CPM_GIT_TAG)
-    set(git_tag ${_CPM_GIT_TAG})
-  else()
-    set(git_tag "origin/master")
-  endif()
-
   if ((NOT DEFINED _CPM_GIT_REPOSITORY) AND (NOT DEFINED _CPM_SOURCE_DIR))
     message(FATAL_ERROR "CPM: You must specify either a git repository or source directory.")
   endif()
@@ -523,17 +561,15 @@
   if ((DEFINED _CPM_GIT_REPOSITORY) AND (DEFINED _CPM_SOURCE_DIR))
     message(FATAL_ERROR "CPM: You cannot specify both a git repository and a source directory.")
   endif()
+
+  _cpm_obtain_version_from_params(__CPM_NEW_GIT_TAG)

   # Check to see if we should use git to download the source.
   set(__CPM_USING_GIT FALSE)
   if (DEFINED _CPM_GIT_REPOSITORY)
     set(__CPM_USING_GIT TRUE)
-
     set(__CPM_PATH_UNID ${_CPM_GIT_REPOSITORY})
-    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_VERSION "${_CPM_GIT_TAG}")
+    set(__CPM_PATH_UNID_VERSION "${__CPM_NEW_GIT_TAG}")
   endif()

   # Check to see if the source is stored locally.
@@ -543,17 +579,9 @@
     set(__CPM_MODULE_SOURCE_DIR "${_CPM_SOURCE_DIR}")
   endif()

-  # Build UNID
-  # Get rid of any characters that would be offensive to paths.
-  string(REGEX REPLACE "/" "_" __CPM_PATH_UNID "${__CPM_PATH_UNID}")
-  # 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
+  _cpm_make_valid_unid_or_path(__CPM_PATH_UNID)
+  _cpm_make_valid_unid_or_path(__CPM_PATH_UNID_VERSION)
   set(__CPM_FULL_UNID "${__CPM_PATH_UNID}_${__CPM_PATH_UNID_VERSION}")

   # Construct paths from UNID
@@ -587,19 +615,19 @@
         ${number_of_tries} times.")
       endif()
       if(error_code)
-        message(FATAL_ERROR "Failed to clone repository: 'https://github.com/SCIInstitute/spire'")
+        message(FATAL_ERROR "Failed to clone repository: '${_CPM_GIT_REPOSITORY}'")
       endif()

       # Checkout the appropriate tag.
       execute_process(
-        COMMAND "${GIT_EXECUTABLE}" checkout ${_CPM_GIT_TAG}
+        COMMAND "${GIT_EXECUTABLE}" checkout ${__CPM_NEW_GIT_TAG}
         WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
         RESULT_VARIABLE error_code
         OUTPUT_QUIET
         ERROR_QUIET
         )
       if(error_code)
-        message(FATAL_ERROR "Failed to checkout tag: '${_CPM_GIT_TAG}'")
+        message(FATAL_ERROR "Failed to checkout tag: '${__CPM_NEW_GIT_TAG}'")
       endif()

       # Initialize and update any submodules that may be present in the repo.
@@ -669,14 +697,14 @@
       endif()

       execute_process(
-        COMMAND "${GIT_EXECUTABLE}" checkout ${_CPM_GIT_TAG}
+        COMMAND "${GIT_EXECUTABLE}" checkout ${__CPM_NEW_GIT_TAG}
         WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
         RESULT_VARIABLE error_code
         OUTPUT_QUIET
         ERROR_QUIET
         )
       if(error_code)
-        message(FATAL_ERROR "Failed to checkout tag: '${_CPM_GIT_TAG}'")
+        message(FATAL_ERROR "Failed to checkout tag: '${__CPM_NEW_GIT_TAG}'")
       endif()

       execute_process(
@@ -715,6 +743,7 @@
   #set(__CPM_USING_GIT)
   set(__CPM_BASE_MODULE_DIR)
   set(CPM_FORCE_ONLY_ONE_MODULE_VERSION)
+  set(__CPM_NEW_GIT_TAG)

   # Setup the project.
   add_subdirectory("${__CPM_MODULE_SOURCE_DIR}" "${__CPM_MODULE_BIN_DIR}")
@@ -722,13 +751,14 @@
   # Parse the arguments once again after adding the subdirectory (since we
   # cleared them all).
   _cpm_parse_arguments(CPM_AddModule _CPM_ "${ARGN}")
+  _cpm_obtain_version_from_params(__CPM_NEW_GIT_TAG)

   # Enforce one module version if the module has requested it.
   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.
       if (DEFINED CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID})
-        if (NOT "${CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID}}" STREQUAL "${__CPM_PATH_UNID_VERSION}")
+        if (NOT "${CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID}}" STREQUAL "${__CPM_NEW_GIT_TAG}")
           message(FATAL_ERROR "Module '${name}' was declared as only allowing one version of its module. Another version of the module was found: ${CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID}}.")
         endif()
       endif()
@@ -741,7 +771,7 @@
     # Add this entry to the map list.
     set(CPM_KV_LIST_MOD_VERSION_MAP ${CPM_KV_LIST_MOD_VERSION_MAP} ${__CPM_PATH_UNID} PARENT_SCOPE)
   endif()
-  set(CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID} ${__CPM_PATH_UNID_VERSION} PARENT_SCOPE)
+  set(CPM_KV_MOD_VERSION_MAP_${__CPM_PATH_UNID} ${__CPM_NEW_GIT_TAG} PARENT_SCOPE)

   # Setup module interface definition. This is the name the module is using
   # to identify itself in it's headers.
@@ -764,7 +794,7 @@

   if ((DEFINED CPM_SHOW_HIERARCHY) AND (CPM_SHOW_HIERARCHY))
     if(__CPM_USING_GIT)
-      _cpm_print_with_hierarchy_level("${name} - GIT - Tag: ${_CPM_GIT_TAG} - Unid: ${__CPM_FULL_UNID}")
+      _cpm_print_with_hierarchy_level("${name} - GIT - Tag: ${__CPM_NEW_GIT_TAG} - Unid: ${__CPM_FULL_UNID}")
     else()
       _cpm_print_with_hierarchy_level("${name} - Source - Unid: ${__CPM_FULL_UNID}")
     endif()


Force configure not to find getentropy and clock_gettime

--- projects/python.cmake
+++ projects/python.cmake
@@ -1,10 +1,20 @@
+set(_proc_env "MACOSX_DEPLOYMENT_TARGET 10.9")
+
+# Horrible hack to force the configure step not to find getentropy and clock_gettime.
+# If we build on a version that has these defined ( even as weak symbols ) they will
+# be used and then we will get run time link errors when running on versions that
+# don't actually have them defined ( such as 10.11 )
+if (APPLE)
+ set(_proc_env "${_proc_env} ac_cv_func_getentropy no ac_cv_func_clock_gettime no")
+endif()
+
 add_external_project_or_use_system(python
   DEPENDS zlib
   CONFIGURE_COMMAND <SOURCE_DIR>/configure
                     --prefix=<INSTALL_DIR>
                     --enable-unicode=ucs4
                     --enable-shared
-  PROCESS_ENVIRONMENT MACOSX_DEPLOYMENT_TARGET 10.9
+  PROCESS_ENVIRONMENT ${_proc_env}
   )
 set (pv_python_executable "${install_location}/bin/python3" CACHE INTERNAL "" FORCE)


Use PROCESS_ENVIRONMENT as a list not a string

--- projects/python.cmake
+++ projects/python.cmake
@@ -1,11 +1,11 @@
-set(_proc_env "MACOSX_DEPLOYMENT_TARGET 10.9")
+set(_proc_env "MACOSX_DEPLOYMENT_TARGET" "10.9")

 # Horrible hack to force the configure step not to find getentropy and clock_gettime.
 # If we build on a version that has these defined ( even as weak symbols ) they will
 # be used and then we will get run time link errors when running on versions that
 # don't actually have them defined ( such as 10.11 )
 if (APPLE)
- set(_proc_env "${_proc_env} ac_cv_func_getentropy no ac_cv_func_clock_gettime no")
+  list(APPEND _proc_env "ac_cv_func_getentropy" "no" "ac_cv_func_clock_gettime" "no")
 endif()

 add_external_project_or_use_system(python


bug missing endif

bug missing endif

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -125,7 +125,7 @@
     ${VTK_BINARY_DIR}/Graphics
     ${VTK_BINARY_DIR}/IO
     )
-IF (NOT LIBRARY_OUTPUT_PATH)
+ENDIF (NOT LIBRARY_OUTPUT_PATH)

 IF (UNIX)
   LINK_LIBRARIES(${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS} -lm)


ENH: Updated for removal of VTK_BUILD_PYTHON_EXECUTABLE option.

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -195,9 +195,7 @@
   SET(VTK_TCL_HOME ${VTK_SOURCE_DIR}/Wrapping/Tcl)
 ENDIF(VTK_WRAP_TCL)
 IF(VTK_WRAP_PYTHON)
-  IF(VTK_BUILD_PYTHON_EXECUTABLE)
-    SET(VTK_PYTHON_EXE ${VTK_EXECUTABLE_PATH}/vtkpython)
-  ENDIF(VTK_BUILD_PYTHON_EXECUTABLE)
+  SET(VTK_PYTHON_EXE ${VTK_EXECUTABLE_PATH}/vtkpython)
 ENDIF(VTK_WRAP_PYTHON)
 IF(VTK_WRAP_JAVA)
   SET(VTK_JAVA_JAR ${LIBRARY_OUTPUT_PATH}/vtk.jar)


ENH: Tcl/Tk 8.5

ENH: Tcl/Tk 8.5

--- CMake/FindTCL.cmake
+++ CMake/FindTCL.cmake
@@ -125,6 +125,8 @@
   "${TK_LIBRARY_PATH_PARENT}/include"
   "${TCL_INCLUDE_PATH}"
   "${TK_INCLUDE_PATH}"
+  ${TCL_FRAMEWORK_INCLUDES}
+  ${TK_FRAMEWORK_INCLUDES}
   "${TCL_TCLSH_PATH_PARENT}/include"
   "${TK_WISH_PATH_PARENT}/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include"
@@ -134,7 +136,6 @@
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include"
-  ${TCL_FRAMEWORK_INCLUDES}
   "$ENV{ProgramFiles}/Tcl/include"
   "C:/Program Files/Tcl/include"
   "C:/Tcl/include"


[refactor-lv] Streamline VV Arguments / Remove boost-osx-rpath duty

Some Variables are now provided by the superbuild, unifying how these variable are defined,
alleviating the need to define/include them multiple times in the whole pipeline.

Some Thirdparty installation paths are now provided by the respective projects themselves.

Applying the boost-osx-rpath patch is a LVCore duty, offloaded it off the application.

--- Superbuild/Projects/lidarview.cmake
+++ Superbuild/Projects/lidarview.cmake
@@ -1,21 +1,22 @@
+cmake_dependent_option(Boost_NO_BOOST_CMAKE "Boost_NO_BOOST_CMAKE" ON "NOT USE_SYSTEM_boost" OFF)
+
 superbuild_add_project(lidarview
   DEPENDS paraview qt5 pcap boost eigen liblas yaml python python3 pythonqt
   DEPENDS_OPTIONAL pcl ceres opencv nanoflann g2o
   DEFAULT_ON
   CMAKE_ARGS
+    #LidarView base configuration
     -DBUILD_SHARED_LIBS:BOOL=ON
     -DBUILD_TESTING:BOOL=OFF
+    -DLV_BUILD_ARCHITECTURE=${LV_BUILD_ARCHITECTURE}
+    -DSOFTWARE_NAME=${SOFTWARE_NAME}
+    -DSOFTWARE_VENDOR=${SOFTWARE_VENDOR}
     -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/common-superbuild/paraview/build
     -DVTK_DIR:PATH=${SuperBuild_BINARY_DIR}/common-superbuild/paraview/build/VTK
     -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
     -Dqt_version:STRING=${qt_version}
     -DPYTHONQT_DIR:PATH=<INSTALL_DIR>
-    -DBOOST_ROOT:PATH=<INSTALL_DIR>
-    -DBOOST_LIBRARYDIR:PATH=<INSTALL_DIR>/lib
-    -DYAML_DIR:PATH=<INSTALL_DIR>/include/yaml-cpp
-    -DEIGEN_INCLUDE_DIR:PATH=<INSTALL_DIR>/include/eigen3
-    -DEIGEN3_DIR:PATH=<INSTALL_DIR>/share/eigen3/cmake
-    -DPCL_DIR:PATH=<INSTALL_DIR>/share/pcl-1.10
+    -DBoost_NO_BOOST_CMAKE:BOOL=${Boost_NO_BOOST_CMAKE}
     -DENABLE_pcl=${ENABLE_pcl}
     -DENABLE_ceres=${ENABLE_ceres}
     -DENABLE_opencv=${ENABLE_opencv}
@@ -23,6 +24,7 @@
     -DENABLE_g2o=${ENABLE_g2o}
     -DENABLE_slam=${ENABLE_slam}
     -DENABLE_old_slam=${ENABLE_old_slam}
+    #$lidarview_appname additional configuration
 )

 if (WIN32 OR APPLE)
@@ -32,16 +34,3 @@
   superbuild_append_flags(cxx_flags "-DBOOST_ALL_NO_LIB" PROJECT_ONLY)
   superbuild_append_flags(cxx_flags "-DBOOST_ALL_DYN" PROJECT_ONLY)
 endif()
-
-# reset boost RPATH on OSX
-# this is applied on LidarView app and tests
-# for more information see comments in lidarview.osx-boost-rpath.cmake
-if (APPLE)
-  superbuild_project_add_step(osx-boost-rpath
-    COMMAND   "${CMAKE_COMMAND}"
-              -Dinstall_location:PATH=<INSTALL_DIR> #location to get LidarView
-              -P "<SOURCE_DIR>/Superbuild/lidarview-superbuild/Projects/scripts/lidarview.osx-boost-rpath.cmake"
-    DEPENDEES install
-    COMMENT   "Reset rpath for all boost dependencies"
-    WORKING_DIRECTORY <BINARY_DIR>)
-endif ()


Newline at end of FindQScintilla.cmake

Newline at end of FindQScintilla.cmake

--- cmake/FindQScintilla.cmake
+++ cmake/FindQScintilla.cmake
@@ -94,4 +94,4 @@
 unset(BREW_EXECUTABLE CACHE)
 # The usage of brew on OSX should be considered an implementation detail

-mark_as_advanced(QSCINTILLA_INCLUDE_DIRS QSCINTILLA_LIBRARIES)+mark_as_advanced(QSCINTILLA_INCLUDE_DIRS QSCINTILLA_LIBRARIES)


FindEqualizer tweaks

FindEqualizer tweaks

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -218,27 +218,31 @@
   if(NOT COLLAGE_FOUND)
     set(_eq_EPIC_FAIL 1)
   endif()
-
-  # GLEW_MX
-  set(TEST_SRC ${CMAKE_BINARY_DIR}/glewmx_test.cpp)
-  file(WRITE ${TEST_SRC}
-    "#include <eq/client/defines.h>\n"
-    "#ifndef EQ_GLEW_INTERNAL\n"
-    "#  error Need external GLEW_MX\n"
-    "#endif\n"
-    "int main(int argc, char* argv[]){}\n"
-  )
-
-  try_compile(_glew_mx_internal ${CMAKE_BINARY_DIR}/glewmx_test ${TEST_SRC}
-    CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${_eq_INCLUDE_DIR}"
-                "-DLINK_LIBRARIES:STRING=${_eq_LIBRARY}"
-    OUTPUT_VARIABLE out
-  )
-  if(_glew_mx_internal)
-    set(GLEW_MX_INCLUDE_DIRS)
-    set(GLEW_MX_LIBRARIES)
-  else()
-    find_package(GLEW_MX ${_eq_required} ${_eq_quiet})
+  if(NOT _eq_EPIC_FAIL)
+    # GLEW_MX
+    set(TEST_SRC ${CMAKE_BINARY_DIR}/glewmx_test.cpp)
+    file(WRITE ${TEST_SRC}
+      "#include <eq/client/defines.h>\n"
+      "#ifndef EQ_GLEW_INTERNAL\n"
+      "#  error Need external GLEW_MX\n"
+      "#endif\n"
+      "int main(int argc, char* argv[]){}\n"
+      )
+
+    try_compile(_glew_mx_internal ${CMAKE_BINARY_DIR}/glewmx_test ${TEST_SRC}
+      CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${_eq_INCLUDE_DIR}"
+                  "-DLINK_LIBRARIES:STRING=${_eq_LIBRARY}"
+      OUTPUT_VARIABLE out
+    )
+    if(_glew_mx_internal)
+      set(GLEW_MX_INCLUDE_DIRS)
+      set(GLEW_MX_LIBRARIES)
+    else()
+      find_package(GLEW_MX ${_eq_required} ${_eq_quiet})
+      if(NOT GLEW_MX_FOUND)
+        set(_eq_EPIC_FAIL 1)
+      endif()
+    endif()
   endif()
 endif()


COMP: UKF via BRAINSTools had bugs that needed resolving in the build process.

--- SuperBuild/External_BRAINSTools.cmake
+++ SuperBuild/External_BRAINSTools.cmake
@@ -29,7 +29,7 @@

 if(NOT DEFINED BRAINSTools_SOURCE_DIR)
   #message(STATUS "${__indent}Adding project ${proj}")
-  set(GIT_TAG "0df107b989b415eba3bb8edccd8cc357b46d0a4d")  ## Update for Hitachi DWIConvert testing.
+  set(GIT_TAG "b315af2d1b2b0f11232c08778189ca4c0c8a04eb")  ## Update for Hitachi DWIConvert testing.

   if(NOT DEFINED git_protocol)
     set(git_protocol "git")


sitl_target.cmake: create a symlink to the log directory in the build dir

Allowing for easier access to SITL logs.

--- src/firmware/posix/sitl_target.cmake
+++ src/firmware/posix/sitl_target.cmake
@@ -42,6 +42,12 @@

 set(SITL_WORKING_DIR ${PX4_BINARY_DIR}/tmp)
 file(MAKE_DIRECTORY ${SITL_WORKING_DIR})
+
+# add a symlink to the logs dir to make it easier to find them
+add_custom_target(logs_symlink ALL
+                  COMMAND ${CMAKE_COMMAND} -E create_symlink tmp/rootfs/fs/microsd/log logs
+				  WORKING_DIRECTORY ${PX4_BINARY_DIR}
+				  )

 add_custom_target(run_config
 		COMMAND Tools/sitl_run.sh


Fix moc command for Qt5.2

Fix moc command for Qt5.2

The check was already there, but since Qt5 CMake files are being shipped with
Qt5 itself, the check was meaningless as the only thing which matters is
Qt's version, and not CMake's one.

Reviewed-by: David Edmundson <2fbbc4cabedec4253c2922f51eef7aa8c2146499@kde.org>

--- cmake/modules/FindQt.cmake
+++ cmake/modules/FindQt.cmake
@@ -81,11 +81,11 @@
     ENDIF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
   ELSE(QT_VERSION_MAJOR MATCHES 4)
     IF(QT_VERSION_MAJOR MATCHES 5)
-      IF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+      IF(QTVERSION VERSION_GREATER 5.1.99)
         QT5_CREATE_MOC_COMMAND(${infile} ${outfile} "${moc_flags}" "${moc_options}" "")
-      ELSE(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+      ELSE()
         QT5_CREATE_MOC_COMMAND(${infile} ${outfile} "${moc_flags}" "${moc_options}")
-      ENDIF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+      ENDIF()
     ENDIF(QT_VERSION_MAJOR MATCHES 5)
   ENDIF(QT_VERSION_MAJOR MATCHES 4)
 ENDMACRO(QT_CREATE_MOC_COMMAND)


Typo and wrong name of artifacts

Typo and wrong name of artifacts

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -39,7 +39,7 @@
 set ( PROJECT_SOURCE_DIR "${CTEST_SOURCE_DIRECTORY}" )

 # Copy back xdk for RUN_PATH reason
-file ( COPY "${OTB_SOURCE_DIR}/xdk" DESTINATION "${CI_ROOT_DIR}")
+file ( COPY "${OTB_SOURCE_DIR}/install" DESTINATION "${CI_ROOT_DIR}/xdk")
 # Packages case:
 # SUPERBUILD_BINARY_DIR this is needed for OTB_BINARY_DIR, not sure we need it
 # SUPERBUILD_INSTALL_DIR do we need it?
@@ -50,9 +50,6 @@
   "-DCMAKE_PREFIX_PATH=${CTEST_INSTALL_DIRECTORY};\
 -DOTB_BINARY_DIR=${OTB_SOURCE_DIR}/build;-DSUPERBUILD_INSTALL_DIR=${CI_ROOT_DIR}/xdk;
   " )
-}
-}
-

 ctest_start (Experimental TRACK Experimental)


fixed: search release libs also in "rel" subdirectory.

       Many thanks to Daniel Trindade for the patch.

git-svn-id: 6c7e10cdde2c115f53707ba8ec4efe535f92d362@2165 4683daeb-ad0f-0410-a623-93161e962ae5

--- CMake/FindOpenSG.cmake
+++ CMake/FindOpenSG.cmake
@@ -75,14 +75,12 @@

           # if only the release version was found, set the debug variable also to the release version
           IF(OpenSG_${basename}_LIBRARY_RELEASE AND NOT OpenSG_${basename}_LIBRARY_DEBUG)
-#              SET(OpenSG_${basename}_LIBRARY_DEBUG ${OpenSG_${basename}_LIBRARY_RELEASE})
               SET(OpenSG_${basename}_LIBRARY       ${OpenSG_${basename}_LIBRARY_RELEASE})
               SET(OpenSG_${basename}_LIBRARIES     ${OpenSG_${basename}_LIBRARY_RELEASE})
           ENDIF(OpenSG_${basename}_LIBRARY_RELEASE AND NOT OpenSG_${basename}_LIBRARY_DEBUG)

           # if only the debug version was found, set the release variable also to the debug version
           IF(OpenSG_${basename}_LIBRARY_DEBUG AND NOT OpenSG_${basename}_LIBRARY_RELEASE)
-#              SET(OpenSG_${basename}_LIBRARY_RELEASE ${OpenSG_${basename}_LIBRARY_DEBUG})
               SET(OpenSG_${basename}_LIBRARY         ${OpenSG_${basename}_LIBRARY_DEBUG})
               SET(OpenSG_${basename}_LIBRARIES       ${OpenSG_${basename}_LIBRARY_DEBUG})
           ENDIF(OpenSG_${basename}_LIBRARY_DEBUG AND NOT OpenSG_${basename}_LIBRARY_RELEASE)
@@ -112,6 +110,7 @@
     )
 ENDMACRO(__OpenSG_ADJUST_LIB_VARS)

+
 FUNCTION(SETUP_OSG_LIB_TARGETS COMPONENT UPPERCOMPONENT)

   ADD_LIBRARY(${COMPONENT} SHARED IMPORTED)
@@ -275,14 +274,14 @@
         FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE
             NAMES  ${COMPONENT}
             HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}
-            PATH_SUFFIXES "release" "relwithdbg" "opt"
+            PATH_SUFFIXES "release" "rel" "opt" "relwithdbg"
         )

         IF(WIN32)
           FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG
               NAMES  "${COMPONENT}D"
               HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}
-              PATH_SUFFIXES "debug" "dbg"
+              PATH_SUFFIXES "debug" "dbg" "debugopt"
           )

           FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASENOOPT


PackageConfig: Fix automatic component detection

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -74,7 +74,7 @@
   "      string(TOUPPER \${_libraryname} _librarynameUC)\n"
   "      find_library(\${_librarynameUC}_LIBRARY \${_libraryname} NO_DEFAULT_PATH\n"
   "                   PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
-  "      if(${UPPER_PROJECT_NAME}_LIBRARY MATCHES "${UPPER_PROJECT_NAME}_LIBRARY-NOTFOUND")\n"
+  "      if(\${_librarynameUC}_LIBRARY MATCHES "\${_librarynameUC}_LIBRARY-NOTFOUND")\n"
   "        set(_fail \"\${_libraryname} not found\")\n"
   "        if(_out)\n"
   "          message(\${_output_type} \"   Missing the ${CMAKE_PROJECT_NAME} \"\n"
@@ -82,6 +82,8 @@
   "        endif()\n"
   "      else()\n"
   "        list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_librarynameUC}_LIBRARY})\n"
+  "        string(REPLACE \"${CMAKE_PROJECT_NAME}_\" \"\" _component \${_libraryname})\n"
+  "        list(APPEND ${UPPER_PROJECT_NAME}_COMPONENTS \${_component})\n"
   "      endif()\n"
   "    endforeach()\n"
   "  endif()\n"
@@ -107,7 +109,7 @@
   "else()\n"
   "  set(${UPPER_PROJECT_NAME}_FOUND TRUE)\n"
   "  if(_out)\n"
-  "    message(STATUS \"Found ${CMAKE_PROJECT_NAME} ${VERSION} in \"\n"
+  "    message(STATUS \"Found ${CMAKE_PROJECT_NAME} ${VERSION} \${${UPPER_PROJECT_NAME}_COMPONENTS} in \"\n"
   "      \"\${${UPPER_PROJECT_NAME}_INCLUDE_DIRS}:\${${UPPER_PROJECT_NAME}_LIBRARY}\")\n"
   "  endif()\n"
   "endif()\n"
@@ -150,9 +152,10 @@
 foreach(_transient ${${UPPER_PROJECT_NAME}_TRANSIENT_LIBRARIES})
   list(APPEND TRANSIENTS
     "find_package(${_transient} ${${${_transient}_name}_VERSION} EXACT \${_req} \${_quiet})\n"
-    "list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${${_transient}_name}_LIBRARIES})\n"
     "string(TOUPPER ${_transient} _TRANSIENT)\n"
-    "if(NOT \${_TRANSIENT}_FOUND)\n"
+    "if(\${_TRANSIENT}_FOUND)\n"
+    "  list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${${_transient}_name}_LIBRARIES})\n"
+    "else()\n"
     "  set(_fail TRUE)\n"
     "endif()\n\n")
 endforeach()


test name needs to change too

test name needs to change too

--- phSolver/common/test/testing.cmake
+++ phSolver/common/test/testing.cmake
@@ -9,7 +9,7 @@
   WORKING_DIRECTORY ${CASES}/incompressible
 )
 add_test(
-  NAME writeheader
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOwriteheader 2
+  NAME write
+  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOwrite 2
   WORKING_DIRECTORY ${CASES}
 )


Add MODULE parameter to root 6 generation of dictionaries

--- cmake/JPetFramework-Utilities.cmake
+++ cmake/JPetFramework-Utilities.cmake
@@ -69,10 +69,18 @@
     set(dictionary
       ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Dictionaries/JPetFrameworkDictionary)
     set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${ARG_INCLUDE_DIRS};/")
+    if (ROOT_VERSION VERSION_LESS 6)
     root_generate_dictionary(${dictionary} ${headers_to_generate}
       LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/JPetFramework_LinkDef.h
       OPTIONS -p
       )
+    else()
+    root_generate_dictionary(${dictionary} ${headers_to_generate}
+      LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/JPetFramework_LinkDef.h
+      OPTIONS -p
+      MODULE ${ARG_RESULT_NAME}
+      )
+    endif()
   list(APPEND dictionaries ${dictionary}.cxx)
   endif()
   # return generated dictionary sources to given variable


CMake: Extract opencascade version in a more robust manner

--- cmake/modules/FindOPENCASCADE.cmake
+++ cmake/modules/FindOPENCASCADE.cmake
@@ -43,7 +43,11 @@

 IF(EXISTS ${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx)
   FILE(STRINGS "${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx" OPENCASCADE_VERSION
-    REGEX "#define OCC_VERSION _T"
+    REGEX "#define OCC_VERSION_COMPLETE "
+    )
+  STRING(REGEX REPLACE
+    "#define OCC_VERSION_COMPLETE.*\"(.*)\"" "\\1"
+    OPENCASCADE_VERSION "${OPENCASCADE_VERSION}"
     )
 ENDIF()


In a release build on windows, generate the pdb

--- cmake/platform/win32/platform.cmake
+++ cmake/platform/win32/platform.cmake
@@ -25,9 +25,15 @@
 endmacro()

 if(DEBUG)
-    add_definitions(-DDEBUG -D_DEBUG)
+  add_definitions(-DDEBUG -D_DEBUG)
 else()
-    add_definitions(-DNDEBUG -D_NDEBUG)
+  add_definitions(-DNDEBUG -D_NDEBUG)
+
+  #This is needed if we want a pdb file to be generated
+  if(WITH_CRASH_REPORTS)
+    add_compile_options(/Zi)
+    add_linker_flags(/DEBUG /OPT:REF /OPT:ICF)
+  endif()
 endif()

 add_definitions(-DNOMINMAX)


do not include global dylib location when exporting

--- cmake_modules/install_package.cmake
+++ cmake_modules/install_package.cmake
@@ -174,12 +174,12 @@
   elseif( EXPORT_${PROJECT_NAME} )

         # add "installed" library to list of required libraries to link against
-        if( PACKAGE_LIB_NAME )
-            cmake_policy( SET CMP0026 OLD )
-            get_target_property( _target_library ${PACKAGE_LIB_NAME} LOCATION )
-            get_filename_component( _lib ${_target_library} NAME )
-            list( APPEND PACKAGE_LINK_LIBS ${CMAKE_CURRENT_BINARY_DIR}/${_lib} )
-        endif()
+        #if( PACKAGE_LIB_NAME )
+        #    cmake_policy( SET CMP0026 OLD )
+        #    get_target_property( _target_library ${PACKAGE_LIB_NAME} LOCATION )
+        #    get_filename_component( _lib ${_target_library} NAME )
+        #    list( APPEND PACKAGE_LINK_LIBS ${CMAKE_CURRENT_BINARY_DIR}/${_lib} )
+        #endif()

         if( PACKAGE_INSTALL_HEADER_DIRS )


disabling RPM changelog, timestamp creates issues in CentOS 6.0

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -221,10 +221,10 @@
     SET(CPACK_RPM_devel_PACKAGE_ARCHITECTURE noarch)
     SET(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0") # Apache Software License, Version 2.0
     SET(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
-    SET(CPACK_RPM_CHANGELOG_FILE ${CMAKE_BINARY_DIR}/rpm_changelog.txt) # ChangeLog of the RPM
-    STRING(TIMESTAMP CHANGELOG_DATE "%a %b %d %Y")
-    SET(RPM_CHANGELOG "* ${CHANGELOG_DATE} Johannes Günther <johannes.guenther@intel.com> - ${EMBREE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}\n- First package")
-    FILE(WRITE ${CPACK_RPM_CHANGELOG_FILE} ${RPM_CHANGELOG})
+    #SET(CPACK_RPM_CHANGELOG_FILE ${CMAKE_BINARY_DIR}/rpm_changelog.txt) # ChangeLog of the RPM
+    #STRING(TIMESTAMP CHANGELOG_DATE "%a %b %d %Y")
+    #SET(RPM_CHANGELOG "* ${CHANGELOG_DATE} Johannes Günther <johannes.guenther@intel.com> - ${EMBREE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}\n- First package")
+    #FILE(WRITE ${CPACK_RPM_CHANGELOG_FILE} ${RPM_CHANGELOG})
     SET(CPACK_RPM_PACKAGE_URL http://embree.github.io/)
     SET(CPACK_RPM_DEFAULT_DIR_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) # otherwise cmake directory has wrong 775 permissions


Remove Ogre stuff

Remove Ogre stuff

--- CMake/Packages/FindPkgMacros.cmake
+++ CMake/Packages/FindPkgMacros.cmake
@@ -117,40 +117,3 @@
     mark_as_advanced(${PREFIX}_INCLUDE_DIR ${PREFIX}_LIBRARY ${PREFIX}_LIBRARY_REL ${PREFIX}_LIBRARY_DBG ${PREFIX}_LIBRARY_FWK)
   endif ()
 endmacro(findpkg_finish)
-
-
-# Slightly customised framework finder
-macro(findpkg_framework fwk)
-  if(APPLE)
-    set(${fwk}_FRAMEWORK_PATH
-      ${${fwk}_FRAMEWORK_SEARCH_PATH}
-      ${CMAKE_FRAMEWORK_PATH}
-      ~/Library/Frameworks
-      /Library/Frameworks
-      /System/Library/Frameworks
-      /Network/Library/Frameworks
-      ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx/Release
-      ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx/Debug
-    )
-    # These could be arrays of paths, add each individually to the search paths
-    foreach(i ${OGRE_PREFIX_PATH})
-      set(${fwk}_FRAMEWORK_PATH ${${fwk}_FRAMEWORK_PATH} ${i}/lib/macosx/Release ${i}/lib/macosx/Debug)
-    endforeach(i)
-
-    foreach(i ${OGRE_PREFIX_BUILD})
-      set(${fwk}_FRAMEWORK_PATH ${${fwk}_FRAMEWORK_PATH} ${i}/lib/macosx/Release ${i}/lib/macosx/Debug)
-    endforeach(i)
-
-    foreach(dir ${${fwk}_FRAMEWORK_PATH})
-      set(fwkpath ${dir}/${fwk}.framework)
-      if(EXISTS ${fwkpath})
-        set(${fwk}_FRAMEWORK_INCLUDES ${${fwk}_FRAMEWORK_INCLUDES}
-          ${fwkpath}/Headers ${fwkpath}/PrivateHeaders)
-        set(${fwk}_FRAMEWORK_PATH ${dir})
-        if (NOT ${fwk}_LIBRARY_FWK)
-          set(${fwk}_LIBRARY_FWK "-framework ${fwk}")
-        endif ()
-      endif(EXISTS ${fwkpath})
-    endforeach(dir)
-  endif(APPLE)
-endmacro(findpkg_framework)


FindSIP: Add option to skip FindSIP.py step

When a local copy of SIP should be used the FindSIP.py script
always picked the system install of SIP (if present). This can
now be prevented by switching this step of using
  -DUSE_FIND_SIP_PY=Off

--- cmake/FindSIP.cmake
+++ cmake/FindSIP.cmake
@@ -47,30 +47,31 @@

 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-
+OPTION(USE_FIND_SIP_PY "Use the FindSIP.py script to detect the python configuration" On)

 IF(SIP_VERSION)
   # Already in cache, be silent
   SET(SIP_FOUND TRUE)
 ELSE(SIP_VERSION)
+	IF(USE_FIND_SIP_PY)
+		FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH})

-  FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH})
+		EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config ERROR_QUIET)
+		IF(sip_config)
+			STRING(REGEX REPLACE "^sip_version:([^\n]+).*$" "\\1" SIP_VERSION ${sip_config})
+			STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config})
+			STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_EXECUTABLE ${sip_config})
+			STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config})
+			STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config})
+			SET(SIP_FOUND TRUE)
+		ENDIF(sip_config)

-  EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config ERROR_QUIET)
-  IF(sip_config)
-    STRING(REGEX REPLACE "^sip_version:([^\n]+).*$" "\\1" SIP_VERSION ${sip_config})
-    STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config})
-    STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_EXECUTABLE ${sip_config})
-    STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config})
-    STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config})
-    SET(SIP_FOUND TRUE)
-  ENDIF(sip_config)
-
-  IF(SIP_FOUND)
-    IF(NOT SIP_FIND_QUIETLY)
-      MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}")
-    ENDIF(NOT SIP_FIND_QUIETLY)
-  ENDIF(SIP_FOUND)
+		IF(SIP_FOUND)
+			IF(NOT SIP_FIND_QUIETLY)
+				MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}")
+			ENDIF(NOT SIP_FIND_QUIETLY)
+		ENDIF(SIP_FOUND)
+	ENDIF(USE_FIND_SIP_PY)
 ENDIF(SIP_VERSION)

 IF(NOT SIP_VERSION)


Tweaking some settings and formatting

Tweaking some settings and formatting

--- src/Common/Common_SourceList.cmake
+++ src/Common/Common_SourceList.cmake
@@ -1,17 +1,17 @@
-SET (MXA_COMMON_SRCS
-  ${MXA_SOURCE_DIR}/src/Common/IO/Reader64.cpp
-  ${MXA_SOURCE_DIR}/src/Common/IO/Writer64.cpp
-)
-SET (MXA_COMMON_HEADERS
-  ${MXA_SOURCE_DIR}/src/Common/LogTime.h
-  ${MXA_SOURCE_DIR}/src/Common/DLLExport.h
-  ${MXA_SOURCE_DIR}/src/Common/MXATypeDefs.h
-  ${MXA_SOURCE_DIR}/src/Common/MXATypes.h
-  ${MXA_SOURCE_DIR}/src/Common/MXAErrorDefinitions.h
-  ${MXA_SOURCE_DIR}/src/Common/IO/Reader64.h
-  ${MXA_SOURCE_DIR}/src/Common/IO/Writer64.h
-  ${MXA_SOURCE_DIR}/src/Common/Cast/Cast.h
-)
-
-MXA_SOURCE_PROPERTIES(Common "${MXA_COMMON_HEADERS}" "${MXA_COMMON_SRCS}")
-
+SET (MXA_COMMON_SRCS
+  ${MXA_SOURCE_DIR}/src/Common/IO/Reader64.cpp
+  ${MXA_SOURCE_DIR}/src/Common/IO/Writer64.cpp
+)
+SET (MXA_COMMON_HEADERS
+  ${MXA_SOURCE_DIR}/src/Common/LogTime.h
+  ${MXA_SOURCE_DIR}/src/Common/DLLExport.h
+  ${MXA_SOURCE_DIR}/src/Common/MXATypeDefs.h
+  ${MXA_SOURCE_DIR}/src/Common/MXATypes.h
+  ${MXA_SOURCE_DIR}/src/Common/MXAErrorDefinitions.h
+  ${MXA_SOURCE_DIR}/src/Common/IO/Reader64.h
+  ${MXA_SOURCE_DIR}/src/Common/IO/Writer64.h
+  ${MXA_SOURCE_DIR}/src/Common/Cast/Cast.h
+)
+
+MXA_SOURCE_PROPERTIES(Common "${MXA_COMMON_HEADERS}" "${MXA_COMMON_SRCS}")
+


[cmake] don't enable -Werror=overloaded-virtual with serialization

Use of register_type leads to errors in derived classes with virtual
operator=().

Fixes #164.

--- cmake/CXXCompilerSetup.cmake
+++ cmake/CXXCompilerSetup.cmake
@@ -78,7 +78,7 @@
   if((NOT WITH_MECHANISMS) AND (NOT WITH_PYTHON_WRAPPER))
     add_cxx_options("-Werror=missing-declarations")
   endif()
-  if(NOT WITH_OCC AND NOT WITH_MECHANISMS)
+  if(NOT WITH_OCC AND NOT WITH_MECHANISMS AND NOT WITH_SERIALIZATION)
     add_cxx_options("-Werror=overloaded-virtual")
   endif()


Remove other instance of string(CONCAT)

Remove other instance of string(CONCAT)

--- cmake/FindPythonConfig.cmake
+++ cmake/FindPythonConfig.cmake
@@ -19,7 +19,7 @@
   set(_Python_config "${PYTHON_EXECUTABLE}-config")
   execute_process(COMMAND ${_Python_config} "--includes" OUTPUT_VARIABLE PYTHON_COMPILE_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
   execute_process(COMMAND ${_Python_config} "--ldflags" OUTPUT_VARIABLE PYTHON_LINK_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
-  string(CONCAT _Python_config_message ${PYTHON_COMPILE_FLAGS} "; " ${PYTHON_LINK_FLAGS})
+  set(_Python_config_message "${PYTHON_COMPILE_FLAGS}; ${PYTHON_LINK_FLAGS}")
   unset(_Python_config)
 else(PYTHONINTERP_FOUND)
   message(SEND_ERROR "Python interpreter not found")


Fix library_IMPLIB-NOTFOUND errors building Swift on Windows

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

-  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")
+  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
     if("${libkind}" STREQUAL "SHARED")
       # Each dll has an associated .lib (import library); since we may be
       # building on a non-DLL platform (not windows), create an imported target
@@ -1135,7 +1135,7 @@
         # libraries are only associated with shared libraries, so add an
         # additional check for that as well.
         set(import_library ${library})
-        if(TARGET ${library})
+        if(TARGET ${library} AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
           get_target_property(type ${library} TYPE)
           if(${type} STREQUAL "SHARED_LIBRARY")
             set(import_library ${library}_IMPLIB)


[Build] Ensure that we link in SwiftSyntax and Swift for all executables

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -565,6 +565,21 @@
       message(FATAL_ERROR "BOOTSTRAPPING_MODE 'BOOTSTRAPPING-WITH-HOSTLIBS' not supported on Linux")
     else()
       message(FATAL_ERROR "Unknown BOOTSTRAPPING_MODE '${ASRLF_BOOTSTRAPPING_MODE}'")
+    endif()
+  endif()
+
+  if(SWIFT_SWIFT_PARSER)
+    # Make sure we can find the early SwiftSyntax libraries.
+    target_link_directories(${target} PRIVATE "${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR}/lib")
+
+    # For the "end step" of bootstrapping configurations on Darwin, need to be
+    # able to fall back to the SDK directory for libswiftCore et al.
+    if (BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")
+      if (bootstrapping STREQUAL "")
+        if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
+          target_link_directories(${target} PRIVATE "${sdk_dir}")
+        endif()
+      endif()
     endif()
   endif()


CMake: fix non-optimized standard library builds

Fix fallout from my recent change: SwiftOnoneSupport was attempted to be
linked into the runtime, but only in non-optimized mode.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1031,7 +1031,7 @@

   # All Swift code depends on the standard library, except for the standard
   # library itself.
-  if(SWIFTLIB_TARGET_LIBRARY AND SWIFTLIB_HAS_SWIFT_CONTENT AND NOT SWIFTLIB_IS_STDLIB_CORE)
+  if(SWIFTLIB_HAS_SWIFT_CONTENT AND NOT SWIFTLIB_IS_STDLIB_CORE)
     list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core)
   endif()

@@ -1041,11 +1041,11 @@
         Core)
   endif()

-  is_build_type_optimized("${SWIFT_STDLIB_BUILD_TYPE}" optimized)
-  if(NOT optimized)
+  if(SWIFTLIB_HAS_SWIFT_CONTENT AND NOT SWIFTLIB_IS_STDLIB_CORE)
     # All Swift code depends on the SwiftOnoneSupport in non-optimized mode,
     # except for the standard library itself.
-    if(SWIFTLIB_TARGET_LIBRARY AND NOT SWIFTLIB_IS_STDLIB_CORE)
+    is_build_type_optimized("${SWIFT_STDLIB_BUILD_TYPE}" optimized)
+    if(NOT optimized)
       list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS SwiftOnoneSupport)
     endif()
   endif()


handle empty test output

handle empty test output

If the make command to compile a test returns empty output (don't ask me
why that happened on my machine), quote it in the regex to avoid an
error like:
"string sub-command REGEX, mode MATCH needs at least 5 arguments"

--- cmake/scripts/run_test.cmake
+++ cmake/scripts/run_test.cmake
@@ -64,11 +64,11 @@
 # (Possible values are CONFIGURE, BUILD, RUN, DIFF, PASSED)
 #

-STRING(REGEX MATCH "${TEST}: CONFIGURE failed\\." _configure_regex ${_output})
-STRING(REGEX MATCH "${TEST}: BUILD failed\\." _build_regex ${_output})
-STRING(REGEX MATCH "${TEST}: RUN failed\\." _run_regex ${_output})
-STRING(REGEX MATCH "${TEST}: DIFF failed\\." _diff_regex ${_output})
-STRING(REGEX MATCH "${TEST}: PASSED\\." _passed_regex ${_output})
+STRING(REGEX MATCH "${TEST}: CONFIGURE failed\\." _configure_regex "${_output}")
+STRING(REGEX MATCH "${TEST}: BUILD failed\\." _build_regex "${_output}")
+STRING(REGEX MATCH "${TEST}: RUN failed\\." _run_regex "${_output}")
+STRING(REGEX MATCH "${TEST}: DIFF failed\\." _diff_regex "${_output}")
+STRING(REGEX MATCH "${TEST}: PASSED\\." _passed_regex "${_output}")

 IF(NOT "${_passed_regex}" STREQUAL "")
   SET(_stage PASSED)
@@ -115,7 +115,7 @@
     # Some special output in case the BUILD stage failed in a regression test:
     MESSAGE("${TEST}: BUILD failed. Output:")
   ENDIF()
-  MESSAGE(${_output})
+  MESSAGE("${_output}")
   MESSAGE("")
   MESSAGE("${TEST}: ******    ${_stage} failed    *******")
   MESSAGE("")


ENH: MIDAS+CTest: allow the MIDAS arguments to be part of an arg rather than the entire arg

SVN-Revision: 3247

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -69,8 +69,8 @@

   # Substitute the downloaded file argument(s)
   foreach(arg ${ARGN})
-    if(arg MATCHES "^MIDAS{[^}]*}$")
-      string(REGEX REPLACE "^MIDAS{([^}]*)}$" "\\1" keyFile "${arg}")
+    if(arg MATCHES "MIDAS{[^}]*}")
+      string(REGEX REPLACE "MIDAS{([^}]*)}" "\\1" keyFile "${arg}")
       # Split up the checksum extension from the real filename
       string(REGEX MATCH "\\.[^\\.]*$" hash_alg "${keyFile}")
       string(REGEX REPLACE "\\.[^\\.]*$" "" base_file "${keyFile}")


Replace "\n" -> ";" based line splitting with a while loop.

Changing characters around is generally just unreliable with large
strings. This technique tends to avoid bugs in CMake.

--- CMakeTraceToLCov.cmake
+++ CMakeTraceToLCov.cmake
@@ -54,10 +54,6 @@
     # to commas.
     string (REPLACE ";" "," FILE_CONTENTS "${FILE_CONTENTS}")

-    # Ensure there's a space between each semicolon - we need to keep
-    # track of lines that were just \n
-    string (REPLACE "\n" " ;" FILE_CONTENTS "${FILE_CONTENTS}")
-
     # Convert \t to " ". Makes life easier.
     string (REPLACE "\t" " " FILE_LINES "${FILE_CONTENTS}")

@@ -69,9 +65,16 @@
     set (IN_OPENED_BRACKET_REGION FALSE)

     set (LINE_COUNTER 1)
-    foreach (LINE ${FILE_LINES})
-
-        if (LINE)
+    set (NEXT_LINE_INDEX 0)
+    while (NOT NEXT_LINE_INDEX EQUAL -1)
+
+        string (SUBSTRING "${FILE_CONTENTS}" ${NEXT_LINE_INDEX} -1
+                FILE_CONTENTS)
+        string (FIND "${FILE_CONTENTS}" "\n" NEXT_LINE_INDEX)
+
+        if (NOT NEXT_LINE_INDEX EQUAL -1)
+
+            string (SUBSTRING "${FILE_CONTENTS}" 0 ${NEXT_LINE_INDEX} LINE)

             # Only lines after IN_OPENED_BRACKET_REGION is set are actually
             # disqualified. Reset all the other variables.
@@ -169,11 +172,13 @@
                    NOT DISQUALIFIED_DUE_TO_IN_OPEN_BRACKET_REGION AND
                    NOT DISQUALIFIED_BECAUSE_LINE_ONLY_WHITESPACE)

-        endif (LINE)
+            math (EXPR NEXT_LINE_INDEX "${NEXT_LINE_INDEX} + 1")
+
+        endif (NOT NEXT_LINE_INDEX EQUAL -1)

         math (EXPR LINE_COUNTER "${LINE_COUNTER} + 1")

-    endforeach ()
+    endwhile ()

     set ("_${FILE}_EXECUTABLE_LINES" ${EXECUTABLE_LINES} PARENT_SCOPE)


get this building on the mac

get this building on the mac

git-svn-id: 931ab4487dc05a11552de95f7d42b8249ade56b7@1520 a5045d30-4826-4484-9c7f-6e55a06ddc77

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -1,5 +1,10 @@
 include(BoostUtils)
-set(RDKit_VERSION "${RDKit_ABI}.${RDKit_Year}${RDKit_Quarter}")
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+# Mac OS X specific code
+  set(RDKit_VERSION "${RDKit_Year}${RDKit_Quarter}")
+ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+  set(RDKit_VERSION "${RDKit_ABI}.${RDKit_Year}${RDKit_Quarter}")
+ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 set(RDKit_RELEASENAME "${RDKit_Year}Q${RDKit_Quarter}")
 if (RDKit_Revision)
   set(RDKit_RELEASENAME "${RDKit_RELEASENAME}_${RDKit_Revision}")
@@ -84,7 +89,7 @@
                           ${RDK_PYTHON_OUTPUT_DIRECTORY}/${RDKPY_DEST})
 endif(WIN32)
     target_link_libraries(${RDKPY_NAME} ${RDKPY_LINK_LIBRARIES}
-                          ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
+                          ${PYTHON_LIBRARIES} ${Boost_LIBRARIES} )

     INSTALL(TARGETS ${RDKPY_NAME}
             LIBRARY DESTINATION ${RDKit_PythonDir}/${RDKPY_DEST})


cleanup to make static builds work

cleanup to make static builds work

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -55,7 +55,7 @@
       add_library(${RDKLIB_NAME}_static ${RDKLIB_SOURCES})

       foreach(linkLib ${RDKLIB_LINK_LIBRARIES})
-        if(${linkLib} MATCHES "^(Boost)|(Thread)|(boost)|^(optimized)|^(debug)")
+        if(${linkLib} MATCHES "^(Boost)|(Thread)|(boost)|^(optimized)|^(debug)|(libz)")
           set(rdk_static_link_libraries "${rdk_static_link_libraries}${linkLib};")
         else()
           set(rdk_static_link_libraries "${rdk_static_link_libraries}${linkLib}_static;")


ENH: Update SCIFIO to lastest commit (01.21.2017)

Francois Budin (1):
      BUG: Paths to install jars and jre should be absolute

Matt McCormick (1):
      Merge pull request #34 from
  fbudin69500/BUG_Correct_install_bug_introducted_in_1069996bd0dcc6f15a5864a0d61ccba17bb4fa66

Change-Id: Icf9a5ebc9bbc31d3e65576a624ec89c8a515a8a7

--- Modules/Remote/SCIFIO.remote.cmake
+++ Modules/Remote/SCIFIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(SCIFIO
   "SCIFIO (Bioformats) ImageIO plugin for ITK"
   GIT_REPOSITORY ${git_protocol}://github.com/scifio/scifio-imageio.git
-  GIT_TAG 4391143cbf7696dad5c8a15d52dbc46daafe7aaa
+  GIT_TAG 74db3142f78cb71ec2fe83a13080d020bc8446c1
   )


forward port of 1157879: fixed: exec path missed subdir bin/

svn path=/trunk/kdesupport/cagibi/; revision=1160741

--- daemon/org.kde.Cagibi.service.cmake
+++ daemon/org.kde.Cagibi.service.cmake
@@ -1,3 +1,3 @@
 [D-BUS Service]
 Name=org.kde.Cagibi
-Exec=@CMAKE_INSTALL_PREFIX@/cagibid
+Exec=${CMAKE_INSTALL_PREFIX}/bin/cagibid


ENH: Eternia_Slicer should not run valgrind

--- Eternia_Kitware_TubeTK_Slicer.cmake
+++ Eternia_Kitware_TubeTK_Slicer.cmake
@@ -88,7 +88,7 @@

 set( SITE_CONTINUOUS_BUILD ON )
 set( SITE_CONTINUOUS_TEST ON )
-set( SITE_CONTINUOUS_CPPCHECK ON )
+set( SITE_CONTINUOUS_CPPCHECK OFF )
 set( SITE_CONTINUOUS_KWSTYLE OFF )
 set( SITE_CONTINUOUS_COVERAGE OFF )
 set( SITE_CONTINUOUS_MEMORY OFF )
@@ -97,10 +97,10 @@

 set( SITE_NIGHTLY_BUILD ON )
 set( SITE_NIGHTLY_TEST ON )
-set( SITE_NIGHTLY_CPPCHECK ON )
-set( SITE_NIGHTLY_KWSTYLE ON )
-set( SITE_NIGHTLY_COVERAGE ON )
-set( SITE_NIGHTLY_MEMORY ON )
+set( SITE_NIGHTLY_CPPCHECK OFF )
+set( SITE_NIGHTLY_KWSTYLE OFF )
+set( SITE_NIGHTLY_COVERAGE OFF )
+set( SITE_NIGHTLY_MEMORY OFF )
 set( SITE_NIGHTLY_PACKAGE ON )
 set( SITE_NIGHTLY_UPLOAD ON )


Fix glslang include in standalone library

--- 3rdparty/glslang.cmake
+++ 3rdparty/glslang.cmake
@@ -1 +1,2 @@
 add_library(glsl-standalone STATIC ${CMAKE_CURRENT_LIST_DIR}/glslang/StandAlone/ResourceLimits.cpp)
+target_include_directories(glsl-standalone PRIVATE ${CMAKE_CURRENT_LIST_DIR}/glslang)


ENH: define righ include dir in HDF4 test

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -183,7 +183,7 @@
   #${OTB_DATA_ROOT}/Input/MOD09Q1G_EVI.A2006233.h07v03.005.2008338190308.hdf  -> Test KO
   #${OTB_DATA_ROOT}/Input/GSSTF_NCEP.2b.2008.12.31.he5  -> Test OK
   IF(OTB_DATA_ROOT)
-    SET(CMAKE_REQUIRED_INCLUDES ${GEOTIFF_INCLUDE_DIRS})
+    SET(CMAKE_REQUIRED_INCLUDES ${GDAL_INCLUDE_DIR})
     SET(CMAKE_REQUIRED_LIBRARIES "${GDAL_LIBRARY}")
     CHECK_CXX_SOURCE_RUNS_ARGS(
             ${CMAKE_CURRENT_SOURCE_DIR}/CMake/TestHDF4Open.cxx


BUG: forward cmake command and env to itk external project

--- SuperBuild/CMake/External_itk.cmake
+++ SuperBuild/CMake/External_itk.cmake
@@ -175,6 +175,7 @@
       ${CMAKE_SOURCE_DIR}/patches/ITK/hashtable.hxx.in
       ${ITK_SB_SRC}/Modules/ThirdParty/KWSys/src/KWSys
     DEPENDS ${${proj}_DEPENDENCIES}
+    CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     )

   # write patch in binary dir