Use custom CTK pythonQt

Use custom CTK pythonQt

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 3efe86d5)
+    set(revision_tag 4d12a3b8)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -75,7 +75,7 @@
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 cbd771ea9718cb02e64085e8ddfdaa4d
+      URL_MD5 135910e407bd1f5de29d2a0a9efe5f80
       #GIT_REPOSITORY https://github.com/commontk/CTK.git
       #GIT_TAG origin/master
       UPDATE_COMMAND ""
@@ -101,6 +101,8 @@
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_DCMTK_085525e6.tar.gz
         -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_5f3a03b1.tar.gz
+        # See bug 19073
+        -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_36ab9c7c.tar.gz
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}
       CMAKE_CACHE_DEFAULT_ARGS


Update CTK to current master

Update CTK to current master

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 6c0eddaa)
+    set(revision_tag b93e8dca)

     set(ctk_optional_cache_args )
     if(MITK_USE_Python)
@@ -58,7 +58,7 @@
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 c8025c0009d5dd207cd442eadca409b4
+      URL_MD5 C86289F25E79B0C5C12E424BD706388F
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


Update to HEXL v1.2.2

Update to HEXL v1.2.2

--- third-party/intel-hexl/intel-hexl.cmake
+++ third-party/intel-hexl/intel-hexl.cmake
@@ -7,7 +7,7 @@
 message(STATUS "INTEL_HEXL_PREBUILT ${INTEL_HEXL_PREBUILT}")

 if (INTEL_HEXL_PREBUILT)  # Skip download from gitlab
-  find_package(HEXL 1.2.1
+  find_package(HEXL 1.2.2
         HINTS ${INTEL_HEXL_HINT_DIR}
         REQUIRED)
   if (NOT TARGET HEXL::hexl)
@@ -27,7 +27,7 @@
     # Download and install Intel HEXL ...
     # ------------------------------------------------------------------------------
     set(INTEL_HEXL_GIT_REPO_URL https://github.com/intel/hexl)
-    set(INTEL_HEXL_GIT_LABEL 1.2.1)
+    set(INTEL_HEXL_GIT_LABEL 1.2.2)

     set(INTEL_HEXL_DEBUG OFF) # Set to ON/OFF to toggle debugging
     set(INTEL_HEXL_SHARED_LIB ${BUILD_SHARED}) # Set to ON/OFF to toggle shared library build


add log

add log

--- cmaki.cmake
+++ cmaki.cmake
@@ -286,6 +286,7 @@
 function(cmaki_executable)
 	cmaki_parse_parameters(${ARGV})
 	set(_EXECUTABLE_NAME ${_MAIN_NAME})
+	MESSAGE("++ executable ${_EXECUTABLE_NAME}")
 	source_group( "Source Files" FILES ${_SOURCES} )
 	common_flags()
 	include_directories(.)
@@ -316,6 +317,7 @@
 function(cmaki_library)
 	cmaki_parse_parameters(${ARGV})
 	set(_LIBRARY_NAME ${_MAIN_NAME})
+	MESSAGE("++ library ${_LIBRARY_NAME}")
 	source_group( "Source Files" FILES ${_SOURCES} )
 	common_flags()
 	include_directories(.)
@@ -342,6 +344,7 @@
 function(cmaki_test)
 	cmaki_parse_parameters(${ARGV})
 	set(_TEST_NAME ${_MAIN_NAME})
+	MESSAGE("++ test ${_TEST_NAME}")
 	include_directories(.)
 	foreach(INCLUDE_DIR ${_INCLUDES})
 		target_include_directories(${_EXECUTABLE_NAME} ${INCLUDE_DIR})


CMake: Dependencies - use MSVC config on MINGW as well

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

     set(BUILD_COMMAND_OPTS --target install --config ${CMAKE_BUILD_TYPE})

-    if(MSVC OR EMSCRIPTEN) # other platforms ship zlib
+    if(MSVC OR EMSCRIPTEN OR MINGW) # other platforms ship zlib
         message(STATUS "Building zlib")
         file(DOWNLOAD
             http://zlib.net/zlib-1.2.11.tar.gz
@@ -163,7 +163,7 @@
     execute_process(COMMAND ${CMAKE_COMMAND}
         --build ${CMAKE_BINARY_DIR}/freetype-2.9/objs ${BUILD_COMMAND_OPTS})

-    if(MSVC) # other platforms dont need this
+    if(MSVC OR MINGW) # other platforms dont need this
         message(STATUS "Building SDL2")
         file(DOWNLOAD
             https://libsdl.org/release/SDL2-2.0.8.tar.gz


ENH: add icu includedir import for compilation with mapnik on windows

--- CMake/ImportMapnik.cmake
+++ CMake/ImportMapnik.cmake
@@ -18,7 +18,7 @@
         MARK_AS_ADVANCED(FREETYPE2_INCLUDE_DIR)
         IF (NOT FREETYPE2_INCLUDE_DIR)
                 MESSAGE(FATAL_ERROR
-                        "Cannot find FREETYPE2 include directory. Please set  or set OTB_USE_MAPNIK OFF.")
+                        "Cannot find FREETYPE2 include directory. Please set FREETYPE2_INCLUDE_DIR or set OTB_USE_MAPNIK OFF.")
         ENDIF (NOT FREETYPE2_INCLUDE_DIR)

         FIND_LIBRARY(MAPNIK_LIBRARY mapnik )
@@ -28,17 +28,25 @@
                         "Cannot find MAPNIK library. Please set MAPNIK_LIBRARY or set OTB_USE_MAPNIK OFF.")
         ENDIF (NOT MAPNIK_LIBRARY)

-        # libicuuc is a unicode library mapnik relies on.
-        # since libicuuc version 1.42, we need to link against it when linking against mapnik
-        # otherwise we get undefined symbol error
-		IF (NOT WIN32)
-        FIND_LIBRARY(ICUUC_LIBRARY icuuc )
+        # libicuuc (http://site.icu-project.org/) is a unicode library mapnik relies on.
+		# mapnik includes drag icu includes
+		# when linking with mapnik, need to link with libicuuc (at least since 1.42 release)
+        FIND_PATH(ICUUC_INCLUDE_DIR unicode/unistr.h)
+        MARK_AS_ADVANCED(ICUUC_INCLUDE_DIR)
+
+        FIND_LIBRARY(ICUUC_LIBRARY icuuc)
         MARK_AS_ADVANCED(ICUUC_LIBRARY)
+
+        IF (NOT ICUUC_INCLUDE_DIR)
+                MESSAGE(FATAL_ERROR
+                        "Cannot find ICUUC_INCLUDE_DIR include directory. Please set ICUUC_INCLUDE_DIR or set OTB_USE_MAPNIK OFF.")
+        ENDIF (NOT ICUUC_INCLUDE_DIR)
+
         IF (NOT ICUUC_LIBRARY)
                 MESSAGE(FATAL_ERROR
                         "Cannot find ICUUC library, needed by MAPNIK. Please set ICUUC_LIBRARY or set OTB_USE_MAPNIK OFF.")
         ENDIF (NOT ICUUC_LIBRARY)
-		ENDIF (NOT  WIN32)
+

         # Add compiler option
         ADD_DEFINITIONS(-DOTB_USE_MAPNIK)
@@ -48,6 +56,8 @@
         MESSAGE(STATUS "  Enabling Mapnik support")
         MESSAGE(STATUS "  Mapnik includes : ${MAPNIK_INCLUDE_DIR}")
         MESSAGE(STATUS "  Mapnik library  : ${MAPNIK_LIBRARY}")
+        MESSAGE(STATUS "  ICU includes : ${ICUUC_INCLUDE_DIR}")
+        MESSAGE(STATUS "  ICU library  : ${ICUUC_LIBRARY}")

 ELSE(OTB_USE_MAPNIK)


nope, you can't do that

nope, you can't do that

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -94,17 +94,6 @@

 #-----------------------------------------------------------------------------
 # Configure VTKConfig.cmake for the build tree.
-CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKConfig.cmake.in
-               ${VTK_BINARY_DIR}/VTKConfig.cmake @ONLY IMMEDIATE)
-
-# Workaround a problem in VTK:
-# I need to CONFIGURE this file in non-immediate mode so that it can pick
-# the variable that are set in SUBDIRS.
-# On the other hand, CMake's FindVTK is looking for VTKConfig.cmake to
-# find VTK. In an app like ParaViewComplete, VTK is accessed through
-# SUBDIRS(), Xdmf too. If we are in non-immediate mode, at the time
-# we go into the Xdmf subdir, VTKConfig.cmake has not been created, hence
-# VTK is not found.
 CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKConfig.cmake.in
                ${VTK_BINARY_DIR}/VTKConfig.cmake @ONLY)

@@ -214,15 +203,4 @@
 #-----------------------------------------------------------------------------
 # Configure VTKConfig.cmake for the install tree.
 CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKConfig.cmake.in
-               ${VTK_BINARY_DIR}/Utilities/VTKConfig.cmake @ONLY IMMEDIATE)
-
-# Workaround a problem in VTK:
-# I need to CONFIGURE this file in non-immediate mode so that it can pick
-# the variable that are set in SUBDIRS.
-# On the other hand, CMake's FindVTK is looking for VTKConfig.cmake to
-# find VTK. In an app like ParaViewComplete, VTK is accessed through
-# SUBDIRS(), Xdmf too. If we are in non-immediate mode, at the time
-# we go into the Xdmf subdir, VTKConfig.cmake has not been created, hence
-# VTK is not found.
-CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKConfig.cmake.in
                ${VTK_BINARY_DIR}/Utilities/VTKConfig.cmake @ONLY)


Passed additional R options when defining VTK external project

On windows, the location of Base, Blas and Lapack libraries is non
conventional and can't be discovered by the current implementation
of FindR.cmake

For that reason, the associated option have to be explicitly passed
to VTK.

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -26,7 +26,11 @@
       ${ep_common_args}
       -DVTK_USE_GNU_R:BOOL=ON
       -DR_COMMAND:PATH=${R_COMMAND}
-      -DR_INCLUDE_DIR:PATH=${R_INCLUDE_DIR} # Note: VTK/FindR should be fixed upstream to auto discover this value based on R_COMMAND
+      -DR_INCLUDE_DIR:PATH=${R_INCLUDE_DIR}
+      -DR_LIBRARY_BASE:FILEPATH=${R_LIBRARY_BASE}
+      -DR_LIBRARY_BLAS:FILEPATH=${R_LIBRARY_BLAS}
+      -DR_LIBRARY_LAPACK:FILEPATH=${R_LIBRARY_LAPACK}
+      -DR_LIBRARY_READLINE:FILEPATH=${R_LIBRARY_READLINE}
       -DVTK_USE_N_WAY_ARRAYS:BOOL=ON # Required for using R interface
       -DVTK_USE_INFOVIS:BOOL=ON # Required for using R interface
       -DBUILD_EXAMPLES:BOOL=OFF


COMP: Make sure all Tck/Tk macros are loaded.

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -5,6 +5,9 @@
 # Help store a literal dollar in a string.  CMake 2.2 allows escaped
 # dollars but we have to support CMake 2.0.
 SET(DOLLAR "$")
+
+# Make sure all of the Tcl/Tk macros are loaded.
+INCLUDE(${VTK_SOURCE_DIR}/CMake/vtkTclTkMacros.cmake)

 #-----------------------------------------------------------------------------
 # Settings shared between the build tree and install tree.


UPD: cleanup duplicated compiler flags

UPD: cleanup duplicated compiler flags

--- CMakeLists.default.cmake
+++ CMakeLists.default.cmake
@@ -19,15 +19,15 @@
 		"Flags used by the compiler during all build types." FORCE
 	)

-	set(CMAKE_C_FLAGS_DEBUG "-fdiagnostics-color=auto -g -fstack-protector-all ${CMAKE_USER_C_FLAGS}"  CACHE STRING
+	set(CMAKE_C_FLAGS_DEBUG "-fdiagnostics-color=auto -g ${CMAKE_USER_C_FLAGS}"  CACHE STRING
 		"Flags used by the compiler during debug build." FORCE
 	)

-	set(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer -D_FORTIFY_SOURCE=1 -fstack-protector-all ${CMAKE_USER_C_FLAGS}" CACHE STRING
+	set(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer -D_FORTIFY_SOURCE=1 ${CMAKE_USER_C_FLAGS}" CACHE STRING
 		"Flags used by the compiler during release build." FORCE
 	)

-	set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -D_FORTIFY_SOURCE=1 -fstack-protector-all ${CMAKE_USER_C_FLAGS}" CACHE STRING
+	set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -D_FORTIFY_SOURCE=1 ${CMAKE_USER_C_FLAGS}" CACHE STRING
 		"Flags used by the compiler during release build with debug information." FORCE
 	)
 endif (CMAKE_COMPILER_IS_GNUCXX)


ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.39 -j1.40 vtkGenerateVTKConfig.cmake)

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -170,6 +170,10 @@
   SET(VTK_RUNTIME_DIRS_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_LIB_DIR})
 ENDIF(WIN32)

+IF(WIN32)
+  SET(VTK_EXE_EXT ".exe")
+ENDIF(WIN32)
+
 # Executable locations.
 SET(VTK_TCL_HOME_CONFIG "")
 SET(VTK_JAVA_JAR_CONFIG "")
@@ -181,17 +185,17 @@
 SET(VTK_WRAP_TCL_INIT_EXE_CONFIG "")
 SET(VTK_DOXYGEN_HOME_CONFIG "")
 IF(VTK_WRAP_TCL)
-  SET(VTK_WRAP_TCL_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapTcl)
-  SET(VTK_WRAP_TCL_INIT_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapTclInit)
+  SET(VTK_WRAP_TCL_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapTcl${VTK_EXE_EXT})
+  SET(VTK_WRAP_TCL_INIT_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapTclInit${VTK_EXE_EXT})
   SET(VTK_TCL_HOME_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_TCL_DIR}/tcl)
 ENDIF(VTK_WRAP_TCL)
 IF(VTK_WRAP_PYTHON)
-  SET(VTK_WRAP_PYTHON_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapPython)
-  SET(VTK_WRAP_PYTHON_INIT_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapPythonInit)
+  SET(VTK_WRAP_PYTHON_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapPython${VTK_EXE_EXT})
+  SET(VTK_WRAP_PYTHON_INIT_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapPythonInit${VTK_EXE_EXT})
 ENDIF(VTK_WRAP_PYTHON)
 IF(VTK_WRAP_JAVA)
-  SET(VTK_PARSE_JAVA_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkParseJava)
-  SET(VTK_WRAP_JAVA_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapJava)
+  SET(VTK_PARSE_JAVA_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkParseJava${VTK_EXE_EXT})
+  SET(VTK_WRAP_JAVA_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapJava${VTK_EXE_EXT})
   SET(VTK_JAVA_JAR_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_JAVA_DIR}/vtk.jar)
 ENDIF(VTK_WRAP_JAVA)


added libxml as dependency for mlpack

added libxml as dependency for mlpack

--- mlpack.cmake
+++ mlpack.cmake
@@ -13,6 +13,7 @@

 include (armadillo)
 include (boost)
+include (libxml2)

 external_source (mlpack
@@ -24,7 +25,7 @@

 message ("Installing ${mlpack_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${mlpack_NAME}
-    DEPENDS             ${armadillo_NAME} ${boost_NAME}
+    DEPENDS             ${armadillo_NAME} ${boost_NAME} ${libxml2_NAME}
     PREFIX              ${BUILDEM_DIR}
     URL                 ${mlpack_URL}
     URL_MD5             ${mlpack_MD5}


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -11,6 +11,7 @@

 Name=VLC
 Name[bg]=VLC
+Name[bs]=VLC
 Name[ca]=VLC
 Name[ca@valencia]=VLC
 Name[cs]=VLC
@@ -52,6 +53,7 @@

 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


Error on Find*.cmake file fixed

Error on Find*.cmake file fixed


HTCONDOR-1096 Don't add -lresolv to the global link line

We only use the resolver routine in one place, daemon_core,
where we clear the DNS cache with res_init(), but that function
lives in libc on Linux.  On Mac, we explicitly add it to the
condor_utils dependencies.

With this change, -lresolv isn't added to all our link lines,
which means we can successfully link our static binaries on platforms like el9
which don't currently supply a static version of this library.


Remove compiler specification due to weird Mavericks issues

--- BuildSupport.cmake
+++ BuildSupport.cmake
@@ -64,7 +64,7 @@
 # Initialize environment variables string to use for commands.
 set (BUILDEM_BIN_PATH     ${BUILDEM_BIN_DIR}:$ENV{PATH})
 set (BUILDEM_LIB_PATH     ${BUILDEM_LIB_DIR}:$ENV{${BUILDEM_LD_LIBRARY_VAR}})
-set (BUILDEM_ENV_STRING   env PATH=${BUILDEM_BIN_PATH} ${BUILDEM_LD_LIBRARY_VAR}=${BUILDEM_LIB_PATH} ${BUILDEM_PLATFORM_SPECIFIC_ENV} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
+set (BUILDEM_ENV_STRING   env PATH=${BUILDEM_BIN_PATH} ${BUILDEM_LD_LIBRARY_VAR}=${BUILDEM_LIB_PATH} ${BUILDEM_PLATFORM_SPECIFIC_ENV})
 set (BUILDEM_LDFLAGS      "-Wl,-rpath,${BUILDEM_LIB_DIR} -L${BUILDEM_LIB_DIR}")

 # All library builds should go to BPD/lib


Android: Default to hide status bar.

Android: Default to hide status bar.

--- CMakeModules/AndroidUtils.cmake
+++ CMakeModules/AndroidUtils.cmake
@@ -35,7 +35,9 @@
         <activity android:name=\"android.app.NativeActivity\"
                 android:label=\"${activity_name}\"
                 android:screenOrientation=\"landscape\"
-                android:configChanges=\"orientation|keyboardHidden\">
+                android:configChanges=\"orientation|keyboardHidden\"
+                android:theme=\"@android:style/Theme.NoTitleBar.Fullscreen\"
+                >
             <!-- Tell NativeActivity the name of our .so -->
             <meta-data android:name=\"android.app.lib_name\"
                     android:value=\"${prog_name}_start\" />


add mitkNodePredicateData.cpp

add mitkNodePredicateData.cpp

--- Core/DataStructures/files.cmake
+++ Core/DataStructures/files.cmake
@@ -96,6 +96,7 @@
   mitkDataStorage/mitkNodePredicateAND.cpp
   mitkDataStorage/mitkNodePredicateBase.cpp
   mitkDataStorage/mitkNodePredicateCompositeBase.cpp
+  mitkDataStorage/mitkNodePredicateData.cpp
   mitkDataStorage/mitkNodePredicateDataType.cpp
   mitkDataStorage/mitkNodePredicateNOT.cpp
   mitkDataStorage/mitkNodePredicateOR.cpp


BUG: In CMake/ExternalProject, fix the download step specific to GIT repository.

A cmake script named "${name}-gitclone.cmake" is now created in TMP_DIR specific to the project.

This script contains the following command:
 - delete source directory
 - call git clone

--- CMake/ExternalProject.cmake
+++ CMake/ExternalProject.cmake
@@ -705,19 +705,28 @@
     get_filename_component(src_name "${source_dir}" NAME)
     get_filename_component(work_dir "${source_dir}/../" REALPATH)

-    # Since git doesn't allow to clone if the repository exists,
-    # let's delete it. Git will re-recreate it when the clone command will be invoked
-    execute_process(
-      COMMAND ${CMAKE_COMMAND} -E remove_directory ${source_dir}
-      RESULT_VARIABLE error_code
-      )
-    if(error_code)
-      message(FATAL_ERROR "Failed to remove directory: ${source_dir}")
-    endif()
-
-
+    # Since Git doesn't allow to clone if the repository exists,
+    # let's create a cmake script that will be invoked as a download command.
+    # That script will delete the source directory and call the appropriate git clone command
+    file(WRITE ${tmp_dir}/${name}-gitclone.cmake "
+execute_process(
+  COMMAND ${CMAKE_COMMAND} -E remove_directory ${source_dir}
+  RESULT_VARIABLE error_code
+  )
+if(error_code)
+  message(FATAL_ERROR "Failed to remove directory: ${source_dir}")
+endif()
+execute_process(
+  COMMAND ${Git_EXECUTABLE} clone ${git_repository} ${src_name}
+  WORKING_DIRECTORY ${work_dir}
+  RESULT_VARIABLE error_code
+  )
+if(error_code)
+  message(FATAL_ERROR 'Failed to clone repository: ${git_repository}')
+endif()
+")
     set(comment "Performing download step (GIT clone) for '${name}'")
-    set(cmd ${Git_EXECUTABLE} clone ${git_repository} ${src_name})
+    set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)
     list(APPEND depends ${stamp_dir}/${name}-gitinfo.txt)
   elseif(url)
     get_filename_component(work_dir "${source_dir}" PATH)


ENH: mark_as_advanced for OpenThreads cmake vars

--- CMake/FindOpenThreads.cmake
+++ CMake/FindOpenThreads.cmake
@@ -69,6 +69,7 @@
         /usr/freeware
     PATH_SUFFIXES include
 )
+mark_as_advanced(OPENTHREADS_INCLUDE_DIR)

 find_library(OPENTHREADS_LIBRARY
@@ -89,8 +90,9 @@
         /usr/freeware
     PATH_SUFFIXES lib64 lib
 )
+mark_as_advanced(OPENTHREADS_LIBRARY)

-find_library(OPENTHREADS_LIBRARY_DEBUG
+find_library(OPENTHREADS_LIBRARY_DEBUG
     NAMES OpenThreadsd OpenThreadsWin32d
     HINTS
         $ENV{OPENTHREADS_DEBUG_LIBRARY_DIR}
@@ -109,6 +111,7 @@
         /usr/freeware
     PATH_SUFFIXES lib64 lib
 )
+mark_as_advanced(OPENTHREADS_LIBRARY_DEBUG)

 if(OPENTHREADS_LIBRARY_DEBUG)
     set(OPENTHREADS_LIBRARIES


Enable C++11 to build OpenCV using Linux

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -77,6 +77,7 @@
         -DBUILD_DOXYGEN_DOCS:BOOL=OFF
         -DWITH_CUDA:BOOL=OFF
         -DWITH_VTK:BOOL=OFF
+        -DENABLE_CXX11:BOOL=ON
         ${additional_cmake_args}
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}


bump version

bump version

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 3)
 set (VV_VERSION_MINOR 0)
-set (VV_VERSION_PATCH 2)
+set (VV_VERSION_PATCH 3)


Fix wrong DSO_NAME on Windows for non-debug builds

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -240,18 +240,9 @@
   if(NOT _compile_definitions)
     set(_compile_definitions) # clear _compile_definitions-NOTFOUND
   endif()
-  if(MSVC OR XCODE_VERSION)
-    set(_DSOName ${CMAKE_SHARED_LIBRARY_PREFIX}${Target}${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
-  else()
-    if(APPLE)
-      set(_DSOName ${CMAKE_SHARED_LIBRARY_PREFIX}${Target}.${${PROJECT_NAME}_VERSION_ABI}${CMAKE_SHARED_LIBRARY_SUFFIX})
-    else()
-      set(_DSOName ${CMAKE_SHARED_LIBRARY_PREFIX}${Target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${${PROJECT_NAME}_VERSION_ABI})
-    endif()
-  endif()
   string(TOUPPER ${Target} TARGET)
   list(APPEND _compile_definitions
-    ${TARGET}_SHARED ${TARGET}_DSO_NAME=\"${_DSOName}\")
+    ${TARGET}_SHARED ${TARGET}_DSO_NAME=\"$<TARGET_FILE_NAME:${Target}>\")
   set_target_properties(${Target} PROPERTIES
     COMPILE_DEFINITIONS "${_compile_definitions}")
 endfunction()


(split) ENH: Bump ITK Superbuild version to 4.2.1.

Change-Id: If2ec66a0867a33eb470cc7acedb4365ee5bf1aca


Python package lookup warns when installing outside python path

It is possible to install packages to locations outside the python path. The
python package lookup now warns when this happens.  It also honors the
LOCAL_PYTHON_EXECUTABLE variable which sets up a build-local python
environment.

--- scripts/PythonPackageLookup.cmake
+++ scripts/PythonPackageLookup.cmake
@@ -5,8 +5,32 @@
 include(PythonPackage)
 include(PackageLookup)

+function(_lpp_check_is_syspath python syspath)
+    set(program
+        "from sys import path"
+        "from os.path import abspath"
+        "print abspath('${syspath}')"
+        "print [abspath(u) for u in path]"
+        "assert abspath('${syspath}') in [abspath(u) for u in path]"
+    )
+    execute_process(
+        COMMAND ${python} -c "${program}"
+        RESULT_VARIABLE result
+        ERROR_VARIABLE error
+        OUTPUT_VARIABLE output
+    )
+    if(NOT result EQUAL 0)
+        message(WARNING
+            "Installing package into a path python won't know about: "
+            "${syspath}. You might want to use a local environment and "
+            "call ``add_to_python_path('${syspath}')``."
+        )
+    endif()
+endfunction()
+
 function(lookup_python_package package)
     cmake_parse_arguments(lpp "QUIET;REQUIRED" "VERSION;PATH" "" ${ARGN})
+    _python_executable(LOCALPYTHON ${lpp_UNPARSED_ARGUMENTS})
     if(NOT lpp_PATH)
         set(lpp_PATH "${EXTERNAL_ROOT}/python")
     endif()
@@ -25,7 +49,7 @@
     endif()

     # check we have setuptools
-    find_python_package(setuptools QUIET)
+    find_python_package(setuptools QUIET ${lpp_UNPARSED_ARGUMENTS})
     if(NOT setuptools_FOUND)
         if(lpp_REQUIRED)
             message(FATAL_ERROR "setuptools not available, cannot install ${package}")
@@ -38,6 +62,7 @@
     if(NOT EXISTS "${lpp_PATH}")
         file(MAKE_DIRECTORY "${lpp_PATH}")
     endif()
+    _lpp_check_is_syspath("${LOCALPYTHON}" "${lpp_PATH}")
     file(WRITE "${EXTERNAL_ROOT}/install_${package}.py"
         "from os import environ\n"
         "if 'PYTHONPATH' not in environ:\n"
@@ -53,7 +78,7 @@
         "exit(0 if result == True else 1)\n"
     )
     execute_process(
-        COMMAND ${PYTHON_EXECUTABLE} "${EXTERNAL_ROOT}/install_${package}.py"
+        COMMAND ${LOCALPYTHON} "${EXTERNAL_ROOT}/install_${package}.py"
         RESULT_VARIABLE result
         ERROR_VARIABLE error
         OUTPUT_VARIABLE output
@@ -61,5 +86,5 @@
     if(lpp_REQUIRED)
         set(arguments "${arguments} REQUIRED")
     endif()
-    find_python_package(${package} REQUIRED)
+    find_python_package(${package} REQUIRED ${lpp_UNPARSED_ARGUMENTS})
 endfunction()


Version 2.2 released. Bugfixes only.

Version 2.2 released. Bugfixes only.

- Various scoping errors and one copy&paste mistake were causing dependency system failure.

Note: PARENT_SCOPE means *only* parent scope, not current scope.

--- LibFindMacros.cmake
+++ LibFindMacros.cmake
@@ -1,4 +1,4 @@
-# Version 2.1
+# Version 2.2
 # Public Domain, originally written by Lasse Kärkkäinen <tronic>
 # Maintained at https://github.com/Tronic/cmake-modules
 # Please send your improvements as pull requests on Github.
@@ -12,7 +12,7 @@
     set(${PREFIX}_args ${${PREFIX}_args} REQUIRED)
   endif()
   find_package(${${PREFIX}_args})
-  set(${PREFIX}_DEPENDENCIES ${${PREFIX}_DEPENDENCIES};${PKG} PARENT_SCOPE)
+  set(${PREFIX}_DEPENDENCIES ${${PREFIX}_DEPENDENCIES};${PKG})
   unset(${PREFIX}_args)
 endmacro()

@@ -50,7 +50,7 @@
     find_path(${PREFIX}_INCLUDE_DIR NAMES ${pathargs} HINTS ${${PREFIX}_PKGCONF_INCLUDE_DIRS})
   endif()
   if (libraryargs)
-    find_library(${PREFIX}_SDL_LIBRARY NAMES ${libraryargs} HINTS ${${PREFIX}_PKGCONF_LIBRARY_DIRS})
+    find_library(${PREFIX}_LIBRARY NAMES ${libraryargs} HINTS ${${PREFIX}_PKGCONF_LIBRARY_DIRS})
   endif()
 endfunction()

@@ -200,20 +200,20 @@
     foreach (i ${configopts})
       mark_as_advanced(${i})
     endforeach()
-    set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE)
-    set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE)
-    set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE)
-    set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE)
-    set (${PREFIX}_FOUND TRUE PARENT_SCOPE)
     if (NOT quiet)
       message(STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
       if (LIBFIND_DEBUG)
-        message(STATUS "  ${PREFIX}_INCLUDE_OPTS=${${PREFIX}_INCLUDE_OPTS}")
-        message(STATUS "  ${PREFIX}_LIBRARY_OPTS=${${PREFIX}_LIBRARY_OPTS}")
+        message(STATUS "  ${PREFIX}_DEPENDENCIES=${${PREFIX}_DEPENDENCIES}")
+        message(STATUS "  ${PREFIX}_INCLUDE_OPTS=${includeopts}")
         message(STATUS "  ${PREFIX}_INCLUDE_DIRS=${includes}")
+        message(STATUS "  ${PREFIX}_LIBRARY_OPTS=${libraryopts}")
         message(STATUS "  ${PREFIX}_LIBRARIES=${libs}")
-        message(STATUS "  ${PREFIX}_DEPENDENCIES=${${PREFIX}_DEPENDENCIES}")
       endif()
+      set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE)
+      set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE)
+      set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE)
+      set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE)
+      set (${PREFIX}_FOUND TRUE PARENT_SCOPE)
     endif()
     return()
   endif()


dlopen() versioned 'self' library name

dlopen() versioned 'self' library name

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

--- PurpleAddAmalgamation.cmake
+++ PurpleAddAmalgamation.cmake
@@ -10,12 +10,20 @@
 include(PurpleInstallPDB)
 include(PurpleExpandLibraries)

-function(PURPLE_ADD_AMALGAMATION NAME)
+function(PURPLE_ADD_AMALGAMATION NAME VERSION API_VERSION)
   purple_expand_libraries(LIBRARIES ${ARGN})

   set(THIS_SOURCES)
   set(THIS_LIBRARIES)
-  set(THIS_DEFINITIONS EQ_DSO_NAME=\"${CMAKE_SHARED_LIBRARY_PREFIX}${NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+  if(MSVC)
+    set(THIS_DEFINITIONS EQ_DSO_NAME=\"${CMAKE_SHARED_LIBRARY_PREFIX}${NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+  else()
+    if(APPLE)
+      set(THIS_DEFINITIONS EQ_DSO_NAME=\"${CMAKE_SHARED_LIBRARY_PREFIX}${NAME}.${API_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+    else()
+      set(THIS_DEFINITIONS EQ_DSO_NAME=\"${CMAKE_SHARED_LIBRARY_PREFIX}${NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${API_VERSION}\")
+    endif()
+  endif()

   foreach(LIBRARY ${LIBRARIES})
     get_property(SOURCES TARGET ${LIBRARY} PROPERTY SOURCES)


MANAGE_FILE_CACHE: remove the last new line

--- Modules/ManageFile.cmake
+++ Modules/ManageFile.cmake
@@ -320,14 +320,7 @@
     IF(NOT DEFINED _o_ERROR_VAR)
 	SET(_o_ERROR_VAR "${var}_ERROR")
     ENDIF(NOT DEFINED _o_ERROR_VAR)
-    MANAGE_CMAKE_FEDORA_CONF(_cmake_fedora_conf
-	VERBOSE_LEVEL ${M_OFF}
-	ERROR_MSG "Failed to find cmake-fedora.conf"
-	)
-    SET(HOME "$ENV{HOME}")
-    IF(${_cmake_fedora_conf})
-	SETTING_FILE_GET_ALL_VARIABLES(${_cmake_fedora_conf})
-    ENDIF(${_cmake_fedora_conf})
+    CMAKE_FEDORA_CONF_GET_ALL_VARIABLES()
     SET(_toRun TRUE)
     IF(NOT DEFINED LOCAL_CACHE)
 	SET(LOCAL_CACHE 1)
@@ -371,7 +364,8 @@
 	    OUTPUT_STRIP_TRAILING_WHITESPACE
 	    )
     ENDIF(_toRun)
-    FILE(STRINGS ${_cacheFile} _value)
+    FILE(READ ${_cacheFile} _value)
+    STRING(STRIP "${_value}" _value)
     SET(${var} "${_value}" PARENT_SCOPE)
 ENDFUNCTION(MANAGE_FILE_CACHE var file)


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -10,115 +10,55 @@
 InitialPreference=15

 Name=GStreamer
-Name[ast]=GStreamer
-Name[bg]=GStreamer
-Name[bs]=Gstreamer
 Name[ca]=GStreamer
 Name[ca@valencia]=GStreamer
 Name[cs]=GStreamer
-Name[da]=GStreamer
 Name[de]=GStreamer
-Name[el]=GStreamer
 Name[en_GB]=GStreamer
 Name[es]=GStreamer
-Name[et]=GStreamer
-Name[eu]=GStreamer
-Name[fa]=GStreamer
 Name[fi]=GStreamer
 Name[fr]=GStreamer
-Name[ga]=GStreamer
 Name[gl]=GStreamer
-Name[hsb]=GStreamer
-Name[hu]=GStreamer
 Name[id]=GStreamer
 Name[is]=GStreamer
-Name[it]=GStreamer
 Name[ja]=GStreamer
-Name[kk]=GStreamer
 Name[ko]=GStreamer
-Name[ku]=GStreamer
-Name[lt]=GStreamer
-Name[lv]=GStreamer
-Name[mai]=GStreamer
-Name[mr]=जी-स्ट्रीमर
 Name[nb]=GStreamer
-Name[nds]=GStreamer
 Name[nl]=GStreamer
 Name[nn]=GStreamer
-Name[pa]=ਜੀਸਟੀਰਮਰ
-Name[pl]=GStreamer
-Name[pt]=GStreamer
-Name[pt_BR]=GStreamer
-Name[ro]=GStreamer
-Name[ru]=GStreamer
 Name[se]=GStreamer
 Name[sk]=GStreamer
-Name[sl]=GStreamer
 Name[sr]=Гстример
 Name[sr@ijekavian]=Гстример
 Name[sr@ijekavianlatin]=GStreamer
 Name[sr@latin]=GStreamer
 Name[sv]=Gstreamer
-Name[th]=GStreamer
-Name[tr]=GStreamer
-Name[ug]=GStreamer
 Name[uk]=GStreamer
 Name[x-test]=xxGStreamerxx
-Name[zh_CN]=GStreamer
-Name[zh_TW]=GStreamer

 Comment=Phonon GStreamer backend
-Comment[bg]=Phonon GStreamer
-Comment[bs]=Gstreamer kao pozadina Phonona
 Comment[ca]=Dorsal GStreamer del Phonon
 Comment[ca@valencia]=Dorsal GStreamer del Phonon
 Comment[cs]=Podpůrná vrstva GStreamer pro Phonon
-Comment[da]=GStreamer-backend til Phonon
 Comment[de]=Phonon-Treiber für GStreamer
-Comment[el]=Σύστημα υποστήριξης GStreamer του Phonon
 Comment[en_GB]=Phonon GStreamer backend
 Comment[es]=Motor GStreamer para Phonon
-Comment[et]=Phononi GStreameri taustaprogramm
-Comment[eu]=Phonon-en GStreamer bizkarraldekoa
-Comment[fa]=پسانه‌ی جی‌استریمر برای فنون (Phonon GStreamer backend)
 Comment[fi]=Phonon GStreamer -taustajärjestelmä
 Comment[fr]=Moteur GStreamer pour Phonon
-Comment[ga]=Inneall GStreamer le haghaidh Phonon
 Comment[gl]=Infraestrutura de GStreamer para Phonon
-Comment[hsb]=Phonon GStreamer backend
-Comment[hu]=Phonon GStreamer-modul
-Comment[id]=Phonon GStreamer backend
+Comment[id]=Backend phonon GStreamer
 Comment[is]=Phonon GStreamer bakendi
-Comment[it]=Motore Gstreamer di Phonon
 Comment[ja]=Phonon GStreamer バックエンド
-Comment[kk]=Phonon GStreamer тетігі
 Comment[ko]=Phonon GStreamer 백엔드
-Comment[ku]=Binesaza Phonon GStreamer
-Comment[lt]=Phonon GStreamer galinė sąsaja
-Comment[lv]=Phonon GStreamer aizmugure
-Comment[mr]=फोनॉन जी-स्ट्रीमर बॅकएन्ड
 Comment[nb]=Phonon-motor for GStreamer
-Comment[nds]=GStreamer-Hülpprogramm för Phonon
 Comment[nl]=GStreamer-backend (Phonon)
 Comment[nn]=Phonon-motor for GStreamer
-Comment[pa]=ਫੋਨੋਨ ਜਸਟੀਰਮਰ ਬੈਕਐਂਡ
-Comment[pl]=Obsługa GStreamera przez Phonon
-Comment[pt]=Infra-estrutura do GStreamer para o Phonon
-Comment[pt_BR]=Infraestrutura do GStreamer para o Phonon
-Comment[ro]=Suportul GStreamer pentru Phonon
-Comment[ru]=Механизм GStreamer для Phonon
 Comment[se]=Phonon GStreamer duogášmohtor
 Comment[sk]=Podsystém Phonon GStreamer
-Comment[sl]=Zaledje GStreamer za Phonon
 Comment[sr]=Гстример као позадина Фонона
 Comment[sr@ijekavian]=Гстример као позадина Фонона
 Comment[sr@ijekavianlatin]=GStreamer kao pozadina Phonona
 Comment[sr@latin]=GStreamer kao pozadina Phonona
 Comment[sv]=Phonon Gstreamer-gränssnitt
-Comment[th]=โปรแกรมเบื้องหลัง GStreamer ของ Phonon
-Comment[tr]=Phonon GStreamer arka ucu
-Comment[ug]=Phonon GStreamer نىڭ ئارقائۇچى
 Comment[uk]=Модуль використання GStreamer у Phonon
 Comment[x-test]=xxPhonon GStreamer backendxx
-Comment[zh_CN]=Phonon GStreamer 后端
-Comment[zh_TW]=Phonon GStreamer 後端介面


Fix error output in PackageConfig

Fix error output in PackageConfig

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -215,7 +215,7 @@
     "  list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${${_dependent}_name}_LIBRARIES})\n"
     "  list(APPEND ${UPPER_PROJECT_NAME}_INCLUDE_DIRS \${${${_dependent}_name}_INCLUDE_DIRS})\n"
     "else()\n"
-    "  set(_fail TRUE)\n"
+    "  set(_fail \"${_dependent} not found\")\n"
     "endif()\n\n")
 endforeach()
 string(REGEX REPLACE ";" " " DEPENDENTS ${DEPENDENTS})


Fix transients

Fix transients

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -155,10 +155,13 @@
 )
 foreach(_transient ${${UPPER_PROJECT_NAME}_TRANSIENT_LIBRARIES})
   list(APPEND TRANSIENTS
-    "find_package(${_transient} ${${${_transient}_name}_VERSION} EXACT \${_req} \${_quiet})\n"
     "string(TOUPPER ${_transient} _TRANSIENT)\n"
+    "if(\${\${_TRANSIENT}_VERSION})\n"
+    "  set(${_transient}_exact EXACT)\n"
+    "endif()\n"
+    "find_package(${_transient} \${\${_TRANSIENT}_VERSION} REQUIRED \${${_transient}_exact} \${_req} \${_quiet})\n"
     "if(\${_TRANSIENT}_FOUND)\n"
-    "  list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${${_transient}_name}_LIBRARIES})\n"
+    "  list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_TRANSIENT}_LIBRARIES})\n"
     "else()\n"
     "  set(_fail TRUE)\n"
     "endif()\n\n")


Added toolchain support to other buildsteps. (3)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -311,9 +311,9 @@
         set(CC_ANALYSE_FLAGS "--analyze")
     endif()
     if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-        ctest_configure(OPTIONS -DCI_FLAGS=${CC_ANALYSE_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
-    else()
-        ctest_configure(OPTIONS -DCI_FLAGS=${CC_ANALYSE_FLAGS})
+        ctest_configure(OPTIONS -DKD_BUILD_TESTS=0 -DCI_FLAGS=${CC_ANALYSE_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
+    else()
+        ctest_configure(OPTIONS -DKD_BUILD_TESTS=0 -DCI_FLAGS=${CC_ANALYSE_FLAGS})
     endif()
     ctest_build()
     ctest_submit(PARTS Start Update Configure Build Upload Submit)
@@ -413,7 +413,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    set(CC_MSAN_FLAGS "-fsanitize=memory")
+    set(CC_MSAN_FLAGS "-fsanitize=memory -fsanitize-memory-track-origins")
     if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
         ctest_configure(OPTIONS -DCI_FLAGS=${CC_MSAN_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
     else()


Added toolchain support to other buildsteps. (2)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -213,7 +213,7 @@
 ctest_update()
 ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
 if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-     ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
+     ctest_configure(OPTIONS -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
 else()
     ctest_configure()
 endif()
@@ -257,20 +257,20 @@
     endif()
 endif()
 if(CTEST_COVERAGE_COMMAND)
+    set(CTEST_BUILD_NAME "${CI_BUILD_NAME}-cov")
+    ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+    ctest_start(Continuous)
+    ctest_update()
+    ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
     if(CC_NAME STREQUAL "gcc" OR CC_NAME STREQUAL "clang" OR CC_NAME STREQUAL "xcode")
-        set(CC_COVERAGE_FLAGS "--coverage ${CC_COVERAGE_FLAGS}")
+        set(CC_COVERAGE_FLAGS "--coverage")
     elseif(CC_NAME STREQUAL "icc")
-        set(CC_COVERAGE_FLAGS " -prof-gen:srcpos -prof-dir=${CTEST_BINARY_DIRECTORY} ${CC_COVERAGE_FLAGS}")
-    endif()
-    set(CTEST_BUILD_NAME "${CI_BUILD_NAME}-cov")
-    ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-    ctest_start(Continuous)
-    ctest_update()
-    ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
+        set(CC_COVERAGE_FLAGS "-prof-gen:srcpos -prof-dir=${CTEST_BINARY_DIRECTORY}")
+    endif()
 if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-    ctest_configure(OPTIONS "-DCI_FLAGS=${CC_COVERAGE_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
-else()
-    ctest_configure(OPTIONS "-DCI_FLAGS=${CC_COVERAGE_FLAGS}")
+    ctest_configure(OPTIONS -DCI_FLAGS=${CC_COVERAGE_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
+else()
+    ctest_configure(OPTIONS -DCI_FLAGS=${CC_COVERAGE_FLAGS})
 endif()
     ctest_build()
     ctest_test()
@@ -306,13 +306,14 @@
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
     if(CC_NAME STREQUAL "msvc")
-        ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_FLAGS=/analyze")
+        set(CC_ANALYSE_FLAGS "/analyze")
     elseif(CC_NAME STREQUAL "clang")
-        if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-            ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_FLAGS=--analyze -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
-        else()
-            ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_FLAGS=--analyze")
-        endif()
+        set(CC_ANALYSE_FLAGS "--analyze")
+    endif()
+    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_ANALYSE_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
+    else()
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_ANALYSE_FLAGS})
     endif()
     ctest_build()
     ctest_submit(PARTS Start Update Configure Build Upload Submit)
@@ -329,7 +330,7 @@
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
     if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-        ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
+        ctest_configure(OPTIONS -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
     else()
         ctest_configure()
     endif()
@@ -384,10 +385,11 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-        ctest_configure(OPTIONS "-DCI_FLAGS=${CC_ASAN_FLAGS} -fsanitize=address -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
-    else()
-        ctest_configure(OPTIONS "-DCI_FLAGS=${CC_ASAN_FLAGS} -fsanitize=address")
+    set(CC_ASAN_FLAGS "${CC_ASAN_FLAGS} -fsanitize=address")
+    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_ASAN_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
+    else()
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_ASAN_FLAGS})
     endif()
     ctest_build()
     ctest_test()
@@ -411,10 +413,11 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-        ctest_configure(OPTIONS "-DCI_FLAGS=-fsanitize=memory -fsanitize-memory-track-origins -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
-    else()
-        ctest_configure(OPTIONS "-DCI_FLAGS=-fsanitize=memory -fsanitize-memory-track-origins")
+    set(CC_MSAN_FLAGS "-fsanitize=memory")
+    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_MSAN_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
+    else()
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_MSAN_FLAGS})
     endif()
     ctest_build()
     ctest_test()
@@ -449,10 +452,11 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-        ctest_configure(OPTIONS "-DCI_FLAGS=${CC_TSAN_FLAGS} -fsanitize=thread -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
-    else()
-        ctest_configure(OPTIONS "-DCI_FLAGS=${CC_TSAN_FLAGS} -fsanitize=thread")
+    set(CC_TSAN_FLAGS "-fsanitize=thread")
+    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_TSAN_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
+    else()
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_TSAN_FLAGS})
     endif()
     ctest_build()
     ctest_test()
@@ -467,7 +471,6 @@
     if(CC_VERSION VERSION_GREATER 3.7 OR CC_VERSION VERSION_EQUAL 3.7)
         if(CC_UBSAN GREATER 0)
             set(CTEST_MEMORYCHECK_TYPE "UndefinedBehaviorSanitizer")
-            set(CC_UBSAN_FLAGS "-fsanitize=undefined,integer -fno-sanitize=vptr,return")
         endif()
     endif()
 endif()
@@ -478,10 +481,11 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
-        ctest_configure(OPTIONS "-DCI_FLAGS=${CC_UBSAN_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
-    else()
-        ctest_configure(OPTIONS "-DCI_FLAGS=${CC_UBSAN_FLAGS}")
+    set(CC_UBSAN_FLAGS "-fsanitize=undefined")
+    if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_UBSAN_FLAGS} -DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE})
+    else()
+        ctest_configure(OPTIONS -DCI_FLAGS=${CC_UBSAN_FLAGS})
     endif()
     ctest_build()
     ctest_test()


Disabled ASan on android gcc.

Disabled ASan on android gcc.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -306,9 +306,9 @@
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
     if(CC_NAME STREQUAL "msvc")
-        set(CC_ANALYSE_FLAGS "/analyze")
+        set(CC_ANALYSE_FLAGS "/analyze /wd28251")
     elseif(CC_NAME STREQUAL "clang")
-        set(CC_ANALYSE_FLAGS "--analyze")
+        set(CC_ANALYSE_FLAGS "--analyze -Wno-unused-command-line-argument")
     endif()
     if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
         ctest_configure(OPTIONS "-DKD_BUILD_TESTS=0;-DCI_FLAGS=${CC_ANALYSE_FLAGS};-DCMAKE_TOOLCHAIN_FILE=$ENV{CMAKE_TOOLCHAIN_FILE}")
@@ -361,12 +361,16 @@

 # Dynamic analysis (ASan)
 # ASan was introduced in GCC 4.8 / Clang 3.1
+# ASan on Android only works with Clang
 if(CC_NAME STREQUAL "gcc")
     if(CC_VERSION VERSION_GREATER 4.8 OR CC_VERSION VERSION_EQUAL 4.8)
         if(CC_ASAN GREATER 0)
             set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer")
             set(CC_ASAN_FLAGS "-fuse-ld=gold")
         endif()
+    endif()
+    if(CC_PLATFORM STREQUAL "android")
+        set(CTEST_MEMORYCHECK_TYPE "")
     endif()
 elseif(CC_NAME STREQUAL "clang")
     if(CC_VERSION VERSION_GREATER 3.1 OR CC_VERSION VERSION_EQUAL 3.1)


enable vlc integration

enable vlc integration

--- PluginConfig.cmake
+++ PluginConfig.cmake
@@ -13,7 +13,7 @@
 #if you want embed vlc into FBVLC distribution:
 # 1) place vlc into FBVLC\Win\WiX\vlc-${VLC_VERSION}
 # 2) uncomment following line
-#set(VLC_VERSION "2.0.3")
+set(VLC_VERSION "2.0.3")
 # 3) run prepXXXX.cmd from FireBreath

 #unfortunately current implementation does not work :(


Revert r297516 - Respect CMAKE_INSTALL_MANDIR for sphinx generated manpages

When CMAKE_INSTALL_MANDIR isn't defined it ends up attempting to install
the man pages under "/man1" and we really don't want to accidentally install
stuff at the filesystem root.

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

--- cmake/modules/AddSphinxTarget.cmake
+++ cmake/modules/AddSphinxTarget.cmake
@@ -51,7 +51,7 @@
         # FIXME: We might not ship all the tools that these man pages describe
         install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
                 COMPONENT "${project}-sphinx-man"
-                DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+                DESTINATION share/man/man1)

       elseif (builder STREQUAL html)
         string(TOUPPER "${project}" project_upper)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2011)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 03)
+SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   31)
+SET(KWSYS_DATE_STAMP_DAY   01)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   25)
+SET(KWSYS_DATE_STAMP_DAY   26)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


cmake: Simplify ITKv4 project removing unused support for custom JPEG/TIFF

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -59,22 +59,6 @@
       -DITK_USE_FFTWD:BOOL=ON
       )
   endif()
-  if( ${PROJECT_NAME}_BUILD_TIFF_SUPPORT )
-    set(${proj}_TIFF_ARGS
-      -DITK_USE_SYSTEM_TIFF:BOOL=ON
-      -DTIFF_LIBRARY:FILEPATH=${TIFF_LIBRARY}
-      -DTIFF_INCLUDE_DIR:PATH=${TIFF_INCLUDE_DIR}
-       )
-    list(APPEND ${proj}_DEPENDENCIES TIFF)
-  endif()
-  if( ${PROJECT_NAME}_BUILD_JPEG_SUPPORT )
-    set(${proj}_JPEG_ARGS
-      -DITK_USE_SYSTEM_JPEG:BOOL=ON
-      -DJPEG_LIBRARY:FILEPATH=${JPEG_LIBRARY}
-      -DJPEG_INCLUDE_DIR:PATH=${JPEG_INCLUDE_DIR}
-      )
-    list(APPEND ${proj}_DEPENDENCIES JPEG)
-  endif()

   # Include dependent projects if any
   SlicerMacroCheckExternalProjectDependency(${proj})
@@ -119,8 +103,6 @@
       -DKWSYS_USE_MD5:BOOL=ON # Required by SlicerExecutionModel
       -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
       -DModule_MGHIO:BOOL=ON  # Allow building of the MGHIO classes
-      ${${proj}_TIFF_ARGS}
-      ${${proj}_JPEG_ARGS}
       ${${proj}_DCMTK_ARGS}
       ${${proj}_WRAP_ARGS}
       ${${proj}_FFTWF_ARGS}


ENH: Updating ITKv4 version

ENH: Updating ITKv4 version

The previous ITK version was not compiling on certain version of MacOS.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -135,14 +135,13 @@
       -DITK_LEGACY_REMOVE:BOOL=OFF
       -DITK_FUTURE_LEGACY_REMOVE:=BOOL=ON
       -DITKV3_COMPATIBILITY:BOOL=ON
-      -DITK_BUILD_ALL_MODULES:BOOL=ON
+      -DITK_BUILD_DEFAULT_MODULES:BOOL=ON
       -DITK_USE_REVIEW:BOOL=ON
       -DModule_ITKReview:BOOL=ON
       #-DITK_INSTALL_NO_DEVELOPMENT:BOOL=ON
-      -DITK_BUILD_ALL_MODULES:BOOL=ON
       -DKWSYS_USE_MD5:BOOL=ON # Required by SlicerExecutionModel
       -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
-      -DFetch_MGHIO:BOOL=ON  # Allow building of the MGHIO classes
+      -DModule_MGHIO:BOOL=ON  # Allow building of the MGHIO classes
       -DITK_USE_SYSTEM_DCMTK:BOOL=${${PROJECT_NAME}_BUILD_DICOM_SUPPORT}
       ${${proj}_TIFF_ARGS}
       ${${proj}_JPEG_ARGS}
@@ -153,9 +152,9 @@
       ${${proj}_FFTWD_ARGS}
     )
   ### --- End Project specific additions
-  set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG c3624fafeb15f042839a8e6c463970e75ad40777)
-  set(ITK_VERSION_ID ITK-4.5)
+  set(${proj}_REPOSITORY ${git_protocol}://github.com/Slicer/ITK.git)
+  set(${proj}_GIT_TAG 0f6c2b3e00bdb4fdd590c428c19c2ed379e9a71d)
+  set(ITK_VERSION_ID ITK-4.7)

   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}


BUG: Fixing issue with STREQUAL

BUG: Fixing issue with STREQUAL

--- Utilities/KWStyle/KWStyle.cmake
+++ Utilities/KWStyle/KWStyle.cmake
@@ -24,7 +24,7 @@

 string(STRIP ${KWSTYLE_VERSION_TEXT} KWSTYLE_VERSION_TEXT)

-IF(${KWSTYLE_VERSION_TEXT} STREQUAL "Version: Not defined")
+IF(KWSTYLE_VERSION_TEXT STREQUAL "Version: Not defined")
   MESSAGE("This project requires a newer version of KWStyle. Please upgrade the KWStyle executable.")
 ELSE(${KWSTYLE_VERSION_TEXT} STREQUAL "Version: Not defined")


Update SimpleITK superbuild to use BUILD_ALWAYS

This option was added to CMake before 3.10, and replaces the
forcebuild step.

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -461,18 +461,11 @@
     -DElastix_DIR:PATH=${Elastix_DIR}
   DEPENDS ${${CMAKE_PROJECT_NAME}_DEPENDENCIES}
   ${External_Project_USES_TERMINAL}
-  STEP_TARGETS configure build doc forcebuild
+  STEP_TARGETS configure build doc
+  BUILD_ALWAYS 1
 )

-ExternalProject_Add_Step(${proj} forcebuild
-  COMMAND ${CMAKE_COMMAND} -E remove
-    ${CMAKE_CURRENT_BUILD_DIR}/${proj}-prefix/src/${proj}-stamp/${prog}-build
-  DEPENDEES configure
-  DEPENDERS build
-  ALWAYS 1
-)
-
-# explicitly add a non-default step to build SimpleITK do
+# explicitly add a non-default step to build SimpleITK docs
 ExternalProject_Add_Step(${proj} doc
   COMMAND ${CMAKE_COMMAND}
       --build <BINARY_DIR>


removed reference to hackathor repo

removed reference to hackathor repo

--- version_config.cmake
+++ version_config.cmake
@@ -131,7 +131,6 @@
   set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)

 else()
-  set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/Hackathon-SIRF )
   set(DEFAULT_SIRF_TAG origin/spdhg_from_cil)

   ## STIR


ENH: Rename project URL in CTestConfig to 'MIDAScpp'

SVN-Revision: 2958


Mac OS X 10.4 build fix.

Mac OS X 10.4 build fix.


Improve using multiple git external files

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -83,7 +83,9 @@
         list(GET DATA 0 DIR)
         list(GET DATA 1 REPO)
         list(GET DATA 2 TAG)
-        string(REPLACE "/" "_" GIT_EXTERNAL_NAME ${DIR}) # unique, flat name
+
+        # Create a unique, flat name
+        string(REPLACE "/" "_" GIT_EXTERNAL_NAME ${DIR})

         if(NOT TARGET update_git_external_${GIT_EXTERNAL_NAME}) # not done
           # pull in identified external
@@ -97,7 +99,12 @@
             add_custom_target(update_git_external)
             add_dependencies(update update_git_external)
           endif()
-          string(REPLACE "/" "_" GIT_EXTERNAL_TARGET ${GIT_EXTERNALS})
+
+          # Create a unique, flat name
+          file(RELATIVE_PATH GIT_EXTERNALS_BASE ${CMAKE_SOURCE_DIR}
+            ${GIT_EXTERNALS})
+          string(REPLACE "/" "_" GIT_EXTERNAL_TARGET ${GIT_EXTERNALS_BASE})
+
           set(GIT_EXTERNAL_TARGET update_git_external_${GIT_EXTERNAL_TARGET})
           if(NOT TARGET ${GIT_EXTERNAL_TARGET})
             set(GIT_EXTERNAL_SCRIPT
@@ -106,7 +113,7 @@
               "file(WRITE ${GIT_EXTERNALS} \"# -*- mode: cmake -*-\n\")\n")
             add_custom_target(${GIT_EXTERNAL_TARGET}
               COMMAND ${CMAKE_COMMAND} -P ${GIT_EXTERNAL_SCRIPT}
-              COMMENT "Recreate ${GIT_EXTERNALS}"
+              COMMENT "Recreate ${GIT_EXTERNALS_BASE}"
               WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
           endif()

@@ -125,7 +132,7 @@
 endif()")
           add_custom_target(update_git_external_${GIT_EXTERNAL_NAME}
             COMMAND ${CMAKE_COMMAND} -P ${GIT_EXTERNAL_SCRIPT}
-            COMMENT "Update ${REPO} in ${GIT_EXTERNALS}"
+            COMMENT "Update ${REPO} in ${GIT_EXTERNALS_BASE}"
             DEPENDS ${GIT_EXTERNAL_TARGET}
             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
           add_dependencies(update_git_external


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   12)
+SET(KWSYS_DATE_STAMP_DAY   13)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   04)
+SET(KWSYS_DATE_STAMP_DAY   05)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


Remove KHR dependency retrieval

Remove KHR dependency retrieval

--- globjects-config.cmake
+++ globjects-config.cmake
@@ -9,7 +9,6 @@
 #   glbinding-config.cmake overwrites the variable MODULE_NAMES
 include(CMakeFindDependencyMacro)

-find_package(KHR QUIET)
 find_dependency(glm)
 find_dependency(glbinding)
 find_package(Eigen3 3.3 QUIET)


- [raspberry] Update toolchain with Docker image

--- toolchain/cmake/Toolchains/linux-raspberry-armhf_linux.toolchain.cmake
+++ toolchain/cmake/Toolchains/linux-raspberry-armhf_linux.toolchain.cmake
@@ -2,7 +2,7 @@
 set ( CMAKE_SYSTEM_PROCESSOR arm )
 set ( CMAKE_SYSTEM_VERSION 1 )

-set ( TOOLCHAIN_PREFIX "arm-linux-gnueabihf" )
+set ( TOOLCHAIN_PREFIX "arm-none-linux-gnueabihf" )

 set ( RASPBERRY TRUE )

@@ -10,7 +10,7 @@

 set ( SYSROOT_PREFIX "" )
 set ( CMAKE_SYSROOT
-    "/cross-rpi/gcc-arm-8.3-2019.03-x86_64-${TOOLCHAIN_PREFIX}/${TOOLCHAIN_PREFIX}/libc" )
+    "/cross-rpi/gcc-arm-9.2-2019.12-x86_64-${TOOLCHAIN_PREFIX}/${TOOLCHAIN_PREFIX}/libc" )

 set ( CMAKE_C_COMPILER "${TOOLCHAIN_PREFIX}-gcc" )
 set ( CMAKE_CXX_COMPILER "${TOOLCHAIN_PREFIX}-g++" )


BUG:Missing path to GL header file directory.

--- CMake/vtkTestGLX.cmake
+++ CMake/vtkTestGLX.cmake
@@ -75,6 +75,9 @@

 #unset(GLX_DEFINES_TYPE_GLXFBConfig CACHE)

+# for CHECK_C_SOURCE_COMPILES
+set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR})
+

 # -----------------------------------------------------------------------------
 # GLX_DEFINES_MACRO_GLX_VERSION_1_1


CMake warning fix

CMake warning fix

--- CompilerSettings.cmake
+++ CompilerSettings.cmake
@@ -10,13 +10,13 @@
     message(FATAL_ERROR "Unknown system")
 endif()

-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
 	set(CLANG 1)
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
 	set(GCC 1)
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
 	set(INTEL 1)
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
 	set(MSVC 1)
 endif()


set dir for continuous build

set dir for continuous build

git-svn-id: 8b72b58fb31a931b6e9a2bd3bb08bc6614045fb1@3495 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- test/openVibeTests.cmake
+++ test/openVibeTests.cmake
@@ -56,9 +56,7 @@
 ENDIF(${CTEST_SCRIPT_ARG} MATCHES Continuous)

 IF(${MODEL} MATCHES Continuous)
-#	set(OV-ROOT-DIR              "${CMAKE_CURRENT_SOURCE_DIR}/con.ov")
-	set(OV-ROOT-DIR              "/tmp/con.ov")
-#	file(MAKE_DIRECTORY ${OV-ROOT-DIR})
+	set(OV-ROOT-DIR              "${CMAKE_CURRENT_SOURCE_DIR}")
 ELSE(${MODEL} MATCHES Continuous)
 	# create a temporary directory with very short name to host build
 	exec_program("mktemp" ARGS "--tmpdir -d ov.XXX" OUTPUT_VARIABLE OV-ROOT-DIR)


ICC build checks GCC version to ensure sufficient libstdc++ version is available.

--- cmake/icc.cmake
+++ cmake/icc.cmake
@@ -35,5 +35,23 @@
 SET(OSPRAY_ARCH_AVX2    "-xCORE-AVX2")
 SET(OSPRAY_ARCH_AVX512  "-xMIC-AVX512")

+# check whether GCC (and therefore standard library) version is new enough for
+# C++11 on Linux systems
+IF (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+	SET(GCC_VERSION_REQUIRED "4.8.0")
+
+	IF(NOT GCC_VERSION)
+	  EXECUTE_PROCESS(COMMAND gcc -dumpversion OUTPUT_VARIABLE GCC_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE)
+	  SET(GCC_VERSION ${GCC_OUTPUT} CACHE STRING "GCC Version")
+	  MARK_AS_ADVANCED(GCC_VERSION)
+	ENDIF()
+
+	IF (GCC_VERSION VERSION_LESS GCC_VERSION_REQUIRED AND NOT OSPRAY_WARNED_GCC_VERSION)
+		# only warn as another libstdc++ could be in the library path...
+	  MESSAGE(WARNING "GCC version 4.8.0 or greater is required for a sufficient version of libstdc++.")
+	  SET(OSPRAY_WARNED_GCC_VERSION ON CACHE INTERNAL "Warned about required GCC version.")
+	ENDIF()
+ENDIF()
+
 SET(OSPRAY_COMPILER_SUPPORTS_AVX  TRUE)
 SET(OSPRAY_COMPILER_SUPPORTS_AVX2 TRUE)


cmake: Add GTest as TEST_DEPENDS

cmake: Add GTest as TEST_DEPENDS

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -96,6 +96,7 @@
   OPTIONAL_DEPENDS
     #<optional-dependency>
   TEST_DEPENDS
+    GTest
     #<test-dependency>
   OPTIONAL_TEST_DEPENDS
     #<optional-test-dependency>


Can add python egg directories to python paths

setup.py will download some eggs in the source directory, as well as create eggs there. We want to
include the downloaded eggs but not those that are created (it would interfere with the packages in
the build dir). Add a function to find those eggs we want.

--- scripts/EnvironmentScript.cmake
+++ scripts/EnvironmentScript.cmake
@@ -28,7 +28,8 @@
 # Adds many paths to a path file
 function(_add_to_a_path THISFILE)
     foreach(path ${ARGN})
-        _add_to_a_path_single("${THISFILE}" "${path}")
+        file(GLOB these_files "${path}")
+        _add_to_a_path_single("${THISFILE}" "${these_files}")
     endforeach()
 endfunction()

@@ -37,6 +38,33 @@
 endfunction()
 function(add_to_python_path)
     _add_to_a_path("${PROJECT_BINARY_DIR}/paths/pypaths.pth" ${ARGN})
+endfunction()
+
+# Gets list of eggs in given directories
+function(_get_python_eggs OUTVAR)
+    unset(patterns)
+    foreach(directory ${apeg_UNPARSED_ARGUMENTS})
+        if(NOT "${directory}" MATCHES ".*egg")
+            list(APPEND patterns "${directory}/*.egg")
+        else()
+            list(APPEND patterns "${directory}")
+        endif()
+    endforeach()
+    if(patterns)
+        file(GLOB directories ${patterns})
+        set(${OUTVAR} ${directories} PARENT_SCOPE)
+    endif()
+endfunction()
+
+# Add eggy directories to python path
+function(add_python_eggs)
+    cmake_parse_arguments(apeg "" "" "EXCLUDE;INCLUDE" ${ARGN})
+    _get_python_eggs(included_eggs ${apeg_UNPARSED_ARGUMENTS} ${apeg_INCLUDE})
+    _get_python_eggs(excluded_eggs ${apeg_EXCLUDE})
+    if(excluded_eggs)
+        list(REMOVE_ITEM included_eggs ${excluded_eggs})
+    endif()
+    add_to_python_path(${included_eggs})
 endfunction()

 if(NOT UNIX)


Add Wno-unused-private-fields for clang & CMake

--- CMake/common.cmake
+++ CMake/common.cmake
@@ -35,8 +35,9 @@

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic-errors -Wall -W -Werror -Wextra -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Winvalid-pch")

-# ???
-# clang:QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-private-field
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field")
+endif()

 # Enable linking to custom Qt version and libCore from both main executable and plugins
 set(CMAKE_INSTALL_RPATH "$ORIGIN:$ORIGIN/..:$ORIGIN/qt:$ORIGIN/../qt")


activate Qt wrapping always on msvc

activate Qt wrapping always on msvc

--- CMake/External_OTB.cmake
+++ CMake/External_OTB.cmake
@@ -7,6 +7,20 @@
 set(${proj}_DEPENDENCIES)

 set(BUILD_EXAMPLES ON)
+
+if(USE_SYSTEM_QT4)
+   set(OTB_SB_WRAP_QT_CONFIG)
+   set(OTB_SB_WRAP_QT_CONFIG -DOTB_WRAP_QT:BOOL=ON)
+else()
+   if(MSVC)
+      set(OTB_SB_WRAP_QT_CONFIG -DOTB_WRAP_QT:BOOL=ON)
+      list(APPEND ${proj}_DEPENDENCIES QT4)
+    else(UNIX)
+       #TODO: use must have Qt4
+       message(STATUS "  Qt4 is not built by SuperBuild. You need to install it via package manager.")
+      set(OTB_SB_WRAP_QT_CONFIG -DOTB_WRAP_QT:BOOL=OFF)
+    endif()
+endif()

 if(USE_SYSTEM_GDAL)
   set(OTB_SB_GDAL_CONFIG)
@@ -155,7 +169,6 @@
       -DBUILD_TESTING:BOOL=${BUILD_TESTING}
       -DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
       -DBUILD_APPLICATIONS:BOOL=ON
-      -DOTB_WRAP_QT:BOOL=OFF
       -DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX}
       -DOTB_DATA_ROOT:STRING=${OTB_DATA_ROOT}
       -DOTB_USE_EXTERNAL_OSSIM:BOOL=ON
@@ -168,6 +181,7 @@
       -DOTB_USE_EXTERNAL_LIBKML:BOOL=ON
       -DOTB_USE_OPENCV:BOOL=ON
       -DOTB_USE_JPEG2000:BOOL=OFF
+      ${OTB_SB_WRAP_QT_CONFIG}
       ${OTB_SB_ITK_CONFIG}
       ${OTB_SB_OSSIM_CONFIG}
       ${OTB_SB_GDAL_CONFIG}


Cleanup: remove uwanted comment

Cleanup: remove uwanted comment

--- CMake/External_OTB.cmake
+++ CMake/External_OTB.cmake
@@ -133,9 +133,6 @@
 if(MSVC)
   set(BUILD_EXAMPLES OFF)
   set(OTB_SB_OPENCV_CONFIG)
-  #doesn't matter to use cmake variable with JPEG prefix. all are empty for windows
-  #GDAL is built with internal JPEG due to static link conflict.
-  #replace superbuild version of libjpeg.lib with the GDAL internal one
   set(OTB_SB_JPEG_CONFIG -DJPEG_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libjpeg.lib)
 endif()


cmake/MyPackageDependency.cmake: to to ALL_IN_ONE branch if target exists

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -180,9 +180,12 @@
         ENDIF ()
         SET (realPackageDepend ${packageDepend}_static)
       ELSE ()
+        IF (MYPACKAGE_DEBUG)
+          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} dependency resolved to ${packageDepend} for target ${_target}")
+        ENDIF ()
         SET (realPackageDepend ${packageDepend})
       ENDIF ()
-      IF (_ALL_IN_ONE)
+      IF (_ALL_IN_ONE OR (TARGET ${realPackageDepend}))
         #
         # Dependency by target
         #
@@ -260,6 +263,9 @@
         # Include dependency
         #
         GET_PROPERTY(_property GLOBAL PROPERTY MYPACKAGE_DEPENDENCY_${packageDepend}_INCLUDE_DIRS)
+        IF (MYPACKAGE_DEBUG)
+          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} include dirs list is ${_property}")
+        ENDIF ()
         FOREACH (_include_directory ${_property})
           IF (MYPACKAGE_DEBUG)
             MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_include_directory} directory to ${_target}'s include directories")
@@ -270,6 +276,9 @@
         # Library dependency
         #
         GET_PROPERTY(_property GLOBAL PROPERTY MYPACKAGE_DEPENDENCY_${packageDepend}_LIBRARIES)
+        IF (MYPACKAGE_DEBUG)
+          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} library list is ${_property}")
+        ENDIF ()
         FOREACH (_library ${_property})
           IF (MYPACKAGE_DEBUG)
             MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_library} library to ${_target}")
@@ -280,6 +289,9 @@
         # Compile definitions
         #
         GET_PROPERTY(_property GLOBAL PROPERTY MYPACKAGE_DEPENDENCY_${packageDepend}_C_FLAGS_SHARED)
+        IF (MYPACKAGE_DEBUG)
+          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} compile definitions is ${_property}")
+        ENDIF ()
         FOREACH (_flag ${_property})
           IF (MYPACKAGE_DEBUG)
             MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_flag} compile flag to ${_target}")
@@ -290,6 +302,9 @@
         # Link flags
         #
         GET_PROPERTY(_property GLOBAL PROPERTY MYPACKAGE_DEPENDENCY_${packageDepend}_LINK_FLAGS)
+        IF (MYPACKAGE_DEBUG)
+          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} link flags is ${_property}")
+        ENDIF ()
         FOREACH (_flag ${_property})
           IF (MYPACKAGE_DEBUG)
             MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_flag} link flag to ${_target}")
@@ -299,6 +314,10 @@
             LINK_FLAGS ${_flag}
             )
         ENDFOREACH ()
+      ENDIF ()
+    ELSE ()
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] No target ${_target}")
       ENDIF ()
     ENDIF ()
   ENDFOREACH ()


Update year

Update year

--- cmake/projects/foo/hunter.cmake
+++ cmake/projects/foo/hunter.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2018, Ruslan Baratov
+# Copyright (c) 2016-2019, Ruslan Baratov
 # All rights reserved.

 # !!! DO NOT PLACE HEADER GUARDS HERE !!!


Update facts.cmake

Update facts.cmake


BUG#52341: PB2: rpl tests started taking three times more time on
           linux x86_64 max

Rpl tests were surprisingly taking too long when server was built
using cmake on linux. This was because cmake counter part of
patch for WL#4949 was not defining SIGNAL_WITH_VIO_CLOSE flag,
which had negative impact on the time needed to stop the slave IO
thread on STOP SLAVE command.

We fix this by deploy the missing SET command on configure.cmake.

--- configure.cmake
+++ configure.cmake
@@ -913,6 +913,7 @@

 SET(NO_ALARM "${HAVE_SOCKET_TIMEOUT}" CACHE BOOL
    "No need to use alarm to implement socket timeout")
+SET(SIGNAL_WITH_VIO_CLOSE "${HAVE_SOCKET_TIMEOUT}")
 MARK_AS_ADVANCED(NO_ALARM)


Comma missing on Bibtex reference prevents proper processing

--- src/docbook/index.xml.cmake
+++ src/docbook/index.xml.cmake
@@ -33,7 +33,7 @@

  BibTex
 <programlisting>
-@Article{EliasLagergren_fastdist
+@Article{EliasLagergren_fastdist,
   author =      {Isaac Elias and Jens Lagergren},
   title =	{Fast Computation of Distance Estimators},
   journal =	{BMC Bioinformatics},


Windows build progress fixed

Windows build progress fixed

--- blocks/boost/install/build_jobs.cmake
+++ blocks/boost/install/build_jobs.cmake
@@ -1,115 +1,119 @@
-include(toeb/cmakepp/cmakepp)
-include(boost/install/snake)
-
-function(__update_progress_message)
-	ref_set(${libs_ahead} "")
-	map_foreach("${__job_handles}" "[](handle lib) ref_append_string(${libs_ahead} \"\ \${lib}\")")
-endfunction()
-
-function(__job_success_handler process_handle)
-	map_get("${__job_handles}" "${process_handle}")
-	ans(lib)
-
-	#Remove handle from map after success
-	map_remove("${__job_handles}" "${process_handle}")
-
-	#Update libs list
-	__update_progress_message()
-
-
-
-	assign(output = process_handle.stdout)
-	assign(error = process_handle.stderr)
-	assign(result = process_handle.exit_code)
-	assign(output = process_handle.stdout)
-	assign(wd = process_handle.start_info.working_directory)
-
-	set(finish_message "Finished building ${lib} library")
-
-	#Maybe we need curses for this...
-	if(NOT WIN32)
-		string(LENGTH ${finish_message} finish_message_length)
-		ref_get(${progress_message_length})
-		ans(progress_message_length)
-		string_repeat(" " "${progress_message_length}")
-		ans(CLEAR)
-
-		echo_append("\r${CLEAR}")
-		message("\r${finish_message}")
-	else()
-		message("${finish_message}")
-	endif()
-
-	if(VERBOSE)
-		message("Process info:")
-		message(" - Working directory: ${wd}")
-		message(" - Return value: ${result}")
-		message(" - stdout: ${output}")
-		message(" - stderr: ${error}")
-	endif()
-endfunction()
-
-function(__job_error_handler process_handle)
-	map_get("${__job_handles}" "${process_handle}")
-	ans(lib)
-	set(error "{${process_handle}.stderr}")
-
-	message("${lib} library build failed. Output:")
-	message("${error}")
-endfunction()
-
-function(__global_progress_handler ticks)
-	ref_get(${libs_ahead})
-	ans(libs_ahead)
-
-	set(MESSAGE "Building${libs_ahead} libraries...")
-	string(LENGTH ${MESSAGE} SNAKE_LENGTH)
-	math(EXPR WINDOW "${SNAKE_LENGTH}")
-	math(EXPR MAX "(${WINDOW} + ${SNAKE_LENGTH})")
-
-	math(EXPR PROGRESS_COUNTER  "${MAX} - (${ticks} % ${MAX})")
-
-	generate_snake("${MESSAGE}" "${PROGRESS_COUNTER}" "${SNAKE_LENGTH}" "${WINDOW}" SNAKE)
-
-	set(PROGRESS_MESSAGE "Building Boost components, please wait [${SNAKE}]")
-	string(LENGTH "${PROGRESS_MESSAGE}" PROGRESS_MESSAGE_LENGTH)
-	ref_set("${progress_message_length}" "${PROGRESS_MESSAGE_LENGTH}")
-
-	echo_append("\r${PROGRESS_MESSAGE}")
-endfunction()
-
-function(__execute_success_handler handle)
-
-endfunction()
-
-function(__execute_error_handler handle)
-	message()
-endfunction()
-
-function(BII_BOOST_BUILD_LIBS_PARALLEL LIBS B2_CALL VERBOSE BOOST_DIR)
-	map_new()
-	ans(__job_handles)
-
-	foreach(lib ${LIBS})
-		message("Starting ${lib} library build job...")
-
-		execute(${B2_CALL} --with-${lib} WORKING_DIRECTORY ${BOOST_DIR}
-			    --success-callback __execute_success_handler
-			    --error-callback __job_error_handler
-			    --async)
-
-		ans(handle)
-		set(handles_list ${handles_list} ${handle})
-		map_set("${__job_handles}" "${handle}" "${lib}")
-	endforeach()
-
-	ref_new()
-	ans(libs_ahead)
-	__update_progress_message()
-
-	ref_new()
-	ans(progress_message_length)
-
-	process_wait_all(${handles_list} --idle-callback __global_progress_handler
-		                             --task-complete-callback __job_success_handler)
-endfunction()
+include(toeb/cmakepp/cmakepp)
+include(boost/install/snake)
+
+function(__update_progress_message)
+	ref_set(${libs_ahead} "")
+	map_foreach("${__job_handles}" "[](handle lib) ref_append_string(${libs_ahead} \"\ \${lib}\")")
+endfunction()
+
+function(__job_success_handler process_handle)
+	map_get("${__job_handles}" "${process_handle}")
+	ans(lib)
+
+	#Remove handle from map after success
+	map_remove("${__job_handles}" "${process_handle}")
+
+	#Update libs list
+	__update_progress_message()
+
+
+
+	assign(output = process_handle.stdout)
+	assign(error = process_handle.stderr)
+	assign(result = process_handle.exit_code)
+	assign(output = process_handle.stdout)
+	assign(wd = process_handle.start_info.working_directory)
+
+	set(finish_message "Finished building ${lib} library")
+
+	#Maybe we need curses for this...
+	if(NOT WIN32)
+		string(LENGTH ${finish_message} finish_message_length)
+		ref_get(${progress_message_length})
+		ans(progress_message_length)
+		string_repeat(" " "${progress_message_length}")
+		ans(CLEAR)
+
+		echo_append("\r${CLEAR}")
+		message("\r${finish_message}")
+	else()
+		message("${finish_message}")
+	endif()
+
+	if(VERBOSE)
+		message("Process info:")
+		message(" - Working directory: ${wd}")
+		message(" - Return value: ${result}")
+		message(" - stdout: ${output}")
+		message(" - stderr: ${error}")
+	endif()
+endfunction()
+
+function(__job_error_handler process_handle)
+	map_get("${__job_handles}" "${process_handle}")
+	ans(lib)
+	set(error "{${process_handle}.stderr}")
+
+	message("${lib} library build failed. Output:")
+	message("${error}")
+endfunction()
+
+function(__global_progress_handler ticks)
+	ref_get(${libs_ahead})
+	ans(libs_ahead)
+
+	set(MESSAGE "Building${libs_ahead} libraries...")
+	string(LENGTH ${MESSAGE} SNAKE_LENGTH)
+	math(EXPR WINDOW "${SNAKE_LENGTH}")
+	math(EXPR MAX "(${WINDOW} + ${SNAKE_LENGTH})")
+
+	math(EXPR PROGRESS_COUNTER  "${MAX} - (${ticks} % ${MAX})")
+
+	generate_snake("${MESSAGE}" "${PROGRESS_COUNTER}" "${SNAKE_LENGTH}" "${WINDOW}" SNAKE)
+
+	set(PROGRESS_MESSAGE "Building Boost components, please wait [${SNAKE}]")
+	string(LENGTH "${PROGRESS_MESSAGE}" PROGRESS_MESSAGE_LENGTH)
+	ref_set("${progress_message_length}" "${PROGRESS_MESSAGE_LENGTH}")
+
+    if(NOT WIN32)
+        echo_append("\r${PROGRESS_MESSAGE}")
+    else()
+        message("${PROGRESS_MESSAGE}")
+    endif()
+endfunction()
+
+function(__execute_success_handler handle)
+
+endfunction()
+
+function(__execute_error_handler handle)
+	message()
+endfunction()
+
+function(BII_BOOST_BUILD_LIBS_PARALLEL LIBS B2_CALL VERBOSE BOOST_DIR)
+	map_new()
+	ans(__job_handles)
+
+	foreach(lib ${LIBS})
+		message("Starting ${lib} library build job...")
+
+		execute(${B2_CALL} --with-${lib} WORKING_DIRECTORY ${BOOST_DIR}
+			    --success-callback __execute_success_handler
+			    --error-callback __job_error_handler
+			    --async)
+
+		ans(handle)
+		set(handles_list ${handles_list} ${handle})
+		map_set("${__job_handles}" "${handle}" "${lib}")
+	endforeach()
+
+	ref_new()
+	ans(libs_ahead)
+	__update_progress_message()
+
+	ref_new()
+	ans(progress_message_length)
+
+	process_wait_all(${handles_list} --idle-callback __global_progress_handler
+		                             --task-complete-callback __job_success_handler)
+endfunction()


Adapted MITKData.cmake revision tag

Adapted MITKData.cmake revision tag

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

 if(BUILD_TESTING)

-  set(revision_tag 062612b5)
+  set(revision_tag cb2c366985ff086872a3bb6f99cbf34455cf0d44)

   ExternalProject_Add(${proj}
     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz


Fix FindFFMPEG to not include libraries that were not found in FFMPEG_LIBRARIES

--- CMake/FindFFMPEG.cmake
+++ CMake/FindFFMPEG.cmake
@@ -111,7 +111,7 @@
   /usr/lib
 )

-
+SET(FFMPEG_LIBRARIES)
 IF(FFMPEG_INCLUDE_DIR)
   IF(FFMPEG_avformat_LIBRARY)
     IF(FFMPEG_avcodec_LIBRARY)
@@ -122,16 +122,43 @@
           ${FFMPEG_avformat_LIBRARY}
           ${FFMPEG_avutil_LIBRARY}
           )
-        SET( FFMPEG_LIBRARIES
-          ${FFMPEG_BASIC_LIBRARIES}
-          ${FFMPEG_vorbis_LIBRARY}
-          ${FFMPEG_dc1394_LIBRARY}
-          ${FFMPEG_vorbisenc_LIBRARY}
-          ${FFMPEG_theora_LIBRARY}
-          ${FFMPEG_dts_LIBRARY}
-          ${FFMPEG_gsm_LIBRARY}
-          ${FFMPEG_swscale_LIBRARY}
-          ${FFMPEG_z_LIBRARY})
+
+        SET(FFMPEG_LIBRARIES ${FFMPEG_BASIC_LIBRARIES})
+
+        IF(FFMPEG_vorbis_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_vorbis_LIBRARY})
+        ENDIF(FFMPEG_vorbis_LIBRARY)
+
+        IF(FFMPEG_dc1394_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_dc1394_LIBRARY})
+        ENDIF(FFMPEG_dc1394_LIBRARY)
+
+        IF(FFMPEG_vorbisenc_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_vorbisenc_LIBRARY})
+        ENDIF(FFMPEG_vorbisenc_LIBRARY)
+
+        IF(FFMPEG_theora_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_theora_LIBRARY})
+        ENDIF(FFMPEG_theora_LIBRARY)
+
+        IF(FFMPEG_dts_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_dts_LIBRARY})
+        ENDIF(FFMPEG_dts_LIBRARY)
+
+        IF(FFMPEG_gsm_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_gsm_LIBRARY})
+        ENDIF(FFMPEG_gsm_LIBRARY)
+
+        IF(FFMPEG_swscale_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_swscale_LIBRARY})
+        ENDIF(FFMPEG_swscale_LIBRARY)
+
+        IF(FFMPEG_z_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_z_LIBRARY})
+        ENDIF(FFMPEG_z_LIBRARY)
+
+        SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE INTERNAL "All presently found FFMPEG libraries.")
+
       ENDIF(FFMPEG_avutil_LIBRARY)
     ENDIF(FFMPEG_avcodec_LIBRARY)
   ENDIF(FFMPEG_avformat_LIBRARY)


[DP::CMake] adjusted dp3rdParty.cmake to better find Qt installation

Change-Id: I35188b7406a68186a77e012ae06f791e8bbe9af9
Reviewed-on: http://git-master/r/797705
Reviewed-by: Andreas Suessenbach <4a33aee5fd9e9abd372b9ed2610be2b00e98d23a@nvidia.com>
Tested-by: Andreas Suessenbach <4a33aee5fd9e9abd372b9ed2610be2b00e98d23a@nvidia.com>

--- CMake/dp3rdParty.cmake
+++ CMake/dp3rdParty.cmake
@@ -1,135 +1,132 @@
-include("dp")
-
-file( TO_CMAKE_PATH "$ENV{DP_3RDPARTY_PATH}" DP_3RDPARTY_PATH)
-
-if( UNIX )
-  set(Boost_USE_STATIC_LIBS       OFF)
-  set(Boost_USE_MULTITHREADED      ON)
-  set(Boost_USE_STATIC_RUNTIME    OFF)
-endif()
-
-### Add 3rdparty libraries to the CMake search paths
-if(WIN32)
-  ### boost
-  if (NOT BOOSTROOT)
-    file( TO_CMAKE_PATH "${DP_3RDPARTY_PATH}/Boost" BOOSTROOT)
-
-    if (EXISTS "${BOOSTROOT}")
-      set(BOOST_ROOT "${BOOSTROOT}")
-      set(Boost_USE_STATIC_LIBS "ON")
-    endif()
-  endif()
-
-  # CMake doesn't know about newer boost versions yet
-  set(Boost_ADDITIONAL_VERSIONS "1.59.0" "1.59")
-
-  ### fltlib
-  # Currently disabled since a new version is required
-  #list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/fltlib/include")
-  #list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/fltlib/lib")
-
-  ### lib3ds
-  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/lib3ds/include")
-  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/lib3ds/lib")
-
-  ### tinyxml
-  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/tinyxml/include")
-  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/tinyxml/lib")
-
-  ### OpenEXR
-  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/OpenEXR/include")
-  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/OpenEXR")
-
-  ### DevIL
-  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/DevIL/include")
-  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/DevIL")
-
-  ### GLEW
-  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/glew/include")
-  # TODO OS arch dependency?
-  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/glew/lib/Release/x64")
-
-  ### freeglut
-  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/freeglut/include")
-  # TODO OS arch dependency?
-  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/freeglut/lib/x64")
-
-  ### Qt
-
-  # Search for Windows SDK so that Qt5 can find glu32.lib
-  if(WIN32)
-    foreach(WINKIT "KitsRoot81" "KitsRoot")
-      get_filename_component(WINKIT_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;${WINKIT}]" ABSOLUTE)
-      if(EXISTS ${WINKIT_DIR})
-        if ( ${DP_ARCH} STREQUAL "amd64" )
-          set(WINKIT_ARCH "x64")
-        elseif(${DP_ARCH} STREQUAL "x86")
-          set(WINKIT_ARCH "x86")
-        else()
-          message(FATAL "unsupported architecture")
-        endif()
-
-        find_path(WINKIT_LIB GlU32.lib PATHS "${WINKIT_DIR}/Lib/win8/um/${WINKIT_ARCH}" "${WINKIT_DIR}/Lib/winv6.3/um/${WINKIT_ARCH}")
-
-        list(APPEND CMAKE_PREFIX_PATH "${WINKIT_LIB}")
-        message("Using Windows Kit ${WINKIT_DIR}")
-        set(WINKIT_FOUND TRUE)
-        break()
-      endif()
-    endforeach()
-
-    if (NOT ${WINKIT_FOUND})
-      message("Windows Kit not found. Qt might not find glu32.lib")
-    endif()
-  endif()
-
-  if (MSVC11)
-    set(QtCompiler "msvc2012")
-  elseif(MSVC12)
-    set(QtCompiler "msvc2013")
-  elseif(MSVC14)
-    set(QtCompiler "msvc2015")
-  endif()
-
-  if (${DP_ARCH} STREQUAL "amd64")
-    set(QtArch "_64")
-  endif()
-
-  if (QtCompiler)
-    set(QtRegistryKeys
-     "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Qt;InstallLocation]"
-     "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{0bdb0613-2f59-49c2-93b6-3016f4b1a43b};InstallLocation]"
-    )
-
-    foreach(QtRegistryKey ${QtRegistryKeys})
-      get_filename_component(QtRoot ${QtRegistryKey} REALPATH)
-      if (EXISTS ${QtRoot})
-        message("Qt installation: ${QtRoot}")
-
-        set(QtVersions 5.7 5.6 5.5 5.4 5.3 5.2.1)
-        foreach(QtVersion ${QtVersions})
-          set(QtPath "${QtRoot}/${QtVersion}/${QtCompiler}${QtArch}/lib/cmake")
-          if (EXISTS ${QtPath})
-            message("Using Qt ${QtVersion}: ${QtRoot}/${QtVersion}/${QtCompiler}${QtArch}")
-            list(APPEND CMAKE_PREFIX_PATH ${QtPath})
-            set(QtFound TRUE)
-            break()
-          endif()
-          if (QtFound)
-            break()
-          endif()
-        endforeach()
-      endif()
-    endforeach()
-  endif()
-
-endif()
-
-macro(CopyDevIL)
-endmacro()
-
-macro(CopyGLEW)
-endmacro()
-
-macro(CopyGLUT)
-endmacro()
+include("dp")
+
+file( TO_CMAKE_PATH "$ENV{DP_3RDPARTY_PATH}" DP_3RDPARTY_PATH)
+
+if( UNIX )
+  set(Boost_USE_STATIC_LIBS       OFF)
+  set(Boost_USE_MULTITHREADED      ON)
+  set(Boost_USE_STATIC_RUNTIME    OFF)
+endif()
+
+### Add 3rdparty libraries to the CMake search paths
+if(WIN32)
+  ### boost
+  if (NOT BOOSTROOT)
+    file( TO_CMAKE_PATH "${DP_3RDPARTY_PATH}/Boost" BOOSTROOT)
+
+    if (EXISTS "${BOOSTROOT}")
+      set(BOOST_ROOT "${BOOSTROOT}")
+      set(Boost_USE_STATIC_LIBS "ON")
+    endif()
+  endif()
+
+  # CMake doesn't know about newer boost versions yet
+  set(Boost_ADDITIONAL_VERSIONS "1.59.0" "1.59")
+
+  ### fltlib
+  # Currently disabled since a new version is required
+  #list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/fltlib/include")
+  #list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/fltlib/lib")
+
+  ### lib3ds
+  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/lib3ds/include")
+  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/lib3ds/lib")
+
+  ### tinyxml
+  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/tinyxml/include")
+  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/tinyxml/lib")
+
+  ### OpenEXR
+  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/OpenEXR/include")
+  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/OpenEXR")
+
+  ### DevIL
+  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/DevIL/include")
+  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/DevIL")
+
+  ### GLEW
+  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/glew/include")
+  # TODO OS arch dependency?
+  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/glew/lib/Release/x64")
+
+  ### freeglut
+  list(APPEND CMAKE_INCLUDE_PATH "${DP_3RDPARTY_PATH}/freeglut/include")
+  # TODO OS arch dependency?
+  list(APPEND CMAKE_LIBRARY_PATH "${DP_3RDPARTY_PATH}/freeglut/lib/x64")
+
+  ### Qt
+
+  # Search for Windows SDK so that Qt5 can find glu32.lib
+  if(WIN32)
+    foreach(WINKIT "KitsRoot81" "KitsRoot")
+      get_filename_component(WINKIT_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;${WINKIT}]" ABSOLUTE)
+      if(EXISTS ${WINKIT_DIR})
+        if ( ${DP_ARCH} STREQUAL "amd64" )
+          set(WINKIT_ARCH "x64")
+        elseif(${DP_ARCH} STREQUAL "x86")
+          set(WINKIT_ARCH "x86")
+        else()
+          message(FATAL "unsupported architecture")
+        endif()
+
+        find_path(WINKIT_LIB GlU32.lib PATHS "${WINKIT_DIR}/Lib/win8/um/${WINKIT_ARCH}" "${WINKIT_DIR}/Lib/winv6.3/um/${WINKIT_ARCH}")
+
+        list(APPEND CMAKE_PREFIX_PATH "${WINKIT_LIB}")
+        message("Using Windows Kit ${WINKIT_DIR}")
+        set(WINKIT_FOUND TRUE)
+        break()
+      endif()
+    endforeach()
+
+    if (NOT ${WINKIT_FOUND})
+      message("Windows Kit not found. Qt might not find glu32.lib")
+    endif()
+  endif()
+
+  if (MSVC11)
+    set(QtCompiler "msvc2012")
+  elseif(MSVC12)
+    set(QtCompiler "msvc2013")
+  elseif(MSVC14)
+    set(QtCompiler "msvc2015")
+  endif()
+
+  if (${DP_ARCH} STREQUAL "amd64")
+    set(QtArch "_64")
+  endif()
+
+  if (QtCompiler)
+    set(QtRegistryKey
+     "[HKEY_CURRENT_USER\\Software\\Classes\\Applications\\QtProject.QtCreator.pro\\shell\\Open\\Command]"
+    )
+    get_filename_component(QtRoot ${QtRegistryKey} REALPATH)
+    string( REPLACE "/Tools/QtCreator/bin/qtcreator.exe -client \"%1\"" "" QtRoot "${QtRoot}" )
+    if (EXISTS ${QtRoot})
+      message("Qt installation: ${QtRoot}")
+
+      set(QtVersions 5.7 5.6 5.5 5.4 5.3 5.2.1)
+      foreach(QtVersion ${QtVersions})
+        set(QtPath "${QtRoot}/${QtVersion}/${QtCompiler}${QtArch}/lib/cmake")
+        if (EXISTS ${QtPath})
+          message("Using Qt ${QtVersion}: ${QtRoot}/${QtVersion}/${QtCompiler}${QtArch}")
+          list(APPEND CMAKE_PREFIX_PATH ${QtPath})
+          set(QtFound TRUE)
+          break()
+        endif()
+        if (QtFound)
+          break()
+        endif()
+      endforeach()
+    endif()
+  endif()
+
+endif()
+
+macro(CopyDevIL)
+endmacro()
+
+macro(CopyGLEW)
+endmacro()
+
+macro(CopyGLUT)
+endmacro()


Fixed if clause.

Fixed if clause.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -158,7 +158,7 @@
     set(COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage")
   else(EIGEN_COVERAGE_TESTING)
     set(COVERAGE_FLAGS "")
-  endif(EIGEN_ENABLE_COVERAGE_TESTING)
+  endif(EIGEN_COVERAGE_TESTING)
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS} -g2")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COVERAGE_FLAGS} -O2 -g2")


Same as SVN commit r815981 by neundorf: search in more directories (i.e. allow me to set CMAKE_PREFIX_PATH to kdesupport's prefix)

svn path=/trunk/kdesupport/phonon/; revision=816900

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -23,9 +23,16 @@
    set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake")
 else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project outside kdesupport
+
+   # CMAKE_[SYSTEM_]PREFIX_PATH exists starting with cmake 2.6.0
+   file(TO_CMAKE_PATH "$ENV{CMAKE_PREFIX_PATH}" _env_CMAKE_PREFIX_PATH)
+   file(TO_CMAKE_PATH "$ENV{CMAKE_LIBRARY_PATH}" _env_CMAKE_LIBRARY_PATH)
+
    find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake
              PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4
-             PATHS ${CMAKE_SYSTEM_PREFIX_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX}/lib
+             PATHS ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH}
+                   ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH}
+                   ${CMAKE_INSTALL_PREFIX}/lib
              NO_DEFAULT_PATH )
 endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")


[cmake] make compile_with(ONLY ..) a multi-value arg

--- cmake/SiconosTools.cmake
+++ cmake/SiconosTools.cmake
@@ -131,11 +131,11 @@
 # with the same 'options' as find_package
 # (see http://www.cmake.org/cmake/help/v3.0/command/find_package.html?highlight=find_package)
 MACRO(COMPILE_WITH)
-
+
   set(options REQUIRED)
-  set(oneValueArgs ONLY)
-  set(multiValueArgs COMPONENTS)
-
+  set(oneValueArgs)
+  set(multiValueArgs COMPONENTS ONLY)
+
   cmake_parse_arguments(COMPILE_WITH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

   set(_NAME)
@@ -209,9 +209,11 @@
     list(REMOVE_DUPLICATES _LINK_LIBRARIES)
   endif()
   if(COMPILE_WITH_ONLY)
-    set(_sico_component ${COMPILE_WITH_ONLY})
-    set(${_sico_component}_LINK_LIBRARIES ${${_sico_component}_LINK_LIBRARIES}
-      ${_LINK_LIBRARIES} CACHE INTERNAL "List of external libraries for ${_sico_component}.")
+    FOREACH(_O ${COMPILE_WITH_ONLY})
+      set(_sico_component ${_O})
+      set(${_sico_component}_LINK_LIBRARIES ${${_sico_component}_LINK_LIBRARIES}
+        ${_LINK_LIBRARIES} CACHE INTERNAL "List of external libraries for ${_sico_component}.")
+    ENDFOREACH()
   else()
     set(SICONOS_LINK_LIBRARIES ${SICONOS_LINK_LIBRARIES}
       ${_LINK_LIBRARIES} CACHE INTERNAL "List of external libraries.")


fix accelerator auto selection

fix accelerator auto selection

- disable boost fibers if HIP is selected

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -70,6 +70,10 @@
         set(ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE_DEFAULT OFF)
         set(ALPAKA_ACC_CPU_BT_OMP4_ENABLE_DEFAULT OFF)
     endif()
+endif()
+
+if(ALPAKA_ACC_GPU_HIP_ENABLE)
+    set(ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE_DEFAULT OFF)
 endif()

 if(ALPAKA_ACC_GPU_CUDA_ONLY_MODE AND NOT ALPAKA_ACC_GPU_CUDA_ENABLE)


Bump dev version

Bump dev version

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -30,7 +30,7 @@
 set(IVW_MAJOR_VERSION 0)
 set(IVW_MINOR_VERSION 9)
 set(IVW_PATCH_VERSION 11)
-set(IVW_BUILD_VERSION 0) # set to zero when doing a release, bump to 1 directly after the release.
+set(IVW_BUILD_VERSION 1) # set to zero when doing a release, bump to 1 directly after the release.

 if(${IVW_BUILD_VERSION})
     set(IVW_VERSION ${IVW_MAJOR_VERSION}.${IVW_MINOR_VERSION}.${IVW_PATCH_VERSION}.${IVW_BUILD_VERSION})


Cmake: bugfix

Cmake: bugfix

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -363,6 +363,8 @@
         # Validate that there only are module dependencies
         ivw_private_filter_dependency_list(new_dependencies ${${mod}_class} ${new_dependencies})
         set("${mod}_dependencies" ${new_dependencies} CACHE INTERNAL "Module dependencies")
+        ivw_mod_name_to_mod_dep(udependencies ${new_dependencies})
+        set("${mod}_udependencies" ${udependencies} CACHE INTERNAL "Module uppercase dependencies")
     endforeach()

     # Add module versions dependencies
@@ -385,13 +387,13 @@
     endforeach()

     # Sort modules by dependencies
-    ivw_topological_sort(modules _dependencies sorted_modules)
-
-    # enable depencenies
+    ivw_topological_sort(modules _udependencies sorted_modules)
+
+    # enable dependencies
     ivw_reverse_list_copy(sorted_modules rev_sorted_modules)
     foreach(mod ${rev_sorted_modules})
         if(${${mod}_opt})
-            foreach(dep ${${mod}_dependencies})
+            foreach(dep ${${mod}_udependencies})
                 if(NOT ${${dep}_opt})
                     ivw_add_module_option_to_cache(${${dep}_dir} ON TRUE)
                     message(STATUS "${${dep}_opt} was set to build, "


revery accidental commit of debug optimiazation level change

--- common/cmake/clang.cmake
+++ common/cmake/clang.cmake
@@ -116,7 +116,7 @@
   SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")          # enable assertions
   SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG")  # configure TBB in debug mode
   SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")               # generate debug information
-  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")             # allow inlining of intrinsics
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")             # allow inlining of intrinsics

   SET(CMAKE_CXX_FLAGS_RELEASE "")
   SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")     # disable assertions


0.7.7 - License changed from CecillB to ISC

--- conf/LiboroVersion.cmake
+++ conf/LiboroVersion.cmake
@@ -4,4 +4,4 @@

 SET(CPACK_PACKAGE_VERSION_MAJOR "0")
 SET(CPACK_PACKAGE_VERSION_MINOR "7")
-SET(CPACK_PACKAGE_VERSION_PATCH "6")
+SET(CPACK_PACKAGE_VERSION_PATCH "7")


cmake: Rquire version 3.0.3 of kurento-module-creator

Change-Id: Id935864fc953e14216e1526627445389e4a8d757

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.8)

-find_package(KurentoModuleCreator REQUIRED ^3.0.0)
+find_package(KurentoModuleCreator REQUIRED ^3.0.3)

 include (GNUInstallDirs)


[cmake] Add right location for sha execution

--- builder/FindFunctions.cmake
+++ builder/FindFunctions.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Intel Corporation
+# Copyright (c) 2018 Intel Corporation
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -357,6 +357,7 @@
     COMMAND git rev-parse --short HEAD
     OUTPUT_VARIABLE git_commit
     OUTPUT_STRIP_TRAILING_WHITESPACE
+    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
   )
   if( NOT ${git_commit} MATCHES "^$" )
     set( git_commit ".${git_commit}" PARENT_SCOPE )


utils: Create tooling to allow running vpr on pb_types.

We want to test pb_type files in vpr without having to create a full
architecture. This commit makes that possible.

 * Tool which generates a wrapper arch.xml around a leaf pb_type.xml
   file;
   - One input tile for each input pin
   - One output tile for each input pin
   - One tile containing the leaf pb_type object

 * Tool which generates an eblif with a single object to place at the
   leaf pb_type.xml

 * cmake rules to run the tooling on a pb_type.xml file.

Signed-off-by: Tim 'mithro' Ansell <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@mith.ro>

--- v2x_tests.cmake
+++ v2x_tests.cmake
@@ -81,7 +81,6 @@
   set(TOP_MODULE ${V2X_TEST_MODEL_TOP_MODULE})

   set(SRC ${NAME}.sim.v)
-  add_file_target(FILE ${SRC} SCANNER_TYPE verilog)
   v2x(NAME ${NAME} SRCS ${SRC} TOP_MODULE ${TOP_MODULE})

   v2x_generic_test(NAME ${NAME} TOP_MODULE ${TOP_MODULE} TYPE model)
@@ -117,7 +116,6 @@
   set(TOP_MODULE ${V2X_TEST_MODEL_TOP_MODULE})

   set(SRC ${NAME}.sim.v)
-  add_file_target(FILE ${SRC} SCANNER_TYPE verilog)
   v2x(NAME ${NAME} SRCS ${SRC} TOP_MODULE ${TOP_MODULE})

   v2x_generic_test(NAME ${NAME} TOP_MODULE ${TOP_MODULE} TYPE pb_type)
@@ -154,7 +152,6 @@
   set(TOP_MODULE ${V2X_TEST_BOTH_TOP_MODULE})

   set(SRC ${NAME}.sim.v)
-  add_file_target(FILE ${SRC} SCANNER_TYPE verilog)
   v2x(NAME ${NAME} SRCS ${SRC} TOP_MODULE ${TOP_MODULE})

   v2x_generic_test(NAME ${NAME} TOP_MODULE ${MODULE} TYPE pb_type)


Update CodeCoverage.cmake

Update CodeCoverage.cmake

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -55,7 +55,7 @@

         # Capture coverage data.
         COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --compat-libtool --directory . --capture --output-file ${_outputname}.info
-        COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' 'tools/*' '3rdParty/*' 'protobuf/*' '*.pb.*' 'rapidjson/*' 'pbjson.hpp' 'bin2ascii.h' --output-file ${_outputname}.info.cleaned
+        COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' 'tools/*' '3rdParty/*' 'protobuf/*' '*.pb.*' 'rapidjson/*' 'pbjson.*' 'bin2ascii.h' --output-file ${_outputname}.info.cleaned

         # Generating the report.
         COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned


Update CodeCoverage.cmake

Update CodeCoverage.cmake

[ci skip]

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -1,4 +1,11 @@
-FIND_PROGRAM(GCOV_PATH gcov PATHS /usr/bin)
+IF(DEFINED ENV{VAR})
+    SET(GCOV_PATH $ENV{GCOV_PATH})
+ELSE()
+    FIND_PROGRAM(GCOV_PATH gcov)
+ENDIF()
+
+MESSAGE(STATUS "GCOV_PATH="${GCOV_PATH})
+
 FIND_PROGRAM(LCOV_PATH lcov)
 FIND_PROGRAM(GENHTML_PATH genhtml)


Modified FindOpenGLES.cmake to link with v2 rather than v1 of the library.

--- cmake/FindOpenGLES.cmake
+++ cmake/FindOpenGLES.cmake
@@ -7,6 +7,7 @@

 # Downloaded from
 # https://sourceforge.net/p/alleg/allegro/ci/5.1/tree/cmake/FindOpenGLES.cmake
+# Modified to use the v2 library rather than the v1 library.

 if(OPENGLES_INCLUDE_DIR)
     # Already in cache, be silent
@@ -15,7 +16,7 @@

 find_path(OPENGLES_INCLUDE_DIR GLES/gl.h)

-find_library(OPENGLES_gl_LIBRARY NAMES GLESv1_CM)
+find_library(OPENGLES_gl_LIBRARY NAMES GLESv2)

 # Handle the QUIETLY and REQUIRED arguments and set OPENGLES_FOUND
 # to TRUE if all listed variables are TRUE.


reference xcfun v2.0.0a6

reference xcfun v2.0.0a6

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -12,7 +12,7 @@
     GIT_REPOSITORY
       https://github.com/dftlibs/xcfun.git
     GIT_TAG
-      v2.0.0a4
+      v2.0.0a6
     )

   add_subdirectory(


Cmake: Disable fast link when mem leak test is on

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -255,13 +255,17 @@
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ZI")
     set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /ZI")

+
+
     # enable debug:fastlink for debug builds
     # https://blogs.msdn.microsoft.com/vcblog/2014/11/12/speeding-up-the-incremental-developer-build-scenario/
-    set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
-    set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
+    # needs to be off for proper callstack from VLD https://vld.codeplex.com/discussions/654355
+    if(NOT IVW_ENABLE_MSVC_MEMLEAK_TEST)
+        set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
+        set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
+    endif()

     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
-

     # set iterator debug level (default=2)


Check that jar is found. If not then disable java bindings since we
need this to build them.

svn path=/trunk/; revision=8978

--- cmake/modules/java.cmake
+++ cmake/modules/java.cmake
@@ -48,6 +48,11 @@
       "java compiler not found. Disabling java bindings")
     set(ENABLE_java OFF CACHE BOOL "Enable Java bindings" FORCE)
   endif(NOT CMAKE_Java_COMPILER)
+  if(NOT CMAKE_Java_ARCHIVE)
+    message(STATUS "WARNING: "
+      "java archiver (jar) not found. Disabling java bindings")
+    set(ENABLE_java OFF CACHE BOOL "Enable Java bindings" FORCE)
+  endif(NOT CMAKE_Java_ARCHIVE)
 endif(ENABLE_java)

 if(ENABLE_java)


cmake: Use arch-specific ELF class on memdisk

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -250,7 +250,7 @@
   add_custom_command(
     OUTPUT  memdisk.o
     COMMAND python ${INSTALL_LOC}/memdisk/memdisk.py --file ${INSTALL_LOC}/memdisk/memdisk.asm ${DISK_RELPATH}
-    COMMAND nasm -f elf64 ${INSTALL_LOC}/memdisk/memdisk.asm -o memdisk.o
+    COMMAND nasm -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} ${INSTALL_LOC}/memdisk/memdisk.asm -o memdisk.o
     DEPENDS ${DISK_RELPATH}
   )
   add_library(memdisk STATIC memdisk.o)


Allow xmp finder script to look for xml dll library

--- cmake-scripts/Findxmp.cmake
+++ cmake-scripts/Findxmp.cmake
@@ -10,7 +10,7 @@
     PATH_SUFFIXES include
     PATHS ${XMP_SEARCH_PATHS}
 )
-FIND_LIBRARY(XMP_LIBRARY xmp
+FIND_LIBRARY(XMP_LIBRARY xmp xmp_dll
     HINTS ${XMP_ROOT}
     PATH_SUFFIXES lib64 lib
     PATHS ${XMP_SEARCH_PATHS}
@@ -25,4 +25,4 @@
     MESSAGE(STATUS "Found libxmp: ${XMP_LIBRARY}")
 ELSE()
     MESSAGE(WARNING "Could not find libxmp")
-ENDIF()+ENDIF()